OSDN Git Service

* c-common.c (warn_multichar): New.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
2
3         * Make-lang.in (decl2.o): Update.
4         * cp-tree.h (warn_multichar): Remove.
5         * decl2.c: Include c-common.h.
6         (warn_multichar): Remove.
7
8 2002-05-03  Jason Merrill  <jason@redhat.com>
9
10         * tree.c (build_cplus_array_type): Only const and volatile get
11         special handling.
12
13         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
14
15 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
16
17         ABI change, returning simple classes from functions.
18         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
19         TYPE_HAS_TRIVIAL_INIT_REF is false or
20         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
21
22 2002-04-30  Jason Merrill  <jason@redhat.com>
23
24         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
25         anonymous class with a typedef if there are attributes.
26
27 2002-04-29  Paul Eggert  <eggert@twinsun.com>
28
29         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
30
31 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
32
33         PR c++/6477
34         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
35         non-NULL first.
36
37 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
38
39         PR c++/6492
40         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
41         enter that scope before name lookup.
42
43         PR c++/6486
44         * method.c (do_build_copy_constructor): Avoid building
45         cv-qualified reference types.
46   
47 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
48
49         PR c++/5719
50         * decl.c (grok_op_properties): Assignment ops don't have to return 
51         by value. operator% should.
52
53 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
54
55         PR c/6343
56         * decl.c (duplicate_decls): Call merge_weak.
57
58 2002-04-26  Richard Henderson  <rth@redhat.com>
59
60         * parse.y (malloced_yyss, malloced_yyvs): New.
61         (yyoverflow): Re-add.  Set them.
62         (free_parser_stacks): New.
63
64 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
65
66         PR c++/6497
67         * method.c (do_build_assign_ref): Pass a derivation to
68         build_method_call when calling base class assignment operators.
69
70 2002-04-26  Richard Henderson  <rth@redhat.com>
71
72         * parse.y (yyoverflow): Revert.
73
74 2002-04-26  Richard Henderson  <rth@redhat.com>
75
76         PR c/3581
77         * parse.y (string): Remove.  Update all uses to use STRING
78         instead, and not call combine_strings.
79         * rtti.c (tinfo_name): Use fix_string_type.
80         * semantics.c (finish_asm_stmt): Don't call combine_strings.
81         * spew.c (yylexstring): New.
82         (read_token): Use it.
83
84 2002-04-25  Richard Henderson  <rth@redhat.com>
85
86         PR c/2161
87         * parse.y (yyoverflow): New.
88
89 2002-04-25  Jason Merrill  <jason@redhat.com>
90
91         PR c++/5607
92         * search.c (check_final_overrider): No longer static.
93         * class.c (update_vtable_entry_for_fn): Call it.
94         * cp-tree.h: Adjust.
95
96 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
97
98         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
99         * cp-tree.h (cxx_set_yydebug): Die.
100         * lex.c (YYDEBUG): Get from c-lex.h.
101         (cxx_set_yydebug): Remove.
102         * parse.y: Include c-lex.h.
103         (YYDEBUG): Get from c-lex.h.
104
105 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
106
107         PR c++/6438.
108         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
109         void.
110
111 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
112
113         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
114         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
115         Redefine.
116         * cp-tree.h (cp_attribute_table): Rename.
117         * decl.c (lang_attribute_table): Remove declaration.
118         (cxx_init_decl_processing): Don't set it.
119         * tree.c (cp_attribute_table): Rename.
120
121 2002-04-24  Jason Merrill  <jason@redhat.com>
122
123         PR c++/6331
124         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
125         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
126         The pedwarn for array assignment is now unconditional.
127         * tree.c (build_cplus_array_type_1): Still process simple array types
128         normally in templates.
129
130         PR c++/6395
131         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
132         stuff for comdats.
133
134 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
135
136         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
137         node with attributes.
138
139 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
140
141         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
142         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
143
144 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
145
146         PR c++/6256:
147         * pt.c (tsubst_friend_class): Handle templates with explicit
148         nested names.
149
150         PR c++/6331:
151         * typeck.c (merge_types): Remember the cv-qualification of pointer
152         types when merging them.
153
154 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
155
156         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
157         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
158         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
159         cxx_mark_function_context): New.
160         * decl.c (push_cp_function_context, pop_cp_function_context,
161         mark_cp_function_context): Rename for consistency.
162         (cxx_init_decl_processing): Don't set old hooks.
163
164 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
165
166         * call.c (convert_type_from_ellipsis): Rename, update.
167         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
168         * cp-tree.h (convert_type_from_ellipsis): Rename.
169         * decl.c (cxx_init_decl_processing): Don't set hook.
170
171 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
172
173         * call.c (build_new_method_call): Update.
174         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
175         * cp-tree.h (cxx_incomplete_type_error): New.
176         * decl.c (grokdeclarator, grokparms): Update.
177         * decl2.c (check_classfn): Update.
178         * pt.c (tsubst): Update.
179         * typeck.c (complete_type_or_else, expr_sizeof,
180         decay_conversion): Update.
181         * typeck2.c (incomplete_type_error): Rename.
182         (add_exception_specifier): Update.
183
184 2002-04-18  Jason Merrill  <jason@redhat.com>
185
186         PR c++/5658
187         * search.c (setup_class_bindings): A class template qualifies as a
188         type binding.
189
190 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
191
192         PR c++/6316
193         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
194         before expanding.
195
196 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
197
198         * init.c (begin_init_stmts): Remove commented out code.
199         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
200         * semantics.c (begin_gobal_stmt_expr): Adjust call to
201         expand_start_stmt_expr.
202         
203 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
204
205         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
206         dso_handle itself, to __cxa_atexit.
207
208 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
209
210         * error.c (cxx_print_error_function): Adjust call to macros.
211
212 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
213
214         * class.c (layout_virtual_bases): Do all dsize computation on trees.
215
216 2002-04-14  Jason Merrill  <jason@redhat.com>
217
218         * typeck.c (get_member_function_from_ptrfunc): Don't do
219         gratuitious division and multiplication on
220         ptrmemfunc_vbit_in_delta targets.
221
222 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
223
224         PR c++/5373.
225         * semantics.c (finish_expr_stmt): Remember the type of the
226         expression before any conversions are performed.
227
228 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
229
230         PR c++/5189.
231         * call.c (add_template_candidate_real): Do not treat member
232         templates as copy constructors.
233
234 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
235
236         * decl.c (duplicate_decls): Do not copy the RTL for a variable
237         declaration if the old variable had an incomplete type and the new
238         variable does not.
239         (complete_vars): Do not call layout_decl for completed variables.
240
241 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
242
243         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
244         with an explicit one.
245         (follow_tag_typedef): New.
246         (lookup_tag): Use it to extract the tag of an explicit typedef.
247         (xref_tag): Likewise.
248
249 2002-04-11  Andrew Haley  <aph@redhat.com>
250
251         * typeck.c (type_after_usual_arithmetic_conversions):
252         If two types have the same variant, return immediately.
253         When two floating-point operands are the same precision: 
254           convert to float if one of the operands is float;
255           if neither operand is one of the standard types, return the type
256           of the first operand.
257  
258 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
259
260         PR c++/5507
261         * decl.c (make_typename_type): Remove implicit typenameness.
262
263 2002-04-09  Jason Merrill  <jason@redhat.com>
264
265         PR optimization/6189
266         * semantics.c (genrtl_start_function): Don't free
267         DECL_SAVED_FUNCTION_DATA for inline functions.
268
269         * init.c (build_member_call): For now, don't convert to
270         intermediate base if it would cause an error.
271
272 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
273
274         * parse.y (namespace_qualifier, maybe_identifier,
275         begin_explicit_instantiation, end_explicit_instantiation,
276         apparent_template_type, .finish_template_type,
277         do_id, maybe_init, defarg_again, component_decl_1):
278         Add ending ';', in accordance with POSIX.
279
280 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
281
282         PR c++/5571
283         * class.c (layout_class_type): Remember incomplete static
284         variables.
285         (finish_struct_1): Call complete_vars, not
286         hack_incomplete_structures.
287         * cp-tree.h (hack_incomplete_structures): Rename to ...
288         (complete_vars): ... this.
289         (struct saved_scope): Remove incomplete.
290         (namespace_scope_incomplete): Remove.
291         * decl.c (struct binding_level): Remove incomplete.
292         (incomplete_vars): New variable.
293         (mark_binding_level): Don't mark incomplete.
294         (print_binding_level): Don't print it.
295         (mark_saved_scope): Don't mark incomplete.
296         (pushdecl): Use maybe_register_incopmlete_var.
297         (cxx_init_decl_processing): Register incomplete_vars for GC.
298         (start_decl_1): Clarify error message.
299         (hack_incomplete_vars): Remove.
300         (maybe_register_incomplete_var): New function.
301         (complete_vars): Likewise.
302
303 2002-04-06  Jason Merrill  <jason@redhat.com>
304
305         PR c++/4934
306         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
307         set before checking it.
308
309         PR c++/525
310         * init.c (build_member_call): Use build_scoped_ref.
311         (resolve_offset_ref): Likewise.
312         * call.c (build_scoped_method_call): Likewise.
313         * tree.c (maybe_dummy_object): Kludge around current_class_type being 
314         wrong.
315         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
316         * cp-tree.h: Adjust.
317         
318         * init.c (push_base_cleanups): Just use build_scoped_method_call.
319
320         PR c++/6179
321         * method.c (implicitly_declare_fn): Pass unqualified type to 
322         synthesize_exception_spec.
323
324 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
325
326         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
327         * cvt.c: Update comment.
328         * init.c (expand_cleanup_for_base): Update.
329         * semantics.c (finish_parenthesized_expr): Update.
330         * typeck.c (cp_truthvalue_conversion): Update.
331
332 2002-04-04  Jason Merrill  <jason@redhat.com>
333
334         * semantics.c (finish_eh_cleanup): New fn.
335         * cp-tree.h: Add prototype.
336         * init.c (perform_member_init, expand_cleanup_for_base): Use 
337         finish_eh_cleanup.
338         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
339         * cp-tree.h: Remove references.
340         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
341         * dump.c (cp_dump_tree): Likewise.
342         * pt.c (tsubst_expr): Likewise.
343         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
344         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
345         * tree.c (cp_statement_code_p): Likewise.
346
347         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
348
349         PR c++/5636
350         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
351         cleanup for nrv.
352
353         PR c++/5104
354         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
355         specifiers.
356         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
357
358 2002-04-03  Richard Henderson  <rth@redhat.com>
359
360         * cp-lang.c (cxx_warn_unused_global_decl): New.
361         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
362
363 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
364
365         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
366         * tree.c (init_tree): Don't set hook.
367
368 2002-04-03  Roger Sayle  <roger@eyesopen.com>
369
370         PR c++/5998:
371         * decl.c (duplicate_decls): Don't mess with assembler names when
372         redeclaring builtin functions as static.
373
374 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
375
376         * call.c (build_addr_func): Update.
377         * class.c (resolve_address_of_overloaded_function): Update.
378         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
379         * cp-tree.h (cxx_mark_addressable): New.
380         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
381         * decl2.c (build_cleanup): Update.
382         * except.c (build_throw): Update.
383         * init.c (resolve_offset_ref): Update.
384         * pt.c (convert_nontype_argument): Update.
385         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
386         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
387         unary_complex_lvalue): Update.
388         (mark_addressable): Rename.
389
390 2002-04-01  Roger Sayle  <roger@eyesopen.com>
391
392         PR c++/5998:
393         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
394         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
395         but follow the SET_DECL_RTL idiom used elsewhere in the function.
396
397 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
398
399         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
400         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
401         * decl.c (grokdeclarator): Update.
402         * mangle.c (write_integer_cst): Update.
403         * typeck.c (build_binary_op): Update.
404
405 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
406
407         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
408         * lex.c (cxx_init): Don't set hook.
409
410 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
411
412         * Make-lang.in (error.o): Update.
413         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
414         * cp-tree.h (struct diagnostic_context): Predeclare.
415         (cxx_print_error_function): New.
416         * error.c: Include langhooks-def.h.
417         (lang_print_error_function): Rename.  Update.
418         (init_error): Don't set hook.
419
420 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
421
422         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
423         Redefine.
424         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
425         * decl.c (finish_enum): Similarly.
426         * error.c (dump_type): Similarly.
427         * lex.c (cxx_init): Similarly.
428         * mangle.c (write_builtin_type): Similarly.
429         * typeck.c (comptypes): Similarly.
430
431 2002-03-28  Roger Sayle  <roger@eyesopen.com>
432
433         PR c++/5998:
434         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
435         in the g++ front-end.
436         (duplicate_decl): Allow redefinition of anticipated built-ins.
437         Fix inlining problem by over-writing the old DECL_RTL.
438         (lookup_namespace_name): Fail to find an identifier in the
439         specified namespace if its still anticipated.
440         (builtin_function_1): New function split out from builtin_function
441         to create a builtin in the current namespace with given context.
442         (builtin_function): Call builtin_function_1 to define the
443         appropriate builtins in both the std and global namespaces.
444         (select_decl): Don't test for anticipated decls here.
445         (unqualified_namespace_lookup): Instead ignore them whilst
446         searching through scopes and namespaces.
447         * decl2.c (do_nonmember_using_decl): If a using declaration
448         specifies an anticipated built-in function, mark it as no longer
449         anticipated in that scope.
450         (ambiguous_decl):  Avoid resolving to an anticipated decl.
451         * lex.c (do_scoped_id): Fail to find an identifier in the global
452         namespace if its still anticipated.
453
454 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
455
456         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
457         * cp-tree.h (cp_make_lang_type): Rename.
458         * lex.c (cp_make_lang_type): Rename.
459         (make_aggr_type): Update.
460         * tree.c (init_tree): Don't set make_lang_type_fn.
461
462 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
463
464         PR c++/6073
465         * class.c (finish_struct_1): Update static field's DECL_MODE even
466         if its type is a variant of t.
467
468 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
469
470         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
471         * cp-tree.h (cxx_insert_default_attributes): New.
472         * decl.c (insert_default_attributes): Rename.
473
474 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
475
476         PR c++/4884
477         * call.c (build_op_delete_call): Allow for the fact the placement
478         may be a COMPOUND_EXPR.
479         
480 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
481
482         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
483         * cp-tree.h (init_cplus_expand): Remove.
484         (cxx_expand_expr): New.
485         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
486         fix prototype.
487         (init_cplus_expand): Remove.
488         * lex.c (cxx_init): Don't call init_cplus_expand.
489
490 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
491
492         PR c++/4884.
493         * init.c (build_new_1): Allow for the fact the result of
494         build_function_call may be a COMPOUND_EXPR.
495
496 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
497
498         PR c++/5682
499         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
500         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
501         (dfs_skip_nonprimary_vbases_markedp): Remove.
502         * search.c (get_shared_vbase_if_not_primary): Remove.
503         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
504         (dfs_skip_nonprimary_vbases_markedp): Remove.
505         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
506         (dfs_marked_real_bases_queue_p): Likewise.
507
508 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
509
510         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
511         * cp-tree.h (cxx_mark_tree): New.
512         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
513
514 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
515
516         * cp-tree.h (cxx_maybe_build_cleanup): New.
517         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
518         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
519         * tree.c (build_target_expr): Update.
520         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
521
522 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
523
524         * decl2.c (cxx_decode_option): Handle -E.
525         * lang-specs.h (default_compilers): Preprocess with cc1plus.
526         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
527
528 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
529
530         PR c++/6037
531         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
532
533 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
534
535         * error.c (dump_type): Be careful about implicit typenames.
536
537 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
538
539         PR C++/3656
540         * semantics.c (finish_base_specifier): Handle erronous base
541         classes. 
542
543 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
544
545         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
546         REAL_IS_NOT_DOUBLE.
547
548 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
549
550         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
551         an index into the vtable_entry array regardless of
552         TARGET_PTRMEMFUNC_VBIT_LOCATION.
553
554 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
555
556         * tree.c (cp_cannot_inline_tree_fn): Same.
557
558 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
559
560         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
561         insert_block, getdecls, global_bindings_p): New.
562
563 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
564
565         PR c++/4361
566         * mangle.c (struct globals) Add internal_mangling_p member.
567         (write_template_param): Do internal mangling, if needed.
568         (mangle_conv_op_name_for_type): Request internal mangling.
569
570 2002-03-20  Jason Merrill  <jason@redhat.com>
571
572         PR c++/2136
573         * init.c (build_delete): Check access for a member op delete here.
574         * decl2.c (delete_sanity): Not here.
575
576 2002-03-19  Jason Merrill  <jason@redhat.com>
577
578         PR c++/5118
579         * class.c (get_vfield_name): Use the constructor_name.
580
581 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
582
583         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
584         * cp-tree.h (lang_printable_name): Rename.
585         * error.c (lang_decl_name): Use new hook.
586         * lex.c (cxx_init): Remove old hook.
587         * pt.c (tsubst_decl): Use new hook.
588         * tree.c (lang_printable_name): Rename.
589
590 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
591
592         PR c++/3882
593         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
594         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
595         only after recording the declaration.
596
597 2002-03-18  Jason Merrill  <jason@redhat.com>
598
599         PR c++/2039
600         * init.c (resolve_offset_ref): Hand off to build_component_ref.
601
602         PR c++/4222, c++/5995
603         * call.c (build_over_call): Fix empty class logic.
604
605         PR c++/3870
606         * cp-tree.h (struct saved_scope): Add last_parms field.
607         * decl.c (maybe_push_to_top_level): Save last_function_parms.
608         (pop_from_top_level): Restore it.
609
610         PR c++/4377
611         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
612         NON_LVALUE_EXPRs.
613
614         PR c++/4003
615         * pt.c (tsubst_friend_function): Use decl_namespace_context.
616
617         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
618         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
619         type with a nontrivial destructor.
620
621 2002-03-17  Jason Merrill  <jason@redhat.com>
622
623         PR c++/4460
624         * class.c (build_base_path): Virtual base layout is fixed in
625         in-charge [cd]tors.
626
627 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
628
629         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
630         * parse.y (yyparse): Remove macro.
631
632 2002-03-17  Jason Merrill  <jason@redhat.com>
633
634         PR c++/5757
635         * init.c (build_new_1): Pass the right pointer to op delete.
636
637 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
638
639         PR c++/4361
640         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
641         conversion operators go.
642         (struct lang_decl_flags): Add template_conv_p and unused
643         bitfields.
644         (DECL_TEMPLATE_CONV_FN_P): New macro.
645         * call.c (build_user_type_conversion_1): Don't check second type
646         conversion of overload set first.
647         * class.c (add_method): Make sure templated conversion operators
648         all end up on slot 2.
649         * lex.c (do_identifier): A conversion operator token might be
650         satisfied by a templated conversion operator.
651         * pt.c (check_explicit_specialization): Use
652         CLASSTYPE_FIRST_CONVERSION_SLOT.
653         (template_parm_this_level_p): New function.
654         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
655         * search.c (lookup_fnfields_1): Template conversions will be on
656         the first slot.
657         * typeck.c (build_component_ref): Preserve the type of an
658         conversion operator name on the overload type.
659         (build_x_function_call): Retrieve the conversion operator name.
660
661 2002-03-15  Richard Henderson  <rth@redhat.com>
662
663         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
664
665 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
666
667         * cp-tree.h (CLEANUP_DECL): Remove.
668         (CLEANUP_EXPR): Likewise.
669         * decl.c (destroy_local_var): Simplify.
670         (maybe_build_cleanup): Tidy.
671         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
672         * semantics.c (cp_expand_stmt): Likewise.
673         * cp/tree.c (cp_statement_code_p): Likewise.
674
675 2002-03-15  Jason Merrill  <jason@redhat.com>
676
677         PR c++/5857
678         * decl.c (duplicate_decls): Use merge_types instead of common_type.
679         * typeck.c (common_type): Just hand off to
680         type_after_usual_arithmetic_conversions and
681         composite_pointer_type.
682         (merge_types): New fn.
683         (commonparms): Use it instead of common_type.
684         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
685         (composite_pointer_type): Also handle attributes.
686         * cp-tree.h: Declare merge_types.
687
688         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
689         variables.
690         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
691
692 2002-03-14  Richard Henderson  <rth@redhat.com>
693
694         * decl.c: Include c-pragma.h.
695         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
696         * Make-lang.in: Update dependencies.
697
698 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
699
700         PR c++/5908
701         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
702         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
703
704 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
705
706         * mangle.c (write_builtin_type): Handle 128-bit integers even if
707         they are not a standard integer type.
708
709 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
710
711         * cp-tree.h (init_init_processing): Remove declaration.
712         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
713         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
714
715 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
716
717         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
718         Define.
719         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
720         tree_code_length.
721         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
722         cplus_tree_code_name): Delete.
723         (cxx_init): Don't call add_c_tree_codes, instead set
724         lang_unsafe_for_reeval.  Don't try to copy into the various
725         tree_code arrays.
726
727 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
728
729         PR c++/5659
730         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
731         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
732         definitions.
733
734 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
735
736         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
737         DR209 is now not a defect.
738         * cp-tree.h (skip_type_access_control): Remove.
739         * decl.c (grokdeclarator): Do type access control for friend
740         declarations.
741         * semantics.c (decl_type_access_control): Don't reset
742         current_type_lookups.
743         (save_type_access_control): Always save the lookups.
744         (skip_type_access_control): Remove.
745         (finish_class_definition): Don't change type_lookups.
746
747 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
748
749         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
750         It is incorrect.
751         * typeck.c (build_static_cast): Compare non-qualified types
752         with pointer to member conversions.
753
754 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
755             Daniel Berlin  <dan@dberlin.org>
756
757         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
758         (cxx_get_alias_set): Use it.
759
760 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
761
762         * cp-tree.h (stabilize_expr): Prototype.
763
764 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
765
766         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
767         conditional return void.
768
769 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
770
771         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
772         * cp-tree.h (cxx_unsave): New.
773         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
774         (init_tree): Update.
775
776 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
777
778         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
779         explicit sizeof/sizeof.
780         * decl2.c (cxx_decode_option): Likewise.
781         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
782
783 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
784
785         PR c++/775
786         * decl.c (lookup_tag): Only reject enum/class mismatch, not
787         class/union mismatch.
788         * parse.y (check_class_key): New function.
789         (structsp): Call it.
790
791 2002-03-01  Michael Matz  <matz@suse.de>
792
793         * typeck.c (cp_pointer_int_sum): Complete inner type which is
794         used later by size_in_bytes().
795
796 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
797
798         * cp-tree.h:  Require __GNUC__ to be #defined.
799         (build_init):  Add missing prototype.
800
801 2002-03-01  Jason Merrill  <jason@redhat.com>
802
803         * except.c: Don't include decl.h or obstack.h.  Do include
804         tree-inline.h.
805         (build_throw): Destroy temporaries from the thrown
806         expression before calling __cxa_throw.  Construct a thrown 
807         temporary directly into the exception object.
808         (stabilize_throw_expr): New function.
809         (wrap_cleanups_r): New function.
810         * tree.c (stabilize_expr): New function.
811         * init.c (build_init): New function.
812         * Make-lang.in (cp/except.o): Adjust .h deps.
813
814 2002-02-28  Jason Merrill  <jason@redhat.com>
815
816         * search.c (lookup_base_r): Don't clear is_non_public just because
817         we found a friendly scope.
818
819         * decl.c (finish_function): Only warn about missing return
820         statement with -Wreturn-type.
821
822 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
823
824         * class.c (build_clone): Update.
825         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
826         * cp-tree.h (cxx_dup_lang_specific_decl): New.
827         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
828         (copy_decl): Update.
829         * method.c (make_thunk): Update.
830
831 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
832
833         * decl2.c: Delete traditional-mode-related code copied from
834         the C front end but not used, or used only to permit the
835         compiler to link.
836
837 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org> 
838
839         PR c++/4093
840         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
841         to void.
842
843 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
844
845         PR other/5746
846         * semantics.c (finish_switch_cond): Don't call get_unwidened
847         if error_mark_node.
848
849 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
850
851         PR c++/2645, DR 295
852         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
853         tf_keep_type_decl.
854         (make_typename_type): Use tsubst_flags_t.
855         * decl.c (make_typename_type): Adjust. Return non-artificial
856         TYPE_DECLs, if required.
857         (grokdeclarator): Simplify CVR qualification handling. Allow bad
858         qualifiers on typedef types.
859         * decl2.c (handle_class_head): Adjust make_typename_type call.
860         * parse.y (nested_name_specifier): Likewise.
861         (typename_sub0): Likewise.
862         (typename_sub1): Likewise.
863         * pt.c (convert_template_argument): Adjust make_typename_type
864         return value.
865         (tsubst): Adjust cp_build_qualified_type_real calls.
866         (check_cv_quals_for_unify): Cope with alowing bad qualifications
867         on template type parms.
868         (instantiate_decl): Recheck substitutions to give warnings on bad
869         qualifications.
870         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
871
872 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
873
874         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
875
876         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
877         unless DECL_ALWAYS_INLINE.
878
879 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
880
881         * typeck.c (cp_pointer_int_sum): Renamed from
882         pointer_int_sum, call pointer_int_sum.
883
884 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
885
886         * decl.c (duplicate_decls): Return 0 if issued error about
887         redeclaration.
888
889 2002-02-19  Jason Merrill  <jason@redhat.com>
890
891         ABI change: Mangle `void (A::*)() const' as 
892         M1AKFvvE, not MK1AFvvE.
893         * mangle.c (write_function_type): Write cv-quals for member
894         function type here.
895         (write_pointer_to_member_type): Not here.
896
897 2002-02-18  Jason Merrill  <jason@redhat.com>
898
899         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
900         (do_decl_instantiation): Likewise.
901
902 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
903
904         PR c++/5685
905         * decl.c (duplicate_decls): Make warning unconditional
906         if duplicate default argument declarations are present.
907
908 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
909
910         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
911         shortening.
912
913 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
914
915         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
916         remove incorrect comment. Move #if 0'd code to common path. Use
917         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
918
919 2002-02-13  Jason Merrill  <jason@redhat.com>
920
921         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
922         (finish_function): Don't warn if current_function_returns_null.
923
924         * typeck2.c (digest_init): Do handle values of vector type.
925
926         * typeck2.c (digest_init, process_init_constructor): Treat vectors
927         like arrays.
928
929 2002-02-11  Jason Merrill  <jason@redhat.com>
930
931         * parse.y (reserved_declspecs): Don't handle attributes.
932         (reserved_typespecquals): Handle them here.
933         * Make-lang.in (parse.c): Adjust expected conflicts.
934
935 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
936
937         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
938         instead of compstmt.
939         (compstmt_or_stmtexpr): Renamed from compstmt.
940         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
941
942 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
943
944         Rename instantiate_type_flags to tsubst_flags_t & expand use.
945         * cp-tree.h (instantiate_type_flags): Rename to ...
946         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
947         add tf_warning flag.
948         (instantiate_type): Adjust prototype.
949         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
950         do_type_instantiation, cp_build_qualified_type_real): Likewise.
951         cp_build_qualified_type: Adjust.
952         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
953         tf_*.
954         * call.c (standard_conversion): Rename itf_* to tf_*.
955         (reference_binding): Likewise.
956         (convert_like_real): Likewise.
957         * cvt.c (cp_convert_to_pointer): Likewise.
958         (convert_to_reference): Likewise.
959         * decl.c (lookup_namespace_name): Use tf_* flags.
960         (make_typename_type): Likewise.
961         (grokdeclarator): Likewise.
962         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
963         (coerce_template_template_parms, convert_template_argument,
964         coerce_template_parms, maybe_get_template_decl_from_type_decl,
965         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
966         instantiate_class_template, tsubst_template_arg_vector, 
967         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument, 
968         tsubst_decl, tsubst_arg_types, tsubst_function_type,
969         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr, 
970         instantiate_template, fn_type_unification,
971         resolve_overloaded_unification, verify_class_unification, 
972         unify, get_bindings_real, do_type_instantiation, 
973         regenerate_decl_from_template, instantiate_decl, 
974         tsubst_initializer_list, tsubst_enum,
975         get_mostly_instantiated_function_type,
976         invalid_nontype_parm_type_p): Likewise.
977         * tree.c (cp_build_qualified_type_real): Likewise.
978         * typeck.c (build_binary_op): Rename itf_* to tf_*.
979         (build_ptrmemfunc): Likewise.
980         (convert_for_assignment): Likewise.
981
982 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
983
984         PR c++/109
985         * decl.c (grokdeclarator): Allow friend declarations from
986         dependent types.
987         * decl2.c (handle_class_head): Don't push into template parm contexts.
988         * pt.c (push_template_decl_real): Template parm contexts are never
989         being defined.
990
991 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
992
993         * class.c: Include target.h.
994         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
995         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
996         bit-field layout.
997         * Make-lang.in: Adjust deps.
998
999 2002-02-05  Jason Merrill  <jason@redhat.com>
1000
1001         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
1002
1003 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
1004
1005         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
1006         (finish_switch_cond): Set SWITCH_TYPE.
1007
1008 2002-02-04  Richard Henderson  <rth@redhat.com>
1009
1010         * method.c (use_thunk): Always initialize the block tree.  Reindent.
1011         * semantics.c (expand_body): Emit thunks after function, not before.
1012
1013 2002-02-04  Jason Merrill  <jason@redhat.com>
1014
1015         * decl.c (start_function): Call cplus_decl_attributes immediately
1016         after grokdeclarator.
1017
1018         * decl.c (start_function): Combine DECL_RESULT handling code.
1019
1020 2002-02-03  Jason Merrill  <jason@redhat.com>
1021
1022         * xref.c: Remove.
1023         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
1024         (cp/xref.o): Remove dependencies.
1025         * class.c (finish_struct_1, check_methods): Don't call xref fns.
1026         (finish_struct_1): Likewise.
1027         * friend.c (make_friend_class): Likewise.
1028         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
1029         * spew.c (read_process_identifier): Likewise.
1030
1031 2002-02-01  Jason Merrill  <jason@redhat.com>
1032
1033         PR c++/4872
1034         * decl.c (finish_function): Warn about a non-void function with 
1035         no return statement and no abnormal exit.
1036         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
1037         (current_function_returns_abnormally): New macro.
1038         * call.c (build_call): Set it.
1039
1040         * typeck.c (build_component_ref): Always complain about offsetof
1041         constructs on non-PODs.  Only make it an error for members of
1042         virtual bases.
1043
1044         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
1045         (dump_function_decl): Always dump parms.
1046
1047         * decl2.c (finish_static_data_member_decl): Complain about a local
1048         class with a static data member.
1049
1050         PR c++/4286
1051         * search.c (lookup_field_1): Don't xref a static data member
1052         just because we looked it up.
1053
1054 2002-01-31  Jason Merrill  <jason@redhat.com>
1055
1056         * Make-lang.in (parse.c): Handle .output file.
1057
1058         PR c++/3395
1059         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
1060         not TREE_TYPE.
1061         * semantics.c (finish_class_definition): Adjust.
1062
1063         Allow attributes in parms and casts.
1064         * parse.y (named_parm): Don't strip attrs.
1065         (declmods): Remove 'attributes' production.
1066         (nonempty_cv_qualifiers): Accept attributes.
1067         (ATTRIBUTE): Give precedence.
1068         * decl.c (groktypename): Handle attributes.
1069         (grokparms): Likewise.
1070
1071 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
1072
1073         * decl2.c (cxx_decode_option): Pass 0 as last argument to
1074         cpp_handle_option.
1075         * lang-specs.h: Use cpp_unique_options instead of cpp_options
1076         when used together with cc1_options.
1077
1078 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
1079
1080         PR c++/5132
1081         * typeck2.c (digest_init): Make sure non-array core type is
1082         instantiated.
1083         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
1084         constructor, rather than build a new one.
1085         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
1086         PURPOSE of constructor elts.
1087
1088 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
1089
1090         * Make-lang.in (parse.c): Adjust expected number of
1091         shift-reduce conflicts.
1092         (decl.o): Depend on diagnostic.h.
1093         * decl.c: Include diagnostic.h.
1094         (grokdeclarator): Check for null pointer.
1095         (finish_function): Don't abort when
1096         current_binding_level->parm_flag != 1, if errors have
1097         occurred; throw away the statement tree and extra binding
1098         levels, and continue.
1099         * lex.c (note_list_got_semicolon): Check for null pointer.
1100         * method.c (hack_identifier): Just return error_mark_node if
1101         value is error_mark_node.
1102         * parse.y (primary: TYPEID(type_id)): No need to use
1103         TYPE_MAIN_VARIANT here.
1104         (handler_seq): Accept an empty list of catch clauses and
1105         generate a fake handler block to avoid later crashes.
1106         (ansi_raise_identifier): Accept the error token too.
1107         * semantics.c (begin_class_definition,
1108         finish_class_definition): Check for error_mark_node.
1109
1110 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
1111
1112         * typeck2.c (friendly_abort): Delete definition.
1113         * cp-tree.h (friendly_abort): Don't prototype.
1114         (my_friendly_assert): Use fancy_abort.
1115
1116 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
1117
1118         * cp-tree.h (my_friendly_abort): Remove.
1119
1120 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
1121
1122         * spew.c (pending_inlines, pending_inlines_tail,
1123         processing_these_inlines): Make static.
1124         (mark_pending_inlines): Remove static.
1125         (begin_parsing_inclass_inline): If in function, save pi
1126         for GC to cp_function_chain->unparsed_inlines instead.
1127         (process_next_inline): Likewise.
1128         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
1129         (mark_pending_inlines): Add prototype.
1130         * decl.c (spew_debug): Remove unused extern.
1131         (mark_lang_function): Call mark_pending_inlines.
1132
1133 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
1134
1135         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
1136         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
1137         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
1138         Change my_fancy_abort() to abort().
1139
1140 2002-01-23  Jason Merrill  <jason@redhat.com>
1141
1142         PR c++/5453
1143         * class.c (fixed_type_or_null): Fix thinko.
1144
1145         PR c++/3331
1146         * init.c (resolve_offset_ref): Use build_indirect_ref.
1147
1148         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
1149
1150 2002-01-22  Jason Merrill  <jason@redhat.com>
1151
1152         * parse.y (function_body): Suppress the block for the outermost
1153         curly braces.
1154         * decl.c (pushdecl): Don't try to skip it.
1155         (begin_function_body): Keep the block we create, not the next one.
1156         * init.c (emit_base_init): Don't mess with keep_next_level.
1157
1158         * class.c (build_base_path): Tweak formatting.
1159
1160 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
1161
1162         Fix regression introduced with patch for c++/775
1163         * parse.y (class_head_defn): Check for template specializations
1164         with a different class-key.
1165
1166 2002-01-17  Jason Merrill  <jason@redhat.com>
1167
1168         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
1169         (begin_function_body): Call them and keep_next_level.
1170         * init.c (emit_base_init): Call keep_next_level.
1171         * semantics.c (setup_vtbl_ptr): Lose.
1172         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
1173         (vtbls_set_up_p): Lose.
1174         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
1175         * method.c (do_build_copy_constructor): Likewise.
1176         (synthesize_method): Call finish_mem_initializers.
1177         * parse.y (nodecls): Likewise.
1178
1179         * error.c (dump_type_suffix): Print the exception specs before
1180         recursing.
1181         (dump_function_decl): Here, too.
1182
1183         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
1184
1185 2002-01-10  Ira Ruben   <ira@apple.com>
1186
1187         PR c++/907
1188         * decl.c (start_method): Handle attrlist.
1189
1190 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
1191
1192         * decl2.c (max_tinst_depth): Increase default limit to 500.
1193
1194 2002-01-10  Graham Stott  <grahams@redhat.com>
1195
1196         * spew.c (YYCHAR): Uppercase macro parameter and add
1197         parenthesis.
1198         (YYCODE): Likewise.
1199         (NAME): Uppercase macro parameter.
1200
1201 2002-01-09  Graham Stott  <grahams@redhat.com>
1202
1203         * decl.h (grokdeclarator): Wrap long line.
1204
1205         * semantics.c (FINISH_COND): Uppercase macro paramaters and
1206         add parenthesis.
1207
1208 2002-01-08  Graham Stott  <grahams@redhat.com>
1209
1210         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
1211         (PALLOC): Uppercase macro parameter and whitespace.
1212         (SALLOC): Uppercase macro parameter.
1213         (SFREE): Uppercase macros parameter, add parenthese and
1214         whitespace.
1215         (STREQL): Uppercase macro parameter and whitespace.
1216         (STRNEQ): Likewise.
1217         (STRLSS): Likewise.
1218         (STRLEQ): Likewise.
1219         (STRGTR): Likewise.
1220         (STRGEQ): Likewise.
1221
1222         * call.c (convert_like): Add parenthesis and wrap.
1223         (convert_like_with_context): Likewise.
1224         (ICS_RANK): Whitespace.
1225         (NEED_TEMPORARY_P): Remove parenthesis.
1226
1227         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
1228         whitespace.
1229         (VTT_MARKED_BINFO_P): Likewise.
1230
1231         * decl.c (BINDING_LEVEL): Add parenthesis.
1232         (DEF_OPERATOR): Likewise.
1233
1234         * mangle.c (MANGLE_TRACE): Add parenthesis.
1235         (MANGLE_TRACE_TREE): Likewise.
1236         (write_signed_number): Likewise.
1237         (write_unsigned_number): Likewise.
1238
1239         * pt.c (ccat): Uppercase macro parameter.
1240         (cat): Likewise
1241
1242         * search.c (SET_BINFO_ACCESS): Add parenthesis.
1243
1244 2002-01-07  Jason Merrill  <jason@redhat.com>
1245
1246         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
1247         to pedwarn.
1248
1249         PR c++/3536
1250         * method.c (make_thunk): If !flag_weak, give the thunk the
1251         function's linkage.
1252         (use_thunk): Here, too.
1253
1254 2002-01-07  Graham Stott  <grahams@redhat.com>
1255
1256         * error.c: Update copyright date.
1257         (print_scope_operator): Add parenthesis.
1258         (print_left_paren): Likewise.
1259         (print_right_paren): Likewise.
1260         (print_left_bracket): Likewise.
1261         (print_right_bracket): Likewise.
1262         (print_template_argument_list_start): Likewise.
1263         (print_template_argument_list_end): Likewise.
1264         (print_non_consecutive_character): Likewise.
1265         (print_tree_identifier): Likewise.
1266         (print_identifier): Likewise.
1267         (NEXT_CODE): Uppercase macro parameter.
1268         (ident_fndecl): Delete unused.
1269         (GLOBAL_THING): Likewise.
1270
1271 2002-01-06  Graham Stott  <grahams@redhat.com>
1272
1273         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
1274         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
1275         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
1276         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
1277         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
1278         (C_IS_RESERVED_WORD): Uppercase macro parameter.
1279         (C_RID_YYCODE) Likewise.
1280         (ptrmem_cst): Use rtx.
1281         (LOCAL_BINDING_P): Add whitespace.
1282         (INHERITED_VALUE_BINDING_P): Likewise.
1283         (BINDING_SCOPE): Wrap long line.
1284         (BINDING_HAS_LEVEL_P): Remove parenthesis.
1285         (BINDING_VALUE): Wrap long line.
1286         (BINDING_TYPE): Whitespace.
1287         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
1288         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
1289         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
1290         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
1291         (same_type_p): Uppercase macro parameters.
1292         (same_type_ignoring_top_level_qualifiers_p): Likewise.
1293         (OVL_FUNCTION): Wrap long line.
1294         (OVL_CHAIN): Whitespace.
1295         (OVL_CURRENT): Add parenthesis and whitespace.
1296         (OVL_NEXT): Whitespace.
1297         (OVL_USED): Likewise.
1298         (IDENTIFIER_TYPE_VALUE): Likewise.
1299         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
1300         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
1301         (LANG_ID_FIELD): Whitespace.
1302         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
1303         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
1304         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
1305         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
1306         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
1307         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
1308         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
1309         (IDENTIFIER_VIRTUAL_P): Likewise.
1310         (IDENTIFIER_OPNAME_P): Likewise.
1311         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
1312         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
1313         (C_SET_EXP_ORIGINAL_CODE): Likewise.
1314         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
1315         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
1316         (IS_AGGR_TYPE): Uppercase macro parameter.
1317         (CLASS_TYPE_P): Likewise.
1318         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
1319         (IS_AGGR_TYPE_2): Whitespace.
1320         (TAGGED_TYPE_P): Uppercase macro parameter.
1321         (TYPE_BUILT_IN): Whitespace.
1322         (TYPE_FOR_JAVA): Likewise.
1323         (FUNCTION_ARG_CHAIN): Remove parenthesis.
1324         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
1325         (FUNCTION_FIRST_USER_PARAM): Likewise.
1326         (PROMOTES_TO_AGGR_TYPE): Whitespace.
1327         (DERIVED_FROM_P): Add parenthesis and wrap.
1328         (UNIQUELY_DERIVED_FROM_P): Likewise.
1329         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
1330         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
1331         (CLASSTYPE_USE_TEMPLATE): Whitespace.
1332         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
1333         (TYPE_GETS_DELETE): Add parenthesis.
1334         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
1335         (TYPE_HAS_ASSIGN_REF): Likewise,
1336         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
1337         (TYPE_HAS_INIT_REF): Likewise.
1338         (TYPE_HAS_CONST_INIT_REF): Likewise.
1339         (TYPE_BEING_DEFINED): Likewise.
1340         (TYPE_LANG_SPECIFIC): Likewise.
1341         (CLASSTYPE_RTTI): Likewise.
1342         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
1343         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
1344         (TYPE_OVERLOADS_ARROW): Likewise.
1345         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
1346         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
1347         (CLASSTYPE_METHOD_VEC): Likewise.
1348         (CLASSTYPE_MARKED_N): Likewise.
1349         (CLASSTYPE_MARKED): Likewise.
1350         (CLASSTYPE_MARKED2): Likewise.
1351         (CLASSTYPE_MARKED3): Likewise.
1352         (CLASSTYPE_MARKED4): Likewise.
1353         (CLASSTYPE_MARKED5): Likewise.
1354         (CLASSTYPE_MARKED6): Likewise.
1355         (SET_CLASSTYPE_MARKED): Whitespace.
1356         (CLEAR_CLASSTYPE_MARKED): Likewise.
1357         (SET_CLASSTYPE_MARKED2): Likewise.
1358         (CLEAR_CLASSTYPE_MARKED2): Likewise.
1359         (SET_CLASSTYPE_MARKED3): Likewise.
1360         (CLEAR_CLASSTYPE_MARKED3): Likewise.
1361         (SET_CLASSTYPE_MARKED4): Likewise.
1362         (CLEAR_CLASSTYPE_MARKED4): Likewise.
1363         (SET_CLASSTYPE_MARKED5): Likewise.
1364         (CLEAR_CLASSTYPE_MARKED5): Likewise.
1365         (SET_CLASSTYPE_MARKED6): Likewise.
1366         (CLEAR_CLASSTYPE_MARKED6): Likewise.
1367         (CLASSTYPE_TAGS): Likewise.
1368         (CLASSTYPE_VSIZE): Likewise.
1369         (CLASSTYPE_VBASECLASSES): Likewise.
1370         (CANONICAL_BINFO): Add parenthesis.
1371         (CLASSTYPE_SIZE(NODE): Likewise.
1372         (CLASSTYPE_SIZE_UNIT): Likewise.
1373         (CLASSTYPE_ALIGN(NODE): Likewise.
1374         (CLASSTYPE_USER_ALIGN): Likewise.
1375         (TYPE_JAVA_INTERFACE): Likewise.
1376         (CLASSTYPE_PURE_VIRTUALS): Likewise.
1377         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
1378         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
1379         (CLASSTYPE_HAS_MUTABLE): Likewise.
1380         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
1381         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
1382         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
1383         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
1384         (CLASSTYPE_INTERFACE_ONLY): Likewise.
1385         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
1386         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
1387         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
1388         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
1389         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
1390         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
1391         (BINFO_UNSHARED_MARKED): Whitespace.
1392         (BINFO_MARKED): Whitespace and wrap.
1393         (SET_BINFO_MARKED): Likewise.
1394         (CLEAR_BINFO_MARKED): Likewise.
1395         (BINFO_VTABLE_PATH_MARKED): Likewise.
1396         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
1397         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
1398         (BINFO_SUBVTT_INDEX): Remove parenthesis.
1399         (BINFO_VPTR_INDEX): Likewise.
1400         (BINFO_PRIMARY_BASE_OF): Likewise,
1401         (CLASSTYPE_VFIELDS): Whitespace.
1402         (VF_DERIVED_VALUE): Wrap long line.
1403         (NAMESPACE_LEVEL): Whitespace.
1404         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
1405         (DEFARG_POINTER): Whitespace.
1406         (DECL_NEEDED_P): Remove parenthesis.
1407         (DECL_LANGUAGE): Whitespace.
1408         (SET_DECL_LANGUAGE): Add parenthesis.
1409         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
1410         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
1411         (DECL_IN_AGGR_P): Whitespace.
1412         (DECL_FRIEND_P): Likewise.
1413         (DECL_BEFRIENDING_CLASSES): Likewise.
1414         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
1415         (DECL_NONCONVERTING_P): Whitespace.
1416         (DECL_PURE_VIRTUAL_P): Likewise.
1417         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
1418         (DECL_PENDING_INLINE_INFO): Whitespace.
1419         (DECL_SORTED_FIELDS): Likewise.
1420         (DECL_DEFERRED_FN): Likewise.
1421         (DECL_TEMPLATE_INFO): Likewise.
1422         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
1423         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
1424         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
1425         (TMPL_ARGS_LEVEL): Likewise.
1426         (SET_TMPL_ARGS_LEVEL): Likewise.
1427         (INNERMOST_TEMPLATE_PARMS): Whitespace.
1428         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
1429         (INTEGRAL_CODE_P(CODE): Add parenthesis.
1430         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
1431         (TYPE_HAS_CONSTRUCTOR): Whitespace.
1432         (TREE_HAS_CONSTRUCTOR): Likewise.
1433         (TYPE_HAS_DESTRUCTOR): Likewise.
1434         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
1435         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
1436         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
1437         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
1438         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
1439         (TYPE_PTRMEMFUNC_P): Likewise.
1440         (TYPE_PTRMEMFUNC_FLAG): Likewise.
1441         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
1442         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
1443         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
1444         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
1445         (DECL_ACCESS): Whitespace.
1446         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
1447         (DECL_GLOBAL_DTOR_P): Likewise.
1448         (GLOBAL_INIT_PRIORITY): Likewise.
1449         (DECL_TEMPLATE_PARMS): Likewise.
1450         (DECL_TEMPLATE_RESULT): Likewise.
1451         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
1452         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
1453         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
1454         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
1455         (PRIMARY_TEMPLATE_P): Add parenthesis.
1456         (DECL_USE_TEMPLATE): Whitespace.
1457         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
1458         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
1459         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
1460         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
1461         (CALL_DECLARATOR_PARMS): Remove parenthesis.
1462         (CALL_DECLARATOR_QUALS): Likewise.
1463         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
1464         (TEMP_NAME_P): Wrap.
1465         (VFIELD_NAME_P): Likewise.
1466         (B_SET): Uppercase macro parameters and add parenthesis.
1467         (B_CLR): Likewise.
1468         (B_TST): Likewise.
1469         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
1470         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
1471         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
1472         (same_or_base_type_p): Likewise.
1473         (cp_deprecated): Likewise.
1474
1475 2002-01-05  Richard Henderson  <rth@redhat.com>
1476
1477         * semantics.c (expand_body): Revert last change.
1478
1479 2002-01-04  Jason Merrill  <jason@redhat.com>
1480
1481         PR c++/4122
1482         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
1483         lost primary.
1484
1485         * class.c (build_vtbl_initializer): Check for a lost primary
1486         before calculating the vtable entry to throw away.
1487
1488 2002-01-02  Jason Merrill  <jason@redhat.com>
1489
1490         * semantics.c (expand_body): Call outlining_inline_function when
1491         emitting an inline function out of line.
1492
1493 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1494
1495         PR c++/5116, c++/764 reversion
1496         * call.c (build_new_op): Revert the instantiations. They are
1497         incorrect.
1498
1499 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1500
1501         PR c++/5089
1502         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
1503
1504 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1505
1506         PR c++/3716
1507         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
1508         (tsubst, case POINTER_TYPE): Handle pmfs here.
1509         (tsubst, case OFFSET_TYPE): Check it is not an offset to
1510         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
1511
1512 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1513
1514         PR c++/35
1515         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
1516         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
1517         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
1518         PARM_DECL.
1519         (tsubst_template_parms): Break up loop statements.
1520         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
1521         parm PARM_DECLs don't get promoted.
1522
1523 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1524
1525         PR c++/5123
1526         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
1527         (build_x_function_call): Cope with a COMPONENT_REF containing a
1528         TEMPLATE_ID_EXPR.
1529
1530 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1531
1532         PR c++/5213
1533         * pt.c (convert_template_argument): Be more careful determining
1534         when RECORD_TYPE templates are or are not templates.
1535
1536 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1537
1538         PR c++/775
1539         * cp-tree.h (handle_class_head): Adjust prototype.
1540         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
1541         parameters. Use for all class heads.
1542         * parse.y (named_class_head_sans_basetype, named_class_head,
1543         named_complex_class_head_sans_basetype,
1544         named_class_head_sans_basetype_defn,
1545         unnamed_class_head): Remove.
1546         (class_head, class_head_apparent_template): Recognize class heads
1547         (class_head_decl, class_head_defn): New reductions. Process class
1548         heads.
1549         (structsp): Adjust class definition and class declaration
1550         reductions.
1551         (maybe_base_class_list): Give diagnostic on empty list.
1552
1553 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1554
1555         PR c++/4379
1556         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
1557         single non-static member.
1558         (unary_complex_lvalue): If it cannot be a pointer to member, don't
1559         make it so. Check it is not pointer to reference.
1560
1561 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1562
1563         PR c++/5132
1564         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
1565         are processing a template decl.
1566
1567 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1568
1569         PR c++/5116, c++/764
1570         * call.c (build_new_op): Make sure template class operands are
1571         instantiated. Simplify arglist construction.
1572
1573 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
1574
1575         * call.c (build_user_type_conversion_1): Use my_friendly_assert
1576         rather than if ... abort.
1577         * cvt.c (convert_to_reference): Likewise.
1578         * semantics.c (setup_vtbl_ptr): Likewise.
1579         * pt.c (lookup_template_class): Comment typo.
1580
1581 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
1582
1583         PR c++/5125
1584         * pt.c (push_template_decl_real): Make sure DECL has
1585         DECL_LANG_SPECIFIC.
1586
1587 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
1588
1589         PR c++/335
1590         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
1591         for non-reference fields.
1592         * typeck.c (require_complete_type): Use resolve_offset_ref).
1593
1594 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
1595
1596         PR c++/196
1597         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
1598
1599 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
1600
1601         PR c++/160
1602         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
1603         up. Don't stabilize_references when initializing a reference.
1604
1605 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1606
1607         * decl2.c (lang_f_options): Const-ify.
1608
1609 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
1610
1611         * config-lang.in (diff_excludes): Remove.
1612
1613 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
1614
1615         PR c++/90
1616         * typeck.c (build_function_call_real): Use original function
1617         expression for errors.
1618
1619 2001-12-18  Jason Merrill  <jason@redhat.com>
1620
1621         PR c++/3242
1622         * class.c (add_method): Do compare 'this' quals when trying to match a
1623         used function.  Don't defer to another used function.
1624
1625 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
1626
1627         * pt.c (instantiate_clone): Remove, fold into ...
1628         (instantiate_template): ... here. Simplify by removing mutual
1629         recursion.
1630         * typeck2.c (build_m_component_ref): Don't cv qualify the function
1631         pointed to by a pointer to function.
1632         * class.c (delete_duplicate_fields_1): Typo.
1633
1634 2001-12-18  Jason Merrill  <jason@redhat.com>
1635
1636         C++ ABI change: destroy value arguments in caller.
1637         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
1638         create an extra binding level for the parameters.
1639         * decl.c (store_parm_decls): Don't do parameter cleanups.
1640
1641 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
1642
1643         * call.c (build_new_method_call): Use '%#V'.
1644         * error.c (cv_to_string): Use V parameter to determine padding.
1645
1646 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
1647
1648         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
1649         spellings in messages.
1650
1651 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
1652
1653         * cp-tree.h: Delete #defines for cp_error, cp_warning,
1654         cp_pedwarn, and cp_compiler_error.
1655         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
1656         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
1657         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
1658         typeck2.c: Change calls to the above macros to use their
1659         language-independent equivalents: error, warning, pedwarn, and
1660         internal_error respectively.
1661
1662 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
1663
1664         * decl2.c (finish_file): Remove back_end_hook.
1665
1666 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
1667
1668         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
1669         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
1670         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
1671
1672 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
1673
1674         * lang-options.h: Use American spelling in messages.
1675
1676 2001-12-13  Jason Merrill  <jason@redhat.com>
1677
1678         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
1679
1680         Use cleanups to run base and member destructors.
1681         * init.c (push_base_cleanups): New function, split out from...
1682         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
1683         * decl.c (finish_destructor_body): Move vbase destruction code to
1684         push_base_cleanups.
1685         (begin_function_body, finish_function_body): New fns.
1686         (finish_function): Move [cd]tor handling and call_poplevel to
1687         finish_function_body.
1688         (pushdecl): Skip the new level.
1689         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
1690         (setup_vtbl_ptr): Call push_base_cleanups.
1691         * method.c (synthesize_method): Call {begin,end}_function_body.
1692         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
1693         * cp-tree.h: Declare new fns.
1694         * parse.y (function_body, .begin_function_body): New nonterminals.
1695         (fndef, pending_inline, function_try_block): Use function_body.
1696         (ctor_initializer_opt, function_try_block): No longer has a value.
1697         (base_init): Remove .set_base_init token.
1698         (.set_base_init, compstmt_or_error): Remove.
1699         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
1700
1701         * optimize.c (maybe_clone_body): Fix parameter updating.
1702
1703 2001-12-12  Jason Merrill  <jason@redhat.com>
1704
1705         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
1706         * semantics.c (genrtl_start_function): Don't pass
1707         parms_have_cleanups or push an extra binding level.
1708         (genrtl_finish_function): Lose cleanup_label cruft.
1709
1710         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
1711         (ctor_label): Remove.
1712         * semantics.c (finish_return_stmt): Lose ctor_label support.
1713         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
1714         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
1715         dtor_label.
1716
1717         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
1718         check for [cd]tors.
1719         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
1720
1721         * decl.c (finish_function): Check VMS_TARGET, not VMS.
1722
1723         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
1724         (end_cleanup_fn): And poplevel.
1725
1726         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
1727         if we're in a template.
1728
1729 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
1730
1731         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
1732         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
1733         THIS_NAME_P): Delete.
1734         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
1735         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
1736         with internal naming scheme.
1737         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
1738
1739 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
1740
1741         * decl.c (grokdeclarator): Deprecated implicit typename use.
1742
1743 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
1744
1745         PR g++/51
1746         * parse.y (frob_specs): Indicate it is a language linkage which
1747         contained the extern.
1748         * decl.c (grokdeclarator): Allow extern language linkage with
1749         other specifiers.
1750
1751 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
1752
1753         PR g++/72
1754         * decl.c (add_binding): Don't reject duplicate typedefs involving
1755         template parameters.
1756
1757 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
1758
1759         * parse.y, semantics.c: Similarly.
1760
1761 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
1762
1763         PR g++/87
1764         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
1765         (copy_args_p): Rename to ...
1766         (copy_fn_p): ... here.
1767         (grok_special_member_properties): New function.
1768         (grok_op_properties): Lose VIRTUALP parameter.
1769         (copy_assignment_arg_p): Remove.
1770         * call.c (build_over_call): Use copy_fn_p.
1771         * decl.c (grokfndecl): Reformat. Adjust call to
1772         grok_op_properties.
1773         (copy_args_p): Rename to ...
1774         (copy_fn_p): ... here. Reject template functions. Check for pass
1775         by value.
1776         (grok_special_member_properties): Remember special functions.
1777         (grok_ctor_properties): Don't remember them here, just check.
1778         (grok_op_properties): Likewise.
1779         (start_method): Call grok_special_member_properties.
1780         * decl2.c (grokfield): Likewise.
1781         (copy_assignment_arg_p): Remove.
1782         (grok_function_init): Don't remember abstract assignment here.
1783         * pt.c (instantiate_class_template): Call
1784         grok_special_member_properties.
1785         (tsubst_decl): Adjust grok_op_properties call.
1786
1787 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
1788
1789         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
1790         RID_TYPES_COMPATIBLE_P.
1791
1792 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
1793
1794         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
1795         call to build_aggr_init.
1796         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
1797
1798 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
1799
1800         * parse.y: Replace uses of the string non-terminal with STRING.
1801         Don't perform string concatentaion here.
1802         (string): Remove non-terminal.
1803         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
1804
1805 2001-12-05  Jason Merrill  <jason@redhat.com>
1806
1807         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
1808         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
1809         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
1810         * pt.c (push_tinst_level): No longer static.
1811         * cp-tree.h: Declare them.
1812
1813         * init.c (resolve_offset_ref): Don't check access for the base
1814         conversion to access a FIELD_DECL.
1815
1816         * cp-tree.h (TYPE_REFFN_P): New macro.
1817         * decl.c (bad_specifiers): Check it, too.
1818
1819         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
1820         on the __*_type_info type if we haven't seen a definition.
1821
1822 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
1823
1824         * decl.c: Include c-common.h.
1825         (shadow_warning): Move to c-common.c.
1826
1827 Wed Dec  5 17:00:49 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1828
1829         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
1830
1831 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
1832
1833         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
1834
1835 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
1836
1837         PR g++/164
1838         * init.c (sort_base_init): Allow binfos to be directly specified.
1839         * method.c (do_build_copy_constructor): Explicitly convert to the
1840         base instance.
1841         (do_build_assign_ref): Likewise.
1842
1843 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
1844
1845         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
1846         declaration and initialization.
1847
1848 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
1849
1850         * typeck2.c: Remove leading capital from diagnostic messages, as
1851         per GNU coding standards.
1852
1853 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
1854
1855         PR c++/3394
1856         * decl.c (xref_basetypes): Handle attributes between
1857         'class' and name.
1858
1859 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
1860
1861         PR g++/3381
1862         * parse.y (named_complex_class_head_sans_basetype): Add new
1863         reduction.
1864         * Make-lang.in (parse.c): Adjust expected conflict count.
1865
1866 2001-12-03  Jason Merrill  <jason@redhat.com>
1867
1868         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
1869         immediate binfos for our virtual bases.
1870
1871 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
1872
1873         * call.c (build_java_interface_fn_ref): Similarly.
1874         * except.c (is_admissible_throw_operand): Similarly.
1875         * init.c (build_java_class_ref): Similarly.
1876         * xref.c (open_xref_file): Similarly.
1877
1878 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
1879
1880         * class.c (finish_struct): Remove trailing periods from messages.
1881         * decl.c (check_tag_decl): Similarly.
1882         * lex.c (cxx_set_yydebug): Similarly.
1883         * typeck2.c (friendly_abort): Similarly.
1884
1885 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
1886
1887         PR c++/3048
1888         * cp-tree.h (ovl_member): Remove.
1889         * decl2.c (merge_functions): Handle extern "C" functions
1890         specially.
1891         * tree.c (ovl_member): Remove.
1892
1893 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
1894
1895         PR c++/4842
1896         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
1897         FUNCTION_DECL, as input.
1898         (mark_overriders): Remove.
1899         (warn_hidden): Rework for the new ABI.
1900
1901 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
1902
1903         PR c++/3471
1904         * call.c (convert_like_real): Do not build additional temporaries
1905         for rvalues of class type.
1906
1907 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
1908
1909         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
1910         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
1911         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
1912         (DERIVED_FROM_P): Likewise.
1913         (enum base_access): Renumber, add ba_quiet bit mask.
1914         (get_binfo): Remove.
1915         (get_base_distance): Remove.
1916         (binfo_value): Remove.
1917         (ACCESSIBLY_DERIVED_FROM_P): Remove.
1918         * call.c (standard_conversion): Use lookup_base.
1919         * class.c (strictly_overrides): Likewise.
1920         (layout_virtual_bases): Likewise.
1921         (warn_about_ambiguous_direct_bases): Likewise.
1922         (is_base_of_enclosing_class): Likewise.
1923         (add_vcall_offset_vtbl_entries_1): Likewise.
1924         * cvt.c (build_up_reference): Adjust comment.
1925         * init.c (build_member_call): Reformat.
1926         * search.c (get_binfo): Remove.
1927         (get_base_distance_recursive): Remove.
1928         (get_base_distance): Remove.
1929         (lookup_base_r): Tweak.
1930         (lookup_base): Add ba_quiet control. Complete the types here.
1931         (covariant_return_p): Use lookup_base.
1932         * tree.c (binfo_value): Remove.
1933         (maybe_dummy_object): Use lookup_base.
1934         * typeck.c (build_static_cast): Use lookup_base.
1935         (get_delta_difference): Likewise.
1936         * typeck2.c (binfo_or_else): Use lookup_base.
1937         (build_scoped_ref): Add back error_mark_check.
1938         (build_m_component_ref): Use lookup_base.
1939
1940 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
1941
1942         * Make-lang.in (c++.generated-manpages): New dummy target.
1943
1944 Tue Nov 27 09:03:47 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1945
1946         * Make-lang.in (cp-lang.o): Depends on c-common.h.
1947         * cp-lang.c (c-common.h): Include.
1948         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
1949         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
1950         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
1951
1952 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
1953
1954         * decl2.c (c_language): Move to c-common.c.
1955         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
1956         functions.
1957         (cxx_init): Update.
1958
1959 2001-11-26  Jason Merrill  <jason@redhat.com>
1960
1961         * call.c (joust): Remove COND_EXPR hack.
1962
1963 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
1964
1965         * search.c (lookup_base_r): Declare bk in variable declaration
1966         space.
1967
1968 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
1969
1970         PR g++/3145
1971         * class.c (build_vbase_pointer): Remove.
1972         (build_vbase_path): Remove.
1973         (build_base_path): New function.
1974         * cp-tree.h (base_access, base_kind): New enumerations.
1975         (build_base_path): Declare.
1976         (convert_pointer_to_real): Remove.
1977         (convert_pointer_to): Remove.
1978         (lookup_base): Declare.
1979         (convert_pointer_to_vbase): Remove.
1980         * call.c (build_scoped_method_call): Use lookup_base &
1981         build_base_path instead of convert_pointer_to_real,
1982         get_base_distance & get_binfo.
1983         (build_over_call): Likewise.
1984         * cvt.c (cp_convert_to_pointer): Likewise.
1985         (convert_to_pointer_force): Likewise.
1986         (build_up_reference): Likewise.
1987         (convert_pointer_to_real): Remove.
1988         (convert_pointer_to): Remove.
1989         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
1990         instead of convert_pointer_to_vbase & build_vbase_path.
1991         (emit_base_init): Use build_base_path instead of
1992         convert_pointer_to_real.
1993         (expand_virtual_init): Lose unrequired conversions.
1994         (resolve_offset_ref): Use lookup_base and build_base_path
1995         instead of convert_pointer_to.
1996         * rtti.c (build_dynamic_cast_1): Use lookup_base &
1997         build_base_path instead of get_base_distance & build_vbase_path.
1998         * search.c (get_vbase_1): Remove.
1999         (get_vbase): Remove.
2000         (convert_pointer_to_vbase): Remove.
2001         (lookup_base_r): New function.
2002         (lookup_base): New function.
2003         * typeck.c (require_complete_type): Use lookup_base &
2004         build_base_path instead of convert_pointer_to.
2005         (build_component_ref): Likewise.
2006         (build_x_function_call): Likewise.
2007         (get_member_function_from_ptrfunc): Likewise.
2008         (build_component_addr): Likewise.
2009         * typeck2.c (build_scoped_ref): Likewise.
2010
2011 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2012
2013         * cp-tree.h (CP_TYPE_QUALS): Removed.
2014         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
2015         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
2016         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
2017         * dump.c (cp_dump_tree): Use void* dump_info argument to match
2018         lang-hooks prototype.
2019         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
2020         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
2021         CP_TYPE_QUALS changed to cp_type_quals.
2022         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
2023         (CXX_C_OBJS): Remove c-dump.o.
2024
2025 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
2026
2027         PR c++/3637
2028         * pt.c (lookup_template_class): Ensure that all specializations
2029         are registered on the list corresponding to the most general
2030         template.
2031
2032 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
2033
2034         * call.c (non_reference): Add documentation.
2035         (convert_class_to_reference): Do not strip reference types
2036         from conversion operators.
2037         (maybe_handle_ref_bind): Simplify.
2038         (compare_ics): Correct handling of references.
2039
2040 2001-11-19  John Wilkinson <johnw@research.att.com>
2041
2042         * dump.c (dump_op): New function.
2043         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
2044         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
2045         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
2046
2047 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
2048
2049         PR4629
2050         * semantics.c (finish_sizeof): Make sure that expression created
2051         while processing a template do not have a type.
2052         (finish_alignof): Likewise.
2053         * typeck.c (c_sizeof): Likewise.
2054         (expr_sizeof): Likewise.
2055
2056 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
2057
2058         * lex.c (cxx_finish): Call c_common_finish.
2059         (finish_parse): Remove.
2060
2061 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2062
2063         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
2064         when displaying error message about missing array bounds.
2065
2066 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2067
2068         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
2069         CONST_CAST_EXPR.
2070         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
2071
2072 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
2073
2074         * cp-tree.h (print_class_statistics): Restore.
2075
2076 2001-11-15  Jason Merrill  <jason@redhat.com>
2077
2078         * method.c (use_thunk): Don't emit debugging information for thunks.
2079
2080         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
2081         * decl.c (make_typename_type): Handle getting a class template.
2082         * search.c (lookup_field_r): A class template is good enough for
2083         want_type.
2084
2085         * call.c (convert_like_real): Only use cp_convert for the bad part.
2086         (standard_conversion): Also allow bad int->enum.
2087         * typeck.c (ptr_reasonably_similar): Also allow functions to
2088         interconvert.  Pointers to same-size integers are reasonably
2089         similar.
2090
2091         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
2092         give it void type.
2093
2094 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
2095
2096         PR g++/3154
2097         * init.c (sort_base_init): Remove unreachable code.
2098         (expand_member_init): Adjust comment to reflect reality. Simplify
2099         and remove unreachable code.
2100
2101 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
2102
2103         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
2104         (cxx_init): Update prototype.
2105         * decl.c (init_decl_processing): Rename.  Move null node init
2106         to its creation time.
2107         * lex.c (cxx_init_options): Update.
2108         (cxx_init): Combine with old init_parse; also call
2109         cxx_init_decl_processing.
2110
2111 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
2112
2113         * decl.c (check_initializer): Try to complete the type of an
2114         array element before checking whether it's complete.  Don't
2115         complain about arrays with complete element types but an
2116         unknown size.
2117         (cp_finish_decl): Build the hierarchical constructor before
2118         calling maybe_deduce_size_from_array_init.
2119
2120 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
2121
2122         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
2123
2124 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
2125
2126         PR g++/4206
2127         * parse.y (already_scoped_stmt): Remove.
2128         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
2129
2130 2001-11-12  H.J. Lu <hjl@gnu.org>
2131
2132         * cvt.c (ocp_convert): Don't warn the address of a weak
2133         function is always `true'.
2134
2135 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
2136
2137         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
2138         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
2139         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
2140         * cp-tree.h (print_class_statistics): Remove.
2141         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
2142         cxx_print_identifier, cxx_set_yydebug): New.
2143         * lex.c (set_yydebug): Rename c_set_yydebug.
2144         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
2145         lang_print_xnode): Rename.
2146         * tree.c (print_lang_statistics): Rename.
2147
2148 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2149
2150         * class.c (dump_array): Fix format specifier warning.
2151
2152 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
2153
2154         * cp-lang.c (LANG_HOOKS_NAME): Override.
2155         (struct lang_hooks): Constify.
2156         * lex.c (cxx_init_options): Update.
2157         (lang_identify): Remove.
2158         * parse.y (language_string): Remove.
2159
2160 2001-11-08  Andreas Franck  <afranck@gmx.de>
2161
2162         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
2163         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
2164         suggested by autoconf.
2165         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
2166         (c++.install-common): Use the transformed target alias names.
2167
2168 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
2169
2170         * Make-lang.in: Update.
2171         * cp-lang.c: Include langhooks-def.h.
2172
2173 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2174
2175         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
2176
2177 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2178
2179         * lex.c (copy_lang_type): Add static prototype.
2180
2181 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2182
2183         * pt.c (unify): Handle SCOPE_REF.
2184
2185 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
2186
2187         * tree.c (cp_copy_res_decl_for_inlining): Adjust
2188         DECL_ABSTRACT_ORIGIN for the return variable.
2189
2190 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
2191
2192         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
2193
2194 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
2195
2196         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
2197         semantics.c, spew.c: Fix spelling errors.
2198
2199 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2200
2201         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
2202
2203 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
2204
2205         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
2206         pop_everything.
2207
2208 Tue Oct 23 14:00:20 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2209
2210         * cp-lang.c (cxx_get_alias_set): New function.
2211         Point LANG_HOOKS_GET_ALIAS_SET to it.
2212
2213 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2214
2215         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
2216         * cp-tree.h (make_unbound_class_template): Prototype new function.
2217         * decl.c (make_unbound_class_template): New function.
2218         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
2219         * error.c (dump_type): Likewise.
2220         * mangle.c (write_type): Likewise.
2221         * parse.y (template_parm): Likewise.
2222         (template_argument): Use make_unbound_class_template.
2223         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
2224         (tsubst): Likewise.
2225         (tsubst_copy): Likewise.
2226         (unify): Likewise.
2227         * tree.c (walk_tree): Likewise.
2228         * typeck.c (comptypes): Likewise.
2229
2230 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2231
2232         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
2233         extra calls into fewer ones.
2234
2235 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
2236
2237         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
2238         Warn when merging inline with attribute noinline.
2239         (start_decl, start_function): Warn if inline and attribute
2240         noinline appear in the same declaration.
2241
2242 2001-10-16  H.J. Lu <hjl@gnu.org>
2243
2244         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
2245         for tree checking disabled.
2246
2247 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
2248
2249         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
2250         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
2251
2252 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
2253
2254         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
2255         (unify): Only handle MINUS_EXPR specially if the above flag is set
2256         and the subtracted constant is 1.  Clear the flag on recursive calls.
2257         Set it when unifying the maximum value in an INTEGER_TYPE's range.
2258
2259 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
2260
2261         * decl.c (bad_specifiers): Don't allow exception specifications
2262         on any typedefs.
2263
2264 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
2265
2266         * cp/lex.c (init_cp_pragma): Similarly.
2267
2268 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2269
2270         * pt.c (lookup_template_class): Build complete template arguments
2271         for BOUND_TEMPLATE_TEMPLATE_PARM.
2272
2273 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2274
2275         * cp-tree.h (TYPE_BINFO): Update comment.
2276         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
2277         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
2278         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
2279         (copy_type): Prototype new function.
2280         * lex.c (copy_lang_decl): Gather tree node statistics.
2281         (copy_lang_type): New function.
2282         (copy_type): Likewise.
2283         (cp_make_lang_type): Create lang_type for
2284         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
2285         and BOUND_TEMPLATE_TEMPLATE_PARM.
2286         * pt.c (tsubst): Use copy_type instead of copy_node.
2287         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
2288
2289 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2290
2291         * pt.c (determine_specialization): Ignore functions without
2292         DECL_TEMPLATE_INFO.
2293
2294 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2295
2296         PR g++/4476
2297         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
2298
2299 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
2300
2301         * typeck2.c (store_init_value): Don't re-digest a bracketed
2302         initializer.
2303
2304         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
2305         ANON_AGGR_TYPE_P.
2306
2307 2001-10-11  Richard Henderson  <rth@redhat.com>
2308
2309         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
2310         of an asm statement.
2311         (build_vtbl_ref_1): Split out from build_vtbl_ref.
2312         (build_vfn_ref): Use it to handle vtable descriptors before
2313         calling build_vtable_entry_ref.
2314         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
2315
2316 2001-10-10  Richard Henderson  <rth@redhat.com>
2317
2318         * parse.y (asm_operand): Allow named operands.
2319         * semantics.c (finish_asm_stmt): Tweek for changed location
2320         of the operand constrant.
2321
2322 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
2323
2324         * call.c (standard_conversion): Add bad conversion between
2325         integers and pointers.
2326         (convert_like_real): Don't use convert_for_initialization for bad
2327         conversions; complain here and use cp_convert.
2328         (build_over_call): Don't handle bad conversions specially.
2329         (perform_implicit_conversion): Allow bad conversions.
2330         (can_convert_arg_bad): New fn.
2331         * cp-tree.h: Declare it.
2332         * typeck.c (convert_for_assignment): Use it.
2333         (ptr_reasonably_similar): Any target type is similar to void.
2334
2335 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
2336
2337         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
2338         (cp/cp-lang.o): New rule.
2339         * cp-tree.h: Declare hooks.
2340         * tree.c: Make hooks non-static.
2341         (init_tree): Don't initialize hooks here.
2342         * lex.c: Likewise.  Move definition of lang_hooks to...
2343         * cp-lang.c: ... new file.
2344
2345 2001-10-08  Richard Henderson  <rth@redhat.com>
2346
2347         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
2348         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
2349
2350 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2351
2352         * class.c (build_vtable_entry_ref): Const-ify.
2353         * decl.c (predefined_identifier,
2354         initialize_predefined_identifiers): Likewise.
2355         * init.c (build_new_1): Likewise.
2356         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
2357         Likewise.
2358
2359 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
2360
2361         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
2362         (INSNS_PER_STMT): Likewise.
2363         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
2364         (copy_body, initialize_inlined_parameters): Likewise.
2365         (declare_return_variable, inlinable_function_p): Likewise.
2366         (expand_call_inline, expand_calls_inline): Likewise.
2367         (optimize_inline_calls, clone_body): Likewise.
2368         * tree.c (walk_tree): Moved to ../tree-inline.c.
2369         (walk_tree_without_duplicates): Likewise.
2370         (copy_tree_r, remap_save_expr): Likewise.
2371
2372 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
2373
2374         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
2375         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
2376         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
2377         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
2378         (flag_inline_trees): Moved declaration to ../tree-inline.h.
2379         (walk_tree): Moved declaration to ../tree-inline.h.
2380         (walk_tree_without_duplicates, copy_tree_r): Likewise.
2381         (remap_save_expr): Likewise.
2382         * decl.c: Include tree-inline.h.
2383         (lang_mark_tree): Don't mark inlined_fns.
2384         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
2385         * optimize.c: Include tree-inline.h.
2386         (optimize_inline_calls): Move declaration to ../tree.h, as
2387         non-static.
2388         (remap_decl): Use language-independent constructs and hooks.
2389         (remap_block, copy_body_r, declare_return_variable): Likewise.
2390         (inlinable_function_p): Likewise.  Don't test for
2391         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
2392         no longer language-specific.
2393         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
2394         call of dump_function to...
2395         (optimize_function): Here...
2396         (clone_body): New function, extracted from...
2397         (maybe_clone_body): ... here.  Build decl_map locally and pass
2398         it on to clone_body.
2399         * pt.c, semantics.c: Include tree-inline.h.
2400         * tree.c: Likewise.
2401         (cp_walk_subtrees): New language-specific hook for tree inlining.
2402         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
2403         cp_is_overload_p, cp_auto_var_in_fn_p,
2404         cp_copy_res_decl_for_inlining): Likewise.
2405         (walk_tree): Move language-specific constructs into...
2406         (cp_walk_subtrees): this new function.
2407         (copy_tree_r): Use language-independent constructs and hooks.
2408         (init_tree): Initialize tree inlining hooks.
2409         (remap_save_expr): Adjust prototype so that the declaration
2410         does not require the definition of splay_tree.
2411
2412 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
2413
2414         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
2415         to build the declaration instead of the declaration itself.
2416
2417 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
2418
2419         * decl2.c (cxx_decode_option): Add 'else'.
2420
2421         * spew.c (end_input): No longer static.
2422         * cp-tree.h: Declare it.
2423         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
2424
2425 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
2426
2427         * call.c (build_over_call), typeck.c (build_function_call_real):
2428         Pass type attributes to check_function_format rather than name or
2429         assembler name.  Don't require there to be a name or assembler
2430         name to check formats.
2431
2432 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
2433
2434         * decl.c (init_decl_processing): Don't call
2435         init_function_format_info.  Initialize lang_attribute_table
2436         earlier.
2437         (builtin_function): Call decl_attributes.
2438         (insert_default_attributes): New.
2439
2440 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
2441
2442         * decl.c (grokdeclarator): Copy array typedef handling from C
2443         frontend.
2444
2445         * decl.c (grokdeclarator): Copy too-large array handling from C
2446         frontend.
2447
2448 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
2449
2450         * config-lang.in (target_libs): Added target-gperf, so that we
2451         don't try to build it if C++ is disabled.
2452
2453 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
2454
2455         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
2456         (cp/errfn.o): Delete rule.
2457         (cp/error.o): Depend on flags.h.
2458         * errfn.c: Delete file.
2459         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
2460         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
2461         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
2462         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
2463         internal_error respectively.  Make cp_deprecated into a macro.
2464         Don't define cp_printer typedef or declare cp_printers.
2465         * error.c: Include flags.h.
2466         Delete: struct tree_formatting_info, print_function_argument_list,
2467         print_declaration, print_expression, print_function_declaration,
2468         print_function_parameter, print_type_id, print_cv_qualifier_seq,
2469         print_type_specifier_seq, print_simple_type_specifier,
2470         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
2471         print_parameter_declaration_clause, print_exception_specification,
2472         print_nested_name_specifier, and definition of cp_printers.
2473         (locate_error): New function.
2474         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
2475         rewritten in terms of locate_error and diagnostic.c.
2476         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
2477         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
2478         (init_error): Adjust to match.
2479
2480 Sat Sep 22 09:15:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2481
2482         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
2483
2484 2001-09-21  Richard Henderson  <rth@redhat.com>
2485
2486         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
2487         (build_vtbl_initializer): Likewise.
2488         (build_vfn_ref): New.
2489         * cp-tree.h: Declare it.
2490         * call.c (build_over_call): Use it.
2491         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
2492         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
2493
2494 Fri Sep 21 08:16:19 2001  J"orn Rennecke <amylaar@redhat.com>
2495
2496         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
2497
2498 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
2499
2500         Table-driven attributes.
2501         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
2502         * decl2.c (cplus_decl_attributes): Only take one attributes
2503         parameter.
2504         * cp-tree.c (cplus_decl_attributes): Update prototype.
2505         * class.c (finish_struct), decl.c (start_decl, start_function),
2506         decl2.c (grokfield), friend.c (do_friend), parse.y
2507         (parse_bitfield): Update calls to cplus_decl_attributes.
2508         * decl.c (grokdeclarator): Take a pointer to a single ordinary
2509         attribute list.
2510         * decl.h (grokdeclarator): Update prototype.
2511         * decl2.c (grokfield): Take a single ordinary attribute list.
2512         * friend.c (do_friend): Likewise.
2513         * decl.c (shadow_tag, groktypename, start_decl,
2514         start_handler_parms, grokdeclarator, grokparms, start_function,
2515         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
2516         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
2517         (process_template_parm, do_decl_instantiation): Pass single
2518         ordinary attribute lists around.
2519         * decl.c (grokdeclarator): Correct handling of nested attributes.
2520         Revert the patch
2521         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
2522                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
2523                 not the left.
2524         .
2525         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
2526         (cp_attribute_table): Declare.
2527         * decl.c (valid_lang_attribute): Don't define.
2528         (lang_attribute_table): Define.
2529         (init_decl_processing): Initialize lang_attribute_table instead of
2530         valid_lang_attribute.
2531         * tree.c (cp_valid_lang_attribute): Remove.
2532         (handle_java_interface_attribute, handle_com_interface_attribute,
2533         handle_init_priority_attribute): New functions.
2534         (cp_attribute_table): New array.
2535         * decl2.c (import_export_class): Don't use
2536         targetm.valid_type_attribute.
2537
2538 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
2539
2540         * Make-lang.in (cp/error.o): Depend on real.h
2541         * error.c: #include "real.h"
2542
2543 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2544
2545         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
2546         xmalloc/strcpy/strcat.
2547
2548 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2549
2550         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
2551         Const-ification.
2552         * pt.c (tsubst_decl): Likewise.
2553
2554 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2555
2556         * decl2.c (lang_f_options): Const-ification.
2557         * lex.c (cplus_tree_code_name): Likewise.
2558         * spew.c (yyerror): Likewise.
2559
2560 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
2561
2562         PR c++/3986
2563         * class.c (force_canonical_binfo_r): Check & move an indirect
2564         primary base first.
2565         (force_canonical_binfo): Check that it's not already
2566         canonical.
2567         (mark_primary_virtual_base): Remove BINFO parameter.
2568         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
2569
2570 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
2571
2572         Remove TYPE_NONCOPIED_PARTS.
2573         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
2574         CLASSTYPE_PURE_VIRTUALS.
2575         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
2576         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
2577         (layout_class_type): Don't call fixup_inline_methods here ...
2578         (finish_struct_1): ... call it here.
2579
2580 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
2581
2582         * decl.c (duplicate_decls): Remove code deadling with
2583         DECL_SAVED_INSNS.
2584         * decl2.c (finish_file): Likewise.
2585         * pt.c (instantiate_decl): Likewise.
2586         * semantics.c (expand_body): Don't defer local functions if
2587         they wouldn't be deferred for some other reason.  Don't
2588         generate RTL for functions that will not be emitted.
2589         (genrtl_start_function): Remove code deadling with
2590         DECL_SAVED_INSNS.
2591         (genrtl_finish_function): Likewise.
2592
2593 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
2594
2595         PR c++/4203
2596         * call.c (build_over_call): Do not optimize any empty base
2597         construction.
2598
2599 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2600
2601         * error.c (dump_template_decl): Output template parameters
2602         together with their specifiers.
2603         Output `class' prefix for template template parameter.
2604         (dump_decl): Fix formatting.
2605
2606 2001-08-30  Kurt Garloff  <garloff@suse.de>
2607
2608         * optimize.c (inlinable_function_p): Allow only smaller single
2609         functions. Halve inline limit after reaching recursive limit.
2610
2611 2001-08-30  Joern Rennecke <amylaar@redhat.com>
2612             Jason Merrill  <jason_merrill@redhat.com>
2613
2614         * class.c (build_vtable_entry_ref): Subtract in char*, not
2615         ptrdiff_t.
2616
2617 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
2618
2619         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
2620         (build_cplus_array_type): Use cp_build_qualified_type, not
2621         TYPE_MAIN_VARIANT, to get an unqualified version.
2622
2623         * decl2.c (grok_alignof): Lose.
2624         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
2625         * typeck.c (c_alignof): Lose.
2626         * semantics.c (finish_sizeof, finish_alignof): New.
2627         * parse.y: Use them.
2628         * cp-tree.h: Declare them.
2629
2630 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
2631
2632         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
2633         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
2634         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
2635
2636 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
2637
2638         * typeck2.c (add_exception_specifier): Only require complete type if
2639         not in processing template declaration.
2640
2641 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2642
2643         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
2644         GNU_xref_start_scope and GNU_xref_end_scope.
2645
2646         * tree.c (TYPE_HASH): Moved to ../tree.h.
2647
2648 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
2649
2650         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
2651         on COMPOUND_EXPRs.
2652
2653 2001-08-14  Richard Henderson  <rth@redhat.com>
2654
2655         * class.c, cp-tree.h (build_vfn_ref): Remove.
2656         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
2657
2658 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
2659
2660         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
2661         empty class assignment as having side-effects to avoid
2662         spurious warnings.
2663
2664 2001-08-13  Zack Weinberg  <zackw@panix.com>
2665
2666         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
2667         * except.c: Include libfuncs.h.
2668
2669 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
2670
2671         * decl.c (grokdeclarator): Clarify diagnostic message.
2672
2673 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2674
2675         * decl2.c (do_nonmember_using_decl): Replace using directive
2676         with using declaration in the error message.
2677
2678 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2679
2680         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
2681         criterion to avoid rebuilding expression tree instead of
2682         processing_template_decl.
2683
2684 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
2685
2686         Support named return value optimization for inlines, too.
2687         * decl.c (finish_function): Nullify returns here.
2688         * semantics.c (genrtl_start_function): Not here.
2689         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
2690         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
2691         Also nullify the CLEANUP_STMT for the nrv.
2692         * cp-tree.h: Declare it.
2693         * optimize.c (declare_return_variable): Replace the nrv with the
2694         return variable.
2695         * typeck.c (check_return_expr): Be more flexible on alignment check.
2696         Ignore cv-quals when checking for a matching type.
2697
2698 2001-08-09  Richard Henderson  <rth@redhat.com>
2699
2700         * decl2.c (finish_objects): Use target hooks instead of
2701         assemble_constructor and assemble_destructor.
2702
2703 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
2704
2705         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
2706
2707 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
2708
2709         PR c++/3820
2710         Stop using TYPE_NONCOPIED_PARTS.
2711         * call.c (build_over_call): Be careful when copy constructing
2712         or assigning to an empty class.
2713         * class.c (check_bases_and_members): It has a
2714         COMPLEX_ASSIGN_REF if it has a vptr.
2715         (layout_class_type): Don't add empty class padding to
2716         TYPE_NONCOPIED_PARTS.
2717         (finish_struct_1): Don't add the VFIELD either.
2718         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
2719         initialization.
2720
2721 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
2722
2723         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
2724
2725 2001-08-06  Richard Henderson  <rth@redhat.com>
2726
2727         * decl2.c (finish_objects): Pass a symbol_ref and priority to
2728         assemble_{constructor,destructor}.  Remove priority handling.
2729
2730 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
2731
2732         Don't allow template-id in using-declaration.
2733         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
2734         (do_class_using_decl): Likewise.
2735
2736 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
2737
2738         * cp/spew.c (read_token): No need to pop buffers.
2739
2740 2001-08-02  Stan Shebs  <shebs@apple.com>
2741
2742         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
2743         (fnaddr_from_vtable_entry): Remove decl.
2744         * method.c (use_thunk): Update comment.
2745
2746 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
2747
2748         * repo.c (get_base_filename): Change return value to const char
2749         pointer.
2750
2751 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
2752
2753         Kill -fhonor-std.
2754         * NEWS: Document.
2755         * cp-tree.h (flag_honor_std): Remove.
2756         (CPTI_FAKE_STD): Remove.
2757         (std_node): Remove comment about it being NULL.
2758         (fake_std_node): Remove.
2759         * decl.c (in_fake_std): Remove.
2760         (walk_namespaces_r): Remove fake_std_node check.
2761         (push_namespace): Remove in_fake_std code.
2762         (pop_namespace): Likewise.
2763         (lookup_name_real): Remove fake_std_node check.
2764         (init_decl_processing): Always create std_node. Always add
2765         std:: things there.
2766         (builtin_function): Always put non '_' fns in std.
2767         * decl2.c (flag_honor_std): Remove.
2768         (lang_f_options): Remove honor-std.
2769         (unsupported_options): Add honor-std.
2770         (set_decl_namespace): Remove fake_std_node check.
2771         (validate_nonmember_using_decl): Likewise.
2772         (do_using_directive): Likewise.
2773         (handle_class_head): Likewise.
2774         * dump.c (cp_dump_tree): Likewise.
2775         * except.c (init_exception_processing): Adjust.
2776         * init.c (build_member_call): Remove fake_std_node check.
2777         (build_offset_ref): Likewise.
2778         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
2779         * rtti.c (init_rtti_processing): Adjust.
2780
2781 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
2782
2783         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
2784         operand while calling cp_tree_equal.
2785
2786 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
2787
2788         The 3.0 ABI no longer has vbase pointer fields.
2789         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
2790         FORMAT_VBASE_NAME): Remove.
2791         * method.c (do_build_copy_constructor): Adjust.
2792         (do_build_assign_ref): Adjust.
2793         * search.c (lookup_field_r): Adjust.
2794         * typeck.c (build_component_ref): Adjust.
2795
2796         The 3.0 ABI always has a vtable pointer at the start of every
2797         polymorphic class.
2798         * rtti.c (build_headof_sub): Remove.
2799         (build_headof): Adjust.
2800         (get_tinfo_decl_dynamic): No need to check flag_rtti
2801         here. Adjust.
2802         (create_real_tinfo_var): Explain why we need a hidden name.
2803
2804 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
2805
2806         PR c++/3631
2807         * class.c (update_vtable_entry_for_fn): The fixed adjustment
2808         of a virtual thunk should be from declaring base.
2809
2810 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
2811
2812         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
2813         the shared virtual base, so preserving inheritance graph order.
2814
2815 2001-07-30  Andreas Jaeger  <aj@suse.de>
2816
2817         * decl2.c: Remove unused var global_temp_name_counter.
2818
2819 2001-07-28  Richard Henderson  <rth@redhat.com>
2820
2821         * method.c (pending_inlines): Remove.
2822
2823 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
2824
2825         * class.c (mark_primary_virtual_base): Don't adjust base
2826         offsets here.
2827         (dfs_unshared_virtual_bases): Adjust them here.
2828         (mark_primary_bases): Explain why we adjust at the end.
2829
2830 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
2831
2832         * class.c (finish_struct_1): When copying the primary base's
2833         VFIELD, make sure we find it is at offset zero.
2834
2835 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2836
2837         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
2838         tsubst_expr for default template arguments.
2839
2840 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
2841
2842         PR c++/3621
2843         * spew.c (yylex): Only copy the token's lineno, if it is
2844         non-zero.
2845
2846 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
2847
2848         PR c++/3624
2849         * call.c (resolve_args): Simplify, call
2850         convert_from_reference.
2851         (build_new_op): Resolve and convert from reference ARG1
2852         earlier. Adjust ARG2 & ARG3 resolve and conversion.
2853
2854 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
2855
2856         * decl.c (last_function_parm_tags): Remove.
2857         (current_function_parm_tags): Remove.
2858         (init_decl_processing): Adjust.
2859         (start_function): Adjust.
2860         (store_parm_decls): Adjust.
2861
2862         PR c++/3152
2863         * decl.c (grokdeclarator): Detect when a function typedef is
2864         declaring a function, and create last_function_parms correctly.
2865
2866 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
2867
2868         * call.c (joust): Only prefer a non-builtin candidate to a builtin
2869         one if they have the same signature.
2870
2871         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
2872         it rather than toplevel_bindings_p.  Give it a mangled name if static.
2873         (convert_to_reference): Adjust.
2874         * decl2.c (get_temp_name): Lose.
2875         * mangle.c (mangle_ref_init_variable): New fn.
2876         (mangle_guard_variable): Strip the ref-init header.
2877         * cp-tree.h: Adjust.
2878         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
2879         initializer.
2880         (grok_reference_init): Always use DECL_INITIAL.
2881
2882 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2883
2884         PR c++/3416
2885         * call.c (build_conditional_expr): Recheck args after
2886         conversions.
2887         * cp-tree.h (build_conditional_expr): Move to correct file.
2888         * typeck.c (decay_conversion): Diagnose any unknown types
2889         reaching here.
2890         (build_binary_op): Don't do initial decay or default
2891         conversions on overloaded functions.
2892         (build_static_cast): Don't do a decay conversion here.
2893
2894 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2895
2896         PR c++/3543
2897         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
2898         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
2899
2900 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2901
2902         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
2903         (create_vtbl_ptr): ... here.
2904
2905 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2906
2907         * class.c (build_vbase_offset_vbtl_entries): Look for
2908         non-primary base of which we are a sub vtable.
2909
2910 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
2911
2912         * semantics.c (finish_this_expr):  Remove unused code.
2913
2914 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
2915
2916         Simplify rtti, now we've only one ABI.
2917         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
2918         CPTI_TINFO_VAR_ID.
2919         (tinfo_decl_id, tinfo_var_id): Remove.
2920         (get_typeid_1): Remove.
2921         * rtti.c
2922         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
2923         (typeid_ok_p): New function.
2924         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
2925         (get_tinfo_decl): Remove old abi documentation.
2926         (tinfo_from_decl): Remove.
2927         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
2928         (get_typeid_1): Remove.
2929         (get_base_offset): Remove.
2930         (synthesize_tinfo_var): Absorb get_base_offset.
2931         (create_real_tinfo_var): Don't use tinfo_decl_id.
2932
2933 2001-07-23  Graham Stott  <grahams@redhat.com>
2934
2935         * cp/class.c (type_requires_array_cookie): Fix use of uninitialised
2936         variable has_two_argument_delete_p.
2937
2938 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
2939
2940         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
2941         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
2942         (CPTI_INDEX_IDENTIFIER): Remove.
2943         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
2944         (delta2_identifier): Remove.
2945         (index_identifier): Remove.
2946         (pfn_or_delta2_identifier): Remove.
2947         (flag_vtable_thunks): Remove.
2948         (VTABLE_DELTA2_NAME): Remove.
2949         (VTABLE_INDEX_NAME): Remove.
2950         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
2951         (vfunc_ptr_type_node): Adjust.
2952         (VTABLE_NAME_PREFIX): Adjust.
2953         (build_vfn_ref): Lose first parameter.
2954         (fixup_all_virtual_upcast_offsets): Remove.
2955         * decl.c (initialize_predefined_identifiers): Remove
2956         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
2957         (init_decl_processing): Remove no-vtable-thunk code.
2958         * decl2.c (flag_vtable_thunks): Remove.
2959         (mark_vtable_entries): Remove no-vtable-thunk code.
2960         * error.c (dump_decl): Remove no-vtable-thunk code.
2961         (dump_expr): Adjust ptr to member function code.
2962         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
2963         code.
2964         * rtti.c (build_headof): Remove no-vtable-thunk code.
2965         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
2966         * search.c (get_base_distance): Remove expand_upcast_fixups case.
2967         (virtual_context) Remove.
2968         (expand_upcast_fixups): Remove.
2969         (fixup_virtual_upcast_offsets): Remove.
2970         (fixup_all_virtual_upcast_offsets): Remove.
2971         * typeck.c (get_member_function_from_ptrfunc): Remove
2972         no-vtable-thunk code.
2973         * call.c (build_over_call): Adjust call to build_vfn_ref.
2974         * class.c (build_vfn_ref): Lose first parameter. Remove
2975         no-vtable-thunk code.
2976         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
2977         (build_vtable_entry): Remove no-vtable-thunk code.
2978
2979 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
2980
2981         Remove old-abi remnants. Remove comments about old abi
2982         behaviour. Remove references to 'new-abi' in comments.
2983         * cp-tree.h: Adjust comments.
2984         (vbase_offsets_in_vtable_p): Delete.
2985         (vcall_offsets_in_vtable_p): Delete.
2986         (vptrs_present_everywhere_p): Delete.
2987         (all_overridden_vfuns_in_vtables_p): Delete.
2988         (merge_primary_and_secondary_vtables_p): Delete.
2989         (TYPE_CONTAINS_VPTR_P): Adjust.
2990         (VTT_NAME_PREFIX): Remove.
2991         (CTOR_VTBL_NAME_PREFIX): Remove.
2992         (init_vbase_pointers): Remove.
2993         * class.c: Adjust coments.
2994         (build_vbase_pointer_fields): Delete.
2995         (build_vbase_pointer): Remove old-abi code.
2996         (build_secondary_vtable): Likewise.
2997         (modify_all_vtables): Likewise.
2998         (create_vtable_ptr): Likewise.
2999         (layout_class_type): Likewise.
3000         (finish_struct_1): Likewise.
3001         (finish_vtbls): Likewise.
3002         (dfs_finish_vtbls): Delete.
3003         (build_vbase_offset_vtbl_entries): Remove old-abi code.
3004         * cvt.c: Adjust comments.
3005         * decl.c: Adjust comments.
3006         * decl2.c: Adjust comments.
3007         * init.c: Adjust comments.
3008         (construct_virtual_bases): Remove old-abi code.
3009         * lang-specs.h: Remove -fno-new-abi.
3010         * mangle.c: Adjust comments.
3011         * rtti.c: Adjust comments.
3012         (get_base_offset): Remove old-abi-code.
3013         * search.c: Adjust comments.
3014         (dfs_init_vbase_pointers): Remove.
3015         (dfs_vtable_path_unmark): Remove.
3016         (init_vbase_pointers): Remove.
3017         * semantics.c: Adjust comments.
3018         (emit_associated_thunks): Remove old-abi code.
3019         * typeck.c: Adjust comments.
3020
3021 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
3022
3023         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
3024         params.h.
3025
3026 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
3027
3028         * class.c (finish_struct_anon): Forbid nested classes.
3029
3030 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
3031
3032         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
3033         * optimize.c: Include debug.h.
3034         (maybe_clone_body): Use debug hook.
3035         * semantics.c: Include debug.h.
3036         (expand_body): Use debug hook.
3037
3038 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
3039
3040         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
3041
3042 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
3043
3044         * class.c (type_requires_array_cookie): New function.
3045         (check_methods): Don't try to figure out whether the type needs a
3046         cookie here.
3047         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
3048         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
3049         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
3050         * pt.c (instantiate_class_template): Don't set
3051         TYPE_VEC_DELETE_TAKES_SIZE.
3052         * NEWS: Document ABI changes from GCC 3.0.
3053
3054 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
3055             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
3056
3057         * NEWS (Changes in GCC 3.0): Fix typo.
3058
3059 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
3060
3061         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
3062         which attributes are to be attached, and a flags argument.  Update
3063         call to decl_attributes.
3064         (grokfield): Update call to decl_attributes.
3065         * class.c (finish_struct): Update call to cplus_decl_attributes.
3066         * cp-tree.h (cplus_decl_attributes): Update prototype.
3067         * decl.c (start_decl, grokdeclarator, start_function): Update
3068         calls to decl_attributes and cplus_decl_attributes.
3069         * friend.c (do_friend): Update call to cplus_decl_attributes.
3070         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
3071
3072 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
3073
3074         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
3075         for `register' variables with an asm-specification.
3076
3077 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
3078
3079         * semantics.c (finish_asm_stmt): Mark the output operands
3080         to an asm addressable, if necessary.
3081
3082 2001-07-11  Ben Elliston  <bje@redhat.com>
3083
3084         * Revert this change -- there is a subtle bug.
3085
3086         PR c++/80
3087         * decl.c (finish_enum): New "attributes" argument; pass it to
3088         cplus_decl_attributes.  Use a narrower type if the enum is packed.
3089         * cp-tree.h (finish_enum): Adjust prototype.
3090         * parse.y (enum_head): New non-terminal.
3091         (structsp): Use it. Enums now may be preceded or followed by
3092         optional attributes -- pass their chained tree to finish_enum().
3093         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
3094
3095 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
3096
3097         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
3098         variables.
3099
3100 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
3101
3102         * semantics.c (cp_expand_stmt): Fix for null
3103         current_function_return_value.
3104
3105 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
3106
3107         * call.c (build_op_delete_call): Initialize fn.
3108         (convert_like_real): Delete conditional.
3109         (joust): Initialize *w and *l.
3110         * class.c: Add prototype for binfo_ctor_vtable.
3111         (get_primary_binfo): Initialize result.
3112         * init.c (build_java_class_ref): Initialize name.
3113
3114 2001-07-09  Erik Rozendaal  <dlr@acm.org>
3115
3116         * typeck.c (unary_complex_lvalue): Do not duplicate the
3117         argument to modify, pre-, or post-increment when used as an
3118         lvalue and when the argument has side-effects.
3119
3120 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
3121
3122         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
3123         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
3124         cplus_decl_attributes even if attrs is NULL.
3125         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
3126
3127 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
3128
3129         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
3130         calls to decl_attributes.
3131
3132 2001-07-06  Ira Ruben   <ira@apple.com>
3133
3134         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
3135         be DECL_TEMPLATE_RESULT.
3136
3137 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3138
3139         * cp-tree.h (copy_template_template_parm): Rename to ...
3140         (bind_template_template_parm): ... here.
3141         * tree.c (copy_template_template_parm): Rename to ...
3142         (bind_template_template_parm): ... here.  Remove the case when
3143         NEWARGS is NULL_TREE.
3144         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
3145         BOUND_TEMPLATE_TEMPLATE_PARM.
3146         * pt.c (lookup_template_class): Adjust.
3147
3148 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
3149
3150         * cvt.c (convert_lvalue): New fn.
3151         * cp-tree.h: Declare it.
3152         * method.c (do_build_assign_ref): Use it.
3153         (do_build_copy_constructor): Convert parm to base types
3154         before calling base constructors.
3155
3156         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
3157         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
3158         optimize.
3159         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
3160
3161 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
3162
3163         * optimize.c (optimize_inline_calls): New function, broken out
3164         of ...
3165         (optimize_function): ... here. Call it. Don't inline if it is
3166         a thunk.
3167         (dump_function): Print name of dump flag causing this dump.
3168         * semantics.c (expand_body): Move thunk inline check to
3169         optimize_function.
3170
3171 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
3172
3173         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
3174         (comptypes): Use target.comp_type_attributes.
3175
3176 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
3177
3178         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
3179
3180 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
3181
3182         * error.c (lang_print_error_function): Add a `diagnostic_context *'
3183         parameter. Tweak.
3184
3185 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
3186
3187         * decl2.c (import_export_class): Update.
3188
3189 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
3190
3191         * error.c (init_error): Adjust settings.
3192
3193 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
3194
3195         * error.c (init_error): Adjust settings.
3196
3197 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
3198
3199         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
3200         return pointers to data members by reference rather than by value.
3201
3202 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
3203
3204         Implement the Named Return Value optimization.
3205         * cp-tree.h (struct cp_language_function): Add x_return_value.
3206         (current_function_return_value): Now a macro.
3207         * decl.c: Don't define it.
3208         (define_label, finish_case_label): Don't clear it.
3209         (init_decl_processing): Don't register it with GC.
3210         * semantics.c (genrtl_finish_function): Don't check it for
3211         no_return_label.  Copy the RTL from the return value to
3212         current_function_return_value and walk, calling...
3213         (nullify_returns_r): ...this new fn.
3214         * typeck.c (check_return_expr): Set current_function_return_value.
3215
3216 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
3217
3218         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
3219         sharing a ctor vtable with.  Merge code for cases 1 and 2.
3220         (binfo_ctor_vtable): New fn.
3221         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
3222
3223 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
3224
3225         * class.c (dfs_find_final_overrider): Fix logic.
3226
3227         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
3228         virtual thunk instead of non-virtual.
3229         (get_matching_virtual): Uncomment.
3230
3231         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
3232         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
3233         PARM, not ARG.
3234
3235 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
3236
3237         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
3238         we've not emerged from the hierarchy of RTTI_BINFO on reaching
3239         a non-virtual base.
3240
3241 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
3242
3243         * NEWS: Update release number.
3244
3245 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
3246
3247         PR c++/3130, c++/3131, c++/3132
3248         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
3249         * class.c (force_canonical_binfo_r): Move
3250         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
3251         virtual bases unless they're primary and what they're primary
3252         too has been moved.
3253         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
3254         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
3255         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
3256         derived binfo.
3257         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
3258         (layout_nonempty_base_or_field): Add most derived type
3259         parameter. Adjust.
3260         (layout_empty_base): Likewise.
3261         (build_base_field): Likewise.
3262         (build_base_fields): Likewise.
3263         (propagate_binfo_offsets): Add most derived type
3264         parameter. Skip non canonical virtual bases too.
3265         (dfs_set_offset_for_unshared_vbases): Don't skip primary
3266         bases. Do skip canonical bases.
3267         (layout_virtual_bases): Adjust.
3268         (layout_class_type): Adjust.
3269         (dfs_get_primary_binfo): Build list of virtual primary base
3270         candidates.
3271         (get_primary_binfo): Check that the shared virtual primary
3272         base candidate was found first.
3273         (accumulate_vtbl_inits): Don't do anything for non-vptr
3274         containing binfos. For case 1 primary virtual bases, keep
3275         checking that we've not emerged from the hierarchy of RTTI_BINFO.
3276
3277 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
3278
3279         PR c++/3089
3280         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
3281         hierarchy looking for primary bases for a ctor
3282         vtable. Recursively call oneself, if we meet our primary via
3283         this route and haven't met it yet via inheritance graph order.
3284
3285 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
3286
3287         * lang-options.h: Emit documentation for -fno-honor-std, not
3288         -fhonor-std.
3289
3290 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
3291
3292         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
3293         Don't clobber delta.
3294         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
3295
3296 2001-06-10  Mark Mitchell <mark@codesourcery.com>
3297             Gabriel Dos Reis  <gdr@codesourcery.com>
3298
3299         * Make-lang.in (cp/call.o): Depend on diagnostic.h
3300         (cp/typeck.o): Depend on diagnostic.h
3301         (cp/typeck2.o): Depend on diagnostic.h
3302         (cp/repo.o): Depend on dignostic.h
3303         * typeck.c: #include diagnostic.h
3304         (convert_for_initialization): Remove extern declaration for
3305         warningcount and errorcount.
3306
3307         * call.c: #include diagnostic.h
3308         (convert_like_real): Remove extern declaration for warnincount and
3309         errorcount.
3310
3311         * repo.c: #include diagnostic.h
3312         * typeck2.c: #include diagnostic.h
3313
3314 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
3315
3316         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
3317         in previous change.
3318
3319 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
3320
3321         PR c++/2929
3322         * friend.c (do_friend): Use push_decl_namespace for classes at
3323         namespace scope.
3324
3325 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
3326             Jason Merrill <jason_merrill@redhat.com>
3327
3328         PR c++/3061
3329         * class.c (build_secondary_vtable): Use assert, rather than an error
3330         message.
3331         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
3332         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
3333         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
3334         Don't set BINFO_VTABLE for a primary virtual base.
3335
3336 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
3337
3338         * decl.c (duplicate_decls): Update source position information
3339         when a template function is defined.
3340
3341 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
3342
3343         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
3344
3345 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
3346
3347         PR c++/2914
3348         * decl.c (pushtag): Don't push into a complete type's scope.
3349
3350 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
3351
3352         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
3353         (struct lang_decl_flags): Lose generate_with_vtable_p.
3354         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
3355         * class.c (copy_virtuals): Adjust.
3356         * decl2.c (mark_vtable_entries): Adjust.
3357         * method.c (make_thunk, build_vtable_entry): Adjust.
3358         * class.c (update_vtable_entry_for_fn): Only look as far as the
3359         first defining class.
3360         (build_vtbl_initializer): Put nothing in the slot for a function only
3361         defined in a lost primary virtual base.
3362         (add_vcall_offset_vtbl_entries_1): Use the same code for
3363         the lost primary case and the normal case.
3364         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
3365         (get_vfield_offset, get_derived_offset): Lose.
3366         (dfs_find_final_overrider): Use look_for_overrides_here.
3367         (get_matching_virtual): New fn.
3368         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
3369         not BV_VCALL_INDEX.
3370         * search.c (look_for_overrides_here): Split out from...
3371         (look_for_overrides_r): Here.
3372
3373         * class.c (find_final_overrider): Return error_mark_node on error.
3374
3375         * decl2.c (key_method): #if 0 accidental change.
3376
3377 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
3378
3379         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
3380         (build_over_call): Likewise.
3381         * decl.c (grokparms): Likewise.
3382         * pt.c (tsubst_decl): Likewise.
3383         * typeck.c (convert_arguments): Likewise.
3384
3385 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
3386
3387         * semantics.c (begin_class_definition): Robustify.
3388
3389         * pt.c (instantiate_decl): Tell the repository code about the
3390         clones, not the cloned functions.
3391         * repo.c (repo_template_used): Explicitly instantiate the cloned
3392         function, not the clones.
3393
3394 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
3395
3396         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
3397         ICS_BAD_FLAG on created conversion.
3398         (compare_ics): Break out rank.
3399
3400 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
3401
3402         * decl.c (xref_tag): Remove extraneous %s on dependent name
3403         lookup warning.
3404
3405 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
3406
3407         * class.c (layout_vtable_decl): Fix off by one error on
3408         build_index_type.
3409         (build_vtt): Likewise.
3410         (build_ctor_vtbl_group): Likewise.
3411
3412 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
3413
3414         * class.c (maybe_indent_hierarchy): New function.
3415         (dump_class_hierarchy_r): Add flags. Dump extra binfo
3416         information, if enabled. Use maybe_indent_hierarchy. Adjust
3417         output format.
3418         (dump_class_hierarchy): Adjust prototype. Adjust output format.
3419         (dump_array, dump_vtable, dump_vtt): New functions.
3420         (finish_struct_1): Adjust hierarchy dumping.
3421         (initialize_vtable): Call dump_vtable.
3422         (build_vtt): Call dump_vtt.
3423         (build_ctor_vtbl_group): Call dump_vtable.
3424         * decl2.c (flag_dump_class_layout): Remove.
3425         (cxx_decode_option): Remove dump translation unit
3426         and dump class hierarchy check. Call dump_switch_p.
3427         (finish_file): Adjust dumping.
3428         (dump.c): Only dump base classes if not TDF_SLIM.
3429         Only dump namespace members if not TDF_SLIM.
3430         * optimize.c (dump_function): New function.
3431         (optimize_function): Call dump_function.
3432         * semantics.c (expand_body): Use dump_enabled_p.
3433
3434 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
3435
3436         PR g++/2936
3437         Part missed from first commit
3438         * decl2.c (finish_anon_union): Copy context.
3439
3440 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
3441
3442         PR g++/2936
3443         * optimize.c (remap_decl): Remap anonymous aggregate members too.
3444
3445 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
3446
3447         PR g++/2823
3448         * semantics.c (expand_body): Don't optimize thunks.
3449
3450 2001-05-25  Sam TH  <sam@uchicago.edu>
3451
3452         * cp-tree.h lex.h: Fix header include guards.
3453
3454 2001-05-25  Mark Mitchell <mark@codesourcery.com>
3455
3456         * decl.c (init_decl_processing): Tweak.
3457
3458 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
3459
3460         * decl.c (duplicate_decls): Tidy.
3461         (init_decl_processing): Always set flag_no_builtin.
3462
3463 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
3464
3465         PR c++/2184
3466         * decl2.c (do_local_using_decl): Push the decls, even in a
3467         template.
3468
3469 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
3470
3471         * optimize.c (initialize_inlined_parameters): Don't set
3472         TREE_READONLY for a VAR_DECL taking the place of an inlined
3473         PARM_DECL.
3474
3475 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
3476
3477         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
3478         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
3479         attribute.
3480
3481 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
3482
3483         * parse.y: Refer to compound literals as such, not as
3484         constructor-expressions.
3485
3486 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
3487
3488         * call.c (build_op_delete_call): Ignore exception-specifications
3489         when looking for matching delete operators.
3490         * init.c (build_new_1): Compute whether or not the allocation
3491         function used is a placement allocation function or not, and
3492         communicate this information to build_op_delete_call.
3493
3494 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
3495
3496         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
3497         (build_vtbl_ref): Adjust.
3498         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
3499         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
3500         Re-add vtable-gc.
3501         (unsupported_options): Correspondingly.
3502
3503         * decl2.c (maybe_make_one_only): Check flag_weak, not
3504         supports_one_only().
3505
3506         * cp-tree.def (START_CATCH_STMT): Lose.
3507         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
3508         * tree.c (cp_statement_code_p): Don't case it.
3509         * semantics.c (cp_expand_stmt): Likewise.
3510         * cp-tree.h (START_CATCH_TYPE): Lose.
3511         (HANDLER_TYPE): New.
3512         * except.c (expand_start_catch_block): Don't start any blocks.
3513         Return the type.
3514         (expand_end_catch_block): Don't end any blocks.
3515         * parse.y (handler): Don't pass anything from finish_handler_parms
3516         to finish_handler.
3517         * pt.c (tsubst_expr): Likewise.
3518         * semantics.c (begin_handler): Call note_level_for_catch here.
3519         (finish_handler_parms): Don't return anything.
3520         (genrtl_catch_block, begin_catch_block): Lose.
3521         (genrtl_handler): Call expand_start_catch here.
3522
3523 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
3524
3525         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
3526         (get_vtable_decl, build_vtt): Not here.
3527
3528 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
3529
3530         PR c++/2781
3531         * optimize.c (update_cloned_parm): Copy addressability and other
3532         flags.
3533
3534 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3535
3536         * pt.c (determine_specialization): Ignore artificial functions.
3537
3538 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
3539
3540         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
3541         (C_RID_CODE): Remove.
3542         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
3543         (init_parse): Don't do it here.
3544
3545 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
3546
3547         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
3548         function declaration to avoid stripping the symbol's attributes.
3549
3550 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
3551
3552         * decl.c (pushdecl): Adjust error string.
3553         (xref_tag): Adjust friend class injection warning. Remove the
3554         inherited name from the class shadowed scope.
3555
3556 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
3557
3558         * except.c (cp_protect_cleanup_actions): New function.
3559         (init_exception_processing): Don't set protect_cleanup_actions
3560         here.  Do set lang_protect_cleanup_actions.
3561
3562 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
3563
3564         * spew.c (read_token): Call yyerror on all unexpected tokens.
3565
3566 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
3567
3568         * init.c (member_init_ok_or_else): Take a tree rather than
3569         string for name.
3570         (expand_member_init): Adjust.
3571
3572 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
3573
3574         * decl.c (duplicate_decls): Suppress warning about duplicate
3575         decls if the first decl is a friend.
3576
3577 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
3578
3579         * except.c (choose_personality_routine): Export.  Add
3580         explanatory comment.  Take an enum languages, not a boolean.
3581         (initialize_handler_parm): Adjust to match.
3582         * cp-tree.h: Prototype choose_personality_routine.
3583         * lex.c (handle_pragma_java_exceptions): New function.
3584         (init_cp_pragma): Register #pragma GCC java_exceptions.
3585
3586 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
3587
3588         * method.c (build_mangled_C99_name): Remove unused prototype.
3589
3590 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
3591
3592         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
3593         * typeck.c (get_member_function_from_ptrfunc,
3594         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
3595         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
3596
3597         Reverted Geoff Keating's 2001-05-03's patch.
3598
3599 2001-05-11  Ira Ruben   <ira@apple.com>
3600
3601         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
3602
3603 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
3604
3605         * cp-tree.h (finish_label_expr, lookup_label): Delete.
3606         * parse.y: Update for '&&'; don't issue warning here.
3607         * semantics.c (finish_label_expr): Delete.
3608
3609 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
3610
3611         * splay-tree.h (splay_tree_max): New function.
3612         (splay_tree_min): Likewise.
3613
3614 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
3615
3616         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
3617         (pfn_vflag_identifier): Define.
3618         Update comment about layout of pointer functions.
3619         (build_ptrmemfunc1): Update prototype.
3620         (expand_ptrmemfunc_cst): Update prototype.
3621         * decl.c (initialize_predefined_identifiers): Initialize
3622         pfn_vflag_identifier.
3623         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
3624         an extra field to the type.
3625         * expr.c (cplus_expand_constant): Pass 'flag' between
3626         expand_ptrmemfunc_cst and build_ptrmemfunc1.
3627         * typeck.c (get_member_function_from_ptrfunc): When
3628         FUNCTION_BOUNDARY < 16, look at additional field to determine
3629         if a pointer-to-member is a real pointer or a vtable offset.
3630         (build_ptrmemfunc1): Add new parameter to contain extra field.
3631         (build_ptrmemfunc): Pass the extra field around.
3632         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
3633         (pfn_from_ptrmemfunc): Ignore the extra field.
3634
3635 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
3636
3637         * cp-tree.h (flag_inline_trees): Update documentation.
3638         * decl.c (init_decl_processing): Adjust handling of
3639         flag_inline_functions and flag_inline_trees to support -O3.
3640         (grokfndecl): Set DECL_INLINE on all functions if that's what
3641         the user requested.
3642         (save_function_data): Clear DECL_INLINE in
3643         current_function_cannot_inline is non-NULL.
3644         * decl2.c (flag_inline_trees): Update documentation.
3645
3646 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
3647
3648         * dump.c (cp_dump_tree, USING_STMT case): New case.
3649         * tree.c (cp_statement_code_p): Add USING_STMT.
3650         * decl2.c (do_using_directive): Add the using directive statement.
3651
3652         * tree.c (walk_tree): Reformat an if block.
3653
3654 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
3655
3656         * decl.c (compute_array_index_type): Don't try to do anything with
3657         the indices when processing a template.
3658
3659 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3660
3661         * call.c: NULL_PTR -> NULL.
3662         * class.c: Likewise.
3663         * cvt.c: Likewise.
3664         * decl.c: Likewise.
3665         * decl2.c: Likewise.
3666         * except.c: Likewise.
3667         * init.c: Likewise.
3668         * rtti.c: Likewise.
3669         * search.c: Likewise.
3670         * tree.c: Likewise.
3671         * typeck.c: Likewise.
3672         * typeck2.c: Likewise.
3673
3674 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
3675
3676         * decl2.c (do_using_directive): Revert previous patch.
3677
3678 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
3679
3680         * cp-tree.def (USING_STMT): New statement node.
3681         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
3682         * decl2.c (do_using_directive): Add USING_STMT to statement
3683         tree. Don't emit errors when processing template decl.
3684         * pt.c (tsubst_expr, USING_STMT case): New case.
3685         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
3686
3687 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
3688
3689         * call.c (build_new_op): Convert args from reference here.
3690         (build_conditional_expr): Don't convert here.
3691
3692 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
3693
3694         * spew.c (last_token_id): New static variable.
3695         (read_token): Set it here.
3696         (yyerror): Use it here.
3697
3698 2001-04-30  Richard Henderson  <rth@redhat.com>
3699
3700         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
3701         * decl.c: Likewise.
3702
3703 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
3704
3705         * gxxint.texi: Remove.
3706         * Make-lang.in: Remove all traces of gxxint.texi.
3707
3708 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
3709
3710         * decl2.c (start_static_initialization_or_destruction): Correct
3711         logic to handle the -fno-use-cxa-atexit case.
3712
3713 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
3714
3715         * optimize.c (update_cloned_parm): New function.
3716         (maybe_clone_body): Use it.  Update the `this' parameter too.
3717
3718 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
3719
3720         * decl2.c (unsupported_options): Add new-abi.
3721         * lang-options.h: Remove no longer supported options.
3722
3723 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
3724
3725         * except.c (can_convert_eh): Don't check template parms,
3726         typename types etc.
3727
3728 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
3729
3730         * optimize.c (maybe_clone_body): Copy parameter names and locations.
3731
3732 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
3733
3734         * cp-tree.h (adjust_clone_args): Prototype new function.
3735         * class.c (adjust_clone_args): New function.
3736         * decl.c (start_function): Call it for in charge ctors.
3737
3738 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
3739
3740         * method.c (use_thunk): Make sure that thunks really are emitted
3741         when requested.
3742
3743 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
3744
3745         * mangle.c (write_chars): New macro.
3746         (hwint_to_ascii): New function
3747         (write_number): Use it.
3748         (write_integer_cst): Deal with really big numbers.
3749
3750 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
3751
3752         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
3753         the clone.
3754
3755 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
3756
3757         * decl.c (grokdeclarator): Set context of namespace scope
3758         TYPE_DECLS.
3759
3760 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
3761
3762         * cp/optimize.c: Include hashtab.h.
3763         (struct inline_data): Add tree_pruner.
3764         (expand_call_inline, expand_calls_inline): Use it when calling
3765         walk_tree.
3766         (optimize_function): Initialize and free tree_pruner.
3767
3768 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
3769
3770         Lazy __FUNCTION__ generation.
3771         * cp-tree.def (FUNCTION_NAME): Remove.
3772         * cp-tree.h (function_name_declared_p): Remove.
3773         (cp_fname_init): Prototype.
3774         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
3775         don't call declare_function_name. Call start_fname_decls.
3776         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
3777         clobber the line number.
3778         (cp_fname_init): New function.
3779         (start_function): Call start_fname_decls.
3780         (finish_function): Call finish_fname_decls.
3781         * lex.c (reswords): Add slots for __FUNCTION__ et al.
3782         (rid_to_yy): Add mappings for __FUNCTION__ et al.
3783         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
3784         * parse.y (VAR_FUNC_NAME): New token.
3785         (primary): Add VAR_FUNC_NAME.
3786         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
3787         generation.
3788         (tsubst, FUNCTION_NAME case): Remove.
3789         (tsubst_copy, FUNCTION_NAME case): Remove.
3790         (tsubst_expr, DECL_STMT case): Be careful with a
3791         DECL_PRETTY_FUNCTION_P.
3792         (instantiate_decl): Remove function_name_declared_p.
3793         * semantics.c (begin_compound_statement): Don't call
3794         declare_function_name here.
3795         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
3796         (finish_translation_unit): Call finish_fname_decls.
3797         (expand_body): Remove function_name_declared_p.
3798         * typeck2.c (digest_init): Allow any ERROR_MARK.
3799
3800 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
3801
3802         * pt.c (tsubst_decl): Use VOID_TYPE_P.
3803         * semantics.c: Fix some typos.
3804
3805 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
3806
3807         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
3808
3809 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3810
3811         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
3812
3813 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
3814
3815         * except.c (build_throw): Wrap the initialization of the exception
3816         object in a MUST_NOT_THROW_EXPR.
3817         (do_free_exception): #if 0.
3818
3819 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
3820
3821         * cp-tree.h (finish_enum): Change prototype.
3822         * decl.c (finish_enum): Reorganize.
3823         * parse.y (structsp): Adjust calls to finish_enum.
3824
3825 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3826
3827         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
3828         't' case.
3829
3830 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3831
3832         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
3833         (layout_empty_base): Return at end flag.
3834         (build_base_field): Likewise.
3835         (build_base_fields): Likewise.
3836         (layout_virtual_bases): Don't add 1 to eoc value.
3837         (end_of_class): Use full size for empty bases.
3838         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
3839         empty bases. Don't add 1 to eoc value. Only add trailing padding
3840         if we're an empty class with no empty bases.
3841         (dump_class_hierarchy): Dump size and alignment.
3842
3843 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
3844
3845         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
3846         ICS_BAD_FLAG.
3847
3848 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
3849
3850         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
3851         is found, look first if name does not match the structure name.
3852
3853 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
3854
3855         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
3856         set.
3857         (SET_DECL_LANGUAGE): New macro.
3858         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
3859         (pushdecl): Likewise.
3860         (build_library_fn_1): Likewise.
3861         (build_cp_library_fn): Likewise.
3862         (grokfndecl): Likewise.
3863         (grokvardecl): Mark `extern "C"' variables as having C linkage.
3864         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
3865         * lex.c (retrofit_lang_decl): Likewise.
3866         * mangle.c (mangle_decl_string): Don't mangle the names of
3867         variables declared with C language linkage.
3868         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
3869
3870 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
3871
3872         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
3873         flag_access_control from uninitialized storage.
3874
3875 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
3876
3877         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
3878         * mangle.c (write_pointer_to_member_type): Fix mangling of
3879         pointers to cv-qualified member function types.
3880
3881         * init.c (build_delete): Create a SAVE_EXPR for the address if
3882         we're going to use it more than once.
3883
3884 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
3885
3886         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
3887         (expand_ptremfunc_cst): Change prototype.
3888         (delta2_from_ptrmemfunc): Remove.
3889         * expr.c (cplus_expand_constant): Adjust call to
3890         expand_ptrmemfunc_cst.
3891         * typeck.c (build_ptrmemfunc1): Simplify.
3892         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
3893         results in a constant.
3894         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
3895         (delta2_from_ptrmemfunc): Remove.
3896         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
3897
3898 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
3899
3900         * cp-tree.h (decl_namespace_list): New macro.
3901         (struct saved_scope): Add decl_ns_list.
3902         * decl.c (mark_saved_scope): Mark it.
3903         * decl2.c: Lose static decl_namespace_list.
3904         (init_decl2): Don't save it.
3905
3906 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3907
3908         * cp-tree.h (warn_return_type, yylex): Delete redundant
3909         declarations.
3910
3911         * decl.c (current_class_depth, global_namespace): Likewise.
3912
3913         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
3914
3915         * repo.c (flag_use_repository): Likewise.
3916
3917 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3918
3919         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
3920         set_block, pushdecl, getdecls, gettags, init_decl_processing,
3921         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
3922         lvalue_or_else, print_lang_statistics, comp_target_types,
3923         unsigned_type, signed_type, signed_or_unsigned_type,
3924         build_function_call, mark_addressable, incomplete_type_error):
3925         Delete redundant declarations.
3926
3927 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
3928
3929         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
3930         (TYPE_ANONYMOUS_P): New macro.
3931         (TAGGED_TYPE_P): New macro.
3932         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
3933         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
3934         * tree.c (no_linkage_helper): Likewise.
3935         * semantics.c (begin_class_definition): Likewise.
3936         * pt.c (convert_template_argument): Likewise.
3937         * lex.c (check_for_missing_semicolon): Likewise.
3938
3939 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
3940
3941         * class.c (dfs_unshared_virtual_bases): New function.
3942         (mark_primary_bases): Call it.
3943         (check_bases): Ignore virtual bases when determining
3944         nearly-emptiness.
3945
3946 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
3947
3948         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
3949
3950 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
3951
3952         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
3953         cloned function to the clone.
3954
3955 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3956
3957         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
3958
3959         * semantics.c: Include expr.h.
3960
3961 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
3962
3963         * method.c (implicitly_declare_fn): Commonize code for copy ctor
3964         and assignment op. Set TREE_USED for parameter.
3965
3966 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
3967
3968         * class.c (find_final_overrider_data): Add `candidates'.
3969         (dfs_find_final_overrider): Don't issue error messages
3970         prematurely.
3971         (find_final_overrider): Issue error messages here.
3972         (build_base_field): Don't warn about amgibuous direct bases here.
3973         (warn_about_ambiguous_direct_bases): New function.
3974         (layout_class_type): Use it.
3975
3976 2001-04-10  Richard Henderson  <rth@redhat.com>
3977
3978         * typeck.c (build_array_ref): Push the array reference inside
3979         COMPOUND_EXPR and COND_EXPR.
3980
3981 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
3982
3983         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
3984         * decl.c (duplicate_decls): Adjust accordingly.
3985         (maybe_commonize_var): Likewise.
3986         (grokfndecl): Likewise.
3987         (start_function): Likewise.
3988         (start_method): Likewise.
3989         * decl2.c (key_method): Likewise.
3990         (import_export_decl): Likewise.
3991         * method.c (implicitly_declare_fn): Likewise.
3992         * optimize.c (maybe_clone_body): Likewise.
3993
3994 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
3995
3996         * lang-specs.h: Add __DEPRECATED.
3997
3998 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
3999
4000         * search.c (get_dynamic_cast_base_type): When building a new
4001         constant, set its type to ssizetype.
4002
4003 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
4004
4005         * optimize.c (expand_call_inline): Only add newly inlined statements
4006         into inlined_stmts.
4007
4008 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
4009
4010         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
4011         (OPERATOR_FORMAT): Likewise.
4012         (OPERATOR_TYPENAME_FORMAT): Likewise.
4013         * operators.def: Remove old name-mangling information.
4014         * decl.c (grok_op_properties): Adjust accordingly.
4015         * lex.c (init_operators): Likewise.
4016         * rtti.c (get_tinfo_decl): Issue error messages about types that
4017         have variable size.
4018
4019 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
4020
4021         * decl2.c (import_export_decl): Don't call import_export_class
4022         when processing an inline member function.
4023         * semantics.c (expand_body): Call import_export_decl before
4024         emitting inline functions.
4025
4026 2001-03-28  Richard Henderson  <rth@redhat.com>
4027
4028         IA-64 ABI Exception Handling:
4029         * cp-tree.def (EH_SPEC_BLOCK): New.
4030         (MUST_NOT_THROW_EXPR): New.
4031         * cp-tree.h: Update changed function declarations.
4032         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
4033         (CPTI_CALL_UNEXPECTED): New.
4034         (struct cp_language_function): Rename x_eh_spec_try_block
4035         to x_eh_spec_block.
4036         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
4037         * decl.c (current_binding_level): If no current function
4038         bindings, revert to scope_chain.
4039         (initialize_predefined_identifiers): Remove __cp_push_exception.
4040         (store_parm_decls): Use begin_eh_spec_block.
4041         (finish_function): Use finish_eh_spec_block.
4042         (mark_lang_function): Update for name changes.
4043         * decl2.c (finish_file): No mark_all_runtime_matches.
4044         * dump.c (cp_dump_tree): Handle new tree codes.
4045         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
4046         * except.c (catch_language_init, catch_language): Remove.
4047         (init_exception_processing): Don't set language code.
4048         Initialize call_unexpected_node, protect_cleanup_actions,
4049         eh_personality_libfunc, lang_eh_runtime_type.
4050         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
4051         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
4052         (prepare_eh_type): Split out type canonicalizations ...
4053         (build_eh_type_type): ... from here.
4054         (build_eh_type_type_ref): Remove.
4055         (mark_all_runtime_matches): Remove.
4056         (build_exc_ptr): New.
4057         (do_begin_catch, do_end_catch): New.
4058         (do_pop_exception): Remove.
4059         (build_terminate_handler): Remove.
4060         (choose_personality_routine): Split out language choice from ...
4061         (initialize_handler_parm): ... here.
4062         Use MUST_NOT_THROW_EXPR.
4063         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
4064         exception object handling.
4065         (expand_start_eh_spec, expand_end_eh_spec): Remove.
4066         (expand_exception_blocks, alloc_eh_object): Remove.
4067         (begin_eh_spec_block, finish_eh_spec_block): New.
4068         (do_allocate_exception, do_free_exception): New.
4069         (expand_throw): Merge into ...
4070         (build_throw): ... here.  Update for abi.
4071         * expr.c (cplus_expand_expr): No expand_internal_throw.
4072         Handle MUST_NOT_THROW_EXPR.
4073         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
4074         * semantics.c (*) Update for except.h name changes.
4075         (genrtl_try_block): No protect_with_terminate.
4076         (genrtl_eh_spec_block): New.
4077         (genrtl_handler): Don't emit the goto here.
4078         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
4079         (genrtl_finish_function): Don't expand_exception_blocks.
4080         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
4081
4082 2001-03-28  Richard Henderson  <rth@redhat.com>
4083
4084         * decl.c (struct named_label_list): Rename eh_region to
4085         in_try_scope, add in_catch_scope.
4086         (struct binding_level): Rename eh_region to is_try_scope,
4087         add is_catch_scope.
4088         (note_level_for_try): Rename from note_level_for_eh.
4089         (note_level_for_catch): New.
4090         (poplevel): Copy both is_try_scope and is_catch_scope to
4091         the named_label_list struct.
4092         (check_previous_goto_1): Don't check for catch block via
4093         DECL_ARTIFICIAL; use in_try_scope instead.
4094         (check_goto): Likewise.
4095         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
4096         * except.c (expand_start_catch_block): Call note_level_for_catch.
4097         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
4098
4099 2001-03-27  Richard Henderson  <rth@redhat.com>
4100
4101         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
4102         exceptions_via_longjmp.
4103
4104 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
4105
4106         * pt.c (check_default_tmpl_args):  Make error messages clearer.
4107
4108 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
4109
4110         * error.c:  Also undefine 'A' macro used for cp_printers definition.
4111
4112 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4113
4114         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
4115
4116 2001-03-26  Mike Yang <yang@research.att.com>
4117             Mark Mitchell  <mark@codesourcery.com>
4118
4119         * dump.c (dump_access): New function.
4120         (cp_dump_tree): Use it.  Dump basetype information for class
4121         types.
4122
4123 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
4124
4125         * Makefile.in (optimize.o): Depend on params.h.
4126         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
4127         (init_decl_processing): Set flag_no_inline when doing
4128         inlining-on-trees.
4129         * optimize.c: Include params.h.
4130         (struct inline_data): Improve documentation of FNS.  Add
4131         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
4132         (INSNS_PER_STMT): New macro.
4133         (remap_block): Use CLONING_P.
4134         (inlinable_function_p): Don't inline big functions.
4135         (expand_call_inline): Keep track of how much inlining we've done.
4136         (optimize_function): Set FIRST_INLINED_FN.
4137         (maybe_clone_body): Set CLONING_P.
4138         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
4139         tree nodes.
4140         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
4141         rest_of_compilation.  Clear DECL_RTL for local variables
4142         afterwards.
4143         (clear_decl_rtl): New function.
4144
4145 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
4146
4147         Implement DR 209
4148         * cp-tree.h (skip_type_access_control,
4149         reset_type_access_control): Prototype.
4150         * decl.c (grokdeclarator): Access of friends is not checked.
4151         * parse.y (component_decl_list): Reset type access control.
4152         * semantics.c (decl_type_access_control): Clear
4153         current_type_lookups.
4154         (save_type_access_control): Don't save if not deferring.
4155         (skip_type_access_control, reset_type_access_control): New
4156         functions.
4157         (begin_class_definition): Do type access control for basetypes.
4158         Start deferred access control.
4159         (finish_class_definition): Resume immediate access control if
4160         this is a local class.
4161
4162 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4163
4164         * class.c (add_method): Use memcpy/memmove, not bcopy.
4165
4166         * decl.c (duplicate_decls): Likewise.
4167
4168 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
4169
4170         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
4171         not `_'.
4172
4173 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
4174
4175         * decl.c (local_names): Define.
4176         (push_local_name): New.
4177         (grok_reference_init): Return init if initializing static reference
4178         variable with non-constant instead of emitting it.
4179         Move expand_static_init call to cp_finish_decl.
4180         (layout_var_decl): Call push_local_name.
4181         (maybe_commonize_var): Allow inlining functions even if they have
4182         static local variables, use comdat_linkage for them if flag_weak.
4183         (check_initializer): Call obscure_complex_init if
4184         grok_reference_init returned non-zero.
4185         (save_function_data): Clear x_local_names.
4186         (pop_cp_function_context): Free x_local_names.
4187         (mark_inlined_fns): Remove.
4188         (mark_lang_function): Mark x_local_names.
4189         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
4190         Mark inlined_fns as tree, remove call to mark_inlined_fns.
4191         * class.c (alter_access): Ensure DECL_ACCESS is never set if
4192         DECL_DISCRIMINATOR_P.
4193         * cp-tree.h (cp_language_function): Add x_local_names.
4194         (lang_decl_flags): Add discriminator into u2.
4195         (lang_decl_inlined_fns): Remove.
4196         (lang_decl): inlined_fns is now a TREE_VEC.
4197         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
4198         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
4199         TREE_VEC, not a custom structure.
4200         (optimize_function): Likewise.
4201         * mangle.c (discriminator_for_local_entity): Discriminate among
4202         VAR_DECL local entities.
4203         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
4204         is not valid.
4205
4206 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
4207
4208         Add support for Java interface method calls.
4209         * cp-tree.h (struct lang_type): Add java_interface flag.
4210         (TYPE_JAVA_INTERFACE): New macro.
4211         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
4212         by setting TYPE_JAVA_INTERFACE.
4213         * call.c (java_iface_lookup_fn): New static.
4214         (build_over_call): If calling a method declared in a
4215         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
4216         expression which resolves the function address.
4217         (build_java_interface_fn_ref): New function.
4218
4219 2001-03-22  Richard Henderson  <rth@redhat.com>
4220
4221         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
4222         * except.c: Don't include it.
4223
4224 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
4225             based on an idea from Joe Buck <jbuck@synopsys.com>
4226
4227         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
4228         New nonterminals.
4229         (data_def, component_decl): Add reductions to bad_decl.
4230
4231 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
4232
4233         * method.c (do_build_assign_ref): Don't use build_modify_expr for
4234         anonymous aggregates, since they don't have assignment operator
4235         method.
4236         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
4237         assignment operators for anonymous structure fields.
4238
4239 2001-03-21  Jason Merrill  <jason@redhat.com>
4240
4241         * pt.c (instantiate_decl): Abort if we see a member constant
4242         instantiation that doesn't already have its initializer.
4243         Downgrade explicit instantiation without definition to pedwarn.
4244
4245         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
4246         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
4247         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
4248
4249         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
4250         (pending_vtables): Remove.
4251         * decl2.c (pending_vtables): Remove.
4252         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
4253         CLASSTYPE_VTABLE_NEEDS_WRITING.
4254         (import_export_class): Likewise.
4255         (init_decl2): Don't mark pending_vtables.
4256         * lex.c (handle_pragma_vtable): Just sorry.
4257         * pt.c (instantiate_class_template): Don't mess with
4258         CLASSTYPE_VTABLE_NEEDS_WRITING.
4259         (mark_class_instantiated): Likewise.
4260         * ptree.c (print_lang_type): Don't print it.
4261         * semantics.c (begin_class_definition): Don't set it.
4262
4263         * pt.c (template_tail): Replace with last_pending_template.
4264         (maybe_templates, maybe_template_tail): Remove.
4265         (add_pending_template): Adjust.
4266         (instantiate_pending_templates): Adjust.
4267
4268         * cp-tree.h (struct saved_scope): Remove lang_stack field.
4269         (current_lang_stack): Remove.
4270         * decl.c (maybe_push_to_top_level): Don't initialize it.
4271         (duplicate_decls): Use current_lang_depth.
4272         (xref_basetypes): Likewise.
4273         * class.c (current_lang_depth): New fn.
4274         (push_lang_context): Use more varray functionality.
4275         (pop_lang_context): Likewise.
4276
4277         * error.c (GLOBAL_THING): Always use '__'.
4278
4279 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
4280
4281         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
4282
4283         * mangle.c (mangle_decl_string): Mangle the names of overloaded
4284         operators, even when they have `extern "C"' linkage.
4285
4286 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
4287
4288         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
4289         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
4290         where it's not necessary.
4291         (add_method): Remove optimization involving comparison of
4292         DECL_ASSEMBLER_NAME.
4293         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
4294         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
4295         where it's not necessary.
4296         (check_methods): Likewise.
4297         (build_clone): Likewise.
4298         (built_vtt): Likewise.
4299         * cp-tree.h (DECL_NEEDED_P): Likewise.
4300         * decl.c (pushtag): Likewise.
4301         (duplicate_decls): Likewise.
4302         (pushdecl): Likewise.
4303         (builtin_function): Likewise.
4304         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
4305         (build_cp_library_fn): Likewise.
4306         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
4307         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
4308         where it's not necessary.
4309         (make_rtl_for_nonlocal_decl): Likewise.
4310         (cp_finish_decl): Likewise.
4311         (grokfndecl): Likewise.
4312         (grokvardecl): Likewise.
4313         (grokdeclarator): Likewise.
4314         (start_function): Likewise.
4315         (cp_missing_return_ok_p): Likewise.
4316         * decl2.c (grokclassfn): Likewise.
4317         (check_classfn): Likewise.
4318         (finish_static_data_member_decl): Likewise.
4319         (grokfield): Likewise.
4320         * error.c (GLOBAL_IORD_P): Remove.
4321         (dump_global_iord): Improve output.
4322         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
4323         * except.c (nothrow_libfn_p): Summarily reject any function not in
4324         namespace-scope.
4325         * init.c (build_java_class_ref): Don't explicitly set
4326         DECL_ASSEMBLER_NAME after calling mangle_decl.
4327         * mangle.c (mangle_decl_string): Handle extern "C" functions.
4328         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
4329         * method.c (set_mangled_name_for_decl): Don't explicitly set
4330         DECL_ASSEMBLER_NAME after calling mangle_decl.
4331         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
4332         IDENTIFIER_GLOBAL_VALUE for the thunk.
4333         * pt.c (set_mangled_name_for_template_decl): Remove.
4334         (check_explicit_specialization): Don't use it.
4335         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
4336         (tsubst_friend_function): Likewise.
4337         (tsubst_decl): Likewise.
4338         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
4339         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
4340         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
4341         where it's not necessary.
4342         (tinfo_base_init): Likewise.
4343         (create_real_tinfo_var): Likewise.
4344         * search.c (looup_field_1): Likewise.
4345         * semantics.c (finish_named_return_value): Likewise.
4346         * tree.c (init_tree): Set lang_set_decl_assembler_name.
4347
4348 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
4349
4350         Correct semantics restrictions checking in throw-expression.
4351         * except.c (is_admissible_throw_operand): New function.
4352         (build_throw): Use it.
4353
4354 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
4355
4356         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
4357         and its ilk.
4358
4359 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
4360
4361         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
4362         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
4363         * decl.c (duplicate_decls): Likewise.
4364         (builtin_function): Likewise.
4365         (build_library_fn): Likewise.
4366         (build_cp_library_fn): Likewise.
4367         (check_initializer): Likewise.
4368         (cp_finish_decl): Likewise.
4369         * decl2.c (grokfield): Likewise.
4370         (grok_function_init): Remove #if 0'd code.
4371         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
4372         * friend.c (do_friend): Likewise.
4373         * init.c (get_temp_regvar): Likewise.
4374         * method.c (make_thunk): Likewise.
4375         * pt.c (tsubst_friend_function): Likewise.
4376         (tsubst_decl): Likewise.
4377         (regenerate_decl_from_template): Likewise.
4378         * semantics.c (genrtl_named_return_value): Likewise.
4379         (expand_body): Likewise.
4380         (genrtl_finish_function): Likewise.
4381         * tree.c (cp_tree_equal): Likewise.
4382
4383 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
4384
4385         * call.c (convert_like_real): Add extra semantics to INNER
4386         parameter. Don't convert to temporary if a user conversion
4387         gives us an lvalue that we're about to bind to a reference.
4388         Set INNER to indicate pending reference binding on recursive
4389         calls.
4390
4391 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
4392
4393         * cp/lex.c: Delete duplicate pending_lang_change.
4394
4395 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
4396
4397         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
4398         Similarly.
4399         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
4400         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
4401
4402 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
4403
4404         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
4405
4406 2001-03-08  Stan Shebs  <shebs@apple.com>
4407
4408         * cp-tree.h (set_identifier_local_value): Remove unused decl.
4409
4410 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
4411
4412         * spew.c: Remove references to CPP_OSTRING.
4413
4414 2001-03-06  Andrew Haley  <aph@redhat.com>
4415
4416         * typeck.c (convert_arguments): Check that we have an fndecl.
4417
4418 2001-03-05  Andrew Haley  <aph@redhat.com>
4419
4420         * typeck.c (convert_arguments): Don't do ellipsis conversion for
4421         __built_in_constant_p.
4422
4423 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
4424
4425         * typeck.c (build_static_cast): Allow enum to enum conversions
4426         as per DR 128.
4427
4428 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
4429
4430         * class.c (check_field_decls): Pointers to member do not a
4431         non-pod struct make, as per DR 148.
4432
4433 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
4434
4435         * call.c (joust): cp_pedwarn when using gnu extension concerning
4436         worst conversion sequences.
4437
4438 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
4439
4440         * decl.c: Replace all uses of 'boolean' with 'bool'.
4441
4442 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
4443
4444         * lang-specs.h: Add zero initializer for cpp_spec field to
4445         all array elements that need one.  Don't put an #ifdef inside
4446         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
4447         use it.
4448
4449 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
4450
4451         Implement using decls inside template functions.
4452         * decl2.c (validate_nonmember_using_decl): Don't special case
4453         fake_std_node in the global namespace. Don't reject early when
4454         processing a template.
4455         (do_local_using_decl): Add to statement tree. Don't do further
4456         processing when building a template.
4457         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
4458
4459 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
4460
4461         * decl2.c (do_nonmember_using_decl): Don't complain if we find
4462         same function. Do complain about ambiguating extern "C"
4463         declarations.
4464
4465 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
4466
4467         Remove floating point and complex type template constant parms.
4468         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
4469         COMPLEX_TYPE extensions.
4470         (invalid_nontype_parm_type_p): Likewise.
4471
4472 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
4473
4474         * except.c (call_eh_info): Revert "match_function"'s type.
4475
4476 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
4477
4478         Fix ctor vtable vcall offsets.
4479         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
4480         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
4481         (get_matching_base): Remove.
4482         (get_original_base): New function.
4483         (build_vtbl_initializer): Initialize vid.rtti_binfo.
4484         Use a virtual thunk for a ctor vtable with an index
4485         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
4486         primary base within a constructor vtable. Only set
4487         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
4488         when primary base has been lost.
4489         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
4490
4491 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
4492
4493         * call.c (joust): Ensure more_specialized()'s argument length
4494         parameter has correct value for constructors.
4495
4496 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
4497
4498         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
4499
4500         * decl.c (mark_inlined_fns): Prototype.
4501
4502 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
4503
4504         * spew.c (yylex): Correct handling of friends.
4505
4506 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
4507
4508         * mangle.c (write_encoding): Pass write_function_type the
4509         FUNCTION_DECL for the function being encoded.
4510         (write_function_type): Pass it along to write_bare_function_type.
4511         (write_bare_function_type): Pass it along to write_method_parms.
4512         (write_method_parms): Don't mangle the compiler-generated
4513         parameters to a constructor or destructor.
4514
4515 2001-02-22  Andreas Jaeger  <aj@suse.de>
4516
4517         * optimize.c: Include toplev.h for
4518         note_deferral_of_defined_inline_function prototype.
4519
4520 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
4521
4522         * cp-tree.h (struct lang_decl_inlined_fns): New.
4523         (struct lang_decls): Add inlined_fns.
4524         (DECL_INLINED_FNS): New macro.
4525         * optimize.c (struct inline_data): Add inlined_fns.
4526         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
4527         (inlinable_function_p): Likewise, fix typo in comment,
4528         function is not inlinable if it already inlined function currently
4529         being optimized.
4530         (expand_call_inline): Add fn to inlined_fns if necessary.
4531         (optimize_function): Initialize inlined_fns.
4532         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
4533         * decl.c (mark_inlined_fns): New function.
4534         (lang_mark_tree): Call it.
4535
4536 2001-02-21  Jason Merrill  <jason@redhat.com>
4537
4538         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
4539         (DECL_UNINLINABLE): Move to middle-end.
4540
4541         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
4542         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
4543         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
4544         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
4545         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
4546
4547         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
4548         second parm of op=.
4549
4550 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
4551
4552         * decl2.c (set_decl_namespace): Allow explicit instantiations in
4553         any namespace.
4554
4555 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4556
4557         * optimize.c (expand_call_inline): Don't walk subtrees of type
4558         nodes.
4559
4560 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
4561
4562         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
4563         for a destructor.
4564
4565 2001-02-18  Jason Merrill  <jason@redhat.com>
4566
4567         Do put the VTT parameter in DECL_ARGUMENTS.
4568         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
4569         (current_vtt_parm): New macro.
4570         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
4571         (DECL_HAS_VTT_PARM_P): New macro.
4572         (DECL_VTT_PARM): Remove.
4573         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
4574         * decl.c (duplicate_decls): Only copy the operator code if
4575         appropriate.
4576         (start_function): Set current_vtt_parm.
4577         (lang_mark_tree): Don't mark vtt_parm.
4578         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
4579         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
4580         * class.c (build_clone): Maybe remove the VTT parm.
4581         * optimize.c (maybe_clone_body): Set up the VTT parm.
4582         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
4583         * call.c (build_over_call): Just allow the VTT arg.
4584         * method.c (make_thunk): Don't set DECL_VTT_PARM.
4585         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
4586         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
4587         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
4588         * error.c (dump_function_decl): Likewise.
4589         * call.c (build_user_type_conversion_1, convert_like_real): Abort
4590         if we try to call a constructor with in-charge or VTT parms.
4591         * method.c (skip_artificial_parms_for): New fn.
4592         * call.c (add_function_candidate, build_over_call): Call it.
4593         * call.c (build_new_method_call): Use current_vtt_parm.
4594         * init.c (expand_virtual_init): Likewise.
4595         * class.c (same_signature_p): No longer static.
4596         * cp-tree.h: Declare it.
4597         * search.c (look_for_overrides_r): Use it.
4598
4599 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
4600
4601         * cp-tree.h (new_abi_rtti_p): Remove.
4602         (name_mangling_version): Likewise.
4603         (flag_do_squangling): Likewise.
4604         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
4605         * decl.c (grokfndecl): Likewise.
4606         * decl2.c (name_mangling_version): Remove.
4607         (flag_do_squangling): Likewise.
4608         (lang_f_options): Remove `squangle'.
4609         (unsupported_options): Add `squangle'.
4610         (cxx_decode_option): Issue a warning about uses of
4611         -fname-mangling-version.
4612         (finish_file): Remove old ABI support.
4613         * pt.c (check_explicit_specialization): Likewise.
4614         (tsubst_decl): Likewise.
4615         * rtti.c (init_rtti_processing): Likewise.
4616         (build_headof): Likewise.
4617         (get_tinfo_decl_dynamic): Likewise.
4618         (tinfo_from_decl): Likewise.
4619         (build_dynamic_cast_1): Likewise.
4620         (synthesize_tinfo_var): Likewise.
4621         * init.c (build_new): Allow enumeration types for the array-bounds
4622         in a direct-new-declarator.
4623
4624         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
4625
4626         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
4627         TREE_PROTECTED from the template being specialized.
4628
4629 2001-02-17  Jason Merrill  <jason@redhat.com>
4630
4631         * decl2.c (build_artificial_parm): Set TREE_READONLY.
4632
4633         * decl.c (bad_specifiers): Allow throw specs on things with
4634         pointer-to-function or -member-function type.
4635         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
4636         a pmf.
4637
4638 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
4639
4640         * call.c (check_dtor_name): Handle template names correctly.
4641
4642 2001-02-16  Jason Merrill  <jason@redhat.com>
4643
4644         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
4645         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
4646         * optimize.c (maybe_clone_body): Don't substitute it.
4647         * call.c (build_new_method_call): Check in_chrg instead.
4648         * init.c (expand_virtual_init): Likewise.
4649
4650 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
4651
4652         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
4653         class-type introduces at least a type-name.
4654
4655 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
4656
4657         * call.c (convert_like_real): Create a temporary for non-lvalue.
4658
4659 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
4660
4661         * cp-tree.h: Fix typos in comments.
4662
4663 2001-02-16  Jason Merrill  <jason@redhat.com>
4664
4665         * optimize.c (remap_block): If we're compiling a clone, pass the
4666         new block to insert_block.
4667
4668 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
4669
4670         * semantics.c (finish_asm_stmt): Robustify.
4671
4672 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
4673
4674         * pt.c (push_template_decl_real): Don't remangle the name of a
4675         class template.
4676
4677 2001-02-15  Jim Meyering  <meyering@lucent.com>
4678
4679         * Make-lang.in (c++.install-common): Depend on installdirs.
4680         (c++.install-info): Likewise.
4681         (c++.install-man): Likewise.
4682
4683 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
4684
4685         * typeck2.c (build_m_component_ref): Robustify.
4686
4687 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
4688
4689         * friend.c (do_friend): Don't take the nested [template] class
4690         into account when deciding whether to warn about the friend
4691         function not referring to a template function.
4692
4693 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
4694
4695         * typeck.c (build_unary_op): Clarify error message.
4696
4697 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
4698
4699         * parse.y (component_constructor_declarator): allow optional
4700         parentheses around constructor class name.
4701
4702 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
4703
4704         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
4705         section.
4706         * init.c (emit_base_init): Remove incorrect comment about
4707         virtual bases.
4708         * method.c (make_thunk): Fix comment alignment.
4709
4710 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
4711
4712         Kill remnants of this is variable.
4713         * cp-tree.h (flag_this_is_variable): Remove.
4714         * decl2.c (flag_this_is_variable): Remove.
4715         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
4716         (build_vbase_path): The path is non-static, even in a cdtor.
4717         (resolves_to_fixed_type_p): Add additional return value.
4718         * search.c (init_vbase_pointers): Adjust.
4719         * tree.c (lvalue_p_1): Adjust.
4720         * typeck.c (mark_addressable): Adjust.
4721
4722 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
4723
4724         * pt.c (unify): Don't check cv quals of array types.
4725
4726 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
4727
4728         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
4729         check whether we already have the type.
4730
4731 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
4732
4733         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
4734         * call.c (build_op_delete_call): Simplify to remove duplicate
4735         code.
4736         * class.c (clone_function_decl): Don't build the deleting variant
4737         of a non-virtual destructor.
4738         * decl.c (finish_destructor_body): Don't call delete if this is a
4739         non-virtual destructor.
4740         * init.c (build_delete): Explicitly call `operator delete' when
4741         deleting an object with a non-virtual destructor.
4742
4743 2001-02-13  Jason Merrill  <jason@redhat.com>
4744
4745         * lang-specs.h: Add more __EXCEPTIONS.
4746
4747 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
4748
4749         * typeck2.c (process_init_constructor): Check
4750         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
4751
4752 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
4753
4754         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
4755         Remove spurious information in comment. Allow further
4756         adjustments of REFERENCE_TYPE args.
4757
4758 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
4759
4760         * errfn.c (cp_deprecated): Tweak diagnostic text.
4761         * parse.y (new_initializer): Deprecate initializer lists
4762         extension.
4763
4764 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
4765
4766         Remove old ABI support.
4767
4768 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
4769
4770         * decl2.c (flag_vtable_thunks): Always set it to 1.
4771         (flag_new_abi): Likewise.
4772         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
4773
4774         * Makefile.in (g++spec.o): Fix typo.
4775
4776 2001-02-09  Jason Merrill  <jason@redhat.com>
4777
4778         * lang-specs.h: Restore definition of __EXCEPTIONS.
4779
4780 2001-02-08  Jason Merrill  <jason@redhat.com>
4781
4782         * search.c (shared_member_p): New function.
4783         (lookup_field_r): Use it.
4784         * cp-tree.h (SHARED_MEMBER_P): Remove.
4785
4786         * method.c (process_overload_item): Handle template-dependent array
4787         bounds.
4788         * pt.c (type_unification_real): If we end up with undeduced nontype
4789         parms, try again.
4790
4791         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
4792         types.
4793
4794         * typeck2.c (friendly_abort): Don't say anything if we have
4795         earlier errors or sorries.
4796
4797         * decl.c (check_tag_decl): Notice attempts to redefine bool and
4798         wchar_t.  Ignore if in_system_header.
4799
4800         * decl.c (maybe_push_cleanup_level): New fn...
4801         (start_decl_1): ...split out from here.
4802         * cvt.c (build_up_reference): Use it.
4803         * cp-tree.h: Declare it.
4804
4805 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
4806
4807         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
4808         spec.
4809
4810 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
4811
4812         * pt.c (lookup_template_class): Make sure it's a primary
4813         template or template_template_parm when called from the parser.
4814         (instantiate_template_class): Add assertion.
4815
4816 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
4817
4818         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
4819         from error_mark_node.
4820
4821 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
4822
4823         Fix specification and implementation bugs in V3 ABI
4824         construction vtables.
4825         * cp-tree.h (flag_dump_class_layout): New flag.
4826         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
4827         (BINFO_LOST_PRIMARY_P): New flag.
4828         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
4829         (BINFO_PRIMARY_MARKED_P): Rename to ...
4830         (BINFO_PRIMARY_P): ... here.
4831         (binfo_via_virtual): New prototype.
4832         * decl2.c (flag_dump_class_layout): New flag.
4833         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
4834         use `=' as a file name separator.
4835         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
4836         bases.
4837         (build_vtbl_address): If this is a virtual primary base, then
4838         get the vtbl of what it is ultimately primary for.
4839         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
4840         for BINFO_PRIMARY_P.
4841         (dfs_skip_nonprimary_vbases_markedp): Likewise.
4842         (get_shared_vbase_if_not_primary): Likewise.
4843         (dfs_get_pure_virtuals): Likewise.
4844         (expand_upcast_fixups): Likewise.
4845         (fixup_virtual_upcast_offsets): Likewise.
4846         (dfs_find_vbase_instance): Likewise.
4847         (find_vbase_instance): Likewise.
4848         (binfo_from_vbase): Adjust comment to reflect reality.
4849         (binfo_via_virtual): New function.
4850         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
4851         for binfo walking during VTT construction.
4852         (dfs_mark_primary_bases): Remove.
4853         (force_canonical_binfo_r): New function.
4854         (force_canonical_binfo): New function.
4855         (mark_primary_virtual_base): New function.
4856         (mark_primary_bases): Walk in inheritance graph order, use
4857         mark_primary_virtual_base.
4858         (determine_primary_base): Use some more intermediate variables.
4859         (dfs_find_final_overrider): Don't check for overriding along a
4860         virtual path.
4861         (dfs_modify_vtables): Walk into primary virtual bases too.
4862         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
4863         (build_base_fields): Likewise.
4864         (dfs_set_offset_for_unshared_vbases): Likewise.
4865         (layout_virtual_bases): Likewise.
4866         (end_of_class): Likewise.
4867         (finish_struct_1): Call dump_class_hierarchy, if requested.
4868         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
4869         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
4870         (dump_class_hierarchy): Add file parameter. Append to file, if
4871         required.
4872         (finish_vtbls): Adjust accumulate_vtbl_inits call.
4873         Use canonical base for virtual bases.
4874         (build_vtt): Add more comments. Adjust build_vtt_inits call.
4875         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
4876         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
4877         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
4878         virtual VTTs.
4879         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
4880         from DATA.  We want virtual primary bases and all bases via virtual.
4881         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
4882         virtual base when not a construction vtable.
4883         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
4884         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
4885         Use canonical bases when processing virtual bases.
4886         (accumulate_vtbl_inits): We're interested in any base via a
4887         virtual path.
4888         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
4889         within a construction vtable, determine what is being overridden.
4890         (build_vtbl_initializer): Add more comments
4891         (add_vcall_offset_vtbl_entries_1): Adjust comment.
4892         (build_rtti_vtbl_entries): Check if the base has lost its
4893         primary.
4894
4895 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
4896
4897         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
4898
4899 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4900
4901         * decl.c (pushdecl): Call abort instead of fatal.
4902         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
4903         * init.c (build_new_1): Likewise.
4904         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
4905         * decl.c (build_typename_type): hash_table_init now returns void.
4906         decl.c (init_decl_processing): Make an error non-fatal.
4907
4908 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
4909
4910         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
4911         Document.
4912         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
4913         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
4914         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
4915         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
4916         * decl.c (maybe_commonize_var): Use the new name-mangling where
4917         appropriate.
4918         * decl2.c (comdat_linkage): Enhance comments.  Make all
4919         compiler-generated things static, if COMDAT is not available.
4920         (get_tinfo_decl): Do not make typeinfo objects that belong in the
4921         library COMDAT.
4922         (tinfo_base_init): Use the correct mangled name for typeinfo
4923         strings, and push them into the global scope.
4924         (typeinfo_in_lib_p): New function.
4925         (synthesize_tinfo_var): Use it.
4926         (create_real_tinfo_var): Likewise.
4927
4928 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
4929
4930         * decl.c (push_class_binding): Use context_for_name_lookup instead
4931         of CP_DECL_CONTEXT.
4932         * search.c (context_for_name_lookup): Remove static.  Check for NULL
4933         context in the loop.
4934         * cp-tree.h (context_for_name_lookup): Add prototype.
4935
4936 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
4937
4938         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
4939         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
4940         Remove.
4941         * call.c (convert_class_to_reference, build_user_type_conversion_1,
4942         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
4943
4944 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
4945
4946         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
4947         of macros used when compiling g++spec.c.
4948         * g++spec.c (lang_specific_driver): Link with the shared
4949         libgcc by default.
4950
4951 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
4952
4953         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
4954         make_reference_declarator, make_call_declarator), method.c
4955         (implicitly_declare_fn), parse.y (namespace_using_decl,
4956         notype_unqualified_id, expr_or_declarator, new_type_id,
4957         after_type_declarator, direct_after_type_declarator,
4958         notype_declarator, complex_notype_declarator,
4959         complex_direct_notype_declarator, qualified_id,
4960         notype_qualified_id, overqualified_id, direct_new_declarator,
4961         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
4962         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
4963         instead of build_parse_node.
4964
4965 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4966
4967         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
4968         (minus_one_node): Moved to top level gcc directory.  Renamed
4969         to integer_minus_one_node.
4970
4971         * init.c (init_init_processing): Don't set minus_one_node.
4972         (build_vec_init): Use integer_minus_one_node.
4973
4974         * rtti.c (get_tinfo_decl_dynamic): Likewise.
4975
4976 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
4977
4978         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
4979         identical and they would be replaced with constant, remove
4980         MODIFY_EXPR from the tree.
4981
4982 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4983
4984         * Make-lang.in: Remove all dependencies on defaults.h.
4985         * call.c: Don't include defaults.h.
4986         * decl.c: Likewise.
4987         * decl2.c: Likewise.
4988         * except.c: Likewise.
4989         * pt.c: Likewise.
4990         * rtti.c: Likewise.
4991         * tree.c: Likewise.
4992         * typeck.c: Likewise.
4993
4994 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
4995
4996         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
4997         operators even in "C" linkage.
4998         * method.c (set_mangled_name_for_decl): Likewise.
4999         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
5000         overloaded operators in "C" linkage.
5001
5002 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
5003
5004         * pt.c (tsubst_decl): Remove IN_DECL parameter.
5005         (tsubst_arg_types): Check parameter is not void.
5006         (tsubst): Adjust tsubst_decl call.
5007
5008 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
5009
5010         * call.c (add_builtin_candidate): Quote std properly, from
5011         previous change.
5012
5013 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5014
5015         * pt.c (check_explicit_specialization): Clone constructors and
5016         destructors.
5017
5018 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
5019
5020         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
5021         indicates anything special about template depth. Make sure we
5022         only count the user visible template classes.
5023
5024 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
5025
5026         * call.c (build_conv): Typo in comment.
5027         (add_builtin_candidate): Add more explanation.
5028         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
5029         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
5030         when we have enumeral types.
5031         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
5032         candidates for relops and eqops.
5033         (joust): Simplify control flow. Allow a non-template user
5034         function to hide a builtin.
5035
5036 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
5037
5038         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
5039         (more_specialized): Add deduction parameter.
5040         * call.c (joust): Adjust more_specialized call.
5041         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
5042         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
5043         (get_bindings_order): Remove.
5044         (get_bindings_real): Add DEDUCE parameter.
5045         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
5046         REFERENCE_TYPE jig for DEDUCE_ORDER.
5047         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
5048         maybe_adjust_types_for_deduction.
5049         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
5050         directly.
5051         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
5052         (check_cv_quals_for_unify): Use new unify qualifier flags.
5053         (unify): Clear new unify qualifier flags.
5054         (get_bindings_real): Add DEDUCE parameter.
5055         (get_bindings): Adjust call to get_bindings_real.
5056         (get_bindings_overload): Likewise.
5057         (most_specialized_instantiation): Adjust call to
5058         more_specialized.
5059
5060 2001-01-19  Jason Merrill  <jason@redhat.com>
5061
5062         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
5063
5064         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
5065         -fnew-abi.
5066
5067 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
5068
5069         * decl2.c (arg_assoc_class): Fix double iteration logic.
5070
5071 2001-01-19  Jason Merrill  <jason@redhat.com>
5072
5073         * init.c (build_delete): Always call convert_force to strip cv-quals.
5074
5075         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
5076         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
5077         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
5078
5079 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
5080
5081         * search.c (get_vbase_1): Count only virtual bases.
5082
5083 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
5084
5085         * class.c (duplicate_tag_error): Robustify flag clearing.
5086
5087 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
5088
5089         * cp-tree.h (lookup_template_class): Add complain parm.
5090         * decl.c (lookup_namespace_name): Adjust call to
5091         lookup_template_class.
5092         (make_typename_type): Likewise.
5093         * semantics.c (finish_template_type): Likewise.
5094         * pt.c (lookup_template_class): Add complain parm. Adjust.
5095         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
5096         (tsubst): Likewise.
5097
5098 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
5099
5100         * pt.c (copy_default_args_to_explicit_spec): Preserve
5101         object's CV quals. Reorganize.
5102
5103 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
5104
5105         * typeck.c (build_modify_expr): Say `initialization' for
5106         INIT_EXPRs.
5107         * init.c (build_default_init): Convert to enumeral type, if
5108         needed.
5109
5110 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
5111
5112         * parse.y (nomods_initdcl0): Properly set things up for
5113         initdcl0_innards.
5114
5115 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
5116
5117         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
5118         (type_unification_real): Set it.
5119         (unify): Use it.
5120
5121 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
5122
5123         * decl.c (finish_destructor_body): Convert to vbase pointer here.
5124
5125 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
5126
5127         * semantics.c (begin_class_definition): Check we're not inside a
5128         template parm list.
5129
5130 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
5131
5132         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
5133         BASELINK_P.
5134
5135 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5136
5137         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
5138         * call.c (build_over_call): Add comment.
5139
5140 2001-01-16 Daniel Berlin <dberlin@redhat.com>
5141
5142         * cvt.c (ocp_convert): Handle vector type conversion
5143         * typeck2.c (digest_init): Handle vector type initializations
5144
5145 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
5146
5147         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
5148           was given.
5149
5150 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
5151
5152         * pt.c (check_nontype_parm): Rename to ...
5153         (invalid_nontype_parm_type_p): ... here.
5154         (process_template_parm): Adjust.
5155         (convert_template_argument): Adjust.
5156
5157 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
5158
5159         * pt.c (check_nontype_parm): New function.
5160         (process_template_parm): Use it.
5161         (convert_template_argument): Use it.
5162         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
5163         member.
5164
5165 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
5166
5167         * tree.c: Add defaults.h
5168         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
5169         * Make-lang.in (cp/tree.o): Add defaults.h.
5170
5171 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
5172
5173         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
5174
5175 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
5176
5177         * g++.1: Change to be ".so man1/gcc.1".
5178
5179 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
5180
5181         * Make-lang.in (c++.info, c++.install-info): Build and install g++
5182         internals info.
5183         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
5184         ($(srcdir)/cp/g++int.info): New target.
5185         * gxxint.texi: Add info directory entry.  Use @@ in email address.
5186         * .cvsignore: Update.
5187
5188 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
5189
5190         * typeck.c (build_c_cast): Do template processing earlier.
5191         Always pedwarn on array casts.
5192
5193 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
5194
5195         * friend.c (make_friend_class): Make sure a templated class is
5196         actually a template.
5197
5198 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
5199
5200         * decl2.c (get_guard): Set linkage from guarded decl.
5201
5202 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
5203
5204         * call.c (convert_default_arg): Check for unprocessed
5205         DEFAULT_ARG.
5206         * cp-tree.h (replace_defarg): Move to spew.c.
5207         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
5208         spew.c, which is where they really are.
5209         (done_pending_defargs): Declare.
5210         (unprocessed_defarg_fn): Declare.
5211         * decl.c (replace_defarg): Move to spew.c
5212         * parse.y (structsp): Call done_pending_defargs.
5213         * spew.c (defarg_fns): Rearrange list structure.
5214         (defarg_fnsdone): New static variable.
5215         (defarg_depfns): New static variable.
5216         (init_spew): Adjust.
5217         (add_defarg_fn): Store the type in TREE_TYPE.
5218         (do_pending_defargs): Detect and deal with ordering constraints
5219         and circularity.
5220         (done_pending_defargs): New function.
5221         (unprocessed_defarg_fn): New function.
5222         (replace_defarg): Moved from decl.c. Robustify. Don't save
5223         if circularity detected.
5224
5225 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
5226
5227         * pt.c (unify): Check array has a domain, before checking
5228         whether it is variable sized.
5229
5230 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
5231
5232         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
5233         parameters with pointers to arrays of unknown bound.
5234
5235 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
5236
5237         * parse.y (template_parm_header, template_spec_header): New
5238         reductions. Split out from ...
5239         (template_header): ... here. Use them.
5240         (template_template_parm): Use template_parm_header.
5241         * semantics.c (finish_template_template_parm): Add assert.
5242
5243 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
5244
5245         * mangle.c (write_builtin_type): Fix thinko.
5246
5247         * pt.c (copy_default_args_to_explicit_spec_1): New function.
5248         (copy_default_args_to_explicit_spec): Likewise.
5249         (check_explicit_specialization): Use it.
5250
5251         * class.c (finish_struct_1):  Remove last argument in call to
5252         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
5253         * decl.c (builtin_function): Likewise.
5254         (build_cp_library_fn): Likewise.
5255         (check_initializer): Likewise.
5256         (make_rtl_for_nonlocal_decl): Likewise.
5257         (cp_finish_decl): Likewise.
5258         (start_function): Likewise.
5259         * decl2.c (finish_anon_union): Likewise.
5260         * friend.c (do_friend): Likewise.
5261         * init.c (build_java_class_ref): Likewise.
5262         * method.c (make_thunk): Likewise.
5263         * pt.c (tsubst_friend_function): Likewise.
5264         * semantics.c (expand_body): Likewise.
5265
5266 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
5267
5268         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
5269         looking at DECL_CLONED_FUNCTION for non-functions.
5270
5271 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
5272
5273         * error.c (dump_template_parameter): Use parm to determine how
5274         to print default value.
5275
5276 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
5277
5278         * class.c (duplicate_tag_error): Clear more flags.
5279
5280 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
5281
5282         * call.c (build_new_method_call): Use binfo_for_vbase.
5283
5284 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
5285
5286         * cp-tree.h (flag_cond_mismatch): Don't declare.
5287         * decl2.c (flag_cond_mismatch): Don't define.
5288         (lang_f_options): Remove cond-mismatch.
5289         (unsupported_options): Add cond-mismatch.
5290
5291 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
5292
5293         * class.c (handle_using_decl): Reject using of constructor name
5294         of sourcing class. Allow injecting of a method with same name as
5295         nested class. Fixup error messages.
5296
5297 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
5298
5299         * decl2.c (lang_decode_option): Handle -Wformat=2.
5300
5301 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
5302
5303         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
5304         initialized_in_class.
5305         (DECL_DEFINED_IN_CLASS_P): Rename to ...
5306         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
5307         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
5308         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
5309         * pt.c (check_default_tmpl_args): Adjust for
5310         DECL_INITIALIZED_IN_CLASS_P.
5311         (instantiate_class_template): Likewise.
5312         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
5313
5314         * class.c (finish_struct): Constify saved_filename.
5315
5316 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
5317
5318         * class.c (duplicate_tag_error): Adjust diagnostic.
5319         (finish_struct): Locally set location to start of struct.
5320         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
5321
5322 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
5323
5324         * decl.c (struct binding_level): Adjust class_shadowed comments
5325         to reflect reality.
5326         (push_class_level_binding): Adjust comments to reflect reality.
5327         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
5328         Don't set TREE_VALUE on the class_shadowed list.
5329
5330 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5331
5332         * decl2.c (acceptable_java_type): Allow references too.
5333         * init.c (build_java_class_ref): When using the new ABI, search
5334         `class$' and have it mangled with `mangle_decl.'
5335         * mangle.c (write_java_integer_type_codes): New function.
5336         (write_builtin_type): Detect and mangle Java integer and real
5337         types.
5338
5339 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
5340
5341         * decl2.c (grokfield): Don't accept `asm' specifiers for
5342         non-static data members.
5343
5344 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5345
5346         * expr.c (cplus_expand_expr): Don't reset `target'.
5347
5348 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
5349
5350         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
5351
5352 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
5353
5354         * parse.y (template_datadef): Check for error_mark_node.
5355
5356 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
5357
5358         * cp-tree.def (DEFAULT_ARG): Make `x' class.
5359
5360 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
5361
5362         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
5363         (record_builtin_type): Make non-static.
5364         (flag_short_double): Don't declare.
5365         (init_decl_processing): Remove the creation of many tree nodes now
5366         in c_common_nodes_and_builtins.
5367         (build_void_list_node): New function.
5368         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
5369         * cp-tree.h (flag_short_wchar): Don't declare.
5370
5371 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
5372
5373         * call.c (build_conv): Don't use build1 for USER_CONV.
5374         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
5375
5376 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
5377
5378         * lex.c (lang_init): Call c_common_lang_init.
5379
5380 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
5381
5382         * search.c (lookup_fnfields_here): Remove.
5383         (look_for_overrides_r): Use lookup_fnfields_1.
5384         Ignore functions from using declarations.
5385
5386 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
5387
5388         Implement exceptions specifiers for implicit member functions.
5389         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
5390         * method.c (synthesize_exception_spec): New function.
5391         (locate_dtor, locate_ctor, locate_copy): New functions.
5392         (implicitly_declare_fn): Generate the exception spec too.
5393         * search.c (check_final_overrider): Check artificial functions
5394         too.
5395         * typeck2.c (merge_exception_specifiers): New function.
5396
5397 2001-01-03  Jason Merrill  <jason@redhat.com>
5398
5399         * init.c (build_default_init): New fn.
5400         (perform_member_init): Split out from here.
5401         (build_new_1): Use it.  Simplify initialization logic.
5402         (build_vec_init): Take an array, rather than a pointer and maxindex.
5403         Speed up simple initializations.  Don't clean up if we're assigning.
5404         * cp-tree.h: Adjust.
5405         * decl2.c (do_static_initialization): Remove TREE_VEC case.
5406         * parse.y (new_initializer): Return void_zero_node for ().
5407         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
5408         * typeck2.c (digest_init): Only complain about user-written
5409         CONSTRUCTORs.
5410
5411 2000-12-22  Mike Stump  <mrs@wrs.com>
5412
5413         * decl2.c: (max_tinst_depth): Increase to 50.
5414
5415 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
5416
5417         * class.c (invalidate_class_lookup_cache): Zero the
5418         previous_class_values.
5419         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
5420         TREE_INT_CST_HIGH.
5421         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
5422         * decl.c (free_bindings): New variable.
5423         (push_binding): Don't create a new binding if we have one on the
5424         free list.
5425         (pop_binding): Put old bindings on the free list.
5426         (init_decl_processing): Use size_int, not build_int_2.
5427         Register free_bindings as a GC root.
5428         (cp_make_fname_decl): Use size_int, not build_int_2.
5429         (push_inline_template_parms_recursive): Likewise.
5430         (end_template_parm_list): Likewise.
5431         (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
5432         (tsubst_template_parms): Use size_int, not build_int_2.
5433         (tsubst): Likewise.
5434         * rtti.c (get_vmi_pseudo_type_info): Likewise.
5435
5436 2001-01-02  Richard Henderson  <rth@redhat.com>
5437
5438         * parse.y (asm): Set ASM_INPUT_P.
5439
5440 2001-01-02  Jason Merrill  <jason@redhat.com>
5441
5442         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
5443         for v3 ABI.
5444
5445         * typeck.c (cp_truthvalue_conversion): New fn.
5446         * cvt.c (ocp_convert): Use it.
5447
5448         * cp-tree.h: Lose c-common.c decls.
5449
5450         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
5451         * cvt.c (convert_to_void): Use type_unknown_p.
5452
5453         * typeck.c (strip_all_pointer_quals): Also strip quals from
5454         pointer-to-member types.
5455
5456         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
5457         parse.y as C.
5458
5459         * call.c (build_new_method_call): Do evaluate the object parameter
5460         when accessing a static member.
5461         * typeck.c (build_component_ref): Likewise.
5462
5463 2001-01-02  Andreas Jaeger  <aj@suse.de>
5464
5465         * decl.c (cp_missing_noreturn_ok_p): New.
5466         (init_decl_processing): Set lang_missing_noreturn_ok_p.
5467
5468 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
5469
5470         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
5471
5472 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
5473
5474         * class.c (pushclass): Remove #if 0'd code.
5475         * cp-tree.h (overload_template_name): Remove.
5476         * decl.c (store_bindings): Simplify.
5477         (pop_from_top_level): Likewise.
5478         * pt.c (overload_template_name): Remove.
5479         (instantiate_decl): Don't call push_to_top_level if it's not
5480         needed.
5481
5482 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
5483
5484         * pt.c (register_local_specialization): Don't return a value.
5485         (lookup_template_class): Use move-to-front heuristic when looking
5486         up template instantiations.
5487         (instantiate_decl): Only push_to_top_level when we're actually
5488         going to instantiate the template.
5489
5490 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
5491
5492         * search.c (binfo_for_vtable): Return least derived class, not
5493         most.  Handle secondary vtables.
5494
5495 2000-12-22  Jason Merrill  <jason@redhat.com>
5496
5497         * pt.c (more_specialized): Don't optimize len==0.
5498         (fn_type_unification): If we're adding the return type, increase len.
5499
5500         * typeck.c (build_binary_op): Fix pmf comparison logic.
5501
5502         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
5503         DECL_STATIC_FUNCTION_P.
5504
5505         * semantics.c (genrtl_finish_function): Don't try to jump to
5506         return_label unless it exists.
5507
5508         In partial ordering for a call, ignore parms for which we don't have
5509         a real argument.
5510         * call.c (joust): Pass len to more_specialized.
5511         (add_template_candidate_real): Strip 'this', pass len.
5512         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
5513         (get_bindings_order): New fn.  Pass len down.
5514         (get_bindings_real): Strip 'this', pass len.
5515         (fn_type_unification): Likewise.
5516         (type_unification_real): Succeed after checking 'len' args.
5517         (most_specialized_instantiation): Lose explicit_args parm.
5518         * class.c (resolve_address_of_overloaded_function): Strip 'this',
5519         pass len.
5520
5521 2000-12-21  Jason Merrill  <jason@redhat.com>
5522
5523         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
5524         DECL_TEMPLATE_RESULT.
5525
5526         * search.c (lookup_field_r): Call lookup_fnfields_1, not
5527         lookup_fnfields_here.
5528
5529         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
5530
5531         * call.c (build_object_call): Also allow conversions that return
5532         reference to pointer to function.
5533         (add_conv_candidate): Handle totype being ref to ptr to fn.
5534         (build_field_call): Also allow members of type reference to function.
5535         Lose support for calling pointer to METHOD_TYPE fields.
5536
5537         * error.c (dump_expr): Handle *_CAST_EXPR.
5538
5539         * typeck2.c (build_scoped_ref): Always convert to the naming class.
5540
5541         * tree.c (break_out_cleanups): Lose.
5542         * cp-tree.h: Remove prototype.
5543         * typeck.c (build_component_ref): Don't break_out_cleanups.
5544         (build_compound_expr): Likewise.
5545         * semantics.c (finish_expr_stmt): Likewise.
5546
5547 2000-12-20  Richard Henderson  <rth@redhat.com>
5548
5549         * cp-tree.h: Update declarations.
5550         * decl.c (finish_case_label): Return the new stmt node.
5551         * semantics.c (finish_goto_stmt): Likewise.
5552         (finish_expr_stmt, finish_return_stmt): Likewise.
5553         (finish_break_stmt, finish_continue_stmt): Likewise.
5554         (finish_asm_stmt): Likewise.
5555         * parse.y (already_scoped_stmt): Set STMT_LINENO.
5556         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
5557         (simple_if, simple_stmt): Return the new stmt node.
5558         (save_lineno): New.
5559
5560 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
5561
5562         * cp-tree.h: Don't declare warn_long_long.
5563
5564 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5565
5566         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
5567         IS_AGGR_TYPE.
5568
5569 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5570
5571         * pt.c (unify): Handle when both ARG and PARM are
5572         BOUND_TEMPLATE_TEMPLATE_PARM.
5573
5574 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5575
5576         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
5577         DECL_TEMPLATE_PARM_P.
5578
5579 2000-12-15  Jason Merrill  <jason@redhat.com>
5580
5581         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
5582
5583         * init.c (build_new_1): Don't strip quals from type.
5584
5585         * decl.c (pushdecl): Don't check for linkage on a non-decl.
5586
5587         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
5588
5589         * call.c (build_new_function_call): Lose space before paren in
5590         error message.
5591         (build_new_method_call): Likewise.
5592
5593         * typeck2.c (build_m_component_ref): Propagate quals from datum.
5594
5595 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5596
5597         * pt.c (check_explicit_specialization): Propagate default
5598         function arguments to explicit specializations.
5599
5600 2000-12-13  DJ Delorie  <dj@redhat.com>
5601
5602         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
5603         and <? operators.
5604
5605 2000-12-08  Jason Merrill  <jason@redhat.com>
5606
5607         * error.c (dump_function_name): Don't let the user see __comp_ctor.
5608
5609         Clean up copy-initialization in overloading code.
5610         * call.c (build_user_type_conversion_1): Die if we are asked to
5611         convert to the same or a base type.
5612         (implicit_conversion): Avoid doing so.  Lose reference binding code.
5613         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
5614         direct-initialization.  Also do direct-init part of copy-init.
5615         (build_user_type_conversion): Don't provide context to convert_like.
5616         * cvt.c (ocp_convert): build_user_type_conversion will now provide
5617         the constructor call for copy-init.
5618
5619         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
5620         instantiation of a member template.
5621         (do_decl_instantiation): Not here.
5622
5623 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
5624
5625         * class.c (check_field_decls): Don't special case anonymous
5626         fields in error messages.
5627         (note_name_declared_in_class): Use %D on diagnostic.
5628
5629         * tree.c (pod_type_p): Use strip_array_types.
5630         (cp_valid_lang_attribute): Likewise.
5631         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
5632         multiple evaluations.
5633         (cp_has_mutable_p): Use strip_array_types.
5634
5635 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
5636
5637         * cp-tree.h (sufficient_parms_p): Declare new function.
5638         * call.c (sufficient_parms_p): New function, broken out of ...
5639         (add_function_candidate): ... here. Use it.
5640         (add_conv_candidate): Use it.
5641         * decl.c (grok_ctor_properties): Use it.
5642
5643 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
5644
5645         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
5646
5647 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
5648
5649         * decl2.c (lang_decode_option): Handle -Wformat-security.
5650
5651 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5652
5653         * pt.c (verify_class_unification): New function.
5654         (get_class_bindings): Use it.
5655         (try_class_unification): Tidy.
5656         (unify): Handle when argument of a template-id is not
5657         template parameter dependent.
5658         (template_args_equal): Handle when TREE_CODE's do not match.
5659
5660 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
5661
5662         * lang-specs.h (c++): When invoking the stand-alone preprocessor
5663         for -save-temps, pass all relevant -Defines to it, and then don't
5664         pass them to cc1plus.
5665
5666 2000-12-05  Will Cohen  <wcohen@redhat.com>
5667
5668         * decl.c (finish_case_label): Cleared
5669         more_cleanups_ok in surrounding function scopes.
5670         (define_label): Likewise.
5671
5672 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
5673
5674         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
5675         (get_matching_virtual): Remove.
5676         (look_for_overrides): Declare new function.
5677         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
5678         DECL_VINDEX here.
5679         * class.c (check_for_override): Move base class iteration code
5680         to look_for_overrides.
5681         * search.c (next_baselink): Remove.
5682         (get_virtuals_named_this): Remove.
5683         (get_virtual_destructor): Remove.
5684         (tree_has_any_destructors_p): Remove.
5685         (struct gvnt_info): Remove.
5686         (check_final_overrider): Remove `virtual' from error messages.
5687         (get_matching_virtuals): Remove. Move functionality to ...
5688         (look_for_overrides): ... here, and ...
5689         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
5690         to be overriding.
5691
5692 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
5693
5694         * typeck.c (get_delta_difference): If via a virtual base,
5695         return zero.
5696         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
5697         adjustment.
5698
5699 2000-12-04  Richard Henderson  <rth@redhat.com>
5700
5701         * error.c (dump_tree): Use output_add_string not OB_PUTS.
5702
5703 2000-12-04  Jason Merrill  <jason@redhat.com>
5704
5705         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
5706         (write_builtin_type): Pass intSI_type_node and the like through
5707         type_for_mode.
5708         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
5709         Pass intSI_type_node and the like through type_for_mode.
5710         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
5711         * pt.c (tsubst, unify): Likewise.
5712         * tree.c (walk_tree): Likewise.
5713         * error.c (dump_type): Likewise.
5714         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
5715
5716         * Make-lang.in: Tweak top comment for emacs.
5717         (cp/TAGS): Restore.
5718
5719         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
5720
5721         * class.c (clone_function_decl): Robustify.
5722
5723 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
5724
5725         * decl.c (store_bindings): Only search in the non modified
5726         old_bindings for duplicates.
5727
5728 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
5729
5730         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
5731         TYPE_POLYMORPHIC_P.
5732
5733         * typeck.c (build_static_cast): Remove unused variable.
5734
5735 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5736
5737         * pt.c: Fix typo in comment.
5738
5739 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
5740
5741         * decl2.c (warn_format): Remove definition.
5742         (lang_decode_option): Handle -Wformat-nonliteral,
5743         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
5744
5745 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
5746
5747         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
5748         (init_decl_processing): Don't create string_type_node,
5749         const_string_type_node, wint_type_node, intmax_type_node,
5750         uintmax_type_node, default_function_type, ptrdiff_type_node and
5751         unsigned_ptrdiff_type_node.  Adjust position of call to
5752         c_common_nodes_and_builtins.
5753         (identifier_global_value): New function.
5754
5755 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
5756
5757         * call.c (standard_conversion): Reject pointer to member
5758         conversions from ambiguous, inaccessible or virtual bases.
5759         * typeck.c (build_static_cast): Don't check pointers to members
5760         specially.
5761
5762 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
5763
5764         * method.c (do_build_copy_constructor): Preserve cv
5765         qualifications when accessing source object members.
5766         (do_build_assign_ref): Likewise. Remove separate diagnostics for
5767         unnamed fields.
5768
5769 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
5770
5771         * method.c (do_build_assign_ref): Construct appropriately
5772         CV-qualified base reference. Don't allow const casts in base
5773         conversion.
5774
5775 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
5776
5777         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
5778         incomplete return type.
5779
5780 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
5781
5782         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
5783         * semantics.c (finish_base_specifier): Accept a _TYPE not a
5784         _DECL.
5785
5786 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
5787
5788         * spew.c (yyerror): Cope if yylval.ttype is NULL.
5789
5790 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
5791
5792         * decl.c (grokdeclarator): Diagnose undefined template contexts.
5793
5794 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
5795
5796         * decl.c (grokdeclarator): Do type access control on friend
5797         class.
5798
5799 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
5800
5801         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
5802         bison parser ickiness.
5803         * pt.c (tsubst_friend_function): Enter namespace scope when
5804         tsubsting the function name.
5805         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
5806
5807 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
5808
5809         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
5810         * cvt.c (cp_convert_to_pointer): Add force parameter.
5811         Allow conversions via virtual base if forced.
5812         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
5813         (ocp_convert): Likewise.
5814         * search.c (binfo_from_vbase): Return the virtual base's binfo.
5815         * typeck.c (get_delta_difference): Adjust handling of virtual
5816         bases.
5817
5818 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
5819
5820         * tree.c (struct list_hash): Remove.
5821         (list_hash_table): Make it be an htab.
5822         (struct list_proxy): New type.
5823         (list_hash_eq): New function.
5824         (list_hash_pieces): Renamed from ...
5825         (list_hash): ... this.
5826         (list_hash_lookup): Remove.
5827         (list_hash_add): Remove.
5828         (hash_tree_cons): Use the generic hashtable.
5829         (mark_list_hash): Remove.
5830         (init_tree): Create the hashtable.
5831
5832 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
5833
5834         * method.c (build_mangled_C9x_name): Rename to
5835         build_mangled_C99_name.  Change C9X references in comments to
5836         refer to C99.
5837
5838 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
5839
5840         * parse.y (unary_expr): Move VA_ARG from here ...
5841         (primary): ... to here.
5842
5843 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
5844
5845         * semantics.c (finish_id_expr): If type is error_mark, return
5846         error_mark.
5847
5848 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
5849
5850         * pt.c (lookup_template_class): Simplify loop exit constructs.
5851         Cope when there is no partial instantiation of a template
5852         template member.
5853
5854 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
5855
5856         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
5857
5858 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
5859
5860         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
5861         prefix.
5862
5863         * pt.c (do_decl_instantiate): Explicitly clone constructors and
5864         destructors that haven't already been cloned.
5865
5866 2000-11-20  Richard Henderson  <rth@redhat.com>
5867
5868         * parse.y (yyparse_1): Rename the parser entry point.
5869
5870 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
5871
5872         * mangle.c (write_name): Use <unscoped-name> for names directly in
5873         function scope.
5874         (write_unscoped_name): Accept names directly in function scope.
5875
5876 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
5877
5878         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
5879         * parse.y (extdef): Add EXPORT reduction.
5880         * spew.c (yylex): Don't skip export here.
5881
5882 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
5883
5884         * decl.c (init_decl_processing): Correct name of pure virtual
5885         function under the new ABI.
5886         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
5887         (throw_bad_typeid): Likewise for bad typeid function.
5888
5889 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
5890
5891         * decl.c (grokparms): Don't even function types of `void' type,
5892         either.
5893         * mangle.c (write_type): Don't crash when confronted with the
5894         error_mark_node.
5895
5896         * decl.c (grokparms): Don't create parameters of `void' type.
5897
5898 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
5899
5900         * lex.c (mark_impl_file_chain): Delete.
5901         (init_parse): Remove call to ggc_add_string_root.  No need to
5902         ggc_strdup a string constant.  Do not add impl_file_chain to GC
5903         roots.
5904         (handle_pragma_implementation): No need to ggc_strdup main_filename.
5905
5906 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
5907
5908         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
5909
5910 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
5911
5912         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
5913         * decl.c (grokdeclarator): Don't reject void parms here.
5914         (require_complete_types_for_parms): Simplify, use
5915         complete_type_or_else.
5916         (grokparms): Remove bitrot. Remove funcdef parm.
5917         Deal with ellipsis parm lists here.
5918         * semantics.c (finish_parmlist): Don't append void_list_node
5919         here. Set PARMLIST_ELLIPSIS_P.
5920
5921 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
5922
5923         * typeck2.c (incomplete_type_error): Reorganise to avoid
5924         excessive diagnostics.
5925
5926 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
5927
5928         * lex.c (struct impl_files, internal_filename): Constify a char *.
5929
5930 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
5931
5932         * mangle.c (write_special_name_constructor): Don't generate
5933         assembler junk when confronted with an old-style constructor.
5934         (write_special_name_destructor): Likewise.
5935         (mangle_decl_string): Do it here instead.
5936
5937 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
5938
5939         * call.c (op_error): Make error messages clearer.
5940
5941 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
5942
5943         * decl.c (wrapup_globals_for_namespace): Don't mark things
5944         TREE_ASM_WRITTEN when they're not.
5945
5946 2000-11-15  Jason Merrill  <jason@redhat.com>
5947
5948         * typeck2.c (friendly_abort): Uncount the error before handing
5949         off to fancy_abort.
5950
5951 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
5952
5953         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
5954
5955 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
5956
5957         * class.c (build_vtbl_initializer): Fix typo in comment.
5958         * typeck.c (expr_sizeof): Don't crash on errors.
5959
5960 2000-11-14  Jim Wilson  <wilson@redhat.com>
5961
5962         * lang-specs.h: Add %2 after %(cc1_options).
5963
5964 2000-11-14  Richard Henderson  <rth@redhat.com>
5965
5966         * typeck.c (c_sizeof): Be strict about casting result value
5967         back to c_size_type_node.
5968         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
5969
5970 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
5971
5972         * typeck.c (build_unary_op): Use boolean_increment from
5973         c-common.c, moving the relevant code there.
5974
5975 2000-11-11  Jason Merrill  <jason@redhat.com>
5976
5977         * typeck.c (mark_addressable): Don't call put_var_into_stack.
5978
5979         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
5980         in inlines.
5981
5982 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5983
5984         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
5985         * lex.c (copy_lang_decl): Likewise.
5986
5987 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
5988
5989         * dump.c (cp_dump_tree): Don't dump function bodies here.
5990
5991         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
5992         (dump.o): Update dependency list.
5993         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
5994         (flag_dump_translation_unit): Likewise.
5995         (CP_TYPE_QUALS): Adjust definition.
5996         (DECL_C_BIT_FIELD): Remove.
5997         (SET_DECL_C_BIT_FIELD): Likewise.
5998         (CLEAR_DECL_C_BIT_FIELD): Likewise.
5999         (add_maybe_template): Likewise.
6000         (strip_array_types): Likewise.
6001         (dump_node_to_file): Likewise.
6002         (cp_dump_tree): New function.
6003         * decl.c (init_decl_processing): Set lang_dump_tree.
6004         * decl2.c (flag_dump_translation_unit): Remove.
6005         * dump.c: Move most of it to ../c-dump.c.
6006         (cp_dump_tree): New function.
6007         * pt.c (add_maybe_template): Remove.
6008         * typeck.c (strip_array_types): Likewise.
6009
6010 2000-11-07  Eric Christopher  <echristo@redhat.com>
6011
6012         * decl.c (init_decl_processing): Change definition of
6013         __wchar_t to wchar_t.  Remove artificial declaration of
6014         wchar_t.
6015         * lex.c: Change instances of __wchar_t to wchar_t.
6016
6017 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
6018
6019         * lex.c (do_identifier): Don't lookup_name for operators.
6020         * parse.y (operator): Save looking_for_typename.
6021         (unoperator): Restore it.
6022         * spew.c (frob_opname): Use nth_token for lookahead.
6023
6024 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
6025
6026         * decl.c (grok_op_properties): Always use coerce_new_type and
6027         coerce_delete_type.
6028         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
6029         exception specification. Tidy up.
6030         (coerce_delete_type): Preserve exception specification. Tidy up.
6031
6032 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
6033
6034         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
6035         (push_binding_level), error.c (cp_tree_printer), pt.c
6036         (process_partial_specialization, tsubst_template_arg_vector),
6037         search.c (lookup_member): Use memset () instead of bzero ().
6038
6039 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
6040
6041         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
6042
6043 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
6044
6045         * Make-lang.in (c++.distdir): Remove.
6046
6047 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
6048
6049         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
6050         declarations from different namespaces to be combined.
6051
6052 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
6053
6054         * decl.c: Include tm_p.h.
6055
6056 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
6057
6058         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
6059
6060 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
6061
6062         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
6063         (build_overload_value), repo.c (open_repo_file), xref.c
6064         (open_xref_file): Use strchr () and strrchr () instead of index ()
6065         and rindex ().
6066
6067 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
6068
6069         * call.c (build_over_call): Call fold on the CALL_EXPR.
6070
6071 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
6072
6073         * error.c (dump_template_decl): Separate template hearders with
6074         space not comma.
6075
6076 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
6077
6078         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
6079         TS_* flags with corresponding TFF_*.  Adjust prototypes of
6080         functions (which used to take a tree_string_flags) to take an int.
6081
6082         * cp-tree.h (enum tree_string_flags): Remove
6083         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
6084         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
6085         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
6086         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
6087         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
6088         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
6089         (type_as_string, decl_as_string, expr_as_string,
6090         context_as_string): Adjust prototype.
6091
6092         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
6093         instead of TS_PLAIN.
6094
6095         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
6096         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
6097         plain `0'.
6098
6099 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
6100
6101         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
6102         (linkage_kind): New enumeration.
6103         (decl_linkage): New function.
6104         * decl2.c (comdat_linkage): Extend comment.
6105         * error.c (dump_function_decl): Print the arguments used to
6106         instantiate a template, even when not printing the type of the
6107         function.
6108         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
6109         not TREE_PUBLIC, to test for external linkage.
6110         * tree.c (decl_linkage): New function.
6111
6112 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
6113
6114         * pt.c (instantiate_decl): Always instantiate static data members
6115         initialized in-class.
6116
6117 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
6118
6119         * Make-lang.in: Move all build rules here from Makefile.in,
6120         adapt to new context.  Wrap all rules that change the current
6121         directory in parentheses.  Expunge all references to $(P).
6122         When one command depends on another and they're run all at
6123         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
6124         all object-file generation rules.  Delete obsolete variables.
6125
6126         * Makefile.in: Delete.
6127         * config-lang.in: Delete outputs= line.
6128
6129 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
6130
6131         * error.c (dump_function_decl): Print no space between
6132         `ptr-operator' the `type-specifier' of the return type.
6133         (dump_type_prefix): Make sure we put space at the appropriate
6134         place.
6135
6136 2000-10-23  Jason Merrill  <jason@redhat.com>
6137
6138         * call.c (equal_functions): Also call decls_match for extern "C" fns.
6139
6140 2000-10-22  Jason Merrill  <jason@redhat.com>
6141
6142         * call.c (build_conditional_expr): Use ocp_convert to force
6143         rvalue conversion.
6144
6145 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
6146
6147         * call.c (standard_conversion): Use RVALUE_CONVs for all
6148         expressions that satisfy lvalue_p, not just those that satisfy
6149         real_lvalue_p.
6150
6151         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
6152
6153         * typeck.c (c_sizeof): Return an expression of `size_t' type,
6154         not one with TYPE_IS_SIZETYPE set.
6155         (dubious_conversion_warnings): Remove special-case code.
6156
6157 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
6158
6159         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
6160         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
6161         (dump_type_prefix): Print vector-of-int as 'int vector'.
6162         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
6163         * tree.c (walk_tree): Handle VECTOR_TYPE.
6164
6165         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
6166
6167 2000-10-21  Jason Merrill  <jason@redhat.com>
6168
6169         * parse.y (operator): Set got_object from got_scope.
6170         Set looking_for_typename.
6171         * decl.c (lookup_name_real): Clear val after setting from_obj.
6172         Reorganize diagnostic.
6173
6174 2000-10-20  Jason Merrill  <jason@redhat.com>
6175
6176         * tree.c (walk_tree): Don't walk into default args.
6177
6178         * error.c (dump_expr): Use host_integerp.
6179
6180 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
6181
6182         * typeck2.c (abstract_virtuals_error): Use "because" instead of
6183         "since" in error message.
6184
6185 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6186
6187         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
6188
6189 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
6190
6191         * decl.c (revert_static_member_fn): Fixed typo.
6192
6193 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
6194
6195         * class.c (subobject_offset_fn): New type.
6196         (dfs_record_base_offsets): Remove.
6197         (record_base_offsets): Likewise.
6198         (dfs_search_base_offsets): Likewise.
6199         (record_subobject_offset): New function.
6200         (check_subobject_offset): Likewise.
6201         (walk_subobject_offsets): Likewise.
6202         (record_subobject_offsets): Likewise.
6203         (layout_conflict_p): Reimplement.
6204         (layout_nonempty_base_or_field): Correct handling of type
6205         conflicts during layout.
6206         (layout_empty_base): Likewise.
6207         (build_base_field): Adjust to handle new representation of empty
6208         base offset table.
6209         (build_base_fields): Likewise.
6210         (layout_virtual_bases): Likewise.
6211         (splay_tree_compare_integer_csts): New function.
6212         (layout_class_type): Use a splay_tree, rather than a varray, to
6213         represent the offsets of empty bases.
6214
6215         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
6216         * decl.c (select_decl): Don't return declarations that are
6217         DECL_ANTICIPATED.
6218
6219 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
6220
6221         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
6222         (fake_std_node): New macro.
6223         * decl.c (in_std): Rename to ...
6224         (in_fake_std): ... this.
6225         (flag_no_builtin): Remove.
6226         (flag_no_nonansi_builtin): Likewise.
6227         (walk_namespaces_r): Use fake_std_node.
6228         (push_namespace): Use std_identifier.
6229         (pop_namespace): Use in_fake_std.
6230         (lookup_name_real): Use fake_std_node.
6231         (init_decl_processing): When -fhonor-std, create the `std'
6232         namespace.  Don't create a dummy fake_std_node in that case.
6233         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
6234         (builtin_function): Put builtins whose names don't begin
6235         with `_' in the std namespace.
6236         * decl2.c (flag_no_builtin): Remove.
6237         (flag_no_nonansi_builtin): Likewise.
6238         (set_decl_namespace): Use fake_std_node.
6239         (validate_nonmember_using_decl): Likewise.
6240         (do_using_directive): Likewise.
6241         (handle_class_head): Likewise.
6242         * dump.c (dequeue_and_dump): Likewise.
6243         * except.c (init_exception_processing): Use std_identifier.
6244         * init.c (build_member_call): Use fake_std_node.
6245         * rtti.c (init_rtti_processing): Use std_identifier.
6246
6247 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
6248
6249         * cp-tree.h (back_end_hook): Remove declaration.
6250         * decl2.c (back_end_hook): Remove definition.
6251
6252         * dump.c (dequeue_and_dump): Dump TREE_USED.
6253
6254 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
6255
6256         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
6257
6258 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
6259
6260         * decl.c (WINT_TYPE): Define.
6261         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
6262         c_size_type_node, signed_size_type_node and wint_type_node.
6263
6264 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
6265
6266         * decl2.c (warn_missing_format_attribute): New variable.
6267         (lang_decode_option): Decode -Wmissing-format-attribute.
6268
6269 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
6270
6271         * typeck.c (qualify_type): Remove.
6272         (composite_pointer_type): Fix handling of conversions to `cv void*'.
6273
6274 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6275
6276         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
6277
6278 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6279
6280         * Makefile.in (parse.c, parse.h): Create atomically.
6281
6282 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
6283
6284         * class.c (current_obstack): Remove.
6285         * decl.c (ggc_p): Remove.
6286         (start_decl): Don't use decl_tree_cons.
6287         (grokdeclarator): Don't use build_decl_list.
6288         (start_function): Don't use decl_tree_cons.
6289         (finish_function): Don't mess with obstacks.
6290         * decl2.c (grok_x_components): Don't use build_decl_list.
6291         * lex.c (make_call_declarator): Don't call decl_tree_cons.
6292         (implicitly_declare_fn): Don't call build_decl_list.
6293         * parse.y (frob_specs): Don't call build_decl_list or
6294         decl_tree_cons.
6295         (expr_or_declarator_intern): Don't call decl_tree_cons.
6296         (primary): Don't call build_decl_list.
6297         (fcast_or_absdcl): Likewise.
6298         (typed_declspecs): Don't call decl_tree_cons.
6299         (reserved_declspecs): Don't call build_decl_list.
6300         (declmods): Likewise.
6301         (reserved_typespecquals): Likewise.
6302         (aggr): Likewise.
6303         (new_type_id): Likewise.
6304         (cv_qualifiers): Likewise.
6305         (after_type_declarator_intern): Likewise.
6306         (notype_declarator_intern): Likewise.
6307         (absdcl_intern): Likewise.
6308         (named_parm): Likewise.
6309         * pt.c (most_specialized_class): Likewise.
6310         * repo.c (temporary_obstack): Make it a structure, not a pointer.
6311         (init_repo): Initialize it.
6312         * search.c (current_obstack): Remove.
6313         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
6314
6315 2000-10-09  Richard Henderson  <rth@cygnus.com>
6316
6317         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
6318         (c++ language support bits for libgcc): Remove.
6319         (c++.clean): Remove cplib2.txt cleanup.
6320         * config-lang.in (headers, lib2funcs): Remove.
6321
6322         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
6323         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
6324         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
6325         * inc/new.h, inc/typeinfo: Remove files.
6326
6327 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
6328
6329         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
6330         defined.
6331         (init_decl_processing): Initialize intmax_type_node and
6332         uintmax_type_node.
6333
6334 2000-10-06  Richard Henderson  <rth@cygnus.com>
6335
6336         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
6337         (original_result_rtx): Remove.
6338         * decl.c (save_function_data): Don't clear x_result_rtx.
6339         (mark_lang_function): Don't mark it either.
6340         * expr.c (fixup_result_decl): Remove.
6341         * semantics.c (genrtl_named_return_value): Frob the return decl
6342         before calling emit_local_var.
6343         (genrtl_finish_function): Don't call fixup_result_decl.
6344         Always emit the jump to return_label.
6345
6346 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
6347
6348         * pt.c (lookup_template_class): Set current access for enum.
6349         (tsubst_enum): Set file & line for enum decl.
6350
6351         * spew.c (yylex): Remove unused variable.
6352
6353 2000-10-05  Richard Henderson  <rth@cygnus.com>
6354
6355         * semantics.c (genrtl_finish_function): Don't init or check
6356         can_reach_end; remove noreturn and return value checks.
6357
6358 2000-10-05  Tom Tromey  <tromey@cygnus.com>
6359
6360         * init.c (build_java_class_ref): Use `build_static_name' with a
6361         suffix, not a prefix, to build the class object's name.
6362
6363 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
6364
6365         * cp-tree.h (access_kind): Fix comment typo.
6366         * decl2.c (grokfield): Fix diagnostic typo.
6367         * semantics.c (finish_template_type): Fix comment typo.
6368         (finish_qualified_object_call_expr): Likewise.
6369
6370 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
6371
6372         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
6373         tsubsting fails.
6374
6375 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
6376
6377         * spew.c (frob_id): New static function.
6378         (frob_opname): Use it.
6379         (yylex): Use it.
6380
6381 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
6382
6383         * decl.c (lang_mark_false_label_stack): Remove.
6384         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
6385
6386 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
6387
6388         * gxxint.texi: Use @email for formatting email addresses.
6389
6390 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
6391
6392         * error.c: Remove direct obstack manipulation.  Replace with
6393         output_buffer-based formatting.  Adjust calls to removed macros.
6394         (obstack_chunk_alloc, obstack_chunk_free): Remove.
6395         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
6396         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
6397
6398 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
6399
6400         * ir.texi: Move to ../c-tree.texi.
6401
6402 2000-09-20  Jason Merrill  <jason@redhat.com>
6403
6404         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
6405
6406 2000-09-21  Andreas Jaeger  <aj@suse.de>
6407
6408         * errfn.c: Move declaration of cp_printer and cp_printers to ...
6409         * cp-tree.h: ... here.
6410
6411         * error.c: Remove declaration of cp_printer.
6412
6413 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
6414
6415         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
6416
6417 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
6418
6419         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
6420         users.
6421
6422 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
6423
6424         * decl.c (start_function): Robustify.
6425
6426 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6427
6428         * cp-tree.h (check_function_format): Accept a `status' parameter.
6429
6430         * call.c, typeck.c: Updates calls to `check_function_format'.
6431
6432 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
6433
6434         * decl2.c (handle_class_head): Always push some scope even
6435         in the error case.
6436
6437 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
6438
6439         * cp-tree.h (struct cp_language_function): Remove
6440         x_scope_stmt_stack and name_declared.
6441         (current_scope_stmt_stack): Remove.
6442         (function_name_declared_p): New macro.
6443         (struct lang_decl_flags): Use c_lang_decl as a base class.
6444         (context): Remove.
6445         (struct lang_decl): Replace saved_tree with context.
6446         (DECL_FRIEND_CONTEXT): Adjust accordingly.
6447         (SET_DECL_FRIEND_CONTEXT): Likewise.
6448         (DECL_VIRTUAL_CONTEXT): Likewise.
6449         (DECL_SAVED_TREE): Remove.
6450         (C_DECLARED_LABEL_FLAG): Likewise.
6451         (cplus_expand_expr_stmt): Don't declare.
6452         (add_decl_stmt): Likewise.
6453         (add_scope_stmt): Likewise.
6454         * decl.c (mark_stmt_tree): Remove.
6455         (case_compare): Likewise.
6456         (finish_case_label): Use c_add_case_label.
6457         (init_decl_processing): Set more language-specific hooks.
6458         (build_enumerator): Fix typo in comment.
6459         (cplus_expand_expr_stmt): Remove.
6460         (mark_lang_function): Use mark_c_language_function.
6461         (lang_mark_tree): Use c_mark_lang_decl.
6462         * decl2.c: Change order of inclusion.
6463         * except.c: Likewise.
6464         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
6465         back on c_expand_expr.
6466         * friend.c: Include expr.h.
6467         * init.c: Change order of inclusion.
6468         * Makefile.in: Update dependencies.
6469         * lex.h (free_lang_decl_chain): Remove.
6470         * optimize.c (maybe_clone_body): Use function_name_declared_p.
6471         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
6472         it doesn't exist.
6473         (instantiate_decl): Use function_name_declared_p.
6474         * semantics.c (lang_expand_expr_stmt): Remove.
6475         (set_current_function_name_declared): Likewise.
6476         (current_function_name_declared): Likewise.
6477         (begin_compound_stmt): Use function_name_declared_p.
6478         (add_decl_stmt): Remove.
6479         (setup_vtbl_ptr): Use function_name_declared_p.
6480         (add_scope_stmt): Remove.
6481         (current_scope_stmt_stack): New function.
6482         (cp_expand_stmt): Don't handle SCOPE_STMTs.
6483         (expand_body): Use function_name_declared_p.
6484         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
6485         * typeck.c: Change order of includes.
6486         (convert_sequence): Remove.
6487
6488 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
6489
6490         * lex.c (reswords): Add _Complex.
6491
6492 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6493
6494         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
6495
6496 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
6497
6498         * init.c (begin_init_stmts): Don't use // comments.
6499
6500 2000-09-12  Jason Merrill  <jason@redhat.com>
6501
6502         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
6503         all non-extern arrays.
6504
6505         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
6506         typenames, too.  Downgrade complaint to pedwarn.
6507         (xref_tag): Warn about surprising behavior of 'friend struct T'.
6508         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
6509         'class This::Inherited'.
6510
6511 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
6512
6513         * decl.c (finish_case_label): Given the LABEL_DECL a
6514         DECL_CONTEXT.
6515
6516 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
6517
6518         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
6519         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
6520         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
6521         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
6522         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
6523         New macros.
6524         (sorry_for_unsupported_tree, print_scope_operator,
6525         print_left_paren, print_right_paren, print_left_bracket,
6526         print_right_bracket, print_whitespace): Likewise.
6527         (aggr_variety): Rename to class_key_or_enum.
6528         (print_type): Rename to print_type_id.
6529         (print_type_specifier_seq, print_simple_type_specifier,
6530         print_elaborated_type_specifier,
6531         print_rest_of_abstract_declarator,
6532         print_parameter_declaration_clause, print_exception_specification,
6533         print_nested_name_specifier, print_template_id,
6534         typedef_original_name,  print_template_argument_list_start,
6535         print_template_argument_list_end): New functions.
6536
6537 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
6538
6539         * ir.texi: Add more documentation.
6540
6541 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
6542
6543         * cp-tree.h (struct saved_scope): Remove x_function_parms.
6544         (current_function_parms): Don't define.
6545         (struct cp_language_function): Remove parms_stored.
6546         (current_function_just_assigned_this): Don't define.
6547         (current_function_parms_stored): Likewise.
6548         (static_ctors): Declare.
6549         (static_dtors): Likewise.
6550         (SF_EXPAND): Don't define.
6551         (expand_start_early_try_stmts): Remove declaration.
6552         (store_parm_decls): Likewise.
6553         * decl.c (static_ctors): Don't declare.
6554         (static_dtors): Likewise.
6555         (struct binding_level): Remove this_block.
6556         (poplevel): Remove dead code.
6557         (set_block): Likewise.
6558         (mark_binding_level): Don't mark this_block.
6559         (mark_saved_scope): Don't mark x_function_parms.
6560         (init_decl_processing): Don't add current_function_parms as a GC
6561         root.
6562         (check_function_type): Change prototype.
6563         (start_function): Remove RTL-generation code.
6564         (expand_start_early_try_stmts): Remove.
6565         (store_parm_decls): Give it internal linkage.  Remove
6566         RTL-generation code.
6567         (finish_function): Remove RTL-generation code.
6568         * decl2.c (static_ctors): Fix formatting.
6569         (static_dtors): Likewise.
6570         * method.c (use_thunk): Don't call store_parm_decls.
6571         (synthesize_method): Likewise.
6572         * optimize.c (maybe_clone_body): Likewise.
6573         * parse.y (fn.def2): Likewise.
6574         (.set_base_init): Likewise.
6575         (nodecls): Likewise.
6576         * pt.c (instantiate_decl): Likewise.
6577         * rtti.c (synthesize_tinfo_fn): Likewise.
6578         * semantics.c (genrtl_try_block): Simplify.
6579         (expand_body): Use genrtl_start_function and
6580         genrtl_finish_function.
6581         (genrtl_start_function): New function.
6582         (genrtl_finish_function): Likewise.
6583
6584 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
6585
6586         * error.c (cp_tree_printer, case 'P'): Append break.
6587
6588 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
6589
6590         * cp-tree.h (frob_opname): Declare.
6591         * parse.y (saved_scopes): New static variable.
6592         (cp_parse_init): Adjust.
6593         (do_id): If lastiddecl is NULL, do do_identifier.
6594         (operator): Save scope information.
6595         (unoperator): New reduction. Restore scope information.
6596         (operator_name): Append unoperator. Call frob_opname.
6597         * spew.c (frob_opname): Define.
6598
6599 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
6600
6601         * decl.c, rtti.c: Include defaults.h if not already included.
6602         Don't define the *_TYPE_SIZE macros.
6603
6604 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
6605
6606         * cp-tree.h (push_switch): Change prototype.
6607         (check_cp_case_value): Remove declaration.
6608         (decl_constant_value): Likewise.
6609         * decl.c (struct cp_switch): Add switch_stmt and cases.
6610         (case_compare): New function.
6611         (push_switch): Set switch_stmt.  Initialize cases.
6612         (pop_switch): Clean up cases.
6613         (define_case_label): Rename to ...
6614         (finish_case_label): ... this.  Do semantic analysis for case
6615         labels here.
6616         (start_function): Correct comment.
6617         * decl2.c (check_cp_case_value): Remove.
6618         * expr.c (do_case): Remove.
6619         * pt.c (tsubst_expr): Adjust call to finish_case_label.
6620         * semantics.c (genrtl_do_poplevel): Remove declaration.
6621         (RECHAIN_STMTS): Remove.
6622         (finish_break_stmt): Use build_break_stmt.
6623         (finish_continue_stmt): Use build_continue_stmt.
6624         (finish_switch_cond): Adjust condition here, rater than in
6625         c_expand_start_case.
6626         (finish_case_label): Remove.
6627         * typeck.c (c_expand_return): Remove.
6628         (c_expand_start_case): Likewise.
6629
6630 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
6631
6632         * ir.texi: Document type nodes.
6633
6634 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
6635
6636         * cp-tree.h (init_cp_semantics): Declare.
6637         (genrtl_try_block): Don't declare.
6638         (genrtl_handler): Likewise.
6639         (genrtl_catch_block): Likewise.
6640         (genrtl_ctor_stmt): Likewise.
6641         (genrtl_subobject): Likewise.
6642         (genrtl_do_poplevel): Likewise.
6643         (genrtl_named_return_value): Likewise.
6644         * lex.c (init_parse): Call init_cp_semantics.
6645         * semantics.c (genrtl_try_block): Give it internal linkage.
6646         (genrtl_handler): Likewise.
6647         (genrtl_catch_block): Likewise.
6648         (genrtl_ctor_stmt): Likewise.
6649         (genrtl_subobject): Likewise.
6650         (genrtl_do_poplevel): Likewise.
6651         (genrtl_named_return_value): Likewise.
6652         (lang_expand_stmt): Rename to ...
6653         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
6654         (init_cp_semantics): Define.
6655
6656         * decl.c (initialize_local_var): Remove RTL-generating code.
6657         * semantics.c (genrtl_try_block): Fix formatting.
6658
6659         Move statement-tree facilities from C++ to C front-end.
6660         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
6661         (void_zero_node): Remove.
6662         (stmt_tree): Likewise.
6663         (scope_chain): Adjust.
6664         (language_function): Rename to cp_language_function.
6665         (cp_function_chain): Adjust.
6666         (current_stmt_tree): Remove.
6667         (last_tree): Likewise.
6668         (last_expr_type): Likewise.
6669         (struct lang_decl): Adjust.
6670         (STMT_IS_FULL_EXPR_P): Remove.
6671         (add_tree): Remove.
6672         (begin_stmt_tree): Likewise.
6673         (finish_stmt_tree): Likewise.
6674         (walk_tree_fn): Likewise.
6675         (walk_stmt_tree): Likewise.
6676         * class.c (finish_struct): Replace use of add_tree with add_stmt.
6677         * decl.c (mark_stmt_tree): Adjust type.
6678         (init_decl_processing): Don't build void_zero_node.
6679         (initialize_local_var): Adjust usage of current_stmt_tree.
6680         (finish_enum): Use add_stmt, not add_tree.
6681         (save_function_data): Adjust use of language_function.
6682         (finish_constructor_body): Use add_stmt, not add_tree.
6683         (finish_destructor_body): Likewise.
6684         (push_cp_function_context): Adjust use of language_function.
6685         (pop_cp_function_context): Likewise.
6686         (mark_lang_function): Likewise.
6687         (mark_cp_function_context): Likewise.
6688         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
6689         (build_vec_init): Likewise.
6690         * semantics.c (SET_LAST_STMT): Remove.
6691         (RECHAIN_STMTS): Don't use it.
6692         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
6693         (current_stmt_tree): Define.
6694         (add_tree): Remove.
6695         (finish_goto_stmt): Use add_stmt, not add_tree.
6696         (finish_expr_stmt): Likewise.
6697         (begin_if_stmt): Likewise.
6698         (finish_then_clause): Likewise.
6699         (begin_while_stmt): Likewise.
6700         (begin_do_stmt): Likewise.
6701         (finish_return_stmt): Likewise.
6702         (begin_for_stmt): Likewise.
6703         (finish_break_stmt): Likewise.
6704         (finish_continue_stmt): Likewise.
6705         (begin_switch_stmt): Likewise.
6706         (finish_case_label): Likewise.
6707         (begin_try_block): Likewise.
6708         (begin_function_try_block): Likewise.
6709         (begin_handler): Likewise.
6710         (begin_catch_block): Likewise.
6711         (begin_compound_stmt): Likewise.
6712         (begin_asm_stmt): Likewise.
6713         (finish_asm_stmt): Likewise.
6714         (finish_label_stmt): Likewise.
6715         (add_decl_stmt): Likewise.
6716         (finish_subobject): Likewise.
6717         (finish_decl_cleanup): Likewise.
6718         (finish_named_return_value): Likewise.
6719         (setup_vtbl_ptr): Likewise.
6720         (add_scope_stmt): Likewise.
6721         (finish_stmt_expr): Likewise.
6722         (prune_unused_decls): Remove.
6723         (begin_stmt_tree): Likewise.
6724         (finish_stmt_tree): Likewise.
6725         (prep_stmt): Adjust use of current_stmt_tree.
6726         (lang_expand_stmt): Likewise.
6727         * tree.c (statement_code_p): Remove.
6728         (cp_statement_code_p): New function.
6729         (walk_stmt_tree): Remove.
6730         (init_tree): Set lang_statement_code_p.
6731
6732 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
6733
6734         Integrated preprocessor.
6735
6736         * Make-lang.in, Makefile.in: Remove all references to input.c,
6737         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
6738         * gxx.gperf, hash.h, input.c: Delete.
6739         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
6740         initialized properly.
6741
6742         * class.c (fixup_pending_inline): Take a tree, not a
6743         struct pending_inline *.  All callers changed.
6744         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
6745         RID_PROTECTED entries in ridpointers[] array here.
6746         * decl.c (duplicate_decls): Do not refer to struct
6747         pending_inline.
6748         (record_builtin_type, init_decl_processing): Use RID_MAX not
6749         CP_RID_MAX.
6750         (grokdeclarator): Use C_IS_RESERVED_WORD.
6751         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
6752         cpplib.
6753         (grok_x_components): Do not inspect pending_inlines chain.
6754
6755         * cp-tree.h (struct lang_identifier): Add rid_code entry.
6756         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
6757         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
6758         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
6759         TIME_IDENTIFIER_FILEINFO): Kill.
6760         Update prototypes.
6761         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
6762         single 32-bit word.
6763         * parse.y: Call do_pending_inlines unconditionally.
6764         reinit_parse_for_method is now snarf_method.  fn.defpen is no
6765         longer necessary.  Remove unnecessary <itype> annotation on
6766         SCOPE.  Do not refer to end_of_file or struct pending_inline.
6767         * semantics.c (begin_inline_definitions): Call
6768         do_pending_inlines unconditionally.
6769
6770         * lex.c: Remove all code now shared with C front end.
6771         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
6772         into the get_identifier table.  Rewrite pragma handling to
6773         work with the registry.  Move code to save tokens for later
6774         processing to spew.c.
6775
6776         * spew.c: Rewrite everything in terms of token streams instead
6777         of text.  Move routines here from lex.c / input.c as
6778         appropriate.  GC-mark trees hanging off the pending inlines
6779         chain.
6780
6781 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
6782
6783         * NEWS: Mention that the named return value extension has been
6784         deprecated.
6785         * cp-tree.h (original_result_rtx): Define.
6786         (TREE_REFERENCE_EXPR): Remove.
6787         (DECL_VPARENT): Likewise.
6788         (pushdecl_nonclass_level): Likewise.
6789         (store_return_init): Likewise.
6790         (reinit_lang_specific): Likewise.
6791         (genrtl_named_return_value): Change prototype.
6792         * decl.c (original_result_rtx): Remove.
6793         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
6794         Do not generate RTL for local variables here.
6795         (store_return_init): Remove.
6796         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
6797         store_return_init.
6798         (finish_named_return_value): Adjust accordingly.  Warn that this
6799         extension is deprecated.
6800         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
6801
6802 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6803
6804         * pt.c (type_unification_real): Replace switch with if.
6805         (unify): Tsubst non-type parms before comparing.
6806
6807 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6808
6809         * error.c (dump_typename): New function, broken out of ...
6810         (dump_type): ... here. Use it.
6811         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
6812
6813 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6814
6815         * init.c (build_offset_ref): Deal with namespace scoped
6816         TEMPLATE_ID_EXPRs.
6817
6818 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6819
6820         * class.c (resolve_address_of_overloaded_function): Add
6821         explanation message.
6822         * decl.c (define_case_label): Reformat explanation.
6823         * decl2.c (finish_static_data_member_decl): Likewise.
6824         (grokfield): Likewise.
6825         * friend.c (do_friend): Likewise.
6826
6827 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
6828
6829         * tree.c (walk_tree): Expose tail recursion.
6830         (walk_stmt_tree): New function.
6831         * cp-tree.h: Prototype walk_stmt_tree.
6832         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
6833         the BLOCKs directly.  If a BLOCK has no variables after
6834         pruning, discard it.
6835         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
6836         restore the line number.
6837
6838 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
6839
6840         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
6841         (pt.o): Remove dependency on HTAB_H.
6842         * cp-tree.h: Include hashtab.h.
6843         (walk_tree): Change prototype.
6844         (walk_tree_without_duplicates): New function.
6845         * decl.c (check_default_argument): Use it.
6846         * optimize.c (remap_decl): Adjust calls to walk_tree.
6847         (copy_body): Likewise.
6848         (expand_calls_inline): Likewise.
6849         (calls_setjmp_p): Use walk_tree_without_duplicates.
6850         * pt.c: Don't include hashtab.h.
6851         (for_each_template_parm): Use walk_tree_without_duplicates.
6852         * semantics.c (finish-stmt_tree): Likewise.
6853         (expand_body): Likewise.
6854         * tree.c (walk_tree): Add additional parameter.
6855         (walk_tree_without_duplicates): New function.
6856         (count_trees): Use it.
6857         (verify_stmt_tree): Adjust call to walk_tree.
6858         (find_tree): Use walk_tree_without_duplicates.
6859         (no_linkage_check): Likewise.
6860         (break_out_target_exprs): Adjust call to walk_tree.
6861         (cp_unsave): Likewise.
6862
6863 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6864
6865         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
6866         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
6867         * cp-tree.h (TYPE_BINFO): Adjust comment.
6868         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
6869         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
6870         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
6871         (TYPE_TEMPLATE_INFO): Likewise.
6872         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
6873         * class.c (push_nested_class): Likewise.
6874         * decl.c (lookup_name_real): Likewise.
6875         (grokdeclarator): Likewise.
6876         (grok_op_properties): Likewise.
6877         (xref_tag): Likewise.
6878         (xref_basetypes): Likewise.
6879         * decl2.c (constructor_name_full): Likewise.
6880         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
6881         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
6882         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
6883         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6884         (dump_type_suffix): Likewise.
6885         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
6886         instead.
6887         (get_aggr_from_typedef): Likewise.
6888         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
6889         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6890         (write_template_parm): Likewise.
6891         (write_template_template_parm): Check tree code instead of
6892         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6893         * method.c (build_overload_nested_name): Add
6894         BOUND_TEMPLATE_TEMPLATE_PARM.
6895         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
6896         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6897         * pt.c (convert_template_argument): Check tree code instead of
6898         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6899         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
6900         (for_each_template_parm): Adjust comment.
6901         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
6902         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6903         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
6904         template_args_equal to compare template template parameter cases.
6905         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6906         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
6907         instead.
6908         * tree.c (copy_template_template_parm): Decide whether to create
6909         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
6910         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6911         (copy_tree_r): Likewise.
6912         * typeck.c (comptypes): Likewise.  Check tree code instead of
6913         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6914
6915 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
6916
6917         * decl.c (finish_function): Move the code for handling functions
6918         marked with the constructor and destructor attributes inside the
6919         expand_p block.
6920
6921 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
6922
6923         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
6924
6925 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
6926
6927         * pt.c (lookup_template_class): Remove abort.
6928         * tree.c (get_type_decl): Allow error_mark_node.
6929
6930 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
6931
6932         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
6933         TEMPLATE_ID_EXPRs.
6934
6935 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
6936
6937         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
6938         new ABI mangling.
6939
6940 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
6941
6942         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
6943         union tag mismatch error reporting.
6944
6945 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
6946
6947         * call.c (build_scoped_method_call): Check it is not a namespace.
6948
6949 2000-08-30  Jason Merrill  <jason@redhat.com>
6950
6951         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
6952
6953         * tree.c (bot_manip): Check TREE_CONSTANT rather than
6954         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
6955         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
6956
6957         * decl.c (start_function): Always call make_function_rtl.
6958
6959 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
6960
6961         * semantics.c (prune_unused_decls): New function.
6962         (finish_stmt_tree): Call it via walk_tree.
6963
6964 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
6965
6966         * class.c (build_secondary_vtable): Constify a char *.
6967         * decl.c (init_decl_processing): Initialize function_id_node,
6968         pretty_function_id_node, and func_id_node.
6969         * input.c (struct input_source): Constify 'str'.
6970         (feed_input): Constify first argument.
6971         * mangle.c (write_identifier): Constify argument.
6972         * pt.c (mangle_class_name_for_template): Constify argument.
6973
6974 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
6975
6976         * typeck.c (mark_addressable): Remove code that pokes around in
6977         RTL.
6978
6979 2000-08-28  Jason Merrill  <jason@redhat.com>
6980
6981         * lex.c (file_name_nondirectory): Move to toplev.c.
6982
6983         * cp-tree.h (LOCAL_CLASS_P): New macro.
6984         * class.c (finish_struct_1): Use it.
6985
6986 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
6987
6988         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
6989         (write_encoding): Pass another argument to write_name.
6990         (write_name): Add ignore_local_scope parameter.  Fix handling of
6991         local names.
6992         (write_nested_name): Use write_unqualified_name.
6993         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
6994         (write_template_prefix): Use write_unqualified_name.
6995         (write_component): Remove.
6996         (write_local_name): Add parameter.  Use direct local entity to
6997         discriminator calculation.
6998         (write_class_enum_type): Pass another argument to write_name.
6999         (write_template_template_arg): Likewise.
7000         (make_guard_variable): Likewise.
7001
7002 2000-08-27  Jason Merrill  <jason@redhat.com>
7003
7004         * decl.c (pushdecl): Matching decls for local externs are found in
7005         the current level.  Propagate linkage information from previous
7006         declarations.
7007
7008 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
7009
7010         * ir.texi (Expressions): Fix typo.
7011
7012 2000-08-25  Greg McGary  <greg@mcgary.org>
7013
7014         * tree.c (init_tree): Use ARRAY_SIZE.
7015
7016 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
7017
7018         * error.c (cp_tree_printer): Rework.
7019
7020 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
7021
7022         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
7023         dyn-string.o.
7024         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
7025         (cp-demangle.o): Remove target.
7026         (dyn-string.o): Likewise.
7027
7028         * decl.c (grokfndecl): Require that `main' return an `int'.
7029         * mangle.c (write_encoding): Don't mangle return types for
7030         conversion functions.
7031
7032 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
7033
7034         * error.c (tree_formatting_info): New data type.
7035         (tree_being_formatted): New macro.
7036         (tree_formatting_flags): Likewise.
7037         (put_whitespace): Likewise.
7038         (print_tree_identifier): Likewise.
7039         (print_identifier): Likewise.
7040         (cp_tree_printer, print_function_argument_list, print_declaration,
7041         print_expression, print_function_declaration,
7042         print_function_parameter, print_type, print_cv_qualifier): New
7043         functions.
7044         (init_error): Initialize lang_printer.
7045
7046 2000-08-24  Jason Merrill  <jason@redhat.com>
7047
7048         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
7049         adjustment necessary.
7050
7051 2000-08-24  Greg McGary  <greg@mcgary.org>
7052
7053         * cp-tree.h (MAIN_NAME_P): Remove macro.
7054
7055 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
7056
7057         * error.c (print_instantiation_context): Don't forget to flush the
7058         buffer.
7059
7060 2000-08-23  Jason Merrill  <jason@redhat.com>
7061
7062         * typeck.c (build_ptrmemfunc): Save the input pmf.
7063
7064         * method.c (process_modifiers): Use same_type_p.
7065
7066 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
7067
7068         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
7069         * mangle.c (write_function_type): Change prototype.
7070         (write_encoding): Don't mangle return types for
7071         constructors or destructors.
7072         (write_type): Adjust call to write_function_type.
7073         * pt.c (instantiate_template): Instantiate alternate entry points
7074         when instantiating the main function.
7075
7076 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
7077
7078         * error.c (cp_print_error_function): Don't use embedded '\n' in
7079         output_printf.
7080
7081 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
7082
7083         * decl.c (init_decl_processing): Remove bogus initialization.
7084         * error.c (lang_print_error_function): Restore here.
7085         (init_error): Initialize print_error_function.
7086
7087 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
7088
7089         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
7090
7091 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
7092
7093         * Makefile.in (error.o): Depends on diagnostic.h
7094
7095         * cp-tree.h (problematic_instantiation_changed,
7096         record_last_problematic_instantiation, current_instantiation,
7097         print_instantiation_context): Declare.
7098         (maybe_print_template_context): Remove.
7099
7100         * decl.c (init_decl_processing): Set print_error_function to NULL.
7101         (lang_print_error_function): Remove, since we're using a new
7102         machinery.
7103
7104         * error.c: #include diagnostic.h
7105         (function_category): New function.
7106         (cp_diagnostic_starter): Likewise.
7107         (cp_diagnostic_finalizer): Likewise.
7108         (cp_print_error_function): Likewise.
7109         (maybe_print_instantiation_context): Likewise.
7110         (print_instantiation_full_context): Likewise.
7111         (print_instantiation_partial_context): Likewise.
7112         (print_instantiation_context): Define.
7113         (init_error): Initialize diagnostic pager and finalizer.
7114
7115         * pt.c (problematic_instantiation_changed): Define.
7116         (record_last_problematic_instantiation): Likewise.
7117         (current_instantiation): Likewise.
7118         (maybe_print_template_context): Remove.
7119         (print_template_context): Likewise.
7120         (current_tinst_level): Make static to reflect Brendan Kehoe's
7121         change of 1995-04-13.
7122         (push_tinst_level): Call print_instantiation_context.
7123
7124 2000-08-21  Nix  <nix@esperi.demon.co.uk>
7125
7126         * lang-specs.h: Do not process -o or run the assembler if
7127         -fsyntax-only.
7128
7129 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
7130
7131         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
7132         variables.
7133         * decl2.c (lang_decode_option): Disable gettext attributes for
7134         -ansi.
7135
7136 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
7137
7138         * lex.c (lang_init_options): Default diagnostic message maximum
7139         length to 80, when line-wrapping.
7140
7141 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
7142
7143         * class.c (build_vtbl_initializer): Clear the entire
7144         vtbl_init_data.  Start keeping track of the functions for which we
7145         have created vcall offsets here.
7146         (dfs_build_vcall_offset_vtbl_entries): Remove.
7147         (build_vcall_offset_vtbl_entries): Reimplement.
7148         (add_vcall_offset_vtbl_entries_r): New function.
7149         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
7150         computing when vcall offsets are necessary.
7151
7152 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
7153
7154         * decl.c (member_function_or_else): Use cp_error ... %T.
7155         (grokdeclarator): Likewise.
7156         (start_method): Likewise.
7157         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
7158
7159 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
7160
7161         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
7162         TYPE_DECLs.
7163
7164 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
7165
7166         * cp-tree.h (PTRMEM_OK_P): New macro.
7167         (itf_ptrmem_ok): New enumeration value.
7168         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
7169         argument. Diagnose implicit pointer to member.
7170         (instantiate_type): Don't diagnose implicit pointer to member
7171         here. Pass itf_ptrmem_ok if ok. Adjust calls to
7172         resolve_address_of_overloaded_function.
7173         * init.c (build_offset_ref): Set PTRMEM_OK_P.
7174         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
7175         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
7176         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
7177         (build_unary_op): Deal with single non-static member in
7178         microsoft-land.
7179
7180 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
7181
7182         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
7183
7184 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
7185
7186         * cp-tree.h (enum_name_string): Remove prototype.
7187         (report_case_error): Remove prototype.
7188         * cp/typeck2.c (enum_name_string): Remove.
7189         (report_case_error): Remove.
7190         * error.c (dump_expr): Deal with enum values directly.
7191         Correctly negate integer constant.
7192
7193 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
7194
7195         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
7196         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
7197         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
7198         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
7199         (__cxa_vec_new): Use __cxa_vec_new2.
7200         (__cxa_vec_delete): Use __cxa_vec_delete2.
7201
7202 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
7203
7204         * vec.cc (__cxa_vec_new): Set "C" linkage.
7205         (__cxa_vec_ctor): Likewise.
7206         (__cxa_vec_cctor): Likewise.
7207         (__cxa_vec_dtor): Likewise.
7208         (__cxa_vec_delete): Likewise.
7209         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
7210         (__cxa_vec_ctor): Likewise.
7211         (__cxa_vec_cctor): Likewise.
7212         (__cxa_vec_dtor): Likewise.
7213         (__cxa_vec_delete): Likewise.
7214
7215 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
7216
7217         * class.c (instantiate_type): Reinstate local variable
7218         deleted in previous change.
7219
7220         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
7221         itf_no_attributes.
7222
7223 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
7224
7225         * cp-tree.h (instantiate_type_flags): New enumeration.
7226         (instantiate_type): Change parameter.
7227         * class.c (instantiate_type): Adjust prototype. Adjust.
7228         * call.c (standard_conversion): Adjust instantiate_type call.
7229         (reference_binding): Likewise.
7230         (build_op_delete_call): Likewise.
7231         (convert_like_real): Likewise.
7232         * cvt.c (cp_convert_to_pointer): Likewise.
7233         (convert_to_reference): Likewise.
7234         * pt.c (convert_nontype_argument): Likewise.
7235         * typeck.c (build_binary_op): Likewise.
7236         (build_ptrmemfunc): Likewise.
7237         (convert_for_assignment): Likewise.
7238
7239 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
7240
7241         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
7242         (current_aggr): Define.
7243         * decl.c (grokdeclarator): Make sure a friend class is an
7244         elaborated type specifier.
7245         * parse.y (current_aggr): Remove static definition.
7246         (cp_parse_init): Adjust.
7247         (structsp): Clear and restore current_aggr.
7248         (component_decl_list): Clear current_aggr.
7249
7250         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
7251         aggregate tag on the typename's context.
7252
7253         * pt.c (tsubst_friend_class): Return error_mark_node, if
7254         parms becomes NULL.
7255         (instantiate_class_template): Ignore error_mark_node friend types.
7256
7257 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
7258
7259         * cvt.c (warn_ref_binding): New static function, broken out of ...
7260         (convert_to_reference): ... here. Use it.
7261
7262 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
7263
7264         * parse.y (template_arg): Add rule for template qualified with
7265         global scope.
7266
7267 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
7268
7269         * decl2.c (add_function): Reorganize.
7270         (arg_assoc): Do not consider function template decls.
7271
7272 2000-08-11  Jason Merrill  <jason@redhat.com>
7273
7274         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
7275         looking inside.
7276
7277 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
7278
7279         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
7280         (lookup_nested_tag): Likewise.
7281
7282         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
7283         can be produced.
7284
7285 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
7286
7287         * parse.y (named_complex_class_head_sans_basetype): Remove
7288         always true if.
7289
7290 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
7291
7292         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
7293         explicit TEMPLATE_ID_EXPR args.
7294         (build_expr_from_tree, case CALL_EXPR): Likewise.
7295
7296 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
7297
7298         * decl.c (check_tag_decl): Diagnose typename's which don't
7299         declare anything.
7300
7301 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
7302
7303         * init.c (build_aggr_init): Reject bogus array initializers
7304         early.
7305
7306 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
7307
7308         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
7309         runtime.
7310         * cp/tinfo.cc (__dynamic_cast): Likewise.
7311         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
7312
7313 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
7314
7315         * cvt.c (convert_to_pointer_force): Fix error message when
7316         attempting to cast from ambiguous base.
7317
7318 2000-08-08  Jason Merrill  <jason@redhat.com>
7319
7320         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
7321         (tsubst_template_arg_vector): Likewise.
7322
7323         * decl2.c (build_anon_union_vars): Choose the largest field; don't
7324         assume that one will be as large as the union.
7325
7326 2000-08-07  Kazu Hirata  <kazu@hxi.com>
7327
7328         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
7329         * decl.c (pop_labels): Likewise.
7330
7331 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
7332
7333         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
7334         specifications.
7335         (__pointer_to_member_type_info): Likewise.
7336         (__base_class_info): Likewise.
7337         (__class_type_info): Likewise.
7338         (__si_class_type_info): Likewise.
7339         (__vmi_class_type_info): Likewise.
7340         * tinfo.cc (__si_class_type_info::__do_find_public_src):
7341         Changed member names to match specifications.
7342         (__vmi_class_type_info::__do_find_public_src): Likewise.
7343         (__si_class_type_info::__do_dyncast): Likewise.
7344         (__vmi_class_type_info::__do_dyncast): Likewise.
7345         (__si_class_type_info::__do_upcast): Likewise.
7346         (__vmi_class_type_info::__do_upcast): Likewise.
7347         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
7348         (__pbase_type_info::__pointer_catch): Likewise.
7349         (__pointer_type_info::__pointer_catch): Likewise.
7350         (__pointer_to_member_type_info::__pointer_catch): Likewise.
7351
7352 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
7353
7354         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
7355         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
7356         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
7357
7358 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
7359
7360         * cp-tree.h (add_method): Change prototype.
7361         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
7362         Don't double the size of the method vector in the error case.
7363         (handle_using_decl): Adjust call to add_method.
7364         (add_implicitly_declared_members): Likewise.
7365         (clone_function_decl): Likewise.
7366         * decl2.c (check_classfn): Likewise.
7367         * semantics.c (finish_member_declaration): Likewise.
7368
7369 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
7370
7371         * decl.c (flag_isoc94): New variable.
7372
7373 2000-08-02  Jason Merrill  <jason@redhat.com>
7374
7375         * pt.c (do_type_instantiation): Add complain parm; don't complain
7376         if called recursively.
7377         * cp-tree.h, parse.y: Adjust.
7378
7379 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
7380
7381         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
7382         -Wno-strict-prototypes.
7383
7384         * g++spec.c: Adjust type of second argument to
7385         lang_specific_driver, and update code as necessary.
7386
7387         * cp-tree.h: Don't prototype min_precision here.
7388         (my_friendly_assert): Cast expression to void.
7389         * semantics.c (do_poplevel): Initialize scope_stmts.
7390
7391 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
7392
7393         * cp-tree.h (DECL_NEEDED_P): Tweak.
7394
7395 2000-07-28  Jason Merrill  <jason@redhat.com>
7396
7397         * lang-specs.h: Use %i in rule for .ii files.
7398
7399 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
7400
7401         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
7402
7403 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
7404
7405         Allow indirect primary bases.
7406         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
7407         primary_base.
7408         (CLASSTYPE_VFIELD_PARENT): Remove.
7409         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
7410         (BINFO_PRIMARY_BINFO): Remove.
7411         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
7412         (BINFO_VBASE_PRIMARY_P): Likewise.
7413         (BINFO_PRIMARY_BASE_OF): New macro.
7414         (BINFO_INDIRECT_PRIMARY_P): Likewise.
7415         (get_primary_binfo): New function.
7416         * decl.c (lang_mark_tree): Make lang_type::primary_base.
7417         * class.c (vcall_offset_data_s): Rename to ...
7418         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
7419         and add ctor_vtbl_p.
7420         (get_derived_offset): Use get_primary_binfo.
7421         (dfs_mark_primary_bases): Adjust handling of virtual primary
7422         bases.
7423         (mark_primary_bases): Likewise.
7424         (set_primary_base): Take a binfo, not an integer, as a
7425         representation of the primary base.
7426         (indirect_primary_base_p): Remove.
7427         (determine_primary_base): Adjust for indirect primary bases.
7428         (dfs_find_final_overrider): Fix typo in coment.
7429         (update_vtable_entry_for_fn): Use get_primary_binfo.
7430         (layout_nonempty_base_or_field): Tweak.
7431         (build_base_fields): Adjust for new primary base semantics.
7432         (dfs_propagate_binfo_offsets): Remove.
7433         (propagate_binfo_offsets): Rewrite.
7434         (dfs_set_offset_for_shared_vbases): Remove.
7435         (layout_virtual_bases): Don't use it.
7436         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
7437         ABI.
7438         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
7439         CLASSTYPE_VFIELD_PARENT.
7440         (dfs_get_primary_binfo): New function.
7441         (get_primary_binfo): Likewise.
7442         (dump_class_hierarchy_r): Tweak printing of primary bases.
7443         (build_vtbl_initializer): Fix typo in comments.  Use
7444         vtbl_init_data.
7445         (build_vcall_and_vbase_vtbl_entries): Likewise.
7446         (build_vbaes_offset_vtbl_entries): Likewise.
7447         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
7448         BV_VCALL_INDEX to handle indirect primary bases.
7449         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
7450         (build_rtti_vtbl_entries): Likewise.
7451         * search.c (get_shared_vbase_if_not_primary): Tweak.
7452         (find_vbase_instance): Likewise.
7453         (binfo_for_vtable): Simplify.
7454         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
7455         (make_binfo): Make it have 11 entries.
7456
7457 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
7458
7459         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
7460         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
7461         ascertaining primaryness.
7462         (G): Remove template_args.
7463         (decl_is_template_id): New function.
7464         (write_encoding): Use decl_is_template_id.
7465         (write_name): Likewise.  Handle type_decls.  Get main variant of
7466         type decls.
7467         (write_nested_name): Likewise.
7468         (write_prefix): Likewise.
7469         (write_template_prefix): Likewise.
7470         (write_special_name_constructor): Remove defunct production from
7471         comment.
7472         (write_bare_function_type): Remove comment about absent parameter.
7473         (write_template_template_arg): Add missing grammar production to
7474         comment.
7475
7476 2000-07-27  Jason Merrill  <jason@redhat.com>
7477
7478         * decl.c (duplicate_decls): If common_type produces a non-typedef
7479         type for a typedef, just use the old type.
7480
7481 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
7482
7483         * cp-tree.h (function_depth): Declare.
7484         (verify_stmt_tree): Likewise.
7485         (find_tree): Likewise.
7486         * decl.c (function_depth): Give it external linkage.
7487         * optimize.c (optimize_function): Increment and decrement it.
7488         * tree.c (verify_stmt_tree_r): New function.
7489         (verify_stmt_tree): Likewise.
7490         (find_tree_r): Likewise.
7491         (find_tree): Likewise.
7492
7493 2000-07-27  Jason Merrill  <jason@redhat.com>
7494
7495         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
7496         TYPE_PTRMEMFUNC_P.
7497         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
7498
7499 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
7500
7501         * decl.c (start_cleanup_fn): Mark the function as `inline'.
7502         * decl2.c (get_guard): Call cp_finish_decl, not
7503         rest_of_decl_compilation, for local guards.
7504         * lex.c (do_identifier): Remove unused variable.
7505
7506 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
7507
7508         * parse.y:  Add missing ';'.
7509
7510 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
7511
7512         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
7513         of `extern "C++"'.
7514
7515 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7516
7517         Kill strict_prototype. Backwards compatibility only for
7518         non NO_IMPLICIT_EXTERN_C systems.
7519         * cp-tree.h (flag_strict_prototype): Remove.
7520         (strict_prototype): Remove.
7521         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
7522         * decl.c (maybe_push_to_top_level): Adjust.
7523         (pop_from_top_level): Adjust.
7524         (decls_match): Only allow sloppy parm matching for ancient
7525         system headers.
7526         (init_decl_processing): Adjust.
7527         (grokdeclarator): Adjust.
7528         * decl2.c (flag_strict_prototype): Remove.
7529         (strict_prototype): Remove.
7530         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
7531         (lang_f_options): Remove "strict-prototype".
7532         (unsupported-options): Add "strict-prototype".
7533         * lex.c (do_identifier): Adjust.
7534         (do_scoped_id): Adjust.
7535         * parse.y (empty_parms): Adjust.
7536         * class.c (push_lang_context): Adjust.
7537         (pop_lang_context): Adjust.
7538         * typeck.c (comp_target_parms): Adjust.
7539
7540 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7541
7542         * decl.c (poplevel): Deal with anonymous variables at for scope.
7543         (maybe_inject_for_scope_var): Likewise.
7544
7545 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
7546
7547         * decl.c: Remove all signal handling code, now done in toplev.c.
7548
7549 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
7550
7551         * decl.c (make_rtl_for_nonlocal_decl): Rework.
7552
7553         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
7554         correctly.
7555
7556 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
7557
7558         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
7559         Define my_friendly_assert and my_friendly_abort as macros
7560         which may call friendly_abort.  Prototype friendly abort, not
7561         my_friendly_abort or my_friendly_assert.
7562         * decl.c (signal_catch): Report the signal caught in the error
7563         message.  Call fatal directly.
7564         * typeck2.c (ack, my_friendly_assert): Delete.
7565         (my_friendly_abort): Rename to friendly_abort.  Expect file,
7566         line, and function parameters.  Report the abort code, then
7567         call fancy_abort.  Do not mask an abort if errors have
7568         already occurred.
7569
7570 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
7571
7572         * typeck.c (comp_target_parms): Remove obsolete parameter.
7573         (comp_target_types): Adjust.
7574
7575 2000-07-17  Jason Merrill  <jason@redhat.com>
7576
7577         * typeck.c (mark_addressable): Never set TREE_USED.
7578         * call.c (build_call): Don't abort on calls to library functions
7579         that have been declared normally.
7580
7581         * typeck.c (build_binary_op): Fix grammar in warning.
7582
7583         * exception.cc (__eh_free): Fix prototype.
7584
7585         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
7586
7587         * decl.c (pushdecl): Handle seeing an OVERLOAD in
7588         IDENTIFIER_NAMESPACE_VALUE.
7589
7590 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
7591
7592         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
7593         * method.c (use_thunk): Correct handling of vcall offsets.
7594
7595 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
7596
7597         * .cvsignore: parse.h and parse.c have no cp- prefix.
7598
7599 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
7600
7601         * .cvsignore: New file.
7602
7603 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
7604
7605         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
7606
7607 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
7608
7609         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
7610         * parse.c: Remove.
7611         * parse.h: Likewise.
7612
7613 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
7614
7615         * class.c (layout_class_type): Add pointers to virtual bases after
7616         base classes under the old ABI.
7617
7618 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
7619
7620         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
7621         (finish_continue_stmt): Likewise.
7622         (begin_for_stmt): Remove call to note_level_for_for.
7623         (finish_goto_stmt): Change call from build_min_nt
7624         to build_stmt.
7625         (finish_expr_stmt): Likewise.
7626         (begin_if_stmt): Likewise.
7627         (begin_while_stmt): Likewise.
7628         (finish_while_stmt): Likewise.
7629         (finish_return_stmt): Likewise.
7630         (begin_for_stmt): Likewise.
7631         (finish_for_stmt): Likewise.
7632         (finish_break_stmt): Likewise.
7633         (begin_switch_stmt): Likewise.
7634         (finish_case_label): Likewise.
7635         (genrtl_try_block): Likewise.
7636         (begin_try_block): Likewise.
7637         (begin_handler): Likewise.
7638         (begin_compound_stmt): Likewise.
7639         (finish_asm_stmt): Likewise.
7640         (finish_label_stmt): Likewise.
7641         (add_decl_stmt): Likewise.
7642         (finish_subobject): Likewise.
7643         (finish_decl_cleanup): Likewise.
7644         (finish_named_return_value): Likewise.
7645         (setup_vtbl_ptr): Likewise.
7646         (add_scope_stmt): Likewise.
7647         * decl.c (finish_constructor_body): Likewise.
7648         (finish_destructor_body): Likewise.
7649         * optimize.c (copy_body_r): Likewise.
7650         (initialize_inlined_parameters): Likewise.
7651         (declare_return_variable): Likewise.
7652         (expand_call_inline): Likewise.
7653
7654 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
7655
7656         * semantics.c (expand_body): Sync interface information
7657         at the end of function body expansion.
7658
7659 2000-07-09  Jason Merrill  <jason@redhat.com>
7660
7661         * init.c (build_new_1): Bail early if the call to new fails.
7662
7663         * decl.c (compute_array_index_type): Check specifically for
7664         an INTEGER_CST, not just TREE_CONSTANT.
7665
7666         * decl.c (duplicate_decls): Don't call duplicate_decls on
7667         the DECL_TEMPLATE_RESULT.
7668         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
7669         codes.
7670
7671         * error.c (dump_template_bindings): Don't crash if we had an
7672         invalid argument list.
7673
7674         * typeck.c (c_expand_start_case): Do narrowing here.
7675         * semantics.c (finish_switch_cond): Not here.
7676
7677 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
7678
7679         * parse.y (asm_clobbers): Do string concatenation.
7680
7681 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
7682
7683         * decl.c (pushtag): Don't put local classes in template functions
7684         on the local_classes list.
7685
7686 2000-07-04  Scott Snyder  <snyder@fnal.gov>
7687
7688         * decl2.c (get_guard): Add missing return for old ABI local
7689         variable case.
7690
7691 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
7692
7693         * cp-tree.h (char_type_p): New function.
7694         * decl.c (init_decl_processing): Don't initialize
7695         signed_wchar_type_node or unsigned_wchar_type_node.
7696         (complete_array_type): Handle brace-enclosed string-constants.
7697         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
7698         * tree.c (char_type_p): New function.
7699         * typeck2.c (digest_init): Use char_type_p.
7700
7701 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
7702
7703         * pt.c (tsubst): Don't layout type, if it's error_mark.
7704
7705 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
7706
7707         * pt.c (instantiate_pending_templates): Reset template level.
7708
7709 2000-07-05  Jason Merrill  <jason@redhat.com>
7710
7711         * call.c (joust): Don't complain about `operator char *()' beating
7712         `operator const char *() const'.
7713
7714 2000-07-04  scott snyder  <snyder@fnal.gov>
7715             Jason Merrill  <jason@redhat.com>
7716
7717         * repo.c (repo_get_id): Handle the case where a class with virtual
7718         bases has a null TYPE_BINFO_VTABLE.
7719
7720 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
7721             Jason Merrill  <jason@redhat.com>
7722
7723         * parse.y (member_init): Just pass in the type.
7724         * init.c (expand_member_init): Handle getting a type.
7725
7726 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7727             Jason Merrill  <jason@redhat.com>
7728
7729         * decl.c (finish_function): Warn if a function has no return
7730         statement.
7731         Suggested by Andrew Koenig.
7732         * typeck.c (check_return_expr): Do set current_function_returns_value
7733         if we got an error_mark_node.
7734
7735 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
7736
7737         * decl2.c (push_decl_namespace): Push the original namespace.
7738
7739 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
7740
7741         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
7742         * semantics.c (begin_class_definition): Clear it.
7743
7744 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
7745
7746         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
7747         (genrtl_expr_stmt): Likewise.
7748         (genrtl_decl_stmt): Likewise.
7749         (genrtl_if_stmt): Likewise.
7750         (genrtl_while_stmt): Likewise.
7751         (genrtl_do_stmt): Likewise.
7752         (genrtl_return_stmt): Likewise.
7753         (genrtl_for_stmt): Likewise.
7754         (genrtl_break_stmt): Likewise.
7755         (genrtl_continue_stmt): Likewise.
7756         (genrtl_scope_stmt): Likewise.
7757         (genrtl_switch_stmt): Likewise.
7758         (genrtl_case_label): Likewise.
7759         (genrtl_begin_compound_stmt): Likewise.
7760         (genrtl_finish_compound_stmt): Likewise.
7761         (genrtl_compound_stmt): Likewise.
7762         (genrtl_asm_stmt): Likewise.
7763
7764         * init.c (begin_init_stmts): Remove call to
7765         genrtl_begin_compound_stmt.
7766         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
7767
7768         * semantics.c (lang_expand_stmt): Changed call to
7769         genrtl_compound_stmt to ignore return value.
7770
7771 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
7772
7773         * mangle.c (canonicalize_for_substitution): Return the canonical
7774         variant of a type.
7775
7776         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
7777         TYPE_DECL.
7778         * typeck.c (commonparms): Remove obstack manipulations.
7779
7780 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
7781
7782         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
7783
7784         * Makefile.in (OBJS): Added ../c-semantics.o.
7785         (OBJDEPS): Likewise.
7786
7787         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
7788         ../c-common.h.
7789         (struct stmt_tree): Added comment.
7790         (current_function_name_declared): Removed.
7791         (stmts_are_full_exprs_p): Likewise.
7792         (genrtl_do_pushlevel): Likewise.
7793         (genrtl_clear_out_block): Likewise.
7794         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
7795         (DECL_ANON_UNION_ELEMS): Likewise.
7796         (emit_local_var): Likewise.
7797         (make_rtl_for_local_static): Likewise.
7798         (do_case): Likewise.
7799         (expand_stmt): Likewise.
7800         (genrtl_decl_cleanup): Likewise.
7801         (c_expand_asm_operands): Likewise.
7802         (c_expand_return): Likewise.
7803         (c_expand_start_case): Likewise.
7804
7805         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
7806         (emit_local_var): Likewise.
7807         (initialize_local_var): Change reference to
7808         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
7809         Change reference to stmts_are_full_exprs_p to
7810         current_stmt_tree->stmts_are_full_exprs_p.
7811         (push_cp_function_context): Likewise.
7812
7813         * expect.c (expand_throw): Change reference to
7814         stmts_are_full_exprs_p.
7815
7816         * init.c (build_aggr_init): Change reference to
7817         stmts_are_full_exprs_p.
7818         (build_vec_init): Likewise.
7819
7820         * optimize.c (maybe_clone_body): Change reference to
7821         current_function_name_declared to
7822         cp_function_chain->name_declared.
7823
7824         * pt.c (instantiate_decl): Change reference to
7825         current_function_name_declared to
7826         cp_function_chain->name_declared.
7827
7828         * semantics.c (expand_cond): Moved declaration to c-common.h.
7829         (genrtl_do_pushlevel): Moved to c-semantics.c.
7830         (genrtl_clear_out_block): Likewise.
7831         (genrtl_goto_stmt): Likewise.
7832         (genrtl_expr_stmt): Likewise.
7833         (genrtl_decl_stmt): Likewise.
7834         (gerntl_if_stmt): Likewise.
7835         (genrtl_while_stmt): Likewise.
7836         (genrtl_do_stmt): Likewise.
7837         (genrtl_return_stmt): Likewise.
7838         (genrtl_for_stmt): Likewise.
7839         (genrtl_break_stmt): Likewise.
7840         (genrtl_continue_stmt): Likewise.
7841         (genrtl_scope_stmt): Likewise.
7842         (genrtl_switch_stmt): Likewise.
7843         (genrtl_case_label): Likewise.
7844         (genrtl_begin_compound_stmt): Likewise.
7845         (genrtl_finish_compound_stmt): Likewise.
7846         (genrtl_compound_stmt): Likewise.
7847         (genrtl_asm_stmt): Likewise.
7848         (genrtl_decl_cleanup): Likewise.
7849         (expand_cond): Likewise.
7850         (expand_stmt): Renamed to ...
7851         (lang_expand_stmt): ... this.
7852         (lang_expand_expr_stmt): Initialize.
7853         (set_current_function_name_declared): Likewise.
7854         (stmts_are_full_exprs_p): Likewise.
7855         (current_function_name_declared): Likewise.
7856         (anon_aggr_type_p): Likewise.
7857         (do_poplevel): Change reference to
7858         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
7859         Change reference to stmts_are_full_exprs_p to
7860         current_stmt_tree->stmts_are_full_exprs_p.
7861         (add_tree): Likewise.
7862         (finish_expr_stmt): Likewise.
7863         (prep_stmt): Likewise.
7864         (lang_expand_stmt): Likewise.
7865         (begin_compound_stmt): Change reference to
7866         current_function_name_declared to
7867         cp_function_chain->name_declared and call to
7868         current_function_name_declared().
7869         (setup_vtbl_ptr): Likewise.
7870         (genrtl_do_poplevel): Removed.
7871
7872 2000-06-30  Jason Merrill  <jason@redhat.com>
7873
7874         * init.c (init_init_processing): Go back to aligning like
7875         double_type_node for old ABI.
7876         (get_cookie_size): Make cookie larger if we get a type that needs
7877         more alignment.
7878         (build_vec_delete): Call it.
7879
7880         * typeck.c (qualify_type_recursive): New fn.
7881         (composite_pointer_type): Use it.
7882         (build_binary_op): Use composite_pointer_type.
7883
7884 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
7885             Jason Merrill  <jason@redhat.com>
7886
7887         * typeck.c (check_return_expr): Don't complain about returning
7888         NULL from operator new if -fcheck-new.
7889         * cp-tree.h: Declare flag_check_new here.
7890         * init.c: Not here.
7891
7892 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
7893
7894         * mangle.c (find_substitution): Use same_type_p.
7895         (write_encoding): Don't check for substitutions.
7896
7897 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
7898
7899         * parse.y (expr_no_comma_rangle): New non-terminal.
7900         (template_parm): Use it for default parameter case.
7901         (template_arg): Use it.
7902         (expr_no_commas): Remove commented out undefined extensions.
7903         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
7904         * parse.h, parse.c: Rebuilt.
7905
7906 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
7907
7908         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
7909         (finish_asm_stmt): Do it here, instead.
7910
7911         * cp-tree.h (ridpointers): Don't declare.
7912         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
7913         (record_builtin_java_type): Likewise.
7914         (init_decl_processing): Likewise.
7915         * lex.c: Move inclusion of lex.h.
7916         (ridpointers): Don't define.
7917         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
7918         RID_MAX.
7919         * lex.h (enum rid): Rename to ...
7920         (enum cp_rid): ... this.
7921         (ridpointers): Don't declare.
7922         * parse.y: Move inclusion of lex.h.
7923         * parse.c: Regenerated.
7924         * spew.c: Move inclusion of lex.h.
7925
7926         * cp-tree.h (struct language_function): Remove temp_name_counter.
7927         (temp_name_counter): Remove.
7928         (get_temp_name): Change prototype.
7929         (get_guard): New function.
7930         (get_guard_cond): Likewise.
7931         (set_guard): Likewise.
7932         * cvt.c (build_up_reference): Adjust call to get_temp_name.
7933         * decl.c (expand_static_init): Use get_guard and friends to
7934         implement guard variables.
7935         * decl2.c (get_temp_name): Assume that the variables created are
7936         always static.
7937         (get_sentry): Rename to ...
7938         (get_guard): ... this.  Implement new ABI guard variables.
7939         (get_guard_bits): New function.
7940         (get_guard_cond): Likewise.
7941         (set_guard): Likewise.
7942         (start_static_initialization_or_destruction): Use them.
7943         (do_static_initialization): Replace sentry with guard throughout.
7944         (do_static_destruction): Likewise.
7945         * init.c (create_temporary_var): Add comment.
7946
7947 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
7948
7949         * mangle.c (find_substitution): Use same_type_p.
7950         (write_encoding): Don't check for substitutions.
7951
7952 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
7953
7954         * parse.y (expr_no_comma_rangle): New non-terminal.
7955         (template_parm): Use it for default parameter case.
7956         (template_arg): Use it.
7957         (expr_no_commas): Remove commented out undefined extensions.
7958         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
7959         * parse.h, parse.c: Rebuilt.
7960
7961 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
7962
7963         * cp-tree.h (flag_const_strings): Remove.
7964         (warn_parentheses): Likewise.
7965         (warn_format): Likewise.
7966         (common_type): Likewise.
7967         (default_conversion): Likewise.
7968         (build_binary_op): Likewise.
7969         (cp_build_binary_op): New macro.
7970         * call.c (build_new_op): Use cp_build_binary_op instead of
7971         build_binary_op.
7972         * class.c (build_vtable_entry_ref): Likewise.
7973         * decl.c (expand_static_init): Likewise.
7974         (compute_array_index_type): Likewise.
7975         (build_enumerator): Likewise.
7976         * decl2.c (delete_sanity): Likewise.
7977         (start_static_initialization_or_destruction): Likewise.
7978         * error.c (dump_type_suffix): Likewise.
7979         * init.c (resolve_offset_ref): Likewise.
7980         (build_new): Likewise.
7981         (build_new_1): Likewise.
7982         (build_vec_delete_1): Likewise.
7983         (build_vec_init): Likewise.
7984         (build_delete): Likewise.
7985         * rtti.c (synthesize_tinfo_fn): Likewise.
7986         (synthesize_tinfo_var): Likewise.
7987         * search.c (expand_upcast_fixups): Likewise.
7988         (fixup_all_virtual_upcast_offsets): Likewise.
7989         * typeck.c (build_array_ref): Likewise.
7990         (get_member_function_from_ptrfunc): Likewise.
7991         (build_binary_op): Add parameter.
7992         (pointer_int_sum): Use cp_build_binary_op.
7993         (pointer_diff): Likewise.
7994         (build_modify_expr): Likewise.
7995         (get_delta_difference): Likewise.
7996         (build_ptrmemfunc): Likewise.
7997
7998 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
7999
8000         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
8001         * decl.c (create_implicit_typedef): Adjust.
8002         * decl2.c (build_artificial_parm): Adjust.
8003         * method.c (implicitly_declare_fn): Adjust.
8004         * pt.c (push_inline_template_parms_recursive): Adjust.
8005         (process_template_parm): Adjust.
8006         (overloaded_template_name): Adjust.
8007         * semantics.c (finish_template_template_parm): Adjust.
8008
8009 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
8010
8011         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
8012         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
8013         where to emit thunks.
8014         (build_vtt): Adjust call to build_vtt_inits.
8015         (build_vtt_inits): Add parameter to indicate whether or not
8016         sub-VTTs for virtual bases should be included.  Adjust handling of
8017         construction vtables.
8018         (get_matching_base): New function.
8019         (dfs_build_vtt_inits): Rename to ...
8020         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
8021         construction vtables.
8022         (dfs_fixup_binfo_vtbls): Likewise.
8023         (build_ctor_vtbl_groups): Build construction vtables for virtual
8024         bases, too.
8025         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
8026         to build construction vtbls.
8027         (dfs_accumulate_vtbl_inits): Adjust handling of
8028         construction vtables.
8029
8030         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
8031         types correctly.
8032
8033 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
8034
8035         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
8036
8037 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
8038
8039         * search.c (hides): Remove.
8040         (is_subobject_of_p): Add most_derived parameter. Use
8041         CANONICAL_BINFO.
8042         (lookup_field_queue_p): Adjust.
8043         (lookup_field_r): Adjust.
8044
8045 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
8046
8047         * decl2.c (handle_class_head): Bash typedefs to the type's main
8048         decl.
8049
8050 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
8051
8052         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
8053         (begin_global_stmt_expr): ... this.
8054         (genrtl_finish_stmt_expr): Rename to ...
8055         (finish_global_stmt_expr): ... this.
8056         * init.c (begin_init_stmts): Adjust calls.
8057         (finish_init_stmts): Likewise.
8058         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
8059         (begin_global_stmt_expr): ... this.
8060         (genrtl_finish_stmt_expr): Rename to ...
8061         (finish_global_stmt_expr): ... this.
8062
8063 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
8064
8065         * search.c (lookup_member): Fix typo in comment.
8066
8067 2000-06-24  Jason Merrill  <jason@redhat.com>
8068
8069         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
8070         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
8071
8072 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8073
8074         * parse.y (complex_direct_notype_declarator): Support global_scope.
8075         * Makefile.in: Adjust conflict count.
8076
8077 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
8078
8079         * parse.y (template_arg): Convert TEMPLATE_DECL
8080         that is a template template parameter to
8081         TEMPLATE_TEMPLATE_PARM here.
8082
8083         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
8084         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
8085         (copy_template_template_parm): Adjust prototype.
8086         * decl.c (grokdeclarator): Remove dead code.
8087         * pt.c (process_template_parm): Tidy.
8088         (lookup_template_class): Construct nodes in
8089         copy_template_template_parm.
8090         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
8091         lookup_template_class.  Use TYPE_TI_TEMPLATE.
8092         * tree.c (copy_template_template_parm): Add NEWARGS
8093         parameter.
8094         (mapcar): Adjust call to copy_template_template_parm.
8095         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
8096         * method.c (build_template_template_parm_names): Change error
8097         code to avoid compilation warning.
8098
8099         * gxxint.texi: Document template template parameter
8100         name mangling.
8101
8102 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
8103
8104         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
8105         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
8106         (cp-demangle.o): New rule.
8107         (dyn-string.o): Likewise.
8108         * inc/cxxabi.h (__cxa_demangle): New declaration.
8109
8110 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
8111
8112         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
8113         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
8114         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
8115         a tree, not an int.
8116         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
8117         (make_thunk): Change prototype.
8118         (emit_thunk): Rename to use_thunk.
8119         (mangle_thunk): Change prototype.
8120         * class.c (get_derived_offset): Simplify.
8121         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
8122         BV_GENERATE_THUNK_WITH_VTABLE_P.
8123         (build_primary_vtable): Simplify.
8124         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
8125         (dfs_find_base): Remove.
8126         (update_vtable_entry_for_fn): Correct bug in finding the base
8127         where a virtual function was first declared.  Figure out whether
8128         or not to emit a vcall-thunk with the vtables in which it appears.
8129         Correct logic for deciding whether to use an ordinary thunk, or a
8130         vcall thunk.
8131         (finish_struct_1): Remove unnecssary code.
8132         (build_vtbl_initializer): Use ssize_int for the running counter of
8133         negative indices.
8134         (build_vtbl_initializer): Only use vcall thunks where necessary.
8135         Mark thunks as needing to be emitted with their vtables, or not.
8136         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
8137         indices.  Use size_binop.
8138         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
8139         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
8140         size_binop.
8141         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
8142         (build_vtable_entry): Mark thunks as needing to be emitted with
8143         their vtables, or not.
8144         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
8145         * decl2.c (mark_vtable_entries): Use use_thunk instead of
8146         emit_thunk.
8147         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
8148         information.
8149         * error.c (dump_expr): Use BV_FN.
8150         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
8151         not an int.
8152         * method.c (make_thunk): Likewise.
8153         (emit_thunk): Rename to use_thunk.  Allow callers to decide
8154         whether or not to actually emit the thunk.  Adjust for changes in
8155         representation of vcall offsets.
8156         * search.c (dfs_get_pure_virtuals): Use BV_FN.
8157         * semantics.c (emit_associated_thunks): New function.
8158         (expand_body): Use it.
8159         * ir.texi: Adjust decriptions of thunks.
8160
8161 2000-06-22  Jason Merrill  <jason@redhat.com>
8162
8163         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
8164         (tsubst_friend_function): Copy it here.
8165
8166         * decl.c (grok_op_properties): Fix typo.
8167
8168         * decl2.c (delete_sanity): Clarify warning, avoid failure on
8169         deleting void*.
8170
8171         * pt.c (check_explicit_specialization): Clarify error.
8172
8173         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
8174         an old OVERLOAD when we're declaring a non-function.
8175         (pushdecl, destroy_local_var): Check for error_mark_node.
8176         (warn_extern_redeclared_static): Also bail early if
8177         we're a CONST_DECL.
8178         (push_overloaded_decl): Ignore an old error_mark_node.
8179
8180 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
8181
8182         * call.c (build_x_va_arg): Check if in a template decl.
8183         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
8184
8185 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8186
8187         * class.c (push_lang_context): TYPE_NAME gets you to the Java
8188         types DECLs.
8189         * decl.c (check_goto): Computed gotos assumed OK.
8190
8191 2000-06-20  Jason Merrill  <jason@redhat.com>
8192
8193         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
8194         for which we don't need to look for instantiations.
8195
8196 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
8197
8198         * parse.y (program): Always call finish_translation_unit.
8199         * parse.c, parse.h: Rebuilt.
8200
8201 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
8202
8203         * method.c: Don't include hard-reg-set.h.
8204
8205 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
8206
8207         * rtti.c (get_base_offset): Cope when vbase field is in a base.
8208
8209 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
8210
8211         * call.c (build_conditional_expr): Use VOID_TYPE_P.
8212         * cvt.c (cp_convert_to_pointer): Likewise.
8213         (convert_to_void): Likewise.
8214         * error.c (dump_expr): Likewise.
8215         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
8216         * init.c (build_delete): Likewise.
8217         * method.c (emit_thunk): Likewise.
8218         * optmize.c (declare_return_variable): Likewise.
8219         * rtti.c (get_tinfo_decl_dynamic): Likewise.
8220         (get_typeid): Likewise.
8221         (build_dynamic_cast_1): Likewise.
8222         * typeck.c (composite_pointer_type): Likewise.
8223         (common_type): Likewise.
8224         (build_indirect_ref): Likewise.
8225         (build_binary_op): Likewise.
8226         (build_x_compound_expr): Likewise.
8227         (check_return_expr): Likewise.
8228         * typeck2.c (add_exception_specifier): Likewise.
8229
8230         * mangle.c (write_method_parms): Use direct comparison for end
8231         of parmlist.
8232
8233 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
8234
8235         * cp-tree.h (genrtl_try_block): Declare function.
8236         (genrtl_handler): Likewise.
8237         (genrtl_catch_block): Likewise.
8238         (genrtl_ctor_stmt): Likewise.
8239         (genrtl_subobject): Likewise.
8240         (genrtl_decl_cleanup): Likewise.
8241         (genrtl_do_poplevel): Likewise.
8242         (genrtl_do_pushlevel): Likewise.
8243         (genrtl_clear_out_block): Likewise.
8244         (genrtl_goto_stmt): Likewise.
8245         (genrtl_expr_stmt): Likewise.
8246         (genrtl_decl_stmt): Likewise.
8247         (genrtl_if_stmt): Likewise.
8248         (genrtl_while_stmt): Likewise.
8249         (genrtl_do_stmt): Likewise.
8250         (genrtl_return_stmt): Likewise.
8251         (genrtl_for_stmt): Likewise.
8252         (genrtl_break_stmt): Likewise.
8253         (genrtl_continue_stmt): Likewise.
8254         (genrtl_scope_stmt): Likewise.
8255         (genrtl_switch_stmt): Likewise.
8256         (genrtl_case_label): Likewise.
8257         (genrtl_begin_compound_stmt): Likewise.
8258         (genrtl_finish_compound_stmt): Likewise.
8259         (genrtl_compound_stmt): Likewise.
8260         (genrtl_asm_stmt): Likewise.
8261         (genrtl_named_return_value): Likewise.
8262         (genrtl_begin_stmt_expr): Likewise.
8263         (genrtl_finish_stmt_expr): Likewise.
8264         (finish_for_stmt): Removed first argument.
8265         (finish_switch_stmt): Likewise.
8266
8267         * semantics.c (genrtl_try_block): Define function.
8268         (genrtl_handler): Likewise.
8269         (genrtl_catch_block): Likewise.
8270         (genrtl_ctor_stmt): Likewise.
8271         (genrtl_subobject): Likewise.
8272         (genrtl_decl_cleanup): Likewise.
8273         (genrtl_do_poplevel): Likewise.
8274         (genrtl_do_pushlevel): Likewise.
8275         (genrtl_clear_out_block): Likewise.
8276         (genrtl_goto_stmt): Likewise.
8277         (genrtl_expr_stmt): Likewise.
8278         (genrtl_decl_stmt): Likewise.
8279         (genrtl_if_stmt): Likewise.
8280         (genrtl_while_stmt): Likewise.
8281         (genrtl_do_stmt): Likewise.
8282         (genrtl_return_stmt): Likewise.
8283         (genrtl_for_stmt): Likewise.
8284         (genrtl_break_stmt): Likewise.
8285         (genrtl_continue_stmt): Likewise.
8286         (genrtl_scope_stmt): Likewise.
8287         (genrtl_switch_stmt): Likewise.
8288         (genrtl_case_label): Likewise.
8289         (genrtl_begin_compound_stmt): Likewise.
8290         (genrtl_finish_compound_stmt): Likewise.
8291         (genrtl_compound_stmt): Likewise.
8292         (genrtl_asm_stmt): Likewise.
8293         (genrtl_named_return_value): Likewise.
8294         (genrtl_begin_stmt_expr): Likewise.
8295         (genrtl_finish_stmt_expr): Likewise.
8296         (finish_for_stmt): Removed first argument and generate rtl
8297         specific code.
8298         (finish_switch_stmt): Likewise.
8299         (do_poplevel): Removed generate rtl specific code.
8300         (do_pushlevel): Likewise.
8301         (add_tree): Likewise.
8302         (finish_goto_stmt): Likewise.
8303         (finish_expr_stmt): Likewise.
8304         (begin_if_stmt): Likewise.
8305         (finish_if_stmt_cond): Likewise.
8306         (finish_then_clause): Likewise.
8307         (begin_else_clause): Likewise.
8308         (finish_else_clause): Likewise.
8309         (finish_if_stmt): Likewise.
8310         (clear_out_block): Likewise.
8311         (begin_while_stmt): Likewise.
8312         (finish_while_stmt_cond): Likewise.
8313         (finish_while_stmt): Likewise.
8314         (begin_do_stmt): Likewise.
8315         (finish_do_body): Likewise.
8316         (finish_do_stmt): Likewise.
8317         (finish_return_stmt): Likewise.
8318         (begin_for_stmt): Likewise.
8319         (finish_for_init_stmt): Likewise.
8320         (finish_for_cond): Likewise.
8321         (finish_for_expr): Likewise.
8322         (finish_break_stmt): Likewise.
8323         (finish_continue_stmt): Likewise.
8324         (begin_switch_stmt): Likewise.
8325         (finish_switch_cond): Likewise.
8326         (finish_case_label): Likewise.
8327         (begin_try_block): Likewise.
8328         (begin_function_try_block): Likewise.
8329         (finish_try_block): Likewise.
8330         (finish_cleanup_try_block): Likewise.
8331         (finish_cleanup): Likewise.
8332         (finish_function_try_block): Likewise.
8333         (finish_handler_sequence): Likewise.
8334         (finish_function_handler_sequence): Likewise.
8335         (begin_handler): Likewise.
8336         (finish_handler_parms): Likewise.
8337         (begin_catch_block): Likewise.
8338         (finish_handler): Likewise.
8339         (begin_compound_stmt): Likewise.
8340         (finish_compound_stmt): Likewise.
8341         (finish_asm_stmt): Likewise.
8342         (finish_label_stmt): Likewise.
8343         (finish_label_decl): Likewise.
8344         (finish_subobject): Likewise.
8345         (finish_decl_cleanup): Likewise.
8346         (finish_named_return_value): Likewise.
8347         (begin_stmt_expr): Likewise.
8348         (finish_stmt_expr): Likewise.
8349
8350         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
8351         to call genrtl_expr_stmt when appropriate.
8352
8353         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
8354         begin_compound_expr to call genrtl_begin_stmt_expr and
8355         genrtl_begin_compound_expr when appropriate.
8356         (finish_init_stmts): Changed calls to finish_compound_expr and
8357         finish_stmt_expr to call genrtl_finish_compound_expr and
8358         genrtl_finish_stmt_expr when appropriate.
8359         (expand_default_init): Changed call to finish_expr_stmt to call
8360         genrtl_expr_stmt when appropriate.
8361         (build_vec_init): Likewise.
8362
8363         * parse.y (simple_stmt): Removed first argument from call to
8364         finish_for_stmt. Removed first argument from call to
8365         finish_switch_stmt.
8366
8367         * parse.c: Regenerated.
8368
8369         * pt.c (tsubst_expr): Removed first argument from call to
8370         finish_for_stmt. Removed first argument from call to
8371         finish_switch_stmt.
8372
8373 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
8374
8375         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
8376         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
8377
8378         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
8379         (cplus_tree_code_length[]): Likewise.
8380         (cplus_tree_code_name[]): Likewise.
8381         (init_parse): Added call to add_c_tree_codes. Changed
8382         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
8383
8384 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
8385
8386         * cp-tree.h (finish_mem_initializers): Declare.
8387         (count_trees): Likewise.
8388         * parse.y (base_init): Use finish_mem_initializers.
8389         * semantics.c (finish_mem_initializers): New function.
8390
8391         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
8392         the number of trees.
8393         (n_trees): Remove.
8394         (count_trees): Don't use it.
8395
8396 2000-06-15  Jason Merrill  <jason@redhat.com>
8397
8398         * tree.c (count_trees): New debugging function.
8399
8400         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
8401         * init.c (build_member_call): Pull out the name of a DECL.
8402
8403         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
8404         * semantics.c (expand_body): Push to TV_INTEGRATION here.
8405         * optimize.c (optimize_function): Not here.
8406         * pt.c (instantiate_decl): Push to TV_PARSE.
8407
8408 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
8409
8410         * cp-tree.h (struct language_function): Remove x_base_init_list
8411         and x_member_init_list.
8412         (current_base_init_list): Remove.
8413         (current_member_init_list): Likewise.
8414         (setup_vtbl_ptr): Change prototype.
8415         (emit_base_init): Likewise.
8416         (expand_member_init): Likewise.
8417         (reinit_parse_for_function): Remove.
8418         * decl.c (save_function_data): Don't clear x_base_init_list and
8419         x_member_init_list.
8420         (mark_language_function): Don't mark them.
8421         * init.c (perform_member_init): Tweak comment.
8422         (sort_member_init): Take the list of initializers as an argument.
8423         (sort_base_init): Likewise.
8424         (emit_base_init): Likewise.
8425         (expand_member_init): Return the initializer.  Don't use global
8426         variables.
8427         * lex.c (reinit_parse_for_function): Remove.
8428         * method.c (build_template_parm_names): Correct substitution.
8429         (do_build_copy_constructor): Don't use current_member_init_list
8430         and current_base_init_list.
8431         (synthesize_method): Likewise.
8432         * parse.y (base_init): Split mem-initializers into
8433         base-initializers and field-initializers.
8434         (member_init_list): Build up the list here.
8435         (member_init): Return the initializer.
8436         (fn.depfn): Don't use reinit_parse_for_function.
8437         * parse.c: Regenerated.
8438         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
8439         ERROR_MARK.
8440         (tsubst_expr): Don't use current_member_init_list
8441         and current_base_init_list.
8442         (tsubst_expr_values): Rename to ...
8443         (tsubst_initializer_list): ... this.  Use convert_from_reference.
8444         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
8445         and current_base_init_list.
8446         (begin_function_definition): Don't call reinit_parse_for_function.
8447
8448         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
8449
8450         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
8451         correctly.
8452
8453         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
8454
8455 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
8456
8457         * cp-tree.h (IF_COND): Move to c-common.h.
8458         (THEN_CLAUSE): Likewise.
8459         (ELSE_CLAUSE): Likewise.
8460         (WHILE_COND): Likewise.
8461         (WHILE_BODY): Likewise.
8462         (DO_COND): Likewise.
8463         (DO_BODY): Likewise.
8464         (RETURN_EXPR): Likewise.
8465         (EXPR_STMT_EXPR): Likewise.
8466         (FOR_INIT_STMT): Likewise.
8467         (FOR_COND): Likewise.
8468         (FOR_EXPR): Likewise.
8469         (FOR_BODY): Likewise.
8470         (SWITCH_COND): Likewise.
8471         (SWITCH_BODY): Likewise.
8472         (CASE_LOW): Likewise.
8473         (CASE_HIGH): Likewise.
8474         (GOTO_DESTINATION): Likewise.
8475         (COMPOUND_BODY): Likewise.
8476         (ASM_CV_QUAL): Likewise.
8477         (ASM_STRING): Likewise.
8478         (ASM_OUTPUTS): Likewise.
8479         (ASM_INPUTS): Likewise.
8480         (ASM_CLOBBERS): Likewise.
8481         (DECL_STMT_DECL): Likewise.
8482         (STMT_EXPR_STMT): Likewise.
8483         (LABEL_STMT_LABEL): Likewise.
8484         (SCOPE_BEGIN_P): Likewise.
8485         (SCOPE_END_P): Likewise.
8486         (SCOPE_STMT_BLOCK): Likewise.
8487         (SCOPE_NULLIFIED_P): Likewise.
8488         (SCOPE_NO_CLEANUPS_P): Likewise.
8489         (SCOPE_PARTIAL_P): Likewise.
8490         (ASM_VOLATILE_P): Likewise.
8491         (STMT_LINENO): Likewise.
8492         (STMT_LINENO_FOR_FN_P): Likewise.
8493
8494         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
8495         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
8496         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
8497         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
8498         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
8499
8500         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
8501
8502         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
8503         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
8504
8505         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
8506         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
8507         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
8508
8509 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
8510
8511         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
8512         * class.c (dfs_find_final_overrider): Set it appropriately.
8513         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
8514         avoid unneeded secondary vptrs.
8515
8516 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
8517
8518         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
8519         (check_bitfield_decl, check_field_decl): Likewise.
8520         (build_vtbl_or_vbase_field, build_base_field): Likewise.
8521         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
8522         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
8523         (xfer_tag, finish_enum): Likewise.
8524         * decl2.c (finish_builtin_type): Likewise.
8525         * init.c (init_init_processing): Likewise.
8526         * pt.c (instantiate_class_template): Likewise.
8527         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
8528         * cp-tree.h (struct lang_type): Add user_align member.
8529         (CLASSTYPE_USER_ALIGN): Define.
8530
8531 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
8532
8533         * Make-lang.in (c++.install-common): Install g++-cross in
8534         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
8535         $(target_alias)-g++ and $(target_alias)-c++.
8536
8537 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
8538
8539         * class.c (vcall_offset_data_s): Add last_init and fns.
8540         (overrides): Rename to same_signature_p.
8541         (dfs_find_final_overrider): Adjust accordingly.
8542         (mark_overriders): Likewise.
8543         (warn_hidden): Likewise.
8544         (build_vtbl_initializer): Reorganize machinery for building things
8545         at negative offsets.
8546         (build_vcall_and_vbase_vtbl_entries): Likewise.
8547         (build_vbase_offset_vtbl_entries): Likewise.
8548         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
8549         offset entries.  Do not create two entries for functions with the
8550         same signature.
8551         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
8552         (build_rtti_vtbl_entries): Reorganize machinery for building things
8553         at negative offsets.
8554
8555         * optimize.c (expand_call_inline): Don't recurse into the code
8556         used to initialize the parameters more than once.
8557
8558 2000-06-11  Mark Mitchell <mark@codesourcery.com>
8559
8560         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
8561         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
8562         (find_substitution): Only use the `Sa' substitution for
8563         std::allocator, not instantiations of it.
8564         (write_template_prefix): Move comment.  Only use a TREE_LIST to
8565         represent substitutions for a member template.
8566         (write_array_type): Mangle array dimensions correctly.
8567         * optimize.c (maybe_clone_body): Copy more information from the
8568         cloned function.
8569         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
8570         on the regenerated declaration.
8571
8572 2000-06-11  Chip Salzenberg  <chip@valinux.com>
8573             Mark Mitchell <mark@codesourcery.com>
8574
8575         * class.c (build_vtable): Clarify comment.
8576         (build_ctor_vtbl_group): Pass the most derived type to
8577         build_vtable.
8578
8579 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8580
8581         * decl2.c (compare_options): Don't needlessly cast away const-ness.
8582
8583 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
8584
8585         * decl.c (add_binding): Handle duplicate declarations of external
8586         variables.
8587
8588 2000-06-09  Chip Salzenberg  <chip@valinux.com>
8589             Mark Mitchell <mark@codesourcery.com>
8590
8591         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
8592         argument.
8593         (write_signed_number): New macro.
8594         (write_unsigned_number): Likewise.
8595         (write_source_name): Use them.
8596         (write_number): Handle signed and unsigned values.
8597         (write_integer_cst): Use tree_int_cst_sgn, and use
8598         write_unsigned_number or write_signed_number as appropriate.
8599         (write_discriminator): Use write_unsigned_number or
8600         write_signed_number as appropriate.
8601         (write_template_arg_literal): Likewise.
8602         (write_array_type): Use tree_low_cst.
8603         (write_template_parm):  Use write_unsigned_number or
8604         write_signed_number as appropriate.
8605         (write_substitution): Adjust call to write_number.
8606         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
8607         (write_expression): Handle non-type template arguments of
8608         reference type correctly.
8609         (mangle_thunk): Use write_signed_number.
8610
8611 2000-06-09  Chip Salzenberg  <chip@valinux.com>
8612
8613         * mangle.c (find_substition): Don't mangle objects with typename
8614         substitutions (e.g. "cin" as "Si").
8615
8616 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
8617
8618         * call.c (add_candidate): Use ggc_alloc_cleared.
8619         * decl.c (lookup_label): Likewise.
8620         * lex.c (retrofit_lang_decl): Likewise.
8621
8622 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
8623
8624         * semantics.c (expand_body): Push to TV_EXPAND.
8625         * optimize.c (optimize_function): Push to TV_INTEGRATION.
8626         * decl.c (start_function): Always call announce_function.
8627
8628         * tinfo2.cc: Just declare abort.
8629
8630 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
8631
8632         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
8633         whenever @ is a symbolic name.
8634
8635 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
8636
8637         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
8638
8639 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
8640
8641         * decl.c (pushdecl): Look up functions by DECL_NAME, not
8642         DECL_ASSEMBLER_NAME.
8643
8644 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
8645
8646         * decl2.c (c_language): Define.
8647
8648 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
8649
8650         * lex.c (lang_init_options): Tweak.
8651
8652         * decl2.c: Remove #inclusion of diagnostic.h
8653         (lang_decode_option): Move diagnostic formatting options to
8654         toplevel.
8655
8656         * lang-options.h: Remove documentation for diagnostic options.
8657
8658         * Makefile.in (lex.o): Depends upon diagnostic.h
8659
8660 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
8661
8662         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
8663         the same DECL_RESULT, it's not a redefinition.
8664         * pt.c (tsubst_decl): Remove code to handle illegal
8665         specializations.
8666
8667 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
8668
8669         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
8670
8671 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
8672
8673         * search.c (maybe_suppress_debug_info): Don't check
8674         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
8675
8676         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
8677         here if extern_p.
8678
8679         Remember instantiation context in deferred instantiations.
8680         * cp-tree.h (struct tinst_level): Remove.
8681         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
8682         * pt.c (current_tinst_level): Now a tree.
8683         (print_template_context, push_tinst_level, pop_tinst_level,
8684         tinst_for_decl): Adjust.
8685         (reopen_tinst_level): New fn.
8686         (init_pt): Register current_tinst_level as a root.
8687         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
8688         of the pending templates list.
8689         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
8690         * lex.c (extract_interface_info): Adjust.
8691         * decl2.c (warn_if_unknown_interface): Adjust.
8692
8693 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
8694
8695         * class.c (indirect_primary_base_p): New function.
8696         (determine_primary_base): Use it.
8697
8698 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8699
8700         Update new-abi dynamic cast algorithm.
8701         * tinfo.cc (__class_type_info::__dyncast_result): Add
8702         whole_details. Adjust constructor.
8703         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
8704         Avoid unnecessary searching.
8705         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
8706
8707 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8708
8709         * decl.c (init_decl_processing): Don't call record_component_aliases.
8710         * tree.c (build_cplus_array_type_1): Likewise.
8711
8712 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
8713
8714         * ir.texi: Correct typo.
8715         * mangle.c (write_expression): Handle non-type template arguments
8716         with reference type.
8717         * method.c (build_overload_value): Likewise.
8718         * pt.c (convert_nontype_argument): Explicitly represent conversion
8719         to a reference with an ADDR_EXPR.
8720         (unify): Always unify arguments in left-to-right order.
8721
8722 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
8723             Mark Mitchell  <mark@codesourcery.com>
8724
8725         * Make-lang.in (CXX_SRCS): Add mangle.c.
8726         * Makefile.in (CXX_OBJS): Add mangle.o.
8727         (mangle.o): New rule.
8728
8729         * class.c (local_classes): New variable.
8730         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
8731         (get_vtt_name): Use mangle_vtt_name for new ABI.
8732         (init_class_processing): Initialize local_classes.
8733         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
8734         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
8735         (std_identifier): New macro.
8736         (DECL_VOLATILE_MEMFUNC_P): New macro.
8737         (DECL_NAMESPACE_STD_P): Likewise.
8738         (local_classes): Declare.
8739         (get_mostly_instantiated_function_type): Declare.
8740         (init_mangle): Declare.
8741         (mangle_decl): Likewise.
8742         (mangle_type_string): Likewise.
8743         (mangle_type): Likewise.
8744         (mangle_typeinfo_for_type): Likewise.
8745         (mangle_typeinfo_string_for_type): Likewise.
8746         (mangle_vtbl_for_type): Likewise.
8747         (mangle_vtt_for_type): Likewise.
8748         (mangle_ctor_vtbl_for_type): Likewise.
8749         (mangle_thunk): Likewise.
8750         (mangle_conv_op_name_for_type): Likewise.
8751         (mangle_guard_variable): Likewise.
8752         * decl.c (pushtag): Keep track of local classes.
8753         (initialize_predefined_identifiers): Initialize std_identifier.
8754         (init_decl_processing): Use std_identifier.
8755         (start_decl): Don't treat instantiations as specializations.
8756         (grokdeclarator): Likewise.
8757         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
8758         name for fully-instantiated templates.
8759         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
8760         destructors with the new ABI.
8761         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
8762         (grokfield): Use mangle_type for new ABI.
8763         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
8764         (get_sentry): Use mangle_guard_variable for new ABI.
8765         (start_static_initialization_or_destruction): Likewise.
8766         * expr.c (extract_aggr_init): Remove.
8767         (extract_scalar_init): Likewise.
8768         (extract_init): Remove #if 0'd code.
8769         * mangle.c: New function.
8770         * method.c (build_mangled_name): Assert not flag_new_abi.
8771         (build_static_name): Likewise.
8772         (build_decl_overload_real): Likewise.
8773         (build_typename_overload): Likewise.
8774         (build_overload_with_type): Likewise.
8775         (build_overload_name): Likewise.
8776         (get_ctor_vtbl_name): Likewise.
8777         (start_squangling): Likewise.
8778         (get_id_2): Likewise.
8779         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
8780         (init_method): Call init_mangle for new ABI.
8781         (make_thunk): Call mangle_thunk for new ABI.
8782         * operators.def: Correct new ABI manglings for the `%' operator.
8783         Add `::' operator.
8784         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
8785         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
8786         (lookup_template_class): Call mangle_decl for new ABI.
8787         (get_mostly_instantiated_function_type): New function.
8788         (set_mangled_name_for_template_decl): Use it.
8789         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
8790         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
8791         conversion op names.
8792         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
8793         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
8794         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
8795         mangle_typeinfo_string_for_type.
8796
8797 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
8798
8799         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
8800         (INNERMOST_TEMPLATE_ARGS): New macro.
8801         (innermost_args): Remove.
8802         (get_innermost_template_args): New function.
8803         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
8804         * error.c (dump_function_decl): Be caution when using
8805         most_general_template.
8806         * method.c (build_template_parm_names):  Use
8807         INNERMOST_TEMPLATE_ARGS.
8808         * pt.c (add_to_template_args): Tidy comment
8809         (get_innermost_template_args): New function.
8810         (check_explicit_specialization): Clear DECL_INITIAL for a new
8811         specialization.
8812         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
8813         Tidy.
8814         (push_template_decl): Always register specializations of the most
8815         general template.
8816         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
8817         (coerce_template_parms): Likewise.
8818         (lookup_template_class): Likewise.
8819         (innermost_args): Remove.
8820         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
8821         (tsubst_decl): Handle tricky specializations.  Use
8822         get_innermost_template_args.
8823         (instantiate_template): Simplify handling of partial
8824         instantiations.
8825         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
8826         (most_general_template): Reimplement, in a more straightforward
8827         manner.
8828         (regenerate_decl_from_template): Tweak formatting.  Use
8829         TMPL_ARGS_DEPTH for clarity.
8830         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
8831
8832         * dump.c (dequeue_and_dump): Dump information about thunks.
8833
8834 2000-06-01  Richard Henderson  <rth@cygnus.com>
8835
8836         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
8837
8838 2000-06-01  Richard Henderson  <rth@cygnus.com>
8839
8840         * decl2.c (unsupported_options): Fix typo, make const.
8841         (lang_decode_option): Fix bsearch argument order.
8842
8843 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
8844
8845         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
8846         on FIELD_DECLs.
8847
8848 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8849
8850         * cp-tree.h (c_get_alias_set): Deleted.
8851         * Makefile.in (decl.o): Include ../expr.h.
8852         * decl.c (expr.h): Include.
8853         (init_decl_processing): Call record_component_aliases for arrays.
8854         (grokdeclarator): Likewise.
8855         Set TREE_ADDRESSABLE for fields that aren't bitfields.
8856         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
8857
8858 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
8859
8860         Remove guiding declaration support.
8861         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
8862         (flag_guiding_decls): Remove.
8863         * call.c (build_user_type_conversion_1): Remove support for
8864         guiding decls.
8865         (build_new_function_call): Likewise.
8866         (build_new_op): Likewise.
8867         (build_new_method_call): Likewise.
8868         * decl.c (start_function): Likewise.
8869         * friend.c (is_friend): Likewise.
8870         (do_friend): Likewise.
8871         * decl2.c ((flag_dump_translation_unit): Make it const.
8872         (flag_guiding_decls): Remove.
8873         (unsupported_options): New variable
8874         (compare_options): New function.
8875         (lang_decode_option): Use them.
8876
8877         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
8878
8879         * method.c (mangle_expression): Adjust test for legal expression
8880         operators.
8881
8882         * pt.c (instantiate_decl): Save and restore the local
8883         specializations list.
8884
8885 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
8886
8887         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
8888
8889 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
8890
8891         * call.c (add_template_candidate_real): Handle member template
8892         constructors for classes with virtual bases.
8893         (build_user_type_conversion_1): Use in_charge_arg_for_name.
8894         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
8895
8896         * ir.texi: Update thunk documentation.
8897
8898         * call.c (joust): Fix handling of overloaded builtin operators.
8899
8900 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
8901
8902         * cp-tree.h (DECL_ANTICIPATED): New macro.
8903         Document new use of DECL_LANG_FLAG_7.
8904         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
8905         in the user namespace.
8906         * lex.c (do_identifier): If the identifier's declaration has
8907         DECL_ANTICIPATED on, it has not yet been declared.  But do not
8908         replace it with an ordinary implicit declaration.
8909
8910         * tinfo2.cc: Include stdlib.h.
8911
8912 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
8913
8914         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
8915         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
8916         CLASSTYPE_ALIGN.
8917
8918 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
8919
8920         * decl2.c (lang_decode_option): Use skip_leading_substring instead
8921         of plain strncmp.
8922
8923 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
8924
8925         * operators.def (<?): Duplicated, should have been...
8926         (>?): this.  Fixed.
8927
8928 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
8929             Mark Mitchell  <mark@codesourcery.com>
8930
8931         * cp-tree.h (ansi_opname): Make it a macro.
8932         (ansi_assopname): Likewise.
8933         (struct lang_decl_flags): Add assignment_operator_p.
8934         (struct lang_decl): Add operator_code.
8935         (DECL_VTT_PARM): Adjust.
8936         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
8937         overloaded operator.
8938         (SET_OVERLOADED_OPERATOR_CODE): New macro.
8939         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
8940         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
8941         (opname_tab): Remove.
8942         (assignop_tab): Likewise.
8943         (operator_name_info_t): New type.
8944         (operator_name_info): New variable.
8945         (assignment_operator_name_info): Likewise.
8946         (build_cp_library_fn): Remove declaration.
8947         (push_cp_library_fn): Likewise.
8948         (operator_name_string): Likewise.
8949         (build_decl_overload): Likewise.
8950         * call.c (print_z_candidates): Simplify.
8951         (build_object_call): Adjust usage of ansi_opname.  Use
8952         DECL_OVERLOADED_OPERATOR_P.
8953         (op_error): Adjust operator name lookup.
8954         (build_conditional_expr): Adjust usage of ansi_opname.
8955         (build_new_op): Likewise.
8956         (build_op_delete_call): Likewise.
8957         (build_over_call): Likewise.
8958         (joust): Use DECL_OVERLOADED_OPERATOR_P.
8959         * decl.c (duplicate_decls): Copy operator_code.
8960         (init_decl_processing): Adjust parameters to push_cp_library_fn.
8961         (builtin_function): Adjust parameters to build_library_fn_1.
8962         (build_library_fn_1): Accept an overloaded operator code.
8963         (build_library_fn): Pass ERROR_MARK.
8964         (build_cp_library_fn): Accept an overloaded operator code.
8965         (push_cp_library_fn): Likewise.
8966         (grokfndecl): Tweak.
8967         (grokdeclarator): Simplify code to compute names of overloaded
8968         operators.  Adjust use of ansi_opname.
8969         (ambi_op_p): Work on tree_codes, not identifiers.
8970         (unary_op_p): Likewise.
8971         (grok_op_properties): Likewise.
8972         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
8973         (lang_mark_tree): Don't try to mark the operator_code.
8974         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
8975         * error.c (dump_decl): Remove special handling for operator
8976         names.
8977         (dump_function_name): Likewise.
8978         (dump_expr): Adjust name lookup of operators.
8979         (op_to_string): Simplify.
8980         (assop_to_string): Likewise.
8981         * init.c (build_new_1): Adjust use of ansi_opname.
8982         * lex.c (opname_tab): Remove.
8983         (assignop_tab): Likewise.
8984         (ansi_opname): Likewise.
8985         (ansi_assopname): Likewise.
8986         (operator_name_string): Likewise.
8987         (reinit_lang_specific): Likewise.
8988         (operator_name_info): New variable.
8989         (assignment_operator_name_info): Likewise.
8990         (init_operators): New function.
8991         (init_parse): Use it.
8992         (do_identifier): Adjust use of ansi_opname.
8993         * method.c (mangle_expression): Don't use ansi_opname for
8994         mangling.
8995         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
8996         (build_decl_overload): Remove.
8997         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
8998         (do_build_assign_ref): Adjust use of ansi_opname.
8999         (synthesize_method): Likewise.
9000         (implicitly_declare_fn): Likewise.
9001         * operators.def: New file.
9002         * parse.y (operator): Adjust use of ansi_opname.
9003         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
9004         (set_mangled_name_for_template_decl): Don't play games with
9005         current_namespace.
9006         (special_function_p): Adjust use of ansi_opname.
9007         * typeck.c (check_return_expr): Likewise.
9008         * Make-lang.in (cc1plus): Depend on operators.def.
9009         * Makefile.in (lex.o): Likewise.
9010         (decl.o): Likewise.
9011
9012 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
9013
9014         * Make-lang.in (cplib2.ready): Eradicate.
9015
9016 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9017
9018         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
9019         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
9020         (built_min, cp_tree_equal): Likewise.
9021
9022 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
9023
9024         * class.c (layout_nonempty_base_or_field): Replace
9025         `record_layout_info' with `record_layout_info_s'.
9026
9027 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
9028
9029         Fix goto checking.
9030         * cp-tree.h (struct language_function): x_named_labels is now
9031         a struct named_label_list*.
9032         * decl.c (struct named_label_use_list): Renamed from...
9033         (struct named_label_list): ...this.  New struct.
9034         (push_binding_level): Don't set eh_region.
9035         (note_level_for_eh): New fn.
9036         (pop_label): Take label and old value directly.
9037         (pop_labels): Adjust for new named_labels format.
9038         (lookup_label): Likewise.
9039         (poplevel): Note characteristics of a binding level containing a
9040         named label.  Mess with named label lists earlier.
9041         (mark_named_label_lists): New fn.
9042         (mark_lang_function): Call it.
9043         (use_label): New fn, split out from...
9044         (make_label_decl): ...here.  Don't call it.
9045         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
9046         check_previous_gotos): New fns, split out from...
9047         (define_label): ...here.
9048         (check_switch_goto): New fn.
9049         (define_case_label): Call it.
9050         (check_goto): New fn.
9051         * semantics.c (finish_goto_stmt): Call it and use_label.
9052         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
9053         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
9054
9055 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
9056
9057         * class.c (build_vtable_entry_ref): Correct usage of
9058         get_vtbl_decl_for_binfo.
9059
9060         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
9061         * method.c (implicitly_declare_fn): Not here.
9062
9063 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
9064
9065         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
9066         (CPTI_PTMD_DESC_TYPE): ... here.
9067         (ptmd_desc_type_node): Rename to ...
9068         (ptm_desc_type_node): ... here.
9069         * decl.c: Likewise.
9070         * rtti.c (ptmd_initializer): Rename to ...
9071         (ptm_initializer): ... here.
9072         (sythesize_tinfo_var): Adjust. Deal with pointer to member
9073         function.
9074         (create_tinfo_types): Adjust.
9075
9076 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
9077
9078         Finish implementation of VTTs.
9079         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
9080         CPTI_VTT_PARM_IDENTIFIER.
9081         (vtt_parm_identifier): New macro.
9082         (vtt_parm_type): Likewise.
9083         (BINFO_SUBVTT_INDEX): Likewise.
9084         (BINFO_VPTR_INDEX): Likewise.
9085         (struct lang_decl): Add vtt_parm.
9086         (DECL_VTT_PARM): New macro.
9087         (DECL_USE_VTT_PARM): Likewise.
9088         (DECL_NEEDS_VTT_PARM_P): Likewise.
9089         (get_vtt_name): Declare.
9090         (build_artificial_parm): Likewise.
9091         (fixup_all_virtual_upcast_offsets): Likewise.
9092         (expand_indirect_vtbls_init): Remove.
9093         * call.c (build_new_method_call): Pass the vtt to subobject
9094         constructors and destructors.
9095         * class.c (get_vtt_name): Give it external linkage.
9096         (build_clone): Handle the magic VTT parameters for clones.
9097         (clone_function_decl): Fix typo in comment.
9098         (build_vtt): Keep track of the indices in the VTTs where various
9099         entities are stored.
9100         (build_vtt_inits): Likewise.
9101         (dfs_build_vtt_inits): Likewise.
9102         (build_ctor_vtbl_group): Tweak type of construction vtables.
9103         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
9104         primary bases, when building construction vtables.
9105         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
9106         (initialize_predefined_identifiers): Add vtt_parm_identifier.
9107         (init_decl_processing): Initialize vtt_parm_type.
9108         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
9109         (lang_mark_tree): Make vtt_parm.
9110         * decl2.c (build_artificial_parm): New function.
9111         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
9112         (grokclassfn): Use build_artificial_parm.
9113         * init.c (initialize_vtbl_ptrs): Call
9114         fixup_all_virtual_upcast_offsets directly.
9115         (perform_member_init): Use the complete subobject destructor for
9116         member cleanups.
9117         (build_vtbl_address): New function.
9118         (expand_virtual_init): Handle VTTs.
9119         * optimize (maybe_clone_body): Likewise.
9120         * search.c (fixup_all_virtual_upcast_offsets): Give it external
9121         linkage.
9122         (expand_indirect_vtbls_init): Remove.
9123         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
9124         * tree.c (make_binfo): Make them bigger.
9125
9126 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
9127
9128         * inc/cxxabi.h (__pbase_type_info): Define, based on
9129         __pointer_type_info.
9130         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
9131         (__pointer_to_member_type_info): Likewise.
9132         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
9133         (__pointer_to_member_type_info::__is_pointer_p): Remove.
9134         (__pointer_type_info::__do_catch): Rename to ...
9135         (__pbase_type_info::__do_catch): ... here. Adjust.
9136         (__pbase_type_info::__pointer_catch): Implement.
9137         (__pointer_type_info::__pointer_catch): Adjust.
9138         (__pointer_to_member_type_info::__pointer_catch): Adjust.
9139
9140 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
9141
9142         * tinfo.h (__user_type_info::contained_virtual_p): New
9143         predicate.
9144         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
9145         shaped hierarchy.
9146         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
9147         diamond shaped hierarchy. Add early out for mixed diamond and
9148         duplicate shaped hierarchy.
9149
9150 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
9151
9152         * cp-tree.h (build_delete): Change prototype.
9153         (build_vec_delete): Likewise.
9154         * call.c (build_scoped_method_call): Use special_function_kind
9155         values to indicate the kind of destruction to be done.
9156         (build_method_call): Likewise.
9157         * decl.c (finish_destructor_body): Likewise.
9158         (maybe_build_cleanup_1): Likewise.  Rename to ...
9159         (maybe_build_cleanup): ... this.
9160         * decl2.c (delete_sanity): Use special_function_kind
9161         values to indicate the kind of destruction to be done.
9162         (build_cleanup): Likewise.
9163         * init.c (perform_member_init): Likewise.
9164         (build_vec_delete_1): Likewise.
9165         (build_dtor_call): Simplify.
9166         (build_delete): Use special_function_kind
9167         values to indicate the kind of destruction to be done.
9168         (build_vbase_delete): Likewise.
9169         (build_vec_delete): Likewise.
9170
9171         * init.c (sort_member_init): Fix typo in error message generation
9172         code.
9173
9174 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
9175
9176         * semantics.c (begin_class_definition): make the packed
9177         attribute be sensitive to the "-fpack-struct" command line flag
9178
9179 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
9180
9181         Update new-abi upcast algorithm.
9182         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
9183         prototype and meaning of return value.
9184         (__si_class_type_info::__do_upcast): Likewise.
9185         (__vmi_class_type_info::__do_upcast): Likewise.
9186         * tinfo.cc (__class_type_info::__upcast_result): Replace
9187         whole2dst with part2dst. Adjust ctor.
9188         (__class_type_info::__do_upcast): Adjust call of worker function.
9189         (__class_type_info::__do_upcast): Adjust.
9190         (__si_class_type_info::__do_upcast): Adjust. Use parent's
9191         __do_upcast.
9192         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
9193         virtual base in diamond hierarchy bug.
9194
9195 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
9196
9197         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
9198         and bitfield to tinfo_fn_p.
9199         (DECL_TINFO_FN_P): Adjust.
9200         (SET_DECL_TINFO_FN_P): Likewise.
9201         (DECL_MUTABLE_P): Likewise.
9202         (DECL_C_BIT_FIELD): Likewise.
9203         (SET_DECL_C_BIT_FIELD): Likewise.
9204         (CLEAR_DECL_C_BIT_FIELD): Likewise.
9205         (DECL_UNINLINABLE): Likewise.
9206         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
9207         (handle_using_decl): Remove assertion.
9208         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
9209         to build FIELD_DECLs.
9210         (build_base_field): Likewise.
9211         (layout_class_type): Likewise.
9212         * decl.c (init_decl_processing): Likewise.
9213         (build_ptrmemfunc_type): Likewise.
9214         (grokdeclarator): Likewise.
9215         * decl2.c (grok_x_components): Likewise.
9216         * except.c (call_eh_info): Likewise.
9217         * init.c (init_init_processing): Likewise.
9218         * rtti.c (expand_class_desc): Likewise.
9219         (create_pseudo_type_info): Likewise.
9220         (get_vmi_pseudo_type_info): Likewise.
9221         (create_tinfo_types): Likewise.
9222         * ptree.c (print_lang_decl): Adjust.
9223         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
9224         before checking DECL_MUTABLE_P.
9225
9226         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
9227         parameters for template functions.
9228         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
9229         destructors as well as constructors.
9230
9231 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
9232
9233         * class.c (build_ctor_vtbl_group): Set inits.
9234         * optimize.c (maybe_clone_body): Set DECL_INLINE and
9235         DECL_THIS_INLINE appropriately for clones.
9236
9237         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
9238         (DECL_CONV_FN_P): Simplify.
9239         (DECL_OPERATOR): Remove.
9240         (language_to_string): Declare.
9241         * decl.c (duplicate_decls): Fix typo in comment.
9242         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
9243         (grok_op_properties): Use DECL_CONV_FN_P instead of
9244         IDENTIFIER_TYPENAME_P.
9245         * dump.c (dequeue_and_dump): Dump the language linkage of
9246         declarations.
9247         * error.c (language_to_string): Give it external linkage.
9248         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
9249         (implicitly_declare_fn): Set DECL_LANGUAGE.
9250         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
9251         IDENTIFIER_TYPENAME_P.
9252         (tsubst_decl): Likewise.
9253         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
9254         * semantics.c (finish_member_declaration): Don't mark members of
9255         classes declared in an extern "C" region as extern "C".
9256
9257 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9258
9259         * decl2.c (qualified_lookup_using_namespace): Look through
9260         namespace aliases.
9261
9262         * decl.c (push_using_decl): Return the old decl on namespace level.
9263
9264 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
9265
9266         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
9267         (VTT_NAME_PREFIX): New macro.
9268         (CTOR_VTBL_NAME_PREFIX): Likewise.
9269         (get_ctor_vtbl_name): New function.
9270         * class.c (get_vtable_name): Simplify.
9271         (get_vtt_name): New function.
9272         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
9273         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
9274         when a virtual base becomes primary.
9275         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
9276         VTTs.
9277         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
9278         additional parameters.
9279         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
9280         (initialize_array): New function.
9281         (build_vtt): Likewise.
9282         (build_vtt_inits): Likewise.
9283         (dfs_build_vtt_inits): Likewise.
9284         (dfs_fixup_binfo_vtbls): Likewise.
9285         (build_ctor_vtbl_group): Likewise.
9286         (initialize_vtable): Use initialize_array.
9287         (accumulate_vtbl_inits): Reimplement to handle construction
9288         vtables.
9289         (dfs_accumulate_vtbl_inits): Likewise.
9290         (bulid_vtbl_initializer): Adjust parameter name.
9291         * method.c (build_typename_overload): Remove #if 0'd code.
9292         (get_ctor_vtbl_name): New function.
9293         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
9294         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
9295
9296         * cp-tree.h (struct lang_type): Remove search_slot.
9297         (CLASSTYPE_SEARCH_SLOT): Remove.
9298         (emit_base_init): Change prototype.
9299         (initialize_vtbl_ptrs): Likewise.
9300         (expand_indirect_vtbls_init): Likewise.
9301         (clear_search_slots): Remove.
9302         * decl.c (lang_mark_tree): Don't mark search_slot.
9303         * init.c (initialize_vtbl_ptrs): Simplify.
9304         (emit_base_init): Likewise.
9305         * search.c (struct vbase_info): Document decl_ptr.
9306         (convert_pointer_to_single_level): Remove.
9307         (dfs_find_vbases): Remove.
9308         (dfs_init_base_pointers): Simplify.
9309         (dfs_clear_vbase_slots): Remove.
9310         (dfs_vtable_path_unmark): New function.
9311         (init_vbase_pointers): Simplify.
9312         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
9313         (expand_indirect_vtbls_init): Simplify.  Don't call
9314         mark_all_temps_used.
9315         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
9316         initialize_vtbl_ptrs.
9317
9318 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
9319
9320         * except.c: Add static prototypes.
9321
9322 2000-05-20  H.J. Lu  <hjl@gnu.org>
9323
9324         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
9325
9326 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
9327
9328         Don't create a separate copy of virtual bases for the
9329         CLASSTYPE_VBASECLASSES list.
9330         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
9331         (BINFO_FOR_VBASE): Remove.
9332         (CANONICAL_BINFO): Adjust.
9333         (binfo_for_vbase): New function.
9334         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
9335         instead of BINFO_FOR_VBASE.
9336         (build_vbase_pointer): Likewise.
9337         (build_secondary_vtable): Likewise.
9338         (dfs_mark_primary_bases): Likewise.
9339         (mark_primary_bases): Likewise.
9340         (layout_nonempty_base_or_field): Likewise.
9341         (dfs_set_offset_for_shared_vbases): Likewise.
9342         (dfs_set_offset_for_unshared_vbases): Likewise.
9343         (layout_virtual_bases): Likewise.  Adjust for changes to the
9344         CLASSTYPE_VBASECLASSES list.
9345         (dump_class_hierarchy_r): Use binfo_for_vbase
9346         instead of BINFO_FOR_VBASE.
9347         (dump_class_hierarchy): Likewise.
9348         (finish_vtbls): Likewise.
9349         (build_vtbl_initializer): Adjust for changes to the
9350         CLASSTYPE_VBASECLASSES list.
9351         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
9352         * decl.c (finish_destructor_body): Adjust for changes to the
9353         CLASSTYPE_VBASECLASSES list.
9354         * init.c (sort_base_init): Use binfo_for_vbase.
9355         (construct_virtual_bases): Adjust for changes to the
9356         CLASSTYPE_VBASECLASSES list.
9357         (expand_member_init): Use binfo_for_vbase.
9358         (build_vbase_delete):  Adjust for changes to the
9359         CLASSTYPE_VBASECLASSES list.
9360         * method.c (do_build_copy_constructor): Likewise.
9361         * rtti.c (get_base_offset): Use binfo_for_vbase.
9362         (expand_class_desc): Remove #if 0'd code.
9363         * search.c (struct vbase_info): Remove vbase_types.
9364         (get_base_distance):  Use binfo_for_vbase.
9365         (lookup_field_queue_p): Use CANONICAL_BINFO.
9366         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
9367         (get_pure_virtuals): Adjust for changes to the
9368         CLASSTYPE_VBASECLASSES list.
9369         (dfs_find_vbases): Use binfo_for_vbase.
9370         (dfs_init_vbase_pointers): Likewise.
9371         (init_vbase_pointers): Don't initialize vi.vbase_types.
9372         (virtual_context): Use binfo_for_vbase.
9373         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
9374         CLASSTYPE_VBASECLASSES list.
9375         (expand_indirect_vtbls_init): Simplify.
9376         (dfs_get_vbase_types): Don't replicate virtual bases.
9377         (find_vbase_instance): Use binfo_for_vbase.
9378         (binfo_for_vbase): New function.
9379         * typeck.c (get_delta_difference): Use binfo_for_vbase.
9380
9381 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
9382
9383         * decl2.c (finish_anon_union): Generalize error messages to handle
9384         anonymous structures.
9385         * init.c (perform_member_init): Remove `name' parameter.
9386         (build_field_list): New function.
9387         (sort_member_init): Handle anonymous union initialization order
9388         correctly.  Check for multiple initializations of the same union.
9389         (emit_base_init): Don't look up fields by name here.
9390         (expand_member_init): Record the result of name lookup for future
9391         reference.
9392         * typeck.c (build_component_ref): Fix formatting.
9393
9394 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
9395
9396         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
9397         * typeck.c (build_x_compound_expr): Replace warn_unused with
9398         warn_unused_value.
9399
9400         * decl2.c (lang_decode_option): Update -Wall unused flags by
9401         calling set_Wunused.
9402
9403 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
9404
9405         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
9406         * init.c (dfs_vtable_path_unmark): Remove.
9407         * search.c (marked_new_vtable_p): Likewise.
9408         (unmarked_new_vtable_p): Likewise.
9409         (dfs_search_slot_nonempty_p): Likewise.
9410         (dfs_mark): Likewise.
9411         (dfs_vtable_path_unmark): Likewise.
9412         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
9413         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
9414         (dfs_init_vbase_pointers): Remove special-case new ABI code.
9415         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
9416         (init_vbase_pointers): Simplify.
9417         (expand_indirect_vtbls_init): Likewise.
9418
9419         * class.c (copy_virtuals): New function.
9420         (build_primary_table): Use it.
9421         (build_secondary_vtable): Likewise.
9422         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
9423         indicate that no vcall offset is required.
9424         (add_virtual_function): Likewise.
9425         (modify_all_vtables): Likewise.
9426         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
9427         (dfs_accumulate_vtbl_inits): Likewise.
9428         (build_vtbl_initializer): Make changes to handle construction
9429         vtables.
9430         (dfs_build_vcall_offset_vtbl_entries): Likewise.
9431         (build_rtti_vtbl_entries): Likewise.
9432         (build_vtable_entries): Handle a NULL vcall_index.
9433
9434 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
9435
9436         * decl2.c (lang_decode_option): Fix thinko.
9437
9438 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
9439
9440         * except.c (check_handlers): New fn.
9441         * cp-tree.h: Declare it.
9442         * semantics.c (finish_handler_sequence): Call it.
9443         (finish_function_handler_sequence): Likewise.
9444         (finish_handler_parms): Set TREE_TYPE on the handler.
9445         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
9446         * search.c (get_base_distance_recursive): If protect>1, ignore
9447         special access.
9448         (get_base_distance): Don't reduce watch_access.
9449
9450 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
9451
9452         * lex.c: #include diagnostic.h.
9453         (lang_init_options): Set default prefixing rules.
9454
9455         * lang-options.h: Add -fdiagnostics-show-location=.
9456
9457         * decl2.c: #include diagnostic.h.
9458         (lang_decode_option): Handle -fdiagnostics-show-location=.
9459
9460 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
9461
9462         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
9463         * vec.cc: Revert my 2000-05-07 change.
9464
9465 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
9466
9467         * class.c (check_field_decls): Complain about non-static data
9468         members with same name as class in class with constructor.
9469
9470 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
9471
9472         * decl.c (grokdeclarator): Allow non-static data members with
9473         same name as class.
9474
9475 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
9476
9477         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
9478         and pending_inline.filename.  Update prototypes.
9479         * decl.c (define_label): Constify filename parameter.
9480         * decl2.c (warn_if_unknown_interface): Constify local char *.
9481         * input.c Constify input_source.filename. Don't declare
9482         input_filename or lineno.  Constify filename parameter to feed_input.
9483         * lex.c (init_parse): Constify parameter and return value.
9484         (cp_pragma_interface, cp_pragma_implementation): Constify
9485         filename argument.
9486         (reinit_parse_for_method, reinit_parse_for_block,
9487         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
9488         Constify local char *.
9489         * pt.c: Don't declare lineno or input_filename.
9490         (print_template_context, tsubst_friend_function, tsubst_decl,
9491         tsubst, instantiate_decl): Constify local char *.
9492         * semantics.c (expand_body): Constify local char *.
9493         * tree.c (build_srcloc): Constify filename parameter.
9494         * typeck.c (c_expand_asm_operands): Constify filename
9495         parameter.
9496
9497 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
9498
9499         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
9500         offsetof expansion.
9501
9502 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
9503
9504         * inc/cxxabi.h:  Fix typos in comment.
9505         (__base_class_info::__offset): Use a static_cast.
9506
9507 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
9508
9509         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
9510         of std::size_t and std::ptrdiff_t respectively.
9511         * tinfo.cc: Likewise.
9512         * vec.cc: Likewise.
9513
9514 2000-05-06  Richard Henderson  <rth@cygnus.com>
9515
9516         * typeck.c (build_c_cast): Don't warn integer->pointer size
9517         mismatch for constants.
9518
9519 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
9520
9521         * rtti.c (ptmd_initializer): Set non-public, if class is
9522         incomplete.
9523
9524         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
9525         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
9526         __cxa_vec_delete): Likewise.
9527         * tinfo.cc (__dynamic_cast): Likewise.
9528         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
9529         __cxa_vec_delete): Likewise.
9530
9531 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
9532
9533         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
9534         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
9535         (lang_decl_flags): Add vcall_offset.
9536         (THUNK_VCALL_OFFSET): Use it.
9537         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
9538         * method.c (make_thunk): Create the lang_decl here, not in
9539         emit_thunk.
9540         (emit_thunk): Make generic thunks into ordinary functions once
9541         they have been fed to expand_body.
9542         * semantics.c (expand_body): Set current_function_is_thunk here.
9543
9544 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9545
9546         * class.c (update_vtable_entry_for_fn): Prototype.
9547
9548         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
9549         and `tmpl'.
9550
9551         * search.c (dfs_build_inheritance_graph_order): Prototype.
9552
9553 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
9554
9555         * cp-tree.h (special_function_kind): Add various kinds of
9556         destructors.
9557         (special_function_p): New function.
9558         * class.c (overrides): Don't let one kind of destructor override
9559         another.
9560         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
9561         whether or not to instantiate a template.
9562         * tree.c (special_function_p): Define.
9563
9564 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
9565
9566         * cp-tree.def (THUNK_DECL): Remove.
9567         * cp-tree.h (DECL_THUNK_P): New macro.
9568         (DECL_NON_THUNK_FUNCTION_P): Likewise.
9569         (DECL_EXTERN_C_FUNCTION_P): Likewise.
9570         (SET_DECL_THUNK_P): Likewise.
9571         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
9572         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
9573         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
9574         * decl.c (decls_match): Use DECL_EXTERN_C_P.
9575         (duplicate_decls): Likewise.
9576         (pushdecl): Likewise.  Adjust thunk handling.
9577         (grokfndecl): Use DECL_EXTERN_C_P.
9578         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
9579         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
9580         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
9581         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
9582         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
9583         DECL_NO_STATIC_CHAIN.
9584         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
9585         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
9586         * search.c (covariant_return_p): Remove THUNK_DECL handling.
9587         * ir.texi: Update.
9588
9589 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
9590
9591         * tree.c (walk_tree): Set lineno.
9592
9593 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
9594
9595         * exception.cc: Update license notice.
9596         * new.cc: Likewise.
9597         * new1.cc: Likewise.
9598         * new2.cc: Likewise.
9599         * tinfo.cc: Likewise.
9600         * tinfo2.cc: Likewise.
9601         * vec.cc: Likewise.
9602         * inc/cxxabi.h: Likewise.
9603         * inc/exception: Likewise.
9604         * inc/new: Likewise.
9605         * inc/new.h: Likewise.
9606         * inc/typeinfo: Likewise.
9607
9608 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
9609
9610         * tree.c (build_target_expr_with_type): If we already have a
9611         TARGET_EXPR, just return it.
9612
9613         * optimize.c (initialize_inlined_parameters): Don't generate an
9614         EXPR_STMT if we can just use DECL_INITIAL.
9615         * decl.c (emit_local_var): Only make the initialization a
9616         full-expression if stmts_are_full_exprs_p.
9617
9618 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
9619
9620         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
9621         macro.
9622         * call.c (standard_conversion): Use it.
9623         (direct_reference_binding): Likewise.
9624         (build_over_call): Likewise.
9625         (is_properly_derived_from): Likewise.
9626         (compare_ics): Likewise.
9627         * class.c (resolves_to_fixed_type_p): Likewise.
9628         * optimize.c (declare_return_variable): Likewise.
9629         * pt.c (is_specialization_of): Likewise.
9630         (unify): Likewise.
9631         * typeck.c (comp_target_parms): Likeiwse.
9632         (build_static_cast): Likewise.
9633         (build_reinterpret_cast): Likewise.
9634         (build_const_cast): Likewise.
9635         (comp_ptr_ttypes_real): Likewise.
9636         (comp_ptr_ttypes_const): Likewise.
9637         * typeck2.c (process_init_constructor): Likewise.
9638
9639 2000-04-30  Scott Snyder <snyder@fnal.gov>
9640
9641         * decl.c (finish_destructor_body): Use the base destructor when
9642         destroying virtual bases.
9643
9644 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
9645
9646         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
9647         STMT_EXPRs.
9648         * optimize.c (struct inline_data): Add target_exprs field.
9649         (declare_return_variable): When a function returns an aggregate,
9650         use the variable declared in the TARGET_EXPR as the remapped
9651         DECL_RESULT.
9652         (expand_call_inline): Update the pending target_exprs stack.
9653         (optimize_function): Initialize the stack.
9654
9655         * decl2.c (finish_file): Fix typo in comment.
9656
9657         * method.c (emit_thunk): Don't try to return a `void' value.
9658
9659         * optimize.c (initialize_inlined_parameters): If the parameter is
9660         addressable, we need to make a new VAR_DECL, even if the
9661         initializer is constant.
9662
9663 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
9664
9665         * decl.c (grok_op_properties): Add an extra check of argtypes.
9666
9667 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
9668
9669         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
9670         variables.
9671         (initialize_inlined_parameters): Try to avoid creating new
9672         VAR_DECLs.
9673
9674 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
9675
9676         * lex.c (my_get_run_time): Remove.
9677         (init_filename_times): Use get_run_time instead of my_get_run_time.
9678         (check_newline): Likewise.
9679         (dump_time_statistics): Likewise.
9680         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
9681         of computing elapsed time explicitly.
9682
9683 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
9684
9685         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
9686         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
9687         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
9688         before calling decl_constant_value.
9689         * class.c (check_bitfield_decl): Likewise.
9690         * cvt.c (ocp_convert): Likewise.
9691         (convert): Likewise.
9692         * decl.c (compute_array_index_type): Likewise.
9693         (build_enumerator): Likewise.
9694         * decl2.c (check_cp_case_value): Likewise.
9695         * pt.c (convert_nontype_argument): Likewise.
9696         (tsubst): Likewise.
9697         * typeck.c (decay_conversion): Likewise.
9698         (build_compound_expr): Likewise.
9699         (build_reinterpret_cast): Likewise.
9700         (build_c_cast): Likewise.
9701         (convert_for_assignment): Likewise.
9702
9703 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
9704
9705         * decl.c (finish_function): Don't play games with DECL_INLINE.
9706
9707 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
9708
9709         * ir.texi: Correct typo.
9710
9711 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9712
9713         * decl.c (grokdeclarator): Reject VLAs as members.
9714
9715 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
9716
9717         * call.c (standard_conversion): Accept conversion between
9718         COMPLEX_TYPEs.
9719
9720         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
9721
9722 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
9723
9724         * decl2.c (finish_file): Remove double setup for accounting
9725         compile time.
9726
9727 2000-04-24  Robert Lipe <robertlipe@usa.net>
9728
9729         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
9730
9731 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
9732
9733         * new.cc (set_new_handler): Needs to be in std::.
9734
9735 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
9736
9737         * cp-tree.h (lang_decl): Remove pretty_function_p.
9738         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
9739         language-specific node.
9740         * decl.c (cp_make_fname_decl): Use build_decl, not
9741         build_lang_decl, to build the variables.
9742         (grokvardecl): Don't call build_lang_decl for local variables in
9743         templates.
9744         (grokdeclarator): Don't call build_lang_decl for local type
9745         declarations in templates.
9746         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
9747         zero'd memory, rather than calling memset.
9748         * pt.c: Include hashtab.h.
9749         (local_specializations): New variable.
9750         (retrieve_local_specialization): Use it.
9751         (register_local_specialization): Likewise.
9752         (tsubst_decl): Don't assume local variables have
9753         DECL_LANG_SPECIFIC.
9754         (instantiate_decl): Set up local_specializations.
9755         * Makefile.in (HTAB_H): New variable.
9756
9757 2000-04-23  Richard Henderson  <rth@cygnus.com>
9758
9759         * typeck.c (c_expand_asm_operands): Restore the original
9760         contents of the output list.
9761
9762 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
9763
9764         * ir.texi:  Document complex number representation.
9765
9766 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
9767
9768         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
9769         (target_incomplete_p): New function.
9770         (tinfo_base_init): Create comdat NTBS name variable.
9771         (ptr_initializer): Add non_public parameter. Calculate it.
9772         (ptmd_initializer): Likewise.
9773         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
9774         (create_real_tinfo_var): Add non_public parameter. Use it.
9775         Push proxy into global namespace.
9776         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
9777         New enumeration.
9778         * inc/typeinfo (type_info::before, type_info::operator==):
9779         Compare __name addresses.
9780
9781         * tinfo2.cc: Remove new-abi builtins comment.
9782
9783 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
9784
9785         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
9786
9787         * call.c (joust): Exit early if we get the same function, too.
9788
9789         * decl2.c (key_method): Return NULL_TREE for template classes.
9790         (import_export_class): Don't need to check for template classes.
9791
9792 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
9793
9794         * lex.c: Remove references to cccp.c.
9795
9796 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
9797
9798         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
9799         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
9800         (DECL_DESTRUCTOR_P): Use destructor_attr.
9801         (DECL_CONST_MEMFUNC_P): Reimplement.
9802         (DECL_VOLATILE_MEMFUNC_P): Remove.
9803         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
9804         (overrides): Use DECL_DESTRUCTOR_P.
9805         (check_for_override): Likewise.
9806         * decl.c (start_function): Likewise.
9807         * decl2.c (grokfclassfn): Likewise.
9808         (check_classfn): Likewise.
9809         (grok_function_init): Likewise.
9810
9811 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
9812
9813         * decl2.c (grokfield): Issue error on illegal data member
9814         declaration.
9815
9816 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
9817
9818         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
9819
9820 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
9821
9822         * class.c (build_vtable_entry): Don't build thunks for type-info
9823         functions.
9824
9825 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
9826
9827         * decl.c (decls_match): Allow a redeclaration of a builtin to
9828         specify args while the builtin did not.
9829
9830 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
9831
9832         * cp-tree.def (THUNK_DECL): Add to documentation.
9833         * cp-tree.h (flag_huge_objects): Declare.
9834         * class.c (modify_vtable_entry): Tidy.
9835         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
9836         Calculate delta appropriately for the new ABI.
9837         (dfs_modify_vtables): Use it.
9838         (modify_all_vtables): Fix thinko in code to add overriding copies
9839         of functions to primary vtables.
9840         (build_clone): Fix typo in comment.
9841         (clone_function_decl): Correct order of destructors in vtable.
9842         (build_vbase_offset_vtbl_entries): Adjust comment.
9843         (dfs_vcall_offset_queue_p): Remove.
9844         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
9845         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
9846         (build_vtable_entry): Correct check for pure virtual functions.
9847         Don't declare flag_huge_objects.
9848         * decl.c (flag_huge_objects): Remove declaration.
9849         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
9850         Use int_size_in_bytes.
9851         (emit_thunk): Handle vcall offset thunks.
9852
9853 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9854
9855         * decl2.c (parse_time, varconst_time): Delete declarations.
9856         (finish_file): Delete LINENO declaration.
9857         START_TIME and THIS_TIME now long.
9858
9859 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
9860
9861         * class.c (build_base_field): Reformat comment.
9862
9863         * inc/cxxabi.h (stddef.h): Comment inclusion.
9864         (__base_class_info::__offset): Comment shift.
9865
9866 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
9867
9868         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
9869         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
9870         (cp_push_exception_identifier): New macro.
9871         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
9872         (DECL_BASE_DESTRUCTOR_P): Likewise.
9873         (DECL_DELETING_DESTRUCTOR_P): Likewise.
9874         (get_vtbl_decl_for_binfo): Fix formatting.
9875         (in_charge_arg_for_name): New macro.
9876         (maybe_build_cleanup_and_delete): Remove declaration.
9877         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
9878         (in_charge_arg_for_name): New function.
9879         (build_new_method_call): Use it.  Handle cloned destructors.
9880         (build_clone): Don't make the base constructor virtual.
9881         Automatically defer generated functions.
9882         (clone_function_decl): Handle destructors, too.
9883         (clone_constructors_and_destructors): Likewise.
9884         (create_vtable_ptr): Don't create a vtable entry for a cloned
9885         function.
9886         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
9887         (initialize_predefined_identifiers): Update appropriately.
9888         (finish_destructor_body): Simplify.
9889         (maybe_build_cleanup_and_delete): Remove.
9890         * except.c (expand_throw): Handle new-ABI destructors.
9891         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
9892         (build_dtor_call): New function.
9893         (build_delete): Use it.  Simplify.
9894         * optimize.c (maybe_clone_body): Handle destructors.
9895         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
9896
9897         * exception.cc (cleanup_fn): New typedef.
9898         (CALL_CLEANUP): New macro.
9899         (cp_eh_info): Use them.
9900         (__cp_push_exception): Likewise.
9901         (__cp_pop_exception): Likewise.
9902
9903 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
9904
9905         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
9906         (complete_dtor_identifier): New macro.
9907         (CLASSTYPE_FIRST_CONVERSION): Remove.
9908         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
9909         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
9910         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
9911         (CLASSTYPE_CONSTRUCTORS): Likewise.
9912         (CLASSTYPE_DESTRUCTORS): Likewise.
9913         (lang_decl): Add cloned_function.
9914         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
9915         (DECL_BASE_CONSTRUCTOR_P): Likewise.
9916         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
9917         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
9918         (DECL_CLONED_FUNCTION_P): Likewise.
9919         (DECL_CLONED_FUNCTION): Likewise.
9920         (clone_function_decl): Declare.
9921         (maybe_clone_body): Likewise.
9922         * call.c (build_user_type_conversion_1): Call complete object
9923         constructors in the new ABI.
9924         (build_new_method_call): Don't add in-charge parameters under the
9925         new ABI.
9926         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
9927         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
9928         CLASSTYPE_DESTRUCTOR_SLOT.
9929         (build_clone): New function.
9930         (clone_function_decl): Likewise.
9931         (clone_constructors_and_destructors): Likewise.
9932         (check_bases_and_members): Use it.
9933         * decl.c (iniitialize_predefined_identifiers): Initialize
9934         complete_dtor_identifier.
9935         (finish_function): Don't add extra code to a clone.
9936         (lang_mark_tree): Mark cloned_function.
9937         * decl2.c (mark_used): Don't bother trying to instantiate things
9938         we synthesized.
9939         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
9940         * method.c (set_mangled_name_for_decl): Don't treat clones as
9941         constructors.
9942         (synthesize_method): Sythesize cloned functions, not the clones.
9943         * optimize.c (inline_data): Update comment on ret_label.
9944         (remap_block): Don't assume DECL_INITIAL exists.
9945         (copy_body_r): Allow ret_label to be NULL.
9946         (maybe_clone_body): Define.
9947         * pt.c (tsubst_decl): Handle clones.
9948         (instantiate_clone): New function.
9949         (instantiate_template): Use it.
9950         (set_mangled_name_for_template_decl): Don't treat clones as
9951         constructors.
9952         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
9953         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
9954         * semantics.c (expand_body): Clone function bodies as necessary.
9955
9956         * optimize.c (remap_decl): Avoid sharing structure for arrays
9957         whose size is only known at run-time.
9958         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
9959
9960         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
9961         to has_in_charge_parm_p.
9962         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
9963         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
9964         (DECL_COPY_CONSTRUCTOR_P): New macro.
9965         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
9966         (build_user_type_conversion_1): Likewise.
9967         (convert_like_real): Likewise.
9968         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
9969         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
9970         (copy_args_p): Likewise.
9971         (grok_ctor_properties): Likewise.
9972         (start_function): Likewise.
9973         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
9974         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
9975         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
9976         * method.c (do_build_copy_constructor): Use
9977         DECL_HAS_IN_CHARGE_PARM_P.
9978         (synthesize_method): Likewise.
9979         * pt.c (instantiate_template): Remove goto.
9980         * tree.c (build_cplus_method_type): Remove mention of obstacks in
9981         comment.
9982
9983         * cp-tre.h (finish_function): Change prototype.
9984         * decl.c (end_cleanup_fn): Adjust caller.
9985         (finish_function): Take only one parameter.
9986         * decl2.c (finish_objects): Adjust caller.
9987         (finish_static_storage_duration_function): Likewise.
9988         * method.c (emit_thunk): Likewise.
9989         * parse.y: Likewise.
9990         * parse.c: Regenerated.
9991         * pt.c (instantiate_decl): Likewise.
9992         * rtti.c (synthesize_tinfo_fn): Likewise.
9993         * semantics.c (expand_body): Likewise.
9994
9995         * cp-tree.h (copy_decl): New function.
9996         * class.c (finish_struct_1): Use it.
9997         * lex.c (copy_decl): Define it.
9998         * pt.c (tsubst_decl): Likewise.
9999         * tree.c (copy_template_template_parm): Likewise.
10000
10001         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
10002         has_nonpublic_assign_ref.
10003         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
10004         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
10005         * class.c (finish_struct_methods): Don't set
10006         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
10007         (interface_only): Don't declare.
10008         (interface_unknown): Likewise.
10009
10010 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10011
10012         * tree.h (HAVE_TEMPLATES): Remove definition.
10013         * lang-options.h (-fthis-is-variable): Remove documentation.
10014
10015 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
10016
10017         * class.c (instantiate_type): Handle object-relative template-id.
10018
10019         * semantics.c (finish_expr_stmt): Call convert_to_void here.
10020         * decl.c (cplus_expand_expr_stmt): Not here.
10021
10022         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
10023         Initialize exprtype earlier.
10024
10025         * parse.y (fn.def1): Check for defining types in return types.
10026
10027         * decl.c (check_tag_decl): Notice extra fundamental types.
10028         Diagnose empty decls in classes, too.
10029
10030         * decl.c (grokdeclarator): Don't override an anonymous name if no
10031         declarator was given.
10032
10033         * cvt.c (convert_to_void): Call resolve_offset_ref.
10034
10035         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
10036
10037         * decl2.c (decl_namespace): Handle getting a type.
10038
10039         * typeck.c (build_c_cast): Re-enable warning for cast between
10040         pointer and integer of different size.
10041
10042 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
10043
10044         * inc/cxxabi.h (__pointer_type_info): Add restrict and
10045         incomplete flags.
10046         (__pointer_type_info::__pointer_catch): New virtual function.
10047         (__pointer_to_member_type_info): Derive from
10048         __pointer_type_info. Adjust.
10049         (__pointer_to_member_type_info::__do_catch): Remove.
10050         (__pointer_to_member_type_info::__is_pointer_p): Declare.
10051         (__pointer_to_member_type_info::__pointer_catch): Declare.
10052         * rtti.c (qualifier_flags): Add restrict flag.
10053         (ptmd_initializer): Reorder members.
10054         (create_tinfo_types): Expand comments. Reorder
10055         ptmd_desc_type_node members.
10056         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
10057         Implement.
10058         (__pointer_type_info::__do_catch): Move specific code into
10059         __pointer_catch. Call it.
10060         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
10061         specific catch checking. Fix void conversion check.
10062         (__pointer_to_member_type_info::__do_catch): Remove.
10063         (__pointer_to_member_type_info::__pointer_catch): Implement.
10064
10065 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10066
10067         * lex.c (init_parse): Remove traces of classof and headof.
10068         * decl2.c (flag_operator_names): Default to 1.
10069         (lang_decode_option): Do not set it for -ansi.
10070
10071 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
10072
10073         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
10074         (DECL_MAIN_VARIANT): Remove.
10075         * decl.c (duplicate_decls): Don't set it.
10076         (start_function): Likewise.
10077         (lang_mark_tree): Don't mark it.
10078         * decl2.c (defer_fn): Don't use it.
10079         * lex.c (retrofit_lang_decl): Don't set it.
10080         * pt.c (tsubst_decl): Likewise.
10081         * ptree.c (print_lang_decl): Don't print it.
10082         * typeck.c (mark_addressable): Don't use it.
10083
10084 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
10085
10086         * vec.cc: Include <new> and <exception>.
10087         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
10088         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
10089         terminate.
10090         (__cxa_vec_delete): Catch dtor exceptions.
10091
10092 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
10093
10094         Prepend __ to implementation defined names.
10095         * inc/typeinfo (type_info): Rename _name to __name.
10096         (type_info::type_info): Rename parameter.
10097         (type_info::operator==, type_info::operator!=,
10098         type_info::before): Likewise.
10099         (type_info::is_pointer_p, type_info::is_function_p,
10100         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
10101         parameters.
10102         * inc/cxxabi.h
10103         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
10104         (__pointer_type_info::__pointer_type_info): Likewise.
10105         (__pointer_type_info::is_pointer_p,
10106         __pointer_type_info::do_catch): Prepend __. Rename parameters.
10107         (__array_type_info::__array_type_info): Rename parameters.
10108         (__function_type_info::__function_type_info): Likewise.
10109         (__function_type_info::is_function_p): Prepend __.
10110         (__enum_type_info::__enum_type_info): Rename parameters.
10111         (__pointer_to_member_type_info::__pointer_to_member_type_info):
10112         Likewise.
10113         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
10114         parameters.
10115         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
10116         (__class_type_info::__class_type_info): Rename parameters.
10117         (__class_type_info::sub_kind): Prepend __. Adjust member names.
10118         (__class_type_info::upcast_result,
10119         __class_type_info::dyncast_result): Prepend __. Move definition
10120         into tinfo.cc.
10121         (__class_type_info::do_upcast, __class_type_info::do_catch,
10122         __class_type_info::find_public_src,
10123         __class_type_info::do_dyncast,
10124         __class_type_info::do_find_public_src): Prepend __. Rename
10125         parameters.
10126         (__si_class_type_info::__si_class_type_info): Rename parameters.
10127         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
10128         __si_class_type_info::do_find_public_src): Prepent __. Rename
10129         parameters.
10130         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
10131         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
10132         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
10133         parameters.
10134         (__dynamic_cast): Rename parameters.
10135         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
10136         type_info::do_catch, type_info::do_upcast): Prepend __.
10137         (contained_p, public_p, virtual_p, contained_public_p,
10138         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
10139         (__class_type_info::do_catch,
10140         __class_type_info::do_upcast): Prepend __. Adjust.
10141         (__class_type_info::__upcast_result,
10142         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
10143         Adjust.
10144         (__class_type_info::find_public_src): Prepend __. Adjust.
10145         (__class_type_info::do_find_public_src,
10146         __si_class_type_info::do_find_public_src,
10147         __vmi_class_type_info::do_find_public_src): Likewise.
10148         (__class_type_info::do_dyncast,
10149         __si_class_type_info::do_dyncast,
10150         __vmi_class_type_info::do_dyncast): Likewise.
10151         (__class_type_info::do_upcast,
10152         __si_class_type_info::do_upcast,
10153         __vmi_class_type_info::do_upcast): Likewise.
10154         (__dynamic_cast): Adjust.
10155         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
10156         (__function_type_info::is_function_p): Likewise.
10157         (__pointer_type_info::do_catch): Likewise. Adjust.
10158         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
10159         (__throw_type_match_rtti_2): Adjust.
10160         (__is_pointer): Adjust.
10161
10162 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
10163
10164         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
10165         (complete_ctor_identifier): New macro.
10166         (special_function_kind): Add sfk_copy_constructor and
10167         sfk_assignment_operator.
10168         (LOOKUP_HAS_IN_CHARGE): Remove.
10169         (cons_up_default_function): Rename to ...
10170         (implicitly_declare_fn): ... this.
10171         * call.c (build_new_method_call): Add in-charge parameters for
10172         constructors here.
10173         * class.c (add_implicitly_declared_members): Change parameter name
10174         from cant_have_assignment to cant_have_const_assignment.
10175         Replace calls to cons_up_default_function to implicitly_declare_fn.
10176         * cvt.c (ocp_convert): Use complete_ctor_identifier.
10177         * decl.c (initialize_predefined_identifiers): Initialize it.
10178         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
10179         complex expression.
10180         * init.c (expand_default_init): Don't calculate the in-charge
10181         parameter here.
10182         (build_new_1): Likewise.
10183         * lex.c (cons_up_default_function): Move to method.c.
10184         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
10185         (implicitly_declare_fn): New function.
10186         * typeck.c (build_static_cast): Use complete_ctor_identifier.
10187         (build_modify_expr): Likewise.
10188         * typeck2.c (build_functional_cast): Likewise.
10189
10190         Under the new ABI, constructors don't return `this'.
10191         * cp-tree.h (warn_reorder): Declare.
10192         (special_function_kind): New enum.
10193         (global_base_init_list): Remove declaration.
10194         (emit_base_init): Don't return a value.
10195         (check_base_init): Don't declare.
10196         (is_aggr_typedef): Likewise.
10197         * decl.c (check_special_function_return_type): New function.
10198         (return_types): Remove.
10199         (grokdeclarator): Use check_special_function_return_type.
10200         (start_function): Don't initialize ctor_label under the new ABI.
10201         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
10202         * init.c (begin_init_stmts): Move to top of file.
10203         (finish_init_stmts): Likewise.
10204         (warn_reorder): Don't declare.
10205         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
10206         value.
10207         (check_base_init): Remove.
10208         (is_aggr_typedef): Likewise.
10209         (build_new_1): Don't use the return value of a constructor.
10210         * semantics.c (setup_vtbl_ptr): Don't use the return value
10211         of emit_base_init.
10212         * typeck.c (check_return_expr): Don't magically convert return
10213         statements into `return this' in constructors under the new ABI.
10214
10215         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
10216         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
10217         (base_ctor_identifier): New macro.
10218         (base_dtor_identifier): Likewise.
10219         (deleting_dtor_identifier): Likewise.
10220         * decl.c: Don't include obstack.h.
10221         (obstack_chunk_alloc): Don't define.
10222         (obstack_chunk_free): Likewise.
10223         (struct predefined_identifier): New type.
10224         (initialize_predefined_identifiers): New function.
10225         (init_decl_processing): Use it.
10226         (debug_temp_inits): Remove.
10227         (start_method): Don't call preserve_data.
10228         (hack_incomplete_structures): Update comment.
10229         * init.c (init_init_processing): Don't initialize
10230         nelts_identifier.
10231         (build_offset_rf): Remove dead code.
10232         (build_delete): Use CLASSTYPE_N_BASECLASSES.
10233         * search.c (init_search_processing): Don't initialize
10234         vptr_identifier.
10235
10236 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10237
10238         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
10239         some sign_compare warnings.
10240
10241 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
10242
10243         Rename abi::__vmi_class_type_info members.
10244         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
10245         base_list, detail_masks members to vmi_flags, vmi_base_count,
10246         vmi_bases and vmi_flags_masks respectively.
10247         (__vmi_class_type_info::vmi_flags_masks): Rename
10248         details_unknown_mask to flags_unknown_mask.
10249         * tinfo.cc (__class_type_info::do_upcast): Adjust.
10250         (__vmi_class_type_info::do_find_public_src): Adjust.
10251         (__vmi_class_type_info::do_dyncast): Adjust.
10252         (__vmi_class_type_info::do_upcast): Adjust.
10253
10254 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
10255
10256         * tinfo.cc (convert_to_base): New function.
10257         (get_vbase_offset): Remove. Move into convert_to_base.
10258         (__vmi_class_type_info::do_find_public_src): Adjust.
10259         (__vmi_class_type_info::do_dyncast): Adjust.
10260         (__vmi_class_type_info::do_upcast): Adjust.
10261
10262 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
10263
10264         * tinfo.cc (operator=): Use __builtin_strcmp.
10265         * tinfo2.cc (before): Likewise.
10266
10267 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
10268
10269         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
10270         (DECL_SAVED_INLINE): Rename to ...
10271         (DECL_DEFERRED_FN): ... this.
10272         (in_function_p): Remove declaration.
10273         (mark_inline_for_output): Rename to ...
10274         (defer_fn): ... this.
10275         * decl.c (finish_function): Adjust call to mark_inline_for_output.
10276         (in_function_p): Remove definition.
10277         * decl2.c (saved_inlines): Rename to ...
10278         (deferred_fns): ... this.
10279         (saved_inlines_used): Rename to ...
10280         (deferred_fns_used): ... this.
10281         (mark_inline_for_output): Rename to ...
10282         (defer_fn): ... this.
10283         (finish_file): Adjust accordingly.
10284         (init_decl2): Likewise.
10285         * lex.c (cons_up_default_function): Likewise.
10286         * pt.c (mark_decl_instantiated): Likewise.
10287         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
10288         circumstances.
10289         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
10290         * semantics.c (expand_body): Defer more functions.
10291
10292 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
10293
10294         * vec.cc: New file.
10295         * Make-lang.in (CXX_LIB2FUNCS): Add it.
10296         (vec.o): Build it.
10297         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
10298         __cxa_vec_delete): Declare.
10299
10300 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
10301
10302         * rtti.c (dfs_class_hint_mark): New static function.
10303         (dfs_class_hint_unmark): New static function.
10304         (class_hint_flags): Use them.
10305
10306 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
10307
10308         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
10309
10310 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
10311
10312         * cp-tree.h (instantiate_decl): Change prototype.
10313         * decl2.c (mark_used): Adjust call.
10314         * optimize.c (inlinable_function_p): Adjust handling of templates.
10315         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
10316         (do_type_instantiation): Likewise.
10317         (instantiate_decl): Defer more templates.
10318         (instantiate_pending_templates): Adjust logic to handle inline
10319         friend functions.
10320
10321         * Makefile.in (GGC_H): New variable.  Use it throughout in place
10322         of ggc.h.
10323
10324         * call.c: Don't include obstack.h.  Include ggc.h.
10325         (obstack_chunk_alloc): Don't define.
10326         (obstack_chunk_free): Likewise.
10327         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
10328         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
10329         (pop_switch): Free it.
10330
10331         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
10332
10333         * dump.c (dequeue_and_dump): Don't try to print the bit_position
10334         if we don't have a DECL_FIELD_OFFSET.
10335
10336 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
10337
10338         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
10339         special_function_p.
10340
10341 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10342
10343         * cfns.gperf (hash, libc_name_p): Prototype.
10344
10345         * rtti.c (build_dynamic_cast_1): Constification.
10346
10347         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
10348
10349         * semantics.c (deferred_type_access_control): Prototype.
10350
10351 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
10352
10353         Correct many new ABI issues regarding vbase and vcall offset
10354         layout.
10355         * cp-tree.h (BINFO_VTABLE): Document.
10356         (struct lang_type): Tweak formatting.
10357         (BINFO_PRIMARY_BINFO): Add to documentation.
10358         (CLASSTYPE_VSIZE): Fix typo in comment.
10359         (CLASSTYPE_VBASECLASSES): Update documentation.
10360         (BINFO_VBASE_MARKED): Remove.
10361         (SET_BINFO_VBASE_MARKED): Likewise.
10362         (CLEAR_BINFO_VBASE_MARKED): Likewise.
10363         (BINFO_FIELDS_MARKED): Remove.
10364         (SET_BINFO_FIELDS_MARKED): Likewise.
10365         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
10366         (enum access_kind): New enumeration.
10367         (num_extra_vtbl_entries): Remove declaration.
10368         (size_extra_vtbl_entries): Likewise.
10369         (get_vtbl_decl_for_binfo): New function.
10370         (dfs_vbase_unmark): Remove declaration.
10371         (mark_primary_bases): Likewise.
10372         * class.c (SAME_FN): Remove.
10373         (struct vcall_offset_data_s): Move definition.
10374         (build_vbase_pointer): Use `build', not `build_binary_op', to
10375         access the vbase pointer under the new ABI.
10376         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
10377         (build_primary_vtable): Likewise.
10378         (dfs_mark_primary_bases): Move here from search.c.
10379         (mark_primary_bases): Likewise.
10380         (determine_primary_bases): Under the new ABI, don't make a base
10381         class a primary base just because we don't yet have any virtual
10382         functions.
10383         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
10384         (num_vfun_entries): Remove.
10385         (dfs_count_virtuals): Likewise.
10386         (num_extra_vtbl_entries): Likewise.
10387         (size_extra_vtbl_entries): Likewise.
10388         (layout_virtual_bases): Iterate in inheritance graph order under
10389         the new ABI.
10390         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
10391         indicate that a vfield is present.
10392         (init_class_processing): Initialize access_public_node, etc., from
10393         ak_public, etc.
10394         (get_vtbl_decl_for_binfo): New function.
10395         (dump_class_hierarchy_r): Likewise.
10396         (dump_class_hierarchy): Use it.
10397         (finish_vtbls): Build the vtbls in inheritance graph order.
10398         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
10399         (initialize_vtable): Use get_vtbl_decl_for_binfo.
10400         (accumulate_vtbl_inits): Add comments explaining why a pre-order
10401         walk is required.
10402         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
10403         where the vptr points, even for primary vtables.
10404         (build_vtbl_initializer): Adjust handling of vbase and vcall
10405         offsets.
10406         (build_vcall_and_vbase_vtable_entries): New function.
10407         (dfs_build_vbase_offset_vtbl_entries): Remove.
10408         (build_vbase_offset_vtbl_entries): Reimplement.
10409         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
10410         were already handled in a primary base class vtable.
10411         (build_vcall_offset_vtbl_entries): Adjust.
10412         (build_rtti_vtbl_entries): Adjust.
10413         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
10414         * init.c (expand_virtual_init): Simplify.
10415         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
10416         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
10417         * search.c (BINFO_ACCESS): New macro.
10418         (SET_BINFO_ACCESS): Likewise.
10419         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
10420         (access_in_type): Likewise.
10421         (dfs_accessible_p): Likewise.
10422         (protected_accessible_p): Likewise.
10423         (lookup_fnfields_1): Adjust documentation.
10424         (dfs_mark_primary_bases): Move to class.c
10425         (mark_primary_bases): Likewise.
10426         (dfs_vbase_unmark): Remove.
10427         (virtual_context): Use BINFO_FOR_VBASE.
10428         (dfs_get_vbase_types): Simplify.
10429         (dfs_build_inheritance_graph_order): New function.
10430         (get_vbase_types): Use it.
10431         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
10432
10433         * tinfo.cc (get_vbase_offset): New function.
10434         (__vmi_class_type_info::do_find_public_src): Use it.
10435         (__vmi_class_type_info::do_dyncast): Likewise.
10436         (__vmi_class_type_info::do_upcast): Likewise.
10437
10438 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
10439
10440         * lang-specs.h: Pass -fno-show-column to the preprocessor.
10441
10442 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
10443
10444         * rtti.c (class_hint_flags): Rename flags.
10445         (class_initializer): Remove flags.
10446         (synthesize_tinfo_var): Combine offset and flags. Add flags
10447         for __vmi_class_type_info.
10448         (create_tinfo_types): Remove flags from __class_type_info and
10449         __si_class_type_info. Merge flags and offset from
10450         base_class_type_info.
10451         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
10452         (__base_class_info::is_virtual_p): Adjust.
10453         (__base_class_info::is_public_p): Adjust.
10454         (__base_class_info::offset): New accessor.
10455         (__class_type_info::details): Remove member.
10456         (__class_type_info::__class_type_info): Lose details.
10457         (__class_type_info::detail_masks): Remove.
10458         (__si_class_type_info::__si_class_type_info): Lose details.
10459         (__vmi_class_type_info::details): New member.
10460         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
10461         (__vmi_class_type_info::detail_masks): New member.
10462         * tinfo.cc (__class_type_info::do_upcast): Initialize result
10463         with unknown_details_mask.
10464         (__vmi_class_type_info::do_find_public_src): Adjust
10465         (__vmi_class_type_info::do_dyncast): Adjust.
10466         (__vmi_class_type_info::do_upcast): Set result details, if
10467         needed. Adjust.
10468         (__dynamic_cast): Temporarily #if out optimization.
10469
10470 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
10471
10472         * rtti.c (get_tinfo_decl): Mark used.
10473         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
10474         mark as dealt with, if we output it.
10475
10476 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
10477
10478         * class.c: Reorganize to put virtual function table initialization
10479         machinery at the end of the file.
10480
10481 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
10482
10483         * class.c (finish_struct): Use bitsize_zero_node.
10484         * pt.c (instantiate_class_template): Likewise.
10485
10486 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
10487
10488         Put RTTI entries at negative offsets in new ABI.
10489         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
10490         vbase offset at index -3, not -1.
10491         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
10492         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
10493         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
10494         (build_rtti_vtbl_entries): New function.
10495         (set_rtti_entry): Remove.
10496         (build_primary_vtable): Don't use it.
10497         (build_secondary_vtable): Likewise.
10498         (start_vtable): Remove.
10499         (first_vfun_index): New function.
10500         (set_vindex): Likewise.
10501         (add_virtual_function): Don't call start_vtable.  Do call
10502         set_vindex.
10503         (set_primary_base): Rename parameter.
10504         (determine_primary_base): Likewise.
10505         (num_vfun_entries): Don't use skip_rtti_stuff.
10506         (num_extra_vtbl_entries): Include RTTI information.
10507         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
10508         (skip_rtti_stuff): Remove.
10509         (dfs_modify_vtables): Don't use it.
10510         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
10511         (layout_nonempty_base_or_field): Update size handling.
10512         (create_vtable_ptr): Tweak.
10513         (layout_class_type): Adjust parameter names.
10514         (finish_struct_1): Simplify.
10515         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
10516         (skip_rtti_stuff): Remove.
10517         (first_vfun_index): New function.
10518         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
10519         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
10520         (marked_vtable_pathp): Declare.
10521         (unmarked_vtable_pathp): Likewise.
10522         * error.c (dump_expr): Use first_vfun_index to calculate vtable
10523         offsets.
10524         * rtti.c (build_headof): Look for RTTI at negative offsets.
10525         (get_tinfo_decl_dynamic): Likewise.
10526         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
10527         here.
10528         (create_pseudo_type_info): Do it here instead.  Adjust so that
10529         vptr points at first virtual function.
10530         * search.c (marked_vtable_pathp): Make it global.
10531         (unmarked_vtable_pathp): Likewise.
10532         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
10533         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
10534         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
10535         (get_pure_virtuals): Likewise.
10536         (expand_upcast_fixups): Likewise.
10537         * tree.c (debug_binfo): Likewise.
10538         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
10539         negative offset.
10540
10541 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10542
10543         * class.c (check_field_decl): Fix typo.
10544         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
10545         (check_methods): Likewise.
10546         (check_field_decls): Likewise.
10547         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
10548         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
10549         Use DECL_RESULT_FLD, not DECL_RESULT.
10550         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
10551         * lex.c (identifier_type): Likewise.
10552         * pt.c (determine_specialization, lookup_template_class): Likewise.
10553         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
10554         (resolve_overloaded_unification, more_specialized): Likewise.
10555         * semantics.c (finish_member_declaration): Likewise.
10556         * typeck.c (build_x_function_call): Likewise.
10557
10558 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
10559
10560         * class.c (layout_empty_base): Handle empty bases with non-byte
10561         alignment.
10562         (build_base_field): Likewise.
10563         (layout_virtual_bases): Likewise.
10564
10565         * class.c (finish_struct_1): Fix typo in this change:
10566
10567         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10568
10569 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
10570
10571         * decl.c (grokdeclarator): Count partial specializations when
10572         keeping track of how many template classes have been seen.
10573
10574         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
10575
10576 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10577
10578         * class.c (build_vbase_pointer_fields): layout_field now place_field.
10579         (get_vfield_offset): Use byte_position.
10580         (set_rtti_entry): Set OFFSET to ssizetype zero.
10581         (get_binfo_offset_as_int): Deleted.
10582         (dfs_record_base_offsets): Use tree_low_cst.
10583         (dfs_search_base_offsets): Likewise.
10584         (layout_nonempty_base_or_field): Reflect changes in RLI format
10585         and call byte_position.
10586         (layout_empty_base): Convert offset to ssizetype.
10587         (build_base_field): use rli_size_unit_so_far.
10588         (dfs_propagate_binfo_offsets): Do computation in proper type.
10589         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
10590         (layout_class_type): Reflect changes in RLI names and fields.
10591         (finish_struct_1): Set DECL_FIELD_OFFSET.
10592         * dump.c (dequeue_and_dump): Call bit_position.
10593         * expr.c (cplus_expand_constant): Use byte_position.
10594         * rtti.c (expand_class_desc): Use bitsize_one_node.
10595         * typeck.c (build_component_addr): Use byte_position and don't
10596         special case for zero offset.
10597
10598 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
10599
10600         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
10601
10602         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
10603         tinfo object.
10604         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
10605         vtable.
10606
10607 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10608
10609         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
10610         DECL_P macros.
10611         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
10612         make_typename_type, check_initializer, cp_finish_decl,
10613         xref_tag): Likewise.
10614         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
10615         decl_namespace, arg_assoc_template_arg, arg_assoc,
10616         validate_nonmember_using_decl, do_class_using_decl): Likewise.
10617         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
10618         args_to_string): Likewise.
10619         * friend.c (is_friend): Likewise.
10620         * lex.c (note_got_semicolon, note_list_got_semicolon,
10621         is_global): Likewise.
10622         * method.c (build_overload_nested_name, build_overload_value,
10623         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
10624         * parse.y (typename_sub, typename_sub1): Likewise.
10625         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
10626         process_partial_specialization, convert_template_argument,
10627         template_args_equal, add_pending_template, lookup_template_class,
10628         for_each_template_parm_r, maybe_fold_nontype_arg,
10629         tsubst, instantiate_template, type_unification_real, unify,
10630         instantiate_pending_templates, set_mangled_name_for_template_decl):
10631         Likewise.
10632         * repo.c (repo_get_id, repo_template_used): Likewise.
10633         * search.c (lookup_field_1): Likewise.
10634         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
10635         * xref.c (classname): Likewise.
10636
10637 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
10638
10639         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
10640         (CANONICAL_BINFO): New macro.
10641         (BINFO_NEW_VTABLE_MARKED): Use it.
10642         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
10643         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
10644         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
10645         not TREE_TYPE.
10646         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
10647         (build_secondary_vtable): Likewise.
10648         (dfs_finish_vtbls): Likewise.
10649         (dfs_accumulate_vtbl_inits): Likewise.
10650         (accumulate_vtbl_inits): New function.
10651         (finish_vtbls): Make sure that virtual bases come after
10652         non-virtual bases in the vtable group.
10653         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
10654         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
10655         * search.c (struct vbase_info): Move definition.
10656         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
10657         (unmarked_new_vtable_p): Likewise.
10658         (dfs_mark_vtable_path): Remove.
10659         (dfs_mark_new_vtable): Remove.
10660         (dfs_unmark_new_vtable): Likewise.
10661         (dfs_clear_search_slot): Likewise.
10662         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
10663         (dfs_clear_vbase_slots): Likewise.
10664         (init_vbase_pointers): LIkewise.
10665
10666 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
10667
10668         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
10669         SIZETYPE to a non-SIZETYPE.
10670
10671 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
10672
10673         * class.c (layout_virtual_bases): Adjust names in conditionally
10674         compiled code.
10675
10676         * class.c (record_base_offsets): New function.
10677         (layout_conflict_p): Likewise.
10678         (layout_nonempty_base_or_field): Use it.
10679         (layout_empty_base): New function.
10680         (build_base_field): Use it.
10681         (build_base_fields): Update comment.
10682         (layout_virtual_bases): Fold in a little code form
10683         layout_basetypes.  Use layout_empty_base.
10684         (layout_basetypes): Remove.
10685         (end_of_class): New function.
10686         (layout_class_type): Use it.  Adjust.
10687
10688         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
10689         (fntype_p): Remove.
10690         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
10691         comment.
10692         (dfs_skip_nonprimary_vbases_markedp): Likewise.
10693         * typeck.c (fntype_p): Remove.
10694
10695         * cp-tree.h (TI_SPEC_INFO): Remove.
10696         (CLASSTYPE_TI_SPEC_INFO): Likewise.
10697         * pt.c (process_partial_specialization): Likewise.
10698
10699         * class.c (build_base_field): Fix thinko in computation of binfo
10700         offsets.
10701
10702         * tree.c (mark_local_for_remap_p): Mark variables declared in
10703         TARGET_EXPRs as well.
10704
10705 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
10706
10707         * typeck.c (require_complete_type, complete_type,
10708         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
10709         build_array_ref, convert_arguments, pointer_diff,
10710         build_x_unary_op, build_unary_op, build_c_cast,
10711         build_modify_expr): Use COMPLETE_TYPE_P etc.
10712         * call.c (is_complete, convert_like_real,
10713         build_new_method_call): Likewise.
10714         * class.c (build_vbase_pointer_fields, check_bases,
10715         build_base_field, finish_struct_1, pushclass): Likewise.
10716         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
10717         * decl.c (maybe_process_template_type_declaration, pushtag,
10718         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
10719         layout_var_decl, check_initializer, cp_finish_decl,
10720         grokdeclarator, require_complete_types_for_parms,
10721         grok_op_properties, xref_tag, xref_basetypes,
10722         check_function_type): Likewise.
10723         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
10724         * friend.c (do_friend): Likewise.
10725         * init.c (build_offset_ref): Likewise.
10726         * parse.y (structsp): Likewise.
10727         * pt.c (maybe_process_partial_specialization,
10728         tsubst_friend_function, instantiate_class_template, tsubst,
10729         do_type_instantiation, instantiate_pending_templates): Likewise.
10730         * repo.c (repo_get_id): Likewise.
10731         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
10732         synthesize_tinfo_var, emit_support_tinfos): Likewise.
10733         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
10734         * semantics.c (begin_class_definition): Likewise.
10735         * tree.c (build_cplus_method_type): Likewise.
10736         * typeck2.c (digest_init, build_functional_cast,
10737         add_exception_specifier): Likewise.
10738         * parse.h, parse.c: Regenerated.
10739
10740 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
10741
10742         * inc/cxxabi.h: New header file. Define new-abi entry points.
10743         (__pointer_type_info::target): Rename member to ...
10744         (__pointer_type_info::type): ... here.
10745         (__base_class_info::type): Rename member to ...
10746         (__base_class_info::base): ... here.
10747         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
10748         * cp-tree.h (CPTI_ABI): New global tree enumeration.
10749         (abi_node): New global tree node.
10750         * decl.c (abi_node): Document.
10751         (init_decl_processing): Initialize abi_node.
10752         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
10753         (get_vmi_pseudo_type_info): Likewise.
10754         (create_tinfo_types): Likewise.
10755         (emit_support_tinfos): Likewise.
10756         * tinfo.h (cxxabi.h): Include for new-abi.
10757         Move rtti class definitions to new header file.
10758         * tinfo.cc (abi): Use the namespace.
10759         (std): Move new abi rtti classes from here ...
10760         (__cxxabiv1): ... to here.
10761         * tinfo2.cc (cxxabi.h): Include for new-abi.
10762         Move rtti class definitions to new header file.
10763         (std): Move new abi rtti classes from here ...
10764         (__cxxabiv1): ... to here.
10765         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
10766         namespace.
10767
10768 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
10769             Jason Merrill  <jason@casey.cygnus.com>
10770
10771         * method.c (build_overload_int): Use host_integerp.
10772
10773 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10774
10775         * init.c (build_offset_ref): Handle the case of a templated member
10776         function.
10777
10778 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10779
10780         * except.c (expand_exception_blocks): Clear catch_clauses_last.
10781
10782 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
10783
10784         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
10785         * class.c (check_bitfield_decl): Turn illegal bitfields into
10786         non-bitfields.
10787         (dfs_propagate_binfo_offsets): Adjust for new size_binop
10788         semantics.
10789         (dfs_offset_for_unshared_vbases): Likewise.
10790         * cvt.c (cp_convert_to_pointer): Convert NULL to a
10791         pointer-to-member correctly under the new ABI.
10792         * expr.c (cplus_expand_constant): Don't use cp_convert when
10793         turning an offset into a pointer-to-member.
10794         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
10795         when dereferencing them under the new ABI.
10796         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
10797         of pointers-to-members under the new ABI.
10798
10799         * class.c (check_bitfield_decl): Remove restriction on really long
10800         bitfields.
10801         (layout_class_type): Implement new ABI handling of bitfields
10802         longer than their types.
10803
10804 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10805
10806         * parse.y (extdefs): Call ggc_collect.
10807         * parse.c: Regenerated.
10808
10809 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
10810
10811         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
10812         (note_name_declared_in_class): Use OVL_CURRENT to get at a
10813         potential overload.
10814
10815 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10816
10817         * class.c (build_vbase_path): Use integer_zerop.
10818         (build_vtable_entry): Use tree_low_cst.
10819         (get_vfield_offset): Use bit_position.
10820         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
10821         Use tree_low_cst.
10822         (check_bitfield_decl): Set DECL_SIZE using convert.
10823         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
10824         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
10825         Use tree_low_cst.
10826         (finish_struct_1): Use bit_position.
10827         (dump_class_hierarchy): Use tree_low_cst.
10828         * cp-tree.h (min_precision): Add declaration.
10829         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
10830         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
10831         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
10832         * expr.c (cplus_expand_constant): Use bit_position.
10833         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
10834         * rtti.c (get_base_offset): Use bit_position.
10835         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
10836         host_integerp, and tree_low_cst.
10837         (pointer_int_sum): Use integer_zerop.
10838         (build_component_addr): Use bit_position.
10839
10840 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
10841
10842         * typeck.c (require_complete_type): Don't assume size_zero_node.
10843         (complete_type_or_else): Likewise.
10844
10845 2000-03-16  Steven Grady <grady@digitaldeck.com>
10846             Jason Merrill  <jason@casey.cygnus.com>
10847
10848         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
10849
10850 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
10851
10852         * decl2.c (grokfield): Bail out if type is error_mark_node.
10853
10854 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
10855
10856         * tinfo2.cc (__ptr_to_member_data): Rename to ...
10857         (__pointer_to_member_data): ... here. Adjust.
10858         * rtti.c (create_tinfo_types): Adjust.
10859
10860 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
10861
10862         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
10863         * decl.c (ref_desc_type_node): Undocument.
10864         * rtti.c (ptr_ref_initializer): Rename to ...
10865         (ptr_initializer): ... here. Adjust comments.
10866         (ptmd_initializer): Fix comment thinko.
10867         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
10868         (create_tinfo_types): Remove ref_desc_type_node init.
10869         * tinfo2.cc (__reference_type_info): Remove.
10870
10871 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
10872
10873         * decl.c (cp_finish_decl): Remove obsolete comment.
10874
10875         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
10876
10877 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
10878
10879         * cp-tree.h: Tweak documentation.
10880         * class.c (build_vbase_pointer_fields): Layout the fields, too.
10881         (avoid_overlap): Remove.
10882         (get_binfo_offset_as_int): New function.
10883         (dfs_serach_base_offsets): Likewise.
10884         (layout_nonempty_base_or_field): Likewise.
10885         (build_base_field): Layout fields here.  Avoid placing two objects
10886         of the same type at the same address, under the new ABI.
10887         (build_base_fields): Adjust accordingly.
10888         (create_vtable_ptr): Return the new field, but don't attach it to
10889         TYPE_FIELDS.
10890         (remove_base_field): Remove.
10891         (remove_base_fields): Remove.
10892         (layout_basetypes): Adjust accordingly.
10893         (layout_class_type): Call layout_field for each field, rather than
10894         just making a wholesale call to layout_type.
10895
10896 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
10897
10898         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
10899
10900 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
10901
10902         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
10903
10904         * except.c (dtor_nothrow): New fn.
10905         (do_pop_exception): Use it.  Take type parm.
10906         (push_eh_cleanup): Take type parm.
10907         (expand_start_catch_block): Pass it.
10908         (build_eh_type_type_ref): Accept null type.
10909
10910 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
10911
10912         * cp-tree.h (revert_static_member_fn): Change prototype.
10913         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
10914         (grok_op_properties): Likewise.
10915         (start_function): Likewise.
10916         (revert_static_member_fn): Simplify.
10917         * pt.c (check_explicit_specialization): Adjust call to
10918         revert_static_member_fn.
10919
10920 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
10921
10922         * cp-tree.h (scope_kind): New type.
10923         (tmpl_spec_kind): Likewise.
10924         (declare_pseudo_global_level): Remove.
10925         (pseudo_global_level_p): Rename to template_parm_scope_p.
10926         (pushlevel): Remove declaration.
10927         (begin_scope): New function.
10928         (finish_scope): Likewise.
10929         (current_tmpl_spec_kind): Likewise.
10930         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
10931         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
10932         Add template_spec_p.
10933         (toplevel_bindings_p): Adjust.
10934         (declare_pseudo_global_level): Remove.
10935         (pseudo_global_level_p): Rename to template_parm_scope_p.
10936         (current_tmpl_spec_kind): New function.
10937         (begin_scope): Likewise.
10938         (finish_scope): Likewise.
10939         (maybe_push_to_top_level): Adjust.
10940         (maybe_process_template_type_declaration): Likewise.
10941         (pushtag): Likewise.
10942         (pushdecl_nonclass_level): Likewise.
10943         (lookup_tag): Likewise.
10944         (grokfndecl): Handle member template specializations.  Share
10945         constructor and non-constructor code.
10946         * decl2.c (check_classfn): Handle member template specializations.
10947         * pt.c (begin_template_parm_list): Use begin_scope.
10948         (begin_specialization): Likewise.
10949         (end_specialization): Likewise.
10950         (check_explicit_specialization): Use current_tmpl_spec_kind.
10951         Handle member template specializations.
10952         (end_template_decl): Use finish_scope.  Remove call to
10953         get_pending_sizes.
10954         (push_template_decl_real): Remove bogus error message.
10955         (tsubst_decl): Fix typo in code contained in comment.
10956         (instantiate_template): Handle member template specializations.
10957         (most_general_template): Likewise.
10958
10959 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
10960
10961         * lex.c (whitespace_cr): Compress consecutive calls to warning().
10962         (do_identifier): Ditto for error().
10963
10964         * pt.c (convert_nontype_argument): Ditto for cp_error().
10965         (convert_template_argument): Ditto for cp_pedwarn().
10966
10967 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
10968
10969         * exception.cc (__check_null_eh_spec): New fn.
10970         * except.c (expand_end_eh_spec): Call it if the spec is throw().
10971
10972 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
10973
10974         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
10975         * except.c (expand_end_eh_spec): Add the return type.
10976         * rtti.c (throw_bad_cast): Add the parmtypes.
10977         (throw_bad_typeid): Likewise.
10978
10979         * semantics.c (expand_stmt): Only leave out rtl for unused
10980         artificials, and set DECL_IGNORED_P on them as well.
10981         * decl.c (wrapup_globals_for_namespace): Likewise.
10982
10983 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
10984
10985         * decl.c (maybe_commonize_var): Skip all artificial decls.
10986         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
10987
10988 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
10989
10990         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
10991         * cp-tree.h: Declare flag_enforce_eh_specs.
10992         * decl.c (store_parm_decls, finish_function): Check it.
10993
10994         C library functions don't throw.
10995         * Makefile.in (cfns.h): New target.
10996         (except.o): Depend on it.
10997         * Make-lang.in (cc1plus): Depend on cfns.gperf.
10998         * cfns.gperf: New file.
10999         * cfns.h: Generated.
11000         * except.c: Include it.
11001         (nothrow_libfn_p): New fn.
11002         * decl.c (grokfndecl): Use it.
11003         * cp-tree.h: Declare it.
11004
11005         * decl.c (push_overloaded_decl_1, auto_function,
11006         define_function): Lose.
11007         (build_library_fn_1): New static fn.
11008         (builtin_function): Use it.
11009         (get_atexit_node): Use build_library_fn_ptr.
11010         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
11011         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
11012         push_void_library_fn, push_throw_library_fn): New fns.
11013         * cp-tree.h: Declare them.
11014         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
11015         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
11016         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
11017         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
11018         * rtti.c (build_runtime_decl): Lose.
11019         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
11020         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
11021         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
11022
11023         * call.c (build_call): Remove result_type parm.
11024         Call mark_used on unused artificial fns.
11025         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
11026
11027 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
11028
11029         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
11030         appropriate.
11031         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
11032         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
11033         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
11034         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
11035         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
11036         expand_generic_desc): Likewise.
11037
11038 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
11039
11040         * exception.cc (__cp_pop_exception): Cleanup the original object.
11041
11042 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
11043
11044         * decl.c (grok_op_properties): Merge conversion to void warning
11045         with other silly op warnings.
11046
11047 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
11048
11049         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
11050         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
11051
11052 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
11053
11054         * decl.c (cp_make_fname_decl): New function.
11055         (wrapup_globals_for_namespace): Don't emit unused static vars.
11056         (init_decl_processing): Remove comment about use of
11057         array_domain_type. Set make_fname_decl.
11058         (cp_finish_decl): Remove __FUNCTION__ nadgering.
11059         * semantics.c (begin_compound_stmt): Remove
11060         current_function_name_declared flagging.
11061         (expand_stmt): Don't emit unused local statics.
11062         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
11063         specially.
11064
11065 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
11066
11067         * typeck.c (convert_for_assignment): Don't look at array
11068         initializer.
11069         * call.c (convert_like_real): Likewise.
11070
11071 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
11072
11073         Add initial support for '\uNNNN' specifier.
11074         * lex.c (read_ucs): New fn.
11075         (readescape, skip_white_space): Call it.
11076         (is_extended_char, is_extended_char_1): New fns.
11077         (utf8_extend_token): New fn, #if 0'd out.
11078         (real_yylex): Treat extended chars like letters.
11079
11080         * search.c (note_debug_info_needed): Walk the bases even if we
11081         weren't deferring the type itself.
11082
11083 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11084
11085         * decl2.c (finish_objects): Constify a char*.
11086
11087         * method.c (emit_thunk): Likewise.
11088
11089 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
11090
11091         * typeck.c (dubious_conversion_warnings): Look through
11092         REFERENCE_TYPE.
11093
11094 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11095
11096         * class.c (dfs_modify_vtables): I is now unsigned.
11097         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
11098         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
11099         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
11100         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
11101         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
11102         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
11103         Call integer_all_onesp.
11104         * typeck2.c (process_init_constructor): Use compare_tree_int.
11105
11106         * lang-specs.h (as): Don't call if -syntax-only.
11107
11108 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
11109
11110         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
11111         RTL_EXPR_HAS_NO_SCOPE after all.
11112
11113 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
11114
11115         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
11116         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
11117         RTL_EXPR_HAS_NO_SCOPE.
11118
11119         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
11120         later.
11121
11122         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
11123
11124 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
11125
11126         * call.c (convert_like): Macrofy.
11127         (convert_like_with_context): New macro.
11128         (convert_like_real): Renamed from convert_like.  Add calling
11129         context parameters, for diagnostics. Add recursive flag.  Call
11130         dubious_conversion_warnings for outer conversion.
11131         (build_user_type_conversion): Use convert_like_with_context.
11132         (build_over_call): Likewise. Don't warn about dubious
11133         conversions here. Adjust convert_default_arg calls.
11134         (convert_default_arg): Add context parameters for diagnostics.
11135         Pass through to convert_like_with_context.
11136         * cp-tree.h (convert_default_arg): Add context parameters.
11137         (dubious_conversion_warnings): Prototype new function.
11138         * typeck.c (convert_arguments): Adjust convert_default_arg call.
11139         (dubious_conversion_warnings): New function, broken
11140         out of convert_for_assignment.
11141         (convert_for_assignment): Adjust.
11142
11143 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
11144
11145         * decl2.c (key_method): Break out from...
11146         (import_export_vtable, import_export_class): ...here.
11147
11148         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
11149         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
11150
11151         * search.c (note_debug_info_needed, dfs_debug_mark,
11152         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
11153         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
11154
11155 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
11156
11157         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
11158         typos.
11159
11160 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
11161
11162         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
11163         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
11164         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
11165         (lang_type): Split gets_new into has_new and has_array_new.
11166         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
11167         (TYPE_GETS_NEW): Split into ...
11168         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
11169         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
11170         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
11171         (build_op_new_call): Don't declare.
11172         (build_new_1): Likewise.
11173         * call.c (build_op_new_call): Remove.
11174         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
11175         instead of TYPE_NEEDS_DESTRUCTOR.
11176         (finish_struct_bits): Likewise.
11177         (add_implicitly_declared_members): Likewise.
11178         (check_field_decl): Likewise.
11179         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
11180         correctly under the new ABI.
11181         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
11182         instead of TYPE_NEEDS_DESTRUCTOR.
11183         (initialize_local_var): Likewise.
11184         (destroy_local_var): Likewise.
11185         (cp_finish_decl): Likewise.
11186         (register_dtor_fn): Likewise.
11187         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
11188         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
11189         TYPE_VEC_DELETE_TAKES_SIZE here.
11190         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
11191         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
11192         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
11193         (finish_destructor_body): Likewise.
11194         (maybe_build_cleanup_1): Likewise.
11195         * decl2.c (do_static_destruction): Likewise.
11196         * init.c (build_new_1): Make it static.
11197         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
11198         (expand_cleanup_for_base): Likewise.
11199         (get_cookie_size): New function.
11200         (build_new_1): Handle array-new cookies correctly under the new
11201         ABI.
11202         (build_vec_delete_1): Likewise.
11203         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
11204         (build_delete): Likewise.
11205         (build_vec_delete): Handle array-new cookies correctly under the new
11206         ABI.
11207         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
11208         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
11209         TYPE_HAS_ARRAY_NEW_OPERATOR.
11210         * ptree.c (print_lang_type): Check them.
11211         * search.c (context_for_name_lookup): Fix typo in comment.
11212         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
11213         * tree.c (break_out_cleanups): Likewise.
11214         (build_cplus_array_test_1): Likewise.
11215         (cp_build_qualified_type_real): Likewise.
11216         * typeck.c (complete_type): Likewise.
11217
11218         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
11219         the command-line, not the end.
11220
11221 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
11222
11223         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
11224
11225 2000-03-02  Tom Tromey  <tromey@cygnus.com>
11226
11227         * cp-tree.h (build_java_class_ref): Declare.
11228         * init.c (build_java_class_ref): No longer static.
11229         * except.c (expand_throw): Generate a Java-style `throw' if the
11230         thrown object is a "Java" object.
11231         (initialize_handler_parm): Generate a Java-style lookup of
11232         exception info if the caught object is a "Java" object.
11233         (catch_language, catch_language_init): New globals.
11234         (decl_is_java_type): New function.
11235         (expand_start_catch_block): Don't call push_eh_info() or
11236         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
11237         class reference to build_catch_block.
11238
11239 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11240
11241         * typeck.c (comptypes): Treat sizetype like its language equivalent.
11242
11243 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
11244
11245         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
11246         to merge reference/pointer code and fix incorrect warnings.
11247
11248 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
11249
11250         * search.c (protected_accessible_p): Use context_for_name_lookup.
11251
11252         * init.c (construct_virtual_bases): Fix thinko.
11253         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
11254
11255 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11256
11257         * decl.c (current_function_decl): Move to toplev.c.
11258
11259 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
11260
11261         * pt.c (fn_type_unification): Unify return type, whenever
11262         provided.
11263         (get_bindings_real): Only pass return type when necessary.
11264         Remove explicit return type check.
11265         * class.c (resolve_address_of_overloaded_function): Pass desired
11266         return type to fn_type_unification.
11267
11268 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11269
11270         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
11271         DECL_FIELD_SIZE.
11272         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
11273         DECL_FIELD_SIZE.
11274         * rtti.c (expand_class_desc): Likewise.
11275         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
11276         (THUNK_VCALL_OFFSET): Likewise.
11277         (THUNK_DELTA): Reflect changes in ../tree.h.
11278
11279 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
11280
11281         * search.c (protected_accessible_p): Also allow the access if
11282         the member is public in DERIVED.  Lose TYPE parm.
11283         (friend_accessible_p): Lose TYPE parm.
11284         (accessible_p): Adjust.
11285
11286 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11287
11288         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
11289         on things that are not sizes; ssize_binop deleted.
11290         Call size_diffop when appropriate.
11291         (dfs_build_vcall_offset_vtbl_entries): Likewise.
11292         (build_primary_vtable, build_secondary_vtable): Likewise.
11293         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
11294         Variable I is HOST_WIDE_INT.
11295         (get_vfield_offset): Pass proper types to size_binop.
11296         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
11297         (finish_struct_1): Likewise.
11298         (skip_rtti_stuff): Arg N is now pointer to signed.
11299         (layout_class_type): Use size_zero_node.
11300         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
11301         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
11302         * decl.c (complete_arry_type): Pass proper types to size_binop.
11303         (xref_basetypes): BINFO_OFFSET is sizetype.
11304         * error.c (dump_expr): Don't use size_binop non-sizes.
11305         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
11306         * init.c (construct_virtual_bases): Fix type error.
11307         (build_vec_delete_1): Pass proper type to size_binop and don't
11308         fold result.
11309         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
11310         * rtti.c (get_base_offset): Pass proper type to size_binop.
11311         * search.c (dfs_find_vbases): Fix type error.
11312         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
11313         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
11314         * tree.c (debug_binfo): Variable N is signed.
11315         Use HOST_WIDE_INT_PRINT_DEC.
11316         * typeck.c (comptypes): sizetype is same as equivalent integer type.
11317         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
11318         size_one_node and size_zero_node.
11319         (c_alignof): Use size_one_node.
11320         (build_component_addr): Pass proper types to size_binop.
11321         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
11322
11323 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
11324
11325         Implement class scope using-declarations for functions.
11326         * class.c (handle_using_decl): Call add_method for used functions.
11327         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
11328         (add_method): Used functions are hidden by local functions.
11329         (check_bases_and_members): Handle using-decls before finalizing
11330         CLASSTYPE_METHOD_VEC.
11331         * call.c (add_function_candidate): Add ctype parm; if non-zero,
11332         override the type of 'this' accordingly.
11333         (add_template_candidate, add_template_candidate_real): Add ctype parm.
11334         (convert_class_to_reference, build_user_type_conversion_1,
11335         build_new_function_call, build_object_call, build_new_op,
11336         build_new_method_call): Pass ctype parm.
11337
11338         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
11339         the baselink.
11340         * call.c (convert_class_to_reference, build_user_type_conversion_1,
11341         build_new_function_call, build_object_call, build_new_op,
11342         build_new_method_call, build_op_delete_call): Don't get basetype_path
11343         from a baselink.
11344         * typeck.c (build_component_ref): Likewise.
11345         * init.c (build_offset_ref): Likewise.
11346         (resolve_offset_ref): Don't call enforce_access.
11347         Call build_scoped_ref.
11348         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
11349         would cause an error or if -pedantic.
11350         * class.c (alter_access): Lose binfo parm.
11351
11352 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
11353
11354         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
11355         types.
11356
11357 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
11358
11359         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
11360         pseudo_type_info creation into the std namespace
11361
11362 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
11363
11364         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
11365         (import_export_class): Remove declaration.
11366         * decl2.c (import_export_class): Make it static.
11367         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
11368         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
11369         EXPR_WITH_FILE_LOCATION.
11370         * lex.c (check_newline): Tweak filename/lineno setting.
11371         * semantics.c (begin_while_stmt): Fix typo in comment.
11372
11373 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11374
11375         * lang-options.h (-fmessage-length=): Add missing option.
11376
11377         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
11378
11379 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
11380
11381         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
11382
11383 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
11384
11385         * optimize.c (expand_call_inline): Emit the return label before
11386         evaluating the return value.
11387
11388 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
11389
11390         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
11391         than duplicating functionality here.
11392         * optimize.c: Include input.h.
11393         (expand_call_inline): Use push_srcloc and pop_srcloc.
11394         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
11395         * parse.c: Regenerated.
11396         * Makefile.in (lex.o): Depend on input.h.
11397         (optimize.o): Likewise.
11398
11399 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
11400
11401         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
11402         function type, rather than ICE.
11403
11404 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
11405
11406         * decl.c (grokdeclarator): Call decl_type_access_control.
11407         * parse.y (parse_end_decl): Don't call decl_type_access_control if
11408         decl is null.
11409
11410 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
11411
11412         * decl.c (decls_match): Remove obsolete static member nadgering.
11413
11414 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11415
11416         * decl.c (grokdeclarator): Change ANSI to ISO.
11417         * lex.c (consume_string, readescape, do_identifier): Likewise.
11418         (parse_float, real_yylex): Likewise.
11419         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
11420         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
11421         new_type_id, maybe_label_decls, simple_stmt,
11422         for.init.statement): Likewise.
11423         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
11424         * semantics.c (finish_named_return_value): Likewise.
11425         * parse.c: Regenerate.
11426
11427 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
11428
11429         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
11430         (CPTI_CLASS_STAR_TYPE): Remove.
11431         (vtable_index_type): Likewise.
11432         (class_star_type_node): Remove.
11433         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
11434         (build_binary_op_nodefault): Remove.
11435         * call.c (build_new_op): Use build_binary_op instead of
11436         build_binary_op_nodefault.
11437         * decl.c (init_decl_processing): Remove class_star_type_node
11438         initialization.  Make delta_type_node ptrdiff_type_node under the
11439         new ABI.  Initialize vtable_index_type.
11440         (build_ptrmemfunc_type): Build different structures for the new
11441         ABI.
11442         (build_enumerator): Use build_binary_op instead of
11443         build_binary_op_nodefault.
11444         * method.c (build_overload_value): Mangle pointers-to-members
11445         appropriately under the new ABI.
11446         * typeck.c (build_array_ref): Use build_binary_op instead of
11447         build_binary_op_nodefault.
11448         (get_member_function_from_ptrfunc): Adjust for the new ABI.
11449         (build_binary_op_nodefault): Rename to ...
11450         (build_binary_op): ... this.  Remove old version.  Adjust for
11451         pointer-to-member comparisons under the new ABI.
11452         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
11453         (build_ptrmemfunc): Adjust for the new ABI.
11454         (expand_ptrmemfunc_cst): Likewise.
11455         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
11456         (pfn_from_ptrmemfunc): Adjust for the new ABI.
11457
11458 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
11459
11460         * call.c (build_object_call): Compress consecutive calls to
11461         cp_error.
11462         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
11463         (build_op_delete_call): Adjust message formatting.
11464
11465         * class.c (check_bases): Compress consecutive calls to
11466         cp_pedwarn.
11467         (finish_struct_anon): Say 'ISO C++'.
11468
11469         * decl.c (start_decl): Same here.
11470         (grok_reference_init): Likewise.
11471         (grokfndecl): Correct message formatting.
11472         (grokfndecl): Improve diagnostic.
11473         (check_static_variable_definition): Likewise. Say 'ISO C++'
11474         (compute_array_index_type): Say 'ISO C++'
11475         (create_array_type_for_decl): Compress consecutive calls to
11476         cp_error.
11477         (grokdeclarator): Say 'ISO C++'
11478         (grok_op_properties): Likewise.
11479
11480         * decl2.c (delete_sanity): Clairify diagnostic.
11481         (check_member_template): Same here.
11482         (grok_function_init): Use consistent terminology.
11483
11484         * expr.c (do_case): Say 'ISO C++'
11485
11486         * friend.c (do_friend): Compress consecutive calls to warning.
11487
11488 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
11489
11490         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
11491         * class.c (build_secondary_vtable): Reorganize.  Don't create a
11492         new vtable under the new ABI.
11493         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
11494         computing the size.
11495         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
11496         the initializing elements.
11497         (initialize_vtable): New function.
11498         (dfs_finish_vtbls): Use it.
11499         (dfs_accumulate_vtbl_inits): New function.
11500         (finish_vtbls): Merge primary and secondary vtables under the new
11501         ABI.
11502         (finish_struct_1): Remove redundant call to layout_vtable_decl.
11503         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
11504         aren't VAR_DECLs.
11505
11506         * class.c (build_vtable): New function, split out from ...
11507         (get_vtable_decl): ... here, and ...
11508         (build_secondary_vtable): ... here.
11509
11510         * pt.c (tsubst_decl): Fix formatting.
11511
11512 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11513
11514         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
11515         (avoid_overlap, build_base_field): Likewise.
11516         (build_base_field, build_base_fields, is_empty_class):
11517         Test DECL_SIZE with integer_zero.
11518         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
11519         * cp-tree.h (struct lang_type): New field size_unit.
11520         (CLASSTYPE_SIZE_UNIT): New macro.
11521         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
11522         (cp_finish_decl): Delete -Wlarger-than processing.
11523         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
11524         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
11525         * tree.c (make_binfo): binfo vector is one entry longer.
11526         (walk_tree): Walk DECL_SIZE_UNIT.
11527
11528 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
11529
11530         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
11531         comment.
11532         (build_vtable_entry): Don't assume all vtable entries are
11533         functions.
11534         (build_vtbl_initializer): Adjust accordingly.
11535         (get_vtable_decl): Fix formatting.
11536
11537 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
11538
11539         * semantics.c (deferred_type_access_control): Walk the entire
11540         type_lookups list.
11541         (save_type_access_control): Rename from
11542         initial_deferred_type_access_control.  Just remember the value.
11543         (decl_type_access_control): New fn.
11544         (begin_function_definition): Use deferred_type_access_control, after
11545         we've started the function.  Set type_lookups to error_mark_node.
11546         * parse.y (frob_specs, fn.def1): Adjust.
11547         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
11548         (parse_end_decl, parse_bitfield0, parse_method): New fns.
11549         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
11550         (after_type_component_declarator0): Likewise.
11551         (after_type_component_declarator): Likewise.
11552         (notype_component_declarator): Likewise.
11553         * cp-tree.h: Adjust.
11554
11555         * decl.c (redeclaration_error_message): Allow redeclaration of
11556         namespace-scope decls.
11557
11558 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11559
11560         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
11561
11562 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
11563
11564         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
11565         * decl2.c (grokclassfn): Likewise.
11566
11567         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
11568
11569         * decl2.c (lang_decode_option): Don't set default message length
11570         here.
11571         * lex.c (lang_init_options): Set it here.
11572
11573 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
11574
11575         Make DECL_CONTEXT mean the class in which a member function was
11576         declared, even for a virtual function.
11577         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
11578         (DECL_FRIEND_CONTEXT): New macro.
11579         (DECL_REAL_CONTEXT): Remove.
11580         (SET_DECL_FRIEND_CONTEXT): Likewise.
11581         (DECL_VIRTUAL_CONTEXT): Adjust.
11582         (DECL_CLASS_SCOPE_P): Use TYPE_P.
11583         (add_friends): Remove.
11584         (hack_decl_function_context): Likewise.
11585         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
11586         CP_DECL_CONTEXT.
11587         (build_over_call): Fix indentation.  Use DECL_CONTEXT
11588         instead of DECL_CLASS_CONTEXT.
11589         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
11590         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
11591         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11592         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
11593         (build_base_field): Likewise.
11594         (finish_struct_1): Likewise.
11595         (build_self_reference): Likewise.
11596         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
11597         DECL_REAL_CONTEXT.
11598         (pushtag): Use decl_function_context, not
11599         hack_decl_function_context.
11600         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
11601         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
11602         (pushdecl): Remove bogus code.
11603         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
11604         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
11605         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11606         Use decl_function_context, nothack_decl_function_context.
11607         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
11608         (grokdeclarator): Likewise.  Use decl_function_context, not
11609         hack_decl_function_context.
11610         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
11611         (start_function): Use DECL_FRIEND_CONTEXT, not
11612         DECL_CLASS_CONTEXT.  Use decl_function_context, not
11613         hack_decl_function_context.
11614         (finish_function): Use decl_function_context, not
11615         hack_decl_function_context.
11616         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
11617         DECL_CLASS_CONTEXT.
11618         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
11619         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
11620         (grokfield): Likewise.
11621         (finish_builtin_type): Likewise.
11622         (finish_vtable_vardec): Use decl_function_context, not
11623         hack_decl_function_context.
11624         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11625         (start_static_initialization_or_destruction): Likewise.
11626         (finish_static_initialization_or_destruction): Likewise.
11627         (mark_used): Adjust logic for deciding when to synthesize methods.
11628         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
11629         DECL_REAL_CONTEXT.
11630         * error.c (dump_function_decl): Use DECL_CONTEXT, not
11631         DECL_CLASS_CONTEXT.
11632         * friend.c (is_friend): Likewise.
11633         (add_friends): Remove.
11634         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
11635         * lex.c (begin_definition_of_inclass_inline): Use
11636         decl_function_context, not hack_decl_function_context.
11637         (process_next_inline): Likewise.
11638         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
11639         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
11640         DECL_CLASSS_CONTEXT.
11641         (hack_identifier): Likewise.
11642         (synthesize_method):  Use decl_function_context, not
11643         hack_decl_function_context.
11644         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
11645         DECL_REAL_CONTEXT.
11646         (is_member_template): Use decl_function_context, not
11647         hack_decl_function_context.  Use DECL_CONTEXT, not
11648         DECL_CLASS_CONTEXT.
11649         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
11650         DECL_CLASS_CONTEXT.
11651         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
11652         DECL_REAL_CONTEXT.
11653         (push_template_decl_real): Likewise.
11654         (instantiate_class_template): Don't call add_friends.
11655         (tsubst_default_argument): Use DECL_CONTEXT, not
11656         DECL_REAL_CONTEXT.
11657         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
11658         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11659         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
11660         DECL_CLASS_CONTEXT.
11661         * repo.c (repo_inline_used): Likewise.
11662         * search.c (current_scope): Adjust for new _CONTEXT macros.
11663         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
11664         DECL_REAL_CONTEXT.
11665         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11666         (lookup_fnfields_here):Likewise.
11667         (check_final_overrider): Likewise.
11668         (init_vbase_pointers): Likewise.
11669         (virtual_context): Likewise.
11670         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
11671         (expand_body): Use decl_function_context, not
11672         hack_decl_function_context.
11673         * tree.c (hack_decl_function_context): Remove.
11674         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
11675         DECL_CLASS_CONTEXT.
11676         * typeck2.c (error_not_base_type): Likewise.
11677
11678 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
11679
11680         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
11681
11682 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11683
11684         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
11685
11686 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
11687
11688         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
11689
11690 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
11691
11692         * decl2.c (lang_decode_option): Enable automatic line wrapping.
11693
11694 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
11695
11696         * parse.y (frob_specs): Split out...
11697         (parse_decl): From here.
11698         (fn.def2): Call initial_deferred_type_access_control.
11699         (after_type_component_declarator0): Call frob_specs.
11700         (notype_component_declarator0): Likewise.
11701         * search.c (friend_accessible_p): Nested classes are friends of their
11702         enclosing classes.
11703
11704 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
11705
11706         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
11707         used to create an implicit temporary.
11708
11709         * class.c (dfs_modify_vtables): Tweak calculation of functions to
11710         override.
11711
11712 2000-02-08  Nathan Sidwell  <nathan@acm.org>
11713
11714         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
11715         strip array element qualifiers too.
11716
11717 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
11718
11719         * decl.c (store_parm_decls): Don't build cleanups for parameters
11720         while processing_template_decl.
11721
11722 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
11723
11724         * cp-tree.h (struct saved_scope): Add incomplete field.
11725         (namespace_scope_incomplete): New macro.
11726         * decl.c (pushdecl): Use it.
11727         (hack_incomplete_structures): Use it.  See through artificial
11728         binding levels.
11729         (mark_saved_scope): Mark it.
11730
11731         Implement access control for nested types.
11732         * search.c (type_access_control): New fn.
11733         (accessible_p): Now we do perform access control for types.
11734         * semantics.c (deferred_type_access_control): New fn.
11735         (initial_deferred_type_access_control): New fn.
11736         (begin_function_definition): Call it.  Add lookups parm.
11737         * decl.c (struct binding_level): Add this_class field.
11738         (pushlevel_class): Set it.
11739         (mark_binding_level): Mark it.
11740         (lookup_name_real): Use it.  Call type_access_control.
11741         (mark_saved_scope): Mark lookups field.
11742         * cp-tree.h (flagged_type_tree): Add lookups field.
11743         (struct saved_scope): Add lookups field.
11744         (type_lookups): New macro.
11745         * parse.y (declmods): Now <ftype>.
11746         (parse_decl): Add lookups parm.  Call
11747         initial_deferred_type_access_control.
11748         (lang_extdef): Clear type_lookups.
11749         (typed_declspecs, declmods, typespec): Set lookups field.
11750         (initdcl): Call deferred_type_access_control.
11751         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
11752         component_decl_1, named_parm): Adjust.
11753         * friend.c (is_friend): Nested classes are friends of their
11754         enclosing classes.
11755
11756         * class.c (currently_open_derived_class): New fn.
11757         * method.c (hack_identifier): Use it.
11758
11759         * lex.c (do_identifier): Remove obsolete code.
11760
11761         * parse.y (typed_typespecs): Propagate new_type_flag properly.
11762
11763 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
11764
11765         * tinfo.h: Remove apostrophes from C++ comment (xgettext
11766         thinks this file is plain C).
11767
11768 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11769
11770         * Makefile.in (call.o): Depend on $(EXPR_H).
11771
11772         * call.c: Include "expr.h".
11773
11774         * class.c (dump_class_hierarchy): Add prototype.
11775
11776         * search.c (dfs_get_pure_virtuals): Likewise.
11777
11778 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
11779
11780         * parse.y (simple_stmt): Allow :: token in asm parameter list.
11781         * parse.c: Rebuilt.
11782
11783 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
11784
11785         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
11786         Store it in DECL_FCONTEXT.
11787         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
11788
11789 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
11790
11791         * tinfo.h (old abi): #include "tconfig.h".
11792         * tinfo.cc (convert_to_base): Move into old abi section.
11793
11794 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
11795
11796         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
11797         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
11798         (BINFO_PRIMARY_BINFO): New macro.
11799         (BF_DELTA): Rename to ...
11800         (BV_DELTA): ... this.
11801         (BF_VCALL_INDEX): Rename to ...
11802         (BV_VCALL_INDEX): ... this.
11803         (BF_FN): Rename to ...
11804         (BV_FN): ... this.
11805         * class.c (build_vbase_path): Adjust for changes to reverse_path.
11806         (set_rtti_entry): Rename BF_ macros to BV_ variants.
11807         (modify_vtable_entry): Simplify.
11808         (add_virtual_function): Rename BF_ macros to BV_ variants.
11809         (build_vtable_initializer): Likewise.
11810         (get_class_offset_1): Remove.
11811         (dfs_get_class_offset): Likewise.
11812         (get_class_offset): Likewise.
11813         (dfs_find_final_overrider): New function.
11814         (find_final_overrider): Likewise.
11815         (modify_one_vtable): Remove.
11816         (dfs_find_base): New function.
11817         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
11818         find_final_overrider.
11819         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
11820         virtuals.
11821         (dfs_fixup_vtable_deltas): Remove.
11822         (override_one_vtable): Remove.
11823         (merge_overrides): Likewise.
11824         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
11825         unreal chilren of virtual bases.
11826         (finish_struct_1): Don't use merge_overrides.  Don't use
11827         dfs_fixup_vtable_deltas.
11828         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
11829         BINFOs.
11830
11831 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
11832             Jason Merrill  <jason@yorick.cygnus.com>
11833
11834         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
11835
11836 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
11837
11838         * exception.cc (__throw_bad_typeid): Add missing std::.
11839
11840 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11841
11842         * cp-tree.h (make_thunk): PROTO -> PARAMS.
11843
11844 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
11845
11846         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
11847
11848         Runtime support for new-abi rtti.
11849         * inc/typeinfo (type_info::operator!=): Define in class.
11850         (type_info::before, type_info::name, type_info::operator==,
11851         type_info::operator!=): Define new ABI implementations.
11852         (type_info::is_pointer_p, type_info::is_function_p): Declare
11853         new virtual functions.
11854         (type_info::do_catch, type_info::do_upcast): Likewise.
11855
11856         * tinfo.h (__base_class_info): Define new class.
11857         (__class_type_info): Likewise.
11858         (__si_class_type_info): Likewise.
11859         (__vmi_class_type_info): Likewise.
11860         (__dynamic_cast): Prototype.
11861
11862         * tinfo.cc: Conditionalize old and new rtti mechanisms.
11863         (type_info::is_pointer_p): Define new function.
11864         (type_info::is_function_p): Likewise.
11865         (type_info::do_catch): Likewise.
11866         (type_info::do_upcast): Likewise.
11867         (vtable_prefix): New structure for vtable access.
11868         (adjust_pointer): Define new template function.
11869         (contained_p, public_p, virtual_p, contained_public_p,
11870         contained_nonpublic_p, contained_nonvirtual_p): Define new
11871         functions.
11872         (nonvirtual_base_type): New local variable.
11873         (__class_type_info::~__class_type_info): Define.
11874         (__si_class_type_info::~__si_class_type_info): Likewise.
11875         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
11876         (__class_type_info::do_catch): Define new function.
11877         (__class_type_info::do_upcast): Likewise.
11878         (__class_type_info::find_public_src): Likewise.
11879         (__class_type_info::do_find_public_src): Likewise.
11880         (__si_class_type_info::do_find_public_src): Likewise.
11881         (__vmi_class_type_info::do_find_public_src): Likewise.
11882         (__class_type_info::do_dyncast): Likewise.
11883         (__si_class_type_info::do_dyncast): Likewise.
11884         (__vmi_class_type_info::do_dyncast): Likewise.
11885         (__class_type_info::do_upcast): Likewise.
11886         (__si_class_type_info::do_upcast): Likewise.
11887         (__vmi_class_type_info::do_upcast): Likewise.
11888         (__dynamic_cast): Likewise.
11889
11890         * tinfo2.cc (__fundamental_type_info): Define new class.
11891         (__pointer_type_info): Likewise.
11892         (__reference_type_info): Likewise.
11893         (__array_type_info): Likewise.
11894         (__function_type_info): Likewise.
11895         (__enum_type_info): Likewise.
11896         (__ptr_to_member_type_info): Likewise.
11897         (__fundamental_type_info::~__fundamental_type_info): Define.
11898         (__pointer_type_info::~__pointer_type_info): Likewise.
11899         (__reference_type_info::~__reference_type_info): Likewise.
11900         (__array_type_info::~__array_type_info): Likewise.
11901         (__function_type_info::~__function_type_info): Likewise.
11902         (__enum_type_info::~__enum_type_info): Likewise.
11903         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
11904         (__pointer_type_info::do_catch): Define new function.
11905         (__ptr_to_member_type_info::do_catch): Define new function.
11906
11907         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
11908         (__is_pointer): Likewise.
11909
11910         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
11911
11912 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
11913
11914         * cp/class.c (build_vtable): Rename to build_primary_vtable.
11915         (prepare_fresh_vtable): Rename to build_secondary_vtable.
11916         (make_new_vtable): New function.
11917         (modify_vtable_entry): Handle generation of new vtables correctly.
11918         (modify_one_vtable): Remove unused parameter.
11919         (dfs_fixup_vtable_deltas): Likewise.
11920         (override_one_vtable): Use build_secondary_vtable.
11921         (finish_struct_1): Use build_primary_vtable and
11922         build_secondary_vtable.
11923
11924 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
11925
11926         * cp/decl.c: Adjust variable names, comments, help strings.
11927
11928 2000-01-29  Nathan Sidwell  <nathan@acm.org>
11929
11930         * new2.cc (operator delete[]): Use operator delete, don't assume
11931         implementation.
11932
11933 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
11934
11935         * class.c (build_vtbl_initializer): Add argument to
11936         build_vtable_entry call.
11937
11938 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
11939
11940         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
11941         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
11942         (BF_DELTA): New macro.
11943         (BF_VCALL_INDEX): Likewise.
11944         (BF_FN): Likewise.
11945         (THUNK_VCALL_OFFSET): Likewise.
11946         (make_thunk): Change prototype.
11947         * class.c (build_vtable_entry): Integrate
11948         build_vtable_entry_for_fn.  Handle vcall indices.
11949         (build_vtable_entry_for_fn): Remove.
11950         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
11951         BF_VCALL_INDEX, BF_FN.
11952         (modify_vtable_entry): Integrate common code from
11953         modify_one_vtable and dfs_fixup_vtable_deltas.
11954         (add_virtual_function): Set BF_VCALL_INDEX.
11955         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
11956         and BF_FN.
11957         (modify_one_vtable): Simplify.
11958         (dfs_fixup_vtable_deltas): Likewise.
11959         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
11960         * method.c (make_thunk): Handle vcall indices.
11961
11962 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
11963
11964         Compiler side new abi rtti (not enabled).
11965         * cp-tree.h (new_abi_rtti_p): New macro.
11966         (emit_support_tinfos): Prototype new function.
11967         (tinfo_decl_p): Likewise.
11968         (emit_tinfo_decl): Likwise.
11969         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
11970         macros.
11971         (doing_runtime): New local static.
11972         (init_rtti_processing): Add new-abi initializer.
11973         (get_tinfo_decl): Add new-abi logic.
11974         (tinfo_from_decl): Likewise.
11975         (build_dynamic_cast_1): Likewise.
11976         (qualifier_flags): New static function.
11977         (tinfo_base_init): Likewise.
11978         (generic_initializer): Likewise.
11979         (ptr_ref_initializer): Likewise.
11980         (ptmd_initializer): Likewise.
11981         (class_hint_flags): Likewise.
11982         (class_initializer): Likewise.
11983         (synthesize_tinfo_var): Likewise.
11984         (create_real_tinfo_var): Likewise.
11985         (create_pseudo_type_info): Likewise.
11986         (get_vmi_pseudo_type_info): Likewise.
11987         (create_tinfo_types): Likewise.
11988         (emit_support_tinfos): New global function.
11989         (tinfo_decl_p): New global predicate.
11990         (emit_tinfo_decl): New global function.
11991         * class.c (set_rtti_entry): Generalize for old and new rtti.
11992         (build_vtbl_initializer): Likewise.
11993         * decl2.c (finish_file): Likewise.
11994
11995 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
11996
11997         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
11998         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
11999
12000 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
12001
12002         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
12003         for scopes.
12004
12005 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
12006
12007         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
12008
12009 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
12010
12011         * optimize.c (calls_setjmp_r): Supply new argument
12012         to special_function_p.
12013
12014 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12015
12016         * call.c: PROTO -> PARAMS.
12017         * class.c: Likewise.
12018         * cp-tree.h: Likewise.
12019         * cvt.c: Likewise.
12020         * decl.c: Likewise.
12021         * decl.h: Likewise.
12022         * decl2.c: Likewise.
12023         * dump.c: Likewise.
12024         * errfn.c: Likewise.
12025         * error.c: Likewise.
12026         * except.c: Likewise.
12027         * expr.c: Likewise.
12028         * init.c: Likewise.
12029         * input.c: Likewise.
12030         * lex.c: Likewise.
12031         * lex.h: Likewise.
12032         * method.c: Likewise.
12033         * optimize.c: Likewise.
12034         * parse.y: Likewise.
12035         * pt.c: Likewise.
12036         * repo.c: Likewise.
12037         * rtti.c: Likewise.
12038         * search.c: Likewise.
12039         * semantics.c: Likewise.
12040         * spew.c: Likewise.
12041         * tree.c: Likewise.
12042         * typeck.c: Likewise.
12043         * typeck2.c: Likewise.
12044         * xref.c: Likewise.
12045
12046 2000-01-25  Richard Henderson  <rth@cygnus.com>
12047
12048         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
12049
12050 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
12051
12052         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
12053         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
12054         (struct vcall_offset_data_s): New type.
12055         (dfs_vcall_offset_queue_p): New function.
12056         (dfs_build_vcall_offset_vtbl_entries): Likewise.
12057         (build_vcall_offset_vtbl_entries): Likewise.
12058         (layout_vtable_decl): Likewise.
12059         (num_vfun_entries): Likewise.
12060         (num_extra_vtbl_entries): Add the entries for vcall offsets.
12061         (build_vtbl_initializer): Likewise.
12062         (dfs_finish_vtabls): Use layout_vtable_decl.
12063         (modify_one_vtables): Always duplicate vtables under the new ABI.
12064         (finish_struct_1): Use layout_vtable_decl.
12065
12066 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12067
12068         * decl.c (member_function_or_else): Change third arg from a format
12069         specifier to an `enum overload_flags'.  Callers changed.
12070
12071 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
12072
12073         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
12074         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
12075         build_const_cast, get_delta_difference, check_return_expr): Avoid
12076         ANSI string concatenation usage.
12077
12078 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
12079
12080         * class.c (layout_class_type): Put the fields required to make a
12081         class non-empty at the end, not the beginning, of the TYPE_FIELDs
12082         list.
12083
12084 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
12085
12086         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
12087         template.
12088
12089         * decl2.c (mark_used): Do instantiate inlines that have been
12090         explicitly instantiated.
12091
12092 2000-01-24  Richard Henderson  <rth@cygnus.com>
12093
12094         * call.c (build_over_call): Use expand_tree_builtin.
12095         * typeck.c (build_function_call_real): Likewise.
12096         (build_binary_op_nodefault): Handle unordered compares.
12097
12098 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
12099
12100         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
12101         cp_tree_index values.
12102         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
12103         New global node #defines for them.
12104         * rtti.c (call_void_fn): Replace with ...
12105         (build_runtime_decl): ... new static function.
12106         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
12107         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
12108         (build_dynamic_cast_1): Always produce correctly typed result.
12109         Explicitly produce type_info addresses. Use dynamic_cast_node.
12110         * exception.cc (__throw_bad_cast): Return `void *'.
12111         (__throw_bad_typeid): Return `const type_info &'.
12112
12113 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
12114
12115         * cp-tree.h (get_vtable_decl): Prototype new function.
12116         * class.c (get_vtable_decl): New function. Broken out from ...
12117         (build_vtable): ... here. Use it.
12118         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
12119         by get_vtable_decl.
12120
12121 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
12122
12123         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
12124         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
12125         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
12126         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
12127         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
12128         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
12129         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
12130         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
12131         (CPTI_TINFO_VAR_ID): New enumeration.
12132         (__tp_desc_type_node, __access_mode_type_node,
12133         __bltn_desc_type_node, __user_desc_type_node,
12134         __class_desc_type_node, __ptr_desc_type_node,
12135         __attr_desc_type_node, __func_desc_type_node,
12136         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
12137         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
12138         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
12139         enum_desc_type_node, class_desc_type_node,
12140         si_class_desc_type_node, vmi_class_desc_type_node,
12141         ptmd_desc_type_node, base_desc_type_node): New #defines.
12142         (tinfo_fn_id, tinfo_fn_type): Rename to ...
12143         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
12144         (tinfo_var_id): New enumeration.
12145         (DECL_TINFO_FN_P): Augment comment.
12146         * decl.c (cp_global_trees): Adjust documentation.
12147         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
12148         tinfo_decl_type and tinfo_var_id.
12149         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
12150         (build_typeid): Remove unused variable.
12151         (get_tinfo_var): Use tinfo_var_id.
12152         (tinfo_name): New static function.
12153         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
12154         (tinfo_from_decl): Likewise.
12155         (get_base_offset): New static function, broken out of
12156         expand_class_desc.
12157         (expand_si_desc): Use tinfo_name.
12158         (expand_class_desc): Likewise. Lose local static variable.
12159         Use base_desc_type_node. Use get_base_offset.
12160         (expand_ptr_desc): Use tinfo_name.
12161         (expand_attr_desc): Likewise.
12162         (expand_generic_desc): Likewise.
12163
12164         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
12165         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
12166
12167 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
12168
12169         * cp-tree.h (__eprintf): Remove declaration.
12170         * tree.c (__eprintf): Remove definition.
12171
12172 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
12173             Mark Mitchell  <mark@codesourcery.com>
12174
12175         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
12176         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
12177
12178 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
12179
12180         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
12181
12182 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
12183
12184         * cp-tree.h (register_dtor_fn): New function.
12185         * decl.c (destroy_local_static): Rename to ...
12186         (register_dtor_fn): ... this.  Give it external linkage.
12187         (expand_static_init): Use it.
12188         * decl2.c (do_static_initialization): Likewise, if using
12189         __cxa_atexit.
12190         (do_static_destruction): Check that __cxa_atexit is not in use.
12191         (finish_file): Don't call do_static_destruction if using
12192         __cxa_atexit.
12193
12194         * typeck.c (convert_arguments): Restore two-message error
12195         reporting.
12196
12197 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
12198
12199         Remap dynamic cast hint values to be consistent across ABIs.
12200         * search.c (dynamic_cast_base_recurse): Remap generated value.
12201         (get_dynamic_cast_base_type): Adjust documentation.
12202         * tinfo.h (__user_type_info::dyncast): Likewise.
12203         (__user_type_info::find_public_subobj): Remap BOFF meaning.
12204         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
12205         (__class_type_info::do_dyncast): Likewise.
12206         (__class_type_info::do_find_public_subobj): Likewise.
12207         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
12208
12209 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
12210
12211         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
12212
12213         * typeck2.c (incomplete_type_error): Restore previous
12214         cp_error and cp_error_at call sequence.
12215
12216 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
12217
12218         * class.c (dump_class_hierarchy): Make format agree with argument;
12219         cast pointer to unsigned long and print with %lx.
12220
12221 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
12222
12223         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
12224
12225         * typeck.c (composite_pointer_type, common_type,
12226         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
12227         build_function_call_real, convert_arguments,
12228         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
12229         build_unary_op, mark_addressable, build_compound_expr,
12230         build_static_cast, build_reinterpret_cast, build_const_cast,
12231         build_c_cast, build_modify_expr, get_delta_difference,
12232         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
12233         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
12234         into a single one.
12235         * typeck2.c (readonly_error, abstract_virtuals_error,
12236         process_init_constructor, check_for_new_type): Likewise.
12237
12238 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
12239
12240         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
12241         VAR_DECLs.
12242
12243 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
12244
12245         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
12246         (build_x_typeid): Likewise.
12247         (get_tinfo_fn): Likewise.
12248         (get_tinfo_fn_unused): Rename to ...
12249         (get_tinfo_decl): ... here.
12250         * rtti.c (build_headof): Replace logic error with assertion.
12251         (get_tinfo_fn_dynamic): Rename to ...
12252         (get_tinfo_decl_dynamic): ... here. Make static. Use
12253         complete_type_or_else.
12254         (build_x_typeid): Move into ...
12255         (build_typeid): ... here. Adjust call to
12256         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
12257         throw_bad_typeid expression.
12258         (get_tinfo_fn_unused): Rename to ...
12259         (get_tinfo_decl): ... here. Adjust comment.
12260         (get_tinfo_fn): Delete.
12261         (tinfo_from_decl): New static function.
12262         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
12263         (get_typeid): Use complete_type_or_else.
12264         (build_dynamic_cast_1): Adjust calls to
12265         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
12266         * parse.y (primary): Adjust call to build_typeid.
12267         * except.c (build_eh_type_type_ref): Adjust call to
12268         get_tinfo_decl. Mark as used.
12269         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
12270         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
12271         * parse.c: Regenerated.
12272
12273 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
12274
12275         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
12276         calling convention.
12277         (resolves_to_fixed_type_p): Document calling convention.
12278         * rtti.c (build_x_typeid): Initialize NONNULL.
12279
12280         * cp-tree.h (build_shared_int_cst): New function.
12281         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
12282         * class.c (modify_vtable_entry): Likewise.
12283         (add_virtual_function): Split out code to generated shared
12284         INTEGER_CSTs to build_share_int_cst.
12285         (modify_all_vtables): Handle all the overridden functions here.
12286         Add overridden functions from non-primary virtual bases to the
12287         primary vtable.
12288         (finish_struct_1): Adjust call to modify_all_vtables.  Add
12289         overridden functions from non-primary bases to the vtable.
12290         * tree.c (build_shared_int_cst): New function.
12291
12292         * cp-tree.h (scratchalloc): Remove.
12293         (build_scratch_list): Likewise.
12294         * call.c (convert_class_to_reference): Replace build_scratch_list
12295         and build_expr_list with build_tree_list.
12296         (add_candidate): Replace scratchalloc with expralloc.  Note memory
12297         leak.
12298         (build_user_type_conversion_1):  Replace build_scratch_list
12299         and build_expr_list with build_tree_list.
12300         (build_new_op): Likewise.
12301         (build_op_delete_call): Likewise.
12302         (convert_like): Likewise.
12303         * cvt.c (ocp_convert): Likewise.
12304         * decl.c (start_decl): Likewise.
12305         (start_function): Likewise.
12306         (finish_destructor_body): Likewise.
12307         (maybe_build_cleanup_1): Likewise.
12308         * decl2.c (reparse_decl_as_expr): Likewise.
12309         * init.c (perform_member_init): Likewise.
12310         (expand_cleanup_for_base): Likewise.
12311         (build_builtin_delete_call): Likewise.
12312         (build_new_1): Likewise.
12313         (build_delete): Likewise.
12314         * method.c (do_build_assign_ref): Likewise.
12315         * parse.y (already_scoped_stmt): Likewise.
12316         (nontrivial_exprlist): Likewise.
12317         (net_initializer): Likewise.
12318         (initlist): Likewise.
12319         * parse.c: Regenerated.
12320         * rtti.c (build_x_typeid): Likewise.
12321         (build_dynamic_cast_1): Likewise.
12322         * typeck.c (build_x_compound_expr): Likewise.
12323         (build_static_cast): Likewise.
12324         (build_modify_expr): Likewise.
12325
12326         * cp-tree.h (DECL_VINDEX): Add documentation.
12327         * class.c (build_vtable_entry): Likewise.
12328         (start_vtable): Add comment.
12329         (add_virtual_function): Replace pending_hard_virtuals with
12330         overridden_virtuals and pending_virtuals with new_virtuals.
12331         Replace redundant assignments with assertions.
12332         (check_for_override): Add comment.
12333         (check_bases_and_members): Replace pending_hard_virtuals with
12334         overridden_virtuals and pending_virtuals with new_virtuals.
12335         (create_vtbl_ptr): Likewise.
12336         (layout_class_type): Likewise.
12337         (finish_struct_1): Likewise.  Add comments.
12338
12339 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
12340
12341         * class.c (finish_struct_1): Replace redundant code with
12342         assertions.
12343
12344         * cp-tree.h (flag_new_abi): Move.
12345         (flag_use_cxa_atexit): Likewise.
12346         (flag_honor_std): Likewise.
12347         (flag_rtti): Likewise.
12348         (vbase_offsets_in_vtable_p): Define.
12349         (vptrs_present_everywhere_p): Likewise.
12350         (TYPE_CONTAINS_VPTR_P): Likewise.
12351         (dfs_walk_real): Declare.
12352         * class.c (build_vbase_pointer_fields): Check
12353         vbase_offsets_in_vtable_p.
12354         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
12355         BINFO_VPTR_FIELD.
12356         (build_vbase_offset_vtbl_entries): Simplify.
12357         (build_vbase_offset_vtbl_entries): Adjust.
12358         (build_vbase_pointer): Add ability to look up vbase offsets in
12359         vtable.
12360         (start_vtable): New function.
12361         (add_virtual_function): Use it.
12362         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
12363         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
12364         (build_vtbl_initializer): Take the type of the complete object as
12365         input.  Use it to correctly calculate vbase offsets.
12366         (dfs_finish_vtbls): Pass the complete type to
12367         build_vtbl_initializer.
12368         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
12369         (create_vtable_ptr): Create a vtable even if there are no
12370         new virtual functions, under the new ABI.
12371         (finish_struct_1): Likewise.
12372         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
12373         * decl.c (exapnd_static_init): Remove call to
12374         preserve_initializer.
12375         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
12376         vtables.
12377         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
12378         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
12379         (construct_virtual_bases): Don't initialize virtual base pointers
12380         under the new ABI.
12381         (build_aggr_init): Clean up comment.
12382         (expand_aggr_init_1): Likewise.
12383         * rtti.c (expand_class_desc): Store the virtual function table
12384         index where the vbase offset lives in the offset field.
12385         * search.c (dfs_walk_real): Make it global.
12386         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
12387         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
12388
12389         * tinfo.h (USItype): Make it signed under the new ABI.
12390         * tinfo.cc (convert_to_base): New function.  Encapsulate base
12391         conversion logic here.
12392         (__class_type_info::do_upcast): Use it.
12393         (__class_type_info::do_dyncast): Likewise.
12394         (__class_type_info::do_find_public_subobj): Likewise.
12395
12396         * init.c (construct_virtual_bases): Don't look up the addresses of
12397         virtual bases at run-time.
12398
12399         * class.c (build_vbase_pointer): Relocate.
12400         (build_vbase_pointer_fields): Likewise.
12401         (dfs_build_vbase_offset_vtbl_entries): Likewise.
12402         (build_vbase_offset_vtbl_entries): Likewise.
12403
12404         * decl.c (init_decl_processing): Complain if -fnew-abi
12405         -fno-vtable-thunks is used.
12406
12407         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
12408         flag_new_abi.
12409
12410 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
12411
12412         * cp-tree.h (num_extra_vtbl_entries): New function.
12413         (size_extra_vtbl_entries): Likewise.
12414         (dfs_vtable_path_unmark): Likewise.
12415         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
12416         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
12417         * class.c (num_extra_vtbl_entries): New function.
12418         (size_extra_vtbl_entries): Likewise.
12419         (dfs_build_vbase_offset_vtbl_entries): New function.
12420         (build_vbase_offset_vtbl_entries): Likewise.
12421         (build_vtbl_initializer): Use it.
12422         (finish_struct_1): Adjust vtable sizes (using
12423         num_extra_vtbl_entries).
12424         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
12425         THUNK_DECL is non-NULL before expanding it.
12426         * init.c (expand_virtual_init): Adjust the vtable pointer by
12427         size_extra_vtbl_entries before storing it.
12428         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
12429         Handle TREE_LIST parameters here, not in the dfs_* functions.
12430         (dfs_unmarked_real_bases_queue_p): Adjust.
12431         (dfs_marked_real_bases_queue_p): Likewise.
12432         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
12433         (dfs_vtable_path_marked_real_bases_queue_p): New function.
12434         (dfs_vtable_path_unmark): Likewise.
12435
12436 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
12437
12438         * optimize.c (copy_body_r): Clear the operand three of a
12439         TARGET_EXPR when copying it.
12440
12441 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12442
12443         * method.c (build_decl_overload_real): Check whether we are in ::
12444         before returning __builtin_new/delete.
12445
12446 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
12447
12448         * pt.c (tsubst_friend_function): Improve comment.
12449         (instantiate_decl): Avoid crashing when a "nested" function is
12450         instantiated from the top level.
12451
12452         * dump.c (dqeueue_and_dump): Dump
12453         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
12454
12455 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12456
12457         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
12458
12459 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
12460
12461         * g++spec.c (lang_specific_driver): Add -fnew-abi if
12462         ENABLE_NEW_GXX_ABI defined.
12463         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
12464         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
12465         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
12466
12467 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
12468
12469         * decl.c (start_cleanup_fn): Call pushdecl.
12470
12471         * call.c (convert_class_to_reference): Fix typos.
12472         (build_conditional_expr): Handle errors gracefully.
12473         * class.c (push_nested_class): Likewise.
12474         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
12475         (DECL_THIS_EXTERN): Use it.
12476         (DECL_THIS_STATIC): Likewise.
12477         * cvt.c (convert_to_void): Handle errors gracefully.
12478         (build_expr_type_conversion): Likewise.
12479         * decl.c (maybe_push_decl): Likewise.
12480         (start_decl_1): Likewise.
12481         (require_complete_types_for_parms): Likewise.
12482         * parse.y (structsp): Likewise.
12483         (base_class): Likewise.
12484         * parse.c: Regenerated.
12485         * pt.c (finish_member_template_decl): Likewise.
12486         * typeck.c (decay_conversion): Likewise.
12487
12488         * cp-tree.h (dfs_skip_vbases): New function.
12489         (find_vbase_instance): Likewise.
12490         * class.c (determine_primary_base): Allow a nearly empty base to
12491         serve as a primary base class under the new ABI.
12492         (get_class_offset_1): Rename to ...
12493         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
12494         messages here.
12495         (get_class_offset): Use it.  Issue error messages here.
12496         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
12497         find the right copies of virtual bases.
12498         (fixup_vtable_deltas1): Rename to ...
12499         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
12500         bases as primary bases.
12501         (fixup_vtable_deltas): Remove.
12502         (override_one_vtable): Handle virtual bases as primary bases.
12503         (merge_overrides): Likewise.
12504         (finish_struct_1): Likewise.
12505         (dump_class_hierarchy): Dump primary-ness of bases as well.
12506         * search.c (mark_primary_bases): Use a pre-order traversal to
12507         handle primary virtual bases.
12508         (dfs_skip_vbases): New fiunction.
12509         (expand_upcast_fixups): Adjust to handle primary virtual bases.
12510         (fixup_virtual_upcast_offsets): Likewise.
12511         (fixup_all_virtual_upcast_offsets): Likewise.
12512         (dfs_find_vbase_instances): New function.
12513         (find_vbase_instance): Likewise.
12514
12515 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
12516
12517         * lex.c (DIR_SEPARATOR): Delete macro.
12518
12519 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
12520
12521        * decl2.c (lang_decode_option): Handle automatic line wrapping
12522        option.
12523
12524 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
12525
12526         * friend.c (do_friend): Don't resolve scopes when processing
12527         template declarations, even if the qualifying scope doesn't
12528         involve template parameters.
12529
12530 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
12531
12532         * class.c (dfs_modify_vtables_queue_p): Remove.
12533         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
12534         and dfs_marked_real_bases_queue_p instead of
12535         dfs_modify_vtables_queue_p.
12536
12537         * class.c (build_vbase_path): Simplify.
12538         (dfs_propagate_binfo_offsets): New function.
12539         (propagate_binfo_offsets): Use it.
12540         (remove_base_field): Simplify.
12541         (dfs_set_offset_for_vbases): Remove.
12542         (dfs_set_offset_for_shared_vbases): New function.
12543         (dfs_set_offset_for_unshared_vbases): Likewise.
12544         (layout_virtual_bases): Use them.
12545         (layout_basetypes): Don't call propagate_binfo_offsets.
12546         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
12547         for the vbases.
12548
12549         * class.c (build_base_field): New function, split out from ...
12550         (build_base_fields): ... here.  Use it.  Allocate primary bases
12551         first, under the new ABI.
12552         (get_vtable_entry): Remove.
12553         (remove_base_field): New function, split out from ...
12554         (remove_base_fields): ... here.  Adjust since primary bases come
12555         first under the new ABI.
12556
12557         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
12558         (initialize_vtbl_ptrs): New function.
12559         (expand_indirect_vtbls_init): Change prototype.
12560         (convert_pointer_to_vbase): Declare.
12561         * init.c (expand_direct_vtbls_init): Remove.
12562         (dfs_initialize_vtbl_ptrs): New function.
12563         (initialize_vtbl_ptrs): Likewise.
12564         (emit_base_init): Use initialize_vtbl_ptrs.
12565         * search.c (convert_pointer_to_vbase): Make it global.
12566         (expand_indirect_vtbls_init): Remove vtable initialization code.
12567         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
12568
12569         * class.c (dfs_finish_vtbls): New function.
12570         (finish_vtbls): Use it.
12571         (dump_class_hierarchy): New function.
12572
12573         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
12574         (BINFO_VBASE_PRIMARY_P): New macro.
12575         (BINFO_VIRTUALS): Add to documentation.
12576         (SET_BINFO_PRIMARY_MARKED_P): Remove.
12577         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
12578         (dfs_mark_primary_bases_queue_p): Likewise.
12579         (dfs_unmarked_real_bases_queue_p): New function.
12580         (dfs_marked_real_bases_queue_p): Likewise.
12581         * search.c (dfs_mark_primary_bases): Adjust.
12582         (mark_primary_bases): Likewise.
12583         (get_shared_vbase_if_not_primary): New function.
12584         (dfs_unmarked_real_bases_queue_p): Likewise.
12585         (dfs_marked_real_bases_queue_p): Likewise.
12586         (dfs_get_pure_virtuals): Simplify.
12587         (get_pure_virtuals): Likewise.
12588
12589 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12590
12591         * lex.c: Include tm_p.h.
12592
12593 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
12594
12595         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
12596
12597 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
12598
12599         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
12600         * pt.c (instantiate_decl): Defer comdat templates that might not be
12601         needed.
12602
12603         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
12604         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
12605         (finish_file): Likewise.
12606
12607         * decl2.c (import_export_class): Undo 12/14 change.
12608
12609         * error.c (dump_decl): operator new, not operatornew.
12610
12611         * class.c (field_decl_cmp): A nontype is "greater" than a type.
12612         * search.c (lookup_field_1): Look for the last field with the
12613         desired name.
12614
12615 2000-01-05  Nathan Sidwell  <nathan@acm.org>
12616
12617         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
12618         FUNCTION_DECL.
12619
12620 2000-01-05  Nathan Sidwell  <nathan@acm.org>
12621
12622         * typeck.c (build_static_cast): Don't strip target qualifiers
12623         when casting from a class.
12624
12625 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12626
12627         * class.c (warn_hidden): Initialize variable `fndecl'.
12628
12629 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
12630
12631         * decl.c (flag_isoc9x): New variable to be able to use code in
12632         c-common.c.  For now always zero.
12633
12634 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
12635
12636         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
12637         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
12638         or unshare_base_binfos for virtual bases here.
12639         * search.c (dfs_get_vbase_types): Do it here.
12640         (get_vbase_types): Adjust.
12641
12642 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
12643
12644         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
12645         (BINFO_PRIMARY_MARKED_P): Use flag 5.
12646         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
12647         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
12648         (unmark_primary_bases): Remove declaration.
12649         (unmarkedp): Declare.
12650         (dfs_vbase_unmark): Likewise.
12651         * class.c (determine_primary_base): Return immediately if there
12652         are no base classes.  Call mark_primary_bases here.
12653         (modify_all_direct_vtables): Remove.
12654         (modify_all_indirect_vtables): Remove.
12655         (dfs_modify_vtables_queue_p): New function.
12656         (dfs_modify_vtables): New function.
12657         (modify_all_vtables): Use them.
12658         (build_base_fields): Build FIELD_DECLs for primary virtual base
12659         classes.
12660         (create_vtable_ptr): Don't call determine_primary_base here.
12661         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
12662         (dfs_set_offset_for_vbases): ... this.
12663         (layout_virtual_bases): Use it.
12664         (layout_class_type): Call determine_primary_base here.
12665         * search.c (unmarkedp): Make it global.
12666         (shared_marked_p): Simplify.
12667         (shared_unmarked_p): Likewise.
12668         (dfs_primary_bases_queue_p): Remove.
12669         (dfs_unmark_primary_bases): Likewise.
12670         (unmark_primary_bases): Likewise.
12671         (mark_primary_bases): Simplify.
12672         (get_pure_virtuals): Don't call mark_primary_bases here.
12673         (dfs_vbase_unmark): New function.
12674         (get_vbase_types): Simplify.
12675
12676         * class.c (struct base_info): Remove.
12677         (determine_primary_base): Take has_virtual_p rather than a
12678         base_info as input.  Don't calculate max_has_virtual.
12679         (finish_struct_bits): Remove max_has_virtual argument.
12680         (create_vtable_ptr): Remove max_has_virtual_p argument.
12681         (layout_virtual_bases): Remove max argument.
12682         (layout_basetypes): Likewise.
12683         (layout_class_type): Remove max_has_virtual_p argument.
12684         (finish_struct_1): Remove max_has_virtual.
12685
12686         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
12687         (layout_basetypes): Remove.
12688         * class.c (propagate_binfo_offsets): Moved here from tree.c.
12689         Update to handle primary virtual bases.
12690         (remove_base_fields): New function, split out from
12691         layout_basetypes.
12692         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
12693         (layout_virtual_bases): New function, split out from
12694         layout_basetypes.  Update to handle primary virtual bases.
12695         (layout_basetypes): Moved here from tree.c.  Use
12696         remove_base_fields and layout_virtual_bases.
12697         * search.c (dfs_mark_primary_bases_queue_p): New function.
12698         (mark_primary_bases): Use it.
12699         * tree.c (CEIL): Remove.
12700         (propagate_binfo_offsets): Remove.
12701         (layout_basetypes): Remove.
12702
12703 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
12704
12705         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
12706         (BINFO_PRIMARY_MARKED_P): New macro.
12707         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
12708         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
12709         (mark_primary_bases): New function.
12710         (unmark_primary_bases): Likewise.
12711         * search.c (get_abstract_virtuals_1): Remove.
12712         (dfs_mark_primary_bases): New function.
12713         (mark_primary_bases): Likewise.
12714         (dfs_unmark_primary_bases): Likewise.
12715         (unmark_primary_bases): Likewise.
12716         (dfs_get_pure_virtuals): Likewise.
12717
12718 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
12719
12720         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
12721         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
12722         (modify_one_vtable): Adjust.
12723         (fixup_vtable_deltas1): Likewise.
12724         (override_one_vtable): Likewise.
12725         * search.c (get_abstract_virtuals_1): Likewise.
12726         (get_pure_virtuals): Likewise.
12727         (expand_upcast_fixups): Likewise.
12728         * tree.c (debug_binfo): Likewise.
12729
12730         * class.c (build_vtable): Don't return a value.  Don't rebuild
12731         vtables for bases that have already been handled.
12732         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
12733         already been handled.
12734         (modify_one_vtable): Adjust accordingly.
12735         (fixup_vtable_deltas1): Likewise.
12736         (finish_struct_1): Likewise.
12737
12738 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12739
12740         * call.c (build_new_method_call): Also check destructors.