Makefile.in: Update.
[platform/upstream/gcc.git] / gcc / cp / ChangeLog
1 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
2
3         * cp-tree.h (flag_ansi): Remove.
4         * decl2.c (flag_ansi): Remove.
5         (cxx_decode_option): Set flag_iso and flag_undef.
6
7 2002-05-09  Jason Merrill  <jason@redhat.com>
8
9         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
10         Use subtraction rather than a bitmask to get the index.
11         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
12
13         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
14
15 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
16
17         * Make-lang.in (decl2.o): Update.
18         * cp-tree.h (warn_multichar): Remove.
19         * decl2.c: Include c-common.h.
20         (warn_multichar): Remove.
21
22 2002-05-03  Jason Merrill  <jason@redhat.com>
23
24         * tree.c (build_cplus_array_type): Only const and volatile get
25         special handling.
26
27         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
28
29 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
30
31         ABI change, returning simple classes from functions.
32         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
33         TYPE_HAS_TRIVIAL_INIT_REF is false or
34         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
35
36 2002-04-30  Jason Merrill  <jason@redhat.com>
37
38         PR debug/6436
39         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
40         anonymous class with a typedef if there are attributes.
41
42 2002-04-29  Paul Eggert  <eggert@twinsun.com>
43
44         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
45
46 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
47
48         PR c++/6477
49         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
50         non-NULL first.
51
52 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
53
54         PR c++/6492
55         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
56         enter that scope before name lookup.
57
58         PR c++/6486
59         * method.c (do_build_copy_constructor): Avoid building
60         cv-qualified reference types.
61   
62 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
63
64         PR c++/5719
65         * decl.c (grok_op_properties): Assignment ops don't have to return 
66         by value. operator% should.
67
68 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
69
70         PR c/6343
71         * decl.c (duplicate_decls): Call merge_weak.
72
73 2002-04-26  Richard Henderson  <rth@redhat.com>
74
75         * parse.y (malloced_yyss, malloced_yyvs): New.
76         (yyoverflow): Re-add.  Set them.
77         (free_parser_stacks): New.
78
79 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
80
81         PR c++/6497
82         * method.c (do_build_assign_ref): Pass a derivation to
83         build_method_call when calling base class assignment operators.
84
85 2002-04-26  Richard Henderson  <rth@redhat.com>
86
87         * parse.y (yyoverflow): Revert.
88
89 2002-04-26  Richard Henderson  <rth@redhat.com>
90
91         PR c/3581
92         * parse.y (string): Remove.  Update all uses to use STRING
93         instead, and not call combine_strings.
94         * rtti.c (tinfo_name): Use fix_string_type.
95         * semantics.c (finish_asm_stmt): Don't call combine_strings.
96         * spew.c (yylexstring): New.
97         (read_token): Use it.
98
99 2002-04-25  Richard Henderson  <rth@redhat.com>
100
101         PR c/2161
102         * parse.y (yyoverflow): New.
103
104 2002-04-25  Jason Merrill  <jason@redhat.com>
105
106         PR c++/5607
107         * search.c (check_final_overrider): No longer static.
108         * class.c (update_vtable_entry_for_fn): Call it.
109         * cp-tree.h: Adjust.
110
111 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
112
113         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
114         * cp-tree.h (cxx_set_yydebug): Die.
115         * lex.c (YYDEBUG): Get from c-lex.h.
116         (cxx_set_yydebug): Remove.
117         * parse.y: Include c-lex.h.
118         (YYDEBUG): Get from c-lex.h.
119
120 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
121
122         PR c++/6438.
123         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
124         void.
125
126 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
127
128         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
129         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
130         Redefine.
131         * cp-tree.h (cp_attribute_table): Rename.
132         * decl.c (lang_attribute_table): Remove declaration.
133         (cxx_init_decl_processing): Don't set it.
134         * tree.c (cp_attribute_table): Rename.
135
136 2002-04-24  Jason Merrill  <jason@redhat.com>
137
138         PR c++/6331
139         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
140         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
141         The pedwarn for array assignment is now unconditional.
142         * tree.c (build_cplus_array_type_1): Still process simple array types
143         normally in templates.
144
145         PR c++/6395
146         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
147         stuff for comdats.
148
149 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
150
151         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
152         node with attributes.
153
154 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
155
156         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
157         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
158
159 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
160
161         PR c++/6256:
162         * pt.c (tsubst_friend_class): Handle templates with explicit
163         nested names.
164
165         PR c++/6331:
166         * typeck.c (merge_types): Remember the cv-qualification of pointer
167         types when merging them.
168
169 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
170
171         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
172         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
173         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
174         cxx_mark_function_context): New.
175         * decl.c (push_cp_function_context, pop_cp_function_context,
176         mark_cp_function_context): Rename for consistency.
177         (cxx_init_decl_processing): Don't set old hooks.
178
179 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
180
181         * call.c (convert_type_from_ellipsis): Rename, update.
182         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
183         * cp-tree.h (convert_type_from_ellipsis): Rename.
184         * decl.c (cxx_init_decl_processing): Don't set hook.
185
186 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
187
188         * call.c (build_new_method_call): Update.
189         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
190         * cp-tree.h (cxx_incomplete_type_error): New.
191         * decl.c (grokdeclarator, grokparms): Update.
192         * decl2.c (check_classfn): Update.
193         * pt.c (tsubst): Update.
194         * typeck.c (complete_type_or_else, expr_sizeof,
195         decay_conversion): Update.
196         * typeck2.c (incomplete_type_error): Rename.
197         (add_exception_specifier): Update.
198
199 2002-04-18  Jason Merrill  <jason@redhat.com>
200
201         PR c++/5658
202         * search.c (setup_class_bindings): A class template qualifies as a
203         type binding.
204
205 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
206
207         PR c++/6316
208         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
209         before expanding.
210
211 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
212
213         * init.c (begin_init_stmts): Remove commented out code.
214         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
215         * semantics.c (begin_gobal_stmt_expr): Adjust call to
216         expand_start_stmt_expr.
217         
218 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
219
220         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
221         dso_handle itself, to __cxa_atexit.
222
223 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
224
225         * error.c (cxx_print_error_function): Adjust call to macros.
226
227 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
228
229         * class.c (layout_virtual_bases): Do all dsize computation on trees.
230
231 2002-04-14  Jason Merrill  <jason@redhat.com>
232
233         * typeck.c (get_member_function_from_ptrfunc): Don't do
234         gratuitious division and multiplication on
235         ptrmemfunc_vbit_in_delta targets.
236
237 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
238
239         PR c++/5373.
240         * semantics.c (finish_expr_stmt): Remember the type of the
241         expression before any conversions are performed.
242
243 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
244
245         PR c++/5189.
246         * call.c (add_template_candidate_real): Do not treat member
247         templates as copy constructors.
248
249 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
250
251         * decl.c (duplicate_decls): Do not copy the RTL for a variable
252         declaration if the old variable had an incomplete type and the new
253         variable does not.
254         (complete_vars): Do not call layout_decl for completed variables.
255
256 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
257
258         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
259         with an explicit one.
260         (follow_tag_typedef): New.
261         (lookup_tag): Use it to extract the tag of an explicit typedef.
262         (xref_tag): Likewise.
263
264 2002-04-11  Andrew Haley  <aph@redhat.com>
265
266         * typeck.c (type_after_usual_arithmetic_conversions):
267         If two types have the same variant, return immediately.
268         When two floating-point operands are the same precision: 
269           convert to float if one of the operands is float;
270           if neither operand is one of the standard types, return the type
271           of the first operand.
272  
273 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
274
275         PR c++/5507
276         * decl.c (make_typename_type): Remove implicit typenameness.
277
278 2002-04-09  Jason Merrill  <jason@redhat.com>
279
280         PR optimization/6189
281         * semantics.c (genrtl_start_function): Don't free
282         DECL_SAVED_FUNCTION_DATA for inline functions.
283
284         * init.c (build_member_call): For now, don't convert to
285         intermediate base if it would cause an error.
286
287 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
288
289         * parse.y (namespace_qualifier, maybe_identifier,
290         begin_explicit_instantiation, end_explicit_instantiation,
291         apparent_template_type, .finish_template_type,
292         do_id, maybe_init, defarg_again, component_decl_1):
293         Add ending ';', in accordance with POSIX.
294
295 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
296
297         PR c++/5571
298         * class.c (layout_class_type): Remember incomplete static
299         variables.
300         (finish_struct_1): Call complete_vars, not
301         hack_incomplete_structures.
302         * cp-tree.h (hack_incomplete_structures): Rename to ...
303         (complete_vars): ... this.
304         (struct saved_scope): Remove incomplete.
305         (namespace_scope_incomplete): Remove.
306         * decl.c (struct binding_level): Remove incomplete.
307         (incomplete_vars): New variable.
308         (mark_binding_level): Don't mark incomplete.
309         (print_binding_level): Don't print it.
310         (mark_saved_scope): Don't mark incomplete.
311         (pushdecl): Use maybe_register_incopmlete_var.
312         (cxx_init_decl_processing): Register incomplete_vars for GC.
313         (start_decl_1): Clarify error message.
314         (hack_incomplete_vars): Remove.
315         (maybe_register_incomplete_var): New function.
316         (complete_vars): Likewise.
317
318 2002-04-06  Jason Merrill  <jason@redhat.com>
319
320         PR c++/4934
321         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
322         set before checking it.
323
324         PR c++/525
325         * init.c (build_member_call): Use build_scoped_ref.
326         (resolve_offset_ref): Likewise.
327         * call.c (build_scoped_method_call): Likewise.
328         * tree.c (maybe_dummy_object): Kludge around current_class_type being 
329         wrong.
330         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
331         * cp-tree.h: Adjust.
332         
333         * init.c (push_base_cleanups): Just use build_scoped_method_call.
334
335         PR c++/6179
336         * method.c (implicitly_declare_fn): Pass unqualified type to 
337         synthesize_exception_spec.
338
339 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
340
341         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
342         * cvt.c: Update comment.
343         * init.c (expand_cleanup_for_base): Update.
344         * semantics.c (finish_parenthesized_expr): Update.
345         * typeck.c (cp_truthvalue_conversion): Update.
346
347 2002-04-04  Jason Merrill  <jason@redhat.com>
348
349         * semantics.c (finish_eh_cleanup): New fn.
350         * cp-tree.h: Add prototype.
351         * init.c (perform_member_init, expand_cleanup_for_base): Use 
352         finish_eh_cleanup.
353         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
354         * cp-tree.h: Remove references.
355         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
356         * dump.c (cp_dump_tree): Likewise.
357         * pt.c (tsubst_expr): Likewise.
358         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
359         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
360         * tree.c (cp_statement_code_p): Likewise.
361
362         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
363
364         PR c++/5636
365         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
366         cleanup for nrv.
367
368         PR c++/5104
369         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
370         specifiers.
371         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
372
373 2002-04-03  Richard Henderson  <rth@redhat.com>
374
375         * cp-lang.c (cxx_warn_unused_global_decl): New.
376         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
377
378 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
379
380         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
381         * tree.c (init_tree): Don't set hook.
382
383 2002-04-03  Roger Sayle  <roger@eyesopen.com>
384
385         PR c++/5998:
386         * decl.c (duplicate_decls): Don't mess with assembler names when
387         redeclaring builtin functions as static.
388
389 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
390
391         * call.c (build_addr_func): Update.
392         * class.c (resolve_address_of_overloaded_function): Update.
393         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
394         * cp-tree.h (cxx_mark_addressable): New.
395         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
396         * decl2.c (build_cleanup): Update.
397         * except.c (build_throw): Update.
398         * init.c (resolve_offset_ref): Update.
399         * pt.c (convert_nontype_argument): Update.
400         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
401         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
402         unary_complex_lvalue): Update.
403         (mark_addressable): Rename.
404
405 2002-04-01  Roger Sayle  <roger@eyesopen.com>
406
407         PR c++/5998:
408         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
409         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
410         but follow the SET_DECL_RTL idiom used elsewhere in the function.
411
412 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
413
414         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
415         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
416         * decl.c (grokdeclarator): Update.
417         * mangle.c (write_integer_cst): Update.
418         * typeck.c (build_binary_op): Update.
419
420 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
421
422         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
423         * lex.c (cxx_init): Don't set hook.
424
425 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
426
427         * Make-lang.in (error.o): Update.
428         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
429         * cp-tree.h (struct diagnostic_context): Predeclare.
430         (cxx_print_error_function): New.
431         * error.c: Include langhooks-def.h.
432         (lang_print_error_function): Rename.  Update.
433         (init_error): Don't set hook.
434
435 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
436
437         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
438         Redefine.
439         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
440         * decl.c (finish_enum): Similarly.
441         * error.c (dump_type): Similarly.
442         * lex.c (cxx_init): Similarly.
443         * mangle.c (write_builtin_type): Similarly.
444         * typeck.c (comptypes): Similarly.
445
446 2002-03-28  Roger Sayle  <roger@eyesopen.com>
447
448         PR c++/5998:
449         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
450         in the g++ front-end.
451         (duplicate_decl): Allow redefinition of anticipated built-ins.
452         Fix inlining problem by over-writing the old DECL_RTL.
453         (lookup_namespace_name): Fail to find an identifier in the
454         specified namespace if its still anticipated.
455         (builtin_function_1): New function split out from builtin_function
456         to create a builtin in the current namespace with given context.
457         (builtin_function): Call builtin_function_1 to define the
458         appropriate builtins in both the std and global namespaces.
459         (select_decl): Don't test for anticipated decls here.
460         (unqualified_namespace_lookup): Instead ignore them whilst
461         searching through scopes and namespaces.
462         * decl2.c (do_nonmember_using_decl): If a using declaration
463         specifies an anticipated built-in function, mark it as no longer
464         anticipated in that scope.
465         (ambiguous_decl):  Avoid resolving to an anticipated decl.
466         * lex.c (do_scoped_id): Fail to find an identifier in the global
467         namespace if its still anticipated.
468
469 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
470
471         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
472         * cp-tree.h (cp_make_lang_type): Rename.
473         * lex.c (cp_make_lang_type): Rename.
474         (make_aggr_type): Update.
475         * tree.c (init_tree): Don't set make_lang_type_fn.
476
477 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
478
479         PR c++/6073
480         * class.c (finish_struct_1): Update static field's DECL_MODE even
481         if its type is a variant of t.
482
483 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
484
485         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
486         * cp-tree.h (cxx_insert_default_attributes): New.
487         * decl.c (insert_default_attributes): Rename.
488
489 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
490
491         PR c++/4884
492         * call.c (build_op_delete_call): Allow for the fact the placement
493         may be a COMPOUND_EXPR.
494         
495 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
496
497         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
498         * cp-tree.h (init_cplus_expand): Remove.
499         (cxx_expand_expr): New.
500         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
501         fix prototype.
502         (init_cplus_expand): Remove.
503         * lex.c (cxx_init): Don't call init_cplus_expand.
504
505 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
506
507         PR c++/4884.
508         * init.c (build_new_1): Allow for the fact the result of
509         build_function_call may be a COMPOUND_EXPR.
510
511 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
512
513         PR c++/5682
514         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
515         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
516         (dfs_skip_nonprimary_vbases_markedp): Remove.
517         * search.c (get_shared_vbase_if_not_primary): Remove.
518         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
519         (dfs_skip_nonprimary_vbases_markedp): Remove.
520         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
521         (dfs_marked_real_bases_queue_p): Likewise.
522
523 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
524
525         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
526         * cp-tree.h (cxx_mark_tree): New.
527         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
528
529 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
530
531         * cp-tree.h (cxx_maybe_build_cleanup): New.
532         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
533         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
534         * tree.c (build_target_expr): Update.
535         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
536
537 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
538
539         * decl2.c (cxx_decode_option): Handle -E.
540         * lang-specs.h (default_compilers): Preprocess with cc1plus.
541         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
542
543 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
544
545         PR c++/6037
546         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
547
548 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
549
550         * error.c (dump_type): Be careful about implicit typenames.
551
552 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
553
554         PR C++/3656
555         * semantics.c (finish_base_specifier): Handle erronous base
556         classes. 
557
558 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
559
560         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
561         REAL_IS_NOT_DOUBLE.
562
563 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
564
565         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
566         an index into the vtable_entry array regardless of
567         TARGET_PTRMEMFUNC_VBIT_LOCATION.
568
569 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
570
571         * tree.c (cp_cannot_inline_tree_fn): Same.
572
573 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
574
575         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
576         insert_block, getdecls, global_bindings_p): New.
577
578 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
579
580         PR c++/4361
581         * mangle.c (struct globals) Add internal_mangling_p member.
582         (write_template_param): Do internal mangling, if needed.
583         (mangle_conv_op_name_for_type): Request internal mangling.
584
585 2002-03-20  Jason Merrill  <jason@redhat.com>
586
587         PR c++/2136
588         * init.c (build_delete): Check access for a member op delete here.
589         * decl2.c (delete_sanity): Not here.
590
591 2002-03-19  Jason Merrill  <jason@redhat.com>
592
593         PR c++/5118
594         * class.c (get_vfield_name): Use the constructor_name.
595
596 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
597
598         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
599         * cp-tree.h (lang_printable_name): Rename.
600         * error.c (lang_decl_name): Use new hook.
601         * lex.c (cxx_init): Remove old hook.
602         * pt.c (tsubst_decl): Use new hook.
603         * tree.c (lang_printable_name): Rename.
604
605 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
606
607         PR c++/3882
608         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
609         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
610         only after recording the declaration.
611
612 2002-03-18  Jason Merrill  <jason@redhat.com>
613
614         PR c++/2039
615         * init.c (resolve_offset_ref): Hand off to build_component_ref.
616
617         PR c++/4222, c++/5995
618         * call.c (build_over_call): Fix empty class logic.
619
620         PR c++/3870
621         * cp-tree.h (struct saved_scope): Add last_parms field.
622         * decl.c (maybe_push_to_top_level): Save last_function_parms.
623         (pop_from_top_level): Restore it.
624
625         PR c++/4377
626         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
627         NON_LVALUE_EXPRs.
628
629         PR c++/4003
630         * pt.c (tsubst_friend_function): Use decl_namespace_context.
631
632         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
633         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
634         type with a nontrivial destructor.
635
636 2002-03-17  Jason Merrill  <jason@redhat.com>
637
638         PR c++/4460
639         * class.c (build_base_path): Virtual base layout is fixed in
640         in-charge [cd]tors.
641
642 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
643
644         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
645         * parse.y (yyparse): Remove macro.
646
647 2002-03-17  Jason Merrill  <jason@redhat.com>
648
649         PR c++/5757
650         * init.c (build_new_1): Pass the right pointer to op delete.
651
652 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
653
654         PR c++/4361
655         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
656         conversion operators go.
657         (struct lang_decl_flags): Add template_conv_p and unused
658         bitfields.
659         (DECL_TEMPLATE_CONV_FN_P): New macro.
660         * call.c (build_user_type_conversion_1): Don't check second type
661         conversion of overload set first.
662         * class.c (add_method): Make sure templated conversion operators
663         all end up on slot 2.
664         * lex.c (do_identifier): A conversion operator token might be
665         satisfied by a templated conversion operator.
666         * pt.c (check_explicit_specialization): Use
667         CLASSTYPE_FIRST_CONVERSION_SLOT.
668         (template_parm_this_level_p): New function.
669         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
670         * search.c (lookup_fnfields_1): Template conversions will be on
671         the first slot.
672         * typeck.c (build_component_ref): Preserve the type of an
673         conversion operator name on the overload type.
674         (build_x_function_call): Retrieve the conversion operator name.
675
676 2002-03-15  Richard Henderson  <rth@redhat.com>
677
678         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
679
680 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
681
682         * cp-tree.h (CLEANUP_DECL): Remove.
683         (CLEANUP_EXPR): Likewise.
684         * decl.c (destroy_local_var): Simplify.
685         (maybe_build_cleanup): Tidy.
686         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
687         * semantics.c (cp_expand_stmt): Likewise.
688         * cp/tree.c (cp_statement_code_p): Likewise.
689
690 2002-03-15  Jason Merrill  <jason@redhat.com>
691
692         PR c++/5857
693         * decl.c (duplicate_decls): Use merge_types instead of common_type.
694         * typeck.c (common_type): Just hand off to
695         type_after_usual_arithmetic_conversions and
696         composite_pointer_type.
697         (merge_types): New fn.
698         (commonparms): Use it instead of common_type.
699         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
700         (composite_pointer_type): Also handle attributes.
701         * cp-tree.h: Declare merge_types.
702
703         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
704         variables.
705         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
706
707 2002-03-14  Richard Henderson  <rth@redhat.com>
708
709         * decl.c: Include c-pragma.h.
710         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
711         * Make-lang.in: Update dependencies.
712
713 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
714
715         PR c++/5908
716         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
717         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
718
719 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
720
721         * mangle.c (write_builtin_type): Handle 128-bit integers even if
722         they are not a standard integer type.
723
724 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
725
726         * cp-tree.h (init_init_processing): Remove declaration.
727         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
728         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
729
730 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
731
732         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
733         Define.
734         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
735         tree_code_length.
736         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
737         cplus_tree_code_name): Delete.
738         (cxx_init): Don't call add_c_tree_codes, instead set
739         lang_unsafe_for_reeval.  Don't try to copy into the various
740         tree_code arrays.
741
742 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
743
744         PR c++/5659
745         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
746         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
747         definitions.
748
749 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
750
751         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
752         DR209 is now not a defect.
753         * cp-tree.h (skip_type_access_control): Remove.
754         * decl.c (grokdeclarator): Do type access control for friend
755         declarations.
756         * semantics.c (decl_type_access_control): Don't reset
757         current_type_lookups.
758         (save_type_access_control): Always save the lookups.
759         (skip_type_access_control): Remove.
760         (finish_class_definition): Don't change type_lookups.
761
762 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
763
764         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
765         It is incorrect.
766         * typeck.c (build_static_cast): Compare non-qualified types
767         with pointer to member conversions.
768
769 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
770             Daniel Berlin  <dan@dberlin.org>
771
772         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
773         (cxx_get_alias_set): Use it.
774
775 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
776
777         * cp-tree.h (stabilize_expr): Prototype.
778
779 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
780
781         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
782         conditional return void.
783
784 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
785
786         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
787         * cp-tree.h (cxx_unsave): New.
788         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
789         (init_tree): Update.
790
791 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
792
793         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
794         explicit sizeof/sizeof.
795         * decl2.c (cxx_decode_option): Likewise.
796         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
797
798 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
799
800         PR c++/775
801         * decl.c (lookup_tag): Only reject enum/class mismatch, not
802         class/union mismatch.
803         * parse.y (check_class_key): New function.
804         (structsp): Call it.
805
806 2002-03-01  Michael Matz  <matz@suse.de>
807
808         * typeck.c (cp_pointer_int_sum): Complete inner type which is
809         used later by size_in_bytes().
810
811 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
812
813         * cp-tree.h:  Require __GNUC__ to be #defined.
814         (build_init):  Add missing prototype.
815
816 2002-03-01  Jason Merrill  <jason@redhat.com>
817
818         * except.c: Don't include decl.h or obstack.h.  Do include
819         tree-inline.h.
820         (build_throw): Destroy temporaries from the thrown
821         expression before calling __cxa_throw.  Construct a thrown 
822         temporary directly into the exception object.
823         (stabilize_throw_expr): New function.
824         (wrap_cleanups_r): New function.
825         * tree.c (stabilize_expr): New function.
826         * init.c (build_init): New function.
827         * Make-lang.in (cp/except.o): Adjust .h deps.
828
829 2002-02-28  Jason Merrill  <jason@redhat.com>
830
831         * search.c (lookup_base_r): Don't clear is_non_public just because
832         we found a friendly scope.
833
834         * decl.c (finish_function): Only warn about missing return
835         statement with -Wreturn-type.
836
837 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
838
839         * class.c (build_clone): Update.
840         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
841         * cp-tree.h (cxx_dup_lang_specific_decl): New.
842         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
843         (copy_decl): Update.
844         * method.c (make_thunk): Update.
845
846 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
847
848         * decl2.c: Delete traditional-mode-related code copied from
849         the C front end but not used, or used only to permit the
850         compiler to link.
851
852 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org> 
853
854         PR c++/4093
855         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
856         to void.
857
858 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
859
860         PR other/5746
861         * semantics.c (finish_switch_cond): Don't call get_unwidened
862         if error_mark_node.
863
864 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
865
866         PR c++/2645, DR 295
867         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
868         tf_keep_type_decl.
869         (make_typename_type): Use tsubst_flags_t.
870         * decl.c (make_typename_type): Adjust. Return non-artificial
871         TYPE_DECLs, if required.
872         (grokdeclarator): Simplify CVR qualification handling. Allow bad
873         qualifiers on typedef types.
874         * decl2.c (handle_class_head): Adjust make_typename_type call.
875         * parse.y (nested_name_specifier): Likewise.
876         (typename_sub0): Likewise.
877         (typename_sub1): Likewise.
878         * pt.c (convert_template_argument): Adjust make_typename_type
879         return value.
880         (tsubst): Adjust cp_build_qualified_type_real calls.
881         (check_cv_quals_for_unify): Cope with alowing bad qualifications
882         on template type parms.
883         (instantiate_decl): Recheck substitutions to give warnings on bad
884         qualifications.
885         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
886
887 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
888
889         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
890
891         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
892         unless DECL_ALWAYS_INLINE.
893
894 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
895
896         * typeck.c (cp_pointer_int_sum): Renamed from
897         pointer_int_sum, call pointer_int_sum.
898
899 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
900
901         * decl.c (duplicate_decls): Return 0 if issued error about
902         redeclaration.
903
904 2002-02-19  Jason Merrill  <jason@redhat.com>
905
906         ABI change: Mangle `void (A::*)() const' as 
907         M1AKFvvE, not MK1AFvvE.
908         * mangle.c (write_function_type): Write cv-quals for member
909         function type here.
910         (write_pointer_to_member_type): Not here.
911
912 2002-02-18  Jason Merrill  <jason@redhat.com>
913
914         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
915         (do_decl_instantiation): Likewise.
916
917 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
918
919         PR c++/5685
920         * decl.c (duplicate_decls): Make warning unconditional
921         if duplicate default argument declarations are present.
922
923 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
924
925         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
926         shortening.
927
928 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
929
930         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
931         remove incorrect comment. Move #if 0'd code to common path. Use
932         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
933
934 2002-02-13  Jason Merrill  <jason@redhat.com>
935
936         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
937         (finish_function): Don't warn if current_function_returns_null.
938
939         * typeck2.c (digest_init): Do handle values of vector type.
940
941         * typeck2.c (digest_init, process_init_constructor): Treat vectors
942         like arrays.
943
944 2002-02-11  Jason Merrill  <jason@redhat.com>
945
946         * parse.y (reserved_declspecs): Don't handle attributes.
947         (reserved_typespecquals): Handle them here.
948         * Make-lang.in (parse.c): Adjust expected conflicts.
949
950 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
951
952         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
953         instead of compstmt.
954         (compstmt_or_stmtexpr): Renamed from compstmt.
955         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
956
957 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
958
959         Rename instantiate_type_flags to tsubst_flags_t & expand use.
960         * cp-tree.h (instantiate_type_flags): Rename to ...
961         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
962         add tf_warning flag.
963         (instantiate_type): Adjust prototype.
964         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
965         do_type_instantiation, cp_build_qualified_type_real): Likewise.
966         cp_build_qualified_type: Adjust.
967         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
968         tf_*.
969         * call.c (standard_conversion): Rename itf_* to tf_*.
970         (reference_binding): Likewise.
971         (convert_like_real): Likewise.
972         * cvt.c (cp_convert_to_pointer): Likewise.
973         (convert_to_reference): Likewise.
974         * decl.c (lookup_namespace_name): Use tf_* flags.
975         (make_typename_type): Likewise.
976         (grokdeclarator): Likewise.
977         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
978         (coerce_template_template_parms, convert_template_argument,
979         coerce_template_parms, maybe_get_template_decl_from_type_decl,
980         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
981         instantiate_class_template, tsubst_template_arg_vector, 
982         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument, 
983         tsubst_decl, tsubst_arg_types, tsubst_function_type,
984         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr, 
985         instantiate_template, fn_type_unification,
986         resolve_overloaded_unification, verify_class_unification, 
987         unify, get_bindings_real, do_type_instantiation, 
988         regenerate_decl_from_template, instantiate_decl, 
989         tsubst_initializer_list, tsubst_enum,
990         get_mostly_instantiated_function_type,
991         invalid_nontype_parm_type_p): Likewise.
992         * tree.c (cp_build_qualified_type_real): Likewise.
993         * typeck.c (build_binary_op): Rename itf_* to tf_*.
994         (build_ptrmemfunc): Likewise.
995         (convert_for_assignment): Likewise.
996
997 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
998
999         PR c++/109
1000         * decl.c (grokdeclarator): Allow friend declarations from
1001         dependent types.
1002         * decl2.c (handle_class_head): Don't push into template parm contexts.
1003         * pt.c (push_template_decl_real): Template parm contexts are never
1004         being defined.
1005
1006 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
1007
1008         * class.c: Include target.h.
1009         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
1010         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
1011         bit-field layout.
1012         * Make-lang.in: Adjust deps.
1013
1014 2002-02-05  Jason Merrill  <jason@redhat.com>
1015
1016         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
1017
1018 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
1019
1020         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
1021         (finish_switch_cond): Set SWITCH_TYPE.
1022
1023 2002-02-04  Richard Henderson  <rth@redhat.com>
1024
1025         * method.c (use_thunk): Always initialize the block tree.  Reindent.
1026         * semantics.c (expand_body): Emit thunks after function, not before.
1027
1028 2002-02-04  Jason Merrill  <jason@redhat.com>
1029
1030         * decl.c (start_function): Call cplus_decl_attributes immediately
1031         after grokdeclarator.
1032
1033         * decl.c (start_function): Combine DECL_RESULT handling code.
1034
1035 2002-02-03  Jason Merrill  <jason@redhat.com>
1036
1037         * xref.c: Remove.
1038         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
1039         (cp/xref.o): Remove dependencies.
1040         * class.c (finish_struct_1, check_methods): Don't call xref fns.
1041         (finish_struct_1): Likewise.
1042         * friend.c (make_friend_class): Likewise.
1043         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
1044         * spew.c (read_process_identifier): Likewise.
1045
1046 2002-02-01  Jason Merrill  <jason@redhat.com>
1047
1048         PR c++/4872
1049         * decl.c (finish_function): Warn about a non-void function with 
1050         no return statement and no abnormal exit.
1051         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
1052         (current_function_returns_abnormally): New macro.
1053         * call.c (build_call): Set it.
1054
1055         * typeck.c (build_component_ref): Always complain about offsetof
1056         constructs on non-PODs.  Only make it an error for members of
1057         virtual bases.
1058
1059         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
1060         (dump_function_decl): Always dump parms.
1061
1062         * decl2.c (finish_static_data_member_decl): Complain about a local
1063         class with a static data member.
1064
1065         PR c++/4286
1066         * search.c (lookup_field_1): Don't xref a static data member
1067         just because we looked it up.
1068
1069 2002-01-31  Jason Merrill  <jason@redhat.com>
1070
1071         * Make-lang.in (parse.c): Handle .output file.
1072
1073         PR c++/3395
1074         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
1075         not TREE_TYPE.
1076         * semantics.c (finish_class_definition): Adjust.
1077
1078         Allow attributes in parms and casts.
1079         * parse.y (named_parm): Don't strip attrs.
1080         (declmods): Remove 'attributes' production.
1081         (nonempty_cv_qualifiers): Accept attributes.
1082         (ATTRIBUTE): Give precedence.
1083         * decl.c (groktypename): Handle attributes.
1084         (grokparms): Likewise.
1085
1086 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
1087
1088         * decl2.c (cxx_decode_option): Pass 0 as last argument to
1089         cpp_handle_option.
1090         * lang-specs.h: Use cpp_unique_options instead of cpp_options
1091         when used together with cc1_options.
1092
1093 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
1094
1095         PR c++/5132
1096         * typeck2.c (digest_init): Make sure non-array core type is
1097         instantiated.
1098         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
1099         constructor, rather than build a new one.
1100         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
1101         PURPOSE of constructor elts.
1102
1103 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
1104
1105         * Make-lang.in (parse.c): Adjust expected number of
1106         shift-reduce conflicts.
1107         (decl.o): Depend on diagnostic.h.
1108         * decl.c: Include diagnostic.h.
1109         (grokdeclarator): Check for null pointer.
1110         (finish_function): Don't abort when
1111         current_binding_level->parm_flag != 1, if errors have
1112         occurred; throw away the statement tree and extra binding
1113         levels, and continue.
1114         * lex.c (note_list_got_semicolon): Check for null pointer.
1115         * method.c (hack_identifier): Just return error_mark_node if
1116         value is error_mark_node.
1117         * parse.y (primary: TYPEID(type_id)): No need to use
1118         TYPE_MAIN_VARIANT here.
1119         (handler_seq): Accept an empty list of catch clauses and
1120         generate a fake handler block to avoid later crashes.
1121         (ansi_raise_identifier): Accept the error token too.
1122         * semantics.c (begin_class_definition,
1123         finish_class_definition): Check for error_mark_node.
1124
1125 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
1126
1127         * typeck2.c (friendly_abort): Delete definition.
1128         * cp-tree.h (friendly_abort): Don't prototype.
1129         (my_friendly_assert): Use fancy_abort.
1130
1131 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
1132
1133         * cp-tree.h (my_friendly_abort): Remove.
1134
1135 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
1136
1137         * spew.c (pending_inlines, pending_inlines_tail,
1138         processing_these_inlines): Make static.
1139         (mark_pending_inlines): Remove static.
1140         (begin_parsing_inclass_inline): If in function, save pi
1141         for GC to cp_function_chain->unparsed_inlines instead.
1142         (process_next_inline): Likewise.
1143         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
1144         (mark_pending_inlines): Add prototype.
1145         * decl.c (spew_debug): Remove unused extern.
1146         (mark_lang_function): Call mark_pending_inlines.
1147
1148 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
1149
1150         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
1151         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
1152         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
1153         Change my_fancy_abort() to abort().
1154
1155 2002-01-23  Jason Merrill  <jason@redhat.com>
1156
1157         PR c++/5453
1158         * class.c (fixed_type_or_null): Fix thinko.
1159
1160         PR c++/3331
1161         * init.c (resolve_offset_ref): Use build_indirect_ref.
1162
1163         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
1164
1165 2002-01-22  Jason Merrill  <jason@redhat.com>
1166
1167         * parse.y (function_body): Suppress the block for the outermost
1168         curly braces.
1169         * decl.c (pushdecl): Don't try to skip it.
1170         (begin_function_body): Keep the block we create, not the next one.
1171         * init.c (emit_base_init): Don't mess with keep_next_level.
1172
1173         * class.c (build_base_path): Tweak formatting.
1174
1175 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
1176
1177         Fix regression introduced with patch for c++/775
1178         * parse.y (class_head_defn): Check for template specializations
1179         with a different class-key.
1180
1181 2002-01-17  Jason Merrill  <jason@redhat.com>
1182
1183         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
1184         (begin_function_body): Call them and keep_next_level.
1185         * init.c (emit_base_init): Call keep_next_level.
1186         * semantics.c (setup_vtbl_ptr): Lose.
1187         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
1188         (vtbls_set_up_p): Lose.
1189         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
1190         * method.c (do_build_copy_constructor): Likewise.
1191         (synthesize_method): Call finish_mem_initializers.
1192         * parse.y (nodecls): Likewise.
1193
1194         * error.c (dump_type_suffix): Print the exception specs before
1195         recursing.
1196         (dump_function_decl): Here, too.
1197
1198         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
1199
1200 2002-01-10  Ira Ruben   <ira@apple.com>
1201
1202         PR c++/907
1203         * decl.c (start_method): Handle attrlist.
1204
1205 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
1206
1207         * decl2.c (max_tinst_depth): Increase default limit to 500.
1208
1209 2002-01-10  Graham Stott  <grahams@redhat.com>
1210
1211         * spew.c (YYCHAR): Uppercase macro parameter and add
1212         parenthesis.
1213         (YYCODE): Likewise.
1214         (NAME): Uppercase macro parameter.
1215
1216 2002-01-09  Graham Stott  <grahams@redhat.com>
1217
1218         * decl.h (grokdeclarator): Wrap long line.
1219
1220         * semantics.c (FINISH_COND): Uppercase macro paramaters and
1221         add parenthesis.
1222
1223 2002-01-08  Graham Stott  <grahams@redhat.com>
1224
1225         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
1226         (PALLOC): Uppercase macro parameter and whitespace.
1227         (SALLOC): Uppercase macro parameter.
1228         (SFREE): Uppercase macros parameter, add parenthese and
1229         whitespace.
1230         (STREQL): Uppercase macro parameter and whitespace.
1231         (STRNEQ): Likewise.
1232         (STRLSS): Likewise.
1233         (STRLEQ): Likewise.
1234         (STRGTR): Likewise.
1235         (STRGEQ): Likewise.
1236
1237         * call.c (convert_like): Add parenthesis and wrap.
1238         (convert_like_with_context): Likewise.
1239         (ICS_RANK): Whitespace.
1240         (NEED_TEMPORARY_P): Remove parenthesis.
1241
1242         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
1243         whitespace.
1244         (VTT_MARKED_BINFO_P): Likewise.
1245
1246         * decl.c (BINDING_LEVEL): Add parenthesis.
1247         (DEF_OPERATOR): Likewise.
1248
1249         * mangle.c (MANGLE_TRACE): Add parenthesis.
1250         (MANGLE_TRACE_TREE): Likewise.
1251         (write_signed_number): Likewise.
1252         (write_unsigned_number): Likewise.
1253
1254         * pt.c (ccat): Uppercase macro parameter.
1255         (cat): Likewise
1256
1257         * search.c (SET_BINFO_ACCESS): Add parenthesis.
1258
1259 2002-01-07  Jason Merrill  <jason@redhat.com>
1260
1261         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
1262         to pedwarn.
1263
1264         PR c++/3536
1265         * method.c (make_thunk): If !flag_weak, give the thunk the
1266         function's linkage.
1267         (use_thunk): Here, too.
1268
1269 2002-01-07  Graham Stott  <grahams@redhat.com>
1270
1271         * error.c: Update copyright date.
1272         (print_scope_operator): Add parenthesis.
1273         (print_left_paren): Likewise.
1274         (print_right_paren): Likewise.
1275         (print_left_bracket): Likewise.
1276         (print_right_bracket): Likewise.
1277         (print_template_argument_list_start): Likewise.
1278         (print_template_argument_list_end): Likewise.
1279         (print_non_consecutive_character): Likewise.
1280         (print_tree_identifier): Likewise.
1281         (print_identifier): Likewise.
1282         (NEXT_CODE): Uppercase macro parameter.
1283         (ident_fndecl): Delete unused.
1284         (GLOBAL_THING): Likewise.
1285
1286 2002-01-06  Graham Stott  <grahams@redhat.com>
1287
1288         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
1289         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
1290         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
1291         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
1292         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
1293         (C_IS_RESERVED_WORD): Uppercase macro parameter.
1294         (C_RID_YYCODE) Likewise.
1295         (ptrmem_cst): Use rtx.
1296         (LOCAL_BINDING_P): Add whitespace.
1297         (INHERITED_VALUE_BINDING_P): Likewise.
1298         (BINDING_SCOPE): Wrap long line.
1299         (BINDING_HAS_LEVEL_P): Remove parenthesis.
1300         (BINDING_VALUE): Wrap long line.
1301         (BINDING_TYPE): Whitespace.
1302         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
1303         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
1304         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
1305         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
1306         (same_type_p): Uppercase macro parameters.
1307         (same_type_ignoring_top_level_qualifiers_p): Likewise.
1308         (OVL_FUNCTION): Wrap long line.
1309         (OVL_CHAIN): Whitespace.
1310         (OVL_CURRENT): Add parenthesis and whitespace.
1311         (OVL_NEXT): Whitespace.
1312         (OVL_USED): Likewise.
1313         (IDENTIFIER_TYPE_VALUE): Likewise.
1314         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
1315         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
1316         (LANG_ID_FIELD): Whitespace.
1317         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
1318         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
1319         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
1320         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
1321         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
1322         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
1323         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
1324         (IDENTIFIER_VIRTUAL_P): Likewise.
1325         (IDENTIFIER_OPNAME_P): Likewise.
1326         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
1327         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
1328         (C_SET_EXP_ORIGINAL_CODE): Likewise.
1329         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
1330         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
1331         (IS_AGGR_TYPE): Uppercase macro parameter.
1332         (CLASS_TYPE_P): Likewise.
1333         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
1334         (IS_AGGR_TYPE_2): Whitespace.
1335         (TAGGED_TYPE_P): Uppercase macro parameter.
1336         (TYPE_BUILT_IN): Whitespace.
1337         (TYPE_FOR_JAVA): Likewise.
1338         (FUNCTION_ARG_CHAIN): Remove parenthesis.
1339         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
1340         (FUNCTION_FIRST_USER_PARAM): Likewise.
1341         (PROMOTES_TO_AGGR_TYPE): Whitespace.
1342         (DERIVED_FROM_P): Add parenthesis and wrap.
1343         (UNIQUELY_DERIVED_FROM_P): Likewise.
1344         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
1345         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
1346         (CLASSTYPE_USE_TEMPLATE): Whitespace.
1347         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
1348         (TYPE_GETS_DELETE): Add parenthesis.
1349         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
1350         (TYPE_HAS_ASSIGN_REF): Likewise,
1351         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
1352         (TYPE_HAS_INIT_REF): Likewise.
1353         (TYPE_HAS_CONST_INIT_REF): Likewise.
1354         (TYPE_BEING_DEFINED): Likewise.
1355         (TYPE_LANG_SPECIFIC): Likewise.
1356         (CLASSTYPE_RTTI): Likewise.
1357         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
1358         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
1359         (TYPE_OVERLOADS_ARROW): Likewise.
1360         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
1361         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
1362         (CLASSTYPE_METHOD_VEC): Likewise.
1363         (CLASSTYPE_MARKED_N): Likewise.
1364         (CLASSTYPE_MARKED): Likewise.
1365         (CLASSTYPE_MARKED2): Likewise.
1366         (CLASSTYPE_MARKED3): Likewise.
1367         (CLASSTYPE_MARKED4): Likewise.
1368         (CLASSTYPE_MARKED5): Likewise.
1369         (CLASSTYPE_MARKED6): Likewise.
1370         (SET_CLASSTYPE_MARKED): Whitespace.
1371         (CLEAR_CLASSTYPE_MARKED): Likewise.
1372         (SET_CLASSTYPE_MARKED2): Likewise.
1373         (CLEAR_CLASSTYPE_MARKED2): Likewise.
1374         (SET_CLASSTYPE_MARKED3): Likewise.
1375         (CLEAR_CLASSTYPE_MARKED3): Likewise.
1376         (SET_CLASSTYPE_MARKED4): Likewise.
1377         (CLEAR_CLASSTYPE_MARKED4): Likewise.
1378         (SET_CLASSTYPE_MARKED5): Likewise.
1379         (CLEAR_CLASSTYPE_MARKED5): Likewise.
1380         (SET_CLASSTYPE_MARKED6): Likewise.
1381         (CLEAR_CLASSTYPE_MARKED6): Likewise.
1382         (CLASSTYPE_TAGS): Likewise.
1383         (CLASSTYPE_VSIZE): Likewise.
1384         (CLASSTYPE_VBASECLASSES): Likewise.
1385         (CANONICAL_BINFO): Add parenthesis.
1386         (CLASSTYPE_SIZE(NODE): Likewise.
1387         (CLASSTYPE_SIZE_UNIT): Likewise.
1388         (CLASSTYPE_ALIGN(NODE): Likewise.
1389         (CLASSTYPE_USER_ALIGN): Likewise.
1390         (TYPE_JAVA_INTERFACE): Likewise.
1391         (CLASSTYPE_PURE_VIRTUALS): Likewise.
1392         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
1393         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
1394         (CLASSTYPE_HAS_MUTABLE): Likewise.
1395         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
1396         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
1397         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
1398         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
1399         (CLASSTYPE_INTERFACE_ONLY): Likewise.
1400         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
1401         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
1402         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
1403         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
1404         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
1405         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
1406         (BINFO_UNSHARED_MARKED): Whitespace.
1407         (BINFO_MARKED): Whitespace and wrap.
1408         (SET_BINFO_MARKED): Likewise.
1409         (CLEAR_BINFO_MARKED): Likewise.
1410         (BINFO_VTABLE_PATH_MARKED): Likewise.
1411         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
1412         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
1413         (BINFO_SUBVTT_INDEX): Remove parenthesis.
1414         (BINFO_VPTR_INDEX): Likewise.
1415         (BINFO_PRIMARY_BASE_OF): Likewise,
1416         (CLASSTYPE_VFIELDS): Whitespace.
1417         (VF_DERIVED_VALUE): Wrap long line.
1418         (NAMESPACE_LEVEL): Whitespace.
1419         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
1420         (DEFARG_POINTER): Whitespace.
1421         (DECL_NEEDED_P): Remove parenthesis.
1422         (DECL_LANGUAGE): Whitespace.
1423         (SET_DECL_LANGUAGE): Add parenthesis.
1424         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
1425         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
1426         (DECL_IN_AGGR_P): Whitespace.
1427         (DECL_FRIEND_P): Likewise.
1428         (DECL_BEFRIENDING_CLASSES): Likewise.
1429         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
1430         (DECL_NONCONVERTING_P): Whitespace.
1431         (DECL_PURE_VIRTUAL_P): Likewise.
1432         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
1433         (DECL_PENDING_INLINE_INFO): Whitespace.
1434         (DECL_SORTED_FIELDS): Likewise.
1435         (DECL_DEFERRED_FN): Likewise.
1436         (DECL_TEMPLATE_INFO): Likewise.
1437         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
1438         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
1439         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
1440         (TMPL_ARGS_LEVEL): Likewise.
1441         (SET_TMPL_ARGS_LEVEL): Likewise.
1442         (INNERMOST_TEMPLATE_PARMS): Whitespace.
1443         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
1444         (INTEGRAL_CODE_P(CODE): Add parenthesis.
1445         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
1446         (TYPE_HAS_CONSTRUCTOR): Whitespace.
1447         (TREE_HAS_CONSTRUCTOR): Likewise.
1448         (TYPE_HAS_DESTRUCTOR): Likewise.
1449         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
1450         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
1451         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
1452         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
1453         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
1454         (TYPE_PTRMEMFUNC_P): Likewise.
1455         (TYPE_PTRMEMFUNC_FLAG): Likewise.
1456         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
1457         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
1458         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
1459         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
1460         (DECL_ACCESS): Whitespace.
1461         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
1462         (DECL_GLOBAL_DTOR_P): Likewise.
1463         (GLOBAL_INIT_PRIORITY): Likewise.
1464         (DECL_TEMPLATE_PARMS): Likewise.
1465         (DECL_TEMPLATE_RESULT): Likewise.
1466         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
1467         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
1468         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
1469         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
1470         (PRIMARY_TEMPLATE_P): Add parenthesis.
1471         (DECL_USE_TEMPLATE): Whitespace.
1472         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
1473         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
1474         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
1475         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
1476         (CALL_DECLARATOR_PARMS): Remove parenthesis.
1477         (CALL_DECLARATOR_QUALS): Likewise.
1478         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
1479         (TEMP_NAME_P): Wrap.
1480         (VFIELD_NAME_P): Likewise.
1481         (B_SET): Uppercase macro parameters and add parenthesis.
1482         (B_CLR): Likewise.
1483         (B_TST): Likewise.
1484         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
1485         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
1486         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
1487         (same_or_base_type_p): Likewise.
1488         (cp_deprecated): Likewise.
1489
1490 2002-01-05  Richard Henderson  <rth@redhat.com>
1491
1492         * semantics.c (expand_body): Revert last change.
1493
1494 2002-01-04  Jason Merrill  <jason@redhat.com>
1495
1496         PR c++/4122
1497         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
1498         lost primary.
1499
1500         * class.c (build_vtbl_initializer): Check for a lost primary
1501         before calculating the vtable entry to throw away.
1502
1503 2002-01-02  Jason Merrill  <jason@redhat.com>
1504
1505         * semantics.c (expand_body): Call outlining_inline_function when
1506         emitting an inline function out of line.
1507
1508 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1509
1510         PR c++/5116, c++/764 reversion
1511         * call.c (build_new_op): Revert the instantiations. They are
1512         incorrect.
1513
1514 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1515
1516         PR c++/5089
1517         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
1518
1519 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1520
1521         PR c++/3716
1522         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
1523         (tsubst, case POINTER_TYPE): Handle pmfs here.
1524         (tsubst, case OFFSET_TYPE): Check it is not an offset to
1525         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
1526
1527 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1528
1529         PR c++/35
1530         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
1531         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
1532         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
1533         PARM_DECL.
1534         (tsubst_template_parms): Break up loop statements.
1535         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
1536         parm PARM_DECLs don't get promoted.
1537
1538 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1539
1540         PR c++/5123
1541         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
1542         (build_x_function_call): Cope with a COMPONENT_REF containing a
1543         TEMPLATE_ID_EXPR.
1544
1545 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1546
1547         PR c++/5213
1548         * pt.c (convert_template_argument): Be more careful determining
1549         when RECORD_TYPE templates are or are not templates.
1550
1551 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1552
1553         PR c++/775
1554         * cp-tree.h (handle_class_head): Adjust prototype.
1555         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
1556         parameters. Use for all class heads.
1557         * parse.y (named_class_head_sans_basetype, named_class_head,
1558         named_complex_class_head_sans_basetype,
1559         named_class_head_sans_basetype_defn,
1560         unnamed_class_head): Remove.
1561         (class_head, class_head_apparent_template): Recognize class heads
1562         (class_head_decl, class_head_defn): New reductions. Process class
1563         heads.
1564         (structsp): Adjust class definition and class declaration
1565         reductions.
1566         (maybe_base_class_list): Give diagnostic on empty list.
1567
1568 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1569
1570         PR c++/4379
1571         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
1572         single non-static member.
1573         (unary_complex_lvalue): If it cannot be a pointer to member, don't
1574         make it so. Check it is not pointer to reference.
1575
1576 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1577
1578         PR c++/5132
1579         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
1580         are processing a template decl.
1581
1582 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1583
1584         PR c++/5116, c++/764
1585         * call.c (build_new_op): Make sure template class operands are
1586         instantiated. Simplify arglist construction.
1587
1588 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
1589
1590         * call.c (build_user_type_conversion_1): Use my_friendly_assert
1591         rather than if ... abort.
1592         * cvt.c (convert_to_reference): Likewise.
1593         * semantics.c (setup_vtbl_ptr): Likewise.
1594         * pt.c (lookup_template_class): Comment typo.
1595
1596 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
1597
1598         PR c++/5125
1599         * pt.c (push_template_decl_real): Make sure DECL has
1600         DECL_LANG_SPECIFIC.
1601
1602 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
1603
1604         PR c++/335
1605         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
1606         for non-reference fields.
1607         * typeck.c (require_complete_type): Use resolve_offset_ref).
1608
1609 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
1610
1611         PR c++/196
1612         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
1613
1614 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
1615
1616         PR c++/160
1617         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
1618         up. Don't stabilize_references when initializing a reference.
1619
1620 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1621
1622         * decl2.c (lang_f_options): Const-ify.
1623
1624 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
1625
1626         * config-lang.in (diff_excludes): Remove.
1627
1628 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
1629
1630         PR c++/90
1631         * typeck.c (build_function_call_real): Use original function
1632         expression for errors.
1633
1634 2001-12-18  Jason Merrill  <jason@redhat.com>
1635
1636         PR c++/3242
1637         * class.c (add_method): Do compare 'this' quals when trying to match a
1638         used function.  Don't defer to another used function.
1639
1640 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
1641
1642         * pt.c (instantiate_clone): Remove, fold into ...
1643         (instantiate_template): ... here. Simplify by removing mutual
1644         recursion.
1645         * typeck2.c (build_m_component_ref): Don't cv qualify the function
1646         pointed to by a pointer to function.
1647         * class.c (delete_duplicate_fields_1): Typo.
1648
1649 2001-12-18  Jason Merrill  <jason@redhat.com>
1650
1651         C++ ABI change: destroy value arguments in caller.
1652         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
1653         create an extra binding level for the parameters.
1654         * decl.c (store_parm_decls): Don't do parameter cleanups.
1655
1656 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
1657
1658         * call.c (build_new_method_call): Use '%#V'.
1659         * error.c (cv_to_string): Use V parameter to determine padding.
1660
1661 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
1662
1663         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
1664         spellings in messages.
1665
1666 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
1667
1668         * cp-tree.h: Delete #defines for cp_error, cp_warning,
1669         cp_pedwarn, and cp_compiler_error.
1670         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
1671         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
1672         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
1673         typeck2.c: Change calls to the above macros to use their
1674         language-independent equivalents: error, warning, pedwarn, and
1675         internal_error respectively.
1676
1677 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
1678
1679         * decl2.c (finish_file): Remove back_end_hook.
1680
1681 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
1682
1683         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
1684         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
1685         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
1686
1687 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
1688
1689         * lang-options.h: Use American spelling in messages.
1690
1691 2001-12-13  Jason Merrill  <jason@redhat.com>
1692
1693         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
1694
1695         Use cleanups to run base and member destructors.
1696         * init.c (push_base_cleanups): New function, split out from...
1697         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
1698         * decl.c (finish_destructor_body): Move vbase destruction code to
1699         push_base_cleanups.
1700         (begin_function_body, finish_function_body): New fns.
1701         (finish_function): Move [cd]tor handling and call_poplevel to
1702         finish_function_body.
1703         (pushdecl): Skip the new level.
1704         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
1705         (setup_vtbl_ptr): Call push_base_cleanups.
1706         * method.c (synthesize_method): Call {begin,end}_function_body.
1707         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
1708         * cp-tree.h: Declare new fns.
1709         * parse.y (function_body, .begin_function_body): New nonterminals.
1710         (fndef, pending_inline, function_try_block): Use function_body.
1711         (ctor_initializer_opt, function_try_block): No longer has a value.
1712         (base_init): Remove .set_base_init token.
1713         (.set_base_init, compstmt_or_error): Remove.
1714         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
1715
1716         * optimize.c (maybe_clone_body): Fix parameter updating.
1717
1718 2001-12-12  Jason Merrill  <jason@redhat.com>
1719
1720         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
1721         * semantics.c (genrtl_start_function): Don't pass
1722         parms_have_cleanups or push an extra binding level.
1723         (genrtl_finish_function): Lose cleanup_label cruft.
1724
1725         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
1726         (ctor_label): Remove.
1727         * semantics.c (finish_return_stmt): Lose ctor_label support.
1728         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
1729         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
1730         dtor_label.
1731
1732         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
1733         check for [cd]tors.
1734         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
1735
1736         * decl.c (finish_function): Check VMS_TARGET, not VMS.
1737
1738         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
1739         (end_cleanup_fn): And poplevel.
1740
1741         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
1742         if we're in a template.
1743
1744 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
1745
1746         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
1747         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
1748         THIS_NAME_P): Delete.
1749         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
1750         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
1751         with internal naming scheme.
1752         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
1753
1754 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
1755
1756         * decl.c (grokdeclarator): Deprecated implicit typename use.
1757
1758 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
1759
1760         PR g++/51
1761         * parse.y (frob_specs): Indicate it is a language linkage which
1762         contained the extern.
1763         * decl.c (grokdeclarator): Allow extern language linkage with
1764         other specifiers.
1765
1766 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
1767
1768         PR g++/72
1769         * decl.c (add_binding): Don't reject duplicate typedefs involving
1770         template parameters.
1771
1772 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
1773
1774         * parse.y, semantics.c: Similarly.
1775
1776 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
1777
1778         PR g++/87
1779         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
1780         (copy_args_p): Rename to ...
1781         (copy_fn_p): ... here.
1782         (grok_special_member_properties): New function.
1783         (grok_op_properties): Lose VIRTUALP parameter.
1784         (copy_assignment_arg_p): Remove.
1785         * call.c (build_over_call): Use copy_fn_p.
1786         * decl.c (grokfndecl): Reformat. Adjust call to
1787         grok_op_properties.
1788         (copy_args_p): Rename to ...
1789         (copy_fn_p): ... here. Reject template functions. Check for pass
1790         by value.
1791         (grok_special_member_properties): Remember special functions.
1792         (grok_ctor_properties): Don't remember them here, just check.
1793         (grok_op_properties): Likewise.
1794         (start_method): Call grok_special_member_properties.
1795         * decl2.c (grokfield): Likewise.
1796         (copy_assignment_arg_p): Remove.
1797         (grok_function_init): Don't remember abstract assignment here.
1798         * pt.c (instantiate_class_template): Call
1799         grok_special_member_properties.
1800         (tsubst_decl): Adjust grok_op_properties call.
1801
1802 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
1803
1804         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
1805         RID_TYPES_COMPATIBLE_P.
1806
1807 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
1808
1809         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
1810         call to build_aggr_init.
1811         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
1812
1813 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
1814
1815         * parse.y: Replace uses of the string non-terminal with STRING.
1816         Don't perform string concatentaion here.
1817         (string): Remove non-terminal.
1818         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
1819
1820 2001-12-05  Jason Merrill  <jason@redhat.com>
1821
1822         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
1823         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
1824         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
1825         * pt.c (push_tinst_level): No longer static.
1826         * cp-tree.h: Declare them.
1827
1828         * init.c (resolve_offset_ref): Don't check access for the base
1829         conversion to access a FIELD_DECL.
1830
1831         * cp-tree.h (TYPE_REFFN_P): New macro.
1832         * decl.c (bad_specifiers): Check it, too.
1833
1834         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
1835         on the __*_type_info type if we haven't seen a definition.
1836
1837 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
1838
1839         * decl.c: Include c-common.h.
1840         (shadow_warning): Move to c-common.c.
1841
1842 Wed Dec  5 17:00:49 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1843
1844         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
1845
1846 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
1847
1848         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
1849
1850 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
1851
1852         PR g++/164
1853         * init.c (sort_base_init): Allow binfos to be directly specified.
1854         * method.c (do_build_copy_constructor): Explicitly convert to the
1855         base instance.
1856         (do_build_assign_ref): Likewise.
1857
1858 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
1859
1860         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
1861         declaration and initialization.
1862
1863 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
1864
1865         * typeck2.c: Remove leading capital from diagnostic messages, as
1866         per GNU coding standards.
1867
1868 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
1869
1870         PR c++/3394
1871         * decl.c (xref_basetypes): Handle attributes between
1872         'class' and name.
1873
1874 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
1875
1876         PR g++/3381
1877         * parse.y (named_complex_class_head_sans_basetype): Add new
1878         reduction.
1879         * Make-lang.in (parse.c): Adjust expected conflict count.
1880
1881 2001-12-03  Jason Merrill  <jason@redhat.com>
1882
1883         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
1884         immediate binfos for our virtual bases.
1885
1886 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
1887
1888         * call.c (build_java_interface_fn_ref): Similarly.
1889         * except.c (is_admissible_throw_operand): Similarly.
1890         * init.c (build_java_class_ref): Similarly.
1891         * xref.c (open_xref_file): Similarly.
1892
1893 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
1894
1895         * class.c (finish_struct): Remove trailing periods from messages.
1896         * decl.c (check_tag_decl): Similarly.
1897         * lex.c (cxx_set_yydebug): Similarly.
1898         * typeck2.c (friendly_abort): Similarly.
1899
1900 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
1901
1902         PR c++/3048
1903         * cp-tree.h (ovl_member): Remove.
1904         * decl2.c (merge_functions): Handle extern "C" functions
1905         specially.
1906         * tree.c (ovl_member): Remove.
1907
1908 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
1909
1910         PR c++/4842
1911         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
1912         FUNCTION_DECL, as input.
1913         (mark_overriders): Remove.
1914         (warn_hidden): Rework for the new ABI.
1915
1916 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
1917
1918         PR c++/3471
1919         * call.c (convert_like_real): Do not build additional temporaries
1920         for rvalues of class type.
1921
1922 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
1923
1924         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
1925         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
1926         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
1927         (DERIVED_FROM_P): Likewise.
1928         (enum base_access): Renumber, add ba_quiet bit mask.
1929         (get_binfo): Remove.
1930         (get_base_distance): Remove.
1931         (binfo_value): Remove.
1932         (ACCESSIBLY_DERIVED_FROM_P): Remove.
1933         * call.c (standard_conversion): Use lookup_base.
1934         * class.c (strictly_overrides): Likewise.
1935         (layout_virtual_bases): Likewise.
1936         (warn_about_ambiguous_direct_bases): Likewise.
1937         (is_base_of_enclosing_class): Likewise.
1938         (add_vcall_offset_vtbl_entries_1): Likewise.
1939         * cvt.c (build_up_reference): Adjust comment.
1940         * init.c (build_member_call): Reformat.
1941         * search.c (get_binfo): Remove.
1942         (get_base_distance_recursive): Remove.
1943         (get_base_distance): Remove.
1944         (lookup_base_r): Tweak.
1945         (lookup_base): Add ba_quiet control. Complete the types here.
1946         (covariant_return_p): Use lookup_base.
1947         * tree.c (binfo_value): Remove.
1948         (maybe_dummy_object): Use lookup_base.
1949         * typeck.c (build_static_cast): Use lookup_base.
1950         (get_delta_difference): Likewise.
1951         * typeck2.c (binfo_or_else): Use lookup_base.
1952         (build_scoped_ref): Add back error_mark_check.
1953         (build_m_component_ref): Use lookup_base.
1954
1955 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
1956
1957         * Make-lang.in (c++.generated-manpages): New dummy target.
1958
1959 Tue Nov 27 09:03:47 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1960
1961         * Make-lang.in (cp-lang.o): Depends on c-common.h.
1962         * cp-lang.c (c-common.h): Include.
1963         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
1964         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
1965         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
1966
1967 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
1968
1969         * decl2.c (c_language): Move to c-common.c.
1970         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
1971         functions.
1972         (cxx_init): Update.
1973
1974 2001-11-26  Jason Merrill  <jason@redhat.com>
1975
1976         * call.c (joust): Remove COND_EXPR hack.
1977
1978 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
1979
1980         * search.c (lookup_base_r): Declare bk in variable declaration
1981         space.
1982
1983 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
1984
1985         PR g++/3145
1986         * class.c (build_vbase_pointer): Remove.
1987         (build_vbase_path): Remove.
1988         (build_base_path): New function.
1989         * cp-tree.h (base_access, base_kind): New enumerations.
1990         (build_base_path): Declare.
1991         (convert_pointer_to_real): Remove.
1992         (convert_pointer_to): Remove.
1993         (lookup_base): Declare.
1994         (convert_pointer_to_vbase): Remove.
1995         * call.c (build_scoped_method_call): Use lookup_base &
1996         build_base_path instead of convert_pointer_to_real,
1997         get_base_distance & get_binfo.
1998         (build_over_call): Likewise.
1999         * cvt.c (cp_convert_to_pointer): Likewise.
2000         (convert_to_pointer_force): Likewise.
2001         (build_up_reference): Likewise.
2002         (convert_pointer_to_real): Remove.
2003         (convert_pointer_to): Remove.
2004         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
2005         instead of convert_pointer_to_vbase & build_vbase_path.
2006         (emit_base_init): Use build_base_path instead of
2007         convert_pointer_to_real.
2008         (expand_virtual_init): Lose unrequired conversions.
2009         (resolve_offset_ref): Use lookup_base and build_base_path
2010         instead of convert_pointer_to.
2011         * rtti.c (build_dynamic_cast_1): Use lookup_base &
2012         build_base_path instead of get_base_distance & build_vbase_path.
2013         * search.c (get_vbase_1): Remove.
2014         (get_vbase): Remove.
2015         (convert_pointer_to_vbase): Remove.
2016         (lookup_base_r): New function.
2017         (lookup_base): New function.
2018         * typeck.c (require_complete_type): Use lookup_base &
2019         build_base_path instead of convert_pointer_to.
2020         (build_component_ref): Likewise.
2021         (build_x_function_call): Likewise.
2022         (get_member_function_from_ptrfunc): Likewise.
2023         (build_component_addr): Likewise.
2024         * typeck2.c (build_scoped_ref): Likewise.
2025
2026 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2027
2028         * cp-tree.h (CP_TYPE_QUALS): Removed.
2029         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
2030         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
2031         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
2032         * dump.c (cp_dump_tree): Use void* dump_info argument to match
2033         lang-hooks prototype.
2034         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
2035         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
2036         CP_TYPE_QUALS changed to cp_type_quals.
2037         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
2038         (CXX_C_OBJS): Remove c-dump.o.
2039
2040 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
2041
2042         PR c++/3637
2043         * pt.c (lookup_template_class): Ensure that all specializations
2044         are registered on the list corresponding to the most general
2045         template.
2046
2047 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
2048
2049         * call.c (non_reference): Add documentation.
2050         (convert_class_to_reference): Do not strip reference types
2051         from conversion operators.
2052         (maybe_handle_ref_bind): Simplify.
2053         (compare_ics): Correct handling of references.
2054
2055 2001-11-19  John Wilkinson <johnw@research.att.com>
2056
2057         * dump.c (dump_op): New function.
2058         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
2059         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
2060         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
2061
2062 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
2063
2064         PR4629
2065         * semantics.c (finish_sizeof): Make sure that expression created
2066         while processing a template do not have a type.
2067         (finish_alignof): Likewise.
2068         * typeck.c (c_sizeof): Likewise.
2069         (expr_sizeof): Likewise.
2070
2071 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
2072
2073         * lex.c (cxx_finish): Call c_common_finish.
2074         (finish_parse): Remove.
2075
2076 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2077
2078         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
2079         when displaying error message about missing array bounds.
2080
2081 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2082
2083         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
2084         CONST_CAST_EXPR.
2085         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
2086
2087 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
2088
2089         * cp-tree.h (print_class_statistics): Restore.
2090
2091 2001-11-15  Jason Merrill  <jason@redhat.com>
2092
2093         * method.c (use_thunk): Don't emit debugging information for thunks.
2094
2095         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
2096         * decl.c (make_typename_type): Handle getting a class template.
2097         * search.c (lookup_field_r): A class template is good enough for
2098         want_type.
2099
2100         * call.c (convert_like_real): Only use cp_convert for the bad part.
2101         (standard_conversion): Also allow bad int->enum.
2102         * typeck.c (ptr_reasonably_similar): Also allow functions to
2103         interconvert.  Pointers to same-size integers are reasonably
2104         similar.
2105
2106         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
2107         give it void type.
2108
2109 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
2110
2111         PR g++/3154
2112         * init.c (sort_base_init): Remove unreachable code.
2113         (expand_member_init): Adjust comment to reflect reality. Simplify
2114         and remove unreachable code.
2115
2116 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
2117
2118         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
2119         (cxx_init): Update prototype.
2120         * decl.c (init_decl_processing): Rename.  Move null node init
2121         to its creation time.
2122         * lex.c (cxx_init_options): Update.
2123         (cxx_init): Combine with old init_parse; also call
2124         cxx_init_decl_processing.
2125
2126 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
2127
2128         * decl.c (check_initializer): Try to complete the type of an
2129         array element before checking whether it's complete.  Don't
2130         complain about arrays with complete element types but an
2131         unknown size.
2132         (cp_finish_decl): Build the hierarchical constructor before
2133         calling maybe_deduce_size_from_array_init.
2134
2135 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
2136
2137         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
2138
2139 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
2140
2141         PR g++/4206
2142         * parse.y (already_scoped_stmt): Remove.
2143         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
2144
2145 2001-11-12  H.J. Lu <hjl@gnu.org>
2146
2147         * cvt.c (ocp_convert): Don't warn the address of a weak
2148         function is always `true'.
2149
2150 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
2151
2152         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
2153         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
2154         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
2155         * cp-tree.h (print_class_statistics): Remove.
2156         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
2157         cxx_print_identifier, cxx_set_yydebug): New.
2158         * lex.c (set_yydebug): Rename c_set_yydebug.
2159         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
2160         lang_print_xnode): Rename.
2161         * tree.c (print_lang_statistics): Rename.
2162
2163 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2164
2165         * class.c (dump_array): Fix format specifier warning.
2166
2167 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
2168
2169         * cp-lang.c (LANG_HOOKS_NAME): Override.
2170         (struct lang_hooks): Constify.
2171         * lex.c (cxx_init_options): Update.
2172         (lang_identify): Remove.
2173         * parse.y (language_string): Remove.
2174
2175 2001-11-08  Andreas Franck  <afranck@gmx.de>
2176
2177         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
2178         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
2179         suggested by autoconf.
2180         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
2181         (c++.install-common): Use the transformed target alias names.
2182
2183 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
2184
2185         * Make-lang.in: Update.
2186         * cp-lang.c: Include langhooks-def.h.
2187
2188 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2189
2190         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
2191
2192 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2193
2194         * lex.c (copy_lang_type): Add static prototype.
2195
2196 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2197
2198         * pt.c (unify): Handle SCOPE_REF.
2199
2200 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
2201
2202         * tree.c (cp_copy_res_decl_for_inlining): Adjust
2203         DECL_ABSTRACT_ORIGIN for the return variable.
2204
2205 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
2206
2207         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
2208
2209 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
2210
2211         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
2212         semantics.c, spew.c: Fix spelling errors.
2213
2214 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2215
2216         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
2217
2218 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
2219
2220         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
2221         pop_everything.
2222
2223 Tue Oct 23 14:00:20 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2224
2225         * cp-lang.c (cxx_get_alias_set): New function.
2226         Point LANG_HOOKS_GET_ALIAS_SET to it.
2227
2228 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2229
2230         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
2231         * cp-tree.h (make_unbound_class_template): Prototype new function.
2232         * decl.c (make_unbound_class_template): New function.
2233         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
2234         * error.c (dump_type): Likewise.
2235         * mangle.c (write_type): Likewise.
2236         * parse.y (template_parm): Likewise.
2237         (template_argument): Use make_unbound_class_template.
2238         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
2239         (tsubst): Likewise.
2240         (tsubst_copy): Likewise.
2241         (unify): Likewise.
2242         * tree.c (walk_tree): Likewise.
2243         * typeck.c (comptypes): Likewise.
2244
2245 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2246
2247         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
2248         extra calls into fewer ones.
2249
2250 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
2251
2252         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
2253         Warn when merging inline with attribute noinline.
2254         (start_decl, start_function): Warn if inline and attribute
2255         noinline appear in the same declaration.
2256
2257 2001-10-16  H.J. Lu <hjl@gnu.org>
2258
2259         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
2260         for tree checking disabled.
2261
2262 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
2263
2264         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
2265         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
2266
2267 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
2268
2269         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
2270         (unify): Only handle MINUS_EXPR specially if the above flag is set
2271         and the subtracted constant is 1.  Clear the flag on recursive calls.
2272         Set it when unifying the maximum value in an INTEGER_TYPE's range.
2273
2274 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
2275
2276         * decl.c (bad_specifiers): Don't allow exception specifications
2277         on any typedefs.
2278
2279 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
2280
2281         * cp/lex.c (init_cp_pragma): Similarly.
2282
2283 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2284
2285         * pt.c (lookup_template_class): Build complete template arguments
2286         for BOUND_TEMPLATE_TEMPLATE_PARM.
2287
2288 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2289
2290         * cp-tree.h (TYPE_BINFO): Update comment.
2291         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
2292         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
2293         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
2294         (copy_type): Prototype new function.
2295         * lex.c (copy_lang_decl): Gather tree node statistics.
2296         (copy_lang_type): New function.
2297         (copy_type): Likewise.
2298         (cp_make_lang_type): Create lang_type for
2299         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
2300         and BOUND_TEMPLATE_TEMPLATE_PARM.
2301         * pt.c (tsubst): Use copy_type instead of copy_node.
2302         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
2303
2304 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2305
2306         * pt.c (determine_specialization): Ignore functions without
2307         DECL_TEMPLATE_INFO.
2308
2309 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2310
2311         PR g++/4476
2312         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
2313
2314 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
2315
2316         * typeck2.c (store_init_value): Don't re-digest a bracketed
2317         initializer.
2318
2319         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
2320         ANON_AGGR_TYPE_P.
2321
2322 2001-10-11  Richard Henderson  <rth@redhat.com>
2323
2324         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
2325         of an asm statement.
2326         (build_vtbl_ref_1): Split out from build_vtbl_ref.
2327         (build_vfn_ref): Use it to handle vtable descriptors before
2328         calling build_vtable_entry_ref.
2329         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
2330
2331 2001-10-10  Richard Henderson  <rth@redhat.com>
2332
2333         * parse.y (asm_operand): Allow named operands.
2334         * semantics.c (finish_asm_stmt): Tweek for changed location
2335         of the operand constrant.
2336
2337 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
2338
2339         * call.c (standard_conversion): Add bad conversion between
2340         integers and pointers.
2341         (convert_like_real): Don't use convert_for_initialization for bad
2342         conversions; complain here and use cp_convert.
2343         (build_over_call): Don't handle bad conversions specially.
2344         (perform_implicit_conversion): Allow bad conversions.
2345         (can_convert_arg_bad): New fn.
2346         * cp-tree.h: Declare it.
2347         * typeck.c (convert_for_assignment): Use it.
2348         (ptr_reasonably_similar): Any target type is similar to void.
2349
2350 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
2351
2352         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
2353         (cp/cp-lang.o): New rule.
2354         * cp-tree.h: Declare hooks.
2355         * tree.c: Make hooks non-static.
2356         (init_tree): Don't initialize hooks here.
2357         * lex.c: Likewise.  Move definition of lang_hooks to...
2358         * cp-lang.c: ... new file.
2359
2360 2001-10-08  Richard Henderson  <rth@redhat.com>
2361
2362         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
2363         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
2364
2365 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2366
2367         * class.c (build_vtable_entry_ref): Const-ify.
2368         * decl.c (predefined_identifier,
2369         initialize_predefined_identifiers): Likewise.
2370         * init.c (build_new_1): Likewise.
2371         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
2372         Likewise.
2373
2374 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
2375
2376         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
2377         (INSNS_PER_STMT): Likewise.
2378         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
2379         (copy_body, initialize_inlined_parameters): Likewise.
2380         (declare_return_variable, inlinable_function_p): Likewise.
2381         (expand_call_inline, expand_calls_inline): Likewise.
2382         (optimize_inline_calls, clone_body): Likewise.
2383         * tree.c (walk_tree): Moved to ../tree-inline.c.
2384         (walk_tree_without_duplicates): Likewise.
2385         (copy_tree_r, remap_save_expr): Likewise.
2386
2387 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
2388
2389         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
2390         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
2391         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
2392         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
2393         (flag_inline_trees): Moved declaration to ../tree-inline.h.
2394         (walk_tree): Moved declaration to ../tree-inline.h.
2395         (walk_tree_without_duplicates, copy_tree_r): Likewise.
2396         (remap_save_expr): Likewise.
2397         * decl.c: Include tree-inline.h.
2398         (lang_mark_tree): Don't mark inlined_fns.
2399         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
2400         * optimize.c: Include tree-inline.h.
2401         (optimize_inline_calls): Move declaration to ../tree.h, as
2402         non-static.
2403         (remap_decl): Use language-independent constructs and hooks.
2404         (remap_block, copy_body_r, declare_return_variable): Likewise.
2405         (inlinable_function_p): Likewise.  Don't test for
2406         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
2407         no longer language-specific.
2408         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
2409         call of dump_function to...
2410         (optimize_function): Here...
2411         (clone_body): New function, extracted from...
2412         (maybe_clone_body): ... here.  Build decl_map locally and pass
2413         it on to clone_body.
2414         * pt.c, semantics.c: Include tree-inline.h.
2415         * tree.c: Likewise.
2416         (cp_walk_subtrees): New language-specific hook for tree inlining.
2417         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
2418         cp_is_overload_p, cp_auto_var_in_fn_p,
2419         cp_copy_res_decl_for_inlining): Likewise.
2420         (walk_tree): Move language-specific constructs into...
2421         (cp_walk_subtrees): this new function.
2422         (copy_tree_r): Use language-independent constructs and hooks.
2423         (init_tree): Initialize tree inlining hooks.
2424         (remap_save_expr): Adjust prototype so that the declaration
2425         does not require the definition of splay_tree.
2426
2427 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
2428
2429         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
2430         to build the declaration instead of the declaration itself.
2431
2432 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
2433
2434         * decl2.c (cxx_decode_option): Add 'else'.
2435
2436         * spew.c (end_input): No longer static.
2437         * cp-tree.h: Declare it.
2438         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
2439
2440 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
2441
2442         * call.c (build_over_call), typeck.c (build_function_call_real):
2443         Pass type attributes to check_function_format rather than name or
2444         assembler name.  Don't require there to be a name or assembler
2445         name to check formats.
2446
2447 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
2448
2449         * decl.c (init_decl_processing): Don't call
2450         init_function_format_info.  Initialize lang_attribute_table
2451         earlier.
2452         (builtin_function): Call decl_attributes.
2453         (insert_default_attributes): New.
2454
2455 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
2456
2457         * decl.c (grokdeclarator): Copy array typedef handling from C
2458         frontend.
2459
2460         * decl.c (grokdeclarator): Copy too-large array handling from C
2461         frontend.
2462
2463 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
2464
2465         * config-lang.in (target_libs): Added target-gperf, so that we
2466         don't try to build it if C++ is disabled.
2467
2468 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
2469
2470         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
2471         (cp/errfn.o): Delete rule.
2472         (cp/error.o): Depend on flags.h.
2473         * errfn.c: Delete file.
2474         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
2475         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
2476         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
2477         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
2478         internal_error respectively.  Make cp_deprecated into a macro.
2479         Don't define cp_printer typedef or declare cp_printers.
2480         * error.c: Include flags.h.
2481         Delete: struct tree_formatting_info, print_function_argument_list,
2482         print_declaration, print_expression, print_function_declaration,
2483         print_function_parameter, print_type_id, print_cv_qualifier_seq,
2484         print_type_specifier_seq, print_simple_type_specifier,
2485         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
2486         print_parameter_declaration_clause, print_exception_specification,
2487         print_nested_name_specifier, and definition of cp_printers.
2488         (locate_error): New function.
2489         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
2490         rewritten in terms of locate_error and diagnostic.c.
2491         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
2492         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
2493         (init_error): Adjust to match.
2494
2495 Sat Sep 22 09:15:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2496
2497         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
2498
2499 2001-09-21  Richard Henderson  <rth@redhat.com>
2500
2501         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
2502         (build_vtbl_initializer): Likewise.
2503         (build_vfn_ref): New.
2504         * cp-tree.h: Declare it.
2505         * call.c (build_over_call): Use it.
2506         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
2507         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
2508
2509 Fri Sep 21 08:16:19 2001  J"orn Rennecke <amylaar@redhat.com>
2510
2511         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
2512
2513 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
2514
2515         Table-driven attributes.
2516         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
2517         * decl2.c (cplus_decl_attributes): Only take one attributes
2518         parameter.
2519         * cp-tree.c (cplus_decl_attributes): Update prototype.
2520         * class.c (finish_struct), decl.c (start_decl, start_function),
2521         decl2.c (grokfield), friend.c (do_friend), parse.y
2522         (parse_bitfield): Update calls to cplus_decl_attributes.
2523         * decl.c (grokdeclarator): Take a pointer to a single ordinary
2524         attribute list.
2525         * decl.h (grokdeclarator): Update prototype.
2526         * decl2.c (grokfield): Take a single ordinary attribute list.
2527         * friend.c (do_friend): Likewise.
2528         * decl.c (shadow_tag, groktypename, start_decl,
2529         start_handler_parms, grokdeclarator, grokparms, start_function,
2530         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
2531         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
2532         (process_template_parm, do_decl_instantiation): Pass single
2533         ordinary attribute lists around.
2534         * decl.c (grokdeclarator): Correct handling of nested attributes.
2535         Revert the patch
2536         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
2537                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
2538                 not the left.
2539         .
2540         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
2541         (cp_attribute_table): Declare.
2542         * decl.c (valid_lang_attribute): Don't define.
2543         (lang_attribute_table): Define.
2544         (init_decl_processing): Initialize lang_attribute_table instead of
2545         valid_lang_attribute.
2546         * tree.c (cp_valid_lang_attribute): Remove.
2547         (handle_java_interface_attribute, handle_com_interface_attribute,
2548         handle_init_priority_attribute): New functions.
2549         (cp_attribute_table): New array.
2550         * decl2.c (import_export_class): Don't use
2551         targetm.valid_type_attribute.
2552
2553 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
2554
2555         * Make-lang.in (cp/error.o): Depend on real.h
2556         * error.c: #include "real.h"
2557
2558 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2559
2560         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
2561         xmalloc/strcpy/strcat.
2562
2563 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2564
2565         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
2566         Const-ification.
2567         * pt.c (tsubst_decl): Likewise.
2568
2569 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2570
2571         * decl2.c (lang_f_options): Const-ification.
2572         * lex.c (cplus_tree_code_name): Likewise.
2573         * spew.c (yyerror): Likewise.
2574
2575 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
2576
2577         PR c++/3986
2578         * class.c (force_canonical_binfo_r): Check & move an indirect
2579         primary base first.
2580         (force_canonical_binfo): Check that it's not already
2581         canonical.
2582         (mark_primary_virtual_base): Remove BINFO parameter.
2583         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
2584
2585 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
2586
2587         Remove TYPE_NONCOPIED_PARTS.
2588         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
2589         CLASSTYPE_PURE_VIRTUALS.
2590         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
2591         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
2592         (layout_class_type): Don't call fixup_inline_methods here ...
2593         (finish_struct_1): ... call it here.
2594
2595 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
2596
2597         * decl.c (duplicate_decls): Remove code deadling with
2598         DECL_SAVED_INSNS.
2599         * decl2.c (finish_file): Likewise.
2600         * pt.c (instantiate_decl): Likewise.
2601         * semantics.c (expand_body): Don't defer local functions if
2602         they wouldn't be deferred for some other reason.  Don't
2603         generate RTL for functions that will not be emitted.
2604         (genrtl_start_function): Remove code deadling with
2605         DECL_SAVED_INSNS.
2606         (genrtl_finish_function): Likewise.
2607
2608 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
2609
2610         PR c++/4203
2611         * call.c (build_over_call): Do not optimize any empty base
2612         construction.
2613
2614 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2615
2616         * error.c (dump_template_decl): Output template parameters
2617         together with their specifiers.
2618         Output `class' prefix for template template parameter.
2619         (dump_decl): Fix formatting.
2620
2621 2001-08-30  Kurt Garloff  <garloff@suse.de>
2622
2623         * optimize.c (inlinable_function_p): Allow only smaller single
2624         functions. Halve inline limit after reaching recursive limit.
2625
2626 2001-08-30  Joern Rennecke <amylaar@redhat.com>
2627             Jason Merrill  <jason_merrill@redhat.com>
2628
2629         * class.c (build_vtable_entry_ref): Subtract in char*, not
2630         ptrdiff_t.
2631
2632 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
2633
2634         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
2635         (build_cplus_array_type): Use cp_build_qualified_type, not
2636         TYPE_MAIN_VARIANT, to get an unqualified version.
2637
2638         * decl2.c (grok_alignof): Lose.
2639         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
2640         * typeck.c (c_alignof): Lose.
2641         * semantics.c (finish_sizeof, finish_alignof): New.
2642         * parse.y: Use them.
2643         * cp-tree.h: Declare them.
2644
2645 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
2646
2647         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
2648         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
2649         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
2650
2651 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
2652
2653         * typeck2.c (add_exception_specifier): Only require complete type if
2654         not in processing template declaration.
2655
2656 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2657
2658         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
2659         GNU_xref_start_scope and GNU_xref_end_scope.
2660
2661         * tree.c (TYPE_HASH): Moved to ../tree.h.
2662
2663 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
2664
2665         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
2666         on COMPOUND_EXPRs.
2667
2668 2001-08-14  Richard Henderson  <rth@redhat.com>
2669
2670         * class.c, cp-tree.h (build_vfn_ref): Remove.
2671         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
2672
2673 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
2674
2675         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
2676         empty class assignment as having side-effects to avoid
2677         spurious warnings.
2678
2679 2001-08-13  Zack Weinberg  <zackw@panix.com>
2680
2681         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
2682         * except.c: Include libfuncs.h.
2683
2684 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
2685
2686         * decl.c (grokdeclarator): Clarify diagnostic message.
2687
2688 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2689
2690         * decl2.c (do_nonmember_using_decl): Replace using directive
2691         with using declaration in the error message.
2692
2693 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2694
2695         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
2696         criterion to avoid rebuilding expression tree instead of
2697         processing_template_decl.
2698
2699 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
2700
2701         Support named return value optimization for inlines, too.
2702         * decl.c (finish_function): Nullify returns here.
2703         * semantics.c (genrtl_start_function): Not here.
2704         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
2705         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
2706         Also nullify the CLEANUP_STMT for the nrv.
2707         * cp-tree.h: Declare it.
2708         * optimize.c (declare_return_variable): Replace the nrv with the
2709         return variable.
2710         * typeck.c (check_return_expr): Be more flexible on alignment check.
2711         Ignore cv-quals when checking for a matching type.
2712
2713 2001-08-09  Richard Henderson  <rth@redhat.com>
2714
2715         * decl2.c (finish_objects): Use target hooks instead of
2716         assemble_constructor and assemble_destructor.
2717
2718 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
2719
2720         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
2721
2722 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
2723
2724         PR c++/3820
2725         Stop using TYPE_NONCOPIED_PARTS.
2726         * call.c (build_over_call): Be careful when copy constructing
2727         or assigning to an empty class.
2728         * class.c (check_bases_and_members): It has a
2729         COMPLEX_ASSIGN_REF if it has a vptr.
2730         (layout_class_type): Don't add empty class padding to
2731         TYPE_NONCOPIED_PARTS.
2732         (finish_struct_1): Don't add the VFIELD either.
2733         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
2734         initialization.
2735
2736 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
2737
2738         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
2739
2740 2001-08-06  Richard Henderson  <rth@redhat.com>
2741
2742         * decl2.c (finish_objects): Pass a symbol_ref and priority to
2743         assemble_{constructor,destructor}.  Remove priority handling.
2744
2745 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
2746
2747         Don't allow template-id in using-declaration.
2748         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
2749         (do_class_using_decl): Likewise.
2750
2751 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
2752
2753         * cp/spew.c (read_token): No need to pop buffers.
2754
2755 2001-08-02  Stan Shebs  <shebs@apple.com>
2756
2757         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
2758         (fnaddr_from_vtable_entry): Remove decl.
2759         * method.c (use_thunk): Update comment.
2760
2761 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
2762
2763         * repo.c (get_base_filename): Change return value to const char
2764         pointer.
2765
2766 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
2767
2768         Kill -fhonor-std.
2769         * NEWS: Document.
2770         * cp-tree.h (flag_honor_std): Remove.
2771         (CPTI_FAKE_STD): Remove.
2772         (std_node): Remove comment about it being NULL.
2773         (fake_std_node): Remove.
2774         * decl.c (in_fake_std): Remove.
2775         (walk_namespaces_r): Remove fake_std_node check.
2776         (push_namespace): Remove in_fake_std code.
2777         (pop_namespace): Likewise.
2778         (lookup_name_real): Remove fake_std_node check.
2779         (init_decl_processing): Always create std_node. Always add
2780         std:: things there.
2781         (builtin_function): Always put non '_' fns in std.
2782         * decl2.c (flag_honor_std): Remove.
2783         (lang_f_options): Remove honor-std.
2784         (unsupported_options): Add honor-std.
2785         (set_decl_namespace): Remove fake_std_node check.
2786         (validate_nonmember_using_decl): Likewise.
2787         (do_using_directive): Likewise.
2788         (handle_class_head): Likewise.
2789         * dump.c (cp_dump_tree): Likewise.
2790         * except.c (init_exception_processing): Adjust.
2791         * init.c (build_member_call): Remove fake_std_node check.
2792         (build_offset_ref): Likewise.
2793         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
2794         * rtti.c (init_rtti_processing): Adjust.
2795
2796 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
2797
2798         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
2799         operand while calling cp_tree_equal.
2800
2801 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
2802
2803         The 3.0 ABI no longer has vbase pointer fields.
2804         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
2805         FORMAT_VBASE_NAME): Remove.
2806         * method.c (do_build_copy_constructor): Adjust.
2807         (do_build_assign_ref): Adjust.
2808         * search.c (lookup_field_r): Adjust.
2809         * typeck.c (build_component_ref): Adjust.
2810
2811         The 3.0 ABI always has a vtable pointer at the start of every
2812         polymorphic class.
2813         * rtti.c (build_headof_sub): Remove.
2814         (build_headof): Adjust.
2815         (get_tinfo_decl_dynamic): No need to check flag_rtti
2816         here. Adjust.
2817         (create_real_tinfo_var): Explain why we need a hidden name.
2818
2819 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
2820
2821         PR c++/3631
2822         * class.c (update_vtable_entry_for_fn): The fixed adjustment
2823         of a virtual thunk should be from declaring base.
2824
2825 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
2826
2827         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
2828         the shared virtual base, so preserving inheritance graph order.
2829
2830 2001-07-30  Andreas Jaeger  <aj@suse.de>
2831
2832         * decl2.c: Remove unused var global_temp_name_counter.
2833
2834 2001-07-28  Richard Henderson  <rth@redhat.com>
2835
2836         * method.c (pending_inlines): Remove.
2837
2838 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
2839
2840         * class.c (mark_primary_virtual_base): Don't adjust base
2841         offsets here.
2842         (dfs_unshared_virtual_bases): Adjust them here.
2843         (mark_primary_bases): Explain why we adjust at the end.
2844
2845 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
2846
2847         * class.c (finish_struct_1): When copying the primary base's
2848         VFIELD, make sure we find it is at offset zero.
2849
2850 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2851
2852         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
2853         tsubst_expr for default template arguments.
2854
2855 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
2856
2857         PR c++/3621
2858         * spew.c (yylex): Only copy the token's lineno, if it is
2859         non-zero.
2860
2861 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
2862
2863         PR c++/3624
2864         * call.c (resolve_args): Simplify, call
2865         convert_from_reference.
2866         (build_new_op): Resolve and convert from reference ARG1
2867         earlier. Adjust ARG2 & ARG3 resolve and conversion.
2868
2869 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
2870
2871         * decl.c (last_function_parm_tags): Remove.
2872         (current_function_parm_tags): Remove.
2873         (init_decl_processing): Adjust.
2874         (start_function): Adjust.
2875         (store_parm_decls): Adjust.
2876
2877         PR c++/3152
2878         * decl.c (grokdeclarator): Detect when a function typedef is
2879         declaring a function, and create last_function_parms correctly.
2880
2881 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
2882
2883         * call.c (joust): Only prefer a non-builtin candidate to a builtin
2884         one if they have the same signature.
2885
2886         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
2887         it rather than toplevel_bindings_p.  Give it a mangled name if static.
2888         (convert_to_reference): Adjust.
2889         * decl2.c (get_temp_name): Lose.
2890         * mangle.c (mangle_ref_init_variable): New fn.
2891         (mangle_guard_variable): Strip the ref-init header.
2892         * cp-tree.h: Adjust.
2893         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
2894         initializer.
2895         (grok_reference_init): Always use DECL_INITIAL.
2896
2897 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2898
2899         PR c++/3416
2900         * call.c (build_conditional_expr): Recheck args after
2901         conversions.
2902         * cp-tree.h (build_conditional_expr): Move to correct file.
2903         * typeck.c (decay_conversion): Diagnose any unknown types
2904         reaching here.
2905         (build_binary_op): Don't do initial decay or default
2906         conversions on overloaded functions.
2907         (build_static_cast): Don't do a decay conversion here.
2908
2909 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2910
2911         PR c++/3543
2912         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
2913         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
2914
2915 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2916
2917         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
2918         (create_vtbl_ptr): ... here.
2919
2920 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2921
2922         * class.c (build_vbase_offset_vbtl_entries): Look for
2923         non-primary base of which we are a sub vtable.
2924
2925 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
2926
2927         * semantics.c (finish_this_expr):  Remove unused code.
2928
2929 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
2930
2931         Simplify rtti, now we've only one ABI.
2932         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
2933         CPTI_TINFO_VAR_ID.
2934         (tinfo_decl_id, tinfo_var_id): Remove.
2935         (get_typeid_1): Remove.
2936         * rtti.c
2937         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
2938         (typeid_ok_p): New function.
2939         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
2940         (get_tinfo_decl): Remove old abi documentation.
2941         (tinfo_from_decl): Remove.
2942         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
2943         (get_typeid_1): Remove.
2944         (get_base_offset): Remove.
2945         (synthesize_tinfo_var): Absorb get_base_offset.
2946         (create_real_tinfo_var): Don't use tinfo_decl_id.
2947
2948 2001-07-23  Graham Stott  <grahams@redhat.com>
2949
2950         * cp/class.c (type_requires_array_cookie): Fix use of uninitialised
2951         variable has_two_argument_delete_p.
2952
2953 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
2954
2955         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
2956         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
2957         (CPTI_INDEX_IDENTIFIER): Remove.
2958         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
2959         (delta2_identifier): Remove.
2960         (index_identifier): Remove.
2961         (pfn_or_delta2_identifier): Remove.
2962         (flag_vtable_thunks): Remove.
2963         (VTABLE_DELTA2_NAME): Remove.
2964         (VTABLE_INDEX_NAME): Remove.
2965         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
2966         (vfunc_ptr_type_node): Adjust.
2967         (VTABLE_NAME_PREFIX): Adjust.
2968         (build_vfn_ref): Lose first parameter.
2969         (fixup_all_virtual_upcast_offsets): Remove.
2970         * decl.c (initialize_predefined_identifiers): Remove
2971         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
2972         (init_decl_processing): Remove no-vtable-thunk code.
2973         * decl2.c (flag_vtable_thunks): Remove.
2974         (mark_vtable_entries): Remove no-vtable-thunk code.
2975         * error.c (dump_decl): Remove no-vtable-thunk code.
2976         (dump_expr): Adjust ptr to member function code.
2977         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
2978         code.
2979         * rtti.c (build_headof): Remove no-vtable-thunk code.
2980         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
2981         * search.c (get_base_distance): Remove expand_upcast_fixups case.
2982         (virtual_context) Remove.
2983         (expand_upcast_fixups): Remove.
2984         (fixup_virtual_upcast_offsets): Remove.
2985         (fixup_all_virtual_upcast_offsets): Remove.
2986         * typeck.c (get_member_function_from_ptrfunc): Remove
2987         no-vtable-thunk code.
2988         * call.c (build_over_call): Adjust call to build_vfn_ref.
2989         * class.c (build_vfn_ref): Lose first parameter. Remove
2990         no-vtable-thunk code.
2991         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
2992         (build_vtable_entry): Remove no-vtable-thunk code.
2993
2994 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
2995
2996         Remove old-abi remnants. Remove comments about old abi
2997         behaviour. Remove references to 'new-abi' in comments.
2998         * cp-tree.h: Adjust comments.
2999         (vbase_offsets_in_vtable_p): Delete.
3000         (vcall_offsets_in_vtable_p): Delete.
3001         (vptrs_present_everywhere_p): Delete.
3002         (all_overridden_vfuns_in_vtables_p): Delete.
3003         (merge_primary_and_secondary_vtables_p): Delete.
3004         (TYPE_CONTAINS_VPTR_P): Adjust.
3005         (VTT_NAME_PREFIX): Remove.
3006         (CTOR_VTBL_NAME_PREFIX): Remove.
3007         (init_vbase_pointers): Remove.
3008         * class.c: Adjust coments.
3009         (build_vbase_pointer_fields): Delete.
3010         (build_vbase_pointer): Remove old-abi code.
3011         (build_secondary_vtable): Likewise.
3012         (modify_all_vtables): Likewise.
3013         (create_vtable_ptr): Likewise.
3014         (layout_class_type): Likewise.
3015         (finish_struct_1): Likewise.
3016         (finish_vtbls): Likewise.
3017         (dfs_finish_vtbls): Delete.
3018         (build_vbase_offset_vtbl_entries): Remove old-abi code.
3019         * cvt.c: Adjust comments.
3020         * decl.c: Adjust comments.
3021         * decl2.c: Adjust comments.
3022         * init.c: Adjust comments.
3023         (construct_virtual_bases): Remove old-abi code.
3024         * lang-specs.h: Remove -fno-new-abi.
3025         * mangle.c: Adjust comments.
3026         * rtti.c: Adjust comments.
3027         (get_base_offset): Remove old-abi-code.
3028         * search.c: Adjust comments.
3029         (dfs_init_vbase_pointers): Remove.
3030         (dfs_vtable_path_unmark): Remove.
3031         (init_vbase_pointers): Remove.
3032         * semantics.c: Adjust comments.
3033         (emit_associated_thunks): Remove old-abi code.
3034         * typeck.c: Adjust comments.
3035
3036 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
3037
3038         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
3039         params.h.
3040
3041 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
3042
3043         * class.c (finish_struct_anon): Forbid nested classes.
3044
3045 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
3046
3047         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
3048         * optimize.c: Include debug.h.
3049         (maybe_clone_body): Use debug hook.
3050         * semantics.c: Include debug.h.
3051         (expand_body): Use debug hook.
3052
3053 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
3054
3055         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
3056
3057 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
3058
3059         * class.c (type_requires_array_cookie): New function.
3060         (check_methods): Don't try to figure out whether the type needs a
3061         cookie here.
3062         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
3063         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
3064         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
3065         * pt.c (instantiate_class_template): Don't set
3066         TYPE_VEC_DELETE_TAKES_SIZE.
3067         * NEWS: Document ABI changes from GCC 3.0.
3068
3069 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
3070             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
3071
3072         * NEWS (Changes in GCC 3.0): Fix typo.
3073
3074 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
3075
3076         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
3077         which attributes are to be attached, and a flags argument.  Update
3078         call to decl_attributes.
3079         (grokfield): Update call to decl_attributes.
3080         * class.c (finish_struct): Update call to cplus_decl_attributes.
3081         * cp-tree.h (cplus_decl_attributes): Update prototype.
3082         * decl.c (start_decl, grokdeclarator, start_function): Update
3083         calls to decl_attributes and cplus_decl_attributes.
3084         * friend.c (do_friend): Update call to cplus_decl_attributes.
3085         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
3086
3087 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
3088
3089         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
3090         for `register' variables with an asm-specification.
3091
3092 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
3093
3094         * semantics.c (finish_asm_stmt): Mark the output operands
3095         to an asm addressable, if necessary.
3096
3097 2001-07-11  Ben Elliston  <bje@redhat.com>
3098
3099         * Revert this change -- there is a subtle bug.
3100
3101         PR c++/80
3102         * decl.c (finish_enum): New "attributes" argument; pass it to
3103         cplus_decl_attributes.  Use a narrower type if the enum is packed.
3104         * cp-tree.h (finish_enum): Adjust prototype.
3105         * parse.y (enum_head): New non-terminal.
3106         (structsp): Use it. Enums now may be preceded or followed by
3107         optional attributes -- pass their chained tree to finish_enum().
3108         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
3109
3110 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
3111
3112         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
3113         variables.
3114
3115 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
3116
3117         * semantics.c (cp_expand_stmt): Fix for null
3118         current_function_return_value.
3119
3120 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
3121
3122         * call.c (build_op_delete_call): Initialize fn.
3123         (convert_like_real): Delete conditional.
3124         (joust): Initialize *w and *l.
3125         * class.c: Add prototype for binfo_ctor_vtable.
3126         (get_primary_binfo): Initialize result.
3127         * init.c (build_java_class_ref): Initialize name.
3128
3129 2001-07-09  Erik Rozendaal  <dlr@acm.org>
3130
3131         * typeck.c (unary_complex_lvalue): Do not duplicate the
3132         argument to modify, pre-, or post-increment when used as an
3133         lvalue and when the argument has side-effects.
3134
3135 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
3136
3137         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
3138         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
3139         cplus_decl_attributes even if attrs is NULL.
3140         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
3141
3142 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
3143
3144         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
3145         calls to decl_attributes.
3146
3147 2001-07-06  Ira Ruben   <ira@apple.com>
3148
3149         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
3150         be DECL_TEMPLATE_RESULT.
3151
3152 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3153
3154         * cp-tree.h (copy_template_template_parm): Rename to ...
3155         (bind_template_template_parm): ... here.
3156         * tree.c (copy_template_template_parm): Rename to ...
3157         (bind_template_template_parm): ... here.  Remove the case when
3158         NEWARGS is NULL_TREE.
3159         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
3160         BOUND_TEMPLATE_TEMPLATE_PARM.
3161         * pt.c (lookup_template_class): Adjust.
3162
3163 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
3164
3165         * cvt.c (convert_lvalue): New fn.
3166         * cp-tree.h: Declare it.
3167         * method.c (do_build_assign_ref): Use it.
3168         (do_build_copy_constructor): Convert parm to base types
3169         before calling base constructors.
3170
3171         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
3172         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
3173         optimize.
3174         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
3175
3176 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
3177
3178         * optimize.c (optimize_inline_calls): New function, broken out
3179         of ...
3180         (optimize_function): ... here. Call it. Don't inline if it is
3181         a thunk.
3182         (dump_function): Print name of dump flag causing this dump.
3183         * semantics.c (expand_body): Move thunk inline check to
3184         optimize_function.
3185
3186 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
3187
3188         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
3189         (comptypes): Use target.comp_type_attributes.
3190
3191 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
3192
3193         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
3194
3195 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
3196
3197         * error.c (lang_print_error_function): Add a `diagnostic_context *'
3198         parameter. Tweak.
3199
3200 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
3201
3202         * decl2.c (import_export_class): Update.
3203
3204 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
3205
3206         * error.c (init_error): Adjust settings.
3207
3208 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
3209
3210         * error.c (init_error): Adjust settings.
3211
3212 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
3213
3214         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
3215         return pointers to data members by reference rather than by value.
3216
3217 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
3218
3219         Implement the Named Return Value optimization.
3220         * cp-tree.h (struct cp_language_function): Add x_return_value.
3221         (current_function_return_value): Now a macro.
3222         * decl.c: Don't define it.
3223         (define_label, finish_case_label): Don't clear it.
3224         (init_decl_processing): Don't register it with GC.
3225         * semantics.c (genrtl_finish_function): Don't check it for
3226         no_return_label.  Copy the RTL from the return value to
3227         current_function_return_value and walk, calling...
3228         (nullify_returns_r): ...this new fn.
3229         * typeck.c (check_return_expr): Set current_function_return_value.
3230
3231 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
3232
3233         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
3234         sharing a ctor vtable with.  Merge code for cases 1 and 2.
3235         (binfo_ctor_vtable): New fn.
3236         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
3237
3238 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
3239
3240         * class.c (dfs_find_final_overrider): Fix logic.
3241
3242         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
3243         virtual thunk instead of non-virtual.
3244         (get_matching_virtual): Uncomment.
3245
3246         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
3247         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
3248         PARM, not ARG.
3249
3250 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
3251
3252         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
3253         we've not emerged from the hierarchy of RTTI_BINFO on reaching
3254         a non-virtual base.
3255
3256 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
3257
3258         * NEWS: Update release number.
3259
3260 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
3261
3262         PR c++/3130, c++/3131, c++/3132
3263         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
3264         * class.c (force_canonical_binfo_r): Move
3265         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
3266         virtual bases unless they're primary and what they're primary
3267         too has been moved.
3268         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
3269         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
3270         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
3271         derived binfo.
3272         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
3273         (layout_nonempty_base_or_field): Add most derived type
3274         parameter. Adjust.
3275         (layout_empty_base): Likewise.
3276         (build_base_field): Likewise.
3277         (build_base_fields): Likewise.
3278         (propagate_binfo_offsets): Add most derived type
3279         parameter. Skip non canonical virtual bases too.
3280         (dfs_set_offset_for_unshared_vbases): Don't skip primary
3281         bases. Do skip canonical bases.
3282         (layout_virtual_bases): Adjust.
3283         (layout_class_type): Adjust.
3284         (dfs_get_primary_binfo): Build list of virtual primary base
3285         candidates.
3286         (get_primary_binfo): Check that the shared virtual primary
3287         base candidate was found first.
3288         (accumulate_vtbl_inits): Don't do anything for non-vptr
3289         containing binfos. For case 1 primary virtual bases, keep
3290         checking that we've not emerged from the hierarchy of RTTI_BINFO.
3291
3292 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
3293
3294         PR c++/3089
3295         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
3296         hierarchy looking for primary bases for a ctor
3297         vtable. Recursively call oneself, if we meet our primary via
3298         this route and haven't met it yet via inheritance graph order.
3299
3300 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
3301
3302         * lang-options.h: Emit documentation for -fno-honor-std, not
3303         -fhonor-std.
3304
3305 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
3306
3307         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
3308         Don't clobber delta.
3309         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
3310
3311 2001-06-10  Mark Mitchell <mark@codesourcery.com>
3312             Gabriel Dos Reis  <gdr@codesourcery.com>
3313
3314         * Make-lang.in (cp/call.o): Depend on diagnostic.h
3315         (cp/typeck.o): Depend on diagnostic.h
3316         (cp/typeck2.o): Depend on diagnostic.h
3317         (cp/repo.o): Depend on dignostic.h
3318         * typeck.c: #include diagnostic.h
3319         (convert_for_initialization): Remove extern declaration for
3320         warningcount and errorcount.
3321
3322         * call.c: #include diagnostic.h
3323         (convert_like_real): Remove extern declaration for warnincount and
3324         errorcount.
3325
3326         * repo.c: #include diagnostic.h
3327         * typeck2.c: #include diagnostic.h
3328
3329 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
3330
3331         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
3332         in previous change.
3333
3334 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
3335
3336         PR c++/2929
3337         * friend.c (do_friend): Use push_decl_namespace for classes at
3338         namespace scope.
3339
3340 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
3341             Jason Merrill <jason_merrill@redhat.com>
3342
3343         PR c++/3061
3344         * class.c (build_secondary_vtable): Use assert, rather than an error
3345         message.
3346         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
3347         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
3348         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
3349         Don't set BINFO_VTABLE for a primary virtual base.
3350
3351 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
3352
3353         * decl.c (duplicate_decls): Update source position information
3354         when a template function is defined.
3355
3356 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
3357
3358         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
3359
3360 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
3361
3362         PR c++/2914
3363         * decl.c (pushtag): Don't push into a complete type's scope.
3364
3365 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
3366
3367         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
3368         (struct lang_decl_flags): Lose generate_with_vtable_p.
3369         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
3370         * class.c (copy_virtuals): Adjust.
3371         * decl2.c (mark_vtable_entries): Adjust.
3372         * method.c (make_thunk, build_vtable_entry): Adjust.
3373         * class.c (update_vtable_entry_for_fn): Only look as far as the
3374         first defining class.
3375         (build_vtbl_initializer): Put nothing in the slot for a function only
3376         defined in a lost primary virtual base.
3377         (add_vcall_offset_vtbl_entries_1): Use the same code for
3378         the lost primary case and the normal case.
3379         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
3380         (get_vfield_offset, get_derived_offset): Lose.
3381         (dfs_find_final_overrider): Use look_for_overrides_here.
3382         (get_matching_virtual): New fn.
3383         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
3384         not BV_VCALL_INDEX.
3385         * search.c (look_for_overrides_here): Split out from...
3386         (look_for_overrides_r): Here.
3387
3388         * class.c (find_final_overrider): Return error_mark_node on error.
3389
3390         * decl2.c (key_method): #if 0 accidental change.
3391
3392 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
3393
3394         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
3395         (build_over_call): Likewise.
3396         * decl.c (grokparms): Likewise.
3397         * pt.c (tsubst_decl): Likewise.
3398         * typeck.c (convert_arguments): Likewise.
3399
3400 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
3401
3402         * semantics.c (begin_class_definition): Robustify.
3403
3404         * pt.c (instantiate_decl): Tell the repository code about the
3405         clones, not the cloned functions.
3406         * repo.c (repo_template_used): Explicitly instantiate the cloned
3407         function, not the clones.
3408
3409 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
3410
3411         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
3412         ICS_BAD_FLAG on created conversion.
3413         (compare_ics): Break out rank.
3414
3415 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
3416
3417         * decl.c (xref_tag): Remove extraneous %s on dependent name
3418         lookup warning.
3419
3420 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
3421
3422         * class.c (layout_vtable_decl): Fix off by one error on
3423         build_index_type.
3424         (build_vtt): Likewise.
3425         (build_ctor_vtbl_group): Likewise.
3426
3427 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
3428
3429         * class.c (maybe_indent_hierarchy): New function.
3430         (dump_class_hierarchy_r): Add flags. Dump extra binfo
3431         information, if enabled. Use maybe_indent_hierarchy. Adjust
3432         output format.
3433         (dump_class_hierarchy): Adjust prototype. Adjust output format.
3434         (dump_array, dump_vtable, dump_vtt): New functions.
3435         (finish_struct_1): Adjust hierarchy dumping.
3436         (initialize_vtable): Call dump_vtable.
3437         (build_vtt): Call dump_vtt.
3438         (build_ctor_vtbl_group): Call dump_vtable.
3439         * decl2.c (flag_dump_class_layout): Remove.
3440         (cxx_decode_option): Remove dump translation unit
3441         and dump class hierarchy check. Call dump_switch_p.
3442         (finish_file): Adjust dumping.
3443         (dump.c): Only dump base classes if not TDF_SLIM.
3444         Only dump namespace members if not TDF_SLIM.
3445         * optimize.c (dump_function): New function.
3446         (optimize_function): Call dump_function.
3447         * semantics.c (expand_body): Use dump_enabled_p.
3448
3449 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
3450
3451         PR g++/2936
3452         Part missed from first commit
3453         * decl2.c (finish_anon_union): Copy context.
3454
3455 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
3456
3457         PR g++/2936
3458         * optimize.c (remap_decl): Remap anonymous aggregate members too.
3459
3460 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
3461
3462         PR g++/2823
3463         * semantics.c (expand_body): Don't optimize thunks.
3464
3465 2001-05-25  Sam TH  <sam@uchicago.edu>
3466
3467         * cp-tree.h lex.h: Fix header include guards.
3468
3469 2001-05-25  Mark Mitchell <mark@codesourcery.com>
3470
3471         * decl.c (init_decl_processing): Tweak.
3472
3473 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
3474
3475         * decl.c (duplicate_decls): Tidy.
3476         (init_decl_processing): Always set flag_no_builtin.
3477
3478 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
3479
3480         PR c++/2184
3481         * decl2.c (do_local_using_decl): Push the decls, even in a
3482         template.
3483
3484 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
3485
3486         * optimize.c (initialize_inlined_parameters): Don't set
3487         TREE_READONLY for a VAR_DECL taking the place of an inlined
3488         PARM_DECL.
3489
3490 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
3491
3492         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
3493         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
3494         attribute.
3495
3496 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
3497
3498         * parse.y: Refer to compound literals as such, not as
3499         constructor-expressions.
3500
3501 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
3502
3503         * call.c (build_op_delete_call): Ignore exception-specifications
3504         when looking for matching delete operators.
3505         * init.c (build_new_1): Compute whether or not the allocation
3506         function used is a placement allocation function or not, and
3507         communicate this information to build_op_delete_call.
3508
3509 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
3510
3511         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
3512         (build_vtbl_ref): Adjust.
3513         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
3514         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
3515         Re-add vtable-gc.
3516         (unsupported_options): Correspondingly.
3517
3518         * decl2.c (maybe_make_one_only): Check flag_weak, not
3519         supports_one_only().
3520
3521         * cp-tree.def (START_CATCH_STMT): Lose.
3522         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
3523         * tree.c (cp_statement_code_p): Don't case it.
3524         * semantics.c (cp_expand_stmt): Likewise.
3525         * cp-tree.h (START_CATCH_TYPE): Lose.
3526         (HANDLER_TYPE): New.
3527         * except.c (expand_start_catch_block): Don't start any blocks.
3528         Return the type.
3529         (expand_end_catch_block): Don't end any blocks.
3530         * parse.y (handler): Don't pass anything from finish_handler_parms
3531         to finish_handler.
3532         * pt.c (tsubst_expr): Likewise.
3533         * semantics.c (begin_handler): Call note_level_for_catch here.
3534         (finish_handler_parms): Don't return anything.
3535         (genrtl_catch_block, begin_catch_block): Lose.
3536         (genrtl_handler): Call expand_start_catch here.
3537
3538 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
3539
3540         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
3541         (get_vtable_decl, build_vtt): Not here.
3542
3543 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
3544
3545         PR c++/2781
3546         * optimize.c (update_cloned_parm): Copy addressability and other
3547         flags.
3548
3549 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3550
3551         * pt.c (determine_specialization): Ignore artificial functions.
3552
3553 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
3554
3555         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
3556         (C_RID_CODE): Remove.
3557         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
3558         (init_parse): Don't do it here.
3559
3560 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
3561
3562         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
3563         function declaration to avoid stripping the symbol's attributes.
3564
3565 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
3566
3567         * decl.c (pushdecl): Adjust error string.
3568         (xref_tag): Adjust friend class injection warning. Remove the
3569         inherited name from the class shadowed scope.
3570
3571 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
3572
3573         * except.c (cp_protect_cleanup_actions): New function.
3574         (init_exception_processing): Don't set protect_cleanup_actions
3575         here.  Do set lang_protect_cleanup_actions.
3576
3577 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
3578
3579         * spew.c (read_token): Call yyerror on all unexpected tokens.
3580
3581 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
3582
3583         * init.c (member_init_ok_or_else): Take a tree rather than
3584         string for name.
3585         (expand_member_init): Adjust.
3586
3587 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
3588
3589         * decl.c (duplicate_decls): Suppress warning about duplicate
3590         decls if the first decl is a friend.
3591
3592 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
3593
3594         * except.c (choose_personality_routine): Export.  Add
3595         explanatory comment.  Take an enum languages, not a boolean.
3596         (initialize_handler_parm): Adjust to match.
3597         * cp-tree.h: Prototype choose_personality_routine.
3598         * lex.c (handle_pragma_java_exceptions): New function.
3599         (init_cp_pragma): Register #pragma GCC java_exceptions.
3600
3601 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
3602
3603         * method.c (build_mangled_C99_name): Remove unused prototype.
3604
3605 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
3606
3607         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
3608         * typeck.c (get_member_function_from_ptrfunc,
3609         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
3610         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
3611
3612         Reverted Geoff Keating's 2001-05-03's patch.
3613
3614 2001-05-11  Ira Ruben   <ira@apple.com>
3615
3616         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
3617
3618 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
3619
3620         * cp-tree.h (finish_label_expr, lookup_label): Delete.
3621         * parse.y: Update for '&&'; don't issue warning here.
3622         * semantics.c (finish_label_expr): Delete.
3623
3624 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
3625
3626         * splay-tree.h (splay_tree_max): New function.
3627         (splay_tree_min): Likewise.
3628
3629 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
3630
3631         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
3632         (pfn_vflag_identifier): Define.
3633         Update comment about layout of pointer functions.
3634         (build_ptrmemfunc1): Update prototype.
3635         (expand_ptrmemfunc_cst): Update prototype.
3636         * decl.c (initialize_predefined_identifiers): Initialize
3637         pfn_vflag_identifier.
3638         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
3639         an extra field to the type.
3640         * expr.c (cplus_expand_constant): Pass 'flag' between
3641         expand_ptrmemfunc_cst and build_ptrmemfunc1.
3642         * typeck.c (get_member_function_from_ptrfunc): When
3643         FUNCTION_BOUNDARY < 16, look at additional field to determine
3644         if a pointer-to-member is a real pointer or a vtable offset.
3645         (build_ptrmemfunc1): Add new parameter to contain extra field.
3646         (build_ptrmemfunc): Pass the extra field around.
3647         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
3648         (pfn_from_ptrmemfunc): Ignore the extra field.
3649
3650 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
3651
3652         * cp-tree.h (flag_inline_trees): Update documentation.
3653         * decl.c (init_decl_processing): Adjust handling of
3654         flag_inline_functions and flag_inline_trees to support -O3.
3655         (grokfndecl): Set DECL_INLINE on all functions if that's what
3656         the user requested.
3657         (save_function_data): Clear DECL_INLINE in
3658         current_function_cannot_inline is non-NULL.
3659         * decl2.c (flag_inline_trees): Update documentation.
3660
3661 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
3662
3663         * dump.c (cp_dump_tree, USING_STMT case): New case.
3664         * tree.c (cp_statement_code_p): Add USING_STMT.
3665         * decl2.c (do_using_directive): Add the using directive statement.
3666
3667         * tree.c (walk_tree): Reformat an if block.
3668
3669 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
3670
3671         * decl.c (compute_array_index_type): Don't try to do anything with
3672         the indices when processing a template.
3673
3674 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3675
3676         * call.c: NULL_PTR -> NULL.
3677         * class.c: Likewise.
3678         * cvt.c: Likewise.
3679         * decl.c: Likewise.
3680         * decl2.c: Likewise.
3681         * except.c: Likewise.
3682         * init.c: Likewise.
3683         * rtti.c: Likewise.
3684         * search.c: Likewise.
3685         * tree.c: Likewise.
3686         * typeck.c: Likewise.
3687         * typeck2.c: Likewise.
3688
3689 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
3690
3691         * decl2.c (do_using_directive): Revert previous patch.
3692
3693 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
3694
3695         * cp-tree.def (USING_STMT): New statement node.
3696         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
3697         * decl2.c (do_using_directive): Add USING_STMT to statement
3698         tree. Don't emit errors when processing template decl.
3699         * pt.c (tsubst_expr, USING_STMT case): New case.
3700         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
3701
3702 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
3703
3704         * call.c (build_new_op): Convert args from reference here.
3705         (build_conditional_expr): Don't convert here.
3706
3707 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
3708
3709         * spew.c (last_token_id): New static variable.
3710         (read_token): Set it here.
3711         (yyerror): Use it here.
3712
3713 2001-04-30  Richard Henderson  <rth@redhat.com>
3714
3715         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
3716         * decl.c: Likewise.
3717
3718 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
3719
3720         * gxxint.texi: Remove.
3721         * Make-lang.in: Remove all traces of gxxint.texi.
3722
3723 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
3724
3725         * decl2.c (start_static_initialization_or_destruction): Correct
3726         logic to handle the -fno-use-cxa-atexit case.
3727
3728 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
3729
3730         * optimize.c (update_cloned_parm): New function.
3731         (maybe_clone_body): Use it.  Update the `this' parameter too.
3732
3733 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
3734
3735         * decl2.c (unsupported_options): Add new-abi.
3736         * lang-options.h: Remove no longer supported options.
3737
3738 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
3739
3740         * except.c (can_convert_eh): Don't check template parms,
3741         typename types etc.
3742
3743 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
3744
3745         * optimize.c (maybe_clone_body): Copy parameter names and locations.
3746
3747 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
3748
3749         * cp-tree.h (adjust_clone_args): Prototype new function.
3750         * class.c (adjust_clone_args): New function.
3751         * decl.c (start_function): Call it for in charge ctors.
3752
3753 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
3754
3755         * method.c (use_thunk): Make sure that thunks really are emitted
3756         when requested.
3757
3758 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
3759
3760         * mangle.c (write_chars): New macro.
3761         (hwint_to_ascii): New function
3762         (write_number): Use it.
3763         (write_integer_cst): Deal with really big numbers.
3764
3765 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
3766
3767         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
3768         the clone.
3769
3770 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
3771
3772         * decl.c (grokdeclarator): Set context of namespace scope
3773         TYPE_DECLS.
3774
3775 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
3776
3777         * cp/optimize.c: Include hashtab.h.
3778         (struct inline_data): Add tree_pruner.
3779         (expand_call_inline, expand_calls_inline): Use it when calling
3780         walk_tree.
3781         (optimize_function): Initialize and free tree_pruner.
3782
3783 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
3784
3785         Lazy __FUNCTION__ generation.
3786         * cp-tree.def (FUNCTION_NAME): Remove.
3787         * cp-tree.h (function_name_declared_p): Remove.
3788         (cp_fname_init): Prototype.
3789         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
3790         don't call declare_function_name. Call start_fname_decls.
3791         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
3792         clobber the line number.
3793         (cp_fname_init): New function.
3794         (start_function): Call start_fname_decls.
3795         (finish_function): Call finish_fname_decls.
3796         * lex.c (reswords): Add slots for __FUNCTION__ et al.
3797         (rid_to_yy): Add mappings for __FUNCTION__ et al.
3798         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
3799         * parse.y (VAR_FUNC_NAME): New token.
3800         (primary): Add VAR_FUNC_NAME.
3801         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
3802         generation.
3803         (tsubst, FUNCTION_NAME case): Remove.
3804         (tsubst_copy, FUNCTION_NAME case): Remove.
3805         (tsubst_expr, DECL_STMT case): Be careful with a
3806         DECL_PRETTY_FUNCTION_P.
3807         (instantiate_decl): Remove function_name_declared_p.
3808         * semantics.c (begin_compound_statement): Don't call
3809         declare_function_name here.
3810         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
3811         (finish_translation_unit): Call finish_fname_decls.
3812         (expand_body): Remove function_name_declared_p.
3813         * typeck2.c (digest_init): Allow any ERROR_MARK.
3814
3815 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
3816
3817         * pt.c (tsubst_decl): Use VOID_TYPE_P.
3818         * semantics.c: Fix some typos.
3819
3820 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
3821
3822         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
3823
3824 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3825
3826         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
3827
3828 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
3829
3830         * except.c (build_throw): Wrap the initialization of the exception
3831         object in a MUST_NOT_THROW_EXPR.
3832         (do_free_exception): #if 0.
3833
3834 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
3835
3836         * cp-tree.h (finish_enum): Change prototype.
3837         * decl.c (finish_enum): Reorganize.
3838         * parse.y (structsp): Adjust calls to finish_enum.
3839
3840 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3841
3842         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
3843         't' case.
3844
3845 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3846
3847         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
3848         (layout_empty_base): Return at end flag.
3849         (build_base_field): Likewise.
3850         (build_base_fields): Likewise.
3851         (layout_virtual_bases): Don't add 1 to eoc value.
3852         (end_of_class): Use full size for empty bases.
3853         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
3854         empty bases. Don't add 1 to eoc value. Only add trailing padding
3855         if we're an empty class with no empty bases.
3856         (dump_class_hierarchy): Dump size and alignment.
3857
3858 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
3859
3860         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
3861         ICS_BAD_FLAG.
3862
3863 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
3864
3865         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
3866         is found, look first if name does not match the structure name.
3867
3868 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
3869
3870         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
3871         set.
3872         (SET_DECL_LANGUAGE): New macro.
3873         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
3874         (pushdecl): Likewise.
3875         (build_library_fn_1): Likewise.
3876         (build_cp_library_fn): Likewise.
3877         (grokfndecl): Likewise.
3878         (grokvardecl): Mark `extern "C"' variables as having C linkage.
3879         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
3880         * lex.c (retrofit_lang_decl): Likewise.
3881         * mangle.c (mangle_decl_string): Don't mangle the names of
3882         variables declared with C language linkage.
3883         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
3884
3885 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
3886
3887         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
3888         flag_access_control from uninitialized storage.
3889
3890 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
3891
3892         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
3893         * mangle.c (write_pointer_to_member_type): Fix mangling of
3894         pointers to cv-qualified member function types.
3895
3896         * init.c (build_delete): Create a SAVE_EXPR for the address if
3897         we're going to use it more than once.
3898
3899 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
3900
3901         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
3902         (expand_ptremfunc_cst): Change prototype.
3903         (delta2_from_ptrmemfunc): Remove.
3904         * expr.c (cplus_expand_constant): Adjust call to
3905         expand_ptrmemfunc_cst.
3906         * typeck.c (build_ptrmemfunc1): Simplify.
3907         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
3908         results in a constant.
3909         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
3910         (delta2_from_ptrmemfunc): Remove.
3911         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
3912
3913 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
3914
3915         * cp-tree.h (decl_namespace_list): New macro.
3916         (struct saved_scope): Add decl_ns_list.
3917         * decl.c (mark_saved_scope): Mark it.
3918         * decl2.c: Lose static decl_namespace_list.
3919         (init_decl2): Don't save it.
3920
3921 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3922
3923         * cp-tree.h (warn_return_type, yylex): Delete redundant
3924         declarations.
3925
3926         * decl.c (current_class_depth, global_namespace): Likewise.
3927
3928         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
3929
3930         * repo.c (flag_use_repository): Likewise.
3931
3932 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3933
3934         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
3935         set_block, pushdecl, getdecls, gettags, init_decl_processing,
3936         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
3937         lvalue_or_else, print_lang_statistics, comp_target_types,
3938         unsigned_type, signed_type, signed_or_unsigned_type,
3939         build_function_call, mark_addressable, incomplete_type_error):
3940         Delete redundant declarations.
3941
3942 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
3943
3944         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
3945         (TYPE_ANONYMOUS_P): New macro.
3946         (TAGGED_TYPE_P): New macro.
3947         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
3948         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
3949         * tree.c (no_linkage_helper): Likewise.
3950         * semantics.c (begin_class_definition): Likewise.
3951         * pt.c (convert_template_argument): Likewise.
3952         * lex.c (check_for_missing_semicolon): Likewise.
3953
3954 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
3955
3956         * class.c (dfs_unshared_virtual_bases): New function.
3957         (mark_primary_bases): Call it.
3958         (check_bases): Ignore virtual bases when determining
3959         nearly-emptiness.
3960
3961 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
3962
3963         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
3964
3965 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
3966
3967         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
3968         cloned function to the clone.
3969
3970 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3971
3972         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
3973
3974         * semantics.c: Include expr.h.
3975
3976 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
3977
3978         * method.c (implicitly_declare_fn): Commonize code for copy ctor
3979         and assignment op. Set TREE_USED for parameter.
3980
3981 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
3982
3983         * class.c (find_final_overrider_data): Add `candidates'.
3984         (dfs_find_final_overrider): Don't issue error messages
3985         prematurely.
3986         (find_final_overrider): Issue error messages here.
3987         (build_base_field): Don't warn about amgibuous direct bases here.
3988         (warn_about_ambiguous_direct_bases): New function.
3989         (layout_class_type): Use it.
3990
3991 2001-04-10  Richard Henderson  <rth@redhat.com>
3992
3993         * typeck.c (build_array_ref): Push the array reference inside
3994         COMPOUND_EXPR and COND_EXPR.
3995
3996 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
3997
3998         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
3999         * decl.c (duplicate_decls): Adjust accordingly.
4000         (maybe_commonize_var): Likewise.
4001         (grokfndecl): Likewise.
4002         (start_function): Likewise.
4003         (start_method): Likewise.
4004         * decl2.c (key_method): Likewise.
4005         (import_export_decl): Likewise.
4006         * method.c (implicitly_declare_fn): Likewise.
4007         * optimize.c (maybe_clone_body): Likewise.
4008
4009 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
4010
4011         * lang-specs.h: Add __DEPRECATED.
4012
4013 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
4014
4015         * search.c (get_dynamic_cast_base_type): When building a new
4016         constant, set its type to ssizetype.
4017
4018 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
4019
4020         * optimize.c (expand_call_inline): Only add newly inlined statements
4021         into inlined_stmts.
4022
4023 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
4024
4025         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
4026         (OPERATOR_FORMAT): Likewise.
4027         (OPERATOR_TYPENAME_FORMAT): Likewise.
4028         * operators.def: Remove old name-mangling information.
4029         * decl.c (grok_op_properties): Adjust accordingly.
4030         * lex.c (init_operators): Likewise.
4031         * rtti.c (get_tinfo_decl): Issue error messages about types that
4032         have variable size.
4033
4034 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
4035
4036         * decl2.c (import_export_decl): Don't call import_export_class
4037         when processing an inline member function.
4038         * semantics.c (expand_body): Call import_export_decl before
4039         emitting inline functions.
4040
4041 2001-03-28  Richard Henderson  <rth@redhat.com>
4042
4043         IA-64 ABI Exception Handling:
4044         * cp-tree.def (EH_SPEC_BLOCK): New.
4045         (MUST_NOT_THROW_EXPR): New.
4046         * cp-tree.h: Update changed function declarations.
4047         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
4048         (CPTI_CALL_UNEXPECTED): New.
4049         (struct cp_language_function): Rename x_eh_spec_try_block
4050         to x_eh_spec_block.
4051         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
4052         * decl.c (current_binding_level): If no current function
4053         bindings, revert to scope_chain.
4054         (initialize_predefined_identifiers): Remove __cp_push_exception.
4055         (store_parm_decls): Use begin_eh_spec_block.
4056         (finish_function): Use finish_eh_spec_block.
4057         (mark_lang_function): Update for name changes.
4058         * decl2.c (finish_file): No mark_all_runtime_matches.
4059         * dump.c (cp_dump_tree): Handle new tree codes.
4060         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
4061         * except.c (catch_language_init, catch_language): Remove.
4062         (init_exception_processing): Don't set language code.
4063         Initialize call_unexpected_node, protect_cleanup_actions,
4064         eh_personality_libfunc, lang_eh_runtime_type.
4065         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
4066         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
4067         (prepare_eh_type): Split out type canonicalizations ...
4068         (build_eh_type_type): ... from here.
4069         (build_eh_type_type_ref): Remove.
4070         (mark_all_runtime_matches): Remove.
4071         (build_exc_ptr): New.
4072         (do_begin_catch, do_end_catch): New.
4073         (do_pop_exception): Remove.
4074         (build_terminate_handler): Remove.
4075         (choose_personality_routine): Split out language choice from ...
4076         (initialize_handler_parm): ... here.
4077         Use MUST_NOT_THROW_EXPR.
4078         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
4079         exception object handling.
4080         (expand_start_eh_spec, expand_end_eh_spec): Remove.
4081         (expand_exception_blocks, alloc_eh_object): Remove.
4082         (begin_eh_spec_block, finish_eh_spec_block): New.
4083         (do_allocate_exception, do_free_exception): New.
4084         (expand_throw): Merge into ...
4085         (build_throw): ... here.  Update for abi.
4086         * expr.c (cplus_expand_expr): No expand_internal_throw.
4087         Handle MUST_NOT_THROW_EXPR.
4088         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
4089         * semantics.c (*) Update for except.h name changes.
4090         (genrtl_try_block): No protect_with_terminate.
4091         (genrtl_eh_spec_block): New.
4092         (genrtl_handler): Don't emit the goto here.
4093         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
4094         (genrtl_finish_function): Don't expand_exception_blocks.
4095         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
4096
4097 2001-03-28  Richard Henderson  <rth@redhat.com>
4098
4099         * decl.c (struct named_label_list): Rename eh_region to
4100         in_try_scope, add in_catch_scope.
4101         (struct binding_level): Rename eh_region to is_try_scope,
4102         add is_catch_scope.
4103         (note_level_for_try): Rename from note_level_for_eh.
4104         (note_level_for_catch): New.
4105         (poplevel): Copy both is_try_scope and is_catch_scope to
4106         the named_label_list struct.
4107         (check_previous_goto_1): Don't check for catch block via
4108         DECL_ARTIFICIAL; use in_try_scope instead.
4109         (check_goto): Likewise.
4110         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
4111         * except.c (expand_start_catch_block): Call note_level_for_catch.
4112         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
4113
4114 2001-03-27  Richard Henderson  <rth@redhat.com>
4115
4116         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
4117         exceptions_via_longjmp.
4118
4119 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
4120
4121         * pt.c (check_default_tmpl_args):  Make error messages clearer.
4122
4123 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
4124
4125         * error.c:  Also undefine 'A' macro used for cp_printers definition.
4126
4127 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4128
4129         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
4130
4131 2001-03-26  Mike Yang <yang@research.att.com>
4132             Mark Mitchell  <mark@codesourcery.com>
4133
4134         * dump.c (dump_access): New function.
4135         (cp_dump_tree): Use it.  Dump basetype information for class
4136         types.
4137
4138 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
4139
4140         * Makefile.in (optimize.o): Depend on params.h.
4141         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
4142         (init_decl_processing): Set flag_no_inline when doing
4143         inlining-on-trees.
4144         * optimize.c: Include params.h.
4145         (struct inline_data): Improve documentation of FNS.  Add
4146         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
4147         (INSNS_PER_STMT): New macro.
4148         (remap_block): Use CLONING_P.
4149         (inlinable_function_p): Don't inline big functions.
4150         (expand_call_inline): Keep track of how much inlining we've done.
4151         (optimize_function): Set FIRST_INLINED_FN.
4152         (maybe_clone_body): Set CLONING_P.
4153         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
4154         tree nodes.
4155         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
4156         rest_of_compilation.  Clear DECL_RTL for local variables
4157         afterwards.
4158         (clear_decl_rtl): New function.
4159
4160 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
4161
4162         Implement DR 209
4163         * cp-tree.h (skip_type_access_control,
4164         reset_type_access_control): Prototype.
4165         * decl.c (grokdeclarator): Access of friends is not checked.
4166         * parse.y (component_decl_list): Reset type access control.
4167         * semantics.c (decl_type_access_control): Clear
4168         current_type_lookups.
4169         (save_type_access_control): Don't save if not deferring.
4170         (skip_type_access_control, reset_type_access_control): New
4171         functions.
4172         (begin_class_definition): Do type access control for basetypes.
4173         Start deferred access control.
4174         (finish_class_definition): Resume immediate access control if
4175         this is a local class.
4176
4177 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4178
4179         * class.c (add_method): Use memcpy/memmove, not bcopy.
4180
4181         * decl.c (duplicate_decls): Likewise.
4182
4183 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
4184
4185         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
4186         not `_'.
4187
4188 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
4189
4190         * decl.c (local_names): Define.
4191         (push_local_name): New.
4192         (grok_reference_init): Return init if initializing static reference
4193         variable with non-constant instead of emitting it.
4194         Move expand_static_init call to cp_finish_decl.
4195         (layout_var_decl): Call push_local_name.
4196         (maybe_commonize_var): Allow inlining functions even if they have
4197         static local variables, use comdat_linkage for them if flag_weak.
4198         (check_initializer): Call obscure_complex_init if
4199         grok_reference_init returned non-zero.
4200         (save_function_data): Clear x_local_names.
4201         (pop_cp_function_context): Free x_local_names.
4202         (mark_inlined_fns): Remove.
4203         (mark_lang_function): Mark x_local_names.
4204         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
4205         Mark inlined_fns as tree, remove call to mark_inlined_fns.
4206         * class.c (alter_access): Ensure DECL_ACCESS is never set if
4207         DECL_DISCRIMINATOR_P.
4208         * cp-tree.h (cp_language_function): Add x_local_names.
4209         (lang_decl_flags): Add discriminator into u2.
4210         (lang_decl_inlined_fns): Remove.
4211         (lang_decl): inlined_fns is now a TREE_VEC.
4212         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
4213         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
4214         TREE_VEC, not a custom structure.
4215         (optimize_function): Likewise.
4216         * mangle.c (discriminator_for_local_entity): Discriminate among
4217         VAR_DECL local entities.
4218         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
4219         is not valid.
4220
4221 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
4222
4223         Add support for Java interface method calls.
4224         * cp-tree.h (struct lang_type): Add java_interface flag.
4225         (TYPE_JAVA_INTERFACE): New macro.
4226         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
4227         by setting TYPE_JAVA_INTERFACE.
4228         * call.c (java_iface_lookup_fn): New static.
4229         (build_over_call): If calling a method declared in a
4230         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
4231         expression which resolves the function address.
4232         (build_java_interface_fn_ref): New function.
4233
4234 2001-03-22  Richard Henderson  <rth@redhat.com>
4235
4236         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
4237         * except.c: Don't include it.
4238
4239 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
4240             based on an idea from Joe Buck <jbuck@synopsys.com>
4241
4242         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
4243         New nonterminals.
4244         (data_def, component_decl): Add reductions to bad_decl.
4245
4246 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
4247
4248         * method.c (do_build_assign_ref): Don't use build_modify_expr for
4249         anonymous aggregates, since they don't have assignment operator
4250         method.
4251         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
4252         assignment operators for anonymous structure fields.
4253
4254 2001-03-21  Jason Merrill  <jason@redhat.com>
4255
4256         * pt.c (instantiate_decl): Abort if we see a member constant
4257         instantiation that doesn't already have its initializer.
4258         Downgrade explicit instantiation without definition to pedwarn.
4259
4260         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
4261         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
4262         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
4263
4264         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
4265         (pending_vtables): Remove.
4266         * decl2.c (pending_vtables): Remove.
4267         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
4268         CLASSTYPE_VTABLE_NEEDS_WRITING.
4269         (import_export_class): Likewise.
4270         (init_decl2): Don't mark pending_vtables.
4271         * lex.c (handle_pragma_vtable): Just sorry.
4272         * pt.c (instantiate_class_template): Don't mess with
4273         CLASSTYPE_VTABLE_NEEDS_WRITING.
4274         (mark_class_instantiated): Likewise.
4275         * ptree.c (print_lang_type): Don't print it.
4276         * semantics.c (begin_class_definition): Don't set it.
4277
4278         * pt.c (template_tail): Replace with last_pending_template.
4279         (maybe_templates, maybe_template_tail): Remove.
4280         (add_pending_template): Adjust.
4281         (instantiate_pending_templates): Adjust.
4282
4283         * cp-tree.h (struct saved_scope): Remove lang_stack field.
4284         (current_lang_stack): Remove.
4285         * decl.c (maybe_push_to_top_level): Don't initialize it.
4286         (duplicate_decls): Use current_lang_depth.
4287         (xref_basetypes): Likewise.
4288         * class.c (current_lang_depth): New fn.
4289         (push_lang_context): Use more varray functionality.
4290         (pop_lang_context): Likewise.
4291
4292         * error.c (GLOBAL_THING): Always use '__'.
4293
4294 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
4295
4296         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
4297
4298         * mangle.c (mangle_decl_string): Mangle the names of overloaded
4299         operators, even when they have `extern "C"' linkage.
4300
4301 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
4302
4303         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
4304         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
4305         where it's not necessary.
4306         (add_method): Remove optimization involving comparison of
4307         DECL_ASSEMBLER_NAME.
4308         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
4309         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
4310         where it's not necessary.
4311         (check_methods): Likewise.
4312         (build_clone): Likewise.
4313         (built_vtt): Likewise.
4314         * cp-tree.h (DECL_NEEDED_P): Likewise.
4315         * decl.c (pushtag): Likewise.
4316         (duplicate_decls): Likewise.
4317         (pushdecl): Likewise.
4318         (builtin_function): Likewise.
4319         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
4320         (build_cp_library_fn): Likewise.
4321         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
4322         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
4323         where it's not necessary.
4324         (make_rtl_for_nonlocal_decl): Likewise.
4325         (cp_finish_decl): Likewise.
4326         (grokfndecl): Likewise.
4327         (grokvardecl): Likewise.
4328         (grokdeclarator): Likewise.
4329         (start_function): Likewise.
4330         (cp_missing_return_ok_p): Likewise.
4331         * decl2.c (grokclassfn): Likewise.
4332         (check_classfn): Likewise.
4333         (finish_static_data_member_decl): Likewise.
4334         (grokfield): Likewise.
4335         * error.c (GLOBAL_IORD_P): Remove.
4336         (dump_global_iord): Improve output.
4337         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
4338         * except.c (nothrow_libfn_p): Summarily reject any function not in
4339         namespace-scope.
4340         * init.c (build_java_class_ref): Don't explicitly set
4341         DECL_ASSEMBLER_NAME after calling mangle_decl.
4342         * mangle.c (mangle_decl_string): Handle extern "C" functions.
4343         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
4344         * method.c (set_mangled_name_for_decl): Don't explicitly set
4345         DECL_ASSEMBLER_NAME after calling mangle_decl.
4346         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
4347         IDENTIFIER_GLOBAL_VALUE for the thunk.
4348         * pt.c (set_mangled_name_for_template_decl): Remove.
4349         (check_explicit_specialization): Don't use it.
4350         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
4351         (tsubst_friend_function): Likewise.
4352         (tsubst_decl): Likewise.
4353         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
4354         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
4355         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
4356         where it's not necessary.
4357         (tinfo_base_init): Likewise.
4358         (create_real_tinfo_var): Likewise.
4359         * search.c (looup_field_1): Likewise.
4360         * semantics.c (finish_named_return_value): Likewise.
4361         * tree.c (init_tree): Set lang_set_decl_assembler_name.
4362
4363 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
4364
4365         Correct semantics restrictions checking in throw-expression.
4366         * except.c (is_admissible_throw_operand): New function.
4367         (build_throw): Use it.
4368
4369 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
4370
4371         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
4372         and its ilk.
4373
4374 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
4375
4376         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
4377         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
4378         * decl.c (duplicate_decls): Likewise.
4379         (builtin_function): Likewise.
4380         (build_library_fn): Likewise.
4381         (build_cp_library_fn): Likewise.
4382         (check_initializer): Likewise.
4383         (cp_finish_decl): Likewise.
4384         * decl2.c (grokfield): Likewise.
4385         (grok_function_init): Remove #if 0'd code.
4386         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
4387         * friend.c (do_friend): Likewise.
4388         * init.c (get_temp_regvar): Likewise.
4389         * method.c (make_thunk): Likewise.
4390         * pt.c (tsubst_friend_function): Likewise.
4391         (tsubst_decl): Likewise.
4392         (regenerate_decl_from_template): Likewise.
4393         * semantics.c (genrtl_named_return_value): Likewise.
4394         (expand_body): Likewise.
4395         (genrtl_finish_function): Likewise.
4396         * tree.c (cp_tree_equal): Likewise.
4397
4398 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
4399
4400         * call.c (convert_like_real): Add extra semantics to INNER
4401         parameter. Don't convert to temporary if a user conversion
4402         gives us an lvalue that we're about to bind to a reference.
4403         Set INNER to indicate pending reference binding on recursive
4404         calls.
4405
4406 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
4407
4408         * cp/lex.c: Delete duplicate pending_lang_change.
4409
4410 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
4411
4412         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
4413         Similarly.
4414         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
4415         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
4416
4417 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
4418
4419         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
4420
4421 2001-03-08  Stan Shebs  <shebs@apple.com>
4422
4423         * cp-tree.h (set_identifier_local_value): Remove unused decl.
4424
4425 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
4426
4427         * spew.c: Remove references to CPP_OSTRING.
4428
4429 2001-03-06  Andrew Haley  <aph@redhat.com>
4430
4431         * typeck.c (convert_arguments): Check that we have an fndecl.
4432
4433 2001-03-05  Andrew Haley  <aph@redhat.com>
4434
4435         * typeck.c (convert_arguments): Don't do ellipsis conversion for
4436         __built_in_constant_p.
4437
4438 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
4439
4440         * typeck.c (build_static_cast): Allow enum to enum conversions
4441         as per DR 128.
4442
4443 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
4444
4445         * class.c (check_field_decls): Pointers to member do not a
4446         non-pod struct make, as per DR 148.
4447
4448 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
4449
4450         * call.c (joust): cp_pedwarn when using gnu extension concerning
4451         worst conversion sequences.
4452
4453 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
4454
4455         * decl.c: Replace all uses of 'boolean' with 'bool'.
4456
4457 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
4458
4459         * lang-specs.h: Add zero initializer for cpp_spec field to
4460         all array elements that need one.  Don't put an #ifdef inside
4461         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
4462         use it.
4463
4464 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
4465
4466         Implement using decls inside template functions.
4467         * decl2.c (validate_nonmember_using_decl): Don't special case
4468         fake_std_node in the global namespace. Don't reject early when
4469         processing a template.
4470         (do_local_using_decl): Add to statement tree. Don't do further
4471         processing when building a template.
4472         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
4473
4474 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
4475
4476         * decl2.c (do_nonmember_using_decl): Don't complain if we find
4477         same function. Do complain about ambiguating extern "C"
4478         declarations.
4479
4480 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
4481
4482         Remove floating point and complex type template constant parms.
4483         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
4484         COMPLEX_TYPE extensions.
4485         (invalid_nontype_parm_type_p): Likewise.
4486
4487 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
4488
4489         * except.c (call_eh_info): Revert "match_function"'s type.
4490
4491 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
4492
4493         Fix ctor vtable vcall offsets.
4494         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
4495         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
4496         (get_matching_base): Remove.
4497         (get_original_base): New function.
4498         (build_vtbl_initializer): Initialize vid.rtti_binfo.
4499         Use a virtual thunk for a ctor vtable with an index
4500         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
4501         primary base within a constructor vtable. Only set
4502         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
4503         when primary base has been lost.
4504         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
4505
4506 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
4507
4508         * call.c (joust): Ensure more_specialized()'s argument length
4509         parameter has correct value for constructors.
4510
4511 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
4512
4513         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
4514
4515         * decl.c (mark_inlined_fns): Prototype.
4516
4517 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
4518
4519         * spew.c (yylex): Correct handling of friends.
4520
4521 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
4522
4523         * mangle.c (write_encoding): Pass write_function_type the
4524         FUNCTION_DECL for the function being encoded.
4525         (write_function_type): Pass it along to write_bare_function_type.
4526         (write_bare_function_type): Pass it along to write_method_parms.
4527         (write_method_parms): Don't mangle the compiler-generated
4528         parameters to a constructor or destructor.
4529
4530 2001-02-22  Andreas Jaeger  <aj@suse.de>
4531
4532         * optimize.c: Include toplev.h for
4533         note_deferral_of_defined_inline_function prototype.
4534
4535 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
4536
4537         * cp-tree.h (struct lang_decl_inlined_fns): New.
4538         (struct lang_decls): Add inlined_fns.
4539         (DECL_INLINED_FNS): New macro.
4540         * optimize.c (struct inline_data): Add inlined_fns.
4541         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
4542         (inlinable_function_p): Likewise, fix typo in comment,
4543         function is not inlinable if it already inlined function currently
4544         being optimized.
4545         (expand_call_inline): Add fn to inlined_fns if necessary.
4546         (optimize_function): Initialize inlined_fns.
4547         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
4548         * decl.c (mark_inlined_fns): New function.
4549         (lang_mark_tree): Call it.
4550
4551 2001-02-21  Jason Merrill  <jason@redhat.com>
4552
4553         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
4554         (DECL_UNINLINABLE): Move to middle-end.
4555
4556         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
4557         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
4558         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
4559         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
4560         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
4561
4562         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
4563         second parm of op=.
4564
4565 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
4566
4567         * decl2.c (set_decl_namespace): Allow explicit instantiations in
4568         any namespace.
4569
4570 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4571
4572         * optimize.c (expand_call_inline): Don't walk subtrees of type
4573         nodes.
4574
4575 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
4576
4577         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
4578         for a destructor.
4579
4580 2001-02-18  Jason Merrill  <jason@redhat.com>
4581
4582         Do put the VTT parameter in DECL_ARGUMENTS.
4583         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
4584         (current_vtt_parm): New macro.
4585         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
4586         (DECL_HAS_VTT_PARM_P): New macro.
4587         (DECL_VTT_PARM): Remove.
4588         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
4589         * decl.c (duplicate_decls): Only copy the operator code if
4590         appropriate.
4591         (start_function): Set current_vtt_parm.
4592         (lang_mark_tree): Don't mark vtt_parm.
4593         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
4594         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
4595         * class.c (build_clone): Maybe remove the VTT parm.
4596         * optimize.c (maybe_clone_body): Set up the VTT parm.
4597         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
4598         * call.c (build_over_call): Just allow the VTT arg.
4599         * method.c (make_thunk): Don't set DECL_VTT_PARM.
4600         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
4601         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
4602         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
4603         * error.c (dump_function_decl): Likewise.
4604         * call.c (build_user_type_conversion_1, convert_like_real): Abort
4605         if we try to call a constructor with in-charge or VTT parms.
4606         * method.c (skip_artificial_parms_for): New fn.
4607         * call.c (add_function_candidate, build_over_call): Call it.
4608         * call.c (build_new_method_call): Use current_vtt_parm.
4609         * init.c (expand_virtual_init): Likewise.
4610         * class.c (same_signature_p): No longer static.
4611         * cp-tree.h: Declare it.
4612         * search.c (look_for_overrides_r): Use it.
4613
4614 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
4615
4616         * cp-tree.h (new_abi_rtti_p): Remove.
4617         (name_mangling_version): Likewise.
4618         (flag_do_squangling): Likewise.
4619         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
4620         * decl.c (grokfndecl): Likewise.
4621         * decl2.c (name_mangling_version): Remove.
4622         (flag_do_squangling): Likewise.
4623         (lang_f_options): Remove `squangle'.
4624         (unsupported_options): Add `squangle'.
4625         (cxx_decode_option): Issue a warning about uses of
4626         -fname-mangling-version.
4627         (finish_file): Remove old ABI support.
4628         * pt.c (check_explicit_specialization): Likewise.
4629         (tsubst_decl): Likewise.
4630         * rtti.c (init_rtti_processing): Likewise.
4631         (build_headof): Likewise.
4632         (get_tinfo_decl_dynamic): Likewise.
4633         (tinfo_from_decl): Likewise.
4634         (build_dynamic_cast_1): Likewise.
4635         (synthesize_tinfo_var): Likewise.
4636         * init.c (build_new): Allow enumeration types for the array-bounds
4637         in a direct-new-declarator.
4638
4639         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
4640
4641         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
4642         TREE_PROTECTED from the template being specialized.
4643
4644 2001-02-17  Jason Merrill  <jason@redhat.com>
4645
4646         * decl2.c (build_artificial_parm): Set TREE_READONLY.
4647
4648         * decl.c (bad_specifiers): Allow throw specs on things with
4649         pointer-to-function or -member-function type.
4650         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
4651         a pmf.
4652
4653 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
4654
4655         * call.c (check_dtor_name): Handle template names correctly.
4656
4657 2001-02-16  Jason Merrill  <jason@redhat.com>
4658
4659         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
4660         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
4661         * optimize.c (maybe_clone_body): Don't substitute it.
4662         * call.c (build_new_method_call): Check in_chrg instead.
4663         * init.c (expand_virtual_init): Likewise.
4664
4665 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
4666
4667         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
4668         class-type introduces at least a type-name.
4669
4670 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
4671
4672         * call.c (convert_like_real): Create a temporary for non-lvalue.
4673
4674 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
4675
4676         * cp-tree.h: Fix typos in comments.
4677
4678 2001-02-16  Jason Merrill  <jason@redhat.com>
4679
4680         * optimize.c (remap_block): If we're compiling a clone, pass the
4681         new block to insert_block.
4682
4683 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
4684
4685         * semantics.c (finish_asm_stmt): Robustify.
4686
4687 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
4688
4689         * pt.c (push_template_decl_real): Don't remangle the name of a
4690         class template.
4691
4692 2001-02-15  Jim Meyering  <meyering@lucent.com>
4693
4694         * Make-lang.in (c++.install-common): Depend on installdirs.
4695         (c++.install-info): Likewise.
4696         (c++.install-man): Likewise.
4697
4698 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
4699
4700         * typeck2.c (build_m_component_ref): Robustify.
4701
4702 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
4703
4704         * friend.c (do_friend): Don't take the nested [template] class
4705         into account when deciding whether to warn about the friend
4706         function not referring to a template function.
4707
4708 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
4709
4710         * typeck.c (build_unary_op): Clarify error message.
4711
4712 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
4713
4714         * parse.y (component_constructor_declarator): allow optional
4715         parentheses around constructor class name.
4716
4717 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
4718
4719         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
4720         section.
4721         * init.c (emit_base_init): Remove incorrect comment about
4722         virtual bases.
4723         * method.c (make_thunk): Fix comment alignment.
4724
4725 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
4726
4727         Kill remnants of this is variable.
4728         * cp-tree.h (flag_this_is_variable): Remove.
4729         * decl2.c (flag_this_is_variable): Remove.
4730         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
4731         (build_vbase_path): The path is non-static, even in a cdtor.
4732         (resolves_to_fixed_type_p): Add additional return value.
4733         * search.c (init_vbase_pointers): Adjust.
4734         * tree.c (lvalue_p_1): Adjust.
4735         * typeck.c (mark_addressable): Adjust.
4736
4737 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
4738
4739         * pt.c (unify): Don't check cv quals of array types.
4740
4741 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
4742
4743         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
4744         check whether we already have the type.
4745
4746 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
4747
4748         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
4749         * call.c (build_op_delete_call): Simplify to remove duplicate
4750         code.
4751         * class.c (clone_function_decl): Don't build the deleting variant
4752         of a non-virtual destructor.
4753         * decl.c (finish_destructor_body): Don't call delete if this is a
4754         non-virtual destructor.
4755         * init.c (build_delete): Explicitly call `operator delete' when
4756         deleting an object with a non-virtual destructor.
4757
4758 2001-02-13  Jason Merrill  <jason@redhat.com>
4759
4760         * lang-specs.h: Add more __EXCEPTIONS.
4761
4762 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
4763
4764         * typeck2.c (process_init_constructor): Check
4765         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
4766
4767 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
4768
4769         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
4770         Remove spurious information in comment. Allow further
4771         adjustments of REFERENCE_TYPE args.
4772
4773 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
4774
4775         * errfn.c (cp_deprecated): Tweak diagnostic text.
4776         * parse.y (new_initializer): Deprecate initializer lists
4777         extension.
4778
4779 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
4780
4781         Remove old ABI support.
4782
4783 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
4784
4785         * decl2.c (flag_vtable_thunks): Always set it to 1.
4786         (flag_new_abi): Likewise.
4787         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
4788
4789         * Makefile.in (g++spec.o): Fix typo.
4790
4791 2001-02-09  Jason Merrill  <jason@redhat.com>
4792
4793         * lang-specs.h: Restore definition of __EXCEPTIONS.
4794
4795 2001-02-08  Jason Merrill  <jason@redhat.com>
4796
4797         * search.c (shared_member_p): New function.
4798         (lookup_field_r): Use it.
4799         * cp-tree.h (SHARED_MEMBER_P): Remove.
4800
4801         * method.c (process_overload_item): Handle template-dependent array
4802         bounds.
4803         * pt.c (type_unification_real): If we end up with undeduced nontype
4804         parms, try again.
4805
4806         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
4807         types.
4808
4809         * typeck2.c (friendly_abort): Don't say anything if we have
4810         earlier errors or sorries.
4811
4812         * decl.c (check_tag_decl): Notice attempts to redefine bool and
4813         wchar_t.  Ignore if in_system_header.
4814
4815         * decl.c (maybe_push_cleanup_level): New fn...
4816         (start_decl_1): ...split out from here.
4817         * cvt.c (build_up_reference): Use it.
4818         * cp-tree.h: Declare it.
4819
4820 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
4821
4822         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
4823         spec.
4824
4825 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
4826
4827         * pt.c (lookup_template_class): Make sure it's a primary
4828         template or template_template_parm when called from the parser.
4829         (instantiate_template_class): Add assertion.
4830
4831 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
4832
4833         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
4834         from error_mark_node.
4835
4836 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
4837
4838         Fix specification and implementation bugs in V3 ABI
4839         construction vtables.
4840         * cp-tree.h (flag_dump_class_layout): New flag.
4841         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
4842         (BINFO_LOST_PRIMARY_P): New flag.
4843         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
4844         (BINFO_PRIMARY_MARKED_P): Rename to ...
4845         (BINFO_PRIMARY_P): ... here.
4846         (binfo_via_virtual): New prototype.
4847         * decl2.c (flag_dump_class_layout): New flag.
4848         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
4849         use `=' as a file name separator.
4850         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
4851         bases.
4852         (build_vtbl_address): If this is a virtual primary base, then
4853         get the vtbl of what it is ultimately primary for.
4854         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
4855         for BINFO_PRIMARY_P.
4856         (dfs_skip_nonprimary_vbases_markedp): Likewise.
4857         (get_shared_vbase_if_not_primary): Likewise.
4858         (dfs_get_pure_virtuals): Likewise.
4859         (expand_upcast_fixups): Likewise.
4860         (fixup_virtual_upcast_offsets): Likewise.
4861         (dfs_find_vbase_instance): Likewise.
4862         (find_vbase_instance): Likewise.
4863         (binfo_from_vbase): Adjust comment to reflect reality.
4864         (binfo_via_virtual): New function.
4865         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
4866         for binfo walking during VTT construction.
4867         (dfs_mark_primary_bases): Remove.
4868         (force_canonical_binfo_r): New function.
4869         (force_canonical_binfo): New function.
4870         (mark_primary_virtual_base): New function.
4871         (mark_primary_bases): Walk in inheritance graph order, use
4872         mark_primary_virtual_base.
4873         (determine_primary_base): Use some more intermediate variables.
4874         (dfs_find_final_overrider): Don't check for overriding along a
4875         virtual path.
4876         (dfs_modify_vtables): Walk into primary virtual bases too.
4877         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
4878         (build_base_fields): Likewise.
4879         (dfs_set_offset_for_unshared_vbases): Likewise.
4880         (layout_virtual_bases): Likewise.
4881         (end_of_class): Likewise.
4882         (finish_struct_1): Call dump_class_hierarchy, if requested.
4883         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
4884         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
4885         (dump_class_hierarchy): Add file parameter. Append to file, if
4886         required.
4887         (finish_vtbls): Adjust accumulate_vtbl_inits call.
4888         Use canonical base for virtual bases.
4889         (build_vtt): Add more comments. Adjust build_vtt_inits call.
4890         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
4891         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
4892         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
4893         virtual VTTs.
4894         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
4895         from DATA.  We want virtual primary bases and all bases via virtual.
4896         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
4897         virtual base when not a construction vtable.
4898         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
4899         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
4900         Use canonical bases when processing virtual bases.
4901         (accumulate_vtbl_inits): We're interested in any base via a
4902         virtual path.
4903         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
4904         within a construction vtable, determine what is being overridden.
4905         (build_vtbl_initializer): Add more comments
4906         (add_vcall_offset_vtbl_entries_1): Adjust comment.
4907         (build_rtti_vtbl_entries): Check if the base has lost its
4908         primary.
4909
4910 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
4911
4912         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
4913
4914 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4915
4916         * decl.c (pushdecl): Call abort instead of fatal.
4917         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
4918         * init.c (build_new_1): Likewise.
4919         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
4920         * decl.c (build_typename_type): hash_table_init now returns void.
4921         decl.c (init_decl_processing): Make an error non-fatal.
4922
4923 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
4924
4925         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
4926         Document.
4927         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
4928         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
4929         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
4930         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
4931         * decl.c (maybe_commonize_var): Use the new name-mangling where
4932         appropriate.
4933         * decl2.c (comdat_linkage): Enhance comments.  Make all
4934         compiler-generated things static, if COMDAT is not available.
4935         (get_tinfo_decl): Do not make typeinfo objects that belong in the
4936         library COMDAT.
4937         (tinfo_base_init): Use the correct mangled name for typeinfo
4938         strings, and push them into the global scope.
4939         (typeinfo_in_lib_p): New function.
4940         (synthesize_tinfo_var): Use it.
4941         (create_real_tinfo_var): Likewise.
4942
4943 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
4944
4945         * decl.c (push_class_binding): Use context_for_name_lookup instead
4946         of CP_DECL_CONTEXT.
4947         * search.c (context_for_name_lookup): Remove static.  Check for NULL
4948         context in the loop.
4949         * cp-tree.h (context_for_name_lookup): Add prototype.
4950
4951 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
4952
4953         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
4954         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
4955         Remove.
4956         * call.c (convert_class_to_reference, build_user_type_conversion_1,
4957         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
4958
4959 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
4960
4961         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
4962         of macros used when compiling g++spec.c.
4963         * g++spec.c (lang_specific_driver): Link with the shared
4964         libgcc by default.
4965
4966 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
4967
4968         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
4969         make_reference_declarator, make_call_declarator), method.c
4970         (implicitly_declare_fn), parse.y (namespace_using_decl,
4971         notype_unqualified_id, expr_or_declarator, new_type_id,
4972         after_type_declarator, direct_after_type_declarator,
4973         notype_declarator, complex_notype_declarator,
4974         complex_direct_notype_declarator, qualified_id,
4975         notype_qualified_id, overqualified_id, direct_new_declarator,
4976         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
4977         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
4978         instead of build_parse_node.
4979
4980 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4981
4982         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
4983         (minus_one_node): Moved to top level gcc directory.  Renamed
4984         to integer_minus_one_node.
4985
4986         * init.c (init_init_processing): Don't set minus_one_node.
4987         (build_vec_init): Use integer_minus_one_node.
4988
4989         * rtti.c (get_tinfo_decl_dynamic): Likewise.
4990
4991 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
4992
4993         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
4994         identical and they would be replaced with constant, remove
4995         MODIFY_EXPR from the tree.
4996
4997 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4998
4999         * Make-lang.in: Remove all dependencies on defaults.h.
5000         * call.c: Don't include defaults.h.
5001         * decl.c: Likewise.
5002         * decl2.c: Likewise.
5003         * except.c: Likewise.
5004         * pt.c: Likewise.
5005         * rtti.c: Likewise.
5006         * tree.c: Likewise.
5007         * typeck.c: Likewise.
5008
5009 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
5010
5011         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
5012         operators even in "C" linkage.
5013         * method.c (set_mangled_name_for_decl): Likewise.
5014         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
5015         overloaded operators in "C" linkage.
5016
5017 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
5018
5019         * pt.c (tsubst_decl): Remove IN_DECL parameter.
5020         (tsubst_arg_types): Check parameter is not void.
5021         (tsubst): Adjust tsubst_decl call.
5022
5023 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
5024
5025         * call.c (add_builtin_candidate): Quote std properly, from
5026         previous change.
5027
5028 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5029
5030         * pt.c (check_explicit_specialization): Clone constructors and
5031         destructors.
5032
5033 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
5034
5035         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
5036         indicates anything special about template depth. Make sure we
5037         only count the user visible template classes.
5038
5039 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
5040
5041         * call.c (build_conv): Typo in comment.
5042         (add_builtin_candidate): Add more explanation.
5043         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
5044         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
5045         when we have enumeral types.
5046         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
5047         candidates for relops and eqops.
5048         (joust): Simplify control flow. Allow a non-template user
5049         function to hide a builtin.
5050
5051 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
5052
5053         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
5054         (more_specialized): Add deduction parameter.
5055         * call.c (joust): Adjust more_specialized call.
5056         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
5057         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
5058         (get_bindings_order): Remove.
5059         (get_bindings_real): Add DEDUCE parameter.
5060         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
5061         REFERENCE_TYPE jig for DEDUCE_ORDER.
5062         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
5063         maybe_adjust_types_for_deduction.
5064         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
5065         directly.
5066         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
5067         (check_cv_quals_for_unify): Use new unify qualifier flags.
5068         (unify): Clear new unify qualifier flags.
5069         (get_bindings_real): Add DEDUCE parameter.
5070         (get_bindings): Adjust call to get_bindings_real.
5071         (get_bindings_overload): Likewise.
5072         (most_specialized_instantiation): Adjust call to
5073         more_specialized.
5074
5075 2001-01-19  Jason Merrill  <jason@redhat.com>
5076
5077         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
5078
5079         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
5080         -fnew-abi.
5081
5082 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
5083
5084         * decl2.c (arg_assoc_class): Fix double iteration logic.
5085
5086 2001-01-19  Jason Merrill  <jason@redhat.com>
5087
5088         * init.c (build_delete): Always call convert_force to strip cv-quals.
5089
5090         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
5091         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
5092         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
5093
5094 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
5095
5096         * search.c (get_vbase_1): Count only virtual bases.
5097
5098 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
5099
5100         * class.c (duplicate_tag_error): Robustify flag clearing.
5101
5102 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
5103
5104         * cp-tree.h (lookup_template_class): Add complain parm.
5105         * decl.c (lookup_namespace_name): Adjust call to
5106         lookup_template_class.
5107         (make_typename_type): Likewise.
5108         * semantics.c (finish_template_type): Likewise.
5109         * pt.c (lookup_template_class): Add complain parm. Adjust.
5110         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
5111         (tsubst): Likewise.
5112
5113 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
5114
5115         * pt.c (copy_default_args_to_explicit_spec): Preserve
5116         object's CV quals. Reorganize.
5117
5118 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
5119
5120         * typeck.c (build_modify_expr): Say `initialization' for
5121         INIT_EXPRs.
5122         * init.c (build_default_init): Convert to enumeral type, if
5123         needed.
5124
5125 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
5126
5127         * parse.y (nomods_initdcl0): Properly set things up for
5128         initdcl0_innards.
5129
5130 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
5131
5132         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
5133         (type_unification_real): Set it.
5134         (unify): Use it.
5135
5136 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
5137
5138         * decl.c (finish_destructor_body): Convert to vbase pointer here.
5139
5140 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
5141
5142         * semantics.c (begin_class_definition): Check we're not inside a
5143         template parm list.
5144
5145 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
5146
5147         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
5148         BASELINK_P.
5149
5150 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5151
5152         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
5153         * call.c (build_over_call): Add comment.
5154
5155 2001-01-16 Daniel Berlin <dberlin@redhat.com>
5156
5157         * cvt.c (ocp_convert): Handle vector type conversion
5158         * typeck2.c (digest_init): Handle vector type initializations
5159
5160 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
5161
5162         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
5163           was given.
5164
5165 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
5166
5167         * pt.c (check_nontype_parm): Rename to ...
5168         (invalid_nontype_parm_type_p): ... here.
5169         (process_template_parm): Adjust.
5170         (convert_template_argument): Adjust.
5171
5172 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
5173
5174         * pt.c (check_nontype_parm): New function.
5175         (process_template_parm): Use it.
5176         (convert_template_argument): Use it.
5177         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
5178         member.
5179
5180 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
5181
5182         * tree.c: Add defaults.h
5183         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
5184         * Make-lang.in (cp/tree.o): Add defaults.h.
5185
5186 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
5187
5188         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
5189
5190 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
5191
5192         * g++.1: Change to be ".so man1/gcc.1".
5193
5194 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
5195
5196         * Make-lang.in (c++.info, c++.install-info): Build and install g++
5197         internals info.
5198         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
5199         ($(srcdir)/cp/g++int.info): New target.
5200         * gxxint.texi: Add info directory entry.  Use @@ in email address.
5201         * .cvsignore: Update.
5202
5203 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
5204
5205         * typeck.c (build_c_cast): Do template processing earlier.
5206         Always pedwarn on array casts.
5207
5208 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
5209
5210         * friend.c (make_friend_class): Make sure a templated class is
5211         actually a template.
5212
5213 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
5214
5215         * decl2.c (get_guard): Set linkage from guarded decl.
5216
5217 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
5218
5219         * call.c (convert_default_arg): Check for unprocessed
5220         DEFAULT_ARG.
5221         * cp-tree.h (replace_defarg): Move to spew.c.
5222         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
5223         spew.c, which is where they really are.
5224         (done_pending_defargs): Declare.
5225         (unprocessed_defarg_fn): Declare.
5226         * decl.c (replace_defarg): Move to spew.c
5227         * parse.y (structsp): Call done_pending_defargs.
5228         * spew.c (defarg_fns): Rearrange list structure.
5229         (defarg_fnsdone): New static variable.
5230         (defarg_depfns): New static variable.
5231         (init_spew): Adjust.
5232         (add_defarg_fn): Store the type in TREE_TYPE.
5233         (do_pending_defargs): Detect and deal with ordering constraints
5234         and circularity.
5235         (done_pending_defargs): New function.
5236         (unprocessed_defarg_fn): New function.
5237         (replace_defarg): Moved from decl.c. Robustify. Don't save
5238         if circularity detected.
5239
5240 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
5241
5242         * pt.c (unify): Check array has a domain, before checking
5243         whether it is variable sized.
5244
5245 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
5246
5247         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
5248         parameters with pointers to arrays of unknown bound.
5249
5250 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
5251
5252         * parse.y (template_parm_header, template_spec_header): New
5253         reductions. Split out from ...
5254         (template_header): ... here. Use them.
5255         (template_template_parm): Use template_parm_header.
5256         * semantics.c (finish_template_template_parm): Add assert.
5257
5258 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
5259
5260         * mangle.c (write_builtin_type): Fix thinko.
5261
5262         * pt.c (copy_default_args_to_explicit_spec_1): New function.
5263         (copy_default_args_to_explicit_spec): Likewise.
5264         (check_explicit_specialization): Use it.
5265
5266         * class.c (finish_struct_1):  Remove last argument in call to
5267         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
5268         * decl.c (builtin_function): Likewise.
5269         (build_cp_library_fn): Likewise.
5270         (check_initializer): Likewise.
5271         (make_rtl_for_nonlocal_decl): Likewise.
5272         (cp_finish_decl): Likewise.
5273         (start_function): Likewise.
5274         * decl2.c (finish_anon_union): Likewise.
5275         * friend.c (do_friend): Likewise.
5276         * init.c (build_java_class_ref): Likewise.
5277         * method.c (make_thunk): Likewise.
5278         * pt.c (tsubst_friend_function): Likewise.
5279         * semantics.c (expand_body): Likewise.
5280
5281 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
5282
5283         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
5284         looking at DECL_CLONED_FUNCTION for non-functions.
5285
5286 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
5287
5288         * error.c (dump_template_parameter): Use parm to determine how
5289         to print default value.
5290
5291 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
5292
5293         * class.c (duplicate_tag_error): Clear more flags.
5294
5295 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
5296
5297         * call.c (build_new_method_call): Use binfo_for_vbase.
5298
5299 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
5300
5301         * cp-tree.h (flag_cond_mismatch): Don't declare.
5302         * decl2.c (flag_cond_mismatch): Don't define.
5303         (lang_f_options): Remove cond-mismatch.
5304         (unsupported_options): Add cond-mismatch.
5305
5306 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
5307
5308         * class.c (handle_using_decl): Reject using of constructor name
5309         of sourcing class. Allow injecting of a method with same name as
5310         nested class. Fixup error messages.
5311
5312 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
5313
5314         * decl2.c (lang_decode_option): Handle -Wformat=2.
5315
5316 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
5317
5318         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
5319         initialized_in_class.
5320         (DECL_DEFINED_IN_CLASS_P): Rename to ...
5321         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
5322         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
5323         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
5324         * pt.c (check_default_tmpl_args): Adjust for
5325         DECL_INITIALIZED_IN_CLASS_P.
5326         (instantiate_class_template): Likewise.
5327         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
5328
5329         * class.c (finish_struct): Constify saved_filename.
5330
5331 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
5332
5333         * class.c (duplicate_tag_error): Adjust diagnostic.
5334         (finish_struct): Locally set location to start of struct.
5335         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
5336
5337 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
5338
5339         * decl.c (struct binding_level): Adjust class_shadowed comments
5340         to reflect reality.
5341         (push_class_level_binding): Adjust comments to reflect reality.
5342         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
5343         Don't set TREE_VALUE on the class_shadowed list.
5344
5345 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5346
5347         * decl2.c (acceptable_java_type): Allow references too.
5348         * init.c (build_java_class_ref): When using the new ABI, search
5349         `class$' and have it mangled with `mangle_decl.'
5350         * mangle.c (write_java_integer_type_codes): New function.
5351         (write_builtin_type): Detect and mangle Java integer and real
5352         types.
5353
5354 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
5355
5356         * decl2.c (grokfield): Don't accept `asm' specifiers for
5357         non-static data members.
5358
5359 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5360
5361         * expr.c (cplus_expand_expr): Don't reset `target'.
5362
5363 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
5364
5365         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
5366
5367 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
5368
5369         * parse.y (template_datadef): Check for error_mark_node.
5370
5371 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
5372
5373         * cp-tree.def (DEFAULT_ARG): Make `x' class.
5374
5375 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
5376
5377         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
5378         (record_builtin_type): Make non-static.
5379         (flag_short_double): Don't declare.
5380         (init_decl_processing): Remove the creation of many tree nodes now
5381         in c_common_nodes_and_builtins.
5382         (build_void_list_node): New function.
5383         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
5384         * cp-tree.h (flag_short_wchar): Don't declare.
5385
5386 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
5387
5388         * call.c (build_conv): Don't use build1 for USER_CONV.
5389         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
5390
5391 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
5392
5393         * lex.c (lang_init): Call c_common_lang_init.
5394
5395 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
5396
5397         * search.c (lookup_fnfields_here): Remove.
5398         (look_for_overrides_r): Use lookup_fnfields_1.
5399         Ignore functions from using declarations.
5400
5401 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
5402
5403         Implement exceptions specifiers for implicit member functions.
5404         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
5405         * method.c (synthesize_exception_spec): New function.
5406         (locate_dtor, locate_ctor, locate_copy): New functions.
5407         (implicitly_declare_fn): Generate the exception spec too.
5408         * search.c (check_final_overrider): Check artificial functions
5409         too.
5410         * typeck2.c (merge_exception_specifiers): New function.
5411
5412 2001-01-03  Jason Merrill  <jason@redhat.com>
5413
5414         * init.c (build_default_init): New fn.
5415         (perform_member_init): Split out from here.
5416         (build_new_1): Use it.  Simplify initialization logic.
5417         (build_vec_init): Take an array, rather than a pointer and maxindex.
5418         Speed up simple initializations.  Don't clean up if we're assigning.
5419         * cp-tree.h: Adjust.
5420         * decl2.c (do_static_initialization): Remove TREE_VEC case.
5421         * parse.y (new_initializer): Return void_zero_node for ().
5422         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
5423         * typeck2.c (digest_init): Only complain about user-written
5424         CONSTRUCTORs.
5425
5426 2000-12-22  Mike Stump  <mrs@wrs.com>
5427
5428         * decl2.c: (max_tinst_depth): Increase to 50.
5429
5430 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
5431
5432         * class.c (invalidate_class_lookup_cache): Zero the
5433         previous_class_values.
5434         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
5435         TREE_INT_CST_HIGH.
5436         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
5437         * decl.c (free_bindings): New variable.
5438         (push_binding): Don't create a new binding if we have one on the
5439         free list.
5440         (pop_binding): Put old bindings on the free list.
5441         (init_decl_processing): Use size_int, not build_int_2.
5442         Register free_bindings as a GC root.
5443         (cp_make_fname_decl): Use size_int, not build_int_2.
5444         (push_inline_template_parms_recursive): Likewise.
5445         (end_template_parm_list): Likewise.
5446         (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
5447         (tsubst_template_parms): Use size_int, not build_int_2.
5448         (tsubst): Likewise.
5449         * rtti.c (get_vmi_pseudo_type_info): Likewise.
5450
5451 2001-01-02  Richard Henderson  <rth@redhat.com>
5452
5453         * parse.y (asm): Set ASM_INPUT_P.
5454
5455 2001-01-02  Jason Merrill  <jason@redhat.com>
5456
5457         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
5458         for v3 ABI.
5459
5460         * typeck.c (cp_truthvalue_conversion): New fn.
5461         * cvt.c (ocp_convert): Use it.
5462
5463         * cp-tree.h: Lose c-common.c decls.
5464
5465         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
5466         * cvt.c (convert_to_void): Use type_unknown_p.
5467
5468         * typeck.c (strip_all_pointer_quals): Also strip quals from
5469         pointer-to-member types.
5470
5471         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
5472         parse.y as C.
5473
5474         * call.c (build_new_method_call): Do evaluate the object parameter
5475         when accessing a static member.
5476         * typeck.c (build_component_ref): Likewise.
5477
5478 2001-01-02  Andreas Jaeger  <aj@suse.de>
5479
5480         * decl.c (cp_missing_noreturn_ok_p): New.
5481         (init_decl_processing): Set lang_missing_noreturn_ok_p.
5482
5483 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
5484
5485         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
5486
5487 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
5488
5489         * class.c (pushclass): Remove #if 0'd code.
5490         * cp-tree.h (overload_template_name): Remove.
5491         * decl.c (store_bindings): Simplify.
5492         (pop_from_top_level): Likewise.
5493         * pt.c (overload_template_name): Remove.
5494         (instantiate_decl): Don't call push_to_top_level if it's not
5495         needed.
5496
5497 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
5498
5499         * pt.c (register_local_specialization): Don't return a value.
5500         (lookup_template_class): Use move-to-front heuristic when looking
5501         up template instantiations.
5502         (instantiate_decl): Only push_to_top_level when we're actually
5503         going to instantiate the template.
5504
5505 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
5506
5507         * search.c (binfo_for_vtable): Return least derived class, not
5508         most.  Handle secondary vtables.
5509
5510 2000-12-22  Jason Merrill  <jason@redhat.com>
5511
5512         * pt.c (more_specialized): Don't optimize len==0.
5513         (fn_type_unification): If we're adding the return type, increase len.
5514
5515         * typeck.c (build_binary_op): Fix pmf comparison logic.
5516
5517         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
5518         DECL_STATIC_FUNCTION_P.
5519
5520         * semantics.c (genrtl_finish_function): Don't try to jump to
5521         return_label unless it exists.
5522
5523         In partial ordering for a call, ignore parms for which we don't have
5524         a real argument.
5525         * call.c (joust): Pass len to more_specialized.
5526         (add_template_candidate_real): Strip 'this', pass len.
5527         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
5528         (get_bindings_order): New fn.  Pass len down.
5529         (get_bindings_real): Strip 'this', pass len.
5530         (fn_type_unification): Likewise.
5531         (type_unification_real): Succeed after checking 'len' args.
5532         (most_specialized_instantiation): Lose explicit_args parm.
5533         * class.c (resolve_address_of_overloaded_function): Strip 'this',
5534         pass len.
5535
5536 2000-12-21  Jason Merrill  <jason@redhat.com>
5537
5538         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
5539         DECL_TEMPLATE_RESULT.
5540
5541         * search.c (lookup_field_r): Call lookup_fnfields_1, not
5542         lookup_fnfields_here.
5543
5544         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
5545
5546         * call.c (build_object_call): Also allow conversions that return
5547         reference to pointer to function.
5548         (add_conv_candidate): Handle totype being ref to ptr to fn.
5549         (build_field_call): Also allow members of type reference to function.
5550         Lose support for calling pointer to METHOD_TYPE fields.
5551
5552         * error.c (dump_expr): Handle *_CAST_EXPR.
5553
5554         * typeck2.c (build_scoped_ref): Always convert to the naming class.
5555
5556         * tree.c (break_out_cleanups): Lose.
5557         * cp-tree.h: Remove prototype.
5558         * typeck.c (build_component_ref): Don't break_out_cleanups.
5559         (build_compound_expr): Likewise.
5560         * semantics.c (finish_expr_stmt): Likewise.
5561
5562 2000-12-20  Richard Henderson  <rth@redhat.com>
5563
5564         * cp-tree.h: Update declarations.
5565         * decl.c (finish_case_label): Return the new stmt node.
5566         * semantics.c (finish_goto_stmt): Likewise.
5567         (finish_expr_stmt, finish_return_stmt): Likewise.
5568         (finish_break_stmt, finish_continue_stmt): Likewise.
5569         (finish_asm_stmt): Likewise.
5570         * parse.y (already_scoped_stmt): Set STMT_LINENO.
5571         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
5572         (simple_if, simple_stmt): Return the new stmt node.
5573         (save_lineno): New.
5574
5575 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
5576
5577         * cp-tree.h: Don't declare warn_long_long.
5578
5579 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5580
5581         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
5582         IS_AGGR_TYPE.
5583
5584 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5585
5586         * pt.c (unify): Handle when both ARG and PARM are
5587         BOUND_TEMPLATE_TEMPLATE_PARM.
5588
5589 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5590
5591         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
5592         DECL_TEMPLATE_PARM_P.
5593
5594 2000-12-15  Jason Merrill  <jason@redhat.com>
5595
5596         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
5597
5598         * init.c (build_new_1): Don't strip quals from type.
5599
5600         * decl.c (pushdecl): Don't check for linkage on a non-decl.
5601
5602         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
5603
5604         * call.c (build_new_function_call): Lose space before paren in
5605         error message.
5606         (build_new_method_call): Likewise.
5607
5608         * typeck2.c (build_m_component_ref): Propagate quals from datum.
5609
5610 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5611
5612         * pt.c (check_explicit_specialization): Propagate default
5613         function arguments to explicit specializations.
5614
5615 2000-12-13  DJ Delorie  <dj@redhat.com>
5616
5617         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
5618         and <? operators.
5619
5620 2000-12-08  Jason Merrill  <jason@redhat.com>
5621
5622         * error.c (dump_function_name): Don't let the user see __comp_ctor.
5623
5624         Clean up copy-initialization in overloading code.
5625         * call.c (build_user_type_conversion_1): Die if we are asked to
5626         convert to the same or a base type.
5627         (implicit_conversion): Avoid doing so.  Lose reference binding code.
5628         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
5629         direct-initialization.  Also do direct-init part of copy-init.
5630         (build_user_type_conversion): Don't provide context to convert_like.
5631         * cvt.c (ocp_convert): build_user_type_conversion will now provide
5632         the constructor call for copy-init.
5633
5634         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
5635         instantiation of a member template.
5636         (do_decl_instantiation): Not here.
5637
5638 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
5639
5640         * class.c (check_field_decls): Don't special case anonymous
5641         fields in error messages.
5642         (note_name_declared_in_class): Use %D on diagnostic.
5643
5644         * tree.c (pod_type_p): Use strip_array_types.
5645         (cp_valid_lang_attribute): Likewise.
5646         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
5647         multiple evaluations.
5648         (cp_has_mutable_p): Use strip_array_types.
5649
5650 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
5651
5652         * cp-tree.h (sufficient_parms_p): Declare new function.
5653         * call.c (sufficient_parms_p): New function, broken out of ...
5654         (add_function_candidate): ... here. Use it.
5655         (add_conv_candidate): Use it.
5656         * decl.c (grok_ctor_properties): Use it.
5657
5658 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
5659
5660         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
5661
5662 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
5663
5664         * decl2.c (lang_decode_option): Handle -Wformat-security.
5665
5666 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5667
5668         * pt.c (verify_class_unification): New function.
5669         (get_class_bindings): Use it.
5670         (try_class_unification): Tidy.
5671         (unify): Handle when argument of a template-id is not
5672         template parameter dependent.
5673         (template_args_equal): Handle when TREE_CODE's do not match.
5674
5675 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
5676
5677         * lang-specs.h (c++): When invoking the stand-alone preprocessor
5678         for -save-temps, pass all relevant -Defines to it, and then don't
5679         pass them to cc1plus.
5680
5681 2000-12-05  Will Cohen  <wcohen@redhat.com>
5682
5683         * decl.c (finish_case_label): Cleared
5684         more_cleanups_ok in surrounding function scopes.
5685         (define_label): Likewise.
5686
5687 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
5688
5689         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
5690         (get_matching_virtual): Remove.
5691         (look_for_overrides): Declare new function.
5692         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
5693         DECL_VINDEX here.
5694         * class.c (check_for_override): Move base class iteration code
5695         to look_for_overrides.
5696         * search.c (next_baselink): Remove.
5697         (get_virtuals_named_this): Remove.
5698         (get_virtual_destructor): Remove.
5699         (tree_has_any_destructors_p): Remove.
5700         (struct gvnt_info): Remove.
5701         (check_final_overrider): Remove `virtual' from error messages.
5702         (get_matching_virtuals): Remove. Move functionality to ...
5703         (look_for_overrides): ... here, and ...
5704         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
5705         to be overriding.
5706
5707 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
5708
5709         * typeck.c (get_delta_difference): If via a virtual base,
5710         return zero.
5711         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
5712         adjustment.
5713
5714 2000-12-04  Richard Henderson  <rth@redhat.com>
5715
5716         * error.c (dump_tree): Use output_add_string not OB_PUTS.
5717
5718 2000-12-04  Jason Merrill  <jason@redhat.com>
5719
5720         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
5721         (write_builtin_type): Pass intSI_type_node and the like through
5722         type_for_mode.
5723         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
5724         Pass intSI_type_node and the like through type_for_mode.
5725         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
5726         * pt.c (tsubst, unify): Likewise.
5727         * tree.c (walk_tree): Likewise.
5728         * error.c (dump_type): Likewise.
5729         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
5730
5731         * Make-lang.in: Tweak top comment for emacs.
5732         (cp/TAGS): Restore.
5733
5734         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
5735
5736         * class.c (clone_function_decl): Robustify.
5737
5738 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
5739
5740         * decl.c (store_bindings): Only search in the non modified
5741         old_bindings for duplicates.
5742
5743 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
5744
5745         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
5746         TYPE_POLYMORPHIC_P.
5747
5748         * typeck.c (build_static_cast): Remove unused variable.
5749
5750 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5751
5752         * pt.c: Fix typo in comment.
5753
5754 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
5755
5756         * decl2.c (warn_format): Remove definition.
5757         (lang_decode_option): Handle -Wformat-nonliteral,
5758         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
5759
5760 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
5761
5762         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
5763         (init_decl_processing): Don't create string_type_node,
5764         const_string_type_node, wint_type_node, intmax_type_node,
5765         uintmax_type_node, default_function_type, ptrdiff_type_node and
5766         unsigned_ptrdiff_type_node.  Adjust position of call to
5767         c_common_nodes_and_builtins.
5768         (identifier_global_value): New function.
5769
5770 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
5771
5772         * call.c (standard_conversion): Reject pointer to member
5773         conversions from ambiguous, inaccessible or virtual bases.
5774         * typeck.c (build_static_cast): Don't check pointers to members
5775         specially.
5776
5777 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
5778
5779         * method.c (do_build_copy_constructor): Preserve cv
5780         qualifications when accessing source object members.
5781         (do_build_assign_ref): Likewise. Remove separate diagnostics for
5782         unnamed fields.
5783
5784 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
5785
5786         * method.c (do_build_assign_ref): Construct appropriately
5787         CV-qualified base reference. Don't allow const casts in base
5788         conversion.
5789
5790 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
5791
5792         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
5793         incomplete return type.
5794
5795 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
5796
5797         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
5798         * semantics.c (finish_base_specifier): Accept a _TYPE not a
5799         _DECL.
5800
5801 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
5802
5803         * spew.c (yyerror): Cope if yylval.ttype is NULL.
5804
5805 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
5806
5807         * decl.c (grokdeclarator): Diagnose undefined template contexts.
5808
5809 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
5810
5811         * decl.c (grokdeclarator): Do type access control on friend
5812         class.
5813
5814 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
5815
5816         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
5817         bison parser ickiness.
5818         * pt.c (tsubst_friend_function): Enter namespace scope when
5819         tsubsting the function name.
5820         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
5821
5822 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
5823
5824         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
5825         * cvt.c (cp_convert_to_pointer): Add force parameter.
5826         Allow conversions via virtual base if forced.
5827         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
5828         (ocp_convert): Likewise.
5829         * search.c (binfo_from_vbase): Return the virtual base's binfo.
5830         * typeck.c (get_delta_difference): Adjust handling of virtual
5831         bases.
5832
5833 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
5834
5835         * tree.c (struct list_hash): Remove.
5836         (list_hash_table): Make it be an htab.
5837         (struct list_proxy): New type.
5838         (list_hash_eq): New function.
5839         (list_hash_pieces): Renamed from ...
5840         (list_hash): ... this.
5841         (list_hash_lookup): Remove.
5842         (list_hash_add): Remove.
5843         (hash_tree_cons): Use the generic hashtable.
5844         (mark_list_hash): Remove.
5845         (init_tree): Create the hashtable.
5846
5847 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
5848
5849         * method.c (build_mangled_C9x_name): Rename to
5850         build_mangled_C99_name.  Change C9X references in comments to
5851         refer to C99.
5852
5853 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
5854
5855         * parse.y (unary_expr): Move VA_ARG from here ...
5856         (primary): ... to here.
5857
5858 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
5859
5860         * semantics.c (finish_id_expr): If type is error_mark, return
5861         error_mark.
5862
5863 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
5864
5865         * pt.c (lookup_template_class): Simplify loop exit constructs.
5866         Cope when there is no partial instantiation of a template
5867         template member.
5868
5869 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
5870
5871         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
5872
5873 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
5874
5875         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
5876         prefix.
5877
5878         * pt.c (do_decl_instantiate): Explicitly clone constructors and
5879         destructors that haven't already been cloned.
5880
5881 2000-11-20  Richard Henderson  <rth@redhat.com>
5882
5883         * parse.y (yyparse_1): Rename the parser entry point.
5884
5885 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
5886
5887         * mangle.c (write_name): Use <unscoped-name> for names directly in
5888         function scope.
5889         (write_unscoped_name): Accept names directly in function scope.
5890
5891 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
5892
5893         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
5894         * parse.y (extdef): Add EXPORT reduction.
5895         * spew.c (yylex): Don't skip export here.
5896
5897 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
5898
5899         * decl.c (init_decl_processing): Correct name of pure virtual
5900         function under the new ABI.
5901         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
5902         (throw_bad_typeid): Likewise for bad typeid function.
5903
5904 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
5905
5906         * decl.c (grokparms): Don't even function types of `void' type,
5907         either.
5908         * mangle.c (write_type): Don't crash when confronted with the
5909         error_mark_node.
5910
5911         * decl.c (grokparms): Don't create parameters of `void' type.
5912
5913 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
5914
5915         * lex.c (mark_impl_file_chain): Delete.
5916         (init_parse): Remove call to ggc_add_string_root.  No need to
5917         ggc_strdup a string constant.  Do not add impl_file_chain to GC
5918         roots.
5919         (handle_pragma_implementation): No need to ggc_strdup main_filename.
5920
5921 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
5922
5923         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
5924
5925 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
5926
5927         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
5928         * decl.c (grokdeclarator): Don't reject void parms here.
5929         (require_complete_types_for_parms): Simplify, use
5930         complete_type_or_else.
5931         (grokparms): Remove bitrot. Remove funcdef parm.
5932         Deal with ellipsis parm lists here.
5933         * semantics.c (finish_parmlist): Don't append void_list_node
5934         here. Set PARMLIST_ELLIPSIS_P.
5935
5936 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
5937
5938         * typeck2.c (incomplete_type_error): Reorganise to avoid
5939         excessive diagnostics.
5940
5941 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
5942
5943         * lex.c (struct impl_files, internal_filename): Constify a char *.
5944
5945 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
5946
5947         * mangle.c (write_special_name_constructor): Don't generate
5948         assembler junk when confronted with an old-style constructor.
5949         (write_special_name_destructor): Likewise.
5950         (mangle_decl_string): Do it here instead.
5951
5952 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
5953
5954         * call.c (op_error): Make error messages clearer.
5955
5956 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
5957
5958         * decl.c (wrapup_globals_for_namespace): Don't mark things
5959         TREE_ASM_WRITTEN when they're not.
5960
5961 2000-11-15  Jason Merrill  <jason@redhat.com>
5962
5963         * typeck2.c (friendly_abort): Uncount the error before handing
5964         off to fancy_abort.
5965
5966 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
5967
5968         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
5969
5970 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
5971
5972         * class.c (build_vtbl_initializer): Fix typo in comment.
5973         * typeck.c (expr_sizeof): Don't crash on errors.
5974
5975 2000-11-14  Jim Wilson  <wilson@redhat.com>
5976
5977         * lang-specs.h: Add %2 after %(cc1_options).
5978
5979 2000-11-14  Richard Henderson  <rth@redhat.com>
5980
5981         * typeck.c (c_sizeof): Be strict about casting result value
5982         back to c_size_type_node.
5983         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
5984
5985 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
5986
5987         * typeck.c (build_unary_op): Use boolean_increment from
5988         c-common.c, moving the relevant code there.
5989
5990 2000-11-11  Jason Merrill  <jason@redhat.com>
5991
5992         * typeck.c (mark_addressable): Don't call put_var_into_stack.
5993
5994         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
5995         in inlines.
5996
5997 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5998
5999         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
6000         * lex.c (copy_lang_decl): Likewise.
6001
6002 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
6003
6004         * dump.c (cp_dump_tree): Don't dump function bodies here.
6005
6006         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
6007         (dump.o): Update dependency list.
6008         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
6009         (flag_dump_translation_unit): Likewise.
6010         (CP_TYPE_QUALS): Adjust definition.
6011         (DECL_C_BIT_FIELD): Remove.
6012         (SET_DECL_C_BIT_FIELD): Likewise.
6013         (CLEAR_DECL_C_BIT_FIELD): Likewise.
6014         (add_maybe_template): Likewise.
6015         (strip_array_types): Likewise.
6016         (dump_node_to_file): Likewise.
6017         (cp_dump_tree): New function.
6018         * decl.c (init_decl_processing): Set lang_dump_tree.
6019         * decl2.c (flag_dump_translation_unit): Remove.
6020         * dump.c: Move most of it to ../c-dump.c.
6021         (cp_dump_tree): New function.
6022         * pt.c (add_maybe_template): Remove.
6023         * typeck.c (strip_array_types): Likewise.
6024
6025 2000-11-07  Eric Christopher  <echristo@redhat.com>
6026
6027         * decl.c (init_decl_processing): Change definition of
6028         __wchar_t to wchar_t.  Remove artificial declaration of
6029         wchar_t.
6030         * lex.c: Change instances of __wchar_t to wchar_t.
6031
6032 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
6033
6034         * lex.c (do_identifier): Don't lookup_name for operators.
6035         * parse.y (operator): Save looking_for_typename.
6036         (unoperator): Restore it.
6037         * spew.c (frob_opname): Use nth_token for lookahead.
6038
6039 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
6040
6041         * decl.c (grok_op_properties): Always use coerce_new_type and
6042         coerce_delete_type.
6043         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
6044         exception specification. Tidy up.
6045         (coerce_delete_type): Preserve exception specification. Tidy up.
6046
6047 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
6048
6049         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
6050         (push_binding_level), error.c (cp_tree_printer), pt.c
6051         (process_partial_specialization, tsubst_template_arg_vector),
6052         search.c (lookup_member): Use memset () instead of bzero ().
6053
6054 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
6055
6056         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
6057
6058 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
6059
6060         * Make-lang.in (c++.distdir): Remove.
6061
6062 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
6063
6064         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
6065         declarations from different namespaces to be combined.
6066
6067 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
6068
6069         * decl.c: Include tm_p.h.
6070
6071 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
6072
6073         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
6074
6075 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
6076
6077         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
6078         (build_overload_value), repo.c (open_repo_file), xref.c
6079         (open_xref_file): Use strchr () and strrchr () instead of index ()
6080         and rindex ().
6081
6082 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
6083
6084         * call.c (build_over_call): Call fold on the CALL_EXPR.
6085
6086 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
6087
6088         * error.c (dump_template_decl): Separate template hearders with
6089         space not comma.
6090
6091 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
6092
6093         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
6094         TS_* flags with corresponding TFF_*.  Adjust prototypes of
6095         functions (which used to take a tree_string_flags) to take an int.
6096
6097         * cp-tree.h (enum tree_string_flags): Remove
6098         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
6099         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
6100         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
6101         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
6102         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
6103         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
6104         (type_as_string, decl_as_string, expr_as_string,
6105         context_as_string): Adjust prototype.
6106
6107         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
6108         instead of TS_PLAIN.
6109
6110         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
6111         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
6112         plain `0'.
6113
6114 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
6115
6116         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
6117         (linkage_kind): New enumeration.
6118         (decl_linkage): New function.
6119         * decl2.c (comdat_linkage): Extend comment.
6120         * error.c (dump_function_decl): Print the arguments used to
6121         instantiate a template, even when not printing the type of the
6122         function.
6123         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
6124         not TREE_PUBLIC, to test for external linkage.
6125         * tree.c (decl_linkage): New function.
6126
6127 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
6128
6129         * pt.c (instantiate_decl): Always instantiate static data members
6130         initialized in-class.
6131
6132 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
6133
6134         * Make-lang.in: Move all build rules here from Makefile.in,
6135         adapt to new context.  Wrap all rules that change the current
6136         directory in parentheses.  Expunge all references to $(P).
6137         When one command depends on another and they're run all at
6138         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
6139         all object-file generation rules.  Delete obsolete variables.
6140
6141         * Makefile.in: Delete.
6142         * config-lang.in: Delete outputs= line.
6143
6144 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
6145
6146         * error.c (dump_function_decl): Print no space between
6147         `ptr-operator' the `type-specifier' of the return type.
6148         (dump_type_prefix): Make sure we put space at the appropriate
6149         place.
6150
6151 2000-10-23  Jason Merrill  <jason@redhat.com>
6152
6153         * call.c (equal_functions): Also call decls_match for extern "C" fns.
6154
6155 2000-10-22  Jason Merrill  <jason@redhat.com>
6156
6157         * call.c (build_conditional_expr): Use ocp_convert to force
6158         rvalue conversion.
6159
6160 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
6161
6162         * call.c (standard_conversion): Use RVALUE_CONVs for all
6163         expressions that satisfy lvalue_p, not just those that satisfy
6164         real_lvalue_p.
6165
6166         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
6167
6168         * typeck.c (c_sizeof): Return an expression of `size_t' type,
6169         not one with TYPE_IS_SIZETYPE set.
6170         (dubious_conversion_warnings): Remove special-case code.
6171
6172 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
6173
6174         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
6175         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
6176         (dump_type_prefix): Print vector-of-int as 'int vector'.
6177         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
6178         * tree.c (walk_tree): Handle VECTOR_TYPE.
6179
6180         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
6181
6182 2000-10-21  Jason Merrill  <jason@redhat.com>
6183
6184         * parse.y (operator): Set got_object from got_scope.
6185         Set looking_for_typename.
6186         * decl.c (lookup_name_real): Clear val after setting from_obj.
6187         Reorganize diagnostic.
6188
6189 2000-10-20  Jason Merrill  <jason@redhat.com>
6190
6191         * tree.c (walk_tree): Don't walk into default args.
6192
6193         * error.c (dump_expr): Use host_integerp.
6194
6195 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
6196
6197         * typeck2.c (abstract_virtuals_error): Use "because" instead of
6198         "since" in error message.
6199
6200 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6201
6202         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
6203
6204 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
6205
6206         * decl.c (revert_static_member_fn): Fixed typo.
6207
6208 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
6209
6210         * class.c (subobject_offset_fn): New type.
6211         (dfs_record_base_offsets): Remove.
6212         (record_base_offsets): Likewise.
6213         (dfs_search_base_offsets): Likewise.
6214         (record_subobject_offset): New function.
6215         (check_subobject_offset): Likewise.
6216         (walk_subobject_offsets): Likewise.
6217         (record_subobject_offsets): Likewise.
6218         (layout_conflict_p): Reimplement.
6219         (layout_nonempty_base_or_field): Correct handling of type
6220         conflicts during layout.
6221         (layout_empty_base): Likewise.
6222         (build_base_field): Adjust to handle new representation of empty
6223         base offset table.
6224         (build_base_fields): Likewise.
6225         (layout_virtual_bases): Likewise.
6226         (splay_tree_compare_integer_csts): New function.
6227         (layout_class_type): Use a splay_tree, rather than a varray, to
6228         represent the offsets of empty bases.
6229
6230         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
6231         * decl.c (select_decl): Don't return declarations that are
6232         DECL_ANTICIPATED.
6233
6234 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
6235
6236         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
6237         (fake_std_node): New macro.
6238         * decl.c (in_std): Rename to ...
6239         (in_fake_std): ... this.
6240         (flag_no_builtin): Remove.
6241         (flag_no_nonansi_builtin): Likewise.
6242         (walk_namespaces_r): Use fake_std_node.
6243         (push_namespace): Use std_identifier.
6244         (pop_namespace): Use in_fake_std.
6245         (lookup_name_real): Use fake_std_node.
6246         (init_decl_processing): When -fhonor-std, create the `std'
6247         namespace.  Don't create a dummy fake_std_node in that case.
6248         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
6249         (builtin_function): Put builtins whose names don't begin
6250         with `_' in the std namespace.
6251         * decl2.c (flag_no_builtin): Remove.
6252         (flag_no_nonansi_builtin): Likewise.
6253         (set_decl_namespace): Use fake_std_node.
6254         (validate_nonmember_using_decl): Likewise.
6255         (do_using_directive): Likewise.
6256         (handle_class_head): Likewise.
6257         * dump.c (dequeue_and_dump): Likewise.
6258         * except.c (init_exception_processing): Use std_identifier.
6259         * init.c (build_member_call): Use fake_std_node.
6260         * rtti.c (init_rtti_processing): Use std_identifier.
6261
6262 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
6263
6264         * cp-tree.h (back_end_hook): Remove declaration.
6265         * decl2.c (back_end_hook): Remove definition.
6266
6267         * dump.c (dequeue_and_dump): Dump TREE_USED.
6268
6269 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
6270
6271         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
6272
6273 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
6274
6275         * decl.c (WINT_TYPE): Define.
6276         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
6277         c_size_type_node, signed_size_type_node and wint_type_node.
6278
6279 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
6280
6281         * decl2.c (warn_missing_format_attribute): New variable.
6282         (lang_decode_option): Decode -Wmissing-format-attribute.
6283
6284 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
6285
6286         * typeck.c (qualify_type): Remove.
6287         (composite_pointer_type): Fix handling of conversions to `cv void*'.
6288
6289 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6290
6291         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
6292
6293 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6294
6295         * Makefile.in (parse.c, parse.h): Create atomically.
6296
6297 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
6298
6299         * class.c (current_obstack): Remove.
6300         * decl.c (ggc_p): Remove.
6301         (start_decl): Don't use decl_tree_cons.
6302         (grokdeclarator): Don't use build_decl_list.
6303         (start_function): Don't use decl_tree_cons.
6304         (finish_function): Don't mess with obstacks.
6305         * decl2.c (grok_x_components): Don't use build_decl_list.
6306         * lex.c (make_call_declarator): Don't call decl_tree_cons.
6307         (implicitly_declare_fn): Don't call build_decl_list.
6308         * parse.y (frob_specs): Don't call build_decl_list or
6309         decl_tree_cons.
6310         (expr_or_declarator_intern): Don't call decl_tree_cons.
6311         (primary): Don't call build_decl_list.
6312         (fcast_or_absdcl): Likewise.
6313         (typed_declspecs): Don't call decl_tree_cons.
6314         (reserved_declspecs): Don't call build_decl_list.
6315         (declmods): Likewise.
6316         (reserved_typespecquals): Likewise.
6317         (aggr): Likewise.
6318         (new_type_id): Likewise.
6319         (cv_qualifiers): Likewise.
6320         (after_type_declarator_intern): Likewise.
6321         (notype_declarator_intern): Likewise.
6322         (absdcl_intern): Likewise.
6323         (named_parm): Likewise.
6324         * pt.c (most_specialized_class): Likewise.
6325         * repo.c (temporary_obstack): Make it a structure, not a pointer.
6326         (init_repo): Initialize it.
6327         * search.c (current_obstack): Remove.
6328         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
6329
6330 2000-10-09  Richard Henderson  <rth@cygnus.com>
6331
6332         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
6333         (c++ language support bits for libgcc): Remove.
6334         (c++.clean): Remove cplib2.txt cleanup.
6335         * config-lang.in (headers, lib2funcs): Remove.
6336
6337         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
6338         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
6339         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
6340         * inc/new.h, inc/typeinfo: Remove files.
6341
6342 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
6343
6344         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
6345         defined.
6346         (init_decl_processing): Initialize intmax_type_node and
6347         uintmax_type_node.
6348
6349 2000-10-06  Richard Henderson  <rth@cygnus.com>
6350
6351         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
6352         (original_result_rtx): Remove.
6353         * decl.c (save_function_data): Don't clear x_result_rtx.
6354         (mark_lang_function): Don't mark it either.
6355         * expr.c (fixup_result_decl): Remove.
6356         * semantics.c (genrtl_named_return_value): Frob the return decl
6357         before calling emit_local_var.
6358         (genrtl_finish_function): Don't call fixup_result_decl.
6359         Always emit the jump to return_label.
6360
6361 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
6362
6363         * pt.c (lookup_template_class): Set current access for enum.
6364         (tsubst_enum): Set file & line for enum decl.
6365
6366         * spew.c (yylex): Remove unused variable.
6367
6368 2000-10-05  Richard Henderson  <rth@cygnus.com>
6369
6370         * semantics.c (genrtl_finish_function): Don't init or check
6371         can_reach_end; remove noreturn and return value checks.
6372
6373 2000-10-05  Tom Tromey  <tromey@cygnus.com>
6374
6375         * init.c (build_java_class_ref): Use `build_static_name' with a
6376         suffix, not a prefix, to build the class object's name.
6377
6378 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
6379
6380         * cp-tree.h (access_kind): Fix comment typo.
6381         * decl2.c (grokfield): Fix diagnostic typo.
6382         * semantics.c (finish_template_type): Fix comment typo.
6383         (finish_qualified_object_call_expr): Likewise.
6384
6385 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
6386
6387         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
6388         tsubsting fails.
6389
6390 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
6391
6392         * spew.c (frob_id): New static function.
6393         (frob_opname): Use it.
6394         (yylex): Use it.
6395
6396 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
6397
6398         * decl.c (lang_mark_false_label_stack): Remove.
6399         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
6400
6401 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
6402
6403         * gxxint.texi: Use @email for formatting email addresses.
6404
6405 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
6406
6407         * error.c: Remove direct obstack manipulation.  Replace with
6408         output_buffer-based formatting.  Adjust calls to removed macros.
6409         (obstack_chunk_alloc, obstack_chunk_free): Remove.
6410         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
6411         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
6412
6413 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
6414
6415         * ir.texi: Move to ../c-tree.texi.
6416
6417 2000-09-20  Jason Merrill  <jason@redhat.com>
6418
6419         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
6420
6421 2000-09-21  Andreas Jaeger  <aj@suse.de>
6422
6423         * errfn.c: Move declaration of cp_printer and cp_printers to ...
6424         * cp-tree.h: ... here.
6425
6426         * error.c: Remove declaration of cp_printer.
6427
6428 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
6429
6430         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
6431
6432 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
6433
6434         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
6435         users.
6436
6437 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
6438
6439         * decl.c (start_function): Robustify.
6440
6441 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6442
6443         * cp-tree.h (check_function_format): Accept a `status' parameter.
6444
6445         * call.c, typeck.c: Updates calls to `check_function_format'.
6446
6447 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
6448
6449         * decl2.c (handle_class_head): Always push some scope even
6450         in the error case.
6451
6452 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
6453
6454         * cp-tree.h (struct cp_language_function): Remove
6455         x_scope_stmt_stack and name_declared.
6456         (current_scope_stmt_stack): Remove.
6457         (function_name_declared_p): New macro.
6458         (struct lang_decl_flags): Use c_lang_decl as a base class.
6459         (context): Remove.
6460         (struct lang_decl): Replace saved_tree with context.
6461         (DECL_FRIEND_CONTEXT): Adjust accordingly.
6462         (SET_DECL_FRIEND_CONTEXT): Likewise.
6463         (DECL_VIRTUAL_CONTEXT): Likewise.
6464         (DECL_SAVED_TREE): Remove.
6465         (C_DECLARED_LABEL_FLAG): Likewise.
6466         (cplus_expand_expr_stmt): Don't declare.
6467         (add_decl_stmt): Likewise.
6468         (add_scope_stmt): Likewise.
6469         * decl.c (mark_stmt_tree): Remove.
6470         (case_compare): Likewise.
6471         (finish_case_label): Use c_add_case_label.
6472         (init_decl_processing): Set more language-specific hooks.
6473         (build_enumerator): Fix typo in comment.
6474         (cplus_expand_expr_stmt): Remove.
6475         (mark_lang_function): Use mark_c_language_function.
6476         (lang_mark_tree): Use c_mark_lang_decl.
6477         * decl2.c: Change order of inclusion.
6478         * except.c: Likewise.
6479         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
6480         back on c_expand_expr.
6481         * friend.c: Include expr.h.
6482         * init.c: Change order of inclusion.
6483         * Makefile.in: Update dependencies.
6484         * lex.h (free_lang_decl_chain): Remove.
6485         * optimize.c (maybe_clone_body): Use function_name_declared_p.
6486         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
6487         it doesn't exist.
6488         (instantiate_decl): Use function_name_declared_p.
6489         * semantics.c (lang_expand_expr_stmt): Remove.
6490         (set_current_function_name_declared): Likewise.
6491         (current_function_name_declared): Likewise.
6492         (begin_compound_stmt): Use function_name_declared_p.
6493         (add_decl_stmt): Remove.
6494         (setup_vtbl_ptr): Use function_name_declared_p.
6495         (add_scope_stmt): Remove.
6496         (current_scope_stmt_stack): New function.
6497         (cp_expand_stmt): Don't handle SCOPE_STMTs.
6498         (expand_body): Use function_name_declared_p.
6499         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
6500         * typeck.c: Change order of includes.
6501         (convert_sequence): Remove.
6502
6503 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
6504
6505         * lex.c (reswords): Add _Complex.
6506
6507 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6508
6509         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
6510
6511 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
6512
6513         * init.c (begin_init_stmts): Don't use // comments.
6514
6515 2000-09-12  Jason Merrill  <jason@redhat.com>
6516
6517         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
6518         all non-extern arrays.
6519
6520         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
6521         typenames, too.  Downgrade complaint to pedwarn.
6522         (xref_tag): Warn about surprising behavior of 'friend struct T'.
6523         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
6524         'class This::Inherited'.
6525
6526 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
6527
6528         * decl.c (finish_case_label): Given the LABEL_DECL a
6529         DECL_CONTEXT.
6530
6531 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
6532
6533         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
6534         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
6535         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
6536         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
6537         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
6538         New macros.
6539         (sorry_for_unsupported_tree, print_scope_operator,
6540         print_left_paren, print_right_paren, print_left_bracket,
6541         print_right_bracket, print_whitespace): Likewise.
6542         (aggr_variety): Rename to class_key_or_enum.
6543         (print_type): Rename to print_type_id.
6544         (print_type_specifier_seq, print_simple_type_specifier,
6545         print_elaborated_type_specifier,
6546         print_rest_of_abstract_declarator,
6547         print_parameter_declaration_clause, print_exception_specification,
6548         print_nested_name_specifier, print_template_id,
6549         typedef_original_name,  print_template_argument_list_start,
6550         print_template_argument_list_end): New functions.
6551
6552 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
6553
6554         * ir.texi: Add more documentation.
6555
6556 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
6557
6558         * cp-tree.h (struct saved_scope): Remove x_function_parms.
6559         (current_function_parms): Don't define.
6560         (struct cp_language_function): Remove parms_stored.
6561         (current_function_just_assigned_this): Don't define.
6562         (current_function_parms_stored): Likewise.
6563         (static_ctors): Declare.
6564         (static_dtors): Likewise.
6565         (SF_EXPAND): Don't define.
6566         (expand_start_early_try_stmts): Remove declaration.
6567         (store_parm_decls): Likewise.
6568         * decl.c (static_ctors): Don't declare.
6569         (static_dtors): Likewise.
6570         (struct binding_level): Remove this_block.
6571         (poplevel): Remove dead code.
6572         (set_block): Likewise.
6573         (mark_binding_level): Don't mark this_block.
6574         (mark_saved_scope): Don't mark x_function_parms.
6575         (init_decl_processing): Don't add current_function_parms as a GC
6576         root.
6577         (check_function_type): Change prototype.
6578         (start_function): Remove RTL-generation code.
6579         (expand_start_early_try_stmts): Remove.
6580         (store_parm_decls): Give it internal linkage.  Remove
6581         RTL-generation code.
6582         (finish_function): Remove RTL-generation code.
6583         * decl2.c (static_ctors): Fix formatting.
6584         (static_dtors): Likewise.
6585         * method.c (use_thunk): Don't call store_parm_decls.
6586         (synthesize_method): Likewise.
6587         * optimize.c (maybe_clone_body): Likewise.
6588         * parse.y (fn.def2): Likewise.
6589         (.set_base_init): Likewise.
6590         (nodecls): Likewise.
6591         * pt.c (instantiate_decl): Likewise.
6592         * rtti.c (synthesize_tinfo_fn): Likewise.
6593         * semantics.c (genrtl_try_block): Simplify.
6594         (expand_body): Use genrtl_start_function and
6595         genrtl_finish_function.
6596         (genrtl_start_function): New function.
6597         (genrtl_finish_function): Likewise.
6598
6599 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
6600
6601         * error.c (cp_tree_printer, case 'P'): Append break.
6602
6603 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
6604
6605         * cp-tree.h (frob_opname): Declare.
6606         * parse.y (saved_scopes): New static variable.
6607         (cp_parse_init): Adjust.
6608         (do_id): If lastiddecl is NULL, do do_identifier.
6609         (operator): Save scope information.
6610         (unoperator): New reduction. Restore scope information.
6611         (operator_name): Append unoperator. Call frob_opname.
6612         * spew.c (frob_opname): Define.
6613
6614 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
6615
6616         * decl.c, rtti.c: Include defaults.h if not already included.
6617         Don't define the *_TYPE_SIZE macros.
6618
6619 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
6620
6621         * cp-tree.h (push_switch): Change prototype.
6622         (check_cp_case_value): Remove declaration.
6623         (decl_constant_value): Likewise.
6624         * decl.c (struct cp_switch): Add switch_stmt and cases.
6625         (case_compare): New function.
6626         (push_switch): Set switch_stmt.  Initialize cases.
6627         (pop_switch): Clean up cases.
6628         (define_case_label): Rename to ...
6629         (finish_case_label): ... this.  Do semantic analysis for case
6630         labels here.
6631         (start_function): Correct comment.
6632         * decl2.c (check_cp_case_value): Remove.
6633         * expr.c (do_case): Remove.
6634         * pt.c (tsubst_expr): Adjust call to finish_case_label.
6635         * semantics.c (genrtl_do_poplevel): Remove declaration.
6636         (RECHAIN_STMTS): Remove.
6637         (finish_break_stmt): Use build_break_stmt.
6638         (finish_continue_stmt): Use build_continue_stmt.
6639         (finish_switch_cond): Adjust condition here, rater than in
6640         c_expand_start_case.
6641         (finish_case_label): Remove.
6642         * typeck.c (c_expand_return): Remove.
6643         (c_expand_start_case): Likewise.
6644
6645 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
6646
6647         * ir.texi: Document type nodes.
6648
6649 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
6650
6651         * cp-tree.h (init_cp_semantics): Declare.
6652         (genrtl_try_block): Don't declare.
6653         (genrtl_handler): Likewise.
6654         (genrtl_catch_block): Likewise.
6655         (genrtl_ctor_stmt): Likewise.
6656         (genrtl_subobject): Likewise.
6657         (genrtl_do_poplevel): Likewise.
6658         (genrtl_named_return_value): Likewise.
6659         * lex.c (init_parse): Call init_cp_semantics.
6660         * semantics.c (genrtl_try_block): Give it internal linkage.
6661         (genrtl_handler): Likewise.
6662         (genrtl_catch_block): Likewise.
6663         (genrtl_ctor_stmt): Likewise.
6664         (genrtl_subobject): Likewise.
6665         (genrtl_do_poplevel): Likewise.
6666         (genrtl_named_return_value): Likewise.
6667         (lang_expand_stmt): Rename to ...
6668         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
6669         (init_cp_semantics): Define.
6670
6671         * decl.c (initialize_local_var): Remove RTL-generating code.
6672         * semantics.c (genrtl_try_block): Fix formatting.
6673
6674         Move statement-tree facilities from C++ to C front-end.
6675         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
6676         (void_zero_node): Remove.
6677         (stmt_tree): Likewise.
6678         (scope_chain): Adjust.
6679         (language_function): Rename to cp_language_function.
6680         (cp_function_chain): Adjust.
6681         (current_stmt_tree): Remove.
6682         (last_tree): Likewise.
6683         (last_expr_type): Likewise.
6684         (struct lang_decl): Adjust.
6685         (STMT_IS_FULL_EXPR_P): Remove.
6686         (add_tree): Remove.
6687         (begin_stmt_tree): Likewise.
6688         (finish_stmt_tree): Likewise.
6689         (walk_tree_fn): Likewise.
6690         (walk_stmt_tree): Likewise.
6691         * class.c (finish_struct): Replace use of add_tree with add_stmt.
6692         * decl.c (mark_stmt_tree): Adjust type.
6693         (init_decl_processing): Don't build void_zero_node.
6694         (initialize_local_var): Adjust usage of current_stmt_tree.
6695         (finish_enum): Use add_stmt, not add_tree.
6696         (save_function_data): Adjust use of language_function.
6697         (finish_constructor_body): Use add_stmt, not add_tree.
6698         (finish_destructor_body): Likewise.
6699         (push_cp_function_context): Adjust use of language_function.
6700         (pop_cp_function_context): Likewise.
6701         (mark_lang_function): Likewise.
6702         (mark_cp_function_context): Likewise.
6703         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
6704         (build_vec_init): Likewise.
6705         * semantics.c (SET_LAST_STMT): Remove.
6706         (RECHAIN_STMTS): Don't use it.
6707         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
6708         (current_stmt_tree): Define.
6709         (add_tree): Remove.
6710         (finish_goto_stmt): Use add_stmt, not add_tree.
6711         (finish_expr_stmt): Likewise.
6712         (begin_if_stmt): Likewise.
6713         (finish_then_clause): Likewise.
6714         (begin_while_stmt): Likewise.
6715         (begin_do_stmt): Likewise.
6716         (finish_return_stmt): Likewise.
6717         (begin_for_stmt): Likewise.
6718         (finish_break_stmt): Likewise.
6719         (finish_continue_stmt): Likewise.
6720         (begin_switch_stmt): Likewise.
6721         (finish_case_label): Likewise.
6722         (begin_try_block): Likewise.
6723         (begin_function_try_block): Likewise.
6724         (begin_handler): Likewise.
6725         (begin_catch_block): Likewise.
6726         (begin_compound_stmt): Likewise.
6727         (begin_asm_stmt): Likewise.
6728         (finish_asm_stmt): Likewise.
6729         (finish_label_stmt): Likewise.
6730         (add_decl_stmt): Likewise.
6731         (finish_subobject): Likewise.
6732         (finish_decl_cleanup): Likewise.
6733         (finish_named_return_value): Likewise.
6734         (setup_vtbl_ptr): Likewise.
6735         (add_scope_stmt): Likewise.
6736         (finish_stmt_expr): Likewise.
6737         (prune_unused_decls): Remove.
6738         (begin_stmt_tree): Likewise.
6739         (finish_stmt_tree): Likewise.
6740         (prep_stmt): Adjust use of current_stmt_tree.
6741         (lang_expand_stmt): Likewise.
6742         * tree.c (statement_code_p): Remove.
6743         (cp_statement_code_p): New function.
6744         (walk_stmt_tree): Remove.
6745         (init_tree): Set lang_statement_code_p.
6746
6747 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
6748
6749         Integrated preprocessor.
6750
6751         * Make-lang.in, Makefile.in: Remove all references to input.c,
6752         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
6753         * gxx.gperf, hash.h, input.c: Delete.
6754         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
6755         initialized properly.
6756
6757         * class.c (fixup_pending_inline): Take a tree, not a
6758         struct pending_inline *.  All callers changed.
6759         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
6760         RID_PROTECTED entries in ridpointers[] array here.
6761         * decl.c (duplicate_decls): Do not refer to struct
6762         pending_inline.
6763         (record_builtin_type, init_decl_processing): Use RID_MAX not
6764         CP_RID_MAX.
6765         (grokdeclarator): Use C_IS_RESERVED_WORD.
6766         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
6767         cpplib.
6768         (grok_x_components): Do not inspect pending_inlines chain.
6769
6770         * cp-tree.h (struct lang_identifier): Add rid_code entry.
6771         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
6772         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
6773         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
6774         TIME_IDENTIFIER_FILEINFO): Kill.
6775         Update prototypes.
6776         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
6777         single 32-bit word.
6778         * parse.y: Call do_pending_inlines unconditionally.
6779         reinit_parse_for_method is now snarf_method.  fn.defpen is no
6780         longer necessary.  Remove unnecessary <itype> annotation on
6781         SCOPE.  Do not refer to end_of_file or struct pending_inline.
6782         * semantics.c (begin_inline_definitions): Call
6783         do_pending_inlines unconditionally.
6784
6785         * lex.c: Remove all code now shared with C front end.
6786         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
6787         into the get_identifier table.  Rewrite pragma handling to
6788         work with the registry.  Move code to save tokens for later
6789         processing to spew.c.
6790
6791         * spew.c: Rewrite everything in terms of token streams instead
6792         of text.  Move routines here from lex.c / input.c as
6793         appropriate.  GC-mark trees hanging off the pending inlines
6794         chain.
6795
6796 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
6797
6798         * NEWS: Mention that the named return value extension has been
6799         deprecated.
6800         * cp-tree.h (original_result_rtx): Define.
6801         (TREE_REFERENCE_EXPR): Remove.
6802         (DECL_VPARENT): Likewise.
6803         (pushdecl_nonclass_level): Likewise.
6804         (store_return_init): Likewise.
6805         (reinit_lang_specific): Likewise.
6806         (genrtl_named_return_value): Change prototype.
6807         * decl.c (original_result_rtx): Remove.
6808         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
6809         Do not generate RTL for local variables here.
6810         (store_return_init): Remove.
6811         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
6812         store_return_init.
6813         (finish_named_return_value): Adjust accordingly.  Warn that this
6814         extension is deprecated.
6815         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
6816
6817 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6818
6819         * pt.c (type_unification_real): Replace switch with if.
6820         (unify): Tsubst non-type parms before comparing.
6821
6822 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6823
6824         * error.c (dump_typename): New function, broken out of ...
6825         (dump_type): ... here. Use it.
6826         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
6827
6828 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6829
6830         * init.c (build_offset_ref): Deal with namespace scoped
6831         TEMPLATE_ID_EXPRs.
6832
6833 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6834
6835         * class.c (resolve_address_of_overloaded_function): Add
6836         explanation message.
6837         * decl.c (define_case_label): Reformat explanation.
6838         * decl2.c (finish_static_data_member_decl): Likewise.
6839         (grokfield): Likewise.
6840         * friend.c (do_friend): Likewise.
6841
6842 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
6843
6844         * tree.c (walk_tree): Expose tail recursion.
6845         (walk_stmt_tree): New function.
6846         * cp-tree.h: Prototype walk_stmt_tree.
6847         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
6848         the BLOCKs directly.  If a BLOCK has no variables after
6849         pruning, discard it.
6850         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
6851         restore the line number.
6852
6853 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
6854
6855         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
6856         (pt.o): Remove dependency on HTAB_H.
6857         * cp-tree.h: Include hashtab.h.
6858         (walk_tree): Change prototype.
6859         (walk_tree_without_duplicates): New function.
6860         * decl.c (check_default_argument): Use it.
6861         * optimize.c (remap_decl): Adjust calls to walk_tree.
6862         (copy_body): Likewise.
6863         (expand_calls_inline): Likewise.
6864         (calls_setjmp_p): Use walk_tree_without_duplicates.
6865         * pt.c: Don't include hashtab.h.
6866         (for_each_template_parm): Use walk_tree_without_duplicates.
6867         * semantics.c (finish-stmt_tree): Likewise.
6868         (expand_body): Likewise.
6869         * tree.c (walk_tree): Add additional parameter.
6870         (walk_tree_without_duplicates): New function.
6871         (count_trees): Use it.
6872         (verify_stmt_tree): Adjust call to walk_tree.
6873         (find_tree): Use walk_tree_without_duplicates.
6874         (no_linkage_check): Likewise.
6875         (break_out_target_exprs): Adjust call to walk_tree.
6876         (cp_unsave): Likewise.
6877
6878 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6879
6880         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
6881         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
6882         * cp-tree.h (TYPE_BINFO): Adjust comment.
6883         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
6884         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
6885         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
6886         (TYPE_TEMPLATE_INFO): Likewise.
6887         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
6888         * class.c (push_nested_class): Likewise.
6889         * decl.c (lookup_name_real): Likewise.
6890         (grokdeclarator): Likewise.
6891         (grok_op_properties): Likewise.
6892         (xref_tag): Likewise.
6893         (xref_basetypes): Likewise.
6894         * decl2.c (constructor_name_full): Likewise.
6895         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
6896         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
6897         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
6898         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6899         (dump_type_suffix): Likewise.
6900         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
6901         instead.
6902         (get_aggr_from_typedef): Likewise.
6903         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
6904         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6905         (write_template_parm): Likewise.
6906         (write_template_template_parm): Check tree code instead of
6907         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6908         * method.c (build_overload_nested_name): Add
6909         BOUND_TEMPLATE_TEMPLATE_PARM.
6910         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
6911         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6912         * pt.c (convert_template_argument): Check tree code instead of
6913         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6914         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
6915         (for_each_template_parm): Adjust comment.
6916         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
6917         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6918         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
6919         template_args_equal to compare template template parameter cases.
6920         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6921         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
6922         instead.
6923         * tree.c (copy_template_template_parm): Decide whether to create
6924         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
6925         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6926         (copy_tree_r): Likewise.
6927         * typeck.c (comptypes): Likewise.  Check tree code instead of
6928         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6929
6930 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
6931
6932         * decl.c (finish_function): Move the code for handling functions
6933         marked with the constructor and destructor attributes inside the
6934         expand_p block.
6935
6936 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
6937
6938         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
6939
6940 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
6941
6942         * pt.c (lookup_template_class): Remove abort.
6943         * tree.c (get_type_decl): Allow error_mark_node.
6944
6945 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
6946
6947         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
6948         TEMPLATE_ID_EXPRs.
6949
6950 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
6951
6952         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
6953         new ABI mangling.
6954
6955 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
6956
6957         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
6958         union tag mismatch error reporting.
6959
6960 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
6961
6962         * call.c (build_scoped_method_call): Check it is not a namespace.
6963
6964 2000-08-30  Jason Merrill  <jason@redhat.com>
6965
6966         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
6967
6968         * tree.c (bot_manip): Check TREE_CONSTANT rather than
6969         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
6970         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
6971
6972         * decl.c (start_function): Always call make_function_rtl.
6973
6974 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
6975
6976         * semantics.c (prune_unused_decls): New function.
6977         (finish_stmt_tree): Call it via walk_tree.
6978
6979 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
6980
6981         * class.c (build_secondary_vtable): Constify a char *.
6982         * decl.c (init_decl_processing): Initialize function_id_node,
6983         pretty_function_id_node, and func_id_node.
6984         * input.c (struct input_source): Constify 'str'.
6985         (feed_input): Constify first argument.
6986         * mangle.c (write_identifier): Constify argument.
6987         * pt.c (mangle_class_name_for_template): Constify argument.
6988
6989 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
6990
6991         * typeck.c (mark_addressable): Remove code that pokes around in
6992         RTL.
6993
6994 2000-08-28  Jason Merrill  <jason@redhat.com>
6995
6996         * lex.c (file_name_nondirectory): Move to toplev.c.
6997
6998         * cp-tree.h (LOCAL_CLASS_P): New macro.
6999         * class.c (finish_struct_1): Use it.
7000
7001 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
7002
7003         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
7004         (write_encoding): Pass another argument to write_name.
7005         (write_name): Add ignore_local_scope parameter.  Fix handling of
7006         local names.
7007         (write_nested_name): Use write_unqualified_name.
7008         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
7009         (write_template_prefix): Use write_unqualified_name.
7010         (write_component): Remove.
7011         (write_local_name): Add parameter.  Use direct local entity to
7012         discriminator calculation.
7013         (write_class_enum_type): Pass another argument to write_name.
7014         (write_template_template_arg): Likewise.
7015         (make_guard_variable): Likewise.
7016
7017 2000-08-27  Jason Merrill  <jason@redhat.com>
7018
7019         * decl.c (pushdecl): Matching decls for local externs are found in
7020         the current level.  Propagate linkage information from previous
7021         declarations.
7022
7023 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
7024
7025         * ir.texi (Expressions): Fix typo.
7026
7027 2000-08-25  Greg McGary  <greg@mcgary.org>
7028
7029         * tree.c (init_tree): Use ARRAY_SIZE.
7030
7031 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
7032
7033         * error.c (cp_tree_printer): Rework.
7034
7035 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
7036
7037         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
7038         dyn-string.o.
7039         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
7040         (cp-demangle.o): Remove target.
7041         (dyn-string.o): Likewise.
7042
7043         * decl.c (grokfndecl): Require that `main' return an `int'.
7044         * mangle.c (write_encoding): Don't mangle return types for
7045         conversion functions.
7046
7047 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
7048
7049         * error.c (tree_formatting_info): New data type.
7050         (tree_being_formatted): New macro.
7051         (tree_formatting_flags): Likewise.
7052         (put_whitespace): Likewise.
7053         (print_tree_identifier): Likewise.
7054         (print_identifier): Likewise.
7055         (cp_tree_printer, print_function_argument_list, print_declaration,
7056         print_expression, print_function_declaration,
7057         print_function_parameter, print_type, print_cv_qualifier): New
7058         functions.
7059         (init_error): Initialize lang_printer.
7060
7061 2000-08-24  Jason Merrill  <jason@redhat.com>
7062
7063         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
7064         adjustment necessary.
7065
7066 2000-08-24  Greg McGary  <greg@mcgary.org>
7067
7068         * cp-tree.h (MAIN_NAME_P): Remove macro.
7069
7070 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
7071
7072         * error.c (print_instantiation_context): Don't forget to flush the
7073         buffer.
7074
7075 2000-08-23  Jason Merrill  <jason@redhat.com>
7076
7077         * typeck.c (build_ptrmemfunc): Save the input pmf.
7078
7079         * method.c (process_modifiers): Use same_type_p.
7080
7081 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
7082
7083         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
7084         * mangle.c (write_function_type): Change prototype.
7085         (write_encoding): Don't mangle return types for
7086         constructors or destructors.
7087         (write_type): Adjust call to write_function_type.
7088         * pt.c (instantiate_template): Instantiate alternate entry points
7089         when instantiating the main function.
7090
7091 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
7092
7093         * error.c (cp_print_error_function): Don't use embedded '\n' in
7094         output_printf.
7095
7096 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
7097
7098         * decl.c (init_decl_processing): Remove bogus initialization.
7099         * error.c (lang_print_error_function): Restore here.
7100         (init_error): Initialize print_error_function.
7101
7102 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
7103
7104         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
7105
7106 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
7107
7108         * Makefile.in (error.o): Depends on diagnostic.h
7109
7110         * cp-tree.h (problematic_instantiation_changed,
7111         record_last_problematic_instantiation, current_instantiation,
7112         print_instantiation_context): Declare.
7113         (maybe_print_template_context): Remove.
7114
7115         * decl.c (init_decl_processing): Set print_error_function to NULL.
7116         (lang_print_error_function): Remove, since we're using a new
7117         machinery.
7118
7119         * error.c: #include diagnostic.h
7120         (function_category): New function.
7121         (cp_diagnostic_starter): Likewise.
7122         (cp_diagnostic_finalizer): Likewise.
7123         (cp_print_error_function): Likewise.
7124         (maybe_print_instantiation_context): Likewise.
7125         (print_instantiation_full_context): Likewise.
7126         (print_instantiation_partial_context): Likewise.
7127         (print_instantiation_context): Define.
7128         (init_error): Initialize diagnostic pager and finalizer.
7129
7130         * pt.c (problematic_instantiation_changed): Define.
7131         (record_last_problematic_instantiation): Likewise.
7132         (current_instantiation): Likewise.
7133         (maybe_print_template_context): Remove.
7134         (print_template_context): Likewise.
7135         (current_tinst_level): Make static to reflect Brendan Kehoe's
7136         change of 1995-04-13.
7137         (push_tinst_level): Call print_instantiation_context.
7138
7139 2000-08-21  Nix  <nix@esperi.demon.co.uk>
7140
7141         * lang-specs.h: Do not process -o or run the assembler if
7142         -fsyntax-only.
7143
7144 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
7145
7146         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
7147         variables.
7148         * decl2.c (lang_decode_option): Disable gettext attributes for
7149         -ansi.
7150
7151 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
7152
7153         * lex.c (lang_init_options): Default diagnostic message maximum
7154         length to 80, when line-wrapping.
7155
7156 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
7157
7158         * class.c (build_vtbl_initializer): Clear the entire
7159         vtbl_init_data.  Start keeping track of the functions for which we
7160         have created vcall offsets here.
7161         (dfs_build_vcall_offset_vtbl_entries): Remove.
7162         (build_vcall_offset_vtbl_entries): Reimplement.
7163         (add_vcall_offset_vtbl_entries_r): New function.
7164         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
7165         computing when vcall offsets are necessary.
7166
7167 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
7168
7169         * decl.c (member_function_or_else): Use cp_error ... %T.
7170         (grokdeclarator): Likewise.
7171         (start_method): Likewise.
7172         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
7173
7174 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
7175
7176         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
7177         TYPE_DECLs.
7178
7179 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
7180
7181         * cp-tree.h (PTRMEM_OK_P): New macro.
7182         (itf_ptrmem_ok): New enumeration value.
7183         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
7184         argument. Diagnose implicit pointer to member.
7185         (instantiate_type): Don't diagnose implicit pointer to member
7186         here. Pass itf_ptrmem_ok if ok. Adjust calls to
7187         resolve_address_of_overloaded_function.
7188         * init.c (build_offset_ref): Set PTRMEM_OK_P.
7189         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
7190         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
7191         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
7192         (build_unary_op): Deal with single non-static member in
7193         microsoft-land.
7194
7195 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
7196
7197         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
7198
7199 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
7200
7201         * cp-tree.h (enum_name_string): Remove prototype.
7202         (report_case_error): Remove prototype.
7203         * cp/typeck2.c (enum_name_string): Remove.
7204         (report_case_error): Remove.
7205         * error.c (dump_expr): Deal with enum values directly.
7206         Correctly negate integer constant.
7207
7208 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
7209
7210         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
7211         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
7212         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
7213         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
7214         (__cxa_vec_new): Use __cxa_vec_new2.
7215         (__cxa_vec_delete): Use __cxa_vec_delete2.
7216
7217 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
7218
7219         * vec.cc (__cxa_vec_new): Set "C" linkage.
7220         (__cxa_vec_ctor): Likewise.
7221         (__cxa_vec_cctor): Likewise.
7222         (__cxa_vec_dtor): Likewise.
7223         (__cxa_vec_delete): Likewise.
7224         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
7225         (__cxa_vec_ctor): Likewise.
7226         (__cxa_vec_cctor): Likewise.
7227         (__cxa_vec_dtor): Likewise.
7228         (__cxa_vec_delete): Likewise.
7229
7230 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
7231
7232         * class.c (instantiate_type): Reinstate local variable
7233         deleted in previous change.
7234
7235         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
7236         itf_no_attributes.
7237
7238 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
7239
7240         * cp-tree.h (instantiate_type_flags): New enumeration.
7241         (instantiate_type): Change parameter.
7242         * class.c (instantiate_type): Adjust prototype. Adjust.
7243         * call.c (standard_conversion): Adjust instantiate_type call.
7244         (reference_binding): Likewise.
7245         (build_op_delete_call): Likewise.
7246         (convert_like_real): Likewise.
7247         * cvt.c (cp_convert_to_pointer): Likewise.
7248         (convert_to_reference): Likewise.
7249         * pt.c (convert_nontype_argument): Likewise.
7250         * typeck.c (build_binary_op): Likewise.
7251         (build_ptrmemfunc): Likewise.
7252         (convert_for_assignment): Likewise.
7253
7254 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
7255
7256         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
7257         (current_aggr): Define.
7258         * decl.c (grokdeclarator): Make sure a friend class is an
7259         elaborated type specifier.
7260         * parse.y (current_aggr): Remove static definition.
7261         (cp_parse_init): Adjust.
7262         (structsp): Clear and restore current_aggr.
7263         (component_decl_list): Clear current_aggr.
7264
7265         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
7266         aggregate tag on the typename's context.
7267
7268         * pt.c (tsubst_friend_class): Return error_mark_node, if
7269         parms becomes NULL.
7270         (instantiate_class_template): Ignore error_mark_node friend types.
7271
7272 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
7273
7274         * cvt.c (warn_ref_binding): New static function, broken out of ...
7275         (convert_to_reference): ... here. Use it.
7276
7277 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
7278
7279         * parse.y (template_arg): Add rule for template qualified with
7280         global scope.
7281
7282 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
7283
7284         * decl2.c (add_function): Reorganize.
7285         (arg_assoc): Do not consider function template decls.
7286
7287 2000-08-11  Jason Merrill  <jason@redhat.com>
7288
7289         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
7290         looking inside.
7291
7292 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
7293
7294         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
7295         (lookup_nested_tag): Likewise.
7296
7297         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
7298         can be produced.
7299
7300 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
7301
7302         * parse.y (named_complex_class_head_sans_basetype): Remove
7303         always true if.
7304
7305 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
7306
7307         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
7308         explicit TEMPLATE_ID_EXPR args.
7309         (build_expr_from_tree, case CALL_EXPR): Likewise.
7310
7311 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
7312
7313         * decl.c (check_tag_decl): Diagnose typename's which don't
7314         declare anything.
7315
7316 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
7317
7318         * init.c (build_aggr_init): Reject bogus array initializers
7319         early.
7320
7321 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
7322
7323         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
7324         runtime.
7325         * cp/tinfo.cc (__dynamic_cast): Likewise.
7326         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
7327
7328 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
7329
7330         * cvt.c (convert_to_pointer_force): Fix error message when
7331         attempting to cast from ambiguous base.
7332
7333 2000-08-08  Jason Merrill  <jason@redhat.com>
7334
7335         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
7336         (tsubst_template_arg_vector): Likewise.
7337
7338         * decl2.c (build_anon_union_vars): Choose the largest field; don't
7339         assume that one will be as large as the union.
7340
7341 2000-08-07  Kazu Hirata  <kazu@hxi.com>
7342
7343         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
7344         * decl.c (pop_labels): Likewise.
7345
7346 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
7347
7348         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
7349         specifications.
7350         (__pointer_to_member_type_info): Likewise.
7351         (__base_class_info): Likewise.
7352         (__class_type_info): Likewise.
7353         (__si_class_type_info): Likewise.
7354         (__vmi_class_type_info): Likewise.
7355         * tinfo.cc (__si_class_type_info::__do_find_public_src):
7356         Changed member names to match specifications.
7357         (__vmi_class_type_info::__do_find_public_src): Likewise.
7358         (__si_class_type_info::__do_dyncast): Likewise.
7359         (__vmi_class_type_info::__do_dyncast): Likewise.
7360         (__si_class_type_info::__do_upcast): Likewise.
7361         (__vmi_class_type_info::__do_upcast): Likewise.
7362         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
7363         (__pbase_type_info::__pointer_catch): Likewise.
7364         (__pointer_type_info::__pointer_catch): Likewise.
7365         (__pointer_to_member_type_info::__pointer_catch): Likewise.
7366
7367 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
7368
7369         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
7370         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
7371         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
7372
7373 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
7374
7375         * cp-tree.h (add_method): Change prototype.
7376         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
7377         Don't double the size of the method vector in the error case.
7378         (handle_using_decl): Adjust call to add_method.
7379         (add_implicitly_declared_members): Likewise.
7380         (clone_function_decl): Likewise.
7381         * decl2.c (check_classfn): Likewise.
7382         * semantics.c (finish_member_declaration): Likewise.
7383
7384 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
7385
7386         * decl.c (flag_isoc94): New variable.
7387
7388 2000-08-02  Jason Merrill  <jason@redhat.com>
7389
7390         * pt.c (do_type_instantiation): Add complain parm; don't complain
7391         if called recursively.
7392         * cp-tree.h, parse.y: Adjust.
7393
7394 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
7395
7396         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
7397         -Wno-strict-prototypes.
7398
7399         * g++spec.c: Adjust type of second argument to
7400         lang_specific_driver, and update code as necessary.
7401
7402         * cp-tree.h: Don't prototype min_precision here.
7403         (my_friendly_assert): Cast expression to void.
7404         * semantics.c (do_poplevel): Initialize scope_stmts.
7405
7406 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
7407
7408         * cp-tree.h (DECL_NEEDED_P): Tweak.
7409
7410 2000-07-28  Jason Merrill  <jason@redhat.com>
7411
7412         * lang-specs.h: Use %i in rule for .ii files.
7413
7414 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
7415
7416         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
7417
7418 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
7419
7420         Allow indirect primary bases.
7421         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
7422         primary_base.
7423         (CLASSTYPE_VFIELD_PARENT): Remove.
7424         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
7425         (BINFO_PRIMARY_BINFO): Remove.
7426         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
7427         (BINFO_VBASE_PRIMARY_P): Likewise.
7428         (BINFO_PRIMARY_BASE_OF): New macro.
7429         (BINFO_INDIRECT_PRIMARY_P): Likewise.
7430         (get_primary_binfo): New function.
7431         * decl.c (lang_mark_tree): Make lang_type::primary_base.
7432         * class.c (vcall_offset_data_s): Rename to ...
7433         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
7434         and add ctor_vtbl_p.
7435         (get_derived_offset): Use get_primary_binfo.
7436         (dfs_mark_primary_bases): Adjust handling of virtual primary
7437         bases.
7438         (mark_primary_bases): Likewise.
7439         (set_primary_base): Take a binfo, not an integer, as a
7440         representation of the primary base.
7441         (indirect_primary_base_p): Remove.
7442         (determine_primary_base): Adjust for indirect primary bases.
7443         (dfs_find_final_overrider): Fix typo in coment.
7444         (update_vtable_entry_for_fn): Use get_primary_binfo.
7445         (layout_nonempty_base_or_field): Tweak.
7446         (build_base_fields): Adjust for new primary base semantics.
7447         (dfs_propagate_binfo_offsets): Remove.
7448         (propagate_binfo_offsets): Rewrite.
7449         (dfs_set_offset_for_shared_vbases): Remove.
7450         (layout_virtual_bases): Don't use it.
7451         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
7452         ABI.
7453         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
7454         CLASSTYPE_VFIELD_PARENT.
7455         (dfs_get_primary_binfo): New function.
7456         (get_primary_binfo): Likewise.
7457         (dump_class_hierarchy_r): Tweak printing of primary bases.
7458         (build_vtbl_initializer): Fix typo in comments.  Use
7459         vtbl_init_data.
7460         (build_vcall_and_vbase_vtbl_entries): Likewise.
7461         (build_vbaes_offset_vtbl_entries): Likewise.
7462         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
7463         BV_VCALL_INDEX to handle indirect primary bases.
7464         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
7465         (build_rtti_vtbl_entries): Likewise.
7466         * search.c (get_shared_vbase_if_not_primary): Tweak.
7467         (find_vbase_instance): Likewise.
7468         (binfo_for_vtable): Simplify.
7469         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
7470         (make_binfo): Make it have 11 entries.
7471
7472 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
7473
7474         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
7475         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
7476         ascertaining primaryness.
7477         (G): Remove template_args.
7478         (decl_is_template_id): New function.
7479         (write_encoding): Use decl_is_template_id.
7480         (write_name): Likewise.  Handle type_decls.  Get main variant of
7481         type decls.
7482         (write_nested_name): Likewise.
7483         (write_prefix): Likewise.
7484         (write_template_prefix): Likewise.
7485         (write_special_name_constructor): Remove defunct production from
7486         comment.
7487         (write_bare_function_type): Remove comment about absent parameter.
7488         (write_template_template_arg): Add missing grammar production to
7489         comment.
7490
7491 2000-07-27  Jason Merrill  <jason@redhat.com>
7492
7493         * decl.c (duplicate_decls): If common_type produces a non-typedef
7494         type for a typedef, just use the old type.
7495
7496 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
7497
7498         * cp-tree.h (function_depth): Declare.
7499         (verify_stmt_tree): Likewise.
7500         (find_tree): Likewise.
7501         * decl.c (function_depth): Give it external linkage.
7502         * optimize.c (optimize_function): Increment and decrement it.
7503         * tree.c (verify_stmt_tree_r): New function.
7504         (verify_stmt_tree): Likewise.
7505         (find_tree_r): Likewise.
7506         (find_tree): Likewise.
7507
7508 2000-07-27  Jason Merrill  <jason@redhat.com>
7509
7510         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
7511         TYPE_PTRMEMFUNC_P.
7512         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
7513
7514 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
7515
7516         * decl.c (start_cleanup_fn): Mark the function as `inline'.
7517         * decl2.c (get_guard): Call cp_finish_decl, not
7518         rest_of_decl_compilation, for local guards.
7519         * lex.c (do_identifier): Remove unused variable.
7520
7521 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
7522
7523         * parse.y:  Add missing ';'.
7524
7525 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
7526
7527         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
7528         of `extern "C++"'.
7529
7530 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7531
7532         Kill strict_prototype. Backwards compatibility only for
7533         non NO_IMPLICIT_EXTERN_C systems.
7534         * cp-tree.h (flag_strict_prototype): Remove.
7535         (strict_prototype): Remove.
7536         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
7537         * decl.c (maybe_push_to_top_level): Adjust.
7538         (pop_from_top_level): Adjust.
7539         (decls_match): Only allow sloppy parm matching for ancient
7540         system headers.
7541         (init_decl_processing): Adjust.
7542         (grokdeclarator): Adjust.
7543         * decl2.c (flag_strict_prototype): Remove.
7544         (strict_prototype): Remove.
7545         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
7546         (lang_f_options): Remove "strict-prototype".
7547         (unsupported-options): Add "strict-prototype".
7548         * lex.c (do_identifier): Adjust.
7549         (do_scoped_id): Adjust.
7550         * parse.y (empty_parms): Adjust.
7551         * class.c (push_lang_context): Adjust.
7552         (pop_lang_context): Adjust.
7553         * typeck.c (comp_target_parms): Adjust.
7554
7555 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7556
7557         * decl.c (poplevel): Deal with anonymous variables at for scope.
7558         (maybe_inject_for_scope_var): Likewise.
7559
7560 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
7561
7562         * decl.c: Remove all signal handling code, now done in toplev.c.
7563
7564 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
7565
7566         * decl.c (make_rtl_for_nonlocal_decl): Rework.
7567
7568         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
7569         correctly.
7570
7571 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
7572
7573         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
7574         Define my_friendly_assert and my_friendly_abort as macros
7575         which may call friendly_abort.  Prototype friendly abort, not
7576         my_friendly_abort or my_friendly_assert.
7577         * decl.c (signal_catch): Report the signal caught in the error
7578         message.  Call fatal directly.
7579         * typeck2.c (ack, my_friendly_assert): Delete.
7580         (my_friendly_abort): Rename to friendly_abort.  Expect file,
7581         line, and function parameters.  Report the abort code, then
7582         call fancy_abort.  Do not mask an abort if errors have
7583         already occurred.
7584
7585 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
7586
7587         * typeck.c (comp_target_parms): Remove obsolete parameter.
7588         (comp_target_types): Adjust.
7589
7590 2000-07-17  Jason Merrill  <jason@redhat.com>
7591
7592         * typeck.c (mark_addressable): Never set TREE_USED.
7593         * call.c (build_call): Don't abort on calls to library functions
7594         that have been declared normally.
7595
7596         * typeck.c (build_binary_op): Fix grammar in warning.
7597
7598         * exception.cc (__eh_free): Fix prototype.
7599
7600         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
7601
7602         * decl.c (pushdecl): Handle seeing an OVERLOAD in
7603         IDENTIFIER_NAMESPACE_VALUE.
7604
7605 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
7606
7607         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
7608         * method.c (use_thunk): Correct handling of vcall offsets.
7609
7610 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
7611
7612         * .cvsignore: parse.h and parse.c have no cp- prefix.
7613
7614 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
7615
7616         * .cvsignore: New file.
7617
7618 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
7619
7620         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
7621
7622 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
7623
7624         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
7625         * parse.c: Remove.
7626         * parse.h: Likewise.
7627
7628 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
7629
7630         * class.c (layout_class_type): Add pointers to virtual bases after
7631         base classes under the old ABI.
7632
7633 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
7634
7635         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
7636         (finish_continue_stmt): Likewise.
7637         (begin_for_stmt): Remove call to note_level_for_for.
7638         (finish_goto_stmt): Change call from build_min_nt
7639         to build_stmt.
7640         (finish_expr_stmt): Likewise.
7641         (begin_if_stmt): Likewise.
7642         (begin_while_stmt): Likewise.
7643         (finish_while_stmt): Likewise.
7644         (finish_return_stmt): Likewise.
7645         (begin_for_stmt): Likewise.
7646         (finish_for_stmt): Likewise.
7647         (finish_break_stmt): Likewise.
7648         (begin_switch_stmt): Likewise.
7649         (finish_case_label): Likewise.
7650         (genrtl_try_block): Likewise.
7651         (begin_try_block): Likewise.
7652         (begin_handler): Likewise.
7653         (begin_compound_stmt): Likewise.
7654         (finish_asm_stmt): Likewise.
7655         (finish_label_stmt): Likewise.
7656         (add_decl_stmt): Likewise.
7657         (finish_subobject): Likewise.
7658         (finish_decl_cleanup): Likewise.
7659         (finish_named_return_value): Likewise.
7660         (setup_vtbl_ptr): Likewise.
7661         (add_scope_stmt): Likewise.
7662         * decl.c (finish_constructor_body): Likewise.
7663         (finish_destructor_body): Likewise.
7664         * optimize.c (copy_body_r): Likewise.
7665         (initialize_inlined_parameters): Likewise.
7666         (declare_return_variable): Likewise.
7667         (expand_call_inline): Likewise.
7668
7669 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
7670
7671         * semantics.c (expand_body): Sync interface information
7672         at the end of function body expansion.
7673
7674 2000-07-09  Jason Merrill  <jason@redhat.com>
7675
7676         * init.c (build_new_1): Bail early if the call to new fails.
7677
7678         * decl.c (compute_array_index_type): Check specifically for
7679         an INTEGER_CST, not just TREE_CONSTANT.
7680
7681         * decl.c (duplicate_decls): Don't call duplicate_decls on
7682         the DECL_TEMPLATE_RESULT.
7683         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
7684         codes.
7685
7686         * error.c (dump_template_bindings): Don't crash if we had an
7687         invalid argument list.
7688
7689         * typeck.c (c_expand_start_case): Do narrowing here.
7690         * semantics.c (finish_switch_cond): Not here.
7691
7692 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
7693
7694         * parse.y (asm_clobbers): Do string concatenation.
7695
7696 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
7697
7698         * decl.c (pushtag): Don't put local classes in template functions
7699         on the local_classes list.
7700
7701 2000-07-04  Scott Snyder  <snyder@fnal.gov>
7702
7703         * decl2.c (get_guard): Add missing return for old ABI local
7704         variable case.
7705
7706 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
7707
7708         * cp-tree.h (char_type_p): New function.
7709         * decl.c (init_decl_processing): Don't initialize
7710         signed_wchar_type_node or unsigned_wchar_type_node.
7711         (complete_array_type): Handle brace-enclosed string-constants.
7712         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
7713         * tree.c (char_type_p): New function.
7714         * typeck2.c (digest_init): Use char_type_p.
7715
7716 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
7717
7718         * pt.c (tsubst): Don't layout type, if it's error_mark.
7719
7720 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
7721
7722         * pt.c (instantiate_pending_templates): Reset template level.
7723
7724 2000-07-05  Jason Merrill  <jason@redhat.com>
7725
7726         * call.c (joust): Don't complain about `operator char *()' beating
7727         `operator const char *() const'.
7728
7729 2000-07-04  scott snyder  <snyder@fnal.gov>
7730             Jason Merrill  <jason@redhat.com>
7731
7732         * repo.c (repo_get_id): Handle the case where a class with virtual
7733         bases has a null TYPE_BINFO_VTABLE.
7734
7735 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
7736             Jason Merrill  <jason@redhat.com>
7737
7738         * parse.y (member_init): Just pass in the type.
7739         * init.c (expand_member_init): Handle getting a type.
7740
7741 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7742             Jason Merrill  <jason@redhat.com>
7743
7744         * decl.c (finish_function): Warn if a function has no return
7745         statement.
7746         Suggested by Andrew Koenig.
7747         * typeck.c (check_return_expr): Do set current_function_returns_value
7748         if we got an error_mark_node.
7749
7750 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
7751
7752         * decl2.c (push_decl_namespace): Push the original namespace.
7753
7754 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
7755
7756         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
7757         * semantics.c (begin_class_definition): Clear it.
7758
7759 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
7760
7761         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
7762         (genrtl_expr_stmt): Likewise.
7763         (genrtl_decl_stmt): Likewise.
7764         (genrtl_if_stmt): Likewise.
7765         (genrtl_while_stmt): Likewise.
7766         (genrtl_do_stmt): Likewise.
7767         (genrtl_return_stmt): Likewise.
7768         (genrtl_for_stmt): Likewise.
7769         (genrtl_break_stmt): Likewise.
7770         (genrtl_continue_stmt): Likewise.
7771         (genrtl_scope_stmt): Likewise.
7772         (genrtl_switch_stmt): Likewise.
7773         (genrtl_case_label): Likewise.
7774         (genrtl_begin_compound_stmt): Likewise.
7775         (genrtl_finish_compound_stmt): Likewise.
7776         (genrtl_compound_stmt): Likewise.
7777         (genrtl_asm_stmt): Likewise.
7778
7779         * init.c (begin_init_stmts): Remove call to
7780         genrtl_begin_compound_stmt.
7781         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
7782
7783         * semantics.c (lang_expand_stmt): Changed call to
7784         genrtl_compound_stmt to ignore return value.
7785
7786 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
7787
7788         * mangle.c (canonicalize_for_substitution): Return the canonical
7789         variant of a type.
7790
7791         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
7792         TYPE_DECL.
7793         * typeck.c (commonparms): Remove obstack manipulations.
7794
7795 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
7796
7797         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
7798
7799         * Makefile.in (OBJS): Added ../c-semantics.o.
7800         (OBJDEPS): Likewise.
7801
7802         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
7803         ../c-common.h.
7804         (struct stmt_tree): Added comment.
7805         (current_function_name_declared): Removed.
7806         (stmts_are_full_exprs_p): Likewise.
7807         (genrtl_do_pushlevel): Likewise.
7808         (genrtl_clear_out_block): Likewise.
7809         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
7810         (DECL_ANON_UNION_ELEMS): Likewise.
7811         (emit_local_var): Likewise.
7812         (make_rtl_for_local_static): Likewise.
7813         (do_case): Likewise.
7814         (expand_stmt): Likewise.
7815         (genrtl_decl_cleanup): Likewise.
7816         (c_expand_asm_operands): Likewise.
7817         (c_expand_return): Likewise.
7818         (c_expand_start_case): Likewise.
7819
7820         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
7821         (emit_local_var): Likewise.
7822         (initialize_local_var): Change reference to
7823         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
7824         Change reference to stmts_are_full_exprs_p to
7825         current_stmt_tree->stmts_are_full_exprs_p.
7826         (push_cp_function_context): Likewise.
7827
7828         * expect.c (expand_throw): Change reference to
7829         stmts_are_full_exprs_p.
7830
7831         * init.c (build_aggr_init): Change reference to
7832         stmts_are_full_exprs_p.
7833         (build_vec_init): Likewise.
7834
7835         * optimize.c (maybe_clone_body): Change reference to
7836         current_function_name_declared to
7837         cp_function_chain->name_declared.
7838
7839         * pt.c (instantiate_decl): Change reference to
7840         current_function_name_declared to
7841         cp_function_chain->name_declared.
7842
7843         * semantics.c (expand_cond): Moved declaration to c-common.h.
7844         (genrtl_do_pushlevel): Moved to c-semantics.c.
7845         (genrtl_clear_out_block): Likewise.
7846         (genrtl_goto_stmt): Likewise.
7847         (genrtl_expr_stmt): Likewise.
7848         (genrtl_decl_stmt): Likewise.
7849         (gerntl_if_stmt): Likewise.
7850         (genrtl_while_stmt): Likewise.
7851         (genrtl_do_stmt): Likewise.
7852         (genrtl_return_stmt): Likewise.
7853         (genrtl_for_stmt): Likewise.
7854         (genrtl_break_stmt): Likewise.
7855         (genrtl_continue_stmt): Likewise.
7856         (genrtl_scope_stmt): Likewise.
7857         (genrtl_switch_stmt): Likewise.
7858         (genrtl_case_label): Likewise.
7859         (genrtl_begin_compound_stmt): Likewise.
7860         (genrtl_finish_compound_stmt): Likewise.
7861         (genrtl_compound_stmt): Likewise.
7862         (genrtl_asm_stmt): Likewise.
7863         (genrtl_decl_cleanup): Likewise.
7864         (expand_cond): Likewise.
7865         (expand_stmt): Renamed to ...
7866         (lang_expand_stmt): ... this.
7867         (lang_expand_expr_stmt): Initialize.
7868         (set_current_function_name_declared): Likewise.
7869         (stmts_are_full_exprs_p): Likewise.
7870         (current_function_name_declared): Likewise.
7871         (anon_aggr_type_p): Likewise.
7872         (do_poplevel): Change reference to
7873         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
7874         Change reference to stmts_are_full_exprs_p to
7875         current_stmt_tree->stmts_are_full_exprs_p.
7876         (add_tree): Likewise.
7877         (finish_expr_stmt): Likewise.
7878         (prep_stmt): Likewise.
7879         (lang_expand_stmt): Likewise.
7880         (begin_compound_stmt): Change reference to
7881         current_function_name_declared to
7882         cp_function_chain->name_declared and call to
7883         current_function_name_declared().
7884         (setup_vtbl_ptr): Likewise.
7885         (genrtl_do_poplevel): Removed.
7886
7887 2000-06-30  Jason Merrill  <jason@redhat.com>
7888
7889         * init.c (init_init_processing): Go back to aligning like
7890         double_type_node for old ABI.
7891         (get_cookie_size): Make cookie larger if we get a type that needs
7892         more alignment.
7893         (build_vec_delete): Call it.
7894
7895         * typeck.c (qualify_type_recursive): New fn.
7896         (composite_pointer_type): Use it.
7897         (build_binary_op): Use composite_pointer_type.
7898
7899 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
7900             Jason Merrill  <jason@redhat.com>
7901
7902         * typeck.c (check_return_expr): Don't complain about returning
7903         NULL from operator new if -fcheck-new.
7904         * cp-tree.h: Declare flag_check_new here.
7905         * init.c: Not here.
7906
7907 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
7908
7909         * mangle.c (find_substitution): Use same_type_p.
7910         (write_encoding): Don't check for substitutions.
7911
7912 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
7913
7914         * parse.y (expr_no_comma_rangle): New non-terminal.
7915         (template_parm): Use it for default parameter case.
7916         (template_arg): Use it.
7917         (expr_no_commas): Remove commented out undefined extensions.
7918         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
7919         * parse.h, parse.c: Rebuilt.
7920
7921 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
7922
7923         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
7924         (finish_asm_stmt): Do it here, instead.
7925
7926         * cp-tree.h (ridpointers): Don't declare.
7927         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
7928         (record_builtin_java_type): Likewise.
7929         (init_decl_processing): Likewise.
7930         * lex.c: Move inclusion of lex.h.
7931         (ridpointers): Don't define.
7932         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
7933         RID_MAX.
7934         * lex.h (enum rid): Rename to ...
7935         (enum cp_rid): ... this.
7936         (ridpointers): Don't declare.
7937         * parse.y: Move inclusion of lex.h.
7938         * parse.c: Regenerated.
7939         * spew.c: Move inclusion of lex.h.
7940
7941         * cp-tree.h (struct language_function): Remove temp_name_counter.
7942         (temp_name_counter): Remove.
7943         (get_temp_name): Change prototype.
7944         (get_guard): New function.
7945         (get_guard_cond): Likewise.
7946         (set_guard): Likewise.
7947         * cvt.c (build_up_reference): Adjust call to get_temp_name.
7948         * decl.c (expand_static_init): Use get_guard and friends to
7949         implement guard variables.
7950         * decl2.c (get_temp_name): Assume that the variables created are
7951         always static.
7952         (get_sentry): Rename to ...
7953         (get_guard): ... this.  Implement new ABI guard variables.
7954         (get_guard_bits): New function.
7955         (get_guard_cond): Likewise.
7956         (set_guard): Likewise.
7957         (start_static_initialization_or_destruction): Use them.
7958         (do_static_initialization): Replace sentry with guard throughout.
7959         (do_static_destruction): Likewise.
7960         * init.c (create_temporary_var): Add comment.
7961
7962 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
7963
7964         * mangle.c (find_substitution): Use same_type_p.
7965         (write_encoding): Don't check for substitutions.
7966
7967 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
7968
7969         * parse.y (expr_no_comma_rangle): New non-terminal.
7970         (template_parm): Use it for default parameter case.
7971         (template_arg): Use it.
7972         (expr_no_commas): Remove commented out undefined extensions.
7973         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
7974         * parse.h, parse.c: Rebuilt.
7975
7976 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
7977
7978         * cp-tree.h (flag_const_strings): Remove.
7979         (warn_parentheses): Likewise.
7980         (warn_format): Likewise.
7981         (common_type): Likewise.
7982         (default_conversion): Likewise.
7983         (build_binary_op): Likewise.
7984         (cp_build_binary_op): New macro.
7985         * call.c (build_new_op): Use cp_build_binary_op instead of
7986         build_binary_op.
7987         * class.c (build_vtable_entry_ref): Likewise.
7988         * decl.c (expand_static_init): Likewise.
7989         (compute_array_index_type): Likewise.
7990         (build_enumerator): Likewise.
7991         * decl2.c (delete_sanity): Likewise.
7992         (start_static_initialization_or_destruction): Likewise.
7993         * error.c (dump_type_suffix): Likewise.
7994         * init.c (resolve_offset_ref): Likewise.
7995         (build_new): Likewise.
7996         (build_new_1): Likewise.
7997         (build_vec_delete_1): Likewise.
7998         (build_vec_init): Likewise.
7999         (build_delete): Likewise.
8000         * rtti.c (synthesize_tinfo_fn): Likewise.
8001         (synthesize_tinfo_var): Likewise.
8002         * search.c (expand_upcast_fixups): Likewise.
8003         (fixup_all_virtual_upcast_offsets): Likewise.
8004         * typeck.c (build_array_ref): Likewise.
8005         (get_member_function_from_ptrfunc): Likewise.
8006         (build_binary_op): Add parameter.
8007         (pointer_int_sum): Use cp_build_binary_op.
8008         (pointer_diff): Likewise.
8009         (build_modify_expr): Likewise.
8010         (get_delta_difference): Likewise.
8011         (build_ptrmemfunc): Likewise.
8012
8013 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
8014
8015         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
8016         * decl.c (create_implicit_typedef): Adjust.
8017         * decl2.c (build_artificial_parm): Adjust.
8018         * method.c (implicitly_declare_fn): Adjust.
8019         * pt.c (push_inline_template_parms_recursive): Adjust.
8020         (process_template_parm): Adjust.
8021         (overloaded_template_name): Adjust.
8022         * semantics.c (finish_template_template_parm): Adjust.
8023
8024 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
8025
8026         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
8027         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
8028         where to emit thunks.
8029         (build_vtt): Adjust call to build_vtt_inits.
8030         (build_vtt_inits): Add parameter to indicate whether or not
8031         sub-VTTs for virtual bases should be included.  Adjust handling of
8032         construction vtables.
8033         (get_matching_base): New function.
8034         (dfs_build_vtt_inits): Rename to ...
8035         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
8036         construction vtables.
8037         (dfs_fixup_binfo_vtbls): Likewise.
8038         (build_ctor_vtbl_groups): Build construction vtables for virtual
8039         bases, too.
8040         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
8041         to build construction vtbls.
8042         (dfs_accumulate_vtbl_inits): Adjust handling of
8043         construction vtables.
8044
8045         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
8046         types correctly.
8047
8048 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
8049
8050         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
8051
8052 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
8053
8054         * search.c (hides): Remove.
8055         (is_subobject_of_p): Add most_derived parameter. Use
8056         CANONICAL_BINFO.
8057         (lookup_field_queue_p): Adjust.
8058         (lookup_field_r): Adjust.
8059
8060 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
8061
8062         * decl2.c (handle_class_head): Bash typedefs to the type's main
8063         decl.
8064
8065 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
8066
8067         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
8068         (begin_global_stmt_expr): ... this.
8069         (genrtl_finish_stmt_expr): Rename to ...
8070         (finish_global_stmt_expr): ... this.
8071         * init.c (begin_init_stmts): Adjust calls.
8072         (finish_init_stmts): Likewise.
8073         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
8074         (begin_global_stmt_expr): ... this.
8075         (genrtl_finish_stmt_expr): Rename to ...
8076         (finish_global_stmt_expr): ... this.
8077
8078 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
8079
8080         * search.c (lookup_member): Fix typo in comment.
8081
8082 2000-06-24  Jason Merrill  <jason@redhat.com>
8083
8084         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
8085         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
8086
8087 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8088
8089         * parse.y (complex_direct_notype_declarator): Support global_scope.
8090         * Makefile.in: Adjust conflict count.
8091
8092 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
8093
8094         * parse.y (template_arg): Convert TEMPLATE_DECL
8095         that is a template template parameter to
8096         TEMPLATE_TEMPLATE_PARM here.
8097
8098         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
8099         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
8100         (copy_template_template_parm): Adjust prototype.
8101         * decl.c (grokdeclarator): Remove dead code.
8102         * pt.c (process_template_parm): Tidy.
8103         (lookup_template_class): Construct nodes in
8104         copy_template_template_parm.
8105         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
8106         lookup_template_class.  Use TYPE_TI_TEMPLATE.
8107         * tree.c (copy_template_template_parm): Add NEWARGS
8108         parameter.
8109         (mapcar): Adjust call to copy_template_template_parm.
8110         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
8111         * method.c (build_template_template_parm_names): Change error
8112         code to avoid compilation warning.
8113
8114         * gxxint.texi: Document template template parameter
8115         name mangling.
8116
8117 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
8118
8119         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
8120         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
8121         (cp-demangle.o): New rule.
8122         (dyn-string.o): Likewise.
8123         * inc/cxxabi.h (__cxa_demangle): New declaration.
8124
8125 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
8126
8127         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
8128         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
8129         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
8130         a tree, not an int.
8131         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
8132         (make_thunk): Change prototype.
8133         (emit_thunk): Rename to use_thunk.
8134         (mangle_thunk): Change prototype.
8135         * class.c (get_derived_offset): Simplify.
8136         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
8137         BV_GENERATE_THUNK_WITH_VTABLE_P.
8138         (build_primary_vtable): Simplify.
8139         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
8140         (dfs_find_base): Remove.
8141         (update_vtable_entry_for_fn): Correct bug in finding the base
8142         where a virtual function was first declared.  Figure out whether
8143         or not to emit a vcall-thunk with the vtables in which it appears.
8144         Correct logic for deciding whether to use an ordinary thunk, or a
8145         vcall thunk.
8146         (finish_struct_1): Remove unnecssary code.
8147         (build_vtbl_initializer): Use ssize_int for the running counter of
8148         negative indices.
8149         (build_vtbl_initializer): Only use vcall thunks where necessary.
8150         Mark thunks as needing to be emitted with their vtables, or not.
8151         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
8152         indices.  Use size_binop.
8153         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
8154         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
8155         size_binop.
8156         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
8157         (build_vtable_entry): Mark thunks as needing to be emitted with
8158         their vtables, or not.
8159         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
8160         * decl2.c (mark_vtable_entries): Use use_thunk instead of
8161         emit_thunk.
8162         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
8163         information.
8164         * error.c (dump_expr): Use BV_FN.
8165         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
8166         not an int.
8167         * method.c (make_thunk): Likewise.
8168         (emit_thunk): Rename to use_thunk.  Allow callers to decide
8169         whether or not to actually emit the thunk.  Adjust for changes in
8170         representation of vcall offsets.
8171         * search.c (dfs_get_pure_virtuals): Use BV_FN.
8172         * semantics.c (emit_associated_thunks): New function.
8173         (expand_body): Use it.
8174         * ir.texi: Adjust decriptions of thunks.
8175
8176 2000-06-22  Jason Merrill  <jason@redhat.com>
8177
8178         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
8179         (tsubst_friend_function): Copy it here.
8180
8181         * decl.c (grok_op_properties): Fix typo.
8182
8183         * decl2.c (delete_sanity): Clarify warning, avoid failure on
8184         deleting void*.
8185
8186         * pt.c (check_explicit_specialization): Clarify error.
8187
8188         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
8189         an old OVERLOAD when we're declaring a non-function.
8190         (pushdecl, destroy_local_var): Check for error_mark_node.
8191         (warn_extern_redeclared_static): Also bail early if
8192         we're a CONST_DECL.
8193         (push_overloaded_decl): Ignore an old error_mark_node.
8194
8195 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
8196
8197         * call.c (build_x_va_arg): Check if in a template decl.
8198         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
8199
8200 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8201
8202         * class.c (push_lang_context): TYPE_NAME gets you to the Java
8203         types DECLs.
8204         * decl.c (check_goto): Computed gotos assumed OK.
8205
8206 2000-06-20  Jason Merrill  <jason@redhat.com>
8207
8208         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
8209         for which we don't need to look for instantiations.
8210
8211 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
8212
8213         * parse.y (program): Always call finish_translation_unit.
8214         * parse.c, parse.h: Rebuilt.
8215
8216 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
8217
8218         * method.c: Don't include hard-reg-set.h.
8219
8220 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
8221
8222         * rtti.c (get_base_offset): Cope when vbase field is in a base.
8223
8224 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
8225
8226         * call.c (build_conditional_expr): Use VOID_TYPE_P.
8227         * cvt.c (cp_convert_to_pointer): Likewise.
8228         (convert_to_void): Likewise.
8229         * error.c (dump_expr): Likewise.
8230         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
8231         * init.c (build_delete): Likewise.
8232         * method.c (emit_thunk): Likewise.
8233         * optmize.c (declare_return_variable): Likewise.
8234         * rtti.c (get_tinfo_decl_dynamic): Likewise.
8235         (get_typeid): Likewise.
8236         (build_dynamic_cast_1): Likewise.
8237         * typeck.c (composite_pointer_type): Likewise.
8238         (common_type): Likewise.
8239         (build_indirect_ref): Likewise.
8240         (build_binary_op): Likewise.
8241         (build_x_compound_expr): Likewise.
8242         (check_return_expr): Likewise.
8243         * typeck2.c (add_exception_specifier): Likewise.
8244
8245         * mangle.c (write_method_parms): Use direct comparison for end
8246         of parmlist.
8247
8248 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
8249
8250         * cp-tree.h (genrtl_try_block): Declare function.
8251         (genrtl_handler): Likewise.
8252         (genrtl_catch_block): Likewise.
8253         (genrtl_ctor_stmt): Likewise.
8254         (genrtl_subobject): Likewise.
8255         (genrtl_decl_cleanup): Likewise.
8256         (genrtl_do_poplevel): Likewise.
8257         (genrtl_do_pushlevel): Likewise.
8258         (genrtl_clear_out_block): Likewise.
8259         (genrtl_goto_stmt): Likewise.
8260         (genrtl_expr_stmt): Likewise.
8261         (genrtl_decl_stmt): Likewise.
8262         (genrtl_if_stmt): Likewise.
8263         (genrtl_while_stmt): Likewise.
8264         (genrtl_do_stmt): Likewise.
8265         (genrtl_return_stmt): Likewise.
8266         (genrtl_for_stmt): Likewise.
8267         (genrtl_break_stmt): Likewise.
8268         (genrtl_continue_stmt): Likewise.
8269         (genrtl_scope_stmt): Likewise.
8270         (genrtl_switch_stmt): Likewise.
8271         (genrtl_case_label): Likewise.
8272         (genrtl_begin_compound_stmt): Likewise.
8273         (genrtl_finish_compound_stmt): Likewise.
8274         (genrtl_compound_stmt): Likewise.
8275         (genrtl_asm_stmt): Likewise.
8276         (genrtl_named_return_value): Likewise.
8277         (genrtl_begin_stmt_expr): Likewise.
8278         (genrtl_finish_stmt_expr): Likewise.
8279         (finish_for_stmt): Removed first argument.
8280         (finish_switch_stmt): Likewise.
8281
8282         * semantics.c (genrtl_try_block): Define function.
8283         (genrtl_handler): Likewise.
8284         (genrtl_catch_block): Likewise.
8285         (genrtl_ctor_stmt): Likewise.
8286         (genrtl_subobject): Likewise.
8287         (genrtl_decl_cleanup): Likewise.
8288         (genrtl_do_poplevel): Likewise.
8289         (genrtl_do_pushlevel): Likewise.
8290         (genrtl_clear_out_block): Likewise.
8291         (genrtl_goto_stmt): Likewise.
8292         (genrtl_expr_stmt): Likewise.
8293         (genrtl_decl_stmt): Likewise.
8294         (genrtl_if_stmt): Likewise.
8295         (genrtl_while_stmt): Likewise.
8296         (genrtl_do_stmt): Likewise.
8297         (genrtl_return_stmt): Likewise.
8298         (genrtl_for_stmt): Likewise.
8299         (genrtl_break_stmt): Likewise.
8300         (genrtl_continue_stmt): Likewise.
8301         (genrtl_scope_stmt): Likewise.
8302         (genrtl_switch_stmt): Likewise.
8303         (genrtl_case_label): Likewise.
8304         (genrtl_begin_compound_stmt): Likewise.
8305         (genrtl_finish_compound_stmt): Likewise.
8306         (genrtl_compound_stmt): Likewise.
8307         (genrtl_asm_stmt): Likewise.
8308         (genrtl_named_return_value): Likewise.
8309         (genrtl_begin_stmt_expr): Likewise.
8310         (genrtl_finish_stmt_expr): Likewise.
8311         (finish_for_stmt): Removed first argument and generate rtl
8312         specific code.
8313         (finish_switch_stmt): Likewise.
8314         (do_poplevel): Removed generate rtl specific code.
8315         (do_pushlevel): Likewise.
8316         (add_tree): Likewise.
8317         (finish_goto_stmt): Likewise.
8318         (finish_expr_stmt): Likewise.
8319         (begin_if_stmt): Likewise.
8320         (finish_if_stmt_cond): Likewise.
8321         (finish_then_clause): Likewise.
8322         (begin_else_clause): Likewise.
8323         (finish_else_clause): Likewise.
8324         (finish_if_stmt): Likewise.
8325         (clear_out_block): Likewise.
8326         (begin_while_stmt): Likewise.
8327         (finish_while_stmt_cond): Likewise.
8328         (finish_while_stmt): Likewise.
8329         (begin_do_stmt): Likewise.
8330         (finish_do_body): Likewise.
8331         (finish_do_stmt): Likewise.
8332         (finish_return_stmt): Likewise.
8333         (begin_for_stmt): Likewise.
8334         (finish_for_init_stmt): Likewise.
8335         (finish_for_cond): Likewise.
8336         (finish_for_expr): Likewise.
8337         (finish_break_stmt): Likewise.
8338         (finish_continue_stmt): Likewise.
8339         (begin_switch_stmt): Likewise.
8340         (finish_switch_cond): Likewise.
8341         (finish_case_label): Likewise.
8342         (begin_try_block): Likewise.
8343         (begin_function_try_block): Likewise.
8344         (finish_try_block): Likewise.
8345         (finish_cleanup_try_block): Likewise.
8346         (finish_cleanup): Likewise.
8347         (finish_function_try_block): Likewise.
8348         (finish_handler_sequence): Likewise.
8349         (finish_function_handler_sequence): Likewise.
8350         (begin_handler): Likewise.
8351         (finish_handler_parms): Likewise.
8352         (begin_catch_block): Likewise.
8353         (finish_handler): Likewise.
8354         (begin_compound_stmt): Likewise.
8355         (finish_compound_stmt): Likewise.
8356         (finish_asm_stmt): Likewise.
8357         (finish_label_stmt): Likewise.
8358         (finish_label_decl): Likewise.
8359         (finish_subobject): Likewise.
8360         (finish_decl_cleanup): Likewise.
8361         (finish_named_return_value): Likewise.
8362         (begin_stmt_expr): Likewise.
8363         (finish_stmt_expr): Likewise.
8364
8365         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
8366         to call genrtl_expr_stmt when appropriate.
8367
8368         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
8369         begin_compound_expr to call genrtl_begin_stmt_expr and
8370         genrtl_begin_compound_expr when appropriate.
8371         (finish_init_stmts): Changed calls to finish_compound_expr and
8372         finish_stmt_expr to call genrtl_finish_compound_expr and
8373         genrtl_finish_stmt_expr when appropriate.
8374         (expand_default_init): Changed call to finish_expr_stmt to call
8375         genrtl_expr_stmt when appropriate.
8376         (build_vec_init): Likewise.
8377
8378         * parse.y (simple_stmt): Removed first argument from call to
8379         finish_for_stmt. Removed first argument from call to
8380         finish_switch_stmt.
8381
8382         * parse.c: Regenerated.
8383
8384         * pt.c (tsubst_expr): Removed first argument from call to
8385         finish_for_stmt. Removed first argument from call to
8386         finish_switch_stmt.
8387
8388 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
8389
8390         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
8391         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
8392
8393         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
8394         (cplus_tree_code_length[]): Likewise.
8395         (cplus_tree_code_name[]): Likewise.
8396         (init_parse): Added call to add_c_tree_codes. Changed
8397         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
8398
8399 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
8400
8401         * cp-tree.h (finish_mem_initializers): Declare.
8402         (count_trees): Likewise.
8403         * parse.y (base_init): Use finish_mem_initializers.
8404         * semantics.c (finish_mem_initializers): New function.
8405
8406         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
8407         the number of trees.
8408         (n_trees): Remove.
8409         (count_trees): Don't use it.
8410
8411 2000-06-15  Jason Merrill  <jason@redhat.com>
8412
8413         * tree.c (count_trees): New debugging function.
8414
8415         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
8416         * init.c (build_member_call): Pull out the name of a DECL.
8417
8418         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
8419         * semantics.c (expand_body): Push to TV_INTEGRATION here.
8420         * optimize.c (optimize_function): Not here.
8421         * pt.c (instantiate_decl): Push to TV_PARSE.
8422
8423 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
8424
8425         * cp-tree.h (struct language_function): Remove x_base_init_list
8426         and x_member_init_list.
8427         (current_base_init_list): Remove.
8428         (current_member_init_list): Likewise.
8429         (setup_vtbl_ptr): Change prototype.
8430         (emit_base_init): Likewise.
8431         (expand_member_init): Likewise.
8432         (reinit_parse_for_function): Remove.
8433         * decl.c (save_function_data): Don't clear x_base_init_list and
8434         x_member_init_list.
8435         (mark_language_function): Don't mark them.
8436         * init.c (perform_member_init): Tweak comment.
8437         (sort_member_init): Take the list of initializers as an argument.
8438         (sort_base_init): Likewise.
8439         (emit_base_init): Likewise.
8440         (expand_member_init): Return the initializer.  Don't use global
8441         variables.
8442         * lex.c (reinit_parse_for_function): Remove.
8443         * method.c (build_template_parm_names): Correct substitution.
8444         (do_build_copy_constructor): Don't use current_member_init_list
8445         and current_base_init_list.
8446         (synthesize_method): Likewise.
8447         * parse.y (base_init): Split mem-initializers into
8448         base-initializers and field-initializers.
8449         (member_init_list): Build up the list here.
8450         (member_init): Return the initializer.
8451         (fn.depfn): Don't use reinit_parse_for_function.
8452         * parse.c: Regenerated.
8453         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
8454         ERROR_MARK.
8455         (tsubst_expr): Don't use current_member_init_list
8456         and current_base_init_list.
8457         (tsubst_expr_values): Rename to ...
8458         (tsubst_initializer_list): ... this.  Use convert_from_reference.
8459         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
8460         and current_base_init_list.
8461         (begin_function_definition): Don't call reinit_parse_for_function.
8462
8463         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
8464
8465         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
8466         correctly.
8467
8468         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
8469
8470 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
8471
8472         * cp-tree.h (IF_COND): Move to c-common.h.
8473         (THEN_CLAUSE): Likewise.
8474         (ELSE_CLAUSE): Likewise.
8475         (WHILE_COND): Likewise.
8476         (WHILE_BODY): Likewise.
8477         (DO_COND): Likewise.
8478         (DO_BODY): Likewise.
8479         (RETURN_EXPR): Likewise.
8480         (EXPR_STMT_EXPR): Likewise.
8481         (FOR_INIT_STMT): Likewise.
8482         (FOR_COND): Likewise.
8483         (FOR_EXPR): Likewise.
8484         (FOR_BODY): Likewise.
8485         (SWITCH_COND): Likewise.
8486         (SWITCH_BODY): Likewise.
8487         (CASE_LOW): Likewise.
8488         (CASE_HIGH): Likewise.
8489         (GOTO_DESTINATION): Likewise.
8490         (COMPOUND_BODY): Likewise.
8491         (ASM_CV_QUAL): Likewise.
8492         (ASM_STRING): Likewise.
8493         (ASM_OUTPUTS): Likewise.
8494         (ASM_INPUTS): Likewise.
8495         (ASM_CLOBBERS): Likewise.
8496         (DECL_STMT_DECL): Likewise.
8497         (STMT_EXPR_STMT): Likewise.
8498         (LABEL_STMT_LABEL): Likewise.
8499         (SCOPE_BEGIN_P): Likewise.
8500         (SCOPE_END_P): Likewise.
8501         (SCOPE_STMT_BLOCK): Likewise.
8502         (SCOPE_NULLIFIED_P): Likewise.
8503         (SCOPE_NO_CLEANUPS_P): Likewise.
8504         (SCOPE_PARTIAL_P): Likewise.
8505         (ASM_VOLATILE_P): Likewise.
8506         (STMT_LINENO): Likewise.
8507         (STMT_LINENO_FOR_FN_P): Likewise.
8508
8509         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
8510         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
8511         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
8512         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
8513         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
8514
8515         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
8516
8517         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
8518         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
8519
8520         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
8521         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
8522         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
8523
8524 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
8525
8526         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
8527         * class.c (dfs_find_final_overrider): Set it appropriately.
8528         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
8529         avoid unneeded secondary vptrs.
8530
8531 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
8532
8533         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
8534         (check_bitfield_decl, check_field_decl): Likewise.
8535         (build_vtbl_or_vbase_field, build_base_field): Likewise.
8536         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
8537         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
8538         (xfer_tag, finish_enum): Likewise.
8539         * decl2.c (finish_builtin_type): Likewise.
8540         * init.c (init_init_processing): Likewise.
8541         * pt.c (instantiate_class_template): Likewise.
8542         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
8543         * cp-tree.h (struct lang_type): Add user_align member.
8544         (CLASSTYPE_USER_ALIGN): Define.
8545
8546 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
8547
8548         * Make-lang.in (c++.install-common): Install g++-cross in
8549         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
8550         $(target_alias)-g++ and $(target_alias)-c++.
8551
8552 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
8553
8554         * class.c (vcall_offset_data_s): Add last_init and fns.
8555         (overrides): Rename to same_signature_p.
8556         (dfs_find_final_overrider): Adjust accordingly.
8557         (mark_overriders): Likewise.
8558         (warn_hidden): Likewise.
8559         (build_vtbl_initializer): Reorganize machinery for building things
8560         at negative offsets.
8561         (build_vcall_and_vbase_vtbl_entries): Likewise.
8562         (build_vbase_offset_vtbl_entries): Likewise.
8563         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
8564         offset entries.  Do not create two entries for functions with the
8565         same signature.
8566         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
8567         (build_rtti_vtbl_entries): Reorganize machinery for building things
8568         at negative offsets.
8569
8570         * optimize.c (expand_call_inline): Don't recurse into the code
8571         used to initialize the parameters more than once.
8572
8573 2000-06-11  Mark Mitchell <mark@codesourcery.com>
8574
8575         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
8576         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
8577         (find_substitution): Only use the `Sa' substitution for
8578         std::allocator, not instantiations of it.
8579         (write_template_prefix): Move comment.  Only use a TREE_LIST to
8580         represent substitutions for a member template.
8581         (write_array_type): Mangle array dimensions correctly.
8582         * optimize.c (maybe_clone_body): Copy more information from the
8583         cloned function.
8584         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
8585         on the regenerated declaration.
8586
8587 2000-06-11  Chip Salzenberg  <chip@valinux.com>
8588             Mark Mitchell <mark@codesourcery.com>
8589
8590         * class.c (build_vtable): Clarify comment.
8591         (build_ctor_vtbl_group): Pass the most derived type to
8592         build_vtable.
8593
8594 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8595
8596         * decl2.c (compare_options): Don't needlessly cast away const-ness.
8597
8598 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
8599
8600         * decl.c (add_binding): Handle duplicate declarations of external
8601         variables.
8602
8603 2000-06-09  Chip Salzenberg  <chip@valinux.com>
8604             Mark Mitchell <mark@codesourcery.com>
8605
8606         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
8607         argument.
8608         (write_signed_number): New macro.
8609         (write_unsigned_number): Likewise.
8610         (write_source_name): Use them.
8611         (write_number): Handle signed and unsigned values.
8612         (write_integer_cst): Use tree_int_cst_sgn, and use
8613         write_unsigned_number or write_signed_number as appropriate.
8614         (write_discriminator): Use write_unsigned_number or
8615         write_signed_number as appropriate.
8616         (write_template_arg_literal): Likewise.
8617         (write_array_type): Use tree_low_cst.
8618         (write_template_parm):  Use write_unsigned_number or
8619         write_signed_number as appropriate.
8620         (write_substitution): Adjust call to write_number.
8621         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
8622         (write_expression): Handle non-type template arguments of
8623         reference type correctly.
8624         (mangle_thunk): Use write_signed_number.
8625
8626 2000-06-09  Chip Salzenberg  <chip@valinux.com>
8627
8628         * mangle.c (find_substition): Don't mangle objects with typename
8629         substitutions (e.g. "cin" as "Si").
8630
8631 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
8632
8633         * call.c (add_candidate): Use ggc_alloc_cleared.
8634         * decl.c (lookup_label): Likewise.
8635         * lex.c (retrofit_lang_decl): Likewise.
8636
8637 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
8638
8639         * semantics.c (expand_body): Push to TV_EXPAND.
8640         * optimize.c (optimize_function): Push to TV_INTEGRATION.
8641         * decl.c (start_function): Always call announce_function.
8642
8643         * tinfo2.cc: Just declare abort.
8644
8645 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
8646
8647         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
8648         whenever @ is a symbolic name.
8649
8650 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
8651
8652         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
8653
8654 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
8655
8656         * decl.c (pushdecl): Look up functions by DECL_NAME, not
8657         DECL_ASSEMBLER_NAME.
8658
8659 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
8660
8661         * decl2.c (c_language): Define.
8662
8663 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
8664
8665         * lex.c (lang_init_options): Tweak.
8666
8667         * decl2.c: Remove #inclusion of diagnostic.h
8668         (lang_decode_option): Move diagnostic formatting options to
8669         toplevel.
8670
8671         * lang-options.h: Remove documentation for diagnostic options.
8672
8673         * Makefile.in (lex.o): Depends upon diagnostic.h
8674
8675 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
8676
8677         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
8678         the same DECL_RESULT, it's not a redefinition.
8679         * pt.c (tsubst_decl): Remove code to handle illegal
8680         specializations.
8681
8682 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
8683
8684         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
8685
8686 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
8687
8688         * search.c (maybe_suppress_debug_info): Don't check
8689         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
8690
8691         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
8692         here if extern_p.
8693
8694         Remember instantiation context in deferred instantiations.
8695         * cp-tree.h (struct tinst_level): Remove.
8696         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
8697         * pt.c (current_tinst_level): Now a tree.
8698         (print_template_context, push_tinst_level, pop_tinst_level,
8699         tinst_for_decl): Adjust.
8700         (reopen_tinst_level): New fn.
8701         (init_pt): Register current_tinst_level as a root.
8702         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
8703         of the pending templates list.
8704         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
8705         * lex.c (extract_interface_info): Adjust.
8706         * decl2.c (warn_if_unknown_interface): Adjust.
8707
8708 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
8709
8710         * class.c (indirect_primary_base_p): New function.
8711         (determine_primary_base): Use it.
8712
8713 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8714
8715         Update new-abi dynamic cast algorithm.
8716         * tinfo.cc (__class_type_info::__dyncast_result): Add
8717         whole_details. Adjust constructor.
8718         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
8719         Avoid unnecessary searching.
8720         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
8721
8722 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8723
8724         * decl.c (init_decl_processing): Don't call record_component_aliases.
8725         * tree.c (build_cplus_array_type_1): Likewise.
8726
8727 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
8728
8729         * ir.texi: Correct typo.
8730         * mangle.c (write_expression): Handle non-type template arguments
8731         with reference type.
8732         * method.c (build_overload_value): Likewise.
8733         * pt.c (convert_nontype_argument): Explicitly represent conversion
8734         to a reference with an ADDR_EXPR.
8735         (unify): Always unify arguments in left-to-right order.
8736
8737 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
8738             Mark Mitchell  <mark@codesourcery.com>
8739
8740         * Make-lang.in (CXX_SRCS): Add mangle.c.
8741         * Makefile.in (CXX_OBJS): Add mangle.o.
8742         (mangle.o): New rule.
8743
8744         * class.c (local_classes): New variable.
8745         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
8746         (get_vtt_name): Use mangle_vtt_name for new ABI.
8747         (init_class_processing): Initialize local_classes.
8748         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
8749         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
8750         (std_identifier): New macro.
8751         (DECL_VOLATILE_MEMFUNC_P): New macro.
8752         (DECL_NAMESPACE_STD_P): Likewise.
8753         (local_classes): Declare.
8754         (get_mostly_instantiated_function_type): Declare.
8755         (init_mangle): Declare.
8756         (mangle_decl): Likewise.
8757         (mangle_type_string): Likewise.
8758         (mangle_type): Likewise.
8759         (mangle_typeinfo_for_type): Likewise.
8760         (mangle_typeinfo_string_for_type): Likewise.
8761         (mangle_vtbl_for_type): Likewise.
8762         (mangle_vtt_for_type): Likewise.
8763         (mangle_ctor_vtbl_for_type): Likewise.
8764         (mangle_thunk): Likewise.
8765         (mangle_conv_op_name_for_type): Likewise.
8766         (mangle_guard_variable): Likewise.
8767         * decl.c (pushtag): Keep track of local classes.
8768         (initialize_predefined_identifiers): Initialize std_identifier.
8769         (init_decl_processing): Use std_identifier.
8770         (start_decl): Don't treat instantiations as specializations.
8771         (grokdeclarator): Likewise.
8772         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
8773         name for fully-instantiated templates.
8774         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
8775         destructors with the new ABI.
8776         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
8777         (grokfield): Use mangle_type for new ABI.
8778         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
8779         (get_sentry): Use mangle_guard_variable for new ABI.
8780         (start_static_initialization_or_destruction): Likewise.
8781         * expr.c (extract_aggr_init): Remove.
8782         (extract_scalar_init): Likewise.
8783         (extract_init): Remove #if 0'd code.
8784         * mangle.c: New function.
8785         * method.c (build_mangled_name): Assert not flag_new_abi.
8786         (build_static_name): Likewise.
8787         (build_decl_overload_real): Likewise.
8788         (build_typename_overload): Likewise.
8789         (build_overload_with_type): Likewise.
8790         (build_overload_name): Likewise.
8791         (get_ctor_vtbl_name): Likewise.
8792         (start_squangling): Likewise.
8793         (get_id_2): Likewise.
8794         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
8795         (init_method): Call init_mangle for new ABI.
8796         (make_thunk): Call mangle_thunk for new ABI.
8797         * operators.def: Correct new ABI manglings for the `%' operator.
8798         Add `::' operator.
8799         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
8800         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
8801         (lookup_template_class): Call mangle_decl for new ABI.
8802         (get_mostly_instantiated_function_type): New function.
8803         (set_mangled_name_for_template_decl): Use it.
8804         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
8805         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
8806         conversion op names.
8807         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
8808         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
8809         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
8810         mangle_typeinfo_string_for_type.
8811
8812 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
8813
8814         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
8815         (INNERMOST_TEMPLATE_ARGS): New macro.
8816         (innermost_args): Remove.
8817         (get_innermost_template_args): New function.
8818         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
8819         * error.c (dump_function_decl): Be caution when using
8820         most_general_template.
8821         * method.c (build_template_parm_names):  Use
8822         INNERMOST_TEMPLATE_ARGS.
8823         * pt.c (add_to_template_args): Tidy comment
8824         (get_innermost_template_args): New function.
8825         (check_explicit_specialization): Clear DECL_INITIAL for a new
8826         specialization.
8827         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
8828         Tidy.
8829         (push_template_decl): Always register specializations of the most
8830         general template.
8831         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
8832         (coerce_template_parms): Likewise.
8833         (lookup_template_class): Likewise.
8834         (innermost_args): Remove.
8835         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
8836         (tsubst_decl): Handle tricky specializations.  Use
8837         get_innermost_template_args.
8838         (instantiate_template): Simplify handling of partial
8839         instantiations.
8840         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
8841         (most_general_template): Reimplement, in a more straightforward
8842         manner.
8843         (regenerate_decl_from_template): Tweak formatting.  Use
8844         TMPL_ARGS_DEPTH for clarity.
8845         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
8846
8847         * dump.c (dequeue_and_dump): Dump information about thunks.
8848
8849 2000-06-01  Richard Henderson  <rth@cygnus.com>
8850
8851         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
8852
8853 2000-06-01  Richard Henderson  <rth@cygnus.com>
8854
8855         * decl2.c (unsupported_options): Fix typo, make const.
8856         (lang_decode_option): Fix bsearch argument order.
8857
8858 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
8859
8860         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
8861         on FIELD_DECLs.
8862
8863 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8864
8865         * cp-tree.h (c_get_alias_set): Deleted.
8866         * Makefile.in (decl.o): Include ../expr.h.
8867         * decl.c (expr.h): Include.
8868         (init_decl_processing): Call record_component_aliases for arrays.
8869         (grokdeclarator): Likewise.
8870         Set TREE_ADDRESSABLE for fields that aren't bitfields.
8871         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
8872
8873 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
8874
8875         Remove guiding declaration support.
8876         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
8877         (flag_guiding_decls): Remove.
8878         * call.c (build_user_type_conversion_1): Remove support for
8879         guiding decls.
8880         (build_new_function_call): Likewise.
8881         (build_new_op): Likewise.
8882         (build_new_method_call): Likewise.
8883         * decl.c (start_function): Likewise.
8884         * friend.c (is_friend): Likewise.
8885         (do_friend): Likewise.
8886         * decl2.c ((flag_dump_translation_unit): Make it const.
8887         (flag_guiding_decls): Remove.
8888         (unsupported_options): New variable
8889         (compare_options): New function.
8890         (lang_decode_option): Use them.
8891
8892         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
8893
8894         * method.c (mangle_expression): Adjust test for legal expression
8895         operators.
8896
8897         * pt.c (instantiate_decl): Save and restore the local
8898         specializations list.
8899
8900 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
8901
8902         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
8903
8904 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
8905
8906         * call.c (add_template_candidate_real): Handle member template
8907         constructors for classes with virtual bases.
8908         (build_user_type_conversion_1): Use in_charge_arg_for_name.
8909         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
8910
8911         * ir.texi: Update thunk documentation.
8912
8913         * call.c (joust): Fix handling of overloaded builtin operators.
8914
8915 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
8916
8917         * cp-tree.h (DECL_ANTICIPATED): New macro.
8918         Document new use of DECL_LANG_FLAG_7.
8919         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
8920         in the user namespace.
8921         * lex.c (do_identifier): If the identifier's declaration has
8922         DECL_ANTICIPATED on, it has not yet been declared.  But do not
8923         replace it with an ordinary implicit declaration.
8924
8925         * tinfo2.cc: Include stdlib.h.
8926
8927 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
8928
8929         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
8930         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
8931         CLASSTYPE_ALIGN.
8932
8933 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
8934
8935         * decl2.c (lang_decode_option): Use skip_leading_substring instead
8936         of plain strncmp.
8937
8938 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
8939
8940         * operators.def (<?): Duplicated, should have been...
8941         (>?): this.  Fixed.
8942
8943 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
8944             Mark Mitchell  <mark@codesourcery.com>
8945
8946         * cp-tree.h (ansi_opname): Make it a macro.
8947         (ansi_assopname): Likewise.
8948         (struct lang_decl_flags): Add assignment_operator_p.
8949         (struct lang_decl): Add operator_code.
8950         (DECL_VTT_PARM): Adjust.
8951         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
8952         overloaded operator.
8953         (SET_OVERLOADED_OPERATOR_CODE): New macro.
8954         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
8955         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
8956         (opname_tab): Remove.
8957         (assignop_tab): Likewise.
8958         (operator_name_info_t): New type.
8959         (operator_name_info): New variable.
8960         (assignment_operator_name_info): Likewise.
8961         (build_cp_library_fn): Remove declaration.
8962         (push_cp_library_fn): Likewise.
8963         (operator_name_string): Likewise.
8964         (build_decl_overload): Likewise.
8965         * call.c (print_z_candidates): Simplify.
8966         (build_object_call): Adjust usage of ansi_opname.  Use
8967         DECL_OVERLOADED_OPERATOR_P.
8968         (op_error): Adjust operator name lookup.
8969         (build_conditional_expr): Adjust usage of ansi_opname.
8970         (build_new_op): Likewise.
8971         (build_op_delete_call): Likewise.
8972         (build_over_call): Likewise.
8973         (joust): Use DECL_OVERLOADED_OPERATOR_P.
8974         * decl.c (duplicate_decls): Copy operator_code.
8975         (init_decl_processing): Adjust parameters to push_cp_library_fn.
8976         (builtin_function): Adjust parameters to build_library_fn_1.
8977         (build_library_fn_1): Accept an overloaded operator code.
8978         (build_library_fn): Pass ERROR_MARK.
8979         (build_cp_library_fn): Accept an overloaded operator code.
8980         (push_cp_library_fn): Likewise.
8981         (grokfndecl): Tweak.
8982         (grokdeclarator): Simplify code to compute names of overloaded
8983         operators.  Adjust use of ansi_opname.
8984         (ambi_op_p): Work on tree_codes, not identifiers.
8985         (unary_op_p): Likewise.
8986         (grok_op_properties): Likewise.
8987         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
8988         (lang_mark_tree): Don't try to mark the operator_code.
8989         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
8990         * error.c (dump_decl): Remove special handling for operator
8991         names.
8992         (dump_function_name): Likewise.
8993         (dump_expr): Adjust name lookup of operators.
8994         (op_to_string): Simplify.
8995         (assop_to_string): Likewise.
8996         * init.c (build_new_1): Adjust use of ansi_opname.
8997         * lex.c (opname_tab): Remove.
8998         (assignop_tab): Likewise.
8999         (ansi_opname): Likewise.
9000         (ansi_assopname): Likewise.
9001         (operator_name_string): Likewise.
9002         (reinit_lang_specific): Likewise.
9003         (operator_name_info): New variable.
9004         (assignment_operator_name_info): Likewise.
9005         (init_operators): New function.
9006         (init_parse): Use it.
9007         (do_identifier): Adjust use of ansi_opname.
9008         * method.c (mangle_expression): Don't use ansi_opname for
9009         mangling.
9010         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
9011         (build_decl_overload): Remove.
9012         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
9013         (do_build_assign_ref): Adjust use of ansi_opname.
9014         (synthesize_method): Likewise.
9015         (implicitly_declare_fn): Likewise.
9016         * operators.def: New file.
9017         * parse.y (operator): Adjust use of ansi_opname.
9018         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
9019         (set_mangled_name_for_template_decl): Don't play games with
9020         current_namespace.
9021         (special_function_p): Adjust use of ansi_opname.
9022         * typeck.c (check_return_expr): Likewise.
9023         * Make-lang.in (cc1plus): Depend on operators.def.
9024         * Makefile.in (lex.o): Likewise.
9025         (decl.o): Likewise.
9026
9027 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
9028
9029         * Make-lang.in (cplib2.ready): Eradicate.
9030
9031 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9032
9033         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
9034         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
9035         (built_min, cp_tree_equal): Likewise.
9036
9037 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
9038
9039         * class.c (layout_nonempty_base_or_field): Replace
9040         `record_layout_info' with `record_layout_info_s'.
9041
9042 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
9043
9044         Fix goto checking.
9045         * cp-tree.h (struct language_function): x_named_labels is now
9046         a struct named_label_list*.
9047         * decl.c (struct named_label_use_list): Renamed from...
9048         (struct named_label_list): ...this.  New struct.
9049         (push_binding_level): Don't set eh_region.
9050         (note_level_for_eh): New fn.
9051         (pop_label): Take label and old value directly.
9052         (pop_labels): Adjust for new named_labels format.
9053         (lookup_label): Likewise.
9054         (poplevel): Note characteristics of a binding level containing a
9055         named label.  Mess with named label lists earlier.
9056         (mark_named_label_lists): New fn.
9057         (mark_lang_function): Call it.
9058         (use_label): New fn, split out from...
9059         (make_label_decl): ...here.  Don't call it.
9060         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
9061         check_previous_gotos): New fns, split out from...
9062         (define_label): ...here.
9063         (check_switch_goto): New fn.
9064         (define_case_label): Call it.
9065         (check_goto): New fn.
9066         * semantics.c (finish_goto_stmt): Call it and use_label.
9067         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
9068         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
9069
9070 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
9071
9072         * class.c (build_vtable_entry_ref): Correct usage of
9073         get_vtbl_decl_for_binfo.
9074
9075         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
9076         * method.c (implicitly_declare_fn): Not here.
9077
9078 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
9079
9080         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
9081         (CPTI_PTMD_DESC_TYPE): ... here.
9082         (ptmd_desc_type_node): Rename to ...
9083         (ptm_desc_type_node): ... here.
9084         * decl.c: Likewise.
9085         * rtti.c (ptmd_initializer): Rename to ...
9086         (ptm_initializer): ... here.
9087         (sythesize_tinfo_var): Adjust. Deal with pointer to member
9088         function.
9089         (create_tinfo_types): Adjust.
9090
9091 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
9092
9093         Finish implementation of VTTs.
9094         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
9095         CPTI_VTT_PARM_IDENTIFIER.
9096         (vtt_parm_identifier): New macro.
9097         (vtt_parm_type): Likewise.
9098         (BINFO_SUBVTT_INDEX): Likewise.
9099         (BINFO_VPTR_INDEX): Likewise.
9100         (struct lang_decl): Add vtt_parm.
9101         (DECL_VTT_PARM): New macro.
9102         (DECL_USE_VTT_PARM): Likewise.
9103         (DECL_NEEDS_VTT_PARM_P): Likewise.
9104         (get_vtt_name): Declare.
9105         (build_artificial_parm): Likewise.
9106         (fixup_all_virtual_upcast_offsets): Likewise.
9107         (expand_indirect_vtbls_init): Remove.
9108         * call.c (build_new_method_call): Pass the vtt to subobject
9109         constructors and destructors.
9110         * class.c (get_vtt_name): Give it external linkage.
9111         (build_clone): Handle the magic VTT parameters for clones.
9112         (clone_function_decl): Fix typo in comment.
9113         (build_vtt): Keep track of the indices in the VTTs where various
9114         entities are stored.
9115         (build_vtt_inits): Likewise.
9116         (dfs_build_vtt_inits): Likewise.
9117         (build_ctor_vtbl_group): Tweak type of construction vtables.
9118         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
9119         primary bases, when building construction vtables.
9120         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
9121         (initialize_predefined_identifiers): Add vtt_parm_identifier.
9122         (init_decl_processing): Initialize vtt_parm_type.
9123         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
9124         (lang_mark_tree): Make vtt_parm.
9125         * decl2.c (build_artificial_parm): New function.
9126         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
9127         (grokclassfn): Use build_artificial_parm.
9128         * init.c (initialize_vtbl_ptrs): Call
9129         fixup_all_virtual_upcast_offsets directly.
9130         (perform_member_init): Use the complete subobject destructor for
9131         member cleanups.
9132         (build_vtbl_address): New function.
9133         (expand_virtual_init): Handle VTTs.
9134         * optimize (maybe_clone_body): Likewise.
9135         * search.c (fixup_all_virtual_upcast_offsets): Give it external
9136         linkage.
9137         (expand_indirect_vtbls_init): Remove.
9138         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
9139         * tree.c (make_binfo): Make them bigger.
9140
9141 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
9142
9143         * inc/cxxabi.h (__pbase_type_info): Define, based on
9144         __pointer_type_info.
9145         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
9146         (__pointer_to_member_type_info): Likewise.
9147         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
9148         (__pointer_to_member_type_info::__is_pointer_p): Remove.
9149         (__pointer_type_info::__do_catch): Rename to ...
9150         (__pbase_type_info::__do_catch): ... here. Adjust.
9151         (__pbase_type_info::__pointer_catch): Implement.
9152         (__pointer_type_info::__pointer_catch): Adjust.
9153         (__pointer_to_member_type_info::__pointer_catch): Adjust.
9154
9155 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
9156
9157         * tinfo.h (__user_type_info::contained_virtual_p): New
9158         predicate.
9159         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
9160         shaped hierarchy.
9161         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
9162         diamond shaped hierarchy. Add early out for mixed diamond and
9163         duplicate shaped hierarchy.
9164
9165 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
9166
9167         * cp-tree.h (build_delete): Change prototype.
9168         (build_vec_delete): Likewise.
9169         * call.c (build_scoped_method_call): Use special_function_kind
9170         values to indicate the kind of destruction to be done.
9171         (build_method_call): Likewise.
9172         * decl.c (finish_destructor_body): Likewise.
9173         (maybe_build_cleanup_1): Likewise.  Rename to ...
9174         (maybe_build_cleanup): ... this.
9175         * decl2.c (delete_sanity): Use special_function_kind
9176         values to indicate the kind of destruction to be done.
9177         (build_cleanup): Likewise.
9178         * init.c (perform_member_init): Likewise.
9179         (build_vec_delete_1): Likewise.
9180         (build_dtor_call): Simplify.
9181         (build_delete): Use special_function_kind
9182         values to indicate the kind of destruction to be done.
9183         (build_vbase_delete): Likewise.
9184         (build_vec_delete): Likewise.
9185
9186         * init.c (sort_member_init): Fix typo in error message generation
9187         code.
9188
9189 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
9190
9191         * semantics.c (begin_class_definition): make the packed
9192         attribute be sensitive to the "-fpack-struct" command line flag
9193
9194 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
9195
9196         Update new-abi upcast algorithm.
9197         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
9198         prototype and meaning of return value.
9199         (__si_class_type_info::__do_upcast): Likewise.
9200         (__vmi_class_type_info::__do_upcast): Likewise.
9201         * tinfo.cc (__class_type_info::__upcast_result): Replace
9202         whole2dst with part2dst. Adjust ctor.
9203         (__class_type_info::__do_upcast): Adjust call of worker function.
9204         (__class_type_info::__do_upcast): Adjust.
9205         (__si_class_type_info::__do_upcast): Adjust. Use parent's
9206         __do_upcast.
9207         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
9208         virtual base in diamond hierarchy bug.
9209
9210 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
9211
9212         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
9213         and bitfield to tinfo_fn_p.
9214         (DECL_TINFO_FN_P): Adjust.
9215         (SET_DECL_TINFO_FN_P): Likewise.
9216         (DECL_MUTABLE_P): Likewise.
9217         (DECL_C_BIT_FIELD): Likewise.
9218         (SET_DECL_C_BIT_FIELD): Likewise.
9219         (CLEAR_DECL_C_BIT_FIELD): Likewise.
9220         (DECL_UNINLINABLE): Likewise.
9221         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
9222         (handle_using_decl): Remove assertion.
9223         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
9224         to build FIELD_DECLs.
9225         (build_base_field): Likewise.
9226         (layout_class_type): Likewise.
9227         * decl.c (init_decl_processing): Likewise.
9228         (build_ptrmemfunc_type): Likewise.
9229         (grokdeclarator): Likewise.
9230         * decl2.c (grok_x_components): Likewise.
9231         * except.c (call_eh_info): Likewise.
9232         * init.c (init_init_processing): Likewise.
9233         * rtti.c (expand_class_desc): Likewise.
9234         (create_pseudo_type_info): Likewise.
9235         (get_vmi_pseudo_type_info): Likewise.
9236         (create_tinfo_types): Likewise.
9237         * ptree.c (print_lang_decl): Adjust.
9238         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
9239         before checking DECL_MUTABLE_P.
9240
9241         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
9242         parameters for template functions.
9243         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
9244         destructors as well as constructors.
9245
9246 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
9247
9248         * class.c (build_ctor_vtbl_group): Set inits.
9249         * optimize.c (maybe_clone_body): Set DECL_INLINE and
9250         DECL_THIS_INLINE appropriately for clones.
9251
9252         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
9253         (DECL_CONV_FN_P): Simplify.
9254         (DECL_OPERATOR): Remove.
9255         (language_to_string): Declare.
9256         * decl.c (duplicate_decls): Fix typo in comment.
9257         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
9258         (grok_op_properties): Use DECL_CONV_FN_P instead of
9259         IDENTIFIER_TYPENAME_P.
9260         * dump.c (dequeue_and_dump): Dump the language linkage of
9261         declarations.
9262         * error.c (language_to_string): Give it external linkage.
9263         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
9264         (implicitly_declare_fn): Set DECL_LANGUAGE.
9265         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
9266         IDENTIFIER_TYPENAME_P.
9267         (tsubst_decl): Likewise.
9268         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
9269         * semantics.c (finish_member_declaration): Don't mark members of
9270         classes declared in an extern "C" region as extern "C".
9271
9272 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9273
9274         * decl2.c (qualified_lookup_using_namespace): Look through
9275         namespace aliases.
9276
9277         * decl.c (push_using_decl): Return the old decl on namespace level.
9278
9279 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
9280
9281         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
9282         (VTT_NAME_PREFIX): New macro.
9283         (CTOR_VTBL_NAME_PREFIX): Likewise.
9284         (get_ctor_vtbl_name): New function.
9285         * class.c (get_vtable_name): Simplify.
9286         (get_vtt_name): New function.
9287         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
9288         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
9289         when a virtual base becomes primary.
9290         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
9291         VTTs.
9292         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
9293         additional parameters.
9294         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
9295         (initialize_array): New function.
9296         (build_vtt): Likewise.
9297         (build_vtt_inits): Likewise.
9298         (dfs_build_vtt_inits): Likewise.
9299         (dfs_fixup_binfo_vtbls): Likewise.
9300         (build_ctor_vtbl_group): Likewise.
9301         (initialize_vtable): Use initialize_array.
9302         (accumulate_vtbl_inits): Reimplement to handle construction
9303         vtables.
9304         (dfs_accumulate_vtbl_inits): Likewise.
9305         (bulid_vtbl_initializer): Adjust parameter name.
9306         * method.c (build_typename_overload): Remove #if 0'd code.
9307         (get_ctor_vtbl_name): New function.
9308         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
9309         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
9310
9311         * cp-tree.h (struct lang_type): Remove search_slot.
9312         (CLASSTYPE_SEARCH_SLOT): Remove.
9313         (emit_base_init): Change prototype.
9314         (initialize_vtbl_ptrs): Likewise.
9315         (expand_indirect_vtbls_init): Likewise.
9316         (clear_search_slots): Remove.
9317         * decl.c (lang_mark_tree): Don't mark search_slot.
9318         * init.c (initialize_vtbl_ptrs): Simplify.
9319         (emit_base_init): Likewise.
9320         * search.c (struct vbase_info): Document decl_ptr.
9321         (convert_pointer_to_single_level): Remove.
9322         (dfs_find_vbases): Remove.
9323         (dfs_init_base_pointers): Simplify.
9324         (dfs_clear_vbase_slots): Remove.
9325         (dfs_vtable_path_unmark): New function.
9326         (init_vbase_pointers): Simplify.
9327         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
9328         (expand_indirect_vtbls_init): Simplify.  Don't call
9329         mark_all_temps_used.
9330         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
9331         initialize_vtbl_ptrs.
9332
9333 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
9334
9335         * except.c: Add static prototypes.
9336
9337 2000-05-20  H.J. Lu  <hjl@gnu.org>
9338
9339         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
9340
9341 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
9342
9343         Don't create a separate copy of virtual bases for the
9344         CLASSTYPE_VBASECLASSES list.
9345         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
9346         (BINFO_FOR_VBASE): Remove.
9347         (CANONICAL_BINFO): Adjust.
9348         (binfo_for_vbase): New function.
9349         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
9350         instead of BINFO_FOR_VBASE.
9351         (build_vbase_pointer): Likewise.
9352         (build_secondary_vtable): Likewise.
9353         (dfs_mark_primary_bases): Likewise.
9354         (mark_primary_bases): Likewise.
9355         (layout_nonempty_base_or_field): Likewise.
9356         (dfs_set_offset_for_shared_vbases): Likewise.
9357         (dfs_set_offset_for_unshared_vbases): Likewise.
9358         (layout_virtual_bases): Likewise.  Adjust for changes to the
9359         CLASSTYPE_VBASECLASSES list.
9360         (dump_class_hierarchy_r): Use binfo_for_vbase
9361         instead of BINFO_FOR_VBASE.
9362         (dump_class_hierarchy): Likewise.
9363         (finish_vtbls): Likewise.
9364         (build_vtbl_initializer): Adjust for changes to the
9365         CLASSTYPE_VBASECLASSES list.
9366         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
9367         * decl.c (finish_destructor_body): Adjust for changes to the
9368         CLASSTYPE_VBASECLASSES list.
9369         * init.c (sort_base_init): Use binfo_for_vbase.
9370         (construct_virtual_bases): Adjust for changes to the
9371         CLASSTYPE_VBASECLASSES list.
9372         (expand_member_init): Use binfo_for_vbase.
9373         (build_vbase_delete):  Adjust for changes to the
9374         CLASSTYPE_VBASECLASSES list.
9375         * method.c (do_build_copy_constructor): Likewise.
9376         * rtti.c (get_base_offset): Use binfo_for_vbase.
9377         (expand_class_desc): Remove #if 0'd code.
9378         * search.c (struct vbase_info): Remove vbase_types.
9379         (get_base_distance):  Use binfo_for_vbase.
9380         (lookup_field_queue_p): Use CANONICAL_BINFO.
9381         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
9382         (get_pure_virtuals): Adjust for changes to the
9383         CLASSTYPE_VBASECLASSES list.
9384         (dfs_find_vbases): Use binfo_for_vbase.
9385         (dfs_init_vbase_pointers): Likewise.
9386         (init_vbase_pointers): Don't initialize vi.vbase_types.
9387         (virtual_context): Use binfo_for_vbase.
9388         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
9389         CLASSTYPE_VBASECLASSES list.
9390         (expand_indirect_vtbls_init): Simplify.
9391         (dfs_get_vbase_types): Don't replicate virtual bases.
9392         (find_vbase_instance): Use binfo_for_vbase.
9393         (binfo_for_vbase): New function.
9394         * typeck.c (get_delta_difference): Use binfo_for_vbase.
9395
9396 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
9397
9398         * decl2.c (finish_anon_union): Generalize error messages to handle
9399         anonymous structures.
9400         * init.c (perform_member_init): Remove `name' parameter.
9401         (build_field_list): New function.
9402         (sort_member_init): Handle anonymous union initialization order
9403         correctly.  Check for multiple initializations of the same union.
9404         (emit_base_init): Don't look up fields by name here.
9405         (expand_member_init): Record the result of name lookup for future
9406         reference.
9407         * typeck.c (build_component_ref): Fix formatting.
9408
9409 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
9410
9411         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
9412         * typeck.c (build_x_compound_expr): Replace warn_unused with
9413         warn_unused_value.
9414
9415         * decl2.c (lang_decode_option): Update -Wall unused flags by
9416         calling set_Wunused.
9417
9418 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
9419
9420         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
9421         * init.c (dfs_vtable_path_unmark): Remove.
9422         * search.c (marked_new_vtable_p): Likewise.
9423         (unmarked_new_vtable_p): Likewise.
9424         (dfs_search_slot_nonempty_p): Likewise.
9425         (dfs_mark): Likewise.
9426         (dfs_vtable_path_unmark): Likewise.
9427         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
9428         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
9429         (dfs_init_vbase_pointers): Remove special-case new ABI code.
9430         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
9431         (init_vbase_pointers): Simplify.
9432         (expand_indirect_vtbls_init): Likewise.
9433
9434         * class.c (copy_virtuals): New function.
9435         (build_primary_table): Use it.
9436         (build_secondary_vtable): Likewise.
9437         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
9438         indicate that no vcall offset is required.
9439         (add_virtual_function): Likewise.
9440         (modify_all_vtables): Likewise.
9441         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
9442         (dfs_accumulate_vtbl_inits): Likewise.
9443         (build_vtbl_initializer): Make changes to handle construction
9444         vtables.
9445         (dfs_build_vcall_offset_vtbl_entries): Likewise.
9446         (build_rtti_vtbl_entries): Likewise.
9447         (build_vtable_entries): Handle a NULL vcall_index.
9448
9449 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
9450
9451         * decl2.c (lang_decode_option): Fix thinko.
9452
9453 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
9454
9455         * except.c (check_handlers): New fn.
9456         * cp-tree.h: Declare it.
9457         * semantics.c (finish_handler_sequence): Call it.
9458         (finish_function_handler_sequence): Likewise.
9459         (finish_handler_parms): Set TREE_TYPE on the handler.
9460         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
9461         * search.c (get_base_distance_recursive): If protect>1, ignore
9462         special access.
9463         (get_base_distance): Don't reduce watch_access.
9464
9465 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
9466
9467         * lex.c: #include diagnostic.h.
9468         (lang_init_options): Set default prefixing rules.
9469
9470         * lang-options.h: Add -fdiagnostics-show-location=.
9471
9472         * decl2.c: #include diagnostic.h.
9473         (lang_decode_option): Handle -fdiagnostics-show-location=.
9474
9475 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
9476
9477         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
9478         * vec.cc: Revert my 2000-05-07 change.
9479
9480 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
9481
9482         * class.c (check_field_decls): Complain about non-static data
9483         members with same name as class in class with constructor.
9484
9485 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
9486
9487         * decl.c (grokdeclarator): Allow non-static data members with
9488         same name as class.
9489
9490 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
9491
9492         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
9493         and pending_inline.filename.  Update prototypes.
9494         * decl.c (define_label): Constify filename parameter.
9495         * decl2.c (warn_if_unknown_interface): Constify local char *.
9496         * input.c Constify input_source.filename. Don't declare
9497         input_filename or lineno.  Constify filename parameter to feed_input.
9498         * lex.c (init_parse): Constify parameter and return value.
9499         (cp_pragma_interface, cp_pragma_implementation): Constify
9500         filename argument.
9501         (reinit_parse_for_method, reinit_parse_for_block,
9502         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
9503         Constify local char *.
9504         * pt.c: Don't declare lineno or input_filename.
9505         (print_template_context, tsubst_friend_function, tsubst_decl,
9506         tsubst, instantiate_decl): Constify local char *.
9507         * semantics.c (expand_body): Constify local char *.
9508         * tree.c (build_srcloc): Constify filename parameter.
9509         * typeck.c (c_expand_asm_operands): Constify filename
9510         parameter.
9511
9512 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
9513
9514         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
9515         offsetof expansion.
9516
9517 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
9518
9519         * inc/cxxabi.h:  Fix typos in comment.
9520         (__base_class_info::__offset): Use a static_cast.
9521
9522 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
9523
9524         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
9525         of std::size_t and std::ptrdiff_t respectively.
9526         * tinfo.cc: Likewise.
9527         * vec.cc: Likewise.
9528
9529 2000-05-06  Richard Henderson  <rth@cygnus.com>
9530
9531         * typeck.c (build_c_cast): Don't warn integer->pointer size
9532         mismatch for constants.
9533
9534 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
9535
9536         * rtti.c (ptmd_initializer): Set non-public, if class is
9537         incomplete.
9538
9539         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
9540         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
9541         __cxa_vec_delete): Likewise.
9542         * tinfo.cc (__dynamic_cast): Likewise.
9543         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
9544         __cxa_vec_delete): Likewise.
9545
9546 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
9547
9548         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
9549         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
9550         (lang_decl_flags): Add vcall_offset.
9551         (THUNK_VCALL_OFFSET): Use it.
9552         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
9553         * method.c (make_thunk): Create the lang_decl here, not in
9554         emit_thunk.
9555         (emit_thunk): Make generic thunks into ordinary functions once
9556         they have been fed to expand_body.
9557         * semantics.c (expand_body): Set current_function_is_thunk here.
9558
9559 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9560
9561         * class.c (update_vtable_entry_for_fn): Prototype.
9562
9563         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
9564         and `tmpl'.
9565
9566         * search.c (dfs_build_inheritance_graph_order): Prototype.
9567
9568 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
9569
9570         * cp-tree.h (special_function_kind): Add various kinds of
9571         destructors.
9572         (special_function_p): New function.
9573         * class.c (overrides): Don't let one kind of destructor override
9574         another.
9575         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
9576         whether or not to instantiate a template.
9577         * tree.c (special_function_p): Define.
9578
9579 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
9580
9581         * cp-tree.def (THUNK_DECL): Remove.
9582         * cp-tree.h (DECL_THUNK_P): New macro.
9583         (DECL_NON_THUNK_FUNCTION_P): Likewise.
9584         (DECL_EXTERN_C_FUNCTION_P): Likewise.
9585         (SET_DECL_THUNK_P): Likewise.
9586         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
9587         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
9588         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
9589         * decl.c (decls_match): Use DECL_EXTERN_C_P.
9590         (duplicate_decls): Likewise.
9591         (pushdecl): Likewise.  Adjust thunk handling.
9592         (grokfndecl): Use DECL_EXTERN_C_P.
9593         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
9594         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
9595         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
9596         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
9597         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
9598         DECL_NO_STATIC_CHAIN.
9599         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
9600         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
9601         * search.c (covariant_return_p): Remove THUNK_DECL handling.
9602         * ir.texi: Update.
9603
9604 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
9605
9606         * tree.c (walk_tree): Set lineno.
9607
9608 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
9609
9610         * exception.cc: Update license notice.
9611         * new.cc: Likewise.
9612         * new1.cc: Likewise.
9613         * new2.cc: Likewise.
9614         * tinfo.cc: Likewise.
9615         * tinfo2.cc: Likewise.
9616         * vec.cc: Likewise.
9617         * inc/cxxabi.h: Likewise.
9618         * inc/exception: Likewise.
9619         * inc/new: Likewise.
9620         * inc/new.h: Likewise.
9621         * inc/typeinfo: Likewise.
9622
9623 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
9624
9625         * tree.c (build_target_expr_with_type): If we already have a
9626         TARGET_EXPR, just return it.
9627
9628         * optimize.c (initialize_inlined_parameters): Don't generate an
9629         EXPR_STMT if we can just use DECL_INITIAL.
9630         * decl.c (emit_local_var): Only make the initialization a
9631         full-expression if stmts_are_full_exprs_p.
9632
9633 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
9634
9635         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
9636         macro.
9637         * call.c (standard_conversion): Use it.
9638         (direct_reference_binding): Likewise.
9639         (build_over_call): Likewise.
9640         (is_properly_derived_from): Likewise.
9641         (compare_ics): Likewise.
9642         * class.c (resolves_to_fixed_type_p): Likewise.
9643         * optimize.c (declare_return_variable): Likewise.
9644         * pt.c (is_specialization_of): Likewise.
9645         (unify): Likewise.
9646         * typeck.c (comp_target_parms): Likeiwse.
9647         (build_static_cast): Likewise.
9648         (build_reinterpret_cast): Likewise.
9649         (build_const_cast): Likewise.
9650         (comp_ptr_ttypes_real): Likewise.
9651         (comp_ptr_ttypes_const): Likewise.
9652         * typeck2.c (process_init_constructor): Likewise.
9653
9654 2000-04-30  Scott Snyder <snyder@fnal.gov>
9655
9656         * decl.c (finish_destructor_body): Use the base destructor when
9657         destroying virtual bases.
9658
9659 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
9660
9661         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
9662         STMT_EXPRs.
9663         * optimize.c (struct inline_data): Add target_exprs field.
9664         (declare_return_variable): When a function returns an aggregate,
9665         use the variable declared in the TARGET_EXPR as the remapped
9666         DECL_RESULT.
9667         (expand_call_inline): Update the pending target_exprs stack.
9668         (optimize_function): Initialize the stack.
9669
9670         * decl2.c (finish_file): Fix typo in comment.
9671
9672         * method.c (emit_thunk): Don't try to return a `void' value.
9673
9674         * optimize.c (initialize_inlined_parameters): If the parameter is
9675         addressable, we need to make a new VAR_DECL, even if the
9676         initializer is constant.
9677
9678 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
9679
9680         * decl.c (grok_op_properties): Add an extra check of argtypes.
9681
9682 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
9683
9684         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
9685         variables.
9686         (initialize_inlined_parameters): Try to avoid creating new
9687         VAR_DECLs.
9688
9689 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
9690
9691         * lex.c (my_get_run_time): Remove.
9692         (init_filename_times): Use get_run_time instead of my_get_run_time.
9693         (check_newline): Likewise.
9694         (dump_time_statistics): Likewise.
9695         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
9696         of computing elapsed time explicitly.
9697
9698 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
9699
9700         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
9701         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
9702         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
9703         before calling decl_constant_value.
9704         * class.c (check_bitfield_decl): Likewise.
9705         * cvt.c (ocp_convert): Likewise.
9706         (convert): Likewise.
9707         * decl.c (compute_array_index_type): Likewise.
9708         (build_enumerator): Likewise.
9709         * decl2.c (check_cp_case_value): Likewise.
9710         * pt.c (convert_nontype_argument): Likewise.
9711         (tsubst): Likewise.
9712         * typeck.c (decay_conversion): Likewise.
9713         (build_compound_expr): Likewise.
9714         (build_reinterpret_cast): Likewise.
9715         (build_c_cast): Likewise.
9716         (convert_for_assignment): Likewise.
9717
9718 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
9719
9720         * decl.c (finish_function): Don't play games with DECL_INLINE.
9721
9722 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
9723
9724         * ir.texi: Correct typo.
9725
9726 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9727
9728         * decl.c (grokdeclarator): Reject VLAs as members.
9729
9730 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
9731
9732         * call.c (standard_conversion): Accept conversion between
9733         COMPLEX_TYPEs.
9734
9735         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
9736
9737 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
9738
9739         * decl2.c (finish_file): Remove double setup for accounting
9740         compile time.
9741
9742 2000-04-24  Robert Lipe <robertlipe@usa.net>
9743
9744         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
9745
9746 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
9747
9748         * new.cc (set_new_handler): Needs to be in std::.
9749
9750 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
9751
9752         * cp-tree.h (lang_decl): Remove pretty_function_p.
9753         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
9754         language-specific node.
9755         * decl.c (cp_make_fname_decl): Use build_decl, not
9756         build_lang_decl, to build the variables.
9757         (grokvardecl): Don't call build_lang_decl for local variables in
9758         templates.
9759         (grokdeclarator): Don't call build_lang_decl for local type
9760         declarations in templates.
9761         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
9762         zero'd memory, rather than calling memset.
9763         * pt.c: Include hashtab.h.
9764         (local_specializations): New variable.
9765         (retrieve_local_specialization): Use it.
9766         (register_local_specialization): Likewise.
9767         (tsubst_decl): Don't assume local variables have
9768         DECL_LANG_SPECIFIC.
9769         (instantiate_decl): Set up local_specializations.
9770         * Makefile.in (HTAB_H): New variable.
9771
9772 2000-04-23  Richard Henderson  <rth@cygnus.com>
9773
9774         * typeck.c (c_expand_asm_operands): Restore the original
9775         contents of the output list.
9776
9777 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
9778
9779         * ir.texi:  Document complex number representation.
9780
9781 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
9782
9783         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
9784         (target_incomplete_p): New function.
9785         (tinfo_base_init): Create comdat NTBS name variable.
9786         (ptr_initializer): Add non_public parameter. Calculate it.
9787         (ptmd_initializer): Likewise.
9788         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
9789         (create_real_tinfo_var): Add non_public parameter. Use it.
9790         Push proxy into global namespace.
9791         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
9792         New enumeration.
9793         * inc/typeinfo (type_info::before, type_info::operator==):
9794         Compare __name addresses.
9795
9796         * tinfo2.cc: Remove new-abi builtins comment.
9797
9798 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
9799
9800         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
9801
9802         * call.c (joust): Exit early if we get the same function, too.
9803
9804         * decl2.c (key_method): Return NULL_TREE for template classes.
9805         (import_export_class): Don't need to check for template classes.
9806
9807 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
9808
9809         * lex.c: Remove references to cccp.c.
9810
9811 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
9812
9813         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
9814         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
9815         (DECL_DESTRUCTOR_P): Use destructor_attr.
9816         (DECL_CONST_MEMFUNC_P): Reimplement.
9817         (DECL_VOLATILE_MEMFUNC_P): Remove.
9818         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
9819         (overrides): Use DECL_DESTRUCTOR_P.
9820         (check_for_override): Likewise.
9821         * decl.c (start_function): Likewise.
9822         * decl2.c (grokfclassfn): Likewise.
9823         (check_classfn): Likewise.
9824         (grok_function_init): Likewise.
9825
9826 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
9827
9828         * decl2.c (grokfield): Issue error on illegal data member
9829         declaration.
9830
9831 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
9832
9833         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
9834
9835 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
9836
9837         * class.c (build_vtable_entry): Don't build thunks for type-info
9838         functions.
9839
9840 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
9841
9842         * decl.c (decls_match): Allow a redeclaration of a builtin to
9843         specify args while the builtin did not.
9844
9845 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
9846
9847         * cp-tree.def (THUNK_DECL): Add to documentation.
9848         * cp-tree.h (flag_huge_objects): Declare.
9849         * class.c (modify_vtable_entry): Tidy.
9850         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
9851         Calculate delta appropriately for the new ABI.
9852         (dfs_modify_vtables): Use it.
9853         (modify_all_vtables): Fix thinko in code to add overriding copies
9854         of functions to primary vtables.
9855         (build_clone): Fix typo in comment.
9856         (clone_function_decl): Correct order of destructors in vtable.
9857         (build_vbase_offset_vtbl_entries): Adjust comment.
9858         (dfs_vcall_offset_queue_p): Remove.
9859         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
9860         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
9861         (build_vtable_entry): Correct check for pure virtual functions.
9862         Don't declare flag_huge_objects.
9863         * decl.c (flag_huge_objects): Remove declaration.
9864         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
9865         Use int_size_in_bytes.
9866         (emit_thunk): Handle vcall offset thunks.
9867
9868 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9869
9870         * decl2.c (parse_time, varconst_time): Delete declarations.
9871         (finish_file): Delete LINENO declaration.
9872         START_TIME and THIS_TIME now long.
9873
9874 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
9875
9876         * class.c (build_base_field): Reformat comment.
9877
9878         * inc/cxxabi.h (stddef.h): Comment inclusion.
9879         (__base_class_info::__offset): Comment shift.
9880
9881 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
9882
9883         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
9884         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
9885         (cp_push_exception_identifier): New macro.
9886         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
9887         (DECL_BASE_DESTRUCTOR_P): Likewise.
9888         (DECL_DELETING_DESTRUCTOR_P): Likewise.
9889         (get_vtbl_decl_for_binfo): Fix formatting.
9890         (in_charge_arg_for_name): New macro.
9891         (maybe_build_cleanup_and_delete): Remove declaration.
9892         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
9893         (in_charge_arg_for_name): New function.
9894         (build_new_method_call): Use it.  Handle cloned destructors.
9895         (build_clone): Don't make the base constructor virtual.
9896         Automatically defer generated functions.
9897         (clone_function_decl): Handle destructors, too.
9898         (clone_constructors_and_destructors): Likewise.
9899         (create_vtable_ptr): Don't create a vtable entry for a cloned
9900         function.
9901         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
9902         (initialize_predefined_identifiers): Update appropriately.
9903         (finish_destructor_body): Simplify.
9904         (maybe_build_cleanup_and_delete): Remove.
9905         * except.c (expand_throw): Handle new-ABI destructors.
9906         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
9907         (build_dtor_call): New function.
9908         (build_delete): Use it.  Simplify.
9909         * optimize.c (maybe_clone_body): Handle destructors.
9910         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
9911
9912         * exception.cc (cleanup_fn): New typedef.
9913         (CALL_CLEANUP): New macro.
9914         (cp_eh_info): Use them.
9915         (__cp_push_exception): Likewise.
9916         (__cp_pop_exception): Likewise.
9917
9918 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
9919
9920         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
9921         (complete_dtor_identifier): New macro.
9922         (CLASSTYPE_FIRST_CONVERSION): Remove.
9923         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
9924         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
9925         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
9926         (CLASSTYPE_CONSTRUCTORS): Likewise.
9927         (CLASSTYPE_DESTRUCTORS): Likewise.
9928         (lang_decl): Add cloned_function.
9929         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
9930         (DECL_BASE_CONSTRUCTOR_P): Likewise.
9931         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
9932         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
9933         (DECL_CLONED_FUNCTION_P): Likewise.
9934         (DECL_CLONED_FUNCTION): Likewise.
9935         (clone_function_decl): Declare.
9936         (maybe_clone_body): Likewise.
9937         * call.c (build_user_type_conversion_1): Call complete object
9938         constructors in the new ABI.
9939         (build_new_method_call): Don't add in-charge parameters under the
9940         new ABI.
9941         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
9942         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
9943         CLASSTYPE_DESTRUCTOR_SLOT.
9944         (build_clone): New function.
9945         (clone_function_decl): Likewise.
9946         (clone_constructors_and_destructors): Likewise.
9947         (check_bases_and_members): Use it.
9948         * decl.c (iniitialize_predefined_identifiers): Initialize
9949         complete_dtor_identifier.
9950         (finish_function): Don't add extra code to a clone.
9951         (lang_mark_tree): Mark cloned_function.
9952         * decl2.c (mark_used): Don't bother trying to instantiate things
9953         we synthesized.
9954         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
9955         * method.c (set_mangled_name_for_decl): Don't treat clones as
9956         constructors.
9957         (synthesize_method): Sythesize cloned functions, not the clones.
9958         * optimize.c (inline_data): Update comment on ret_label.
9959         (remap_block): Don't assume DECL_INITIAL exists.
9960         (copy_body_r): Allow ret_label to be NULL.
9961         (maybe_clone_body): Define.
9962         * pt.c (tsubst_decl): Handle clones.
9963         (instantiate_clone): New function.
9964         (instantiate_template): Use it.
9965         (set_mangled_name_for_template_decl): Don't treat clones as
9966         constructors.
9967         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
9968         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
9969         * semantics.c (expand_body): Clone function bodies as necessary.
9970
9971         * optimize.c (remap_decl): Avoid sharing structure for arrays
9972         whose size is only known at run-time.
9973         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
9974
9975         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
9976         to has_in_charge_parm_p.
9977         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
9978         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
9979         (DECL_COPY_CONSTRUCTOR_P): New macro.
9980         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
9981         (build_user_type_conversion_1): Likewise.
9982         (convert_like_real): Likewise.
9983         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
9984         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
9985         (copy_args_p): Likewise.
9986         (grok_ctor_properties): Likewise.
9987         (start_function): Likewise.
9988         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
9989         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
9990         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
9991         * method.c (do_build_copy_constructor): Use
9992         DECL_HAS_IN_CHARGE_PARM_P.
9993         (synthesize_method): Likewise.
9994         * pt.c (instantiate_template): Remove goto.
9995         * tree.c (build_cplus_method_type): Remove mention of obstacks in
9996         comment.
9997
9998         * cp-tre.h (finish_function): Change prototype.
9999         * decl.c (end_cleanup_fn): Adjust caller.
10000         (finish_function): Take only one parameter.
10001         * decl2.c (finish_objects): Adjust caller.
10002         (finish_static_storage_duration_function): Likewise.
10003         * method.c (emit_thunk): Likewise.
10004         * parse.y: Likewise.
10005         * parse.c: Regenerated.
10006         * pt.c (instantiate_decl): Likewise.
10007         * rtti.c (synthesize_tinfo_fn): Likewise.
10008         * semantics.c (expand_body): Likewise.
10009
10010         * cp-tree.h (copy_decl): New function.
10011         * class.c (finish_struct_1): Use it.
10012         * lex.c (copy_decl): Define it.
10013         * pt.c (tsubst_decl): Likewise.
10014         * tree.c (copy_template_template_parm): Likewise.
10015
10016         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
10017         has_nonpublic_assign_ref.
10018         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
10019         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
10020         * class.c (finish_struct_methods): Don't set
10021         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
10022         (interface_only): Don't declare.
10023         (interface_unknown): Likewise.
10024
10025 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10026
10027         * tree.h (HAVE_TEMPLATES): Remove definition.
10028         * lang-options.h (-fthis-is-variable): Remove documentation.
10029
10030 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
10031
10032         * class.c (instantiate_type): Handle object-relative template-id.
10033
10034         * semantics.c (finish_expr_stmt): Call convert_to_void here.
10035         * decl.c (cplus_expand_expr_stmt): Not here.
10036
10037         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
10038         Initialize exprtype earlier.
10039
10040         * parse.y (fn.def1): Check for defining types in return types.
10041
10042         * decl.c (check_tag_decl): Notice extra fundamental types.
10043         Diagnose empty decls in classes, too.
10044
10045         * decl.c (grokdeclarator): Don't override an anonymous name if no
10046         declarator was given.
10047
10048         * cvt.c (convert_to_void): Call resolve_offset_ref.
10049
10050         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
10051
10052         * decl2.c (decl_namespace): Handle getting a type.
10053
10054         * typeck.c (build_c_cast): Re-enable warning for cast between
10055         pointer and integer of different size.
10056
10057 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
10058
10059         * inc/cxxabi.h (__pointer_type_info): Add restrict and
10060         incomplete flags.
10061         (__pointer_type_info::__pointer_catch): New virtual function.
10062         (__pointer_to_member_type_info): Derive from
10063         __pointer_type_info. Adjust.
10064         (__pointer_to_member_type_info::__do_catch): Remove.
10065         (__pointer_to_member_type_info::__is_pointer_p): Declare.
10066         (__pointer_to_member_type_info::__pointer_catch): Declare.
10067         * rtti.c (qualifier_flags): Add restrict flag.
10068         (ptmd_initializer): Reorder members.
10069         (create_tinfo_types): Expand comments. Reorder
10070         ptmd_desc_type_node members.
10071         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
10072         Implement.
10073         (__pointer_type_info::__do_catch): Move specific code into
10074         __pointer_catch. Call it.
10075         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
10076         specific catch checking. Fix void conversion check.
10077         (__pointer_to_member_type_info::__do_catch): Remove.
10078         (__pointer_to_member_type_info::__pointer_catch): Implement.
10079
10080 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10081
10082         * lex.c (init_parse): Remove traces of classof and headof.
10083         * decl2.c (flag_operator_names): Default to 1.
10084         (lang_decode_option): Do not set it for -ansi.
10085
10086 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
10087
10088         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
10089         (DECL_MAIN_VARIANT): Remove.
10090         * decl.c (duplicate_decls): Don't set it.
10091         (start_function): Likewise.
10092         (lang_mark_tree): Don't mark it.
10093         * decl2.c (defer_fn): Don't use it.
10094         * lex.c (retrofit_lang_decl): Don't set it.
10095         * pt.c (tsubst_decl): Likewise.
10096         * ptree.c (print_lang_decl): Don't print it.
10097         * typeck.c (mark_addressable): Don't use it.
10098
10099 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
10100
10101         * vec.cc: Include <new> and <exception>.
10102         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
10103         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
10104         terminate.
10105         (__cxa_vec_delete): Catch dtor exceptions.
10106
10107 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
10108
10109         Prepend __ to implementation defined names.
10110         * inc/typeinfo (type_info): Rename _name to __name.
10111         (type_info::type_info): Rename parameter.
10112         (type_info::operator==, type_info::operator!=,
10113         type_info::before): Likewise.
10114         (type_info::is_pointer_p, type_info::is_function_p,
10115         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
10116         parameters.
10117         * inc/cxxabi.h
10118         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
10119         (__pointer_type_info::__pointer_type_info): Likewise.
10120         (__pointer_type_info::is_pointer_p,
10121         __pointer_type_info::do_catch): Prepend __. Rename parameters.
10122         (__array_type_info::__array_type_info): Rename parameters.
10123         (__function_type_info::__function_type_info): Likewise.
10124         (__function_type_info::is_function_p): Prepend __.
10125         (__enum_type_info::__enum_type_info): Rename parameters.
10126         (__pointer_to_member_type_info::__pointer_to_member_type_info):
10127         Likewise.
10128         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
10129         parameters.
10130         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
10131         (__class_type_info::__class_type_info): Rename parameters.
10132         (__class_type_info::sub_kind): Prepend __. Adjust member names.
10133         (__class_type_info::upcast_result,
10134         __class_type_info::dyncast_result): Prepend __. Move definition
10135         into tinfo.cc.
10136         (__class_type_info::do_upcast, __class_type_info::do_catch,
10137         __class_type_info::find_public_src,
10138         __class_type_info::do_dyncast,
10139         __class_type_info::do_find_public_src): Prepend __. Rename
10140         parameters.
10141         (__si_class_type_info::__si_class_type_info): Rename parameters.
10142         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
10143         __si_class_type_info::do_find_public_src): Prepent __. Rename
10144         parameters.
10145         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
10146         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
10147         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
10148         parameters.
10149         (__dynamic_cast): Rename parameters.
10150         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
10151         type_info::do_catch, type_info::do_upcast): Prepend __.
10152         (contained_p, public_p, virtual_p, contained_public_p,
10153         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
10154         (__class_type_info::do_catch,
10155         __class_type_info::do_upcast): Prepend __. Adjust.
10156         (__class_type_info::__upcast_result,
10157         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
10158         Adjust.
10159         (__class_type_info::find_public_src): Prepend __. Adjust.
10160         (__class_type_info::do_find_public_src,
10161         __si_class_type_info::do_find_public_src,
10162         __vmi_class_type_info::do_find_public_src): Likewise.
10163         (__class_type_info::do_dyncast,
10164         __si_class_type_info::do_dyncast,
10165         __vmi_class_type_info::do_dyncast): Likewise.
10166         (__class_type_info::do_upcast,
10167         __si_class_type_info::do_upcast,
10168         __vmi_class_type_info::do_upcast): Likewise.
10169         (__dynamic_cast): Adjust.
10170         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
10171         (__function_type_info::is_function_p): Likewise.
10172         (__pointer_type_info::do_catch): Likewise. Adjust.
10173         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
10174         (__throw_type_match_rtti_2): Adjust.
10175         (__is_pointer): Adjust.
10176
10177 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
10178
10179         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
10180         (complete_ctor_identifier): New macro.
10181         (special_function_kind): Add sfk_copy_constructor and
10182         sfk_assignment_operator.
10183         (LOOKUP_HAS_IN_CHARGE): Remove.
10184         (cons_up_default_function): Rename to ...
10185         (implicitly_declare_fn): ... this.
10186         * call.c (build_new_method_call): Add in-charge parameters for
10187         constructors here.
10188         * class.c (add_implicitly_declared_members): Change parameter name
10189         from cant_have_assignment to cant_have_const_assignment.
10190         Replace calls to cons_up_default_function to implicitly_declare_fn.
10191         * cvt.c (ocp_convert): Use complete_ctor_identifier.
10192         * decl.c (initialize_predefined_identifiers): Initialize it.
10193         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
10194         complex expression.
10195         * init.c (expand_default_init): Don't calculate the in-charge
10196         parameter here.
10197         (build_new_1): Likewise.
10198         * lex.c (cons_up_default_function): Move to method.c.
10199         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
10200         (implicitly_declare_fn): New function.
10201         * typeck.c (build_static_cast): Use complete_ctor_identifier.
10202         (build_modify_expr): Likewise.
10203         * typeck2.c (build_functional_cast): Likewise.
10204
10205         Under the new ABI, constructors don't return `this'.
10206         * cp-tree.h (warn_reorder): Declare.
10207         (special_function_kind): New enum.
10208         (global_base_init_list): Remove declaration.
10209         (emit_base_init): Don't return a value.
10210         (check_base_init): Don't declare.
10211         (is_aggr_typedef): Likewise.
10212         * decl.c (check_special_function_return_type): New function.
10213         (return_types): Remove.
10214         (grokdeclarator): Use check_special_function_return_type.
10215         (start_function): Don't initialize ctor_label under the new ABI.
10216         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
10217         * init.c (begin_init_stmts): Move to top of file.
10218         (finish_init_stmts): Likewise.
10219         (warn_reorder): Don't declare.
10220         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
10221         value.
10222         (check_base_init): Remove.
10223         (is_aggr_typedef): Likewise.
10224         (build_new_1): Don't use the return value of a constructor.
10225         * semantics.c (setup_vtbl_ptr): Don't use the return value
10226         of emit_base_init.
10227         * typeck.c (check_return_expr): Don't magically convert return
10228         statements into `return this' in constructors under the new ABI.
10229
10230         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
10231         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
10232         (base_ctor_identifier): New macro.
10233         (base_dtor_identifier): Likewise.
10234         (deleting_dtor_identifier): Likewise.
10235         * decl.c: Don't include obstack.h.
10236         (obstack_chunk_alloc): Don't define.
10237         (obstack_chunk_free): Likewise.
10238         (struct predefined_identifier): New type.
10239         (initialize_predefined_identifiers): New function.
10240         (init_decl_processing): Use it.
10241         (debug_temp_inits): Remove.
10242         (start_method): Don't call preserve_data.
10243         (hack_incomplete_structures): Update comment.
10244         * init.c (init_init_processing): Don't initialize
10245         nelts_identifier.
10246         (build_offset_rf): Remove dead code.
10247         (build_delete): Use CLASSTYPE_N_BASECLASSES.
10248         * search.c (init_search_processing): Don't initialize
10249         vptr_identifier.
10250
10251 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10252
10253         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
10254         some sign_compare warnings.
10255
10256 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
10257
10258         Rename abi::__vmi_class_type_info members.
10259         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
10260         base_list, detail_masks members to vmi_flags, vmi_base_count,
10261         vmi_bases and vmi_flags_masks respectively.
10262         (__vmi_class_type_info::vmi_flags_masks): Rename
10263         details_unknown_mask to flags_unknown_mask.
10264         * tinfo.cc (__class_type_info::do_upcast): Adjust.
10265         (__vmi_class_type_info::do_find_public_src): Adjust.
10266         (__vmi_class_type_info::do_dyncast): Adjust.
10267         (__vmi_class_type_info::do_upcast): Adjust.
10268
10269 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
10270
10271         * tinfo.cc (convert_to_base): New function.
10272         (get_vbase_offset): Remove. Move into convert_to_base.
10273         (__vmi_class_type_info::do_find_public_src): Adjust.
10274         (__vmi_class_type_info::do_dyncast): Adjust.
10275         (__vmi_class_type_info::do_upcast): Adjust.
10276
10277 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
10278
10279         * tinfo.cc (operator=): Use __builtin_strcmp.
10280         * tinfo2.cc (before): Likewise.
10281
10282 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
10283
10284         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
10285         (DECL_SAVED_INLINE): Rename to ...
10286         (DECL_DEFERRED_FN): ... this.
10287         (in_function_p): Remove declaration.
10288         (mark_inline_for_output): Rename to ...
10289         (defer_fn): ... this.
10290         * decl.c (finish_function): Adjust call to mark_inline_for_output.
10291         (in_function_p): Remove definition.
10292         * decl2.c (saved_inlines): Rename to ...
10293         (deferred_fns): ... this.
10294         (saved_inlines_used): Rename to ...
10295         (deferred_fns_used): ... this.
10296         (mark_inline_for_output): Rename to ...
10297         (defer_fn): ... this.
10298         (finish_file): Adjust accordingly.
10299         (init_decl2): Likewise.
10300         * lex.c (cons_up_default_function): Likewise.
10301         * pt.c (mark_decl_instantiated): Likewise.
10302         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
10303         circumstances.
10304         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
10305         * semantics.c (expand_body): Defer more functions.
10306
10307 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
10308
10309         * vec.cc: New file.
10310         * Make-lang.in (CXX_LIB2FUNCS): Add it.
10311         (vec.o): Build it.
10312         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
10313         __cxa_vec_delete): Declare.
10314
10315 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
10316
10317         * rtti.c (dfs_class_hint_mark): New static function.
10318         (dfs_class_hint_unmark): New static function.
10319         (class_hint_flags): Use them.
10320
10321 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
10322
10323         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
10324
10325 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
10326
10327         * cp-tree.h (instantiate_decl): Change prototype.
10328         * decl2.c (mark_used): Adjust call.
10329         * optimize.c (inlinable_function_p): Adjust handling of templates.
10330         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
10331         (do_type_instantiation): Likewise.
10332         (instantiate_decl): Defer more templates.
10333         (instantiate_pending_templates): Adjust logic to handle inline
10334         friend functions.
10335
10336         * Makefile.in (GGC_H): New variable.  Use it throughout in place
10337         of ggc.h.
10338
10339         * call.c: Don't include obstack.h.  Include ggc.h.
10340         (obstack_chunk_alloc): Don't define.
10341         (obstack_chunk_free): Likewise.
10342         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
10343         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
10344         (pop_switch): Free it.
10345
10346         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
10347
10348         * dump.c (dequeue_and_dump): Don't try to print the bit_position
10349         if we don't have a DECL_FIELD_OFFSET.
10350
10351 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
10352
10353         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
10354         special_function_p.
10355
10356 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10357
10358         * cfns.gperf (hash, libc_name_p): Prototype.
10359
10360         * rtti.c (build_dynamic_cast_1): Constification.
10361
10362         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
10363
10364         * semantics.c (deferred_type_access_control): Prototype.
10365
10366 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
10367
10368         Correct many new ABI issues regarding vbase and vcall offset
10369         layout.
10370         * cp-tree.h (BINFO_VTABLE): Document.
10371         (struct lang_type): Tweak formatting.
10372         (BINFO_PRIMARY_BINFO): Add to documentation.
10373         (CLASSTYPE_VSIZE): Fix typo in comment.
10374         (CLASSTYPE_VBASECLASSES): Update documentation.
10375         (BINFO_VBASE_MARKED): Remove.
10376         (SET_BINFO_VBASE_MARKED): Likewise.
10377         (CLEAR_BINFO_VBASE_MARKED): Likewise.
10378         (BINFO_FIELDS_MARKED): Remove.
10379         (SET_BINFO_FIELDS_MARKED): Likewise.
10380         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
10381         (enum access_kind): New enumeration.
10382         (num_extra_vtbl_entries): Remove declaration.
10383         (size_extra_vtbl_entries): Likewise.
10384         (get_vtbl_decl_for_binfo): New function.
10385         (dfs_vbase_unmark): Remove declaration.
10386         (mark_primary_bases): Likewise.
10387         * class.c (SAME_FN): Remove.
10388         (struct vcall_offset_data_s): Move definition.
10389         (build_vbase_pointer): Use `build', not `build_binary_op', to
10390         access the vbase pointer under the new ABI.
10391         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
10392         (build_primary_vtable): Likewise.
10393         (dfs_mark_primary_bases): Move here from search.c.
10394         (mark_primary_bases): Likewise.
10395         (determine_primary_bases): Under the new ABI, don't make a base
10396         class a primary base just because we don't yet have any virtual
10397         functions.
10398         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
10399         (num_vfun_entries): Remove.
10400         (dfs_count_virtuals): Likewise.
10401         (num_extra_vtbl_entries): Likewise.
10402         (size_extra_vtbl_entries): Likewise.
10403         (layout_virtual_bases): Iterate in inheritance graph order under
10404         the new ABI.
10405         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
10406         indicate that a vfield is present.
10407         (init_class_processing): Initialize access_public_node, etc., from
10408         ak_public, etc.
10409         (get_vtbl_decl_for_binfo): New function.
10410         (dump_class_hierarchy_r): Likewise.
10411         (dump_class_hierarchy): Use it.
10412         (finish_vtbls): Build the vtbls in inheritance graph order.
10413         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
10414         (initialize_vtable): Use get_vtbl_decl_for_binfo.
10415         (accumulate_vtbl_inits): Add comments explaining why a pre-order
10416         walk is required.
10417         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
10418         where the vptr points, even for primary vtables.
10419         (build_vtbl_initializer): Adjust handling of vbase and vcall
10420         offsets.
10421         (build_vcall_and_vbase_vtable_entries): New function.
10422         (dfs_build_vbase_offset_vtbl_entries): Remove.
10423         (build_vbase_offset_vtbl_entries): Reimplement.
10424         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
10425         were already handled in a primary base class vtable.
10426         (build_vcall_offset_vtbl_entries): Adjust.
10427         (build_rtti_vtbl_entries): Adjust.
10428         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
10429         * init.c (expand_virtual_init): Simplify.
10430         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
10431         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
10432         * search.c (BINFO_ACCESS): New macro.
10433         (SET_BINFO_ACCESS): Likewise.
10434         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
10435         (access_in_type): Likewise.
10436         (dfs_accessible_p): Likewise.
10437         (protected_accessible_p): Likewise.
10438         (lookup_fnfields_1): Adjust documentation.
10439         (dfs_mark_primary_bases): Move to class.c
10440         (mark_primary_bases): Likewise.
10441         (dfs_vbase_unmark): Remove.
10442         (virtual_context): Use BINFO_FOR_VBASE.
10443         (dfs_get_vbase_types): Simplify.
10444         (dfs_build_inheritance_graph_order): New function.
10445         (get_vbase_types): Use it.
10446         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
10447
10448         * tinfo.cc (get_vbase_offset): New function.
10449         (__vmi_class_type_info::do_find_public_src): Use it.
10450         (__vmi_class_type_info::do_dyncast): Likewise.
10451         (__vmi_class_type_info::do_upcast): Likewise.
10452
10453 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
10454
10455         * lang-specs.h: Pass -fno-show-column to the preprocessor.
10456
10457 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
10458
10459         * rtti.c (class_hint_flags): Rename flags.
10460         (class_initializer): Remove flags.
10461         (synthesize_tinfo_var): Combine offset and flags. Add flags
10462         for __vmi_class_type_info.
10463         (create_tinfo_types): Remove flags from __class_type_info and
10464         __si_class_type_info. Merge flags and offset from
10465         base_class_type_info.
10466         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
10467         (__base_class_info::is_virtual_p): Adjust.
10468         (__base_class_info::is_public_p): Adjust.
10469         (__base_class_info::offset): New accessor.
10470         (__class_type_info::details): Remove member.
10471         (__class_type_info::__class_type_info): Lose details.
10472         (__class_type_info::detail_masks): Remove.
10473         (__si_class_type_info::__si_class_type_info): Lose details.
10474         (__vmi_class_type_info::details): New member.
10475         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
10476         (__vmi_class_type_info::detail_masks): New member.
10477         * tinfo.cc (__class_type_info::do_upcast): Initialize result
10478         with unknown_details_mask.
10479         (__vmi_class_type_info::do_find_public_src): Adjust
10480         (__vmi_class_type_info::do_dyncast): Adjust.
10481         (__vmi_class_type_info::do_upcast): Set result details, if
10482         needed. Adjust.
10483         (__dynamic_cast): Temporarily #if out optimization.
10484
10485 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
10486
10487         * rtti.c (get_tinfo_decl): Mark used.
10488         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
10489         mark as dealt with, if we output it.
10490
10491 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
10492
10493         * class.c: Reorganize to put virtual function table initialization
10494         machinery at the end of the file.
10495
10496 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
10497
10498         * class.c (finish_struct): Use bitsize_zero_node.
10499         * pt.c (instantiate_class_template): Likewise.
10500
10501 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
10502
10503         Put RTTI entries at negative offsets in new ABI.
10504         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
10505         vbase offset at index -3, not -1.
10506         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
10507         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
10508         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
10509         (build_rtti_vtbl_entries): New function.
10510         (set_rtti_entry): Remove.
10511         (build_primary_vtable): Don't use it.
10512         (build_secondary_vtable): Likewise.
10513         (start_vtable): Remove.
10514         (first_vfun_index): New function.
10515         (set_vindex): Likewise.
10516         (add_virtual_function): Don't call start_vtable.  Do call
10517         set_vindex.
10518         (set_primary_base): Rename parameter.
10519         (determine_primary_base): Likewise.
10520         (num_vfun_entries): Don't use skip_rtti_stuff.
10521         (num_extra_vtbl_entries): Include RTTI information.
10522         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
10523         (skip_rtti_stuff): Remove.
10524         (dfs_modify_vtables): Don't use it.
10525         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
10526         (layout_nonempty_base_or_field): Update size handling.
10527         (create_vtable_ptr): Tweak.
10528         (layout_class_type): Adjust parameter names.
10529         (finish_struct_1): Simplify.
10530         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
10531         (skip_rtti_stuff): Remove.
10532         (first_vfun_index): New function.
10533         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
10534         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
10535         (marked_vtable_pathp): Declare.
10536         (unmarked_vtable_pathp): Likewise.
10537         * error.c (dump_expr): Use first_vfun_index to calculate vtable
10538         offsets.
10539         * rtti.c (build_headof): Look for RTTI at negative offsets.
10540         (get_tinfo_decl_dynamic): Likewise.
10541         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
10542         here.
10543         (create_pseudo_type_info): Do it here instead.  Adjust so that
10544         vptr points at first virtual function.
10545         * search.c (marked_vtable_pathp): Make it global.
10546         (unmarked_vtable_pathp): Likewise.
10547         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
10548         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
10549         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
10550         (get_pure_virtuals): Likewise.
10551         (expand_upcast_fixups): Likewise.
10552         * tree.c (debug_binfo): Likewise.
10553         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
10554         negative offset.
10555
10556 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10557
10558         * class.c (check_field_decl): Fix typo.
10559         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
10560         (check_methods): Likewise.
10561         (check_field_decls): Likewise.
10562         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
10563         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
10564         Use DECL_RESULT_FLD, not DECL_RESULT.
10565         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
10566         * lex.c (identifier_type): Likewise.
10567         * pt.c (determine_specialization, lookup_template_class): Likewise.
10568         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
10569         (resolve_overloaded_unification, more_specialized): Likewise.
10570         * semantics.c (finish_member_declaration): Likewise.
10571         * typeck.c (build_x_function_call): Likewise.
10572
10573 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
10574
10575         * class.c (layout_empty_base): Handle empty bases with non-byte
10576         alignment.
10577         (build_base_field): Likewise.
10578         (layout_virtual_bases): Likewise.
10579
10580         * class.c (finish_struct_1): Fix typo in this change:
10581
10582         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10583
10584 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
10585
10586         * decl.c (grokdeclarator): Count partial specializations when
10587         keeping track of how many template classes have been seen.
10588
10589         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
10590
10591 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10592
10593         * class.c (build_vbase_pointer_fields): layout_field now place_field.
10594         (get_vfield_offset): Use byte_position.
10595         (set_rtti_entry): Set OFFSET to ssizetype zero.
10596         (get_binfo_offset_as_int): Deleted.
10597         (dfs_record_base_offsets): Use tree_low_cst.
10598         (dfs_search_base_offsets): Likewise.
10599         (layout_nonempty_base_or_field): Reflect changes in RLI format
10600         and call byte_position.
10601         (layout_empty_base): Convert offset to ssizetype.
10602         (build_base_field): use rli_size_unit_so_far.
10603         (dfs_propagate_binfo_offsets): Do computation in proper type.
10604         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
10605         (layout_class_type): Reflect changes in RLI names and fields.
10606         (finish_struct_1): Set DECL_FIELD_OFFSET.
10607         * dump.c (dequeue_and_dump): Call bit_position.
10608         * expr.c (cplus_expand_constant): Use byte_position.
10609         * rtti.c (expand_class_desc): Use bitsize_one_node.
10610         * typeck.c (build_component_addr): Use byte_position and don't
10611         special case for zero offset.
10612
10613 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
10614
10615         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
10616
10617         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
10618         tinfo object.
10619         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
10620         vtable.
10621
10622 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10623
10624         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
10625         DECL_P macros.
10626         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
10627         make_typename_type, check_initializer, cp_finish_decl,
10628         xref_tag): Likewise.
10629         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
10630         decl_namespace, arg_assoc_template_arg, arg_assoc,
10631         validate_nonmember_using_decl, do_class_using_decl): Likewise.
10632         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
10633         args_to_string): Likewise.
10634         * friend.c (is_friend): Likewise.
10635         * lex.c (note_got_semicolon, note_list_got_semicolon,
10636         is_global): Likewise.
10637         * method.c (build_overload_nested_name, build_overload_value,
10638         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
10639         * parse.y (typename_sub, typename_sub1): Likewise.
10640         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
10641         process_partial_specialization, convert_template_argument,
10642         template_args_equal, add_pending_template, lookup_template_class,
10643         for_each_template_parm_r, maybe_fold_nontype_arg,
10644         tsubst, instantiate_template, type_unification_real, unify,
10645         instantiate_pending_templates, set_mangled_name_for_template_decl):
10646         Likewise.
10647         * repo.c (repo_get_id, repo_template_used): Likewise.
10648         * search.c (lookup_field_1): Likewise.
10649         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
10650         * xref.c (classname): Likewise.
10651
10652 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
10653
10654         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
10655         (CANONICAL_BINFO): New macro.
10656         (BINFO_NEW_VTABLE_MARKED): Use it.
10657         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
10658         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
10659         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
10660         not TREE_TYPE.
10661         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
10662         (build_secondary_vtable): Likewise.
10663         (dfs_finish_vtbls): Likewise.
10664         (dfs_accumulate_vtbl_inits): Likewise.
10665         (accumulate_vtbl_inits): New function.
10666         (finish_vtbls): Make sure that virtual bases come after
10667         non-virtual bases in the vtable group.
10668         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
10669         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
10670         * search.c (struct vbase_info): Move definition.
10671         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
10672         (unmarked_new_vtable_p): Likewise.
10673         (dfs_mark_vtable_path): Remove.
10674         (dfs_mark_new_vtable): Remove.
10675         (dfs_unmark_new_vtable): Likewise.
10676         (dfs_clear_search_slot): Likewise.
10677         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
10678         (dfs_clear_vbase_slots): Likewise.
10679         (init_vbase_pointers): LIkewise.
10680
10681 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
10682
10683         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
10684         SIZETYPE to a non-SIZETYPE.
10685
10686 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
10687
10688         * class.c (layout_virtual_bases): Adjust names in conditionally
10689         compiled code.
10690
10691         * class.c (record_base_offsets): New function.
10692         (layout_conflict_p): Likewise.
10693         (layout_nonempty_base_or_field): Use it.
10694         (layout_empty_base): New function.
10695         (build_base_field): Use it.
10696         (build_base_fields): Update comment.
10697         (layout_virtual_bases): Fold in a little code form
10698         layout_basetypes.  Use layout_empty_base.
10699         (layout_basetypes): Remove.
10700         (end_of_class): New function.
10701         (layout_class_type): Use it.  Adjust.
10702
10703         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
10704         (fntype_p): Remove.
10705         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
10706         comment.
10707         (dfs_skip_nonprimary_vbases_markedp): Likewise.
10708         * typeck.c (fntype_p): Remove.
10709
10710         * cp-tree.h (TI_SPEC_INFO): Remove.
10711         (CLASSTYPE_TI_SPEC_INFO): Likewise.
10712         * pt.c (process_partial_specialization): Likewise.
10713
10714         * class.c (build_base_field): Fix thinko in computation of binfo
10715         offsets.
10716
10717         * tree.c (mark_local_for_remap_p): Mark variables declared in
10718         TARGET_EXPRs as well.
10719
10720 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
10721
10722         * typeck.c (require_complete_type, complete_type,
10723         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
10724         build_array_ref, convert_arguments, pointer_diff,
10725         build_x_unary_op, build_unary_op, build_c_cast,
10726         build_modify_expr): Use COMPLETE_TYPE_P etc.
10727         * call.c (is_complete, convert_like_real,
10728         build_new_method_call): Likewise.
10729         * class.c (build_vbase_pointer_fields, check_bases,
10730         build_base_field, finish_struct_1, pushclass): Likewise.
10731         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
10732         * decl.c (maybe_process_template_type_declaration, pushtag,
10733         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
10734         layout_var_decl, check_initializer, cp_finish_decl,
10735         grokdeclarator, require_complete_types_for_parms,
10736         grok_op_properties, xref_tag, xref_basetypes,
10737         check_function_type): Likewise.
10738         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
10739         * friend.c (do_friend): Likewise.
10740         * init.c (build_offset_ref): Likewise.
10741         * parse.y (structsp): Likewise.
10742         * pt.c (maybe_process_partial_specialization,
10743         tsubst_friend_function, instantiate_class_template, tsubst,
10744         do_type_instantiation, instantiate_pending_templates): Likewise.
10745         * repo.c (repo_get_id): Likewise.
10746         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
10747         synthesize_tinfo_var, emit_support_tinfos): Likewise.
10748         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
10749         * semantics.c (begin_class_definition): Likewise.
10750         * tree.c (build_cplus_method_type): Likewise.
10751         * typeck2.c (digest_init, build_functional_cast,
10752         add_exception_specifier): Likewise.
10753         * parse.h, parse.c: Regenerated.
10754
10755 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
10756
10757         * inc/cxxabi.h: New header file. Define new-abi entry points.
10758         (__pointer_type_info::target): Rename member to ...
10759         (__pointer_type_info::type): ... here.
10760         (__base_class_info::type): Rename member to ...
10761         (__base_class_info::base): ... here.
10762         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
10763         * cp-tree.h (CPTI_ABI): New global tree enumeration.
10764         (abi_node): New global tree node.
10765         * decl.c (abi_node): Document.
10766         (init_decl_processing): Initialize abi_node.
10767         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
10768         (get_vmi_pseudo_type_info): Likewise.
10769         (create_tinfo_types): Likewise.
10770         (emit_support_tinfos): Likewise.
10771         * tinfo.h (cxxabi.h): Include for new-abi.
10772         Move rtti class definitions to new header file.
10773         * tinfo.cc (abi): Use the namespace.
10774         (std): Move new abi rtti classes from here ...
10775         (__cxxabiv1): ... to here.
10776         * tinfo2.cc (cxxabi.h): Include for new-abi.
10777         Move rtti class definitions to new header file.
10778         (std): Move new abi rtti classes from here ...
10779         (__cxxabiv1): ... to here.
10780         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
10781         namespace.
10782
10783 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
10784             Jason Merrill  <jason@casey.cygnus.com>
10785
10786         * method.c (build_overload_int): Use host_integerp.
10787
10788 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10789
10790         * init.c (build_offset_ref): Handle the case of a templated member
10791         function.
10792
10793 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10794
10795         * except.c (expand_exception_blocks): Clear catch_clauses_last.
10796
10797 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
10798
10799         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
10800         * class.c (check_bitfield_decl): Turn illegal bitfields into
10801         non-bitfields.
10802         (dfs_propagate_binfo_offsets): Adjust for new size_binop
10803         semantics.
10804         (dfs_offset_for_unshared_vbases): Likewise.
10805         * cvt.c (cp_convert_to_pointer): Convert NULL to a
10806         pointer-to-member correctly under the new ABI.
10807         * expr.c (cplus_expand_constant): Don't use cp_convert when
10808         turning an offset into a pointer-to-member.
10809         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
10810         when dereferencing them under the new ABI.
10811         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
10812         of pointers-to-members under the new ABI.
10813
10814         * class.c (check_bitfield_decl): Remove restriction on really long
10815         bitfields.
10816         (layout_class_type): Implement new ABI handling of bitfields
10817         longer than their types.
10818
10819 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10820
10821         * parse.y (extdefs): Call ggc_collect.
10822         * parse.c: Regenerated.
10823
10824 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
10825
10826         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
10827         (note_name_declared_in_class): Use OVL_CURRENT to get at a
10828         potential overload.
10829
10830 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10831
10832         * class.c (build_vbase_path): Use integer_zerop.
10833         (build_vtable_entry): Use tree_low_cst.
10834         (get_vfield_offset): Use bit_position.
10835         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
10836         Use tree_low_cst.
10837         (check_bitfield_decl): Set DECL_SIZE using convert.
10838         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
10839         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
10840         Use tree_low_cst.
10841         (finish_struct_1): Use bit_position.
10842         (dump_class_hierarchy): Use tree_low_cst.
10843         * cp-tree.h (min_precision): Add declaration.
10844         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
10845         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
10846         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
10847         * expr.c (cplus_expand_constant): Use bit_position.
10848         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
10849         * rtti.c (get_base_offset): Use bit_position.
10850         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
10851         host_integerp, and tree_low_cst.
10852         (pointer_int_sum): Use integer_zerop.
10853         (build_component_addr): Use bit_position.
10854
10855 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
10856
10857         * typeck.c (require_complete_type): Don't assume size_zero_node.
10858         (complete_type_or_else): Likewise.
10859
10860 2000-03-16  Steven Grady <grady@digitaldeck.com>
10861             Jason Merrill  <jason@casey.cygnus.com>
10862
10863         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
10864
10865 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
10866
10867         * decl2.c (grokfield): Bail out if type is error_mark_node.
10868
10869 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
10870
10871         * tinfo2.cc (__ptr_to_member_data): Rename to ...
10872         (__pointer_to_member_data): ... here. Adjust.
10873         * rtti.c (create_tinfo_types): Adjust.
10874
10875 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
10876
10877         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
10878         * decl.c (ref_desc_type_node): Undocument.
10879         * rtti.c (ptr_ref_initializer): Rename to ...
10880         (ptr_initializer): ... here. Adjust comments.
10881         (ptmd_initializer): Fix comment thinko.
10882         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
10883         (create_tinfo_types): Remove ref_desc_type_node init.
10884         * tinfo2.cc (__reference_type_info): Remove.
10885
10886 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
10887
10888         * decl.c (cp_finish_decl): Remove obsolete comment.
10889
10890         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
10891
10892 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
10893
10894         * cp-tree.h: Tweak documentation.
10895         * class.c (build_vbase_pointer_fields): Layout the fields, too.
10896         (avoid_overlap): Remove.
10897         (get_binfo_offset_as_int): New function.
10898         (dfs_serach_base_offsets): Likewise.
10899         (layout_nonempty_base_or_field): Likewise.
10900         (build_base_field): Layout fields here.  Avoid placing two objects
10901         of the same type at the same address, under the new ABI.
10902         (build_base_fields): Adjust accordingly.
10903         (create_vtable_ptr): Return the new field, but don't attach it to
10904         TYPE_FIELDS.
10905         (remove_base_field): Remove.
10906         (remove_base_fields): Remove.
10907         (layout_basetypes): Adjust accordingly.
10908         (layout_class_type): Call layout_field for each field, rather than
10909         just making a wholesale call to layout_type.
10910
10911 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
10912
10913         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
10914
10915 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
10916
10917         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
10918
10919         * except.c (dtor_nothrow): New fn.
10920         (do_pop_exception): Use it.  Take type parm.
10921         (push_eh_cleanup): Take type parm.
10922         (expand_start_catch_block): Pass it.
10923         (build_eh_type_type_ref): Accept null type.
10924
10925 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
10926
10927         * cp-tree.h (revert_static_member_fn): Change prototype.
10928         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
10929         (grok_op_properties): Likewise.
10930         (start_function): Likewise.
10931         (revert_static_member_fn): Simplify.
10932         * pt.c (check_explicit_specialization): Adjust call to
10933         revert_static_member_fn.
10934
10935 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
10936
10937         * cp-tree.h (scope_kind): New type.
10938         (tmpl_spec_kind): Likewise.
10939         (declare_pseudo_global_level): Remove.
10940         (pseudo_global_level_p): Rename to template_parm_scope_p.
10941         (pushlevel): Remove declaration.
10942         (begin_scope): New function.
10943         (finish_scope): Likewise.
10944         (current_tmpl_spec_kind): Likewise.
10945         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
10946         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
10947         Add template_spec_p.
10948         (toplevel_bindings_p): Adjust.
10949         (declare_pseudo_global_level): Remove.
10950         (pseudo_global_level_p): Rename to template_parm_scope_p.
10951         (current_tmpl_spec_kind): New function.
10952         (begin_scope): Likewise.
10953         (finish_scope): Likewise.
10954         (maybe_push_to_top_level): Adjust.
10955         (maybe_process_template_type_declaration): Likewise.
10956         (pushtag): Likewise.
10957         (pushdecl_nonclass_level): Likewise.
10958         (lookup_tag): Likewise.
10959         (grokfndecl): Handle member template specializations.  Share
10960         constructor and non-constructor code.
10961         * decl2.c (check_classfn): Handle member template specializations.
10962         * pt.c (begin_template_parm_list): Use begin_scope.
10963         (begin_specialization): Likewise.
10964         (end_specialization): Likewise.
10965         (check_explicit_specialization): Use current_tmpl_spec_kind.
10966         Handle member template specializations.
10967         (end_template_decl): Use finish_scope.  Remove call to
10968         get_pending_sizes.
10969         (push_template_decl_real): Remove bogus error message.
10970         (tsubst_decl): Fix typo in code contained in comment.
10971         (instantiate_template): Handle member template specializations.
10972         (most_general_template): Likewise.
10973
10974 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
10975
10976         * lex.c (whitespace_cr): Compress consecutive calls to warning().
10977         (do_identifier): Ditto for error().
10978
10979         * pt.c (convert_nontype_argument): Ditto for cp_error().
10980         (convert_template_argument): Ditto for cp_pedwarn().
10981
10982 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
10983
10984         * exception.cc (__check_null_eh_spec): New fn.
10985         * except.c (expand_end_eh_spec): Call it if the spec is throw().
10986
10987 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
10988
10989         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
10990         * except.c (expand_end_eh_spec): Add the return type.
10991         * rtti.c (throw_bad_cast): Add the parmtypes.
10992         (throw_bad_typeid): Likewise.
10993
10994         * semantics.c (expand_stmt): Only leave out rtl for unused
10995         artificials, and set DECL_IGNORED_P on them as well.
10996         * decl.c (wrapup_globals_for_namespace): Likewise.
10997
10998 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
10999
11000         * decl.c (maybe_commonize_var): Skip all artificial decls.
11001         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
11002
11003 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
11004
11005         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
11006         * cp-tree.h: Declare flag_enforce_eh_specs.
11007         * decl.c (store_parm_decls, finish_function): Check it.
11008
11009         C library functions don't throw.
11010         * Makefile.in (cfns.h): New target.
11011         (except.o): Depend on it.
11012         * Make-lang.in (cc1plus): Depend on cfns.gperf.
11013         * cfns.gperf: New file.
11014         * cfns.h: Generated.
11015         * except.c: Include it.
11016         (nothrow_libfn_p): New fn.
11017         * decl.c (grokfndecl): Use it.
11018         * cp-tree.h: Declare it.
11019
11020         * decl.c (push_overloaded_decl_1, auto_function,
11021         define_function): Lose.
11022         (build_library_fn_1): New static fn.
11023         (builtin_function): Use it.
11024         (get_atexit_node): Use build_library_fn_ptr.
11025         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
11026         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
11027         push_void_library_fn, push_throw_library_fn): New fns.
11028         * cp-tree.h: Declare them.
11029         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
11030         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
11031         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
11032         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
11033         * rtti.c (build_runtime_decl): Lose.
11034         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
11035         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
11036         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
11037
11038         * call.c (build_call): Remove result_type parm.
11039         Call mark_used on unused artificial fns.
11040         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
11041
11042 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
11043
11044         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
11045         appropriate.
11046         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
11047         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
11048         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
11049         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
11050         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
11051         expand_generic_desc): Likewise.
11052
11053 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
11054
11055         * exception.cc (__cp_pop_exception): Cleanup the original object.
11056
11057 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
11058
11059         * decl.c (grok_op_properties): Merge conversion to void warning
11060         with other silly op warnings.
11061
11062 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
11063
11064         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
11065         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
11066
11067 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
11068
11069         * decl.c (cp_make_fname_decl): New function.
11070         (wrapup_globals_for_namespace): Don't emit unused static vars.
11071         (init_decl_processing): Remove comment about use of
11072         array_domain_type. Set make_fname_decl.
11073         (cp_finish_decl): Remove __FUNCTION__ nadgering.
11074         * semantics.c (begin_compound_stmt): Remove
11075         current_function_name_declared flagging.
11076         (expand_stmt): Don't emit unused local statics.
11077         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
11078         specially.
11079
11080 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
11081
11082         * typeck.c (convert_for_assignment): Don't look at array
11083         initializer.
11084         * call.c (convert_like_real): Likewise.
11085
11086 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
11087
11088         Add initial support for '\uNNNN' specifier.
11089         * lex.c (read_ucs): New fn.
11090         (readescape, skip_white_space): Call it.
11091         (is_extended_char, is_extended_char_1): New fns.
11092         (utf8_extend_token): New fn, #if 0'd out.
11093         (real_yylex): Treat extended chars like letters.
11094
11095         * search.c (note_debug_info_needed): Walk the bases even if we
11096         weren't deferring the type itself.
11097
11098 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11099
11100         * decl2.c (finish_objects): Constify a char*.
11101
11102         * method.c (emit_thunk): Likewise.
11103
11104 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
11105
11106         * typeck.c (dubious_conversion_warnings): Look through
11107         REFERENCE_TYPE.
11108
11109 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11110
11111         * class.c (dfs_modify_vtables): I is now unsigned.
11112         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
11113         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
11114         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
11115         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
11116         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
11117         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
11118         Call integer_all_onesp.
11119         * typeck2.c (process_init_constructor): Use compare_tree_int.
11120
11121         * lang-specs.h (as): Don't call if -syntax-only.
11122
11123 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
11124
11125         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
11126         RTL_EXPR_HAS_NO_SCOPE after all.
11127
11128 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
11129
11130         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
11131         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
11132         RTL_EXPR_HAS_NO_SCOPE.
11133
11134         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
11135         later.
11136
11137         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
11138
11139 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
11140
11141         * call.c (convert_like): Macrofy.
11142         (convert_like_with_context): New macro.
11143         (convert_like_real): Renamed from convert_like.  Add calling
11144         context parameters, for diagnostics. Add recursive flag.  Call
11145         dubious_conversion_warnings for outer conversion.
11146         (build_user_type_conversion): Use convert_like_with_context.
11147         (build_over_call): Likewise. Don't warn about dubious
11148         conversions here. Adjust convert_default_arg calls.
11149         (convert_default_arg): Add context parameters for diagnostics.
11150         Pass through to convert_like_with_context.
11151         * cp-tree.h (convert_default_arg): Add context parameters.
11152         (dubious_conversion_warnings): Prototype new function.
11153         * typeck.c (convert_arguments): Adjust convert_default_arg call.
11154         (dubious_conversion_warnings): New function, broken
11155         out of convert_for_assignment.
11156         (convert_for_assignment): Adjust.
11157
11158 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
11159
11160         * decl2.c (key_method): Break out from...
11161         (import_export_vtable, import_export_class): ...here.
11162
11163         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
11164         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
11165
11166         * search.c (note_debug_info_needed, dfs_debug_mark,
11167         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
11168         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
11169
11170 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
11171
11172         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
11173         typos.
11174
11175 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
11176
11177         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
11178         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
11179         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
11180         (lang_type): Split gets_new into has_new and has_array_new.
11181         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
11182         (TYPE_GETS_NEW): Split into ...
11183         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
11184         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
11185         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
11186         (build_op_new_call): Don't declare.
11187         (build_new_1): Likewise.
11188         * call.c (build_op_new_call): Remove.
11189         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
11190         instead of TYPE_NEEDS_DESTRUCTOR.
11191         (finish_struct_bits): Likewise.
11192         (add_implicitly_declared_members): Likewise.
11193         (check_field_decl): Likewise.
11194         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
11195         correctly under the new ABI.
11196         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
11197         instead of TYPE_NEEDS_DESTRUCTOR.
11198         (initialize_local_var): Likewise.
11199         (destroy_local_var): Likewise.
11200         (cp_finish_decl): Likewise.
11201         (register_dtor_fn): Likewise.
11202         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
11203         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
11204         TYPE_VEC_DELETE_TAKES_SIZE here.
11205         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
11206         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
11207         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
11208         (finish_destructor_body): Likewise.
11209         (maybe_build_cleanup_1): Likewise.
11210         * decl2.c (do_static_destruction): Likewise.
11211         * init.c (build_new_1): Make it static.
11212         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
11213         (expand_cleanup_for_base): Likewise.
11214         (get_cookie_size): New function.
11215         (build_new_1): Handle array-new cookies correctly under the new
11216         ABI.
11217         (build_vec_delete_1): Likewise.
11218         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
11219         (build_delete): Likewise.
11220         (build_vec_delete): Handle array-new cookies correctly under the new
11221         ABI.
11222         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
11223         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
11224         TYPE_HAS_ARRAY_NEW_OPERATOR.
11225         * ptree.c (print_lang_type): Check them.
11226         * search.c (context_for_name_lookup): Fix typo in comment.
11227         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
11228         * tree.c (break_out_cleanups): Likewise.
11229         (build_cplus_array_test_1): Likewise.
11230         (cp_build_qualified_type_real): Likewise.
11231         * typeck.c (complete_type): Likewise.
11232
11233         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
11234         the command-line, not the end.
11235
11236 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
11237
11238         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
11239
11240 2000-03-02  Tom Tromey  <tromey@cygnus.com>
11241
11242         * cp-tree.h (build_java_class_ref): Declare.
11243         * init.c (build_java_class_ref): No longer static.
11244         * except.c (expand_throw): Generate a Java-style `throw' if the
11245         thrown object is a "Java" object.
11246         (initialize_handler_parm): Generate a Java-style lookup of
11247         exception info if the caught object is a "Java" object.
11248         (catch_language, catch_language_init): New globals.
11249         (decl_is_java_type): New function.
11250         (expand_start_catch_block): Don't call push_eh_info() or
11251         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
11252         class reference to build_catch_block.
11253
11254 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11255
11256         * typeck.c (comptypes): Treat sizetype like its language equivalent.
11257
11258 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
11259
11260         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
11261         to merge reference/pointer code and fix incorrect warnings.
11262
11263 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
11264
11265         * search.c (protected_accessible_p): Use context_for_name_lookup.
11266
11267         * init.c (construct_virtual_bases): Fix thinko.
11268         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
11269
11270 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11271
11272         * decl.c (current_function_decl): Move to toplev.c.
11273
11274 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
11275
11276         * pt.c (fn_type_unification): Unify return type, whenever
11277         provided.
11278         (get_bindings_real): Only pass return type when necessary.
11279         Remove explicit return type check.
11280         * class.c (resolve_address_of_overloaded_function): Pass desired
11281         return type to fn_type_unification.
11282
11283 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11284
11285         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
11286         DECL_FIELD_SIZE.
11287         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
11288         DECL_FIELD_SIZE.
11289         * rtti.c (expand_class_desc): Likewise.
11290         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
11291         (THUNK_VCALL_OFFSET): Likewise.
11292         (THUNK_DELTA): Reflect changes in ../tree.h.
11293
11294 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
11295
11296         * search.c (protected_accessible_p): Also allow the access if
11297         the member is public in DERIVED.  Lose TYPE parm.
11298         (friend_accessible_p): Lose TYPE parm.
11299         (accessible_p): Adjust.
11300
11301 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11302
11303         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
11304         on things that are not sizes; ssize_binop deleted.
11305         Call size_diffop when appropriate.
11306         (dfs_build_vcall_offset_vtbl_entries): Likewise.
11307         (build_primary_vtable, build_secondary_vtable): Likewise.
11308         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
11309         Variable I is HOST_WIDE_INT.
11310         (get_vfield_offset): Pass proper types to size_binop.
11311         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
11312         (finish_struct_1): Likewise.
11313         (skip_rtti_stuff): Arg N is now pointer to signed.
11314         (layout_class_type): Use size_zero_node.
11315         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
11316         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
11317         * decl.c (complete_arry_type): Pass proper types to size_binop.
11318         (xref_basetypes): BINFO_OFFSET is sizetype.
11319         * error.c (dump_expr): Don't use size_binop non-sizes.
11320         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
11321         * init.c (construct_virtual_bases): Fix type error.
11322         (build_vec_delete_1): Pass proper type to size_binop and don't
11323         fold result.
11324         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
11325         * rtti.c (get_base_offset): Pass proper type to size_binop.
11326         * search.c (dfs_find_vbases): Fix type error.
11327         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
11328         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
11329         * tree.c (debug_binfo): Variable N is signed.
11330         Use HOST_WIDE_INT_PRINT_DEC.
11331         * typeck.c (comptypes): sizetype is same as equivalent integer type.
11332         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
11333         size_one_node and size_zero_node.
11334         (c_alignof): Use size_one_node.
11335         (build_component_addr): Pass proper types to size_binop.
11336         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
11337
11338 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
11339
11340         Implement class scope using-declarations for functions.
11341         * class.c (handle_using_decl): Call add_method for used functions.
11342         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
11343         (add_method): Used functions are hidden by local functions.
11344         (check_bases_and_members): Handle using-decls before finalizing
11345         CLASSTYPE_METHOD_VEC.
11346         * call.c (add_function_candidate): Add ctype parm; if non-zero,
11347         override the type of 'this' accordingly.
11348         (add_template_candidate, add_template_candidate_real): Add ctype parm.
11349         (convert_class_to_reference, build_user_type_conversion_1,
11350         build_new_function_call, build_object_call, build_new_op,
11351         build_new_method_call): Pass ctype parm.
11352
11353         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
11354         the baselink.
11355         * call.c (convert_class_to_reference, build_user_type_conversion_1,
11356         build_new_function_call, build_object_call, build_new_op,
11357         build_new_method_call, build_op_delete_call): Don't get basetype_path
11358         from a baselink.
11359         * typeck.c (build_component_ref): Likewise.
11360         * init.c (build_offset_ref): Likewise.
11361         (resolve_offset_ref): Don't call enforce_access.
11362         Call build_scoped_ref.
11363         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
11364         would cause an error or if -pedantic.
11365         * class.c (alter_access): Lose binfo parm.
11366
11367 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
11368
11369         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
11370         types.
11371
11372 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
11373
11374         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
11375         pseudo_type_info creation into the std namespace
11376
11377 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
11378
11379         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
11380         (import_export_class): Remove declaration.
11381         * decl2.c (import_export_class): Make it static.
11382         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
11383         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
11384         EXPR_WITH_FILE_LOCATION.
11385         * lex.c (check_newline): Tweak filename/lineno setting.
11386         * semantics.c (begin_while_stmt): Fix typo in comment.
11387
11388 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11389
11390         * lang-options.h (-fmessage-length=): Add missing option.
11391
11392         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
11393
11394 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
11395
11396         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
11397
11398 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
11399
11400         * optimize.c (expand_call_inline): Emit the return label before
11401         evaluating the return value.
11402
11403 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
11404
11405         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
11406         than duplicating functionality here.
11407         * optimize.c: Include input.h.
11408         (expand_call_inline): Use push_srcloc and pop_srcloc.
11409         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
11410         * parse.c: Regenerated.
11411         * Makefile.in (lex.o): Depend on input.h.
11412         (optimize.o): Likewise.
11413
11414 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
11415
11416         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
11417         function type, rather than ICE.
11418
11419 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
11420
11421         * decl.c (grokdeclarator): Call decl_type_access_control.
11422         * parse.y (parse_end_decl): Don't call decl_type_access_control if
11423         decl is null.
11424
11425 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
11426
11427         * decl.c (decls_match): Remove obsolete static member nadgering.
11428
11429 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11430
11431         * decl.c (grokdeclarator): Change ANSI to ISO.
11432         * lex.c (consume_string, readescape, do_identifier): Likewise.
11433         (parse_float, real_yylex): Likewise.
11434         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
11435         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
11436         new_type_id, maybe_label_decls, simple_stmt,
11437         for.init.statement): Likewise.
11438         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
11439         * semantics.c (finish_named_return_value): Likewise.
11440         * parse.c: Regenerate.
11441
11442 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
11443
11444         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
11445         (CPTI_CLASS_STAR_TYPE): Remove.
11446         (vtable_index_type): Likewise.
11447         (class_star_type_node): Remove.
11448         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
11449         (build_binary_op_nodefault): Remove.
11450         * call.c (build_new_op): Use build_binary_op instead of
11451         build_binary_op_nodefault.
11452         * decl.c (init_decl_processing): Remove class_star_type_node
11453         initialization.  Make delta_type_node ptrdiff_type_node under the
11454         new ABI.  Initialize vtable_index_type.
11455         (build_ptrmemfunc_type): Build different structures for the new
11456         ABI.
11457         (build_enumerator): Use build_binary_op instead of
11458         build_binary_op_nodefault.
11459         * method.c (build_overload_value): Mangle pointers-to-members
11460         appropriately under the new ABI.
11461         * typeck.c (build_array_ref): Use build_binary_op instead of
11462         build_binary_op_nodefault.
11463         (get_member_function_from_ptrfunc): Adjust for the new ABI.
11464         (build_binary_op_nodefault): Rename to ...
11465         (build_binary_op): ... this.  Remove old version.  Adjust for
11466         pointer-to-member comparisons under the new ABI.
11467         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
11468         (build_ptrmemfunc): Adjust for the new ABI.
11469         (expand_ptrmemfunc_cst): Likewise.
11470         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
11471         (pfn_from_ptrmemfunc): Adjust for the new ABI.
11472
11473 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
11474
11475         * call.c (build_object_call): Compress consecutive calls to
11476         cp_error.
11477         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
11478         (build_op_delete_call): Adjust message formatting.
11479
11480         * class.c (check_bases): Compress consecutive calls to
11481         cp_pedwarn.
11482         (finish_struct_anon): Say 'ISO C++'.
11483
11484         * decl.c (start_decl): Same here.
11485         (grok_reference_init): Likewise.
11486         (grokfndecl): Correct message formatting.
11487         (grokfndecl): Improve diagnostic.
11488         (check_static_variable_definition): Likewise. Say 'ISO C++'
11489         (compute_array_index_type): Say 'ISO C++'
11490         (create_array_type_for_decl): Compress consecutive calls to
11491         cp_error.
11492         (grokdeclarator): Say 'ISO C++'
11493         (grok_op_properties): Likewise.
11494
11495         * decl2.c (delete_sanity): Clairify diagnostic.
11496         (check_member_template): Same here.
11497         (grok_function_init): Use consistent terminology.
11498
11499         * expr.c (do_case): Say 'ISO C++'
11500
11501         * friend.c (do_friend): Compress consecutive calls to warning.
11502
11503 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
11504
11505         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
11506         * class.c (build_secondary_vtable): Reorganize.  Don't create a
11507         new vtable under the new ABI.
11508         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
11509         computing the size.
11510         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
11511         the initializing elements.
11512         (initialize_vtable): New function.
11513         (dfs_finish_vtbls): Use it.
11514         (dfs_accumulate_vtbl_inits): New function.
11515         (finish_vtbls): Merge primary and secondary vtables under the new
11516         ABI.
11517         (finish_struct_1): Remove redundant call to layout_vtable_decl.
11518         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
11519         aren't VAR_DECLs.
11520
11521         * class.c (build_vtable): New function, split out from ...
11522         (get_vtable_decl): ... here, and ...
11523         (build_secondary_vtable): ... here.
11524
11525         * pt.c (tsubst_decl): Fix formatting.
11526
11527 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11528
11529         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
11530         (avoid_overlap, build_base_field): Likewise.
11531         (build_base_field, build_base_fields, is_empty_class):
11532         Test DECL_SIZE with integer_zero.
11533         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
11534         * cp-tree.h (struct lang_type): New field size_unit.
11535         (CLASSTYPE_SIZE_UNIT): New macro.
11536         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
11537         (cp_finish_decl): Delete -Wlarger-than processing.
11538         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
11539         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
11540         * tree.c (make_binfo): binfo vector is one entry longer.
11541         (walk_tree): Walk DECL_SIZE_UNIT.
11542
11543 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
11544
11545         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
11546         comment.
11547         (build_vtable_entry): Don't assume all vtable entries are
11548         functions.
11549         (build_vtbl_initializer): Adjust accordingly.
11550         (get_vtable_decl): Fix formatting.
11551
11552 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
11553
11554         * semantics.c (deferred_type_access_control): Walk the entire
11555         type_lookups list.
11556         (save_type_access_control): Rename from
11557         initial_deferred_type_access_control.  Just remember the value.
11558         (decl_type_access_control): New fn.
11559         (begin_function_definition): Use deferred_type_access_control, after
11560         we've started the function.  Set type_lookups to error_mark_node.
11561         * parse.y (frob_specs, fn.def1): Adjust.
11562         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
11563         (parse_end_decl, parse_bitfield0, parse_method): New fns.
11564         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
11565         (after_type_component_declarator0): Likewise.
11566         (after_type_component_declarator): Likewise.
11567         (notype_component_declarator): Likewise.
11568         * cp-tree.h: Adjust.
11569
11570         * decl.c (redeclaration_error_message): Allow redeclaration of
11571         namespace-scope decls.
11572
11573 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11574
11575         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
11576
11577 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
11578
11579         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
11580         * decl2.c (grokclassfn): Likewise.
11581
11582         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
11583
11584         * decl2.c (lang_decode_option): Don't set default message length
11585         here.
11586         * lex.c (lang_init_options): Set it here.
11587
11588 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
11589
11590         Make DECL_CONTEXT mean the class in which a member function was
11591         declared, even for a virtual function.
11592         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
11593         (DECL_FRIEND_CONTEXT): New macro.
11594         (DECL_REAL_CONTEXT): Remove.
11595         (SET_DECL_FRIEND_CONTEXT): Likewise.
11596         (DECL_VIRTUAL_CONTEXT): Adjust.
11597         (DECL_CLASS_SCOPE_P): Use TYPE_P.
11598         (add_friends): Remove.
11599         (hack_decl_function_context): Likewise.
11600         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
11601         CP_DECL_CONTEXT.
11602         (build_over_call): Fix indentation.  Use DECL_CONTEXT
11603         instead of DECL_CLASS_CONTEXT.
11604         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
11605         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
11606         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11607         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
11608         (build_base_field): Likewise.
11609         (finish_struct_1): Likewise.
11610         (build_self_reference): Likewise.
11611         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
11612         DECL_REAL_CONTEXT.
11613         (pushtag): Use decl_function_context, not
11614         hack_decl_function_context.
11615         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
11616         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
11617         (pushdecl): Remove bogus code.
11618         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
11619         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
11620         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11621         Use decl_function_context, nothack_decl_function_context.
11622         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
11623         (grokdeclarator): Likewise.  Use decl_function_context, not
11624         hack_decl_function_context.
11625         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
11626         (start_function): Use DECL_FRIEND_CONTEXT, not
11627         DECL_CLASS_CONTEXT.  Use decl_function_context, not
11628         hack_decl_function_context.
11629         (finish_function): Use decl_function_context, not
11630         hack_decl_function_context.
11631         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
11632         DECL_CLASS_CONTEXT.
11633         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
11634         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
11635         (grokfield): Likewise.
11636         (finish_builtin_type): Likewise.
11637         (finish_vtable_vardec): Use decl_function_context, not
11638         hack_decl_function_context.
11639         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11640         (start_static_initialization_or_destruction): Likewise.
11641         (finish_static_initialization_or_destruction): Likewise.
11642         (mark_used): Adjust logic for deciding when to synthesize methods.
11643         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
11644         DECL_REAL_CONTEXT.
11645         * error.c (dump_function_decl): Use DECL_CONTEXT, not
11646         DECL_CLASS_CONTEXT.
11647         * friend.c (is_friend): Likewise.
11648         (add_friends): Remove.
11649         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
11650         * lex.c (begin_definition_of_inclass_inline): Use
11651         decl_function_context, not hack_decl_function_context.
11652         (process_next_inline): Likewise.
11653         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
11654         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
11655         DECL_CLASSS_CONTEXT.
11656         (hack_identifier): Likewise.
11657         (synthesize_method):  Use decl_function_context, not
11658         hack_decl_function_context.
11659         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
11660         DECL_REAL_CONTEXT.
11661         (is_member_template): Use decl_function_context, not
11662         hack_decl_function_context.  Use DECL_CONTEXT, not
11663         DECL_CLASS_CONTEXT.
11664         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
11665         DECL_CLASS_CONTEXT.
11666         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
11667         DECL_REAL_CONTEXT.
11668         (push_template_decl_real): Likewise.
11669         (instantiate_class_template): Don't call add_friends.
11670         (tsubst_default_argument): Use DECL_CONTEXT, not
11671         DECL_REAL_CONTEXT.
11672         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
11673         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11674         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
11675         DECL_CLASS_CONTEXT.
11676         * repo.c (repo_inline_used): Likewise.
11677         * search.c (current_scope): Adjust for new _CONTEXT macros.
11678         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
11679         DECL_REAL_CONTEXT.
11680         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11681         (lookup_fnfields_here):Likewise.
11682         (check_final_overrider): Likewise.
11683         (init_vbase_pointers): Likewise.
11684         (virtual_context): Likewise.
11685         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
11686         (expand_body): Use decl_function_context, not
11687         hack_decl_function_context.
11688         * tree.c (hack_decl_function_context): Remove.
11689         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
11690         DECL_CLASS_CONTEXT.
11691         * typeck2.c (error_not_base_type): Likewise.
11692
11693 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
11694
11695         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
11696
11697 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11698
11699         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
11700
11701 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
11702
11703         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
11704
11705 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
11706
11707         * decl2.c (lang_decode_option): Enable automatic line wrapping.
11708
11709 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
11710
11711         * parse.y (frob_specs): Split out...
11712         (parse_decl): From here.
11713         (fn.def2): Call initial_deferred_type_access_control.
11714         (after_type_component_declarator0): Call frob_specs.
11715         (notype_component_declarator0): Likewise.
11716         * search.c (friend_accessible_p): Nested classes are friends of their
11717         enclosing classes.
11718
11719 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
11720
11721         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
11722         used to create an implicit temporary.
11723
11724         * class.c (dfs_modify_vtables): Tweak calculation of functions to
11725         override.
11726
11727 2000-02-08  Nathan Sidwell  <nathan@acm.org>
11728
11729         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
11730         strip array element qualifiers too.
11731
11732 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
11733
11734         * decl.c (store_parm_decls): Don't build cleanups for parameters
11735         while processing_template_decl.
11736
11737 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
11738
11739         * cp-tree.h (struct saved_scope): Add incomplete field.
11740         (namespace_scope_incomplete): New macro.
11741         * decl.c (pushdecl): Use it.
11742         (hack_incomplete_structures): Use it.  See through artificial
11743         binding levels.
11744         (mark_saved_scope): Mark it.
11745
11746         Implement access control for nested types.
11747         * search.c (type_access_control): New fn.
11748         (accessible_p): Now we do perform access control for types.
11749         * semantics.c (deferred_type_access_control): New fn.
11750         (initial_deferred_type_access_control): New fn.
11751         (begin_function_definition): Call it.  Add lookups parm.
11752         * decl.c (struct binding_level): Add this_class field.
11753         (pushlevel_class): Set it.
11754         (mark_binding_level): Mark it.
11755         (lookup_name_real): Use it.  Call type_access_control.
11756         (mark_saved_scope): Mark lookups field.
11757         * cp-tree.h (flagged_type_tree): Add lookups field.
11758         (struct saved_scope): Add lookups field.
11759         (type_lookups): New macro.
11760         * parse.y (declmods): Now <ftype>.
11761         (parse_decl): Add lookups parm.  Call
11762         initial_deferred_type_access_control.
11763         (lang_extdef): Clear type_lookups.
11764         (typed_declspecs, declmods, typespec): Set lookups field.
11765         (initdcl): Call deferred_type_access_control.
11766         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
11767         component_decl_1, named_parm): Adjust.
11768         * friend.c (is_friend): Nested classes are friends of their
11769         enclosing classes.
11770
11771         * class.c (currently_open_derived_class): New fn.
11772         * method.c (hack_identifier): Use it.
11773
11774         * lex.c (do_identifier): Remove obsolete code.
11775
11776         * parse.y (typed_typespecs): Propagate new_type_flag properly.
11777
11778 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
11779
11780         * tinfo.h: Remove apostrophes from C++ comment (xgettext
11781         thinks this file is plain C).
11782
11783 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11784
11785         * Makefile.in (call.o): Depend on $(EXPR_H).
11786
11787         * call.c: Include "expr.h".
11788
11789         * class.c (dump_class_hierarchy): Add prototype.
11790
11791         * search.c (dfs_get_pure_virtuals): Likewise.
11792
11793 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
11794
11795         * parse.y (simple_stmt): Allow :: token in asm parameter list.
11796         * parse.c: Rebuilt.
11797
11798 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
11799
11800         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
11801         Store it in DECL_FCONTEXT.
11802         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
11803
11804 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
11805
11806         * tinfo.h (old abi): #include "tconfig.h".
11807         * tinfo.cc (convert_to_base): Move into old abi section.
11808
11809 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
11810
11811         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
11812         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
11813         (BINFO_PRIMARY_BINFO): New macro.
11814         (BF_DELTA): Rename to ...
11815         (BV_DELTA): ... this.
11816         (BF_VCALL_INDEX): Rename to ...
11817         (BV_VCALL_INDEX): ... this.
11818         (BF_FN): Rename to ...
11819         (BV_FN): ... this.
11820         * class.c (build_vbase_path): Adjust for changes to reverse_path.
11821         (set_rtti_entry): Rename BF_ macros to BV_ variants.
11822         (modify_vtable_entry): Simplify.
11823         (add_virtual_function): Rename BF_ macros to BV_ variants.
11824         (build_vtable_initializer): Likewise.
11825         (get_class_offset_1): Remove.
11826         (dfs_get_class_offset): Likewise.
11827         (get_class_offset): Likewise.
11828         (dfs_find_final_overrider): New function.
11829         (find_final_overrider): Likewise.
11830         (modify_one_vtable): Remove.
11831         (dfs_find_base): New function.
11832         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
11833         find_final_overrider.
11834         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
11835         virtuals.
11836         (dfs_fixup_vtable_deltas): Remove.
11837         (override_one_vtable): Remove.
11838         (merge_overrides): Likewise.
11839         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
11840         unreal chilren of virtual bases.
11841         (finish_struct_1): Don't use merge_overrides.  Don't use
11842         dfs_fixup_vtable_deltas.
11843         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
11844         BINFOs.
11845
11846 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
11847             Jason Merrill  <jason@yorick.cygnus.com>
11848
11849         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
11850
11851 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
11852
11853         * exception.cc (__throw_bad_typeid): Add missing std::.
11854
11855 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11856
11857         * cp-tree.h (make_thunk): PROTO -> PARAMS.
11858
11859 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
11860
11861         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
11862
11863         Runtime support for new-abi rtti.
11864         * inc/typeinfo (type_info::operator!=): Define in class.
11865         (type_info::before, type_info::name, type_info::operator==,
11866         type_info::operator!=): Define new ABI implementations.
11867         (type_info::is_pointer_p, type_info::is_function_p): Declare
11868         new virtual functions.
11869         (type_info::do_catch, type_info::do_upcast): Likewise.
11870
11871         * tinfo.h (__base_class_info): Define new class.
11872         (__class_type_info): Likewise.
11873         (__si_class_type_info): Likewise.
11874         (__vmi_class_type_info): Likewise.
11875         (__dynamic_cast): Prototype.
11876
11877         * tinfo.cc: Conditionalize old and new rtti mechanisms.
11878         (type_info::is_pointer_p): Define new function.
11879         (type_info::is_function_p): Likewise.
11880         (type_info::do_catch): Likewise.
11881         (type_info::do_upcast): Likewise.
11882         (vtable_prefix): New structure for vtable access.
11883         (adjust_pointer): Define new template function.
11884         (contained_p, public_p, virtual_p, contained_public_p,
11885         contained_nonpublic_p, contained_nonvirtual_p): Define new
11886         functions.
11887         (nonvirtual_base_type): New local variable.
11888         (__class_type_info::~__class_type_info): Define.
11889         (__si_class_type_info::~__si_class_type_info): Likewise.
11890         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
11891         (__class_type_info::do_catch): Define new function.
11892         (__class_type_info::do_upcast): Likewise.
11893         (__class_type_info::find_public_src): Likewise.
11894         (__class_type_info::do_find_public_src): Likewise.
11895         (__si_class_type_info::do_find_public_src): Likewise.
11896         (__vmi_class_type_info::do_find_public_src): Likewise.
11897         (__class_type_info::do_dyncast): Likewise.
11898         (__si_class_type_info::do_dyncast): Likewise.
11899         (__vmi_class_type_info::do_dyncast): Likewise.
11900         (__class_type_info::do_upcast): Likewise.
11901         (__si_class_type_info::do_upcast): Likewise.
11902         (__vmi_class_type_info::do_upcast): Likewise.
11903         (__dynamic_cast): Likewise.
11904
11905         * tinfo2.cc (__fundamental_type_info): Define new class.
11906         (__pointer_type_info): Likewise.
11907         (__reference_type_info): Likewise.
11908         (__array_type_info): Likewise.
11909         (__function_type_info): Likewise.
11910         (__enum_type_info): Likewise.
11911         (__ptr_to_member_type_info): Likewise.
11912         (__fundamental_type_info::~__fundamental_type_info): Define.
11913         (__pointer_type_info::~__pointer_type_info): Likewise.
11914         (__reference_type_info::~__reference_type_info): Likewise.
11915         (__array_type_info::~__array_type_info): Likewise.
11916         (__function_type_info::~__function_type_info): Likewise.
11917         (__enum_type_info::~__enum_type_info): Likewise.
11918         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
11919         (__pointer_type_info::do_catch): Define new function.
11920         (__ptr_to_member_type_info::do_catch): Define new function.
11921
11922         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
11923         (__is_pointer): Likewise.
11924
11925         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
11926
11927 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
11928
11929         * cp/class.c (build_vtable): Rename to build_primary_vtable.
11930         (prepare_fresh_vtable): Rename to build_secondary_vtable.
11931         (make_new_vtable): New function.
11932         (modify_vtable_entry): Handle generation of new vtables correctly.
11933         (modify_one_vtable): Remove unused parameter.
11934         (dfs_fixup_vtable_deltas): Likewise.
11935         (override_one_vtable): Use build_secondary_vtable.
11936         (finish_struct_1): Use build_primary_vtable and
11937         build_secondary_vtable.
11938
11939 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
11940
11941         * cp/decl.c: Adjust variable names, comments, help strings.
11942
11943 2000-01-29  Nathan Sidwell  <nathan@acm.org>
11944
11945         * new2.cc (operator delete[]): Use operator delete, don't assume
11946         implementation.
11947
11948 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
11949
11950         * class.c (build_vtbl_initializer): Add argument to
11951         build_vtable_entry call.
11952
11953 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
11954
11955         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
11956         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
11957         (BF_DELTA): New macro.
11958         (BF_VCALL_INDEX): Likewise.
11959         (BF_FN): Likewise.
11960         (THUNK_VCALL_OFFSET): Likewise.
11961         (make_thunk): Change prototype.
11962         * class.c (build_vtable_entry): Integrate
11963         build_vtable_entry_for_fn.  Handle vcall indices.
11964         (build_vtable_entry_for_fn): Remove.
11965         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
11966         BF_VCALL_INDEX, BF_FN.
11967         (modify_vtable_entry): Integrate common code from
11968         modify_one_vtable and dfs_fixup_vtable_deltas.
11969         (add_virtual_function): Set BF_VCALL_INDEX.
11970         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
11971         and BF_FN.
11972         (modify_one_vtable): Simplify.
11973         (dfs_fixup_vtable_deltas): Likewise.
11974         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
11975         * method.c (make_thunk): Handle vcall indices.
11976
11977 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
11978
11979         Compiler side new abi rtti (not enabled).
11980         * cp-tree.h (new_abi_rtti_p): New macro.
11981         (emit_support_tinfos): Prototype new function.
11982         (tinfo_decl_p): Likewise.
11983         (emit_tinfo_decl): Likwise.
11984         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
11985         macros.
11986         (doing_runtime): New local static.
11987         (init_rtti_processing): Add new-abi initializer.
11988         (get_tinfo_decl): Add new-abi logic.
11989         (tinfo_from_decl): Likewise.
11990         (build_dynamic_cast_1): Likewise.
11991         (qualifier_flags): New static function.
11992         (tinfo_base_init): Likewise.
11993         (generic_initializer): Likewise.
11994         (ptr_ref_initializer): Likewise.
11995         (ptmd_initializer): Likewise.
11996         (class_hint_flags): Likewise.
11997         (class_initializer): Likewise.
11998         (synthesize_tinfo_var): Likewise.
11999         (create_real_tinfo_var): Likewise.
12000         (create_pseudo_type_info): Likewise.
12001         (get_vmi_pseudo_type_info): Likewise.
12002         (create_tinfo_types): Likewise.
12003         (emit_support_tinfos): New global function.
12004         (tinfo_decl_p): New global predicate.
12005         (emit_tinfo_decl): New global function.
12006         * class.c (set_rtti_entry): Generalize for old and new rtti.
12007         (build_vtbl_initializer): Likewise.
12008         * decl2.c (finish_file): Likewise.
12009
12010 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
12011
12012         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
12013         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
12014
12015 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
12016
12017         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
12018         for scopes.
12019
12020 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
12021
12022         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
12023
12024 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
12025
12026         * optimize.c (calls_setjmp_r): Supply new argument
12027         to special_function_p.
12028
12029 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12030
12031         * call.c: PROTO -> PARAMS.
12032         * class.c: Likewise.
12033         * cp-tree.h: Likewise.
12034         * cvt.c: Likewise.
12035         * decl.c: Likewise.
12036         * decl.h: Likewise.
12037         * decl2.c: Likewise.
12038         * dump.c: Likewise.
12039         * errfn.c: Likewise.
12040         * error.c: Likewise.
12041         * except.c: Likewise.
12042         * expr.c: Likewise.
12043         * init.c: Likewise.
12044         * input.c: Likewise.
12045         * lex.c: Likewise.
12046         * lex.h: Likewise.
12047         * method.c: Likewise.
12048         * optimize.c: Likewise.
12049         * parse.y: Likewise.
12050         * pt.c: Likewise.
12051         * repo.c: Likewise.
12052         * rtti.c: Likewise.
12053         * search.c: Likewise.
12054         * semantics.c: Likewise.
12055         * spew.c: Likewise.
12056         * tree.c: Likewise.
12057         * typeck.c: Likewise.
12058         * typeck2.c: Likewise.
12059         * xref.c: Likewise.
12060
12061 2000-01-25  Richard Henderson  <rth@cygnus.com>
12062
12063         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
12064
12065 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
12066
12067         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
12068         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
12069         (struct vcall_offset_data_s): New type.
12070         (dfs_vcall_offset_queue_p): New function.
12071         (dfs_build_vcall_offset_vtbl_entries): Likewise.
12072         (build_vcall_offset_vtbl_entries): Likewise.
12073         (layout_vtable_decl): Likewise.
12074         (num_vfun_entries): Likewise.
12075         (num_extra_vtbl_entries): Add the entries for vcall offsets.
12076         (build_vtbl_initializer): Likewise.
12077         (dfs_finish_vtabls): Use layout_vtable_decl.
12078         (modify_one_vtables): Always duplicate vtables under the new ABI.
12079         (finish_struct_1): Use layout_vtable_decl.
12080
12081 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12082
12083         * decl.c (member_function_or_else): Change third arg from a format
12084         specifier to an `enum overload_flags'.  Callers changed.
12085
12086 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
12087
12088         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
12089         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
12090         build_const_cast, get_delta_difference, check_return_expr): Avoid
12091         ANSI string concatenation usage.
12092
12093 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
12094
12095         * class.c (layout_class_type): Put the fields required to make a
12096         class non-empty at the end, not the beginning, of the TYPE_FIELDs
12097         list.
12098
12099 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
12100
12101         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
12102         template.
12103
12104         * decl2.c (mark_used): Do instantiate inlines that have been
12105         explicitly instantiated.
12106
12107 2000-01-24  Richard Henderson  <rth@cygnus.com>
12108
12109         * call.c (build_over_call): Use expand_tree_builtin.
12110         * typeck.c (build_function_call_real): Likewise.
12111         (build_binary_op_nodefault): Handle unordered compares.
12112
12113 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
12114
12115         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
12116         cp_tree_index values.
12117         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
12118         New global node #defines for them.
12119         * rtti.c (call_void_fn): Replace with ...
12120         (build_runtime_decl): ... new static function.
12121         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
12122         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
12123         (build_dynamic_cast_1): Always produce correctly typed result.
12124         Explicitly produce type_info addresses. Use dynamic_cast_node.
12125         * exception.cc (__throw_bad_cast): Return `void *'.
12126         (__throw_bad_typeid): Return `const type_info &'.
12127
12128 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
12129
12130         * cp-tree.h (get_vtable_decl): Prototype new function.
12131         * class.c (get_vtable_decl): New function. Broken out from ...
12132         (build_vtable): ... here. Use it.
12133         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
12134         by get_vtable_decl.
12135
12136 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
12137
12138         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
12139         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
12140         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
12141         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
12142         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
12143         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
12144         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
12145         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
12146         (CPTI_TINFO_VAR_ID): New enumeration.
12147         (__tp_desc_type_node, __access_mode_type_node,
12148         __bltn_desc_type_node, __user_desc_type_node,
12149         __class_desc_type_node, __ptr_desc_type_node,
12150         __attr_desc_type_node, __func_desc_type_node,
12151         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
12152         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
12153         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
12154         enum_desc_type_node, class_desc_type_node,
12155         si_class_desc_type_node, vmi_class_desc_type_node,
12156         ptmd_desc_type_node, base_desc_type_node): New #defines.
12157         (tinfo_fn_id, tinfo_fn_type): Rename to ...
12158         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
12159         (tinfo_var_id): New enumeration.
12160         (DECL_TINFO_FN_P): Augment comment.
12161         * decl.c (cp_global_trees): Adjust documentation.
12162         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
12163         tinfo_decl_type and tinfo_var_id.
12164         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
12165         (build_typeid): Remove unused variable.
12166         (get_tinfo_var): Use tinfo_var_id.
12167         (tinfo_name): New static function.
12168         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
12169         (tinfo_from_decl): Likewise.
12170         (get_base_offset): New static function, broken out of
12171         expand_class_desc.
12172         (expand_si_desc): Use tinfo_name.
12173         (expand_class_desc): Likewise. Lose local static variable.
12174         Use base_desc_type_node. Use get_base_offset.
12175         (expand_ptr_desc): Use tinfo_name.
12176         (expand_attr_desc): Likewise.
12177         (expand_generic_desc): Likewise.
12178
12179         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
12180         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
12181
12182 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
12183
12184         * cp-tree.h (__eprintf): Remove declaration.
12185         * tree.c (__eprintf): Remove definition.
12186
12187 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
12188             Mark Mitchell  <mark@codesourcery.com>
12189
12190         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
12191         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
12192
12193 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
12194
12195         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
12196
12197 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
12198
12199         * cp-tree.h (register_dtor_fn): New function.
12200         * decl.c (destroy_local_static): Rename to ...
12201         (register_dtor_fn): ... this.  Give it external linkage.
12202         (expand_static_init): Use it.
12203         * decl2.c (do_static_initialization): Likewise, if using
12204         __cxa_atexit.
12205         (do_static_destruction): Check that __cxa_atexit is not in use.
12206         (finish_file): Don't call do_static_destruction if using
12207         __cxa_atexit.
12208
12209         * typeck.c (convert_arguments): Restore two-message error
12210         reporting.
12211
12212 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
12213
12214         Remap dynamic cast hint values to be consistent across ABIs.
12215         * search.c (dynamic_cast_base_recurse): Remap generated value.
12216         (get_dynamic_cast_base_type): Adjust documentation.
12217         * tinfo.h (__user_type_info::dyncast): Likewise.
12218         (__user_type_info::find_public_subobj): Remap BOFF meaning.
12219         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
12220         (__class_type_info::do_dyncast): Likewise.
12221         (__class_type_info::do_find_public_subobj): Likewise.
12222         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
12223
12224 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
12225
12226         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
12227
12228         * typeck2.c (incomplete_type_error): Restore previous
12229         cp_error and cp_error_at call sequence.
12230
12231 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
12232
12233         * class.c (dump_class_hierarchy): Make format agree with argument;
12234         cast pointer to unsigned long and print with %lx.
12235
12236 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
12237
12238         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
12239
12240         * typeck.c (composite_pointer_type, common_type,
12241         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
12242         build_function_call_real, convert_arguments,
12243         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
12244         build_unary_op, mark_addressable, build_compound_expr,
12245         build_static_cast, build_reinterpret_cast, build_const_cast,
12246         build_c_cast, build_modify_expr, get_delta_difference,
12247         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
12248         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
12249         into a single one.
12250         * typeck2.c (readonly_error, abstract_virtuals_error,
12251         process_init_constructor, check_for_new_type): Likewise.
12252
12253 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
12254
12255         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
12256         VAR_DECLs.
12257
12258 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
12259
12260         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
12261         (build_x_typeid): Likewise.
12262         (get_tinfo_fn): Likewise.
12263         (get_tinfo_fn_unused): Rename to ...
12264         (get_tinfo_decl): ... here.
12265         * rtti.c (build_headof): Replace logic error with assertion.
12266         (get_tinfo_fn_dynamic): Rename to ...
12267         (get_tinfo_decl_dynamic): ... here. Make static. Use
12268         complete_type_or_else.
12269         (build_x_typeid): Move into ...
12270         (build_typeid): ... here. Adjust call to
12271         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
12272         throw_bad_typeid expression.
12273         (get_tinfo_fn_unused): Rename to ...
12274         (get_tinfo_decl): ... here. Adjust comment.
12275         (get_tinfo_fn): Delete.
12276         (tinfo_from_decl): New static function.
12277         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
12278         (get_typeid): Use complete_type_or_else.
12279         (build_dynamic_cast_1): Adjust calls to
12280         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
12281         * parse.y (primary): Adjust call to build_typeid.
12282         * except.c (build_eh_type_type_ref): Adjust call to
12283         get_tinfo_decl. Mark as used.
12284         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
12285         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
12286         * parse.c: Regenerated.
12287
12288 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
12289
12290         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
12291         calling convention.
12292         (resolves_to_fixed_type_p): Document calling convention.
12293         * rtti.c (build_x_typeid): Initialize NONNULL.
12294
12295         * cp-tree.h (build_shared_int_cst): New function.
12296         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
12297         * class.c (modify_vtable_entry): Likewise.
12298         (add_virtual_function): Split out code to generated shared
12299         INTEGER_CSTs to build_share_int_cst.
12300         (modify_all_vtables): Handle all the overridden functions here.
12301         Add overridden functions from non-primary virtual bases to the
12302         primary vtable.
12303         (finish_struct_1): Adjust call to modify_all_vtables.  Add
12304         overridden functions from non-primary bases to the vtable.
12305         * tree.c (build_shared_int_cst): New function.
12306
12307         * cp-tree.h (scratchalloc): Remove.
12308         (build_scratch_list): Likewise.
12309         * call.c (convert_class_to_reference): Replace build_scratch_list
12310         and build_expr_list with build_tree_list.
12311         (add_candidate): Replace scratchalloc with expralloc.  Note memory
12312         leak.
12313         (build_user_type_conversion_1):  Replace build_scratch_list
12314         and build_expr_list with build_tree_list.
12315         (build_new_op): Likewise.
12316         (build_op_delete_call): Likewise.
12317         (convert_like): Likewise.
12318         * cvt.c (ocp_convert): Likewise.
12319         * decl.c (start_decl): Likewise.
12320         (start_function): Likewise.
12321         (finish_destructor_body): Likewise.
12322         (maybe_build_cleanup_1): Likewise.
12323         * decl2.c (reparse_decl_as_expr): Likewise.
12324         * init.c (perform_member_init): Likewise.
12325         (expand_cleanup_for_base): Likewise.
12326         (build_builtin_delete_call): Likewise.
12327         (build_new_1): Likewise.
12328         (build_delete): Likewise.
12329         * method.c (do_build_assign_ref): Likewise.
12330         * parse.y (already_scoped_stmt): Likewise.
12331         (nontrivial_exprlist): Likewise.
12332         (net_initializer): Likewise.
12333         (initlist): Likewise.
12334         * parse.c: Regenerated.
12335         * rtti.c (build_x_typeid): Likewise.
12336         (build_dynamic_cast_1): Likewise.
12337         * typeck.c (build_x_compound_expr): Likewise.
12338         (build_static_cast): Likewise.
12339         (build_modify_expr): Likewise.
12340
12341         * cp-tree.h (DECL_VINDEX): Add documentation.
12342         * class.c (build_vtable_entry): Likewise.
12343         (start_vtable): Add comment.
12344         (add_virtual_function): Replace pending_hard_virtuals with
12345         overridden_virtuals and pending_virtuals with new_virtuals.
12346         Replace redundant assignments with assertions.
12347         (check_for_override): Add comment.
12348         (check_bases_and_members): Replace pending_hard_virtuals with
12349         overridden_virtuals and pending_virtuals with new_virtuals.
12350         (create_vtbl_ptr): Likewise.
12351         (layout_class_type): Likewise.
12352         (finish_struct_1): Likewise.  Add comments.
12353
12354 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
12355
12356         * class.c (finish_struct_1): Replace redundant code with
12357         assertions.
12358
12359         * cp-tree.h (flag_new_abi): Move.
12360         (flag_use_cxa_atexit): Likewise.
12361         (flag_honor_std): Likewise.
12362         (flag_rtti): Likewise.
12363         (vbase_offsets_in_vtable_p): Define.
12364         (vptrs_present_everywhere_p): Likewise.
12365         (TYPE_CONTAINS_VPTR_P): Likewise.
12366         (dfs_walk_real): Declare.
12367         * class.c (build_vbase_pointer_fields): Check
12368         vbase_offsets_in_vtable_p.
12369         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
12370         BINFO_VPTR_FIELD.
12371         (build_vbase_offset_vtbl_entries): Simplify.
12372         (build_vbase_offset_vtbl_entries): Adjust.
12373         (build_vbase_pointer): Add ability to look up vbase offsets in
12374         vtable.
12375         (start_vtable): New function.
12376         (add_virtual_function): Use it.
12377         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
12378         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
12379         (build_vtbl_initializer): Take the type of the complete object as
12380         input.  Use it to correctly calculate vbase offsets.
12381         (dfs_finish_vtbls): Pass the complete type to
12382         build_vtbl_initializer.
12383         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
12384         (create_vtable_ptr): Create a vtable even if there are no
12385         new virtual functions, under the new ABI.
12386         (finish_struct_1): Likewise.
12387         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
12388         * decl.c (exapnd_static_init): Remove call to
12389         preserve_initializer.
12390         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
12391         vtables.
12392         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
12393         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
12394         (construct_virtual_bases): Don't initialize virtual base pointers
12395         under the new ABI.
12396         (build_aggr_init): Clean up comment.
12397         (expand_aggr_init_1): Likewise.
12398         * rtti.c (expand_class_desc): Store the virtual function table
12399         index where the vbase offset lives in the offset field.
12400         * search.c (dfs_walk_real): Make it global.
12401         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
12402         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
12403
12404         * tinfo.h (USItype): Make it signed under the new ABI.
12405         * tinfo.cc (convert_to_base): New function.  Encapsulate base
12406         conversion logic here.
12407         (__class_type_info::do_upcast): Use it.
12408         (__class_type_info::do_dyncast): Likewise.
12409         (__class_type_info::do_find_public_subobj): Likewise.
12410
12411         * init.c (construct_virtual_bases): Don't look up the addresses of
12412         virtual bases at run-time.
12413
12414         * class.c (build_vbase_pointer): Relocate.
12415         (build_vbase_pointer_fields): Likewise.
12416         (dfs_build_vbase_offset_vtbl_entries): Likewise.
12417         (build_vbase_offset_vtbl_entries): Likewise.
12418
12419         * decl.c (init_decl_processing): Complain if -fnew-abi
12420         -fno-vtable-thunks is used.
12421
12422         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
12423         flag_new_abi.
12424
12425 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
12426
12427         * cp-tree.h (num_extra_vtbl_entries): New function.
12428         (size_extra_vtbl_entries): Likewise.
12429         (dfs_vtable_path_unmark): Likewise.
12430         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
12431         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
12432         * class.c (num_extra_vtbl_entries): New function.
12433         (size_extra_vtbl_entries): Likewise.
12434         (dfs_build_vbase_offset_vtbl_entries): New function.
12435         (build_vbase_offset_vtbl_entries): Likewise.
12436         (build_vtbl_initializer): Use it.
12437         (finish_struct_1): Adjust vtable sizes (using
12438         num_extra_vtbl_entries).
12439         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
12440         THUNK_DECL is non-NULL before expanding it.
12441         * init.c (expand_virtual_init): Adjust the vtable pointer by
12442         size_extra_vtbl_entries before storing it.
12443         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
12444         Handle TREE_LIST parameters here, not in the dfs_* functions.
12445         (dfs_unmarked_real_bases_queue_p): Adjust.
12446         (dfs_marked_real_bases_queue_p): Likewise.
12447         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
12448         (dfs_vtable_path_marked_real_bases_queue_p): New function.
12449         (dfs_vtable_path_unmark): Likewise.
12450
12451 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
12452
12453         * optimize.c (copy_body_r): Clear the operand three of a
12454         TARGET_EXPR when copying it.
12455
12456 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12457
12458         * method.c (build_decl_overload_real): Check whether we are in ::
12459         before returning __builtin_new/delete.
12460
12461 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
12462
12463         * pt.c (tsubst_friend_function): Improve comment.
12464         (instantiate_decl): Avoid crashing when a "nested" function is
12465         instantiated from the top level.
12466
12467         * dump.c (dqeueue_and_dump): Dump
12468         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
12469
12470 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12471
12472         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
12473
12474 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
12475
12476         * g++spec.c (lang_specific_driver): Add -fnew-abi if
12477         ENABLE_NEW_GXX_ABI defined.
12478         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
12479         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
12480         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
12481
12482 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
12483
12484         * decl.c (start_cleanup_fn): Call pushdecl.
12485
12486         * call.c (convert_class_to_reference): Fix typos.
12487         (build_conditional_expr): Handle errors gracefully.
12488         * class.c (push_nested_class): Likewise.
12489         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
12490         (DECL_THIS_EXTERN): Use it.
12491         (DECL_THIS_STATIC): Likewise.
12492         * cvt.c (convert_to_void): Handle errors gracefully.
12493         (build_expr_type_conversion): Likewise.
12494         * decl.c (maybe_push_decl): Likewise.
12495         (start_decl_1): Likewise.
12496         (require_complete_types_for_parms): Likewise.
12497         * parse.y (structsp): Likewise.
12498         (base_class): Likewise.
12499         * parse.c: Regenerated.
12500         * pt.c (finish_member_template_decl): Likewise.
12501         * typeck.c (decay_conversion): Likewise.
12502
12503         * cp-tree.h (dfs_skip_vbases): New function.
12504         (find_vbase_instance): Likewise.
12505         * class.c (determine_primary_base): Allow a nearly empty base to
12506         serve as a primary base class under the new ABI.
12507         (get_class_offset_1): Rename to ...
12508         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
12509         messages here.
12510         (get_class_offset): Use it.  Issue error messages here.
12511         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
12512         find the right copies of virtual bases.
12513         (fixup_vtable_deltas1): Rename to ...
12514         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
12515         bases as primary bases.
12516         (fixup_vtable_deltas): Remove.
12517         (override_one_vtable): Handle virtual bases as primary bases.
12518         (merge_overrides): Likewise.
12519         (finish_struct_1): Likewise.
12520         (dump_class_hierarchy): Dump primary-ness of bases as well.
12521         * search.c (mark_primary_bases): Use a pre-order traversal to
12522         handle primary virtual bases.
12523         (dfs_skip_vbases): New fiunction.
12524         (expand_upcast_fixups): Adjust to handle primary virtual bases.
12525         (fixup_virtual_upcast_offsets): Likewise.
12526         (fixup_all_virtual_upcast_offsets): Likewise.
12527         (dfs_find_vbase_instances): New function.
12528         (find_vbase_instance): Likewise.
12529
12530 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
12531
12532         * lex.c (DIR_SEPARATOR): Delete macro.
12533
12534 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
12535
12536        * decl2.c (lang_decode_option): Handle automatic line wrapping
12537        option.
12538
12539 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
12540
12541         * friend.c (do_friend): Don't resolve scopes when processing
12542         template declarations, even if the qualifying scope doesn't
12543         involve template parameters.
12544
12545 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
12546
12547         * class.c (dfs_modify_vtables_queue_p): Remove.
12548         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
12549         and dfs_marked_real_bases_queue_p instead of
12550         dfs_modify_vtables_queue_p.
12551
12552         * class.c (build_vbase_path): Simplify.
12553         (dfs_propagate_binfo_offsets): New function.
12554         (propagate_binfo_offsets): Use it.
12555         (remove_base_field): Simplify.
12556         (dfs_set_offset_for_vbases): Remove.
12557         (dfs_set_offset_for_shared_vbases): New function.
12558         (dfs_set_offset_for_unshared_vbases): Likewise.
12559         (layout_virtual_bases): Use them.
12560         (layout_basetypes): Don't call propagate_binfo_offsets.
12561         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
12562         for the vbases.
12563
12564         * class.c (build_base_field): New function, split out from ...
12565         (build_base_fields): ... here.  Use it.  Allocate primary bases
12566         first, under the new ABI.
12567         (get_vtable_entry): Remove.
12568         (remove_base_field): New function, split out from ...
12569         (remove_base_fields): ... here.  Adjust since primary bases come
12570         first under the new ABI.
12571
12572         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
12573         (initialize_vtbl_ptrs): New function.
12574         (expand_indirect_vtbls_init): Change prototype.
12575         (convert_pointer_to_vbase): Declare.
12576         * init.c (expand_direct_vtbls_init): Remove.
12577         (dfs_initialize_vtbl_ptrs): New function.
12578         (initialize_vtbl_ptrs): Likewise.
12579         (emit_base_init): Use initialize_vtbl_ptrs.
12580         * search.c (convert_pointer_to_vbase): Make it global.
12581         (expand_indirect_vtbls_init): Remove vtable initialization code.
12582         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
12583
12584         * class.c (dfs_finish_vtbls): New function.
12585         (finish_vtbls): Use it.
12586         (dump_class_hierarchy): New function.
12587
12588         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
12589         (BINFO_VBASE_PRIMARY_P): New macro.
12590         (BINFO_VIRTUALS): Add to documentation.
12591         (SET_BINFO_PRIMARY_MARKED_P): Remove.
12592         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
12593         (dfs_mark_primary_bases_queue_p): Likewise.
12594         (dfs_unmarked_real_bases_queue_p): New function.
12595         (dfs_marked_real_bases_queue_p): Likewise.
12596         * search.c (dfs_mark_primary_bases): Adjust.
12597         (mark_primary_bases): Likewise.
12598         (get_shared_vbase_if_not_primary): New function.
12599         (dfs_unmarked_real_bases_queue_p): Likewise.
12600         (dfs_marked_real_bases_queue_p): Likewise.
12601         (dfs_get_pure_virtuals): Simplify.
12602         (get_pure_virtuals): Likewise.
12603
12604 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12605
12606         * lex.c: Include tm_p.h.
12607
12608 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
12609
12610         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
12611
12612 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
12613
12614         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
12615         * pt.c (instantiate_decl): Defer comdat templates that might not be
12616         needed.
12617
12618         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
12619         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
12620         (finish_file): Likewise.
12621
12622         * decl2.c (import_export_class): Undo 12/14 change.
12623
12624         * error.c (dump_decl): operator new, not operatornew.
12625
12626         * class.c (field_decl_cmp): A nontype is "greater" than a type.
12627         * search.c (lookup_field_1): Look for the last field with the
12628         desired name.
12629
12630 2000-01-05  Nathan Sidwell  <nathan@acm.org>
12631
12632         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
12633         FUNCTION_DECL.
12634
12635 2000-01-05  Nathan Sidwell  <nathan@acm.org>
12636
12637         * typeck.c (build_static_cast): Don't strip target qualifiers
12638         when casting from a class.
12639
12640 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12641
12642         * class.c (warn_hidden): Initialize variable `fndecl'.
12643
12644 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
12645
12646         * decl.c (flag_isoc9x): New variable to be able to use code in
12647         c-common.c.  For now always zero.
12648
12649 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
12650
12651         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
12652         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
12653         or unshare_base_binfos for virtual bases here.
12654         * search.c (dfs_get_vbase_types): Do it here.
12655         (get_vbase_types): Adjust.
12656
12657 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
12658
12659         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
12660         (BINFO_PRIMARY_MARKED_P): Use flag 5.
12661         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
12662         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
12663         (unmark_primary_bases): Remove declaration.
12664         (unmarkedp): Declare.
12665         (dfs_vbase_unmark): Likewise.
12666         * class.c (determine_primary_base): Return immediately if there
12667         are no base classes.  Call mark_primary_bases here.
12668         (modify_all_direct_vtables): Remove.
12669         (modify_all_indirect_vtables): Remove.
12670         (dfs_modify_vtables_queue_p): New function.
12671         (dfs_modify_vtables): New function.
12672         (modify_all_vtables): Use them.
12673         (build_base_fields): Build FIELD_DECLs for primary virtual base
12674         classes.
12675         (create_vtable_ptr): Don't call determine_primary_base here.
12676         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
12677         (dfs_set_offset_for_vbases): ... this.
12678         (layout_virtual_bases): Use it.
12679         (layout_class_type): Call determine_primary_base here.
12680         * search.c (unmarkedp): Make it global.
12681         (shared_marked_p): Simplify.
12682         (shared_unmarked_p): Likewise.
12683         (dfs_primary_bases_queue_p): Remove.
12684         (dfs_unmark_primary_bases): Likewise.
12685         (unmark_primary_bases): Likewise.
12686         (mark_primary_bases): Simplify.
12687         (get_pure_virtuals): Don't call mark_primary_bases here.
12688         (dfs_vbase_unmark): New function.
12689         (get_vbase_types): Simplify.
12690
12691         * class.c (struct base_info): Remove.
12692         (determine_primary_base): Take has_virtual_p rather than a
12693         base_info as input.  Don't calculate max_has_virtual.
12694         (finish_struct_bits): Remove max_has_virtual argument.
12695         (create_vtable_ptr): Remove max_has_virtual_p argument.
12696         (layout_virtual_bases): Remove max argument.
12697         (layout_basetypes): Likewise.
12698         (layout_class_type): Remove max_has_virtual_p argument.
12699         (finish_struct_1): Remove max_has_virtual.
12700
12701         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
12702         (layout_basetypes): Remove.
12703         * class.c (propagate_binfo_offsets): Moved here from tree.c.
12704         Update to handle primary virtual bases.
12705         (remove_base_fields): New function, split out from
12706         layout_basetypes.
12707         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
12708         (layout_virtual_bases): New function, split out from
12709         layout_basetypes.  Update to handle primary virtual bases.
12710         (layout_basetypes): Moved here from tree.c.  Use
12711         remove_base_fields and layout_virtual_bases.
12712         * search.c (dfs_mark_primary_bases_queue_p): New function.
12713         (mark_primary_bases): Use it.
12714         * tree.c (CEIL): Remove.
12715         (propagate_binfo_offsets): Remove.
12716         (layout_basetypes): Remove.
12717
12718 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
12719
12720         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
12721         (BINFO_PRIMARY_MARKED_P): New macro.
12722         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
12723         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
12724         (mark_primary_bases): New function.
12725         (unmark_primary_bases): Likewise.
12726         * search.c (get_abstract_virtuals_1): Remove.
12727         (dfs_mark_primary_bases): New function.
12728         (mark_primary_bases): Likewise.
12729         (dfs_unmark_primary_bases): Likewise.
12730         (unmark_primary_bases): Likewise.
12731         (dfs_get_pure_virtuals): Likewise.
12732
12733 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
12734
12735         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
12736         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
12737         (modify_one_vtable): Adjust.
12738         (fixup_vtable_deltas1): Likewise.
12739         (override_one_vtable): Likewise.
12740         * search.c (get_abstract_virtuals_1): Likewise.
12741         (get_pure_virtuals): Likewise.
12742         (expand_upcast_fixups): Likewise.
12743         * tree.c (debug_binfo): Likewise.
12744
12745         * class.c (build_vtable): Don't return a value.  Don't rebuild
12746         vtables for bases that have already been handled.
12747         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
12748         already been handled.
12749         (modify_one_vtable): Adjust accordingly.
12750         (fixup_vtable_deltas1): Likewise.
12751         (finish_struct_1): Likewise.
12752
12753 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12754
12755         * call.c (build_new_method_call): Also check destructors.