OSDN Git Service

403a64270177676a21b54880f3111603f4e0d3ac
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-04-24  Nathan Sidwell  <nathan@codesourcery.com>
2
3         PR c++/10337
4         * call.c (joust): Don't warn about conversion ops that are exact
5         or cv-conversions. Rearrange to avoid multiple type comparisons.
6
7 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
8
9         PR c++/10471
10         * call.c (build_cxx_call): Robustify.
11
12 2003-04-23  Neil Booth  <neil@daikokuya.co.uk>
13
14         * Make-lang.in (lex.o): Remove mbchar.h.
15         * lex.c (MULTIBYTE_CHARS): Lose.
16         * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
17         in c-lex.c.
18
19 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
20
21         PR c++/9847
22         * cp-tree.h (duplicate_tag_error): Remove.
23         * class.c (duplicate_tag_error): Remove.
24         * semantics.c (begin_class_definition): Return immediately for a
25         duplicate class definition.
26
27         PR c++/10451
28         * decl.c (grokdeclarator): Correct logic for "mutable" errors.
29
30 2003-04-22  Mark Mitchell  <mark@codesourcery.com>
31
32         PR c++/10446
33         * search.c (lookup_fnfields_1): Handle empty slots in the method
34         vector.
35         
36         PR c++/10428
37         * decl.c (check_elaborated_type_specifier): New function, split
38         out from ...
39         (xref_tag): ... here.  Use the new function in more places.
40
41         * rtti.c (throw_bad_typeid): Use build_cxx_call.
42
43 2003-04-21  Mark Mitchell  <mark@codesourcery.com>
44
45         * call.c (build_over_call): Use build_cxx_call.
46         (build_cxx_call): New method, split out of build_over_call.
47         * cp-tree.h (language_function): Add can_throw.
48         (build_cxx_call): Declare it.
49         * decl.c (finish_function): If a function does not contain any
50         calls to functions that can throw an exception, indicate that
51         fact.
52         * decl2.c (mark_used): Do not defer the instantiation of
53         functions, if the current function does not throw.
54         * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
55         * pt.c (instantiate_decl): Make sure import_export_decl is called
56         before emitting things.
57         * rtti.c (throw_bad_cast): Use build_cxx_call.
58         (build_dynamic_cast_1): Likewise.
59         * typeck.c (build_function_call): Likewise.
60
61 2003-04-21  Nathan Sidwell  <nathan@codesourcery.com>
62
63         PR c++/9881
64         * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
65         expressions. Reverts my 2002-08-08 patch.
66         
67         * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
68         cheaper early exit.
69
70 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
71
72         * cp/decl2.c (start_static_storage_duration_function): Take count
73         arg, don't check if it wraps round.
74         (generate_ctor_or_dtor_function): Add locus arg, use it.
75         (generate_ctor_and_dtor_functions_for_priority): Data arg is a
76         locus.
77         (finish_file): Set line numbers to past EOF for synthesized
78         functions.
79
80 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
81
82         PR c++/10405
83         * search.c (lookup_field_1): Final scan goes backwards for
84         types, forwards for non-types.
85
86 2003-04-17  Roger Sayle  <roger@eyesopen.com>
87
88         PR c/10375
89         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
90         "nothrow" function attributes.
91
92 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
93
94         PR c++/10347
95         * pt.c (type_dependent_expression_p): Handle array new.
96
97 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
98
99         PR c++/10381
100         * parser.c (cp_parser_primary_expression): Reorganize logic for
101         dealing with name lookup failures.
102
103 2003-04-15  Jason Merrill  <jason@redhat.com>
104
105         * decl2.c (mark_used): Don't instantiate anything if
106         skip_evaluation.
107
108 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
109
110         * tree.c (build_cplus_array_type_1): Do not call
111         uses_template_parms() on a NULL index_type.
112
113 2003-04-13  Roger Sayle  <roger@eyesopen.com>
114
115         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
116
117 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
118
119         PR c++/10300
120         * init.c (build_new_1): Reorganize.
121
122 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
123
124         * class.c (initialize_array)
125         * decl.c (reshape_init)
126         * decl2.c (build_expr_from_tree)
127         * init.c (build_zero_init)
128         * pt.c (tsubst_copy, tsubst_copy_and_build)
129         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
130         (ptm_initializer, class_initializer, get_pseudo_ti_init)
131         * semantics.c (finish_compound_literal)
132         * typeck.c (build_ptrmemfunc1)
133         * typeck2.c (store_init_value, process_init_constructor)
134         (build_functional_cast): Use build_constructor.
135
136 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
137
138         * call.c (print_z_candidates): Use gcc_gettext_width, not
139         strlen, to determine how much padding to use.
140
141 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
142
143         * decl.c: Update all calls to shadow_warning.
144
145 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
146
147         * class.c (layout_class_type): Correct handling for overlong
148         bit-fields whose width is the same as an integer type.
149
150 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
151
152         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
153         * cp-lang.c (cp_tree_size): New function.
154         (LANG_HOOKS_TREE_SIZE): Override.
155
156         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
157         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
158         (union lang_tree_node): Remove common and srcloc members.
159         (build_srcloc_here): Don't prototype.
160         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
161         * pt.c (pending_templates): Correct comment.
162         * tree.c (build_srcloc, build_srcloc_here): Kill.
163
164 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
165
166         * call.c: Include intl.h.
167         (print_z_candidate): Always use inform; get rid of errfn
168         argument. Reorganize so that all the strings get picked up
169         by xgettext.  Note obligation of caller to pass first argument
170         through gettext.
171         (print_z_candidates): Update to match.  Indent second and
172         successive candidates by strlen() of translated message.
173         (joust): Restructure ambiguous-conversion pedwarn so that
174         translators see a complete sentence.  Update calls to
175         print_z_candidate.
176
177         * Make-lang.in (cp/call.o): Update dependencies.
178
179 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
180
181         * decl.c (set_current_binding_level): Delete, revert last change.
182         (current_binding_level): Modify to allow it as as lvalue.
183
184 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
185
186         * name-lookup.c (find_binding): Pass appropriate pointer type to
187         POP_TIMEVAR_AND_RETURN.
188
189 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
190
191         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
192         * cp-tree.h: Don't insist on having GNUC.
193
194 2003-04-03  Jason Merrill  <jason@redhat.com>
195
196         * cvt.c (ocp_convert): Only abort if we try to convert an object
197         of TREE_ADDRESSABLE type.
198
199         * class.c (build_vtable): Set DECL_ALIGN here.
200         (get_vtable_decl): Not here.
201         (layout_vtable_decl): Or here.
202         (create_vtable_ptr): Or here.
203         (layout_class_type): Or here.
204         (check_bitfield_decl): Don't mess with field alignment.
205
206 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
207
208         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
209         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
210         * rtti.c (dfs_class_hint_mark): Likewise.
211
212         * decl.c (push_local_name, push_class_level_binding,
213         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
214         functions returning void.
215         * decl2.c (add_using_namespace): Likewise.
216
217         * decl.c (print_binding_level, print_other_binding_stack,
218         print_binding_stack): Cast argument of %p specifier to void*.
219         * ptree.c (cxx_print_decl): Likewise.
220
221         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
222         VAR_FUNCTION_OR_PARM_DECL_CHECK,
223         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
224         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
225         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
226
227         * decl.c (set_current_binding_level): New macro.  Use throughout
228         when setting the current binding level.
229
230         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
231         in enum.
232         * method.c (mangling_flags): Likewise.
233
234         * cp-tree.h (lang_type_header): Add __extension__ and use
235         CHAR_BITFIELD for members.
236
237 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
238
239         PR other/9274
240         * mangle.c: Include gt-cp-mangle.h.
241         (subst_identifiers): Mark with GTY.
242         * config-lang.in (gtfiles): Add cp/mangle.c.
243         * Make-lang.in: (gt-cp-mangle.h): New rule.
244         (cp/mangle.o): Depends on gt-cp-mangle.h.
245
246 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
247
248         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
249         after \$(srcdir)/cp/name-lookup.h.
250         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
251         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
252         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
253         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
254
255 2003-03-31  Jason Merrill  <jason@redhat.com>
256
257         PR java/10145
258         * class.c (check_field_decl): Don't set DECL_ALIGN.
259
260 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
261
262         PR c++/7647
263         * decl.c (grokdeclarator): Tidy, slightly.
264         * search.c (lookup_field_1): Add want_type parameter.
265         (lookup_field_r): Adjust call to lookup_field_1.
266
267 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
268
269         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
270
271 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
272
273         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
274         prototype.
275         (cxx_scope_find_binding_for_name): Likewise.
276         * decl.c (find_binding: Move to name-lookup.c.
277         (binding_for_name): Likewise.
278         (cxx_scope_find_binding_for_name): Likewise.
279         (BINDING_LEVEL):  Remove.
280         (push_binding): Tidy.
281         (push_class_binding): Likewise.
282         (pop_binding): Likewise.
283         (poplevel): Likewise.
284         (poplevel_class): Likewise.
285         (set_identifier_type_value_with_scope): Likewise.
286         (push_overloaded_decl): Likewise.
287         (lookup_tag): Likewise.
288         (unqualified_namespace_lookup): Likewise.
289         (lookup_name_current_level): Likewise.
290         (maybe_inject_for_scope_var): Likewise.
291         (namespace_binding): Move to name-lookup.c.
292         (set_namespace_binding): Likewise.
293         * decl2.c (lookup_using_namespace): Tidy.
294         (qualified_lookup_using_namespace): Likewise.
295         (do_toplevel_using_decl): Likewise.
296         * name-lookup.c: Include "timevar.h"
297         * name-lookup.h (cxx_scope):  Declare.
298         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
299         member declaration.
300         (BINDING_SCOPE): Adjust definition.
301         (BINDING_HAS_LEVEL_P): Remove.
302
303 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
304
305         * name-lookup.c: New file.
306         * name-lookup.h: Likewise..
307         * decl.c (push_binding): Adjust use cxx_binding_make.
308         (free_bindings): Move to name-lookup.c
309         (pop_binding): Use cxx_binding_free.
310         (binding_for_name): Tidy.
311         * cp-tree.h: Include "name-lookup.h"
312         (cxx_binding_make): Move to name-lookup.h
313         (cxx_binding_clear): Likewise.
314         (struct cxx_binding): Likewise.
315         (LOCAL_BINDING_P): Likewise.
316         (INHERITED_VALUE_BINDING_P): Likewise.
317         (BINDING_SCOPE): Likewise.
318         (BINDING_HAS_LEVEL_P): Likewise.
319         (BINDING_VALUE): Likewise.
320         (BINDING_TYPE): Likewise.
321         * config-lang.in (gtfiles): Add cp/name-lookup.h
322         * Make-lang.in (cp/name-lookup.o): New rule.
323         (CXX_OBJS): Add cp/name-lookup.o
324         (CXX_TREE_H): Add cp/name-lookup.h
325
326 2003-03-28  Jason Merrill  <jason@redhat.com>
327
328         PR c++/10245
329         * cvt.c (force_rvalue): New fn.
330         * call.c (build_conditional_expr): Use it.
331         * cp-tree.h: Declare it.
332
333 2003-03-28  Mike Stump  <mrs@apple.com>
334
335         * error.c (dump_expr): Add 0x to printed hex numbers to make
336         output match source code better.
337
338 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
339
340         PR c++/10218
341         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
342         definitions.
343
344         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
345         non-existant ssdf_decls array.
346         (finish_file): Call generator_ctor_or_dtor_function when there are
347         static constructors or destructors and no other static
348         initializations.
349
350 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
351
352         PR c++/10047
353         * decl2.c (finish_file): Don't warn about explicitly instantiated
354         inline decls.
355
356 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
357
358         PR c++/10224
359         * pt.c (lookup_template_class): Only check instantiated args if
360         they do not contain template parameters.
361
362 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
363
364         PR c++/10158
365         * parser.c (cp_parser_function_definition): Set
366         DECL_INITIALIZED_IN_CLASS for members.
367         * pt.c (instantiate_decl): Only reduce the template args for
368         friends that are not defined in class.
369
370 2003-03-25  Jason Merrill  <jason@redhat.com>
371
372         * call.c (print_z_candidate): Change name of first arg to msgid.
373         (joust): Add comment for translators.
374
375 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
376
377         PR c++/9898, PR c++/383, DR 322
378         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
379         through reference types on both PARM and ARG.
380
381 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
382
383         PR c++/10119
384         * error.c (dump_expr) <BASELINK>: Use dump_expr.
385         * pt.c (maybe_fold_nontype_args): New function.
386         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
387         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
388         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
389         maybe_fold_nontype_args.
390
391 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
392
393         PR c++/10026
394         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
395
396 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
397
398         PR c++/7086
399         * typeck.c (cxx_mark_addressable):  Adjust call to
400         gen_mem_addressof or put_var_into_stack.
401
402 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
403
404         PR c++/9978, c++/9708
405         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
406         * call.c (add_template_candidate_real): Adjust
407         instantiate_template call.
408         * class.c (resolve_address_of_overloaded_function): Likewise.
409         * decl.c (build_enumerator): Set TREE_CONSTANT.
410         * pt.c (check_instantiated_args): New.
411         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
412         TREE_READONLY.
413         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
414         (reduce_template_parm_level): Likewise.
415         (process_template_parm): Likewise.
416         (check_explicit_specialization): Adjust instantiate_template call.
417         (convert_template_argument): Don't check non-type argument here.
418         (lookup_template_class): Check them here.
419         (tsubst_friend_function): Adjust instantiate_template call.
420         (instantiate_template): Add tsubst_flags parameter, use it. Check
421         instantiated args.
422
423 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
424
425         * decl.c: Update calls to shadow_warning.
426
427 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
428
429         PR c++/9898
430         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
431         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
432
433 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
434
435         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
436         friends.
437         * cp/pt.c (instantiate_class_template): Fix formatting.
438
439 2003-03-14  Matt Austern  <austern@apple.com>
440
441         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
442         (unemitted_tinfo_decl_p): Remove.
443         (emit_tinfo_decl): Change declaration to remove unused parameter.
444         * decl2.c (finish_file): Change tinfo emission to loop through
445         unemitted_tinfo_decls array instead of looping through all decls.
446         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
447         unused second parameter.
448         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
449         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
450         (emit_tinfo_decl): remove unused second parameter, add assertion
451         that decl hasn't already been emitted.
452
453 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
454
455         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
456         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
457         return statements.
458
459 2003-03-19  Jason Merrill  <jason@redhat.com>
460
461         PR c++/8316, c++/9315, c++/10136
462         * call.c (print_z_candidate): Split out from...
463         (print_z_candidiates): ...here.
464         (joust): Use it.
465
466 2003-03-17  Roger Sayle  <roger@eyesopen.com>
467
468         PR c++/10031
469         * decl.c (duplicate_decls): Use the new type when prototyping
470         anticipated decls, even when the types match.  This defines the
471         exception list for the built-in function.
472
473 2003-03-17  Jason Merrill  <jason@redhat.com>
474
475         PR c++/10091
476         * typeck.c (build_class_member_access_expr): Compare
477         TYPE_MAIN_VARIANTs.
478
479 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
480
481         PR c++/9639
482         * parser.c (cp_parser_declarator_id): Clear parser->scope.
483
484 2003-03-16  Jason Merrill  <jason@redhat.com>
485
486         PR c++/9993
487         * decl.c (finish_function): Only allow the NRVO to use variables
488         declared at function scope.
489
490 2003-03-17  Andreas Jaeger  <aj@suse.de>
491
492         * Make-lang.in (cp/TAGS): Remove.
493
494 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
495
496         PR c++/9629
497         * cp-tree.h (struct language_function): Add in_base_initializer.
498         (in_base_initializer): define it.
499         (expand_member_init): Remove INIT param.
500         * init.c (expand_member_init): Remove INIT param, return the member.
501         (emit_mem_initializers): Set in_base_initializer.
502         * class.c (build_base_path): Check in_base_initializer.
503         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
504         * pt.c (tsubst_initializer_list): Likewise.
505
506 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
507
508         * decl.c (binding_for_name): Fix initialization thinko.
509
510 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
511
512         Compile-time improvement: 2/n.
513         * cp-tree.h (struct cxx_binding): New datatype;
514         (struct lang_identifier): Use it.
515         (LOCAL_BINDING_P): Adjust definition.
516         (INHERITED_VALUE_BINDING_P): Likewise.
517         (BINDING_SCOPE): Likewise.
518         (BINDING_HAS_LEVEL_P): Likewise.
519         (BINDING_VALUE): Likewise.
520         (BINDING_TYPE): Likewise.
521         (IDENTIFIER_VALUE): Likewise.
522         (struct tree_binding): Remove.
523         (TS_CP_BINDING): Likewise.
524         ((union lang_tree_node): Remove field "binding".
525         (cxx_binding_clear): New macro.
526         (binding_for_name): Adjust return type.
527         (qualified_lookup_using_namespace): Adjust prototype.
528         (lookup_using_namespace): Adjust prototype.
529         (cxx_scope_find_binding_for_name): Declare.
530         * cp-tree.def: Remove CPLUS_BINDING definition.
531         * decl.c (push_binding): Adjust local variable type.
532         (add_binding): Likewise.
533         (push_class_binding): Likewise.
534         (pop_binding): Likewise.
535         (poplevel): Likewise.
536         (poplevel_class): Likewise.
537         (free_bindings):  Adjust type.
538         (find_binding): Adjust return type, add a third parameter. Remove
539         non-useful assertion now that we use static typing.
540         (cxx_scope_find_binding_for_name): New function.
541         (binding_for_name): Use it.  Adjust local variable type. Simplify.
542         (namespace_binding):  Simplify.
543         (set_namespace_binding): Likewise.
544         (set_identifier_type_value_with_scope): Adjust local variable type.
545         (lookup_tag): Don't type-abuse of local variable 'old'.
546         (lookup_namespace_name): Likewise.  Allocate binding on stack.
547         (select_decl): Adjust prototype.
548         (unqualified_namespace_lookup):  Allocate binding on stack.
549         Don't type-abuse of local variable 'val'.
550         (lookup_name_real): Likewise.
551         (maybe_inject_for_scope_var): Adjust local variable type.
552         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
553         (namespace_binding): Adjust logic, simplify.
554         (BINDING_LEVEL): Adjust definition.
555         (push_class_level_binding): Adjust local variable type.
556         (struct cxx_saved_binding): Adjust field 'binding' type.
557         * decl2.c (ambiguous_decl): Adjust prototype.
558         (lookup_using_namespace): Adjust local variable type.
559         (qualified_lookup_using_namespace): Catch type error and correct
560         ensueing logic error.
561         (do_nonmember_using_decl): Adjust local variable type.  Allocate
562         temporary cxx_binding on stack.
563         (do_toplevel_using_decl): Adjust local variable type.
564         * ptree.c (cxx_print_cxx_binding): New function.
565         (cxx_print_identifier): Use it.
566         (cxx_print_xnode): Delete CPLUS_BINDING case label.
567
568 2003-03-15  Roger Sayle  <roger@eyesopen.com>
569
570         * tree.c (count_functions): Fix whitespace.
571
572 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
573
574         * Make-lang.in: Update.
575
576 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
577
578         PR c++/6440
579         * pt.c (maybe_process_partial_specialization): Handle
580         member class template when enclosing class template is
581         explicit specialized.
582         (most_general_template): Stop looking when DECL is already
583         specialized.
584
585 2003-03-13  Jason Merrill  <jason@redhat.com>
586
587         PR c++/9420
588         * search.c (lookup_conversions): Call complete_type here.
589         * call.c (implicit_conversion): Not here.
590
591 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
592
593         * decl2.c (do_nonmember_using_decl): Correct handling of
594         simultaneous type/non-type bindings.
595
596         * call.c (initialize_reference): Remove bogus assertion.
597         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
598
599 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
600
601         PR c++/7050
602         * expr.c (cxx_expand_expr): Return const0_rtx for throw
603         expressions.
604
605 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
606
607         PR c++/9474
608         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
609         to merge old and new declarations.
610
611 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
612
613         * g++.1: Remove.
614         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
615         (cp/g++.1): Build it from scratch in the build tree.
616         (c++.install-man): Depend on it.  Install it from the build tree.
617         (c++.mostlyclean): Clean it.
618
619 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
620
621         PR c++/9474
622         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
623         to merge old and new declarations.
624
625         PR c++/9924
626         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
627
628 2003-03-11  Jason Merrill  <jason@redhat.com>
629
630         PR c++/9820
631         * search.c (lookup_member): Fix handling of functions in a class
632         being defined.
633
634 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
635
636         PR c++/8700
637         * call.c (convert_class_to_reference): Adjust usage of
638         splice_viable.
639         (any_viable): Remove.
640         (splice_viable): Combine with any_viable.
641         (print_z_candidates): Avoid printing duplicates.
642         (build_user_type_conversion_1): Adjust usage of splice_viable.
643         (build_new_function_call): Likewise.
644         (build_operator_new_call): Likewise.
645         (build_object_call): Likewise.
646         (build_conditional_expr): Likewise.
647         (build_new_op): Likewise.
648         (build_new_method_call): Likewise.
649         (joust): Remove spurious comment.
650         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
651         * decl2.c (arg_assoc_class): Simplify.
652         * friend.c (add_friend): Likewise.
653
654 2003-03-11  Jason Merrill  <jason@redhat.com>
655
656         PR c++/8660
657         * decl2.c (check_classfn): A member template only matches a
658         member template.
659
660 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
661
662         * Make-lang.in (CXX_C_OBJS): Update.
663         * lang-specs.h: Don't define __GNUG__ here.
664
665 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
666
667         * call.c (perform_overload_resolution): New function.
668         (build_new_function_call): Use it.
669         (build_operator_new_call): Likewise.
670         (add_candidates): Add explicit_targs and template_only parameters.
671         (build_new_op): Adjust accordingly.
672         * cp-tree.h (build_operator_new_call): New function.
673         (build_function_call_real): Remove.
674         (build_function_call_maybe): Likewise.
675         * init.c (build_new_1): Use build_operator_new_call.
676         * typeck.c (build_function_call_real): Rename to ...
677         (build_function_call): ... this.
678
679 2003-03-10  Devang Patel  <dpatel@apple.com>
680
681         PR c++/9394
682         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
683
684 2003-03-10  Jason Merrill  <jason@redhat.com>
685
686         PR c++/9798
687         * decl.c (push_using_directive): Push before recursing.
688
689         PR c++/9868, c++/9524
690         * call.c (resolve_scoped_fn_name): Handle the case of a function
691         pointer member.
692
693         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
694         argument in the pointer-to-member case.
695
696 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
697
698         PR c++/9373
699         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
700         pointers to member functions.
701
702         PR c++/8534
703         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
704         in pointer-to-member-function types.
705
706 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
707
708         * expr.c (cplus_expand_constant): Use C90 prototype style.
709         (cxx_expand_expr): Likewise.
710
711 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
712
713         PR c++/9970
714         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
715         functions.
716
717 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
718
719         * lang-specs.h (c++-header): Change .pch to .gch.
720
721 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
722
723         * cp-tree.h (cxx_init): Update prototype.
724         * lex.c (cxx_init): Similarly.
725
726 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
727
728         PR c++/9823
729         * cp-tree.h (begin_mem_initializers): Remove.
730         * parser.c (cp_parser_mem_initializer_list): Inline it here.
731         Do not call finish_mem_initializers if not in a constructor.
732         (cp_parser_class_head): Fix typo in error message.
733         * semantics.c (begin_mem_initializers): Remove.
734         * testsuite/g++.dg/parser/constructor1.C: New test.
735
736         PR c++/9809
737         * call.c (add_function_candidate): Skip builtin fuctions that have
738         not yet been declared.
739
740         PR c++/9982
741         * init.c (build_new_1): Correct logic for determining whether or
742         not to use an array cookie.
743
744         PR c++/9524
745         * parser.c (cp_parser_postfix_expression): Call
746         finish_non_static_data_member, even when processing_template_decl.
747
748         PR c++/9912
749         * cp-tree.h (is_ancestor): New function.
750         (handle_class_head): Change prototype.
751         * decl2.c (is_namespace_ancestor): Rename to ...
752         (namespace_anecestor): ... this.
753         (set_decl_namespace): Adjust accordingly.
754         (handle_class_head): Remove unncessary parameters.
755         * parser.c (cp_parser_class_head): Check that
756         nested-name-specifiers are used appropriately.
757
758 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
759
760         * call.c (reference_binding): Remove REF_IS_VAR parameter.
761         (implicit_conversion): Adjust call to reference_binding.
762         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
763         (initialize_reference): Adjust handling for references bound to
764         rvalues.
765         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
766         prototype.
767         (real_non_cast_lvalue_p): New method.
768         * cvt.c (build_up_reference): Adjust use of
769         make_temporary_var_for_ref_to_temp.
770         * tree.c (real_non_cast_lvalue_p): New method.
771
772 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
773
774         * except.c (init_exception_processing): Use C90 prototype style.
775         (cp_protect_cleanup_actions): Likewise.
776         (prepare_eh_type): Likewise.
777         (build_eh_type_type): Likewise.
778         (build_exc_ptr): Likewise.
779         (do_begin_catch): Likewise.
780         (dtor_nothrow): Likewise.
781         (do_end_catch): Likewise.
782         (push_eh_cleanup): Likewise.
783         (decl_is_java_type): Likewise.
784         (choose_personality_routine): Likewise.
785         (initialize_handler_parm): Likewise.
786         (expand_start_catch_block): Likewise.
787         (expand_end_catch_block): Likewise.
788         (begin_eh_spec_block): Likewise.
789         (finish_eh_spec_block): Likewise.
790         (do_allocate_exception): Likewise.
791         (do_free_exception): Likewise.
792         (wrap_cleanups_r): Likewise.
793         (stabilize_throw_expr): Likewise.
794         (build_throw): Likewise.
795         (complete_ptr_ref_or_void_ptr_p): Likewise.
796         (is_admissible_throw_operand): Likewise.
797         (nothrow_libfn_p): Likewise.
798         (can_convert_eh): Likewise.
799         (check_handlers_1): Likewise.
800         (check_handlers): Likewise.
801
802 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
803
804         * call.c (merge_conversion_sequences): New function.
805         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
806         (convert_class_to_reference): Correct handling of second
807         standard conversion sequence in a user-defined conversion
808         sequence.
809         (build_user_type_conversion_1): Use merge_conversion_sequences.
810         * cp-tree.def: Add comments for CONV nodes.
811         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
812
813 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
814
815         * error.c (init_error): Use C90 prototype style.
816         (dump_scope): Likewise.
817         (dump_qualifiers): Likewise.
818         (dump_template_argument): Likewise.
819         (dump_template_argument_list): Likewise.
820         (dump_template_parameter): Likewise.
821         (dump_template_bindings): Likewise.
822         (dump_type): Likewise.
823         (dump_typename): Likewise.
824         (class_key_or_enum): Likewise.
825         (dump_aggr_type): Likewise.
826         (dump_type_prefix): Likewise.
827         (dump_type_suffix): Likewise.
828         (dump_global_iord): Likewise.
829         (dump_simple_decl): Likewise.
830         (dump_decl): Likewise.
831         (dump_template_decl): Likewise.
832         (dump_function_decl): Likewise.
833         (dump_parameters): Likewise.
834         (dump_exception_spec): Likewise.
835         (dump_function_name): Likewise.
836         (dump_template_parms): Likewise.
837         (dump_char): Likewise.
838         (dump_expr_list): Likewise.
839         (dump_expr): Likewise.
840         (dump_binary_op): Likewise.
841         (dump_unary_op): Likewise.
842         (type_as_string): Likewise.
843         (expr_as_string): Likewise.
844         (decl_as_string): Likewise.
845         (context_as_string): Likewise.
846         (lang_decl_name): Likewise.
847         (cp_file_of): Likewise.
848         (cp_line_of): Likewise.
849         (decl_to_string): Likewise.
850         (expr_to_string): Likewise.
851         (fndecl_to_string): Likewise.
852         (code_to_string): Likewise.
853         (language_to_string): Likewise.
854         (parm_to_string): Likewise.
855         (op_to_string): Likewise.
856         (type_to_string): Likewise.
857         (assop_to_string): Likewise.
858         (args_to_string): Likewise.
859         (cv_to_string): Likewise.
860         (cxx_print_error_function): Likewise.
861         (cp_diagnostic_starter): Likewise.
862         (cp_diagnostic_finalizer): Likewise.
863         (cp_print_error_function): Likewise.
864         (function_category): Likewise.
865         (print_instantiation_full_context): Likewise.
866         (print_instantiation_partial_context): Likewise.
867         (maybe_print_instantiation_context): Likewise.
868         (print_instantiation_context): Likewise.
869         (cp_printer): Likewise.
870         (print_integer): Likewise.
871         (print_non_consecutive_character): Likewise.
872         (locate_error): Likewise.
873
874 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
875
876         PR c++/9965
877         * call.c (reference_binding): Add ref_is_var parameter.
878         (implicit_conversion): Adjust call to reference_binding.
879         (initialize_reference): Likewise.
880
881         PR c++/9400
882         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
883         PARM_DECLs.
884
885         PR c++/9791
886         * class.c (get_basefndecls): Use lookup_fnfields_1.
887
888 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
889
890         PR c++/9188
891         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
892         in error message.
893         (cp_parser_single_declaration): Likewise.
894
895 2003-03-05  Jason Merrill  <jason@redhat.com>
896
897         PR c++/9440
898         * call.c (build_conditional_expr): Use convert rather than an
899         explicit NOP_EXPR.
900
901 2003-03-02  Matt Austern  <austern@apple.com>
902
903         * decl.c (cp_binding_level): Add static_decls varray member.
904         (add_decl_to_level): Add static/inline namespace scope
905         declarations to static_decls array.
906         (wrapup_global_for_namespace): Pass static_decls only, instead of
907         all decls, to wrapup_global_declarations/check_global_declarations.
908         (push_namespace): Initialize static_decls for ordinary namespaces.
909         (cxx_init_decl_processing): Initialize static_decls for global
910         namespace.
911
912 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
913
914         * class.c (end_of_class): Correct thinko.
915
916 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
917
918         * config-lang.in: Replace ${libstdcxx_version} by its value.
919
920 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
921
922         * cp-tree.h (cxx_saved_binding): Declare.
923         (struct saved_scope): Adjust type of field 'old_binding'.
924         * decl.c (cxx_saved_binding_make): New macro.
925         (struct cxx_saved_binding): Define.
926         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
927         C++ bindings.
928         (maybe_push_to_top_level): Adjust local variable type.
929         (pop_from_top_level): Likewise.
930
931 2003-03-04  Tom Tromey  <tromey@redhat.com>
932
933         * Make-lang.in (c++.tags): New target.
934
935 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
936
937         * Make-lang.in: Update.
938
939 2003-03-03  Jason Merrill  <jason@redhat.com>
940
941         * decl.c (finish_enum): Do set the type in a template. Simplify.
942         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
943
944 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
945
946         PR c++/9878
947         * call.c (convert_class_to_reference): Correct conversion
948         sequences.
949         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
950         (implicit_conversion): Adjust call to reference_binding.
951         (add_candidate): Change type of candidates parameter.
952         (add_function_candidate): Likewise.
953         (add_conv_candidate): Likewise.
954         (build_builtin_candidate): Likewise.
955         (add_builtin_candidate): Likewise.
956         (add_builtin_candidates): Likewise.
957         (add_template_candidate_real): Likewise.
958         (add_template_candidate): Likewise.
959         (add_template_conv_candidate): Likewise.
960         (build_user_type_conversion_1): Adjust accordingly.
961         (build_object_call): Likewise.
962         (build_conditional_expr): Likewise.
963         (add_candidates): Likewise.
964         (build_new_op): Likewise.
965         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
966         (build_new_method_call): Adjust calls to add_function_candidate.
967         (make_temporary_var_for_ref_to_temp): New function.
968         (initialize_reference): Add decl parameter.
969         * class.c (build_rtti_vtbl_entries): Use build_address and
970         build_nop.
971         * cp-tree.h (initialize_reference): Change prototype.
972         (make_temporary_var_for_ref_to_temp): New function.
973         (build_type_conversion): Change prototype.
974         (build_address): New function.
975         (build_nop): Likewise.
976         * cvt.c (cp_convert_to_pointer): Adjust call to
977         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
978         Use build_nop.
979         (convert_to_pointer_force): Use build_nop.
980         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
981         (convert_to_reference): Adjust call to build_type_conversion.
982         (ocp_convert): Likewise.
983         (build_type_conversion): Remove for_sure parameter.
984         * decl.c (grok_reference_init): Use initialize_reference.
985         * typeck.c (build_address): New function.
986         (build_nop): Likewise.
987         (build_unary_op): Use them.
988         (build_ptrmemfunc): Tidy slightly.
989         (convert_for_initialization): Adjust call to
990         initialize_reference.
991         * typeck2.c (store_init_value): Remove #if 0'd code.
992
993 2003-03-03  Jason Merrill  <jason@redhat.com>
994
995         * decl.c (start_function): Clear DECL_NUM_STMTS.
996
997         * class.c (get_vtable_decl): Use vtbl_type_node.
998         (build_primary_vtable): Check for it.
999
1000 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
1001
1002         * decl.c (check_initializer): Check for vector_opaque_p.
1003
1004 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
1005
1006         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
1007           invoke an external cpp during compilation.
1008
1009 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1010
1011         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
1012         that of warning().
1013         (start_decl): Likewise.
1014         (start_function): Likewise.
1015
1016 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
1017
1018         * Make-lang.in (CXX_C_OBJS): Update.
1019
1020 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
1021
1022         PR c++/9892
1023         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
1024         instantiating it.
1025
1026 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
1027
1028         * parser.c (cp_parser_init_declarator): Revert opaque
1029         vector_opaque_p change.
1030         Do not include target.h.
1031
1032 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
1033
1034         PR c++/9879
1035         * cp-tree.h (build_zero_init): Add parameter.
1036         * decl.c (cp_finish_decl): Adjust call.
1037         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
1038         calls.
1039         (build_default_init): Add nelts parameter.  Adjust calls to
1040         build_zero_init.
1041         (build_new_1): Adjust call to build_default_init.
1042         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
1043
1044 2003-02-26  Devang Patel  <dpatel@apple.com>
1045
1046         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
1047         required.  Postpone enum setting for template decls.
1048         (build_enumerator): Delay copying value node until finish_enum
1049         (). Remove #if 0'ed code.
1050         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
1051         (tsubst_copy): Add check for enum type.
1052
1053 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
1054
1055         PR c++/9683
1056         * decl2.c (prune_vars_needing_no_initialization): Do not throw
1057         away initializations for DECL_EXTERNAL VAR_DECLs.
1058         (finish_file): Adjust accordingly.
1059         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
1060
1061 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
1062
1063         * decl.c (add_binding): Time TV_NAME_LOOKUP.
1064         (push_class_binding): Likewise.
1065         (set_namespace_binding): Likewise.
1066
1067 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
1068
1069         PR c++/9836
1070         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
1071         specializations back to the main template.
1072         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
1073         * pt.c (resolve_typename_type): Likewise.
1074
1075 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
1076
1077         PR c++/9778
1078         * pt.c (tsubst_copy_and_build): For a templated function inside a
1079         scope, process template arguments.
1080
1081 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1082
1083         PR c++/9602
1084         * typeck2.c (abstract_virtuals_error): Don't check when
1085         TYPE is still template parameter dependent.
1086
1087 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
1088
1089         PR c++/5333
1090         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
1091         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
1092         * pt.c (instantiate_class_template): Don't try to instantiate
1093         dependent types.
1094         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
1095
1096 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
1097
1098         PR c++/9749
1099         * decl.c (grokdeclarator): Do not allow parameters with variably
1100         modified types.
1101
1102 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
1103
1104         * search.c (grow_bfs_bases): Remove. Fold into ...
1105         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
1106         in previous patch.
1107
1108 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
1109
1110         PR c++/9729
1111         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
1112         when the G++ 3.2 ABI prevents correct compilation.
1113
1114 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
1115
1116         Change base class access representation. Share virtual base
1117         binfos.
1118         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
1119         call.
1120         * cp/class.c (build_base_path): Likewise.
1121         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
1122         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
1123         (make_new_vtable): Adjust.
1124         (force_canonical_binfo_r): Delete.
1125         (force_canonical_binfo): Delete.
1126         (mark_primary_virtual_base): Delete.
1127         (dfs_unshared_virtual_bases): Delete.
1128         (mark_primary_bases): Adjust.
1129         (maybe_warn_about_overly_private_class): Adjust.
1130         (dfs_base_derived_from): Delete.
1131         (base_derived_from): Follow the inheritance chain.
1132         (struct find_final_overrider_data): Add vpath member.
1133         (dfs_find_final_overrider): Adjust.
1134         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
1135         (find_final_overrider): Adjust.
1136         (update_vtable_entry_for_fn): Adjust.
1137         (modify_all_vtables): Adjust.
1138         (walk_subobject_offsets): Adjust.
1139         (layout_nonempty_base_or_field): Adjust.
1140         (layout_empty_base): Remove last parameter. Adjust.
1141         (build_base_field): Adjust.
1142         (build_base_fields): Adjust.
1143         (propagate_binfo_offsets): Remove last parameter. Adjust.
1144         (dfs_set_offset_for_unshared_vbases): Delete.
1145         (layout_virtual_bases): Adjust.
1146         (finish_struct_1): Adjust.
1147         (init_class_processing): Don't init access nodes.
1148         (dfs_get_primary_binfo): Delete.
1149         (get_primary_binfo): Adjust.
1150         (dump_class_hierarchy_r): Remove most derived arg, add IGO
1151         parameter. Adjust.
1152         (dump_class_hierarchy): Adjust.
1153         (finish_vtbls): Adjust.
1154         (get_original_base): Delete.
1155         (build_vtt_inits): Adjust.
1156         (dfs_build_secondary_vptr_vtt_inits): Adjust.
1157         (dfs_ctor_vtable_bases_queue_p): Adjust.
1158         (build_ctor_vtbl_group): Adjust.
1159         (dfs_accumulate_vtbl_inits): Adjust.
1160         (build_vtbl_initializer): Adjust.
1161         (build_vbase_offset_vtbl_entries): Adjust.
1162         (add_vcall_offset_vtbl_entries_1): Adjust.
1163         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
1164         (access_*_node): Remove.
1165         (CANONICAL_BINFO): Delete.
1166         (BINFO_UNSHARED_MARKED): Remove.
1167         (BINFO_MARKED): Set LANG_FLAG_0 directly.
1168         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
1169         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
1170         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
1171         Delete.
1172         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
1173         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
1174         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
1175         Delete.
1176         (BINFO_DEPENDENT_BASE_P): New.
1177         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
1178         index.
1179         (markedp, unmarkedp): Adjust.
1180         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
1181         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
1182         find_vbase_instance, binfo_for_vbase): Delete.
1183         (copied_binfo, original_binfo): Declare.
1184         (finish_base_specifier): Add virtual_p arg.
1185         (unshare_base_binfos): Delete.
1186         (copy_base_binfos): Declare.
1187         (reverse_path): Delete.
1188         * cp/decl.c (xref_basetypes): Access and virtuality passed
1189         differently. Don't copy direct base binfos here. Call
1190         copy_base_binfos.
1191         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
1192         (initialize_vtbl_ptrs): Adjust.
1193         (expand_member_init): Adjust.
1194         * cp/parser.c (cp_parser_base_specifier): Adjust.
1195         * cp/pt.c (instantiate_class_template): Adjust.
1196         (get_template_base_recursive): Adjust.
1197         * cp/rtti.c (get_pseudo_ti_init): Adjust.
1198         (get_pseudo_ti_desc): Adjust.
1199         * cp/tree.c (unshare_base_binfos): Rename to ...
1200         (copy_base_binfos): ... here, reimplement.
1201         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
1202         (reverse_path): Remove.
1203         * cp/typeck.c (get_delta_difference): Adjust error messages.
1204         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
1205         * cp/search.c (lookup_base_r): Adjust.
1206         (dynamic_cast_base_recurse): Adjust.
1207         (canonical_binfo): Remove.
1208         (dfs_canonical_queue): Remove.
1209         (dfs_assert_unmarked_p): Remove.
1210         (assert_canonical_unmarked): Remove.
1211         (shared_marked_p, shared_unmarked_p): Remove.
1212         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
1213         (dfs_access_in_type): Adjust.
1214         (access_in_type): Adjust.
1215         (dfs_accessible_queue_p): Adjust.
1216         (dfs_accessible_p): Adjust.
1217         (is_subobject_of_p_1, is_subobject_of_p): Remove.
1218         (struct lookup_field_info): Remove from_dep_base_p field.
1219         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
1220         (lookup_field_r): Remove dependent base code.
1221         (lookup_member): Likewise.
1222         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
1223         (dfs_unmarked_real_bases_queue_p): Remove.
1224         (dfs_marked_real_bases_queue_p): Remove.
1225         (dfs_skip_vbases): Remove.
1226         (dfs_get_pure_virtuals): Adjust.
1227         (markedp, unmarkedp): Adjust.
1228         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
1229         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
1230         (dfs_unmark): Adjust.
1231         (dfs_get_vbase_types):Remove.
1232         (dfs_build_inheritance_graph_order): Remove.
1233         (get_vbase_types): Remove
1234         (dfs_find_vbase_instance): Remove.
1235         (find_vbase_instance): Remove.
1236         (dfs_debug_unmarkedp): Adjust.
1237         (dependent_base_p): Remove.
1238         (dfs_push_type_decls): Adjust.
1239         (dfs_push_decls): Adjust.
1240         (dfs_no_overlap_yet): Adjust.
1241         (copied_binfo): New function.
1242         (original_binfo): New function.
1243         (binfo_for_vbase): Remove.
1244
1245 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
1246
1247         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
1248         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
1249         vectors, for speed.
1250
1251 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
1252
1253         PR c++/9704
1254         * class.c (layout_class_type): In the 3.2 ABI, take into account
1255         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
1256
1257 2003-02-18  Matt Austern <austern@apple.com>
1258
1259         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
1260         nothing for C++.
1261         * cp/decl.c (wrapup_globals_for_namespace): Remove special
1262         handling of global namespace.
1263
1264 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
1265
1266         * cp-tree.h (rid_to_yy): Delete.
1267         (C_RID_YYCODE): Delete.
1268         (finish_file): Delete redundant declaration.
1269
1270 2003-02-18  Jason Merrill  <jason@redhat.com>
1271
1272         PR c++/9623
1273         * decl.c (reshape_init): Don't mess with initializer labels.
1274
1275         PR c++/9485
1276         * parser.c (cp_parser_postfix_expression): Set idk properly for
1277         object->scope::member.
1278
1279 2003-02-18  Ben Elliston  <bje@redhat.com>
1280
1281         PR other/7350
1282         * decl.c (duplicate_decls): Fix typo in comment.
1283
1284 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
1285
1286         PR debug/9717
1287         * class.c (build_base_field): Mark fields for base classes with
1288         DECL_IGNORED_P.
1289
1290 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1291
1292         PR c++/9457
1293         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
1294         CONSTRUCTOR_ELTS only once.
1295
1296 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1297
1298         PR c++/9459
1299         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
1300         (dump_type_suffix): Likewise.
1301
1302 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
1303
1304         * search.c: ANSIfy function declarations and definitions.
1305         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
1306         * call.c (build_method_call, resolve_scoped_fn_name,
1307         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
1308         calls.
1309         * class.c (handle_using_decl): Likewise.
1310         * decl.c (make_typename_type, make_unmound_class_template,
1311         start_decl, compute_array_index_type): Likewise.
1312         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
1313         * init.c (expand_member_init, build_member_call): Likewise.
1314         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
1315         resolve_typename_type): Likewise.
1316         * typeck.c (lookup_destructor, finish_class_member_access_exprm
1317         build_prememfunc_access_expr): Likewise.
1318
1319 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
1320
1321         * decl2.c: Include "timevar.h".
1322         (namespace_ancestor): Time name lookup.
1323         (add_using_namespace): Likewise.
1324         (lookup_using_namespace): Likewise.
1325         (qualified_lookup_using_namespace): Likewise.
1326         (decl_namespace): Likewise.
1327         (lookup_arg_dependent): Likewise.
1328         * lex.c (do_identifier): Likewise.
1329         (do_scoped_id): Likewise.
1330         * pt.c (lookup_template_class): Likewise.
1331
1332 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
1333
1334         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
1335
1336 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1337
1338         * decl.c: Include "timevar.h".
1339         (poplevel): Time name lookup.
1340         (find_binding): Likewise.
1341         (push_namespace): Likewise.
1342         (pop_nested_namespace): Likewise.
1343         (store_bindings): Likewise.
1344         (maybe_push_to_top_level): Likewise.
1345         (pop_from_top_level): Likewise.
1346         (push_local_name): Likewise.
1347         (pushtag): Likewise.
1348         (pushdecl): Likewise.
1349         (pushdecl_with_scope): Likewise.
1350         (pushdecl_namespace_level): Likewise.
1351         (pushdecl_top_level): Likewise.
1352         (pushdecl_class_level): Likewise.
1353         (push_class_level_binding): Likewise.
1354         (push_using_decl): Likewise.
1355         (push_using_directive): Likewise.
1356         (push_overloaded_decl): Likewise.
1357         (lookup_label): Likewise.
1358         (define_label): Likewise.
1359         (lookup_tag): Likewise.
1360         (lookup_tag_reverse): Likewise.
1361         (lookup_namespace_name): Likewise.
1362         (select_decl): Likewise.
1363         (unqualified_namespace_lookup): Likewise.
1364         (lookup_name_real): Likewise.
1365         (lookup_name_current_level): Likewise.
1366         (lookup_type_current_level): Likewise.
1367         (maybe_inject_for_scope_var): Likewise.
1368         (xref_tag): Likewise.
1369
1370         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
1371
1372 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
1373
1374         * decl.c (build_enumerator):  Remove unneeded test.
1375
1376 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
1377
1378         * cp-tree.h (struct lang_type_header): Make all fields unsigned
1379         char.
1380
1381 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
1382
1383         PR c++/7129
1384         * call.c (z_candidate): Add args.
1385         (convert_class_to_reference): Set it.
1386         (implicit_conversion): Tidy.
1387         (add_candidate): Add args parameter.
1388         (add_function_candidate): Adjust call to add_candidate.
1389         (add_conv_candidate): Likewise.
1390         (build_builtin_candidate): Likewise.
1391         (build_user_type_conversion_1): Eliminate wasteful tree_cons
1392         usage.
1393         (build_new_function_call): Likewise.
1394         (build_object_call): Likewise.
1395         (add_candidates): New function.
1396         (build_new_op): Use it.
1397         (covert_like_real): Adjust call to build_over_call.
1398         (build_over_call): Remove args parameter.
1399         * operators.def: Add <?= and >?=.
1400
1401 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
1402
1403         * typeck.c (build_indirect_ref): Don't check flag_volatile.
1404
1405 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1406
1407         PR c++/8849
1408         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
1409
1410 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
1411
1412         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
1413         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
1414         (BINFO_LANG_ELTS): New #define.
1415         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
1416
1417 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
1418
1419         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
1420
1421 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
1422
1423         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
1424         for class types.
1425         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
1426         rather than TYPE_LANG_FLAG_0.
1427         (TYPE_BUILT_IN): Remove.
1428         (TYPE_DEPENDENT_P): New macro.
1429         (TYPE_DEPENDENT_P_VALID): Likewise.
1430         (lang_type_class): Add fields_readonly.
1431         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
1432         * pt.c (dependent_type_p_r): New function, split out from ...
1433         (dependent_type_p): ... here.  Memoize results.
1434         * search.c (dependent_base_p): Use dependent_type_p, not
1435         uses_template_parms.
1436         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
1437         for class types.
1438
1439 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
1440
1441         * call.c (build_field_call): Use build_new_op, not build_opfncall.
1442         (prep_operand): New function.
1443         (build_new_op): Use it.  Remove dead code.
1444         * class.c (pushclass): Change "modify" parameter type from int to
1445         bool.
1446         (currently_open_class): Use same_type_p, not pointer equality.
1447         (push_nested_class): Adjust calls to pushclass, remove modify
1448         parameter.
1449         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
1450         (pushclass): Change prototype.
1451         (push_nested_class): Likewise.
1452         (grokoptypename): Remove.
1453         (build_opfncall): Remove.
1454         (value_dependent_expression_p): Declare.
1455         (resolve_typename_type): Likewise.
1456         (resolve_typename_type_in_current_instantiation): Likewise.
1457         (enter_scope_of): Remove.
1458         (tsubst): Remove.
1459         (tsubst_expr): Likewise.
1460         (tsubst_copy): Likewise.
1461         (tsubst_copy_and_build): Likewise.
1462         * decl.c (warn_about_implicit_typename_lookup): Remove.
1463         (finish_case_label): Return error_mark_node for erroneous labels.
1464         (start_decl): Adjust calls to push_nested_class.
1465         (grokfndecl): Call push_scope/pop_scope around call to
1466         duplicate_decls.
1467         (grokdeclarator): Do not call tsubst.
1468         (start_function): Adjust calls to push_nested_class.
1469         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
1470         (check_classfn): Use push_scope/pop_scope around type comparisions.
1471         (grokoptypename): Remove.
1472         (push_sscope): Adjust call to push_nested_class.
1473         * error.c (dump_type): Show cv-qualification of typename types.
1474         * init.c (build_member_call): Use build_new_op, not
1475         build_opfncall.
1476         * method.c (build_opfncall): Remove.
1477         * parser.c (cp_parser): Add allow_non_constant_expression_p and
1478         non_constant_expression_p.
1479         (cp_parser_constant_expression): Adjust prototype.
1480         (cp_parser_resolve_typename_type): Remove.
1481         (cp_parser_non_constant_expression): New function.
1482         (cp_parser_non_constant_id_expression): Likewise.
1483         (cp_parser_new): Set allow_non_constant_expression_p and
1484         non_constant_expression_p.
1485         (cp_parser_primary_expression): Reject `this' and `va_arg' in
1486         constant-expressions.  Note that dependent names aren't really
1487         constant.
1488         (cp_parser_postfix_expression): Reject conversions to non-integral
1489         types in constant-expressions.  Neither are increments or
1490         decrements.
1491         (cp_parser_unary_expression): Reject increments and decrements in
1492         constant-expressions.
1493         (cp_parser_direct_new_declarator): Adjust call to
1494         cp_parser_constant_expression.
1495         (cp_parser_cast_expression): Reject conversions to non-integral
1496         types in constant-expressions.
1497         (cp_parser_assignment_expression): Rejects assignments in
1498         constant-expressions.
1499         (cp_parser_expression): Reject commas in constant-expressions.
1500         (cp_parser_labeled_statement): Adjust call to
1501         cp_parser_constant_expression.
1502         (cp_parser_direct_declarator): Simplify array bounds, even in
1503         templates, when they are non-dependent.  Use
1504         resolve_typename_type, not cp_parser_resolve_typename_type.
1505         (cp_parser_class_head): Use resolve_typename_type, not
1506         cp_parser_resolve_typename_type.
1507         (cp_parser_member_declaration): Adjust call to
1508         cp_parser_constant_expression.
1509         (cp_parser_constant_initializer): Likewise.
1510         (cp_parser_constructor_declarator): Use resolve_typename_type, not
1511         cp_parser_resolve_typename_type.
1512         (cp_parser_late_parsing_default_args): Adjust call to
1513         push_nested_class.
1514         * pt.c (tsubst): Give it internal linkage.
1515         (tsubst_expr): Likewise.
1516         (tsubst_copy): Likewise.
1517         (tsubst_copy_and_build): Likewise.
1518         (push_access_scope_real): Likewise.
1519         (tsubst_friend_class): Likewise.
1520         (instantiate_class_template): Adjust call to pushclass.
1521         (value_dependent_expression_p): Give it external linkage.
1522         Robustify.
1523         (resolve_typename_type): New function.
1524         * semantics.c (finish_call_expr): Use build_new_op, not
1525         build_opfncall.
1526         (begin_constructor_declarator): Remove.
1527         (begin_class_definition): Adjust call to pushclass.
1528         (enter_scope_of): Remove.
1529         * typeck.c (comptypes): Resolve typename types as appropriate.
1530         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
1531         (build_x_compound_expr): Likewise.
1532         (build_modify_expr): Likewise.
1533         (build_x_modify_expr): Likewise.
1534         * typeck2.c (build_x_arrow): Likewise.
1535
1536 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
1537
1538         * pt.c (last_pending_template) Declare GTY().
1539
1540 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1541
1542         PR c++/8591
1543         * parser.c (cp_parser_elaborated_type_specifier): Convert
1544         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
1545         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
1546
1547 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
1548
1549         PR c++/9437
1550         * pt.c (unify): Don't unify '*T' with 'U C::*'.
1551
1552         PR c++/3902
1553         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
1554         inside a declarator.
1555
1556 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
1557
1558         * class.c (update_vtable_entry_for_fn): Add index parameter.
1559         Generate vcall thunk for covariant overriding from a virtual
1560         primary base.
1561         (dfs_modify_vtables): Adjust.
1562
1563 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
1564
1565         PR c++/9403
1566         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
1567         template keyword.
1568         (cp_parser_base_specifier): Look for and consume a
1569         TEMPLATE keyword. Replace switch with array index.
1570
1571         PR c++/795
1572         * semantics.c (finish_non_static_data_member): Remember the
1573         field's type even in a template.
1574
1575         PR c++/9415
1576         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
1577         already scoped.
1578
1579         PR c++/8545
1580         * parser.c (cp_parser_cast_expression): Be more tentative.
1581
1582 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1583
1584         * cp-tree.h (flagged_type_tree_s): Remove.
1585         (check_for_new_type): Likewise.
1586         * typeck2.c (check_for_new_type): Likewise.
1587
1588 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
1589
1590         * dump.c: ANSIfy function declarations and definitions.
1591
1592         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
1593
1594 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1595
1596         PR c++/9354
1597         * init.c (build_new): Set the type of the new-expression, even
1598         when processing_templte_decl.
1599
1600         PR c++/9216
1601         * parser.c (cp_parser_primary_expression): Improve error message
1602         for templates used in an expression context.
1603
1604         PR c++/8696
1605         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
1606         parse when encountering "typedef".
1607
1608 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
1609
1610         * class.c, parser.c: ANSIfy function definitions and declarations.
1611
1612 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1613
1614         PR c++/9328
1615         * error.c (dump_decl): For an OVERLOAD, just print the name of the
1616         function; it doesn't make sense to try to print its type.
1617         * semantics.c (finish_typeof): Issue errors about invalid uses.
1618
1619         PR c++/9298
1620         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
1621         function.
1622         (cp_parser_expression_statement): Use it.
1623         (cp_parser_explicit_instantiation): Likewise.
1624         * pt.c (do_decl_instantiation): Improve error handling logic.
1625
1626 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1627
1628         PR c++/9384
1629         * parser.c (cp_parser_using_declaration): Issue error messages
1630         about name resolution failures here.
1631
1632         PR c++/9388
1633         * class.c (currently_open_derived_class): Use dependent_type_p.
1634         * cp-tree.h (dependent_type_p): New function.
1635         (dependent_template_arg_p): Likewise.
1636         (dependent_template_p): Likewise.
1637         (type_dependent_expression_p): Likewise.
1638         * parser.c (cp_parser_dependent_type_p): Remove.
1639         (cp_parser_value_dependent_type_p): Likewise.
1640         (cp_parser_type_dependent_expression_p): Likewise.
1641         (cp_parser_dependent_template_arg_p): Likewise.
1642         (cp_parser_dependent_template_id_p): Likewise.
1643         (cp_parser_dependent_template_p): Likewise.
1644         (cp_parser_diagnose_invalid_type_name): Replace
1645         cp_parser_dependent_type_p with dependent_type_p, etc.
1646         (cp_parser_primary_expresion): Likewise.
1647         (cp_parser_nested_name_specifier_opt): Likewise.
1648         (cp_parser_postfix_expression): Likewise.
1649         (cp_parser_unary_expression): Likewise.
1650         (cp_parser_template_name): Likewise.
1651         (cp_parser_class_name): Likewise.
1652         (cp_parser_lookup_name): Likewise.
1653         * pt.c (dependent_type_p): New function.
1654         (value_dependent_expression_p): Likewise.
1655         (type_dependent_expression_p): Likewise.
1656         (dependent_template_arg_p): Likewise.
1657         (dependent_template_id_p): Likewise.
1658         (dependent_template_p): Likewise.
1659
1660         PR c++/9285
1661         PR c++/9294
1662         * parser.c (cp_parser_simple_declaration): Return quickly when
1663         encountering errors.
1664
1665 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1666
1667         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
1668
1669 2003-01-17  Jason Merrill  <jason@redhat.com>
1670
1671         PR c++/9167, c++/9358
1672         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
1673
1674 2003-01-17  Jason Merrill  <jason@redhat.com>
1675
1676         PR c++/9342
1677         * call.c (build_conditional_expr): Always do lvalue-rvalue
1678         conversion.
1679
1680 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
1681
1682         PR c++/9294
1683         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
1684         * cp-tree.h (BASELINK_BINFO): Adjust.
1685         (BASELINK_FUNCTIONS): Likewise.
1686         (BASELINK_ACCESS_BINFO): Likewise.
1687         (tree_baselink): New structure.
1688         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
1689         (lang_tree_node): Add baselink.
1690         * decl.c (cp_tree_node_structure): Add BASELINK case.
1691         * search.c (build_baselink): Adjust.
1692         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
1693         test from TREE_LIST case.
1694
1695         PR c++/9272
1696         * parser.c (cp_parser_constructor_declarator_p): Do not assume
1697         that a constructor cannot be declared outside of its own class.
1698
1699         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
1700         be resolved, neither can the qualified name.
1701
1702         * rtti.c (get_pseudo_ti_desc): Fix thinko.
1703
1704 2003-01-16  Jason Merrill  <jason@redhat.com>
1705
1706         PR c++/8564
1707         * init.c (build_vec_init): Re-add maxindex parm.
1708         (perform_member_init, build_aggr_init): Pass it.
1709         (build_new_1): Pass it. Use an incomplete array type for full_type.
1710         * typeck.c (build_modify_expr): Pass it.
1711         * cp-tree.h: Adjust.
1712
1713 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
1714
1715         * cp-tree.h (tsubst_copy_and_build): New declaration.
1716         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
1717         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
1718         (tsubst_copy_and_build): New function.
1719
1720 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
1721
1722         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
1723         (PARTIAL_INSTANTIATION_P): Remove.
1724         (IMPLICIT_TYPENAME_P): Likewise.
1725         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
1726         (build_typename_type): Remove declaration.
1727         (parmlist_is_exprlist): Likewise.
1728         * decl.c (build_typename_type): Make it static, remove third
1729         parameter.
1730         (push_class_binding): Don't do implicit typename stuff.
1731         (make_typename_type): Likewise.
1732         (lookup_name_real): Likewise.
1733         (grokdeclarator): Don't try to convert declarations into
1734         initializations.  Don't do implicit typename stuff.
1735         (parmlist_is_exprlist): Remove.
1736         (xref_basetypes): Simplify.
1737         * decl2.c (grokfield): Don't try to convert declarations into
1738         initializations.
1739         (build_anon_union_vars): Do this while processing templates, too.
1740         (finish_anon_union): Likewise.
1741         * error.c (dump_type): Remove implicit typename handling.
1742         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
1743         (cp_parser_primary_expression): Correct handling of names not
1744         found by unqualified name lookup in templates.
1745         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
1746         of types when possible.
1747         (cp_parser_simple_declaration): Complain intelligently about some
1748         invalid declarations.
1749         (cp_parser_member_declaration): Likewise.
1750         (cp_parser_constructor_declarator_p): Don't check when we're in a
1751         function scope.
1752         * pt.c (instantiate_class_template): Remove
1753         PARTIAL_INSTANTIATION_P gunk.
1754         * search.c (lookup_field_r): Don't build implicit typenames.
1755         (marked_pushdecls_p): Don't enter dependent base types.
1756         (unmarked_pushdecls_p): Likewise.
1757         * semantics.c (begin_class_definition): Remove implicit typename
1758         stuff.
1759
1760 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
1761
1762         PR c++/9212
1763         * parser.c (cp_parser_direct_declarator): If accepting either
1764         abstract or named, the name must be an unqualified-id.
1765
1766 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1767
1768         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
1769
1770 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1771
1772         * decl2.c (check_classfn): Fix uninitialized warning.
1773         (build_anon_union_vars): Likewise.
1774         * pt.c (tsubst_copy): Likewise.
1775
1776 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
1777
1778         Further conform g++'s __vmi_class_type_info to the C++ ABI
1779         specification.
1780         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
1781         the specification.
1782         (class_hint_flags): Likewise.
1783
1784 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1785
1786         * config-lang.in: Add semantics.c to gtfiles.
1787         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
1788         (saved_scope): Likewise.
1789         (type_lookups): Remove.
1790         (deferred_access): New structure.
1791         (type_access_control): Remove.
1792         (save_type_access_control): Likewise.
1793         (reset_type_access_control): Likewise.
1794         (decl_type_access_control): Likewise.
1795         (push_deferring_access_checks): Declare.
1796         (resume_deferring_access_checks): Likewise.
1797         (stop_deferring_access_checks): Likewise.
1798         (pop_deferring_access_checks): Likewise.
1799         (get_deferred_access_checks): Likewise.
1800         (pop_to_parent_deferring_access_checks): Likewise.
1801         (perform_deferred_access_checks): Likewise.
1802         (perform_or_defer_access_check): Likewise.
1803         * decl.c (make_typename_type): Use perform_or_defer_access_check.
1804         (make_unbound_class_template): Likewise.
1805         (grokdeclarator): Don't call decl_type_access_control.
1806         * parser.c (cp_parser_context): Remove deferred_access_checks
1807         and deferring_access_checks_p fields.
1808         (cp_parser_context_new): Adjust.
1809         (cp_parser): Remove access_checks_lists.
1810         (cp_parser_defer_access_check): Remove.
1811         (cp_parser_start_deferring_access_checks): Remove.
1812         (cp_parser_stop_deferring_access_checks): Remove.
1813         (cp_parser_perform_deferred_access_checks): Remove.
1814         (cp_parser_nested_name_specifier_opt): Use new deferred access
1815         functions.
1816         (cp_parser_simple_declaration): Likewise.
1817         (cp_parser_template_id): Likewise.
1818         (cp_parser_function_definition): Likewise.
1819         (cp_parser_class_specifier): Likewise.
1820         (cp_parser_lookup_name): Likewise.
1821         (cp_parser_single_declaration): Likewise.
1822         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
1823         (cp_parser_parse_tentatively): Likewise.
1824         (cp_parser_parse_definitely): Likewise.
1825         (yyparse): Likewise.
1826         (cp_parser_init_declarator): Remove access_checks parameter.
1827         Use new deferred access functions.
1828         (cp_parser_function_definition_from_specifiers_and_declarator):
1829         Likewise.
1830         (cp_parser_class_head): Remove deferring_access_checks_p and
1831         saved_access_checks parameters.  Use new deferred access functions.
1832         (cp_parser_member_specification_opt): Don't call
1833         reset_type_access_control.
1834         * search.c (type_access_control): Remove.
1835         * semantics.c: Include "gt-cp-semantics.h".
1836         (deferred_type_access_control): Remove.
1837         (deferred_access_stack): New variable.
1838         (deferred_access_free_list): Likewise.
1839         (push_deferring_access_checks): New function.
1840         (resume_deferring_access_checks): Likewise.
1841         (stop_deferring_access_checks): Likewise.
1842         (pop_deferring_access_checks): Likewise.
1843         (get_deferred_access_checks): Likewise.
1844         (pop_to_parent_deferring_access_checks): Likewise.
1845         (perform_deferred_access_checks): New function, adapted from
1846         cp_parser_perform_deferred_access_checks.
1847         (perform_or_defer_access_check): New function, adapted from
1848         cp_parser_defer_access_check.
1849         (current_type_lookups): Remove.
1850         (deferred_type_access_control): Likewise.
1851         (decl_type_access_control): Likewise.
1852         (save_type_access_control): Likewise.
1853         (reset_type_access_control): Likewise.
1854         (begin_function_definition): Adjust.
1855         (begin_class_definiton): Likewise.
1856
1857 2003-01-13  Jason Merrill  <jason@redhat.com>
1858
1859         PR c++/8748
1860         * class.c (build_base_path): Take the address before calling save_expr.
1861
1862         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
1863         all the ambiguous conversions are bad.
1864
1865         * class.c (maybe_warn_about_overly_private_class): Don't stop
1866         searching when we find a nonprivate method.
1867
1868         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
1869
1870 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
1871
1872         * cp-tree.h (get_arglist_len_in_bytes): Remove.
1873
1874         PR c++/9264
1875         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
1876         typeame types more robustly.
1877
1878 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
1879
1880         * parser.c:  Fix comment typos.
1881
1882 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
1883
1884         PR c++/9099
1885         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
1886         an object_type which is not a class type.
1887
1888 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
1889
1890         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
1891         (cp_parser_late_parsing_default_args): Likewise.
1892
1893 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
1894
1895         * cfns.gperf: ANSIfy function declarations.
1896         * cfns.h: Regenerate.
1897         * cp-tree.h: ANSIfy function declarations.
1898
1899 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
1900
1901         * cp-tree.h (reparse_absdcl_as_expr): Remove.
1902         (reparse_absdcl_as_casts): Likewise.
1903         (reparse_decl_as_expr): Likewise.
1904         (finish_decl_parsing): Likewise.
1905         * decl2.c (reparse_absdcl_as_expr): Remove.
1906         (reparse_absdcl_as_casts): Likewise.
1907         (repase_decl_as_expr): Likewise.
1908         (finish_decl_parsing): Likewise.
1909
1910         PR c++/9128
1911         PR c++/9153
1912         PR c++/9171
1913         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
1914         function.
1915         (cp_parser_nested_name_specifier_opt): Correct the
1916         check_dependency_p false.
1917         (cp_parser_postfix_expression): Fix formatting.
1918         (cp_parser_decl_specifier_seq): Avoid looking for constructor
1919         declarators when possible.
1920         (cp_parser_template_id): Avoid performing name-lookup when
1921         possible.
1922         (cp_parser_class_head): Do not count specializations when counting
1923         levels of templates.
1924         (cp_parser_constructor_declarator_p): Return immediately if
1925         there's no chance that the tokens form a constructor declarator.
1926         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
1927         expression with reference type.
1928         (get_tinfo_decl_dynamic): Do not return an expression with
1929         reference type.
1930         (build_typeid): Add comment.  Do not return an expression with
1931         reference type.
1932         * typeck.c (build_class_member_access_expr): Improve handling of
1933         conditionals and comma-expressions as objects.
1934
1935 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
1936
1937         * cfns.gperf: ANSIfy function declarations.
1938         * cfns.h: Regenerate.
1939         * cp-tree.h: ANSIfy function declarations.
1940         * parser.c: ANSIfy function declarations & definitions.
1941
1942         * decl.c (bad_specifiers): Fix parameter order error I introduced.
1943
1944 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
1945
1946         Merge from pch-branch:
1947
1948         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
1949
1950         Merge to tag pch-merge-20030102:
1951
1952         * semantics.c (finish_translation_unit): Don't call finish_file.
1953         * parser.c: Don't include ggc.h.
1954         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
1955         read first token here.  Don't allow PCH files after the first
1956         token is read.
1957         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
1958         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
1959         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
1960         (cp_parser_late_parsing_for_member): Don't duplicate call to
1961         cp_lexer_set_source_position_from_token.
1962         (cp_parser_late_parsing_default_args): Likewise.
1963         (yyparse): Call finish_file after clearing the_parser.
1964
1965         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
1966
1967         * Make-lang.in: Remove $(GGC_H) from all dependencies.
1968         (CXX_TREE_H): Add $(GGC_H).
1969         * class.c: Don't include ggc.h.
1970         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
1971         (method_name_cmp): Likewise.
1972         (resort_data): New variable.
1973         (resort_field_decl_cmp): New.
1974         (resort_method_name_cmp): New.
1975         (resort_sorted_fields): New.
1976         (resort_type_method_vec): New.
1977         (finish_struct_methods): Delete cast.
1978         (finish_struct_1): Delete cast.
1979         * cp-tree.h: Include ggc.h.
1980         (struct lang_type_class): Add reorder attribute to field `methods'.
1981         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
1982         (resort_sorted_fields): New prototype.
1983         (resort_type_method_vec): New prototype.
1984         * call.c: Don't include ggc.h.
1985         * decl.c: Likewise.
1986         * decl2.c: Likewise.
1987         * init.c: Likewise.
1988         * lex.c: Likewise.
1989         * method.c: Likewise.
1990         * optimize.c: Likewise.
1991         * parse.y: Likewise.
1992         * pt.c: Likewise.
1993         * repo.c: Likewise.
1994         * search.c: Likewise.
1995         * semantics.c: Likewise.
1996         * spew.c: Likewise.
1997         * tree.c: Likewise.
1998
1999         * lang-specs.h: Remove comment.
2000
2001         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
2002
2003         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
2004         (operator_name_info): Mark to be saved for PCH, specify size.
2005         (assignment_operator_name_info): Likewise.
2006
2007         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
2008
2009         * decl.c (anon_cnt): Mark to be saved for PCH.
2010
2011         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
2012
2013         * lex.c  (init_reswords): Delete now-untrue comment.
2014         Allocate ridpointers using GGC.
2015
2016         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
2017
2018         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
2019
2020         * g++spec.c (lang_specific_driver): Don't include standard
2021         libraries in `added'.
2022
2023         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
2024
2025         * decl2.c (finish_file): Call c_common_write_pch.
2026         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
2027
2028         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
2029
2030         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
2031         files when using g++.
2032         * lang-specs.h: Handle compiling C++ header files.
2033
2034 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
2035
2036         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
2037
2038 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2039
2040         * pt.c (push_access_scope_real): Call push_to_top_level for
2041         function in namespace scope.
2042         (pop_access_scope): Call pop_from_top_level for function in
2043         namespace scope.
2044
2045 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
2046
2047         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
2048
2049 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
2050
2051         * Make-lang.in (c++.install-common, c++.install-man,
2052         c++.uninstall): Prepend $(DESTDIR) to destination paths in
2053         all (un)installation commands.
2054         (c++.install-common): Rewrite $(LN) commands to support
2055         DESTDIR with "ln" as well as with "ln -s".
2056
2057 2003-01-08  Jason Merrill  <jason@redhat.com>
2058
2059         * parser.c (cp_parser_primary_expression): See through explicitly
2060         scoped ALIAS_DECLs, too.
2061
2062 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
2063
2064         * decl.c: Remove some #if 0 code.
2065
2066         * decl.c: ANSIfy function declarations.
2067
2068 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
2069
2070         * parser.c (cp_parser_asm_definition): Correct handling of omitted
2071         operands.
2072
2073 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2074
2075         PR c++/9030
2076         * decl.c (make_typename_type): Check access only when tf_error.
2077         (make_unbound_class_template): Likewise.
2078         * pt.c (saved_access_scope): New variable.
2079         (push_access_scope_real): New function.
2080         (push_access_scope): Likewise.
2081         (pop_access_scope): Likewise.
2082         (tsubst_default_argument): Use them.
2083         (instantiate_template): Likewise.
2084         (regenerate_decl_from_template): Likewise.
2085         (instantiate_decl): Likewise.
2086         (get_mostly_instantiated_function_type): Likewise.
2087
2088 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
2089
2090         * tree.c: Delete bogus #if 0 code.
2091
2092 2003-01-07  Andreas Schwab  <schwab@suse.de>
2093
2094         * class.c (layout_class_type): Don't use
2095         PCC_BITFIELD_TYPE_MATTERS if not defined.
2096
2097 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
2098
2099         PR c++/9165
2100         * decl2.c (build_cleanup): Mark the object as used.
2101
2102         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
2103         (hash_local_specialization): New function.
2104         (register_local_specialization): Revert 2003-01-05 change.
2105         (instantiate_decl): Use hash_local_specialization when creating
2106         the local_specializations table.
2107
2108         * decl2.c (mark_used): Do not synthesize thunks.
2109
2110         * class.c (layout_class_type): Correct handling of unnamed
2111         bitfields wider than their types.
2112
2113         PR c++/9189
2114         * parser.c (cp_parser): Remove default_arg_types.  Update
2115         documentation for unparsed_functions_queues.
2116         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
2117         parameter.
2118         (cp_parser_new): Don't set parser->default_arg_types.
2119         (cp_parser_function_definition): Adjust usage of
2120         unparsed_funtions_queues.
2121         (cp_parser_class_specifier): Don't mess with
2122         parser->default_arg_types.  Handle default argument processing in
2123         a separate phase from function body processing.
2124         (cp_parser_template_declaration_after_export): Adjust usage of
2125         unparsed_functions_queues.
2126         (cp_parser_late_parsing_for_member): Do not handle default
2127         arguments.
2128
2129 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
2130
2131         PR c++/9109
2132         * parser.c (cp_parser_declarator_kind): New enum.
2133         (cp_parser_declarator): Adjust.
2134         (cp_parser_direct_declarator): Adjust. Allow for either named or
2135         abstract declarator. Prefer abstract, if possible. Allow
2136         parenthesized function name.
2137         (cp_parser_condition): Adjust cp_parser_declarator call.
2138         (cp_parser_explicit_instantiation): Likewise.
2139         (cp_parser_init_declarator): Likewise.
2140         (cp_parser_type_id): Likewise.
2141         (cp_parser_function_definition): Likewise.
2142         (cp_parser_member_declaration): Likewise.
2143         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
2144         the tentative parsing.
2145         (cp_parser_exception_declaration): Likewise.
2146
2147 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
2148
2149         * parser.c (cp_parser_template_parameter): Adjust call to
2150         cp_parser_parameter_declaration.
2151         (cp_parser_parameter_declaration_list): Likewise.
2152         (cp_parser_parameter_declaration): Replace
2153         greater_than_is_operator_p with template_parm_p parameter.  Do not
2154         cache tokens for template default arguments.
2155
2156         * pt.c (retrieve_local_specialization): Use htab_find, not
2157         htab_find_with_hash.
2158         (register_local_specialization): Use htab_find_slot, not
2159         htab_find_slot_with_hash.
2160         (instantiate_decl): Pass a hash function to htab_create.
2161
2162 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2163
2164         * parser.c (cp_parser_binary_expression,
2165         cp_parser_multiplicative_expression,
2166         cp_parser_additive_expression, cp_parser_shift_expression,
2167         cp_parser_relational_expression, cp_parser_equality_expression,
2168         cp_parser_and_expression, cp_parser_exclusive_or_expression,
2169         cp_parser_inclusive_or_expression,
2170         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
2171         cp_parser_binary_expression): Const-ify.
2172
2173 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
2174
2175         * method.c (use_thunk): Disable access control while building the
2176         body of the thunk.
2177
2178 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
2179
2180         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
2181         front end.
2182
2183 2003-01-03  Matt Austern  <austern@apple.com>
2184
2185         * cp-tree.h (struct lang_type_class): add field for key method
2186         (cp_global_trees): rename dynamic_classes to keyed_classes
2187         (key_method): add definition
2188         * class.c (finish_struct_1): compute class's key method, and add
2189         the class to keyed_classes list if there is no key method.
2190         * decl.c (finish_function): add class to keyed_classes list if we
2191         see a definition of the class's key method.
2192         * pt.c (instantiate_class_template): add template specialization
2193         of a dynamic class to keyed_classes list.
2194         * decl2.c (key_method): remove
2195         (finish_file): iterate only through keyed_classes list when
2196         deciding whether to emit vtables, remove class from its list after
2197         we do the emission.
2198
2199 2003-01-02  Jason Merrill  <jason@redhat.com>
2200
2201         * call.c (build_conditional_expr): Stabilize lvalues properly.
2202         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
2203         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
2204         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
2205
2206         * call.c (convert_like_real): Call decl_constant_value for an
2207         IDENTITY_CONV even if there are no more conversions.
2208
2209         * cvt.c (build_up_reference): Don't push unnamed temps.
2210
2211         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
2212
2213         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
2214         for a backend struct.
2215
2216         * except.c (wrap_cleanups_r, build_throw): Make
2217         MUST_NOT_THROW_EXPRs void.
2218         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
2219
2220         * init.c (build_vec_delete_1): Pre-evaluate the base address.
2221
2222         * init.c (get_temp_regvar): Simplify logic.
2223
2224         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
2225         our replacement is a decl.
2226
2227         * decl.c (cp_make_fname_decl): Push the decls inside the
2228         outermost scope.
2229
2230 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
2231
2232         PR c++/45, c++/3784
2233         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
2234         the same too.
2235
2236 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
2237
2238         * parser.c (struct cp_parser): Add access_checks_lists field
2239         (cp_parser_simple_declaration): Use.
2240         (cp_parser_init_declarator): Likewise.
2241
2242 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
2243
2244         * parser.c (cp_parser_declaration): Accept the __extension__
2245         keyword before the declaration.
2246
2247         PR c++/2843
2248         * parser.c (cp_parser_parameter_declaration): Allow attributes to
2249         appear after the declarator.
2250
2251         * call.c (build_new_method_call): Fix typo in message format
2252         string.
2253
2254 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
2255
2256         * parser.c (cp_lexer_next_token_is): Declare it inline.
2257         (cp_lexer_set_source_position_from_token): Likewise.
2258         (cp_lexer_debugging_p): Likewise.
2259         (cp_parser_parsing_tentatively): Likewise.
2260         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
2261         to the cp_lexer_peek_token.
2262
2263         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
2264         expression.
2265
2266 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
2267
2268         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
2269         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
2270         cp/repo.c: Fix copyright years.
2271
2272 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
2273
2274         * lex.c: Remove superfluous include of cpplib.h.
2275         (CONSTRAINT): Define without conditions.
2276         (init_cp_pragma): Use c_register_pragma.
2277
2278 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
2279
2280         * .cvsignore: Remove.
2281
2282 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2283
2284         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
2285           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
2286           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
2287           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
2288           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
2289           copyright header.
2290         * lex.h: parse.y is dead, so don't mention it.  Also replace the
2291           copyright header with the default GNU copyright header.
2292
2293 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2294
2295         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
2296         (lookup_name_namespace_only): Likewise.
2297         (begin_only_namespace_names): Likewise.
2298         (end_only_namespace_names): Likewise.
2299         * decl.c (only_namespace_names): Remove.
2300         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
2301         (lookup_name_real): Do not check only_namespace_names.
2302         (lookup_name_namespace_only): Remove.
2303         (begin_only_namespace_names): Likewise.
2304         (end_only_namespace_names): Likewise.
2305         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
2306         nested-name-specifiers more gracefully.
2307         (cp_parser_class_or_namespace_name): Avoid looking up namespace
2308         names when they cannot possibly appear.
2309         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
2310         (cp_parser_elaborated_type_specifier): Likewise.
2311         (cp_parser_namespace_name): Only look for namespace names.
2312         (cp_parser_lookup_name): Add is_namespace parameter.
2313         (cp_parser_lookup_name_simple): Adjust call to
2314         cp_parser_lookup_name.
2315
2316         * parser.c (cp_parser_dependent_type_p): Fix thinko.
2317
2318 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
2319
2320         * .cvsignore: Update.
2321
2322 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
2323
2324         * class.c (modify_vtable_entry): Remove unused variable.
2325         (get_vcall_index): Always expect a non-thunk.
2326         (update_vtable_entry_for_fn): Combine covariant adjustments, when
2327         overriding a thunk. Pass get_vcall_index a non-thunk.
2328
2329         * decl2.c (finish_file): Mark undefined inlines as extern.
2330
2331 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2332
2333         * cp-tree.def (RETURN_INIT): Remove.
2334         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
2335         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
2336         (note_level_for_for): Remove.
2337         (note_level_for_try): Likewise.
2338         (note_level_for_catch): Likewise.
2339         (finish_named_return_value): Likewise.
2340         (do_pushlevel): Change prototype.
2341         (pending_lang_change): Remove.
2342         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
2343         sk_for.
2344         (note_level_for_for): Remove.
2345         (note_level_for_try): Likewise.
2346         (note_level_for_catch): Likewise.
2347         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
2348         * parser.c (cp_parser_context_free_list): Make it "deletable".
2349         (cp_parser_template_argument): Remove misleading comment.
2350         * pt.c (tsubst_expr): Remove RETURN_INIT code.
2351         * semantics.c (genrtl_named_return_value): Remove.
2352         (do_pushlevel): Take a scope kind as an argument.
2353         (begin_if_stmt): Adjust.
2354         (begin_while_stmt): Likewise.
2355         (begin_for_stmt): Likewise.
2356         (finish_for_init_stmt): Likewise.
2357         (begin_switch_stmt): Likewise.
2358         (begin_handler): Likewise.
2359         (begin_compound_stmt): Likewise.
2360         (finish_named_return_value): Remove.
2361         (cp_expand_stmt): Remove RETURN_INIT case.
2362         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
2363
2364 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2365
2366         PR c++/9112
2367         * parser.c (cp_parser_direct_declarator): Handle erroneous
2368         parenthesized declarators correctly.
2369
2370 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2371
2372         * cp-tree.h (pending_lang_change): Declare.
2373
2374 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
2375
2376         * parser.c (cp_parser_context_free_list): New variable.
2377         (cp_parser_context_new): Use it.
2378         (cp_parser_error): Check return code from
2379         cp_parser_simulate_error.
2380         (cp_parser_simulate_error): Return a value.
2381         (cp_parser_id_expression): Optimize common case.
2382         (cp_parser_class_name): Likewise.
2383         (cp_parser_class_specifier): Adjust call to
2384         cp_parser_late_parsing_default_args.
2385         (cp_parser_lookup_name): Optimize common case.
2386         (cp_parser_late_parsing_for_member): Adjust call to
2387         cp_parser_late_parsing_default_args.
2388         (cp_parser_late_parsing_default_args): Add scope parameter.
2389         (cp_parser_require): Avoid creating the error message unless it's
2390         needed.
2391         (cp_parser_parse_definitely): Place free'd contexts on the free
2392         list.
2393
2394         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
2395
2396 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
2397
2398         * parser.c (cp_parser_parameter_declaration_clause): Treat system
2399         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
2400
2401 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
2402
2403         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
2404         GCC, not GNU CC.
2405
2406 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
2407
2408         * parse.y: Remove.
2409         * spew.c: Likewise.
2410         * Make-lang.in (gt-cp-spew.h): Remove.
2411         * cp-tree.h (do_pending_lang_change): Remove.
2412         (do_identifier): Change prototype.
2413         (finish_id_expr): Remove.
2414         * decl.c (lookup_name_real): Remove yylex variable.
2415         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
2416         * lex.c (init_cpp_parse): Remove.
2417         (reduce_cmp): Likewise.
2418         (token_cmp): Likewise.
2419         (yychar): Likewise.
2420         (lastiddecl): Likewise.
2421         (token_count): Likewise.
2422         (reduce_count): Likewise.
2423         (yyhook): Likewise.
2424         (print_parse_statistics): Likewise.
2425         (do_pending_lang_change): Likewise.
2426         (do_identifier): Remove parsing parameter.
2427         * lex.h (lastiddecl): Remove.
2428         (looking_for_typename): Remove.
2429         (looking_for_template): Likewise.
2430         (pending_lang_change): Likewise.
2431         (yylex): Likewise.
2432         * semantics.c (finish_id_expr): Remove.
2433
2434         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
2435         thread" correctly.
2436
2437 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
2438
2439         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
2440         end, not the C front end.
2441
2442 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
2443
2444         * cp-tree.h (THUNK_TARGET): New macro.
2445         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
2446         (finish_thunk): Remove offset parms.
2447         * class.c (find_final_overrider): Look through thunks.
2448         (get_vcall_index): Use THUNK_TARGET.
2449         (update_vtable_entry_for_fn): Look through thunks. Set covariant
2450         fixed offset here. Adjust finish_thunk call.
2451         (build_vtbl_initializer): Adjust finish_thunk calls.
2452         * mangle.c (mangle_call_offset): Remove superfluous if.
2453         (mangle_thunk): Adjust.
2454         * method.c (make_thunk): Adjust.
2455         (finish_thunk): Adjust.
2456         (thunk_adjust): Remove assert.
2457         (use_thunk): Use THUNK_TARGET
2458         * dump1.c (cp_dump_tree): Adjust thunk dumping.
2459
2460         PR c++/9054
2461         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
2462         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
2463
2464 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2465
2466         Remove traditional C constructs 4/n.
2467         * decl2.c (grok_method_quals, warn_if_unknown_interface,
2468         grok_x_components, cp_build_parm_decl, build_artificial_parm,
2469         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
2470         delete_sanity, check_member_template, check_java_method,
2471         check_classfn, finish_static_data_member_decl, grokfield,
2472         grokbitfield, grokoptypename, grok_function_init,
2473         cplus_decl_attributes, constructor_name, defer_fn,
2474         build_anon_union_vars, finish_anon_union, coerce_new_type,
2475         coerce_delete_type, comdat_linkage, maybe_make_one_only,
2476         key_method, import_export_vtable, import_export_class,
2477         output_vtable_inherit, import_export_decl, import_export_tinfo,
2478         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
2479         set_guard, start_objects, finish_objects,
2480         start_static_storage_duration_function,
2481         finish_static_storage_duration_function, get_priority_info,
2482         start_static_initialization_or_destruction,
2483         finish_static_initialization_or_destruction,
2484         do_static_initialization, do_static_destruction,
2485         prune_vars_needing_no_initialization, write_out_vars,
2486         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
2487         add_using_namespace, merge_functions, ambiguous_decl,
2488         lookup_using_namespace, lookup_using_namespace,
2489         qualified_lookup_using_namespace, set_decl_namespace,
2490         decl_namespace, current_decl_namespace, push_decl_namespace,
2491         pop_decl_namespace, push_scope, pop_scope, add_function,
2492         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
2493         lookup_arg_dependent, do_namespace_alias,
2494         validate_nonmember_using_decl, do_nonmember_using_decl,
2495         do_toplevel_using_decl, do_local_using_decl,
2496         do_class_using_decl, do_using_directive, check_default_args,
2497         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
2498         * parser.c (cp_parser_class_head): Use booleanss.
2499         * decl.c (walk_globals, walk_vtables): Likewise.
2500         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
2501         walk_globals): Change return type from 'int' to 'bool'.
2502         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
2503         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
2504         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
2505         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
2506         qualifier_flags, tinfo_base_init, generic_initializer,
2507         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
2508         dfs_class_hint_unmark, class_hint_flags, class_initializer,
2509         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
2510         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
2511         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
2512         * repo.c (repo_compile_flags, repo_template_declared,
2513         repo_template_defined, repo_class_defined, repo_get_id,
2514         repo_template_used, repo_vtable_used, repo_inline_used,
2515         repo_tinfo_used, repo_template_instantiated, extract_string,
2516         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
2517         finish_repo): Likewise.
2518         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
2519         cxx_print_xnode): Likewise..
2520         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
2521         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
2522         * cxxfilt.c (demangle_it, print_demangler_list, usage,
2523         standard_symbol_characters, hp_symbol_characters, main, fatal):
2524         Likewise.
2525         (strip_underscore):  Change type from 'int' to 'bool'.
2526         (main): Use boolean constants.
2527
2528 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2529
2530         Remove traditional C constructs 3/n.
2531         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2532         build_up_reference, warn_ref_binding, convert_to_reference,
2533         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
2534         convert_to_void, convert, convert_force, build_type_conversion,
2535         build_expr_type_conversion, type_promotes_to,
2536         perform_qualification_conversions): Use C90 prototyping style.
2537         * decl2.c (grok_array_decl): Use boolean constant.
2538         (delete_sanity): Likewise.
2539         * typeck.c (build_unary_op): Likewise.
2540         * semantics.c (finish_switch_cond): Likewise.
2541         * parser.c (cp_parser_direct_new_declarator): Likewise.
2542         * init.c (build_new): Likewise.
2543
2544 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
2545
2546         * Make-lang.in (po-generated): Remove parse.c.
2547         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
2548         ($(srcdir)/cp/parse.h): Remove target.
2549         ($(srcdir)/cp/parse.c): Likewise.
2550         (gt-cp-parse.h): Likewise.
2551         (gt-cp-parser.h): New target.
2552         (c++.distclean): Do not remove parse.output.
2553         (c++.maintainer-clean): Do not remove parse.c or parse.h.
2554         (cp/spew.o): Remove target.
2555         (cp/lex.o): Adjust dependencies.
2556         (cp/pt.o): Likewise.
2557         (cp/parse.o): Likewise.
2558         (cp/TAGS): Do not mention parse.c.
2559         (cp/parser.o): New target.
2560         * NEWS: Mention the new parser.
2561         * call.c (build_scoped_method_call): Simplify.
2562         (build_method_call): Likewise.
2563         (build_new_function_call): Adjust calls to add_function_candidate
2564         and add_template_candidate.
2565         (build_new_op): Improve handling of erroroneous operands.
2566         (convert_default_arg): Remove circular argument processing.
2567         (name_as_c_string): New function.
2568         (build_new_method_call): Use it.
2569         (perform_implicit_conversion): Use error_operand_p.
2570         * class.c (finish_struct_anon): Use constructor_name_p.
2571         (check_field_decls): Likewise.
2572         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
2573         (resolve_address_of_overloaded_function): Likewise.
2574         (instantiate_type): Tweak pointer-to-member handling.
2575         (get_primary_binfo): Remove incorrect assertion.
2576         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
2577         * cp-tree.h (DEFARG_TOKENS): New macro.
2578         (default_arg): New structure.
2579         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
2580         (lang_tree_node): Add default_arg.
2581         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
2582         (type_info_ref_type): New macro.
2583         (saved_scope): Make processing_explicit_instantiation a boolean.
2584         (check_access): New field.
2585         (unparsed_text): Remove.
2586         (language_function): Remove unparsed_inlines.
2587         (error_operand_p): New macro.
2588         (lang_decl): Adjust pending_inline_info.
2589         (DEFARG_POINTER): Remove.
2590         (tag_types): Add typenames.
2591         (lookup_ualified_name): Declare.
2592         (lookup_name_real): Likewise.
2593         (shadow_tag): Adjust prototype.
2594         (get_scope_of_declarator): Declare it.
2595         (process_next_inline): Remove it.
2596         (check_for_missing_semicolon): Likewise.
2597         (maybe_get_template_decl_from_type_decl): Declare it.
2598         (finish_label_stmt): Adjust prototype.
2599         (finish_non_static_data_meber): Declare it.
2600         (finish_pseudo_destructor_call_expr): Rename to ...
2601         (finish_pseudo_destructor_expr): ... this.
2602         (finish_compound_literal): Declare it.
2603         (begin_inline_definitions): Remove it.
2604         (init_spew): Remove.
2605         (peekyylex): Likewise.
2606         (arbitrate_lookup): Likewise.
2607         (frob_opname): Likewise.
2608         (maybe_snarf_defarg): Likewise.
2609         (add_defarg_fn): Likewise.
2610         (do_pending_defargs): Likewise.
2611         (done_pending_defargs): Likewise.
2612         (unprocessed_defarg_fn): Likewise.
2613         (replace_defarg): Likewise.
2614         (end_input): Likewise.
2615         (get_overloaded_fn): Likewise.
2616         * cvt.c (convert_to_reference): Improve error handling.
2617         * decl.c (lookup_name_real): Do not declare it static.
2618         (maybe_push_to_top_level): Set check_access.
2619         (identifier_type_value): Adjust call to lookup_name_real.
2620         (lookup_qualified_name): New method.
2621         (lookup_name_real): Remove special-case parsing code.
2622         (lookup_name-nonclass): Adjust call to lookup_name_real.
2623         (lookup_name_namespace_only): Likewise.
2624         (lookup_name): Likewise.
2625         (check_tag_decl): Return the type declared.
2626         (shadow_tag): Likewise.
2627         (register_dtor_fn): Tweak check_access.
2628         (grokfndecl): Use constructor_name_p.
2629         (get_scope_of_declarator): New function.
2630         (grokdeclarator): Obscure tweaks for slightly different declarator
2631         representations.
2632         (start_method): Return error_mark_node to indicate failure.
2633         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
2634         * decl2.c (constructor_name_full): Simplify.
2635         (constructor_name): Use it.
2636         (build_expr_from_tree): Adjust for changes to do new parser.
2637         (push_scope): Improve robustness.
2638         (validate_nonmember_using_decl): Process declarations, not names.
2639         (do_class_using_decl): Likewise.
2640         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
2641         here.
2642         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
2643         * expr.c (cxx_expand_expr): Handle BASELINKs.
2644         * init.c (member_init_ok_or_else): Issue more errors.
2645         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
2646         * lex.c: Do not include parse.h.
2647         (yypring): Do not declare.
2648         (yylval): Likewise.
2649         (make_reference_declarator): Remove error-generating code.
2650         (rid_to_yy): Remove.
2651         (cxx_init): Do not call init_spew.
2652         (yypring): Remove.
2653         (check_for_missing_semicolon): Remove.
2654         * lex.h (got_scope): Remove.
2655         (got_object): Remove.
2656         * method.c (hack_identifier): Use finish_non_static_data_member.
2657         (implicitly_declare_fn): Adjust use of constructor_name.
2658         * parser.c: New file.
2659         * pt.c (parse.h): Do not include it.
2660         (maybe_get_template_decl_from_template): Do not declare it.
2661         (finish_member_template_decl): Tweak.
2662         (begin_explicit_instantiation): Adjust for
2663         processing_explicit_instantiation being boolean.
2664         (end_explicit_instantiation): Likewise.
2665         (maybe_process_partial_specialization): Tighten specialization
2666         test.
2667         (retrieve_local_specialization): Adjust ue of hash table.
2668         (eq_local_specializations): New function.
2669         (register_local_specialization): Likewise.
2670         (push_template_decl_real): Remove unnecessary test.
2671         (maybe_get_template_decl_from_type_decl): Don't make it static.
2672         (for_each_template_parm_r): Handle TYPEOF_TYPE.
2673         (tsubst_copy): Use retrieive_local_specialization to handle
2674         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
2675         Handle COMPONENT_REFs with pseudo-destructor-expressions.
2676         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
2677         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
2678         (unify): Tweak handling of CONST_DECLs.
2679         (regenerate_decl_from_template): Use push_nested_class.
2680         (template_for_substitution): New funciton.
2681         (instantiate_decl): Use it.  Register parameters as local
2682         specializations.
2683         * rtti.c (init_rtti_processing): Set type_info_ref_type.
2684         (build_typeid): Use it.
2685         (get_typeid): Likeise.
2686         * search.c (accessible_p): Use check_access, not
2687         flag_access_control.
2688         (adjust_result_of_qualified_name_lookup): Pay attention to the
2689         context_class.
2690         * semantics.c (finish_asm_stmt): Adjust error handling.
2691         (finish_label_stmt): Return the statement.
2692         (finish_non_static_data_member): New function.
2693         (finish_class_expr): Handle BASELINKs.
2694         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
2695         (finish_object_call_expr): Simplify handling during templates.
2696         (finish_pseudo_destructor_call_expr): Rename to ...
2697         (finish_pseudo_dtor_expr): ... this.
2698         (finish_compound_literal): New function.
2699         (begin_inline_definitions): Remove.
2700         (finish_sizeof): Remove special template handling.
2701         * spew.c: Do not include parse.h.
2702         * tree.c (get_overloaded_fn): Remove.
2703         * typeck.c (build_class_member_access_expr): Handle
2704         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
2705         (lookup_destructor): New function.
2706         (finish_class_member_access_expr): Use it.
2707         (convert_arguments): Simplify.
2708         (build_unary_op): Handle BASELINKs.
2709
2710 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
2711
2712         PR c++/4803
2713         * decl2.c (mark_used): Defer inline functions.
2714         (finish_file): Merge deferred_fns loops. Check all used
2715         inline functions have a definition.
2716         * method.c (make_thunk): Thunks are not inline.
2717
2718         PR c++/5116, c++/764
2719         * call.c (build_new_op): Make sure template class operands are
2720         instantiated.
2721
2722 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
2723
2724         PR C++/7964
2725         * cp-tree.h (resolve_scoped_fn_name): Prototype.
2726         * call.c (resolve_scoped_fn_name): New function. Deal with
2727         more template expansion. Broken out of ...
2728         * parse.y (parse_finish_call_expr): ... here. Call it.
2729         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
2730         resolve_scoped_fn_name and build_call_from_tree.
2731
2732         PR c++/9053
2733         * decl.c (duplicate_decls): Templates may be disambiguated by
2734         return type.
2735
2736         PR c++/8702
2737         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
2738         conversion operators on failure.
2739
2740 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2741
2742         Remove traditional C constructs 2/n.
2743         * call.c (tourney, build_field_call, equal_functions, joust,
2744         compare_ics, build_over_call, build_java_interface_fn_ref,
2745         convert_like_real, op_error, build_object_call, resolve_args,
2746         build_vfield_ref, check_dtor_name, build_scoped_method_call,
2747         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
2748         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
2749         standard_conversion, reference_related_p,
2750         reference_compatible_p, convert_class_to_reference,
2751         direct_reference_binding, reference_binding,
2752         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
2753         add_template_conv_candidate, any_viable, any_strictly_viable,
2754         build_this, splice_viable, print_z_candidates,
2755         build_user_type_conversion, build_new_function_call,
2756         conditional_conversion, build_conditional_expr, build_new_op,
2757         build_op_delete_call, enforce_access, call_builtin_trap,
2758         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
2759         convert_default_arg, type_passed_as, convert_for_arg_passing,
2760         in_charge_arg_for_name, is_properly_derived_from,
2761         maybe_handle_implicit_object, maybe_handle_ref_bind,
2762         source_type, add_warning, can_convert, can_convert_arg,
2763         perform_implicit_conversion, can_convert_arg_bad,
2764         initialize_reference, add_conv_candidate,
2765         add_template_candidate_real, add_template_candidate): Ansify.
2766
2767 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
2768
2769         PR c++/8572
2770         * cp-tree.h (grokoptypename): Add SCOPE parameter.
2771         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
2772         if in a template scope.
2773         * parse.y (unoperator): Return the scope.
2774         (operator_name): Adjust grokoptypename call.
2775
2776 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2777
2778         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
2779         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
2780         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
2781
2782 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
2783
2784         * ChangeLog: Fix a typo.
2785         * class.c: Fix comment typos.
2786         * cp-tree.h: Likewise.
2787
2788 2002-12-18  Jason Merrill  <jason@redhat.com>
2789
2790         Handle anonymous unions at the tree level.
2791         C++ ABI change: Mangle anonymous unions using the name of their
2792         first named field (by depth-first search).  Should not cause
2793         binary compatibility problems, though, as the compiler previously
2794         didn't emit anything for affected unions.
2795         * cp-tree.def (ALIAS_DECL): New tree code.
2796         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
2797         first field, not the largest.
2798         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
2799         push the decl, and write it out at namespace scope.
2800         * decl.c (lookup_name_real): See through an ALIAS_DECL.
2801         (pushdecl): Add namespace bindings for ALIAS_DECLs.
2802         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
2803         of a decl which doesn't have one.
2804         * typeck.c (build_class_member_access_expr): Don't recurse if
2805         we already have the type we want.
2806
2807 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2808
2809         PR c++/8099
2810         * friend.c (make_friend_class): Allow partial specialization
2811         when declaration is not a template friend.
2812
2813 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2814
2815         PR c++/3663
2816         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
2817         TREE_PROTECTED to created decl nodes.
2818
2819 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
2820
2821         * class.c (build_base_field): Do not set DECL_PACKED on the
2822         FIELD_DECL.
2823
2824 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2825
2826         * cp-tree.h (struct tree_srcloc): Use location_t.
2827         (SOURCE_LOCUS): New.
2828         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
2829
2830 2002-12-17  Jason Merrill  <jason@redhat.com>
2831
2832         * decl.c (finish_function): Also complain about no return in
2833         templates.
2834         * semantics.c (finish_return_stmt): Also call check_return_expr in
2835         templates.
2836         * typeck.c (check_return_expr): In a template, just remember that we
2837         saw a return.
2838
2839 2002-12-16  Jason Merrill  <jason@redhat.com>
2840
2841         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
2842         of the CALL_EXPR.
2843
2844         * semantics.c (do_pushlevel): Call pushlevel after adding the
2845         SCOPE_STMT.
2846         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
2847         * parse.y (function_body): Go back to using compstmt.
2848         * decl.c (pushdecl): Skip another level to get to the parms level.
2849
2850         * call.c (build_new_method_call): Use is_dummy_object to determine
2851         whether or not to evaluate the object parameter to a static member
2852         function.
2853
2854 2002-12-14  Jason Merrill  <jason@redhat.com>
2855
2856         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
2857         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
2858         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
2859         don't bother with an AGGR_INIT_EXPR.
2860         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
2861         just generate a new decl normally.  Take return slot parm.
2862         * cp-tree.h: Adjust prototype.
2863
2864 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2865
2866         PR C++/8031
2867         * cvt.c (convert_to_pointer_force): Don't try comparing against
2868         erronous type.
2869
2870 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
2871
2872         * cp-tree.h: Have the multiple-include guards around
2873         the entire file.
2874
2875 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
2876
2877         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
2878         for SPEW_DEBUG.
2879         (snarf_method): Same.
2880         (snarf_defarg): Same.
2881
2882 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
2883
2884         PR c++/8372
2885         * pt.c (tsubst_copy): Handle destructor names more correctly.
2886
2887 2002-12-10  Matt Austern   <austern@apple.com>
2888
2889         * cp-tree.h: get rid of needs_virtual_reinit bit.
2890
2891 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
2892
2893         * NEWS: Document removal of in-class initialization extension for
2894         static data members of non-arithmetic, non-enumeration type.
2895         * decl.c (check_static_variable_definition): Do not allow that
2896         extension.
2897         * decl2.c (grokfield): Do not call digest_init when processing
2898         templates.
2899
2900 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2901
2902         * error.c (dump_expr): Fix format specifier warning.
2903
2904 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
2905
2906         * class.c (finish_struct_1): Correct comment.
2907         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
2908
2909 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2910
2911         PR C++/8799
2912         * error.c (dump_expr): Don't ever try to dump a non-existent
2913         expression.
2914
2915 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
2916
2917         Implement covariant returns.
2918         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
2919         (struct lang_decl_flags): Add this_thunk_p flag.
2920         Rename vcall_offset to virtual_offset.
2921         (struct lang_decl): Rename delta to fixed_offset.
2922         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
2923         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
2924         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
2925         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
2926         (make_thunk): Add this_adjusting arg.
2927         (finish_thunk): Declare.
2928         (mangle_thunk): Add this_adjusting arg.
2929         * class.c (get_vcall_index): Use base function for lookup.
2930         (update_vtable_entry_for_fn): Generate covariant thunk.
2931         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
2932         (build_vtbl_initializer): Use base function for lookup.
2933         Finish covariant thunk here. Adjust thunk generation.
2934         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
2935         Adjust thunk dumping.
2936         * mangle.c (mangle_call_offset): New function.
2937         (mangle_thunk): Adjust for covariant thunks.
2938         * method.c (make_thunk): Adjust. Do not set name here.
2939         (finish_thunk): New function. Set name here.
2940         (use_thunk): Generate covariant thunks too.
2941         (thunk_adjust): New function.
2942         * search.c (covariant_return_p): Remove. Fold into ...
2943         (check_final_overrider): ... here. Simplify.
2944         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
2945
2946 2002-12-03  Jason Merrill  <jason@redhat.com>
2947
2948         PR c++/8674
2949         * call.c (build_over_call): Check specifically for TARGET_EXPR
2950         when eliding.
2951
2952         PR c++/8461, c++/8625
2953         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
2954         (cp_convert_parm_for_inlining): Remove.
2955         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
2956         Remove.
2957         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
2958         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
2959
2960         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
2961         an ambiguous conversion.
2962
2963 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
2964
2965         PR c++/8688
2966         * decl.c (reshape_init): Handle erroneous initializers.
2967
2968 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
2969
2970         PR c++/8720
2971         * spew.c (remove_last_token): Make sure that last_chunk is set
2972         correctly.
2973
2974         PR c++/8615
2975         * error.c (dump_expr): Handle character constants with
2976         TREE_OVERFLOW set.
2977
2978 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2979
2980         DR 180
2981         * decl.c (grokdeclarator): Require class-key for all friend class.
2982         Output the correct type and context in the error message.
2983
2984 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
2985
2986         PR c++/5919
2987         * pt.c (unify): Use variably_modified_type_p to test validity of
2988         template argument types.
2989
2990         PR c++/8727
2991         * cp-tree.h (lang_type_class): Add typeinfo_var.
2992         (CLASSTYPE_TYPEINFO_VAR): New macro.
2993         * rtti.c (get_tinfo_decl): Use it.
2994
2995         PR c++/8663
2996         * init.c (expand_member_init): Always get the main variant of a
2997         base class.
2998
2999 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
3000
3001         PR c++/8332
3002         PR c++/8493
3003         * decl.c (cxx_init_decl_processing): Use size_type_node, not
3004         c_size_type_node.
3005         * decl2.c (coerce_new_type): Likewise.
3006         * except.c (do_allocate_exception): Likewise.
3007
3008 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
3009
3010         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
3011         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
3012         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
3013         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
3014         typeck2.c: Include coretypes.h and tm.h.
3015         * Make-lang.in: Update dependencies.
3016
3017 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
3018
3019         PR c++/8227
3020         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
3021         (check_initializer): Validate the type of the initialized
3022         variable, even if the initializer is absent.
3023         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
3024
3025         PR c++/8214
3026         * typeck.c (convert_for_assignment): Do not use
3027         decl_constant_value on the operand.
3028
3029         PR c++/8511
3030         * pt.c (instantiate_decl): Handle template friends defined outside
3031         of the class correctly.
3032
3033 2002-11-29  Joe Buck <jbuck@synopsys.com>
3034
3035         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
3036         anonymous structs.
3037
3038 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
3039
3040         * class.c (walk_subobject_offsets): Recur on binfos as well as on
3041         types.
3042         (layout_nonempty_base_or_field): Pass it a binfo when processing a
3043         base class.
3044         (layout_empty_base): Likewise.
3045         (build_base_field): Likewise.
3046
3047 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
3048
3049         * class.c (build_base_field): Make sure we get the canonical base
3050         when descending through primary bases.
3051
3052 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
3053
3054         * decl.c (check_initializer): Don't error on initialisation of
3055         a scalar with a brace-enclosed expression.
3056
3057 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
3058
3059         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
3060         (template_parms_equal): Remove prototype.
3061         * typeck.c (buuld_indirect_ref): Reformat.
3062
3063 2002-11-25  Jason Merrill  <jason@redhat.com>
3064
3065         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
3066         and a DO_STMT.
3067
3068 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
3069
3070         * tree.c (cp_build_qualified_type_real): Correct handling of
3071         array types.
3072         * class.c (walk_subobject_offsets): Fix thinko.
3073         (build_base_field): Record offsets of empty bases in primary
3074         virtual bases.
3075         (layout_class_type): Record offsets of empty bases in fields.
3076
3077         * search.c (is_subobject_of_p_1): Fix thinko.
3078         (lookup_field_queue_p): Likewise.
3079
3080 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
3081
3082         * class.c (layout_class_type): Reuse tail padding when laying out
3083         virtual bases.
3084
3085 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
3086
3087         * rtti.c (qualifier_flags): Fix thinko.
3088
3089 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3090
3091         Remove traditional C constructs 1/n.
3092         * cp-tree.h (init_method, set_mangled_name_for_decl,
3093         build_opfncall, hack_identifier, make_thunk, use_thunk,
3094         synthesize_method, implicitly_declare_fn,
3095         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
3096         maybe_clone_body): Remove use of PARAMS.
3097
3098         * method.c (do_build_assign_ref, do_build_copy_constructor,
3099         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
3100         Likewise.
3101         (synthesize_method): Use 'bool' type and constants instead of
3102         'int'.
3103         (locate_copy): Likewise.
3104         (implicitly_declare_fn): Likewise.
3105
3106         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
3107         Remove old-style declaration.
3108         (maybe_clone_body): Use 'bool' type and constants.
3109
3110 2002-11-21  Glen Nakamura  <glen@imodulo.com>
3111
3112         PR c++/8342
3113         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
3114         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
3115         of the branches of a COND_EXPR.
3116
3117 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
3118
3119         * pt.c (for_each_template_parm): Free allocated memory.
3120         * search.c (is_subobject_of_p_1): New function.
3121         (is_subobject_of_p): Avoid walking virtual bases multiple times.
3122
3123 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
3124
3125         * g++spec.c (lang_specific_spec_functions): New.
3126
3127 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
3128
3129         * ChangeLog: Follow spelling conventions.
3130         * class.c: Likewise.
3131         * decl2.c: Likewise.
3132
3133 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
3134
3135         * search.c (dfs_push_decls): Do not try to reorder elements
3136         3..n of method_vec if method_vec has only two elements.
3137         Reverse order of two tests to avoid accessing unallocated
3138         memory.
3139
3140 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
3141
3142         * class.c (dfs_find_final_overrider): Adjust so that the most
3143         derived object is a binfo, rather than a class type.
3144         (find_final_overrider): Likewise.
3145         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
3146         (add_vcall_offset): Likewise.
3147
3148 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3149
3150         PR c++/8389
3151         * pt.c (instantiate_template): Push class scope for member
3152         functions.
3153         (get_mostly_instantiated_function_type): Likewise.  Don't call
3154         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
3155         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
3156         * mangle.c (write_encoding, write_unqualified_name): Adjust.
3157
3158 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
3159
3160         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
3161         vcall offfsets.  Split out ...
3162         (add_vcall_offset): ... new function.
3163
3164         PR c++/8338
3165         * pt.c (for_each_template_parm): Add htab parameter.
3166         (process_partial_specialization): Adjust call.
3167         (push_template_decl_real): Likewise.
3168         (pair_fn_data): Add visited.
3169         (for_each_template_parm_r): Avoid walking duplicates more than
3170         once.
3171         (uses_template_parms): Adjust call to for_each_template_parm.
3172
3173 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
3174
3175         * class.c (add_implicitly_declared_members): Put implicitly
3176         declared functions at the end of TYPE_METHODs when -fabi-version
3177         is at least 2.
3178
3179 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
3180
3181         * decl2.c (finish_file): Correct spelling.
3182
3183 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
3184
3185         * call.c (build_special_member_call): Do not try to lookup VTTs by
3186         name.
3187         * class.c (vtbl_init_data): Add generate_vcall_entries.
3188         (get_vtable_decl): Do not look up virtual tables by name.
3189         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
3190         (set_primary_base): Do not set CLASSTYPE_RTTI.
3191         (determine_primary_base): Likewise.
3192         (get_matching_virtual): Remove.
3193         (get_vcall_index): New function.
3194         (update_vtable_entry_for_fn): Do not try to use virtual thunks
3195         when they are not required.  Assign vcall indices at this point.
3196         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
3197         Do update dynamic_classes.
3198         (build_vtt): Do not add VTTs to the symbol table.
3199         (build_ctor_vtbl_group): Likewise.
3200         (build_vtbl_initializer): Simplify handling of vcall indices.
3201         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
3202         for the most derived class.
3203         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
3204         the vtable.
3205         * cp-tree.h (dynamic_classes): New macro.
3206         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
3207         (CLASSTYPE_RTTI): Remove.
3208         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
3209         (CLASSTYPE_VCALL_INDICES): New macro.
3210         (CLASSTYPE_VTABLES): Likewise.
3211         (BV_USE_VCALL_INDEX_P): Remove.
3212         (build_vtable_path): Remove.
3213         * decl2.c (finish_vtable_vardecl): Remove.
3214         (key_method): Remove #if 0'd code.
3215         (finish_vtable_vardecl): Rename to ...
3216         (maybe_emit_vtables): ... this.
3217         (finish_file): Use it.
3218         * search.c (look_for_overrides_here): Update comment.
3219
3220 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
3221
3222         PR c/7353 redux
3223         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
3224
3225 2002-10-30  Jason Merrill  <jason@redhat.com>
3226
3227         PR c++/8186
3228         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
3229         * call.c (convert_for_arg_passing): Set it.
3230         * except.c (stabilize_throw_expr): Recurse for such an arg.
3231
3232 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
3233
3234         * cp-tree.h (lang_decl_flags): Remove init_priority.
3235         (lang_decl): Add delta.
3236         (GLOBAL_INIT_PRIORITY): Remove.
3237         (THUNK_DELTA): Revise definition.
3238         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
3239         * dump.c (cp_dump_tree): Don't dump it.
3240
3241 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
3242
3243         PR c++/8160
3244         * typeck2.c (process_init_constructor): Call complete_array_type.
3245
3246         PR c++/8149
3247         * decl.c (make_typename_type): Issue errors about invalid results.
3248
3249 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3250
3251         Core issue 287, PR c++/7639
3252         * cp-tree.h (lang_type_class): Add decl_list field.
3253         (CLASSTYPE_DECL_LIST): New macro.
3254         (maybe_add_class_template_decl_list): Add declaration.
3255         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
3256         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
3257         (maybe_add_class_template_decl_list): New function.
3258         (add_implicitly_declared_members): Use it.
3259         * decl.c (maybe_process_template_type_declaration): Likewise.
3260         (pushtag): Likewise.
3261         * friend.c (add_friend): Likewise.
3262         (make_friend_class): Likewise.
3263         * semantics.c (finish_member_declaration): Likewise.
3264         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
3265         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
3266         to process members and friends in the order of declaration.
3267
3268 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
3269
3270         PR c++/8287
3271         * decl.c (finish_destructor_body): Create the label to jump to
3272         when returning from a destructor here.
3273         (finish_function_body): Rather than here.
3274
3275 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
3276
3277         PR c++/7266
3278         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
3279         SCOPE_REF is not null before dereferencing it.
3280
3281 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
3282
3283         * call.c (build_over_call): Use DECL_CONTEXT, not
3284         DECL_VIRTUAL_CONTEXT.
3285         * class.c (modify_vtable_entry): Don't mess with
3286         DECL_VIRTUAL_CONTEXT.
3287         (set_vindex): Remove.
3288         (set_primary_base): Remove vfuns_p parameter.
3289         (determine_primary_base): Likewise.
3290         (modify_all_vtables): Likewise.
3291         (layout_class_type): Likewise.  Adjust calls to other functions
3292         accordingly.
3293         (finish_struct_1): Adjust calls to modified functions.  Set
3294         DECL_VINDEX here.
3295         * cp-tree.h (lang_type_class): Remove vsize.
3296         (CLASSTYPE_VSIZE): Remove.
3297         (lang_decl): Remove thunks.
3298         (DECL_THUNKS): Adjust.
3299         (DECL_VIRTUAL_CONTEXT): Remove.
3300         (duplicate_decls): Don't copy it.
3301         * pt.c (build_template_decl): Don't set it.
3302         (tsubst_decl): Likewise.
3303         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
3304
3305         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
3306         (build_vtable_entry): Remove.
3307         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
3308         (lang_decl): Add thunks.
3309         (DECL_THUNKS): New macro.
3310         * decl.c (duplicate_decls): Copy it.
3311         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
3312         * semantics.c (emit_associated_thunks): Simplify.
3313
3314 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
3315
3316         PR c++/7228
3317         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
3318         lang_type structure exists before accessing field.
3319         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
3320         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
3321         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
3322         * class.c (check_field_decls): Use new macros.
3323         * typeck2.c (process_init_constructor): Remove redundant check for
3324         existence of lang_type structure.
3325
3326 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
3327
3328         * class.c (end_of_base): New method.
3329         (end_of_class): Use it.  Check indirect virtual bases.
3330
3331         * class.c (check_field_decls): Fix typo.
3332
3333 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
3334
3335         PR c++/8067
3336         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
3337         related variables.
3338
3339         PR c++/7679
3340         * spew.c (next_token): Do not return an endless stream of
3341         END_OF_SAVED_INPUT tokens.
3342         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
3343         the cached token stream.
3344         (snarf_defarg): Likewise.
3345
3346 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
3347
3348         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
3349         variably_modified_type_p.
3350         * cp-tree.h: Remove prototype of variably_modified_type_p.
3351         * tree.c (variably_modified_type_p): Remove; now implemented
3352         in language-independent code.
3353
3354 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
3355
3356         PR c++/6579
3357         * spew.c (snarf_parenthesized_expression): New function.
3358         (snarf_block): Use it.
3359
3360 2002-10-22  Richard Henderson  <rth@redhat.com>
3361
3362         * method.c (use_thunk): Always compute vcall_value; assert that
3363         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
3364         for vcall thunks as well.
3365
3366 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
3367
3368         * class.c (empty_base_at_nonzero_offset_p): New function.
3369         (layout_nonempty_base_or_field): Do not check for conflicts when
3370         laying out a virtual base using the GCC 3.2 ABI.
3371         (build_base_field): Correct checking for presence of empty classes
3372         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
3373
3374         * class.c (include_empty_classes): Use normalize_rli.
3375         (layout_class_type): Likewise.
3376
3377         * decl.c (reshape_init): Tweak handling of character arrays.
3378
3379         PR c++/8218
3380         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
3381         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
3382         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
3383         (check_field_decls): Likewise.
3384         (layout_class_type): Likewise.
3385         (finish_struct_1): Initialize it.
3386         (walk_subobject_offsets): Use it to prune searches.
3387
3388 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
3389
3390         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
3391         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
3392         TARGET_ASM_OUTPUT_MI_THUNK in comments.
3393
3394 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
3395
3396         * decl.c (start_decl): Point users of the old initialized-
3397         typedef extension at __typeof__.
3398
3399 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3400
3401         * Make-lang.in (method.o): Depend on TARGET_H.
3402         * method.c (target.h): Include it.
3403         (use_thunk): Use target hooks.  Use vcall thunks, if available.
3404
3405 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3406
3407         * class.c (base_derived_from): Make sure return value is a bool.
3408
3409 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3410
3411         * class.c (find_final_overrider_data_s): Remove overriding_fn and
3412         overriding_base.
3413         (dfs_base_derived_from): New function.
3414         (base_derived_from): Likewise.
3415         (dfs_find_final_overrider): Use base_derived_from.
3416         (find_final_overrider): Adjust.
3417
3418 2002-10-18  Jason Merrill  <jason@redhat.com>
3419
3420         PR c++/8080
3421         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
3422         with condition decls in a template.
3423
3424 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
3425
3426         * class.c (add_method): Compare template parms too.
3427
3428 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
3429
3430         PR c++/7584
3431         * class.c (handle_using_decl): Allow the declaration used to be
3432         from an ambiguous base.
3433
3434         * pt.c (convert_template_argument): Revert this change:
3435                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3436                 * pt.c (convert_template_argument): Do not fold non-type
3437                 template rguments when inside a template.
3438
3439         * init.c (expand_default_init): Handle brace-enclosed initializers
3440         correctly.
3441
3442 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3443
3444         * mangle.c (write_expression): Correct handling of enumeration
3445         constants.
3446         (write_template_arg): Likewise.
3447         * pt.c (convert_template_argument): Do not fold non-type template
3448         arguments when inside a template.
3449
3450         PR c++/7478
3451         * cvt.c (convert_to_reference): Allow references as the incoming
3452         type.
3453
3454 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3455
3456         PR c++/7524
3457         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
3458         build_qualified_type.
3459
3460 2002-10-15  Richard Henderson  <rth@redhat.com>
3461
3462         * error.c (dump_expr): Use real_to_decimal directly, and with
3463         the new arguments.
3464
3465 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
3466
3467         * decl.c (reshape_init): Fix typo.
3468
3469         * cp-tree.h (operator_name_info_t): Add arity.
3470         * lex.c (init_operators): Initialize it.
3471         * mangle.c (write_conversion_operator_name): New function.
3472         (write_unqualified_name): Use it.
3473         (write_template_args): Accept template arguments as a TREE_LIST.
3474         (write_expression): Adjust handling of qualified names to match
3475         specification.
3476
3477 2002-10-15  Jason Merrill  <jason@redhat.com>
3478
3479         * call.c (call_builtin_trap): New fn.
3480         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
3481         (build_call): Don't set current_function_returns_abnormally outside
3482         a function.
3483
3484 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
3485
3486         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
3487         clear CLASSTYPE_EMPTY_P.
3488         (build_base_field): Likewise.
3489         (build_base_fields): Likewise.
3490         (check_bases_and_members): Likewise.
3491         (create_vtbl_ptr): Likewise.
3492         (layout_class_type): Likewise.  Ensure that empty classes have
3493         size zero when used as base classes in the 3.2 ABI.
3494         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
3495         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
3496         parameter.
3497         (is_empty_class): Correct definition when using post-3.2 ABI.
3498         * cp-tree.h (lang_type_class): Add empty_p.
3499         (CLASSTYPE_EMPTY_P): New macro.
3500
3501 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
3502
3503         * init.c (build_delete): Do not apply save_expr for arrays.
3504         (build_vec_delete): Likewise.
3505
3506 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
3507
3508         * decl.c (layout_var_decl): Call layout_decl even for variables
3509         whose type is an array with unspecified bounds.
3510
3511         PR c++/7176
3512         * lex.c (do_identifier): Add another option for the parsing
3513         parameter.
3514         * parse.y (do_id): Use it.
3515
3516 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3517
3518         PRs C++/6803, C++/7721 and C++/7803
3519         * decl.c (grokdeclarator): Gracefully handle template-name as
3520         decl-specifier.
3521
3522 2002-10-11  Jason Molenda  <jmolenda@apple.com>
3523
3524         * init.c (build_field_list): Provide uses_unions_p with a default
3525         value.
3526
3527 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
3528
3529         PR c++/5661
3530         * cp-tree.h (variably_modified_type_p): New function.
3531         (grokdeclarator) Tighten check for variably modified types as
3532         fields.
3533         * pt.c (convert_template_argument): Do not allow variably modified
3534         types as template arguments.
3535         * tree.c (variably_modified_type_p): New function.
3536
3537         * NEWS: Document removal of "new X = ..." extension.
3538         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
3539         brace-enclosed initializers.
3540         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
3541         (initialize_local_var): Remove declaration.
3542         (expand_static_init): Likewise.
3543         * decl.c (next_initializable_field): New function.
3544         (reshape_init): Likewise.
3545         (check_initializer): Use them.  Build dynamic initializer for
3546         aggregates here too.
3547         (initialize_local_var): Simplify, and incorporate cleanup
3548         insertion code as well.
3549         (destroy_local_var): Remove.
3550         (cp_finish_decl): Tidy.
3551         (expand_static_init): Fold checks for whether or not a variable
3552         needs initialization into this function.  Simplify.
3553         * decl2.c (do_static_initialization): Simplify.
3554         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
3555         be done for us automatically.
3556         (expand_default_init): Handle brace-enclosed initializers
3557         correctly.
3558         (expand_aggr_init_1): Remove RTL-generation code.
3559         (build_vec_init): Remove "new X = ..." support.
3560         * parse.y (new_initializer): Likewise.
3561         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
3562         brace-enclosed initializer.
3563         (create_pseudo_type_info): Likewise.
3564         * typeck2.c (store_init_value): Don't try to handle digest_init
3565         being called more than once.
3566         (digest_init): Tidy handling of brace-enclosed initializers.
3567
3568 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3569
3570         * decl.c (typename_hash): Use htab_hash_pointer.
3571
3572 2002-10-10  Jim Wilson  <wilson@redhat.com>
3573
3574         * decl.c (duplicate_decls): Don't call decl_attributes.
3575
3576 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
3577
3578         PR c/7353
3579         * decl.c (start_decl): Unconditionally issue error for
3580         'typedef foo = bar'.
3581         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
3582         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
3583
3584 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3585
3586         * decl2.c (prune_vtable_vardecl): Delete unused function.
3587
3588 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3589
3590         PR c++/7754
3591         * decl2.c (finish_anon_union): Do not expand anonymous unions when
3592         procesing template functions.
3593         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
3594         type. Call layout_decl.
3595         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
3596
3597 2002-10-07  Richard Henderson  <rth@redhat.com>
3598
3599         * decl2.c, pt.c: Revert c++/7754 fix.
3600
3601 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3602
3603         PR c++/7804
3604         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
3605
3606 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3607
3608         PR c++/7931
3609         * pt.c (for_each_template_parm_r): Handle BASELINKs.
3610
3611         PR c++/7754
3612         * decl2.c (finish_anon_union): Do not expand anonymous unions when
3613         procesing template functions.
3614         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
3615         type. Call layout_decl.
3616         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
3617
3618 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3619
3620         PR c++/8006
3621         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
3622         template parameters.
3623         (globals): Add entity and need_abi_warning.
3624         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
3625         CLASSTYPE_TEMPLATE_INFO.
3626         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
3627         TYPE_TI_TEMPLATE.
3628         (write_prefix): Handle typename types correctly.
3629         (write_template_prefix): Handle template template parameters
3630         correctly.
3631         (start_mangling): Add entity parameter.
3632         (finish_mangling): Warn about names whose mangling will change.
3633         (mangle_decl_string): Adjust.
3634         (mangle_type_string): Likewise.
3635         (mangle_special_for_type): Likewise.
3636         (mangle_ctor_vtbl_for_type): Likewise.
3637         (mangle_thunk): Likewise.
3638         (mangle_guard_variable): Likewise.
3639         (mangle_ref_init_variable): Likewise.
3640
3641 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
3642
3643         PR c++/7188.
3644         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
3645         * cp-tree.h (emit_base_init): Rename to ....
3646         (emit_mem_initializers): ... this.
3647         (expand_member_init): Change prototype.
3648         * init.c (perform_member_init): Compute explicit, rather than
3649         requiring it as a parameter.
3650         (sort_member_init): Rename to ...
3651         (sort_mem_initializers): ... this.  Process bases and data members
3652         together.
3653         (sort_base_init): Remove.
3654         (emit_base_init): Rename to ...
3655         (emit_mem_initializers): ... this.
3656         (expand_aggr_vbase_init_1): Remove.
3657         (construct_virtual_bases): Rename to ...
3658         (construct_virtual_base): ... this.
3659         (expand_member_init): Rework handling of base initializers.
3660         * method.c (do_build_copy_constructor): Use
3661         finish_mem_initializers.
3662         * parse.y (member_init): Adjust calls to expand_member_init.
3663         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
3664         (tsubst_initializer_list): Use expand_member_init.
3665         * semantics.c (finish_mem_intiailizers): Simplify.
3666
3667 2002-10-02  Matt Austern  <austern@apple.com>
3668         * decl.c (walk_vtables_r): Fixed typo that caused result to
3669         never get a nonzero value.
3670
3671 2002-10-02  Roger Sayle  <roger@eyesopen.com>
3672
3673         PR optimization/6627
3674         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
3675         from here, and move it to tree.h.
3676         * decl.c (cxx_init_decl_processing): If storing the vbit
3677         in function pointers, ensure that force_align_functions_log
3678         is atleast one.
3679
3680 2002-10-02  Matt Austern  <austern@apple.com>
3681
3682         * class.c (check_field_decls): Changed warning about const member
3683         variables so that it doesn't get issued for a class aggregate.
3684
3685 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
3686
3687         * decl.c (cp_finish_decl): Make sure array types are laid out,
3688         even if the array bounds are unknown.
3689
3690 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
3691
3692         * class.c (build_vtbl_initializer): Change build_c_cast
3693         to build1.
3694
3695 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
3696
3697         * decl.c (cp_finish_decl): Make sure array types are laid out,
3698         even if the array bounds are unknown.
3699
3700         * decl.c (cp_finish_decl): Correct check for dynamic
3701         initialization of thread-local storage.
3702
3703 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
3704
3705         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
3706         overloaded.
3707
3708 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
3709
3710         * class.c (build_vtbl_initializer): Add cast.
3711         (add_vcall_offset_vtbl_entries_1):
3712         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
3713
3714 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
3715
3716         * class.c (walk_subobject_offsets): Correct the calculation of
3717         offsets for virtual bases.  Correct the counting of array
3718         elements.
3719         (layout_nonempty_base_or_field): Simplify.  Correct the
3720         calculation of offsets to be propagated through the binfo
3721         hierarchy.
3722         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
3723         Add the FIELD_DECL to TYPE_FIELDS.
3724         (build_base_fields): Adjust accordingly.
3725         (layout_virtual_bases): Use build_base_field.
3726         (end_of_class): Return a tree, not an integer.
3727         (warn_about_ambiguous_direct_bases): Rename to ...
3728         (warn_about_ambiguous_bases): ... this.
3729         (include_empty_classes): New function.
3730         (layout_class_type): Create an alternative version of the type to
3731         be used when as a base class type.  Do not call
3732         finish_record_layout until we are done laying out the class.
3733         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
3734         as_base.
3735         (CLASSTYPE_SIZE): Reimplement.
3736         (CLASSTYPE_SIZE_UNIT): Likewise.
3737         (CLASSTYPE_ALIGN): Likweise.
3738         (CLASSTYPE_USER_ALIGN): Likewise.
3739         (CLASSTYPE_AS_BASE): New macro.
3740         (DECL_INITIALIZED_P): Likewise.
3741         (extract_init): Remove prototype.
3742         (build_forced_zero_init): Rename to ...
3743         (build_zero_init): ... this.
3744         (force_store_init_value): Remove.
3745         * decl.c (obscure_complex_init): Remove.
3746         (duplicate_decls): Copy DECL_INITIALIZED_P.
3747         (check_initializer): Do not leave junk in DECL_INITIAL.
3748         (cp_finish_decl): Handle zero-initialization of entities with
3749         static storage duration.
3750         * expr.c (extract_init): Remove.
3751         * init.c (build_forced_zero_init): Remove.
3752         (build_zero_init): New function.
3753         (build_default_init): Use it.
3754         (build_field_list): Skip FIELD_DECLs for base subobjects.
3755         (push_base_cleanups): Likewise.
3756         * method.c (do_build_assign_ref): Likewise.
3757         (synthesize_exception_spec): Likewise.
3758         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
3759         (regenerate_decl_from_template): To not set DECL_INITIAL for a
3760         static data member whose initialization took place in its class.
3761         (instantiate_decl): Do not pass an initializer to cp_finish_decl
3762         in that situation.
3763         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
3764         (dfs_unuse_fields): Likewise.
3765         * tree.c (pod_type_p): Handle error_mark_node.
3766         (zero_init_p): Likewise.
3767         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
3768         subobjects.
3769         * typeck2.c (store_init_value): Remove #if 0'd code.
3770         (force_store_init_value): Remove.
3771         (process_init_constructor): Use build_zero_init.
3772
3773 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
3774
3775         PR c++/7788
3776         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
3777
3778 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
3779
3780         * cp-tree.h: Fix comment typos.
3781         * decl.c: Likewise.
3782         * pt.c: Likewise.
3783
3784 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
3785
3786         * cp/class.c (contains_empty_class_p): New method.
3787         (walk_subobject_offsets): Correct computation of field offset.
3788         (layout_empty_base): Correct placement of emtpy base classes.
3789         (layout_class_type): Warn about ABI changes.
3790
3791 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
3792
3793         * cp/class.c (layout_virtual_bases): Do not round the size of the
3794         type to a multiple of the alignment before laying out virtual bases.
3795         (layout_class_type): Correct handling of bit-fields that are wider
3796         than their type inside unions.  Round the size of the type to a
3797         even number of bytes when computing the size without virtual
3798         bases.
3799         * cp/cp-tree.h (abi_version_at_least): New macro.
3800
3801 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
3802
3803         * ChangeLog: Follow spelling conventions.
3804         * ChangeLog.2: Likewise.
3805         * call.c: Likewise.
3806         * class.c: Likewise.
3807         * cp-tree.h: Likewise.
3808         * cvt.c: Likewise.
3809         * decl.c: Likewise.
3810         * decl2.c: Likewise.
3811         * except.c: Likewise.
3812         * friend.c: Likewise.
3813         * g++spec.c: Likewise.
3814         * init.c: Likewise.
3815         * lex.c: Likewise.
3816         * mangle.c: Likewise.
3817         * method.c: Likewise.
3818         * operators.def: Likewise.
3819         * optimize.c: Likewise.
3820         * pt.c: Likewise.
3821         * rtti.c: Likewise.
3822         * search.c: Likewise.
3823         * semantics.c: Likewise.
3824         * spew.c: Likewise.
3825         * tree.c: Likewise.
3826         * typeck.c: Likewise.
3827
3828 2002-09-18  Devang Patel  <dpatel@apple.com>
3829
3830         * cp/cp-tree.h: New prototype for walk_vtabls().
3831         * cp/decl.c (walk_vtables_r): New function.
3832         (struct cp_binding_level): Add new members, namespaces,
3833         names_size and vtables.
3834         (add_decl_to_level): Add decl in namespaces or vtables
3835         chain, if conditions match.
3836         (walk_vtables): New function.
3837         (walk_namespaces_r): Travers separate namespace chain
3838         for namespace decls.
3839         (wrapup_globals_for_namespace): Use names_size instead
3840         of list_length().
3841         * cp/decl2.c (finish_file): Use walk_vtables() instead of
3842         walk_globals() to walk vtable decls.
3843
3844 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
3845
3846         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
3847         ICE with invalid pointers & references.
3848
3849 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
3850
3851         * Make-lang.in: Remove all references to the demangler.
3852         * cxxfilt.c: Moved to binutils.
3853
3854 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3855
3856         PR c++/7718
3857         * pt.c (tsubst_decl): Remove assert.
3858
3859         Remove DR 295 implementation.
3860         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
3861         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
3862         about ignoring volatile qualifiers.
3863
3864         * search.c (lookup_member): Correct documentation.
3865
3866 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
3867
3868         * cp-tree.h (union lang_tree_node): Add chain_next option.
3869
3870 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3871
3872         * parse.y (parse_finish_call_expr): Check lookup_member result.
3873
3874         PR c++/7015
3875         * semantic.c (finish_asm_stmt): Fix operand/output_operands
3876         thinko.
3877         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
3878
3879 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
3880
3881         PR c++/7919
3882         * call.c (build_over_call): Convert this pointer for fns found by
3883         using decls.
3884
3885 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
3886
3887         * ChangeLog: Follow spelling conventions.
3888         * ChangeLog.1: Likewise.
3889
3890 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
3891
3892         PR c++/7768
3893         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
3894
3895 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
3896
3897         * error.c: Fix comment formatting.
3898         * except.c: Likewise.
3899         * expr.c: Likewise.
3900         * friend.c: Likewise.
3901         * g++spec.c: Likewise.
3902         * init.c: Likewise.
3903         * lex.c: Likewise.
3904         * mangle.c: Likewise.
3905         * method.c: Likewise.
3906         * optimize.c: Likewise.
3907         * pt.c: Likewise.
3908         * rtti.c: Likewise.
3909         * search.c: Likewise.
3910         * semantics.c: Likewise.
3911         * spew.c: Likewise.
3912         * tree.c: Likewise.
3913         * typeck.c: Likewise.
3914         * typeck2.c: Likewise.
3915
3916 2002-09-13  Matt Austern  <austern@apple.com>
3917
3918         PR C++/7828
3919         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
3920         * cp/call.c: Change call-by-const-reference mechanism to use
3921         non_cast_lvalue_p when deciding whether the create a temporary.
3922         We need a temporary when passing, e.g. (long) x by const ref.
3923
3924 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
3925
3926         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
3927
3928 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
3929
3930         * decl.c: Fix comment formatting.
3931         * decl2.c: Likewise.
3932
3933 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
3934
3935         * call.c: Fix comment formatting.
3936         * class.c: Likewise.
3937         * cp-lang.c: Likewise.
3938         * cp-tree.h: Likewise.
3939         * cvt.c: Likewise.
3940
3941 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
3942
3943         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
3944         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
3945         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
3946         minor adjustments (use version_string, eliminate yet another
3947         duplicate of xmalloc)
3948
3949 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3950
3951         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
3952
3953 2002-09-05  Jason Merrill  <jason@redhat.com>
3954
3955         * typeck2.c (add_exception_specifier): Only pedwarn for an
3956         incomplete type.
3957         (require_complete_eh_spec_types): New fn.
3958         (cxx_incomplete_type_diagnostic): Also support pedwarning.
3959         * typeck.c (complete_type_or_diagnostic): Likewise.
3960         * call.c (build_call): Call require_complete_eh_spec_types.
3961         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
3962         on an incomplete type.
3963
3964 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
3965
3966         * decl.c (start_cleanup_fn): Clear interface_only before
3967         start_function, restore it afterwards.
3968
3969 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
3970
3971         * cp-tree.h (finish_builtin_type): Remove.
3972         * decl2.c (finish_builtin_type): Move to common code.
3973         * decl.c (build_ptrmemfunc_type): Adjust.
3974         * rtti.c (create_pseudo_type_info): Adjust.
3975         (create_tinfo_types): Adjust.
3976
3977 2002-08-31  Jason Merrill  <jason@redhat.com>
3978
3979         * cp-lang.c (cp_expr_size): Allow initialization from a
3980         CONSTRUCTOR.
3981
3982 2002-08-30  Richard Henderson  <rth@redhat.com>
3983
3984         PR opt/7515
3985         * tree.c: Include target.h.
3986         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
3987         don't bind locally.
3988         * Makefile.in (tree.o): Update.
3989
3990 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
3991
3992         * class.c (layout_virtual_bases): Warn about bugs in G++ that
3993         result in incorrect object layouts.
3994         (layout_class_type): Likewise.
3995
3996 2002-08-24  Matt Austern  <austern@apple.com>
3997
3998         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
3999         are allowable.
4000         (real_lvalue_p): Update caller.
4001         (lvalue_p): Ditto.
4002         (non_cast_lvalue_or_else): New.
4003         * tree.h: Declare it.
4004         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
4005
4006 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
4007
4008         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
4009         and COND_EXPR specially; fix error message output.
4010
4011 2002-08-22  Jason Merrill  <jason@redhat.com>
4012
4013         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
4014         * semantics.c (nullify_returns_r): Likewise.
4015
4016 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4017
4018         Fix PR/7621
4019         * typeck.c (finish_class_member_access_expr): Diagnose cases where
4020         name lookup finds nothing.
4021
4022 2002-08-15  Jason Merrill  <jason@redhat.com>
4023
4024         * semantics.c (finish_then_clause): Remove redundant assignment.
4025         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
4026         extra binding level outside the if/switch statement.
4027         (finish_while_cond, finish_for_cond): Rewrite complex condition
4028         into the loop body.
4029
4030 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
4031
4032         * parse.y (sizeof, alignof, typeof): New non-terminals to
4033         increment skip_evaluation.  Replace terminals with them and
4034         decrement skip_evaluation at the end of rules using them.
4035         * decl2.c (mark_used): Don't assemble_external if
4036         skipping evaluation.
4037
4038 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
4039
4040         Fix PR/7504
4041         * parse.y (parse_finish_call_expr): Handle incomplete
4042         type used to name a scope.
4043
4044 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
4045
4046         PR c++/7598
4047         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
4048         regression caused by my 2002-08-08 patch.
4049
4050 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
4051
4052         * decl.c (pushdecl_class_level): Honor requests to bind names to
4053         OVERLOADs.
4054
4055 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4056
4057         * decl2.c (build_call_from_tree): Fix uninitialized variable.
4058         * parse.y (parse_finish_call_expr): Likewise.
4059         * repo.c (old_args, old_dir, old_main): Const-ify.
4060
4061 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
4062
4063         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
4064         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
4065         * optimize.c (maybe_clone_body): Likewise.
4066         * pt.c (tsubst_enum): Likewise.
4067         (lookup_template_class): Likewise.
4068         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
4069
4070 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
4071
4072         * lang-specs.h: Remove -ansi.
4073
4074 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
4075
4076         * tree.c (maybe_dummy_object): Replace // with /* */
4077
4078 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
4079
4080         * call.c (standard_conversion): Use build_ptrmem_type.
4081         * cp-tree.h (build_ptrmem_type): New function.
4082         (adjust_result_of_qualified_name_lookup): Likewise.
4083         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
4084         static data members.
4085         (build_ptrmem_type): New function.
4086         (grokdeclarator): Do not use build_offset_type when encountering a
4087         qualified name.
4088         * parse.y (parse_finish_call_expr): Use
4089         adjust_result_of_qualified_name_lookup.
4090         * search.c (adjust_result_of_qualified_name_lookup): New function.
4091         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
4092         accessing OFFSET_TYPEs directly.
4093
4094 2002-08-08  Mike Stump  <mrs@apple.com>
4095
4096         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
4097         (type_decays_to): Likewise.
4098         * class.c (find_final_overrider): Likewise.
4099         (maybe_note_name_used_in_class): Likewise.
4100         * decl.c (current_tmpl_spec_kind): Likewise.
4101         (add_binding): Likewise.
4102         (push_class_binding): Likewise.
4103         (duplicate_decls): Likewise.
4104         (layout_var_decl): Likewise.
4105         (grokfndecl): Likewise.
4106         (grokdeclarator): Likewise.
4107         (check_default_argument): Likewise.
4108         * decl2.c (handle_class_head): Likewise.
4109         * error.c (dump_template_decl): Likewise.
4110         * init.c (build_offset_ref): Likewise.
4111         * pt.c (check_specialization_scope): Likewise.
4112         (determine_specialization): Likewise.
4113         (check_explicit_specialization): Likewise.
4114         (maybe_check_template_type): Likewise.
4115         (process_partial_specialization): Likewise.
4116         (check_default_tmpl_args): Likewise.
4117         (push_template_decl_real): Likewise.
4118         (convert_template_argument): Likewise.
4119         (try_class_unification): Likewise.
4120         (get_bindings_real): Likewise.
4121         (do_decl_instantiation): Likewise.
4122         * semantics.c (begin_function_definition): Likewise.
4123         (finish_member_declaration): Likewise.
4124         (check_multiple_declarators): Likewise.
4125         * typeck.c (comp_array_types): Likewise.
4126         (comptypes): Likewise.
4127         (expr_sizeof): Likewise.
4128         (build_binary_op): Likewise.
4129         (dubious_conversion_warnings): Likewise.
4130         (check_return_expr): Likewise.
4131
4132 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
4133
4134         * typeck.c (build_class_member_access_expr): Do not return
4135         error_mark_node when no error has occurred.
4136
4137 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4138
4139         * typeck.c (build_component_addr): Remove.
4140         (build_unary_op): Just check it's not a bitfield, and then build
4141         an ADDR_EXPR.
4142
4143 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4144
4145         * class.c (convert_to_base): Correct check for error_mark_node.
4146         (create_vtable_ptr): Remove unused VFUNS_P parm.
4147
4148 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4149
4150         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
4151
4152 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
4153
4154         Rework build_component_ref.
4155         * call.c (build_vfield_ref): Do not go through build_component_ref.
4156         (build_field_call): Use build_class_member_access_expr.
4157         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
4158         (build_object_call): Likewise.
4159         * class.c (convert_to_base): New function.
4160         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
4161         (instantiate_type): Handle BASELINKs.
4162         * cp-tree.def (BASELINK): New tree code.
4163         * cp-tree.h (BASELINK_P): Reimplement.
4164         (SET_BASELINK_P): Remove.
4165         (BASELINK_BINFO): Reimplement.
4166         (BASELINK_FUNCTIONS): Likewise.
4167         (BASELINK_ACCESS_BINFO): Likewise.
4168         (BASELINK_OPTYPE): Likewise.
4169         (convert_to_base): New function.
4170         (name_p): Likewise.
4171         (build_object_ref): Remove.
4172         (build_component_ref_1): Likewise.
4173         (build_component_ref): Likewise.
4174         (build_x_component_ref): Likewise.
4175         (build_class_member_access_expr): New function.
4176         (finish_class_member_access_expr): Likewise.
4177         (build_ptrmemfunc_access_expr): Likewise.
4178         * decl.c (grokdeclarator): Handle BASELINKs.
4179         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
4180         finish_class_member_access_expr.
4181         (arg_assoc): Handle BASELINKs.
4182         (do_class_using_decl): Likewise.
4183         * error.c (dump_decl): Likewise.
4184         (dump_expr): Use build_ptrmemfunc_access_expr.
4185         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
4186         destructors.
4187         (build_throw): Use BASELINK_FUNCTIONS.
4188         * init.c (perform_member_init): Use
4189         build_class_member_access_expr.
4190         (build_offset_ref): Handle BASELINKs.  Use
4191         build_class_member_access_expr.
4192         * method.c (hack_identifier): Likewise.
4193         * parse.y (do_id): Use BASELINK, not TREE_LIST.
4194         (primary): Remove uses of build_object_ref.
4195         * pt.c (lookup_template_function): Handle BASELINKs.
4196         (resolve_overloaded_unification): Likewise.
4197         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
4198         (lookup_field): Use BASELINK, not TREE_LIST.
4199         (lookup_fnfiels): Likewise.
4200         (setup_class_bindings): Likewise.
4201         * semantics.c (finish_object_call_expr): Do not use
4202         build_method_call when we already know what function is being
4203         called.
4204         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
4205         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
4206         TREE_CHAIN.
4207         (name_p): New function.
4208         * typeck.c (build_object_ref): Remove.
4209         (build_component_ref_1): Likewise.
4210         (build_x_component_ref): Likewise.
4211         (build_class_member_access_expr): New function.
4212         (finish_class_member_access_expr): Likewise.
4213         (build_ptrmemfunc_access_expr): Likewise.
4214         (get_member_function_from_ptrfunc): Use
4215         build_ptrmemfunc_access_expr.
4216         (build_binary_op): Likewise.
4217         (build_unary_op): Likewise.
4218         (build_ptrmemfunc): Likewise.
4219         (pfn_from_ptrmemfunc): Likewise.
4220         * typeck2.c (build_m_component_ref): Adjust comment.
4221
4222 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
4223
4224         * Make-lang.in (CXX_C_OBJS): Update.
4225         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
4226         * cp-tree.h (cxx_decode_option): Remove.
4227         * decl2.c (compare_options, lang_f_options, unsupported_options,
4228         cxx_decode_option): Remove.
4229
4230 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
4231
4232         * typeck.c (build_x_unary_op): Handle pointer-to-member.
4233
4234 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
4235
4236         * class.c: Don't include obstack.h.
4237         (popclass):
4238         * decl2.c: Delete bogus comment.
4239         * error.c: Don't include obstack.h.
4240         * except.c: Likewise.
4241         (dump_type): Correct comment.
4242         * method.c: Don't include obstack.h.
4243         * tree.c: Likewise.
4244
4245 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
4246
4247         Fix PR/2213
4248         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
4249         expressions to pointer-to-data-member of pointer-to-member-functions.
4250
4251 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
4252
4253         * cvt.c (ocp_convert): Delete obsolete code.
4254         * parse.y (permanent_obstack): Delete declaration.
4255         * pt.c (permanent_obstack): Delete declaration.
4256         * repo.c (permanent_obstack): Delete declaration.
4257         (open_repo_file): Use xmalloc instead of permanent_obstack.
4258         (init_repo): Use xstrdup instead of permanent_obstack.
4259
4260 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
4261
4262         * cp-tree.h (VF_DERIVED_VALUE): Remove.
4263         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
4264
4265 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
4266
4267         PR 7470.
4268         C++ ABI change - vfunc ordering.
4269         * class.c (add_virtual_function): Remove.
4270         (dfs_modify_all_vtables): Take list of all declared
4271         virtuals. Assign all that are not in primary base.
4272         (check_for_override): Adjust comments.
4273         (create_vtable_ptr): Take single list of virtuals. Build chain
4274         of declared virtuals here.
4275         (layout_class_type): Take single list of virtuals. Adjust.
4276         (finish_struct_1): Keep virtuals on single list. Adjust.
4277
4278 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
4279
4280         * init.c (build_member_call): Use build_new_method_call, not
4281         build_method_call.
4282
4283 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
4284
4285         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
4286
4287 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
4288
4289         * call.c (build_method_call): Issue a more helpful error message
4290         about ambiguous method names.
4291
4292 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
4293
4294         * tree.c (build_shared_int_cst): Make cache file scope, and
4295         GTY it.
4296
4297 2002-08-02  Jason Merrill  <jason@redhat.com>
4298
4299         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
4300         (cp_expr_size): New fn.
4301         * call.c (build_over_call): Lose empty class hackery.
4302         (convert_arg_to_ellipsis): Promote non-POD warning to error.
4303         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
4304
4305         * semantics.c (expand_body): Do tree optimization in the function
4306         context, too.
4307
4308 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
4309
4310         * cp-tree.h: Move all warning and flag declarations to c-common.h.
4311         * decl.c: Move all warning and flag variables to c-common.c.
4312         * decl2.c: Move all warning and flag variables to c-common.c.
4313         * lex.c (flag_digraphs): Remove.
4314         (warn_traditional): Now in c-common.c.
4315
4316 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
4317
4318         * call.c (build_field_call): Do not look up the field by name.
4319         (build_method_call): Simplify.
4320         (struct z_candidate): Add access_path and conversion_path.  Remove
4321         basetype_path.
4322         (convert_class_to_reference): Adjust use of
4323         add_function_candidate.
4324         (add_candidate): Add conversion_path argument.
4325         (add_function_candidate): Use it.
4326         (add_conv_dndidate): Likewise.
4327         (build_builtin_candidate): Likewise.
4328         (add_template_candidate_real): Add conversion_path argument.
4329         (add_template_conv_candidate): Likewise.
4330         (add_template_candidate): Likewise.
4331         (build_user_type_conversion_1): Use it.
4332         (build_new_function_call): Remove name lookup code.  Adjust use of
4333         add_template_candidate and add_function_candidate.
4334         (build_new_op): Likewise.
4335         (convert_like_real): Use build_special_member_call.
4336         (build_over_call): Use cand->conversion_path.
4337         (build_special_member_call): New method.
4338         (build_new_method_call): Remove name lookup code.
4339         * cp-tree.def (OFFSET_REF): Update documentation.
4340         (TEMPLATE_ID_EXPR): Likewise.
4341         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
4342         (BASELINK_OPTYPE): Likewise.
4343         (build_new_method_call): Adjust prototype.
4344         (build_special_member_call): New method.
4345         (build_baselink): New method.
4346         (build_offset_ref_call_from_tree): Likewise.
4347         (build_call_from_tree): Likewise.
4348         (finish_qualified_call_expr): Remove.
4349         (finish_call_expr): Adjust prototype.
4350         (build_x_function_call): Remove.
4351         * cvt.c (ocp_convert): Use build_special_member_call.
4352         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
4353         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
4354         CALL_EXPR.
4355         (build_offset_ref_call_from_tree): New function.
4356         (build_call_from_tree): Likewise.
4357         * init.c (expand_cleanup): Use build_special_member_call.
4358         (expand_default_init): Likewise.
4359         (build_member_call): Use finish_call_expr.
4360         (build_new_1): Use build_special_member_call.
4361         (push_base_cleanups): Likewise.
4362         * method.c (do_build_assign_ref): Likewise.
4363         * parse.y (template_id): Do not pass a COMPONENT_REF to
4364         lookup_template_function.
4365         (primary): Use parse_finish_call_epxr, not finish_call_expr.
4366         (parse_finish_call_expr): New function.
4367         * pt.c (lookup_template_function): Add assertions.
4368         * search.c (lookup_base): Allow T to be a binfo.
4369         (build_baselink): New function.
4370         (lookup_member): Use it.
4371         * semantics.c (finish_call_expr): Do not do name lookup.
4372         (finish_object_call_expr): Remove #if 0'd code.
4373         (finish_qualified_call_expr): Remove.
4374         * typeck.c (build_x_function_call): Remove.
4375         (build_static_case): Use build_special_member_call.
4376         * typeck2.c (build_functional_cast): Likewise.
4377
4378 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
4379
4380         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
4381
4382 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
4383
4384         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
4385
4386 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
4387
4388         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
4389         documentation.
4390
4391 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
4392
4393         * cp-tree.h: Comment typo fix.
4394
4395 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
4396
4397         * spew.c (space_for_token): Allocate zeroed memory for a new token
4398         chunk.
4399
4400 2002-07-27  Roger Sayle  <roger@eyesopen.com>
4401
4402         * decl.c (builtin_function_1): No need to explicitly mark
4403         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
4404
4405 2002-07-27  Roger Sayle  <roger@eyesopen.com>
4406
4407         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
4408
4409 2002-07-26  Jason Merrill  <jason@redhat.com>
4410
4411         * call.c (build_over_call): Likewise.
4412         (cp_convert_parm_for_inlining): New fn.
4413         (convert_for_arg_passing): New fn.
4414         (convert_default_arg, build_over_call): Use it.
4415         (type_passed_as): New fn.
4416         * pt.c (tsubst_decl): Use it.
4417         * decl2.c (cp_build_parm_decl): New fn.
4418         (build_artificial_parm): Use it.
4419         (start_static_storage_duration_function): Likewise.
4420         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
4421         (grokparms): Don't mess with DECL_ARG_TYPE.
4422         * typeck.c (convert_arguments): Use convert_for_arg_passing.
4423         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
4424         Define.
4425         * cp-tree.h: Declare new fns.
4426
4427 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
4428
4429         * cp-tree.h (flag_operator_names): Remove.
4430         * decl2.c (flag_operator_names): Remove.
4431         (lang_f_options): Remove operator-names.
4432         * lex.c (D_OPNAME): Remove.
4433         (reswords): Remove operator names.
4434         (rid_to_yy): Remove operator names.
4435         (init_reswords): No need to handle D_OPNAME.
4436         * spew.c (read_process_identifier): There are no operator
4437         names.
4438
4439 2002-07-26  Jason Merrill  <jason@redhat.com>
4440
4441         * dump.c (cp_dump_tree): Call c_dump_tree.
4442         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
4443
4444 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
4445
4446         * error.c (print_whitespace): Remove.
4447         * g++spec.c (LIBUNWIND): Move.
4448         * mangle.c (mangled_position, write_signed_number): Remove.
4449
4450 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
4451
4452         * decl2.c (cxx_decode_option): Similarly.
4453
4454 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
4455
4456         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
4457         (cxx_sizeof_or_alignof_type): Take a third argument.
4458         (cxx_sizeof): Adjust definition.
4459         (cxx_alignof): Likewise.
4460         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
4461         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
4462         complaining.
4463         (c_sizeof_nowarn): Remove definition.
4464         (build_unary_op): Use cxx_sizeof_nowarn.
4465
4466 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
4467
4468         * tree.c (cp_build_qualified_type_real): When copying
4469         pointer-to-method types, unshare the record that holds
4470         the cached pointer-to-member-function type.
4471
4472 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
4473
4474         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
4475
4476 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
4477
4478         Fix PR/7363:
4479         * typeck.c (cxx_sizeof_or_alignof_type): New function.
4480         (c_sizeof): Remove definition.
4481         (expr_sizeof): Use cxx_sizeof.
4482         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
4483         * decl.c (finish_destructor_body): Use cxx_sizeof.
4484         * semantics.c (finish_alignof): Likewise.
4485         (finish_alignof): Use cxx_alignof.
4486         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
4487         (cxx_sizeof_or_alignof_type): Declare.
4488         (my_friendly_assert): Move to ../c-common.h.
4489
4490 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
4491
4492         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
4493
4494 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4495
4496         PR c++/7347, c++/7348
4497         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
4498         * decl.c (make_typename_type): Use it.
4499         (make_unbound_class_template): Likewise.
4500         (lookup_name_real): Don't call type_access_control if scope is
4501         template parameter dependent.
4502         * parse.y (template_arg): Call make_unbound_class_template with
4503         tf_parsing set.
4504         (nest_name_specifier): Call make_typename_type with tf_parsing set.
4505         (typename_sub0): Likewise.
4506         (typename_sub1): Likewise.
4507         (instantiate_decl): Push class scope.
4508         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
4509         for both static variable and member function template.
4510         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
4511         and arguments.
4512         * search.c (type_access_control): Do type access for TEMPLATE_DECL
4513         too.
4514
4515 2002-07-20  Roger Sayle  <roger@eyesopen.com>
4516
4517         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
4518         test by using positive_option.  Make whitespace consistent.
4519
4520 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
4521
4522         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
4523         members with 'locus'.  Adjust use throughout.
4524         (struct feed):  Likewise.
4525         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
4526         Adjust use.
4527         (snarf_defarg): Use error(), not error_with_file_and_line().
4528
4529 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
4530
4531         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
4532         cpp_options is included.
4533
4534 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4535
4536         PR c++/2862, c++/2863
4537         * pt.c (determine_specialization): Compare the length of
4538         TYPE_ARG_TYPES.  Tidy.
4539
4540 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4541
4542         PR c++/3797
4543         * decl.c (duplicate_decls): Don't propagate inlining parameters from
4544         olddecl to newdecl when newdecl is a specialization of the
4545         instantiation olddecl.
4546
4547 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4548
4549         PR c++/4802, c++/5387
4550         * decl.c (make_typename_type): Use enforce_access.
4551
4552 2002-07-17  Scott Snyder <snyder@fnal.gov>
4553
4554         PR c++/7320
4555         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
4556
4557 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
4558
4559         * class.c (add_method): Correct handling of conversion operators.
4560
4561 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
4562
4563         PR c++/7224
4564         * class.c (add_method): Simplify.
4565
4566 2002-07-11  Jason Merrill  <jason@redhat.com>
4567
4568         PR c++/7279
4569         * tree.c (cp_copy_res_decl_for_inlining): Also copy
4570         TREE_ADDRESSABLE.
4571
4572 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
4573
4574         * pt.c (template_parm_this_level_p, push_template_decl_real):
4575         Pass depth as int pointer.
4576
4577 2002-07-11  Tim Josling  <tej@melbpc.org.au>
4578
4579         Remove front end hard coding from gengtype.c.
4580
4581         * config-lang.in (gtfiles): Add files needed for this front end.
4582
4583 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
4584
4585         * cp-tree.h (unqualified_name_lookup_error): Declare it.
4586         (begin_function_definition): Adjust prototype.
4587         * lex.c (unqualified_name_lookup_error): New function, split out
4588         from ...
4589         (do_identifier): ... here.
4590         * parse.y (parse_begin_function_definition): New function.
4591         (fn.def1): Use it.
4592         * semantics.c (begin_function_definition): Accept decl-specifiers
4593         and attributes as separate parameters.
4594
4595 2002-07-10  Jason Merrill  <jason@redhat.com>
4596
4597         PR c++/6255
4598         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
4599         modifying the old one.
4600
4601 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
4602
4603         * cp-tree.h (constructor_name_p): Declare it.
4604         (check_template_template_default_arg): Likewise.
4605         * class.c (handle_using_decl): Use constructor_name_p.
4606         * decl.c (grokdeclarator): Likewise.
4607         * decl2.c (constructor_name_p): Define it.
4608         * init.c (build_member_call): Use constructor_name_p.
4609         * parse.y (template_parm): Use check_template_template_default_arg.
4610         * pt.c (check_explicit_specialization): Use constructor_name_p.
4611         * semantics.c (check_template_template_default_arg): New function.
4612
4613 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4614
4615         * pt.c (can_complete_type_without_circularity): Add static to
4616         function definition.
4617
4618 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
4619
4620         * cp-tree.h (have_extern_spec): Declare it
4621         * decl.c (have_extern_spec): Define it.
4622         (start_decl): Eliminate use of used_extern_spec.
4623         (start_function): Likewise.
4624         * parse.y (have_extern_spec): Remove declaration.
4625         (used_extern_spec): Likewise.
4626         (frob_specs): Eliminate use of used_extern_spec.
4627         (.hush_warning): Likewise.
4628
4629 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
4630
4631         * Make-lang.in (cp/parse.o): Depend on decl.h.
4632         * cp-tree.h (do_decl_instantiation): Change prototype.
4633         * parse.y: Include decl.h.
4634         (parse_decl_instantiation): New function.
4635         (explicit_instantiation): Use it.
4636         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
4637         and DECLSPECS.
4638
4639 2002-07-07  Roger Sayle  <roger@eyesopen.com>
4640
4641         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
4642         constructor and destructor tests when passed a TEMPLATE_DECL.
4643
4644 2002-07-05  Jason Merrill  <jason@redhat.com>
4645
4646         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
4647         pointers.
4648
4649         PR optimization/7145
4650         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
4651
4652 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
4653
4654         Repair damage on weak-impared targets caused by my previous patch.
4655         * cp-tree.h (import_export_tinfo): Add parameter.
4656         * decl2.c (import_export_tinfo): Add parameter, post adjust
4657         DECL_COMDAT.
4658         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
4659         import_export_tinfo.
4660
4661 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4662
4663         PR c++/6944
4664         * init.c (build_aggr_init): Remove qualifiers of init before calling
4665         build_vec_init.
4666         (build_vec_init): Flatten multi-dimensional array during cleanup.
4667         (build_vec_delete_1): Abort if the type of each element is array.
4668
4669 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
4670
4671         * pt.c (instantiate_class_template): Fix typo.
4672
4673 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4674
4675         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
4676         by CVS conflict in my last patch.
4677
4678 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4679
4680         PR c++/6716
4681         * pt.c (can_complete_type_without_circularity): New function.
4682         (instantiate_class_template): Use it.
4683         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
4684         message due to incomplete fields.
4685
4686 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
4687
4688         PR c++/7112
4689         * mangle.c (write_expression): Add mangling for sizeof when
4690         applied to a type.
4691         * operators.def: Remove stale comment.
4692
4693 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
4694
4695         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
4696         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
4697         (tinfo_decl_type): Replace with ...
4698         (type_info_ptr_type): ... this.
4699         (import_export_tinfo): Declare.
4700         (tinfo_decl_p): Rename to ...
4701         (unemitted_tinfo_decl_p): ... this.
4702         * decl2.c (import_export_decl): Break out tinfo handling into ...
4703         (import_export_tinfo): ... here. New function.
4704         (finish_file): Adjust.
4705         * rtti.c (TINFO_REAL_NAME): New macro.
4706         (init_rtti_processing): Create the tinfo types.
4707         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
4708         (get_tinfo_decl): Adjust.
4709         (get_tinfo_ptr): New function.
4710         (get_type_id): Use it.
4711         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
4712         (ptr_initializer): Use get_tinfo_ptr.
4713         (ptm_initializer): Likewise.
4714         (synthesize_tinfo_var): Break into ...
4715         (get_pseudo_ti_init): ... this. Just create the initializer.
4716         (get_pseudo_ti_desc): .. and this.
4717         (create_real_tinfo_var): Remove.
4718         (create_pseudo_type_info): Don't create the vtable decl here.
4719         (get_vmi_pseudo_type_info): Remove.
4720         (create_tinfo_types): Adjust.
4721         (tinfo_decl_p): Rename to ...
4722         (unemitted_tinfo_decl_p): ... here. Adjust.
4723         (emit_tinfo_decl): Adjust. Create the initializer.
4724
4725 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
4726
4727         PR c++/6695
4728         * pt.c (tsubst_friend_class): Substitute into the context of the
4729         friend before using it.
4730
4731 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
4732
4733         * cp-tree.h (xref_tag): Change prototype.
4734         (handle_class_head): Likewise.
4735         (build_x_component_ref): Likewise.
4736         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
4737         (xref_tag): Take attributes as a separate parameter.
4738         (xref_tag_from_type): Adjust call to xref_tag.
4739         * decl2.c (build_expr_from_tree): Adjust call to
4740         build_x_component_ref.
4741         (handle_class_head): Take attributes as a separate parameter.
4742         * parse.y (parse_xref_tag): New function.
4743         (parse_handle_class_head): Likewise.
4744         (primary): Use parse_xref_tag.
4745         (class_head_decl): Use parse_handle_class_head.
4746         (class_head_defn): Likewise.
4747         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
4748         (build_dynamic_cast_1): Likewise.
4749         (create_pseudo_type_info): Likewise.
4750         (emit_support_tinfos): Likewise.
4751         * typeck.c (build_object_ref): Adjust call to
4752         build_x_component_ref.
4753         (build_x_component_ref): Remove protect parameter.
4754
4755 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
4756
4757         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
4758         * class.c (handle_using_decl): Likewise.
4759         (instantiate_type): Likewise.
4760         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
4761         (xref_basetypes): Change prototype.
4762         (begin_mem_initializers): New function.
4763         (get_overloaded_fn): Likewise.
4764         * decl.c (xref_basetypes): Simplify.
4765         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
4766         * init.c (build_offset_ref): Likewise.
4767         * parse.y (base_init): Use begin_mem_initializers().
4768         (structsp): Adjust call to xref_basetypes.
4769         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
4770         (instantiate_class_template): Adjust call to xref_basetypes.
4771         * semantics.c (begin_mem_initializers): New function.
4772         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
4773         (really_overlaoded_fn): Likewise.
4774         (get_overloaded_fn): New function.'
4775         (get_first_fn): USe BASELINK_FUNCTIONS.
4776
4777 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
4778
4779         * cp-tree.h (SCALAR_TYPE_P): New macro.
4780         (check_for_out_of_scope_variable): New function.
4781         (at_class_scope_p): Likewise.
4782         (finish_fname): Likewise.
4783         * class.c (finish_struct): Use at_function_scope_p.
4784         * decl.c (check_for_out_of_scope_variable): New function, split
4785         out from do_identifier.
4786         (finish_enum): Use at_function_scope_p.
4787         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
4788         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
4789         (primary): Use at_function_scope_p.
4790         * search.c (at_class_scope_p): New function.
4791         * semantics.c (finish_fname): Likewise.
4792         (check_multiple_declarators): Use at_function_scope_p.
4793
4794 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
4795
4796         * parse.y (parse_scoped_id): New function.
4797         (primary): Use it.
4798         * cp-tree.h (do_scoped_id): Adjust declaration.
4799         * lex.c (do_scoped_id): Remove call to yylex.
4800         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
4801         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
4802         expanding it inline.
4803
4804 2002-06-23  Matt Thomas  <matt@3am-software.com>
4805
4806         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
4807         "#if VMS_TARGET".
4808
4809 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4810
4811         * mangle.c (integer_type_codes): Const-ify.
4812
4813 2002-06-20  Richard Henderson  <rth@redhat.com>
4814
4815         PR c++/6747
4816         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
4817         Call put_var_into_stack.
4818
4819 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4820
4821         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
4822         array size calculation.
4823
4824 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4825
4826         PR c++/6892
4827         * pt.c (tsubst_expr): Handle FILE_STMT.
4828
4829 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4830
4831         PR c++/6723
4832         * pt.c (lookup_template_class): Don't build complete argument of
4833         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
4834         argument.
4835
4836 2002-06-19  Akim Demaille  <akim@epita.fr>
4837
4838         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
4839         decl.h's TYPENAME.
4840         * spew.c, lex.c: Adjust.
4841         * parse.y (explicit_instantiation): Add empty action to override
4842         the default $$ = $1 where it introduces a type clash.
4843
4844 2002-06-14  Jason Merrill  <jason@redhat.com>
4845
4846         * semantics.c (begin_for_stmt): Push the 'for' scope before
4847         adding the FOR_STMT.
4848
4849         C++ ABI changes.
4850         * class.c (build_base_field): Set DECL_PACKED.
4851         (layout_class_type): Don't use tail padding of PODs.
4852         * mangle.c (write_unqualified_name): Fix template conversion op
4853         mangling.
4854
4855 2002-06-16  Richard Henderson  <rth@redhat.com>
4856
4857         PR opt/6793
4858         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
4859         after template instantiation.
4860
4861 2002-06-16  Richard Henderson  <rth@redhat.com>
4862
4863         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
4864
4865 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
4866
4867         * cp-tree.h (compiler_error): Remove declaration.
4868         * lex.c (compiler_error): Remove definition.
4869
4870 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
4871
4872         * g++spec.c (LIBUNWIND): New.
4873         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
4874
4875 2002-06-13  Jessica Han  <jessica@cup.hp.com>
4876
4877         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
4878         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
4879         (build_vbase_offset_vtbl_entries): Likewise.
4880         * rtti.c (build_headof): Likewise.
4881         (get_tinfo_decl_dynamic): Likewise.
4882         (create_pseudo_type_info): Likewise.
4883
4884 2002-06-12  Stan Shebs  <shebs@apple.com>
4885
4886         * mpw-config.in: Remove file, no longer used.
4887         * mpw-make.sed: Ditto.
4888
4889 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
4890
4891         * decl2.c: Update call to cpp_handle_option.
4892
4893 2002-06-07  H.J. Lu  (hjl@gnu.org)
4894
4895         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
4896
4897 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
4898
4899         * error.c (cp_error_at): Fix typo.
4900
4901 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
4902
4903         * error.c (cp_diagnostic_starter): Adjust call.
4904         (maybe_print_instantiation_context): Change prototype to take a
4905         'diagnostic_info *'.
4906         (print_instantiation_full_context): Likewise.
4907         (print_instantiation_partial_context): Likewise.
4908         (cp_diagnostic_starter): Likewise.
4909         (cp_diagnostic_finalizer): Likewise.
4910         (cp_print_error_function): Likewise.
4911         (cp_printer): Take a secondary parameter as a 'text_info *'.
4912         Remove output_state savings.  Adjust calls.
4913
4914 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
4915
4916         * pt.c (inline_parm_levels): Mark for GC.
4917
4918         * mangle.c (start_mangling): Allocate G.substitutions here...
4919         (init_mangle): ... rather than here.
4920         (finish_mangling): Clear the varray pointer when done with it.
4921         * spew.c (yylexstring): Don't use VARRAY_FREE.
4922         * search.c (bfs_walk): Don't use VARRAY_FREE.
4923         * decl2.c (pending_statics): Use gengtype to mark.
4924         (deferred_fns): Likewise.
4925         (ssdf_decls): Likewise.
4926         (init_decl2): Delete.
4927         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
4928         (cxx_init_decl_processing): Don't call init_decl2.
4929         (cxx_pop_function_context): Don't use VARRAY_FREE.
4930         * cp-tree.h (struct saved_scope): No need for special marking
4931         of varrays.
4932         (struct language_function): Likewise.
4933         (local_classes): Use gengtype to mark.
4934         (init_decl2): Delete prototype.
4935         * class.c (init_class_processing): Don't use
4936         ggc_add_tree_varray_root.
4937         (build_vtbl_initializer): Don't use VARRAY_FREE.
4938
4939         * decl.c (typename_compare): Don't use same_type_p.
4940
4941         * decl.c: Include hashtab.h instead of hash.h.
4942         (typename_hash): Update to use htab_h.
4943         (typename_compare): Likewise.
4944         (typename_htab): Use gengtype to mark.
4945         (build_typename_type): Update to use htab_h.
4946         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
4947
4948         * Make-lang.in (gt-cp-tree.h): New rule.
4949         (cp/tree.o): Depend on gt-cp-tree.h.
4950         * config-lang.in (gtfiles): Add cp/tree.c.
4951         * tree.c: Include gt-cp-tree.h.
4952         (list_hash_table): Use gengtype to mark.
4953         (init_tree): Use gengtype to mark trees.
4954
4955         * Make-lang.in (cp/decl.o): Add debug.h dependency.
4956         * call.c (struct z_candidate): Use gengtype.
4957         (USER_CONV_CAND): Use WRAPPER_ZC.
4958         (convert_class_to_reference): Use build_zc_wrapper.
4959         (build_type_conversion_1): Likewise.
4960         (build_over_call): Use WRAPPER_ZC.
4961         (add_warning): Use build_zc_wrapper.
4962         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
4963         * cp-tree.h (struct lang_identifier): Use gengtype.
4964         (struct template_parm_index_s): Likewise.
4965         (struct ptrmem_cst): Likewise.
4966         (struct tree_binding): Likewise.
4967         (struct tree_overload): Likewise.
4968         (struct tree_srcloc): Likewise.
4969         (struct tree_wrapper): Likewise.  Also modify to have a pointer
4970         to struct z_candidate rather than void.
4971         (enum cp_tree_node_structure_enum): New.
4972         (union lang_tree_node): New.
4973         (cxx_mark_tree): Delete prototype.
4974         (cp_tree_node_structure): New prototype.
4975         (build_ptr_wrapper): Delete prototype.
4976         (build_int_wrapper): Delete prototype.
4977         (build_zc_wrapper): New prototype.
4978         * decl.c: Include debug.h
4979         (cxx_mark_tree): Delete.
4980         (cp_tree_node_structure): New.
4981         * tree.c (build_ptr_wrapper): Delete.
4982         (build_int_wrapper): Delete.
4983         (build_zc_wrapper): New.
4984
4985         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
4986         Correct typo.  Patch from k_fukui@highway.ne.jp.
4987
4988         * semantics.c (current_stmt_tree): Update for change to
4989         struct language_function.
4990         (finish_mem_initializers): Likewise.
4991         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
4992         * cp-tree.h (struct language_function): Rename from
4993         cp_language_function.  Change all uses.
4994         (cp_function_chain): Don't need to cast.
4995
4996         * class.c (duplicate_tag_error): Reset discriminator.
4997         (check_bases_and_members): Update for data structure changes.
4998         * cp-tree.h (struct lang_id2): Use gengtype.
4999         (flagged_type_tree): Likewise.
5000         (SET_LANG_ID): Use GGC on struct lang_id2.
5001         (struct cp_language_function): Use gengtype.  Remove field
5002         'x_vcalls_possible_p'.
5003         (current_vcalls_possible_p): Delete.
5004         (struct lang_type_header): New.
5005         (struct lang_type_class): Rename from struct lang_type.  Include
5006         struct lang_type_header.
5007         (struct lang_type_ptrmem): New.
5008         (struct lang_type): New.
5009         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
5010         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
5011         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
5012         (struct lang_decl_flags): Use gengtype.  Add discriminators.
5013         (struct lang_decl): Use gengtype.  Add and use discriminators.
5014         Update the macros that reference moved fields.
5015         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
5016         (SET_DECL_THUNK_P): Set discriminator too.
5017         (clear_inline_text_obstack): Delete prototype.
5018         (finish_inline_definitions): Delete prototype.
5019         (mark_pending_inlines): Delete prototype.
5020         (lang_check_failed): New prototype.
5021         * decl.c (struct named_label_use_list): Use gengtype.
5022         (struct named_label_list): Likewise.
5023         (mark_binding_level): Delete.
5024         (mark_named_label_lists): Delete.
5025         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
5026         (cxx_init_decl_processing): Use generated marker routine.
5027         (begin_destructor_body): Delete dead set to
5028         current_vcalls_possible_p.
5029         (mark_lang_function): Delete.
5030         (mark_cp_function_context): Delete.
5031         (lang_mark_tree): Use generated marker routines.
5032         * decl2.c (start_objects): Set discriminator when setting
5033         GLOBAL_INIT_PRIORITY.
5034         * lex.c (retrofit_lang_decl): Set discriminators.
5035         (copy_lang_type): Update for changes to lang_type structure.
5036         (cp_make_lang_type): Set discriminator.
5037         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
5038         * search.c: Include ggc.h.
5039         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
5040         (finish_inline_definitions): Delete.
5041         * spew.c (struct token): Use gengtype.
5042         (struct token_chunk): New.
5043         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
5044         (struct feed): Use gengtype.
5045         (feed_obstack): Delete.
5046         (feed): Mark as GC root.
5047         (pending_inlines): Mark as GC root.
5048         (pending_inlines_tail): Likewise.
5049         (processing_these_inlines): Likewise.
5050         (token_obstack): Make static.
5051         (first_token): Likewise.
5052         (init_spew): Don't initialize deleted things; use gengtype for roots.
5053         (clear_inline_text_obstack): Delete.
5054         (feed_input): Use GC for struct feed.  Update for changes to
5055         struct unparsed_text.
5056         (mark_pending_inlines): Delete.
5057         (next_token): Rename from add_token.  Change all callers.  Update
5058         for changes to struct unparsed_text.
5059         (space_for_token): New.
5060         (remove_last_token): New.
5061         (alloc_unparsed_text): New.
5062         (snarf_block): Take an unparsed_text.  Update for changes to struct
5063         unparsed_text.
5064         (snarf_method): Update for changes to struct unparsed_text.
5065         (snarf_defarg): Update for changes to struct unparsed_text.
5066         * tree.c (lang_check_failed): New.
5067
5068         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
5069         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
5070         (cp/spew.o): Add dependency on gt-<filename>.h.
5071         (cp/decl2.o): Add dependency on gt-<filename>.h.
5072         (cp/call.o): Add dependency on gt-<filename>.h.
5073         (cp/pt.o): Add dependency on gt-<filename>.h.
5074         (cp/repo.o): Add dependency on gt-<filename>.h.
5075         (cp/parse.o): Add dependency on gt-<filename>.h.
5076         * call.c: Use gengtype for roots.
5077         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
5078         decl2.c parse.y pt.c repo.c spew.c.
5079         * cp-tree.h: Use gengtype for roots.
5080         (struct saved_scope): Use GGC, gengtype.
5081         (cp_parse_init): Delete prototype.
5082         (init_pt): Delete prototype.
5083         * decl.c: Use gengtype for roots.
5084         (mark_saved_scope): Delete.
5085         (cxx_init_decl_processing): Don't call deleted initilisation
5086         routines.
5087         (signed_size_zero_node): Delete, unused.
5088         * decl.h: Use gengtype for roots.
5089         * decl2.c: Use gengtype for roots.
5090         * lex.h: Use gengtype for roots.
5091         * parse.y: Use gengtype for roots.
5092         (cp_parse_init): Delete.
5093         * pt.c: Use gengtype for roots.
5094         (init_pt): Delete.
5095         * repo.c: Use gengtype for roots.
5096         * spew.c: Use gengtype for roots.
5097
5098         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
5099         (cp/decl.o): Add dependency on gtype-cp.h.
5100         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
5101         Include gtype-cp.h.  Allow for filename changes.
5102
5103         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
5104         (cp/decl.o): Add cp/gt-decl.h dependency.
5105         * config-lang.in (gtfiles): New.
5106         * tree.h: Rename struct binding_level to struct cp_binding_level.
5107         * decl.c: Rename struct binding_level to struct cp_binding_level.
5108         Include cp/gt-decl.h.
5109         (struct cp_binding_level): Use gengtype.
5110         (make_binding_level): Use GGC on struct cp_binding_level.
5111         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
5112         (cxx_init_decl_processing): Mark free_binding_level as
5113         deletable.
5114
5115         * decl.c (mark_cp_function_context): Update calling sequence.
5116
5117         * decl.c (start_function): Don't free 'struct
5118         cp_language_function'.
5119         (pop_cp_function_context): Likewise.
5120         (save_function_data): Allocate it using GC.
5121         * semantics.c (genrtl_start_function): Don't free 'struct
5122         cp_language_function'.
5123
5124 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
5125
5126         * lang-specs.h: Use cpp_debug_options.
5127
5128 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
5129
5130         * mangle.c, tree.c: Include real.h.
5131         * Make-lang.in: Update dependency lists.
5132
5133 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5134
5135         * lex.c: Don't include c-lex.h.
5136         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
5137
5138 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
5139
5140         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
5141
5142 2002-05-22  Richard Henderson  <rth@redhat.com>
5143
5144         * decl.c (obscure_complex_init): Check for VAR_DECL
5145         before using DECL_THREAD_LOCAL.
5146
5147 2002-05-22  Richard Henderson  <rth@redhat.com>
5148
5149         * decl.c (check_tag_decl): Handle RID_THREAD.
5150         (obscure_complex_init): Reject run-time init of tls.
5151         (grokvardecl, grokdeclarator): Handle RID_THREAD.
5152         * lex.c (reswords): Add __thread.
5153         (rid_to_yy): Map RID_THREAD to SCSPEC.
5154
5155 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
5156
5157         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
5158         * cp-tree.h (cxx_post_options): Kill.
5159         * cp-lex.c (cxx_post_options): Kill.
5160
5161 2002-05-21  Richard Henderson  <rth@redhat.com>
5162
5163         * lex.c (rid_to_yy): Add RID_THREAD.
5164
5165 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
5166
5167         * init.c (build_vec_init): Test for trivial copy-assignment when
5168         copy-assigning arrays.
5169
5170 2002-05-20  Andreas Jaeger  <aj@suse.de>
5171
5172         * init.c (build_default_init): Remove unused variable.
5173
5174 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
5175
5176         * call.c (any_strictly_viable): New.
5177         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
5178
5179 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5180
5181         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
5182
5183 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5184
5185         PR c++/186, DR 259
5186         * pt.c (do_decl_instantiation): Don't complain explicit
5187         instantiation after explicit specialization.
5188         (do_type_instantiation): Likewise.
5189
5190 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
5191
5192         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
5193         renamed from...
5194         (complete_type_or_else): ... this.  Redefined as macro.
5195         (cxx_incomplete_type_diagnostic): Declare.
5196         (cxx_incomplete_type_error): Define as macro.
5197         * init.c (build_delete): Warn about incomplete types other than
5198         void, and use the built-in operator delete for them.
5199         * typeck.c (complete_type_or_diagnostic): Renamed from
5200         complete_type_or_else.  Added warn_only argument, passed to...
5201         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
5202         warnings or errors depending on new warn_only argument.  Renamed
5203         from...
5204         (cxx_incomplete_type_error): ... this.  New implementation in
5205         terms of cxx_incomplete_type_diagnostic.
5206
5207 2002-05-18  Jason Merrill  <jason@redhat.com>
5208
5209         PR c++/6611
5210         * decl2.c (import_export_decl): If we clear
5211         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
5212
5213 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5214
5215         PR c++/6620
5216         * pt.c (verify_class_unification): Don't check if PARM is template
5217         parameter dependent.  Simplify.
5218         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
5219         parameter dependent expression.
5220
5221 2002-05-14  Jason Merrill  <jason@redhat.com>
5222
5223         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
5224         Do set DECL_COMDAT.
5225         (synthesize_tinfo_var): Take the public decl.
5226         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
5227         (emit_tinfo_decl): Adjust.  Call import_export_decl.
5228         * decl2.c (import_export_decl): Simplify tinfo decl handling.
5229
5230 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
5231
5232         * cp-tree.h (struct lang_type): Added non_zero_init.
5233         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
5234         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
5235         * class.c (check_field_decls): Test non_zero_init.
5236         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
5237         zero-to-NULL conversions.
5238         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
5239         type that needs zero-initialization without zeros.
5240         (check_initializer_decl): Compute zero-initializer for types
5241         that require a non-trivial one.
5242         * init.c (build_forced_zero_init): New function.
5243         (build_default_init): Use it.
5244         * tree.c (zero_init_p): New function.
5245         * typeck2.c (force_store_init_value): New function.
5246         (process_init_constructor): Create non-trivial zero-initializers
5247         for array members and class fields.
5248
5249 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
5250
5251         * lang-specs.h: Remove redundant -lang-c++.
5252
5253 2002-05-13  Jason Merrill  <jason@redhat.com>
5254
5255         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
5256         (fixed_type_or_null): See through reference vars.
5257         (build_base_path): Vtable contents are constant.
5258         * typeck.c (get_member_function_from_ptrfunc): Likewise.
5259
5260 2002-05-12  Jason Merrill  <jason@redhat.com>
5261
5262         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
5263         structs are safe.
5264
5265 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
5266
5267         * cp-tree.h (flag_ansi): Remove.
5268         * decl2.c (flag_ansi): Remove.
5269         (cxx_decode_option): Set flag_iso and flag_undef.
5270
5271 2002-05-09  Jason Merrill  <jason@redhat.com>
5272
5273         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
5274         Use subtraction rather than a bitmask to get the index.
5275         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
5276
5277         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
5278
5279 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
5280
5281         * Make-lang.in (decl2.o): Update.
5282         * cp-tree.h (warn_multichar): Remove.
5283         * decl2.c: Include c-common.h.
5284         (warn_multichar): Remove.
5285
5286 2002-05-03  Jason Merrill  <jason@redhat.com>
5287
5288         * tree.c (build_cplus_array_type): Only const and volatile get
5289         special handling.
5290
5291         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
5292
5293 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
5294
5295         ABI change, returning simple classes from functions.
5296         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
5297         TYPE_HAS_TRIVIAL_INIT_REF is false or
5298         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
5299
5300 2002-04-30  Jason Merrill  <jason@redhat.com>
5301
5302         PR debug/6436
5303         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
5304         anonymous class with a typedef if there are attributes.
5305
5306 2002-04-29  Paul Eggert  <eggert@twinsun.com>
5307
5308         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
5309
5310 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
5311
5312         PR c++/6477
5313         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
5314         non-NULL first.
5315
5316 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
5317
5318         PR c++/6492
5319         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
5320         enter that scope before name lookup.
5321
5322         PR c++/6486
5323         * method.c (do_build_copy_constructor): Avoid building
5324         cv-qualified reference types.
5325
5326 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
5327
5328         PR c++/5719
5329         * decl.c (grok_op_properties): Assignment ops don't have to return
5330         by value. operator% should.
5331
5332 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
5333
5334         PR c/6343
5335         * decl.c (duplicate_decls): Call merge_weak.
5336
5337 2002-04-26  Richard Henderson  <rth@redhat.com>
5338
5339         * parse.y (malloced_yyss, malloced_yyvs): New.
5340         (yyoverflow): Re-add.  Set them.
5341         (free_parser_stacks): New.
5342
5343 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
5344
5345         PR c++/6497
5346         * method.c (do_build_assign_ref): Pass a derivation to
5347         build_method_call when calling base class assignment operators.
5348
5349 2002-04-26  Richard Henderson  <rth@redhat.com>
5350
5351         * parse.y (yyoverflow): Revert.
5352
5353 2002-04-26  Richard Henderson  <rth@redhat.com>
5354
5355         PR c/3581
5356         * parse.y (string): Remove.  Update all uses to use STRING
5357         instead, and not call combine_strings.
5358         * rtti.c (tinfo_name): Use fix_string_type.
5359         * semantics.c (finish_asm_stmt): Don't call combine_strings.
5360         * spew.c (yylexstring): New.
5361         (read_token): Use it.
5362
5363 2002-04-25  Richard Henderson  <rth@redhat.com>
5364
5365         PR c/2161
5366         * parse.y (yyoverflow): New.
5367
5368 2002-04-25  Jason Merrill  <jason@redhat.com>
5369
5370         PR c++/5607
5371         * search.c (check_final_overrider): No longer static.
5372         * class.c (update_vtable_entry_for_fn): Call it.
5373         * cp-tree.h: Adjust.
5374
5375 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5376
5377         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
5378         * cp-tree.h (cxx_set_yydebug): Die.
5379         * lex.c (YYDEBUG): Get from c-lex.h.
5380         (cxx_set_yydebug): Remove.
5381         * parse.y: Include c-lex.h.
5382         (YYDEBUG): Get from c-lex.h.
5383
5384 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
5385
5386         PR c++/6438.
5387         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
5388         void.
5389
5390 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
5391
5392         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
5393         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
5394         Redefine.
5395         * cp-tree.h (cp_attribute_table): Rename.
5396         * decl.c (lang_attribute_table): Remove declaration.
5397         (cxx_init_decl_processing): Don't set it.
5398         * tree.c (cp_attribute_table): Rename.
5399
5400 2002-04-24  Jason Merrill  <jason@redhat.com>
5401
5402         PR c++/6331
5403         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
5404         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
5405         The pedwarn for array assignment is now unconditional.
5406         * tree.c (build_cplus_array_type_1): Still process simple array types
5407         normally in templates.
5408
5409         PR c++/6395
5410         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
5411         stuff for comdats.
5412
5413 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
5414
5415         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
5416         node with attributes.
5417
5418 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
5419
5420         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
5421         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
5422
5423 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
5424
5425         PR c++/6256:
5426         * pt.c (tsubst_friend_class): Handle templates with explicit
5427         nested names.
5428
5429         PR c++/6331:
5430         * typeck.c (merge_types): Remember the cv-qualification of pointer
5431         types when merging them.
5432
5433 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
5434
5435         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
5436         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
5437         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
5438         cxx_mark_function_context): New.
5439         * decl.c (push_cp_function_context, pop_cp_function_context,
5440         mark_cp_function_context): Rename for consistency.
5441         (cxx_init_decl_processing): Don't set old hooks.
5442
5443 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
5444
5445         * call.c (convert_type_from_ellipsis): Rename, update.
5446         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
5447         * cp-tree.h (convert_type_from_ellipsis): Rename.
5448         * decl.c (cxx_init_decl_processing): Don't set hook.
5449
5450 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
5451
5452         * call.c (build_new_method_call): Update.
5453         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
5454         * cp-tree.h (cxx_incomplete_type_error): New.
5455         * decl.c (grokdeclarator, grokparms): Update.
5456         * decl2.c (check_classfn): Update.
5457         * pt.c (tsubst): Update.
5458         * typeck.c (complete_type_or_else, expr_sizeof,
5459         decay_conversion): Update.
5460         * typeck2.c (incomplete_type_error): Rename.
5461         (add_exception_specifier): Update.
5462
5463 2002-04-18  Jason Merrill  <jason@redhat.com>
5464
5465         PR c++/5658
5466         * search.c (setup_class_bindings): A class template qualifies as a
5467         type binding.
5468
5469 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
5470
5471         PR c++/6316
5472         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
5473         before expanding.
5474
5475 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
5476
5477         * init.c (begin_init_stmts): Remove commented out code.
5478         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
5479         * semantics.c (begin_gobal_stmt_expr): Adjust call to
5480         expand_start_stmt_expr.
5481
5482 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
5483
5484         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
5485         dso_handle itself, to __cxa_atexit.
5486
5487 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5488
5489         * error.c (cxx_print_error_function): Adjust call to macros.
5490
5491 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
5492
5493         * class.c (layout_virtual_bases): Do all dsize computation on trees.
5494
5495 2002-04-14  Jason Merrill  <jason@redhat.com>
5496
5497         * typeck.c (get_member_function_from_ptrfunc): Don't do
5498         gratuitious division and multiplication on
5499         ptrmemfunc_vbit_in_delta targets.
5500
5501 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5502
5503         PR c++/5373.
5504         * semantics.c (finish_expr_stmt): Remember the type of the
5505         expression before any conversions are performed.
5506
5507 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5508
5509         PR c++/5189.
5510         * call.c (add_template_candidate_real): Do not treat member
5511         templates as copy constructors.
5512
5513 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5514
5515         * decl.c (duplicate_decls): Do not copy the RTL for a variable
5516         declaration if the old variable had an incomplete type and the new
5517         variable does not.
5518         (complete_vars): Do not call layout_decl for completed variables.
5519
5520 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
5521
5522         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
5523         with an explicit one.
5524         (follow_tag_typedef): New.
5525         (lookup_tag): Use it to extract the tag of an explicit typedef.
5526         (xref_tag): Likewise.
5527
5528 2002-04-11  Andrew Haley  <aph@redhat.com>
5529
5530         * typeck.c (type_after_usual_arithmetic_conversions):
5531         If two types have the same variant, return immediately.
5532         When two floating-point operands are the same precision:
5533           convert to float if one of the operands is float;
5534           if neither operand is one of the standard types, return the type
5535           of the first operand.
5536
5537 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
5538
5539         PR c++/5507
5540         * decl.c (make_typename_type): Remove implicit typenameness.
5541
5542 2002-04-09  Jason Merrill  <jason@redhat.com>
5543
5544         PR optimization/6189
5545         * semantics.c (genrtl_start_function): Don't free
5546         DECL_SAVED_FUNCTION_DATA for inline functions.
5547
5548         * init.c (build_member_call): For now, don't convert to
5549         intermediate base if it would cause an error.
5550
5551 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
5552
5553         * parse.y (namespace_qualifier, maybe_identifier,
5554         begin_explicit_instantiation, end_explicit_instantiation,
5555         apparent_template_type, .finish_template_type,
5556         do_id, maybe_init, defarg_again, component_decl_1):
5557         Add ending ';', in accordance with POSIX.
5558
5559 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
5560
5561         PR c++/5571
5562         * class.c (layout_class_type): Remember incomplete static
5563         variables.
5564         (finish_struct_1): Call complete_vars, not
5565         hack_incomplete_structures.
5566         * cp-tree.h (hack_incomplete_structures): Rename to ...
5567         (complete_vars): ... this.
5568         (struct saved_scope): Remove incomplete.
5569         (namespace_scope_incomplete): Remove.
5570         * decl.c (struct binding_level): Remove incomplete.
5571         (incomplete_vars): New variable.
5572         (mark_binding_level): Don't mark incomplete.
5573         (print_binding_level): Don't print it.
5574         (mark_saved_scope): Don't mark incomplete.
5575         (pushdecl): Use maybe_register_incopmlete_var.
5576         (cxx_init_decl_processing): Register incomplete_vars for GC.
5577         (start_decl_1): Clarify error message.
5578         (hack_incomplete_vars): Remove.
5579         (maybe_register_incomplete_var): New function.
5580         (complete_vars): Likewise.
5581
5582 2002-04-06  Jason Merrill  <jason@redhat.com>
5583
5584         PR c++/4934
5585         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
5586         set before checking it.
5587
5588         PR c++/525
5589         * init.c (build_member_call): Use build_scoped_ref.
5590         (resolve_offset_ref): Likewise.
5591         * call.c (build_scoped_method_call): Likewise.
5592         * tree.c (maybe_dummy_object): Kludge around current_class_type being
5593         wrong.
5594         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
5595         * cp-tree.h: Adjust.
5596
5597         * init.c (push_base_cleanups): Just use build_scoped_method_call.
5598
5599         PR c++/6179
5600         * method.c (implicitly_declare_fn): Pass unqualified type to
5601         synthesize_exception_spec.
5602
5603 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
5604
5605         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
5606         * cvt.c: Update comment.
5607         * init.c (expand_cleanup_for_base): Update.
5608         * semantics.c (finish_parenthesized_expr): Update.
5609         * typeck.c (cp_truthvalue_conversion): Update.
5610
5611 2002-04-04  Jason Merrill  <jason@redhat.com>
5612
5613         * semantics.c (finish_eh_cleanup): New fn.
5614         * cp-tree.h: Add prototype.
5615         * init.c (perform_member_init, expand_cleanup_for_base): Use
5616         finish_eh_cleanup.
5617         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
5618         * cp-tree.h: Remove references.
5619         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
5620         * dump.c (cp_dump_tree): Likewise.
5621         * pt.c (tsubst_expr): Likewise.
5622         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
5623         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
5624         * tree.c (cp_statement_code_p): Likewise.
5625
5626         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
5627
5628         PR c++/5636
5629         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
5630         cleanup for nrv.
5631
5632         PR c++/5104
5633         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
5634         specifiers.
5635         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
5636
5637 2002-04-03  Richard Henderson  <rth@redhat.com>
5638
5639         * cp-lang.c (cxx_warn_unused_global_decl): New.
5640         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
5641
5642 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
5643
5644         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
5645         * tree.c (init_tree): Don't set hook.
5646
5647 2002-04-03  Roger Sayle  <roger@eyesopen.com>
5648
5649         PR c++/5998:
5650         * decl.c (duplicate_decls): Don't mess with assembler names when
5651         redeclaring builtin functions as static.
5652
5653 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5654
5655         * call.c (build_addr_func): Update.
5656         * class.c (resolve_address_of_overloaded_function): Update.
5657         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
5658         * cp-tree.h (cxx_mark_addressable): New.
5659         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
5660         * decl2.c (build_cleanup): Update.
5661         * except.c (build_throw): Update.
5662         * init.c (resolve_offset_ref): Update.
5663         * pt.c (convert_nontype_argument): Update.
5664         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
5665         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
5666         unary_complex_lvalue): Update.
5667         (mark_addressable): Rename.
5668
5669 2002-04-01  Roger Sayle  <roger@eyesopen.com>
5670
5671         PR c++/5998:
5672         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
5673         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
5674         but follow the SET_DECL_RTL idiom used elsewhere in the function.
5675
5676 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5677
5678         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
5679         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
5680         * decl.c (grokdeclarator): Update.
5681         * mangle.c (write_integer_cst): Update.
5682         * typeck.c (build_binary_op): Update.
5683
5684 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
5685
5686         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
5687         * lex.c (cxx_init): Don't set hook.
5688
5689 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
5690
5691         * Make-lang.in (error.o): Update.
5692         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
5693         * cp-tree.h (struct diagnostic_context): Predeclare.
5694         (cxx_print_error_function): New.
5695         * error.c: Include langhooks-def.h.
5696         (lang_print_error_function): Rename.  Update.
5697         (init_error): Don't set hook.
5698
5699 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
5700
5701         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
5702         Redefine.
5703         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
5704         * decl.c (finish_enum): Similarly.
5705         * error.c (dump_type): Similarly.
5706         * lex.c (cxx_init): Similarly.
5707         * mangle.c (write_builtin_type): Similarly.
5708         * typeck.c (comptypes): Similarly.
5709
5710 2002-03-28  Roger Sayle  <roger@eyesopen.com>
5711
5712         PR c++/5998:
5713         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
5714         in the g++ front-end.
5715         (duplicate_decl): Allow redefinition of anticipated built-ins.
5716         Fix inlining problem by over-writing the old DECL_RTL.
5717         (lookup_namespace_name): Fail to find an identifier in the
5718         specified namespace if its still anticipated.
5719         (builtin_function_1): New function split out from builtin_function
5720         to create a builtin in the current namespace with given context.
5721         (builtin_function): Call builtin_function_1 to define the
5722         appropriate builtins in both the std and global namespaces.
5723         (select_decl): Don't test for anticipated decls here.
5724         (unqualified_namespace_lookup): Instead ignore them whilst
5725         searching through scopes and namespaces.
5726         * decl2.c (do_nonmember_using_decl): If a using declaration
5727         specifies an anticipated built-in function, mark it as no longer
5728         anticipated in that scope.
5729         (ambiguous_decl):  Avoid resolving to an anticipated decl.
5730         * lex.c (do_scoped_id): Fail to find an identifier in the global
5731         namespace if its still anticipated.
5732
5733 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
5734
5735         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
5736         * cp-tree.h (cp_make_lang_type): Rename.
5737         * lex.c (cp_make_lang_type): Rename.
5738         (make_aggr_type): Update.
5739         * tree.c (init_tree): Don't set make_lang_type_fn.
5740
5741 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
5742
5743         PR c++/6073
5744         * class.c (finish_struct_1): Update static field's DECL_MODE even
5745         if its type is a variant of t.
5746
5747 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
5748
5749         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
5750         * cp-tree.h (cxx_insert_default_attributes): New.
5751         * decl.c (insert_default_attributes): Rename.
5752
5753 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
5754
5755         PR c++/4884
5756         * call.c (build_op_delete_call): Allow for the fact the placement
5757         may be a COMPOUND_EXPR.
5758
5759 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
5760
5761         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
5762         * cp-tree.h (init_cplus_expand): Remove.
5763         (cxx_expand_expr): New.
5764         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
5765         fix prototype.
5766         (init_cplus_expand): Remove.
5767         * lex.c (cxx_init): Don't call init_cplus_expand.
5768
5769 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
5770
5771         PR c++/4884.
5772         * init.c (build_new_1): Allow for the fact the result of
5773         build_function_call may be a COMPOUND_EXPR.
5774
5775 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
5776
5777         PR c++/5682
5778         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
5779         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
5780         (dfs_skip_nonprimary_vbases_markedp): Remove.
5781         * search.c (get_shared_vbase_if_not_primary): Remove.
5782         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
5783         (dfs_skip_nonprimary_vbases_markedp): Remove.
5784         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
5785         (dfs_marked_real_bases_queue_p): Likewise.
5786
5787 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
5788
5789         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
5790         * cp-tree.h (cxx_mark_tree): New.
5791         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
5792
5793 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5794
5795         * cp-tree.h (cxx_maybe_build_cleanup): New.
5796         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
5797         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
5798         * tree.c (build_target_expr): Update.
5799         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
5800
5801 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
5802
5803         * decl2.c (cxx_decode_option): Handle -E.
5804         * lang-specs.h (default_compilers): Preprocess with cc1plus.
5805         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
5806
5807 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
5808
5809         PR c++/6037
5810         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
5811
5812 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5813
5814         * error.c (dump_type): Be careful about implicit typenames.
5815
5816 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5817
5818         PR C++/3656
5819         * semantics.c (finish_base_specifier): Handle erronous base
5820         classes.
5821
5822 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
5823
5824         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
5825         REAL_IS_NOT_DOUBLE.
5826
5827 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
5828
5829         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
5830         an index into the vtable_entry array regardless of
5831         TARGET_PTRMEMFUNC_VBIT_LOCATION.
5832
5833 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
5834
5835         * tree.c (cp_cannot_inline_tree_fn): Same.
5836
5837 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
5838
5839         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
5840         insert_block, getdecls, global_bindings_p): New.
5841
5842 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
5843
5844         PR c++/4361
5845         * mangle.c (struct globals) Add internal_mangling_p member.
5846         (write_template_param): Do internal mangling, if needed.
5847         (mangle_conv_op_name_for_type): Request internal mangling.
5848
5849 2002-03-20  Jason Merrill  <jason@redhat.com>
5850
5851         PR c++/2136
5852         * init.c (build_delete): Check access for a member op delete here.
5853         * decl2.c (delete_sanity): Not here.
5854
5855 2002-03-19  Jason Merrill  <jason@redhat.com>
5856
5857         PR c++/5118
5858         * class.c (get_vfield_name): Use the constructor_name.
5859
5860 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
5861
5862         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
5863         * cp-tree.h (lang_printable_name): Rename.
5864         * error.c (lang_decl_name): Use new hook.
5865         * lex.c (cxx_init): Remove old hook.
5866         * pt.c (tsubst_decl): Use new hook.
5867         * tree.c (lang_printable_name): Rename.
5868
5869 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
5870
5871         PR c++/3882
5872         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
5873         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
5874         only after recording the declaration.
5875
5876 2002-03-18  Jason Merrill  <jason@redhat.com>
5877
5878         PR c++/2039
5879         * init.c (resolve_offset_ref): Hand off to build_component_ref.
5880
5881         PR c++/4222, c++/5995
5882         * call.c (build_over_call): Fix empty class logic.
5883
5884         PR c++/3870
5885         * cp-tree.h (struct saved_scope): Add last_parms field.
5886         * decl.c (maybe_push_to_top_level): Save last_function_parms.
5887         (pop_from_top_level): Restore it.
5888
5889         PR c++/4377
5890         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
5891         NON_LVALUE_EXPRs.
5892
5893         PR c++/4003
5894         * pt.c (tsubst_friend_function): Use decl_namespace_context.
5895
5896         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
5897         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
5898         type with a nontrivial destructor.
5899
5900 2002-03-17  Jason Merrill  <jason@redhat.com>
5901
5902         PR c++/4460
5903         * class.c (build_base_path): Virtual base layout is fixed in
5904         in-charge [cd]tors.
5905
5906 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
5907
5908         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
5909         * parse.y (yyparse): Remove macro.
5910
5911 2002-03-17  Jason Merrill  <jason@redhat.com>
5912
5913         PR c++/5757
5914         * init.c (build_new_1): Pass the right pointer to op delete.
5915
5916 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
5917
5918         PR c++/4361
5919         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
5920         conversion operators go.
5921         (struct lang_decl_flags): Add template_conv_p and unused
5922         bitfields.
5923         (DECL_TEMPLATE_CONV_FN_P): New macro.
5924         * call.c (build_user_type_conversion_1): Don't check second type
5925         conversion of overload set first.
5926         * class.c (add_method): Make sure templated conversion operators
5927         all end up on slot 2.
5928         * lex.c (do_identifier): A conversion operator token might be
5929         satisfied by a templated conversion operator.
5930         * pt.c (check_explicit_specialization): Use
5931         CLASSTYPE_FIRST_CONVERSION_SLOT.
5932         (template_parm_this_level_p): New function.
5933         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
5934         * search.c (lookup_fnfields_1): Template conversions will be on
5935         the first slot.
5936         * typeck.c (build_component_ref): Preserve the type of an
5937         conversion operator name on the overload type.
5938         (build_x_function_call): Retrieve the conversion operator name.
5939
5940 2002-03-15  Richard Henderson  <rth@redhat.com>
5941
5942         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
5943
5944 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
5945
5946         * cp-tree.h (CLEANUP_DECL): Remove.
5947         (CLEANUP_EXPR): Likewise.
5948         * decl.c (destroy_local_var): Simplify.
5949         (maybe_build_cleanup): Tidy.
5950         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
5951         * semantics.c (cp_expand_stmt): Likewise.
5952         * cp/tree.c (cp_statement_code_p): Likewise.
5953
5954 2002-03-15  Jason Merrill  <jason@redhat.com>
5955
5956         PR c++/5857
5957         * decl.c (duplicate_decls): Use merge_types instead of common_type.
5958         * typeck.c (common_type): Just hand off to
5959         type_after_usual_arithmetic_conversions and
5960         composite_pointer_type.
5961         (merge_types): New fn.
5962         (commonparms): Use it instead of common_type.
5963         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
5964         (composite_pointer_type): Also handle attributes.
5965         * cp-tree.h: Declare merge_types.
5966
5967         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
5968         variables.
5969         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
5970
5971 2002-03-14  Richard Henderson  <rth@redhat.com>
5972
5973         * decl.c: Include c-pragma.h.
5974         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
5975         * Make-lang.in: Update dependencies.
5976
5977 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
5978
5979         PR c++/5908
5980         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
5981         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
5982
5983 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
5984
5985         * mangle.c (write_builtin_type): Handle 128-bit integers even if
5986         they are not a standard integer type.
5987
5988 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
5989
5990         * cp-tree.h (init_init_processing): Remove declaration.
5991         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
5992         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
5993
5994 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5995
5996         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
5997         Define.
5998         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
5999         tree_code_length.
6000         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
6001         cplus_tree_code_name): Delete.
6002         (cxx_init): Don't call add_c_tree_codes, instead set
6003         lang_unsafe_for_reeval.  Don't try to copy into the various
6004         tree_code arrays.
6005
6006 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
6007
6008         PR c++/5659
6009         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
6010         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
6011         definitions.
6012
6013 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
6014
6015         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
6016         DR209 is now not a defect.
6017         * cp-tree.h (skip_type_access_control): Remove.
6018         * decl.c (grokdeclarator): Do type access control for friend
6019         declarations.
6020         * semantics.c (decl_type_access_control): Don't reset
6021         current_type_lookups.
6022         (save_type_access_control): Always save the lookups.
6023         (skip_type_access_control): Remove.
6024         (finish_class_definition): Don't change type_lookups.
6025
6026 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
6027
6028         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
6029         It is incorrect.
6030         * typeck.c (build_static_cast): Compare non-qualified types
6031         with pointer to member conversions.
6032
6033 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
6034             Daniel Berlin  <dan@dberlin.org>
6035
6036         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
6037         (cxx_get_alias_set): Use it.
6038
6039 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6040
6041         * cp-tree.h (stabilize_expr): Prototype.
6042
6043 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6044
6045         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
6046         conditional return void.
6047
6048 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
6049
6050         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
6051         * cp-tree.h (cxx_unsave): New.
6052         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
6053         (init_tree): Update.
6054
6055 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6056
6057         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
6058         explicit sizeof/sizeof.
6059         * decl2.c (cxx_decode_option): Likewise.
6060         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
6061
6062 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
6063
6064         PR c++/775
6065         * decl.c (lookup_tag): Only reject enum/class mismatch, not
6066         class/union mismatch.
6067         * parse.y (check_class_key): New function.
6068         (structsp): Call it.
6069
6070 2002-03-01  Michael Matz  <matz@suse.de>
6071
6072         * typeck.c (cp_pointer_int_sum): Complete inner type which is
6073         used later by size_in_bytes().
6074
6075 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
6076
6077         * cp-tree.h:  Require __GNUC__ to be #defined.
6078         (build_init):  Add missing prototype.
6079
6080 2002-03-01  Jason Merrill  <jason@redhat.com>
6081
6082         * except.c: Don't include decl.h or obstack.h.  Do include
6083         tree-inline.h.
6084         (build_throw): Destroy temporaries from the thrown
6085         expression before calling __cxa_throw.  Construct a thrown
6086         temporary directly into the exception object.
6087         (stabilize_throw_expr): New function.
6088         (wrap_cleanups_r): New function.
6089         * tree.c (stabilize_expr): New function.
6090         * init.c (build_init): New function.
6091         * Make-lang.in (cp/except.o): Adjust .h deps.
6092
6093 2002-02-28  Jason Merrill  <jason@redhat.com>
6094
6095         * search.c (lookup_base_r): Don't clear is_non_public just because
6096         we found a friendly scope.
6097
6098         * decl.c (finish_function): Only warn about missing return
6099         statement with -Wreturn-type.
6100
6101 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
6102
6103         * class.c (build_clone): Update.
6104         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
6105         * cp-tree.h (cxx_dup_lang_specific_decl): New.
6106         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
6107         (copy_decl): Update.
6108         * method.c (make_thunk): Update.
6109
6110 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
6111
6112         * decl2.c: Delete traditional-mode-related code copied from
6113         the C front end but not used, or used only to permit the
6114         compiler to link.
6115
6116 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
6117
6118         PR c++/4093
6119         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
6120         to void.
6121
6122 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
6123
6124         PR other/5746
6125         * semantics.c (finish_switch_cond): Don't call get_unwidened
6126         if error_mark_node.
6127
6128 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
6129
6130         PR c++/2645, DR 295
6131         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
6132         tf_keep_type_decl.
6133         (make_typename_type): Use tsubst_flags_t.
6134         * decl.c (make_typename_type): Adjust. Return non-artificial
6135         TYPE_DECLs, if required.
6136         (grokdeclarator): Simplify CVR qualification handling. Allow bad
6137         qualifiers on typedef types.
6138         * decl2.c (handle_class_head): Adjust make_typename_type call.
6139         * parse.y (nested_name_specifier): Likewise.
6140         (typename_sub0): Likewise.
6141         (typename_sub1): Likewise.
6142         * pt.c (convert_template_argument): Adjust make_typename_type
6143         return value.
6144         (tsubst): Adjust cp_build_qualified_type_real calls.
6145         (check_cv_quals_for_unify): Cope with allowing bad qualifications
6146         on template type parms.
6147         (instantiate_decl): Recheck substitutions to give warnings on bad
6148         qualifications.
6149         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
6150
6151 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
6152
6153         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
6154
6155         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
6156         unless DECL_ALWAYS_INLINE.
6157
6158 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
6159
6160         * typeck.c (cp_pointer_int_sum): Renamed from
6161         pointer_int_sum, call pointer_int_sum.
6162
6163 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
6164
6165         * decl.c (duplicate_decls): Return 0 if issued error about
6166         redeclaration.
6167
6168 2002-02-19  Jason Merrill  <jason@redhat.com>
6169
6170         ABI change: Mangle `void (A::*)() const' as
6171         M1AKFvvE, not MK1AFvvE.
6172         * mangle.c (write_function_type): Write cv-quals for member
6173         function type here.
6174         (write_pointer_to_member_type): Not here.
6175
6176 2002-02-18  Jason Merrill  <jason@redhat.com>
6177
6178         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
6179         (do_decl_instantiation): Likewise.
6180
6181 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6182
6183         PR c++/5685
6184         * decl.c (duplicate_decls): Make warning unconditional
6185         if duplicate default argument declarations are present.
6186
6187 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
6188
6189         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
6190         shortening.
6191
6192 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
6193
6194         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
6195         remove incorrect comment. Move #if 0'd code to common path. Use
6196         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
6197
6198 2002-02-13  Jason Merrill  <jason@redhat.com>
6199
6200         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
6201         (finish_function): Don't warn if current_function_returns_null.
6202
6203         * typeck2.c (digest_init): Do handle values of vector type.
6204
6205         * typeck2.c (digest_init, process_init_constructor): Treat vectors
6206         like arrays.
6207
6208 2002-02-11  Jason Merrill  <jason@redhat.com>
6209
6210         * parse.y (reserved_declspecs): Don't handle attributes.
6211         (reserved_typespecquals): Handle them here.
6212         * Make-lang.in (parse.c): Adjust expected conflicts.
6213
6214 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
6215
6216         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
6217         instead of compstmt.
6218         (compstmt_or_stmtexpr): Renamed from compstmt.
6219         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
6220
6221 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
6222
6223         Rename instantiate_type_flags to tsubst_flags_t & expand use.
6224         * cp-tree.h (instantiate_type_flags): Rename to ...
6225         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
6226         add tf_warning flag.
6227         (instantiate_type): Adjust prototype.
6228         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
6229         do_type_instantiation, cp_build_qualified_type_real): Likewise.
6230         cp_build_qualified_type: Adjust.
6231         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
6232         tf_*.
6233         * call.c (standard_conversion): Rename itf_* to tf_*.
6234         (reference_binding): Likewise.
6235         (convert_like_real): Likewise.
6236         * cvt.c (cp_convert_to_pointer): Likewise.
6237         (convert_to_reference): Likewise.
6238         * decl.c (lookup_namespace_name): Use tf_* flags.
6239         (make_typename_type): Likewise.
6240         (grokdeclarator): Likewise.
6241         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
6242         (coerce_template_template_parms, convert_template_argument,
6243         coerce_template_parms, maybe_get_template_decl_from_type_decl,
6244         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
6245         instantiate_class_template, tsubst_template_arg_vector,
6246         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
6247         tsubst_decl, tsubst_arg_types, tsubst_function_type,
6248         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
6249         instantiate_template, fn_type_unification,
6250         resolve_overloaded_unification, verify_class_unification,
6251         unify, get_bindings_real, do_type_instantiation,
6252         regenerate_decl_from_template, instantiate_decl,
6253         tsubst_initializer_list, tsubst_enum,
6254         get_mostly_instantiated_function_type,
6255         invalid_nontype_parm_type_p): Likewise.
6256         * tree.c (cp_build_qualified_type_real): Likewise.
6257         * typeck.c (build_binary_op): Rename itf_* to tf_*.
6258         (build_ptrmemfunc): Likewise.
6259         (convert_for_assignment): Likewise.
6260
6261 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
6262
6263         PR c++/109
6264         * decl.c (grokdeclarator): Allow friend declarations from
6265         dependent types.
6266         * decl2.c (handle_class_head): Don't push into template parm contexts.
6267         * pt.c (push_template_decl_real): Template parm contexts are never
6268         being defined.
6269
6270 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
6271
6272         * class.c: Include target.h.
6273         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
6274         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
6275         bit-field layout.
6276         * Make-lang.in: Adjust deps.
6277
6278 2002-02-05  Jason Merrill  <jason@redhat.com>
6279
6280         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
6281
6282 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
6283
6284         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
6285         (finish_switch_cond): Set SWITCH_TYPE.
6286
6287 2002-02-04  Richard Henderson  <rth@redhat.com>
6288
6289         * method.c (use_thunk): Always initialize the block tree.  Reindent.
6290         * semantics.c (expand_body): Emit thunks after function, not before.
6291
6292 2002-02-04  Jason Merrill  <jason@redhat.com>
6293
6294         * decl.c (start_function): Call cplus_decl_attributes immediately
6295         after grokdeclarator.
6296
6297         * decl.c (start_function): Combine DECL_RESULT handling code.
6298
6299 2002-02-03  Jason Merrill  <jason@redhat.com>
6300
6301         * xref.c: Remove.
6302         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
6303         (cp/xref.o): Remove dependencies.
6304         * class.c (finish_struct_1, check_methods): Don't call xref fns.
6305         (finish_struct_1): Likewise.
6306         * friend.c (make_friend_class): Likewise.
6307         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
6308         * spew.c (read_process_identifier): Likewise.
6309
6310 2002-02-01  Jason Merrill  <jason@redhat.com>
6311
6312         PR c++/4872
6313         * decl.c (finish_function): Warn about a non-void function with
6314         no return statement and no abnormal exit.
6315         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
6316         (current_function_returns_abnormally): New macro.
6317         * call.c (build_call): Set it.
6318
6319         * typeck.c (build_component_ref): Always complain about offsetof
6320         constructs on non-PODs.  Only make it an error for members of
6321         virtual bases.
6322
6323         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
6324         (dump_function_decl): Always dump parms.
6325
6326         * decl2.c (finish_static_data_member_decl): Complain about a local
6327         class with a static data member.
6328
6329         PR c++/4286
6330         * search.c (lookup_field_1): Don't xref a static data member
6331         just because we looked it up.
6332
6333 2002-01-31  Jason Merrill  <jason@redhat.com>
6334
6335         * Make-lang.in (parse.c): Handle .output file.
6336
6337         PR c++/3395
6338         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
6339         not TREE_TYPE.
6340         * semantics.c (finish_class_definition): Adjust.
6341
6342         Allow attributes in parms and casts.
6343         * parse.y (named_parm): Don't strip attrs.
6344         (declmods): Remove 'attributes' production.
6345         (nonempty_cv_qualifiers): Accept attributes.
6346         (ATTRIBUTE): Give precedence.
6347         * decl.c (groktypename): Handle attributes.
6348         (grokparms): Likewise.
6349
6350 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
6351
6352         * decl2.c (cxx_decode_option): Pass 0 as last argument to
6353         cpp_handle_option.
6354         * lang-specs.h: Use cpp_unique_options instead of cpp_options
6355         when used together with cc1_options.
6356
6357 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
6358
6359         PR c++/5132
6360         * typeck2.c (digest_init): Make sure non-array core type is
6361         instantiated.
6362         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
6363         constructor, rather than build a new one.
6364         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
6365         PURPOSE of constructor elts.
6366
6367 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
6368
6369         * Make-lang.in (parse.c): Adjust expected number of
6370         shift-reduce conflicts.
6371         (decl.o): Depend on diagnostic.h.
6372         * decl.c: Include diagnostic.h.
6373         (grokdeclarator): Check for null pointer.
6374         (finish_function): Don't abort when
6375         current_binding_level->parm_flag != 1, if errors have
6376         occurred; throw away the statement tree and extra binding
6377         levels, and continue.
6378         * lex.c (note_list_got_semicolon): Check for null pointer.
6379         * method.c (hack_identifier): Just return error_mark_node if
6380         value is error_mark_node.
6381         * parse.y (primary: TYPEID(type_id)): No need to use
6382         TYPE_MAIN_VARIANT here.
6383         (handler_seq): Accept an empty list of catch clauses and
6384         generate a fake handler block to avoid later crashes.
6385         (ansi_raise_identifier): Accept the error token too.
6386         * semantics.c (begin_class_definition,
6387         finish_class_definition): Check for error_mark_node.
6388
6389 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
6390
6391         * typeck2.c (friendly_abort): Delete definition.
6392         * cp-tree.h (friendly_abort): Don't prototype.
6393         (my_friendly_assert): Use fancy_abort.
6394
6395 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6396
6397         * cp-tree.h (my_friendly_abort): Remove.
6398
6399 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
6400
6401         * spew.c (pending_inlines, pending_inlines_tail,
6402         processing_these_inlines): Make static.
6403         (mark_pending_inlines): Remove static.
6404         (begin_parsing_inclass_inline): If in function, save pi
6405         for GC to cp_function_chain->unparsed_inlines instead.
6406         (process_next_inline): Likewise.
6407         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
6408         (mark_pending_inlines): Add prototype.
6409         * decl.c (spew_debug): Remove unused extern.
6410         (mark_lang_function): Call mark_pending_inlines.
6411
6412 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6413
6414         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
6415         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
6416         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
6417         Change my_fancy_abort() to abort().
6418
6419 2002-01-23  Jason Merrill  <jason@redhat.com>
6420
6421         PR c++/5453
6422         * class.c (fixed_type_or_null): Fix thinko.
6423
6424         PR c++/3331
6425         * init.c (resolve_offset_ref): Use build_indirect_ref.
6426
6427         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
6428
6429 2002-01-22  Jason Merrill  <jason@redhat.com>
6430
6431         * parse.y (function_body): Suppress the block for the outermost
6432         curly braces.
6433         * decl.c (pushdecl): Don't try to skip it.
6434         (begin_function_body): Keep the block we create, not the next one.
6435         * init.c (emit_base_init): Don't mess with keep_next_level.
6436
6437         * class.c (build_base_path): Tweak formatting.
6438
6439 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
6440
6441         Fix regression introduced with patch for c++/775
6442         * parse.y (class_head_defn): Check for template specializations
6443         with a different class-key.
6444
6445 2002-01-17  Jason Merrill  <jason@redhat.com>
6446
6447         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
6448         (begin_function_body): Call them and keep_next_level.
6449         * init.c (emit_base_init): Call keep_next_level.
6450         * semantics.c (setup_vtbl_ptr): Lose.
6451         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
6452         (vtbls_set_up_p): Lose.
6453         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
6454         * method.c (do_build_copy_constructor): Likewise.
6455         (synthesize_method): Call finish_mem_initializers.
6456         * parse.y (nodecls): Likewise.
6457
6458         * error.c (dump_type_suffix): Print the exception specs before
6459         recursing.
6460         (dump_function_decl): Here, too.
6461
6462         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
6463
6464 2002-01-10  Ira Ruben   <ira@apple.com>
6465
6466         PR c++/907
6467         * decl.c (start_method): Handle attrlist.
6468
6469 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
6470
6471         * decl2.c (max_tinst_depth): Increase default limit to 500.
6472
6473 2002-01-10  Graham Stott  <grahams@redhat.com>
6474
6475         * spew.c (YYCHAR): Uppercase macro parameter and add
6476         parenthesis.
6477         (YYCODE): Likewise.
6478         (NAME): Uppercase macro parameter.
6479
6480 2002-01-09  Graham Stott  <grahams@redhat.com>
6481
6482         * decl.h (grokdeclarator): Wrap long line.
6483
6484         * semantics.c (FINISH_COND): Uppercase macro paramaters and
6485         add parenthesis.
6486
6487 2002-01-08  Graham Stott  <grahams@redhat.com>
6488
6489         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
6490         (PALLOC): Uppercase macro parameter and whitespace.
6491         (SALLOC): Uppercase macro parameter.
6492         (SFREE): Uppercase macros parameter, add parenthese and
6493         whitespace.
6494         (STREQL): Uppercase macro parameter and whitespace.
6495         (STRNEQ): Likewise.
6496         (STRLSS): Likewise.
6497         (STRLEQ): Likewise.
6498         (STRGTR): Likewise.
6499         (STRGEQ): Likewise.
6500
6501         * call.c (convert_like): Add parenthesis and wrap.
6502         (convert_like_with_context): Likewise.
6503         (ICS_RANK): Whitespace.
6504         (NEED_TEMPORARY_P): Remove parenthesis.
6505
6506         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
6507         whitespace.
6508         (VTT_MARKED_BINFO_P): Likewise.
6509
6510         * decl.c (BINDING_LEVEL): Add parenthesis.
6511         (DEF_OPERATOR): Likewise.
6512
6513         * mangle.c (MANGLE_TRACE): Add parenthesis.
6514         (MANGLE_TRACE_TREE): Likewise.
6515         (write_signed_number): Likewise.
6516         (write_unsigned_number): Likewise.
6517
6518         * pt.c (ccat): Uppercase macro parameter.
6519         (cat): Likewise
6520
6521         * search.c (SET_BINFO_ACCESS): Add parenthesis.
6522
6523 2002-01-07  Jason Merrill  <jason@redhat.com>
6524
6525         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
6526         to pedwarn.
6527
6528         PR c++/3536
6529         * method.c (make_thunk): If !flag_weak, give the thunk the
6530         function's linkage.
6531         (use_thunk): Here, too.
6532
6533 2002-01-07  Graham Stott  <grahams@redhat.com>
6534
6535         * error.c: Update copyright date.
6536         (print_scope_operator): Add parenthesis.
6537         (print_left_paren): Likewise.
6538         (print_right_paren): Likewise.
6539         (print_left_bracket): Likewise.
6540         (print_right_bracket): Likewise.
6541         (print_template_argument_list_start): Likewise.
6542         (print_template_argument_list_end): Likewise.
6543         (print_non_consecutive_character): Likewise.
6544         (print_tree_identifier): Likewise.
6545         (print_identifier): Likewise.
6546         (NEXT_CODE): Uppercase macro parameter.
6547         (ident_fndecl): Delete unused.
6548         (GLOBAL_THING): Likewise.
6549
6550 2002-01-06  Graham Stott  <grahams@redhat.com>
6551
6552         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
6553         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
6554         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
6555         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
6556         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
6557         (C_IS_RESERVED_WORD): Uppercase macro parameter.
6558         (C_RID_YYCODE) Likewise.
6559         (ptrmem_cst): Use rtx.
6560         (LOCAL_BINDING_P): Add whitespace.
6561         (INHERITED_VALUE_BINDING_P): Likewise.
6562         (BINDING_SCOPE): Wrap long line.
6563         (BINDING_HAS_LEVEL_P): Remove parenthesis.
6564         (BINDING_VALUE): Wrap long line.
6565         (BINDING_TYPE): Whitespace.
6566         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
6567         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
6568         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
6569         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
6570         (same_type_p): Uppercase macro parameters.
6571         (same_type_ignoring_top_level_qualifiers_p): Likewise.
6572         (OVL_FUNCTION): Wrap long line.
6573         (OVL_CHAIN): Whitespace.
6574         (OVL_CURRENT): Add parenthesis and whitespace.
6575         (OVL_NEXT): Whitespace.
6576         (OVL_USED): Likewise.
6577         (IDENTIFIER_TYPE_VALUE): Likewise.
6578         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
6579         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
6580         (LANG_ID_FIELD): Whitespace.
6581         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
6582         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
6583         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
6584         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
6585         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
6586         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
6587         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
6588         (IDENTIFIER_VIRTUAL_P): Likewise.
6589         (IDENTIFIER_OPNAME_P): Likewise.
6590         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
6591         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
6592         (C_SET_EXP_ORIGINAL_CODE): Likewise.
6593         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
6594         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
6595         (IS_AGGR_TYPE): Uppercase macro parameter.
6596         (CLASS_TYPE_P): Likewise.
6597         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
6598         (IS_AGGR_TYPE_2): Whitespace.
6599         (TAGGED_TYPE_P): Uppercase macro parameter.
6600         (TYPE_BUILT_IN): Whitespace.
6601         (TYPE_FOR_JAVA): Likewise.
6602         (FUNCTION_ARG_CHAIN): Remove parenthesis.
6603         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
6604         (FUNCTION_FIRST_USER_PARAM): Likewise.
6605         (PROMOTES_TO_AGGR_TYPE): Whitespace.
6606         (DERIVED_FROM_P): Add parenthesis and wrap.
6607         (UNIQUELY_DERIVED_FROM_P): Likewise.
6608         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
6609         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
6610         (CLASSTYPE_USE_TEMPLATE): Whitespace.
6611         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
6612         (TYPE_GETS_DELETE): Add parenthesis.
6613         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
6614         (TYPE_HAS_ASSIGN_REF): Likewise,
6615         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
6616         (TYPE_HAS_INIT_REF): Likewise.
6617         (TYPE_HAS_CONST_INIT_REF): Likewise.
6618         (TYPE_BEING_DEFINED): Likewise.
6619         (TYPE_LANG_SPECIFIC): Likewise.
6620         (CLASSTYPE_RTTI): Likewise.
6621         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
6622         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
6623         (TYPE_OVERLOADS_ARROW): Likewise.
6624         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
6625         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
6626         (CLASSTYPE_METHOD_VEC): Likewise.
6627         (CLASSTYPE_MARKED_N): Likewise.
6628         (CLASSTYPE_MARKED): Likewise.
6629         (CLASSTYPE_MARKED2): Likewise.
6630         (CLASSTYPE_MARKED3): Likewise.
6631         (CLASSTYPE_MARKED4): Likewise.
6632         (CLASSTYPE_MARKED5): Likewise.
6633         (CLASSTYPE_MARKED6): Likewise.
6634         (SET_CLASSTYPE_MARKED): Whitespace.
6635         (CLEAR_CLASSTYPE_MARKED): Likewise.
6636         (SET_CLASSTYPE_MARKED2): Likewise.
6637         (CLEAR_CLASSTYPE_MARKED2): Likewise.
6638         (SET_CLASSTYPE_MARKED3): Likewise.
6639         (CLEAR_CLASSTYPE_MARKED3): Likewise.
6640         (SET_CLASSTYPE_MARKED4): Likewise.
6641         (CLEAR_CLASSTYPE_MARKED4): Likewise.
6642         (SET_CLASSTYPE_MARKED5): Likewise.
6643         (CLEAR_CLASSTYPE_MARKED5): Likewise.
6644         (SET_CLASSTYPE_MARKED6): Likewise.
6645         (CLEAR_CLASSTYPE_MARKED6): Likewise.
6646         (CLASSTYPE_TAGS): Likewise.
6647         (CLASSTYPE_VSIZE): Likewise.
6648         (CLASSTYPE_VBASECLASSES): Likewise.
6649         (CANONICAL_BINFO): Add parenthesis.
6650         (CLASSTYPE_SIZE(NODE): Likewise.
6651         (CLASSTYPE_SIZE_UNIT): Likewise.
6652         (CLASSTYPE_ALIGN(NODE): Likewise.
6653         (CLASSTYPE_USER_ALIGN): Likewise.
6654         (TYPE_JAVA_INTERFACE): Likewise.
6655         (CLASSTYPE_PURE_VIRTUALS): Likewise.
6656         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
6657         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
6658         (CLASSTYPE_HAS_MUTABLE): Likewise.
6659         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
6660         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
6661         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
6662         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
6663         (CLASSTYPE_INTERFACE_ONLY): Likewise.
6664         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
6665         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
6666         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
6667         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
6668         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
6669         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
6670         (BINFO_UNSHARED_MARKED): Whitespace.
6671         (BINFO_MARKED): Whitespace and wrap.
6672         (SET_BINFO_MARKED): Likewise.
6673         (CLEAR_BINFO_MARKED): Likewise.
6674         (BINFO_VTABLE_PATH_MARKED): Likewise.
6675         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
6676         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
6677         (BINFO_SUBVTT_INDEX): Remove parenthesis.
6678         (BINFO_VPTR_INDEX): Likewise.
6679         (BINFO_PRIMARY_BASE_OF): Likewise,
6680         (CLASSTYPE_VFIELDS): Whitespace.
6681         (VF_DERIVED_VALUE): Wrap long line.
6682         (NAMESPACE_LEVEL): Whitespace.
6683         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
6684         (DEFARG_POINTER): Whitespace.
6685         (DECL_NEEDED_P): Remove parenthesis.
6686         (DECL_LANGUAGE): Whitespace.
6687         (SET_DECL_LANGUAGE): Add parenthesis.
6688         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
6689         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
6690         (DECL_IN_AGGR_P): Whitespace.
6691         (DECL_FRIEND_P): Likewise.
6692         (DECL_BEFRIENDING_CLASSES): Likewise.
6693         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
6694         (DECL_NONCONVERTING_P): Whitespace.
6695         (DECL_PURE_VIRTUAL_P): Likewise.
6696         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
6697         (DECL_PENDING_INLINE_INFO): Whitespace.
6698         (DECL_SORTED_FIELDS): Likewise.
6699         (DECL_DEFERRED_FN): Likewise.
6700         (DECL_TEMPLATE_INFO): Likewise.
6701         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
6702         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
6703         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
6704         (TMPL_ARGS_LEVEL): Likewise.
6705         (SET_TMPL_ARGS_LEVEL): Likewise.
6706         (INNERMOST_TEMPLATE_PARMS): Whitespace.
6707         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
6708         (INTEGRAL_CODE_P(CODE): Add parenthesis.
6709         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
6710         (TYPE_HAS_CONSTRUCTOR): Whitespace.
6711         (TREE_HAS_CONSTRUCTOR): Likewise.
6712         (TYPE_HAS_DESTRUCTOR): Likewise.
6713         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
6714         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
6715         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
6716         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
6717         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
6718         (TYPE_PTRMEMFUNC_P): Likewise.
6719         (TYPE_PTRMEMFUNC_FLAG): Likewise.
6720         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
6721         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
6722         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
6723         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
6724         (DECL_ACCESS): Whitespace.
6725         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
6726         (DECL_GLOBAL_DTOR_P): Likewise.
6727         (GLOBAL_INIT_PRIORITY): Likewise.
6728         (DECL_TEMPLATE_PARMS): Likewise.
6729         (DECL_TEMPLATE_RESULT): Likewise.
6730         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
6731         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
6732         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
6733         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
6734         (PRIMARY_TEMPLATE_P): Add parenthesis.
6735         (DECL_USE_TEMPLATE): Whitespace.
6736         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
6737         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
6738         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
6739         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
6740         (CALL_DECLARATOR_PARMS): Remove parenthesis.
6741         (CALL_DECLARATOR_QUALS): Likewise.
6742         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
6743         (TEMP_NAME_P): Wrap.
6744         (VFIELD_NAME_P): Likewise.
6745         (B_SET): Uppercase macro parameters and add parenthesis.
6746         (B_CLR): Likewise.
6747         (B_TST): Likewise.
6748         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
6749         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
6750         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
6751         (same_or_base_type_p): Likewise.
6752         (cp_deprecated): Likewise.
6753
6754 2002-01-05  Richard Henderson  <rth@redhat.com>
6755
6756         * semantics.c (expand_body): Revert last change.
6757
6758 2002-01-04  Jason Merrill  <jason@redhat.com>
6759
6760         PR c++/4122
6761         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
6762         lost primary.
6763
6764         * class.c (build_vtbl_initializer): Check for a lost primary
6765         before calculating the vtable entry to throw away.
6766
6767 2002-01-02  Jason Merrill  <jason@redhat.com>
6768
6769         * semantics.c (expand_body): Call outlining_inline_function when
6770         emitting an inline function out of line.
6771
6772 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6773
6774         PR c++/5116, c++/764 reversion
6775         * call.c (build_new_op): Revert the instantiations. They are
6776         incorrect.
6777
6778 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6779
6780         PR c++/5089
6781         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
6782
6783 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6784
6785         PR c++/3716
6786         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
6787         (tsubst, case POINTER_TYPE): Handle pmfs here.
6788         (tsubst, case OFFSET_TYPE): Check it is not an offset to
6789         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
6790
6791 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6792
6793         PR c++/35
6794         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
6795         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
6796         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
6797         PARM_DECL.
6798         (tsubst_template_parms): Break up loop statements.
6799         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
6800         parm PARM_DECLs don't get promoted.
6801
6802 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6803
6804         PR c++/5123
6805         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
6806         (build_x_function_call): Cope with a COMPONENT_REF containing a
6807         TEMPLATE_ID_EXPR.
6808
6809 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6810
6811         PR c++/5213
6812         * pt.c (convert_template_argument): Be more careful determining
6813         when RECORD_TYPE templates are or are not templates.
6814
6815 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6816
6817         PR c++/775
6818         * cp-tree.h (handle_class_head): Adjust prototype.
6819         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
6820         parameters. Use for all class heads.
6821         * parse.y (named_class_head_sans_basetype, named_class_head,
6822         named_complex_class_head_sans_basetype,
6823         named_class_head_sans_basetype_defn,
6824         unnamed_class_head): Remove.
6825         (class_head, class_head_apparent_template): Recognize class heads
6826         (class_head_decl, class_head_defn): New reductions. Process class
6827         heads.
6828         (structsp): Adjust class definition and class declaration
6829         reductions.
6830         (maybe_base_class_list): Give diagnostic on empty list.
6831
6832 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6833
6834         PR c++/4379
6835         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
6836         single non-static member.
6837         (unary_complex_lvalue): If it cannot be a pointer to member, don't
6838         make it so. Check it is not pointer to reference.
6839
6840 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6841
6842         PR c++/5132
6843         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
6844         are processing a template decl.
6845
6846 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6847
6848         PR c++/5116, c++/764
6849         * call.c (build_new_op): Make sure template class operands are
6850         instantiated. Simplify arglist construction.
6851
6852 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6853
6854         * call.c (build_user_type_conversion_1): Use my_friendly_assert
6855         rather than if ... abort.
6856         * cvt.c (convert_to_reference): Likewise.
6857         * semantics.c (setup_vtbl_ptr): Likewise.
6858         * pt.c (lookup_template_class): Comment typo.
6859
6860 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6861
6862         PR c++/5125
6863         * pt.c (push_template_decl_real): Make sure DECL has
6864         DECL_LANG_SPECIFIC.
6865
6866 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6867
6868         PR c++/335
6869         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
6870         for non-reference fields.
6871         * typeck.c (require_complete_type): Use resolve_offset_ref).
6872
6873 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
6874
6875         PR c++/196
6876         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
6877
6878 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
6879
6880         PR c++/160
6881         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
6882         up. Don't stabilize_references when initializing a reference.
6883
6884 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6885
6886         * decl2.c (lang_f_options): Const-ify.
6887
6888 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
6889
6890         * config-lang.in (diff_excludes): Remove.
6891
6892 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
6893
6894         PR c++/90
6895         * typeck.c (build_function_call_real): Use original function
6896         expression for errors.
6897
6898 2001-12-18  Jason Merrill  <jason@redhat.com>
6899
6900         PR c++/3242
6901         * class.c (add_method): Do compare 'this' quals when trying to match a
6902         used function.  Don't defer to another used function.
6903
6904 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
6905
6906         * pt.c (instantiate_clone): Remove, fold into ...
6907         (instantiate_template): ... here. Simplify by removing mutual
6908         recursion.
6909         * typeck2.c (build_m_component_ref): Don't cv qualify the function
6910         pointed to by a pointer to function.
6911         * class.c (delete_duplicate_fields_1): Typo.
6912
6913 2001-12-18  Jason Merrill  <jason@redhat.com>
6914
6915         C++ ABI change: destroy value arguments in caller.
6916         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
6917         create an extra binding level for the parameters.
6918         * decl.c (store_parm_decls): Don't do parameter cleanups.
6919
6920 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
6921
6922         * call.c (build_new_method_call): Use '%#V'.
6923         * error.c (cv_to_string): Use V parameter to determine padding.
6924
6925 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
6926
6927         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
6928         spellings in messages.
6929
6930 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
6931
6932         * cp-tree.h: Delete #defines for cp_error, cp_warning,
6933         cp_pedwarn, and cp_compiler_error.
6934         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
6935         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
6936         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
6937         typeck2.c: Change calls to the above macros to use their
6938         language-independent equivalents: error, warning, pedwarn, and
6939         internal_error respectively.
6940
6941 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
6942
6943         * decl2.c (finish_file): Remove back_end_hook.
6944
6945 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
6946
6947         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
6948         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
6949         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
6950
6951 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
6952
6953         * lang-options.h: Use American spelling in messages.
6954
6955 2001-12-13  Jason Merrill  <jason@redhat.com>
6956
6957         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
6958
6959         Use cleanups to run base and member destructors.
6960         * init.c (push_base_cleanups): New function, split out from...
6961         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
6962         * decl.c (finish_destructor_body): Move vbase destruction code to
6963         push_base_cleanups.
6964         (begin_function_body, finish_function_body): New fns.
6965         (finish_function): Move [cd]tor handling and call_poplevel to
6966         finish_function_body.
6967         (pushdecl): Skip the new level.
6968         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
6969         (setup_vtbl_ptr): Call push_base_cleanups.
6970         * method.c (synthesize_method): Call {begin,end}_function_body.
6971         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
6972         * cp-tree.h: Declare new fns.
6973         * parse.y (function_body, .begin_function_body): New nonterminals.
6974         (fndef, pending_inline, function_try_block): Use function_body.
6975         (ctor_initializer_opt, function_try_block): No longer has a value.
6976         (base_init): Remove .set_base_init token.
6977         (.set_base_init, compstmt_or_error): Remove.
6978         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
6979
6980         * optimize.c (maybe_clone_body): Fix parameter updating.
6981
6982 2001-12-12  Jason Merrill  <jason@redhat.com>
6983
6984         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
6985         * semantics.c (genrtl_start_function): Don't pass
6986         parms_have_cleanups or push an extra binding level.
6987         (genrtl_finish_function): Lose cleanup_label cruft.
6988
6989         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
6990         (ctor_label): Remove.
6991         * semantics.c (finish_return_stmt): Lose ctor_label support.
6992         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
6993         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
6994         dtor_label.
6995
6996         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
6997         check for [cd]tors.
6998         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
6999
7000         * decl.c (finish_function): Check VMS_TARGET, not VMS.
7001
7002         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
7003         (end_cleanup_fn): And poplevel.
7004
7005         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
7006         if we're in a template.
7007
7008 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
7009
7010         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
7011         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
7012         THIS_NAME_P): Delete.
7013         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
7014         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
7015         with internal naming scheme.
7016         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
7017
7018 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
7019
7020         * decl.c (grokdeclarator): Deprecated implicit typename use.
7021
7022 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
7023
7024         PR g++/51
7025         * parse.y (frob_specs): Indicate it is a language linkage which
7026         contained the extern.
7027         * decl.c (grokdeclarator): Allow extern language linkage with
7028         other specifiers.
7029
7030 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
7031
7032         PR g++/72
7033         * decl.c (add_binding): Don't reject duplicate typedefs involving
7034         template parameters.
7035
7036 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
7037
7038         * parse.y, semantics.c: Similarly.
7039
7040 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
7041
7042         PR g++/87
7043         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
7044         (copy_args_p): Rename to ...
7045         (copy_fn_p): ... here.
7046         (grok_special_member_properties): New function.
7047         (grok_op_properties): Lose VIRTUALP parameter.
7048         (copy_assignment_arg_p): Remove.
7049         * call.c (build_over_call): Use copy_fn_p.
7050         * decl.c (grokfndecl): Reformat. Adjust call to
7051         grok_op_properties.
7052         (copy_args_p): Rename to ...
7053         (copy_fn_p): ... here. Reject template functions. Check for pass
7054         by value.
7055         (grok_special_member_properties): Remember special functions.
7056         (grok_ctor_properties): Don't remember them here, just check.
7057         (grok_op_properties): Likewise.
7058         (start_method): Call grok_special_member_properties.
7059         * decl2.c (grokfield): Likewise.
7060         (copy_assignment_arg_p): Remove.
7061         (grok_function_init): Don't remember abstract assignment here.
7062         * pt.c (instantiate_class_template): Call
7063         grok_special_member_properties.
7064         (tsubst_decl): Adjust grok_op_properties call.
7065
7066 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
7067
7068         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
7069         RID_TYPES_COMPATIBLE_P.
7070
7071 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7072
7073         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
7074         call to build_aggr_init.
7075         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
7076
7077 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
7078
7079         * parse.y: Replace uses of the string non-terminal with STRING.
7080         Don't perform string concatentaion here.
7081         (string): Remove non-terminal.
7082         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
7083
7084 2001-12-05  Jason Merrill  <jason@redhat.com>
7085
7086         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
7087         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
7088         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
7089         * pt.c (push_tinst_level): No longer static.
7090         * cp-tree.h: Declare them.
7091
7092         * init.c (resolve_offset_ref): Don't check access for the base
7093         conversion to access a FIELD_DECL.
7094
7095         * cp-tree.h (TYPE_REFFN_P): New macro.
7096         * decl.c (bad_specifiers): Check it, too.
7097
7098         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
7099         on the __*_type_info type if we haven't seen a definition.
7100
7101 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
7102
7103         * decl.c: Include c-common.h.
7104         (shadow_warning): Move to c-common.c.
7105
7106 2001-12-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7107
7108         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
7109
7110 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
7111
7112         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
7113
7114 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
7115
7116         PR g++/164
7117         * init.c (sort_base_init): Allow binfos to be directly specified.
7118         * method.c (do_build_copy_constructor): Explicitly convert to the
7119         base instance.
7120         (do_build_assign_ref): Likewise.
7121
7122 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
7123
7124         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
7125         declaration and initialization.
7126
7127 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
7128
7129         * typeck2.c: Remove leading capital from diagnostic messages, as
7130         per GNU coding standards.
7131
7132 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
7133
7134         PR c++/3394
7135         * decl.c (xref_basetypes): Handle attributes between
7136         'class' and name.
7137
7138 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
7139
7140         PR g++/3381
7141         * parse.y (named_complex_class_head_sans_basetype): Add new
7142         reduction.
7143         * Make-lang.in (parse.c): Adjust expected conflict count.
7144
7145 2001-12-03  Jason Merrill  <jason@redhat.com>
7146
7147         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
7148         immediate binfos for our virtual bases.
7149
7150 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
7151
7152         * call.c (build_java_interface_fn_ref): Similarly.
7153         * except.c (is_admissible_throw_operand): Similarly.
7154         * init.c (build_java_class_ref): Similarly.
7155         * xref.c (open_xref_file): Similarly.
7156
7157 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7158
7159         * class.c (finish_struct): Remove trailing periods from messages.
7160         * decl.c (check_tag_decl): Similarly.
7161         * lex.c (cxx_set_yydebug): Similarly.
7162         * typeck2.c (friendly_abort): Similarly.
7163
7164 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
7165
7166         PR c++/3048
7167         * cp-tree.h (ovl_member): Remove.
7168         * decl2.c (merge_functions): Handle extern "C" functions
7169         specially.
7170         * tree.c (ovl_member): Remove.
7171
7172 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
7173
7174         PR c++/4842
7175         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
7176         FUNCTION_DECL, as input.
7177         (mark_overriders): Remove.
7178         (warn_hidden): Rework for the new ABI.
7179
7180 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
7181
7182         PR c++/3471
7183         * call.c (convert_like_real): Do not build additional temporaries
7184         for rvalues of class type.
7185
7186 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
7187
7188         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
7189         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
7190         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
7191         (DERIVED_FROM_P): Likewise.
7192         (enum base_access): Renumber, add ba_quiet bit mask.
7193         (get_binfo): Remove.
7194         (get_base_distance): Remove.
7195         (binfo_value): Remove.
7196         (ACCESSIBLY_DERIVED_FROM_P): Remove.
7197         * call.c (standard_conversion): Use lookup_base.
7198         * class.c (strictly_overrides): Likewise.
7199         (layout_virtual_bases): Likewise.
7200         (warn_about_ambiguous_direct_bases): Likewise.
7201         (is_base_of_enclosing_class): Likewise.
7202         (add_vcall_offset_vtbl_entries_1): Likewise.
7203         * cvt.c (build_up_reference): Adjust comment.
7204         * init.c (build_member_call): Reformat.
7205         * search.c (get_binfo): Remove.
7206         (get_base_distance_recursive): Remove.
7207         (get_base_distance): Remove.
7208         (lookup_base_r): Tweak.
7209         (lookup_base): Add ba_quiet control. Complete the types here.
7210         (covariant_return_p): Use lookup_base.
7211         * tree.c (binfo_value): Remove.
7212         (maybe_dummy_object): Use lookup_base.
7213         * typeck.c (build_static_cast): Use lookup_base.
7214         (get_delta_difference): Likewise.
7215         * typeck2.c (binfo_or_else): Use lookup_base.
7216         (build_scoped_ref): Add back error_mark_check.
7217         (build_m_component_ref): Use lookup_base.
7218
7219 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
7220
7221         * Make-lang.in (c++.generated-manpages): New dummy target.
7222
7223 2001-11-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7224
7225         * Make-lang.in (cp-lang.o): Depends on c-common.h.
7226         * cp-lang.c (c-common.h): Include.
7227         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
7228         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
7229         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
7230
7231 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
7232
7233         * decl2.c (c_language): Move to c-common.c.
7234         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
7235         functions.
7236         (cxx_init): Update.
7237
7238 2001-11-26  Jason Merrill  <jason@redhat.com>
7239
7240         * call.c (joust): Remove COND_EXPR hack.
7241
7242 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
7243
7244         * search.c (lookup_base_r): Declare bk in variable declaration
7245         space.
7246
7247 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
7248
7249         PR g++/3145
7250         * class.c (build_vbase_pointer): Remove.
7251         (build_vbase_path): Remove.
7252         (build_base_path): New function.
7253         * cp-tree.h (base_access, base_kind): New enumerations.
7254         (build_base_path): Declare.
7255         (convert_pointer_to_real): Remove.
7256         (convert_pointer_to): Remove.
7257         (lookup_base): Declare.
7258         (convert_pointer_to_vbase): Remove.
7259         * call.c (build_scoped_method_call): Use lookup_base &
7260         build_base_path instead of convert_pointer_to_real,
7261         get_base_distance & get_binfo.
7262         (build_over_call): Likewise.
7263         * cvt.c (cp_convert_to_pointer): Likewise.
7264         (convert_to_pointer_force): Likewise.
7265         (build_up_reference): Likewise.
7266         (convert_pointer_to_real): Remove.
7267         (convert_pointer_to): Remove.
7268         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
7269         instead of convert_pointer_to_vbase & build_vbase_path.
7270         (emit_base_init): Use build_base_path instead of
7271         convert_pointer_to_real.
7272         (expand_virtual_init): Lose unrequired conversions.
7273         (resolve_offset_ref): Use lookup_base and build_base_path
7274         instead of convert_pointer_to.
7275         * rtti.c (build_dynamic_cast_1): Use lookup_base &
7276         build_base_path instead of get_base_distance & build_vbase_path.
7277         * search.c (get_vbase_1): Remove.
7278         (get_vbase): Remove.
7279         (convert_pointer_to_vbase): Remove.
7280         (lookup_base_r): New function.
7281         (lookup_base): New function.
7282         * typeck.c (require_complete_type): Use lookup_base &
7283         build_base_path instead of convert_pointer_to.
7284         (build_component_ref): Likewise.
7285         (build_x_function_call): Likewise.
7286         (get_member_function_from_ptrfunc): Likewise.
7287         (build_component_addr): Likewise.
7288         * typeck2.c (build_scoped_ref): Likewise.
7289
7290 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7291
7292         * cp-tree.h (CP_TYPE_QUALS): Removed.
7293         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
7294         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
7295         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
7296         * dump.c (cp_dump_tree): Use void* dump_info argument to match
7297         lang-hooks prototype.
7298         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
7299         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
7300         CP_TYPE_QUALS changed to cp_type_quals.
7301         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
7302         (CXX_C_OBJS): Remove c-dump.o.
7303
7304 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
7305
7306         PR c++/3637
7307         * pt.c (lookup_template_class): Ensure that all specializations
7308         are registered on the list corresponding to the most general
7309         template.
7310
7311 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
7312
7313         * call.c (non_reference): Add documentation.
7314         (convert_class_to_reference): Do not strip reference types
7315         from conversion operators.
7316         (maybe_handle_ref_bind): Simplify.
7317         (compare_ics): Correct handling of references.
7318
7319 2001-11-19  John Wilkinson <johnw@research.att.com>
7320
7321         * dump.c (dump_op): New function.
7322         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
7323         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
7324         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
7325
7326 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
7327
7328         PR4629
7329         * semantics.c (finish_sizeof): Make sure that expression created
7330         while processing a template do not have a type.
7331         (finish_alignof): Likewise.
7332         * typeck.c (c_sizeof): Likewise.
7333         (expr_sizeof): Likewise.
7334
7335 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
7336
7337         * lex.c (cxx_finish): Call c_common_finish.
7338         (finish_parse): Remove.
7339
7340 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7341
7342         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
7343         when displaying error message about missing array bounds.
7344
7345 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7346
7347         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
7348         CONST_CAST_EXPR.
7349         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
7350
7351 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
7352
7353         * cp-tree.h (print_class_statistics): Restore.
7354
7355 2001-11-15  Jason Merrill  <jason@redhat.com>
7356
7357         * method.c (use_thunk): Don't emit debugging information for thunks.
7358
7359         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
7360         * decl.c (make_typename_type): Handle getting a class template.
7361         * search.c (lookup_field_r): A class template is good enough for
7362         want_type.
7363
7364         * call.c (convert_like_real): Only use cp_convert for the bad part.
7365         (standard_conversion): Also allow bad int->enum.
7366         * typeck.c (ptr_reasonably_similar): Also allow functions to
7367         interconvert.  Pointers to same-size integers are reasonably
7368         similar.
7369
7370         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
7371         give it void type.
7372
7373 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
7374
7375         PR g++/3154
7376         * init.c (sort_base_init): Remove unreachable code.
7377         (expand_member_init): Adjust comment to reflect reality. Simplify
7378         and remove unreachable code.
7379
7380 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
7381
7382         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
7383         (cxx_init): Update prototype.
7384         * decl.c (init_decl_processing): Rename.  Move null node init
7385         to its creation time.
7386         * lex.c (cxx_init_options): Update.
7387         (cxx_init): Combine with old init_parse; also call
7388         cxx_init_decl_processing.
7389
7390 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
7391
7392         * decl.c (check_initializer): Try to complete the type of an
7393         array element before checking whether it's complete.  Don't
7394         complain about arrays with complete element types but an
7395         unknown size.
7396         (cp_finish_decl): Build the hierarchical constructor before
7397         calling maybe_deduce_size_from_array_init.
7398
7399 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
7400
7401         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
7402
7403 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
7404
7405         PR g++/4206
7406         * parse.y (already_scoped_stmt): Remove.
7407         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
7408
7409 2001-11-12  H.J. Lu <hjl@gnu.org>
7410
7411         * cvt.c (ocp_convert): Don't warn the address of a weak
7412         function is always `true'.
7413
7414 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
7415
7416         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
7417         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
7418         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
7419         * cp-tree.h (print_class_statistics): Remove.
7420         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
7421         cxx_print_identifier, cxx_set_yydebug): New.
7422         * lex.c (set_yydebug): Rename c_set_yydebug.
7423         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
7424         lang_print_xnode): Rename.
7425         * tree.c (print_lang_statistics): Rename.
7426
7427 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7428
7429         * class.c (dump_array): Fix format specifier warning.
7430
7431 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
7432
7433         * cp-lang.c (LANG_HOOKS_NAME): Override.
7434         (struct lang_hooks): Constify.
7435         * lex.c (cxx_init_options): Update.
7436         (lang_identify): Remove.
7437         * parse.y (language_string): Remove.
7438
7439 2001-11-08  Andreas Franck  <afranck@gmx.de>
7440
7441         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
7442         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
7443         suggested by autoconf.
7444         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
7445         (c++.install-common): Use the transformed target alias names.
7446
7447 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7448
7449         * Make-lang.in: Update.
7450         * cp-lang.c: Include langhooks-def.h.
7451
7452 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7453
7454         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
7455
7456 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7457
7458         * lex.c (copy_lang_type): Add static prototype.
7459
7460 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7461
7462         * pt.c (unify): Handle SCOPE_REF.
7463
7464 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
7465
7466         * tree.c (cp_copy_res_decl_for_inlining): Adjust
7467         DECL_ABSTRACT_ORIGIN for the return variable.
7468
7469 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
7470
7471         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
7472
7473 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
7474
7475         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
7476         semantics.c, spew.c: Fix spelling errors.
7477
7478 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7479
7480         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
7481
7482 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
7483
7484         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
7485         pop_everything.
7486
7487 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7488
7489         * cp-lang.c (cxx_get_alias_set): New function.
7490         Point LANG_HOOKS_GET_ALIAS_SET to it.
7491
7492 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7493
7494         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
7495         * cp-tree.h (make_unbound_class_template): Prototype new function.
7496         * decl.c (make_unbound_class_template): New function.
7497         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
7498         * error.c (dump_type): Likewise.
7499         * mangle.c (write_type): Likewise.
7500         * parse.y (template_parm): Likewise.
7501         (template_argument): Use make_unbound_class_template.
7502         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
7503         (tsubst): Likewise.
7504         (tsubst_copy): Likewise.
7505         (unify): Likewise.
7506         * tree.c (walk_tree): Likewise.
7507         * typeck.c (comptypes): Likewise.
7508
7509 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7510
7511         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
7512         extra calls into fewer ones.
7513
7514 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
7515
7516         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
7517         Warn when merging inline with attribute noinline.
7518         (start_decl, start_function): Warn if inline and attribute
7519         noinline appear in the same declaration.
7520
7521 2001-10-16  H.J. Lu <hjl@gnu.org>
7522
7523         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
7524         for tree checking disabled.
7525
7526 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
7527
7528         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
7529         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
7530
7531 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
7532
7533         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
7534         (unify): Only handle MINUS_EXPR specially if the above flag is set
7535         and the subtracted constant is 1.  Clear the flag on recursive calls.
7536         Set it when unifying the maximum value in an INTEGER_TYPE's range.
7537
7538 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
7539
7540         * decl.c (bad_specifiers): Don't allow exception specifications
7541         on any typedefs.
7542
7543 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
7544
7545         * cp/lex.c (init_cp_pragma): Similarly.
7546
7547 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7548
7549         * pt.c (lookup_template_class): Build complete template arguments
7550         for BOUND_TEMPLATE_TEMPLATE_PARM.
7551
7552 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7553
7554         * cp-tree.h (TYPE_BINFO): Update comment.
7555         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
7556         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
7557         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
7558         (copy_type): Prototype new function.
7559         * lex.c (copy_lang_decl): Gather tree node statistics.
7560         (copy_lang_type): New function.
7561         (copy_type): Likewise.
7562         (cp_make_lang_type): Create lang_type for
7563         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
7564         and BOUND_TEMPLATE_TEMPLATE_PARM.
7565         * pt.c (tsubst): Use copy_type instead of copy_node.
7566         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
7567
7568 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7569
7570         * pt.c (determine_specialization): Ignore functions without
7571         DECL_TEMPLATE_INFO.
7572
7573 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
7574
7575         PR g++/4476
7576         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
7577
7578 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
7579
7580         * typeck2.c (store_init_value): Don't re-digest a bracketed
7581         initializer.
7582
7583         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
7584         ANON_AGGR_TYPE_P.
7585
7586 2001-10-11  Richard Henderson  <rth@redhat.com>
7587
7588         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
7589         of an asm statement.
7590         (build_vtbl_ref_1): Split out from build_vtbl_ref.
7591         (build_vfn_ref): Use it to handle vtable descriptors before
7592         calling build_vtable_entry_ref.
7593         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
7594
7595 2001-10-10  Richard Henderson  <rth@redhat.com>
7596
7597         * parse.y (asm_operand): Allow named operands.
7598         * semantics.c (finish_asm_stmt): Tweek for changed location
7599         of the operand constraint.
7600
7601 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
7602
7603         * call.c (standard_conversion): Add bad conversion between
7604         integers and pointers.
7605         (convert_like_real): Don't use convert_for_initialization for bad
7606         conversions; complain here and use cp_convert.
7607         (build_over_call): Don't handle bad conversions specially.
7608         (perform_implicit_conversion): Allow bad conversions.
7609         (can_convert_arg_bad): New fn.
7610         * cp-tree.h: Declare it.
7611         * typeck.c (convert_for_assignment): Use it.
7612         (ptr_reasonably_similar): Any target type is similar to void.
7613
7614 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
7615
7616         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
7617         (cp/cp-lang.o): New rule.
7618         * cp-tree.h: Declare hooks.
7619         * tree.c: Make hooks non-static.
7620         (init_tree): Don't initialize hooks here.
7621         * lex.c: Likewise.  Move definition of lang_hooks to...
7622         * cp-lang.c: ... new file.
7623
7624 2001-10-08  Richard Henderson  <rth@redhat.com>
7625
7626         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
7627         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
7628
7629 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7630
7631         * class.c (build_vtable_entry_ref): Const-ify.
7632         * decl.c (predefined_identifier,
7633         initialize_predefined_identifiers): Likewise.
7634         * init.c (build_new_1): Likewise.
7635         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
7636         Likewise.
7637
7638 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
7639
7640         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
7641         (INSNS_PER_STMT): Likewise.
7642         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
7643         (copy_body, initialize_inlined_parameters): Likewise.
7644         (declare_return_variable, inlinable_function_p): Likewise.
7645         (expand_call_inline, expand_calls_inline): Likewise.
7646         (optimize_inline_calls, clone_body): Likewise.
7647         * tree.c (walk_tree): Moved to ../tree-inline.c.
7648         (walk_tree_without_duplicates): Likewise.
7649         (copy_tree_r, remap_save_expr): Likewise.
7650
7651 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
7652
7653         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
7654         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
7655         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
7656         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
7657         (flag_inline_trees): Moved declaration to ../tree-inline.h.
7658         (walk_tree): Moved declaration to ../tree-inline.h.
7659         (walk_tree_without_duplicates, copy_tree_r): Likewise.
7660         (remap_save_expr): Likewise.
7661         * decl.c: Include tree-inline.h.
7662         (lang_mark_tree): Don't mark inlined_fns.
7663         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
7664         * optimize.c: Include tree-inline.h.
7665         (optimize_inline_calls): Move declaration to ../tree.h, as
7666         non-static.
7667         (remap_decl): Use language-independent constructs and hooks.
7668         (remap_block, copy_body_r, declare_return_variable): Likewise.
7669         (inlinable_function_p): Likewise.  Don't test for
7670         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
7671         no longer language-specific.
7672         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
7673         call of dump_function to...
7674         (optimize_function): Here...
7675         (clone_body): New function, extracted from...
7676         (maybe_clone_body): ... here.  Build decl_map locally and pass
7677         it on to clone_body.
7678         * pt.c, semantics.c: Include tree-inline.h.
7679         * tree.c: Likewise.
7680         (cp_walk_subtrees): New language-specific hook for tree inlining.
7681         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
7682         cp_is_overload_p, cp_auto_var_in_fn_p,
7683         cp_copy_res_decl_for_inlining): Likewise.
7684         (walk_tree): Move language-specific constructs into...
7685         (cp_walk_subtrees): this new function.
7686         (copy_tree_r): Use language-independent constructs and hooks.
7687         (init_tree): Initialize tree inlining hooks.
7688         (remap_save_expr): Adjust prototype so that the declaration
7689         does not require the definition of splay_tree.
7690
7691 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7692
7693         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
7694         to build the declaration instead of the declaration itself.
7695
7696 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
7697
7698         * decl2.c (cxx_decode_option): Add 'else'.
7699
7700         * spew.c (end_input): No longer static.
7701         * cp-tree.h: Declare it.
7702         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
7703
7704 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
7705
7706         * call.c (build_over_call), typeck.c (build_function_call_real):
7707         Pass type attributes to check_function_format rather than name or
7708         assembler name.  Don't require there to be a name or assembler
7709         name to check formats.
7710
7711 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
7712
7713         * decl.c (init_decl_processing): Don't call
7714         init_function_format_info.  Initialize lang_attribute_table
7715         earlier.
7716         (builtin_function): Call decl_attributes.
7717         (insert_default_attributes): New.
7718
7719 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
7720
7721         * decl.c (grokdeclarator): Copy array typedef handling from C
7722         frontend.
7723
7724         * decl.c (grokdeclarator): Copy too-large array handling from C
7725         frontend.
7726
7727 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
7728
7729         * config-lang.in (target_libs): Added target-gperf, so that we
7730         don't try to build it if C++ is disabled.
7731
7732 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
7733
7734         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
7735         (cp/errfn.o): Delete rule.
7736         (cp/error.o): Depend on flags.h.
7737         * errfn.c: Delete file.
7738         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
7739         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
7740         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
7741         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
7742         internal_error respectively.  Make cp_deprecated into a macro.
7743         Don't define cp_printer typedef or declare cp_printers.
7744         * error.c: Include flags.h.
7745         Delete: struct tree_formatting_info, print_function_argument_list,
7746         print_declaration, print_expression, print_function_declaration,
7747         print_function_parameter, print_type_id, print_cv_qualifier_seq,
7748         print_type_specifier_seq, print_simple_type_specifier,
7749         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
7750         print_parameter_declaration_clause, print_exception_specification,
7751         print_nested_name_specifier, and definition of cp_printers.
7752         (locate_error): New function.
7753         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
7754         rewritten in terms of locate_error and diagnostic.c.
7755         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
7756         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
7757         (init_error): Adjust to match.
7758
7759 2001-09-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7760
7761         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
7762
7763 2001-09-21  Richard Henderson  <rth@redhat.com>
7764
7765         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
7766         (build_vtbl_initializer): Likewise.
7767         (build_vfn_ref): New.
7768         * cp-tree.h: Declare it.
7769         * call.c (build_over_call): Use it.
7770         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
7771         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
7772
7773 2001-09-21  J"orn Rennecke <amylaar@redhat.com>
7774
7775         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
7776
7777 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
7778
7779         Table-driven attributes.
7780         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
7781         * decl2.c (cplus_decl_attributes): Only take one attributes
7782         parameter.
7783         * cp-tree.c (cplus_decl_attributes): Update prototype.
7784         * class.c (finish_struct), decl.c (start_decl, start_function),
7785         decl2.c (grokfield), friend.c (do_friend), parse.y
7786         (parse_bitfield): Update calls to cplus_decl_attributes.
7787         * decl.c (grokdeclarator): Take a pointer to a single ordinary
7788         attribute list.
7789         * decl.h (grokdeclarator): Update prototype.
7790         * decl2.c (grokfield): Take a single ordinary attribute list.
7791         * friend.c (do_friend): Likewise.
7792         * decl.c (shadow_tag, groktypename, start_decl,
7793         start_handler_parms, grokdeclarator, grokparms, start_function,
7794         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
7795         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
7796         (process_template_parm, do_decl_instantiation): Pass single
7797         ordinary attribute lists around.
7798         * decl.c (grokdeclarator): Correct handling of nested attributes.
7799         Revert the patch
7800         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
7801                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
7802                 not the left.
7803         .
7804         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
7805         (cp_attribute_table): Declare.
7806         * decl.c (valid_lang_attribute): Don't define.
7807         (lang_attribute_table): Define.
7808         (init_decl_processing): Initialize lang_attribute_table instead of
7809         valid_lang_attribute.
7810         * tree.c (cp_valid_lang_attribute): Remove.
7811         (handle_java_interface_attribute, handle_com_interface_attribute,
7812         handle_init_priority_attribute): New functions.
7813         (cp_attribute_table): New array.
7814         * decl2.c (import_export_class): Don't use
7815         targetm.valid_type_attribute.
7816
7817 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7818
7819         * Make-lang.in (cp/error.o): Depend on real.h
7820         * error.c: #include "real.h"
7821
7822 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7823
7824         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
7825         xmalloc/strcpy/strcat.
7826
7827 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7828
7829         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
7830         Const-ification.
7831         * pt.c (tsubst_decl): Likewise.
7832
7833 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7834
7835         * decl2.c (lang_f_options): Const-ification.
7836         * lex.c (cplus_tree_code_name): Likewise.
7837         * spew.c (yyerror): Likewise.
7838
7839 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
7840
7841         PR c++/3986
7842         * class.c (force_canonical_binfo_r): Check & move an indirect
7843         primary base first.
7844         (force_canonical_binfo): Check that it's not already
7845         canonical.
7846         (mark_primary_virtual_base): Remove BINFO parameter.
7847         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
7848
7849 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
7850
7851         Remove TYPE_NONCOPIED_PARTS.
7852         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
7853         CLASSTYPE_PURE_VIRTUALS.
7854         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
7855         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
7856         (layout_class_type): Don't call fixup_inline_methods here ...
7857         (finish_struct_1): ... call it here.
7858
7859 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
7860
7861         * decl.c (duplicate_decls): Remove code deadling with
7862         DECL_SAVED_INSNS.
7863         * decl2.c (finish_file): Likewise.
7864         * pt.c (instantiate_decl): Likewise.
7865         * semantics.c (expand_body): Don't defer local functions if
7866         they wouldn't be deferred for some other reason.  Don't
7867         generate RTL for functions that will not be emitted.
7868         (genrtl_start_function): Remove code deadling with
7869         DECL_SAVED_INSNS.
7870         (genrtl_finish_function): Likewise.
7871
7872 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
7873
7874         PR c++/4203
7875         * call.c (build_over_call): Do not optimize any empty base
7876         construction.
7877
7878 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7879
7880         * error.c (dump_template_decl): Output template parameters
7881         together with their specifiers.
7882         Output `class' prefix for template template parameter.
7883         (dump_decl): Fix formatting.
7884
7885 2001-08-30  Kurt Garloff  <garloff@suse.de>
7886
7887         * optimize.c (inlinable_function_p): Allow only smaller single
7888         functions. Halve inline limit after reaching recursive limit.
7889
7890 2001-08-30  Joern Rennecke <amylaar@redhat.com>
7891             Jason Merrill  <jason_merrill@redhat.com>
7892
7893         * class.c (build_vtable_entry_ref): Subtract in char*, not
7894         ptrdiff_t.
7895
7896 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
7897
7898         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
7899         (build_cplus_array_type): Use cp_build_qualified_type, not
7900         TYPE_MAIN_VARIANT, to get an unqualified version.
7901
7902         * decl2.c (grok_alignof): Lose.
7903         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
7904         * typeck.c (c_alignof): Lose.
7905         * semantics.c (finish_sizeof, finish_alignof): New.
7906         * parse.y: Use them.
7907         * cp-tree.h: Declare them.
7908
7909 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
7910
7911         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
7912         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
7913         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
7914
7915 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
7916
7917         * typeck2.c (add_exception_specifier): Only require complete type if
7918         not in processing template declaration.
7919
7920 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7921
7922         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
7923         GNU_xref_start_scope and GNU_xref_end_scope.
7924
7925         * tree.c (TYPE_HASH): Moved to ../tree.h.
7926
7927 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
7928
7929         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
7930         on COMPOUND_EXPRs.
7931
7932 2001-08-14  Richard Henderson  <rth@redhat.com>
7933
7934         * class.c, cp-tree.h (build_vfn_ref): Remove.
7935         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
7936
7937 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
7938
7939         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
7940         empty class assignment as having side-effects to avoid
7941         spurious warnings.
7942
7943 2001-08-13  Zack Weinberg  <zackw@panix.com>
7944
7945         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
7946         * except.c: Include libfuncs.h.
7947
7948 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7949
7950         * decl.c (grokdeclarator): Clarify diagnostic message.
7951
7952 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7953
7954         * decl2.c (do_nonmember_using_decl): Replace using directive
7955         with using declaration in the error message.
7956
7957 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7958
7959         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
7960         criterion to avoid rebuilding expression tree instead of
7961         processing_template_decl.
7962
7963 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
7964
7965         Support named return value optimization for inlines, too.
7966         * decl.c (finish_function): Nullify returns here.
7967         * semantics.c (genrtl_start_function): Not here.
7968         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
7969         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
7970         Also nullify the CLEANUP_STMT for the nrv.
7971         * cp-tree.h: Declare it.
7972         * optimize.c (declare_return_variable): Replace the nrv with the
7973         return variable.
7974         * typeck.c (check_return_expr): Be more flexible on alignment check.
7975         Ignore cv-quals when checking for a matching type.
7976
7977 2001-08-09  Richard Henderson  <rth@redhat.com>
7978
7979         * decl2.c (finish_objects): Use target hooks instead of
7980         assemble_constructor and assemble_destructor.
7981
7982 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7983
7984         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
7985
7986 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
7987
7988         PR c++/3820
7989         Stop using TYPE_NONCOPIED_PARTS.
7990         * call.c (build_over_call): Be careful when copy constructing
7991         or assigning to an empty class.
7992         * class.c (check_bases_and_members): It has a
7993         COMPLEX_ASSIGN_REF if it has a vptr.
7994         (layout_class_type): Don't add empty class padding to
7995         TYPE_NONCOPIED_PARTS.
7996         (finish_struct_1): Don't add the VFIELD either.
7997         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
7998         initialization.
7999
8000 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
8001
8002         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
8003
8004 2001-08-06  Richard Henderson  <rth@redhat.com>
8005
8006         * decl2.c (finish_objects): Pass a symbol_ref and priority to
8007         assemble_{constructor,destructor}.  Remove priority handling.
8008
8009 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8010
8011         Don't allow template-id in using-declaration.
8012         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
8013         (do_class_using_decl): Likewise.
8014
8015 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8016
8017         * cp/spew.c (read_token): No need to pop buffers.
8018
8019 2001-08-02  Stan Shebs  <shebs@apple.com>
8020
8021         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
8022         (fnaddr_from_vtable_entry): Remove decl.
8023         * method.c (use_thunk): Update comment.
8024
8025 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
8026
8027         * repo.c (get_base_filename): Change return value to const char
8028         pointer.
8029
8030 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
8031
8032         Kill -fhonor-std.
8033         * NEWS: Document.
8034         * cp-tree.h (flag_honor_std): Remove.
8035         (CPTI_FAKE_STD): Remove.
8036         (std_node): Remove comment about it being NULL.
8037         (fake_std_node): Remove.
8038         * decl.c (in_fake_std): Remove.
8039         (walk_namespaces_r): Remove fake_std_node check.
8040         (push_namespace): Remove in_fake_std code.
8041         (pop_namespace): Likewise.
8042         (lookup_name_real): Remove fake_std_node check.
8043         (init_decl_processing): Always create std_node. Always add
8044         std:: things there.
8045         (builtin_function): Always put non '_' fns in std.
8046         * decl2.c (flag_honor_std): Remove.
8047         (lang_f_options): Remove honor-std.
8048         (unsupported_options): Add honor-std.
8049         (set_decl_namespace): Remove fake_std_node check.
8050         (validate_nonmember_using_decl): Likewise.
8051         (do_using_directive): Likewise.
8052         (handle_class_head): Likewise.
8053         * dump.c (cp_dump_tree): Likewise.
8054         * except.c (init_exception_processing): Adjust.
8055         * init.c (build_member_call): Remove fake_std_node check.
8056         (build_offset_ref): Likewise.
8057         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
8058         * rtti.c (init_rtti_processing): Adjust.
8059
8060 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
8061
8062         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
8063         operand while calling cp_tree_equal.
8064
8065 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
8066
8067         The 3.0 ABI no longer has vbase pointer fields.
8068         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
8069         FORMAT_VBASE_NAME): Remove.
8070         * method.c (do_build_copy_constructor): Adjust.
8071         (do_build_assign_ref): Adjust.
8072         * search.c (lookup_field_r): Adjust.
8073         * typeck.c (build_component_ref): Adjust.
8074
8075         The 3.0 ABI always has a vtable pointer at the start of every
8076         polymorphic class.
8077         * rtti.c (build_headof_sub): Remove.
8078         (build_headof): Adjust.
8079         (get_tinfo_decl_dynamic): No need to check flag_rtti
8080         here. Adjust.
8081         (create_real_tinfo_var): Explain why we need a hidden name.
8082
8083 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
8084
8085         PR c++/3631
8086         * class.c (update_vtable_entry_for_fn): The fixed adjustment
8087         of a virtual thunk should be from declaring base.
8088
8089 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
8090
8091         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
8092         the shared virtual base, so preserving inheritance graph order.
8093
8094 2001-07-30  Andreas Jaeger  <aj@suse.de>
8095
8096         * decl2.c: Remove unused var global_temp_name_counter.
8097
8098 2001-07-28  Richard Henderson  <rth@redhat.com>
8099
8100         * method.c (pending_inlines): Remove.
8101
8102 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
8103
8104         * class.c (mark_primary_virtual_base): Don't adjust base
8105         offsets here.
8106         (dfs_unshared_virtual_bases): Adjust them here.
8107         (mark_primary_bases): Explain why we adjust at the end.
8108
8109 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
8110
8111         * class.c (finish_struct_1): When copying the primary base's
8112         VFIELD, make sure we find it is at offset zero.
8113
8114 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8115
8116         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
8117         tsubst_expr for default template arguments.
8118
8119 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
8120
8121         PR c++/3621
8122         * spew.c (yylex): Only copy the token's lineno, if it is
8123         nonzero.
8124
8125 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
8126
8127         PR c++/3624
8128         * call.c (resolve_args): Simplify, call
8129         convert_from_reference.
8130         (build_new_op): Resolve and convert from reference ARG1
8131         earlier. Adjust ARG2 & ARG3 resolve and conversion.
8132
8133 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
8134
8135         * decl.c (last_function_parm_tags): Remove.
8136         (current_function_parm_tags): Remove.
8137         (init_decl_processing): Adjust.
8138         (start_function): Adjust.
8139         (store_parm_decls): Adjust.
8140
8141         PR c++/3152
8142         * decl.c (grokdeclarator): Detect when a function typedef is
8143         declaring a function, and create last_function_parms correctly.
8144
8145 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
8146
8147         * call.c (joust): Only prefer a non-builtin candidate to a builtin
8148         one if they have the same signature.
8149
8150         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
8151         it rather than toplevel_bindings_p.  Give it a mangled name if static.
8152         (convert_to_reference): Adjust.
8153         * decl2.c (get_temp_name): Lose.
8154         * mangle.c (mangle_ref_init_variable): New fn.
8155         (mangle_guard_variable): Strip the ref-init header.
8156         * cp-tree.h: Adjust.
8157         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
8158         initializer.
8159         (grok_reference_init): Always use DECL_INITIAL.
8160
8161 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8162
8163         PR c++/3416
8164         * call.c (build_conditional_expr): Recheck args after
8165         conversions.
8166         * cp-tree.h (build_conditional_expr): Move to correct file.
8167         * typeck.c (decay_conversion): Diagnose any unknown types
8168         reaching here.
8169         (build_binary_op): Don't do initial decay or default
8170         conversions on overloaded functions.
8171         (build_static_cast): Don't do a decay conversion here.
8172
8173 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8174
8175         PR c++/3543
8176         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
8177         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
8178
8179 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8180
8181         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
8182         (create_vtbl_ptr): ... here.
8183
8184 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8185
8186         * class.c (build_vbase_offset_vbtl_entries): Look for
8187         non-primary base of which we are a sub vtable.
8188
8189 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
8190
8191         * semantics.c (finish_this_expr):  Remove unused code.
8192
8193 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
8194
8195         Simplify rtti, now we've only one ABI.
8196         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
8197         CPTI_TINFO_VAR_ID.
8198         (tinfo_decl_id, tinfo_var_id): Remove.
8199         (get_typeid_1): Remove.
8200         * rtti.c
8201         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
8202         (typeid_ok_p): New function.
8203         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
8204         (get_tinfo_decl): Remove old abi documentation.
8205         (tinfo_from_decl): Remove.
8206         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
8207         (get_typeid_1): Remove.
8208         (get_base_offset): Remove.
8209         (synthesize_tinfo_var): Absorb get_base_offset.
8210         (create_real_tinfo_var): Don't use tinfo_decl_id.
8211
8212 2001-07-23  Graham Stott  <grahams@redhat.com>
8213
8214         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
8215         variable has_two_argument_delete_p.
8216
8217 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
8218
8219         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
8220         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
8221         (CPTI_INDEX_IDENTIFIER): Remove.
8222         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
8223         (delta2_identifier): Remove.
8224         (index_identifier): Remove.
8225         (pfn_or_delta2_identifier): Remove.
8226         (flag_vtable_thunks): Remove.
8227         (VTABLE_DELTA2_NAME): Remove.
8228         (VTABLE_INDEX_NAME): Remove.
8229         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
8230         (vfunc_ptr_type_node): Adjust.
8231         (VTABLE_NAME_PREFIX): Adjust.
8232         (build_vfn_ref): Lose first parameter.
8233         (fixup_all_virtual_upcast_offsets): Remove.
8234         * decl.c (initialize_predefined_identifiers): Remove
8235         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
8236         (init_decl_processing): Remove no-vtable-thunk code.
8237         * decl2.c (flag_vtable_thunks): Remove.
8238         (mark_vtable_entries): Remove no-vtable-thunk code.
8239         * error.c (dump_decl): Remove no-vtable-thunk code.
8240         (dump_expr): Adjust ptr to member function code.
8241         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
8242         code.
8243         * rtti.c (build_headof): Remove no-vtable-thunk code.
8244         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
8245         * search.c (get_base_distance): Remove expand_upcast_fixups case.
8246         (virtual_context) Remove.
8247         (expand_upcast_fixups): Remove.
8248         (fixup_virtual_upcast_offsets): Remove.
8249         (fixup_all_virtual_upcast_offsets): Remove.
8250         * typeck.c (get_member_function_from_ptrfunc): Remove
8251         no-vtable-thunk code.
8252         * call.c (build_over_call): Adjust call to build_vfn_ref.
8253         * class.c (build_vfn_ref): Lose first parameter. Remove
8254         no-vtable-thunk code.
8255         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
8256         (build_vtable_entry): Remove no-vtable-thunk code.
8257
8258 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
8259
8260         Remove old-abi remnants. Remove comments about old abi
8261         behavior. Remove references to 'new-abi' in comments.
8262         * cp-tree.h: Adjust comments.
8263         (vbase_offsets_in_vtable_p): Delete.
8264         (vcall_offsets_in_vtable_p): Delete.
8265         (vptrs_present_everywhere_p): Delete.
8266         (all_overridden_vfuns_in_vtables_p): Delete.
8267         (merge_primary_and_secondary_vtables_p): Delete.
8268         (TYPE_CONTAINS_VPTR_P): Adjust.
8269         (VTT_NAME_PREFIX): Remove.
8270         (CTOR_VTBL_NAME_PREFIX): Remove.
8271         (init_vbase_pointers): Remove.
8272         * class.c: Adjust coments.
8273         (build_vbase_pointer_fields): Delete.
8274         (build_vbase_pointer): Remove old-abi code.
8275         (build_secondary_vtable): Likewise.
8276         (modify_all_vtables): Likewise.
8277         (create_vtable_ptr): Likewise.
8278         (layout_class_type): Likewise.
8279         (finish_struct_1): Likewise.
8280         (finish_vtbls): Likewise.
8281         (dfs_finish_vtbls): Delete.
8282         (build_vbase_offset_vtbl_entries): Remove old-abi code.
8283         * cvt.c: Adjust comments.
8284         * decl.c: Adjust comments.
8285         * decl2.c: Adjust comments.
8286         * init.c: Adjust comments.
8287         (construct_virtual_bases): Remove old-abi code.
8288         * lang-specs.h: Remove -fno-new-abi.
8289         * mangle.c: Adjust comments.
8290         * rtti.c: Adjust comments.
8291         (get_base_offset): Remove old-abi-code.
8292         * search.c: Adjust comments.
8293         (dfs_init_vbase_pointers): Remove.
8294         (dfs_vtable_path_unmark): Remove.
8295         (init_vbase_pointers): Remove.
8296         * semantics.c: Adjust comments.
8297         (emit_associated_thunks): Remove old-abi code.
8298         * typeck.c: Adjust comments.
8299
8300 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
8301
8302         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
8303         params.h.
8304
8305 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
8306
8307         * class.c (finish_struct_anon): Forbid nested classes.
8308
8309 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
8310
8311         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
8312         * optimize.c: Include debug.h.
8313         (maybe_clone_body): Use debug hook.
8314         * semantics.c: Include debug.h.
8315         (expand_body): Use debug hook.
8316
8317 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
8318
8319         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
8320
8321 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
8322
8323         * class.c (type_requires_array_cookie): New function.
8324         (check_methods): Don't try to figure out whether the type needs a
8325         cookie here.
8326         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
8327         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
8328         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
8329         * pt.c (instantiate_class_template): Don't set
8330         TYPE_VEC_DELETE_TAKES_SIZE.
8331         * NEWS: Document ABI changes from GCC 3.0.
8332
8333 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
8334             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
8335
8336         * NEWS (Changes in GCC 3.0): Fix typo.
8337
8338 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8339
8340         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
8341         which attributes are to be attached, and a flags argument.  Update
8342         call to decl_attributes.
8343         (grokfield): Update call to decl_attributes.
8344         * class.c (finish_struct): Update call to cplus_decl_attributes.
8345         * cp-tree.h (cplus_decl_attributes): Update prototype.
8346         * decl.c (start_decl, grokdeclarator, start_function): Update
8347         calls to decl_attributes and cplus_decl_attributes.
8348         * friend.c (do_friend): Update call to cplus_decl_attributes.
8349         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
8350
8351 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
8352
8353         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
8354         for `register' variables with an asm-specification.
8355
8356 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
8357
8358         * semantics.c (finish_asm_stmt): Mark the output operands
8359         to an asm addressable, if necessary.
8360
8361 2001-07-11  Ben Elliston  <bje@redhat.com>
8362
8363         * Revert this change -- there is a subtle bug.
8364
8365         PR c++/80
8366         * decl.c (finish_enum): New "attributes" argument; pass it to
8367         cplus_decl_attributes.  Use a narrower type if the enum is packed.
8368         * cp-tree.h (finish_enum): Adjust prototype.
8369         * parse.y (enum_head): New non-terminal.
8370         (structsp): Use it. Enums now may be preceded or followed by
8371         optional attributes -- pass their chained tree to finish_enum().
8372         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
8373
8374 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
8375
8376         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
8377         variables.
8378
8379 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
8380
8381         * semantics.c (cp_expand_stmt): Fix for null
8382         current_function_return_value.
8383
8384 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
8385
8386         * call.c (build_op_delete_call): Initialize fn.
8387         (convert_like_real): Delete conditional.
8388         (joust): Initialize *w and *l.
8389         * class.c: Add prototype for binfo_ctor_vtable.
8390         (get_primary_binfo): Initialize result.
8391         * init.c (build_java_class_ref): Initialize name.
8392
8393 2001-07-09  Erik Rozendaal  <dlr@acm.org>
8394
8395         * typeck.c (unary_complex_lvalue): Do not duplicate the
8396         argument to modify, pre-, or post-increment when used as an
8397         lvalue and when the argument has side-effects.
8398
8399 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
8400
8401         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
8402         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
8403         cplus_decl_attributes even if attrs is NULL.
8404         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
8405
8406 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
8407
8408         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
8409         calls to decl_attributes.
8410
8411 2001-07-06  Ira Ruben   <ira@apple.com>
8412
8413         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
8414         be DECL_TEMPLATE_RESULT.
8415
8416 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8417
8418         * cp-tree.h (copy_template_template_parm): Rename to ...
8419         (bind_template_template_parm): ... here.
8420         * tree.c (copy_template_template_parm): Rename to ...
8421         (bind_template_template_parm): ... here.  Remove the case when
8422         NEWARGS is NULL_TREE.
8423         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
8424         BOUND_TEMPLATE_TEMPLATE_PARM.
8425         * pt.c (lookup_template_class): Adjust.
8426
8427 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
8428
8429         * cvt.c (convert_lvalue): New fn.
8430         * cp-tree.h: Declare it.
8431         * method.c (do_build_assign_ref): Use it.
8432         (do_build_copy_constructor): Convert parm to base types
8433         before calling base constructors.
8434
8435         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
8436         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
8437         optimize.
8438         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
8439
8440 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
8441
8442         * optimize.c (optimize_inline_calls): New function, broken out
8443         of ...
8444         (optimize_function): ... here. Call it. Don't inline if it is
8445         a thunk.
8446         (dump_function): Print name of dump flag causing this dump.
8447         * semantics.c (expand_body): Move thunk inline check to
8448         optimize_function.
8449
8450 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8451
8452         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
8453         (comptypes): Use target.comp_type_attributes.
8454
8455 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
8456
8457         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
8458
8459 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8460
8461         * error.c (lang_print_error_function): Add a `diagnostic_context *'
8462         parameter. Tweak.
8463
8464 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8465
8466         * decl2.c (import_export_class): Update.
8467
8468 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
8469
8470         * error.c (init_error): Adjust settings.
8471
8472 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
8473
8474         * error.c (init_error): Adjust settings.
8475
8476 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
8477
8478         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
8479         return pointers to data members by reference rather than by value.
8480
8481 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
8482
8483         Implement the Named Return Value optimization.
8484         * cp-tree.h (struct cp_language_function): Add x_return_value.
8485         (current_function_return_value): Now a macro.
8486         * decl.c: Don't define it.
8487         (define_label, finish_case_label): Don't clear it.
8488         (init_decl_processing): Don't register it with GC.
8489         * semantics.c (genrtl_finish_function): Don't check it for
8490         no_return_label.  Copy the RTL from the return value to
8491         current_function_return_value and walk, calling...
8492         (nullify_returns_r): ...this new fn.
8493         * typeck.c (check_return_expr): Set current_function_return_value.
8494
8495 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
8496
8497         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
8498         sharing a ctor vtable with.  Merge code for cases 1 and 2.
8499         (binfo_ctor_vtable): New fn.
8500         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
8501
8502 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
8503
8504         * class.c (dfs_find_final_overrider): Fix logic.
8505
8506         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
8507         virtual thunk instead of non-virtual.
8508         (get_matching_virtual): Uncomment.
8509
8510         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
8511         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
8512         PARM, not ARG.
8513
8514 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
8515
8516         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
8517         we've not emerged from the hierarchy of RTTI_BINFO on reaching
8518         a non-virtual base.
8519
8520 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
8521
8522         * NEWS: Update release number.
8523
8524 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
8525
8526         PR c++/3130, c++/3131, c++/3132
8527         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
8528         * class.c (force_canonical_binfo_r): Move
8529         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
8530         virtual bases unless they're primary and what they're primary
8531         too has been moved.
8532         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
8533         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
8534         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
8535         derived binfo.
8536         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
8537         (layout_nonempty_base_or_field): Add most derived type
8538         parameter. Adjust.
8539         (layout_empty_base): Likewise.
8540         (build_base_field): Likewise.
8541         (build_base_fields): Likewise.
8542         (propagate_binfo_offsets): Add most derived type
8543         parameter. Skip non canonical virtual bases too.
8544         (dfs_set_offset_for_unshared_vbases): Don't skip primary
8545         bases. Do skip canonical bases.
8546         (layout_virtual_bases): Adjust.
8547         (layout_class_type): Adjust.
8548         (dfs_get_primary_binfo): Build list of virtual primary base
8549         candidates.
8550         (get_primary_binfo): Check that the shared virtual primary
8551         base candidate was found first.
8552         (accumulate_vtbl_inits): Don't do anything for non-vptr
8553         containing binfos. For case 1 primary virtual bases, keep
8554         checking that we've not emerged from the hierarchy of RTTI_BINFO.
8555
8556 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
8557
8558         PR c++/3089
8559         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
8560         hierarchy looking for primary bases for a ctor
8561         vtable. Recursively call oneself, if we meet our primary via
8562         this route and haven't met it yet via inheritance graph order.
8563
8564 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
8565
8566         * lang-options.h: Emit documentation for -fno-honor-std, not
8567         -fhonor-std.
8568
8569 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
8570
8571         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
8572         Don't clobber delta.
8573         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
8574
8575 2001-06-10  Mark Mitchell <mark@codesourcery.com>
8576             Gabriel Dos Reis  <gdr@codesourcery.com>
8577
8578         * Make-lang.in (cp/call.o): Depend on diagnostic.h
8579         (cp/typeck.o): Depend on diagnostic.h
8580         (cp/typeck2.o): Depend on diagnostic.h
8581         (cp/repo.o): Depend on dignostic.h
8582         * typeck.c: #include diagnostic.h
8583         (convert_for_initialization): Remove extern declaration for
8584         warningcount and errorcount.
8585
8586         * call.c: #include diagnostic.h
8587         (convert_like_real): Remove extern declaration for warnincount and
8588         errorcount.
8589
8590         * repo.c: #include diagnostic.h
8591         * typeck2.c: #include diagnostic.h
8592
8593 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8594
8595         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
8596         in previous change.
8597
8598 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8599
8600         PR c++/2929
8601         * friend.c (do_friend): Use push_decl_namespace for classes at
8602         namespace scope.
8603
8604 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8605             Jason Merrill <jason_merrill@redhat.com>
8606
8607         PR c++/3061
8608         * class.c (build_secondary_vtable): Use assert, rather than an error
8609         message.
8610         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
8611         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
8612         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
8613         Don't set BINFO_VTABLE for a primary virtual base.
8614
8615 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
8616
8617         * decl.c (duplicate_decls): Update source position information
8618         when a template function is defined.
8619
8620 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
8621
8622         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
8623
8624 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
8625
8626         PR c++/2914
8627         * decl.c (pushtag): Don't push into a complete type's scope.
8628
8629 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
8630
8631         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
8632         (struct lang_decl_flags): Lose generate_with_vtable_p.
8633         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
8634         * class.c (copy_virtuals): Adjust.
8635         * decl2.c (mark_vtable_entries): Adjust.
8636         * method.c (make_thunk, build_vtable_entry): Adjust.
8637         * class.c (update_vtable_entry_for_fn): Only look as far as the
8638         first defining class.
8639         (build_vtbl_initializer): Put nothing in the slot for a function only
8640         defined in a lost primary virtual base.
8641         (add_vcall_offset_vtbl_entries_1): Use the same code for
8642         the lost primary case and the normal case.
8643         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
8644         (get_vfield_offset, get_derived_offset): Lose.
8645         (dfs_find_final_overrider): Use look_for_overrides_here.
8646         (get_matching_virtual): New fn.
8647         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
8648         not BV_VCALL_INDEX.
8649         * search.c (look_for_overrides_here): Split out from...
8650         (look_for_overrides_r): Here.
8651
8652         * class.c (find_final_overrider): Return error_mark_node on error.
8653
8654         * decl2.c (key_method): #if 0 accidental change.
8655
8656 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8657
8658         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
8659         (build_over_call): Likewise.
8660         * decl.c (grokparms): Likewise.
8661         * pt.c (tsubst_decl): Likewise.
8662         * typeck.c (convert_arguments): Likewise.
8663
8664 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
8665
8666         * semantics.c (begin_class_definition): Robustify.
8667
8668         * pt.c (instantiate_decl): Tell the repository code about the
8669         clones, not the cloned functions.
8670         * repo.c (repo_template_used): Explicitly instantiate the cloned
8671         function, not the clones.
8672
8673 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8674
8675         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
8676         ICS_BAD_FLAG on created conversion.
8677         (compare_ics): Break out rank.
8678
8679 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8680
8681         * decl.c (xref_tag): Remove extraneous %s on dependent name
8682         lookup warning.
8683
8684 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8685
8686         * class.c (layout_vtable_decl): Fix off by one error on
8687         build_index_type.
8688         (build_vtt): Likewise.
8689         (build_ctor_vtbl_group): Likewise.
8690
8691 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8692
8693         * class.c (maybe_indent_hierarchy): New function.
8694         (dump_class_hierarchy_r): Add flags. Dump extra binfo
8695         information, if enabled. Use maybe_indent_hierarchy. Adjust
8696         output format.
8697         (dump_class_hierarchy): Adjust prototype. Adjust output format.
8698         (dump_array, dump_vtable, dump_vtt): New functions.
8699         (finish_struct_1): Adjust hierarchy dumping.
8700         (initialize_vtable): Call dump_vtable.
8701         (build_vtt): Call dump_vtt.
8702         (build_ctor_vtbl_group): Call dump_vtable.
8703         * decl2.c (flag_dump_class_layout): Remove.
8704         (cxx_decode_option): Remove dump translation unit
8705         and dump class hierarchy check. Call dump_switch_p.
8706         (finish_file): Adjust dumping.
8707         (dump.c): Only dump base classes if not TDF_SLIM.
8708         Only dump namespace members if not TDF_SLIM.
8709         * optimize.c (dump_function): New function.
8710         (optimize_function): Call dump_function.
8711         * semantics.c (expand_body): Use dump_enabled_p.
8712
8713 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
8714
8715         PR g++/2936
8716         Part missed from first commit
8717         * decl2.c (finish_anon_union): Copy context.
8718
8719 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
8720
8721         PR g++/2936
8722         * optimize.c (remap_decl): Remap anonymous aggregate members too.
8723
8724 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
8725
8726         PR g++/2823
8727         * semantics.c (expand_body): Don't optimize thunks.
8728
8729 2001-05-25  Sam TH  <sam@uchicago.edu>
8730
8731         * cp-tree.h lex.h: Fix header include guards.
8732
8733 2001-05-25  Mark Mitchell <mark@codesourcery.com>
8734
8735         * decl.c (init_decl_processing): Tweak.
8736
8737 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
8738
8739         * decl.c (duplicate_decls): Tidy.
8740         (init_decl_processing): Always set flag_no_builtin.
8741
8742 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
8743
8744         PR c++/2184
8745         * decl2.c (do_local_using_decl): Push the decls, even in a
8746         template.
8747
8748 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
8749
8750         * optimize.c (initialize_inlined_parameters): Don't set
8751         TREE_READONLY for a VAR_DECL taking the place of an inlined
8752         PARM_DECL.
8753
8754 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
8755
8756         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
8757         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
8758         attribute.
8759
8760 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
8761
8762         * parse.y: Refer to compound literals as such, not as
8763         constructor-expressions.
8764
8765 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
8766
8767         * call.c (build_op_delete_call): Ignore exception-specifications
8768         when looking for matching delete operators.
8769         * init.c (build_new_1): Compute whether or not the allocation
8770         function used is a placement allocation function or not, and
8771         communicate this information to build_op_delete_call.
8772
8773 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
8774
8775         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
8776         (build_vtbl_ref): Adjust.
8777         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
8778         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
8779         Re-add vtable-gc.
8780         (unsupported_options): Correspondingly.
8781
8782         * decl2.c (maybe_make_one_only): Check flag_weak, not
8783         supports_one_only().
8784
8785         * cp-tree.def (START_CATCH_STMT): Lose.
8786         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
8787         * tree.c (cp_statement_code_p): Don't case it.
8788         * semantics.c (cp_expand_stmt): Likewise.
8789         * cp-tree.h (START_CATCH_TYPE): Lose.
8790         (HANDLER_TYPE): New.
8791         * except.c (expand_start_catch_block): Don't start any blocks.
8792         Return the type.
8793         (expand_end_catch_block): Don't end any blocks.
8794         * parse.y (handler): Don't pass anything from finish_handler_parms
8795         to finish_handler.
8796         * pt.c (tsubst_expr): Likewise.
8797         * semantics.c (begin_handler): Call note_level_for_catch here.
8798         (finish_handler_parms): Don't return anything.
8799         (genrtl_catch_block, begin_catch_block): Lose.
8800         (genrtl_handler): Call expand_start_catch here.
8801
8802 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
8803
8804         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
8805         (get_vtable_decl, build_vtt): Not here.
8806
8807 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
8808
8809         PR c++/2781
8810         * optimize.c (update_cloned_parm): Copy addressability and other
8811         flags.
8812
8813 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8814
8815         * pt.c (determine_specialization): Ignore artificial functions.
8816
8817 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
8818
8819         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
8820         (C_RID_CODE): Remove.
8821         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
8822         (init_parse): Don't do it here.
8823
8824 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
8825
8826         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
8827         function declaration to avoid stripping the symbol's attributes.
8828
8829 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
8830
8831         * decl.c (pushdecl): Adjust error string.
8832         (xref_tag): Adjust friend class injection warning. Remove the
8833         inherited name from the class shadowed scope.
8834
8835 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
8836
8837         * except.c (cp_protect_cleanup_actions): New function.
8838         (init_exception_processing): Don't set protect_cleanup_actions
8839         here.  Do set lang_protect_cleanup_actions.
8840
8841 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
8842
8843         * spew.c (read_token): Call yyerror on all unexpected tokens.
8844
8845 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
8846
8847         * init.c (member_init_ok_or_else): Take a tree rather than
8848         string for name.
8849         (expand_member_init): Adjust.
8850
8851 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
8852
8853         * decl.c (duplicate_decls): Suppress warning about duplicate
8854         decls if the first decl is a friend.
8855
8856 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
8857
8858         * except.c (choose_personality_routine): Export.  Add
8859         explanatory comment.  Take an enum languages, not a boolean.
8860         (initialize_handler_parm): Adjust to match.
8861         * cp-tree.h: Prototype choose_personality_routine.
8862         * lex.c (handle_pragma_java_exceptions): New function.
8863         (init_cp_pragma): Register #pragma GCC java_exceptions.
8864
8865 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8866
8867         * method.c (build_mangled_C99_name): Remove unused prototype.
8868
8869 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
8870
8871         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
8872         * typeck.c (get_member_function_from_ptrfunc,
8873         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
8874         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
8875
8876         Reverted Geoff Keating's 2001-05-03's patch.
8877
8878 2001-05-11  Ira Ruben   <ira@apple.com>
8879
8880         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
8881
8882 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
8883
8884         * cp-tree.h (finish_label_expr, lookup_label): Delete.
8885         * parse.y: Update for '&&'; don't issue warning here.
8886         * semantics.c (finish_label_expr): Delete.
8887
8888 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
8889
8890         * splay-tree.h (splay_tree_max): New function.
8891         (splay_tree_min): Likewise.
8892
8893 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
8894
8895         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
8896         (pfn_vflag_identifier): Define.
8897         Update comment about layout of pointer functions.
8898         (build_ptrmemfunc1): Update prototype.
8899         (expand_ptrmemfunc_cst): Update prototype.
8900         * decl.c (initialize_predefined_identifiers): Initialize
8901         pfn_vflag_identifier.
8902         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
8903         an extra field to the type.
8904         * expr.c (cplus_expand_constant): Pass 'flag' between
8905         expand_ptrmemfunc_cst and build_ptrmemfunc1.
8906         * typeck.c (get_member_function_from_ptrfunc): When
8907         FUNCTION_BOUNDARY < 16, look at additional field to determine
8908         if a pointer-to-member is a real pointer or a vtable offset.
8909         (build_ptrmemfunc1): Add new parameter to contain extra field.
8910         (build_ptrmemfunc): Pass the extra field around.
8911         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
8912         (pfn_from_ptrmemfunc): Ignore the extra field.
8913
8914 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
8915
8916         * cp-tree.h (flag_inline_trees): Update documentation.
8917         * decl.c (init_decl_processing): Adjust handling of
8918         flag_inline_functions and flag_inline_trees to support -O3.
8919         (grokfndecl): Set DECL_INLINE on all functions if that's what
8920         the user requested.
8921         (save_function_data): Clear DECL_INLINE in
8922         current_function_cannot_inline is non-NULL.
8923         * decl2.c (flag_inline_trees): Update documentation.
8924
8925 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
8926
8927         * dump.c (cp_dump_tree, USING_STMT case): New case.
8928         * tree.c (cp_statement_code_p): Add USING_STMT.
8929         * decl2.c (do_using_directive): Add the using directive statement.
8930
8931         * tree.c (walk_tree): Reformat an if block.
8932
8933 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
8934
8935         * decl.c (compute_array_index_type): Don't try to do anything with
8936         the indices when processing a template.
8937
8938 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8939
8940         * call.c: NULL_PTR -> NULL.
8941         * class.c: Likewise.
8942         * cvt.c: Likewise.
8943         * decl.c: Likewise.
8944         * decl2.c: Likewise.
8945         * except.c: Likewise.
8946         * init.c: Likewise.
8947         * rtti.c: Likewise.
8948         * search.c: Likewise.
8949         * tree.c: Likewise.
8950         * typeck.c: Likewise.
8951         * typeck2.c: Likewise.
8952
8953 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
8954
8955         * decl2.c (do_using_directive): Revert previous patch.
8956
8957 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8958
8959         * cp-tree.def (USING_STMT): New statement node.
8960         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
8961         * decl2.c (do_using_directive): Add USING_STMT to statement
8962         tree. Don't emit errors when processing template decl.
8963         * pt.c (tsubst_expr, USING_STMT case): New case.
8964         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
8965
8966 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8967
8968         * call.c (build_new_op): Convert args from reference here.
8969         (build_conditional_expr): Don't convert here.
8970
8971 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8972
8973         * spew.c (last_token_id): New static variable.
8974         (read_token): Set it here.
8975         (yyerror): Use it here.
8976
8977 2001-04-30  Richard Henderson  <rth@redhat.com>
8978
8979         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
8980         * decl.c: Likewise.
8981
8982 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
8983
8984         * gxxint.texi: Remove.
8985         * Make-lang.in: Remove all traces of gxxint.texi.
8986
8987 2001-04-30  Mark P Mitchell  <mark@codesourcery.com>
8988
8989         * decl2.c (start_static_initialization_or_destruction): Correct
8990         logic to handle the -fno-use-cxa-atexit case.
8991
8992 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
8993
8994         * optimize.c (update_cloned_parm): New function.
8995         (maybe_clone_body): Use it.  Update the `this' parameter too.
8996
8997 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8998
8999         * decl2.c (unsupported_options): Add new-abi.
9000         * lang-options.h: Remove no longer supported options.
9001
9002 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
9003
9004         * except.c (can_convert_eh): Don't check template parms,
9005         typename types etc.
9006
9007 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
9008
9009         * optimize.c (maybe_clone_body): Copy parameter names and locations.
9010
9011 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
9012
9013         * cp-tree.h (adjust_clone_args): Prototype new function.
9014         * class.c (adjust_clone_args): New function.
9015         * decl.c (start_function): Call it for in charge ctors.
9016
9017 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
9018
9019         * method.c (use_thunk): Make sure that thunks really are emitted
9020         when requested.
9021
9022 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
9023
9024         * mangle.c (write_chars): New macro.
9025         (hwint_to_ascii): New function
9026         (write_number): Use it.
9027         (write_integer_cst): Deal with really big numbers.
9028
9029 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
9030
9031         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
9032         the clone.
9033
9034 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
9035
9036         * decl.c (grokdeclarator): Set context of namespace scope
9037         TYPE_DECLS.
9038
9039 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
9040
9041         * cp/optimize.c: Include hashtab.h.
9042         (struct inline_data): Add tree_pruner.
9043         (expand_call_inline, expand_calls_inline): Use it when calling
9044         walk_tree.
9045         (optimize_function): Initialize and free tree_pruner.
9046
9047 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
9048
9049         Lazy __FUNCTION__ generation.
9050         * cp-tree.def (FUNCTION_NAME): Remove.
9051         * cp-tree.h (function_name_declared_p): Remove.
9052         (cp_fname_init): Prototype.
9053         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
9054         don't call declare_function_name. Call start_fname_decls.
9055         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
9056         clobber the line number.
9057         (cp_fname_init): New function.
9058         (start_function): Call start_fname_decls.
9059         (finish_function): Call finish_fname_decls.
9060         * lex.c (reswords): Add slots for __FUNCTION__ et al.
9061         (rid_to_yy): Add mappings for __FUNCTION__ et al.
9062         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
9063         * parse.y (VAR_FUNC_NAME): New token.
9064         (primary): Add VAR_FUNC_NAME.
9065         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
9066         generation.
9067         (tsubst, FUNCTION_NAME case): Remove.
9068         (tsubst_copy, FUNCTION_NAME case): Remove.
9069         (tsubst_expr, DECL_STMT case): Be careful with a
9070         DECL_PRETTY_FUNCTION_P.
9071         (instantiate_decl): Remove function_name_declared_p.
9072         * semantics.c (begin_compound_statement): Don't call
9073         declare_function_name here.
9074         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
9075         (finish_translation_unit): Call finish_fname_decls.
9076         (expand_body): Remove function_name_declared_p.
9077         * typeck2.c (digest_init): Allow any ERROR_MARK.
9078
9079 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
9080
9081         * pt.c (tsubst_decl): Use VOID_TYPE_P.
9082         * semantics.c: Fix some typos.
9083
9084 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
9085
9086         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
9087
9088 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9089
9090         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
9091
9092 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
9093
9094         * except.c (build_throw): Wrap the initialization of the exception
9095         object in a MUST_NOT_THROW_EXPR.
9096         (do_free_exception): #if 0.
9097
9098 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
9099
9100         * cp-tree.h (finish_enum): Change prototype.
9101         * decl.c (finish_enum): Reorganize.
9102         * parse.y (structsp): Adjust calls to finish_enum.
9103
9104 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
9105
9106         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
9107         't' case.
9108
9109 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
9110
9111         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
9112         (layout_empty_base): Return at end flag.
9113         (build_base_field): Likewise.
9114         (build_base_fields): Likewise.
9115         (layout_virtual_bases): Don't add 1 to eoc value.
9116         (end_of_class): Use full size for empty bases.
9117         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
9118         empty bases. Don't add 1 to eoc value. Only add trailing padding
9119         if we're an empty class with no empty bases.
9120         (dump_class_hierarchy): Dump size and alignment.
9121
9122 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
9123
9124         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
9125         ICS_BAD_FLAG.
9126
9127 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
9128
9129         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
9130         is found, look first if name does not match the structure name.
9131
9132 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
9133
9134         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
9135         set.
9136         (SET_DECL_LANGUAGE): New macro.
9137         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
9138         (pushdecl): Likewise.
9139         (build_library_fn_1): Likewise.
9140         (build_cp_library_fn): Likewise.
9141         (grokfndecl): Likewise.
9142         (grokvardecl): Mark `extern "C"' variables as having C linkage.
9143         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
9144         * lex.c (retrofit_lang_decl): Likewise.
9145         * mangle.c (mangle_decl_string): Don't mangle the names of
9146         variables declared with C language linkage.
9147         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
9148
9149 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
9150
9151         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
9152         flag_access_control from uninitialized storage.
9153
9154 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
9155
9156         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
9157         * mangle.c (write_pointer_to_member_type): Fix mangling of
9158         pointers to cv-qualified member function types.
9159
9160         * init.c (build_delete): Create a SAVE_EXPR for the address if
9161         we're going to use it more than once.
9162
9163 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
9164
9165         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
9166         (expand_ptremfunc_cst): Change prototype.
9167         (delta2_from_ptrmemfunc): Remove.
9168         * expr.c (cplus_expand_constant): Adjust call to
9169         expand_ptrmemfunc_cst.
9170         * typeck.c (build_ptrmemfunc1): Simplify.
9171         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
9172         results in a constant.
9173         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
9174         (delta2_from_ptrmemfunc): Remove.
9175         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
9176
9177 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
9178
9179         * cp-tree.h (decl_namespace_list): New macro.
9180         (struct saved_scope): Add decl_ns_list.
9181         * decl.c (mark_saved_scope): Mark it.
9182         * decl2.c: Lose static decl_namespace_list.
9183         (init_decl2): Don't save it.
9184
9185 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9186
9187         * cp-tree.h (warn_return_type, yylex): Delete redundant
9188         declarations.
9189
9190         * decl.c (current_class_depth, global_namespace): Likewise.
9191
9192         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
9193
9194         * repo.c (flag_use_repository): Likewise.
9195
9196 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9197
9198         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
9199         set_block, pushdecl, getdecls, gettags, init_decl_processing,
9200         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
9201         lvalue_or_else, print_lang_statistics, comp_target_types,
9202         unsigned_type, signed_type, signed_or_unsigned_type,
9203         build_function_call, mark_addressable, incomplete_type_error):
9204         Delete redundant declarations.
9205
9206 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
9207
9208         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
9209         (TYPE_ANONYMOUS_P): New macro.
9210         (TAGGED_TYPE_P): New macro.
9211         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
9212         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
9213         * tree.c (no_linkage_helper): Likewise.
9214         * semantics.c (begin_class_definition): Likewise.
9215         * pt.c (convert_template_argument): Likewise.
9216         * lex.c (check_for_missing_semicolon): Likewise.
9217
9218 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
9219
9220         * class.c (dfs_unshared_virtual_bases): New function.
9221         (mark_primary_bases): Call it.
9222         (check_bases): Ignore virtual bases when determining
9223         nearly-emptiness.
9224
9225 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
9226
9227         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
9228
9229 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
9230
9231         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
9232         cloned function to the clone.
9233
9234 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9235
9236         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
9237
9238         * semantics.c: Include expr.h.
9239
9240 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
9241
9242         * method.c (implicitly_declare_fn): Commonize code for copy ctor
9243         and assignment op. Set TREE_USED for parameter.
9244
9245 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
9246
9247         * class.c (find_final_overrider_data): Add `candidates'.
9248         (dfs_find_final_overrider): Don't issue error messages
9249         prematurely.
9250         (find_final_overrider): Issue error messages here.
9251         (build_base_field): Don't warn about amgibuous direct bases here.
9252         (warn_about_ambiguous_direct_bases): New function.
9253         (layout_class_type): Use it.
9254
9255 2001-04-10  Richard Henderson  <rth@redhat.com>
9256
9257         * typeck.c (build_array_ref): Push the array reference inside
9258         COMPOUND_EXPR and COND_EXPR.
9259
9260 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
9261
9262         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
9263         * decl.c (duplicate_decls): Adjust accordingly.
9264         (maybe_commonize_var): Likewise.
9265         (grokfndecl): Likewise.
9266         (start_function): Likewise.
9267         (start_method): Likewise.
9268         * decl2.c (key_method): Likewise.
9269         (import_export_decl): Likewise.
9270         * method.c (implicitly_declare_fn): Likewise.
9271         * optimize.c (maybe_clone_body): Likewise.
9272
9273 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
9274
9275         * lang-specs.h: Add __DEPRECATED.
9276
9277 2001-04-05  J"orn Rennecke <amylaar@redhat.com>
9278
9279         * search.c (get_dynamic_cast_base_type): When building a new
9280         constant, set its type to ssizetype.
9281
9282 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
9283
9284         * optimize.c (expand_call_inline): Only add newly inlined statements
9285         into inlined_stmts.
9286
9287 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
9288
9289         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
9290         (OPERATOR_FORMAT): Likewise.
9291         (OPERATOR_TYPENAME_FORMAT): Likewise.
9292         * operators.def: Remove old name-mangling information.
9293         * decl.c (grok_op_properties): Adjust accordingly.
9294         * lex.c (init_operators): Likewise.
9295         * rtti.c (get_tinfo_decl): Issue error messages about types that
9296         have variable size.
9297
9298 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
9299
9300         * decl2.c (import_export_decl): Don't call import_export_class
9301         when processing an inline member function.
9302         * semantics.c (expand_body): Call import_export_decl before
9303         emitting inline functions.
9304
9305 2001-03-28  Richard Henderson  <rth@redhat.com>
9306
9307         IA-64 ABI Exception Handling:
9308         * cp-tree.def (EH_SPEC_BLOCK): New.
9309         (MUST_NOT_THROW_EXPR): New.
9310         * cp-tree.h: Update changed function declarations.
9311         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
9312         (CPTI_CALL_UNEXPECTED): New.
9313         (struct cp_language_function): Rename x_eh_spec_try_block
9314         to x_eh_spec_block.
9315         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
9316         * decl.c (current_binding_level): If no current function
9317         bindings, revert to scope_chain.
9318         (initialize_predefined_identifiers): Remove __cp_push_exception.
9319         (store_parm_decls): Use begin_eh_spec_block.
9320         (finish_function): Use finish_eh_spec_block.
9321         (mark_lang_function): Update for name changes.
9322         * decl2.c (finish_file): No mark_all_runtime_matches.
9323         * dump.c (cp_dump_tree): Handle new tree codes.
9324         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
9325         * except.c (catch_language_init, catch_language): Remove.
9326         (init_exception_processing): Don't set language code.
9327         Initialize call_unexpected_node, protect_cleanup_actions,
9328         eh_personality_libfunc, lang_eh_runtime_type.
9329         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
9330         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
9331         (prepare_eh_type): Split out type canonicalizations ...
9332         (build_eh_type_type): ... from here.
9333         (build_eh_type_type_ref): Remove.
9334         (mark_all_runtime_matches): Remove.
9335         (build_exc_ptr): New.
9336         (do_begin_catch, do_end_catch): New.
9337         (do_pop_exception): Remove.
9338         (build_terminate_handler): Remove.
9339         (choose_personality_routine): Split out language choice from ...
9340         (initialize_handler_parm): ... here.
9341         Use MUST_NOT_THROW_EXPR.
9342         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
9343         exception object handling.
9344         (expand_start_eh_spec, expand_end_eh_spec): Remove.
9345         (expand_exception_blocks, alloc_eh_object): Remove.
9346         (begin_eh_spec_block, finish_eh_spec_block): New.
9347         (do_allocate_exception, do_free_exception): New.
9348         (expand_throw): Merge into ...
9349         (build_throw): ... here.  Update for abi.
9350         * expr.c (cplus_expand_expr): No expand_internal_throw.
9351         Handle MUST_NOT_THROW_EXPR.
9352         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
9353         * semantics.c (*) Update for except.h name changes.
9354         (genrtl_try_block): No protect_with_terminate.
9355         (genrtl_eh_spec_block): New.
9356         (genrtl_handler): Don't emit the goto here.
9357         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
9358         (genrtl_finish_function): Don't expand_exception_blocks.
9359         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
9360
9361 2001-03-28  Richard Henderson  <rth@redhat.com>
9362
9363         * decl.c (struct named_label_list): Rename eh_region to
9364         in_try_scope, add in_catch_scope.
9365         (struct binding_level): Rename eh_region to is_try_scope,
9366         add is_catch_scope.
9367         (note_level_for_try): Rename from note_level_for_eh.
9368         (note_level_for_catch): New.
9369         (poplevel): Copy both is_try_scope and is_catch_scope to
9370         the named_label_list struct.
9371         (check_previous_goto_1): Don't check for catch block via
9372         DECL_ARTIFICIAL; use in_try_scope instead.
9373         (check_goto): Likewise.
9374         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
9375         * except.c (expand_start_catch_block): Call note_level_for_catch.
9376         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
9377
9378 2001-03-27  Richard Henderson  <rth@redhat.com>
9379
9380         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
9381         exceptions_via_longjmp.
9382
9383 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
9384
9385         * pt.c (check_default_tmpl_args):  Make error messages clearer.
9386
9387 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
9388
9389         * error.c:  Also undefine 'A' macro used for cp_printers definition.
9390
9391 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9392
9393         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
9394
9395 2001-03-26  Mike Yang <yang@research.att.com>
9396             Mark Mitchell  <mark@codesourcery.com>
9397
9398         * dump.c (dump_access): New function.
9399         (cp_dump_tree): Use it.  Dump basetype information for class
9400         types.
9401
9402 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
9403
9404         * Makefile.in (optimize.o): Depend on params.h.
9405         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
9406         (init_decl_processing): Set flag_no_inline when doing
9407         inlining-on-trees.
9408         * optimize.c: Include params.h.
9409         (struct inline_data): Improve documentation of FNS.  Add
9410         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
9411         (INSNS_PER_STMT): New macro.
9412         (remap_block): Use CLONING_P.
9413         (inlinable_function_p): Don't inline big functions.
9414         (expand_call_inline): Keep track of how much inlining we've done.
9415         (optimize_function): Set FIRST_INLINED_FN.
9416         (maybe_clone_body): Set CLONING_P.
9417         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
9418         tree nodes.
9419         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
9420         rest_of_compilation.  Clear DECL_RTL for local variables
9421         afterwards.
9422         (clear_decl_rtl): New function.
9423
9424 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
9425
9426         Implement DR 209
9427         * cp-tree.h (skip_type_access_control,
9428         reset_type_access_control): Prototype.
9429         * decl.c (grokdeclarator): Access of friends is not checked.
9430         * parse.y (component_decl_list): Reset type access control.
9431         * semantics.c (decl_type_access_control): Clear
9432         current_type_lookups.
9433         (save_type_access_control): Don't save if not deferring.
9434         (skip_type_access_control, reset_type_access_control): New
9435         functions.
9436         (begin_class_definition): Do type access control for basetypes.
9437         Start deferred access control.
9438         (finish_class_definition): Resume immediate access control if
9439         this is a local class.
9440
9441 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9442
9443         * class.c (add_method): Use memcpy/memmove, not bcopy.
9444
9445         * decl.c (duplicate_decls): Likewise.
9446
9447 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
9448
9449         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
9450         not `_'.
9451
9452 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
9453
9454         * decl.c (local_names): Define.
9455         (push_local_name): New.
9456         (grok_reference_init): Return init if initializing static reference
9457         variable with non-constant instead of emitting it.
9458         Move expand_static_init call to cp_finish_decl.
9459         (layout_var_decl): Call push_local_name.
9460         (maybe_commonize_var): Allow inlining functions even if they have
9461         static local variables, use comdat_linkage for them if flag_weak.
9462         (check_initializer): Call obscure_complex_init if
9463         grok_reference_init returned nonzero.
9464         (save_function_data): Clear x_local_names.
9465         (pop_cp_function_context): Free x_local_names.
9466         (mark_inlined_fns): Remove.
9467         (mark_lang_function): Mark x_local_names.
9468         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
9469         Mark inlined_fns as tree, remove call to mark_inlined_fns.
9470         * class.c (alter_access): Ensure DECL_ACCESS is never set if
9471         DECL_DISCRIMINATOR_P.
9472         * cp-tree.h (cp_language_function): Add x_local_names.
9473         (lang_decl_flags): Add discriminator into u2.
9474         (lang_decl_inlined_fns): Remove.
9475         (lang_decl): inlined_fns is now a TREE_VEC.
9476         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
9477         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
9478         TREE_VEC, not a custom structure.
9479         (optimize_function): Likewise.
9480         * mangle.c (discriminator_for_local_entity): Discriminate among
9481         VAR_DECL local entities.
9482         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
9483         is not valid.
9484
9485 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
9486
9487         Add support for Java interface method calls.
9488         * cp-tree.h (struct lang_type): Add java_interface flag.
9489         (TYPE_JAVA_INTERFACE): New macro.
9490         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
9491         by setting TYPE_JAVA_INTERFACE.
9492         * call.c (java_iface_lookup_fn): New static.
9493         (build_over_call): If calling a method declared in a
9494         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
9495         expression which resolves the function address.
9496         (build_java_interface_fn_ref): New function.
9497
9498 2001-03-22  Richard Henderson  <rth@redhat.com>
9499
9500         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
9501         * except.c: Don't include it.
9502
9503 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
9504             based on an idea from Joe Buck <jbuck@synopsys.com>
9505
9506         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
9507         New nonterminals.
9508         (data_def, component_decl): Add reductions to bad_decl.
9509
9510 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
9511
9512         * method.c (do_build_assign_ref): Don't use build_modify_expr for
9513         anonymous aggregates, since they don't have assignment operator
9514         method.
9515         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
9516         assignment operators for anonymous structure fields.
9517
9518 2001-03-21  Jason Merrill  <jason@redhat.com>
9519
9520         * pt.c (instantiate_decl): Abort if we see a member constant
9521         instantiation that doesn't already have its initializer.
9522         Downgrade explicit instantiation without definition to pedwarn.
9523
9524         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
9525         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
9526         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
9527
9528         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
9529         (pending_vtables): Remove.
9530         * decl2.c (pending_vtables): Remove.
9531         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
9532         CLASSTYPE_VTABLE_NEEDS_WRITING.
9533         (import_export_class): Likewise.
9534         (init_decl2): Don't mark pending_vtables.
9535         * lex.c (handle_pragma_vtable): Just sorry.
9536         * pt.c (instantiate_class_template): Don't mess with
9537         CLASSTYPE_VTABLE_NEEDS_WRITING.
9538         (mark_class_instantiated): Likewise.
9539         * ptree.c (print_lang_type): Don't print it.
9540         * semantics.c (begin_class_definition): Don't set it.
9541
9542         * pt.c (template_tail): Replace with last_pending_template.
9543         (maybe_templates, maybe_template_tail): Remove.
9544         (add_pending_template): Adjust.
9545         (instantiate_pending_templates): Adjust.
9546
9547         * cp-tree.h (struct saved_scope): Remove lang_stack field.
9548         (current_lang_stack): Remove.
9549         * decl.c (maybe_push_to_top_level): Don't initialize it.
9550         (duplicate_decls): Use current_lang_depth.
9551         (xref_basetypes): Likewise.
9552         * class.c (current_lang_depth): New fn.
9553         (push_lang_context): Use more varray functionality.
9554         (pop_lang_context): Likewise.
9555
9556         * error.c (GLOBAL_THING): Always use '__'.
9557
9558 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
9559
9560         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
9561
9562         * mangle.c (mangle_decl_string): Mangle the names of overloaded
9563         operators, even when they have `extern "C"' linkage.
9564
9565 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
9566
9567         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
9568         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9569         where it's not necessary.
9570         (add_method): Remove optimization involving comparison of
9571         DECL_ASSEMBLER_NAME.
9572         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
9573         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9574         where it's not necessary.
9575         (check_methods): Likewise.
9576         (build_clone): Likewise.
9577         (built_vtt): Likewise.
9578         * cp-tree.h (DECL_NEEDED_P): Likewise.
9579         * decl.c (pushtag): Likewise.
9580         (duplicate_decls): Likewise.
9581         (pushdecl): Likewise.
9582         (builtin_function): Likewise.
9583         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
9584         (build_cp_library_fn): Likewise.
9585         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
9586         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9587         where it's not necessary.
9588         (make_rtl_for_nonlocal_decl): Likewise.
9589         (cp_finish_decl): Likewise.
9590         (grokfndecl): Likewise.
9591         (grokvardecl): Likewise.
9592         (grokdeclarator): Likewise.
9593         (start_function): Likewise.
9594         (cp_missing_return_ok_p): Likewise.
9595         * decl2.c (grokclassfn): Likewise.
9596         (check_classfn): Likewise.
9597         (finish_static_data_member_decl): Likewise.
9598         (grokfield): Likewise.
9599         * error.c (GLOBAL_IORD_P): Remove.
9600         (dump_global_iord): Improve output.
9601         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
9602         * except.c (nothrow_libfn_p): Summarily reject any function not in
9603         namespace-scope.
9604         * init.c (build_java_class_ref): Don't explicitly set
9605         DECL_ASSEMBLER_NAME after calling mangle_decl.
9606         * mangle.c (mangle_decl_string): Handle extern "C" functions.
9607         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
9608         * method.c (set_mangled_name_for_decl): Don't explicitly set
9609         DECL_ASSEMBLER_NAME after calling mangle_decl.
9610         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
9611         IDENTIFIER_GLOBAL_VALUE for the thunk.
9612         * pt.c (set_mangled_name_for_template_decl): Remove.
9613         (check_explicit_specialization): Don't use it.
9614         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
9615         (tsubst_friend_function): Likewise.
9616         (tsubst_decl): Likewise.
9617         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
9618         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
9619         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9620         where it's not necessary.
9621         (tinfo_base_init): Likewise.
9622         (create_real_tinfo_var): Likewise.
9623         * search.c (looup_field_1): Likewise.
9624         * semantics.c (finish_named_return_value): Likewise.
9625         * tree.c (init_tree): Set lang_set_decl_assembler_name.
9626
9627 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
9628
9629         Correct semantics restrictions checking in throw-expression.
9630         * except.c (is_admissible_throw_operand): New function.
9631         (build_throw): Use it.
9632
9633 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
9634
9635         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
9636         and its ilk.
9637
9638 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
9639
9640         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9641         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
9642         * decl.c (duplicate_decls): Likewise.
9643         (builtin_function): Likewise.
9644         (build_library_fn): Likewise.
9645         (build_cp_library_fn): Likewise.
9646         (check_initializer): Likewise.
9647         (cp_finish_decl): Likewise.
9648         * decl2.c (grokfield): Likewise.
9649         (grok_function_init): Remove #if 0'd code.
9650         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9651         * friend.c (do_friend): Likewise.
9652         * init.c (get_temp_regvar): Likewise.
9653         * method.c (make_thunk): Likewise.
9654         * pt.c (tsubst_friend_function): Likewise.
9655         (tsubst_decl): Likewise.
9656         (regenerate_decl_from_template): Likewise.
9657         * semantics.c (genrtl_named_return_value): Likewise.
9658         (expand_body): Likewise.
9659         (genrtl_finish_function): Likewise.
9660         * tree.c (cp_tree_equal): Likewise.
9661
9662 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
9663
9664         * call.c (convert_like_real): Add extra semantics to INNER
9665         parameter. Don't convert to temporary if a user conversion
9666         gives us an lvalue that we're about to bind to a reference.
9667         Set INNER to indicate pending reference binding on recursive
9668         calls.
9669
9670 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
9671
9672         * cp/lex.c: Delete duplicate pending_lang_change.
9673
9674 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
9675
9676         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
9677         Similarly.
9678         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
9679         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
9680
9681 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
9682
9683         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
9684
9685 2001-03-08  Stan Shebs  <shebs@apple.com>
9686
9687         * cp-tree.h (set_identifier_local_value): Remove unused decl.
9688
9689 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
9690
9691         * spew.c: Remove references to CPP_OSTRING.
9692
9693 2001-03-06  Andrew Haley  <aph@redhat.com>
9694
9695         * typeck.c (convert_arguments): Check that we have an fndecl.
9696
9697 2001-03-05  Andrew Haley  <aph@redhat.com>
9698
9699         * typeck.c (convert_arguments): Don't do ellipsis conversion for
9700         __built_in_constant_p.
9701
9702 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9703
9704         * typeck.c (build_static_cast): Allow enum to enum conversions
9705         as per DR 128.
9706
9707 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9708
9709         * class.c (check_field_decls): Pointers to member do not a
9710         non-pod struct make, as per DR 148.
9711
9712 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9713
9714         * call.c (joust): cp_pedwarn when using gnu extension concerning
9715         worst conversion sequences.
9716
9717 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9718
9719         * decl.c: Replace all uses of 'boolean' with 'bool'.
9720
9721 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9722
9723         * lang-specs.h: Add zero initializer for cpp_spec field to
9724         all array elements that need one.  Don't put an #ifdef inside
9725         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
9726         use it.
9727
9728 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
9729
9730         Implement using decls inside template functions.
9731         * decl2.c (validate_nonmember_using_decl): Don't special case
9732         fake_std_node in the global namespace. Don't reject early when
9733         processing a template.
9734         (do_local_using_decl): Add to statement tree. Don't do further
9735         processing when building a template.
9736         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
9737
9738 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
9739
9740         * decl2.c (do_nonmember_using_decl): Don't complain if we find
9741         same function. Do complain about ambiguating extern "C"
9742         declarations.
9743
9744 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
9745
9746         Remove floating point and complex type template constant parms.
9747         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
9748         COMPLEX_TYPE extensions.
9749         (invalid_nontype_parm_type_p): Likewise.
9750
9751 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
9752
9753         * except.c (call_eh_info): Revert "match_function"'s type.
9754
9755 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
9756
9757         Fix ctor vtable vcall offsets.
9758         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
9759         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
9760         (get_matching_base): Remove.
9761         (get_original_base): New function.
9762         (build_vtbl_initializer): Initialize vid.rtti_binfo.
9763         Use a virtual thunk for a ctor vtable with an index
9764         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
9765         primary base within a constructor vtable. Only set
9766         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
9767         when primary base has been lost.
9768         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
9769
9770 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
9771
9772         * call.c (joust): Ensure more_specialized()'s argument length
9773         parameter has correct value for constructors.
9774
9775 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
9776
9777         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
9778
9779         * decl.c (mark_inlined_fns): Prototype.
9780
9781 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
9782
9783         * spew.c (yylex): Correct handling of friends.
9784
9785 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
9786
9787         * mangle.c (write_encoding): Pass write_function_type the
9788         FUNCTION_DECL for the function being encoded.
9789         (write_function_type): Pass it along to write_bare_function_type.
9790         (write_bare_function_type): Pass it along to write_method_parms.
9791         (write_method_parms): Don't mangle the compiler-generated
9792         parameters to a constructor or destructor.
9793
9794 2001-02-22  Andreas Jaeger  <aj@suse.de>
9795
9796         * optimize.c: Include toplev.h for
9797         note_deferral_of_defined_inline_function prototype.
9798
9799 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
9800
9801         * cp-tree.h (struct lang_decl_inlined_fns): New.
9802         (struct lang_decls): Add inlined_fns.
9803         (DECL_INLINED_FNS): New macro.
9804         * optimize.c (struct inline_data): Add inlined_fns.
9805         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
9806         (inlinable_function_p): Likewise, fix typo in comment,
9807         function is not inlinable if it already inlined function currently
9808         being optimized.
9809         (expand_call_inline): Add fn to inlined_fns if necessary.
9810         (optimize_function): Initialize inlined_fns.
9811         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
9812         * decl.c (mark_inlined_fns): New function.
9813         (lang_mark_tree): Call it.
9814
9815 2001-02-21  Jason Merrill  <jason@redhat.com>
9816
9817         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
9818         (DECL_UNINLINABLE): Move to middle-end.
9819
9820         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
9821         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
9822         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
9823         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
9824         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
9825
9826         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
9827         second parm of op=.
9828
9829 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
9830
9831         * decl2.c (set_decl_namespace): Allow explicit instantiations in
9832         any namespace.
9833
9834 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9835
9836         * optimize.c (expand_call_inline): Don't walk subtrees of type
9837         nodes.
9838
9839 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
9840
9841         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
9842         for a destructor.
9843
9844 2001-02-18  Jason Merrill  <jason@redhat.com>
9845
9846         Do put the VTT parameter in DECL_ARGUMENTS.
9847         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
9848         (current_vtt_parm): New macro.
9849         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
9850         (DECL_HAS_VTT_PARM_P): New macro.
9851         (DECL_VTT_PARM): Remove.
9852         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
9853         * decl.c (duplicate_decls): Only copy the operator code if
9854         appropriate.
9855         (start_function): Set current_vtt_parm.
9856         (lang_mark_tree): Don't mark vtt_parm.
9857         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
9858         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
9859         * class.c (build_clone): Maybe remove the VTT parm.
9860         * optimize.c (maybe_clone_body): Set up the VTT parm.
9861         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
9862         * call.c (build_over_call): Just allow the VTT arg.
9863         * method.c (make_thunk): Don't set DECL_VTT_PARM.
9864         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
9865         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
9866         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
9867         * error.c (dump_function_decl): Likewise.
9868         * call.c (build_user_type_conversion_1, convert_like_real): Abort
9869         if we try to call a constructor with in-charge or VTT parms.
9870         * method.c (skip_artificial_parms_for): New fn.
9871         * call.c (add_function_candidate, build_over_call): Call it.
9872         * call.c (build_new_method_call): Use current_vtt_parm.
9873         * init.c (expand_virtual_init): Likewise.
9874         * class.c (same_signature_p): No longer static.
9875         * cp-tree.h: Declare it.
9876         * search.c (look_for_overrides_r): Use it.
9877
9878 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
9879
9880         * cp-tree.h (new_abi_rtti_p): Remove.
9881         (name_mangling_version): Likewise.
9882         (flag_do_squangling): Likewise.
9883         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
9884         * decl.c (grokfndecl): Likewise.
9885         * decl2.c (name_mangling_version): Remove.
9886         (flag_do_squangling): Likewise.
9887         (lang_f_options): Remove `squangle'.
9888         (unsupported_options): Add `squangle'.
9889         (cxx_decode_option): Issue a warning about uses of
9890         -fname-mangling-version.
9891         (finish_file): Remove old ABI support.
9892         * pt.c (check_explicit_specialization): Likewise.
9893         (tsubst_decl): Likewise.
9894         * rtti.c (init_rtti_processing): Likewise.
9895         (build_headof): Likewise.
9896         (get_tinfo_decl_dynamic): Likewise.
9897         (tinfo_from_decl): Likewise.
9898         (build_dynamic_cast_1): Likewise.
9899         (synthesize_tinfo_var): Likewise.
9900         * init.c (build_new): Allow enumeration types for the array-bounds
9901         in a direct-new-declarator.
9902
9903         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
9904
9905         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
9906         TREE_PROTECTED from the template being specialized.
9907
9908 2001-02-17  Jason Merrill  <jason@redhat.com>
9909
9910         * decl2.c (build_artificial_parm): Set TREE_READONLY.
9911
9912         * decl.c (bad_specifiers): Allow throw specs on things with
9913         pointer-to-function or -member-function type.
9914         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
9915         a pmf.
9916
9917 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
9918
9919         * call.c (check_dtor_name): Handle template names correctly.
9920
9921 2001-02-16  Jason Merrill  <jason@redhat.com>
9922
9923         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
9924         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
9925         * optimize.c (maybe_clone_body): Don't substitute it.
9926         * call.c (build_new_method_call): Check in_chrg instead.
9927         * init.c (expand_virtual_init): Likewise.
9928
9929 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
9930
9931         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
9932         class-type introduces at least a type-name.
9933
9934 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
9935
9936         * call.c (convert_like_real): Create a temporary for non-lvalue.
9937
9938 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
9939
9940         * cp-tree.h: Fix typos in comments.
9941
9942 2001-02-16  Jason Merrill  <jason@redhat.com>
9943
9944         * optimize.c (remap_block): If we're compiling a clone, pass the
9945         new block to insert_block.
9946
9947 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
9948
9949         * semantics.c (finish_asm_stmt): Robustify.
9950
9951 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
9952
9953         * pt.c (push_template_decl_real): Don't remangle the name of a
9954         class template.
9955
9956 2001-02-15  Jim Meyering  <meyering@lucent.com>
9957
9958         * Make-lang.in (c++.install-common): Depend on installdirs.
9959         (c++.install-info): Likewise.
9960         (c++.install-man): Likewise.
9961
9962 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
9963
9964         * typeck2.c (build_m_component_ref): Robustify.
9965
9966 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
9967
9968         * friend.c (do_friend): Don't take the nested [template] class
9969         into account when deciding whether to warn about the friend
9970         function not referring to a template function.
9971
9972 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
9973
9974         * typeck.c (build_unary_op): Clarify error message.
9975
9976 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
9977
9978         * parse.y (component_constructor_declarator): allow optional
9979         parentheses around constructor class name.
9980
9981 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9982
9983         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
9984         section.
9985         * init.c (emit_base_init): Remove incorrect comment about
9986         virtual bases.
9987         * method.c (make_thunk): Fix comment alignment.
9988
9989 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9990
9991         Kill remnants of this is variable.
9992         * cp-tree.h (flag_this_is_variable): Remove.
9993         * decl2.c (flag_this_is_variable): Remove.
9994         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
9995         (build_vbase_path): The path is non-static, even in a cdtor.
9996         (resolves_to_fixed_type_p): Add additional return value.
9997         * search.c (init_vbase_pointers): Adjust.
9998         * tree.c (lvalue_p_1): Adjust.
9999         * typeck.c (mark_addressable): Adjust.
10000
10001 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
10002
10003         * pt.c (unify): Don't check cv quals of array types.
10004
10005 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
10006
10007         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
10008         check whether we already have the type.
10009
10010 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
10011
10012         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
10013         * call.c (build_op_delete_call): Simplify to remove duplicate
10014         code.
10015         * class.c (clone_function_decl): Don't build the deleting variant
10016         of a non-virtual destructor.
10017         * decl.c (finish_destructor_body): Don't call delete if this is a
10018         non-virtual destructor.
10019         * init.c (build_delete): Explicitly call `operator delete' when
10020         deleting an object with a non-virtual destructor.
10021
10022 2001-02-13  Jason Merrill  <jason@redhat.com>
10023
10024         * lang-specs.h: Add more __EXCEPTIONS.
10025
10026 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
10027
10028         * typeck2.c (process_init_constructor): Check
10029         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
10030
10031 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
10032
10033         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
10034         Remove spurious information in comment. Allow further
10035         adjustments of REFERENCE_TYPE args.
10036
10037 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
10038
10039         * errfn.c (cp_deprecated): Tweak diagnostic text.
10040         * parse.y (new_initializer): Deprecate initializer lists
10041         extension.
10042
10043 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
10044
10045         Remove old ABI support.
10046
10047 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
10048
10049         * decl2.c (flag_vtable_thunks): Always set it to 1.
10050         (flag_new_abi): Likewise.
10051         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
10052
10053         * Makefile.in (g++spec.o): Fix typo.
10054
10055 2001-02-09  Jason Merrill  <jason@redhat.com>
10056
10057         * lang-specs.h: Restore definition of __EXCEPTIONS.
10058
10059 2001-02-08  Jason Merrill  <jason@redhat.com>
10060
10061         * search.c (shared_member_p): New function.
10062         (lookup_field_r): Use it.
10063         * cp-tree.h (SHARED_MEMBER_P): Remove.
10064
10065         * method.c (process_overload_item): Handle template-dependent array
10066         bounds.
10067         * pt.c (type_unification_real): If we end up with undeduced nontype
10068         parms, try again.
10069
10070         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
10071         types.
10072
10073         * typeck2.c (friendly_abort): Don't say anything if we have
10074         earlier errors or sorries.
10075
10076         * decl.c (check_tag_decl): Notice attempts to redefine bool and
10077         wchar_t.  Ignore if in_system_header.
10078
10079         * decl.c (maybe_push_cleanup_level): New fn...
10080         (start_decl_1): ...split out from here.
10081         * cvt.c (build_up_reference): Use it.
10082         * cp-tree.h: Declare it.
10083
10084 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
10085
10086         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
10087         spec.
10088
10089 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
10090
10091         * pt.c (lookup_template_class): Make sure it's a primary
10092         template or template_template_parm when called from the parser.
10093         (instantiate_template_class): Add assertion.
10094
10095 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
10096
10097         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
10098         from error_mark_node.
10099
10100 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
10101
10102         Fix specification and implementation bugs in V3 ABI
10103         construction vtables.
10104         * cp-tree.h (flag_dump_class_layout): New flag.
10105         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
10106         (BINFO_LOST_PRIMARY_P): New flag.
10107         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
10108         (BINFO_PRIMARY_MARKED_P): Rename to ...
10109         (BINFO_PRIMARY_P): ... here.
10110         (binfo_via_virtual): New prototype.
10111         * decl2.c (flag_dump_class_layout): New flag.
10112         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
10113         use `=' as a file name separator.
10114         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
10115         bases.
10116         (build_vtbl_address): If this is a virtual primary base, then
10117         get the vtbl of what it is ultimately primary for.
10118         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
10119         for BINFO_PRIMARY_P.
10120         (dfs_skip_nonprimary_vbases_markedp): Likewise.
10121         (get_shared_vbase_if_not_primary): Likewise.
10122         (dfs_get_pure_virtuals): Likewise.
10123         (expand_upcast_fixups): Likewise.
10124         (fixup_virtual_upcast_offsets): Likewise.
10125         (dfs_find_vbase_instance): Likewise.
10126         (find_vbase_instance): Likewise.
10127         (binfo_from_vbase): Adjust comment to reflect reality.
10128         (binfo_via_virtual): New function.
10129         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
10130         for binfo walking during VTT construction.
10131         (dfs_mark_primary_bases): Remove.
10132         (force_canonical_binfo_r): New function.
10133         (force_canonical_binfo): New function.
10134         (mark_primary_virtual_base): New function.
10135         (mark_primary_bases): Walk in inheritance graph order, use
10136         mark_primary_virtual_base.
10137         (determine_primary_base): Use some more intermediate variables.
10138         (dfs_find_final_overrider): Don't check for overriding along a
10139         virtual path.
10140         (dfs_modify_vtables): Walk into primary virtual bases too.
10141         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
10142         (build_base_fields): Likewise.
10143         (dfs_set_offset_for_unshared_vbases): Likewise.
10144         (layout_virtual_bases): Likewise.
10145         (end_of_class): Likewise.
10146         (finish_struct_1): Call dump_class_hierarchy, if requested.
10147         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
10148         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
10149         (dump_class_hierarchy): Add file parameter. Append to file, if
10150         required.
10151         (finish_vtbls): Adjust accumulate_vtbl_inits call.
10152         Use canonical base for virtual bases.
10153         (build_vtt): Add more comments. Adjust build_vtt_inits call.
10154         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
10155         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
10156         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
10157         virtual VTTs.
10158         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
10159         from DATA.  We want virtual primary bases and all bases via virtual.
10160         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
10161         virtual base when not a construction vtable.
10162         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
10163         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
10164         Use canonical bases when processing virtual bases.
10165         (accumulate_vtbl_inits): We're interested in any base via a
10166         virtual path.
10167         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
10168         within a construction vtable, determine what is being overridden.
10169         (build_vtbl_initializer): Add more comments
10170         (add_vcall_offset_vtbl_entries_1): Adjust comment.
10171         (build_rtti_vtbl_entries): Check if the base has lost its
10172         primary.
10173
10174 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
10175
10176         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
10177
10178 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10179
10180         * decl.c (pushdecl): Call abort instead of fatal.
10181         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
10182         * init.c (build_new_1): Likewise.
10183         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
10184         * decl.c (build_typename_type): hash_table_init now returns void.
10185         decl.c (init_decl_processing): Make an error non-fatal.
10186
10187 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
10188
10189         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
10190         Document.
10191         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10192         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10193         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10194         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10195         * decl.c (maybe_commonize_var): Use the new name-mangling where
10196         appropriate.
10197         * decl2.c (comdat_linkage): Enhance comments.  Make all
10198         compiler-generated things static, if COMDAT is not available.
10199         (get_tinfo_decl): Do not make typeinfo objects that belong in the
10200         library COMDAT.
10201         (tinfo_base_init): Use the correct mangled name for typeinfo
10202         strings, and push them into the global scope.
10203         (typeinfo_in_lib_p): New function.
10204         (synthesize_tinfo_var): Use it.
10205         (create_real_tinfo_var): Likewise.
10206
10207 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
10208
10209         * decl.c (push_class_binding): Use context_for_name_lookup instead
10210         of CP_DECL_CONTEXT.
10211         * search.c (context_for_name_lookup): Remove static.  Check for NULL
10212         context in the loop.
10213         * cp-tree.h (context_for_name_lookup): Add prototype.
10214
10215 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
10216
10217         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
10218         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
10219         Remove.
10220         * call.c (convert_class_to_reference, build_user_type_conversion_1,
10221         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
10222
10223 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
10224
10225         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
10226         of macros used when compiling g++spec.c.
10227         * g++spec.c (lang_specific_driver): Link with the shared
10228         libgcc by default.
10229
10230 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
10231
10232         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
10233         make_reference_declarator, make_call_declarator), method.c
10234         (implicitly_declare_fn), parse.y (namespace_using_decl,
10235         notype_unqualified_id, expr_or_declarator, new_type_id,
10236         after_type_declarator, direct_after_type_declarator,
10237         notype_declarator, complex_notype_declarator,
10238         complex_direct_notype_declarator, qualified_id,
10239         notype_qualified_id, overqualified_id, direct_new_declarator,
10240         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
10241         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
10242         instead of build_parse_node.
10243
10244 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10245
10246         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
10247         (minus_one_node): Moved to top level gcc directory.  Renamed
10248         to integer_minus_one_node.
10249
10250         * init.c (init_init_processing): Don't set minus_one_node.
10251         (build_vec_init): Use integer_minus_one_node.
10252
10253         * rtti.c (get_tinfo_decl_dynamic): Likewise.
10254
10255 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
10256
10257         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
10258         identical and they would be replaced with constant, remove
10259         MODIFY_EXPR from the tree.
10260
10261 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10262
10263         * Make-lang.in: Remove all dependencies on defaults.h.
10264         * call.c: Don't include defaults.h.
10265         * decl.c: Likewise.
10266         * decl2.c: Likewise.
10267         * except.c: Likewise.
10268         * pt.c: Likewise.
10269         * rtti.c: Likewise.
10270         * tree.c: Likewise.
10271         * typeck.c: Likewise.
10272
10273 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
10274
10275         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
10276         operators even in "C" linkage.
10277         * method.c (set_mangled_name_for_decl): Likewise.
10278         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
10279         overloaded operators in "C" linkage.
10280
10281 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
10282
10283         * pt.c (tsubst_decl): Remove IN_DECL parameter.
10284         (tsubst_arg_types): Check parameter is not void.
10285         (tsubst): Adjust tsubst_decl call.
10286
10287 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
10288
10289         * call.c (add_builtin_candidate): Quote std properly, from
10290         previous change.
10291
10292 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10293
10294         * pt.c (check_explicit_specialization): Clone constructors and
10295         destructors.
10296
10297 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
10298
10299         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
10300         indicates anything special about template depth. Make sure we
10301         only count the user visible template classes.
10302
10303 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
10304
10305         * call.c (build_conv): Typo in comment.
10306         (add_builtin_candidate): Add more explanation.
10307         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
10308         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
10309         when we have enumeral types.
10310         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
10311         candidates for relops and eqops.
10312         (joust): Simplify control flow. Allow a non-template user
10313         function to hide a builtin.
10314
10315 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
10316
10317         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
10318         (more_specialized): Add deduction parameter.
10319         * call.c (joust): Adjust more_specialized call.
10320         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
10321         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
10322         (get_bindings_order): Remove.
10323         (get_bindings_real): Add DEDUCE parameter.
10324         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
10325         REFERENCE_TYPE jig for DEDUCE_ORDER.
10326         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
10327         maybe_adjust_types_for_deduction.
10328         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
10329         directly.
10330         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
10331         (check_cv_quals_for_unify): Use new unify qualifier flags.
10332         (unify): Clear new unify qualifier flags.
10333         (get_bindings_real): Add DEDUCE parameter.
10334         (get_bindings): Adjust call to get_bindings_real.
10335         (get_bindings_overload): Likewise.
10336         (most_specialized_instantiation): Adjust call to
10337         more_specialized.
10338
10339 2001-01-19  Jason Merrill  <jason@redhat.com>
10340
10341         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
10342
10343         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
10344         -fnew-abi.
10345
10346 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
10347
10348         * decl2.c (arg_assoc_class): Fix double iteration logic.
10349
10350 2001-01-19  Jason Merrill  <jason@redhat.com>
10351
10352         * init.c (build_delete): Always call convert_force to strip cv-quals.
10353
10354         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
10355         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
10356         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
10357
10358 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10359
10360         * search.c (get_vbase_1): Count only virtual bases.
10361
10362 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10363
10364         * class.c (duplicate_tag_error): Robustify flag clearing.
10365
10366 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10367
10368         * cp-tree.h (lookup_template_class): Add complain parm.
10369         * decl.c (lookup_namespace_name): Adjust call to
10370         lookup_template_class.
10371         (make_typename_type): Likewise.
10372         * semantics.c (finish_template_type): Likewise.
10373         * pt.c (lookup_template_class): Add complain parm. Adjust.
10374         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
10375         (tsubst): Likewise.
10376
10377 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10378
10379         * pt.c (copy_default_args_to_explicit_spec): Preserve
10380         object's CV quals. Reorganize.
10381
10382 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10383
10384         * typeck.c (build_modify_expr): Say `initialization' for
10385         INIT_EXPRs.
10386         * init.c (build_default_init): Convert to enumeral type, if
10387         needed.
10388
10389 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
10390
10391         * parse.y (nomods_initdcl0): Properly set things up for
10392         initdcl0_innards.
10393
10394 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10395
10396         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
10397         (type_unification_real): Set it.
10398         (unify): Use it.
10399
10400 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10401
10402         * decl.c (finish_destructor_body): Convert to vbase pointer here.
10403
10404 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10405
10406         * semantics.c (begin_class_definition): Check we're not inside a
10407         template parm list.
10408
10409 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10410
10411         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
10412         BASELINK_P.
10413
10414 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10415
10416         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
10417         * call.c (build_over_call): Add comment.
10418
10419 2001-01-16 Daniel Berlin <dberlin@redhat.com>
10420
10421         * cvt.c (ocp_convert): Handle vector type conversion
10422         * typeck2.c (digest_init): Handle vector type initializations
10423
10424 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
10425
10426         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
10427           was given.
10428
10429 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
10430
10431         * pt.c (check_nontype_parm): Rename to ...
10432         (invalid_nontype_parm_type_p): ... here.
10433         (process_template_parm): Adjust.
10434         (convert_template_argument): Adjust.
10435
10436 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
10437
10438         * pt.c (check_nontype_parm): New function.
10439         (process_template_parm): Use it.
10440         (convert_template_argument): Use it.
10441         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
10442         member.
10443
10444 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
10445
10446         * tree.c: Add defaults.h
10447         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
10448         * Make-lang.in (cp/tree.o): Add defaults.h.
10449
10450 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10451
10452         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
10453
10454 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10455
10456         * g++.1: Change to be ".so man1/gcc.1".
10457
10458 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10459
10460         * Make-lang.in (c++.info, c++.install-info): Build and install g++
10461         internals info.
10462         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
10463         ($(srcdir)/cp/g++int.info): New target.
10464         * gxxint.texi: Add info directory entry.  Use @@ in email address.
10465         * .cvsignore: Update.
10466
10467 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
10468
10469         * typeck.c (build_c_cast): Do template processing earlier.
10470         Always pedwarn on array casts.
10471
10472 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
10473
10474         * friend.c (make_friend_class): Make sure a templated class is
10475         actually a template.
10476
10477 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10478
10479         * decl2.c (get_guard): Set linkage from guarded decl.
10480
10481 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10482
10483         * call.c (convert_default_arg): Check for unprocessed
10484         DEFAULT_ARG.
10485         * cp-tree.h (replace_defarg): Move to spew.c.
10486         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
10487         spew.c, which is where they really are.
10488         (done_pending_defargs): Declare.
10489         (unprocessed_defarg_fn): Declare.
10490         * decl.c (replace_defarg): Move to spew.c
10491         * parse.y (structsp): Call done_pending_defargs.
10492         * spew.c (defarg_fns): Rearrange list structure.
10493         (defarg_fnsdone): New static variable.
10494         (defarg_depfns): New static variable.
10495         (init_spew): Adjust.
10496         (add_defarg_fn): Store the type in TREE_TYPE.
10497         (do_pending_defargs): Detect and deal with ordering constraints
10498         and circularity.
10499         (done_pending_defargs): New function.
10500         (unprocessed_defarg_fn): New function.
10501         (replace_defarg): Moved from decl.c. Robustify. Don't save
10502         if circularity detected.
10503
10504 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10505
10506         * pt.c (unify): Check array has a domain, before checking
10507         whether it is variable sized.
10508
10509 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10510
10511         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
10512         parameters with pointers to arrays of unknown bound.
10513
10514 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10515
10516         * parse.y (template_parm_header, template_spec_header): New
10517         reductions. Split out from ...
10518         (template_header): ... here. Use them.
10519         (template_template_parm): Use template_parm_header.
10520         * semantics.c (finish_template_template_parm): Add assert.
10521
10522 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10523
10524         * mangle.c (write_builtin_type): Fix thinko.
10525
10526         * pt.c (copy_default_args_to_explicit_spec_1): New function.
10527         (copy_default_args_to_explicit_spec): Likewise.
10528         (check_explicit_specialization): Use it.
10529
10530         * class.c (finish_struct_1):  Remove last argument in call to
10531         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
10532         * decl.c (builtin_function): Likewise.
10533         (build_cp_library_fn): Likewise.
10534         (check_initializer): Likewise.
10535         (make_rtl_for_nonlocal_decl): Likewise.
10536         (cp_finish_decl): Likewise.
10537         (start_function): Likewise.
10538         * decl2.c (finish_anon_union): Likewise.
10539         * friend.c (do_friend): Likewise.
10540         * init.c (build_java_class_ref): Likewise.
10541         * method.c (make_thunk): Likewise.
10542         * pt.c (tsubst_friend_function): Likewise.
10543         * semantics.c (expand_body): Likewise.
10544
10545 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10546
10547         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
10548         looking at DECL_CLONED_FUNCTION for non-functions.
10549
10550 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10551
10552         * error.c (dump_template_parameter): Use parm to determine how
10553         to print default value.
10554
10555 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10556
10557         * class.c (duplicate_tag_error): Clear more flags.
10558
10559 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10560
10561         * call.c (build_new_method_call): Use binfo_for_vbase.
10562
10563 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
10564
10565         * cp-tree.h (flag_cond_mismatch): Don't declare.
10566         * decl2.c (flag_cond_mismatch): Don't define.
10567         (lang_f_options): Remove cond-mismatch.
10568         (unsupported_options): Add cond-mismatch.
10569
10570 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
10571
10572         * class.c (handle_using_decl): Reject using of constructor name
10573         of sourcing class. Allow injecting of a method with same name as
10574         nested class. Fixup error messages.
10575
10576 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
10577
10578         * decl2.c (lang_decode_option): Handle -Wformat=2.
10579
10580 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10581
10582         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
10583         initialized_in_class.
10584         (DECL_DEFINED_IN_CLASS_P): Rename to ...
10585         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
10586         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
10587         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
10588         * pt.c (check_default_tmpl_args): Adjust for
10589         DECL_INITIALIZED_IN_CLASS_P.
10590         (instantiate_class_template): Likewise.
10591         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
10592
10593         * class.c (finish_struct): Constify saved_filename.
10594
10595 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10596
10597         * class.c (duplicate_tag_error): Adjust diagnostic.
10598         (finish_struct): Locally set location to start of struct.
10599         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
10600
10601 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10602
10603         * decl.c (struct binding_level): Adjust class_shadowed comments
10604         to reflect reality.
10605         (push_class_level_binding): Adjust comments to reflect reality.
10606         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
10607         Don't set TREE_VALUE on the class_shadowed list.
10608
10609 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10610
10611         * decl2.c (acceptable_java_type): Allow references too.
10612         * init.c (build_java_class_ref): When using the new ABI, search
10613         `class$' and have it mangled with `mangle_decl.'
10614         * mangle.c (write_java_integer_type_codes): New function.
10615         (write_builtin_type): Detect and mangle Java integer and real
10616         types.
10617
10618 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
10619
10620         * decl2.c (grokfield): Don't accept `asm' specifiers for
10621         non-static data members.
10622
10623 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10624
10625         * expr.c (cplus_expand_expr): Don't reset `target'.
10626
10627 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
10628
10629         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
10630
10631 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
10632
10633         * parse.y (template_datadef): Check for error_mark_node.
10634
10635 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
10636
10637         * cp-tree.def (DEFAULT_ARG): Make `x' class.
10638
10639 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
10640
10641         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
10642         (record_builtin_type): Make non-static.
10643         (flag_short_double): Don't declare.
10644         (init_decl_processing): Remove the creation of many tree nodes now
10645         in c_common_nodes_and_builtins.
10646         (build_void_list_node): New function.
10647         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
10648         * cp-tree.h (flag_short_wchar): Don't declare.
10649
10650 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
10651
10652         * call.c (build_conv): Don't use build1 for USER_CONV.
10653         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
10654
10655 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
10656
10657         * lex.c (lang_init): Call c_common_lang_init.
10658
10659 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
10660
10661         * search.c (lookup_fnfields_here): Remove.
10662         (look_for_overrides_r): Use lookup_fnfields_1.
10663         Ignore functions from using declarations.
10664
10665 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
10666
10667         Implement exceptions specifiers for implicit member functions.
10668         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
10669         * method.c (synthesize_exception_spec): New function.
10670         (locate_dtor, locate_ctor, locate_copy): New functions.
10671         (implicitly_declare_fn): Generate the exception spec too.
10672         * search.c (check_final_overrider): Check artificial functions
10673         too.
10674         * typeck2.c (merge_exception_specifiers): New function.
10675
10676 2001-01-03  Jason Merrill  <jason@redhat.com>
10677
10678         * init.c (build_default_init): New fn.
10679         (perform_member_init): Split out from here.
10680         (build_new_1): Use it.  Simplify initialization logic.
10681         (build_vec_init): Take an array, rather than a pointer and maxindex.
10682         Speed up simple initializations.  Don't clean up if we're assigning.
10683         * cp-tree.h: Adjust.
10684         * decl2.c (do_static_initialization): Remove TREE_VEC case.
10685         * parse.y (new_initializer): Return void_zero_node for ().
10686         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
10687         * typeck2.c (digest_init): Only complain about user-written
10688         CONSTRUCTORs.
10689
10690 2000-12-22  Mike Stump  <mrs@wrs.com>
10691
10692         * decl2.c: (max_tinst_depth): Increase to 50.
10693
10694 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
10695
10696         * class.c (invalidate_class_lookup_cache): Zero the
10697         previous_class_values.
10698         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
10699         TREE_INT_CST_HIGH.
10700         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
10701         * decl.c (free_bindings): New variable.
10702         (push_binding): Don't create a new binding if we have one on the
10703         free list.
10704         (pop_binding): Put old bindings on the free list.
10705         (init_decl_processing): Use size_int, not build_int_2.
10706         Register free_bindings as a GC root.
10707         (cp_make_fname_decl): Use size_int, not build_int_2.
10708         (push_inline_template_parms_recursive): Likewise.
10709         (end_template_parm_list): Likewise.
10710         (for_each_template_parm): Do not use walk_tree_without_duplicates.
10711         (tsubst_template_parms): Use size_int, not build_int_2.
10712         (tsubst): Likewise.
10713         * rtti.c (get_vmi_pseudo_type_info): Likewise.
10714
10715 2001-01-02  Richard Henderson  <rth@redhat.com>
10716
10717         * parse.y (asm): Set ASM_INPUT_P.
10718
10719 2001-01-02  Jason Merrill  <jason@redhat.com>
10720
10721         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
10722         for v3 ABI.
10723
10724         * typeck.c (cp_truthvalue_conversion): New fn.
10725         * cvt.c (ocp_convert): Use it.
10726
10727         * cp-tree.h: Lose c-common.c decls.
10728
10729         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
10730         * cvt.c (convert_to_void): Use type_unknown_p.
10731
10732         * typeck.c (strip_all_pointer_quals): Also strip quals from
10733         pointer-to-member types.
10734
10735         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
10736         parse.y as C.
10737
10738         * call.c (build_new_method_call): Do evaluate the object parameter
10739         when accessing a static member.
10740         * typeck.c (build_component_ref): Likewise.
10741
10742 2001-01-02  Andreas Jaeger  <aj@suse.de>
10743
10744         * decl.c (cp_missing_noreturn_ok_p): New.
10745         (init_decl_processing): Set lang_missing_noreturn_ok_p.
10746
10747 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
10748
10749         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
10750
10751 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
10752
10753         * class.c (pushclass): Remove #if 0'd code.
10754         * cp-tree.h (overload_template_name): Remove.
10755         * decl.c (store_bindings): Simplify.
10756         (pop_from_top_level): Likewise.
10757         * pt.c (overload_template_name): Remove.
10758         (instantiate_decl): Don't call push_to_top_level if it's not
10759         needed.
10760
10761 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
10762
10763         * pt.c (register_local_specialization): Don't return a value.
10764         (lookup_template_class): Use move-to-front heuristic when looking
10765         up template instantiations.
10766         (instantiate_decl): Only push_to_top_level when we're actually
10767         going to instantiate the template.
10768
10769 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
10770
10771         * search.c (binfo_for_vtable): Return least derived class, not
10772         most.  Handle secondary vtables.
10773
10774 2000-12-22  Jason Merrill  <jason@redhat.com>
10775
10776         * pt.c (more_specialized): Don't optimize len==0.
10777         (fn_type_unification): If we're adding the return type, increase len.
10778
10779         * typeck.c (build_binary_op): Fix pmf comparison logic.
10780
10781         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
10782         DECL_STATIC_FUNCTION_P.
10783
10784         * semantics.c (genrtl_finish_function): Don't try to jump to
10785         return_label unless it exists.
10786
10787         In partial ordering for a call, ignore parms for which we don't have
10788         a real argument.
10789         * call.c (joust): Pass len to more_specialized.
10790         (add_template_candidate_real): Strip 'this', pass len.
10791         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
10792         (get_bindings_order): New fn.  Pass len down.
10793         (get_bindings_real): Strip 'this', pass len.
10794         (fn_type_unification): Likewise.
10795         (type_unification_real): Succeed after checking 'len' args.
10796         (most_specialized_instantiation): Lose explicit_args parm.
10797         * class.c (resolve_address_of_overloaded_function): Strip 'this',
10798         pass len.
10799
10800 2000-12-21  Jason Merrill  <jason@redhat.com>
10801
10802         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
10803         DECL_TEMPLATE_RESULT.
10804
10805         * search.c (lookup_field_r): Call lookup_fnfields_1, not
10806         lookup_fnfields_here.
10807
10808         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
10809
10810         * call.c (build_object_call): Also allow conversions that return
10811         reference to pointer to function.
10812         (add_conv_candidate): Handle totype being ref to ptr to fn.
10813         (build_field_call): Also allow members of type reference to function.
10814         Lose support for calling pointer to METHOD_TYPE fields.
10815
10816         * error.c (dump_expr): Handle *_CAST_EXPR.
10817
10818         * typeck2.c (build_scoped_ref): Always convert to the naming class.
10819
10820         * tree.c (break_out_cleanups): Lose.
10821         * cp-tree.h: Remove prototype.
10822         * typeck.c (build_component_ref): Don't break_out_cleanups.
10823         (build_compound_expr): Likewise.
10824         * semantics.c (finish_expr_stmt): Likewise.
10825
10826 2000-12-20  Richard Henderson  <rth@redhat.com>
10827
10828         * cp-tree.h: Update declarations.
10829         * decl.c (finish_case_label): Return the new stmt node.
10830         * semantics.c (finish_goto_stmt): Likewise.
10831         (finish_expr_stmt, finish_return_stmt): Likewise.
10832         (finish_break_stmt, finish_continue_stmt): Likewise.
10833         (finish_asm_stmt): Likewise.
10834         * parse.y (already_scoped_stmt): Set STMT_LINENO.
10835         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
10836         (simple_if, simple_stmt): Return the new stmt node.
10837         (save_lineno): New.
10838
10839 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
10840
10841         * cp-tree.h: Don't declare warn_long_long.
10842
10843 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10844
10845         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
10846         IS_AGGR_TYPE.
10847
10848 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10849
10850         * pt.c (unify): Handle when both ARG and PARM are
10851         BOUND_TEMPLATE_TEMPLATE_PARM.
10852
10853 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10854
10855         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
10856         DECL_TEMPLATE_PARM_P.
10857
10858 2000-12-15  Jason Merrill  <jason@redhat.com>
10859
10860         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
10861
10862         * init.c (build_new_1): Don't strip quals from type.
10863
10864         * decl.c (pushdecl): Don't check for linkage on a non-decl.
10865
10866         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
10867
10868         * call.c (build_new_function_call): Lose space before paren in
10869         error message.
10870         (build_new_method_call): Likewise.
10871
10872         * typeck2.c (build_m_component_ref): Propagate quals from datum.
10873
10874 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10875
10876         * pt.c (check_explicit_specialization): Propagate default
10877         function arguments to explicit specializations.
10878
10879 2000-12-13  DJ Delorie  <dj@redhat.com>
10880
10881         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
10882         and <? operators.
10883
10884 2000-12-08  Jason Merrill  <jason@redhat.com>
10885
10886         * error.c (dump_function_name): Don't let the user see __comp_ctor.
10887
10888         Clean up copy-initialization in overloading code.
10889         * call.c (build_user_type_conversion_1): Die if we are asked to
10890         convert to the same or a base type.
10891         (implicit_conversion): Avoid doing so.  Lose reference binding code.
10892         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
10893         direct-initialization.  Also do direct-init part of copy-init.
10894         (build_user_type_conversion): Don't provide context to convert_like.
10895         * cvt.c (ocp_convert): build_user_type_conversion will now provide
10896         the constructor call for copy-init.
10897
10898         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
10899         instantiation of a member template.
10900         (do_decl_instantiation): Not here.
10901
10902 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
10903
10904         * class.c (check_field_decls): Don't special case anonymous
10905         fields in error messages.
10906         (note_name_declared_in_class): Use %D on diagnostic.
10907
10908         * tree.c (pod_type_p): Use strip_array_types.
10909         (cp_valid_lang_attribute): Likewise.
10910         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
10911         multiple evaluations.
10912         (cp_has_mutable_p): Use strip_array_types.
10913
10914 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
10915
10916         * cp-tree.h (sufficient_parms_p): Declare new function.
10917         * call.c (sufficient_parms_p): New function, broken out of ...
10918         (add_function_candidate): ... here. Use it.
10919         (add_conv_candidate): Use it.
10920         * decl.c (grok_ctor_properties): Use it.
10921
10922 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
10923
10924         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
10925
10926 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10927
10928         * decl2.c (lang_decode_option): Handle -Wformat-security.
10929
10930 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10931
10932         * pt.c (verify_class_unification): New function.
10933         (get_class_bindings): Use it.
10934         (try_class_unification): Tidy.
10935         (unify): Handle when argument of a template-id is not
10936         template parameter dependent.
10937         (template_args_equal): Handle when TREE_CODE's do not match.
10938
10939 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
10940
10941         * lang-specs.h (c++): When invoking the stand-alone preprocessor
10942         for -save-temps, pass all relevant -Defines to it, and then don't
10943         pass them to cc1plus.
10944
10945 2000-12-05  Will Cohen  <wcohen@redhat.com>
10946
10947         * decl.c (finish_case_label): Cleared
10948         more_cleanups_ok in surrounding function scopes.
10949         (define_label): Likewise.
10950
10951 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
10952
10953         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
10954         (get_matching_virtual): Remove.
10955         (look_for_overrides): Declare new function.
10956         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
10957         DECL_VINDEX here.
10958         * class.c (check_for_override): Move base class iteration code
10959         to look_for_overrides.
10960         * search.c (next_baselink): Remove.
10961         (get_virtuals_named_this): Remove.
10962         (get_virtual_destructor): Remove.
10963         (tree_has_any_destructors_p): Remove.
10964         (struct gvnt_info): Remove.
10965         (check_final_overrider): Remove `virtual' from error messages.
10966         (get_matching_virtuals): Remove. Move functionality to ...
10967         (look_for_overrides): ... here, and ...
10968         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
10969         to be overriding.
10970
10971 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
10972
10973         * typeck.c (get_delta_difference): If via a virtual base,
10974         return zero.
10975         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
10976         adjustment.
10977
10978 2000-12-04  Richard Henderson  <rth@redhat.com>
10979
10980         * error.c (dump_tree): Use output_add_string not OB_PUTS.
10981
10982 2000-12-04  Jason Merrill  <jason@redhat.com>
10983
10984         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
10985         (write_builtin_type): Pass intSI_type_node and the like through
10986         type_for_mode.
10987         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
10988         Pass intSI_type_node and the like through type_for_mode.
10989         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
10990         * pt.c (tsubst, unify): Likewise.
10991         * tree.c (walk_tree): Likewise.
10992         * error.c (dump_type): Likewise.
10993         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
10994
10995         * Make-lang.in: Tweak top comment for emacs.
10996         (cp/TAGS): Restore.
10997
10998         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
10999
11000         * class.c (clone_function_decl): Robustify.
11001
11002 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
11003
11004         * decl.c (store_bindings): Only search in the non modified
11005         old_bindings for duplicates.
11006
11007 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
11008
11009         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
11010         TYPE_POLYMORPHIC_P.
11011
11012         * typeck.c (build_static_cast): Remove unused variable.
11013
11014 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11015
11016         * pt.c: Fix typo in comment.
11017
11018 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
11019
11020         * decl2.c (warn_format): Remove definition.
11021         (lang_decode_option): Handle -Wformat-nonliteral,
11022         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
11023
11024 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
11025
11026         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
11027         (init_decl_processing): Don't create string_type_node,
11028         const_string_type_node, wint_type_node, intmax_type_node,
11029         uintmax_type_node, default_function_type, ptrdiff_type_node and
11030         unsigned_ptrdiff_type_node.  Adjust position of call to
11031         c_common_nodes_and_builtins.
11032         (identifier_global_value): New function.
11033
11034 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
11035
11036         * call.c (standard_conversion): Reject pointer to member
11037         conversions from ambiguous, inaccessible or virtual bases.
11038         * typeck.c (build_static_cast): Don't check pointers to members
11039         specially.
11040
11041 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
11042
11043         * method.c (do_build_copy_constructor): Preserve cv
11044         qualifications when accessing source object members.
11045         (do_build_assign_ref): Likewise. Remove separate diagnostics for
11046         unnamed fields.
11047
11048 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
11049
11050         * method.c (do_build_assign_ref): Construct appropriately
11051         CV-qualified base reference. Don't allow const casts in base
11052         conversion.
11053
11054 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
11055
11056         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
11057         incomplete return type.
11058
11059 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11060
11061         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
11062         * semantics.c (finish_base_specifier): Accept a _TYPE not a
11063         _DECL.
11064
11065 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11066
11067         * spew.c (yyerror): Cope if yylval.ttype is NULL.
11068
11069 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11070
11071         * decl.c (grokdeclarator): Diagnose undefined template contexts.
11072
11073 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11074
11075         * decl.c (grokdeclarator): Do type access control on friend
11076         class.
11077
11078 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
11079
11080         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
11081         bison parser ickiness.
11082         * pt.c (tsubst_friend_function): Enter namespace scope when
11083         tsubsting the function name.
11084         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
11085
11086 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
11087
11088         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
11089         * cvt.c (cp_convert_to_pointer): Add force parameter.
11090         Allow conversions via virtual base if forced.
11091         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
11092         (ocp_convert): Likewise.
11093         * search.c (binfo_from_vbase): Return the virtual base's binfo.
11094         * typeck.c (get_delta_difference): Adjust handling of virtual
11095         bases.
11096
11097 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
11098
11099         * tree.c (struct list_hash): Remove.
11100         (list_hash_table): Make it be an htab.
11101         (struct list_proxy): New type.
11102         (list_hash_eq): New function.
11103         (list_hash_pieces): Renamed from ...
11104         (list_hash): ... this.
11105         (list_hash_lookup): Remove.
11106         (list_hash_add): Remove.
11107         (hash_tree_cons): Use the generic hashtable.
11108         (mark_list_hash): Remove.
11109         (init_tree): Create the hashtable.
11110
11111 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
11112
11113         * method.c (build_mangled_C9x_name): Rename to
11114         build_mangled_C99_name.  Change C9X references in comments to
11115         refer to C99.
11116
11117 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
11118
11119         * parse.y (unary_expr): Move VA_ARG from here ...
11120         (primary): ... to here.
11121
11122 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
11123
11124         * semantics.c (finish_id_expr): If type is error_mark, return
11125         error_mark.
11126
11127 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
11128
11129         * pt.c (lookup_template_class): Simplify loop exit constructs.
11130         Cope when there is no partial instantiation of a template
11131         template member.
11132
11133 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
11134
11135         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
11136
11137 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
11138
11139         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
11140         prefix.
11141
11142         * pt.c (do_decl_instantiate): Explicitly clone constructors and
11143         destructors that haven't already been cloned.
11144
11145 2000-11-20  Richard Henderson  <rth@redhat.com>
11146
11147         * parse.y (yyparse_1): Rename the parser entry point.
11148
11149 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
11150
11151         * mangle.c (write_name): Use <unscoped-name> for names directly in
11152         function scope.
11153         (write_unscoped_name): Accept names directly in function scope.
11154
11155 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
11156
11157         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
11158         * parse.y (extdef): Add EXPORT reduction.
11159         * spew.c (yylex): Don't skip export here.
11160
11161 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
11162
11163         * decl.c (init_decl_processing): Correct name of pure virtual
11164         function under the new ABI.
11165         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
11166         (throw_bad_typeid): Likewise for bad typeid function.
11167
11168 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
11169
11170         * decl.c (grokparms): Don't even function types of `void' type,
11171         either.
11172         * mangle.c (write_type): Don't crash when confronted with the
11173         error_mark_node.
11174
11175         * decl.c (grokparms): Don't create parameters of `void' type.
11176
11177 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
11178
11179         * lex.c (mark_impl_file_chain): Delete.
11180         (init_parse): Remove call to ggc_add_string_root.  No need to
11181         ggc_strdup a string constant.  Do not add impl_file_chain to GC
11182         roots.
11183         (handle_pragma_implementation): No need to ggc_strdup main_filename.
11184
11185 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
11186
11187         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
11188
11189 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
11190
11191         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
11192         * decl.c (grokdeclarator): Don't reject void parms here.
11193         (require_complete_types_for_parms): Simplify, use
11194         complete_type_or_else.
11195         (grokparms): Remove bitrot. Remove funcdef parm.
11196         Deal with ellipsis parm lists here.
11197         * semantics.c (finish_parmlist): Don't append void_list_node
11198         here. Set PARMLIST_ELLIPSIS_P.
11199
11200 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
11201
11202         * typeck2.c (incomplete_type_error): Reorganize to avoid
11203         excessive diagnostics.
11204
11205 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
11206
11207         * lex.c (struct impl_files, internal_filename): Constify a char *.
11208
11209 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
11210
11211         * mangle.c (write_special_name_constructor): Don't generate
11212         assembler junk when confronted with an old-style constructor.
11213         (write_special_name_destructor): Likewise.
11214         (mangle_decl_string): Do it here instead.
11215
11216 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
11217
11218         * call.c (op_error): Make error messages clearer.
11219
11220 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
11221
11222         * decl.c (wrapup_globals_for_namespace): Don't mark things
11223         TREE_ASM_WRITTEN when they're not.
11224
11225 2000-11-15  Jason Merrill  <jason@redhat.com>
11226
11227         * typeck2.c (friendly_abort): Uncount the error before handing
11228         off to fancy_abort.
11229
11230 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
11231
11232         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
11233
11234 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
11235
11236         * class.c (build_vtbl_initializer): Fix typo in comment.
11237         * typeck.c (expr_sizeof): Don't crash on errors.
11238
11239 2000-11-14  Jim Wilson  <wilson@redhat.com>
11240
11241         * lang-specs.h: Add %2 after %(cc1_options).
11242
11243 2000-11-14  Richard Henderson  <rth@redhat.com>
11244
11245         * typeck.c (c_sizeof): Be strict about casting result value
11246         back to c_size_type_node.
11247         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
11248
11249 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
11250
11251         * typeck.c (build_unary_op): Use boolean_increment from
11252         c-common.c, moving the relevant code there.
11253
11254 2000-11-11  Jason Merrill  <jason@redhat.com>
11255
11256         * typeck.c (mark_addressable): Don't call put_var_into_stack.
11257
11258         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
11259         in inlines.
11260
11261 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11262
11263         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
11264         * lex.c (copy_lang_decl): Likewise.
11265
11266 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
11267
11268         * dump.c (cp_dump_tree): Don't dump function bodies here.
11269
11270         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
11271         (dump.o): Update dependency list.
11272         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
11273         (flag_dump_translation_unit): Likewise.
11274         (CP_TYPE_QUALS): Adjust definition.
11275         (DECL_C_BIT_FIELD): Remove.
11276         (SET_DECL_C_BIT_FIELD): Likewise.
11277         (CLEAR_DECL_C_BIT_FIELD): Likewise.
11278         (add_maybe_template): Likewise.
11279         (strip_array_types): Likewise.
11280         (dump_node_to_file): Likewise.
11281         (cp_dump_tree): New function.
11282         * decl.c (init_decl_processing): Set lang_dump_tree.
11283         * decl2.c (flag_dump_translation_unit): Remove.
11284         * dump.c: Move most of it to ../c-dump.c.
11285         (cp_dump_tree): New function.
11286         * pt.c (add_maybe_template): Remove.
11287         * typeck.c (strip_array_types): Likewise.
11288
11289 2000-11-07  Eric Christopher  <echristo@redhat.com>
11290
11291         * decl.c (init_decl_processing): Change definition of
11292         __wchar_t to wchar_t.  Remove artificial declaration of
11293         wchar_t.
11294         * lex.c: Change instances of __wchar_t to wchar_t.
11295
11296 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
11297
11298         * lex.c (do_identifier): Don't lookup_name for operators.
11299         * parse.y (operator): Save looking_for_typename.
11300         (unoperator): Restore it.
11301         * spew.c (frob_opname): Use nth_token for lookahead.
11302
11303 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
11304
11305         * decl.c (grok_op_properties): Always use coerce_new_type and
11306         coerce_delete_type.
11307         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
11308         exception specification. Tidy up.
11309         (coerce_delete_type): Preserve exception specification. Tidy up.
11310
11311 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
11312
11313         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
11314         (push_binding_level), error.c (cp_tree_printer), pt.c
11315         (process_partial_specialization, tsubst_template_arg_vector),
11316         search.c (lookup_member): Use memset () instead of bzero ().
11317
11318 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
11319
11320         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
11321
11322 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
11323
11324         * Make-lang.in (c++.distdir): Remove.
11325
11326 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
11327
11328         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
11329         declarations from different namespaces to be combined.
11330
11331 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
11332
11333         * decl.c: Include tm_p.h.
11334
11335 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
11336
11337         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
11338
11339 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11340
11341         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
11342         (build_overload_value), repo.c (open_repo_file), xref.c
11343         (open_xref_file): Use strchr () and strrchr () instead of index ()
11344         and rindex ().
11345
11346 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
11347
11348         * call.c (build_over_call): Call fold on the CALL_EXPR.
11349
11350 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
11351
11352         * error.c (dump_template_decl): Separate template hearders with
11353         space not comma.
11354
11355 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
11356
11357         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
11358         TS_* flags with corresponding TFF_*.  Adjust prototypes of
11359         functions (which used to take a tree_string_flags) to take an int.
11360
11361         * cp-tree.h (enum tree_string_flags): Remove
11362         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
11363         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
11364         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
11365         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
11366         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
11367         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
11368         (type_as_string, decl_as_string, expr_as_string,
11369         context_as_string): Adjust prototype.
11370
11371         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
11372         instead of TS_PLAIN.
11373
11374         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
11375         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
11376         plain `0'.
11377
11378 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
11379
11380         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
11381         (linkage_kind): New enumeration.
11382         (decl_linkage): New function.
11383         * decl2.c (comdat_linkage): Extend comment.
11384         * error.c (dump_function_decl): Print the arguments used to
11385         instantiate a template, even when not printing the type of the
11386         function.
11387         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
11388         not TREE_PUBLIC, to test for external linkage.
11389         * tree.c (decl_linkage): New function.
11390
11391 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
11392
11393         * pt.c (instantiate_decl): Always instantiate static data members
11394         initialized in-class.
11395
11396 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
11397
11398         * Make-lang.in: Move all build rules here from Makefile.in,
11399         adapt to new context.  Wrap all rules that change the current
11400         directory in parentheses.  Expunge all references to $(P).
11401         When one command depends on another and they're run all at
11402         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
11403         all object-file generation rules.  Delete obsolete variables.
11404
11405         * Makefile.in: Delete.
11406         * config-lang.in: Delete outputs= line.
11407
11408 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
11409
11410         * error.c (dump_function_decl): Print no space between
11411         `ptr-operator' the `type-specifier' of the return type.
11412         (dump_type_prefix): Make sure we put space at the appropriate
11413         place.
11414
11415 2000-10-23  Jason Merrill  <jason@redhat.com>
11416
11417         * call.c (equal_functions): Also call decls_match for extern "C" fns.
11418
11419 2000-10-22  Jason Merrill  <jason@redhat.com>
11420
11421         * call.c (build_conditional_expr): Use ocp_convert to force
11422         rvalue conversion.
11423
11424 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
11425
11426         * call.c (standard_conversion): Use RVALUE_CONVs for all
11427         expressions that satisfy lvalue_p, not just those that satisfy
11428         real_lvalue_p.
11429
11430         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
11431
11432         * typeck.c (c_sizeof): Return an expression of `size_t' type,
11433         not one with TYPE_IS_SIZETYPE set.
11434         (dubious_conversion_warnings): Remove special-case code.
11435
11436 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
11437
11438         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
11439         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
11440         (dump_type_prefix): Print vector-of-int as 'int vector'.
11441         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
11442         * tree.c (walk_tree): Handle VECTOR_TYPE.
11443
11444         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
11445
11446 2000-10-21  Jason Merrill  <jason@redhat.com>
11447
11448         * parse.y (operator): Set got_object from got_scope.
11449         Set looking_for_typename.
11450         * decl.c (lookup_name_real): Clear val after setting from_obj.
11451         Reorganize diagnostic.
11452
11453 2000-10-20  Jason Merrill  <jason@redhat.com>
11454
11455         * tree.c (walk_tree): Don't walk into default args.
11456
11457         * error.c (dump_expr): Use host_integerp.
11458
11459 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
11460
11461         * typeck2.c (abstract_virtuals_error): Use "because" instead of
11462         "since" in error message.
11463
11464 2000-10-20  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11465
11466         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
11467
11468 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
11469
11470         * decl.c (revert_static_member_fn): Fixed typo.
11471
11472 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
11473
11474         * class.c (subobject_offset_fn): New type.
11475         (dfs_record_base_offsets): Remove.
11476         (record_base_offsets): Likewise.
11477         (dfs_search_base_offsets): Likewise.
11478         (record_subobject_offset): New function.
11479         (check_subobject_offset): Likewise.
11480         (walk_subobject_offsets): Likewise.
11481         (record_subobject_offsets): Likewise.
11482         (layout_conflict_p): Reimplement.
11483         (layout_nonempty_base_or_field): Correct handling of type
11484         conflicts during layout.
11485         (layout_empty_base): Likewise.
11486         (build_base_field): Adjust to handle new representation of empty
11487         base offset table.
11488         (build_base_fields): Likewise.
11489         (layout_virtual_bases): Likewise.
11490         (splay_tree_compare_integer_csts): New function.
11491         (layout_class_type): Use a splay_tree, rather than a varray, to
11492         represent the offsets of empty bases.
11493
11494         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
11495         * decl.c (select_decl): Don't return declarations that are
11496         DECL_ANTICIPATED.
11497
11498 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
11499
11500         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
11501         (fake_std_node): New macro.
11502         * decl.c (in_std): Rename to ...
11503         (in_fake_std): ... this.
11504         (flag_no_builtin): Remove.
11505         (flag_no_nonansi_builtin): Likewise.
11506         (walk_namespaces_r): Use fake_std_node.
11507         (push_namespace): Use std_identifier.
11508         (pop_namespace): Use in_fake_std.
11509         (lookup_name_real): Use fake_std_node.
11510         (init_decl_processing): When -fhonor-std, create the `std'
11511         namespace.  Don't create a dummy fake_std_node in that case.
11512         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
11513         (builtin_function): Put builtins whose names don't begin
11514         with `_' in the std namespace.
11515         * decl2.c (flag_no_builtin): Remove.
11516         (flag_no_nonansi_builtin): Likewise.
11517         (set_decl_namespace): Use fake_std_node.
11518         (validate_nonmember_using_decl): Likewise.
11519         (do_using_directive): Likewise.
11520         (handle_class_head): Likewise.
11521         * dump.c (dequeue_and_dump): Likewise.
11522         * except.c (init_exception_processing): Use std_identifier.
11523         * init.c (build_member_call): Use fake_std_node.
11524         * rtti.c (init_rtti_processing): Use std_identifier.
11525
11526 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
11527
11528         * cp-tree.h (back_end_hook): Remove declaration.
11529         * decl2.c (back_end_hook): Remove definition.
11530
11531         * dump.c (dequeue_and_dump): Dump TREE_USED.
11532
11533 2000-10-17  Brad Lucier <lucier@math.purdue.edu>
11534
11535         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
11536
11537 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
11538
11539         * decl.c (WINT_TYPE): Define.
11540         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
11541         c_size_type_node, signed_size_type_node and wint_type_node.
11542
11543 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
11544
11545         * decl2.c (warn_missing_format_attribute): New variable.
11546         (lang_decode_option): Decode -Wmissing-format-attribute.
11547
11548 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
11549
11550         * typeck.c (qualify_type): Remove.
11551         (composite_pointer_type): Fix handling of conversions to `cv void*'.
11552
11553 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11554
11555         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
11556
11557 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11558
11559         * Makefile.in (parse.c, parse.h): Create atomically.
11560
11561 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
11562
11563         * class.c (current_obstack): Remove.
11564         * decl.c (ggc_p): Remove.
11565         (start_decl): Don't use decl_tree_cons.
11566         (grokdeclarator): Don't use build_decl_list.
11567         (start_function): Don't use decl_tree_cons.
11568         (finish_function): Don't mess with obstacks.
11569         * decl2.c (grok_x_components): Don't use build_decl_list.
11570         * lex.c (make_call_declarator): Don't call decl_tree_cons.
11571         (implicitly_declare_fn): Don't call build_decl_list.
11572         * parse.y (frob_specs): Don't call build_decl_list or
11573         decl_tree_cons.
11574         (expr_or_declarator_intern): Don't call decl_tree_cons.
11575         (primary): Don't call build_decl_list.
11576         (fcast_or_absdcl): Likewise.
11577         (typed_declspecs): Don't call decl_tree_cons.
11578         (reserved_declspecs): Don't call build_decl_list.
11579         (declmods): Likewise.
11580         (reserved_typespecquals): Likewise.
11581         (aggr): Likewise.
11582         (new_type_id): Likewise.
11583         (cv_qualifiers): Likewise.
11584         (after_type_declarator_intern): Likewise.
11585         (notype_declarator_intern): Likewise.
11586         (absdcl_intern): Likewise.
11587         (named_parm): Likewise.
11588         * pt.c (most_specialized_class): Likewise.
11589         * repo.c (temporary_obstack): Make it a structure, not a pointer.
11590         (init_repo): Initialize it.
11591         * search.c (current_obstack): Remove.
11592         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
11593
11594 2000-10-09  Richard Henderson  <rth@cygnus.com>
11595
11596         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
11597         (c++ language support bits for libgcc): Remove.
11598         (c++.clean): Remove cplib2.txt cleanup.
11599         * config-lang.in (headers, lib2funcs): Remove.
11600
11601         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
11602         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
11603         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
11604         * inc/new.h, inc/typeinfo: Remove files.
11605
11606 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
11607
11608         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
11609         defined.
11610         (init_decl_processing): Initialize intmax_type_node and
11611         uintmax_type_node.
11612
11613 2000-10-06  Richard Henderson  <rth@cygnus.com>
11614
11615         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
11616         (original_result_rtx): Remove.
11617         * decl.c (save_function_data): Don't clear x_result_rtx.
11618         (mark_lang_function): Don't mark it either.
11619         * expr.c (fixup_result_decl): Remove.
11620         * semantics.c (genrtl_named_return_value): Frob the return decl
11621         before calling emit_local_var.
11622         (genrtl_finish_function): Don't call fixup_result_decl.
11623         Always emit the jump to return_label.
11624
11625 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
11626
11627         * pt.c (lookup_template_class): Set current access for enum.
11628         (tsubst_enum): Set file & line for enum decl.
11629
11630         * spew.c (yylex): Remove unused variable.
11631
11632 2000-10-05  Richard Henderson  <rth@cygnus.com>
11633
11634         * semantics.c (genrtl_finish_function): Don't init or check
11635         can_reach_end; remove noreturn and return value checks.
11636
11637 2000-10-05  Tom Tromey  <tromey@cygnus.com>
11638
11639         * init.c (build_java_class_ref): Use `build_static_name' with a
11640         suffix, not a prefix, to build the class object's name.
11641
11642 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11643
11644         * cp-tree.h (access_kind): Fix comment typo.
11645         * decl2.c (grokfield): Fix diagnostic typo.
11646         * semantics.c (finish_template_type): Fix comment typo.
11647         (finish_qualified_object_call_expr): Likewise.
11648
11649 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11650
11651         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
11652         tsubsting fails.
11653
11654 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11655
11656         * spew.c (frob_id): New static function.
11657         (frob_opname): Use it.
11658         (yylex): Use it.
11659
11660 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
11661
11662         * decl.c (lang_mark_false_label_stack): Remove.
11663         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
11664
11665 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
11666
11667         * gxxint.texi: Use @email for formatting email addresses.
11668
11669 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
11670
11671         * error.c: Remove direct obstack manipulation.  Replace with
11672         output_buffer-based formatting.  Adjust calls to removed macros.
11673         (obstack_chunk_alloc, obstack_chunk_free): Remove.
11674         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
11675         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
11676
11677 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
11678
11679         * ir.texi: Move to ../c-tree.texi.
11680
11681 2000-09-20  Jason Merrill  <jason@redhat.com>
11682
11683         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
11684
11685 2000-09-21  Andreas Jaeger  <aj@suse.de>
11686
11687         * errfn.c: Move declaration of cp_printer and cp_printers to ...
11688         * cp-tree.h: ... here.
11689
11690         * error.c: Remove declaration of cp_printer.
11691
11692 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
11693
11694         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
11695
11696 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
11697
11698         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
11699         users.
11700
11701 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
11702
11703         * decl.c (start_function): Robustify.
11704
11705 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11706
11707         * cp-tree.h (check_function_format): Accept a `status' parameter.
11708
11709         * call.c, typeck.c: Updates calls to `check_function_format'.
11710
11711 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
11712
11713         * decl2.c (handle_class_head): Always push some scope even
11714         in the error case.
11715
11716 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
11717
11718         * cp-tree.h (struct cp_language_function): Remove
11719         x_scope_stmt_stack and name_declared.
11720         (current_scope_stmt_stack): Remove.
11721         (function_name_declared_p): New macro.
11722         (struct lang_decl_flags): Use c_lang_decl as a base class.
11723         (context): Remove.
11724         (struct lang_decl): Replace saved_tree with context.
11725         (DECL_FRIEND_CONTEXT): Adjust accordingly.
11726         (SET_DECL_FRIEND_CONTEXT): Likewise.
11727         (DECL_VIRTUAL_CONTEXT): Likewise.
11728         (DECL_SAVED_TREE): Remove.
11729         (C_DECLARED_LABEL_FLAG): Likewise.
11730         (cplus_expand_expr_stmt): Don't declare.
11731         (add_decl_stmt): Likewise.
11732         (add_scope_stmt): Likewise.
11733         * decl.c (mark_stmt_tree): Remove.
11734         (case_compare): Likewise.
11735         (finish_case_label): Use c_add_case_label.
11736         (init_decl_processing): Set more language-specific hooks.
11737         (build_enumerator): Fix typo in comment.
11738         (cplus_expand_expr_stmt): Remove.
11739         (mark_lang_function): Use mark_c_language_function.
11740         (lang_mark_tree): Use c_mark_lang_decl.
11741         * decl2.c: Change order of inclusion.
11742         * except.c: Likewise.
11743         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
11744         back on c_expand_expr.
11745         * friend.c: Include expr.h.
11746         * init.c: Change order of inclusion.
11747         * Makefile.in: Update dependencies.
11748         * lex.h (free_lang_decl_chain): Remove.
11749         * optimize.c (maybe_clone_body): Use function_name_declared_p.
11750         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
11751         it doesn't exist.
11752         (instantiate_decl): Use function_name_declared_p.
11753         * semantics.c (lang_expand_expr_stmt): Remove.
11754         (set_current_function_name_declared): Likewise.
11755         (current_function_name_declared): Likewise.
11756         (begin_compound_stmt): Use function_name_declared_p.
11757         (add_decl_stmt): Remove.
11758         (setup_vtbl_ptr): Use function_name_declared_p.
11759         (add_scope_stmt): Remove.
11760         (current_scope_stmt_stack): New function.
11761         (cp_expand_stmt): Don't handle SCOPE_STMTs.
11762         (expand_body): Use function_name_declared_p.
11763         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
11764         * typeck.c: Change order of includes.
11765         (convert_sequence): Remove.
11766
11767 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
11768
11769         * lex.c (reswords): Add _Complex.
11770
11771 2000-09-14  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11772
11773         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
11774
11775 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
11776
11777         * init.c (begin_init_stmts): Don't use // comments.
11778
11779 2000-09-12  Jason Merrill  <jason@redhat.com>
11780
11781         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
11782         all non-extern arrays.
11783
11784         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
11785         typenames, too.  Downgrade complaint to pedwarn.
11786         (xref_tag): Warn about surprising behavior of 'friend struct T'.
11787         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
11788         'class This::Inherited'.
11789
11790 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
11791
11792         * decl.c (finish_case_label): Given the LABEL_DECL a
11793         DECL_CONTEXT.
11794
11795 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
11796
11797         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
11798         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
11799         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
11800         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
11801         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
11802         New macros.
11803         (sorry_for_unsupported_tree, print_scope_operator,
11804         print_left_paren, print_right_paren, print_left_bracket,
11805         print_right_bracket, print_whitespace): Likewise.
11806         (aggr_variety): Rename to class_key_or_enum.
11807         (print_type): Rename to print_type_id.
11808         (print_type_specifier_seq, print_simple_type_specifier,
11809         print_elaborated_type_specifier,
11810         print_rest_of_abstract_declarator,
11811         print_parameter_declaration_clause, print_exception_specification,
11812         print_nested_name_specifier, print_template_id,
11813         typedef_original_name,  print_template_argument_list_start,
11814         print_template_argument_list_end): New functions.
11815
11816 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
11817
11818         * ir.texi: Add more documentation.
11819
11820 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
11821
11822         * cp-tree.h (struct saved_scope): Remove x_function_parms.
11823         (current_function_parms): Don't define.
11824         (struct cp_language_function): Remove parms_stored.
11825         (current_function_just_assigned_this): Don't define.
11826         (current_function_parms_stored): Likewise.
11827         (static_ctors): Declare.
11828         (static_dtors): Likewise.
11829         (SF_EXPAND): Don't define.
11830         (expand_start_early_try_stmts): Remove declaration.
11831         (store_parm_decls): Likewise.
11832         * decl.c (static_ctors): Don't declare.
11833         (static_dtors): Likewise.
11834         (struct binding_level): Remove this_block.
11835         (poplevel): Remove dead code.
11836         (set_block): Likewise.
11837         (mark_binding_level): Don't mark this_block.
11838         (mark_saved_scope): Don't mark x_function_parms.
11839         (init_decl_processing): Don't add current_function_parms as a GC
11840         root.
11841         (check_function_type): Change prototype.
11842         (start_function): Remove RTL-generation code.
11843         (expand_start_early_try_stmts): Remove.
11844         (store_parm_decls): Give it internal linkage.  Remove
11845         RTL-generation code.
11846         (finish_function): Remove RTL-generation code.
11847         * decl2.c (static_ctors): Fix formatting.
11848         (static_dtors): Likewise.
11849         * method.c (use_thunk): Don't call store_parm_decls.
11850         (synthesize_method): Likewise.
11851         * optimize.c (maybe_clone_body): Likewise.
11852         * parse.y (fn.def2): Likewise.
11853         (.set_base_init): Likewise.
11854         (nodecls): Likewise.
11855         * pt.c (instantiate_decl): Likewise.
11856         * rtti.c (synthesize_tinfo_fn): Likewise.
11857         * semantics.c (genrtl_try_block): Simplify.
11858         (expand_body): Use genrtl_start_function and
11859         genrtl_finish_function.
11860         (genrtl_start_function): New function.
11861         (genrtl_finish_function): Likewise.
11862
11863 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
11864
11865         * error.c (cp_tree_printer, case 'P'): Append break.
11866
11867 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
11868
11869         * cp-tree.h (frob_opname): Declare.
11870         * parse.y (saved_scopes): New static variable.
11871         (cp_parse_init): Adjust.
11872         (do_id): If lastiddecl is NULL, do do_identifier.
11873         (operator): Save scope information.
11874         (unoperator): New reduction. Restore scope information.
11875         (operator_name): Append unoperator. Call frob_opname.
11876         * spew.c (frob_opname): Define.
11877
11878 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
11879
11880         * decl.c, rtti.c: Include defaults.h if not already included.
11881         Don't define the *_TYPE_SIZE macros.
11882
11883 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
11884
11885         * cp-tree.h (push_switch): Change prototype.
11886         (check_cp_case_value): Remove declaration.
11887         (decl_constant_value): Likewise.
11888         * decl.c (struct cp_switch): Add switch_stmt and cases.
11889         (case_compare): New function.
11890         (push_switch): Set switch_stmt.  Initialize cases.
11891         (pop_switch): Clean up cases.
11892         (define_case_label): Rename to ...
11893         (finish_case_label): ... this.  Do semantic analysis for case
11894         labels here.
11895         (start_function): Correct comment.
11896         * decl2.c (check_cp_case_value): Remove.
11897         * expr.c (do_case): Remove.
11898         * pt.c (tsubst_expr): Adjust call to finish_case_label.
11899         * semantics.c (genrtl_do_poplevel): Remove declaration.
11900         (RECHAIN_STMTS): Remove.
11901         (finish_break_stmt): Use build_break_stmt.
11902         (finish_continue_stmt): Use build_continue_stmt.
11903         (finish_switch_cond): Adjust condition here, rater than in
11904         c_expand_start_case.
11905         (finish_case_label): Remove.
11906         * typeck.c (c_expand_return): Remove.
11907         (c_expand_start_case): Likewise.
11908
11909 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
11910
11911         * ir.texi: Document type nodes.
11912
11913 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
11914
11915         * cp-tree.h (init_cp_semantics): Declare.
11916         (genrtl_try_block): Don't declare.
11917         (genrtl_handler): Likewise.
11918         (genrtl_catch_block): Likewise.
11919         (genrtl_ctor_stmt): Likewise.
11920         (genrtl_subobject): Likewise.
11921         (genrtl_do_poplevel): Likewise.
11922         (genrtl_named_return_value): Likewise.
11923         * lex.c (init_parse): Call init_cp_semantics.
11924         * semantics.c (genrtl_try_block): Give it internal linkage.
11925         (genrtl_handler): Likewise.
11926         (genrtl_catch_block): Likewise.
11927         (genrtl_ctor_stmt): Likewise.
11928         (genrtl_subobject): Likewise.
11929         (genrtl_do_poplevel): Likewise.
11930         (genrtl_named_return_value): Likewise.
11931         (lang_expand_stmt): Rename to ...
11932         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
11933         (init_cp_semantics): Define.
11934
11935         * decl.c (initialize_local_var): Remove RTL-generating code.
11936         * semantics.c (genrtl_try_block): Fix formatting.
11937
11938         Move statement-tree facilities from C++ to C front-end.
11939         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
11940         (void_zero_node): Remove.
11941         (stmt_tree): Likewise.
11942         (scope_chain): Adjust.
11943         (language_function): Rename to cp_language_function.
11944         (cp_function_chain): Adjust.
11945         (current_stmt_tree): Remove.
11946         (last_tree): Likewise.
11947         (last_expr_type): Likewise.
11948         (struct lang_decl): Adjust.
11949         (STMT_IS_FULL_EXPR_P): Remove.
11950         (add_tree): Remove.
11951         (begin_stmt_tree): Likewise.
11952         (finish_stmt_tree): Likewise.
11953         (walk_tree_fn): Likewise.
11954         (walk_stmt_tree): Likewise.
11955         * class.c (finish_struct): Replace use of add_tree with add_stmt.
11956         * decl.c (mark_stmt_tree): Adjust type.
11957         (init_decl_processing): Don't build void_zero_node.
11958         (initialize_local_var): Adjust usage of current_stmt_tree.
11959         (finish_enum): Use add_stmt, not add_tree.
11960         (save_function_data): Adjust use of language_function.
11961         (finish_constructor_body): Use add_stmt, not add_tree.
11962         (finish_destructor_body): Likewise.
11963         (push_cp_function_context): Adjust use of language_function.
11964         (pop_cp_function_context): Likewise.
11965         (mark_lang_function): Likewise.
11966         (mark_cp_function_context): Likewise.
11967         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
11968         (build_vec_init): Likewise.
11969         * semantics.c (SET_LAST_STMT): Remove.
11970         (RECHAIN_STMTS): Don't use it.
11971         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
11972         (current_stmt_tree): Define.
11973         (add_tree): Remove.
11974         (finish_goto_stmt): Use add_stmt, not add_tree.
11975         (finish_expr_stmt): Likewise.
11976         (begin_if_stmt): Likewise.
11977         (finish_then_clause): Likewise.
11978         (begin_while_stmt): Likewise.
11979         (begin_do_stmt): Likewise.
11980         (finish_return_stmt): Likewise.
11981         (begin_for_stmt): Likewise.
11982         (finish_break_stmt): Likewise.
11983         (finish_continue_stmt): Likewise.
11984         (begin_switch_stmt): Likewise.
11985         (finish_case_label): Likewise.
11986         (begin_try_block): Likewise.
11987         (begin_function_try_block): Likewise.
11988         (begin_handler): Likewise.
11989         (begin_catch_block): Likewise.
11990         (begin_compound_stmt): Likewise.
11991         (begin_asm_stmt): Likewise.
11992         (finish_asm_stmt): Likewise.
11993         (finish_label_stmt): Likewise.
11994         (add_decl_stmt): Likewise.
11995         (finish_subobject): Likewise.
11996         (finish_decl_cleanup): Likewise.
11997         (finish_named_return_value): Likewise.
11998         (setup_vtbl_ptr): Likewise.
11999         (add_scope_stmt): Likewise.
12000         (finish_stmt_expr): Likewise.
12001         (prune_unused_decls): Remove.
12002         (begin_stmt_tree): Likewise.
12003         (finish_stmt_tree): Likewise.
12004         (prep_stmt): Adjust use of current_stmt_tree.
12005         (lang_expand_stmt): Likewise.
12006         * tree.c (statement_code_p): Remove.
12007         (cp_statement_code_p): New function.
12008         (walk_stmt_tree): Remove.
12009         (init_tree): Set lang_statement_code_p.
12010
12011 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
12012
12013         Integrated preprocessor.
12014
12015         * Make-lang.in, Makefile.in: Remove all references to input.c,
12016         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
12017         * gxx.gperf, hash.h, input.c: Delete.
12018         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
12019         initialized properly.
12020
12021         * class.c (fixup_pending_inline): Take a tree, not a
12022         struct pending_inline *.  All callers changed.
12023         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
12024         RID_PROTECTED entries in ridpointers[] array here.
12025         * decl.c (duplicate_decls): Do not refer to struct
12026         pending_inline.
12027         (record_builtin_type, init_decl_processing): Use RID_MAX not
12028         CP_RID_MAX.
12029         (grokdeclarator): Use C_IS_RESERVED_WORD.
12030         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
12031         cpplib.
12032         (grok_x_components): Do not inspect pending_inlines chain.
12033
12034         * cp-tree.h (struct lang_identifier): Add rid_code entry.
12035         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
12036         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
12037         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
12038         TIME_IDENTIFIER_FILEINFO): Kill.
12039         Update prototypes.
12040         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
12041         single 32-bit word.
12042         * parse.y: Call do_pending_inlines unconditionally.
12043         reinit_parse_for_method is now snarf_method.  fn.defpen is no
12044         longer necessary.  Remove unnecessary <itype> annotation on
12045         SCOPE.  Do not refer to end_of_file or struct pending_inline.
12046         * semantics.c (begin_inline_definitions): Call
12047         do_pending_inlines unconditionally.
12048
12049         * lex.c: Remove all code now shared with C front end.
12050         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
12051         into the get_identifier table.  Rewrite pragma handling to
12052         work with the registry.  Move code to save tokens for later
12053         processing to spew.c.
12054
12055         * spew.c: Rewrite everything in terms of token streams instead
12056         of text.  Move routines here from lex.c / input.c as
12057         appropriate.  GC-mark trees hanging off the pending inlines
12058         chain.
12059
12060 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
12061
12062         * NEWS: Mention that the named return value extension has been
12063         deprecated.
12064         * cp-tree.h (original_result_rtx): Define.
12065         (TREE_REFERENCE_EXPR): Remove.
12066         (DECL_VPARENT): Likewise.
12067         (pushdecl_nonclass_level): Likewise.
12068         (store_return_init): Likewise.
12069         (reinit_lang_specific): Likewise.
12070         (genrtl_named_return_value): Change prototype.
12071         * decl.c (original_result_rtx): Remove.
12072         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
12073         Do not generate RTL for local variables here.
12074         (store_return_init): Remove.
12075         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
12076         store_return_init.
12077         (finish_named_return_value): Adjust accordingly.  Warn that this
12078         extension is deprecated.
12079         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
12080
12081 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12082
12083         * pt.c (type_unification_real): Replace switch with if.
12084         (unify): Tsubst non-type parms before comparing.
12085
12086 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12087
12088         * error.c (dump_typename): New function, broken out of ...
12089         (dump_type): ... here. Use it.
12090         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
12091
12092 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12093
12094         * init.c (build_offset_ref): Deal with namespace scoped
12095         TEMPLATE_ID_EXPRs.
12096
12097 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12098
12099         * class.c (resolve_address_of_overloaded_function): Add
12100         explanation message.
12101         * decl.c (define_case_label): Reformat explanation.
12102         * decl2.c (finish_static_data_member_decl): Likewise.
12103         (grokfield): Likewise.
12104         * friend.c (do_friend): Likewise.
12105
12106 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
12107
12108         * tree.c (walk_tree): Expose tail recursion.
12109         (walk_stmt_tree): New function.
12110         * cp-tree.h: Prototype walk_stmt_tree.
12111         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
12112         the BLOCKs directly.  If a BLOCK has no variables after
12113         pruning, discard it.
12114         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
12115         restore the line number.
12116
12117 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
12118
12119         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
12120         (pt.o): Remove dependency on HTAB_H.
12121         * cp-tree.h: Include hashtab.h.
12122         (walk_tree): Change prototype.
12123         (walk_tree_without_duplicates): New function.
12124         * decl.c (check_default_argument): Use it.
12125         * optimize.c (remap_decl): Adjust calls to walk_tree.
12126         (copy_body): Likewise.
12127         (expand_calls_inline): Likewise.
12128         (calls_setjmp_p): Use walk_tree_without_duplicates.
12129         * pt.c: Don't include hashtab.h.
12130         (for_each_template_parm): Use walk_tree_without_duplicates.
12131         * semantics.c (finish-stmt_tree): Likewise.
12132         (expand_body): Likewise.
12133         * tree.c (walk_tree): Add additional parameter.
12134         (walk_tree_without_duplicates): New function.
12135         (count_trees): Use it.
12136         (verify_stmt_tree): Adjust call to walk_tree.
12137         (find_tree): Use walk_tree_without_duplicates.
12138         (no_linkage_check): Likewise.
12139         (break_out_target_exprs): Adjust call to walk_tree.
12140         (cp_unsave): Likewise.
12141
12142 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12143
12144         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
12145         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
12146         * cp-tree.h (TYPE_BINFO): Adjust comment.
12147         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
12148         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
12149         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
12150         (TYPE_TEMPLATE_INFO): Likewise.
12151         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
12152         * class.c (push_nested_class): Likewise.
12153         * decl.c (lookup_name_real): Likewise.
12154         (grokdeclarator): Likewise.
12155         (grok_op_properties): Likewise.
12156         (xref_tag): Likewise.
12157         (xref_basetypes): Likewise.
12158         * decl2.c (constructor_name_full): Likewise.
12159         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
12160         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
12161         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
12162         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12163         (dump_type_suffix): Likewise.
12164         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
12165         instead.
12166         (get_aggr_from_typedef): Likewise.
12167         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
12168         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12169         (write_template_parm): Likewise.
12170         (write_template_template_parm): Check tree code instead of
12171         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12172         * method.c (build_overload_nested_name): Add
12173         BOUND_TEMPLATE_TEMPLATE_PARM.
12174         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
12175         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12176         * pt.c (convert_template_argument): Check tree code instead of
12177         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12178         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
12179         (for_each_template_parm): Adjust comment.
12180         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
12181         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12182         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
12183         template_args_equal to compare template template parameter cases.
12184         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12185         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
12186         instead.
12187         * tree.c (copy_template_template_parm): Decide whether to create
12188         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
12189         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12190         (copy_tree_r): Likewise.
12191         * typeck.c (comptypes): Likewise.  Check tree code instead of
12192         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12193
12194 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
12195
12196         * decl.c (finish_function): Move the code for handling functions
12197         marked with the constructor and destructor attributes inside the
12198         expand_p block.
12199
12200 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
12201
12202         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
12203
12204 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
12205
12206         * pt.c (lookup_template_class): Remove abort.
12207         * tree.c (get_type_decl): Allow error_mark_node.
12208
12209 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
12210
12211         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
12212         TEMPLATE_ID_EXPRs.
12213
12214 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
12215
12216         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
12217         new ABI mangling.
12218
12219 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
12220
12221         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
12222         union tag mismatch error reporting.
12223
12224 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
12225
12226         * call.c (build_scoped_method_call): Check it is not a namespace.
12227
12228 2000-08-30  Jason Merrill  <jason@redhat.com>
12229
12230         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
12231
12232         * tree.c (bot_manip): Check TREE_CONSTANT rather than
12233         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
12234         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
12235
12236         * decl.c (start_function): Always call make_function_rtl.
12237
12238 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
12239
12240         * semantics.c (prune_unused_decls): New function.
12241         (finish_stmt_tree): Call it via walk_tree.
12242
12243 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
12244
12245         * class.c (build_secondary_vtable): Constify a char *.
12246         * decl.c (init_decl_processing): Initialize function_id_node,
12247         pretty_function_id_node, and func_id_node.
12248         * input.c (struct input_source): Constify 'str'.
12249         (feed_input): Constify first argument.
12250         * mangle.c (write_identifier): Constify argument.
12251         * pt.c (mangle_class_name_for_template): Constify argument.
12252
12253 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
12254
12255         * typeck.c (mark_addressable): Remove code that pokes around in
12256         RTL.
12257
12258 2000-08-28  Jason Merrill  <jason@redhat.com>
12259
12260         * lex.c (file_name_nondirectory): Move to toplev.c.
12261
12262         * cp-tree.h (LOCAL_CLASS_P): New macro.
12263         * class.c (finish_struct_1): Use it.
12264
12265 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
12266
12267         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
12268         (write_encoding): Pass another argument to write_name.
12269         (write_name): Add ignore_local_scope parameter.  Fix handling of
12270         local names.
12271         (write_nested_name): Use write_unqualified_name.
12272         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
12273         (write_template_prefix): Use write_unqualified_name.
12274         (write_component): Remove.
12275         (write_local_name): Add parameter.  Use direct local entity to
12276         discriminator calculation.
12277         (write_class_enum_type): Pass another argument to write_name.
12278         (write_template_template_arg): Likewise.
12279         (make_guard_variable): Likewise.
12280
12281 2000-08-27  Jason Merrill  <jason@redhat.com>
12282
12283         * decl.c (pushdecl): Matching decls for local externs are found in
12284         the current level.  Propagate linkage information from previous
12285         declarations.
12286
12287 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
12288
12289         * ir.texi (Expressions): Fix typo.
12290
12291 2000-08-25  Greg McGary  <greg@mcgary.org>
12292
12293         * tree.c (init_tree): Use ARRAY_SIZE.
12294
12295 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
12296
12297         * error.c (cp_tree_printer): Rework.
12298
12299 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
12300
12301         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
12302         dyn-string.o.
12303         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
12304         (cp-demangle.o): Remove target.
12305         (dyn-string.o): Likewise.
12306
12307         * decl.c (grokfndecl): Require that `main' return an `int'.
12308         * mangle.c (write_encoding): Don't mangle return types for
12309         conversion functions.
12310
12311 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
12312
12313         * error.c (tree_formatting_info): New data type.
12314         (tree_being_formatted): New macro.
12315         (tree_formatting_flags): Likewise.
12316         (put_whitespace): Likewise.
12317         (print_tree_identifier): Likewise.
12318         (print_identifier): Likewise.
12319         (cp_tree_printer, print_function_argument_list, print_declaration,
12320         print_expression, print_function_declaration,
12321         print_function_parameter, print_type, print_cv_qualifier): New
12322         functions.
12323         (init_error): Initialize lang_printer.
12324
12325 2000-08-24  Jason Merrill  <jason@redhat.com>
12326
12327         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
12328         adjustment necessary.
12329
12330 2000-08-24  Greg McGary  <greg@mcgary.org>
12331
12332         * cp-tree.h (MAIN_NAME_P): Remove macro.
12333
12334 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
12335
12336         * error.c (print_instantiation_context): Don't forget to flush the
12337         buffer.
12338
12339 2000-08-23  Jason Merrill  <jason@redhat.com>
12340
12341         * typeck.c (build_ptrmemfunc): Save the input pmf.
12342
12343         * method.c (process_modifiers): Use same_type_p.
12344
12345 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
12346
12347         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
12348         * mangle.c (write_function_type): Change prototype.
12349         (write_encoding): Don't mangle return types for
12350         constructors or destructors.
12351         (write_type): Adjust call to write_function_type.
12352         * pt.c (instantiate_template): Instantiate alternate entry points
12353         when instantiating the main function.
12354
12355 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
12356
12357         * error.c (cp_print_error_function): Don't use embedded '\n' in
12358         output_printf.
12359
12360 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
12361
12362         * decl.c (init_decl_processing): Remove bogus initialization.
12363         * error.c (lang_print_error_function): Restore here.
12364         (init_error): Initialize print_error_function.
12365
12366 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
12367
12368         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
12369
12370 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
12371
12372         * Makefile.in (error.o): Depends on diagnostic.h
12373
12374         * cp-tree.h (problematic_instantiation_changed,
12375         record_last_problematic_instantiation, current_instantiation,
12376         print_instantiation_context): Declare.
12377         (maybe_print_template_context): Remove.
12378
12379         * decl.c (init_decl_processing): Set print_error_function to NULL.
12380         (lang_print_error_function): Remove, since we're using a new
12381         machinery.
12382
12383         * error.c: #include diagnostic.h
12384         (function_category): New function.
12385         (cp_diagnostic_starter): Likewise.
12386         (cp_diagnostic_finalizer): Likewise.
12387         (cp_print_error_function): Likewise.
12388         (maybe_print_instantiation_context): Likewise.
12389         (print_instantiation_full_context): Likewise.
12390         (print_instantiation_partial_context): Likewise.
12391         (print_instantiation_context): Define.
12392         (init_error): Initialize diagnostic pager and finalizer.
12393
12394         * pt.c (problematic_instantiation_changed): Define.
12395         (record_last_problematic_instantiation): Likewise.
12396         (current_instantiation): Likewise.
12397         (maybe_print_template_context): Remove.
12398         (print_template_context): Likewise.
12399         (current_tinst_level): Make static to reflect Brendan Kehoe's
12400         change of 1995-04-13.
12401         (push_tinst_level): Call print_instantiation_context.
12402
12403 2000-08-21  Nix  <nix@esperi.demon.co.uk>
12404
12405         * lang-specs.h: Do not process -o or run the assembler if
12406         -fsyntax-only.
12407
12408 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
12409
12410         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
12411         variables.
12412         * decl2.c (lang_decode_option): Disable gettext attributes for
12413         -ansi.
12414
12415 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
12416
12417         * lex.c (lang_init_options): Default diagnostic message maximum
12418         length to 80, when line-wrapping.
12419
12420 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
12421
12422         * class.c (build_vtbl_initializer): Clear the entire
12423         vtbl_init_data.  Start keeping track of the functions for which we
12424         have created vcall offsets here.
12425         (dfs_build_vcall_offset_vtbl_entries): Remove.
12426         (build_vcall_offset_vtbl_entries): Reimplement.
12427         (add_vcall_offset_vtbl_entries_r): New function.
12428         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
12429         computing when vcall offsets are necessary.
12430
12431 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12432
12433         * decl.c (member_function_or_else): Use cp_error ... %T.
12434         (grokdeclarator): Likewise.
12435         (start_method): Likewise.
12436         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
12437
12438 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12439
12440         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
12441         TYPE_DECLs.
12442
12443 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12444
12445         * cp-tree.h (PTRMEM_OK_P): New macro.
12446         (itf_ptrmem_ok): New enumeration value.
12447         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
12448         argument. Diagnose implicit pointer to member.
12449         (instantiate_type): Don't diagnose implicit pointer to member
12450         here. Pass itf_ptrmem_ok if ok. Adjust calls to
12451         resolve_address_of_overloaded_function.
12452         * init.c (build_offset_ref): Set PTRMEM_OK_P.
12453         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
12454         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
12455         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
12456         (build_unary_op): Deal with single non-static member in
12457         microsoft-land.
12458
12459 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12460
12461         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
12462
12463 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12464
12465         * cp-tree.h (enum_name_string): Remove prototype.
12466         (report_case_error): Remove prototype.
12467         * cp/typeck2.c (enum_name_string): Remove.
12468         (report_case_error): Remove.
12469         * error.c (dump_expr): Deal with enum values directly.
12470         Correctly negate integer constant.
12471
12472 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12473
12474         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
12475         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
12476         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
12477         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
12478         (__cxa_vec_new): Use __cxa_vec_new2.
12479         (__cxa_vec_delete): Use __cxa_vec_delete2.
12480
12481 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12482
12483         * vec.cc (__cxa_vec_new): Set "C" linkage.
12484         (__cxa_vec_ctor): Likewise.
12485         (__cxa_vec_cctor): Likewise.
12486         (__cxa_vec_dtor): Likewise.
12487         (__cxa_vec_delete): Likewise.
12488         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
12489         (__cxa_vec_ctor): Likewise.
12490         (__cxa_vec_cctor): Likewise.
12491         (__cxa_vec_dtor): Likewise.
12492         (__cxa_vec_delete): Likewise.
12493
12494 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12495
12496         * class.c (instantiate_type): Reinstate local variable
12497         deleted in previous change.
12498
12499         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
12500         itf_no_attributes.
12501
12502 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12503
12504         * cp-tree.h (instantiate_type_flags): New enumeration.
12505         (instantiate_type): Change parameter.
12506         * class.c (instantiate_type): Adjust prototype. Adjust.
12507         * call.c (standard_conversion): Adjust instantiate_type call.
12508         (reference_binding): Likewise.
12509         (build_op_delete_call): Likewise.
12510         (convert_like_real): Likewise.
12511         * cvt.c (cp_convert_to_pointer): Likewise.
12512         (convert_to_reference): Likewise.
12513         * pt.c (convert_nontype_argument): Likewise.
12514         * typeck.c (build_binary_op): Likewise.
12515         (build_ptrmemfunc): Likewise.
12516         (convert_for_assignment): Likewise.
12517
12518 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12519
12520         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
12521         (current_aggr): Define.
12522         * decl.c (grokdeclarator): Make sure a friend class is an
12523         elaborated type specifier.
12524         * parse.y (current_aggr): Remove static definition.
12525         (cp_parse_init): Adjust.
12526         (structsp): Clear and restore current_aggr.
12527         (component_decl_list): Clear current_aggr.
12528
12529         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
12530         aggregate tag on the typename's context.
12531
12532         * pt.c (tsubst_friend_class): Return error_mark_node, if
12533         parms becomes NULL.
12534         (instantiate_class_template): Ignore error_mark_node friend types.
12535
12536 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
12537
12538         * cvt.c (warn_ref_binding): New static function, broken out of ...
12539         (convert_to_reference): ... here. Use it.
12540
12541 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
12542
12543         * parse.y (template_arg): Add rule for template qualified with
12544         global scope.
12545
12546 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12547
12548         * decl2.c (add_function): Reorganize.
12549         (arg_assoc): Do not consider function template decls.
12550
12551 2000-08-11  Jason Merrill  <jason@redhat.com>
12552
12553         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
12554         looking inside.
12555
12556 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12557
12558         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
12559         (lookup_nested_tag): Likewise.
12560
12561         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
12562         can be produced.
12563
12564 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12565
12566         * parse.y (named_complex_class_head_sans_basetype): Remove
12567         always true if.
12568
12569 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12570
12571         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
12572         explicit TEMPLATE_ID_EXPR args.
12573         (build_expr_from_tree, case CALL_EXPR): Likewise.
12574
12575 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12576
12577         * decl.c (check_tag_decl): Diagnose typename's which don't
12578         declare anything.
12579
12580 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
12581
12582         * init.c (build_aggr_init): Reject bogus array initializers
12583         early.
12584
12585 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
12586
12587         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
12588         runtime.
12589         * cp/tinfo.cc (__dynamic_cast): Likewise.
12590         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
12591
12592 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
12593
12594         * cvt.c (convert_to_pointer_force): Fix error message when
12595         attempting to cast from ambiguous base.
12596
12597 2000-08-08  Jason Merrill  <jason@redhat.com>
12598
12599         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
12600         (tsubst_template_arg_vector): Likewise.
12601
12602         * decl2.c (build_anon_union_vars): Choose the largest field; don't
12603         assume that one will be as large as the union.
12604
12605 2000-08-07  Kazu Hirata  <kazu@hxi.com>
12606
12607         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
12608         * decl.c (pop_labels): Likewise.
12609
12610 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
12611
12612         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
12613         specifications.
12614         (__pointer_to_member_type_info): Likewise.
12615         (__base_class_info): Likewise.
12616         (__class_type_info): Likewise.
12617         (__si_class_type_info): Likewise.
12618         (__vmi_class_type_info): Likewise.
12619         * tinfo.cc (__si_class_type_info::__do_find_public_src):
12620         Changed member names to match specifications.
12621         (__vmi_class_type_info::__do_find_public_src): Likewise.
12622         (__si_class_type_info::__do_dyncast): Likewise.
12623         (__vmi_class_type_info::__do_dyncast): Likewise.
12624         (__si_class_type_info::__do_upcast): Likewise.
12625         (__vmi_class_type_info::__do_upcast): Likewise.
12626         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
12627         (__pbase_type_info::__pointer_catch): Likewise.
12628         (__pointer_type_info::__pointer_catch): Likewise.
12629         (__pointer_to_member_type_info::__pointer_catch): Likewise.
12630
12631 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
12632
12633         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
12634         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
12635         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
12636
12637 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
12638
12639         * cp-tree.h (add_method): Change prototype.
12640         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
12641         Don't double the size of the method vector in the error case.
12642         (handle_using_decl): Adjust call to add_method.
12643         (add_implicitly_declared_members): Likewise.
12644         (clone_function_decl): Likewise.
12645         * decl2.c (check_classfn): Likewise.
12646         * semantics.c (finish_member_declaration): Likewise.
12647
12648 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
12649
12650         * decl.c (flag_isoc94): New variable.
12651
12652 2000-08-02  Jason Merrill  <jason@redhat.com>
12653
12654         * pt.c (do_type_instantiation): Add complain parm; don't complain
12655         if called recursively.
12656         * cp-tree.h, parse.y: Adjust.
12657
12658 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
12659
12660         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
12661         -Wno-strict-prototypes.
12662
12663         * g++spec.c: Adjust type of second argument to
12664         lang_specific_driver, and update code as necessary.
12665
12666         * cp-tree.h: Don't prototype min_precision here.
12667         (my_friendly_assert): Cast expression to void.
12668         * semantics.c (do_poplevel): Initialize scope_stmts.
12669
12670 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
12671
12672         * cp-tree.h (DECL_NEEDED_P): Tweak.
12673
12674 2000-07-28  Jason Merrill  <jason@redhat.com>
12675
12676         * lang-specs.h: Use %i in rule for .ii files.
12677
12678 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
12679
12680         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
12681
12682 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
12683
12684         Allow indirect primary bases.
12685         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
12686         primary_base.
12687         (CLASSTYPE_VFIELD_PARENT): Remove.
12688         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
12689         (BINFO_PRIMARY_BINFO): Remove.
12690         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
12691         (BINFO_VBASE_PRIMARY_P): Likewise.
12692         (BINFO_PRIMARY_BASE_OF): New macro.
12693         (BINFO_INDIRECT_PRIMARY_P): Likewise.
12694         (get_primary_binfo): New function.
12695         * decl.c (lang_mark_tree): Make lang_type::primary_base.
12696         * class.c (vcall_offset_data_s): Rename to ...
12697         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
12698         and add ctor_vtbl_p.
12699         (get_derived_offset): Use get_primary_binfo.
12700         (dfs_mark_primary_bases): Adjust handling of virtual primary
12701         bases.
12702         (mark_primary_bases): Likewise.
12703         (set_primary_base): Take a binfo, not an integer, as a
12704         representation of the primary base.
12705         (indirect_primary_base_p): Remove.
12706         (determine_primary_base): Adjust for indirect primary bases.
12707         (dfs_find_final_overrider): Fix typo in coment.
12708         (update_vtable_entry_for_fn): Use get_primary_binfo.
12709         (layout_nonempty_base_or_field): Tweak.
12710         (build_base_fields): Adjust for new primary base semantics.
12711         (dfs_propagate_binfo_offsets): Remove.
12712         (propagate_binfo_offsets): Rewrite.
12713         (dfs_set_offset_for_shared_vbases): Remove.
12714         (layout_virtual_bases): Don't use it.
12715         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
12716         ABI.
12717         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
12718         CLASSTYPE_VFIELD_PARENT.
12719         (dfs_get_primary_binfo): New function.
12720         (get_primary_binfo): Likewise.
12721         (dump_class_hierarchy_r): Tweak printing of primary bases.
12722         (build_vtbl_initializer): Fix typo in comments.  Use
12723         vtbl_init_data.
12724         (build_vcall_and_vbase_vtbl_entries): Likewise.
12725         (build_vbaes_offset_vtbl_entries): Likewise.
12726         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
12727         BV_VCALL_INDEX to handle indirect primary bases.
12728         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
12729         (build_rtti_vtbl_entries): Likewise.
12730         * search.c (get_shared_vbase_if_not_primary): Tweak.
12731         (find_vbase_instance): Likewise.
12732         (binfo_for_vtable): Simplify.
12733         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
12734         (make_binfo): Make it have 11 entries.
12735
12736 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
12737
12738         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
12739         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
12740         ascertaining primaryness.
12741         (G): Remove template_args.
12742         (decl_is_template_id): New function.
12743         (write_encoding): Use decl_is_template_id.
12744         (write_name): Likewise.  Handle type_decls.  Get main variant of
12745         type decls.
12746         (write_nested_name): Likewise.
12747         (write_prefix): Likewise.
12748         (write_template_prefix): Likewise.
12749         (write_special_name_constructor): Remove defunct production from
12750         comment.
12751         (write_bare_function_type): Remove comment about absent parameter.
12752         (write_template_template_arg): Add missing grammar production to
12753         comment.
12754
12755 2000-07-27  Jason Merrill  <jason@redhat.com>
12756
12757         * decl.c (duplicate_decls): If common_type produces a non-typedef
12758         type for a typedef, just use the old type.
12759
12760 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
12761
12762         * cp-tree.h (function_depth): Declare.
12763         (verify_stmt_tree): Likewise.
12764         (find_tree): Likewise.
12765         * decl.c (function_depth): Give it external linkage.
12766         * optimize.c (optimize_function): Increment and decrement it.
12767         * tree.c (verify_stmt_tree_r): New function.
12768         (verify_stmt_tree): Likewise.
12769         (find_tree_r): Likewise.
12770         (find_tree): Likewise.
12771
12772 2000-07-27  Jason Merrill  <jason@redhat.com>
12773
12774         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
12775         TYPE_PTRMEMFUNC_P.
12776         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
12777
12778 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
12779
12780         * decl.c (start_cleanup_fn): Mark the function as `inline'.
12781         * decl2.c (get_guard): Call cp_finish_decl, not
12782         rest_of_decl_compilation, for local guards.
12783         * lex.c (do_identifier): Remove unused variable.
12784
12785 2000-07-26      Marc Espie <espie@cvs.openbsd.org>
12786
12787         * parse.y:  Add missing ';'.
12788
12789 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
12790
12791         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
12792         of `extern "C++"'.
12793
12794 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12795
12796         Kill strict_prototype. Backwards compatibility only for
12797         non NO_IMPLICIT_EXTERN_C systems.
12798         * cp-tree.h (flag_strict_prototype): Remove.
12799         (strict_prototype): Remove.
12800         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
12801         * decl.c (maybe_push_to_top_level): Adjust.
12802         (pop_from_top_level): Adjust.
12803         (decls_match): Only allow sloppy parm matching for ancient
12804         system headers.
12805         (init_decl_processing): Adjust.
12806         (grokdeclarator): Adjust.
12807         * decl2.c (flag_strict_prototype): Remove.
12808         (strict_prototype): Remove.
12809         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
12810         (lang_f_options): Remove "strict-prototype".
12811         (unsupported-options): Add "strict-prototype".
12812         * lex.c (do_identifier): Adjust.
12813         (do_scoped_id): Adjust.
12814         * parse.y (empty_parms): Adjust.
12815         * class.c (push_lang_context): Adjust.
12816         (pop_lang_context): Adjust.
12817         * typeck.c (comp_target_parms): Adjust.
12818
12819 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12820
12821         * decl.c (poplevel): Deal with anonymous variables at for scope.
12822         (maybe_inject_for_scope_var): Likewise.
12823
12824 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
12825
12826         * decl.c: Remove all signal handling code, now done in toplev.c.
12827
12828 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
12829
12830         * decl.c (make_rtl_for_nonlocal_decl): Rework.
12831
12832         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
12833         correctly.
12834
12835 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
12836
12837         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
12838         Define my_friendly_assert and my_friendly_abort as macros
12839         which may call friendly_abort.  Prototype friendly abort, not
12840         my_friendly_abort or my_friendly_assert.
12841         * decl.c (signal_catch): Report the signal caught in the error
12842         message.  Call fatal directly.
12843         * typeck2.c (ack, my_friendly_assert): Delete.
12844         (my_friendly_abort): Rename to friendly_abort.  Expect file,
12845         line, and function parameters.  Report the abort code, then
12846         call fancy_abort.  Do not mask an abort if errors have
12847         already occurred.
12848
12849 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
12850
12851         * typeck.c (comp_target_parms): Remove obsolete parameter.
12852         (comp_target_types): Adjust.
12853
12854 2000-07-17  Jason Merrill  <jason@redhat.com>
12855
12856         * typeck.c (mark_addressable): Never set TREE_USED.
12857         * call.c (build_call): Don't abort on calls to library functions
12858         that have been declared normally.
12859
12860         * typeck.c (build_binary_op): Fix grammar in warning.
12861
12862         * exception.cc (__eh_free): Fix prototype.
12863
12864         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
12865
12866         * decl.c (pushdecl): Handle seeing an OVERLOAD in
12867         IDENTIFIER_NAMESPACE_VALUE.
12868
12869 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
12870
12871         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
12872         * method.c (use_thunk): Correct handling of vcall offsets.
12873
12874 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
12875
12876         * .cvsignore: parse.h and parse.c have no cp- prefix.
12877
12878 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
12879
12880         * .cvsignore: New file.
12881
12882 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
12883
12884         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
12885
12886 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
12887
12888         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
12889         * parse.c: Remove.
12890         * parse.h: Likewise.
12891
12892 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
12893
12894         * class.c (layout_class_type): Add pointers to virtual bases after
12895         base classes under the old ABI.
12896
12897 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
12898
12899         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
12900         (finish_continue_stmt): Likewise.
12901         (begin_for_stmt): Remove call to note_level_for_for.
12902         (finish_goto_stmt): Change call from build_min_nt
12903         to build_stmt.
12904         (finish_expr_stmt): Likewise.
12905         (begin_if_stmt): Likewise.
12906         (begin_while_stmt): Likewise.
12907         (finish_while_stmt): Likewise.
12908         (finish_return_stmt): Likewise.
12909         (begin_for_stmt): Likewise.
12910         (finish_for_stmt): Likewise.
12911         (finish_break_stmt): Likewise.
12912         (begin_switch_stmt): Likewise.
12913         (finish_case_label): Likewise.
12914         (genrtl_try_block): Likewise.
12915         (begin_try_block): Likewise.
12916         (begin_handler): Likewise.
12917         (begin_compound_stmt): Likewise.
12918         (finish_asm_stmt): Likewise.
12919         (finish_label_stmt): Likewise.
12920         (add_decl_stmt): Likewise.
12921         (finish_subobject): Likewise.
12922         (finish_decl_cleanup): Likewise.
12923         (finish_named_return_value): Likewise.
12924         (setup_vtbl_ptr): Likewise.
12925         (add_scope_stmt): Likewise.
12926         * decl.c (finish_constructor_body): Likewise.
12927         (finish_destructor_body): Likewise.
12928         * optimize.c (copy_body_r): Likewise.
12929         (initialize_inlined_parameters): Likewise.
12930         (declare_return_variable): Likewise.
12931         (expand_call_inline): Likewise.
12932
12933 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
12934
12935         * semantics.c (expand_body): Sync interface information
12936         at the end of function body expansion.
12937
12938 2000-07-09  Jason Merrill  <jason@redhat.com>
12939
12940         * init.c (build_new_1): Bail early if the call to new fails.
12941
12942         * decl.c (compute_array_index_type): Check specifically for
12943         an INTEGER_CST, not just TREE_CONSTANT.
12944
12945         * decl.c (duplicate_decls): Don't call duplicate_decls on
12946         the DECL_TEMPLATE_RESULT.
12947         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
12948         codes.
12949
12950         * error.c (dump_template_bindings): Don't crash if we had an
12951         invalid argument list.
12952
12953         * typeck.c (c_expand_start_case): Do narrowing here.
12954         * semantics.c (finish_switch_cond): Not here.
12955
12956 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
12957
12958         * parse.y (asm_clobbers): Do string concatenation.
12959
12960 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
12961
12962         * decl.c (pushtag): Don't put local classes in template functions
12963         on the local_classes list.
12964
12965 2000-07-04  Scott Snyder  <snyder@fnal.gov>
12966
12967         * decl2.c (get_guard): Add missing return for old ABI local
12968         variable case.
12969
12970 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
12971
12972         * cp-tree.h (char_type_p): New function.
12973         * decl.c (init_decl_processing): Don't initialize
12974         signed_wchar_type_node or unsigned_wchar_type_node.
12975         (complete_array_type): Handle brace-enclosed string-constants.
12976         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
12977         * tree.c (char_type_p): New function.
12978         * typeck2.c (digest_init): Use char_type_p.
12979
12980 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
12981
12982         * pt.c (tsubst): Don't layout type, if it's error_mark.
12983
12984 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
12985
12986         * pt.c (instantiate_pending_templates): Reset template level.
12987
12988 2000-07-05  Jason Merrill  <jason@redhat.com>
12989
12990         * call.c (joust): Don't complain about `operator char *()' beating
12991         `operator const char *() const'.
12992
12993 2000-07-04  scott snyder  <snyder@fnal.gov>
12994             Jason Merrill  <jason@redhat.com>
12995
12996         * repo.c (repo_get_id): Handle the case where a class with virtual
12997         bases has a null TYPE_BINFO_VTABLE.
12998
12999 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
13000             Jason Merrill  <jason@redhat.com>
13001
13002         * parse.y (member_init): Just pass in the type.
13003         * init.c (expand_member_init): Handle getting a type.
13004
13005 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13006             Jason Merrill  <jason@redhat.com>
13007
13008         * decl.c (finish_function): Warn if a function has no return
13009         statement.
13010         Suggested by Andrew Koenig.
13011         * typeck.c (check_return_expr): Do set current_function_returns_value
13012         if we got an error_mark_node.
13013
13014 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
13015
13016         * decl2.c (push_decl_namespace): Push the original namespace.
13017
13018 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
13019
13020         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
13021         * semantics.c (begin_class_definition): Clear it.
13022
13023 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
13024
13025         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
13026         (genrtl_expr_stmt): Likewise.
13027         (genrtl_decl_stmt): Likewise.
13028         (genrtl_if_stmt): Likewise.
13029         (genrtl_while_stmt): Likewise.
13030         (genrtl_do_stmt): Likewise.
13031         (genrtl_return_stmt): Likewise.
13032         (genrtl_for_stmt): Likewise.
13033         (genrtl_break_stmt): Likewise.
13034         (genrtl_continue_stmt): Likewise.
13035         (genrtl_scope_stmt): Likewise.
13036         (genrtl_switch_stmt): Likewise.
13037         (genrtl_case_label): Likewise.
13038         (genrtl_begin_compound_stmt): Likewise.
13039         (genrtl_finish_compound_stmt): Likewise.
13040         (genrtl_compound_stmt): Likewise.
13041         (genrtl_asm_stmt): Likewise.
13042
13043         * init.c (begin_init_stmts): Remove call to
13044         genrtl_begin_compound_stmt.
13045         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
13046
13047         * semantics.c (lang_expand_stmt): Changed call to
13048         genrtl_compound_stmt to ignore return value.
13049
13050 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
13051
13052         * mangle.c (canonicalize_for_substitution): Return the canonical
13053         variant of a type.
13054
13055         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
13056         TYPE_DECL.
13057         * typeck.c (commonparms): Remove obstack manipulations.
13058
13059 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
13060
13061         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
13062
13063         * Makefile.in (OBJS): Added ../c-semantics.o.
13064         (OBJDEPS): Likewise.
13065
13066         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
13067         ../c-common.h.
13068         (struct stmt_tree): Added comment.
13069         (current_function_name_declared): Removed.
13070         (stmts_are_full_exprs_p): Likewise.
13071         (genrtl_do_pushlevel): Likewise.
13072         (genrtl_clear_out_block): Likewise.
13073         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
13074         (DECL_ANON_UNION_ELEMS): Likewise.
13075         (emit_local_var): Likewise.
13076         (make_rtl_for_local_static): Likewise.
13077         (do_case): Likewise.
13078         (expand_stmt): Likewise.
13079         (genrtl_decl_cleanup): Likewise.
13080         (c_expand_asm_operands): Likewise.
13081         (c_expand_return): Likewise.
13082         (c_expand_start_case): Likewise.
13083
13084         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
13085         (emit_local_var): Likewise.
13086         (initialize_local_var): Change reference to
13087         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
13088         Change reference to stmts_are_full_exprs_p to
13089         current_stmt_tree->stmts_are_full_exprs_p.
13090         (push_cp_function_context): Likewise.
13091
13092         * expect.c (expand_throw): Change reference to
13093         stmts_are_full_exprs_p.
13094
13095         * init.c (build_aggr_init): Change reference to
13096         stmts_are_full_exprs_p.
13097         (build_vec_init): Likewise.
13098
13099         * optimize.c (maybe_clone_body): Change reference to
13100         current_function_name_declared to
13101         cp_function_chain->name_declared.
13102
13103         * pt.c (instantiate_decl): Change reference to
13104         current_function_name_declared to
13105         cp_function_chain->name_declared.
13106
13107         * semantics.c (expand_cond): Moved declaration to c-common.h.
13108         (genrtl_do_pushlevel): Moved to c-semantics.c.
13109         (genrtl_clear_out_block): Likewise.
13110         (genrtl_goto_stmt): Likewise.
13111         (genrtl_expr_stmt): Likewise.
13112         (genrtl_decl_stmt): Likewise.
13113         (gerntl_if_stmt): Likewise.
13114         (genrtl_while_stmt): Likewise.
13115         (genrtl_do_stmt): Likewise.
13116         (genrtl_return_stmt): Likewise.
13117         (genrtl_for_stmt): Likewise.
13118         (genrtl_break_stmt): Likewise.
13119         (genrtl_continue_stmt): Likewise.
13120         (genrtl_scope_stmt): Likewise.
13121         (genrtl_switch_stmt): Likewise.
13122         (genrtl_case_label): Likewise.
13123         (genrtl_begin_compound_stmt): Likewise.
13124         (genrtl_finish_compound_stmt): Likewise.
13125         (genrtl_compound_stmt): Likewise.
13126         (genrtl_asm_stmt): Likewise.
13127         (genrtl_decl_cleanup): Likewise.
13128         (expand_cond): Likewise.
13129         (expand_stmt): Renamed to ...
13130         (lang_expand_stmt): ... this.
13131         (lang_expand_expr_stmt): Initialize.
13132         (set_current_function_name_declared): Likewise.
13133         (stmts_are_full_exprs_p): Likewise.
13134         (current_function_name_declared): Likewise.
13135         (anon_aggr_type_p): Likewise.
13136         (do_poplevel): Change reference to
13137         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
13138         Change reference to stmts_are_full_exprs_p to
13139         current_stmt_tree->stmts_are_full_exprs_p.
13140         (add_tree): Likewise.
13141         (finish_expr_stmt): Likewise.
13142         (prep_stmt): Likewise.
13143         (lang_expand_stmt): Likewise.
13144         (begin_compound_stmt): Change reference to
13145         current_function_name_declared to
13146         cp_function_chain->name_declared and call to
13147         current_function_name_declared().
13148         (setup_vtbl_ptr): Likewise.
13149         (genrtl_do_poplevel): Removed.
13150
13151 2000-06-30  Jason Merrill  <jason@redhat.com>
13152
13153         * init.c (init_init_processing): Go back to aligning like
13154         double_type_node for old ABI.
13155         (get_cookie_size): Make cookie larger if we get a type that needs
13156         more alignment.
13157         (build_vec_delete): Call it.
13158
13159         * typeck.c (qualify_type_recursive): New fn.
13160         (composite_pointer_type): Use it.
13161         (build_binary_op): Use composite_pointer_type.
13162
13163 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
13164             Jason Merrill  <jason@redhat.com>
13165
13166         * typeck.c (check_return_expr): Don't complain about returning
13167         NULL from operator new if -fcheck-new.
13168         * cp-tree.h: Declare flag_check_new here.
13169         * init.c: Not here.
13170
13171 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
13172
13173         * mangle.c (find_substitution): Use same_type_p.
13174         (write_encoding): Don't check for substitutions.
13175
13176 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
13177
13178         * parse.y (expr_no_comma_rangle): New non-terminal.
13179         (template_parm): Use it for default parameter case.
13180         (template_arg): Use it.
13181         (expr_no_commas): Remove commented out undefined extensions.
13182         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
13183         * parse.h, parse.c: Rebuilt.
13184
13185 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
13186
13187         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
13188         (finish_asm_stmt): Do it here, instead.
13189
13190         * cp-tree.h (ridpointers): Don't declare.
13191         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
13192         (record_builtin_java_type): Likewise.
13193         (init_decl_processing): Likewise.
13194         * lex.c: Move inclusion of lex.h.
13195         (ridpointers): Don't define.
13196         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
13197         RID_MAX.
13198         * lex.h (enum rid): Rename to ...
13199         (enum cp_rid): ... this.
13200         (ridpointers): Don't declare.
13201         * parse.y: Move inclusion of lex.h.
13202         * parse.c: Regenerated.
13203         * spew.c: Move inclusion of lex.h.
13204
13205         * cp-tree.h (struct language_function): Remove temp_name_counter.
13206         (temp_name_counter): Remove.
13207         (get_temp_name): Change prototype.
13208         (get_guard): New function.
13209         (get_guard_cond): Likewise.
13210         (set_guard): Likewise.
13211         * cvt.c (build_up_reference): Adjust call to get_temp_name.
13212         * decl.c (expand_static_init): Use get_guard and friends to
13213         implement guard variables.
13214         * decl2.c (get_temp_name): Assume that the variables created are
13215         always static.
13216         (get_sentry): Rename to ...
13217         (get_guard): ... this.  Implement new ABI guard variables.
13218         (get_guard_bits): New function.
13219         (get_guard_cond): Likewise.
13220         (set_guard): Likewise.
13221         (start_static_initialization_or_destruction): Use them.
13222         (do_static_initialization): Replace sentry with guard throughout.
13223         (do_static_destruction): Likewise.
13224         * init.c (create_temporary_var): Add comment.
13225
13226 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
13227
13228         * mangle.c (find_substitution): Use same_type_p.
13229         (write_encoding): Don't check for substitutions.
13230
13231 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
13232
13233         * parse.y (expr_no_comma_rangle): New non-terminal.
13234         (template_parm): Use it for default parameter case.
13235         (template_arg): Use it.
13236         (expr_no_commas): Remove commented out undefined extensions.
13237         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
13238         * parse.h, parse.c: Rebuilt.
13239
13240 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
13241
13242         * cp-tree.h (flag_const_strings): Remove.
13243         (warn_parentheses): Likewise.
13244         (warn_format): Likewise.
13245         (common_type): Likewise.
13246         (default_conversion): Likewise.
13247         (build_binary_op): Likewise.
13248         (cp_build_binary_op): New macro.
13249         * call.c (build_new_op): Use cp_build_binary_op instead of
13250         build_binary_op.
13251         * class.c (build_vtable_entry_ref): Likewise.
13252         * decl.c (expand_static_init): Likewise.
13253         (compute_array_index_type): Likewise.
13254         (build_enumerator): Likewise.
13255         * decl2.c (delete_sanity): Likewise.
13256         (start_static_initialization_or_destruction): Likewise.
13257         * error.c (dump_type_suffix): Likewise.
13258         * init.c (resolve_offset_ref): Likewise.
13259         (build_new): Likewise.
13260         (build_new_1): Likewise.
13261         (build_vec_delete_1): Likewise.
13262         (build_vec_init): Likewise.
13263         (build_delete): Likewise.
13264         * rtti.c (synthesize_tinfo_fn): Likewise.
13265         (synthesize_tinfo_var): Likewise.
13266         * search.c (expand_upcast_fixups): Likewise.
13267         (fixup_all_virtual_upcast_offsets): Likewise.
13268         * typeck.c (build_array_ref): Likewise.
13269         (get_member_function_from_ptrfunc): Likewise.
13270         (build_binary_op): Add parameter.
13271         (pointer_int_sum): Use cp_build_binary_op.
13272         (pointer_diff): Likewise.
13273         (build_modify_expr): Likewise.
13274         (get_delta_difference): Likewise.
13275         (build_ptrmemfunc): Likewise.
13276
13277 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
13278
13279         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
13280         * decl.c (create_implicit_typedef): Adjust.
13281         * decl2.c (build_artificial_parm): Adjust.
13282         * method.c (implicitly_declare_fn): Adjust.
13283         * pt.c (push_inline_template_parms_recursive): Adjust.
13284         (process_template_parm): Adjust.
13285         (overloaded_template_name): Adjust.
13286         * semantics.c (finish_template_template_parm): Adjust.
13287
13288 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
13289
13290         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
13291         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
13292         where to emit thunks.
13293         (build_vtt): Adjust call to build_vtt_inits.
13294         (build_vtt_inits): Add parameter to indicate whether or not
13295         sub-VTTs for virtual bases should be included.  Adjust handling of
13296         construction vtables.
13297         (get_matching_base): New function.
13298         (dfs_build_vtt_inits): Rename to ...
13299         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
13300         construction vtables.
13301         (dfs_fixup_binfo_vtbls): Likewise.
13302         (build_ctor_vtbl_groups): Build construction vtables for virtual
13303         bases, too.
13304         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
13305         to build construction vtbls.
13306         (dfs_accumulate_vtbl_inits): Adjust handling of
13307         construction vtables.
13308
13309         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
13310         types correctly.
13311
13312 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
13313
13314         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
13315
13316 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
13317
13318         * search.c (hides): Remove.
13319         (is_subobject_of_p): Add most_derived parameter. Use
13320         CANONICAL_BINFO.
13321         (lookup_field_queue_p): Adjust.
13322         (lookup_field_r): Adjust.
13323
13324 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
13325
13326         * decl2.c (handle_class_head): Bash typedefs to the type's main
13327         decl.
13328
13329 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
13330
13331         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
13332         (begin_global_stmt_expr): ... this.
13333         (genrtl_finish_stmt_expr): Rename to ...
13334         (finish_global_stmt_expr): ... this.
13335         * init.c (begin_init_stmts): Adjust calls.
13336         (finish_init_stmts): Likewise.
13337         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
13338         (begin_global_stmt_expr): ... this.
13339         (genrtl_finish_stmt_expr): Rename to ...
13340         (finish_global_stmt_expr): ... this.
13341
13342 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13343
13344         * search.c (lookup_member): Fix typo in comment.
13345
13346 2000-06-24  Jason Merrill  <jason@redhat.com>
13347
13348         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
13349         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
13350
13351 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13352
13353         * parse.y (complex_direct_notype_declarator): Support global_scope.
13354         * Makefile.in: Adjust conflict count.
13355
13356 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13357
13358         * parse.y (template_arg): Convert TEMPLATE_DECL
13359         that is a template template parameter to
13360         TEMPLATE_TEMPLATE_PARM here.
13361
13362         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
13363         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
13364         (copy_template_template_parm): Adjust prototype.
13365         * decl.c (grokdeclarator): Remove dead code.
13366         * pt.c (process_template_parm): Tidy.
13367         (lookup_template_class): Construct nodes in
13368         copy_template_template_parm.
13369         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
13370         lookup_template_class.  Use TYPE_TI_TEMPLATE.
13371         * tree.c (copy_template_template_parm): Add NEWARGS
13372         parameter.
13373         (mapcar): Adjust call to copy_template_template_parm.
13374         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
13375         * method.c (build_template_template_parm_names): Change error
13376         code to avoid compilation warning.
13377
13378         * gxxint.texi: Document template template parameter
13379         name mangling.
13380
13381 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
13382
13383         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
13384         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
13385         (cp-demangle.o): New rule.
13386         (dyn-string.o): Likewise.
13387         * inc/cxxabi.h (__cxa_demangle): New declaration.
13388
13389 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
13390
13391         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
13392         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
13393         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
13394         a tree, not an int.
13395         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
13396         (make_thunk): Change prototype.
13397         (emit_thunk): Rename to use_thunk.
13398         (mangle_thunk): Change prototype.
13399         * class.c (get_derived_offset): Simplify.
13400         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
13401         BV_GENERATE_THUNK_WITH_VTABLE_P.
13402         (build_primary_vtable): Simplify.
13403         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
13404         (dfs_find_base): Remove.
13405         (update_vtable_entry_for_fn): Correct bug in finding the base
13406         where a virtual function was first declared.  Figure out whether
13407         or not to emit a vcall-thunk with the vtables in which it appears.
13408         Correct logic for deciding whether to use an ordinary thunk, or a
13409         vcall thunk.
13410         (finish_struct_1): Remove unnecssary code.
13411         (build_vtbl_initializer): Use ssize_int for the running counter of
13412         negative indices.
13413         (build_vtbl_initializer): Only use vcall thunks where necessary.
13414         Mark thunks as needing to be emitted with their vtables, or not.
13415         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
13416         indices.  Use size_binop.
13417         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
13418         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
13419         size_binop.
13420         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
13421         (build_vtable_entry): Mark thunks as needing to be emitted with
13422         their vtables, or not.
13423         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
13424         * decl2.c (mark_vtable_entries): Use use_thunk instead of
13425         emit_thunk.
13426         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
13427         information.
13428         * error.c (dump_expr): Use BV_FN.
13429         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
13430         not an int.
13431         * method.c (make_thunk): Likewise.
13432         (emit_thunk): Rename to use_thunk.  Allow callers to decide
13433         whether or not to actually emit the thunk.  Adjust for changes in
13434         representation of vcall offsets.
13435         * search.c (dfs_get_pure_virtuals): Use BV_FN.
13436         * semantics.c (emit_associated_thunks): New function.
13437         (expand_body): Use it.
13438         * ir.texi: Adjust decriptions of thunks.
13439
13440 2000-06-22  Jason Merrill  <jason@redhat.com>
13441
13442         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
13443         (tsubst_friend_function): Copy it here.
13444
13445         * decl.c (grok_op_properties): Fix typo.
13446
13447         * decl2.c (delete_sanity): Clarify warning, avoid failure on
13448         deleting void*.
13449
13450         * pt.c (check_explicit_specialization): Clarify error.
13451
13452         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
13453         an old OVERLOAD when we're declaring a non-function.
13454         (pushdecl, destroy_local_var): Check for error_mark_node.
13455         (warn_extern_redeclared_static): Also bail early if
13456         we're a CONST_DECL.
13457         (push_overloaded_decl): Ignore an old error_mark_node.
13458
13459 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
13460
13461         * call.c (build_x_va_arg): Check if in a template decl.
13462         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
13463
13464 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13465
13466         * class.c (push_lang_context): TYPE_NAME gets you to the Java
13467         types DECLs.
13468         * decl.c (check_goto): Computed gotos assumed OK.
13469
13470 2000-06-20  Jason Merrill  <jason@redhat.com>
13471
13472         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
13473         for which we don't need to look for instantiations.
13474
13475 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
13476
13477         * parse.y (program): Always call finish_translation_unit.
13478         * parse.c, parse.h: Rebuilt.
13479
13480 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
13481
13482         * method.c: Don't include hard-reg-set.h.
13483
13484 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
13485
13486         * rtti.c (get_base_offset): Cope when vbase field is in a base.
13487
13488 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
13489
13490         * call.c (build_conditional_expr): Use VOID_TYPE_P.
13491         * cvt.c (cp_convert_to_pointer): Likewise.
13492         (convert_to_void): Likewise.
13493         * error.c (dump_expr): Likewise.
13494         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
13495         * init.c (build_delete): Likewise.
13496         * method.c (emit_thunk): Likewise.
13497         * optmize.c (declare_return_variable): Likewise.
13498         * rtti.c (get_tinfo_decl_dynamic): Likewise.
13499         (get_typeid): Likewise.
13500         (build_dynamic_cast_1): Likewise.
13501         * typeck.c (composite_pointer_type): Likewise.
13502         (common_type): Likewise.
13503         (build_indirect_ref): Likewise.
13504         (build_binary_op): Likewise.
13505         (build_x_compound_expr): Likewise.
13506         (check_return_expr): Likewise.
13507         * typeck2.c (add_exception_specifier): Likewise.
13508
13509         * mangle.c (write_method_parms): Use direct comparison for end
13510         of parmlist.
13511
13512 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
13513
13514         * cp-tree.h (genrtl_try_block): Declare function.
13515         (genrtl_handler): Likewise.
13516         (genrtl_catch_block): Likewise.
13517         (genrtl_ctor_stmt): Likewise.
13518         (genrtl_subobject): Likewise.
13519         (genrtl_decl_cleanup): Likewise.
13520         (genrtl_do_poplevel): Likewise.
13521         (genrtl_do_pushlevel): Likewise.
13522         (genrtl_clear_out_block): Likewise.
13523         (genrtl_goto_stmt): Likewise.
13524         (genrtl_expr_stmt): Likewise.
13525         (genrtl_decl_stmt): Likewise.
13526         (genrtl_if_stmt): Likewise.
13527         (genrtl_while_stmt): Likewise.
13528         (genrtl_do_stmt): Likewise.
13529         (genrtl_return_stmt): Likewise.
13530         (genrtl_for_stmt): Likewise.
13531         (genrtl_break_stmt): Likewise.
13532         (genrtl_continue_stmt): Likewise.
13533         (genrtl_scope_stmt): Likewise.
13534         (genrtl_switch_stmt): Likewise.
13535         (genrtl_case_label): Likewise.
13536         (genrtl_begin_compound_stmt): Likewise.
13537         (genrtl_finish_compound_stmt): Likewise.
13538         (genrtl_compound_stmt): Likewise.
13539         (genrtl_asm_stmt): Likewise.
13540         (genrtl_named_return_value): Likewise.
13541         (genrtl_begin_stmt_expr): Likewise.
13542         (genrtl_finish_stmt_expr): Likewise.
13543         (finish_for_stmt): Removed first argument.
13544         (finish_switch_stmt): Likewise.
13545
13546         * semantics.c (genrtl_try_block): Define function.
13547         (genrtl_handler): Likewise.
13548         (genrtl_catch_block): Likewise.
13549         (genrtl_ctor_stmt): Likewise.
13550         (genrtl_subobject): Likewise.
13551         (genrtl_decl_cleanup): Likewise.
13552         (genrtl_do_poplevel): Likewise.
13553         (genrtl_do_pushlevel): Likewise.
13554         (genrtl_clear_out_block): Likewise.
13555         (genrtl_goto_stmt): Likewise.
13556         (genrtl_expr_stmt): Likewise.
13557         (genrtl_decl_stmt): Likewise.
13558         (genrtl_if_stmt): Likewise.
13559         (genrtl_while_stmt): Likewise.
13560         (genrtl_do_stmt): Likewise.
13561         (genrtl_return_stmt): Likewise.
13562         (genrtl_for_stmt): Likewise.
13563         (genrtl_break_stmt): Likewise.
13564         (genrtl_continue_stmt): Likewise.
13565         (genrtl_scope_stmt): Likewise.
13566         (genrtl_switch_stmt): Likewise.
13567         (genrtl_case_label): Likewise.
13568         (genrtl_begin_compound_stmt): Likewise.
13569         (genrtl_finish_compound_stmt): Likewise.
13570         (genrtl_compound_stmt): Likewise.
13571         (genrtl_asm_stmt): Likewise.
13572         (genrtl_named_return_value): Likewise.
13573         (genrtl_begin_stmt_expr): Likewise.
13574         (genrtl_finish_stmt_expr): Likewise.
13575         (finish_for_stmt): Removed first argument and generate rtl
13576         specific code.
13577         (finish_switch_stmt): Likewise.
13578         (do_poplevel): Removed generate rtl specific code.
13579         (do_pushlevel): Likewise.
13580         (add_tree): Likewise.
13581         (finish_goto_stmt): Likewise.
13582         (finish_expr_stmt): Likewise.
13583         (begin_if_stmt): Likewise.
13584         (finish_if_stmt_cond): Likewise.
13585         (finish_then_clause): Likewise.
13586         (begin_else_clause): Likewise.
13587         (finish_else_clause): Likewise.
13588         (finish_if_stmt): Likewise.
13589         (clear_out_block): Likewise.
13590         (begin_while_stmt): Likewise.
13591         (finish_while_stmt_cond): Likewise.
13592         (finish_while_stmt): Likewise.
13593         (begin_do_stmt): Likewise.
13594         (finish_do_body): Likewise.
13595         (finish_do_stmt): Likewise.
13596         (finish_return_stmt): Likewise.
13597         (begin_for_stmt): Likewise.
13598         (finish_for_init_stmt): Likewise.
13599         (finish_for_cond): Likewise.
13600         (finish_for_expr): Likewise.
13601         (finish_break_stmt): Likewise.
13602         (finish_continue_stmt): Likewise.
13603         (begin_switch_stmt): Likewise.
13604         (finish_switch_cond): Likewise.
13605         (finish_case_label): Likewise.
13606         (begin_try_block): Likewise.
13607         (begin_function_try_block): Likewise.
13608         (finish_try_block): Likewise.
13609         (finish_cleanup_try_block): Likewise.
13610         (finish_cleanup): Likewise.
13611         (finish_function_try_block): Likewise.
13612         (finish_handler_sequence): Likewise.
13613         (finish_function_handler_sequence): Likewise.
13614         (begin_handler): Likewise.
13615         (finish_handler_parms): Likewise.
13616         (begin_catch_block): Likewise.
13617         (finish_handler): Likewise.
13618         (begin_compound_stmt): Likewise.
13619         (finish_compound_stmt): Likewise.
13620         (finish_asm_stmt): Likewise.
13621         (finish_label_stmt): Likewise.
13622         (finish_label_decl): Likewise.
13623         (finish_subobject): Likewise.
13624         (finish_decl_cleanup): Likewise.
13625         (finish_named_return_value): Likewise.
13626         (begin_stmt_expr): Likewise.
13627         (finish_stmt_expr): Likewise.
13628
13629         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
13630         to call genrtl_expr_stmt when appropriate.
13631
13632         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
13633         begin_compound_expr to call genrtl_begin_stmt_expr and
13634         genrtl_begin_compound_expr when appropriate.
13635         (finish_init_stmts): Changed calls to finish_compound_expr and
13636         finish_stmt_expr to call genrtl_finish_compound_expr and
13637         genrtl_finish_stmt_expr when appropriate.
13638         (expand_default_init): Changed call to finish_expr_stmt to call
13639         genrtl_expr_stmt when appropriate.
13640         (build_vec_init): Likewise.
13641
13642         * parse.y (simple_stmt): Removed first argument from call to
13643         finish_for_stmt. Removed first argument from call to
13644         finish_switch_stmt.
13645
13646         * parse.c: Regenerated.
13647
13648         * pt.c (tsubst_expr): Removed first argument from call to
13649         finish_for_stmt. Removed first argument from call to
13650         finish_switch_stmt.
13651
13652 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
13653
13654         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
13655         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
13656
13657         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
13658         (cplus_tree_code_length[]): Likewise.
13659         (cplus_tree_code_name[]): Likewise.
13660         (init_parse): Added call to add_c_tree_codes. Changed
13661         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
13662
13663 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
13664
13665         * cp-tree.h (finish_mem_initializers): Declare.
13666         (count_trees): Likewise.
13667         * parse.y (base_init): Use finish_mem_initializers.
13668         * semantics.c (finish_mem_initializers): New function.
13669
13670         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
13671         the number of trees.
13672         (n_trees): Remove.
13673         (count_trees): Don't use it.
13674
13675 2000-06-15  Jason Merrill  <jason@redhat.com>
13676
13677         * tree.c (count_trees): New debugging function.
13678
13679         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
13680         * init.c (build_member_call): Pull out the name of a DECL.
13681
13682         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
13683         * semantics.c (expand_body): Push to TV_INTEGRATION here.
13684         * optimize.c (optimize_function): Not here.
13685         * pt.c (instantiate_decl): Push to TV_PARSE.
13686
13687 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
13688
13689         * cp-tree.h (struct language_function): Remove x_base_init_list
13690         and x_member_init_list.
13691         (current_base_init_list): Remove.
13692         (current_member_init_list): Likewise.
13693         (setup_vtbl_ptr): Change prototype.
13694         (emit_base_init): Likewise.
13695         (expand_member_init): Likewise.
13696         (reinit_parse_for_function): Remove.
13697         * decl.c (save_function_data): Don't clear x_base_init_list and
13698         x_member_init_list.
13699         (mark_language_function): Don't mark them.
13700         * init.c (perform_member_init): Tweak comment.
13701         (sort_member_init): Take the list of initializers as an argument.
13702         (sort_base_init): Likewise.
13703         (emit_base_init): Likewise.
13704         (expand_member_init): Return the initializer.  Don't use global
13705         variables.
13706         * lex.c (reinit_parse_for_function): Remove.
13707         * method.c (build_template_parm_names): Correct substitution.
13708         (do_build_copy_constructor): Don't use current_member_init_list
13709         and current_base_init_list.
13710         (synthesize_method): Likewise.
13711         * parse.y (base_init): Split mem-initializers into
13712         base-initializers and field-initializers.
13713         (member_init_list): Build up the list here.
13714         (member_init): Return the initializer.
13715         (fn.depfn): Don't use reinit_parse_for_function.
13716         * parse.c: Regenerated.
13717         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
13718         ERROR_MARK.
13719         (tsubst_expr): Don't use current_member_init_list
13720         and current_base_init_list.
13721         (tsubst_expr_values): Rename to ...
13722         (tsubst_initializer_list): ... this.  Use convert_from_reference.
13723         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
13724         and current_base_init_list.
13725         (begin_function_definition): Don't call reinit_parse_for_function.
13726
13727         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
13728
13729         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
13730         correctly.
13731
13732         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
13733
13734 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
13735
13736         * cp-tree.h (IF_COND): Move to c-common.h.
13737         (THEN_CLAUSE): Likewise.
13738         (ELSE_CLAUSE): Likewise.
13739         (WHILE_COND): Likewise.
13740         (WHILE_BODY): Likewise.
13741         (DO_COND): Likewise.
13742         (DO_BODY): Likewise.
13743         (RETURN_EXPR): Likewise.
13744         (EXPR_STMT_EXPR): Likewise.
13745         (FOR_INIT_STMT): Likewise.
13746         (FOR_COND): Likewise.
13747         (FOR_EXPR): Likewise.
13748         (FOR_BODY): Likewise.
13749         (SWITCH_COND): Likewise.
13750         (SWITCH_BODY): Likewise.
13751         (CASE_LOW): Likewise.
13752         (CASE_HIGH): Likewise.
13753         (GOTO_DESTINATION): Likewise.
13754         (COMPOUND_BODY): Likewise.
13755         (ASM_CV_QUAL): Likewise.
13756         (ASM_STRING): Likewise.
13757         (ASM_OUTPUTS): Likewise.
13758         (ASM_INPUTS): Likewise.
13759         (ASM_CLOBBERS): Likewise.
13760         (DECL_STMT_DECL): Likewise.
13761         (STMT_EXPR_STMT): Likewise.
13762         (LABEL_STMT_LABEL): Likewise.
13763         (SCOPE_BEGIN_P): Likewise.
13764         (SCOPE_END_P): Likewise.
13765         (SCOPE_STMT_BLOCK): Likewise.
13766         (SCOPE_NULLIFIED_P): Likewise.
13767         (SCOPE_NO_CLEANUPS_P): Likewise.
13768         (SCOPE_PARTIAL_P): Likewise.
13769         (ASM_VOLATILE_P): Likewise.
13770         (STMT_LINENO): Likewise.
13771         (STMT_LINENO_FOR_FN_P): Likewise.
13772
13773         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
13774         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
13775         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
13776         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
13777         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
13778
13779         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
13780
13781         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
13782         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
13783
13784         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
13785         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
13786         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
13787
13788 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
13789
13790         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
13791         * class.c (dfs_find_final_overrider): Set it appropriately.
13792         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
13793         avoid unneeded secondary vptrs.
13794
13795 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
13796
13797         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
13798         (check_bitfield_decl, check_field_decl): Likewise.
13799         (build_vtbl_or_vbase_field, build_base_field): Likewise.
13800         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
13801         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
13802         (xfer_tag, finish_enum): Likewise.
13803         * decl2.c (finish_builtin_type): Likewise.
13804         * init.c (init_init_processing): Likewise.
13805         * pt.c (instantiate_class_template): Likewise.
13806         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
13807         * cp-tree.h (struct lang_type): Add user_align member.
13808         (CLASSTYPE_USER_ALIGN): Define.
13809
13810 2000-06-13  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
13811
13812         * Make-lang.in (c++.install-common): Install g++-cross in
13813         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
13814         $(target_alias)-g++ and $(target_alias)-c++.
13815
13816 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
13817
13818         * class.c (vcall_offset_data_s): Add last_init and fns.
13819         (overrides): Rename to same_signature_p.
13820         (dfs_find_final_overrider): Adjust accordingly.
13821         (mark_overriders): Likewise.
13822         (warn_hidden): Likewise.
13823         (build_vtbl_initializer): Reorganize machinery for building things
13824         at negative offsets.
13825         (build_vcall_and_vbase_vtbl_entries): Likewise.
13826         (build_vbase_offset_vtbl_entries): Likewise.
13827         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
13828         offset entries.  Do not create two entries for functions with the
13829         same signature.
13830         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
13831         (build_rtti_vtbl_entries): Reorganize machinery for building things
13832         at negative offsets.
13833
13834         * optimize.c (expand_call_inline): Don't recurse into the code
13835         used to initialize the parameters more than once.
13836
13837 2000-06-11  Mark Mitchell <mark@codesourcery.com>
13838
13839         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
13840         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
13841         (find_substitution): Only use the `Sa' substitution for
13842         std::allocator, not instantiations of it.
13843         (write_template_prefix): Move comment.  Only use a TREE_LIST to
13844         represent substitutions for a member template.
13845         (write_array_type): Mangle array dimensions correctly.
13846         * optimize.c (maybe_clone_body): Copy more information from the
13847         cloned function.
13848         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
13849         on the regenerated declaration.
13850
13851 2000-06-11  Chip Salzenberg  <chip@valinux.com>
13852             Mark Mitchell <mark@codesourcery.com>
13853
13854         * class.c (build_vtable): Clarify comment.
13855         (build_ctor_vtbl_group): Pass the most derived type to
13856         build_vtable.
13857
13858 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13859
13860         * decl2.c (compare_options): Don't needlessly cast away const-ness.
13861
13862 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
13863
13864         * decl.c (add_binding): Handle duplicate declarations of external
13865         variables.
13866
13867 2000-06-09  Chip Salzenberg  <chip@valinux.com>
13868             Mark Mitchell <mark@codesourcery.com>
13869
13870         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
13871         argument.
13872         (write_signed_number): New macro.
13873         (write_unsigned_number): Likewise.
13874         (write_source_name): Use them.
13875         (write_number): Handle signed and unsigned values.
13876         (write_integer_cst): Use tree_int_cst_sgn, and use
13877         write_unsigned_number or write_signed_number as appropriate.
13878         (write_discriminator): Use write_unsigned_number or
13879         write_signed_number as appropriate.
13880         (write_template_arg_literal): Likewise.
13881         (write_array_type): Use tree_low_cst.
13882         (write_template_parm):  Use write_unsigned_number or
13883         write_signed_number as appropriate.
13884         (write_substitution): Adjust call to write_number.
13885         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
13886         (write_expression): Handle non-type template arguments of
13887         reference type correctly.
13888         (mangle_thunk): Use write_signed_number.
13889
13890 2000-06-09  Chip Salzenberg  <chip@valinux.com>
13891
13892         * mangle.c (find_substition): Don't mangle objects with typename
13893         substitutions (e.g. "cin" as "Si").
13894
13895 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
13896
13897         * call.c (add_candidate): Use ggc_alloc_cleared.
13898         * decl.c (lookup_label): Likewise.
13899         * lex.c (retrofit_lang_decl): Likewise.
13900
13901 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
13902
13903         * semantics.c (expand_body): Push to TV_EXPAND.
13904         * optimize.c (optimize_function): Push to TV_INTEGRATION.
13905         * decl.c (start_function): Always call announce_function.
13906
13907         * tinfo2.cc: Just declare abort.
13908
13909 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
13910
13911         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
13912         whenever @ is a symbolic name.
13913
13914 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
13915
13916         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
13917
13918 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
13919
13920         * decl.c (pushdecl): Look up functions by DECL_NAME, not
13921         DECL_ASSEMBLER_NAME.
13922
13923 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
13924
13925         * decl2.c (c_language): Define.
13926
13927 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
13928
13929         * lex.c (lang_init_options): Tweak.
13930
13931         * decl2.c: Remove #inclusion of diagnostic.h
13932         (lang_decode_option): Move diagnostic formatting options to
13933         toplevel.
13934
13935         * lang-options.h: Remove documentation for diagnostic options.
13936
13937         * Makefile.in (lex.o): Depends upon diagnostic.h
13938
13939 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
13940
13941         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
13942         the same DECL_RESULT, it's not a redefinition.
13943         * pt.c (tsubst_decl): Remove code to handle illegal
13944         specializations.
13945
13946 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
13947
13948         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
13949
13950 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
13951
13952         * search.c (maybe_suppress_debug_info): Don't check
13953         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
13954
13955         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
13956         here if extern_p.
13957
13958         Remember instantiation context in deferred instantiations.
13959         * cp-tree.h (struct tinst_level): Remove.
13960         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
13961         * pt.c (current_tinst_level): Now a tree.
13962         (print_template_context, push_tinst_level, pop_tinst_level,
13963         tinst_for_decl): Adjust.
13964         (reopen_tinst_level): New fn.
13965         (init_pt): Register current_tinst_level as a root.
13966         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
13967         of the pending templates list.
13968         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
13969         * lex.c (extract_interface_info): Adjust.
13970         * decl2.c (warn_if_unknown_interface): Adjust.
13971
13972 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
13973
13974         * class.c (indirect_primary_base_p): New function.
13975         (determine_primary_base): Use it.
13976
13977 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
13978
13979         Update new-abi dynamic cast algorithm.
13980         * tinfo.cc (__class_type_info::__dyncast_result): Add
13981         whole_details. Adjust constructor.
13982         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
13983         Avoid unnecessary searching.
13984         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
13985
13986 2000-06-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13987
13988         * decl.c (init_decl_processing): Don't call record_component_aliases.
13989         * tree.c (build_cplus_array_type_1): Likewise.
13990
13991 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
13992
13993         * ir.texi: Correct typo.
13994         * mangle.c (write_expression): Handle non-type template arguments
13995         with reference type.
13996         * method.c (build_overload_value): Likewise.
13997         * pt.c (convert_nontype_argument): Explicitly represent conversion
13998         to a reference with an ADDR_EXPR.
13999         (unify): Always unify arguments in left-to-right order.
14000
14001 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
14002             Mark Mitchell  <mark@codesourcery.com>
14003
14004         * Make-lang.in (CXX_SRCS): Add mangle.c.
14005         * Makefile.in (CXX_OBJS): Add mangle.o.
14006         (mangle.o): New rule.
14007
14008         * class.c (local_classes): New variable.
14009         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
14010         (get_vtt_name): Use mangle_vtt_name for new ABI.
14011         (init_class_processing): Initialize local_classes.
14012         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
14013         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
14014         (std_identifier): New macro.
14015         (DECL_VOLATILE_MEMFUNC_P): New macro.
14016         (DECL_NAMESPACE_STD_P): Likewise.
14017         (local_classes): Declare.
14018         (get_mostly_instantiated_function_type): Declare.
14019         (init_mangle): Declare.
14020         (mangle_decl): Likewise.
14021         (mangle_type_string): Likewise.
14022         (mangle_type): Likewise.
14023         (mangle_typeinfo_for_type): Likewise.
14024         (mangle_typeinfo_string_for_type): Likewise.
14025         (mangle_vtbl_for_type): Likewise.
14026         (mangle_vtt_for_type): Likewise.
14027         (mangle_ctor_vtbl_for_type): Likewise.
14028         (mangle_thunk): Likewise.
14029         (mangle_conv_op_name_for_type): Likewise.
14030         (mangle_guard_variable): Likewise.
14031         * decl.c (pushtag): Keep track of local classes.
14032         (initialize_predefined_identifiers): Initialize std_identifier.
14033         (init_decl_processing): Use std_identifier.
14034         (start_decl): Don't treat instantiations as specializations.
14035         (grokdeclarator): Likewise.
14036         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
14037         name for fully-instantiated templates.
14038         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
14039         destructors with the new ABI.
14040         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
14041         (grokfield): Use mangle_type for new ABI.
14042         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
14043         (get_sentry): Use mangle_guard_variable for new ABI.
14044         (start_static_initialization_or_destruction): Likewise.
14045         * expr.c (extract_aggr_init): Remove.
14046         (extract_scalar_init): Likewise.
14047         (extract_init): Remove #if 0'd code.
14048         * mangle.c: New function.
14049         * method.c (build_mangled_name): Assert not flag_new_abi.
14050         (build_static_name): Likewise.
14051         (build_decl_overload_real): Likewise.
14052         (build_typename_overload): Likewise.
14053         (build_overload_with_type): Likewise.
14054         (build_overload_name): Likewise.
14055         (get_ctor_vtbl_name): Likewise.
14056         (start_squangling): Likewise.
14057         (get_id_2): Likewise.
14058         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
14059         (init_method): Call init_mangle for new ABI.
14060         (make_thunk): Call mangle_thunk for new ABI.
14061         * operators.def: Correct new ABI manglings for the `%' operator.
14062         Add `::' operator.
14063         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
14064         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
14065         (lookup_template_class): Call mangle_decl for new ABI.
14066         (get_mostly_instantiated_function_type): New function.
14067         (set_mangled_name_for_template_decl): Use it.
14068         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
14069         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
14070         conversion op names.
14071         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
14072         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
14073         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
14074         mangle_typeinfo_string_for_type.
14075
14076 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
14077
14078         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
14079         (INNERMOST_TEMPLATE_ARGS): New macro.
14080         (innermost_args): Remove.
14081         (get_innermost_template_args): New function.
14082         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
14083         * error.c (dump_function_decl): Be caution when using
14084         most_general_template.
14085         * method.c (build_template_parm_names):  Use
14086         INNERMOST_TEMPLATE_ARGS.
14087         * pt.c (add_to_template_args): Tidy comment
14088         (get_innermost_template_args): New function.
14089         (check_explicit_specialization): Clear DECL_INITIAL for a new
14090         specialization.
14091         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
14092         Tidy.
14093         (push_template_decl): Always register specializations of the most
14094         general template.
14095         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
14096         (coerce_template_parms): Likewise.
14097         (lookup_template_class): Likewise.
14098         (innermost_args): Remove.
14099         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
14100         (tsubst_decl): Handle tricky specializations.  Use
14101         get_innermost_template_args.
14102         (instantiate_template): Simplify handling of partial
14103         instantiations.
14104         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
14105         (most_general_template): Reimplement, in a more straightforward
14106         manner.
14107         (regenerate_decl_from_template): Tweak formatting.  Use
14108         TMPL_ARGS_DEPTH for clarity.
14109         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
14110
14111         * dump.c (dequeue_and_dump): Dump information about thunks.
14112
14113 2000-06-01  Richard Henderson  <rth@cygnus.com>
14114
14115         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
14116
14117 2000-06-01  Richard Henderson  <rth@cygnus.com>
14118
14119         * decl2.c (unsupported_options): Fix typo, make const.
14120         (lang_decode_option): Fix bsearch argument order.
14121
14122 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
14123
14124         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
14125         on FIELD_DECLs.
14126
14127 2000-05-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14128
14129         * cp-tree.h (c_get_alias_set): Deleted.
14130         * Makefile.in (decl.o): Include ../expr.h.
14131         * decl.c (expr.h): Include.
14132         (init_decl_processing): Call record_component_aliases for arrays.
14133         (grokdeclarator): Likewise.
14134         Set TREE_ADDRESSABLE for fields that aren't bitfields.
14135         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
14136
14137 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
14138
14139         Remove guiding declaration support.
14140         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
14141         (flag_guiding_decls): Remove.
14142         * call.c (build_user_type_conversion_1): Remove support for
14143         guiding decls.
14144         (build_new_function_call): Likewise.
14145         (build_new_op): Likewise.
14146         (build_new_method_call): Likewise.
14147         * decl.c (start_function): Likewise.
14148         * friend.c (is_friend): Likewise.
14149         (do_friend): Likewise.
14150         * decl2.c ((flag_dump_translation_unit): Make it const.
14151         (flag_guiding_decls): Remove.
14152         (unsupported_options): New variable
14153         (compare_options): New function.
14154         (lang_decode_option): Use them.
14155
14156         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
14157
14158         * method.c (mangle_expression): Adjust test for legal expression
14159         operators.
14160
14161         * pt.c (instantiate_decl): Save and restore the local
14162         specializations list.
14163
14164 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
14165
14166         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
14167
14168 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
14169
14170         * call.c (add_template_candidate_real): Handle member template
14171         constructors for classes with virtual bases.
14172         (build_user_type_conversion_1): Use in_charge_arg_for_name.
14173         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
14174
14175         * ir.texi: Update thunk documentation.
14176
14177         * call.c (joust): Fix handling of overloaded builtin operators.
14178
14179 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
14180
14181         * cp-tree.h (DECL_ANTICIPATED): New macro.
14182         Document new use of DECL_LANG_FLAG_7.
14183         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
14184         in the user namespace.
14185         * lex.c (do_identifier): If the identifier's declaration has
14186         DECL_ANTICIPATED on, it has not yet been declared.  But do not
14187         replace it with an ordinary implicit declaration.
14188
14189         * tinfo2.cc: Include stdlib.h.
14190
14191 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
14192
14193         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
14194         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
14195         CLASSTYPE_ALIGN.
14196
14197 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
14198
14199         * decl2.c (lang_decode_option): Use skip_leading_substring instead
14200         of plain strncmp.
14201
14202 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
14203
14204         * operators.def (<?): Duplicated, should have been...
14205         (>?): this.  Fixed.
14206
14207 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
14208             Mark Mitchell  <mark@codesourcery.com>
14209
14210         * cp-tree.h (ansi_opname): Make it a macro.
14211         (ansi_assopname): Likewise.
14212         (struct lang_decl_flags): Add assignment_operator_p.
14213         (struct lang_decl): Add operator_code.
14214         (DECL_VTT_PARM): Adjust.
14215         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
14216         overloaded operator.
14217         (SET_OVERLOADED_OPERATOR_CODE): New macro.
14218         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
14219         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
14220         (opname_tab): Remove.
14221         (assignop_tab): Likewise.
14222         (operator_name_info_t): New type.
14223         (operator_name_info): New variable.
14224         (assignment_operator_name_info): Likewise.
14225         (build_cp_library_fn): Remove declaration.
14226         (push_cp_library_fn): Likewise.
14227         (operator_name_string): Likewise.
14228         (build_decl_overload): Likewise.
14229         * call.c (print_z_candidates): Simplify.
14230         (build_object_call): Adjust usage of ansi_opname.  Use
14231         DECL_OVERLOADED_OPERATOR_P.
14232         (op_error): Adjust operator name lookup.
14233         (build_conditional_expr): Adjust usage of ansi_opname.
14234         (build_new_op): Likewise.
14235         (build_op_delete_call): Likewise.
14236         (build_over_call): Likewise.
14237         (joust): Use DECL_OVERLOADED_OPERATOR_P.
14238         * decl.c (duplicate_decls): Copy operator_code.
14239         (init_decl_processing): Adjust parameters to push_cp_library_fn.
14240         (builtin_function): Adjust parameters to build_library_fn_1.
14241         (build_library_fn_1): Accept an overloaded operator code.
14242         (build_library_fn): Pass ERROR_MARK.
14243         (build_cp_library_fn): Accept an overloaded operator code.
14244         (push_cp_library_fn): Likewise.
14245         (grokfndecl): Tweak.
14246         (grokdeclarator): Simplify code to compute names of overloaded
14247         operators.  Adjust use of ansi_opname.
14248         (ambi_op_p): Work on tree_codes, not identifiers.
14249         (unary_op_p): Likewise.
14250         (grok_op_properties): Likewise.
14251         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
14252         (lang_mark_tree): Don't try to mark the operator_code.
14253         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
14254         * error.c (dump_decl): Remove special handling for operator
14255         names.
14256         (dump_function_name): Likewise.
14257         (dump_expr): Adjust name lookup of operators.
14258         (op_to_string): Simplify.
14259         (assop_to_string): Likewise.
14260         * init.c (build_new_1): Adjust use of ansi_opname.
14261         * lex.c (opname_tab): Remove.
14262         (assignop_tab): Likewise.
14263         (ansi_opname): Likewise.
14264         (ansi_assopname): Likewise.
14265         (operator_name_string): Likewise.
14266         (reinit_lang_specific): Likewise.
14267         (operator_name_info): New variable.
14268         (assignment_operator_name_info): Likewise.
14269         (init_operators): New function.
14270         (init_parse): Use it.
14271         (do_identifier): Adjust use of ansi_opname.
14272         * method.c (mangle_expression): Don't use ansi_opname for
14273         mangling.
14274         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
14275         (build_decl_overload): Remove.
14276         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
14277         (do_build_assign_ref): Adjust use of ansi_opname.
14278         (synthesize_method): Likewise.
14279         (implicitly_declare_fn): Likewise.
14280         * operators.def: New file.
14281         * parse.y (operator): Adjust use of ansi_opname.
14282         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
14283         (set_mangled_name_for_template_decl): Don't play games with
14284         current_namespace.
14285         (special_function_p): Adjust use of ansi_opname.
14286         * typeck.c (check_return_expr): Likewise.
14287         * Make-lang.in (cc1plus): Depend on operators.def.
14288         * Makefile.in (lex.o): Likewise.
14289         (decl.o): Likewise.
14290
14291 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
14292
14293         * Make-lang.in (cplib2.ready): Eradicate.
14294
14295 2000-05-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14296
14297         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
14298         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
14299         (built_min, cp_tree_equal): Likewise.
14300
14301 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
14302
14303         * class.c (layout_nonempty_base_or_field): Replace
14304         `record_layout_info' with `record_layout_info_s'.
14305
14306 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
14307
14308         Fix goto checking.
14309         * cp-tree.h (struct language_function): x_named_labels is now
14310         a struct named_label_list*.
14311         * decl.c (struct named_label_use_list): Renamed from...
14312         (struct named_label_list): ...this.  New struct.
14313         (push_binding_level): Don't set eh_region.
14314         (note_level_for_eh): New fn.
14315         (pop_label): Take label and old value directly.
14316         (pop_labels): Adjust for new named_labels format.
14317         (lookup_label): Likewise.
14318         (poplevel): Note characteristics of a binding level containing a
14319         named label.  Mess with named label lists earlier.
14320         (mark_named_label_lists): New fn.
14321         (mark_lang_function): Call it.
14322         (use_label): New fn, split out from...
14323         (make_label_decl): ...here.  Don't call it.
14324         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
14325         check_previous_gotos): New fns, split out from...
14326         (define_label): ...here.
14327         (check_switch_goto): New fn.
14328         (define_case_label): Call it.
14329         (check_goto): New fn.
14330         * semantics.c (finish_goto_stmt): Call it and use_label.
14331         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
14332         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
14333
14334 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
14335
14336         * class.c (build_vtable_entry_ref): Correct usage of
14337         get_vtbl_decl_for_binfo.
14338
14339         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
14340         * method.c (implicitly_declare_fn): Not here.
14341
14342 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
14343
14344         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
14345         (CPTI_PTMD_DESC_TYPE): ... here.
14346         (ptmd_desc_type_node): Rename to ...
14347         (ptm_desc_type_node): ... here.
14348         * decl.c: Likewise.
14349         * rtti.c (ptmd_initializer): Rename to ...
14350         (ptm_initializer): ... here.
14351         (sythesize_tinfo_var): Adjust. Deal with pointer to member
14352         function.
14353         (create_tinfo_types): Adjust.
14354
14355 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
14356
14357         Finish implementation of VTTs.
14358         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
14359         CPTI_VTT_PARM_IDENTIFIER.
14360         (vtt_parm_identifier): New macro.
14361         (vtt_parm_type): Likewise.
14362         (BINFO_SUBVTT_INDEX): Likewise.
14363         (BINFO_VPTR_INDEX): Likewise.
14364         (struct lang_decl): Add vtt_parm.
14365         (DECL_VTT_PARM): New macro.
14366         (DECL_USE_VTT_PARM): Likewise.
14367         (DECL_NEEDS_VTT_PARM_P): Likewise.
14368         (get_vtt_name): Declare.
14369         (build_artificial_parm): Likewise.
14370         (fixup_all_virtual_upcast_offsets): Likewise.
14371         (expand_indirect_vtbls_init): Remove.
14372         * call.c (build_new_method_call): Pass the vtt to subobject
14373         constructors and destructors.
14374         * class.c (get_vtt_name): Give it external linkage.
14375         (build_clone): Handle the magic VTT parameters for clones.
14376         (clone_function_decl): Fix typo in comment.
14377         (build_vtt): Keep track of the indices in the VTTs where various
14378         entities are stored.
14379         (build_vtt_inits): Likewise.
14380         (dfs_build_vtt_inits): Likewise.
14381         (build_ctor_vtbl_group): Tweak type of construction vtables.
14382         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
14383         primary bases, when building construction vtables.
14384         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
14385         (initialize_predefined_identifiers): Add vtt_parm_identifier.
14386         (init_decl_processing): Initialize vtt_parm_type.
14387         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
14388         (lang_mark_tree): Make vtt_parm.
14389         * decl2.c (build_artificial_parm): New function.
14390         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
14391         (grokclassfn): Use build_artificial_parm.
14392         * init.c (initialize_vtbl_ptrs): Call
14393         fixup_all_virtual_upcast_offsets directly.
14394         (perform_member_init): Use the complete subobject destructor for
14395         member cleanups.
14396         (build_vtbl_address): New function.
14397         (expand_virtual_init): Handle VTTs.
14398         * optimize (maybe_clone_body): Likewise.
14399         * search.c (fixup_all_virtual_upcast_offsets): Give it external
14400         linkage.
14401         (expand_indirect_vtbls_init): Remove.
14402         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
14403         * tree.c (make_binfo): Make them bigger.
14404
14405 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
14406
14407         * inc/cxxabi.h (__pbase_type_info): Define, based on
14408         __pointer_type_info.
14409         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
14410         (__pointer_to_member_type_info): Likewise.
14411         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
14412         (__pointer_to_member_type_info::__is_pointer_p): Remove.
14413         (__pointer_type_info::__do_catch): Rename to ...
14414         (__pbase_type_info::__do_catch): ... here. Adjust.
14415         (__pbase_type_info::__pointer_catch): Implement.
14416         (__pointer_type_info::__pointer_catch): Adjust.
14417         (__pointer_to_member_type_info::__pointer_catch): Adjust.
14418
14419 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
14420
14421         * tinfo.h (__user_type_info::contained_virtual_p): New
14422         predicate.
14423         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
14424         shaped hierarchy.
14425         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
14426         diamond shaped hierarchy. Add early out for mixed diamond and
14427         duplicate shaped hierarchy.
14428
14429 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
14430
14431         * cp-tree.h (build_delete): Change prototype.
14432         (build_vec_delete): Likewise.
14433         * call.c (build_scoped_method_call): Use special_function_kind
14434         values to indicate the kind of destruction to be done.
14435         (build_method_call): Likewise.
14436         * decl.c (finish_destructor_body): Likewise.
14437         (maybe_build_cleanup_1): Likewise.  Rename to ...
14438         (maybe_build_cleanup): ... this.
14439         * decl2.c (delete_sanity): Use special_function_kind
14440         values to indicate the kind of destruction to be done.
14441         (build_cleanup): Likewise.
14442         * init.c (perform_member_init): Likewise.
14443         (build_vec_delete_1): Likewise.
14444         (build_dtor_call): Simplify.
14445         (build_delete): Use special_function_kind
14446         values to indicate the kind of destruction to be done.
14447         (build_vbase_delete): Likewise.
14448         (build_vec_delete): Likewise.
14449
14450         * init.c (sort_member_init): Fix typo in error message generation
14451         code.
14452
14453 2000-05-15  Donald Lindsay  <dlindsay@cygnus.com>
14454
14455         * semantics.c (begin_class_definition): make the packed
14456         attribute be sensitive to the "-fpack-struct" command line flag
14457
14458 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
14459
14460         Update new-abi upcast algorithm.
14461         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
14462         prototype and meaning of return value.
14463         (__si_class_type_info::__do_upcast): Likewise.
14464         (__vmi_class_type_info::__do_upcast): Likewise.
14465         * tinfo.cc (__class_type_info::__upcast_result): Replace
14466         whole2dst with part2dst. Adjust ctor.
14467         (__class_type_info::__do_upcast): Adjust call of worker function.
14468         (__class_type_info::__do_upcast): Adjust.
14469         (__si_class_type_info::__do_upcast): Adjust. Use parent's
14470         __do_upcast.
14471         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
14472         virtual base in diamond hierarchy bug.
14473
14474 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
14475
14476         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
14477         and bitfield to tinfo_fn_p.
14478         (DECL_TINFO_FN_P): Adjust.
14479         (SET_DECL_TINFO_FN_P): Likewise.
14480         (DECL_MUTABLE_P): Likewise.
14481         (DECL_C_BIT_FIELD): Likewise.
14482         (SET_DECL_C_BIT_FIELD): Likewise.
14483         (CLEAR_DECL_C_BIT_FIELD): Likewise.
14484         (DECL_UNINLINABLE): Likewise.
14485         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
14486         (handle_using_decl): Remove assertion.
14487         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
14488         to build FIELD_DECLs.
14489         (build_base_field): Likewise.
14490         (layout_class_type): Likewise.
14491         * decl.c (init_decl_processing): Likewise.
14492         (build_ptrmemfunc_type): Likewise.
14493         (grokdeclarator): Likewise.
14494         * decl2.c (grok_x_components): Likewise.
14495         * except.c (call_eh_info): Likewise.
14496         * init.c (init_init_processing): Likewise.
14497         * rtti.c (expand_class_desc): Likewise.
14498         (create_pseudo_type_info): Likewise.
14499         (get_vmi_pseudo_type_info): Likewise.
14500         (create_tinfo_types): Likewise.
14501         * ptree.c (print_lang_decl): Adjust.
14502         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
14503         before checking DECL_MUTABLE_P.
14504
14505         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
14506         parameters for template functions.
14507         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
14508         destructors as well as constructors.
14509
14510 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
14511
14512         * class.c (build_ctor_vtbl_group): Set inits.
14513         * optimize.c (maybe_clone_body): Set DECL_INLINE and
14514         DECL_THIS_INLINE appropriately for clones.
14515
14516         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
14517         (DECL_CONV_FN_P): Simplify.
14518         (DECL_OPERATOR): Remove.
14519         (language_to_string): Declare.
14520         * decl.c (duplicate_decls): Fix typo in comment.
14521         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
14522         (grok_op_properties): Use DECL_CONV_FN_P instead of
14523         IDENTIFIER_TYPENAME_P.
14524         * dump.c (dequeue_and_dump): Dump the language linkage of
14525         declarations.
14526         * error.c (language_to_string): Give it external linkage.
14527         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
14528         (implicitly_declare_fn): Set DECL_LANGUAGE.
14529         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
14530         IDENTIFIER_TYPENAME_P.
14531         (tsubst_decl): Likewise.
14532         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
14533         * semantics.c (finish_member_declaration): Don't mark members of
14534         classes declared in an extern "C" region as extern "C".
14535
14536 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14537
14538         * decl2.c (qualified_lookup_using_namespace): Look through
14539         namespace aliases.
14540
14541         * decl.c (push_using_decl): Return the old decl on namespace level.
14542
14543 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
14544
14545         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
14546         (VTT_NAME_PREFIX): New macro.
14547         (CTOR_VTBL_NAME_PREFIX): Likewise.
14548         (get_ctor_vtbl_name): New function.
14549         * class.c (get_vtable_name): Simplify.
14550         (get_vtt_name): New function.
14551         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
14552         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
14553         when a virtual base becomes primary.
14554         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
14555         VTTs.
14556         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
14557         additional parameters.
14558         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
14559         (initialize_array): New function.
14560         (build_vtt): Likewise.
14561         (build_vtt_inits): Likewise.
14562         (dfs_build_vtt_inits): Likewise.
14563         (dfs_fixup_binfo_vtbls): Likewise.
14564         (build_ctor_vtbl_group): Likewise.
14565         (initialize_vtable): Use initialize_array.
14566         (accumulate_vtbl_inits): Reimplement to handle construction
14567         vtables.
14568         (dfs_accumulate_vtbl_inits): Likewise.
14569         (bulid_vtbl_initializer): Adjust parameter name.
14570         * method.c (build_typename_overload): Remove #if 0'd code.
14571         (get_ctor_vtbl_name): New function.
14572         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
14573         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
14574
14575         * cp-tree.h (struct lang_type): Remove search_slot.
14576         (CLASSTYPE_SEARCH_SLOT): Remove.
14577         (emit_base_init): Change prototype.
14578         (initialize_vtbl_ptrs): Likewise.
14579         (expand_indirect_vtbls_init): Likewise.
14580         (clear_search_slots): Remove.
14581         * decl.c (lang_mark_tree): Don't mark search_slot.
14582         * init.c (initialize_vtbl_ptrs): Simplify.
14583         (emit_base_init): Likewise.
14584         * search.c (struct vbase_info): Document decl_ptr.
14585         (convert_pointer_to_single_level): Remove.
14586         (dfs_find_vbases): Remove.
14587         (dfs_init_base_pointers): Simplify.
14588         (dfs_clear_vbase_slots): Remove.
14589         (dfs_vtable_path_unmark): New function.
14590         (init_vbase_pointers): Simplify.
14591         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
14592         (expand_indirect_vtbls_init): Simplify.  Don't call
14593         mark_all_temps_used.
14594         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
14595         initialize_vtbl_ptrs.
14596
14597 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
14598
14599         * except.c: Add static prototypes.
14600
14601 2000-05-20  H.J. Lu  <hjl@gnu.org>
14602
14603         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
14604
14605 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
14606
14607         Don't create a separate copy of virtual bases for the
14608         CLASSTYPE_VBASECLASSES list.
14609         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
14610         (BINFO_FOR_VBASE): Remove.
14611         (CANONICAL_BINFO): Adjust.
14612         (binfo_for_vbase): New function.
14613         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
14614         instead of BINFO_FOR_VBASE.
14615         (build_vbase_pointer): Likewise.
14616         (build_secondary_vtable): Likewise.
14617         (dfs_mark_primary_bases): Likewise.
14618         (mark_primary_bases): Likewise.
14619         (layout_nonempty_base_or_field): Likewise.
14620         (dfs_set_offset_for_shared_vbases): Likewise.
14621         (dfs_set_offset_for_unshared_vbases): Likewise.
14622         (layout_virtual_bases): Likewise.  Adjust for changes to the
14623         CLASSTYPE_VBASECLASSES list.
14624         (dump_class_hierarchy_r): Use binfo_for_vbase
14625         instead of BINFO_FOR_VBASE.
14626         (dump_class_hierarchy): Likewise.
14627         (finish_vtbls): Likewise.
14628         (build_vtbl_initializer): Adjust for changes to the
14629         CLASSTYPE_VBASECLASSES list.
14630         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
14631         * decl.c (finish_destructor_body): Adjust for changes to the
14632         CLASSTYPE_VBASECLASSES list.
14633         * init.c (sort_base_init): Use binfo_for_vbase.
14634         (construct_virtual_bases): Adjust for changes to the
14635         CLASSTYPE_VBASECLASSES list.
14636         (expand_member_init): Use binfo_for_vbase.
14637         (build_vbase_delete):  Adjust for changes to the
14638         CLASSTYPE_VBASECLASSES list.
14639         * method.c (do_build_copy_constructor): Likewise.
14640         * rtti.c (get_base_offset): Use binfo_for_vbase.
14641         (expand_class_desc): Remove #if 0'd code.
14642         * search.c (struct vbase_info): Remove vbase_types.
14643         (get_base_distance):  Use binfo_for_vbase.
14644         (lookup_field_queue_p): Use CANONICAL_BINFO.
14645         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
14646         (get_pure_virtuals): Adjust for changes to the
14647         CLASSTYPE_VBASECLASSES list.
14648         (dfs_find_vbases): Use binfo_for_vbase.
14649         (dfs_init_vbase_pointers): Likewise.
14650         (init_vbase_pointers): Don't initialize vi.vbase_types.
14651         (virtual_context): Use binfo_for_vbase.
14652         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
14653         CLASSTYPE_VBASECLASSES list.
14654         (expand_indirect_vtbls_init): Simplify.
14655         (dfs_get_vbase_types): Don't replicate virtual bases.
14656         (find_vbase_instance): Use binfo_for_vbase.
14657         (binfo_for_vbase): New function.
14658         * typeck.c (get_delta_difference): Use binfo_for_vbase.
14659
14660 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
14661
14662         * decl2.c (finish_anon_union): Generalize error messages to handle
14663         anonymous structures.
14664         * init.c (perform_member_init): Remove `name' parameter.
14665         (build_field_list): New function.
14666         (sort_member_init): Handle anonymous union initialization order
14667         correctly.  Check for multiple initializations of the same union.
14668         (emit_base_init): Don't look up fields by name here.
14669         (expand_member_init): Record the result of name lookup for future
14670         reference.
14671         * typeck.c (build_component_ref): Fix formatting.
14672
14673 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
14674
14675         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
14676         * typeck.c (build_x_compound_expr): Replace warn_unused with
14677         warn_unused_value.
14678
14679         * decl2.c (lang_decode_option): Update -Wall unused flags by
14680         calling set_Wunused.
14681
14682 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
14683
14684         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
14685         * init.c (dfs_vtable_path_unmark): Remove.
14686         * search.c (marked_new_vtable_p): Likewise.
14687         (unmarked_new_vtable_p): Likewise.
14688         (dfs_search_slot_nonempty_p): Likewise.
14689         (dfs_mark): Likewise.
14690         (dfs_vtable_path_unmark): Likewise.
14691         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
14692         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
14693         (dfs_init_vbase_pointers): Remove special-case new ABI code.
14694         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
14695         (init_vbase_pointers): Simplify.
14696         (expand_indirect_vtbls_init): Likewise.
14697
14698         * class.c (copy_virtuals): New function.
14699         (build_primary_table): Use it.
14700         (build_secondary_vtable): Likewise.
14701         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
14702         indicate that no vcall offset is required.
14703         (add_virtual_function): Likewise.
14704         (modify_all_vtables): Likewise.
14705         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
14706         (dfs_accumulate_vtbl_inits): Likewise.
14707         (build_vtbl_initializer): Make changes to handle construction
14708         vtables.
14709         (dfs_build_vcall_offset_vtbl_entries): Likewise.
14710         (build_rtti_vtbl_entries): Likewise.
14711         (build_vtable_entries): Handle a NULL vcall_index.
14712
14713 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
14714
14715         * decl2.c (lang_decode_option): Fix thinko.
14716
14717 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
14718
14719         * except.c (check_handlers): New fn.
14720         * cp-tree.h: Declare it.
14721         * semantics.c (finish_handler_sequence): Call it.
14722         (finish_function_handler_sequence): Likewise.
14723         (finish_handler_parms): Set TREE_TYPE on the handler.
14724         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
14725         * search.c (get_base_distance_recursive): If protect>1, ignore
14726         special access.
14727         (get_base_distance): Don't reduce watch_access.
14728
14729 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
14730
14731         * lex.c: #include diagnostic.h.
14732         (lang_init_options): Set default prefixing rules.
14733
14734         * lang-options.h: Add -fdiagnostics-show-location=.
14735
14736         * decl2.c: #include diagnostic.h.
14737         (lang_decode_option): Handle -fdiagnostics-show-location=.
14738
14739 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
14740
14741         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
14742         * vec.cc: Revert my 2000-05-07 change.
14743
14744 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
14745
14746         * class.c (check_field_decls): Complain about non-static data
14747         members with same name as class in class with constructor.
14748
14749 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
14750
14751         * decl.c (grokdeclarator): Allow non-static data members with
14752         same name as class.
14753
14754 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
14755
14756         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
14757         and pending_inline.filename.  Update prototypes.
14758         * decl.c (define_label): Constify filename parameter.
14759         * decl2.c (warn_if_unknown_interface): Constify local char *.
14760         * input.c Constify input_source.filename. Don't declare
14761         input_filename or lineno.  Constify filename parameter to feed_input.
14762         * lex.c (init_parse): Constify parameter and return value.
14763         (cp_pragma_interface, cp_pragma_implementation): Constify
14764         filename argument.
14765         (reinit_parse_for_method, reinit_parse_for_block,
14766         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
14767         Constify local char *.
14768         * pt.c: Don't declare lineno or input_filename.
14769         (print_template_context, tsubst_friend_function, tsubst_decl,
14770         tsubst, instantiate_decl): Constify local char *.
14771         * semantics.c (expand_body): Constify local char *.
14772         * tree.c (build_srcloc): Constify filename parameter.
14773         * typeck.c (c_expand_asm_operands): Constify filename
14774         parameter.
14775
14776 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
14777
14778         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
14779         offsetof expansion.
14780
14781 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
14782
14783         * inc/cxxabi.h:  Fix typos in comment.
14784         (__base_class_info::__offset): Use a static_cast.
14785
14786 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
14787
14788         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
14789         of std::size_t and std::ptrdiff_t respectively.
14790         * tinfo.cc: Likewise.
14791         * vec.cc: Likewise.
14792
14793 2000-05-06  Richard Henderson  <rth@cygnus.com>
14794
14795         * typeck.c (build_c_cast): Don't warn integer->pointer size
14796         mismatch for constants.
14797
14798 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
14799
14800         * rtti.c (ptmd_initializer): Set non-public, if class is
14801         incomplete.
14802
14803         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
14804         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14805         __cxa_vec_delete): Likewise.
14806         * tinfo.cc (__dynamic_cast): Likewise.
14807         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14808         __cxa_vec_delete): Likewise.
14809
14810 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
14811
14812         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
14813         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
14814         (lang_decl_flags): Add vcall_offset.
14815         (THUNK_VCALL_OFFSET): Use it.
14816         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
14817         * method.c (make_thunk): Create the lang_decl here, not in
14818         emit_thunk.
14819         (emit_thunk): Make generic thunks into ordinary functions once
14820         they have been fed to expand_body.
14821         * semantics.c (expand_body): Set current_function_is_thunk here.
14822
14823 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14824
14825         * class.c (update_vtable_entry_for_fn): Prototype.
14826
14827         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
14828         and `tmpl'.
14829
14830         * search.c (dfs_build_inheritance_graph_order): Prototype.
14831
14832 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
14833
14834         * cp-tree.h (special_function_kind): Add various kinds of
14835         destructors.
14836         (special_function_p): New function.
14837         * class.c (overrides): Don't let one kind of destructor override
14838         another.
14839         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
14840         whether or not to instantiate a template.
14841         * tree.c (special_function_p): Define.
14842
14843 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
14844
14845         * cp-tree.def (THUNK_DECL): Remove.
14846         * cp-tree.h (DECL_THUNK_P): New macro.
14847         (DECL_NON_THUNK_FUNCTION_P): Likewise.
14848         (DECL_EXTERN_C_FUNCTION_P): Likewise.
14849         (SET_DECL_THUNK_P): Likewise.
14850         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
14851         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
14852         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
14853         * decl.c (decls_match): Use DECL_EXTERN_C_P.
14854         (duplicate_decls): Likewise.
14855         (pushdecl): Likewise.  Adjust thunk handling.
14856         (grokfndecl): Use DECL_EXTERN_C_P.
14857         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
14858         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
14859         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
14860         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
14861         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
14862         DECL_NO_STATIC_CHAIN.
14863         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
14864         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
14865         * search.c (covariant_return_p): Remove THUNK_DECL handling.
14866         * ir.texi: Update.
14867
14868 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
14869
14870         * tree.c (walk_tree): Set lineno.
14871
14872 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
14873
14874         * exception.cc: Update license notice.
14875         * new.cc: Likewise.
14876         * new1.cc: Likewise.
14877         * new2.cc: Likewise.
14878         * tinfo.cc: Likewise.
14879         * tinfo2.cc: Likewise.
14880         * vec.cc: Likewise.
14881         * inc/cxxabi.h: Likewise.
14882         * inc/exception: Likewise.
14883         * inc/new: Likewise.
14884         * inc/new.h: Likewise.
14885         * inc/typeinfo: Likewise.
14886
14887 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
14888
14889         * tree.c (build_target_expr_with_type): If we already have a
14890         TARGET_EXPR, just return it.
14891
14892         * optimize.c (initialize_inlined_parameters): Don't generate an
14893         EXPR_STMT if we can just use DECL_INITIAL.
14894         * decl.c (emit_local_var): Only make the initialization a
14895         full-expression if stmts_are_full_exprs_p.
14896
14897 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
14898
14899         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
14900         macro.
14901         * call.c (standard_conversion): Use it.
14902         (direct_reference_binding): Likewise.
14903         (build_over_call): Likewise.
14904         (is_properly_derived_from): Likewise.
14905         (compare_ics): Likewise.
14906         * class.c (resolves_to_fixed_type_p): Likewise.
14907         * optimize.c (declare_return_variable): Likewise.
14908         * pt.c (is_specialization_of): Likewise.
14909         (unify): Likewise.
14910         * typeck.c (comp_target_parms): Likeiwse.
14911         (build_static_cast): Likewise.
14912         (build_reinterpret_cast): Likewise.
14913         (build_const_cast): Likewise.
14914         (comp_ptr_ttypes_real): Likewise.
14915         (comp_ptr_ttypes_const): Likewise.
14916         * typeck2.c (process_init_constructor): Likewise.
14917
14918 2000-04-30  Scott Snyder <snyder@fnal.gov>
14919
14920         * decl.c (finish_destructor_body): Use the base destructor when
14921         destroying virtual bases.
14922
14923 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
14924
14925         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
14926         STMT_EXPRs.
14927         * optimize.c (struct inline_data): Add target_exprs field.
14928         (declare_return_variable): When a function returns an aggregate,
14929         use the variable declared in the TARGET_EXPR as the remapped
14930         DECL_RESULT.
14931         (expand_call_inline): Update the pending target_exprs stack.
14932         (optimize_function): Initialize the stack.
14933
14934         * decl2.c (finish_file): Fix typo in comment.
14935
14936         * method.c (emit_thunk): Don't try to return a `void' value.
14937
14938         * optimize.c (initialize_inlined_parameters): If the parameter is
14939         addressable, we need to make a new VAR_DECL, even if the
14940         initializer is constant.
14941
14942 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
14943
14944         * decl.c (grok_op_properties): Add an extra check of argtypes.
14945
14946 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
14947
14948         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
14949         variables.
14950         (initialize_inlined_parameters): Try to avoid creating new
14951         VAR_DECLs.
14952
14953 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
14954
14955         * lex.c (my_get_run_time): Remove.
14956         (init_filename_times): Use get_run_time instead of my_get_run_time.
14957         (check_newline): Likewise.
14958         (dump_time_statistics): Likewise.
14959         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
14960         of computing elapsed time explicitly.
14961
14962 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
14963
14964         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
14965         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
14966         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
14967         before calling decl_constant_value.
14968         * class.c (check_bitfield_decl): Likewise.
14969         * cvt.c (ocp_convert): Likewise.
14970         (convert): Likewise.
14971         * decl.c (compute_array_index_type): Likewise.
14972         (build_enumerator): Likewise.
14973         * decl2.c (check_cp_case_value): Likewise.
14974         * pt.c (convert_nontype_argument): Likewise.
14975         (tsubst): Likewise.
14976         * typeck.c (decay_conversion): Likewise.
14977         (build_compound_expr): Likewise.
14978         (build_reinterpret_cast): Likewise.
14979         (build_c_cast): Likewise.
14980         (convert_for_assignment): Likewise.
14981
14982 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
14983
14984         * decl.c (finish_function): Don't play games with DECL_INLINE.
14985
14986 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
14987
14988         * ir.texi: Correct typo.
14989
14990 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14991
14992         * decl.c (grokdeclarator): Reject VLAs as members.
14993
14994 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
14995
14996         * call.c (standard_conversion): Accept conversion between
14997         COMPLEX_TYPEs.
14998
14999         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
15000
15001 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
15002
15003         * decl2.c (finish_file): Remove double setup for accounting
15004         compile time.
15005
15006 2000-04-24  Robert Lipe <robertlipe@usa.net>
15007
15008         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
15009
15010 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
15011
15012         * new.cc (set_new_handler): Needs to be in std::.
15013
15014 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
15015
15016         * cp-tree.h (lang_decl): Remove pretty_function_p.
15017         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
15018         language-specific node.
15019         * decl.c (cp_make_fname_decl): Use build_decl, not
15020         build_lang_decl, to build the variables.
15021         (grokvardecl): Don't call build_lang_decl for local variables in
15022         templates.
15023         (grokdeclarator): Don't call build_lang_decl for local type
15024         declarations in templates.
15025         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
15026         zero'd memory, rather than calling memset.
15027         * pt.c: Include hashtab.h.
15028         (local_specializations): New variable.
15029         (retrieve_local_specialization): Use it.
15030         (register_local_specialization): Likewise.
15031         (tsubst_decl): Don't assume local variables have
15032         DECL_LANG_SPECIFIC.
15033         (instantiate_decl): Set up local_specializations.
15034         * Makefile.in (HTAB_H): New variable.
15035
15036 2000-04-23  Richard Henderson  <rth@cygnus.com>
15037
15038         * typeck.c (c_expand_asm_operands): Restore the original
15039         contents of the output list.
15040
15041 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
15042
15043         * ir.texi:  Document complex number representation.
15044
15045 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
15046
15047         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
15048         (target_incomplete_p): New function.
15049         (tinfo_base_init): Create comdat NTBS name variable.
15050         (ptr_initializer): Add non_public parameter. Calculate it.
15051         (ptmd_initializer): Likewise.
15052         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
15053         (create_real_tinfo_var): Add non_public parameter. Use it.
15054         Push proxy into global namespace.
15055         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
15056         New enumeration.
15057         * inc/typeinfo (type_info::before, type_info::operator==):
15058         Compare __name addresses.
15059
15060         * tinfo2.cc: Remove new-abi builtins comment.
15061
15062 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
15063
15064         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
15065
15066         * call.c (joust): Exit early if we get the same function, too.
15067
15068         * decl2.c (key_method): Return NULL_TREE for template classes.
15069         (import_export_class): Don't need to check for template classes.
15070
15071 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
15072
15073         * lex.c: Remove references to cccp.c.
15074
15075 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
15076
15077         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
15078         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
15079         (DECL_DESTRUCTOR_P): Use destructor_attr.
15080         (DECL_CONST_MEMFUNC_P): Reimplement.
15081         (DECL_VOLATILE_MEMFUNC_P): Remove.
15082         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
15083         (overrides): Use DECL_DESTRUCTOR_P.
15084         (check_for_override): Likewise.
15085         * decl.c (start_function): Likewise.
15086         * decl2.c (grokfclassfn): Likewise.
15087         (check_classfn): Likewise.
15088         (grok_function_init): Likewise.
15089
15090 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
15091
15092         * decl2.c (grokfield): Issue error on illegal data member
15093         declaration.
15094
15095 2000-04-17  Mark P Mitchell  <mark@codesourcery.com>
15096
15097         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
15098
15099 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
15100
15101         * class.c (build_vtable_entry): Don't build thunks for type-info
15102         functions.
15103
15104 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
15105
15106         * decl.c (decls_match): Allow a redeclaration of a builtin to
15107         specify args while the builtin did not.
15108
15109 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
15110
15111         * cp-tree.def (THUNK_DECL): Add to documentation.
15112         * cp-tree.h (flag_huge_objects): Declare.
15113         * class.c (modify_vtable_entry): Tidy.
15114         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
15115         Calculate delta appropriately for the new ABI.
15116         (dfs_modify_vtables): Use it.
15117         (modify_all_vtables): Fix thinko in code to add overriding copies
15118         of functions to primary vtables.
15119         (build_clone): Fix typo in comment.
15120         (clone_function_decl): Correct order of destructors in vtable.
15121         (build_vbase_offset_vtbl_entries): Adjust comment.
15122         (dfs_vcall_offset_queue_p): Remove.
15123         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
15124         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
15125         (build_vtable_entry): Correct check for pure virtual functions.
15126         Don't declare flag_huge_objects.
15127         * decl.c (flag_huge_objects): Remove declaration.
15128         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
15129         Use int_size_in_bytes.
15130         (emit_thunk): Handle vcall offset thunks.
15131
15132 2000-04-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15133
15134         * decl2.c (parse_time, varconst_time): Delete declarations.
15135         (finish_file): Delete LINENO declaration.
15136         START_TIME and THIS_TIME now long.
15137
15138 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
15139
15140         * class.c (build_base_field): Reformat comment.
15141
15142         * inc/cxxabi.h (stddef.h): Comment inclusion.
15143         (__base_class_info::__offset): Comment shift.
15144
15145 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
15146
15147         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
15148         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
15149         (cp_push_exception_identifier): New macro.
15150         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
15151         (DECL_BASE_DESTRUCTOR_P): Likewise.
15152         (DECL_DELETING_DESTRUCTOR_P): Likewise.
15153         (get_vtbl_decl_for_binfo): Fix formatting.
15154         (in_charge_arg_for_name): New macro.
15155         (maybe_build_cleanup_and_delete): Remove declaration.
15156         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
15157         (in_charge_arg_for_name): New function.
15158         (build_new_method_call): Use it.  Handle cloned destructors.
15159         (build_clone): Don't make the base constructor virtual.
15160         Automatically defer generated functions.
15161         (clone_function_decl): Handle destructors, too.
15162         (clone_constructors_and_destructors): Likewise.
15163         (create_vtable_ptr): Don't create a vtable entry for a cloned
15164         function.
15165         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
15166         (initialize_predefined_identifiers): Update appropriately.
15167         (finish_destructor_body): Simplify.
15168         (maybe_build_cleanup_and_delete): Remove.
15169         * except.c (expand_throw): Handle new-ABI destructors.
15170         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
15171         (build_dtor_call): New function.
15172         (build_delete): Use it.  Simplify.
15173         * optimize.c (maybe_clone_body): Handle destructors.
15174         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
15175
15176         * exception.cc (cleanup_fn): New typedef.
15177         (CALL_CLEANUP): New macro.
15178         (cp_eh_info): Use them.
15179         (__cp_push_exception): Likewise.
15180         (__cp_pop_exception): Likewise.
15181
15182 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
15183
15184         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
15185         (complete_dtor_identifier): New macro.
15186         (CLASSTYPE_FIRST_CONVERSION): Remove.
15187         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
15188         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
15189         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
15190         (CLASSTYPE_CONSTRUCTORS): Likewise.
15191         (CLASSTYPE_DESTRUCTORS): Likewise.
15192         (lang_decl): Add cloned_function.
15193         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
15194         (DECL_BASE_CONSTRUCTOR_P): Likewise.
15195         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
15196         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
15197         (DECL_CLONED_FUNCTION_P): Likewise.
15198         (DECL_CLONED_FUNCTION): Likewise.
15199         (clone_function_decl): Declare.
15200         (maybe_clone_body): Likewise.
15201         * call.c (build_user_type_conversion_1): Call complete object
15202         constructors in the new ABI.
15203         (build_new_method_call): Don't add in-charge parameters under the
15204         new ABI.
15205         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
15206         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
15207         CLASSTYPE_DESTRUCTOR_SLOT.
15208         (build_clone): New function.
15209         (clone_function_decl): Likewise.
15210         (clone_constructors_and_destructors): Likewise.
15211         (check_bases_and_members): Use it.
15212         * decl.c (iniitialize_predefined_identifiers): Initialize
15213         complete_dtor_identifier.
15214         (finish_function): Don't add extra code to a clone.
15215         (lang_mark_tree): Mark cloned_function.
15216         * decl2.c (mark_used): Don't bother trying to instantiate things
15217         we synthesized.
15218         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
15219         * method.c (set_mangled_name_for_decl): Don't treat clones as
15220         constructors.
15221         (synthesize_method): Sythesize cloned functions, not the clones.
15222         * optimize.c (inline_data): Update comment on ret_label.
15223         (remap_block): Don't assume DECL_INITIAL exists.
15224         (copy_body_r): Allow ret_label to be NULL.
15225         (maybe_clone_body): Define.
15226         * pt.c (tsubst_decl): Handle clones.
15227         (instantiate_clone): New function.
15228         (instantiate_template): Use it.
15229         (set_mangled_name_for_template_decl): Don't treat clones as
15230         constructors.
15231         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
15232         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
15233         * semantics.c (expand_body): Clone function bodies as necessary.
15234
15235         * optimize.c (remap_decl): Avoid sharing structure for arrays
15236         whose size is only known at run-time.
15237         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
15238
15239         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
15240         to has_in_charge_parm_p.
15241         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
15242         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
15243         (DECL_COPY_CONSTRUCTOR_P): New macro.
15244         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
15245         (build_user_type_conversion_1): Likewise.
15246         (convert_like_real): Likewise.
15247         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
15248         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
15249         (copy_args_p): Likewise.
15250         (grok_ctor_properties): Likewise.
15251         (start_function): Likewise.
15252         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
15253         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
15254         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
15255         * method.c (do_build_copy_constructor): Use
15256         DECL_HAS_IN_CHARGE_PARM_P.
15257         (synthesize_method): Likewise.
15258         * pt.c (instantiate_template): Remove goto.
15259         * tree.c (build_cplus_method_type): Remove mention of obstacks in
15260         comment.
15261
15262         * cp-tre.h (finish_function): Change prototype.
15263         * decl.c (end_cleanup_fn): Adjust caller.
15264         (finish_function): Take only one parameter.
15265         * decl2.c (finish_objects): Adjust caller.
15266         (finish_static_storage_duration_function): Likewise.
15267         * method.c (emit_thunk): Likewise.
15268         * parse.y: Likewise.
15269         * parse.c: Regenerated.
15270         * pt.c (instantiate_decl): Likewise.
15271         * rtti.c (synthesize_tinfo_fn): Likewise.
15272         * semantics.c (expand_body): Likewise.
15273
15274         * cp-tree.h (copy_decl): New function.
15275         * class.c (finish_struct_1): Use it.
15276         * lex.c (copy_decl): Define it.
15277         * pt.c (tsubst_decl): Likewise.
15278         * tree.c (copy_template_template_parm): Likewise.
15279
15280         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
15281         has_nonpublic_assign_ref.
15282         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
15283         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
15284         * class.c (finish_struct_methods): Don't set
15285         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
15286         (interface_only): Don't declare.
15287         (interface_unknown): Likewise.
15288
15289 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15290
15291         * tree.h (HAVE_TEMPLATES): Remove definition.
15292         * lang-options.h (-fthis-is-variable): Remove documentation.
15293
15294 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
15295
15296         * class.c (instantiate_type): Handle object-relative template-id.
15297
15298         * semantics.c (finish_expr_stmt): Call convert_to_void here.
15299         * decl.c (cplus_expand_expr_stmt): Not here.
15300
15301         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
15302         Initialize exprtype earlier.
15303
15304         * parse.y (fn.def1): Check for defining types in return types.
15305
15306         * decl.c (check_tag_decl): Notice extra fundamental types.
15307         Diagnose empty decls in classes, too.
15308
15309         * decl.c (grokdeclarator): Don't override an anonymous name if no
15310         declarator was given.
15311
15312         * cvt.c (convert_to_void): Call resolve_offset_ref.
15313
15314         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
15315
15316         * decl2.c (decl_namespace): Handle getting a type.
15317
15318         * typeck.c (build_c_cast): Re-enable warning for cast between
15319         pointer and integer of different size.
15320
15321 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
15322
15323         * inc/cxxabi.h (__pointer_type_info): Add restrict and
15324         incomplete flags.
15325         (__pointer_type_info::__pointer_catch): New virtual function.
15326         (__pointer_to_member_type_info): Derive from
15327         __pointer_type_info. Adjust.
15328         (__pointer_to_member_type_info::__do_catch): Remove.
15329         (__pointer_to_member_type_info::__is_pointer_p): Declare.
15330         (__pointer_to_member_type_info::__pointer_catch): Declare.
15331         * rtti.c (qualifier_flags): Add restrict flag.
15332         (ptmd_initializer): Reorder members.
15333         (create_tinfo_types): Expand comments. Reorder
15334         ptmd_desc_type_node members.
15335         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
15336         Implement.
15337         (__pointer_type_info::__do_catch): Move specific code into
15338         __pointer_catch. Call it.
15339         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
15340         specific catch checking. Fix void conversion check.
15341         (__pointer_to_member_type_info::__do_catch): Remove.
15342         (__pointer_to_member_type_info::__pointer_catch): Implement.
15343
15344 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15345
15346         * lex.c (init_parse): Remove traces of classof and headof.
15347         * decl2.c (flag_operator_names): Default to 1.
15348         (lang_decode_option): Do not set it for -ansi.
15349
15350 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
15351
15352         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
15353         (DECL_MAIN_VARIANT): Remove.
15354         * decl.c (duplicate_decls): Don't set it.
15355         (start_function): Likewise.
15356         (lang_mark_tree): Don't mark it.
15357         * decl2.c (defer_fn): Don't use it.
15358         * lex.c (retrofit_lang_decl): Don't set it.
15359         * pt.c (tsubst_decl): Likewise.
15360         * ptree.c (print_lang_decl): Don't print it.
15361         * typeck.c (mark_addressable): Don't use it.
15362
15363 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
15364
15365         * vec.cc: Include <new> and <exception>.
15366         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
15367         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
15368         terminate.
15369         (__cxa_vec_delete): Catch dtor exceptions.
15370
15371 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
15372
15373         Prepend __ to implementation defined names.
15374         * inc/typeinfo (type_info): Rename _name to __name.
15375         (type_info::type_info): Rename parameter.
15376         (type_info::operator==, type_info::operator!=,
15377         type_info::before): Likewise.
15378         (type_info::is_pointer_p, type_info::is_function_p,
15379         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
15380         parameters.
15381         * inc/cxxabi.h
15382         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
15383         (__pointer_type_info::__pointer_type_info): Likewise.
15384         (__pointer_type_info::is_pointer_p,
15385         __pointer_type_info::do_catch): Prepend __. Rename parameters.
15386         (__array_type_info::__array_type_info): Rename parameters.
15387         (__function_type_info::__function_type_info): Likewise.
15388         (__function_type_info::is_function_p): Prepend __.
15389         (__enum_type_info::__enum_type_info): Rename parameters.
15390         (__pointer_to_member_type_info::__pointer_to_member_type_info):
15391         Likewise.
15392         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
15393         parameters.
15394         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
15395         (__class_type_info::__class_type_info): Rename parameters.
15396         (__class_type_info::sub_kind): Prepend __. Adjust member names.
15397         (__class_type_info::upcast_result,
15398         __class_type_info::dyncast_result): Prepend __. Move definition
15399         into tinfo.cc.
15400         (__class_type_info::do_upcast, __class_type_info::do_catch,
15401         __class_type_info::find_public_src,
15402         __class_type_info::do_dyncast,
15403         __class_type_info::do_find_public_src): Prepend __. Rename
15404         parameters.
15405         (__si_class_type_info::__si_class_type_info): Rename parameters.
15406         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
15407         __si_class_type_info::do_find_public_src): Prepent __. Rename
15408         parameters.
15409         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
15410         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
15411         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
15412         parameters.
15413         (__dynamic_cast): Rename parameters.
15414         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
15415         type_info::do_catch, type_info::do_upcast): Prepend __.
15416         (contained_p, public_p, virtual_p, contained_public_p,
15417         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
15418         (__class_type_info::do_catch,
15419         __class_type_info::do_upcast): Prepend __. Adjust.
15420         (__class_type_info::__upcast_result,
15421         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
15422         Adjust.
15423         (__class_type_info::find_public_src): Prepend __. Adjust.
15424         (__class_type_info::do_find_public_src,
15425         __si_class_type_info::do_find_public_src,
15426         __vmi_class_type_info::do_find_public_src): Likewise.
15427         (__class_type_info::do_dyncast,
15428         __si_class_type_info::do_dyncast,
15429         __vmi_class_type_info::do_dyncast): Likewise.
15430         (__class_type_info::do_upcast,
15431         __si_class_type_info::do_upcast,
15432         __vmi_class_type_info::do_upcast): Likewise.
15433         (__dynamic_cast): Adjust.
15434         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
15435         (__function_type_info::is_function_p): Likewise.
15436         (__pointer_type_info::do_catch): Likewise. Adjust.
15437         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
15438         (__throw_type_match_rtti_2): Adjust.
15439         (__is_pointer): Adjust.
15440
15441 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
15442
15443         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
15444         (complete_ctor_identifier): New macro.
15445         (special_function_kind): Add sfk_copy_constructor and
15446         sfk_assignment_operator.
15447         (LOOKUP_HAS_IN_CHARGE): Remove.
15448         (cons_up_default_function): Rename to ...
15449         (implicitly_declare_fn): ... this.
15450         * call.c (build_new_method_call): Add in-charge parameters for
15451         constructors here.
15452         * class.c (add_implicitly_declared_members): Change parameter name
15453         from cant_have_assignment to cant_have_const_assignment.
15454         Replace calls to cons_up_default_function to implicitly_declare_fn.
15455         * cvt.c (ocp_convert): Use complete_ctor_identifier.
15456         * decl.c (initialize_predefined_identifiers): Initialize it.
15457         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
15458         complex expression.
15459         * init.c (expand_default_init): Don't calculate the in-charge
15460         parameter here.
15461         (build_new_1): Likewise.
15462         * lex.c (cons_up_default_function): Move to method.c.
15463         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
15464         (implicitly_declare_fn): New function.
15465         * typeck.c (build_static_cast): Use complete_ctor_identifier.
15466         (build_modify_expr): Likewise.
15467         * typeck2.c (build_functional_cast): Likewise.
15468
15469         Under the new ABI, constructors don't return `this'.
15470         * cp-tree.h (warn_reorder): Declare.
15471         (special_function_kind): New enum.
15472         (global_base_init_list): Remove declaration.
15473         (emit_base_init): Don't return a value.
15474         (check_base_init): Don't declare.
15475         (is_aggr_typedef): Likewise.
15476         * decl.c (check_special_function_return_type): New function.
15477         (return_types): Remove.
15478         (grokdeclarator): Use check_special_function_return_type.
15479         (start_function): Don't initialize ctor_label under the new ABI.
15480         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
15481         * init.c (begin_init_stmts): Move to top of file.
15482         (finish_init_stmts): Likewise.
15483         (warn_reorder): Don't declare.
15484         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
15485         value.
15486         (check_base_init): Remove.
15487         (is_aggr_typedef): Likewise.
15488         (build_new_1): Don't use the return value of a constructor.
15489         * semantics.c (setup_vtbl_ptr): Don't use the return value
15490         of emit_base_init.
15491         * typeck.c (check_return_expr): Don't magically convert return
15492         statements into `return this' in constructors under the new ABI.
15493
15494         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
15495         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
15496         (base_ctor_identifier): New macro.
15497         (base_dtor_identifier): Likewise.
15498         (deleting_dtor_identifier): Likewise.
15499         * decl.c: Don't include obstack.h.
15500         (obstack_chunk_alloc): Don't define.
15501         (obstack_chunk_free): Likewise.
15502         (struct predefined_identifier): New type.
15503         (initialize_predefined_identifiers): New function.
15504         (init_decl_processing): Use it.
15505         (debug_temp_inits): Remove.
15506         (start_method): Don't call preserve_data.
15507         (hack_incomplete_structures): Update comment.
15508         * init.c (init_init_processing): Don't initialize
15509         nelts_identifier.
15510         (build_offset_rf): Remove dead code.
15511         (build_delete): Use CLASSTYPE_N_BASECLASSES.
15512         * search.c (init_search_processing): Don't initialize
15513         vptr_identifier.
15514
15515 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15516
15517         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
15518         some sign_compare warnings.
15519
15520 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
15521
15522         Rename abi::__vmi_class_type_info members.
15523         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
15524         base_list, detail_masks members to vmi_flags, vmi_base_count,
15525         vmi_bases and vmi_flags_masks respectively.
15526         (__vmi_class_type_info::vmi_flags_masks): Rename
15527         details_unknown_mask to flags_unknown_mask.
15528         * tinfo.cc (__class_type_info::do_upcast): Adjust.
15529         (__vmi_class_type_info::do_find_public_src): Adjust.
15530         (__vmi_class_type_info::do_dyncast): Adjust.
15531         (__vmi_class_type_info::do_upcast): Adjust.
15532
15533 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
15534
15535         * tinfo.cc (convert_to_base): New function.
15536         (get_vbase_offset): Remove. Move into convert_to_base.
15537         (__vmi_class_type_info::do_find_public_src): Adjust.
15538         (__vmi_class_type_info::do_dyncast): Adjust.
15539         (__vmi_class_type_info::do_upcast): Adjust.
15540
15541 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
15542
15543         * tinfo.cc (operator=): Use __builtin_strcmp.
15544         * tinfo2.cc (before): Likewise.
15545
15546 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
15547
15548         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
15549         (DECL_SAVED_INLINE): Rename to ...
15550         (DECL_DEFERRED_FN): ... this.
15551         (in_function_p): Remove declaration.
15552         (mark_inline_for_output): Rename to ...
15553         (defer_fn): ... this.
15554         * decl.c (finish_function): Adjust call to mark_inline_for_output.
15555         (in_function_p): Remove definition.
15556         * decl2.c (saved_inlines): Rename to ...
15557         (deferred_fns): ... this.
15558         (saved_inlines_used): Rename to ...
15559         (deferred_fns_used): ... this.
15560         (mark_inline_for_output): Rename to ...
15561         (defer_fn): ... this.
15562         (finish_file): Adjust accordingly.
15563         (init_decl2): Likewise.
15564         * lex.c (cons_up_default_function): Likewise.
15565         * pt.c (mark_decl_instantiated): Likewise.
15566         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
15567         circumstances.
15568         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
15569         * semantics.c (expand_body): Defer more functions.
15570
15571 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
15572
15573         * vec.cc: New file.
15574         * Make-lang.in (CXX_LIB2FUNCS): Add it.
15575         (vec.o): Build it.
15576         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
15577         __cxa_vec_delete): Declare.
15578
15579 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
15580
15581         * rtti.c (dfs_class_hint_mark): New static function.
15582         (dfs_class_hint_unmark): New static function.
15583         (class_hint_flags): Use them.
15584
15585 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
15586
15587         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
15588
15589 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
15590
15591         * cp-tree.h (instantiate_decl): Change prototype.
15592         * decl2.c (mark_used): Adjust call.
15593         * optimize.c (inlinable_function_p): Adjust handling of templates.
15594         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
15595         (do_type_instantiation): Likewise.
15596         (instantiate_decl): Defer more templates.
15597         (instantiate_pending_templates): Adjust logic to handle inline
15598         friend functions.
15599
15600         * Makefile.in (GGC_H): New variable.  Use it throughout in place
15601         of ggc.h.
15602
15603         * call.c: Don't include obstack.h.  Include ggc.h.
15604         (obstack_chunk_alloc): Don't define.
15605         (obstack_chunk_free): Likewise.
15606         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
15607         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
15608         (pop_switch): Free it.
15609
15610         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
15611
15612         * dump.c (dequeue_and_dump): Don't try to print the bit_position
15613         if we don't have a DECL_FIELD_OFFSET.
15614
15615 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
15616
15617         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
15618         special_function_p.
15619
15620 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15621
15622         * cfns.gperf (hash, libc_name_p): Prototype.
15623
15624         * rtti.c (build_dynamic_cast_1): Constification.
15625
15626         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
15627
15628         * semantics.c (deferred_type_access_control): Prototype.
15629
15630 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
15631
15632         Correct many new ABI issues regarding vbase and vcall offset
15633         layout.
15634         * cp-tree.h (BINFO_VTABLE): Document.
15635         (struct lang_type): Tweak formatting.
15636         (BINFO_PRIMARY_BINFO): Add to documentation.
15637         (CLASSTYPE_VSIZE): Fix typo in comment.
15638         (CLASSTYPE_VBASECLASSES): Update documentation.
15639         (BINFO_VBASE_MARKED): Remove.
15640         (SET_BINFO_VBASE_MARKED): Likewise.
15641         (CLEAR_BINFO_VBASE_MARKED): Likewise.
15642         (BINFO_FIELDS_MARKED): Remove.
15643         (SET_BINFO_FIELDS_MARKED): Likewise.
15644         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
15645         (enum access_kind): New enumeration.
15646         (num_extra_vtbl_entries): Remove declaration.
15647         (size_extra_vtbl_entries): Likewise.
15648         (get_vtbl_decl_for_binfo): New function.
15649         (dfs_vbase_unmark): Remove declaration.
15650         (mark_primary_bases): Likewise.
15651         * class.c (SAME_FN): Remove.
15652         (struct vcall_offset_data_s): Move definition.
15653         (build_vbase_pointer): Use `build', not `build_binary_op', to
15654         access the vbase pointer under the new ABI.
15655         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
15656         (build_primary_vtable): Likewise.
15657         (dfs_mark_primary_bases): Move here from search.c.
15658         (mark_primary_bases): Likewise.
15659         (determine_primary_bases): Under the new ABI, don't make a base
15660         class a primary base just because we don't yet have any virtual
15661         functions.
15662         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
15663         (num_vfun_entries): Remove.
15664         (dfs_count_virtuals): Likewise.
15665         (num_extra_vtbl_entries): Likewise.
15666         (size_extra_vtbl_entries): Likewise.
15667         (layout_virtual_bases): Iterate in inheritance graph order under
15668         the new ABI.
15669         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
15670         indicate that a vfield is present.
15671         (init_class_processing): Initialize access_public_node, etc., from
15672         ak_public, etc.
15673         (get_vtbl_decl_for_binfo): New function.
15674         (dump_class_hierarchy_r): Likewise.
15675         (dump_class_hierarchy): Use it.
15676         (finish_vtbls): Build the vtbls in inheritance graph order.
15677         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
15678         (initialize_vtable): Use get_vtbl_decl_for_binfo.
15679         (accumulate_vtbl_inits): Add comments explaining why a pre-order
15680         walk is required.
15681         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
15682         where the vptr points, even for primary vtables.
15683         (build_vtbl_initializer): Adjust handling of vbase and vcall
15684         offsets.
15685         (build_vcall_and_vbase_vtable_entries): New function.
15686         (dfs_build_vbase_offset_vtbl_entries): Remove.
15687         (build_vbase_offset_vtbl_entries): Reimplement.
15688         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
15689         were already handled in a primary base class vtable.
15690         (build_vcall_offset_vtbl_entries): Adjust.
15691         (build_rtti_vtbl_entries): Adjust.
15692         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
15693         * init.c (expand_virtual_init): Simplify.
15694         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
15695         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
15696         * search.c (BINFO_ACCESS): New macro.
15697         (SET_BINFO_ACCESS): Likewise.
15698         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
15699         (access_in_type): Likewise.
15700         (dfs_accessible_p): Likewise.
15701         (protected_accessible_p): Likewise.
15702         (lookup_fnfields_1): Adjust documentation.
15703         (dfs_mark_primary_bases): Move to class.c
15704         (mark_primary_bases): Likewise.
15705         (dfs_vbase_unmark): Remove.
15706         (virtual_context): Use BINFO_FOR_VBASE.
15707         (dfs_get_vbase_types): Simplify.
15708         (dfs_build_inheritance_graph_order): New function.
15709         (get_vbase_types): Use it.
15710         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
15711
15712         * tinfo.cc (get_vbase_offset): New function.
15713         (__vmi_class_type_info::do_find_public_src): Use it.
15714         (__vmi_class_type_info::do_dyncast): Likewise.
15715         (__vmi_class_type_info::do_upcast): Likewise.
15716
15717 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
15718
15719         * lang-specs.h: Pass -fno-show-column to the preprocessor.
15720
15721 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
15722
15723         * rtti.c (class_hint_flags): Rename flags.
15724         (class_initializer): Remove flags.
15725         (synthesize_tinfo_var): Combine offset and flags. Add flags
15726         for __vmi_class_type_info.
15727         (create_tinfo_types): Remove flags from __class_type_info and
15728         __si_class_type_info. Merge flags and offset from
15729         base_class_type_info.
15730         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
15731         (__base_class_info::is_virtual_p): Adjust.
15732         (__base_class_info::is_public_p): Adjust.
15733         (__base_class_info::offset): New accessor.
15734         (__class_type_info::details): Remove member.
15735         (__class_type_info::__class_type_info): Lose details.
15736         (__class_type_info::detail_masks): Remove.
15737         (__si_class_type_info::__si_class_type_info): Lose details.
15738         (__vmi_class_type_info::details): New member.
15739         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
15740         (__vmi_class_type_info::detail_masks): New member.
15741         * tinfo.cc (__class_type_info::do_upcast): Initialize result
15742         with unknown_details_mask.
15743         (__vmi_class_type_info::do_find_public_src): Adjust
15744         (__vmi_class_type_info::do_dyncast): Adjust.
15745         (__vmi_class_type_info::do_upcast): Set result details, if
15746         needed. Adjust.
15747         (__dynamic_cast): Temporarily #if out optimization.
15748
15749 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
15750
15751         * rtti.c (get_tinfo_decl): Mark used.
15752         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
15753         mark as dealt with, if we output it.
15754
15755 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
15756
15757         * class.c: Reorganize to put virtual function table initialization
15758         machinery at the end of the file.
15759
15760 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
15761
15762         * class.c (finish_struct): Use bitsize_zero_node.
15763         * pt.c (instantiate_class_template): Likewise.
15764
15765 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
15766
15767         Put RTTI entries at negative offsets in new ABI.
15768         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
15769         vbase offset at index -3, not -1.
15770         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
15771         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
15772         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
15773         (build_rtti_vtbl_entries): New function.
15774         (set_rtti_entry): Remove.
15775         (build_primary_vtable): Don't use it.
15776         (build_secondary_vtable): Likewise.
15777         (start_vtable): Remove.
15778         (first_vfun_index): New function.
15779         (set_vindex): Likewise.
15780         (add_virtual_function): Don't call start_vtable.  Do call
15781         set_vindex.
15782         (set_primary_base): Rename parameter.
15783         (determine_primary_base): Likewise.
15784         (num_vfun_entries): Don't use skip_rtti_stuff.
15785         (num_extra_vtbl_entries): Include RTTI information.
15786         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
15787         (skip_rtti_stuff): Remove.
15788         (dfs_modify_vtables): Don't use it.
15789         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
15790         (layout_nonempty_base_or_field): Update size handling.
15791         (create_vtable_ptr): Tweak.
15792         (layout_class_type): Adjust parameter names.
15793         (finish_struct_1): Simplify.
15794         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
15795         (skip_rtti_stuff): Remove.
15796         (first_vfun_index): New function.
15797         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
15798         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
15799         (marked_vtable_pathp): Declare.
15800         (unmarked_vtable_pathp): Likewise.
15801         * error.c (dump_expr): Use first_vfun_index to calculate vtable
15802         offsets.
15803         * rtti.c (build_headof): Look for RTTI at negative offsets.
15804         (get_tinfo_decl_dynamic): Likewise.
15805         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
15806         here.
15807         (create_pseudo_type_info): Do it here instead.  Adjust so that
15808         vptr points at first virtual function.
15809         * search.c (marked_vtable_pathp): Make it global.
15810         (unmarked_vtable_pathp): Likewise.
15811         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
15812         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
15813         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
15814         (get_pure_virtuals): Likewise.
15815         (expand_upcast_fixups): Likewise.
15816         * tree.c (debug_binfo): Likewise.
15817         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
15818         negative offset.
15819
15820 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15821
15822         * class.c (check_field_decl): Fix typo.
15823         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
15824         (check_methods): Likewise.
15825         (check_field_decls): Likewise.
15826         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
15827         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
15828         Use DECL_RESULT_FLD, not DECL_RESULT.
15829         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
15830         * lex.c (identifier_type): Likewise.
15831         * pt.c (determine_specialization, lookup_template_class): Likewise.
15832         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
15833         (resolve_overloaded_unification, more_specialized): Likewise.
15834         * semantics.c (finish_member_declaration): Likewise.
15835         * typeck.c (build_x_function_call): Likewise.
15836
15837 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
15838
15839         * class.c (layout_empty_base): Handle empty bases with non-byte
15840         alignment.
15841         (build_base_field): Likewise.
15842         (layout_virtual_bases): Likewise.
15843
15844         * class.c (finish_struct_1): Fix typo in this change:
15845
15846         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15847
15848 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
15849
15850         * decl.c (grokdeclarator): Count partial specializations when
15851         keeping track of how many template classes have been seen.
15852
15853         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
15854
15855 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15856
15857         * class.c (build_vbase_pointer_fields): layout_field now place_field.
15858         (get_vfield_offset): Use byte_position.
15859         (set_rtti_entry): Set OFFSET to ssizetype zero.
15860         (get_binfo_offset_as_int): Deleted.
15861         (dfs_record_base_offsets): Use tree_low_cst.
15862         (dfs_search_base_offsets): Likewise.
15863         (layout_nonempty_base_or_field): Reflect changes in RLI format
15864         and call byte_position.
15865         (layout_empty_base): Convert offset to ssizetype.
15866         (build_base_field): use rli_size_unit_so_far.
15867         (dfs_propagate_binfo_offsets): Do computation in proper type.
15868         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
15869         (layout_class_type): Reflect changes in RLI names and fields.
15870         (finish_struct_1): Set DECL_FIELD_OFFSET.
15871         * dump.c (dequeue_and_dump): Call bit_position.
15872         * expr.c (cplus_expand_constant): Use byte_position.
15873         * rtti.c (expand_class_desc): Use bitsize_one_node.
15874         * typeck.c (build_component_addr): Use byte_position and don't
15875         special case for zero offset.
15876
15877 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
15878
15879         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
15880
15881         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
15882         tinfo object.
15883         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
15884         vtable.
15885
15886 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15887
15888         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
15889         DECL_P macros.
15890         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
15891         make_typename_type, check_initializer, cp_finish_decl,
15892         xref_tag): Likewise.
15893         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
15894         decl_namespace, arg_assoc_template_arg, arg_assoc,
15895         validate_nonmember_using_decl, do_class_using_decl): Likewise.
15896         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
15897         args_to_string): Likewise.
15898         * friend.c (is_friend): Likewise.
15899         * lex.c (note_got_semicolon, note_list_got_semicolon,
15900         is_global): Likewise.
15901         * method.c (build_overload_nested_name, build_overload_value,
15902         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
15903         * parse.y (typename_sub, typename_sub1): Likewise.
15904         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
15905         process_partial_specialization, convert_template_argument,
15906         template_args_equal, add_pending_template, lookup_template_class,
15907         for_each_template_parm_r, maybe_fold_nontype_arg,
15908         tsubst, instantiate_template, type_unification_real, unify,
15909         instantiate_pending_templates, set_mangled_name_for_template_decl):
15910         Likewise.
15911         * repo.c (repo_get_id, repo_template_used): Likewise.
15912         * search.c (lookup_field_1): Likewise.
15913         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
15914         * xref.c (classname): Likewise.
15915
15916 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
15917
15918         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
15919         (CANONICAL_BINFO): New macro.
15920         (BINFO_NEW_VTABLE_MARKED): Use it.
15921         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
15922         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
15923         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
15924         not TREE_TYPE.
15925         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15926         (build_secondary_vtable): Likewise.
15927         (dfs_finish_vtbls): Likewise.
15928         (dfs_accumulate_vtbl_inits): Likewise.
15929         (accumulate_vtbl_inits): New function.
15930         (finish_vtbls): Make sure that virtual bases come after
15931         non-virtual bases in the vtable group.
15932         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
15933         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15934         * search.c (struct vbase_info): Move definition.
15935         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15936         (unmarked_new_vtable_p): Likewise.
15937         (dfs_mark_vtable_path): Remove.
15938         (dfs_mark_new_vtable): Remove.
15939         (dfs_unmark_new_vtable): Likewise.
15940         (dfs_clear_search_slot): Likewise.
15941         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
15942         (dfs_clear_vbase_slots): Likewise.
15943         (init_vbase_pointers): LIkewise.
15944
15945 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
15946
15947         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
15948         SIZETYPE to a non-SIZETYPE.
15949
15950 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
15951
15952         * class.c (layout_virtual_bases): Adjust names in conditionally
15953         compiled code.
15954
15955         * class.c (record_base_offsets): New function.
15956         (layout_conflict_p): Likewise.
15957         (layout_nonempty_base_or_field): Use it.
15958         (layout_empty_base): New function.
15959         (build_base_field): Use it.
15960         (build_base_fields): Update comment.
15961         (layout_virtual_bases): Fold in a little code form
15962         layout_basetypes.  Use layout_empty_base.
15963         (layout_basetypes): Remove.
15964         (end_of_class): New function.
15965         (layout_class_type): Use it.  Adjust.
15966
15967         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
15968         (fntype_p): Remove.
15969         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
15970         comment.
15971         (dfs_skip_nonprimary_vbases_markedp): Likewise.
15972         * typeck.c (fntype_p): Remove.
15973
15974         * cp-tree.h (TI_SPEC_INFO): Remove.
15975         (CLASSTYPE_TI_SPEC_INFO): Likewise.
15976         * pt.c (process_partial_specialization): Likewise.
15977
15978         * class.c (build_base_field): Fix thinko in computation of binfo
15979         offsets.
15980
15981         * tree.c (mark_local_for_remap_p): Mark variables declared in
15982         TARGET_EXPRs as well.
15983
15984 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
15985
15986         * typeck.c (require_complete_type, complete_type,
15987         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
15988         build_array_ref, convert_arguments, pointer_diff,
15989         build_x_unary_op, build_unary_op, build_c_cast,
15990         build_modify_expr): Use COMPLETE_TYPE_P etc.
15991         * call.c (is_complete, convert_like_real,
15992         build_new_method_call): Likewise.
15993         * class.c (build_vbase_pointer_fields, check_bases,
15994         build_base_field, finish_struct_1, pushclass): Likewise.
15995         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
15996         * decl.c (maybe_process_template_type_declaration, pushtag,
15997         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
15998         layout_var_decl, check_initializer, cp_finish_decl,
15999         grokdeclarator, require_complete_types_for_parms,
16000         grok_op_properties, xref_tag, xref_basetypes,
16001         check_function_type): Likewise.
16002         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
16003         * friend.c (do_friend): Likewise.
16004         * init.c (build_offset_ref): Likewise.
16005         * parse.y (structsp): Likewise.
16006         * pt.c (maybe_process_partial_specialization,
16007         tsubst_friend_function, instantiate_class_template, tsubst,
16008         do_type_instantiation, instantiate_pending_templates): Likewise.
16009         * repo.c (repo_get_id): Likewise.
16010         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
16011         synthesize_tinfo_var, emit_support_tinfos): Likewise.
16012         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
16013         * semantics.c (begin_class_definition): Likewise.
16014         * tree.c (build_cplus_method_type): Likewise.
16015         * typeck2.c (digest_init, build_functional_cast,
16016         add_exception_specifier): Likewise.
16017         * parse.h, parse.c: Regenerated.
16018
16019 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
16020
16021         * inc/cxxabi.h: New header file. Define new-abi entry points.
16022         (__pointer_type_info::target): Rename member to ...
16023         (__pointer_type_info::type): ... here.
16024         (__base_class_info::type): Rename member to ...
16025         (__base_class_info::base): ... here.
16026         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
16027         * cp-tree.h (CPTI_ABI): New global tree enumeration.
16028         (abi_node): New global tree node.
16029         * decl.c (abi_node): Document.
16030         (init_decl_processing): Initialize abi_node.
16031         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
16032         (get_vmi_pseudo_type_info): Likewise.
16033         (create_tinfo_types): Likewise.
16034         (emit_support_tinfos): Likewise.
16035         * tinfo.h (cxxabi.h): Include for new-abi.
16036         Move rtti class definitions to new header file.
16037         * tinfo.cc (abi): Use the namespace.
16038         (std): Move new abi rtti classes from here ...
16039         (__cxxabiv1): ... to here.
16040         * tinfo2.cc (cxxabi.h): Include for new-abi.
16041         Move rtti class definitions to new header file.
16042         (std): Move new abi rtti classes from here ...
16043         (__cxxabiv1): ... to here.
16044         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
16045         namespace.
16046
16047 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
16048             Jason Merrill  <jason@casey.cygnus.com>
16049
16050         * method.c (build_overload_int): Use host_integerp.
16051
16052 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16053
16054         * init.c (build_offset_ref): Handle the case of a templated member
16055         function.
16056
16057 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16058
16059         * except.c (expand_exception_blocks): Clear catch_clauses_last.
16060
16061 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
16062
16063         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
16064         * class.c (check_bitfield_decl): Turn illegal bitfields into
16065         non-bitfields.
16066         (dfs_propagate_binfo_offsets): Adjust for new size_binop
16067         semantics.
16068         (dfs_offset_for_unshared_vbases): Likewise.
16069         * cvt.c (cp_convert_to_pointer): Convert NULL to a
16070         pointer-to-member correctly under the new ABI.
16071         * expr.c (cplus_expand_constant): Don't use cp_convert when
16072         turning an offset into a pointer-to-member.
16073         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
16074         when dereferencing them under the new ABI.
16075         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
16076         of pointers-to-members under the new ABI.
16077
16078         * class.c (check_bitfield_decl): Remove restriction on really long
16079         bitfields.
16080         (layout_class_type): Implement new ABI handling of bitfields
16081         longer than their types.
16082
16083 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16084
16085         * parse.y (extdefs): Call ggc_collect.
16086         * parse.c: Regenerated.
16087
16088 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
16089
16090         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
16091         (note_name_declared_in_class): Use OVL_CURRENT to get at a
16092         potential overload.
16093
16094 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16095
16096         * class.c (build_vbase_path): Use integer_zerop.
16097         (build_vtable_entry): Use tree_low_cst.
16098         (get_vfield_offset): Use bit_position.
16099         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
16100         Use tree_low_cst.
16101         (check_bitfield_decl): Set DECL_SIZE using convert.
16102         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
16103         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
16104         Use tree_low_cst.
16105         (finish_struct_1): Use bit_position.
16106         (dump_class_hierarchy): Use tree_low_cst.
16107         * cp-tree.h (min_precision): Add declaration.
16108         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
16109         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
16110         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
16111         * expr.c (cplus_expand_constant): Use bit_position.
16112         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
16113         * rtti.c (get_base_offset): Use bit_position.
16114         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
16115         host_integerp, and tree_low_cst.
16116         (pointer_int_sum): Use integer_zerop.
16117         (build_component_addr): Use bit_position.
16118
16119 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
16120
16121         * typeck.c (require_complete_type): Don't assume size_zero_node.
16122         (complete_type_or_else): Likewise.
16123
16124 2000-03-16  Steven Grady <grady@digitaldeck.com>
16125             Jason Merrill  <jason@casey.cygnus.com>
16126
16127         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
16128
16129 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
16130
16131         * decl2.c (grokfield): Bail out if type is error_mark_node.
16132
16133 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
16134
16135         * tinfo2.cc (__ptr_to_member_data): Rename to ...
16136         (__pointer_to_member_data): ... here. Adjust.
16137         * rtti.c (create_tinfo_types): Adjust.
16138
16139 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
16140
16141         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
16142         * decl.c (ref_desc_type_node): Undocument.
16143         * rtti.c (ptr_ref_initializer): Rename to ...
16144         (ptr_initializer): ... here. Adjust comments.
16145         (ptmd_initializer): Fix comment thinko.
16146         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
16147         (create_tinfo_types): Remove ref_desc_type_node init.
16148         * tinfo2.cc (__reference_type_info): Remove.
16149
16150 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
16151
16152         * decl.c (cp_finish_decl): Remove obsolete comment.
16153
16154         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
16155
16156 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
16157
16158         * cp-tree.h: Tweak documentation.
16159         * class.c (build_vbase_pointer_fields): Layout the fields, too.
16160         (avoid_overlap): Remove.
16161         (get_binfo_offset_as_int): New function.
16162         (dfs_serach_base_offsets): Likewise.
16163         (layout_nonempty_base_or_field): Likewise.
16164         (build_base_field): Layout fields here.  Avoid placing two objects
16165         of the same type at the same address, under the new ABI.
16166         (build_base_fields): Adjust accordingly.
16167         (create_vtable_ptr): Return the new field, but don't attach it to
16168         TYPE_FIELDS.
16169         (remove_base_field): Remove.
16170         (remove_base_fields): Remove.
16171         (layout_basetypes): Adjust accordingly.
16172         (layout_class_type): Call layout_field for each field, rather than
16173         just making a wholesale call to layout_type.
16174
16175 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
16176
16177         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
16178
16179 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
16180
16181         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
16182
16183         * except.c (dtor_nothrow): New fn.
16184         (do_pop_exception): Use it.  Take type parm.
16185         (push_eh_cleanup): Take type parm.
16186         (expand_start_catch_block): Pass it.
16187         (build_eh_type_type_ref): Accept null type.
16188
16189 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
16190
16191         * cp-tree.h (revert_static_member_fn): Change prototype.
16192         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
16193         (grok_op_properties): Likewise.
16194         (start_function): Likewise.
16195         (revert_static_member_fn): Simplify.
16196         * pt.c (check_explicit_specialization): Adjust call to
16197         revert_static_member_fn.
16198
16199 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
16200
16201         * cp-tree.h (scope_kind): New type.
16202         (tmpl_spec_kind): Likewise.
16203         (declare_pseudo_global_level): Remove.
16204         (pseudo_global_level_p): Rename to template_parm_scope_p.
16205         (pushlevel): Remove declaration.
16206         (begin_scope): New function.
16207         (finish_scope): Likewise.
16208         (current_tmpl_spec_kind): Likewise.
16209         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
16210         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
16211         Add template_spec_p.
16212         (toplevel_bindings_p): Adjust.
16213         (declare_pseudo_global_level): Remove.
16214         (pseudo_global_level_p): Rename to template_parm_scope_p.
16215         (current_tmpl_spec_kind): New function.
16216         (begin_scope): Likewise.
16217         (finish_scope): Likewise.
16218         (maybe_push_to_top_level): Adjust.
16219         (maybe_process_template_type_declaration): Likewise.
16220         (pushtag): Likewise.
16221         (pushdecl_nonclass_level): Likewise.
16222         (lookup_tag): Likewise.
16223         (grokfndecl): Handle member template specializations.  Share
16224         constructor and non-constructor code.
16225         * decl2.c (check_classfn): Handle member template specializations.
16226         * pt.c (begin_template_parm_list): Use begin_scope.
16227         (begin_specialization): Likewise.
16228         (end_specialization): Likewise.
16229         (check_explicit_specialization): Use current_tmpl_spec_kind.
16230         Handle member template specializations.
16231         (end_template_decl): Use finish_scope.  Remove call to
16232         get_pending_sizes.
16233         (push_template_decl_real): Remove bogus error message.
16234         (tsubst_decl): Fix typo in code contained in comment.
16235         (instantiate_template): Handle member template specializations.
16236         (most_general_template): Likewise.
16237
16238 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
16239
16240         * lex.c (whitespace_cr): Compress consecutive calls to warning().
16241         (do_identifier): Ditto for error().
16242
16243         * pt.c (convert_nontype_argument): Ditto for cp_error().
16244         (convert_template_argument): Ditto for cp_pedwarn().
16245
16246 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
16247
16248         * exception.cc (__check_null_eh_spec): New fn.
16249         * except.c (expand_end_eh_spec): Call it if the spec is throw().
16250
16251 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
16252
16253         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
16254         * except.c (expand_end_eh_spec): Add the return type.
16255         * rtti.c (throw_bad_cast): Add the parmtypes.
16256         (throw_bad_typeid): Likewise.
16257
16258         * semantics.c (expand_stmt): Only leave out rtl for unused
16259         artificials, and set DECL_IGNORED_P on them as well.
16260         * decl.c (wrapup_globals_for_namespace): Likewise.
16261
16262 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
16263
16264         * decl.c (maybe_commonize_var): Skip all artificial decls.
16265         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
16266
16267 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
16268
16269         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
16270         * cp-tree.h: Declare flag_enforce_eh_specs.
16271         * decl.c (store_parm_decls, finish_function): Check it.
16272
16273         C library functions don't throw.
16274         * Makefile.in (cfns.h): New target.
16275         (except.o): Depend on it.
16276         * Make-lang.in (cc1plus): Depend on cfns.gperf.
16277         * cfns.gperf: New file.
16278         * cfns.h: Generated.
16279         * except.c: Include it.
16280         (nothrow_libfn_p): New fn.
16281         * decl.c (grokfndecl): Use it.
16282         * cp-tree.h: Declare it.
16283
16284         * decl.c (push_overloaded_decl_1, auto_function,
16285         define_function): Lose.
16286         (build_library_fn_1): New static fn.
16287         (builtin_function): Use it.
16288         (get_atexit_node): Use build_library_fn_ptr.
16289         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
16290         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
16291         push_void_library_fn, push_throw_library_fn): New fns.
16292         * cp-tree.h: Declare them.
16293         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
16294         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
16295         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
16296         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
16297         * rtti.c (build_runtime_decl): Lose.
16298         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
16299         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
16300         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
16301
16302         * call.c (build_call): Remove result_type parm.
16303         Call mark_used on unused artificial fns.
16304         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
16305
16306 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
16307
16308         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
16309         appropriate.
16310         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
16311         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
16312         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
16313         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
16314         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
16315         expand_generic_desc): Likewise.
16316
16317 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16318
16319         * exception.cc (__cp_pop_exception): Cleanup the original object.
16320
16321 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16322
16323         * decl.c (grok_op_properties): Merge conversion to void warning
16324         with other silly op warnings.
16325
16326 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
16327
16328         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
16329         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
16330
16331 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16332
16333         * decl.c (cp_make_fname_decl): New function.
16334         (wrapup_globals_for_namespace): Don't emit unused static vars.
16335         (init_decl_processing): Remove comment about use of
16336         array_domain_type. Set make_fname_decl.
16337         (cp_finish_decl): Remove __FUNCTION__ nadgering.
16338         * semantics.c (begin_compound_stmt): Remove
16339         current_function_name_declared flagging.
16340         (expand_stmt): Don't emit unused local statics.
16341         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
16342         specially.
16343
16344 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16345
16346         * typeck.c (convert_for_assignment): Don't look at array
16347         initializer.
16348         * call.c (convert_like_real): Likewise.
16349
16350 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
16351
16352         Add initial support for '\uNNNN' specifier.
16353         * lex.c (read_ucs): New fn.
16354         (readescape, skip_white_space): Call it.
16355         (is_extended_char, is_extended_char_1): New fns.
16356         (utf8_extend_token): New fn, #if 0'd out.
16357         (real_yylex): Treat extended chars like letters.
16358
16359         * search.c (note_debug_info_needed): Walk the bases even if we
16360         weren't deferring the type itself.
16361
16362 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16363
16364         * decl2.c (finish_objects): Constify a char*.
16365
16366         * method.c (emit_thunk): Likewise.
16367
16368 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
16369
16370         * typeck.c (dubious_conversion_warnings): Look through
16371         REFERENCE_TYPE.
16372
16373 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16374
16375         * class.c (dfs_modify_vtables): I is now unsigned.
16376         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
16377         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
16378         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
16379         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
16380         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
16381         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
16382         Call integer_all_onesp.
16383         * typeck2.c (process_init_constructor): Use compare_tree_int.
16384
16385         * lang-specs.h (as): Don't call if -syntax-only.
16386
16387 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
16388
16389         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
16390         RTL_EXPR_HAS_NO_SCOPE after all.
16391
16392 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
16393
16394         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
16395         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
16396         RTL_EXPR_HAS_NO_SCOPE.
16397
16398         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
16399         later.
16400
16401         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
16402
16403 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
16404
16405         * call.c (convert_like): Macrofy.
16406         (convert_like_with_context): New macro.
16407         (convert_like_real): Renamed from convert_like.  Add calling
16408         context parameters, for diagnostics. Add recursive flag.  Call
16409         dubious_conversion_warnings for outer conversion.
16410         (build_user_type_conversion): Use convert_like_with_context.
16411         (build_over_call): Likewise. Don't warn about dubious
16412         conversions here. Adjust convert_default_arg calls.
16413         (convert_default_arg): Add context parameters for diagnostics.
16414         Pass through to convert_like_with_context.
16415         * cp-tree.h (convert_default_arg): Add context parameters.
16416         (dubious_conversion_warnings): Prototype new function.
16417         * typeck.c (convert_arguments): Adjust convert_default_arg call.
16418         (dubious_conversion_warnings): New function, broken
16419         out of convert_for_assignment.
16420         (convert_for_assignment): Adjust.
16421
16422 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
16423
16424         * decl2.c (key_method): Break out from...
16425         (import_export_vtable, import_export_class): ...here.
16426
16427         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
16428         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
16429
16430         * search.c (note_debug_info_needed, dfs_debug_mark,
16431         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
16432         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
16433
16434 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
16435
16436         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
16437         typos.
16438
16439 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
16440
16441         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
16442         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
16443         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
16444         (lang_type): Split gets_new into has_new and has_array_new.
16445         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16446         (TYPE_GETS_NEW): Split into ...
16447         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
16448         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
16449         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
16450         (build_op_new_call): Don't declare.
16451         (build_new_1): Likewise.
16452         * call.c (build_op_new_call): Remove.
16453         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
16454         instead of TYPE_NEEDS_DESTRUCTOR.
16455         (finish_struct_bits): Likewise.
16456         (add_implicitly_declared_members): Likewise.
16457         (check_field_decl): Likewise.
16458         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
16459         correctly under the new ABI.
16460         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
16461         instead of TYPE_NEEDS_DESTRUCTOR.
16462         (initialize_local_var): Likewise.
16463         (destroy_local_var): Likewise.
16464         (cp_finish_decl): Likewise.
16465         (register_dtor_fn): Likewise.
16466         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
16467         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
16468         TYPE_VEC_DELETE_TAKES_SIZE here.
16469         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
16470         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
16471         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16472         (finish_destructor_body): Likewise.
16473         (maybe_build_cleanup_1): Likewise.
16474         * decl2.c (do_static_destruction): Likewise.
16475         * init.c (build_new_1): Make it static.
16476         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16477         (expand_cleanup_for_base): Likewise.
16478         (get_cookie_size): New function.
16479         (build_new_1): Handle array-new cookies correctly under the new
16480         ABI.
16481         (build_vec_delete_1): Likewise.
16482         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16483         (build_delete): Likewise.
16484         (build_vec_delete): Handle array-new cookies correctly under the new
16485         ABI.
16486         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16487         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
16488         TYPE_HAS_ARRAY_NEW_OPERATOR.
16489         * ptree.c (print_lang_type): Check them.
16490         * search.c (context_for_name_lookup): Fix typo in comment.
16491         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16492         * tree.c (break_out_cleanups): Likewise.
16493         (build_cplus_array_test_1): Likewise.
16494         (cp_build_qualified_type_real): Likewise.
16495         * typeck.c (complete_type): Likewise.
16496
16497         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
16498         the command-line, not the end.
16499
16500 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
16501
16502         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
16503
16504 2000-03-02  Tom Tromey  <tromey@cygnus.com>
16505
16506         * cp-tree.h (build_java_class_ref): Declare.
16507         * init.c (build_java_class_ref): No longer static.
16508         * except.c (expand_throw): Generate a Java-style `throw' if the
16509         thrown object is a "Java" object.
16510         (initialize_handler_parm): Generate a Java-style lookup of
16511         exception info if the caught object is a "Java" object.
16512         (catch_language, catch_language_init): New globals.
16513         (decl_is_java_type): New function.
16514         (expand_start_catch_block): Don't call push_eh_info() or
16515         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
16516         class reference to build_catch_block.
16517
16518 2000-03-02  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16519
16520         * typeck.c (comptypes): Treat sizetype like its language equivalent.
16521
16522 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
16523
16524         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
16525         to merge reference/pointer code and fix incorrect warnings.
16526
16527 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
16528
16529         * search.c (protected_accessible_p): Use context_for_name_lookup.
16530
16531         * init.c (construct_virtual_bases): Fix thinko.
16532         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
16533
16534 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
16535
16536         * decl.c (current_function_decl): Move to toplev.c.
16537
16538 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
16539
16540         * pt.c (fn_type_unification): Unify return type, whenever
16541         provided.
16542         (get_bindings_real): Only pass return type when necessary.
16543         Remove explicit return type check.
16544         * class.c (resolve_address_of_overloaded_function): Pass desired
16545         return type to fn_type_unification.
16546
16547 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16548
16549         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
16550         DECL_FIELD_SIZE.
16551         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
16552         DECL_FIELD_SIZE.
16553         * rtti.c (expand_class_desc): Likewise.
16554         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
16555         (THUNK_VCALL_OFFSET): Likewise.
16556         (THUNK_DELTA): Reflect changes in ../tree.h.
16557
16558 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
16559
16560         * search.c (protected_accessible_p): Also allow the access if
16561         the member is public in DERIVED.  Lose TYPE parm.
16562         (friend_accessible_p): Lose TYPE parm.
16563         (accessible_p): Adjust.
16564
16565 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16566
16567         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
16568         on things that are not sizes; ssize_binop deleted.
16569         Call size_diffop when appropriate.
16570         (dfs_build_vcall_offset_vtbl_entries): Likewise.
16571         (build_primary_vtable, build_secondary_vtable): Likewise.
16572         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
16573         Variable I is HOST_WIDE_INT.
16574         (get_vfield_offset): Pass proper types to size_binop.
16575         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
16576         (finish_struct_1): Likewise.
16577         (skip_rtti_stuff): Arg N is now pointer to signed.
16578         (layout_class_type): Use size_zero_node.
16579         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
16580         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
16581         * decl.c (complete_arry_type): Pass proper types to size_binop.
16582         (xref_basetypes): BINFO_OFFSET is sizetype.
16583         * error.c (dump_expr): Don't use size_binop non-sizes.
16584         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
16585         * init.c (construct_virtual_bases): Fix type error.
16586         (build_vec_delete_1): Pass proper type to size_binop and don't
16587         fold result.
16588         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
16589         * rtti.c (get_base_offset): Pass proper type to size_binop.
16590         * search.c (dfs_find_vbases): Fix type error.
16591         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
16592         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
16593         * tree.c (debug_binfo): Variable N is signed.
16594         Use HOST_WIDE_INT_PRINT_DEC.
16595         * typeck.c (comptypes): sizetype is same as equivalent integer type.
16596         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
16597         size_one_node and size_zero_node.
16598         (c_alignof): Use size_one_node.
16599         (build_component_addr): Pass proper types to size_binop.
16600         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
16601
16602 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
16603
16604         Implement class scope using-declarations for functions.
16605         * class.c (handle_using_decl): Call add_method for used functions.
16606         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
16607         (add_method): Used functions are hidden by local functions.
16608         (check_bases_and_members): Handle using-decls before finalizing
16609         CLASSTYPE_METHOD_VEC.
16610         * call.c (add_function_candidate): Add ctype parm; if nonzero,
16611         override the type of 'this' accordingly.
16612         (add_template_candidate, add_template_candidate_real): Add ctype parm.
16613         (convert_class_to_reference, build_user_type_conversion_1,
16614         build_new_function_call, build_object_call, build_new_op,
16615         build_new_method_call): Pass ctype parm.
16616
16617         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
16618         the baselink.
16619         * call.c (convert_class_to_reference, build_user_type_conversion_1,
16620         build_new_function_call, build_object_call, build_new_op,
16621         build_new_method_call, build_op_delete_call): Don't get basetype_path
16622         from a baselink.
16623         * typeck.c (build_component_ref): Likewise.
16624         * init.c (build_offset_ref): Likewise.
16625         (resolve_offset_ref): Don't call enforce_access.
16626         Call build_scoped_ref.
16627         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
16628         would cause an error or if -pedantic.
16629         * class.c (alter_access): Lose binfo parm.
16630
16631 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
16632
16633         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
16634         types.
16635
16636 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
16637
16638         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
16639         pseudo_type_info creation into the std namespace
16640
16641 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
16642
16643         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
16644         (import_export_class): Remove declaration.
16645         * decl2.c (import_export_class): Make it static.
16646         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
16647         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
16648         EXPR_WITH_FILE_LOCATION.
16649         * lex.c (check_newline): Tweak filename/lineno setting.
16650         * semantics.c (begin_while_stmt): Fix typo in comment.
16651
16652 2000-02-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16653
16654         * lang-options.h (-fmessage-length=): Add missing option.
16655
16656         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
16657
16658 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
16659
16660         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
16661
16662 2000-02-25  Jim Wilson  <wilson@cygnus.com>
16663
16664         * optimize.c (expand_call_inline): Emit the return label before
16665         evaluating the return value.
16666
16667 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
16668
16669         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
16670         than duplicating functionality here.
16671         * optimize.c: Include input.h.
16672         (expand_call_inline): Use push_srcloc and pop_srcloc.
16673         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
16674         * parse.c: Regenerated.
16675         * Makefile.in (lex.o): Depend on input.h.
16676         (optimize.o): Likewise.
16677
16678 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
16679
16680         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
16681         function type, rather than ICE.
16682
16683 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
16684
16685         * decl.c (grokdeclarator): Call decl_type_access_control.
16686         * parse.y (parse_end_decl): Don't call decl_type_access_control if
16687         decl is null.
16688
16689 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
16690
16691         * decl.c (decls_match): Remove obsolete static member nadgering.
16692
16693 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16694
16695         * decl.c (grokdeclarator): Change ANSI to ISO.
16696         * lex.c (consume_string, readescape, do_identifier): Likewise.
16697         (parse_float, real_yylex): Likewise.
16698         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
16699         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
16700         new_type_id, maybe_label_decls, simple_stmt,
16701         for.init.statement): Likewise.
16702         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
16703         * semantics.c (finish_named_return_value): Likewise.
16704         * parse.c: Regenerate.
16705
16706 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
16707
16708         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
16709         (CPTI_CLASS_STAR_TYPE): Remove.
16710         (vtable_index_type): Likewise.
16711         (class_star_type_node): Remove.
16712         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
16713         (build_binary_op_nodefault): Remove.
16714         * call.c (build_new_op): Use build_binary_op instead of
16715         build_binary_op_nodefault.
16716         * decl.c (init_decl_processing): Remove class_star_type_node
16717         initialization.  Make delta_type_node ptrdiff_type_node under the
16718         new ABI.  Initialize vtable_index_type.
16719         (build_ptrmemfunc_type): Build different structures for the new
16720         ABI.
16721         (build_enumerator): Use build_binary_op instead of
16722         build_binary_op_nodefault.
16723         * method.c (build_overload_value): Mangle pointers-to-members
16724         appropriately under the new ABI.
16725         * typeck.c (build_array_ref): Use build_binary_op instead of
16726         build_binary_op_nodefault.
16727         (get_member_function_from_ptrfunc): Adjust for the new ABI.
16728         (build_binary_op_nodefault): Rename to ...
16729         (build_binary_op): ... this.  Remove old version.  Adjust for
16730         pointer-to-member comparisons under the new ABI.
16731         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
16732         (build_ptrmemfunc): Adjust for the new ABI.
16733         (expand_ptrmemfunc_cst): Likewise.
16734         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
16735         (pfn_from_ptrmemfunc): Adjust for the new ABI.
16736
16737 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
16738
16739         * call.c (build_object_call): Compress consecutive calls to
16740         cp_error.
16741         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
16742         (build_op_delete_call): Adjust message formatting.
16743
16744         * class.c (check_bases): Compress consecutive calls to
16745         cp_pedwarn.
16746         (finish_struct_anon): Say 'ISO C++'.
16747
16748         * decl.c (start_decl): Same here.
16749         (grok_reference_init): Likewise.
16750         (grokfndecl): Correct message formatting.
16751         (grokfndecl): Improve diagnostic.
16752         (check_static_variable_definition): Likewise. Say 'ISO C++'
16753         (compute_array_index_type): Say 'ISO C++'
16754         (create_array_type_for_decl): Compress consecutive calls to
16755         cp_error.
16756         (grokdeclarator): Say 'ISO C++'
16757         (grok_op_properties): Likewise.
16758
16759         * decl2.c (delete_sanity): Clairify diagnostic.
16760         (check_member_template): Same here.
16761         (grok_function_init): Use consistent terminology.
16762
16763         * expr.c (do_case): Say 'ISO C++'
16764
16765         * friend.c (do_friend): Compress consecutive calls to warning.
16766
16767 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
16768
16769         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
16770         * class.c (build_secondary_vtable): Reorganize.  Don't create a
16771         new vtable under the new ABI.
16772         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
16773         computing the size.
16774         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
16775         the initializing elements.
16776         (initialize_vtable): New function.
16777         (dfs_finish_vtbls): Use it.
16778         (dfs_accumulate_vtbl_inits): New function.
16779         (finish_vtbls): Merge primary and secondary vtables under the new
16780         ABI.
16781         (finish_struct_1): Remove redundant call to layout_vtable_decl.
16782         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
16783         aren't VAR_DECLs.
16784
16785         * class.c (build_vtable): New function, split out from ...
16786         (get_vtable_decl): ... here, and ...
16787         (build_secondary_vtable): ... here.
16788
16789         * pt.c (tsubst_decl): Fix formatting.
16790
16791 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16792
16793         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
16794         (avoid_overlap, build_base_field): Likewise.
16795         (build_base_field, build_base_fields, is_empty_class):
16796         Test DECL_SIZE with integer_zero.
16797         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
16798         * cp-tree.h (struct lang_type): New field size_unit.
16799         (CLASSTYPE_SIZE_UNIT): New macro.
16800         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
16801         (cp_finish_decl): Delete -Wlarger-than processing.
16802         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
16803         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
16804         * tree.c (make_binfo): binfo vector is one entry longer.
16805         (walk_tree): Walk DECL_SIZE_UNIT.
16806
16807 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
16808
16809         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
16810         comment.
16811         (build_vtable_entry): Don't assume all vtable entries are
16812         functions.
16813         (build_vtbl_initializer): Adjust accordingly.
16814         (get_vtable_decl): Fix formatting.
16815
16816 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
16817
16818         * semantics.c (deferred_type_access_control): Walk the entire
16819         type_lookups list.
16820         (save_type_access_control): Rename from
16821         initial_deferred_type_access_control.  Just remember the value.
16822         (decl_type_access_control): New fn.
16823         (begin_function_definition): Use deferred_type_access_control, after
16824         we've started the function.  Set type_lookups to error_mark_node.
16825         * parse.y (frob_specs, fn.def1): Adjust.
16826         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
16827         (parse_end_decl, parse_bitfield0, parse_method): New fns.
16828         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
16829         (after_type_component_declarator0): Likewise.
16830         (after_type_component_declarator): Likewise.
16831         (notype_component_declarator): Likewise.
16832         * cp-tree.h: Adjust.
16833
16834         * decl.c (redeclaration_error_message): Allow redeclaration of
16835         namespace-scope decls.
16836
16837 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
16838
16839         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
16840
16841 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
16842
16843         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
16844         * decl2.c (grokclassfn): Likewise.
16845
16846         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
16847
16848         * decl2.c (lang_decode_option): Don't set default message length
16849         here.
16850         * lex.c (lang_init_options): Set it here.
16851
16852 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
16853
16854         Make DECL_CONTEXT mean the class in which a member function was
16855         declared, even for a virtual function.
16856         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
16857         (DECL_FRIEND_CONTEXT): New macro.
16858         (DECL_REAL_CONTEXT): Remove.
16859         (SET_DECL_FRIEND_CONTEXT): Likewise.
16860         (DECL_VIRTUAL_CONTEXT): Adjust.
16861         (DECL_CLASS_SCOPE_P): Use TYPE_P.
16862         (add_friends): Remove.
16863         (hack_decl_function_context): Likewise.
16864         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
16865         CP_DECL_CONTEXT.
16866         (build_over_call): Fix indentation.  Use DECL_CONTEXT
16867         instead of DECL_CLASS_CONTEXT.
16868         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
16869         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
16870         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16871         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
16872         (build_base_field): Likewise.
16873         (finish_struct_1): Likewise.
16874         (build_self_reference): Likewise.
16875         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
16876         DECL_REAL_CONTEXT.
16877         (pushtag): Use decl_function_context, not
16878         hack_decl_function_context.
16879         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16880         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
16881         (pushdecl): Remove bogus code.
16882         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
16883         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16884         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16885         Use decl_function_context, nothack_decl_function_context.
16886         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
16887         (grokdeclarator): Likewise.  Use decl_function_context, not
16888         hack_decl_function_context.
16889         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
16890         (start_function): Use DECL_FRIEND_CONTEXT, not
16891         DECL_CLASS_CONTEXT.  Use decl_function_context, not
16892         hack_decl_function_context.
16893         (finish_function): Use decl_function_context, not
16894         hack_decl_function_context.
16895         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
16896         DECL_CLASS_CONTEXT.
16897         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
16898         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
16899         (grokfield): Likewise.
16900         (finish_builtin_type): Likewise.
16901         (finish_vtable_vardec): Use decl_function_context, not
16902         hack_decl_function_context.
16903         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16904         (start_static_initialization_or_destruction): Likewise.
16905         (finish_static_initialization_or_destruction): Likewise.
16906         (mark_used): Adjust logic for deciding when to synthesize methods.
16907         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
16908         DECL_REAL_CONTEXT.
16909         * error.c (dump_function_decl): Use DECL_CONTEXT, not
16910         DECL_CLASS_CONTEXT.
16911         * friend.c (is_friend): Likewise.
16912         (add_friends): Remove.
16913         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
16914         * lex.c (begin_definition_of_inclass_inline): Use
16915         decl_function_context, not hack_decl_function_context.
16916         (process_next_inline): Likewise.
16917         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16918         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
16919         DECL_CLASSS_CONTEXT.
16920         (hack_identifier): Likewise.
16921         (synthesize_method):  Use decl_function_context, not
16922         hack_decl_function_context.
16923         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
16924         DECL_REAL_CONTEXT.
16925         (is_member_template): Use decl_function_context, not
16926         hack_decl_function_context.  Use DECL_CONTEXT, not
16927         DECL_CLASS_CONTEXT.
16928         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
16929         DECL_CLASS_CONTEXT.
16930         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
16931         DECL_REAL_CONTEXT.
16932         (push_template_decl_real): Likewise.
16933         (instantiate_class_template): Don't call add_friends.
16934         (tsubst_default_argument): Use DECL_CONTEXT, not
16935         DECL_REAL_CONTEXT.
16936         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
16937         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16938         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
16939         DECL_CLASS_CONTEXT.
16940         * repo.c (repo_inline_used): Likewise.
16941         * search.c (current_scope): Adjust for new _CONTEXT macros.
16942         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
16943         DECL_REAL_CONTEXT.
16944         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16945         (lookup_fnfields_here):Likewise.
16946         (check_final_overrider): Likewise.
16947         (init_vbase_pointers): Likewise.
16948         (virtual_context): Likewise.
16949         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
16950         (expand_body): Use decl_function_context, not
16951         hack_decl_function_context.
16952         * tree.c (hack_decl_function_context): Remove.
16953         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
16954         DECL_CLASS_CONTEXT.
16955         * typeck2.c (error_not_base_type): Likewise.
16956
16957 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
16958
16959         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
16960
16961 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16962
16963         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
16964
16965 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
16966
16967         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
16968
16969 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
16970
16971         * decl2.c (lang_decode_option): Enable automatic line wrapping.
16972
16973 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
16974
16975         * parse.y (frob_specs): Split out...
16976         (parse_decl): From here.
16977         (fn.def2): Call initial_deferred_type_access_control.
16978         (after_type_component_declarator0): Call frob_specs.
16979         (notype_component_declarator0): Likewise.
16980         * search.c (friend_accessible_p): Nested classes are friends of their
16981         enclosing classes.
16982
16983 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
16984
16985         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
16986         used to create an implicit temporary.
16987
16988         * class.c (dfs_modify_vtables): Tweak calculation of functions to
16989         override.
16990
16991 2000-02-08  Nathan Sidwell  <nathan@acm.org>
16992
16993         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
16994         strip array element qualifiers too.
16995
16996 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
16997
16998         * decl.c (store_parm_decls): Don't build cleanups for parameters
16999         while processing_template_decl.
17000
17001 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
17002
17003         * cp-tree.h (struct saved_scope): Add incomplete field.
17004         (namespace_scope_incomplete): New macro.
17005         * decl.c (pushdecl): Use it.
17006         (hack_incomplete_structures): Use it.  See through artificial
17007         binding levels.
17008         (mark_saved_scope): Mark it.
17009
17010         Implement access control for nested types.
17011         * search.c (type_access_control): New fn.
17012         (accessible_p): Now we do perform access control for types.
17013         * semantics.c (deferred_type_access_control): New fn.
17014         (initial_deferred_type_access_control): New fn.
17015         (begin_function_definition): Call it.  Add lookups parm.
17016         * decl.c (struct binding_level): Add this_class field.
17017         (pushlevel_class): Set it.
17018         (mark_binding_level): Mark it.
17019         (lookup_name_real): Use it.  Call type_access_control.
17020         (mark_saved_scope): Mark lookups field.
17021         * cp-tree.h (flagged_type_tree): Add lookups field.
17022         (struct saved_scope): Add lookups field.
17023         (type_lookups): New macro.
17024         * parse.y (declmods): Now <ftype>.
17025         (parse_decl): Add lookups parm.  Call
17026         initial_deferred_type_access_control.
17027         (lang_extdef): Clear type_lookups.
17028         (typed_declspecs, declmods, typespec): Set lookups field.
17029         (initdcl): Call deferred_type_access_control.
17030         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
17031         component_decl_1, named_parm): Adjust.
17032         * friend.c (is_friend): Nested classes are friends of their
17033         enclosing classes.
17034
17035         * class.c (currently_open_derived_class): New fn.
17036         * method.c (hack_identifier): Use it.
17037
17038         * lex.c (do_identifier): Remove obsolete code.
17039
17040         * parse.y (typed_typespecs): Propagate new_type_flag properly.
17041
17042 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
17043
17044         * tinfo.h: Remove apostrophes from C++ comment (xgettext
17045         thinks this file is plain C).
17046
17047 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17048
17049         * Makefile.in (call.o): Depend on $(EXPR_H).
17050
17051         * call.c: Include "expr.h".
17052
17053         * class.c (dump_class_hierarchy): Add prototype.
17054
17055         * search.c (dfs_get_pure_virtuals): Likewise.
17056
17057 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
17058
17059         * parse.y (simple_stmt): Allow :: token in asm parameter list.
17060         * parse.c: Rebuilt.
17061
17062 2000-01-31  Jim Wilson  <wilson@cygnus.com>
17063
17064         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
17065         Store it in DECL_FCONTEXT.
17066         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
17067
17068 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
17069
17070         * tinfo.h (old abi): #include "tconfig.h".
17071         * tinfo.cc (convert_to_base): Move into old abi section.
17072
17073 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
17074
17075         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
17076         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
17077         (BINFO_PRIMARY_BINFO): New macro.
17078         (BF_DELTA): Rename to ...
17079         (BV_DELTA): ... this.
17080         (BF_VCALL_INDEX): Rename to ...
17081         (BV_VCALL_INDEX): ... this.
17082         (BF_FN): Rename to ...
17083         (BV_FN): ... this.
17084         * class.c (build_vbase_path): Adjust for changes to reverse_path.
17085         (set_rtti_entry): Rename BF_ macros to BV_ variants.
17086         (modify_vtable_entry): Simplify.
17087         (add_virtual_function): Rename BF_ macros to BV_ variants.
17088         (build_vtable_initializer): Likewise.
17089         (get_class_offset_1): Remove.
17090         (dfs_get_class_offset): Likewise.
17091         (get_class_offset): Likewise.
17092         (dfs_find_final_overrider): New function.
17093         (find_final_overrider): Likewise.
17094         (modify_one_vtable): Remove.
17095         (dfs_find_base): New function.
17096         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
17097         find_final_overrider.
17098         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
17099         virtuals.
17100         (dfs_fixup_vtable_deltas): Remove.
17101         (override_one_vtable): Remove.
17102         (merge_overrides): Likewise.
17103         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
17104         unreal chilren of virtual bases.
17105         (finish_struct_1): Don't use merge_overrides.  Don't use
17106         dfs_fixup_vtable_deltas.
17107         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
17108         BINFOs.
17109
17110 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
17111             Jason Merrill  <jason@yorick.cygnus.com>
17112
17113         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
17114
17115 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
17116
17117         * exception.cc (__throw_bad_typeid): Add missing std::.
17118
17119 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17120
17121         * cp-tree.h (make_thunk): PROTO -> PARAMS.
17122
17123 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
17124
17125         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
17126
17127         Runtime support for new-abi rtti.
17128         * inc/typeinfo (type_info::operator!=): Define in class.
17129         (type_info::before, type_info::name, type_info::operator==,
17130         type_info::operator!=): Define new ABI implementations.
17131         (type_info::is_pointer_p, type_info::is_function_p): Declare
17132         new virtual functions.
17133         (type_info::do_catch, type_info::do_upcast): Likewise.
17134
17135         * tinfo.h (__base_class_info): Define new class.
17136         (__class_type_info): Likewise.
17137         (__si_class_type_info): Likewise.
17138         (__vmi_class_type_info): Likewise.
17139         (__dynamic_cast): Prototype.
17140
17141         * tinfo.cc: Conditionalize old and new rtti mechanisms.
17142         (type_info::is_pointer_p): Define new function.
17143         (type_info::is_function_p): Likewise.
17144         (type_info::do_catch): Likewise.
17145         (type_info::do_upcast): Likewise.
17146         (vtable_prefix): New structure for vtable access.
17147         (adjust_pointer): Define new template function.
17148         (contained_p, public_p, virtual_p, contained_public_p,
17149         contained_nonpublic_p, contained_nonvirtual_p): Define new
17150         functions.
17151         (nonvirtual_base_type): New local variable.
17152         (__class_type_info::~__class_type_info): Define.
17153         (__si_class_type_info::~__si_class_type_info): Likewise.
17154         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
17155         (__class_type_info::do_catch): Define new function.
17156         (__class_type_info::do_upcast): Likewise.
17157         (__class_type_info::find_public_src): Likewise.
17158         (__class_type_info::do_find_public_src): Likewise.
17159         (__si_class_type_info::do_find_public_src): Likewise.
17160         (__vmi_class_type_info::do_find_public_src): Likewise.
17161         (__class_type_info::do_dyncast): Likewise.
17162         (__si_class_type_info::do_dyncast): Likewise.
17163         (__vmi_class_type_info::do_dyncast): Likewise.
17164         (__class_type_info::do_upcast): Likewise.
17165         (__si_class_type_info::do_upcast): Likewise.
17166         (__vmi_class_type_info::do_upcast): Likewise.
17167         (__dynamic_cast): Likewise.
17168
17169         * tinfo2.cc (__fundamental_type_info): Define new class.
17170         (__pointer_type_info): Likewise.
17171         (__reference_type_info): Likewise.
17172         (__array_type_info): Likewise.
17173         (__function_type_info): Likewise.
17174         (__enum_type_info): Likewise.
17175         (__ptr_to_member_type_info): Likewise.
17176         (__fundamental_type_info::~__fundamental_type_info): Define.
17177         (__pointer_type_info::~__pointer_type_info): Likewise.
17178         (__reference_type_info::~__reference_type_info): Likewise.
17179         (__array_type_info::~__array_type_info): Likewise.
17180         (__function_type_info::~__function_type_info): Likewise.
17181         (__enum_type_info::~__enum_type_info): Likewise.
17182         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
17183         (__pointer_type_info::do_catch): Define new function.
17184         (__ptr_to_member_type_info::do_catch): Define new function.
17185
17186         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
17187         (__is_pointer): Likewise.
17188
17189         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
17190
17191 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
17192
17193         * cp/class.c (build_vtable): Rename to build_primary_vtable.
17194         (prepare_fresh_vtable): Rename to build_secondary_vtable.
17195         (make_new_vtable): New function.
17196         (modify_vtable_entry): Handle generation of new vtables correctly.
17197         (modify_one_vtable): Remove unused parameter.
17198         (dfs_fixup_vtable_deltas): Likewise.
17199         (override_one_vtable): Use build_secondary_vtable.
17200         (finish_struct_1): Use build_primary_vtable and
17201         build_secondary_vtable.
17202
17203 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
17204
17205         * cp/decl.c: Adjust variable names, comments, help strings.
17206
17207 2000-01-29  Nathan Sidwell  <nathan@acm.org>
17208
17209         * new2.cc (operator delete[]): Use operator delete, don't assume
17210         implementation.
17211
17212 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
17213
17214         * class.c (build_vtbl_initializer): Add argument to
17215         build_vtable_entry call.
17216
17217 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
17218
17219         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
17220         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
17221         (BF_DELTA): New macro.
17222         (BF_VCALL_INDEX): Likewise.
17223         (BF_FN): Likewise.
17224         (THUNK_VCALL_OFFSET): Likewise.
17225         (make_thunk): Change prototype.
17226         * class.c (build_vtable_entry): Integrate
17227         build_vtable_entry_for_fn.  Handle vcall indices.
17228         (build_vtable_entry_for_fn): Remove.
17229         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
17230         BF_VCALL_INDEX, BF_FN.
17231         (modify_vtable_entry): Integrate common code from
17232         modify_one_vtable and dfs_fixup_vtable_deltas.
17233         (add_virtual_function): Set BF_VCALL_INDEX.
17234         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
17235         and BF_FN.
17236         (modify_one_vtable): Simplify.
17237         (dfs_fixup_vtable_deltas): Likewise.
17238         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
17239         * method.c (make_thunk): Handle vcall indices.
17240
17241 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
17242
17243         Compiler side new abi rtti (not enabled).
17244         * cp-tree.h (new_abi_rtti_p): New macro.
17245         (emit_support_tinfos): Prototype new function.
17246         (tinfo_decl_p): Likewise.
17247         (emit_tinfo_decl): Likwise.
17248         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
17249         macros.
17250         (doing_runtime): New local static.
17251         (init_rtti_processing): Add new-abi initializer.
17252         (get_tinfo_decl): Add new-abi logic.
17253         (tinfo_from_decl): Likewise.
17254         (build_dynamic_cast_1): Likewise.
17255         (qualifier_flags): New static function.
17256         (tinfo_base_init): Likewise.
17257         (generic_initializer): Likewise.
17258         (ptr_ref_initializer): Likewise.
17259         (ptmd_initializer): Likewise.
17260         (class_hint_flags): Likewise.
17261         (class_initializer): Likewise.
17262         (synthesize_tinfo_var): Likewise.
17263         (create_real_tinfo_var): Likewise.
17264         (create_pseudo_type_info): Likewise.
17265         (get_vmi_pseudo_type_info): Likewise.
17266         (create_tinfo_types): Likewise.
17267         (emit_support_tinfos): New global function.
17268         (tinfo_decl_p): New global predicate.
17269         (emit_tinfo_decl): New global function.
17270         * class.c (set_rtti_entry): Generalize for old and new rtti.
17271         (build_vtbl_initializer): Likewise.
17272         * decl2.c (finish_file): Likewise.
17273
17274 2000-01-27  Jim Wilson  <wilson@cygnus.com>
17275
17276         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
17277         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
17278
17279 2000-01-27  Mike Stump  <mrs@wrs.com>
17280
17281         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
17282         for scopes.
17283
17284 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
17285
17286         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
17287
17288 2000-01-26  J"orn Rennecke <amylaar@cygnus.co.uk>
17289
17290         * optimize.c (calls_setjmp_r): Supply new argument
17291         to special_function_p.
17292
17293 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17294
17295         * call.c: PROTO -> PARAMS.
17296         * class.c: Likewise.
17297         * cp-tree.h: Likewise.
17298         * cvt.c: Likewise.
17299         * decl.c: Likewise.
17300         * decl.h: Likewise.
17301         * decl2.c: Likewise.
17302         * dump.c: Likewise.
17303         * errfn.c: Likewise.
17304         * error.c: Likewise.
17305         * except.c: Likewise.
17306         * expr.c: Likewise.
17307         * init.c: Likewise.
17308         * input.c: Likewise.
17309         * lex.c: Likewise.
17310         * lex.h: Likewise.
17311         * method.c: Likewise.
17312         * optimize.c: Likewise.
17313         * parse.y: Likewise.
17314         * pt.c: Likewise.
17315         * repo.c: Likewise.
17316         * rtti.c: Likewise.
17317         * search.c: Likewise.
17318         * semantics.c: Likewise.
17319         * spew.c: Likewise.
17320         * tree.c: Likewise.
17321         * typeck.c: Likewise.
17322         * typeck2.c: Likewise.
17323         * xref.c: Likewise.
17324
17325 2000-01-25  Richard Henderson  <rth@cygnus.com>
17326
17327         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
17328
17329 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
17330
17331         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
17332         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
17333         (struct vcall_offset_data_s): New type.
17334         (dfs_vcall_offset_queue_p): New function.
17335         (dfs_build_vcall_offset_vtbl_entries): Likewise.
17336         (build_vcall_offset_vtbl_entries): Likewise.
17337         (layout_vtable_decl): Likewise.
17338         (num_vfun_entries): Likewise.
17339         (num_extra_vtbl_entries): Add the entries for vcall offsets.
17340         (build_vtbl_initializer): Likewise.
17341         (dfs_finish_vtabls): Use layout_vtable_decl.
17342         (modify_one_vtables): Always duplicate vtables under the new ABI.
17343         (finish_struct_1): Use layout_vtable_decl.
17344
17345 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17346
17347         * decl.c (member_function_or_else): Change third arg from a format
17348         specifier to an `enum overload_flags'.  Callers changed.
17349
17350 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
17351
17352         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
17353         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
17354         build_const_cast, get_delta_difference, check_return_expr): Avoid
17355         ANSI string concatenation usage.
17356
17357 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
17358
17359         * class.c (layout_class_type): Put the fields required to make a
17360         class non-empty at the end, not the beginning, of the TYPE_FIELDs
17361         list.
17362
17363 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
17364
17365         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
17366         template.
17367
17368         * decl2.c (mark_used): Do instantiate inlines that have been
17369         explicitly instantiated.
17370
17371 2000-01-24  Richard Henderson  <rth@cygnus.com>
17372
17373         * call.c (build_over_call): Use expand_tree_builtin.
17374         * typeck.c (build_function_call_real): Likewise.
17375         (build_binary_op_nodefault): Handle unordered compares.
17376
17377 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
17378
17379         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
17380         cp_tree_index values.
17381         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
17382         New global node #defines for them.
17383         * rtti.c (call_void_fn): Replace with ...
17384         (build_runtime_decl): ... new static function.
17385         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
17386         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
17387         (build_dynamic_cast_1): Always produce correctly typed result.
17388         Explicitly produce type_info addresses. Use dynamic_cast_node.
17389         * exception.cc (__throw_bad_cast): Return `void *'.
17390         (__throw_bad_typeid): Return `const type_info &'.
17391
17392 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
17393
17394         * cp-tree.h (get_vtable_decl): Prototype new function.
17395         * class.c (get_vtable_decl): New function. Broken out from ...
17396         (build_vtable): ... here. Use it.
17397         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
17398         by get_vtable_decl.
17399
17400 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
17401
17402         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
17403         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
17404         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
17405         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
17406         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
17407         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
17408         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
17409         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
17410         (CPTI_TINFO_VAR_ID): New enumeration.
17411         (__tp_desc_type_node, __access_mode_type_node,
17412         __bltn_desc_type_node, __user_desc_type_node,
17413         __class_desc_type_node, __ptr_desc_type_node,
17414         __attr_desc_type_node, __func_desc_type_node,
17415         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
17416         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
17417         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
17418         enum_desc_type_node, class_desc_type_node,
17419         si_class_desc_type_node, vmi_class_desc_type_node,
17420         ptmd_desc_type_node, base_desc_type_node): New #defines.
17421         (tinfo_fn_id, tinfo_fn_type): Rename to ...
17422         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
17423         (tinfo_var_id): New enumeration.
17424         (DECL_TINFO_FN_P): Augment comment.
17425         * decl.c (cp_global_trees): Adjust documentation.
17426         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
17427         tinfo_decl_type and tinfo_var_id.
17428         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
17429         (build_typeid): Remove unused variable.
17430         (get_tinfo_var): Use tinfo_var_id.
17431         (tinfo_name): New static function.
17432         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
17433         (tinfo_from_decl): Likewise.
17434         (get_base_offset): New static function, broken out of
17435         expand_class_desc.
17436         (expand_si_desc): Use tinfo_name.
17437         (expand_class_desc): Likewise. Lose local static variable.
17438         Use base_desc_type_node. Use get_base_offset.
17439         (expand_ptr_desc): Use tinfo_name.
17440         (expand_attr_desc): Likewise.
17441         (expand_generic_desc): Likewise.
17442
17443         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
17444         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
17445
17446 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
17447
17448         * cp-tree.h (__eprintf): Remove declaration.
17449         * tree.c (__eprintf): Remove definition.
17450
17451 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
17452             Mark Mitchell  <mark@codesourcery.com>
17453
17454         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
17455         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
17456
17457 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
17458
17459         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
17460
17461 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
17462
17463         * cp-tree.h (register_dtor_fn): New function.
17464         * decl.c (destroy_local_static): Rename to ...
17465         (register_dtor_fn): ... this.  Give it external linkage.
17466         (expand_static_init): Use it.
17467         * decl2.c (do_static_initialization): Likewise, if using
17468         __cxa_atexit.
17469         (do_static_destruction): Check that __cxa_atexit is not in use.
17470         (finish_file): Don't call do_static_destruction if using
17471         __cxa_atexit.
17472
17473         * typeck.c (convert_arguments): Restore two-message error
17474         reporting.
17475
17476 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
17477
17478         Remap dynamic cast hint values to be consistent across ABIs.
17479         * search.c (dynamic_cast_base_recurse): Remap generated value.
17480         (get_dynamic_cast_base_type): Adjust documentation.
17481         * tinfo.h (__user_type_info::dyncast): Likewise.
17482         (__user_type_info::find_public_subobj): Remap BOFF meaning.
17483         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
17484         (__class_type_info::do_dyncast): Likewise.
17485         (__class_type_info::do_find_public_subobj): Likewise.
17486         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
17487
17488 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
17489
17490         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
17491
17492         * typeck2.c (incomplete_type_error): Restore previous
17493         cp_error and cp_error_at call sequence.
17494
17495 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
17496
17497         * class.c (dump_class_hierarchy): Make format agree with argument;
17498         cast pointer to unsigned long and print with %lx.
17499
17500 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
17501
17502         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
17503
17504         * typeck.c (composite_pointer_type, common_type,
17505         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
17506         build_function_call_real, convert_arguments,
17507         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
17508         build_unary_op, mark_addressable, build_compound_expr,
17509         build_static_cast, build_reinterpret_cast, build_const_cast,
17510         build_c_cast, build_modify_expr, get_delta_difference,
17511         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
17512         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
17513         into a single one.
17514         * typeck2.c (readonly_error, abstract_virtuals_error,
17515         process_init_constructor, check_for_new_type): Likewise.
17516
17517 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
17518
17519         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
17520         VAR_DECLs.
17521
17522 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
17523
17524         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
17525         (build_x_typeid): Likewise.
17526         (get_tinfo_fn): Likewise.
17527         (get_tinfo_fn_unused): Rename to ...
17528         (get_tinfo_decl): ... here.
17529         * rtti.c (build_headof): Replace logic error with assertion.
17530         (get_tinfo_fn_dynamic): Rename to ...
17531         (get_tinfo_decl_dynamic): ... here. Make static. Use
17532         complete_type_or_else.
17533         (build_x_typeid): Move into ...
17534         (build_typeid): ... here. Adjust call to
17535         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
17536         throw_bad_typeid expression.
17537         (get_tinfo_fn_unused): Rename to ...
17538         (get_tinfo_decl): ... here. Adjust comment.
17539         (get_tinfo_fn): Delete.
17540         (tinfo_from_decl): New static function.
17541         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
17542         (get_typeid): Use complete_type_or_else.
17543         (build_dynamic_cast_1): Adjust calls to
17544         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
17545         * parse.y (primary): Adjust call to build_typeid.
17546         * except.c (build_eh_type_type_ref): Adjust call to
17547         get_tinfo_decl. Mark as used.
17548         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
17549         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
17550         * parse.c: Regenerated.
17551
17552 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
17553
17554         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
17555         calling convention.
17556         (resolves_to_fixed_type_p): Document calling convention.
17557         * rtti.c (build_x_typeid): Initialize NONNULL.
17558
17559         * cp-tree.h (build_shared_int_cst): New function.
17560         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
17561         * class.c (modify_vtable_entry): Likewise.
17562         (add_virtual_function): Split out code to generated shared
17563         INTEGER_CSTs to build_share_int_cst.
17564         (modify_all_vtables): Handle all the overridden functions here.
17565         Add overridden functions from non-primary virtual bases to the
17566         primary vtable.
17567         (finish_struct_1): Adjust call to modify_all_vtables.  Add
17568         overridden functions from non-primary bases to the vtable.
17569         * tree.c (build_shared_int_cst): New function.
17570
17571         * cp-tree.h (scratchalloc): Remove.
17572         (build_scratch_list): Likewise.
17573         * call.c (convert_class_to_reference): Replace build_scratch_list
17574         and build_expr_list with build_tree_list.
17575         (add_candidate): Replace scratchalloc with expralloc.  Note memory
17576         leak.
17577         (build_user_type_conversion_1):  Replace build_scratch_list
17578         and build_expr_list with build_tree_list.
17579         (build_new_op): Likewise.
17580         (build_op_delete_call): Likewise.
17581         (convert_like): Likewise.
17582         * cvt.c (ocp_convert): Likewise.
17583         * decl.c (start_decl): Likewise.
17584         (start_function): Likewise.
17585         (finish_destructor_body): Likewise.
17586         (maybe_build_cleanup_1): Likewise.
17587         * decl2.c (reparse_decl_as_expr): Likewise.
17588         * init.c (perform_member_init): Likewise.
17589         (expand_cleanup_for_base): Likewise.
17590         (build_builtin_delete_call): Likewise.
17591         (build_new_1): Likewise.
17592         (build_delete): Likewise.
17593         * method.c (do_build_assign_ref): Likewise.
17594         * parse.y (already_scoped_stmt): Likewise.
17595         (nontrivial_exprlist): Likewise.
17596         (net_initializer): Likewise.
17597         (initlist): Likewise.
17598         * parse.c: Regenerated.
17599         * rtti.c (build_x_typeid): Likewise.
17600         (build_dynamic_cast_1): Likewise.
17601         * typeck.c (build_x_compound_expr): Likewise.
17602         (build_static_cast): Likewise.
17603         (build_modify_expr): Likewise.
17604
17605         * cp-tree.h (DECL_VINDEX): Add documentation.
17606         * class.c (build_vtable_entry): Likewise.
17607         (start_vtable): Add comment.
17608         (add_virtual_function): Replace pending_hard_virtuals with
17609         overridden_virtuals and pending_virtuals with new_virtuals.
17610         Replace redundant assignments with assertions.
17611         (check_for_override): Add comment.
17612         (check_bases_and_members): Replace pending_hard_virtuals with
17613         overridden_virtuals and pending_virtuals with new_virtuals.
17614         (create_vtbl_ptr): Likewise.
17615         (layout_class_type): Likewise.
17616         (finish_struct_1): Likewise.  Add comments.
17617
17618 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
17619
17620         * class.c (finish_struct_1): Replace redundant code with
17621         assertions.
17622
17623         * cp-tree.h (flag_new_abi): Move.
17624         (flag_use_cxa_atexit): Likewise.
17625         (flag_honor_std): Likewise.
17626         (flag_rtti): Likewise.
17627         (vbase_offsets_in_vtable_p): Define.
17628         (vptrs_present_everywhere_p): Likewise.
17629         (TYPE_CONTAINS_VPTR_P): Likewise.
17630         (dfs_walk_real): Declare.
17631         * class.c (build_vbase_pointer_fields): Check
17632         vbase_offsets_in_vtable_p.
17633         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
17634         BINFO_VPTR_FIELD.
17635         (build_vbase_offset_vtbl_entries): Simplify.
17636         (build_vbase_offset_vtbl_entries): Adjust.
17637         (build_vbase_pointer): Add ability to look up vbase offsets in
17638         vtable.
17639         (start_vtable): New function.
17640         (add_virtual_function): Use it.
17641         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
17642         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
17643         (build_vtbl_initializer): Take the type of the complete object as
17644         input.  Use it to correctly calculate vbase offsets.
17645         (dfs_finish_vtbls): Pass the complete type to
17646         build_vtbl_initializer.
17647         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
17648         (create_vtable_ptr): Create a vtable even if there are no
17649         new virtual functions, under the new ABI.
17650         (finish_struct_1): Likewise.
17651         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
17652         * decl.c (exapnd_static_init): Remove call to
17653         preserve_initializer.
17654         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
17655         vtables.
17656         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
17657         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
17658         (construct_virtual_bases): Don't initialize virtual base pointers
17659         under the new ABI.
17660         (build_aggr_init): Clean up comment.
17661         (expand_aggr_init_1): Likewise.
17662         * rtti.c (expand_class_desc): Store the virtual function table
17663         index where the vbase offset lives in the offset field.
17664         * search.c (dfs_walk_real): Make it global.
17665         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
17666         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
17667
17668         * tinfo.h (USItype): Make it signed under the new ABI.
17669         * tinfo.cc (convert_to_base): New function.  Encapsulate base
17670         conversion logic here.
17671         (__class_type_info::do_upcast): Use it.
17672         (__class_type_info::do_dyncast): Likewise.
17673         (__class_type_info::do_find_public_subobj): Likewise.
17674
17675         * init.c (construct_virtual_bases): Don't look up the addresses of
17676         virtual bases at run-time.
17677
17678         * class.c (build_vbase_pointer): Relocate.
17679         (build_vbase_pointer_fields): Likewise.
17680         (dfs_build_vbase_offset_vtbl_entries): Likewise.
17681         (build_vbase_offset_vtbl_entries): Likewise.
17682
17683         * decl.c (init_decl_processing): Complain if -fnew-abi
17684         -fno-vtable-thunks is used.
17685
17686         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
17687         flag_new_abi.
17688
17689 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
17690
17691         * cp-tree.h (num_extra_vtbl_entries): New function.
17692         (size_extra_vtbl_entries): Likewise.
17693         (dfs_vtable_path_unmark): Likewise.
17694         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
17695         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
17696         * class.c (num_extra_vtbl_entries): New function.
17697         (size_extra_vtbl_entries): Likewise.
17698         (dfs_build_vbase_offset_vtbl_entries): New function.
17699         (build_vbase_offset_vtbl_entries): Likewise.
17700         (build_vtbl_initializer): Use it.
17701         (finish_struct_1): Adjust vtable sizes (using
17702         num_extra_vtbl_entries).
17703         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
17704         THUNK_DECL is non-NULL before expanding it.
17705         * init.c (expand_virtual_init): Adjust the vtable pointer by
17706         size_extra_vtbl_entries before storing it.
17707         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
17708         Handle TREE_LIST parameters here, not in the dfs_* functions.
17709         (dfs_unmarked_real_bases_queue_p): Adjust.
17710         (dfs_marked_real_bases_queue_p): Likewise.
17711         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
17712         (dfs_vtable_path_marked_real_bases_queue_p): New function.
17713         (dfs_vtable_path_unmark): Likewise.
17714
17715 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
17716
17717         * optimize.c (copy_body_r): Clear the operand three of a
17718         TARGET_EXPR when copying it.
17719
17720 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17721
17722         * method.c (build_decl_overload_real): Check whether we are in ::
17723         before returning __builtin_new/delete.
17724
17725 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
17726
17727         * pt.c (tsubst_friend_function): Improve comment.
17728         (instantiate_decl): Avoid crashing when a "nested" function is
17729         instantiated from the top level.
17730
17731         * dump.c (dqeueue_and_dump): Dump
17732         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
17733
17734 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17735
17736         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
17737
17738 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
17739
17740         * g++spec.c (lang_specific_driver): Add -fnew-abi if
17741         ENABLE_NEW_GXX_ABI defined.
17742         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
17743         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
17744         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
17745
17746 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
17747
17748         * decl.c (start_cleanup_fn): Call pushdecl.
17749
17750         * call.c (convert_class_to_reference): Fix typos.
17751         (build_conditional_expr): Handle errors gracefully.
17752         * class.c (push_nested_class): Likewise.
17753         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
17754         (DECL_THIS_EXTERN): Use it.
17755         (DECL_THIS_STATIC): Likewise.
17756         * cvt.c (convert_to_void): Handle errors gracefully.
17757         (build_expr_type_conversion): Likewise.
17758         * decl.c (maybe_push_decl): Likewise.
17759         (start_decl_1): Likewise.
17760         (require_complete_types_for_parms): Likewise.
17761         * parse.y (structsp): Likewise.
17762         (base_class): Likewise.
17763         * parse.c: Regenerated.
17764         * pt.c (finish_member_template_decl): Likewise.
17765         * typeck.c (decay_conversion): Likewise.
17766
17767         * cp-tree.h (dfs_skip_vbases): New function.
17768         (find_vbase_instance): Likewise.
17769         * class.c (determine_primary_base): Allow a nearly empty base to
17770         serve as a primary base class under the new ABI.
17771         (get_class_offset_1): Rename to ...
17772         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
17773         messages here.
17774         (get_class_offset): Use it.  Issue error messages here.
17775         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
17776         find the right copies of virtual bases.
17777         (fixup_vtable_deltas1): Rename to ...
17778         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
17779         bases as primary bases.
17780         (fixup_vtable_deltas): Remove.
17781         (override_one_vtable): Handle virtual bases as primary bases.
17782         (merge_overrides): Likewise.
17783         (finish_struct_1): Likewise.
17784         (dump_class_hierarchy): Dump primary-ness of bases as well.
17785         * search.c (mark_primary_bases): Use a pre-order traversal to
17786         handle primary virtual bases.
17787         (dfs_skip_vbases): New fiunction.
17788         (expand_upcast_fixups): Adjust to handle primary virtual bases.
17789         (fixup_virtual_upcast_offsets): Likewise.
17790         (fixup_all_virtual_upcast_offsets): Likewise.
17791         (dfs_find_vbase_instances): New function.
17792         (find_vbase_instance): Likewise.
17793
17794 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
17795
17796         * lex.c (DIR_SEPARATOR): Delete macro.
17797
17798 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
17799
17800        * decl2.c (lang_decode_option): Handle automatic line wrapping
17801        option.
17802
17803 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
17804
17805         * friend.c (do_friend): Don't resolve scopes when processing
17806         template declarations, even if the qualifying scope doesn't
17807         involve template parameters.
17808
17809 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
17810
17811         * class.c (dfs_modify_vtables_queue_p): Remove.
17812         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
17813         and dfs_marked_real_bases_queue_p instead of
17814         dfs_modify_vtables_queue_p.
17815
17816         * class.c (build_vbase_path): Simplify.
17817         (dfs_propagate_binfo_offsets): New function.
17818         (propagate_binfo_offsets): Use it.
17819         (remove_base_field): Simplify.
17820         (dfs_set_offset_for_vbases): Remove.
17821         (dfs_set_offset_for_shared_vbases): New function.
17822         (dfs_set_offset_for_unshared_vbases): Likewise.
17823         (layout_virtual_bases): Use them.
17824         (layout_basetypes): Don't call propagate_binfo_offsets.
17825         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
17826         for the vbases.
17827
17828         * class.c (build_base_field): New function, split out from ...
17829         (build_base_fields): ... here.  Use it.  Allocate primary bases
17830         first, under the new ABI.
17831         (get_vtable_entry): Remove.
17832         (remove_base_field): New function, split out from ...
17833         (remove_base_fields): ... here.  Adjust since primary bases come
17834         first under the new ABI.
17835
17836         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
17837         (initialize_vtbl_ptrs): New function.
17838         (expand_indirect_vtbls_init): Change prototype.
17839         (convert_pointer_to_vbase): Declare.
17840         * init.c (expand_direct_vtbls_init): Remove.
17841         (dfs_initialize_vtbl_ptrs): New function.
17842         (initialize_vtbl_ptrs): Likewise.
17843         (emit_base_init): Use initialize_vtbl_ptrs.
17844         * search.c (convert_pointer_to_vbase): Make it global.
17845         (expand_indirect_vtbls_init): Remove vtable initialization code.
17846         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
17847
17848         * class.c (dfs_finish_vtbls): New function.
17849         (finish_vtbls): Use it.
17850         (dump_class_hierarchy): New function.
17851
17852         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
17853         (BINFO_VBASE_PRIMARY_P): New macro.
17854         (BINFO_VIRTUALS): Add to documentation.
17855         (SET_BINFO_PRIMARY_MARKED_P): Remove.
17856         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17857         (dfs_mark_primary_bases_queue_p): Likewise.
17858         (dfs_unmarked_real_bases_queue_p): New function.
17859         (dfs_marked_real_bases_queue_p): Likewise.
17860         * search.c (dfs_mark_primary_bases): Adjust.
17861         (mark_primary_bases): Likewise.
17862         (get_shared_vbase_if_not_primary): New function.
17863         (dfs_unmarked_real_bases_queue_p): Likewise.
17864         (dfs_marked_real_bases_queue_p): Likewise.
17865         (dfs_get_pure_virtuals): Simplify.
17866         (get_pure_virtuals): Likewise.
17867
17868 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17869
17870         * lex.c: Include tm_p.h.
17871
17872 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
17873
17874         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
17875
17876 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
17877
17878         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
17879         * pt.c (instantiate_decl): Defer comdat templates that might not be
17880         needed.
17881
17882         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
17883         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
17884         (finish_file): Likewise.
17885
17886         * decl2.c (import_export_class): Undo 12/14 change.
17887
17888         * error.c (dump_decl): operator new, not operatornew.
17889
17890         * class.c (field_decl_cmp): A nontype is "greater" than a type.
17891         * search.c (lookup_field_1): Look for the last field with the
17892         desired name.
17893
17894 2000-01-05  Nathan Sidwell  <nathan@acm.org>
17895
17896         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
17897         FUNCTION_DECL.
17898
17899 2000-01-05  Nathan Sidwell  <nathan@acm.org>
17900
17901         * typeck.c (build_static_cast): Don't strip target qualifiers
17902         when casting from a class.
17903
17904 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17905
17906         * class.c (warn_hidden): Initialize variable `fndecl'.
17907
17908 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
17909
17910         * decl.c (flag_isoc9x): New variable to be able to use code in
17911         c-common.c.  For now always zero.
17912
17913 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
17914
17915         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
17916         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
17917         or unshare_base_binfos for virtual bases here.
17918         * search.c (dfs_get_vbase_types): Do it here.
17919         (get_vbase_types): Adjust.
17920
17921 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
17922
17923         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
17924         (BINFO_PRIMARY_MARKED_P): Use flag 5.
17925         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
17926         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17927         (unmark_primary_bases): Remove declaration.
17928         (unmarkedp): Declare.
17929         (dfs_vbase_unmark): Likewise.
17930         * class.c (determine_primary_base): Return immediately if there
17931         are no base classes.  Call mark_primary_bases here.
17932         (modify_all_direct_vtables): Remove.
17933         (modify_all_indirect_vtables): Remove.
17934         (dfs_modify_vtables_queue_p): New function.
17935         (dfs_modify_vtables): New function.
17936         (modify_all_vtables): Use them.
17937         (build_base_fields): Build FIELD_DECLs for primary virtual base
17938         classes.
17939         (create_vtable_ptr): Don't call determine_primary_base here.
17940         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
17941         (dfs_set_offset_for_vbases): ... this.
17942         (layout_virtual_bases): Use it.
17943         (layout_class_type): Call determine_primary_base here.
17944         * search.c (unmarkedp): Make it global.
17945         (shared_marked_p): Simplify.
17946         (shared_unmarked_p): Likewise.
17947         (dfs_primary_bases_queue_p): Remove.
17948         (dfs_unmark_primary_bases): Likewise.
17949         (unmark_primary_bases): Likewise.
17950         (mark_primary_bases): Simplify.
17951         (get_pure_virtuals): Don't call mark_primary_bases here.
17952         (dfs_vbase_unmark): New function.
17953         (get_vbase_types): Simplify.
17954
17955         * class.c (struct base_info): Remove.
17956         (determine_primary_base): Take has_virtual_p rather than a
17957         base_info as input.  Don't calculate max_has_virtual.
17958         (finish_struct_bits): Remove max_has_virtual argument.
17959         (create_vtable_ptr): Remove max_has_virtual_p argument.
17960         (layout_virtual_bases): Remove max argument.
17961         (layout_basetypes): Likewise.
17962         (layout_class_type): Remove max_has_virtual_p argument.
17963         (finish_struct_1): Remove max_has_virtual.
17964
17965         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
17966         (layout_basetypes): Remove.
17967         * class.c (propagate_binfo_offsets): Moved here from tree.c.
17968         Update to handle primary virtual bases.
17969         (remove_base_fields): New function, split out from
17970         layout_basetypes.
17971         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
17972         (layout_virtual_bases): New function, split out from
17973         layout_basetypes.  Update to handle primary virtual bases.
17974         (layout_basetypes): Moved here from tree.c.  Use
17975         remove_base_fields and layout_virtual_bases.
17976         * search.c (dfs_mark_primary_bases_queue_p): New function.
17977         (mark_primary_bases): Use it.
17978         * tree.c (CEIL): Remove.
17979         (propagate_binfo_offsets): Remove.
17980         (layout_basetypes): Remove.
17981
17982 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
17983
17984         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
17985         (BINFO_PRIMARY_MARKED_P): New macro.
17986         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
17987         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17988         (mark_primary_bases): New function.
17989         (unmark_primary_bases): Likewise.
17990         * search.c (get_abstract_virtuals_1): Remove.
17991         (dfs_mark_primary_bases): New function.
17992         (mark_primary_bases): Likewise.
17993         (dfs_unmark_primary_bases): Likewise.
17994         (unmark_primary_bases): Likewise.
17995         (dfs_get_pure_virtuals): Likewise.
17996
17997 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
17998
17999         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
18000         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
18001         (modify_one_vtable): Adjust.
18002         (fixup_vtable_deltas1): Likewise.
18003         (override_one_vtable): Likewise.
18004         * search.c (get_abstract_virtuals_1): Likewise.
18005         (get_pure_virtuals): Likewise.
18006         (expand_upcast_fixups): Likewise.
18007         * tree.c (debug_binfo): Likewise.
18008
18009         * class.c (build_vtable): Don't return a value.  Don't rebuild
18010         vtables for bases that have already been handled.
18011         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
18012         already been handled.
18013         (modify_one_vtable): Adjust accordingly.
18014         (fixup_vtable_deltas1): Likewise.
18015         (finish_struct_1): Likewise.
18016
18017 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18018
18019         * call.c (build_new_method_call): Also check destructors.