OSDN Git Service

* call.c (print_z_candidates): Fix off by one error.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-04-24  Sylvain Pion  <Sylvain.Pion@mpi-sb.mpg.de>
2
3         * call.c (print_z_candidates): Fix off by one error.
4
5 2003-04-24  Nathan Sidwell  <nathan@codesourcery.com>
6
7         PR c++/10337
8         * call.c (joust): Don't warn about conversion ops that are exact
9         or cv-conversions. Rearrange to avoid multiple type comparisons.
10
11 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
12
13         PR c++/10471
14         * call.c (build_cxx_call): Robustify.
15
16 2003-04-23  Neil Booth  <neil@daikokuya.co.uk>
17
18         * Make-lang.in (lex.o): Remove mbchar.h.
19         * lex.c (MULTIBYTE_CHARS): Lose.
20         * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
21         in c-lex.c.
22
23 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
24
25         PR c++/9847
26         * cp-tree.h (duplicate_tag_error): Remove.
27         * class.c (duplicate_tag_error): Remove.
28         * semantics.c (begin_class_definition): Return immediately for a
29         duplicate class definition.
30
31         PR c++/10451
32         * decl.c (grokdeclarator): Correct logic for "mutable" errors.
33
34 2003-04-22  Mark Mitchell  <mark@codesourcery.com>
35
36         PR c++/10446
37         * search.c (lookup_fnfields_1): Handle empty slots in the method
38         vector.
39         
40         PR c++/10428
41         * decl.c (check_elaborated_type_specifier): New function, split
42         out from ...
43         (xref_tag): ... here.  Use the new function in more places.
44
45         * rtti.c (throw_bad_typeid): Use build_cxx_call.
46
47 2003-04-21  Mark Mitchell  <mark@codesourcery.com>
48
49         * call.c (build_over_call): Use build_cxx_call.
50         (build_cxx_call): New method, split out of build_over_call.
51         * cp-tree.h (language_function): Add can_throw.
52         (build_cxx_call): Declare it.
53         * decl.c (finish_function): If a function does not contain any
54         calls to functions that can throw an exception, indicate that
55         fact.
56         * decl2.c (mark_used): Do not defer the instantiation of
57         functions, if the current function does not throw.
58         * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
59         * pt.c (instantiate_decl): Make sure import_export_decl is called
60         before emitting things.
61         * rtti.c (throw_bad_cast): Use build_cxx_call.
62         (build_dynamic_cast_1): Likewise.
63         * typeck.c (build_function_call): Likewise.
64
65 2003-04-21  Nathan Sidwell  <nathan@codesourcery.com>
66
67         PR c++/9881
68         * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
69         expressions. Reverts my 2002-08-08 patch.
70         
71         * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
72         cheaper early exit.
73
74 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
75
76         * cp/decl2.c (start_static_storage_duration_function): Take count
77         arg, don't check if it wraps round.
78         (generate_ctor_or_dtor_function): Add locus arg, use it.
79         (generate_ctor_and_dtor_functions_for_priority): Data arg is a
80         locus.
81         (finish_file): Set line numbers to past EOF for synthesized
82         functions.
83
84 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
85
86         PR c++/10405
87         * search.c (lookup_field_1): Final scan goes backwards for
88         types, forwards for non-types.
89
90 2003-04-17  Roger Sayle  <roger@eyesopen.com>
91
92         PR c/10375
93         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
94         "nothrow" function attributes.
95
96 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
97
98         PR c++/10347
99         * pt.c (type_dependent_expression_p): Handle array new.
100
101 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
102
103         PR c++/10381
104         * parser.c (cp_parser_primary_expression): Reorganize logic for
105         dealing with name lookup failures.
106
107 2003-04-15  Jason Merrill  <jason@redhat.com>
108
109         * decl2.c (mark_used): Don't instantiate anything if
110         skip_evaluation.
111
112 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
113
114         * tree.c (build_cplus_array_type_1): Do not call
115         uses_template_parms() on a NULL index_type.
116
117 2003-04-13  Roger Sayle  <roger@eyesopen.com>
118
119         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
120
121 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
122
123         PR c++/10300
124         * init.c (build_new_1): Reorganize.
125
126 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
127
128         * class.c (initialize_array)
129         * decl.c (reshape_init)
130         * decl2.c (build_expr_from_tree)
131         * init.c (build_zero_init)
132         * pt.c (tsubst_copy, tsubst_copy_and_build)
133         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
134         (ptm_initializer, class_initializer, get_pseudo_ti_init)
135         * semantics.c (finish_compound_literal)
136         * typeck.c (build_ptrmemfunc1)
137         * typeck2.c (store_init_value, process_init_constructor)
138         (build_functional_cast): Use build_constructor.
139
140 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
141
142         * call.c (print_z_candidates): Use gcc_gettext_width, not
143         strlen, to determine how much padding to use.
144
145 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
146
147         * decl.c: Update all calls to shadow_warning.
148
149 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
150
151         * class.c (layout_class_type): Correct handling for overlong
152         bit-fields whose width is the same as an integer type.
153
154 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
155
156         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
157         * cp-lang.c (cp_tree_size): New function.
158         (LANG_HOOKS_TREE_SIZE): Override.
159
160         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
161         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
162         (union lang_tree_node): Remove common and srcloc members.
163         (build_srcloc_here): Don't prototype.
164         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
165         * pt.c (pending_templates): Correct comment.
166         * tree.c (build_srcloc, build_srcloc_here): Kill.
167
168 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
169
170         * call.c: Include intl.h.
171         (print_z_candidate): Always use inform; get rid of errfn
172         argument. Reorganize so that all the strings get picked up
173         by xgettext.  Note obligation of caller to pass first argument
174         through gettext.
175         (print_z_candidates): Update to match.  Indent second and
176         successive candidates by strlen() of translated message.
177         (joust): Restructure ambiguous-conversion pedwarn so that
178         translators see a complete sentence.  Update calls to
179         print_z_candidate.
180
181         * Make-lang.in (cp/call.o): Update dependencies.
182
183 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
184
185         * decl.c (set_current_binding_level): Delete, revert last change.
186         (current_binding_level): Modify to allow it as as lvalue.
187
188 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
189
190         * name-lookup.c (find_binding): Pass appropriate pointer type to
191         POP_TIMEVAR_AND_RETURN.
192
193 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
194
195         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
196         * cp-tree.h: Don't insist on having GNUC.
197
198 2003-04-03  Jason Merrill  <jason@redhat.com>
199
200         * cvt.c (ocp_convert): Only abort if we try to convert an object
201         of TREE_ADDRESSABLE type.
202
203         * class.c (build_vtable): Set DECL_ALIGN here.
204         (get_vtable_decl): Not here.
205         (layout_vtable_decl): Or here.
206         (create_vtable_ptr): Or here.
207         (layout_class_type): Or here.
208         (check_bitfield_decl): Don't mess with field alignment.
209
210 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
211
212         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
213         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
214         * rtti.c (dfs_class_hint_mark): Likewise.
215
216         * decl.c (push_local_name, push_class_level_binding,
217         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
218         functions returning void.
219         * decl2.c (add_using_namespace): Likewise.
220
221         * decl.c (print_binding_level, print_other_binding_stack,
222         print_binding_stack): Cast argument of %p specifier to void*.
223         * ptree.c (cxx_print_decl): Likewise.
224
225         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
226         VAR_FUNCTION_OR_PARM_DECL_CHECK,
227         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
228         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
229         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
230
231         * decl.c (set_current_binding_level): New macro.  Use throughout
232         when setting the current binding level.
233
234         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
235         in enum.
236         * method.c (mangling_flags): Likewise.
237
238         * cp-tree.h (lang_type_header): Add __extension__ and use
239         CHAR_BITFIELD for members.
240
241 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
242
243         PR other/9274
244         * mangle.c: Include gt-cp-mangle.h.
245         (subst_identifiers): Mark with GTY.
246         * config-lang.in (gtfiles): Add cp/mangle.c.
247         * Make-lang.in: (gt-cp-mangle.h): New rule.
248         (cp/mangle.o): Depends on gt-cp-mangle.h.
249
250 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
251
252         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
253         after \$(srcdir)/cp/name-lookup.h.
254         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
255         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
256         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
257         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
258
259 2003-03-31  Jason Merrill  <jason@redhat.com>
260
261         PR java/10145
262         * class.c (check_field_decl): Don't set DECL_ALIGN.
263
264 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
265
266         PR c++/7647
267         * decl.c (grokdeclarator): Tidy, slightly.
268         * search.c (lookup_field_1): Add want_type parameter.
269         (lookup_field_r): Adjust call to lookup_field_1.
270
271 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
272
273         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
274
275 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
276
277         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
278         prototype.
279         (cxx_scope_find_binding_for_name): Likewise.
280         * decl.c (find_binding: Move to name-lookup.c.
281         (binding_for_name): Likewise.
282         (cxx_scope_find_binding_for_name): Likewise.
283         (BINDING_LEVEL):  Remove.
284         (push_binding): Tidy.
285         (push_class_binding): Likewise.
286         (pop_binding): Likewise.
287         (poplevel): Likewise.
288         (poplevel_class): Likewise.
289         (set_identifier_type_value_with_scope): Likewise.
290         (push_overloaded_decl): Likewise.
291         (lookup_tag): Likewise.
292         (unqualified_namespace_lookup): Likewise.
293         (lookup_name_current_level): Likewise.
294         (maybe_inject_for_scope_var): Likewise.
295         (namespace_binding): Move to name-lookup.c.
296         (set_namespace_binding): Likewise.
297         * decl2.c (lookup_using_namespace): Tidy.
298         (qualified_lookup_using_namespace): Likewise.
299         (do_toplevel_using_decl): Likewise.
300         * name-lookup.c: Include "timevar.h"
301         * name-lookup.h (cxx_scope):  Declare.
302         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
303         member declaration.
304         (BINDING_SCOPE): Adjust definition.
305         (BINDING_HAS_LEVEL_P): Remove.
306
307 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
308
309         * name-lookup.c: New file.
310         * name-lookup.h: Likewise..
311         * decl.c (push_binding): Adjust use cxx_binding_make.
312         (free_bindings): Move to name-lookup.c
313         (pop_binding): Use cxx_binding_free.
314         (binding_for_name): Tidy.
315         * cp-tree.h: Include "name-lookup.h"
316         (cxx_binding_make): Move to name-lookup.h
317         (cxx_binding_clear): Likewise.
318         (struct cxx_binding): Likewise.
319         (LOCAL_BINDING_P): Likewise.
320         (INHERITED_VALUE_BINDING_P): Likewise.
321         (BINDING_SCOPE): Likewise.
322         (BINDING_HAS_LEVEL_P): Likewise.
323         (BINDING_VALUE): Likewise.
324         (BINDING_TYPE): Likewise.
325         * config-lang.in (gtfiles): Add cp/name-lookup.h
326         * Make-lang.in (cp/name-lookup.o): New rule.
327         (CXX_OBJS): Add cp/name-lookup.o
328         (CXX_TREE_H): Add cp/name-lookup.h
329
330 2003-03-28  Jason Merrill  <jason@redhat.com>
331
332         PR c++/10245
333         * cvt.c (force_rvalue): New fn.
334         * call.c (build_conditional_expr): Use it.
335         * cp-tree.h: Declare it.
336
337 2003-03-28  Mike Stump  <mrs@apple.com>
338
339         * error.c (dump_expr): Add 0x to printed hex numbers to make
340         output match source code better.
341
342 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
343
344         PR c++/10218
345         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
346         definitions.
347
348         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
349         non-existant ssdf_decls array.
350         (finish_file): Call generator_ctor_or_dtor_function when there are
351         static constructors or destructors and no other static
352         initializations.
353
354 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
355
356         PR c++/10047
357         * decl2.c (finish_file): Don't warn about explicitly instantiated
358         inline decls.
359
360 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
361
362         PR c++/10224
363         * pt.c (lookup_template_class): Only check instantiated args if
364         they do not contain template parameters.
365
366 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
367
368         PR c++/10158
369         * parser.c (cp_parser_function_definition): Set
370         DECL_INITIALIZED_IN_CLASS for members.
371         * pt.c (instantiate_decl): Only reduce the template args for
372         friends that are not defined in class.
373
374 2003-03-25  Jason Merrill  <jason@redhat.com>
375
376         * call.c (print_z_candidate): Change name of first arg to msgid.
377         (joust): Add comment for translators.
378
379 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
380
381         PR c++/9898, PR c++/383, DR 322
382         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
383         through reference types on both PARM and ARG.
384
385 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
386
387         PR c++/10119
388         * error.c (dump_expr) <BASELINK>: Use dump_expr.
389         * pt.c (maybe_fold_nontype_args): New function.
390         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
391         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
392         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
393         maybe_fold_nontype_args.
394
395 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
396
397         PR c++/10026
398         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
399
400 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
401
402         PR c++/7086
403         * typeck.c (cxx_mark_addressable):  Adjust call to
404         gen_mem_addressof or put_var_into_stack.
405
406 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
407
408         PR c++/9978, c++/9708
409         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
410         * call.c (add_template_candidate_real): Adjust
411         instantiate_template call.
412         * class.c (resolve_address_of_overloaded_function): Likewise.
413         * decl.c (build_enumerator): Set TREE_CONSTANT.
414         * pt.c (check_instantiated_args): New.
415         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
416         TREE_READONLY.
417         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
418         (reduce_template_parm_level): Likewise.
419         (process_template_parm): Likewise.
420         (check_explicit_specialization): Adjust instantiate_template call.
421         (convert_template_argument): Don't check non-type argument here.
422         (lookup_template_class): Check them here.
423         (tsubst_friend_function): Adjust instantiate_template call.
424         (instantiate_template): Add tsubst_flags parameter, use it. Check
425         instantiated args.
426
427 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
428
429         * decl.c: Update calls to shadow_warning.
430
431 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
432
433         PR c++/9898
434         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
435         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
436
437 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
438
439         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
440         friends.
441         * cp/pt.c (instantiate_class_template): Fix formatting.
442
443 2003-03-14  Matt Austern  <austern@apple.com>
444
445         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
446         (unemitted_tinfo_decl_p): Remove.
447         (emit_tinfo_decl): Change declaration to remove unused parameter.
448         * decl2.c (finish_file): Change tinfo emission to loop through
449         unemitted_tinfo_decls array instead of looping through all decls.
450         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
451         unused second parameter.
452         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
453         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
454         (emit_tinfo_decl): remove unused second parameter, add assertion
455         that decl hasn't already been emitted.
456
457 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
458
459         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
460         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
461         return statements.
462
463 2003-03-19  Jason Merrill  <jason@redhat.com>
464
465         PR c++/8316, c++/9315, c++/10136
466         * call.c (print_z_candidate): Split out from...
467         (print_z_candidiates): ...here.
468         (joust): Use it.
469
470 2003-03-17  Roger Sayle  <roger@eyesopen.com>
471
472         PR c++/10031
473         * decl.c (duplicate_decls): Use the new type when prototyping
474         anticipated decls, even when the types match.  This defines the
475         exception list for the built-in function.
476
477 2003-03-17  Jason Merrill  <jason@redhat.com>
478
479         PR c++/10091
480         * typeck.c (build_class_member_access_expr): Compare
481         TYPE_MAIN_VARIANTs.
482
483 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
484
485         PR c++/9639
486         * parser.c (cp_parser_declarator_id): Clear parser->scope.
487
488 2003-03-16  Jason Merrill  <jason@redhat.com>
489
490         PR c++/9993
491         * decl.c (finish_function): Only allow the NRVO to use variables
492         declared at function scope.
493
494 2003-03-17  Andreas Jaeger  <aj@suse.de>
495
496         * Make-lang.in (cp/TAGS): Remove.
497
498 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
499
500         PR c++/9629
501         * cp-tree.h (struct language_function): Add in_base_initializer.
502         (in_base_initializer): define it.
503         (expand_member_init): Remove INIT param.
504         * init.c (expand_member_init): Remove INIT param, return the member.
505         (emit_mem_initializers): Set in_base_initializer.
506         * class.c (build_base_path): Check in_base_initializer.
507         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
508         * pt.c (tsubst_initializer_list): Likewise.
509
510 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
511
512         * decl.c (binding_for_name): Fix initialization thinko.
513
514 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
515
516         Compile-time improvement: 2/n.
517         * cp-tree.h (struct cxx_binding): New datatype;
518         (struct lang_identifier): Use it.
519         (LOCAL_BINDING_P): Adjust definition.
520         (INHERITED_VALUE_BINDING_P): Likewise.
521         (BINDING_SCOPE): Likewise.
522         (BINDING_HAS_LEVEL_P): Likewise.
523         (BINDING_VALUE): Likewise.
524         (BINDING_TYPE): Likewise.
525         (IDENTIFIER_VALUE): Likewise.
526         (struct tree_binding): Remove.
527         (TS_CP_BINDING): Likewise.
528         ((union lang_tree_node): Remove field "binding".
529         (cxx_binding_clear): New macro.
530         (binding_for_name): Adjust return type.
531         (qualified_lookup_using_namespace): Adjust prototype.
532         (lookup_using_namespace): Adjust prototype.
533         (cxx_scope_find_binding_for_name): Declare.
534         * cp-tree.def: Remove CPLUS_BINDING definition.
535         * decl.c (push_binding): Adjust local variable type.
536         (add_binding): Likewise.
537         (push_class_binding): Likewise.
538         (pop_binding): Likewise.
539         (poplevel): Likewise.
540         (poplevel_class): Likewise.
541         (free_bindings):  Adjust type.
542         (find_binding): Adjust return type, add a third parameter. Remove
543         non-useful assertion now that we use static typing.
544         (cxx_scope_find_binding_for_name): New function.
545         (binding_for_name): Use it.  Adjust local variable type. Simplify.
546         (namespace_binding):  Simplify.
547         (set_namespace_binding): Likewise.
548         (set_identifier_type_value_with_scope): Adjust local variable type.
549         (lookup_tag): Don't type-abuse of local variable 'old'.
550         (lookup_namespace_name): Likewise.  Allocate binding on stack.
551         (select_decl): Adjust prototype.
552         (unqualified_namespace_lookup):  Allocate binding on stack.
553         Don't type-abuse of local variable 'val'.
554         (lookup_name_real): Likewise.
555         (maybe_inject_for_scope_var): Adjust local variable type.
556         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
557         (namespace_binding): Adjust logic, simplify.
558         (BINDING_LEVEL): Adjust definition.
559         (push_class_level_binding): Adjust local variable type.
560         (struct cxx_saved_binding): Adjust field 'binding' type.
561         * decl2.c (ambiguous_decl): Adjust prototype.
562         (lookup_using_namespace): Adjust local variable type.
563         (qualified_lookup_using_namespace): Catch type error and correct
564         ensueing logic error.
565         (do_nonmember_using_decl): Adjust local variable type.  Allocate
566         temporary cxx_binding on stack.
567         (do_toplevel_using_decl): Adjust local variable type.
568         * ptree.c (cxx_print_cxx_binding): New function.
569         (cxx_print_identifier): Use it.
570         (cxx_print_xnode): Delete CPLUS_BINDING case label.
571
572 2003-03-15  Roger Sayle  <roger@eyesopen.com>
573
574         * tree.c (count_functions): Fix whitespace.
575
576 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
577
578         * Make-lang.in: Update.
579
580 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
581
582         PR c++/6440
583         * pt.c (maybe_process_partial_specialization): Handle
584         member class template when enclosing class template is
585         explicit specialized.
586         (most_general_template): Stop looking when DECL is already
587         specialized.
588
589 2003-03-13  Jason Merrill  <jason@redhat.com>
590
591         PR c++/9420
592         * search.c (lookup_conversions): Call complete_type here.
593         * call.c (implicit_conversion): Not here.
594
595 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
596
597         * decl2.c (do_nonmember_using_decl): Correct handling of
598         simultaneous type/non-type bindings.
599
600         * call.c (initialize_reference): Remove bogus assertion.
601         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
602
603 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
604
605         PR c++/7050
606         * expr.c (cxx_expand_expr): Return const0_rtx for throw
607         expressions.
608
609 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
610
611         PR c++/9474
612         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
613         to merge old and new declarations.
614
615 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
616
617         * g++.1: Remove.
618         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
619         (cp/g++.1): Build it from scratch in the build tree.
620         (c++.install-man): Depend on it.  Install it from the build tree.
621         (c++.mostlyclean): Clean it.
622
623 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
624
625         PR c++/9474
626         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
627         to merge old and new declarations.
628
629         PR c++/9924
630         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
631
632 2003-03-11  Jason Merrill  <jason@redhat.com>
633
634         PR c++/9820
635         * search.c (lookup_member): Fix handling of functions in a class
636         being defined.
637
638 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
639
640         PR c++/8700
641         * call.c (convert_class_to_reference): Adjust usage of
642         splice_viable.
643         (any_viable): Remove.
644         (splice_viable): Combine with any_viable.
645         (print_z_candidates): Avoid printing duplicates.
646         (build_user_type_conversion_1): Adjust usage of splice_viable.
647         (build_new_function_call): Likewise.
648         (build_operator_new_call): Likewise.
649         (build_object_call): Likewise.
650         (build_conditional_expr): Likewise.
651         (build_new_op): Likewise.
652         (build_new_method_call): Likewise.
653         (joust): Remove spurious comment.
654         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
655         * decl2.c (arg_assoc_class): Simplify.
656         * friend.c (add_friend): Likewise.
657
658 2003-03-11  Jason Merrill  <jason@redhat.com>
659
660         PR c++/8660
661         * decl2.c (check_classfn): A member template only matches a
662         member template.
663
664 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
665
666         * Make-lang.in (CXX_C_OBJS): Update.
667         * lang-specs.h: Don't define __GNUG__ here.
668
669 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
670
671         * call.c (perform_overload_resolution): New function.
672         (build_new_function_call): Use it.
673         (build_operator_new_call): Likewise.
674         (add_candidates): Add explicit_targs and template_only parameters.
675         (build_new_op): Adjust accordingly.
676         * cp-tree.h (build_operator_new_call): New function.
677         (build_function_call_real): Remove.
678         (build_function_call_maybe): Likewise.
679         * init.c (build_new_1): Use build_operator_new_call.
680         * typeck.c (build_function_call_real): Rename to ...
681         (build_function_call): ... this.
682
683 2003-03-10  Devang Patel  <dpatel@apple.com>
684
685         PR c++/9394
686         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
687
688 2003-03-10  Jason Merrill  <jason@redhat.com>
689
690         PR c++/9798
691         * decl.c (push_using_directive): Push before recursing.
692
693         PR c++/9868, c++/9524
694         * call.c (resolve_scoped_fn_name): Handle the case of a function
695         pointer member.
696
697         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
698         argument in the pointer-to-member case.
699
700 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
701
702         PR c++/9373
703         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
704         pointers to member functions.
705
706         PR c++/8534
707         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
708         in pointer-to-member-function types.
709
710 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
711
712         * expr.c (cplus_expand_constant): Use C90 prototype style.
713         (cxx_expand_expr): Likewise.
714
715 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
716
717         PR c++/9970
718         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
719         functions.
720
721 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
722
723         * lang-specs.h (c++-header): Change .pch to .gch.
724
725 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
726
727         * cp-tree.h (cxx_init): Update prototype.
728         * lex.c (cxx_init): Similarly.
729
730 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
731
732         PR c++/9823
733         * cp-tree.h (begin_mem_initializers): Remove.
734         * parser.c (cp_parser_mem_initializer_list): Inline it here.
735         Do not call finish_mem_initializers if not in a constructor.
736         (cp_parser_class_head): Fix typo in error message.
737         * semantics.c (begin_mem_initializers): Remove.
738         * testsuite/g++.dg/parser/constructor1.C: New test.
739
740         PR c++/9809
741         * call.c (add_function_candidate): Skip builtin fuctions that have
742         not yet been declared.
743
744         PR c++/9982
745         * init.c (build_new_1): Correct logic for determining whether or
746         not to use an array cookie.
747
748         PR c++/9524
749         * parser.c (cp_parser_postfix_expression): Call
750         finish_non_static_data_member, even when processing_template_decl.
751
752         PR c++/9912
753         * cp-tree.h (is_ancestor): New function.
754         (handle_class_head): Change prototype.
755         * decl2.c (is_namespace_ancestor): Rename to ...
756         (namespace_anecestor): ... this.
757         (set_decl_namespace): Adjust accordingly.
758         (handle_class_head): Remove unncessary parameters.
759         * parser.c (cp_parser_class_head): Check that
760         nested-name-specifiers are used appropriately.
761
762 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
763
764         * call.c (reference_binding): Remove REF_IS_VAR parameter.
765         (implicit_conversion): Adjust call to reference_binding.
766         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
767         (initialize_reference): Adjust handling for references bound to
768         rvalues.
769         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
770         prototype.
771         (real_non_cast_lvalue_p): New method.
772         * cvt.c (build_up_reference): Adjust use of
773         make_temporary_var_for_ref_to_temp.
774         * tree.c (real_non_cast_lvalue_p): New method.
775
776 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
777
778         * except.c (init_exception_processing): Use C90 prototype style.
779         (cp_protect_cleanup_actions): Likewise.
780         (prepare_eh_type): Likewise.
781         (build_eh_type_type): Likewise.
782         (build_exc_ptr): Likewise.
783         (do_begin_catch): Likewise.
784         (dtor_nothrow): Likewise.
785         (do_end_catch): Likewise.
786         (push_eh_cleanup): Likewise.
787         (decl_is_java_type): Likewise.
788         (choose_personality_routine): Likewise.
789         (initialize_handler_parm): Likewise.
790         (expand_start_catch_block): Likewise.
791         (expand_end_catch_block): Likewise.
792         (begin_eh_spec_block): Likewise.
793         (finish_eh_spec_block): Likewise.
794         (do_allocate_exception): Likewise.
795         (do_free_exception): Likewise.
796         (wrap_cleanups_r): Likewise.
797         (stabilize_throw_expr): Likewise.
798         (build_throw): Likewise.
799         (complete_ptr_ref_or_void_ptr_p): Likewise.
800         (is_admissible_throw_operand): Likewise.
801         (nothrow_libfn_p): Likewise.
802         (can_convert_eh): Likewise.
803         (check_handlers_1): Likewise.
804         (check_handlers): Likewise.
805
806 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
807
808         * call.c (merge_conversion_sequences): New function.
809         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
810         (convert_class_to_reference): Correct handling of second
811         standard conversion sequence in a user-defined conversion
812         sequence.
813         (build_user_type_conversion_1): Use merge_conversion_sequences.
814         * cp-tree.def: Add comments for CONV nodes.
815         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
816
817 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
818
819         * error.c (init_error): Use C90 prototype style.
820         (dump_scope): Likewise.
821         (dump_qualifiers): Likewise.
822         (dump_template_argument): Likewise.
823         (dump_template_argument_list): Likewise.
824         (dump_template_parameter): Likewise.
825         (dump_template_bindings): Likewise.
826         (dump_type): Likewise.
827         (dump_typename): Likewise.
828         (class_key_or_enum): Likewise.
829         (dump_aggr_type): Likewise.
830         (dump_type_prefix): Likewise.
831         (dump_type_suffix): Likewise.
832         (dump_global_iord): Likewise.
833         (dump_simple_decl): Likewise.
834         (dump_decl): Likewise.
835         (dump_template_decl): Likewise.
836         (dump_function_decl): Likewise.
837         (dump_parameters): Likewise.
838         (dump_exception_spec): Likewise.
839         (dump_function_name): Likewise.
840         (dump_template_parms): Likewise.
841         (dump_char): Likewise.
842         (dump_expr_list): Likewise.
843         (dump_expr): Likewise.
844         (dump_binary_op): Likewise.
845         (dump_unary_op): Likewise.
846         (type_as_string): Likewise.
847         (expr_as_string): Likewise.
848         (decl_as_string): Likewise.
849         (context_as_string): Likewise.
850         (lang_decl_name): Likewise.
851         (cp_file_of): Likewise.
852         (cp_line_of): Likewise.
853         (decl_to_string): Likewise.
854         (expr_to_string): Likewise.
855         (fndecl_to_string): Likewise.
856         (code_to_string): Likewise.
857         (language_to_string): Likewise.
858         (parm_to_string): Likewise.
859         (op_to_string): Likewise.
860         (type_to_string): Likewise.
861         (assop_to_string): Likewise.
862         (args_to_string): Likewise.
863         (cv_to_string): Likewise.
864         (cxx_print_error_function): Likewise.
865         (cp_diagnostic_starter): Likewise.
866         (cp_diagnostic_finalizer): Likewise.
867         (cp_print_error_function): Likewise.
868         (function_category): Likewise.
869         (print_instantiation_full_context): Likewise.
870         (print_instantiation_partial_context): Likewise.
871         (maybe_print_instantiation_context): Likewise.
872         (print_instantiation_context): Likewise.
873         (cp_printer): Likewise.
874         (print_integer): Likewise.
875         (print_non_consecutive_character): Likewise.
876         (locate_error): Likewise.
877
878 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
879
880         PR c++/9965
881         * call.c (reference_binding): Add ref_is_var parameter.
882         (implicit_conversion): Adjust call to reference_binding.
883         (initialize_reference): Likewise.
884
885         PR c++/9400
886         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
887         PARM_DECLs.
888
889         PR c++/9791
890         * class.c (get_basefndecls): Use lookup_fnfields_1.
891
892 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
893
894         PR c++/9188
895         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
896         in error message.
897         (cp_parser_single_declaration): Likewise.
898
899 2003-03-05  Jason Merrill  <jason@redhat.com>
900
901         PR c++/9440
902         * call.c (build_conditional_expr): Use convert rather than an
903         explicit NOP_EXPR.
904
905 2003-03-02  Matt Austern  <austern@apple.com>
906
907         * decl.c (cp_binding_level): Add static_decls varray member.
908         (add_decl_to_level): Add static/inline namespace scope
909         declarations to static_decls array.
910         (wrapup_global_for_namespace): Pass static_decls only, instead of
911         all decls, to wrapup_global_declarations/check_global_declarations.
912         (push_namespace): Initialize static_decls for ordinary namespaces.
913         (cxx_init_decl_processing): Initialize static_decls for global
914         namespace.
915
916 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
917
918         * class.c (end_of_class): Correct thinko.
919
920 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
921
922         * config-lang.in: Replace ${libstdcxx_version} by its value.
923
924 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
925
926         * cp-tree.h (cxx_saved_binding): Declare.
927         (struct saved_scope): Adjust type of field 'old_binding'.
928         * decl.c (cxx_saved_binding_make): New macro.
929         (struct cxx_saved_binding): Define.
930         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
931         C++ bindings.
932         (maybe_push_to_top_level): Adjust local variable type.
933         (pop_from_top_level): Likewise.
934
935 2003-03-04  Tom Tromey  <tromey@redhat.com>
936
937         * Make-lang.in (c++.tags): New target.
938
939 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
940
941         * Make-lang.in: Update.
942
943 2003-03-03  Jason Merrill  <jason@redhat.com>
944
945         * decl.c (finish_enum): Do set the type in a template. Simplify.
946         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
947
948 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
949
950         PR c++/9878
951         * call.c (convert_class_to_reference): Correct conversion
952         sequences.
953         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
954         (implicit_conversion): Adjust call to reference_binding.
955         (add_candidate): Change type of candidates parameter.
956         (add_function_candidate): Likewise.
957         (add_conv_candidate): Likewise.
958         (build_builtin_candidate): Likewise.
959         (add_builtin_candidate): Likewise.
960         (add_builtin_candidates): Likewise.
961         (add_template_candidate_real): Likewise.
962         (add_template_candidate): Likewise.
963         (add_template_conv_candidate): Likewise.
964         (build_user_type_conversion_1): Adjust accordingly.
965         (build_object_call): Likewise.
966         (build_conditional_expr): Likewise.
967         (add_candidates): Likewise.
968         (build_new_op): Likewise.
969         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
970         (build_new_method_call): Adjust calls to add_function_candidate.
971         (make_temporary_var_for_ref_to_temp): New function.
972         (initialize_reference): Add decl parameter.
973         * class.c (build_rtti_vtbl_entries): Use build_address and
974         build_nop.
975         * cp-tree.h (initialize_reference): Change prototype.
976         (make_temporary_var_for_ref_to_temp): New function.
977         (build_type_conversion): Change prototype.
978         (build_address): New function.
979         (build_nop): Likewise.
980         * cvt.c (cp_convert_to_pointer): Adjust call to
981         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
982         Use build_nop.
983         (convert_to_pointer_force): Use build_nop.
984         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
985         (convert_to_reference): Adjust call to build_type_conversion.
986         (ocp_convert): Likewise.
987         (build_type_conversion): Remove for_sure parameter.
988         * decl.c (grok_reference_init): Use initialize_reference.
989         * typeck.c (build_address): New function.
990         (build_nop): Likewise.
991         (build_unary_op): Use them.
992         (build_ptrmemfunc): Tidy slightly.
993         (convert_for_initialization): Adjust call to
994         initialize_reference.
995         * typeck2.c (store_init_value): Remove #if 0'd code.
996
997 2003-03-03  Jason Merrill  <jason@redhat.com>
998
999         * decl.c (start_function): Clear DECL_NUM_STMTS.
1000
1001         * class.c (get_vtable_decl): Use vtbl_type_node.
1002         (build_primary_vtable): Check for it.
1003
1004 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
1005
1006         * decl.c (check_initializer): Check for vector_opaque_p.
1007
1008 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
1009
1010         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
1011           invoke an external cpp during compilation.
1012
1013 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1014
1015         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
1016         that of warning().
1017         (start_decl): Likewise.
1018         (start_function): Likewise.
1019
1020 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
1021
1022         * Make-lang.in (CXX_C_OBJS): Update.
1023
1024 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
1025
1026         PR c++/9892
1027         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
1028         instantiating it.
1029
1030 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
1031
1032         * parser.c (cp_parser_init_declarator): Revert opaque
1033         vector_opaque_p change.
1034         Do not include target.h.
1035
1036 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
1037
1038         PR c++/9879
1039         * cp-tree.h (build_zero_init): Add parameter.
1040         * decl.c (cp_finish_decl): Adjust call.
1041         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
1042         calls.
1043         (build_default_init): Add nelts parameter.  Adjust calls to
1044         build_zero_init.
1045         (build_new_1): Adjust call to build_default_init.
1046         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
1047
1048 2003-02-26  Devang Patel  <dpatel@apple.com>
1049
1050         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
1051         required.  Postpone enum setting for template decls.
1052         (build_enumerator): Delay copying value node until finish_enum
1053         (). Remove #if 0'ed code.
1054         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
1055         (tsubst_copy): Add check for enum type.
1056
1057 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
1058
1059         PR c++/9683
1060         * decl2.c (prune_vars_needing_no_initialization): Do not throw
1061         away initializations for DECL_EXTERNAL VAR_DECLs.
1062         (finish_file): Adjust accordingly.
1063         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
1064
1065 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
1066
1067         * decl.c (add_binding): Time TV_NAME_LOOKUP.
1068         (push_class_binding): Likewise.
1069         (set_namespace_binding): Likewise.
1070
1071 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
1072
1073         PR c++/9836
1074         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
1075         specializations back to the main template.
1076         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
1077         * pt.c (resolve_typename_type): Likewise.
1078
1079 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
1080
1081         PR c++/9778
1082         * pt.c (tsubst_copy_and_build): For a templated function inside a
1083         scope, process template arguments.
1084
1085 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1086
1087         PR c++/9602
1088         * typeck2.c (abstract_virtuals_error): Don't check when
1089         TYPE is still template parameter dependent.
1090
1091 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
1092
1093         PR c++/5333
1094         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
1095         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
1096         * pt.c (instantiate_class_template): Don't try to instantiate
1097         dependent types.
1098         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
1099
1100 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
1101
1102         PR c++/9749
1103         * decl.c (grokdeclarator): Do not allow parameters with variably
1104         modified types.
1105
1106 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
1107
1108         * search.c (grow_bfs_bases): Remove. Fold into ...
1109         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
1110         in previous patch.
1111
1112 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
1113
1114         PR c++/9729
1115         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
1116         when the G++ 3.2 ABI prevents correct compilation.
1117
1118 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
1119
1120         Change base class access representation. Share virtual base
1121         binfos.
1122         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
1123         call.
1124         * cp/class.c (build_base_path): Likewise.
1125         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
1126         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
1127         (make_new_vtable): Adjust.
1128         (force_canonical_binfo_r): Delete.
1129         (force_canonical_binfo): Delete.
1130         (mark_primary_virtual_base): Delete.
1131         (dfs_unshared_virtual_bases): Delete.
1132         (mark_primary_bases): Adjust.
1133         (maybe_warn_about_overly_private_class): Adjust.
1134         (dfs_base_derived_from): Delete.
1135         (base_derived_from): Follow the inheritance chain.
1136         (struct find_final_overrider_data): Add vpath member.
1137         (dfs_find_final_overrider): Adjust.
1138         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
1139         (find_final_overrider): Adjust.
1140         (update_vtable_entry_for_fn): Adjust.
1141         (modify_all_vtables): Adjust.
1142         (walk_subobject_offsets): Adjust.
1143         (layout_nonempty_base_or_field): Adjust.
1144         (layout_empty_base): Remove last parameter. Adjust.
1145         (build_base_field): Adjust.
1146         (build_base_fields): Adjust.
1147         (propagate_binfo_offsets): Remove last parameter. Adjust.
1148         (dfs_set_offset_for_unshared_vbases): Delete.
1149         (layout_virtual_bases): Adjust.
1150         (finish_struct_1): Adjust.
1151         (init_class_processing): Don't init access nodes.
1152         (dfs_get_primary_binfo): Delete.
1153         (get_primary_binfo): Adjust.
1154         (dump_class_hierarchy_r): Remove most derived arg, add IGO
1155         parameter. Adjust.
1156         (dump_class_hierarchy): Adjust.
1157         (finish_vtbls): Adjust.
1158         (get_original_base): Delete.
1159         (build_vtt_inits): Adjust.
1160         (dfs_build_secondary_vptr_vtt_inits): Adjust.
1161         (dfs_ctor_vtable_bases_queue_p): Adjust.
1162         (build_ctor_vtbl_group): Adjust.
1163         (dfs_accumulate_vtbl_inits): Adjust.
1164         (build_vtbl_initializer): Adjust.
1165         (build_vbase_offset_vtbl_entries): Adjust.
1166         (add_vcall_offset_vtbl_entries_1): Adjust.
1167         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
1168         (access_*_node): Remove.
1169         (CANONICAL_BINFO): Delete.
1170         (BINFO_UNSHARED_MARKED): Remove.
1171         (BINFO_MARKED): Set LANG_FLAG_0 directly.
1172         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
1173         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
1174         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
1175         Delete.
1176         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
1177         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
1178         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
1179         Delete.
1180         (BINFO_DEPENDENT_BASE_P): New.
1181         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
1182         index.
1183         (markedp, unmarkedp): Adjust.
1184         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
1185         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
1186         find_vbase_instance, binfo_for_vbase): Delete.
1187         (copied_binfo, original_binfo): Declare.
1188         (finish_base_specifier): Add virtual_p arg.
1189         (unshare_base_binfos): Delete.
1190         (copy_base_binfos): Declare.
1191         (reverse_path): Delete.
1192         * cp/decl.c (xref_basetypes): Access and virtuality passed
1193         differently. Don't copy direct base binfos here. Call
1194         copy_base_binfos.
1195         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
1196         (initialize_vtbl_ptrs): Adjust.
1197         (expand_member_init): Adjust.
1198         * cp/parser.c (cp_parser_base_specifier): Adjust.
1199         * cp/pt.c (instantiate_class_template): Adjust.
1200         (get_template_base_recursive): Adjust.
1201         * cp/rtti.c (get_pseudo_ti_init): Adjust.
1202         (get_pseudo_ti_desc): Adjust.
1203         * cp/tree.c (unshare_base_binfos): Rename to ...
1204         (copy_base_binfos): ... here, reimplement.
1205         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
1206         (reverse_path): Remove.
1207         * cp/typeck.c (get_delta_difference): Adjust error messages.
1208         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
1209         * cp/search.c (lookup_base_r): Adjust.
1210         (dynamic_cast_base_recurse): Adjust.
1211         (canonical_binfo): Remove.
1212         (dfs_canonical_queue): Remove.
1213         (dfs_assert_unmarked_p): Remove.
1214         (assert_canonical_unmarked): Remove.
1215         (shared_marked_p, shared_unmarked_p): Remove.
1216         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
1217         (dfs_access_in_type): Adjust.
1218         (access_in_type): Adjust.
1219         (dfs_accessible_queue_p): Adjust.
1220         (dfs_accessible_p): Adjust.
1221         (is_subobject_of_p_1, is_subobject_of_p): Remove.
1222         (struct lookup_field_info): Remove from_dep_base_p field.
1223         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
1224         (lookup_field_r): Remove dependent base code.
1225         (lookup_member): Likewise.
1226         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
1227         (dfs_unmarked_real_bases_queue_p): Remove.
1228         (dfs_marked_real_bases_queue_p): Remove.
1229         (dfs_skip_vbases): Remove.
1230         (dfs_get_pure_virtuals): Adjust.
1231         (markedp, unmarkedp): Adjust.
1232         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
1233         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
1234         (dfs_unmark): Adjust.
1235         (dfs_get_vbase_types):Remove.
1236         (dfs_build_inheritance_graph_order): Remove.
1237         (get_vbase_types): Remove
1238         (dfs_find_vbase_instance): Remove.
1239         (find_vbase_instance): Remove.
1240         (dfs_debug_unmarkedp): Adjust.
1241         (dependent_base_p): Remove.
1242         (dfs_push_type_decls): Adjust.
1243         (dfs_push_decls): Adjust.
1244         (dfs_no_overlap_yet): Adjust.
1245         (copied_binfo): New function.
1246         (original_binfo): New function.
1247         (binfo_for_vbase): Remove.
1248
1249 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
1250
1251         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
1252         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
1253         vectors, for speed.
1254
1255 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
1256
1257         PR c++/9704
1258         * class.c (layout_class_type): In the 3.2 ABI, take into account
1259         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
1260
1261 2003-02-18  Matt Austern <austern@apple.com>
1262
1263         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
1264         nothing for C++.
1265         * cp/decl.c (wrapup_globals_for_namespace): Remove special
1266         handling of global namespace.
1267
1268 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
1269
1270         * cp-tree.h (rid_to_yy): Delete.
1271         (C_RID_YYCODE): Delete.
1272         (finish_file): Delete redundant declaration.
1273
1274 2003-02-18  Jason Merrill  <jason@redhat.com>
1275
1276         PR c++/9623
1277         * decl.c (reshape_init): Don't mess with initializer labels.
1278
1279         PR c++/9485
1280         * parser.c (cp_parser_postfix_expression): Set idk properly for
1281         object->scope::member.
1282
1283 2003-02-18  Ben Elliston  <bje@redhat.com>
1284
1285         PR other/7350
1286         * decl.c (duplicate_decls): Fix typo in comment.
1287
1288 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
1289
1290         PR debug/9717
1291         * class.c (build_base_field): Mark fields for base classes with
1292         DECL_IGNORED_P.
1293
1294 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1295
1296         PR c++/9457
1297         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
1298         CONSTRUCTOR_ELTS only once.
1299
1300 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1301
1302         PR c++/9459
1303         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
1304         (dump_type_suffix): Likewise.
1305
1306 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
1307
1308         * search.c: ANSIfy function declarations and definitions.
1309         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
1310         * call.c (build_method_call, resolve_scoped_fn_name,
1311         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
1312         calls.
1313         * class.c (handle_using_decl): Likewise.
1314         * decl.c (make_typename_type, make_unmound_class_template,
1315         start_decl, compute_array_index_type): Likewise.
1316         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
1317         * init.c (expand_member_init, build_member_call): Likewise.
1318         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
1319         resolve_typename_type): Likewise.
1320         * typeck.c (lookup_destructor, finish_class_member_access_exprm
1321         build_prememfunc_access_expr): Likewise.
1322
1323 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
1324
1325         * decl2.c: Include "timevar.h".
1326         (namespace_ancestor): Time name lookup.
1327         (add_using_namespace): Likewise.
1328         (lookup_using_namespace): Likewise.
1329         (qualified_lookup_using_namespace): Likewise.
1330         (decl_namespace): Likewise.
1331         (lookup_arg_dependent): Likewise.
1332         * lex.c (do_identifier): Likewise.
1333         (do_scoped_id): Likewise.
1334         * pt.c (lookup_template_class): Likewise.
1335
1336 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
1337
1338         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
1339
1340 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1341
1342         * decl.c: Include "timevar.h".
1343         (poplevel): Time name lookup.
1344         (find_binding): Likewise.
1345         (push_namespace): Likewise.
1346         (pop_nested_namespace): Likewise.
1347         (store_bindings): Likewise.
1348         (maybe_push_to_top_level): Likewise.
1349         (pop_from_top_level): Likewise.
1350         (push_local_name): Likewise.
1351         (pushtag): Likewise.
1352         (pushdecl): Likewise.
1353         (pushdecl_with_scope): Likewise.
1354         (pushdecl_namespace_level): Likewise.
1355         (pushdecl_top_level): Likewise.
1356         (pushdecl_class_level): Likewise.
1357         (push_class_level_binding): Likewise.
1358         (push_using_decl): Likewise.
1359         (push_using_directive): Likewise.
1360         (push_overloaded_decl): Likewise.
1361         (lookup_label): Likewise.
1362         (define_label): Likewise.
1363         (lookup_tag): Likewise.
1364         (lookup_tag_reverse): Likewise.
1365         (lookup_namespace_name): Likewise.
1366         (select_decl): Likewise.
1367         (unqualified_namespace_lookup): Likewise.
1368         (lookup_name_real): Likewise.
1369         (lookup_name_current_level): Likewise.
1370         (lookup_type_current_level): Likewise.
1371         (maybe_inject_for_scope_var): Likewise.
1372         (xref_tag): Likewise.
1373
1374         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
1375
1376 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
1377
1378         * decl.c (build_enumerator):  Remove unneeded test.
1379
1380 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
1381
1382         * cp-tree.h (struct lang_type_header): Make all fields unsigned
1383         char.
1384
1385 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
1386
1387         PR c++/7129
1388         * call.c (z_candidate): Add args.
1389         (convert_class_to_reference): Set it.
1390         (implicit_conversion): Tidy.
1391         (add_candidate): Add args parameter.
1392         (add_function_candidate): Adjust call to add_candidate.
1393         (add_conv_candidate): Likewise.
1394         (build_builtin_candidate): Likewise.
1395         (build_user_type_conversion_1): Eliminate wasteful tree_cons
1396         usage.
1397         (build_new_function_call): Likewise.
1398         (build_object_call): Likewise.
1399         (add_candidates): New function.
1400         (build_new_op): Use it.
1401         (covert_like_real): Adjust call to build_over_call.
1402         (build_over_call): Remove args parameter.
1403         * operators.def: Add <?= and >?=.
1404
1405 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
1406
1407         * typeck.c (build_indirect_ref): Don't check flag_volatile.
1408
1409 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1410
1411         PR c++/8849
1412         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
1413
1414 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
1415
1416         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
1417         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
1418         (BINFO_LANG_ELTS): New #define.
1419         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
1420
1421 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
1422
1423         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
1424
1425 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
1426
1427         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
1428         for class types.
1429         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
1430         rather than TYPE_LANG_FLAG_0.
1431         (TYPE_BUILT_IN): Remove.
1432         (TYPE_DEPENDENT_P): New macro.
1433         (TYPE_DEPENDENT_P_VALID): Likewise.
1434         (lang_type_class): Add fields_readonly.
1435         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
1436         * pt.c (dependent_type_p_r): New function, split out from ...
1437         (dependent_type_p): ... here.  Memoize results.
1438         * search.c (dependent_base_p): Use dependent_type_p, not
1439         uses_template_parms.
1440         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
1441         for class types.
1442
1443 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
1444
1445         * call.c (build_field_call): Use build_new_op, not build_opfncall.
1446         (prep_operand): New function.
1447         (build_new_op): Use it.  Remove dead code.
1448         * class.c (pushclass): Change "modify" parameter type from int to
1449         bool.
1450         (currently_open_class): Use same_type_p, not pointer equality.
1451         (push_nested_class): Adjust calls to pushclass, remove modify
1452         parameter.
1453         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
1454         (pushclass): Change prototype.
1455         (push_nested_class): Likewise.
1456         (grokoptypename): Remove.
1457         (build_opfncall): Remove.
1458         (value_dependent_expression_p): Declare.
1459         (resolve_typename_type): Likewise.
1460         (resolve_typename_type_in_current_instantiation): Likewise.
1461         (enter_scope_of): Remove.
1462         (tsubst): Remove.
1463         (tsubst_expr): Likewise.
1464         (tsubst_copy): Likewise.
1465         (tsubst_copy_and_build): Likewise.
1466         * decl.c (warn_about_implicit_typename_lookup): Remove.
1467         (finish_case_label): Return error_mark_node for erroneous labels.
1468         (start_decl): Adjust calls to push_nested_class.
1469         (grokfndecl): Call push_scope/pop_scope around call to
1470         duplicate_decls.
1471         (grokdeclarator): Do not call tsubst.
1472         (start_function): Adjust calls to push_nested_class.
1473         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
1474         (check_classfn): Use push_scope/pop_scope around type comparisions.
1475         (grokoptypename): Remove.
1476         (push_sscope): Adjust call to push_nested_class.
1477         * error.c (dump_type): Show cv-qualification of typename types.
1478         * init.c (build_member_call): Use build_new_op, not
1479         build_opfncall.
1480         * method.c (build_opfncall): Remove.
1481         * parser.c (cp_parser): Add allow_non_constant_expression_p and
1482         non_constant_expression_p.
1483         (cp_parser_constant_expression): Adjust prototype.
1484         (cp_parser_resolve_typename_type): Remove.
1485         (cp_parser_non_constant_expression): New function.
1486         (cp_parser_non_constant_id_expression): Likewise.
1487         (cp_parser_new): Set allow_non_constant_expression_p and
1488         non_constant_expression_p.
1489         (cp_parser_primary_expression): Reject `this' and `va_arg' in
1490         constant-expressions.  Note that dependent names aren't really
1491         constant.
1492         (cp_parser_postfix_expression): Reject conversions to non-integral
1493         types in constant-expressions.  Neither are increments or
1494         decrements.
1495         (cp_parser_unary_expression): Reject increments and decrements in
1496         constant-expressions.
1497         (cp_parser_direct_new_declarator): Adjust call to
1498         cp_parser_constant_expression.
1499         (cp_parser_cast_expression): Reject conversions to non-integral
1500         types in constant-expressions.
1501         (cp_parser_assignment_expression): Rejects assignments in
1502         constant-expressions.
1503         (cp_parser_expression): Reject commas in constant-expressions.
1504         (cp_parser_labeled_statement): Adjust call to
1505         cp_parser_constant_expression.
1506         (cp_parser_direct_declarator): Simplify array bounds, even in
1507         templates, when they are non-dependent.  Use
1508         resolve_typename_type, not cp_parser_resolve_typename_type.
1509         (cp_parser_class_head): Use resolve_typename_type, not
1510         cp_parser_resolve_typename_type.
1511         (cp_parser_member_declaration): Adjust call to
1512         cp_parser_constant_expression.
1513         (cp_parser_constant_initializer): Likewise.
1514         (cp_parser_constructor_declarator): Use resolve_typename_type, not
1515         cp_parser_resolve_typename_type.
1516         (cp_parser_late_parsing_default_args): Adjust call to
1517         push_nested_class.
1518         * pt.c (tsubst): Give it internal linkage.
1519         (tsubst_expr): Likewise.
1520         (tsubst_copy): Likewise.
1521         (tsubst_copy_and_build): Likewise.
1522         (push_access_scope_real): Likewise.
1523         (tsubst_friend_class): Likewise.
1524         (instantiate_class_template): Adjust call to pushclass.
1525         (value_dependent_expression_p): Give it external linkage.
1526         Robustify.
1527         (resolve_typename_type): New function.
1528         * semantics.c (finish_call_expr): Use build_new_op, not
1529         build_opfncall.
1530         (begin_constructor_declarator): Remove.
1531         (begin_class_definition): Adjust call to pushclass.
1532         (enter_scope_of): Remove.
1533         * typeck.c (comptypes): Resolve typename types as appropriate.
1534         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
1535         (build_x_compound_expr): Likewise.
1536         (build_modify_expr): Likewise.
1537         (build_x_modify_expr): Likewise.
1538         * typeck2.c (build_x_arrow): Likewise.
1539
1540 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
1541
1542         * pt.c (last_pending_template) Declare GTY().
1543
1544 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1545
1546         PR c++/8591
1547         * parser.c (cp_parser_elaborated_type_specifier): Convert
1548         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
1549         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
1550
1551 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
1552
1553         PR c++/9437
1554         * pt.c (unify): Don't unify '*T' with 'U C::*'.
1555
1556         PR c++/3902
1557         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
1558         inside a declarator.
1559
1560 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
1561
1562         * class.c (update_vtable_entry_for_fn): Add index parameter.
1563         Generate vcall thunk for covariant overriding from a virtual
1564         primary base.
1565         (dfs_modify_vtables): Adjust.
1566
1567 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
1568
1569         PR c++/9403
1570         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
1571         template keyword.
1572         (cp_parser_base_specifier): Look for and consume a
1573         TEMPLATE keyword. Replace switch with array index.
1574
1575         PR c++/795
1576         * semantics.c (finish_non_static_data_member): Remember the
1577         field's type even in a template.
1578
1579         PR c++/9415
1580         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
1581         already scoped.
1582
1583         PR c++/8545
1584         * parser.c (cp_parser_cast_expression): Be more tentative.
1585
1586 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1587
1588         * cp-tree.h (flagged_type_tree_s): Remove.
1589         (check_for_new_type): Likewise.
1590         * typeck2.c (check_for_new_type): Likewise.
1591
1592 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
1593
1594         * dump.c: ANSIfy function declarations and definitions.
1595
1596         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
1597
1598 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1599
1600         PR c++/9354
1601         * init.c (build_new): Set the type of the new-expression, even
1602         when processing_templte_decl.
1603
1604         PR c++/9216
1605         * parser.c (cp_parser_primary_expression): Improve error message
1606         for templates used in an expression context.
1607
1608         PR c++/8696
1609         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
1610         parse when encountering "typedef".
1611
1612 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
1613
1614         * class.c, parser.c: ANSIfy function definitions and declarations.
1615
1616 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1617
1618         PR c++/9328
1619         * error.c (dump_decl): For an OVERLOAD, just print the name of the
1620         function; it doesn't make sense to try to print its type.
1621         * semantics.c (finish_typeof): Issue errors about invalid uses.
1622
1623         PR c++/9298
1624         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
1625         function.
1626         (cp_parser_expression_statement): Use it.
1627         (cp_parser_explicit_instantiation): Likewise.
1628         * pt.c (do_decl_instantiation): Improve error handling logic.
1629
1630 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1631
1632         PR c++/9384
1633         * parser.c (cp_parser_using_declaration): Issue error messages
1634         about name resolution failures here.
1635
1636         PR c++/9388
1637         * class.c (currently_open_derived_class): Use dependent_type_p.
1638         * cp-tree.h (dependent_type_p): New function.
1639         (dependent_template_arg_p): Likewise.
1640         (dependent_template_p): Likewise.
1641         (type_dependent_expression_p): Likewise.
1642         * parser.c (cp_parser_dependent_type_p): Remove.
1643         (cp_parser_value_dependent_type_p): Likewise.
1644         (cp_parser_type_dependent_expression_p): Likewise.
1645         (cp_parser_dependent_template_arg_p): Likewise.
1646         (cp_parser_dependent_template_id_p): Likewise.
1647         (cp_parser_dependent_template_p): Likewise.
1648         (cp_parser_diagnose_invalid_type_name): Replace
1649         cp_parser_dependent_type_p with dependent_type_p, etc.
1650         (cp_parser_primary_expresion): Likewise.
1651         (cp_parser_nested_name_specifier_opt): Likewise.
1652         (cp_parser_postfix_expression): Likewise.
1653         (cp_parser_unary_expression): Likewise.
1654         (cp_parser_template_name): Likewise.
1655         (cp_parser_class_name): Likewise.
1656         (cp_parser_lookup_name): Likewise.
1657         * pt.c (dependent_type_p): New function.
1658         (value_dependent_expression_p): Likewise.
1659         (type_dependent_expression_p): Likewise.
1660         (dependent_template_arg_p): Likewise.
1661         (dependent_template_id_p): Likewise.
1662         (dependent_template_p): Likewise.
1663
1664         PR c++/9285
1665         PR c++/9294
1666         * parser.c (cp_parser_simple_declaration): Return quickly when
1667         encountering errors.
1668
1669 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1670
1671         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
1672
1673 2003-01-17  Jason Merrill  <jason@redhat.com>
1674
1675         PR c++/9167, c++/9358
1676         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
1677
1678 2003-01-17  Jason Merrill  <jason@redhat.com>
1679
1680         PR c++/9342
1681         * call.c (build_conditional_expr): Always do lvalue-rvalue
1682         conversion.
1683
1684 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
1685
1686         PR c++/9294
1687         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
1688         * cp-tree.h (BASELINK_BINFO): Adjust.
1689         (BASELINK_FUNCTIONS): Likewise.
1690         (BASELINK_ACCESS_BINFO): Likewise.
1691         (tree_baselink): New structure.
1692         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
1693         (lang_tree_node): Add baselink.
1694         * decl.c (cp_tree_node_structure): Add BASELINK case.
1695         * search.c (build_baselink): Adjust.
1696         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
1697         test from TREE_LIST case.
1698
1699         PR c++/9272
1700         * parser.c (cp_parser_constructor_declarator_p): Do not assume
1701         that a constructor cannot be declared outside of its own class.
1702
1703         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
1704         be resolved, neither can the qualified name.
1705
1706         * rtti.c (get_pseudo_ti_desc): Fix thinko.
1707
1708 2003-01-16  Jason Merrill  <jason@redhat.com>
1709
1710         PR c++/8564
1711         * init.c (build_vec_init): Re-add maxindex parm.
1712         (perform_member_init, build_aggr_init): Pass it.
1713         (build_new_1): Pass it. Use an incomplete array type for full_type.
1714         * typeck.c (build_modify_expr): Pass it.
1715         * cp-tree.h: Adjust.
1716
1717 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
1718
1719         * cp-tree.h (tsubst_copy_and_build): New declaration.
1720         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
1721         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
1722         (tsubst_copy_and_build): New function.
1723
1724 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
1725
1726         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
1727         (PARTIAL_INSTANTIATION_P): Remove.
1728         (IMPLICIT_TYPENAME_P): Likewise.
1729         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
1730         (build_typename_type): Remove declaration.
1731         (parmlist_is_exprlist): Likewise.
1732         * decl.c (build_typename_type): Make it static, remove third
1733         parameter.
1734         (push_class_binding): Don't do implicit typename stuff.
1735         (make_typename_type): Likewise.
1736         (lookup_name_real): Likewise.
1737         (grokdeclarator): Don't try to convert declarations into
1738         initializations.  Don't do implicit typename stuff.
1739         (parmlist_is_exprlist): Remove.
1740         (xref_basetypes): Simplify.
1741         * decl2.c (grokfield): Don't try to convert declarations into
1742         initializations.
1743         (build_anon_union_vars): Do this while processing templates, too.
1744         (finish_anon_union): Likewise.
1745         * error.c (dump_type): Remove implicit typename handling.
1746         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
1747         (cp_parser_primary_expression): Correct handling of names not
1748         found by unqualified name lookup in templates.
1749         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
1750         of types when possible.
1751         (cp_parser_simple_declaration): Complain intelligently about some
1752         invalid declarations.
1753         (cp_parser_member_declaration): Likewise.
1754         (cp_parser_constructor_declarator_p): Don't check when we're in a
1755         function scope.
1756         * pt.c (instantiate_class_template): Remove
1757         PARTIAL_INSTANTIATION_P gunk.
1758         * search.c (lookup_field_r): Don't build implicit typenames.
1759         (marked_pushdecls_p): Don't enter dependent base types.
1760         (unmarked_pushdecls_p): Likewise.
1761         * semantics.c (begin_class_definition): Remove implicit typename
1762         stuff.
1763
1764 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
1765
1766         PR c++/9212
1767         * parser.c (cp_parser_direct_declarator): If accepting either
1768         abstract or named, the name must be an unqualified-id.
1769
1770 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1771
1772         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
1773
1774 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1775
1776         * decl2.c (check_classfn): Fix uninitialized warning.
1777         (build_anon_union_vars): Likewise.
1778         * pt.c (tsubst_copy): Likewise.
1779
1780 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
1781
1782         Further conform g++'s __vmi_class_type_info to the C++ ABI
1783         specification.
1784         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
1785         the specification.
1786         (class_hint_flags): Likewise.
1787
1788 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1789
1790         * config-lang.in: Add semantics.c to gtfiles.
1791         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
1792         (saved_scope): Likewise.
1793         (type_lookups): Remove.
1794         (deferred_access): New structure.
1795         (type_access_control): Remove.
1796         (save_type_access_control): Likewise.
1797         (reset_type_access_control): Likewise.
1798         (decl_type_access_control): Likewise.
1799         (push_deferring_access_checks): Declare.
1800         (resume_deferring_access_checks): Likewise.
1801         (stop_deferring_access_checks): Likewise.
1802         (pop_deferring_access_checks): Likewise.
1803         (get_deferred_access_checks): Likewise.
1804         (pop_to_parent_deferring_access_checks): Likewise.
1805         (perform_deferred_access_checks): Likewise.
1806         (perform_or_defer_access_check): Likewise.
1807         * decl.c (make_typename_type): Use perform_or_defer_access_check.
1808         (make_unbound_class_template): Likewise.
1809         (grokdeclarator): Don't call decl_type_access_control.
1810         * parser.c (cp_parser_context): Remove deferred_access_checks
1811         and deferring_access_checks_p fields.
1812         (cp_parser_context_new): Adjust.
1813         (cp_parser): Remove access_checks_lists.
1814         (cp_parser_defer_access_check): Remove.
1815         (cp_parser_start_deferring_access_checks): Remove.
1816         (cp_parser_stop_deferring_access_checks): Remove.
1817         (cp_parser_perform_deferred_access_checks): Remove.
1818         (cp_parser_nested_name_specifier_opt): Use new deferred access
1819         functions.
1820         (cp_parser_simple_declaration): Likewise.
1821         (cp_parser_template_id): Likewise.
1822         (cp_parser_function_definition): Likewise.
1823         (cp_parser_class_specifier): Likewise.
1824         (cp_parser_lookup_name): Likewise.
1825         (cp_parser_single_declaration): Likewise.
1826         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
1827         (cp_parser_parse_tentatively): Likewise.
1828         (cp_parser_parse_definitely): Likewise.
1829         (yyparse): Likewise.
1830         (cp_parser_init_declarator): Remove access_checks parameter.
1831         Use new deferred access functions.
1832         (cp_parser_function_definition_from_specifiers_and_declarator):
1833         Likewise.
1834         (cp_parser_class_head): Remove deferring_access_checks_p and
1835         saved_access_checks parameters.  Use new deferred access functions.
1836         (cp_parser_member_specification_opt): Don't call
1837         reset_type_access_control.
1838         * search.c (type_access_control): Remove.
1839         * semantics.c: Include "gt-cp-semantics.h".
1840         (deferred_type_access_control): Remove.
1841         (deferred_access_stack): New variable.
1842         (deferred_access_free_list): Likewise.
1843         (push_deferring_access_checks): New function.
1844         (resume_deferring_access_checks): Likewise.
1845         (stop_deferring_access_checks): Likewise.
1846         (pop_deferring_access_checks): Likewise.
1847         (get_deferred_access_checks): Likewise.
1848         (pop_to_parent_deferring_access_checks): Likewise.
1849         (perform_deferred_access_checks): New function, adapted from
1850         cp_parser_perform_deferred_access_checks.
1851         (perform_or_defer_access_check): New function, adapted from
1852         cp_parser_defer_access_check.
1853         (current_type_lookups): Remove.
1854         (deferred_type_access_control): Likewise.
1855         (decl_type_access_control): Likewise.
1856         (save_type_access_control): Likewise.
1857         (reset_type_access_control): Likewise.
1858         (begin_function_definition): Adjust.
1859         (begin_class_definiton): Likewise.
1860
1861 2003-01-13  Jason Merrill  <jason@redhat.com>
1862
1863         PR c++/8748
1864         * class.c (build_base_path): Take the address before calling save_expr.
1865
1866         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
1867         all the ambiguous conversions are bad.
1868
1869         * class.c (maybe_warn_about_overly_private_class): Don't stop
1870         searching when we find a nonprivate method.
1871
1872         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
1873
1874 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
1875
1876         * cp-tree.h (get_arglist_len_in_bytes): Remove.
1877
1878         PR c++/9264
1879         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
1880         typeame types more robustly.
1881
1882 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
1883
1884         * parser.c:  Fix comment typos.
1885
1886 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
1887
1888         PR c++/9099
1889         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
1890         an object_type which is not a class type.
1891
1892 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
1893
1894         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
1895         (cp_parser_late_parsing_default_args): Likewise.
1896
1897 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
1898
1899         * cfns.gperf: ANSIfy function declarations.
1900         * cfns.h: Regenerate.
1901         * cp-tree.h: ANSIfy function declarations.
1902
1903 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
1904
1905         * cp-tree.h (reparse_absdcl_as_expr): Remove.
1906         (reparse_absdcl_as_casts): Likewise.
1907         (reparse_decl_as_expr): Likewise.
1908         (finish_decl_parsing): Likewise.
1909         * decl2.c (reparse_absdcl_as_expr): Remove.
1910         (reparse_absdcl_as_casts): Likewise.
1911         (repase_decl_as_expr): Likewise.
1912         (finish_decl_parsing): Likewise.
1913
1914         PR c++/9128
1915         PR c++/9153
1916         PR c++/9171
1917         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
1918         function.
1919         (cp_parser_nested_name_specifier_opt): Correct the
1920         check_dependency_p false.
1921         (cp_parser_postfix_expression): Fix formatting.
1922         (cp_parser_decl_specifier_seq): Avoid looking for constructor
1923         declarators when possible.
1924         (cp_parser_template_id): Avoid performing name-lookup when
1925         possible.
1926         (cp_parser_class_head): Do not count specializations when counting
1927         levels of templates.
1928         (cp_parser_constructor_declarator_p): Return immediately if
1929         there's no chance that the tokens form a constructor declarator.
1930         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
1931         expression with reference type.
1932         (get_tinfo_decl_dynamic): Do not return an expression with
1933         reference type.
1934         (build_typeid): Add comment.  Do not return an expression with
1935         reference type.
1936         * typeck.c (build_class_member_access_expr): Improve handling of
1937         conditionals and comma-expressions as objects.
1938
1939 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
1940
1941         * cfns.gperf: ANSIfy function declarations.
1942         * cfns.h: Regenerate.
1943         * cp-tree.h: ANSIfy function declarations.
1944         * parser.c: ANSIfy function declarations & definitions.
1945
1946         * decl.c (bad_specifiers): Fix parameter order error I introduced.
1947
1948 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
1949
1950         Merge from pch-branch:
1951
1952         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
1953
1954         Merge to tag pch-merge-20030102:
1955
1956         * semantics.c (finish_translation_unit): Don't call finish_file.
1957         * parser.c: Don't include ggc.h.
1958         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
1959         read first token here.  Don't allow PCH files after the first
1960         token is read.
1961         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
1962         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
1963         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
1964         (cp_parser_late_parsing_for_member): Don't duplicate call to
1965         cp_lexer_set_source_position_from_token.
1966         (cp_parser_late_parsing_default_args): Likewise.
1967         (yyparse): Call finish_file after clearing the_parser.
1968
1969         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
1970
1971         * Make-lang.in: Remove $(GGC_H) from all dependencies.
1972         (CXX_TREE_H): Add $(GGC_H).
1973         * class.c: Don't include ggc.h.
1974         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
1975         (method_name_cmp): Likewise.
1976         (resort_data): New variable.
1977         (resort_field_decl_cmp): New.
1978         (resort_method_name_cmp): New.
1979         (resort_sorted_fields): New.
1980         (resort_type_method_vec): New.
1981         (finish_struct_methods): Delete cast.
1982         (finish_struct_1): Delete cast.
1983         * cp-tree.h: Include ggc.h.
1984         (struct lang_type_class): Add reorder attribute to field `methods'.
1985         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
1986         (resort_sorted_fields): New prototype.
1987         (resort_type_method_vec): New prototype.
1988         * call.c: Don't include ggc.h.
1989         * decl.c: Likewise.
1990         * decl2.c: Likewise.
1991         * init.c: Likewise.
1992         * lex.c: Likewise.
1993         * method.c: Likewise.
1994         * optimize.c: Likewise.
1995         * parse.y: Likewise.
1996         * pt.c: Likewise.
1997         * repo.c: Likewise.
1998         * search.c: Likewise.
1999         * semantics.c: Likewise.
2000         * spew.c: Likewise.
2001         * tree.c: Likewise.
2002
2003         * lang-specs.h: Remove comment.
2004
2005         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
2006
2007         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
2008         (operator_name_info): Mark to be saved for PCH, specify size.
2009         (assignment_operator_name_info): Likewise.
2010
2011         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
2012
2013         * decl.c (anon_cnt): Mark to be saved for PCH.
2014
2015         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
2016
2017         * lex.c  (init_reswords): Delete now-untrue comment.
2018         Allocate ridpointers using GGC.
2019
2020         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
2021
2022         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
2023
2024         * g++spec.c (lang_specific_driver): Don't include standard
2025         libraries in `added'.
2026
2027         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
2028
2029         * decl2.c (finish_file): Call c_common_write_pch.
2030         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
2031
2032         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
2033
2034         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
2035         files when using g++.
2036         * lang-specs.h: Handle compiling C++ header files.
2037
2038 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
2039
2040         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
2041
2042 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2043
2044         * pt.c (push_access_scope_real): Call push_to_top_level for
2045         function in namespace scope.
2046         (pop_access_scope): Call pop_from_top_level for function in
2047         namespace scope.
2048
2049 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
2050
2051         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
2052
2053 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
2054
2055         * Make-lang.in (c++.install-common, c++.install-man,
2056         c++.uninstall): Prepend $(DESTDIR) to destination paths in
2057         all (un)installation commands.
2058         (c++.install-common): Rewrite $(LN) commands to support
2059         DESTDIR with "ln" as well as with "ln -s".
2060
2061 2003-01-08  Jason Merrill  <jason@redhat.com>
2062
2063         * parser.c (cp_parser_primary_expression): See through explicitly
2064         scoped ALIAS_DECLs, too.
2065
2066 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
2067
2068         * decl.c: Remove some #if 0 code.
2069
2070         * decl.c: ANSIfy function declarations.
2071
2072 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
2073
2074         * parser.c (cp_parser_asm_definition): Correct handling of omitted
2075         operands.
2076
2077 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2078
2079         PR c++/9030
2080         * decl.c (make_typename_type): Check access only when tf_error.
2081         (make_unbound_class_template): Likewise.
2082         * pt.c (saved_access_scope): New variable.
2083         (push_access_scope_real): New function.
2084         (push_access_scope): Likewise.
2085         (pop_access_scope): Likewise.
2086         (tsubst_default_argument): Use them.
2087         (instantiate_template): Likewise.
2088         (regenerate_decl_from_template): Likewise.
2089         (instantiate_decl): Likewise.
2090         (get_mostly_instantiated_function_type): Likewise.
2091
2092 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
2093
2094         * tree.c: Delete bogus #if 0 code.
2095
2096 2003-01-07  Andreas Schwab  <schwab@suse.de>
2097
2098         * class.c (layout_class_type): Don't use
2099         PCC_BITFIELD_TYPE_MATTERS if not defined.
2100
2101 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
2102
2103         PR c++/9165
2104         * decl2.c (build_cleanup): Mark the object as used.
2105
2106         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
2107         (hash_local_specialization): New function.
2108         (register_local_specialization): Revert 2003-01-05 change.
2109         (instantiate_decl): Use hash_local_specialization when creating
2110         the local_specializations table.
2111
2112         * decl2.c (mark_used): Do not synthesize thunks.
2113
2114         * class.c (layout_class_type): Correct handling of unnamed
2115         bitfields wider than their types.
2116
2117         PR c++/9189
2118         * parser.c (cp_parser): Remove default_arg_types.  Update
2119         documentation for unparsed_functions_queues.
2120         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
2121         parameter.
2122         (cp_parser_new): Don't set parser->default_arg_types.
2123         (cp_parser_function_definition): Adjust usage of
2124         unparsed_funtions_queues.
2125         (cp_parser_class_specifier): Don't mess with
2126         parser->default_arg_types.  Handle default argument processing in
2127         a separate phase from function body processing.
2128         (cp_parser_template_declaration_after_export): Adjust usage of
2129         unparsed_functions_queues.
2130         (cp_parser_late_parsing_for_member): Do not handle default
2131         arguments.
2132
2133 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
2134
2135         PR c++/9109
2136         * parser.c (cp_parser_declarator_kind): New enum.
2137         (cp_parser_declarator): Adjust.
2138         (cp_parser_direct_declarator): Adjust. Allow for either named or
2139         abstract declarator. Prefer abstract, if possible. Allow
2140         parenthesized function name.
2141         (cp_parser_condition): Adjust cp_parser_declarator call.
2142         (cp_parser_explicit_instantiation): Likewise.
2143         (cp_parser_init_declarator): Likewise.
2144         (cp_parser_type_id): Likewise.
2145         (cp_parser_function_definition): Likewise.
2146         (cp_parser_member_declaration): Likewise.
2147         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
2148         the tentative parsing.
2149         (cp_parser_exception_declaration): Likewise.
2150
2151 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
2152
2153         * parser.c (cp_parser_template_parameter): Adjust call to
2154         cp_parser_parameter_declaration.
2155         (cp_parser_parameter_declaration_list): Likewise.
2156         (cp_parser_parameter_declaration): Replace
2157         greater_than_is_operator_p with template_parm_p parameter.  Do not
2158         cache tokens for template default arguments.
2159
2160         * pt.c (retrieve_local_specialization): Use htab_find, not
2161         htab_find_with_hash.
2162         (register_local_specialization): Use htab_find_slot, not
2163         htab_find_slot_with_hash.
2164         (instantiate_decl): Pass a hash function to htab_create.
2165
2166 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2167
2168         * parser.c (cp_parser_binary_expression,
2169         cp_parser_multiplicative_expression,
2170         cp_parser_additive_expression, cp_parser_shift_expression,
2171         cp_parser_relational_expression, cp_parser_equality_expression,
2172         cp_parser_and_expression, cp_parser_exclusive_or_expression,
2173         cp_parser_inclusive_or_expression,
2174         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
2175         cp_parser_binary_expression): Const-ify.
2176
2177 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
2178
2179         * method.c (use_thunk): Disable access control while building the
2180         body of the thunk.
2181
2182 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
2183
2184         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
2185         front end.
2186
2187 2003-01-03  Matt Austern  <austern@apple.com>
2188
2189         * cp-tree.h (struct lang_type_class): add field for key method
2190         (cp_global_trees): rename dynamic_classes to keyed_classes
2191         (key_method): add definition
2192         * class.c (finish_struct_1): compute class's key method, and add
2193         the class to keyed_classes list if there is no key method.
2194         * decl.c (finish_function): add class to keyed_classes list if we
2195         see a definition of the class's key method.
2196         * pt.c (instantiate_class_template): add template specialization
2197         of a dynamic class to keyed_classes list.
2198         * decl2.c (key_method): remove
2199         (finish_file): iterate only through keyed_classes list when
2200         deciding whether to emit vtables, remove class from its list after
2201         we do the emission.
2202
2203 2003-01-02  Jason Merrill  <jason@redhat.com>
2204
2205         * call.c (build_conditional_expr): Stabilize lvalues properly.
2206         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
2207         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
2208         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
2209
2210         * call.c (convert_like_real): Call decl_constant_value for an
2211         IDENTITY_CONV even if there are no more conversions.
2212
2213         * cvt.c (build_up_reference): Don't push unnamed temps.
2214
2215         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
2216
2217         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
2218         for a backend struct.
2219
2220         * except.c (wrap_cleanups_r, build_throw): Make
2221         MUST_NOT_THROW_EXPRs void.
2222         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
2223
2224         * init.c (build_vec_delete_1): Pre-evaluate the base address.
2225
2226         * init.c (get_temp_regvar): Simplify logic.
2227
2228         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
2229         our replacement is a decl.
2230
2231         * decl.c (cp_make_fname_decl): Push the decls inside the
2232         outermost scope.
2233
2234 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
2235
2236         PR c++/45, c++/3784
2237         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
2238         the same too.
2239
2240 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
2241
2242         * parser.c (struct cp_parser): Add access_checks_lists field
2243         (cp_parser_simple_declaration): Use.
2244         (cp_parser_init_declarator): Likewise.
2245
2246 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
2247
2248         * parser.c (cp_parser_declaration): Accept the __extension__
2249         keyword before the declaration.
2250
2251         PR c++/2843
2252         * parser.c (cp_parser_parameter_declaration): Allow attributes to
2253         appear after the declarator.
2254
2255         * call.c (build_new_method_call): Fix typo in message format
2256         string.
2257
2258 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
2259
2260         * parser.c (cp_lexer_next_token_is): Declare it inline.
2261         (cp_lexer_set_source_position_from_token): Likewise.
2262         (cp_lexer_debugging_p): Likewise.
2263         (cp_parser_parsing_tentatively): Likewise.
2264         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
2265         to the cp_lexer_peek_token.
2266
2267         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
2268         expression.
2269
2270 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
2271
2272         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
2273         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
2274         cp/repo.c: Fix copyright years.
2275
2276 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
2277
2278         * lex.c: Remove superfluous include of cpplib.h.
2279         (CONSTRAINT): Define without conditions.
2280         (init_cp_pragma): Use c_register_pragma.
2281
2282 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
2283
2284         * .cvsignore: Remove.
2285
2286 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2287
2288         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
2289           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
2290           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
2291           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
2292           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
2293           copyright header.
2294         * lex.h: parse.y is dead, so don't mention it.  Also replace the
2295           copyright header with the default GNU copyright header.
2296
2297 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2298
2299         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
2300         (lookup_name_namespace_only): Likewise.
2301         (begin_only_namespace_names): Likewise.
2302         (end_only_namespace_names): Likewise.
2303         * decl.c (only_namespace_names): Remove.
2304         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
2305         (lookup_name_real): Do not check only_namespace_names.
2306         (lookup_name_namespace_only): Remove.
2307         (begin_only_namespace_names): Likewise.
2308         (end_only_namespace_names): Likewise.
2309         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
2310         nested-name-specifiers more gracefully.
2311         (cp_parser_class_or_namespace_name): Avoid looking up namespace
2312         names when they cannot possibly appear.
2313         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
2314         (cp_parser_elaborated_type_specifier): Likewise.
2315         (cp_parser_namespace_name): Only look for namespace names.
2316         (cp_parser_lookup_name): Add is_namespace parameter.
2317         (cp_parser_lookup_name_simple): Adjust call to
2318         cp_parser_lookup_name.
2319
2320         * parser.c (cp_parser_dependent_type_p): Fix thinko.
2321
2322 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
2323
2324         * .cvsignore: Update.
2325
2326 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
2327
2328         * class.c (modify_vtable_entry): Remove unused variable.
2329         (get_vcall_index): Always expect a non-thunk.
2330         (update_vtable_entry_for_fn): Combine covariant adjustments, when
2331         overriding a thunk. Pass get_vcall_index a non-thunk.
2332
2333         * decl2.c (finish_file): Mark undefined inlines as extern.
2334
2335 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2336
2337         * cp-tree.def (RETURN_INIT): Remove.
2338         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
2339         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
2340         (note_level_for_for): Remove.
2341         (note_level_for_try): Likewise.
2342         (note_level_for_catch): Likewise.
2343         (finish_named_return_value): Likewise.
2344         (do_pushlevel): Change prototype.
2345         (pending_lang_change): Remove.
2346         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
2347         sk_for.
2348         (note_level_for_for): Remove.
2349         (note_level_for_try): Likewise.
2350         (note_level_for_catch): Likewise.
2351         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
2352         * parser.c (cp_parser_context_free_list): Make it "deletable".
2353         (cp_parser_template_argument): Remove misleading comment.
2354         * pt.c (tsubst_expr): Remove RETURN_INIT code.
2355         * semantics.c (genrtl_named_return_value): Remove.
2356         (do_pushlevel): Take a scope kind as an argument.
2357         (begin_if_stmt): Adjust.
2358         (begin_while_stmt): Likewise.
2359         (begin_for_stmt): Likewise.
2360         (finish_for_init_stmt): Likewise.
2361         (begin_switch_stmt): Likewise.
2362         (begin_handler): Likewise.
2363         (begin_compound_stmt): Likewise.
2364         (finish_named_return_value): Remove.
2365         (cp_expand_stmt): Remove RETURN_INIT case.
2366         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
2367
2368 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2369
2370         PR c++/9112
2371         * parser.c (cp_parser_direct_declarator): Handle erroneous
2372         parenthesized declarators correctly.
2373
2374 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2375
2376         * cp-tree.h (pending_lang_change): Declare.
2377
2378 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
2379
2380         * parser.c (cp_parser_context_free_list): New variable.
2381         (cp_parser_context_new): Use it.
2382         (cp_parser_error): Check return code from
2383         cp_parser_simulate_error.
2384         (cp_parser_simulate_error): Return a value.
2385         (cp_parser_id_expression): Optimize common case.
2386         (cp_parser_class_name): Likewise.
2387         (cp_parser_class_specifier): Adjust call to
2388         cp_parser_late_parsing_default_args.
2389         (cp_parser_lookup_name): Optimize common case.
2390         (cp_parser_late_parsing_for_member): Adjust call to
2391         cp_parser_late_parsing_default_args.
2392         (cp_parser_late_parsing_default_args): Add scope parameter.
2393         (cp_parser_require): Avoid creating the error message unless it's
2394         needed.
2395         (cp_parser_parse_definitely): Place free'd contexts on the free
2396         list.
2397
2398         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
2399
2400 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
2401
2402         * parser.c (cp_parser_parameter_declaration_clause): Treat system
2403         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
2404
2405 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
2406
2407         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
2408         GCC, not GNU CC.
2409
2410 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
2411
2412         * parse.y: Remove.
2413         * spew.c: Likewise.
2414         * Make-lang.in (gt-cp-spew.h): Remove.
2415         * cp-tree.h (do_pending_lang_change): Remove.
2416         (do_identifier): Change prototype.
2417         (finish_id_expr): Remove.
2418         * decl.c (lookup_name_real): Remove yylex variable.
2419         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
2420         * lex.c (init_cpp_parse): Remove.
2421         (reduce_cmp): Likewise.
2422         (token_cmp): Likewise.
2423         (yychar): Likewise.
2424         (lastiddecl): Likewise.
2425         (token_count): Likewise.
2426         (reduce_count): Likewise.
2427         (yyhook): Likewise.
2428         (print_parse_statistics): Likewise.
2429         (do_pending_lang_change): Likewise.
2430         (do_identifier): Remove parsing parameter.
2431         * lex.h (lastiddecl): Remove.
2432         (looking_for_typename): Remove.
2433         (looking_for_template): Likewise.
2434         (pending_lang_change): Likewise.
2435         (yylex): Likewise.
2436         * semantics.c (finish_id_expr): Remove.
2437
2438         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
2439         thread" correctly.
2440
2441 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
2442
2443         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
2444         end, not the C front end.
2445
2446 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
2447
2448         * cp-tree.h (THUNK_TARGET): New macro.
2449         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
2450         (finish_thunk): Remove offset parms.
2451         * class.c (find_final_overrider): Look through thunks.
2452         (get_vcall_index): Use THUNK_TARGET.
2453         (update_vtable_entry_for_fn): Look through thunks. Set covariant
2454         fixed offset here. Adjust finish_thunk call.
2455         (build_vtbl_initializer): Adjust finish_thunk calls.
2456         * mangle.c (mangle_call_offset): Remove superfluous if.
2457         (mangle_thunk): Adjust.
2458         * method.c (make_thunk): Adjust.
2459         (finish_thunk): Adjust.
2460         (thunk_adjust): Remove assert.
2461         (use_thunk): Use THUNK_TARGET
2462         * dump1.c (cp_dump_tree): Adjust thunk dumping.
2463
2464         PR c++/9054
2465         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
2466         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
2467
2468 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2469
2470         Remove traditional C constructs 4/n.
2471         * decl2.c (grok_method_quals, warn_if_unknown_interface,
2472         grok_x_components, cp_build_parm_decl, build_artificial_parm,
2473         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
2474         delete_sanity, check_member_template, check_java_method,
2475         check_classfn, finish_static_data_member_decl, grokfield,
2476         grokbitfield, grokoptypename, grok_function_init,
2477         cplus_decl_attributes, constructor_name, defer_fn,
2478         build_anon_union_vars, finish_anon_union, coerce_new_type,
2479         coerce_delete_type, comdat_linkage, maybe_make_one_only,
2480         key_method, import_export_vtable, import_export_class,
2481         output_vtable_inherit, import_export_decl, import_export_tinfo,
2482         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
2483         set_guard, start_objects, finish_objects,
2484         start_static_storage_duration_function,
2485         finish_static_storage_duration_function, get_priority_info,
2486         start_static_initialization_or_destruction,
2487         finish_static_initialization_or_destruction,
2488         do_static_initialization, do_static_destruction,
2489         prune_vars_needing_no_initialization, write_out_vars,
2490         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
2491         add_using_namespace, merge_functions, ambiguous_decl,
2492         lookup_using_namespace, lookup_using_namespace,
2493         qualified_lookup_using_namespace, set_decl_namespace,
2494         decl_namespace, current_decl_namespace, push_decl_namespace,
2495         pop_decl_namespace, push_scope, pop_scope, add_function,
2496         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
2497         lookup_arg_dependent, do_namespace_alias,
2498         validate_nonmember_using_decl, do_nonmember_using_decl,
2499         do_toplevel_using_decl, do_local_using_decl,
2500         do_class_using_decl, do_using_directive, check_default_args,
2501         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
2502         * parser.c (cp_parser_class_head): Use booleanss.
2503         * decl.c (walk_globals, walk_vtables): Likewise.
2504         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
2505         walk_globals): Change return type from 'int' to 'bool'.
2506         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
2507         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
2508         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
2509         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
2510         qualifier_flags, tinfo_base_init, generic_initializer,
2511         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
2512         dfs_class_hint_unmark, class_hint_flags, class_initializer,
2513         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
2514         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
2515         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
2516         * repo.c (repo_compile_flags, repo_template_declared,
2517         repo_template_defined, repo_class_defined, repo_get_id,
2518         repo_template_used, repo_vtable_used, repo_inline_used,
2519         repo_tinfo_used, repo_template_instantiated, extract_string,
2520         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
2521         finish_repo): Likewise.
2522         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
2523         cxx_print_xnode): Likewise..
2524         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
2525         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
2526         * cxxfilt.c (demangle_it, print_demangler_list, usage,
2527         standard_symbol_characters, hp_symbol_characters, main, fatal):
2528         Likewise.
2529         (strip_underscore):  Change type from 'int' to 'bool'.
2530         (main): Use boolean constants.
2531
2532 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2533
2534         Remove traditional C constructs 3/n.
2535         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2536         build_up_reference, warn_ref_binding, convert_to_reference,
2537         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
2538         convert_to_void, convert, convert_force, build_type_conversion,
2539         build_expr_type_conversion, type_promotes_to,
2540         perform_qualification_conversions): Use C90 prototyping style.
2541         * decl2.c (grok_array_decl): Use boolean constant.
2542         (delete_sanity): Likewise.
2543         * typeck.c (build_unary_op): Likewise.
2544         * semantics.c (finish_switch_cond): Likewise.
2545         * parser.c (cp_parser_direct_new_declarator): Likewise.
2546         * init.c (build_new): Likewise.
2547
2548 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
2549
2550         * Make-lang.in (po-generated): Remove parse.c.
2551         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
2552         ($(srcdir)/cp/parse.h): Remove target.
2553         ($(srcdir)/cp/parse.c): Likewise.
2554         (gt-cp-parse.h): Likewise.
2555         (gt-cp-parser.h): New target.
2556         (c++.distclean): Do not remove parse.output.
2557         (c++.maintainer-clean): Do not remove parse.c or parse.h.
2558         (cp/spew.o): Remove target.
2559         (cp/lex.o): Adjust dependencies.
2560         (cp/pt.o): Likewise.
2561         (cp/parse.o): Likewise.
2562         (cp/TAGS): Do not mention parse.c.
2563         (cp/parser.o): New target.
2564         * NEWS: Mention the new parser.
2565         * call.c (build_scoped_method_call): Simplify.
2566         (build_method_call): Likewise.
2567         (build_new_function_call): Adjust calls to add_function_candidate
2568         and add_template_candidate.
2569         (build_new_op): Improve handling of erroroneous operands.
2570         (convert_default_arg): Remove circular argument processing.
2571         (name_as_c_string): New function.
2572         (build_new_method_call): Use it.
2573         (perform_implicit_conversion): Use error_operand_p.
2574         * class.c (finish_struct_anon): Use constructor_name_p.
2575         (check_field_decls): Likewise.
2576         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
2577         (resolve_address_of_overloaded_function): Likewise.
2578         (instantiate_type): Tweak pointer-to-member handling.
2579         (get_primary_binfo): Remove incorrect assertion.
2580         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
2581         * cp-tree.h (DEFARG_TOKENS): New macro.
2582         (default_arg): New structure.
2583         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
2584         (lang_tree_node): Add default_arg.
2585         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
2586         (type_info_ref_type): New macro.
2587         (saved_scope): Make processing_explicit_instantiation a boolean.
2588         (check_access): New field.
2589         (unparsed_text): Remove.
2590         (language_function): Remove unparsed_inlines.
2591         (error_operand_p): New macro.
2592         (lang_decl): Adjust pending_inline_info.
2593         (DEFARG_POINTER): Remove.
2594         (tag_types): Add typenames.
2595         (lookup_ualified_name): Declare.
2596         (lookup_name_real): Likewise.
2597         (shadow_tag): Adjust prototype.
2598         (get_scope_of_declarator): Declare it.
2599         (process_next_inline): Remove it.
2600         (check_for_missing_semicolon): Likewise.
2601         (maybe_get_template_decl_from_type_decl): Declare it.
2602         (finish_label_stmt): Adjust prototype.
2603         (finish_non_static_data_meber): Declare it.
2604         (finish_pseudo_destructor_call_expr): Rename to ...
2605         (finish_pseudo_destructor_expr): ... this.
2606         (finish_compound_literal): Declare it.
2607         (begin_inline_definitions): Remove it.
2608         (init_spew): Remove.
2609         (peekyylex): Likewise.
2610         (arbitrate_lookup): Likewise.
2611         (frob_opname): Likewise.
2612         (maybe_snarf_defarg): Likewise.
2613         (add_defarg_fn): Likewise.
2614         (do_pending_defargs): Likewise.
2615         (done_pending_defargs): Likewise.
2616         (unprocessed_defarg_fn): Likewise.
2617         (replace_defarg): Likewise.
2618         (end_input): Likewise.
2619         (get_overloaded_fn): Likewise.
2620         * cvt.c (convert_to_reference): Improve error handling.
2621         * decl.c (lookup_name_real): Do not declare it static.
2622         (maybe_push_to_top_level): Set check_access.
2623         (identifier_type_value): Adjust call to lookup_name_real.
2624         (lookup_qualified_name): New method.
2625         (lookup_name_real): Remove special-case parsing code.
2626         (lookup_name-nonclass): Adjust call to lookup_name_real.
2627         (lookup_name_namespace_only): Likewise.
2628         (lookup_name): Likewise.
2629         (check_tag_decl): Return the type declared.
2630         (shadow_tag): Likewise.
2631         (register_dtor_fn): Tweak check_access.
2632         (grokfndecl): Use constructor_name_p.
2633         (get_scope_of_declarator): New function.
2634         (grokdeclarator): Obscure tweaks for slightly different declarator
2635         representations.
2636         (start_method): Return error_mark_node to indicate failure.
2637         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
2638         * decl2.c (constructor_name_full): Simplify.
2639         (constructor_name): Use it.
2640         (build_expr_from_tree): Adjust for changes to do new parser.
2641         (push_scope): Improve robustness.
2642         (validate_nonmember_using_decl): Process declarations, not names.
2643         (do_class_using_decl): Likewise.
2644         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
2645         here.
2646         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
2647         * expr.c (cxx_expand_expr): Handle BASELINKs.
2648         * init.c (member_init_ok_or_else): Issue more errors.
2649         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
2650         * lex.c: Do not include parse.h.
2651         (yypring): Do not declare.
2652         (yylval): Likewise.
2653         (make_reference_declarator): Remove error-generating code.
2654         (rid_to_yy): Remove.
2655         (cxx_init): Do not call init_spew.
2656         (yypring): Remove.
2657         (check_for_missing_semicolon): Remove.
2658         * lex.h (got_scope): Remove.
2659         (got_object): Remove.
2660         * method.c (hack_identifier): Use finish_non_static_data_member.
2661         (implicitly_declare_fn): Adjust use of constructor_name.
2662         * parser.c: New file.
2663         * pt.c (parse.h): Do not include it.
2664         (maybe_get_template_decl_from_template): Do not declare it.
2665         (finish_member_template_decl): Tweak.
2666         (begin_explicit_instantiation): Adjust for
2667         processing_explicit_instantiation being boolean.
2668         (end_explicit_instantiation): Likewise.
2669         (maybe_process_partial_specialization): Tighten specialization
2670         test.
2671         (retrieve_local_specialization): Adjust ue of hash table.
2672         (eq_local_specializations): New function.
2673         (register_local_specialization): Likewise.
2674         (push_template_decl_real): Remove unnecessary test.
2675         (maybe_get_template_decl_from_type_decl): Don't make it static.
2676         (for_each_template_parm_r): Handle TYPEOF_TYPE.
2677         (tsubst_copy): Use retrieive_local_specialization to handle
2678         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
2679         Handle COMPONENT_REFs with pseudo-destructor-expressions.
2680         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
2681         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
2682         (unify): Tweak handling of CONST_DECLs.
2683         (regenerate_decl_from_template): Use push_nested_class.
2684         (template_for_substitution): New funciton.
2685         (instantiate_decl): Use it.  Register parameters as local
2686         specializations.
2687         * rtti.c (init_rtti_processing): Set type_info_ref_type.
2688         (build_typeid): Use it.
2689         (get_typeid): Likeise.
2690         * search.c (accessible_p): Use check_access, not
2691         flag_access_control.
2692         (adjust_result_of_qualified_name_lookup): Pay attention to the
2693         context_class.
2694         * semantics.c (finish_asm_stmt): Adjust error handling.
2695         (finish_label_stmt): Return the statement.
2696         (finish_non_static_data_member): New function.
2697         (finish_class_expr): Handle BASELINKs.
2698         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
2699         (finish_object_call_expr): Simplify handling during templates.
2700         (finish_pseudo_destructor_call_expr): Rename to ...
2701         (finish_pseudo_dtor_expr): ... this.
2702         (finish_compound_literal): New function.
2703         (begin_inline_definitions): Remove.
2704         (finish_sizeof): Remove special template handling.
2705         * spew.c: Do not include parse.h.
2706         * tree.c (get_overloaded_fn): Remove.
2707         * typeck.c (build_class_member_access_expr): Handle
2708         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
2709         (lookup_destructor): New function.
2710         (finish_class_member_access_expr): Use it.
2711         (convert_arguments): Simplify.
2712         (build_unary_op): Handle BASELINKs.
2713
2714 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
2715
2716         PR c++/4803
2717         * decl2.c (mark_used): Defer inline functions.
2718         (finish_file): Merge deferred_fns loops. Check all used
2719         inline functions have a definition.
2720         * method.c (make_thunk): Thunks are not inline.
2721
2722         PR c++/5116, c++/764
2723         * call.c (build_new_op): Make sure template class operands are
2724         instantiated.
2725
2726 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
2727
2728         PR C++/7964
2729         * cp-tree.h (resolve_scoped_fn_name): Prototype.
2730         * call.c (resolve_scoped_fn_name): New function. Deal with
2731         more template expansion. Broken out of ...
2732         * parse.y (parse_finish_call_expr): ... here. Call it.
2733         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
2734         resolve_scoped_fn_name and build_call_from_tree.
2735
2736         PR c++/9053
2737         * decl.c (duplicate_decls): Templates may be disambiguated by
2738         return type.
2739
2740         PR c++/8702
2741         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
2742         conversion operators on failure.
2743
2744 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2745
2746         Remove traditional C constructs 2/n.
2747         * call.c (tourney, build_field_call, equal_functions, joust,
2748         compare_ics, build_over_call, build_java_interface_fn_ref,
2749         convert_like_real, op_error, build_object_call, resolve_args,
2750         build_vfield_ref, check_dtor_name, build_scoped_method_call,
2751         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
2752         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
2753         standard_conversion, reference_related_p,
2754         reference_compatible_p, convert_class_to_reference,
2755         direct_reference_binding, reference_binding,
2756         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
2757         add_template_conv_candidate, any_viable, any_strictly_viable,
2758         build_this, splice_viable, print_z_candidates,
2759         build_user_type_conversion, build_new_function_call,
2760         conditional_conversion, build_conditional_expr, build_new_op,
2761         build_op_delete_call, enforce_access, call_builtin_trap,
2762         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
2763         convert_default_arg, type_passed_as, convert_for_arg_passing,
2764         in_charge_arg_for_name, is_properly_derived_from,
2765         maybe_handle_implicit_object, maybe_handle_ref_bind,
2766         source_type, add_warning, can_convert, can_convert_arg,
2767         perform_implicit_conversion, can_convert_arg_bad,
2768         initialize_reference, add_conv_candidate,
2769         add_template_candidate_real, add_template_candidate): Ansify.
2770
2771 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
2772
2773         PR c++/8572
2774         * cp-tree.h (grokoptypename): Add SCOPE parameter.
2775         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
2776         if in a template scope.
2777         * parse.y (unoperator): Return the scope.
2778         (operator_name): Adjust grokoptypename call.
2779
2780 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2781
2782         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
2783         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
2784         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
2785
2786 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
2787
2788         * ChangeLog: Fix a typo.
2789         * class.c: Fix comment typos.
2790         * cp-tree.h: Likewise.
2791
2792 2002-12-18  Jason Merrill  <jason@redhat.com>
2793
2794         Handle anonymous unions at the tree level.
2795         C++ ABI change: Mangle anonymous unions using the name of their
2796         first named field (by depth-first search).  Should not cause
2797         binary compatibility problems, though, as the compiler previously
2798         didn't emit anything for affected unions.
2799         * cp-tree.def (ALIAS_DECL): New tree code.
2800         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
2801         first field, not the largest.
2802         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
2803         push the decl, and write it out at namespace scope.
2804         * decl.c (lookup_name_real): See through an ALIAS_DECL.
2805         (pushdecl): Add namespace bindings for ALIAS_DECLs.
2806         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
2807         of a decl which doesn't have one.
2808         * typeck.c (build_class_member_access_expr): Don't recurse if
2809         we already have the type we want.
2810
2811 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2812
2813         PR c++/8099
2814         * friend.c (make_friend_class): Allow partial specialization
2815         when declaration is not a template friend.
2816
2817 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2818
2819         PR c++/3663
2820         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
2821         TREE_PROTECTED to created decl nodes.
2822
2823 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
2824
2825         * class.c (build_base_field): Do not set DECL_PACKED on the
2826         FIELD_DECL.
2827
2828 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2829
2830         * cp-tree.h (struct tree_srcloc): Use location_t.
2831         (SOURCE_LOCUS): New.
2832         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
2833
2834 2002-12-17  Jason Merrill  <jason@redhat.com>
2835
2836         * decl.c (finish_function): Also complain about no return in
2837         templates.
2838         * semantics.c (finish_return_stmt): Also call check_return_expr in
2839         templates.
2840         * typeck.c (check_return_expr): In a template, just remember that we
2841         saw a return.
2842
2843 2002-12-16  Jason Merrill  <jason@redhat.com>
2844
2845         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
2846         of the CALL_EXPR.
2847
2848         * semantics.c (do_pushlevel): Call pushlevel after adding the
2849         SCOPE_STMT.
2850         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
2851         * parse.y (function_body): Go back to using compstmt.
2852         * decl.c (pushdecl): Skip another level to get to the parms level.
2853
2854         * call.c (build_new_method_call): Use is_dummy_object to determine
2855         whether or not to evaluate the object parameter to a static member
2856         function.
2857
2858 2002-12-14  Jason Merrill  <jason@redhat.com>
2859
2860         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
2861         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
2862         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
2863         don't bother with an AGGR_INIT_EXPR.
2864         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
2865         just generate a new decl normally.  Take return slot parm.
2866         * cp-tree.h: Adjust prototype.
2867
2868 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2869
2870         PR C++/8031
2871         * cvt.c (convert_to_pointer_force): Don't try comparing against
2872         erronous type.
2873
2874 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
2875
2876         * cp-tree.h: Have the multiple-include guards around
2877         the entire file.
2878
2879 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
2880
2881         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
2882         for SPEW_DEBUG.
2883         (snarf_method): Same.
2884         (snarf_defarg): Same.
2885
2886 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
2887
2888         PR c++/8372
2889         * pt.c (tsubst_copy): Handle destructor names more correctly.
2890
2891 2002-12-10  Matt Austern   <austern@apple.com>
2892
2893         * cp-tree.h: get rid of needs_virtual_reinit bit.
2894
2895 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
2896
2897         * NEWS: Document removal of in-class initialization extension for
2898         static data members of non-arithmetic, non-enumeration type.
2899         * decl.c (check_static_variable_definition): Do not allow that
2900         extension.
2901         * decl2.c (grokfield): Do not call digest_init when processing
2902         templates.
2903
2904 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2905
2906         * error.c (dump_expr): Fix format specifier warning.
2907
2908 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
2909
2910         * class.c (finish_struct_1): Correct comment.
2911         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
2912
2913 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2914
2915         PR C++/8799
2916         * error.c (dump_expr): Don't ever try to dump a non-existent
2917         expression.
2918
2919 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
2920
2921         Implement covariant returns.
2922         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
2923         (struct lang_decl_flags): Add this_thunk_p flag.
2924         Rename vcall_offset to virtual_offset.
2925         (struct lang_decl): Rename delta to fixed_offset.
2926         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
2927         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
2928         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
2929         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
2930         (make_thunk): Add this_adjusting arg.
2931         (finish_thunk): Declare.
2932         (mangle_thunk): Add this_adjusting arg.
2933         * class.c (get_vcall_index): Use base function for lookup.
2934         (update_vtable_entry_for_fn): Generate covariant thunk.
2935         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
2936         (build_vtbl_initializer): Use base function for lookup.
2937         Finish covariant thunk here. Adjust thunk generation.
2938         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
2939         Adjust thunk dumping.
2940         * mangle.c (mangle_call_offset): New function.
2941         (mangle_thunk): Adjust for covariant thunks.
2942         * method.c (make_thunk): Adjust. Do not set name here.
2943         (finish_thunk): New function. Set name here.
2944         (use_thunk): Generate covariant thunks too.
2945         (thunk_adjust): New function.
2946         * search.c (covariant_return_p): Remove. Fold into ...
2947         (check_final_overrider): ... here. Simplify.
2948         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
2949
2950 2002-12-03  Jason Merrill  <jason@redhat.com>
2951
2952         PR c++/8674
2953         * call.c (build_over_call): Check specifically for TARGET_EXPR
2954         when eliding.
2955
2956         PR c++/8461, c++/8625
2957         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
2958         (cp_convert_parm_for_inlining): Remove.
2959         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
2960         Remove.
2961         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
2962         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
2963
2964         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
2965         an ambiguous conversion.
2966
2967 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
2968
2969         PR c++/8688
2970         * decl.c (reshape_init): Handle erroneous initializers.
2971
2972 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
2973
2974         PR c++/8720
2975         * spew.c (remove_last_token): Make sure that last_chunk is set
2976         correctly.
2977
2978         PR c++/8615
2979         * error.c (dump_expr): Handle character constants with
2980         TREE_OVERFLOW set.
2981
2982 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2983
2984         DR 180
2985         * decl.c (grokdeclarator): Require class-key for all friend class.
2986         Output the correct type and context in the error message.
2987
2988 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
2989
2990         PR c++/5919
2991         * pt.c (unify): Use variably_modified_type_p to test validity of
2992         template argument types.
2993
2994         PR c++/8727
2995         * cp-tree.h (lang_type_class): Add typeinfo_var.
2996         (CLASSTYPE_TYPEINFO_VAR): New macro.
2997         * rtti.c (get_tinfo_decl): Use it.
2998
2999         PR c++/8663
3000         * init.c (expand_member_init): Always get the main variant of a
3001         base class.
3002
3003 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
3004
3005         PR c++/8332
3006         PR c++/8493
3007         * decl.c (cxx_init_decl_processing): Use size_type_node, not
3008         c_size_type_node.
3009         * decl2.c (coerce_new_type): Likewise.
3010         * except.c (do_allocate_exception): Likewise.
3011
3012 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
3013
3014         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
3015         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
3016         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
3017         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
3018         typeck2.c: Include coretypes.h and tm.h.
3019         * Make-lang.in: Update dependencies.
3020
3021 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
3022
3023         PR c++/8227
3024         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
3025         (check_initializer): Validate the type of the initialized
3026         variable, even if the initializer is absent.
3027         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
3028
3029         PR c++/8214
3030         * typeck.c (convert_for_assignment): Do not use
3031         decl_constant_value on the operand.
3032
3033         PR c++/8511
3034         * pt.c (instantiate_decl): Handle template friends defined outside
3035         of the class correctly.
3036
3037 2002-11-29  Joe Buck <jbuck@synopsys.com>
3038
3039         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
3040         anonymous structs.
3041
3042 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
3043
3044         * class.c (walk_subobject_offsets): Recur on binfos as well as on
3045         types.
3046         (layout_nonempty_base_or_field): Pass it a binfo when processing a
3047         base class.
3048         (layout_empty_base): Likewise.
3049         (build_base_field): Likewise.
3050
3051 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
3052
3053         * class.c (build_base_field): Make sure we get the canonical base
3054         when descending through primary bases.
3055
3056 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
3057
3058         * decl.c (check_initializer): Don't error on initialisation of
3059         a scalar with a brace-enclosed expression.
3060
3061 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
3062
3063         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
3064         (template_parms_equal): Remove prototype.
3065         * typeck.c (buuld_indirect_ref): Reformat.
3066
3067 2002-11-25  Jason Merrill  <jason@redhat.com>
3068
3069         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
3070         and a DO_STMT.
3071
3072 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
3073
3074         * tree.c (cp_build_qualified_type_real): Correct handling of
3075         array types.
3076         * class.c (walk_subobject_offsets): Fix thinko.
3077         (build_base_field): Record offsets of empty bases in primary
3078         virtual bases.
3079         (layout_class_type): Record offsets of empty bases in fields.
3080
3081         * search.c (is_subobject_of_p_1): Fix thinko.
3082         (lookup_field_queue_p): Likewise.
3083
3084 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
3085
3086         * class.c (layout_class_type): Reuse tail padding when laying out
3087         virtual bases.
3088
3089 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
3090
3091         * rtti.c (qualifier_flags): Fix thinko.
3092
3093 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3094
3095         Remove traditional C constructs 1/n.
3096         * cp-tree.h (init_method, set_mangled_name_for_decl,
3097         build_opfncall, hack_identifier, make_thunk, use_thunk,
3098         synthesize_method, implicitly_declare_fn,
3099         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
3100         maybe_clone_body): Remove use of PARAMS.
3101
3102         * method.c (do_build_assign_ref, do_build_copy_constructor,
3103         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
3104         Likewise.
3105         (synthesize_method): Use 'bool' type and constants instead of
3106         'int'.
3107         (locate_copy): Likewise.
3108         (implicitly_declare_fn): Likewise.
3109
3110         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
3111         Remove old-style declaration.
3112         (maybe_clone_body): Use 'bool' type and constants.
3113
3114 2002-11-21  Glen Nakamura  <glen@imodulo.com>
3115
3116         PR c++/8342
3117         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
3118         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
3119         of the branches of a COND_EXPR.
3120
3121 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
3122
3123         * pt.c (for_each_template_parm): Free allocated memory.
3124         * search.c (is_subobject_of_p_1): New function.
3125         (is_subobject_of_p): Avoid walking virtual bases multiple times.
3126
3127 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
3128
3129         * g++spec.c (lang_specific_spec_functions): New.
3130
3131 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
3132
3133         * ChangeLog: Follow spelling conventions.
3134         * class.c: Likewise.
3135         * decl2.c: Likewise.
3136
3137 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
3138
3139         * search.c (dfs_push_decls): Do not try to reorder elements
3140         3..n of method_vec if method_vec has only two elements.
3141         Reverse order of two tests to avoid accessing unallocated
3142         memory.
3143
3144 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
3145
3146         * class.c (dfs_find_final_overrider): Adjust so that the most
3147         derived object is a binfo, rather than a class type.
3148         (find_final_overrider): Likewise.
3149         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
3150         (add_vcall_offset): Likewise.
3151
3152 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3153
3154         PR c++/8389
3155         * pt.c (instantiate_template): Push class scope for member
3156         functions.
3157         (get_mostly_instantiated_function_type): Likewise.  Don't call
3158         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
3159         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
3160         * mangle.c (write_encoding, write_unqualified_name): Adjust.
3161
3162 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
3163
3164         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
3165         vcall offfsets.  Split out ...
3166         (add_vcall_offset): ... new function.
3167
3168         PR c++/8338
3169         * pt.c (for_each_template_parm): Add htab parameter.
3170         (process_partial_specialization): Adjust call.
3171         (push_template_decl_real): Likewise.
3172         (pair_fn_data): Add visited.
3173         (for_each_template_parm_r): Avoid walking duplicates more than
3174         once.
3175         (uses_template_parms): Adjust call to for_each_template_parm.
3176
3177 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
3178
3179         * class.c (add_implicitly_declared_members): Put implicitly
3180         declared functions at the end of TYPE_METHODs when -fabi-version
3181         is at least 2.
3182
3183 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
3184
3185         * decl2.c (finish_file): Correct spelling.
3186
3187 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
3188
3189         * call.c (build_special_member_call): Do not try to lookup VTTs by
3190         name.
3191         * class.c (vtbl_init_data): Add generate_vcall_entries.
3192         (get_vtable_decl): Do not look up virtual tables by name.
3193         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
3194         (set_primary_base): Do not set CLASSTYPE_RTTI.
3195         (determine_primary_base): Likewise.
3196         (get_matching_virtual): Remove.
3197         (get_vcall_index): New function.
3198         (update_vtable_entry_for_fn): Do not try to use virtual thunks
3199         when they are not required.  Assign vcall indices at this point.
3200         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
3201         Do update dynamic_classes.
3202         (build_vtt): Do not add VTTs to the symbol table.
3203         (build_ctor_vtbl_group): Likewise.
3204         (build_vtbl_initializer): Simplify handling of vcall indices.
3205         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
3206         for the most derived class.
3207         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
3208         the vtable.
3209         * cp-tree.h (dynamic_classes): New macro.
3210         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
3211         (CLASSTYPE_RTTI): Remove.
3212         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
3213         (CLASSTYPE_VCALL_INDICES): New macro.
3214         (CLASSTYPE_VTABLES): Likewise.
3215         (BV_USE_VCALL_INDEX_P): Remove.
3216         (build_vtable_path): Remove.
3217         * decl2.c (finish_vtable_vardecl): Remove.
3218         (key_method): Remove #if 0'd code.
3219         (finish_vtable_vardecl): Rename to ...
3220         (maybe_emit_vtables): ... this.
3221         (finish_file): Use it.
3222         * search.c (look_for_overrides_here): Update comment.
3223
3224 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
3225
3226         PR c/7353 redux
3227         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
3228
3229 2002-10-30  Jason Merrill  <jason@redhat.com>
3230
3231         PR c++/8186
3232         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
3233         * call.c (convert_for_arg_passing): Set it.
3234         * except.c (stabilize_throw_expr): Recurse for such an arg.
3235
3236 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
3237
3238         * cp-tree.h (lang_decl_flags): Remove init_priority.
3239         (lang_decl): Add delta.
3240         (GLOBAL_INIT_PRIORITY): Remove.
3241         (THUNK_DELTA): Revise definition.
3242         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
3243         * dump.c (cp_dump_tree): Don't dump it.
3244
3245 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
3246
3247         PR c++/8160
3248         * typeck2.c (process_init_constructor): Call complete_array_type.
3249
3250         PR c++/8149
3251         * decl.c (make_typename_type): Issue errors about invalid results.
3252
3253 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3254
3255         Core issue 287, PR c++/7639
3256         * cp-tree.h (lang_type_class): Add decl_list field.
3257         (CLASSTYPE_DECL_LIST): New macro.
3258         (maybe_add_class_template_decl_list): Add declaration.
3259         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
3260         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
3261         (maybe_add_class_template_decl_list): New function.
3262         (add_implicitly_declared_members): Use it.
3263         * decl.c (maybe_process_template_type_declaration): Likewise.
3264         (pushtag): Likewise.
3265         * friend.c (add_friend): Likewise.
3266         (make_friend_class): Likewise.
3267         * semantics.c (finish_member_declaration): Likewise.
3268         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
3269         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
3270         to process members and friends in the order of declaration.
3271
3272 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
3273
3274         PR c++/8287
3275         * decl.c (finish_destructor_body): Create the label to jump to
3276         when returning from a destructor here.
3277         (finish_function_body): Rather than here.
3278
3279 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
3280
3281         PR c++/7266
3282         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
3283         SCOPE_REF is not null before dereferencing it.
3284
3285 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
3286
3287         * call.c (build_over_call): Use DECL_CONTEXT, not
3288         DECL_VIRTUAL_CONTEXT.
3289         * class.c (modify_vtable_entry): Don't mess with
3290         DECL_VIRTUAL_CONTEXT.
3291         (set_vindex): Remove.
3292         (set_primary_base): Remove vfuns_p parameter.
3293         (determine_primary_base): Likewise.
3294         (modify_all_vtables): Likewise.
3295         (layout_class_type): Likewise.  Adjust calls to other functions
3296         accordingly.
3297         (finish_struct_1): Adjust calls to modified functions.  Set
3298         DECL_VINDEX here.
3299         * cp-tree.h (lang_type_class): Remove vsize.
3300         (CLASSTYPE_VSIZE): Remove.
3301         (lang_decl): Remove thunks.
3302         (DECL_THUNKS): Adjust.
3303         (DECL_VIRTUAL_CONTEXT): Remove.
3304         (duplicate_decls): Don't copy it.
3305         * pt.c (build_template_decl): Don't set it.
3306         (tsubst_decl): Likewise.
3307         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
3308
3309         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
3310         (build_vtable_entry): Remove.
3311         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
3312         (lang_decl): Add thunks.
3313         (DECL_THUNKS): New macro.
3314         * decl.c (duplicate_decls): Copy it.
3315         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
3316         * semantics.c (emit_associated_thunks): Simplify.
3317
3318 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
3319
3320         PR c++/7228
3321         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
3322         lang_type structure exists before accessing field.
3323         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
3324         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
3325         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
3326         * class.c (check_field_decls): Use new macros.
3327         * typeck2.c (process_init_constructor): Remove redundant check for
3328         existence of lang_type structure.
3329
3330 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
3331
3332         * class.c (end_of_base): New method.
3333         (end_of_class): Use it.  Check indirect virtual bases.
3334
3335         * class.c (check_field_decls): Fix typo.
3336
3337 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
3338
3339         PR c++/8067
3340         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
3341         related variables.
3342
3343         PR c++/7679
3344         * spew.c (next_token): Do not return an endless stream of
3345         END_OF_SAVED_INPUT tokens.
3346         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
3347         the cached token stream.
3348         (snarf_defarg): Likewise.
3349
3350 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
3351
3352         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
3353         variably_modified_type_p.
3354         * cp-tree.h: Remove prototype of variably_modified_type_p.
3355         * tree.c (variably_modified_type_p): Remove; now implemented
3356         in language-independent code.
3357
3358 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
3359
3360         PR c++/6579
3361         * spew.c (snarf_parenthesized_expression): New function.
3362         (snarf_block): Use it.
3363
3364 2002-10-22  Richard Henderson  <rth@redhat.com>
3365
3366         * method.c (use_thunk): Always compute vcall_value; assert that
3367         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
3368         for vcall thunks as well.
3369
3370 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
3371
3372         * class.c (empty_base_at_nonzero_offset_p): New function.
3373         (layout_nonempty_base_or_field): Do not check for conflicts when
3374         laying out a virtual base using the GCC 3.2 ABI.
3375         (build_base_field): Correct checking for presence of empty classes
3376         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
3377
3378         * class.c (include_empty_classes): Use normalize_rli.
3379         (layout_class_type): Likewise.
3380
3381         * decl.c (reshape_init): Tweak handling of character arrays.
3382
3383         PR c++/8218
3384         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
3385         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
3386         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
3387         (check_field_decls): Likewise.
3388         (layout_class_type): Likewise.
3389         (finish_struct_1): Initialize it.
3390         (walk_subobject_offsets): Use it to prune searches.
3391
3392 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
3393
3394         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
3395         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
3396         TARGET_ASM_OUTPUT_MI_THUNK in comments.
3397
3398 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
3399
3400         * decl.c (start_decl): Point users of the old initialized-
3401         typedef extension at __typeof__.
3402
3403 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3404
3405         * Make-lang.in (method.o): Depend on TARGET_H.
3406         * method.c (target.h): Include it.
3407         (use_thunk): Use target hooks.  Use vcall thunks, if available.
3408
3409 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3410
3411         * class.c (base_derived_from): Make sure return value is a bool.
3412
3413 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3414
3415         * class.c (find_final_overrider_data_s): Remove overriding_fn and
3416         overriding_base.
3417         (dfs_base_derived_from): New function.
3418         (base_derived_from): Likewise.
3419         (dfs_find_final_overrider): Use base_derived_from.
3420         (find_final_overrider): Adjust.
3421
3422 2002-10-18  Jason Merrill  <jason@redhat.com>
3423
3424         PR c++/8080
3425         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
3426         with condition decls in a template.
3427
3428 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
3429
3430         * class.c (add_method): Compare template parms too.
3431
3432 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
3433
3434         PR c++/7584
3435         * class.c (handle_using_decl): Allow the declaration used to be
3436         from an ambiguous base.
3437
3438         * pt.c (convert_template_argument): Revert this change:
3439                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3440                 * pt.c (convert_template_argument): Do not fold non-type
3441                 template rguments when inside a template.
3442
3443         * init.c (expand_default_init): Handle brace-enclosed initializers
3444         correctly.
3445
3446 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3447
3448         * mangle.c (write_expression): Correct handling of enumeration
3449         constants.
3450         (write_template_arg): Likewise.
3451         * pt.c (convert_template_argument): Do not fold non-type template
3452         arguments when inside a template.
3453
3454         PR c++/7478
3455         * cvt.c (convert_to_reference): Allow references as the incoming
3456         type.
3457
3458 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3459
3460         PR c++/7524
3461         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
3462         build_qualified_type.
3463
3464 2002-10-15  Richard Henderson  <rth@redhat.com>
3465
3466         * error.c (dump_expr): Use real_to_decimal directly, and with
3467         the new arguments.
3468
3469 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
3470
3471         * decl.c (reshape_init): Fix typo.
3472
3473         * cp-tree.h (operator_name_info_t): Add arity.
3474         * lex.c (init_operators): Initialize it.
3475         * mangle.c (write_conversion_operator_name): New function.
3476         (write_unqualified_name): Use it.
3477         (write_template_args): Accept template arguments as a TREE_LIST.
3478         (write_expression): Adjust handling of qualified names to match
3479         specification.
3480
3481 2002-10-15  Jason Merrill  <jason@redhat.com>
3482
3483         * call.c (call_builtin_trap): New fn.
3484         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
3485         (build_call): Don't set current_function_returns_abnormally outside
3486         a function.
3487
3488 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
3489
3490         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
3491         clear CLASSTYPE_EMPTY_P.
3492         (build_base_field): Likewise.
3493         (build_base_fields): Likewise.
3494         (check_bases_and_members): Likewise.
3495         (create_vtbl_ptr): Likewise.
3496         (layout_class_type): Likewise.  Ensure that empty classes have
3497         size zero when used as base classes in the 3.2 ABI.
3498         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
3499         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
3500         parameter.
3501         (is_empty_class): Correct definition when using post-3.2 ABI.
3502         * cp-tree.h (lang_type_class): Add empty_p.
3503         (CLASSTYPE_EMPTY_P): New macro.
3504
3505 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
3506
3507         * init.c (build_delete): Do not apply save_expr for arrays.
3508         (build_vec_delete): Likewise.
3509
3510 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
3511
3512         * decl.c (layout_var_decl): Call layout_decl even for variables
3513         whose type is an array with unspecified bounds.
3514
3515         PR c++/7176
3516         * lex.c (do_identifier): Add another option for the parsing
3517         parameter.
3518         * parse.y (do_id): Use it.
3519
3520 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3521
3522         PRs C++/6803, C++/7721 and C++/7803
3523         * decl.c (grokdeclarator): Gracefully handle template-name as
3524         decl-specifier.
3525
3526 2002-10-11  Jason Molenda  <jmolenda@apple.com>
3527
3528         * init.c (build_field_list): Provide uses_unions_p with a default
3529         value.
3530
3531 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
3532
3533         PR c++/5661
3534         * cp-tree.h (variably_modified_type_p): New function.
3535         (grokdeclarator) Tighten check for variably modified types as
3536         fields.
3537         * pt.c (convert_template_argument): Do not allow variably modified
3538         types as template arguments.
3539         * tree.c (variably_modified_type_p): New function.
3540
3541         * NEWS: Document removal of "new X = ..." extension.
3542         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
3543         brace-enclosed initializers.
3544         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
3545         (initialize_local_var): Remove declaration.
3546         (expand_static_init): Likewise.
3547         * decl.c (next_initializable_field): New function.
3548         (reshape_init): Likewise.
3549         (check_initializer): Use them.  Build dynamic initializer for
3550         aggregates here too.
3551         (initialize_local_var): Simplify, and incorporate cleanup
3552         insertion code as well.
3553         (destroy_local_var): Remove.
3554         (cp_finish_decl): Tidy.
3555         (expand_static_init): Fold checks for whether or not a variable
3556         needs initialization into this function.  Simplify.
3557         * decl2.c (do_static_initialization): Simplify.
3558         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
3559         be done for us automatically.
3560         (expand_default_init): Handle brace-enclosed initializers
3561         correctly.
3562         (expand_aggr_init_1): Remove RTL-generation code.
3563         (build_vec_init): Remove "new X = ..." support.
3564         * parse.y (new_initializer): Likewise.
3565         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
3566         brace-enclosed initializer.
3567         (create_pseudo_type_info): Likewise.
3568         * typeck2.c (store_init_value): Don't try to handle digest_init
3569         being called more than once.
3570         (digest_init): Tidy handling of brace-enclosed initializers.
3571
3572 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3573
3574         * decl.c (typename_hash): Use htab_hash_pointer.
3575
3576 2002-10-10  Jim Wilson  <wilson@redhat.com>
3577
3578         * decl.c (duplicate_decls): Don't call decl_attributes.
3579
3580 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
3581
3582         PR c/7353
3583         * decl.c (start_decl): Unconditionally issue error for
3584         'typedef foo = bar'.
3585         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
3586         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
3587
3588 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3589
3590         * decl2.c (prune_vtable_vardecl): Delete unused function.
3591
3592 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3593
3594         PR c++/7754
3595         * decl2.c (finish_anon_union): Do not expand anonymous unions when
3596         procesing template functions.
3597         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
3598         type. Call layout_decl.
3599         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
3600
3601 2002-10-07  Richard Henderson  <rth@redhat.com>
3602
3603         * decl2.c, pt.c: Revert c++/7754 fix.
3604
3605 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3606
3607         PR c++/7804
3608         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
3609
3610 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3611
3612         PR c++/7931
3613         * pt.c (for_each_template_parm_r): Handle BASELINKs.
3614
3615         PR c++/7754
3616         * decl2.c (finish_anon_union): Do not expand anonymous unions when
3617         procesing template functions.
3618         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
3619         type. Call layout_decl.
3620         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
3621
3622 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3623
3624         PR c++/8006
3625         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
3626         template parameters.
3627         (globals): Add entity and need_abi_warning.
3628         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
3629         CLASSTYPE_TEMPLATE_INFO.
3630         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
3631         TYPE_TI_TEMPLATE.
3632         (write_prefix): Handle typename types correctly.
3633         (write_template_prefix): Handle template template parameters
3634         correctly.
3635         (start_mangling): Add entity parameter.
3636         (finish_mangling): Warn about names whose mangling will change.
3637         (mangle_decl_string): Adjust.
3638         (mangle_type_string): Likewise.
3639         (mangle_special_for_type): Likewise.
3640         (mangle_ctor_vtbl_for_type): Likewise.
3641         (mangle_thunk): Likewise.
3642         (mangle_guard_variable): Likewise.
3643         (mangle_ref_init_variable): Likewise.
3644
3645 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
3646
3647         PR c++/7188.
3648         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
3649         * cp-tree.h (emit_base_init): Rename to ....
3650         (emit_mem_initializers): ... this.
3651         (expand_member_init): Change prototype.
3652         * init.c (perform_member_init): Compute explicit, rather than
3653         requiring it as a parameter.
3654         (sort_member_init): Rename to ...
3655         (sort_mem_initializers): ... this.  Process bases and data members
3656         together.
3657         (sort_base_init): Remove.
3658         (emit_base_init): Rename to ...
3659         (emit_mem_initializers): ... this.
3660         (expand_aggr_vbase_init_1): Remove.
3661         (construct_virtual_bases): Rename to ...
3662         (construct_virtual_base): ... this.
3663         (expand_member_init): Rework handling of base initializers.
3664         * method.c (do_build_copy_constructor): Use
3665         finish_mem_initializers.
3666         * parse.y (member_init): Adjust calls to expand_member_init.
3667         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
3668         (tsubst_initializer_list): Use expand_member_init.
3669         * semantics.c (finish_mem_intiailizers): Simplify.
3670
3671 2002-10-02  Matt Austern  <austern@apple.com>
3672         * decl.c (walk_vtables_r): Fixed typo that caused result to
3673         never get a nonzero value.
3674
3675 2002-10-02  Roger Sayle  <roger@eyesopen.com>
3676
3677         PR optimization/6627
3678         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
3679         from here, and move it to tree.h.
3680         * decl.c (cxx_init_decl_processing): If storing the vbit
3681         in function pointers, ensure that force_align_functions_log
3682         is atleast one.
3683
3684 2002-10-02  Matt Austern  <austern@apple.com>
3685
3686         * class.c (check_field_decls): Changed warning about const member
3687         variables so that it doesn't get issued for a class aggregate.
3688
3689 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
3690
3691         * decl.c (cp_finish_decl): Make sure array types are laid out,
3692         even if the array bounds are unknown.
3693
3694 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
3695
3696         * class.c (build_vtbl_initializer): Change build_c_cast
3697         to build1.
3698
3699 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
3700
3701         * decl.c (cp_finish_decl): Make sure array types are laid out,
3702         even if the array bounds are unknown.
3703
3704         * decl.c (cp_finish_decl): Correct check for dynamic
3705         initialization of thread-local storage.
3706
3707 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
3708
3709         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
3710         overloaded.
3711
3712 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
3713
3714         * class.c (build_vtbl_initializer): Add cast.
3715         (add_vcall_offset_vtbl_entries_1):
3716         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
3717
3718 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
3719
3720         * class.c (walk_subobject_offsets): Correct the calculation of
3721         offsets for virtual bases.  Correct the counting of array
3722         elements.
3723         (layout_nonempty_base_or_field): Simplify.  Correct the
3724         calculation of offsets to be propagated through the binfo
3725         hierarchy.
3726         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
3727         Add the FIELD_DECL to TYPE_FIELDS.
3728         (build_base_fields): Adjust accordingly.
3729         (layout_virtual_bases): Use build_base_field.
3730         (end_of_class): Return a tree, not an integer.
3731         (warn_about_ambiguous_direct_bases): Rename to ...
3732         (warn_about_ambiguous_bases): ... this.
3733         (include_empty_classes): New function.
3734         (layout_class_type): Create an alternative version of the type to
3735         be used when as a base class type.  Do not call
3736         finish_record_layout until we are done laying out the class.
3737         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
3738         as_base.
3739         (CLASSTYPE_SIZE): Reimplement.
3740         (CLASSTYPE_SIZE_UNIT): Likewise.
3741         (CLASSTYPE_ALIGN): Likweise.
3742         (CLASSTYPE_USER_ALIGN): Likewise.
3743         (CLASSTYPE_AS_BASE): New macro.
3744         (DECL_INITIALIZED_P): Likewise.
3745         (extract_init): Remove prototype.
3746         (build_forced_zero_init): Rename to ...
3747         (build_zero_init): ... this.
3748         (force_store_init_value): Remove.
3749         * decl.c (obscure_complex_init): Remove.
3750         (duplicate_decls): Copy DECL_INITIALIZED_P.
3751         (check_initializer): Do not leave junk in DECL_INITIAL.
3752         (cp_finish_decl): Handle zero-initialization of entities with
3753         static storage duration.
3754         * expr.c (extract_init): Remove.
3755         * init.c (build_forced_zero_init): Remove.
3756         (build_zero_init): New function.
3757         (build_default_init): Use it.
3758         (build_field_list): Skip FIELD_DECLs for base subobjects.
3759         (push_base_cleanups): Likewise.
3760         * method.c (do_build_assign_ref): Likewise.
3761         (synthesize_exception_spec): Likewise.
3762         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
3763         (regenerate_decl_from_template): To not set DECL_INITIAL for a
3764         static data member whose initialization took place in its class.
3765         (instantiate_decl): Do not pass an initializer to cp_finish_decl
3766         in that situation.
3767         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
3768         (dfs_unuse_fields): Likewise.
3769         * tree.c (pod_type_p): Handle error_mark_node.
3770         (zero_init_p): Likewise.
3771         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
3772         subobjects.
3773         * typeck2.c (store_init_value): Remove #if 0'd code.
3774         (force_store_init_value): Remove.
3775         (process_init_constructor): Use build_zero_init.
3776
3777 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
3778
3779         PR c++/7788
3780         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
3781
3782 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
3783
3784         * cp-tree.h: Fix comment typos.
3785         * decl.c: Likewise.
3786         * pt.c: Likewise.
3787
3788 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
3789
3790         * cp/class.c (contains_empty_class_p): New method.
3791         (walk_subobject_offsets): Correct computation of field offset.
3792         (layout_empty_base): Correct placement of emtpy base classes.
3793         (layout_class_type): Warn about ABI changes.
3794
3795 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
3796
3797         * cp/class.c (layout_virtual_bases): Do not round the size of the
3798         type to a multiple of the alignment before laying out virtual bases.
3799         (layout_class_type): Correct handling of bit-fields that are wider
3800         than their type inside unions.  Round the size of the type to a
3801         even number of bytes when computing the size without virtual
3802         bases.
3803         * cp/cp-tree.h (abi_version_at_least): New macro.
3804
3805 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
3806
3807         * ChangeLog: Follow spelling conventions.
3808         * ChangeLog.2: Likewise.
3809         * call.c: Likewise.
3810         * class.c: Likewise.
3811         * cp-tree.h: Likewise.
3812         * cvt.c: Likewise.
3813         * decl.c: Likewise.
3814         * decl2.c: Likewise.
3815         * except.c: Likewise.
3816         * friend.c: Likewise.
3817         * g++spec.c: Likewise.
3818         * init.c: Likewise.
3819         * lex.c: Likewise.
3820         * mangle.c: Likewise.
3821         * method.c: Likewise.
3822         * operators.def: Likewise.
3823         * optimize.c: Likewise.
3824         * pt.c: Likewise.
3825         * rtti.c: Likewise.
3826         * search.c: Likewise.
3827         * semantics.c: Likewise.
3828         * spew.c: Likewise.
3829         * tree.c: Likewise.
3830         * typeck.c: Likewise.
3831
3832 2002-09-18  Devang Patel  <dpatel@apple.com>
3833
3834         * cp/cp-tree.h: New prototype for walk_vtabls().
3835         * cp/decl.c (walk_vtables_r): New function.
3836         (struct cp_binding_level): Add new members, namespaces,
3837         names_size and vtables.
3838         (add_decl_to_level): Add decl in namespaces or vtables
3839         chain, if conditions match.
3840         (walk_vtables): New function.
3841         (walk_namespaces_r): Travers separate namespace chain
3842         for namespace decls.
3843         (wrapup_globals_for_namespace): Use names_size instead
3844         of list_length().
3845         * cp/decl2.c (finish_file): Use walk_vtables() instead of
3846         walk_globals() to walk vtable decls.
3847
3848 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
3849
3850         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
3851         ICE with invalid pointers & references.
3852
3853 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
3854
3855         * Make-lang.in: Remove all references to the demangler.
3856         * cxxfilt.c: Moved to binutils.
3857
3858 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3859
3860         PR c++/7718
3861         * pt.c (tsubst_decl): Remove assert.
3862
3863         Remove DR 295 implementation.
3864         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
3865         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
3866         about ignoring volatile qualifiers.
3867
3868         * search.c (lookup_member): Correct documentation.
3869
3870 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
3871
3872         * cp-tree.h (union lang_tree_node): Add chain_next option.
3873
3874 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3875
3876         * parse.y (parse_finish_call_expr): Check lookup_member result.
3877
3878         PR c++/7015
3879         * semantic.c (finish_asm_stmt): Fix operand/output_operands
3880         thinko.
3881         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
3882
3883 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
3884
3885         PR c++/7919
3886         * call.c (build_over_call): Convert this pointer for fns found by
3887         using decls.
3888
3889 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
3890
3891         * ChangeLog: Follow spelling conventions.
3892         * ChangeLog.1: Likewise.
3893
3894 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
3895
3896         PR c++/7768
3897         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
3898
3899 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
3900
3901         * error.c: Fix comment formatting.
3902         * except.c: Likewise.
3903         * expr.c: Likewise.
3904         * friend.c: Likewise.
3905         * g++spec.c: Likewise.
3906         * init.c: Likewise.
3907         * lex.c: Likewise.
3908         * mangle.c: Likewise.
3909         * method.c: Likewise.
3910         * optimize.c: Likewise.
3911         * pt.c: Likewise.
3912         * rtti.c: Likewise.
3913         * search.c: Likewise.
3914         * semantics.c: Likewise.
3915         * spew.c: Likewise.
3916         * tree.c: Likewise.
3917         * typeck.c: Likewise.
3918         * typeck2.c: Likewise.
3919
3920 2002-09-13  Matt Austern  <austern@apple.com>
3921
3922         PR C++/7828
3923         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
3924         * cp/call.c: Change call-by-const-reference mechanism to use
3925         non_cast_lvalue_p when deciding whether the create a temporary.
3926         We need a temporary when passing, e.g. (long) x by const ref.
3927
3928 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
3929
3930         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
3931
3932 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
3933
3934         * decl.c: Fix comment formatting.
3935         * decl2.c: Likewise.
3936
3937 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
3938
3939         * call.c: Fix comment formatting.
3940         * class.c: Likewise.
3941         * cp-lang.c: Likewise.
3942         * cp-tree.h: Likewise.
3943         * cvt.c: Likewise.
3944
3945 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
3946
3947         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
3948         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
3949         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
3950         minor adjustments (use version_string, eliminate yet another
3951         duplicate of xmalloc)
3952
3953 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3954
3955         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
3956
3957 2002-09-05  Jason Merrill  <jason@redhat.com>
3958
3959         * typeck2.c (add_exception_specifier): Only pedwarn for an
3960         incomplete type.
3961         (require_complete_eh_spec_types): New fn.
3962         (cxx_incomplete_type_diagnostic): Also support pedwarning.
3963         * typeck.c (complete_type_or_diagnostic): Likewise.
3964         * call.c (build_call): Call require_complete_eh_spec_types.
3965         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
3966         on an incomplete type.
3967
3968 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
3969
3970         * decl.c (start_cleanup_fn): Clear interface_only before
3971         start_function, restore it afterwards.
3972
3973 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
3974
3975         * cp-tree.h (finish_builtin_type): Remove.
3976         * decl2.c (finish_builtin_type): Move to common code.
3977         * decl.c (build_ptrmemfunc_type): Adjust.
3978         * rtti.c (create_pseudo_type_info): Adjust.
3979         (create_tinfo_types): Adjust.
3980
3981 2002-08-31  Jason Merrill  <jason@redhat.com>
3982
3983         * cp-lang.c (cp_expr_size): Allow initialization from a
3984         CONSTRUCTOR.
3985
3986 2002-08-30  Richard Henderson  <rth@redhat.com>
3987
3988         PR opt/7515
3989         * tree.c: Include target.h.
3990         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
3991         don't bind locally.
3992         * Makefile.in (tree.o): Update.
3993
3994 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
3995
3996         * class.c (layout_virtual_bases): Warn about bugs in G++ that
3997         result in incorrect object layouts.
3998         (layout_class_type): Likewise.
3999
4000 2002-08-24  Matt Austern  <austern@apple.com>
4001
4002         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
4003         are allowable.
4004         (real_lvalue_p): Update caller.
4005         (lvalue_p): Ditto.
4006         (non_cast_lvalue_or_else): New.
4007         * tree.h: Declare it.
4008         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
4009
4010 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
4011
4012         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
4013         and COND_EXPR specially; fix error message output.
4014
4015 2002-08-22  Jason Merrill  <jason@redhat.com>
4016
4017         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
4018         * semantics.c (nullify_returns_r): Likewise.
4019
4020 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4021
4022         Fix PR/7621
4023         * typeck.c (finish_class_member_access_expr): Diagnose cases where
4024         name lookup finds nothing.
4025
4026 2002-08-15  Jason Merrill  <jason@redhat.com>
4027
4028         * semantics.c (finish_then_clause): Remove redundant assignment.
4029         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
4030         extra binding level outside the if/switch statement.
4031         (finish_while_cond, finish_for_cond): Rewrite complex condition
4032         into the loop body.
4033
4034 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
4035
4036         * parse.y (sizeof, alignof, typeof): New non-terminals to
4037         increment skip_evaluation.  Replace terminals with them and
4038         decrement skip_evaluation at the end of rules using them.
4039         * decl2.c (mark_used): Don't assemble_external if
4040         skipping evaluation.
4041
4042 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
4043
4044         Fix PR/7504
4045         * parse.y (parse_finish_call_expr): Handle incomplete
4046         type used to name a scope.
4047
4048 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
4049
4050         PR c++/7598
4051         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
4052         regression caused by my 2002-08-08 patch.
4053
4054 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
4055
4056         * decl.c (pushdecl_class_level): Honor requests to bind names to
4057         OVERLOADs.
4058
4059 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4060
4061         * decl2.c (build_call_from_tree): Fix uninitialized variable.
4062         * parse.y (parse_finish_call_expr): Likewise.
4063         * repo.c (old_args, old_dir, old_main): Const-ify.
4064
4065 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
4066
4067         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
4068         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
4069         * optimize.c (maybe_clone_body): Likewise.
4070         * pt.c (tsubst_enum): Likewise.
4071         (lookup_template_class): Likewise.
4072         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
4073
4074 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
4075
4076         * lang-specs.h: Remove -ansi.
4077
4078 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
4079
4080         * tree.c (maybe_dummy_object): Replace // with /* */
4081
4082 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
4083
4084         * call.c (standard_conversion): Use build_ptrmem_type.
4085         * cp-tree.h (build_ptrmem_type): New function.
4086         (adjust_result_of_qualified_name_lookup): Likewise.
4087         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
4088         static data members.
4089         (build_ptrmem_type): New function.
4090         (grokdeclarator): Do not use build_offset_type when encountering a
4091         qualified name.
4092         * parse.y (parse_finish_call_expr): Use
4093         adjust_result_of_qualified_name_lookup.
4094         * search.c (adjust_result_of_qualified_name_lookup): New function.
4095         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
4096         accessing OFFSET_TYPEs directly.
4097
4098 2002-08-08  Mike Stump  <mrs@apple.com>
4099
4100         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
4101         (type_decays_to): Likewise.
4102         * class.c (find_final_overrider): Likewise.
4103         (maybe_note_name_used_in_class): Likewise.
4104         * decl.c (current_tmpl_spec_kind): Likewise.
4105         (add_binding): Likewise.
4106         (push_class_binding): Likewise.
4107         (duplicate_decls): Likewise.
4108         (layout_var_decl): Likewise.
4109         (grokfndecl): Likewise.
4110         (grokdeclarator): Likewise.
4111         (check_default_argument): Likewise.
4112         * decl2.c (handle_class_head): Likewise.
4113         * error.c (dump_template_decl): Likewise.
4114         * init.c (build_offset_ref): Likewise.
4115         * pt.c (check_specialization_scope): Likewise.
4116         (determine_specialization): Likewise.
4117         (check_explicit_specialization): Likewise.
4118         (maybe_check_template_type): Likewise.
4119         (process_partial_specialization): Likewise.
4120         (check_default_tmpl_args): Likewise.
4121         (push_template_decl_real): Likewise.
4122         (convert_template_argument): Likewise.
4123         (try_class_unification): Likewise.
4124         (get_bindings_real): Likewise.
4125         (do_decl_instantiation): Likewise.
4126         * semantics.c (begin_function_definition): Likewise.
4127         (finish_member_declaration): Likewise.
4128         (check_multiple_declarators): Likewise.
4129         * typeck.c (comp_array_types): Likewise.
4130         (comptypes): Likewise.
4131         (expr_sizeof): Likewise.
4132         (build_binary_op): Likewise.
4133         (dubious_conversion_warnings): Likewise.
4134         (check_return_expr): Likewise.
4135
4136 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
4137
4138         * typeck.c (build_class_member_access_expr): Do not return
4139         error_mark_node when no error has occurred.
4140
4141 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4142
4143         * typeck.c (build_component_addr): Remove.
4144         (build_unary_op): Just check it's not a bitfield, and then build
4145         an ADDR_EXPR.
4146
4147 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4148
4149         * class.c (convert_to_base): Correct check for error_mark_node.
4150         (create_vtable_ptr): Remove unused VFUNS_P parm.
4151
4152 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4153
4154         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
4155
4156 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
4157
4158         Rework build_component_ref.
4159         * call.c (build_vfield_ref): Do not go through build_component_ref.
4160         (build_field_call): Use build_class_member_access_expr.
4161         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
4162         (build_object_call): Likewise.
4163         * class.c (convert_to_base): New function.
4164         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
4165         (instantiate_type): Handle BASELINKs.
4166         * cp-tree.def (BASELINK): New tree code.
4167         * cp-tree.h (BASELINK_P): Reimplement.
4168         (SET_BASELINK_P): Remove.
4169         (BASELINK_BINFO): Reimplement.
4170         (BASELINK_FUNCTIONS): Likewise.
4171         (BASELINK_ACCESS_BINFO): Likewise.
4172         (BASELINK_OPTYPE): Likewise.
4173         (convert_to_base): New function.
4174         (name_p): Likewise.
4175         (build_object_ref): Remove.
4176         (build_component_ref_1): Likewise.
4177         (build_component_ref): Likewise.
4178         (build_x_component_ref): Likewise.
4179         (build_class_member_access_expr): New function.
4180         (finish_class_member_access_expr): Likewise.
4181         (build_ptrmemfunc_access_expr): Likewise.
4182         * decl.c (grokdeclarator): Handle BASELINKs.
4183         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
4184         finish_class_member_access_expr.
4185         (arg_assoc): Handle BASELINKs.
4186         (do_class_using_decl): Likewise.
4187         * error.c (dump_decl): Likewise.
4188         (dump_expr): Use build_ptrmemfunc_access_expr.
4189         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
4190         destructors.
4191         (build_throw): Use BASELINK_FUNCTIONS.
4192         * init.c (perform_member_init): Use
4193         build_class_member_access_expr.
4194         (build_offset_ref): Handle BASELINKs.  Use
4195         build_class_member_access_expr.
4196         * method.c (hack_identifier): Likewise.
4197         * parse.y (do_id): Use BASELINK, not TREE_LIST.
4198         (primary): Remove uses of build_object_ref.
4199         * pt.c (lookup_template_function): Handle BASELINKs.
4200         (resolve_overloaded_unification): Likewise.
4201         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
4202         (lookup_field): Use BASELINK, not TREE_LIST.
4203         (lookup_fnfiels): Likewise.
4204         (setup_class_bindings): Likewise.
4205         * semantics.c (finish_object_call_expr): Do not use
4206         build_method_call when we already know what function is being
4207         called.
4208         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
4209         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
4210         TREE_CHAIN.
4211         (name_p): New function.
4212         * typeck.c (build_object_ref): Remove.
4213         (build_component_ref_1): Likewise.
4214         (build_x_component_ref): Likewise.
4215         (build_class_member_access_expr): New function.
4216         (finish_class_member_access_expr): Likewise.
4217         (build_ptrmemfunc_access_expr): Likewise.
4218         (get_member_function_from_ptrfunc): Use
4219         build_ptrmemfunc_access_expr.
4220         (build_binary_op): Likewise.
4221         (build_unary_op): Likewise.
4222         (build_ptrmemfunc): Likewise.
4223         (pfn_from_ptrmemfunc): Likewise.
4224         * typeck2.c (build_m_component_ref): Adjust comment.
4225
4226 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
4227
4228         * Make-lang.in (CXX_C_OBJS): Update.
4229         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
4230         * cp-tree.h (cxx_decode_option): Remove.
4231         * decl2.c (compare_options, lang_f_options, unsupported_options,
4232         cxx_decode_option): Remove.
4233
4234 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
4235
4236         * typeck.c (build_x_unary_op): Handle pointer-to-member.
4237
4238 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
4239
4240         * class.c: Don't include obstack.h.
4241         (popclass):
4242         * decl2.c: Delete bogus comment.
4243         * error.c: Don't include obstack.h.
4244         * except.c: Likewise.
4245         (dump_type): Correct comment.
4246         * method.c: Don't include obstack.h.
4247         * tree.c: Likewise.
4248
4249 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
4250
4251         Fix PR/2213
4252         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
4253         expressions to pointer-to-data-member of pointer-to-member-functions.
4254
4255 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
4256
4257         * cvt.c (ocp_convert): Delete obsolete code.
4258         * parse.y (permanent_obstack): Delete declaration.
4259         * pt.c (permanent_obstack): Delete declaration.
4260         * repo.c (permanent_obstack): Delete declaration.
4261         (open_repo_file): Use xmalloc instead of permanent_obstack.
4262         (init_repo): Use xstrdup instead of permanent_obstack.
4263
4264 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
4265
4266         * cp-tree.h (VF_DERIVED_VALUE): Remove.
4267         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
4268
4269 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
4270
4271         PR 7470.
4272         C++ ABI change - vfunc ordering.
4273         * class.c (add_virtual_function): Remove.
4274         (dfs_modify_all_vtables): Take list of all declared
4275         virtuals. Assign all that are not in primary base.
4276         (check_for_override): Adjust comments.
4277         (create_vtable_ptr): Take single list of virtuals. Build chain
4278         of declared virtuals here.
4279         (layout_class_type): Take single list of virtuals. Adjust.
4280         (finish_struct_1): Keep virtuals on single list. Adjust.
4281
4282 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
4283
4284         * init.c (build_member_call): Use build_new_method_call, not
4285         build_method_call.
4286
4287 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
4288
4289         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
4290
4291 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
4292
4293         * call.c (build_method_call): Issue a more helpful error message
4294         about ambiguous method names.
4295
4296 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
4297
4298         * tree.c (build_shared_int_cst): Make cache file scope, and
4299         GTY it.
4300
4301 2002-08-02  Jason Merrill  <jason@redhat.com>
4302
4303         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
4304         (cp_expr_size): New fn.
4305         * call.c (build_over_call): Lose empty class hackery.
4306         (convert_arg_to_ellipsis): Promote non-POD warning to error.
4307         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
4308
4309         * semantics.c (expand_body): Do tree optimization in the function
4310         context, too.
4311
4312 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
4313
4314         * cp-tree.h: Move all warning and flag declarations to c-common.h.
4315         * decl.c: Move all warning and flag variables to c-common.c.
4316         * decl2.c: Move all warning and flag variables to c-common.c.
4317         * lex.c (flag_digraphs): Remove.
4318         (warn_traditional): Now in c-common.c.
4319
4320 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
4321
4322         * call.c (build_field_call): Do not look up the field by name.
4323         (build_method_call): Simplify.
4324         (struct z_candidate): Add access_path and conversion_path.  Remove
4325         basetype_path.
4326         (convert_class_to_reference): Adjust use of
4327         add_function_candidate.
4328         (add_candidate): Add conversion_path argument.
4329         (add_function_candidate): Use it.
4330         (add_conv_dndidate): Likewise.
4331         (build_builtin_candidate): Likewise.
4332         (add_template_candidate_real): Add conversion_path argument.
4333         (add_template_conv_candidate): Likewise.
4334         (add_template_candidate): Likewise.
4335         (build_user_type_conversion_1): Use it.
4336         (build_new_function_call): Remove name lookup code.  Adjust use of
4337         add_template_candidate and add_function_candidate.
4338         (build_new_op): Likewise.
4339         (convert_like_real): Use build_special_member_call.
4340         (build_over_call): Use cand->conversion_path.
4341         (build_special_member_call): New method.
4342         (build_new_method_call): Remove name lookup code.
4343         * cp-tree.def (OFFSET_REF): Update documentation.
4344         (TEMPLATE_ID_EXPR): Likewise.
4345         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
4346         (BASELINK_OPTYPE): Likewise.
4347         (build_new_method_call): Adjust prototype.
4348         (build_special_member_call): New method.
4349         (build_baselink): New method.
4350         (build_offset_ref_call_from_tree): Likewise.
4351         (build_call_from_tree): Likewise.
4352         (finish_qualified_call_expr): Remove.
4353         (finish_call_expr): Adjust prototype.
4354         (build_x_function_call): Remove.
4355         * cvt.c (ocp_convert): Use build_special_member_call.
4356         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
4357         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
4358         CALL_EXPR.
4359         (build_offset_ref_call_from_tree): New function.
4360         (build_call_from_tree): Likewise.
4361         * init.c (expand_cleanup): Use build_special_member_call.
4362         (expand_default_init): Likewise.
4363         (build_member_call): Use finish_call_expr.
4364         (build_new_1): Use build_special_member_call.
4365         (push_base_cleanups): Likewise.
4366         * method.c (do_build_assign_ref): Likewise.
4367         * parse.y (template_id): Do not pass a COMPONENT_REF to
4368         lookup_template_function.
4369         (primary): Use parse_finish_call_epxr, not finish_call_expr.
4370         (parse_finish_call_expr): New function.
4371         * pt.c (lookup_template_function): Add assertions.
4372         * search.c (lookup_base): Allow T to be a binfo.
4373         (build_baselink): New function.
4374         (lookup_member): Use it.
4375         * semantics.c (finish_call_expr): Do not do name lookup.
4376         (finish_object_call_expr): Remove #if 0'd code.
4377         (finish_qualified_call_expr): Remove.
4378         * typeck.c (build_x_function_call): Remove.
4379         (build_static_case): Use build_special_member_call.
4380         * typeck2.c (build_functional_cast): Likewise.
4381
4382 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
4383
4384         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
4385
4386 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
4387
4388         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
4389
4390 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
4391
4392         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
4393         documentation.
4394
4395 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
4396
4397         * cp-tree.h: Comment typo fix.
4398
4399 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
4400
4401         * spew.c (space_for_token): Allocate zeroed memory for a new token
4402         chunk.
4403
4404 2002-07-27  Roger Sayle  <roger@eyesopen.com>
4405
4406         * decl.c (builtin_function_1): No need to explicitly mark
4407         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
4408
4409 2002-07-27  Roger Sayle  <roger@eyesopen.com>
4410
4411         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
4412
4413 2002-07-26  Jason Merrill  <jason@redhat.com>
4414
4415         * call.c (build_over_call): Likewise.
4416         (cp_convert_parm_for_inlining): New fn.
4417         (convert_for_arg_passing): New fn.
4418         (convert_default_arg, build_over_call): Use it.
4419         (type_passed_as): New fn.
4420         * pt.c (tsubst_decl): Use it.
4421         * decl2.c (cp_build_parm_decl): New fn.
4422         (build_artificial_parm): Use it.
4423         (start_static_storage_duration_function): Likewise.
4424         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
4425         (grokparms): Don't mess with DECL_ARG_TYPE.
4426         * typeck.c (convert_arguments): Use convert_for_arg_passing.
4427         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
4428         Define.
4429         * cp-tree.h: Declare new fns.
4430
4431 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
4432
4433         * cp-tree.h (flag_operator_names): Remove.
4434         * decl2.c (flag_operator_names): Remove.
4435         (lang_f_options): Remove operator-names.
4436         * lex.c (D_OPNAME): Remove.
4437         (reswords): Remove operator names.
4438         (rid_to_yy): Remove operator names.
4439         (init_reswords): No need to handle D_OPNAME.
4440         * spew.c (read_process_identifier): There are no operator
4441         names.
4442
4443 2002-07-26  Jason Merrill  <jason@redhat.com>
4444
4445         * dump.c (cp_dump_tree): Call c_dump_tree.
4446         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
4447
4448 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
4449
4450         * error.c (print_whitespace): Remove.
4451         * g++spec.c (LIBUNWIND): Move.
4452         * mangle.c (mangled_position, write_signed_number): Remove.
4453
4454 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
4455
4456         * decl2.c (cxx_decode_option): Similarly.
4457
4458 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
4459
4460         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
4461         (cxx_sizeof_or_alignof_type): Take a third argument.
4462         (cxx_sizeof): Adjust definition.
4463         (cxx_alignof): Likewise.
4464         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
4465         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
4466         complaining.
4467         (c_sizeof_nowarn): Remove definition.
4468         (build_unary_op): Use cxx_sizeof_nowarn.
4469
4470 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
4471
4472         * tree.c (cp_build_qualified_type_real): When copying
4473         pointer-to-method types, unshare the record that holds
4474         the cached pointer-to-member-function type.
4475
4476 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
4477
4478         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
4479
4480 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
4481
4482         Fix PR/7363:
4483         * typeck.c (cxx_sizeof_or_alignof_type): New function.
4484         (c_sizeof): Remove definition.
4485         (expr_sizeof): Use cxx_sizeof.
4486         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
4487         * decl.c (finish_destructor_body): Use cxx_sizeof.
4488         * semantics.c (finish_alignof): Likewise.
4489         (finish_alignof): Use cxx_alignof.
4490         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
4491         (cxx_sizeof_or_alignof_type): Declare.
4492         (my_friendly_assert): Move to ../c-common.h.
4493
4494 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
4495
4496         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
4497
4498 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4499
4500         PR c++/7347, c++/7348
4501         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
4502         * decl.c (make_typename_type): Use it.
4503         (make_unbound_class_template): Likewise.
4504         (lookup_name_real): Don't call type_access_control if scope is
4505         template parameter dependent.
4506         * parse.y (template_arg): Call make_unbound_class_template with
4507         tf_parsing set.
4508         (nest_name_specifier): Call make_typename_type with tf_parsing set.
4509         (typename_sub0): Likewise.
4510         (typename_sub1): Likewise.
4511         (instantiate_decl): Push class scope.
4512         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
4513         for both static variable and member function template.
4514         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
4515         and arguments.
4516         * search.c (type_access_control): Do type access for TEMPLATE_DECL
4517         too.
4518
4519 2002-07-20  Roger Sayle  <roger@eyesopen.com>
4520
4521         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
4522         test by using positive_option.  Make whitespace consistent.
4523
4524 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
4525
4526         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
4527         members with 'locus'.  Adjust use throughout.
4528         (struct feed):  Likewise.
4529         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
4530         Adjust use.
4531         (snarf_defarg): Use error(), not error_with_file_and_line().
4532
4533 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
4534
4535         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
4536         cpp_options is included.
4537
4538 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4539
4540         PR c++/2862, c++/2863
4541         * pt.c (determine_specialization): Compare the length of
4542         TYPE_ARG_TYPES.  Tidy.
4543
4544 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4545
4546         PR c++/3797
4547         * decl.c (duplicate_decls): Don't propagate inlining parameters from
4548         olddecl to newdecl when newdecl is a specialization of the
4549         instantiation olddecl.
4550
4551 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4552
4553         PR c++/4802, c++/5387
4554         * decl.c (make_typename_type): Use enforce_access.
4555
4556 2002-07-17  Scott Snyder <snyder@fnal.gov>
4557
4558         PR c++/7320
4559         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
4560
4561 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
4562
4563         * class.c (add_method): Correct handling of conversion operators.
4564
4565 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
4566
4567         PR c++/7224
4568         * class.c (add_method): Simplify.
4569
4570 2002-07-11  Jason Merrill  <jason@redhat.com>
4571
4572         PR c++/7279
4573         * tree.c (cp_copy_res_decl_for_inlining): Also copy
4574         TREE_ADDRESSABLE.
4575
4576 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
4577
4578         * pt.c (template_parm_this_level_p, push_template_decl_real):
4579         Pass depth as int pointer.
4580
4581 2002-07-11  Tim Josling  <tej@melbpc.org.au>
4582
4583         Remove front end hard coding from gengtype.c.
4584
4585         * config-lang.in (gtfiles): Add files needed for this front end.
4586
4587 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
4588
4589         * cp-tree.h (unqualified_name_lookup_error): Declare it.
4590         (begin_function_definition): Adjust prototype.
4591         * lex.c (unqualified_name_lookup_error): New function, split out
4592         from ...
4593         (do_identifier): ... here.
4594         * parse.y (parse_begin_function_definition): New function.
4595         (fn.def1): Use it.
4596         * semantics.c (begin_function_definition): Accept decl-specifiers
4597         and attributes as separate parameters.
4598
4599 2002-07-10  Jason Merrill  <jason@redhat.com>
4600
4601         PR c++/6255
4602         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
4603         modifying the old one.
4604
4605 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
4606
4607         * cp-tree.h (constructor_name_p): Declare it.
4608         (check_template_template_default_arg): Likewise.
4609         * class.c (handle_using_decl): Use constructor_name_p.
4610         * decl.c (grokdeclarator): Likewise.
4611         * decl2.c (constructor_name_p): Define it.
4612         * init.c (build_member_call): Use constructor_name_p.
4613         * parse.y (template_parm): Use check_template_template_default_arg.
4614         * pt.c (check_explicit_specialization): Use constructor_name_p.
4615         * semantics.c (check_template_template_default_arg): New function.
4616
4617 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4618
4619         * pt.c (can_complete_type_without_circularity): Add static to
4620         function definition.
4621
4622 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
4623
4624         * cp-tree.h (have_extern_spec): Declare it
4625         * decl.c (have_extern_spec): Define it.
4626         (start_decl): Eliminate use of used_extern_spec.
4627         (start_function): Likewise.
4628         * parse.y (have_extern_spec): Remove declaration.
4629         (used_extern_spec): Likewise.
4630         (frob_specs): Eliminate use of used_extern_spec.
4631         (.hush_warning): Likewise.
4632
4633 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
4634
4635         * Make-lang.in (cp/parse.o): Depend on decl.h.
4636         * cp-tree.h (do_decl_instantiation): Change prototype.
4637         * parse.y: Include decl.h.
4638         (parse_decl_instantiation): New function.
4639         (explicit_instantiation): Use it.
4640         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
4641         and DECLSPECS.
4642
4643 2002-07-07  Roger Sayle  <roger@eyesopen.com>
4644
4645         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
4646         constructor and destructor tests when passed a TEMPLATE_DECL.
4647
4648 2002-07-05  Jason Merrill  <jason@redhat.com>
4649
4650         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
4651         pointers.
4652
4653         PR optimization/7145
4654         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
4655
4656 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
4657
4658         Repair damage on weak-impared targets caused by my previous patch.
4659         * cp-tree.h (import_export_tinfo): Add parameter.
4660         * decl2.c (import_export_tinfo): Add parameter, post adjust
4661         DECL_COMDAT.
4662         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
4663         import_export_tinfo.
4664
4665 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4666
4667         PR c++/6944
4668         * init.c (build_aggr_init): Remove qualifiers of init before calling
4669         build_vec_init.
4670         (build_vec_init): Flatten multi-dimensional array during cleanup.
4671         (build_vec_delete_1): Abort if the type of each element is array.
4672
4673 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
4674
4675         * pt.c (instantiate_class_template): Fix typo.
4676
4677 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4678
4679         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
4680         by CVS conflict in my last patch.
4681
4682 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4683
4684         PR c++/6716
4685         * pt.c (can_complete_type_without_circularity): New function.
4686         (instantiate_class_template): Use it.
4687         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
4688         message due to incomplete fields.
4689
4690 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
4691
4692         PR c++/7112
4693         * mangle.c (write_expression): Add mangling for sizeof when
4694         applied to a type.
4695         * operators.def: Remove stale comment.
4696
4697 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
4698
4699         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
4700         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
4701         (tinfo_decl_type): Replace with ...
4702         (type_info_ptr_type): ... this.
4703         (import_export_tinfo): Declare.
4704         (tinfo_decl_p): Rename to ...
4705         (unemitted_tinfo_decl_p): ... this.
4706         * decl2.c (import_export_decl): Break out tinfo handling into ...
4707         (import_export_tinfo): ... here. New function.
4708         (finish_file): Adjust.
4709         * rtti.c (TINFO_REAL_NAME): New macro.
4710         (init_rtti_processing): Create the tinfo types.
4711         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
4712         (get_tinfo_decl): Adjust.
4713         (get_tinfo_ptr): New function.
4714         (get_type_id): Use it.
4715         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
4716         (ptr_initializer): Use get_tinfo_ptr.
4717         (ptm_initializer): Likewise.
4718         (synthesize_tinfo_var): Break into ...
4719         (get_pseudo_ti_init): ... this. Just create the initializer.
4720         (get_pseudo_ti_desc): .. and this.
4721         (create_real_tinfo_var): Remove.
4722         (create_pseudo_type_info): Don't create the vtable decl here.
4723         (get_vmi_pseudo_type_info): Remove.
4724         (create_tinfo_types): Adjust.
4725         (tinfo_decl_p): Rename to ...
4726         (unemitted_tinfo_decl_p): ... here. Adjust.
4727         (emit_tinfo_decl): Adjust. Create the initializer.
4728
4729 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
4730
4731         PR c++/6695
4732         * pt.c (tsubst_friend_class): Substitute into the context of the
4733         friend before using it.
4734
4735 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
4736
4737         * cp-tree.h (xref_tag): Change prototype.
4738         (handle_class_head): Likewise.
4739         (build_x_component_ref): Likewise.
4740         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
4741         (xref_tag): Take attributes as a separate parameter.
4742         (xref_tag_from_type): Adjust call to xref_tag.
4743         * decl2.c (build_expr_from_tree): Adjust call to
4744         build_x_component_ref.
4745         (handle_class_head): Take attributes as a separate parameter.
4746         * parse.y (parse_xref_tag): New function.
4747         (parse_handle_class_head): Likewise.
4748         (primary): Use parse_xref_tag.
4749         (class_head_decl): Use parse_handle_class_head.
4750         (class_head_defn): Likewise.
4751         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
4752         (build_dynamic_cast_1): Likewise.
4753         (create_pseudo_type_info): Likewise.
4754         (emit_support_tinfos): Likewise.
4755         * typeck.c (build_object_ref): Adjust call to
4756         build_x_component_ref.
4757         (build_x_component_ref): Remove protect parameter.
4758
4759 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
4760
4761         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
4762         * class.c (handle_using_decl): Likewise.
4763         (instantiate_type): Likewise.
4764         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
4765         (xref_basetypes): Change prototype.
4766         (begin_mem_initializers): New function.
4767         (get_overloaded_fn): Likewise.
4768         * decl.c (xref_basetypes): Simplify.
4769         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
4770         * init.c (build_offset_ref): Likewise.
4771         * parse.y (base_init): Use begin_mem_initializers().
4772         (structsp): Adjust call to xref_basetypes.
4773         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
4774         (instantiate_class_template): Adjust call to xref_basetypes.
4775         * semantics.c (begin_mem_initializers): New function.
4776         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
4777         (really_overlaoded_fn): Likewise.
4778         (get_overloaded_fn): New function.'
4779         (get_first_fn): USe BASELINK_FUNCTIONS.
4780
4781 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
4782
4783         * cp-tree.h (SCALAR_TYPE_P): New macro.
4784         (check_for_out_of_scope_variable): New function.
4785         (at_class_scope_p): Likewise.
4786         (finish_fname): Likewise.
4787         * class.c (finish_struct): Use at_function_scope_p.
4788         * decl.c (check_for_out_of_scope_variable): New function, split
4789         out from do_identifier.
4790         (finish_enum): Use at_function_scope_p.
4791         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
4792         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
4793         (primary): Use at_function_scope_p.
4794         * search.c (at_class_scope_p): New function.
4795         * semantics.c (finish_fname): Likewise.
4796         (check_multiple_declarators): Use at_function_scope_p.
4797
4798 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
4799
4800         * parse.y (parse_scoped_id): New function.
4801         (primary): Use it.
4802         * cp-tree.h (do_scoped_id): Adjust declaration.
4803         * lex.c (do_scoped_id): Remove call to yylex.
4804         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
4805         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
4806         expanding it inline.
4807
4808 2002-06-23  Matt Thomas  <matt@3am-software.com>
4809
4810         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
4811         "#if VMS_TARGET".
4812
4813 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4814
4815         * mangle.c (integer_type_codes): Const-ify.
4816
4817 2002-06-20  Richard Henderson  <rth@redhat.com>
4818
4819         PR c++/6747
4820         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
4821         Call put_var_into_stack.
4822
4823 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4824
4825         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
4826         array size calculation.
4827
4828 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4829
4830         PR c++/6892
4831         * pt.c (tsubst_expr): Handle FILE_STMT.
4832
4833 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4834
4835         PR c++/6723
4836         * pt.c (lookup_template_class): Don't build complete argument of
4837         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
4838         argument.
4839
4840 2002-06-19  Akim Demaille  <akim@epita.fr>
4841
4842         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
4843         decl.h's TYPENAME.
4844         * spew.c, lex.c: Adjust.
4845         * parse.y (explicit_instantiation): Add empty action to override
4846         the default $$ = $1 where it introduces a type clash.
4847
4848 2002-06-14  Jason Merrill  <jason@redhat.com>
4849
4850         * semantics.c (begin_for_stmt): Push the 'for' scope before
4851         adding the FOR_STMT.
4852
4853         C++ ABI changes.
4854         * class.c (build_base_field): Set DECL_PACKED.
4855         (layout_class_type): Don't use tail padding of PODs.
4856         * mangle.c (write_unqualified_name): Fix template conversion op
4857         mangling.
4858
4859 2002-06-16  Richard Henderson  <rth@redhat.com>
4860
4861         PR opt/6793
4862         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
4863         after template instantiation.
4864
4865 2002-06-16  Richard Henderson  <rth@redhat.com>
4866
4867         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
4868
4869 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
4870
4871         * cp-tree.h (compiler_error): Remove declaration.
4872         * lex.c (compiler_error): Remove definition.
4873
4874 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
4875
4876         * g++spec.c (LIBUNWIND): New.
4877         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
4878
4879 2002-06-13  Jessica Han  <jessica@cup.hp.com>
4880
4881         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
4882         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
4883         (build_vbase_offset_vtbl_entries): Likewise.
4884         * rtti.c (build_headof): Likewise.
4885         (get_tinfo_decl_dynamic): Likewise.
4886         (create_pseudo_type_info): Likewise.
4887
4888 2002-06-12  Stan Shebs  <shebs@apple.com>
4889
4890         * mpw-config.in: Remove file, no longer used.
4891         * mpw-make.sed: Ditto.
4892
4893 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
4894
4895         * decl2.c: Update call to cpp_handle_option.
4896
4897 2002-06-07  H.J. Lu  (hjl@gnu.org)
4898
4899         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
4900
4901 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
4902
4903         * error.c (cp_error_at): Fix typo.
4904
4905 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
4906
4907         * error.c (cp_diagnostic_starter): Adjust call.
4908         (maybe_print_instantiation_context): Change prototype to take a
4909         'diagnostic_info *'.
4910         (print_instantiation_full_context): Likewise.
4911         (print_instantiation_partial_context): Likewise.
4912         (cp_diagnostic_starter): Likewise.
4913         (cp_diagnostic_finalizer): Likewise.
4914         (cp_print_error_function): Likewise.
4915         (cp_printer): Take a secondary parameter as a 'text_info *'.
4916         Remove output_state savings.  Adjust calls.
4917
4918 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
4919
4920         * pt.c (inline_parm_levels): Mark for GC.
4921
4922         * mangle.c (start_mangling): Allocate G.substitutions here...
4923         (init_mangle): ... rather than here.
4924         (finish_mangling): Clear the varray pointer when done with it.
4925         * spew.c (yylexstring): Don't use VARRAY_FREE.
4926         * search.c (bfs_walk): Don't use VARRAY_FREE.
4927         * decl2.c (pending_statics): Use gengtype to mark.
4928         (deferred_fns): Likewise.
4929         (ssdf_decls): Likewise.
4930         (init_decl2): Delete.
4931         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
4932         (cxx_init_decl_processing): Don't call init_decl2.
4933         (cxx_pop_function_context): Don't use VARRAY_FREE.
4934         * cp-tree.h (struct saved_scope): No need for special marking
4935         of varrays.
4936         (struct language_function): Likewise.
4937         (local_classes): Use gengtype to mark.
4938         (init_decl2): Delete prototype.
4939         * class.c (init_class_processing): Don't use
4940         ggc_add_tree_varray_root.
4941         (build_vtbl_initializer): Don't use VARRAY_FREE.
4942
4943         * decl.c (typename_compare): Don't use same_type_p.
4944
4945         * decl.c: Include hashtab.h instead of hash.h.
4946         (typename_hash): Update to use htab_h.
4947         (typename_compare): Likewise.
4948         (typename_htab): Use gengtype to mark.
4949         (build_typename_type): Update to use htab_h.
4950         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
4951
4952         * Make-lang.in (gt-cp-tree.h): New rule.
4953         (cp/tree.o): Depend on gt-cp-tree.h.
4954         * config-lang.in (gtfiles): Add cp/tree.c.
4955         * tree.c: Include gt-cp-tree.h.
4956         (list_hash_table): Use gengtype to mark.
4957         (init_tree): Use gengtype to mark trees.
4958
4959         * Make-lang.in (cp/decl.o): Add debug.h dependency.
4960         * call.c (struct z_candidate): Use gengtype.
4961         (USER_CONV_CAND): Use WRAPPER_ZC.
4962         (convert_class_to_reference): Use build_zc_wrapper.
4963         (build_type_conversion_1): Likewise.
4964         (build_over_call): Use WRAPPER_ZC.
4965         (add_warning): Use build_zc_wrapper.
4966         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
4967         * cp-tree.h (struct lang_identifier): Use gengtype.
4968         (struct template_parm_index_s): Likewise.
4969         (struct ptrmem_cst): Likewise.
4970         (struct tree_binding): Likewise.
4971         (struct tree_overload): Likewise.
4972         (struct tree_srcloc): Likewise.
4973         (struct tree_wrapper): Likewise.  Also modify to have a pointer
4974         to struct z_candidate rather than void.
4975         (enum cp_tree_node_structure_enum): New.
4976         (union lang_tree_node): New.
4977         (cxx_mark_tree): Delete prototype.
4978         (cp_tree_node_structure): New prototype.
4979         (build_ptr_wrapper): Delete prototype.
4980         (build_int_wrapper): Delete prototype.
4981         (build_zc_wrapper): New prototype.
4982         * decl.c: Include debug.h
4983         (cxx_mark_tree): Delete.
4984         (cp_tree_node_structure): New.
4985         * tree.c (build_ptr_wrapper): Delete.
4986         (build_int_wrapper): Delete.
4987         (build_zc_wrapper): New.
4988
4989         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
4990         Correct typo.  Patch from k_fukui@highway.ne.jp.
4991
4992         * semantics.c (current_stmt_tree): Update for change to
4993         struct language_function.
4994         (finish_mem_initializers): Likewise.
4995         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
4996         * cp-tree.h (struct language_function): Rename from
4997         cp_language_function.  Change all uses.
4998         (cp_function_chain): Don't need to cast.
4999
5000         * class.c (duplicate_tag_error): Reset discriminator.
5001         (check_bases_and_members): Update for data structure changes.
5002         * cp-tree.h (struct lang_id2): Use gengtype.
5003         (flagged_type_tree): Likewise.
5004         (SET_LANG_ID): Use GGC on struct lang_id2.
5005         (struct cp_language_function): Use gengtype.  Remove field
5006         'x_vcalls_possible_p'.
5007         (current_vcalls_possible_p): Delete.
5008         (struct lang_type_header): New.
5009         (struct lang_type_class): Rename from struct lang_type.  Include
5010         struct lang_type_header.
5011         (struct lang_type_ptrmem): New.
5012         (struct lang_type): New.
5013         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
5014         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
5015         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
5016         (struct lang_decl_flags): Use gengtype.  Add discriminators.
5017         (struct lang_decl): Use gengtype.  Add and use discriminators.
5018         Update the macros that reference moved fields.
5019         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
5020         (SET_DECL_THUNK_P): Set discriminator too.
5021         (clear_inline_text_obstack): Delete prototype.
5022         (finish_inline_definitions): Delete prototype.
5023         (mark_pending_inlines): Delete prototype.
5024         (lang_check_failed): New prototype.
5025         * decl.c (struct named_label_use_list): Use gengtype.
5026         (struct named_label_list): Likewise.
5027         (mark_binding_level): Delete.
5028         (mark_named_label_lists): Delete.
5029         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
5030         (cxx_init_decl_processing): Use generated marker routine.
5031         (begin_destructor_body): Delete dead set to
5032         current_vcalls_possible_p.
5033         (mark_lang_function): Delete.
5034         (mark_cp_function_context): Delete.
5035         (lang_mark_tree): Use generated marker routines.
5036         * decl2.c (start_objects): Set discriminator when setting
5037         GLOBAL_INIT_PRIORITY.
5038         * lex.c (retrofit_lang_decl): Set discriminators.
5039         (copy_lang_type): Update for changes to lang_type structure.
5040         (cp_make_lang_type): Set discriminator.
5041         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
5042         * search.c: Include ggc.h.
5043         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
5044         (finish_inline_definitions): Delete.
5045         * spew.c (struct token): Use gengtype.
5046         (struct token_chunk): New.
5047         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
5048         (struct feed): Use gengtype.
5049         (feed_obstack): Delete.
5050         (feed): Mark as GC root.
5051         (pending_inlines): Mark as GC root.
5052         (pending_inlines_tail): Likewise.
5053         (processing_these_inlines): Likewise.
5054         (token_obstack): Make static.
5055         (first_token): Likewise.
5056         (init_spew): Don't initialize deleted things; use gengtype for roots.
5057         (clear_inline_text_obstack): Delete.
5058         (feed_input): Use GC for struct feed.  Update for changes to
5059         struct unparsed_text.
5060         (mark_pending_inlines): Delete.
5061         (next_token): Rename from add_token.  Change all callers.  Update
5062         for changes to struct unparsed_text.
5063         (space_for_token): New.
5064         (remove_last_token): New.
5065         (alloc_unparsed_text): New.
5066         (snarf_block): Take an unparsed_text.  Update for changes to struct
5067         unparsed_text.
5068         (snarf_method): Update for changes to struct unparsed_text.
5069         (snarf_defarg): Update for changes to struct unparsed_text.
5070         * tree.c (lang_check_failed): New.
5071
5072         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
5073         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
5074         (cp/spew.o): Add dependency on gt-<filename>.h.
5075         (cp/decl2.o): Add dependency on gt-<filename>.h.
5076         (cp/call.o): Add dependency on gt-<filename>.h.
5077         (cp/pt.o): Add dependency on gt-<filename>.h.
5078         (cp/repo.o): Add dependency on gt-<filename>.h.
5079         (cp/parse.o): Add dependency on gt-<filename>.h.
5080         * call.c: Use gengtype for roots.
5081         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
5082         decl2.c parse.y pt.c repo.c spew.c.
5083         * cp-tree.h: Use gengtype for roots.
5084         (struct saved_scope): Use GGC, gengtype.
5085         (cp_parse_init): Delete prototype.
5086         (init_pt): Delete prototype.
5087         * decl.c: Use gengtype for roots.
5088         (mark_saved_scope): Delete.
5089         (cxx_init_decl_processing): Don't call deleted initilisation
5090         routines.
5091         (signed_size_zero_node): Delete, unused.
5092         * decl.h: Use gengtype for roots.
5093         * decl2.c: Use gengtype for roots.
5094         * lex.h: Use gengtype for roots.
5095         * parse.y: Use gengtype for roots.
5096         (cp_parse_init): Delete.
5097         * pt.c: Use gengtype for roots.
5098         (init_pt): Delete.
5099         * repo.c: Use gengtype for roots.
5100         * spew.c: Use gengtype for roots.
5101
5102         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
5103         (cp/decl.o): Add dependency on gtype-cp.h.
5104         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
5105         Include gtype-cp.h.  Allow for filename changes.
5106
5107         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
5108         (cp/decl.o): Add cp/gt-decl.h dependency.
5109         * config-lang.in (gtfiles): New.
5110         * tree.h: Rename struct binding_level to struct cp_binding_level.
5111         * decl.c: Rename struct binding_level to struct cp_binding_level.
5112         Include cp/gt-decl.h.
5113         (struct cp_binding_level): Use gengtype.
5114         (make_binding_level): Use GGC on struct cp_binding_level.
5115         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
5116         (cxx_init_decl_processing): Mark free_binding_level as
5117         deletable.
5118
5119         * decl.c (mark_cp_function_context): Update calling sequence.
5120
5121         * decl.c (start_function): Don't free 'struct
5122         cp_language_function'.
5123         (pop_cp_function_context): Likewise.
5124         (save_function_data): Allocate it using GC.
5125         * semantics.c (genrtl_start_function): Don't free 'struct
5126         cp_language_function'.
5127
5128 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
5129
5130         * lang-specs.h: Use cpp_debug_options.
5131
5132 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
5133
5134         * mangle.c, tree.c: Include real.h.
5135         * Make-lang.in: Update dependency lists.
5136
5137 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5138
5139         * lex.c: Don't include c-lex.h.
5140         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
5141
5142 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
5143
5144         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
5145
5146 2002-05-22  Richard Henderson  <rth@redhat.com>
5147
5148         * decl.c (obscure_complex_init): Check for VAR_DECL
5149         before using DECL_THREAD_LOCAL.
5150
5151 2002-05-22  Richard Henderson  <rth@redhat.com>
5152
5153         * decl.c (check_tag_decl): Handle RID_THREAD.
5154         (obscure_complex_init): Reject run-time init of tls.
5155         (grokvardecl, grokdeclarator): Handle RID_THREAD.
5156         * lex.c (reswords): Add __thread.
5157         (rid_to_yy): Map RID_THREAD to SCSPEC.
5158
5159 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
5160
5161         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
5162         * cp-tree.h (cxx_post_options): Kill.
5163         * cp-lex.c (cxx_post_options): Kill.
5164
5165 2002-05-21  Richard Henderson  <rth@redhat.com>
5166
5167         * lex.c (rid_to_yy): Add RID_THREAD.
5168
5169 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
5170
5171         * init.c (build_vec_init): Test for trivial copy-assignment when
5172         copy-assigning arrays.
5173
5174 2002-05-20  Andreas Jaeger  <aj@suse.de>
5175
5176         * init.c (build_default_init): Remove unused variable.
5177
5178 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
5179
5180         * call.c (any_strictly_viable): New.
5181         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
5182
5183 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5184
5185         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
5186
5187 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5188
5189         PR c++/186, DR 259
5190         * pt.c (do_decl_instantiation): Don't complain explicit
5191         instantiation after explicit specialization.
5192         (do_type_instantiation): Likewise.
5193
5194 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
5195
5196         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
5197         renamed from...
5198         (complete_type_or_else): ... this.  Redefined as macro.
5199         (cxx_incomplete_type_diagnostic): Declare.
5200         (cxx_incomplete_type_error): Define as macro.
5201         * init.c (build_delete): Warn about incomplete types other than
5202         void, and use the built-in operator delete for them.
5203         * typeck.c (complete_type_or_diagnostic): Renamed from
5204         complete_type_or_else.  Added warn_only argument, passed to...
5205         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
5206         warnings or errors depending on new warn_only argument.  Renamed
5207         from...
5208         (cxx_incomplete_type_error): ... this.  New implementation in
5209         terms of cxx_incomplete_type_diagnostic.
5210
5211 2002-05-18  Jason Merrill  <jason@redhat.com>
5212
5213         PR c++/6611
5214         * decl2.c (import_export_decl): If we clear
5215         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
5216
5217 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5218
5219         PR c++/6620
5220         * pt.c (verify_class_unification): Don't check if PARM is template
5221         parameter dependent.  Simplify.
5222         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
5223         parameter dependent expression.
5224
5225 2002-05-14  Jason Merrill  <jason@redhat.com>
5226
5227         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
5228         Do set DECL_COMDAT.
5229         (synthesize_tinfo_var): Take the public decl.
5230         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
5231         (emit_tinfo_decl): Adjust.  Call import_export_decl.
5232         * decl2.c (import_export_decl): Simplify tinfo decl handling.
5233
5234 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
5235
5236         * cp-tree.h (struct lang_type): Added non_zero_init.
5237         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
5238         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
5239         * class.c (check_field_decls): Test non_zero_init.
5240         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
5241         zero-to-NULL conversions.
5242         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
5243         type that needs zero-initialization without zeros.
5244         (check_initializer_decl): Compute zero-initializer for types
5245         that require a non-trivial one.
5246         * init.c (build_forced_zero_init): New function.
5247         (build_default_init): Use it.
5248         * tree.c (zero_init_p): New function.
5249         * typeck2.c (force_store_init_value): New function.
5250         (process_init_constructor): Create non-trivial zero-initializers
5251         for array members and class fields.
5252
5253 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
5254
5255         * lang-specs.h: Remove redundant -lang-c++.
5256
5257 2002-05-13  Jason Merrill  <jason@redhat.com>
5258
5259         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
5260         (fixed_type_or_null): See through reference vars.
5261         (build_base_path): Vtable contents are constant.
5262         * typeck.c (get_member_function_from_ptrfunc): Likewise.
5263
5264 2002-05-12  Jason Merrill  <jason@redhat.com>
5265
5266         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
5267         structs are safe.
5268
5269 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
5270
5271         * cp-tree.h (flag_ansi): Remove.
5272         * decl2.c (flag_ansi): Remove.
5273         (cxx_decode_option): Set flag_iso and flag_undef.
5274
5275 2002-05-09  Jason Merrill  <jason@redhat.com>
5276
5277         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
5278         Use subtraction rather than a bitmask to get the index.
5279         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
5280
5281         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
5282
5283 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
5284
5285         * Make-lang.in (decl2.o): Update.
5286         * cp-tree.h (warn_multichar): Remove.
5287         * decl2.c: Include c-common.h.
5288         (warn_multichar): Remove.
5289
5290 2002-05-03  Jason Merrill  <jason@redhat.com>
5291
5292         * tree.c (build_cplus_array_type): Only const and volatile get
5293         special handling.
5294
5295         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
5296
5297 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
5298
5299         ABI change, returning simple classes from functions.
5300         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
5301         TYPE_HAS_TRIVIAL_INIT_REF is false or
5302         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
5303
5304 2002-04-30  Jason Merrill  <jason@redhat.com>
5305
5306         PR debug/6436
5307         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
5308         anonymous class with a typedef if there are attributes.
5309
5310 2002-04-29  Paul Eggert  <eggert@twinsun.com>
5311
5312         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
5313
5314 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
5315
5316         PR c++/6477
5317         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
5318         non-NULL first.
5319
5320 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
5321
5322         PR c++/6492
5323         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
5324         enter that scope before name lookup.
5325
5326         PR c++/6486
5327         * method.c (do_build_copy_constructor): Avoid building
5328         cv-qualified reference types.
5329
5330 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
5331
5332         PR c++/5719
5333         * decl.c (grok_op_properties): Assignment ops don't have to return
5334         by value. operator% should.
5335
5336 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
5337
5338         PR c/6343
5339         * decl.c (duplicate_decls): Call merge_weak.
5340
5341 2002-04-26  Richard Henderson  <rth@redhat.com>
5342
5343         * parse.y (malloced_yyss, malloced_yyvs): New.
5344         (yyoverflow): Re-add.  Set them.
5345         (free_parser_stacks): New.
5346
5347 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
5348
5349         PR c++/6497
5350         * method.c (do_build_assign_ref): Pass a derivation to
5351         build_method_call when calling base class assignment operators.
5352
5353 2002-04-26  Richard Henderson  <rth@redhat.com>
5354
5355         * parse.y (yyoverflow): Revert.
5356
5357 2002-04-26  Richard Henderson  <rth@redhat.com>
5358
5359         PR c/3581
5360         * parse.y (string): Remove.  Update all uses to use STRING
5361         instead, and not call combine_strings.
5362         * rtti.c (tinfo_name): Use fix_string_type.
5363         * semantics.c (finish_asm_stmt): Don't call combine_strings.
5364         * spew.c (yylexstring): New.
5365         (read_token): Use it.
5366
5367 2002-04-25  Richard Henderson  <rth@redhat.com>
5368
5369         PR c/2161
5370         * parse.y (yyoverflow): New.
5371
5372 2002-04-25  Jason Merrill  <jason@redhat.com>
5373
5374         PR c++/5607
5375         * search.c (check_final_overrider): No longer static.
5376         * class.c (update_vtable_entry_for_fn): Call it.
5377         * cp-tree.h: Adjust.
5378
5379 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5380
5381         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
5382         * cp-tree.h (cxx_set_yydebug): Die.
5383         * lex.c (YYDEBUG): Get from c-lex.h.
5384         (cxx_set_yydebug): Remove.
5385         * parse.y: Include c-lex.h.
5386         (YYDEBUG): Get from c-lex.h.
5387
5388 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
5389
5390         PR c++/6438.
5391         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
5392         void.
5393
5394 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
5395
5396         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
5397         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
5398         Redefine.
5399         * cp-tree.h (cp_attribute_table): Rename.
5400         * decl.c (lang_attribute_table): Remove declaration.
5401         (cxx_init_decl_processing): Don't set it.
5402         * tree.c (cp_attribute_table): Rename.
5403
5404 2002-04-24  Jason Merrill  <jason@redhat.com>
5405
5406         PR c++/6331
5407         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
5408         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
5409         The pedwarn for array assignment is now unconditional.
5410         * tree.c (build_cplus_array_type_1): Still process simple array types
5411         normally in templates.
5412
5413         PR c++/6395
5414         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
5415         stuff for comdats.
5416
5417 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
5418
5419         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
5420         node with attributes.
5421
5422 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
5423
5424         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
5425         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
5426
5427 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
5428
5429         PR c++/6256:
5430         * pt.c (tsubst_friend_class): Handle templates with explicit
5431         nested names.
5432
5433         PR c++/6331:
5434         * typeck.c (merge_types): Remember the cv-qualification of pointer
5435         types when merging them.
5436
5437 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
5438
5439         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
5440         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
5441         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
5442         cxx_mark_function_context): New.
5443         * decl.c (push_cp_function_context, pop_cp_function_context,
5444         mark_cp_function_context): Rename for consistency.
5445         (cxx_init_decl_processing): Don't set old hooks.
5446
5447 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
5448
5449         * call.c (convert_type_from_ellipsis): Rename, update.
5450         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
5451         * cp-tree.h (convert_type_from_ellipsis): Rename.
5452         * decl.c (cxx_init_decl_processing): Don't set hook.
5453
5454 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
5455
5456         * call.c (build_new_method_call): Update.
5457         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
5458         * cp-tree.h (cxx_incomplete_type_error): New.
5459         * decl.c (grokdeclarator, grokparms): Update.
5460         * decl2.c (check_classfn): Update.
5461         * pt.c (tsubst): Update.
5462         * typeck.c (complete_type_or_else, expr_sizeof,
5463         decay_conversion): Update.
5464         * typeck2.c (incomplete_type_error): Rename.
5465         (add_exception_specifier): Update.
5466
5467 2002-04-18  Jason Merrill  <jason@redhat.com>
5468
5469         PR c++/5658
5470         * search.c (setup_class_bindings): A class template qualifies as a
5471         type binding.
5472
5473 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
5474
5475         PR c++/6316
5476         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
5477         before expanding.
5478
5479 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
5480
5481         * init.c (begin_init_stmts): Remove commented out code.
5482         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
5483         * semantics.c (begin_gobal_stmt_expr): Adjust call to
5484         expand_start_stmt_expr.
5485
5486 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
5487
5488         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
5489         dso_handle itself, to __cxa_atexit.
5490
5491 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5492
5493         * error.c (cxx_print_error_function): Adjust call to macros.
5494
5495 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
5496
5497         * class.c (layout_virtual_bases): Do all dsize computation on trees.
5498
5499 2002-04-14  Jason Merrill  <jason@redhat.com>
5500
5501         * typeck.c (get_member_function_from_ptrfunc): Don't do
5502         gratuitious division and multiplication on
5503         ptrmemfunc_vbit_in_delta targets.
5504
5505 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5506
5507         PR c++/5373.
5508         * semantics.c (finish_expr_stmt): Remember the type of the
5509         expression before any conversions are performed.
5510
5511 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5512
5513         PR c++/5189.
5514         * call.c (add_template_candidate_real): Do not treat member
5515         templates as copy constructors.
5516
5517 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5518
5519         * decl.c (duplicate_decls): Do not copy the RTL for a variable
5520         declaration if the old variable had an incomplete type and the new
5521         variable does not.
5522         (complete_vars): Do not call layout_decl for completed variables.
5523
5524 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
5525
5526         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
5527         with an explicit one.
5528         (follow_tag_typedef): New.
5529         (lookup_tag): Use it to extract the tag of an explicit typedef.
5530         (xref_tag): Likewise.
5531
5532 2002-04-11  Andrew Haley  <aph@redhat.com>
5533
5534         * typeck.c (type_after_usual_arithmetic_conversions):
5535         If two types have the same variant, return immediately.
5536         When two floating-point operands are the same precision:
5537           convert to float if one of the operands is float;
5538           if neither operand is one of the standard types, return the type
5539           of the first operand.
5540
5541 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
5542
5543         PR c++/5507
5544         * decl.c (make_typename_type): Remove implicit typenameness.
5545
5546 2002-04-09  Jason Merrill  <jason@redhat.com>
5547
5548         PR optimization/6189
5549         * semantics.c (genrtl_start_function): Don't free
5550         DECL_SAVED_FUNCTION_DATA for inline functions.
5551
5552         * init.c (build_member_call): For now, don't convert to
5553         intermediate base if it would cause an error.
5554
5555 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
5556
5557         * parse.y (namespace_qualifier, maybe_identifier,
5558         begin_explicit_instantiation, end_explicit_instantiation,
5559         apparent_template_type, .finish_template_type,
5560         do_id, maybe_init, defarg_again, component_decl_1):
5561         Add ending ';', in accordance with POSIX.
5562
5563 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
5564
5565         PR c++/5571
5566         * class.c (layout_class_type): Remember incomplete static
5567         variables.
5568         (finish_struct_1): Call complete_vars, not
5569         hack_incomplete_structures.
5570         * cp-tree.h (hack_incomplete_structures): Rename to ...
5571         (complete_vars): ... this.
5572         (struct saved_scope): Remove incomplete.
5573         (namespace_scope_incomplete): Remove.
5574         * decl.c (struct binding_level): Remove incomplete.
5575         (incomplete_vars): New variable.
5576         (mark_binding_level): Don't mark incomplete.
5577         (print_binding_level): Don't print it.
5578         (mark_saved_scope): Don't mark incomplete.
5579         (pushdecl): Use maybe_register_incopmlete_var.
5580         (cxx_init_decl_processing): Register incomplete_vars for GC.
5581         (start_decl_1): Clarify error message.
5582         (hack_incomplete_vars): Remove.
5583         (maybe_register_incomplete_var): New function.
5584         (complete_vars): Likewise.
5585
5586 2002-04-06  Jason Merrill  <jason@redhat.com>
5587
5588         PR c++/4934
5589         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
5590         set before checking it.
5591
5592         PR c++/525
5593         * init.c (build_member_call): Use build_scoped_ref.
5594         (resolve_offset_ref): Likewise.
5595         * call.c (build_scoped_method_call): Likewise.
5596         * tree.c (maybe_dummy_object): Kludge around current_class_type being
5597         wrong.
5598         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
5599         * cp-tree.h: Adjust.
5600
5601         * init.c (push_base_cleanups): Just use build_scoped_method_call.
5602
5603         PR c++/6179
5604         * method.c (implicitly_declare_fn): Pass unqualified type to
5605         synthesize_exception_spec.
5606
5607 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
5608
5609         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
5610         * cvt.c: Update comment.
5611         * init.c (expand_cleanup_for_base): Update.
5612         * semantics.c (finish_parenthesized_expr): Update.
5613         * typeck.c (cp_truthvalue_conversion): Update.
5614
5615 2002-04-04  Jason Merrill  <jason@redhat.com>
5616
5617         * semantics.c (finish_eh_cleanup): New fn.
5618         * cp-tree.h: Add prototype.
5619         * init.c (perform_member_init, expand_cleanup_for_base): Use
5620         finish_eh_cleanup.
5621         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
5622         * cp-tree.h: Remove references.
5623         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
5624         * dump.c (cp_dump_tree): Likewise.
5625         * pt.c (tsubst_expr): Likewise.
5626         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
5627         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
5628         * tree.c (cp_statement_code_p): Likewise.
5629
5630         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
5631
5632         PR c++/5636
5633         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
5634         cleanup for nrv.
5635
5636         PR c++/5104
5637         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
5638         specifiers.
5639         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
5640
5641 2002-04-03  Richard Henderson  <rth@redhat.com>
5642
5643         * cp-lang.c (cxx_warn_unused_global_decl): New.
5644         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
5645
5646 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
5647
5648         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
5649         * tree.c (init_tree): Don't set hook.
5650
5651 2002-04-03  Roger Sayle  <roger@eyesopen.com>
5652
5653         PR c++/5998:
5654         * decl.c (duplicate_decls): Don't mess with assembler names when
5655         redeclaring builtin functions as static.
5656
5657 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5658
5659         * call.c (build_addr_func): Update.
5660         * class.c (resolve_address_of_overloaded_function): Update.
5661         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
5662         * cp-tree.h (cxx_mark_addressable): New.
5663         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
5664         * decl2.c (build_cleanup): Update.
5665         * except.c (build_throw): Update.
5666         * init.c (resolve_offset_ref): Update.
5667         * pt.c (convert_nontype_argument): Update.
5668         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
5669         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
5670         unary_complex_lvalue): Update.
5671         (mark_addressable): Rename.
5672
5673 2002-04-01  Roger Sayle  <roger@eyesopen.com>
5674
5675         PR c++/5998:
5676         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
5677         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
5678         but follow the SET_DECL_RTL idiom used elsewhere in the function.
5679
5680 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5681
5682         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
5683         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
5684         * decl.c (grokdeclarator): Update.
5685         * mangle.c (write_integer_cst): Update.
5686         * typeck.c (build_binary_op): Update.
5687
5688 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
5689
5690         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
5691         * lex.c (cxx_init): Don't set hook.
5692
5693 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
5694
5695         * Make-lang.in (error.o): Update.
5696         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
5697         * cp-tree.h (struct diagnostic_context): Predeclare.
5698         (cxx_print_error_function): New.
5699         * error.c: Include langhooks-def.h.
5700         (lang_print_error_function): Rename.  Update.
5701         (init_error): Don't set hook.
5702
5703 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
5704
5705         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
5706         Redefine.
5707         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
5708         * decl.c (finish_enum): Similarly.
5709         * error.c (dump_type): Similarly.
5710         * lex.c (cxx_init): Similarly.
5711         * mangle.c (write_builtin_type): Similarly.
5712         * typeck.c (comptypes): Similarly.
5713
5714 2002-03-28  Roger Sayle  <roger@eyesopen.com>
5715
5716         PR c++/5998:
5717         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
5718         in the g++ front-end.
5719         (duplicate_decl): Allow redefinition of anticipated built-ins.
5720         Fix inlining problem by over-writing the old DECL_RTL.
5721         (lookup_namespace_name): Fail to find an identifier in the
5722         specified namespace if its still anticipated.
5723         (builtin_function_1): New function split out from builtin_function
5724         to create a builtin in the current namespace with given context.
5725         (builtin_function): Call builtin_function_1 to define the
5726         appropriate builtins in both the std and global namespaces.
5727         (select_decl): Don't test for anticipated decls here.
5728         (unqualified_namespace_lookup): Instead ignore them whilst
5729         searching through scopes and namespaces.
5730         * decl2.c (do_nonmember_using_decl): If a using declaration
5731         specifies an anticipated built-in function, mark it as no longer
5732         anticipated in that scope.
5733         (ambiguous_decl):  Avoid resolving to an anticipated decl.
5734         * lex.c (do_scoped_id): Fail to find an identifier in the global
5735         namespace if its still anticipated.
5736
5737 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
5738
5739         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
5740         * cp-tree.h (cp_make_lang_type): Rename.
5741         * lex.c (cp_make_lang_type): Rename.
5742         (make_aggr_type): Update.
5743         * tree.c (init_tree): Don't set make_lang_type_fn.
5744
5745 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
5746
5747         PR c++/6073
5748         * class.c (finish_struct_1): Update static field's DECL_MODE even
5749         if its type is a variant of t.
5750
5751 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
5752
5753         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
5754         * cp-tree.h (cxx_insert_default_attributes): New.
5755         * decl.c (insert_default_attributes): Rename.
5756
5757 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
5758
5759         PR c++/4884
5760         * call.c (build_op_delete_call): Allow for the fact the placement
5761         may be a COMPOUND_EXPR.
5762
5763 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
5764
5765         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
5766         * cp-tree.h (init_cplus_expand): Remove.
5767         (cxx_expand_expr): New.
5768         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
5769         fix prototype.
5770         (init_cplus_expand): Remove.
5771         * lex.c (cxx_init): Don't call init_cplus_expand.
5772
5773 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
5774
5775         PR c++/4884.
5776         * init.c (build_new_1): Allow for the fact the result of
5777         build_function_call may be a COMPOUND_EXPR.
5778
5779 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
5780
5781         PR c++/5682
5782         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
5783         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
5784         (dfs_skip_nonprimary_vbases_markedp): Remove.
5785         * search.c (get_shared_vbase_if_not_primary): Remove.
5786         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
5787         (dfs_skip_nonprimary_vbases_markedp): Remove.
5788         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
5789         (dfs_marked_real_bases_queue_p): Likewise.
5790
5791 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
5792
5793         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
5794         * cp-tree.h (cxx_mark_tree): New.
5795         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
5796
5797 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5798
5799         * cp-tree.h (cxx_maybe_build_cleanup): New.
5800         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
5801         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
5802         * tree.c (build_target_expr): Update.
5803         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
5804
5805 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
5806
5807         * decl2.c (cxx_decode_option): Handle -E.
5808         * lang-specs.h (default_compilers): Preprocess with cc1plus.
5809         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
5810
5811 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
5812
5813         PR c++/6037
5814         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
5815
5816 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5817
5818         * error.c (dump_type): Be careful about implicit typenames.
5819
5820 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5821
5822         PR C++/3656
5823         * semantics.c (finish_base_specifier): Handle erronous base
5824         classes.
5825
5826 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
5827
5828         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
5829         REAL_IS_NOT_DOUBLE.
5830
5831 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
5832
5833         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
5834         an index into the vtable_entry array regardless of
5835         TARGET_PTRMEMFUNC_VBIT_LOCATION.
5836
5837 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
5838
5839         * tree.c (cp_cannot_inline_tree_fn): Same.
5840
5841 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
5842
5843         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
5844         insert_block, getdecls, global_bindings_p): New.
5845
5846 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
5847
5848         PR c++/4361
5849         * mangle.c (struct globals) Add internal_mangling_p member.
5850         (write_template_param): Do internal mangling, if needed.
5851         (mangle_conv_op_name_for_type): Request internal mangling.
5852
5853 2002-03-20  Jason Merrill  <jason@redhat.com>
5854
5855         PR c++/2136
5856         * init.c (build_delete): Check access for a member op delete here.
5857         * decl2.c (delete_sanity): Not here.
5858
5859 2002-03-19  Jason Merrill  <jason@redhat.com>
5860
5861         PR c++/5118
5862         * class.c (get_vfield_name): Use the constructor_name.
5863
5864 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
5865
5866         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
5867         * cp-tree.h (lang_printable_name): Rename.
5868         * error.c (lang_decl_name): Use new hook.
5869         * lex.c (cxx_init): Remove old hook.
5870         * pt.c (tsubst_decl): Use new hook.
5871         * tree.c (lang_printable_name): Rename.
5872
5873 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
5874
5875         PR c++/3882
5876         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
5877         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
5878         only after recording the declaration.
5879
5880 2002-03-18  Jason Merrill  <jason@redhat.com>
5881
5882         PR c++/2039
5883         * init.c (resolve_offset_ref): Hand off to build_component_ref.
5884
5885         PR c++/4222, c++/5995
5886         * call.c (build_over_call): Fix empty class logic.
5887
5888         PR c++/3870
5889         * cp-tree.h (struct saved_scope): Add last_parms field.
5890         * decl.c (maybe_push_to_top_level): Save last_function_parms.
5891         (pop_from_top_level): Restore it.
5892
5893         PR c++/4377
5894         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
5895         NON_LVALUE_EXPRs.
5896
5897         PR c++/4003
5898         * pt.c (tsubst_friend_function): Use decl_namespace_context.
5899
5900         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
5901         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
5902         type with a nontrivial destructor.
5903
5904 2002-03-17  Jason Merrill  <jason@redhat.com>
5905
5906         PR c++/4460
5907         * class.c (build_base_path): Virtual base layout is fixed in
5908         in-charge [cd]tors.
5909
5910 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
5911
5912         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
5913         * parse.y (yyparse): Remove macro.
5914
5915 2002-03-17  Jason Merrill  <jason@redhat.com>
5916
5917         PR c++/5757
5918         * init.c (build_new_1): Pass the right pointer to op delete.
5919
5920 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
5921
5922         PR c++/4361
5923         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
5924         conversion operators go.
5925         (struct lang_decl_flags): Add template_conv_p and unused
5926         bitfields.
5927         (DECL_TEMPLATE_CONV_FN_P): New macro.
5928         * call.c (build_user_type_conversion_1): Don't check second type
5929         conversion of overload set first.
5930         * class.c (add_method): Make sure templated conversion operators
5931         all end up on slot 2.
5932         * lex.c (do_identifier): A conversion operator token might be
5933         satisfied by a templated conversion operator.
5934         * pt.c (check_explicit_specialization): Use
5935         CLASSTYPE_FIRST_CONVERSION_SLOT.
5936         (template_parm_this_level_p): New function.
5937         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
5938         * search.c (lookup_fnfields_1): Template conversions will be on
5939         the first slot.
5940         * typeck.c (build_component_ref): Preserve the type of an
5941         conversion operator name on the overload type.
5942         (build_x_function_call): Retrieve the conversion operator name.
5943
5944 2002-03-15  Richard Henderson  <rth@redhat.com>
5945
5946         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
5947
5948 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
5949
5950         * cp-tree.h (CLEANUP_DECL): Remove.
5951         (CLEANUP_EXPR): Likewise.
5952         * decl.c (destroy_local_var): Simplify.
5953         (maybe_build_cleanup): Tidy.
5954         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
5955         * semantics.c (cp_expand_stmt): Likewise.
5956         * cp/tree.c (cp_statement_code_p): Likewise.
5957
5958 2002-03-15  Jason Merrill  <jason@redhat.com>
5959
5960         PR c++/5857
5961         * decl.c (duplicate_decls): Use merge_types instead of common_type.
5962         * typeck.c (common_type): Just hand off to
5963         type_after_usual_arithmetic_conversions and
5964         composite_pointer_type.
5965         (merge_types): New fn.
5966         (commonparms): Use it instead of common_type.
5967         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
5968         (composite_pointer_type): Also handle attributes.
5969         * cp-tree.h: Declare merge_types.
5970
5971         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
5972         variables.
5973         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
5974
5975 2002-03-14  Richard Henderson  <rth@redhat.com>
5976
5977         * decl.c: Include c-pragma.h.
5978         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
5979         * Make-lang.in: Update dependencies.
5980
5981 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
5982
5983         PR c++/5908
5984         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
5985         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
5986
5987 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
5988
5989         * mangle.c (write_builtin_type): Handle 128-bit integers even if
5990         they are not a standard integer type.
5991
5992 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
5993
5994         * cp-tree.h (init_init_processing): Remove declaration.
5995         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
5996         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
5997
5998 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5999
6000         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
6001         Define.
6002         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
6003         tree_code_length.
6004         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
6005         cplus_tree_code_name): Delete.
6006         (cxx_init): Don't call add_c_tree_codes, instead set
6007         lang_unsafe_for_reeval.  Don't try to copy into the various
6008         tree_code arrays.
6009
6010 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
6011
6012         PR c++/5659
6013         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
6014         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
6015         definitions.
6016
6017 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
6018
6019         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
6020         DR209 is now not a defect.
6021         * cp-tree.h (skip_type_access_control): Remove.
6022         * decl.c (grokdeclarator): Do type access control for friend
6023         declarations.
6024         * semantics.c (decl_type_access_control): Don't reset
6025         current_type_lookups.
6026         (save_type_access_control): Always save the lookups.
6027         (skip_type_access_control): Remove.
6028         (finish_class_definition): Don't change type_lookups.
6029
6030 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
6031
6032         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
6033         It is incorrect.
6034         * typeck.c (build_static_cast): Compare non-qualified types
6035         with pointer to member conversions.
6036
6037 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
6038             Daniel Berlin  <dan@dberlin.org>
6039
6040         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
6041         (cxx_get_alias_set): Use it.
6042
6043 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6044
6045         * cp-tree.h (stabilize_expr): Prototype.
6046
6047 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6048
6049         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
6050         conditional return void.
6051
6052 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
6053
6054         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
6055         * cp-tree.h (cxx_unsave): New.
6056         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
6057         (init_tree): Update.
6058
6059 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6060
6061         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
6062         explicit sizeof/sizeof.
6063         * decl2.c (cxx_decode_option): Likewise.
6064         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
6065
6066 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
6067
6068         PR c++/775
6069         * decl.c (lookup_tag): Only reject enum/class mismatch, not
6070         class/union mismatch.
6071         * parse.y (check_class_key): New function.
6072         (structsp): Call it.
6073
6074 2002-03-01  Michael Matz  <matz@suse.de>
6075
6076         * typeck.c (cp_pointer_int_sum): Complete inner type which is
6077         used later by size_in_bytes().
6078
6079 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
6080
6081         * cp-tree.h:  Require __GNUC__ to be #defined.
6082         (build_init):  Add missing prototype.
6083
6084 2002-03-01  Jason Merrill  <jason@redhat.com>
6085
6086         * except.c: Don't include decl.h or obstack.h.  Do include
6087         tree-inline.h.
6088         (build_throw): Destroy temporaries from the thrown
6089         expression before calling __cxa_throw.  Construct a thrown
6090         temporary directly into the exception object.
6091         (stabilize_throw_expr): New function.
6092         (wrap_cleanups_r): New function.
6093         * tree.c (stabilize_expr): New function.
6094         * init.c (build_init): New function.
6095         * Make-lang.in (cp/except.o): Adjust .h deps.
6096
6097 2002-02-28  Jason Merrill  <jason@redhat.com>
6098
6099         * search.c (lookup_base_r): Don't clear is_non_public just because
6100         we found a friendly scope.
6101
6102         * decl.c (finish_function): Only warn about missing return
6103         statement with -Wreturn-type.
6104
6105 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
6106
6107         * class.c (build_clone): Update.
6108         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
6109         * cp-tree.h (cxx_dup_lang_specific_decl): New.
6110         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
6111         (copy_decl): Update.
6112         * method.c (make_thunk): Update.
6113
6114 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
6115
6116         * decl2.c: Delete traditional-mode-related code copied from
6117         the C front end but not used, or used only to permit the
6118         compiler to link.
6119
6120 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
6121
6122         PR c++/4093
6123         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
6124         to void.
6125
6126 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
6127
6128         PR other/5746
6129         * semantics.c (finish_switch_cond): Don't call get_unwidened
6130         if error_mark_node.
6131
6132 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
6133
6134         PR c++/2645, DR 295
6135         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
6136         tf_keep_type_decl.
6137         (make_typename_type): Use tsubst_flags_t.
6138         * decl.c (make_typename_type): Adjust. Return non-artificial
6139         TYPE_DECLs, if required.
6140         (grokdeclarator): Simplify CVR qualification handling. Allow bad
6141         qualifiers on typedef types.
6142         * decl2.c (handle_class_head): Adjust make_typename_type call.
6143         * parse.y (nested_name_specifier): Likewise.
6144         (typename_sub0): Likewise.
6145         (typename_sub1): Likewise.
6146         * pt.c (convert_template_argument): Adjust make_typename_type
6147         return value.
6148         (tsubst): Adjust cp_build_qualified_type_real calls.
6149         (check_cv_quals_for_unify): Cope with allowing bad qualifications
6150         on template type parms.
6151         (instantiate_decl): Recheck substitutions to give warnings on bad
6152         qualifications.
6153         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
6154
6155 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
6156
6157         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
6158
6159         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
6160         unless DECL_ALWAYS_INLINE.
6161
6162 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
6163
6164         * typeck.c (cp_pointer_int_sum): Renamed from
6165         pointer_int_sum, call pointer_int_sum.
6166
6167 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
6168
6169         * decl.c (duplicate_decls): Return 0 if issued error about
6170         redeclaration.
6171
6172 2002-02-19  Jason Merrill  <jason@redhat.com>
6173
6174         ABI change: Mangle `void (A::*)() const' as
6175         M1AKFvvE, not MK1AFvvE.
6176         * mangle.c (write_function_type): Write cv-quals for member
6177         function type here.
6178         (write_pointer_to_member_type): Not here.
6179
6180 2002-02-18  Jason Merrill  <jason@redhat.com>
6181
6182         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
6183         (do_decl_instantiation): Likewise.
6184
6185 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6186
6187         PR c++/5685
6188         * decl.c (duplicate_decls): Make warning unconditional
6189         if duplicate default argument declarations are present.
6190
6191 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
6192
6193         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
6194         shortening.
6195
6196 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
6197
6198         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
6199         remove incorrect comment. Move #if 0'd code to common path. Use
6200         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
6201
6202 2002-02-13  Jason Merrill  <jason@redhat.com>
6203
6204         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
6205         (finish_function): Don't warn if current_function_returns_null.
6206
6207         * typeck2.c (digest_init): Do handle values of vector type.
6208
6209         * typeck2.c (digest_init, process_init_constructor): Treat vectors
6210         like arrays.
6211
6212 2002-02-11  Jason Merrill  <jason@redhat.com>
6213
6214         * parse.y (reserved_declspecs): Don't handle attributes.
6215         (reserved_typespecquals): Handle them here.
6216         * Make-lang.in (parse.c): Adjust expected conflicts.
6217
6218 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
6219
6220         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
6221         instead of compstmt.
6222         (compstmt_or_stmtexpr): Renamed from compstmt.
6223         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
6224
6225 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
6226
6227         Rename instantiate_type_flags to tsubst_flags_t & expand use.
6228         * cp-tree.h (instantiate_type_flags): Rename to ...
6229         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
6230         add tf_warning flag.
6231         (instantiate_type): Adjust prototype.
6232         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
6233         do_type_instantiation, cp_build_qualified_type_real): Likewise.
6234         cp_build_qualified_type: Adjust.
6235         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
6236         tf_*.
6237         * call.c (standard_conversion): Rename itf_* to tf_*.
6238         (reference_binding): Likewise.
6239         (convert_like_real): Likewise.
6240         * cvt.c (cp_convert_to_pointer): Likewise.
6241         (convert_to_reference): Likewise.
6242         * decl.c (lookup_namespace_name): Use tf_* flags.
6243         (make_typename_type): Likewise.
6244         (grokdeclarator): Likewise.
6245         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
6246         (coerce_template_template_parms, convert_template_argument,
6247         coerce_template_parms, maybe_get_template_decl_from_type_decl,
6248         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
6249         instantiate_class_template, tsubst_template_arg_vector,
6250         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
6251         tsubst_decl, tsubst_arg_types, tsubst_function_type,
6252         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
6253         instantiate_template, fn_type_unification,
6254         resolve_overloaded_unification, verify_class_unification,
6255         unify, get_bindings_real, do_type_instantiation,
6256         regenerate_decl_from_template, instantiate_decl,
6257         tsubst_initializer_list, tsubst_enum,
6258         get_mostly_instantiated_function_type,
6259         invalid_nontype_parm_type_p): Likewise.
6260         * tree.c (cp_build_qualified_type_real): Likewise.
6261         * typeck.c (build_binary_op): Rename itf_* to tf_*.
6262         (build_ptrmemfunc): Likewise.
6263         (convert_for_assignment): Likewise.
6264
6265 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
6266
6267         PR c++/109
6268         * decl.c (grokdeclarator): Allow friend declarations from
6269         dependent types.
6270         * decl2.c (handle_class_head): Don't push into template parm contexts.
6271         * pt.c (push_template_decl_real): Template parm contexts are never
6272         being defined.
6273
6274 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
6275
6276         * class.c: Include target.h.
6277         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
6278         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
6279         bit-field layout.
6280         * Make-lang.in: Adjust deps.
6281
6282 2002-02-05  Jason Merrill  <jason@redhat.com>
6283
6284         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
6285
6286 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
6287
6288         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
6289         (finish_switch_cond): Set SWITCH_TYPE.
6290
6291 2002-02-04  Richard Henderson  <rth@redhat.com>
6292
6293         * method.c (use_thunk): Always initialize the block tree.  Reindent.
6294         * semantics.c (expand_body): Emit thunks after function, not before.
6295
6296 2002-02-04  Jason Merrill  <jason@redhat.com>
6297
6298         * decl.c (start_function): Call cplus_decl_attributes immediately
6299         after grokdeclarator.
6300
6301         * decl.c (start_function): Combine DECL_RESULT handling code.
6302
6303 2002-02-03  Jason Merrill  <jason@redhat.com>
6304
6305         * xref.c: Remove.
6306         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
6307         (cp/xref.o): Remove dependencies.
6308         * class.c (finish_struct_1, check_methods): Don't call xref fns.
6309         (finish_struct_1): Likewise.
6310         * friend.c (make_friend_class): Likewise.
6311         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
6312         * spew.c (read_process_identifier): Likewise.
6313
6314 2002-02-01  Jason Merrill  <jason@redhat.com>
6315
6316         PR c++/4872
6317         * decl.c (finish_function): Warn about a non-void function with
6318         no return statement and no abnormal exit.
6319         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
6320         (current_function_returns_abnormally): New macro.
6321         * call.c (build_call): Set it.
6322
6323         * typeck.c (build_component_ref): Always complain about offsetof
6324         constructs on non-PODs.  Only make it an error for members of
6325         virtual bases.
6326
6327         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
6328         (dump_function_decl): Always dump parms.
6329
6330         * decl2.c (finish_static_data_member_decl): Complain about a local
6331         class with a static data member.
6332
6333         PR c++/4286
6334         * search.c (lookup_field_1): Don't xref a static data member
6335         just because we looked it up.
6336
6337 2002-01-31  Jason Merrill  <jason@redhat.com>
6338
6339         * Make-lang.in (parse.c): Handle .output file.
6340
6341         PR c++/3395
6342         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
6343         not TREE_TYPE.
6344         * semantics.c (finish_class_definition): Adjust.
6345
6346         Allow attributes in parms and casts.
6347         * parse.y (named_parm): Don't strip attrs.
6348         (declmods): Remove 'attributes' production.
6349         (nonempty_cv_qualifiers): Accept attributes.
6350         (ATTRIBUTE): Give precedence.
6351         * decl.c (groktypename): Handle attributes.
6352         (grokparms): Likewise.
6353
6354 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
6355
6356         * decl2.c (cxx_decode_option): Pass 0 as last argument to
6357         cpp_handle_option.
6358         * lang-specs.h: Use cpp_unique_options instead of cpp_options
6359         when used together with cc1_options.
6360
6361 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
6362
6363         PR c++/5132
6364         * typeck2.c (digest_init): Make sure non-array core type is
6365         instantiated.
6366         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
6367         constructor, rather than build a new one.
6368         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
6369         PURPOSE of constructor elts.
6370
6371 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
6372
6373         * Make-lang.in (parse.c): Adjust expected number of
6374         shift-reduce conflicts.
6375         (decl.o): Depend on diagnostic.h.
6376         * decl.c: Include diagnostic.h.
6377         (grokdeclarator): Check for null pointer.
6378         (finish_function): Don't abort when
6379         current_binding_level->parm_flag != 1, if errors have
6380         occurred; throw away the statement tree and extra binding
6381         levels, and continue.
6382         * lex.c (note_list_got_semicolon): Check for null pointer.
6383         * method.c (hack_identifier): Just return error_mark_node if
6384         value is error_mark_node.
6385         * parse.y (primary: TYPEID(type_id)): No need to use
6386         TYPE_MAIN_VARIANT here.
6387         (handler_seq): Accept an empty list of catch clauses and
6388         generate a fake handler block to avoid later crashes.
6389         (ansi_raise_identifier): Accept the error token too.
6390         * semantics.c (begin_class_definition,
6391         finish_class_definition): Check for error_mark_node.
6392
6393 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
6394
6395         * typeck2.c (friendly_abort): Delete definition.
6396         * cp-tree.h (friendly_abort): Don't prototype.
6397         (my_friendly_assert): Use fancy_abort.
6398
6399 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6400
6401         * cp-tree.h (my_friendly_abort): Remove.
6402
6403 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
6404
6405         * spew.c (pending_inlines, pending_inlines_tail,
6406         processing_these_inlines): Make static.
6407         (mark_pending_inlines): Remove static.
6408         (begin_parsing_inclass_inline): If in function, save pi
6409         for GC to cp_function_chain->unparsed_inlines instead.
6410         (process_next_inline): Likewise.
6411         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
6412         (mark_pending_inlines): Add prototype.
6413         * decl.c (spew_debug): Remove unused extern.
6414         (mark_lang_function): Call mark_pending_inlines.
6415
6416 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6417
6418         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
6419         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
6420         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
6421         Change my_fancy_abort() to abort().
6422
6423 2002-01-23  Jason Merrill  <jason@redhat.com>
6424
6425         PR c++/5453
6426         * class.c (fixed_type_or_null): Fix thinko.
6427
6428         PR c++/3331
6429         * init.c (resolve_offset_ref): Use build_indirect_ref.
6430
6431         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
6432
6433 2002-01-22  Jason Merrill  <jason@redhat.com>
6434
6435         * parse.y (function_body): Suppress the block for the outermost
6436         curly braces.
6437         * decl.c (pushdecl): Don't try to skip it.
6438         (begin_function_body): Keep the block we create, not the next one.
6439         * init.c (emit_base_init): Don't mess with keep_next_level.
6440
6441         * class.c (build_base_path): Tweak formatting.
6442
6443 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
6444
6445         Fix regression introduced with patch for c++/775
6446         * parse.y (class_head_defn): Check for template specializations
6447         with a different class-key.
6448
6449 2002-01-17  Jason Merrill  <jason@redhat.com>
6450
6451         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
6452         (begin_function_body): Call them and keep_next_level.
6453         * init.c (emit_base_init): Call keep_next_level.
6454         * semantics.c (setup_vtbl_ptr): Lose.
6455         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
6456         (vtbls_set_up_p): Lose.
6457         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
6458         * method.c (do_build_copy_constructor): Likewise.
6459         (synthesize_method): Call finish_mem_initializers.
6460         * parse.y (nodecls): Likewise.
6461
6462         * error.c (dump_type_suffix): Print the exception specs before
6463         recursing.
6464         (dump_function_decl): Here, too.
6465
6466         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
6467
6468 2002-01-10  Ira Ruben   <ira@apple.com>
6469
6470         PR c++/907
6471         * decl.c (start_method): Handle attrlist.
6472
6473 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
6474
6475         * decl2.c (max_tinst_depth): Increase default limit to 500.
6476
6477 2002-01-10  Graham Stott  <grahams@redhat.com>
6478
6479         * spew.c (YYCHAR): Uppercase macro parameter and add
6480         parenthesis.
6481         (YYCODE): Likewise.
6482         (NAME): Uppercase macro parameter.
6483
6484 2002-01-09  Graham Stott  <grahams@redhat.com>
6485
6486         * decl.h (grokdeclarator): Wrap long line.
6487
6488         * semantics.c (FINISH_COND): Uppercase macro paramaters and
6489         add parenthesis.
6490
6491 2002-01-08  Graham Stott  <grahams@redhat.com>
6492
6493         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
6494         (PALLOC): Uppercase macro parameter and whitespace.
6495         (SALLOC): Uppercase macro parameter.
6496         (SFREE): Uppercase macros parameter, add parenthese and
6497         whitespace.
6498         (STREQL): Uppercase macro parameter and whitespace.
6499         (STRNEQ): Likewise.
6500         (STRLSS): Likewise.
6501         (STRLEQ): Likewise.
6502         (STRGTR): Likewise.
6503         (STRGEQ): Likewise.
6504
6505         * call.c (convert_like): Add parenthesis and wrap.
6506         (convert_like_with_context): Likewise.
6507         (ICS_RANK): Whitespace.
6508         (NEED_TEMPORARY_P): Remove parenthesis.
6509
6510         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
6511         whitespace.
6512         (VTT_MARKED_BINFO_P): Likewise.
6513
6514         * decl.c (BINDING_LEVEL): Add parenthesis.
6515         (DEF_OPERATOR): Likewise.
6516
6517         * mangle.c (MANGLE_TRACE): Add parenthesis.
6518         (MANGLE_TRACE_TREE): Likewise.
6519         (write_signed_number): Likewise.
6520         (write_unsigned_number): Likewise.
6521
6522         * pt.c (ccat): Uppercase macro parameter.
6523         (cat): Likewise
6524
6525         * search.c (SET_BINFO_ACCESS): Add parenthesis.
6526
6527 2002-01-07  Jason Merrill  <jason@redhat.com>
6528
6529         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
6530         to pedwarn.
6531
6532         PR c++/3536
6533         * method.c (make_thunk): If !flag_weak, give the thunk the
6534         function's linkage.
6535         (use_thunk): Here, too.
6536
6537 2002-01-07  Graham Stott  <grahams@redhat.com>
6538
6539         * error.c: Update copyright date.
6540         (print_scope_operator): Add parenthesis.
6541         (print_left_paren): Likewise.
6542         (print_right_paren): Likewise.
6543         (print_left_bracket): Likewise.
6544         (print_right_bracket): Likewise.
6545         (print_template_argument_list_start): Likewise.
6546         (print_template_argument_list_end): Likewise.
6547         (print_non_consecutive_character): Likewise.
6548         (print_tree_identifier): Likewise.
6549         (print_identifier): Likewise.
6550         (NEXT_CODE): Uppercase macro parameter.
6551         (ident_fndecl): Delete unused.
6552         (GLOBAL_THING): Likewise.
6553
6554 2002-01-06  Graham Stott  <grahams@redhat.com>
6555
6556         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
6557         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
6558         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
6559         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
6560         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
6561         (C_IS_RESERVED_WORD): Uppercase macro parameter.
6562         (C_RID_YYCODE) Likewise.
6563         (ptrmem_cst): Use rtx.
6564         (LOCAL_BINDING_P): Add whitespace.
6565         (INHERITED_VALUE_BINDING_P): Likewise.
6566         (BINDING_SCOPE): Wrap long line.
6567         (BINDING_HAS_LEVEL_P): Remove parenthesis.
6568         (BINDING_VALUE): Wrap long line.
6569         (BINDING_TYPE): Whitespace.
6570         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
6571         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
6572         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
6573         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
6574         (same_type_p): Uppercase macro parameters.
6575         (same_type_ignoring_top_level_qualifiers_p): Likewise.
6576         (OVL_FUNCTION): Wrap long line.
6577         (OVL_CHAIN): Whitespace.
6578         (OVL_CURRENT): Add parenthesis and whitespace.
6579         (OVL_NEXT): Whitespace.
6580         (OVL_USED): Likewise.
6581         (IDENTIFIER_TYPE_VALUE): Likewise.
6582         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
6583         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
6584         (LANG_ID_FIELD): Whitespace.
6585         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
6586         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
6587         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
6588         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
6589         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
6590         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
6591         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
6592         (IDENTIFIER_VIRTUAL_P): Likewise.
6593         (IDENTIFIER_OPNAME_P): Likewise.
6594         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
6595         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
6596         (C_SET_EXP_ORIGINAL_CODE): Likewise.
6597         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
6598         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
6599         (IS_AGGR_TYPE): Uppercase macro parameter.
6600         (CLASS_TYPE_P): Likewise.
6601         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
6602         (IS_AGGR_TYPE_2): Whitespace.
6603         (TAGGED_TYPE_P): Uppercase macro parameter.
6604         (TYPE_BUILT_IN): Whitespace.
6605         (TYPE_FOR_JAVA): Likewise.
6606         (FUNCTION_ARG_CHAIN): Remove parenthesis.
6607         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
6608         (FUNCTION_FIRST_USER_PARAM): Likewise.
6609         (PROMOTES_TO_AGGR_TYPE): Whitespace.
6610         (DERIVED_FROM_P): Add parenthesis and wrap.
6611         (UNIQUELY_DERIVED_FROM_P): Likewise.
6612         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
6613         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
6614         (CLASSTYPE_USE_TEMPLATE): Whitespace.
6615         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
6616         (TYPE_GETS_DELETE): Add parenthesis.
6617         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
6618         (TYPE_HAS_ASSIGN_REF): Likewise,
6619         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
6620         (TYPE_HAS_INIT_REF): Likewise.
6621         (TYPE_HAS_CONST_INIT_REF): Likewise.
6622         (TYPE_BEING_DEFINED): Likewise.
6623         (TYPE_LANG_SPECIFIC): Likewise.
6624         (CLASSTYPE_RTTI): Likewise.
6625         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
6626         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
6627         (TYPE_OVERLOADS_ARROW): Likewise.
6628         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
6629         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
6630         (CLASSTYPE_METHOD_VEC): Likewise.
6631         (CLASSTYPE_MARKED_N): Likewise.
6632         (CLASSTYPE_MARKED): Likewise.
6633         (CLASSTYPE_MARKED2): Likewise.
6634         (CLASSTYPE_MARKED3): Likewise.
6635         (CLASSTYPE_MARKED4): Likewise.
6636         (CLASSTYPE_MARKED5): Likewise.
6637         (CLASSTYPE_MARKED6): Likewise.
6638         (SET_CLASSTYPE_MARKED): Whitespace.
6639         (CLEAR_CLASSTYPE_MARKED): Likewise.
6640         (SET_CLASSTYPE_MARKED2): Likewise.
6641         (CLEAR_CLASSTYPE_MARKED2): Likewise.
6642         (SET_CLASSTYPE_MARKED3): Likewise.
6643         (CLEAR_CLASSTYPE_MARKED3): Likewise.
6644         (SET_CLASSTYPE_MARKED4): Likewise.
6645         (CLEAR_CLASSTYPE_MARKED4): Likewise.
6646         (SET_CLASSTYPE_MARKED5): Likewise.
6647         (CLEAR_CLASSTYPE_MARKED5): Likewise.
6648         (SET_CLASSTYPE_MARKED6): Likewise.
6649         (CLEAR_CLASSTYPE_MARKED6): Likewise.
6650         (CLASSTYPE_TAGS): Likewise.
6651         (CLASSTYPE_VSIZE): Likewise.
6652         (CLASSTYPE_VBASECLASSES): Likewise.
6653         (CANONICAL_BINFO): Add parenthesis.
6654         (CLASSTYPE_SIZE(NODE): Likewise.
6655         (CLASSTYPE_SIZE_UNIT): Likewise.
6656         (CLASSTYPE_ALIGN(NODE): Likewise.
6657         (CLASSTYPE_USER_ALIGN): Likewise.
6658         (TYPE_JAVA_INTERFACE): Likewise.
6659         (CLASSTYPE_PURE_VIRTUALS): Likewise.
6660         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
6661         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
6662         (CLASSTYPE_HAS_MUTABLE): Likewise.
6663         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
6664         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
6665         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
6666         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
6667         (CLASSTYPE_INTERFACE_ONLY): Likewise.
6668         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
6669         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
6670         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
6671         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
6672         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
6673         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
6674         (BINFO_UNSHARED_MARKED): Whitespace.
6675         (BINFO_MARKED): Whitespace and wrap.
6676         (SET_BINFO_MARKED): Likewise.
6677         (CLEAR_BINFO_MARKED): Likewise.
6678         (BINFO_VTABLE_PATH_MARKED): Likewise.
6679         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
6680         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
6681         (BINFO_SUBVTT_INDEX): Remove parenthesis.
6682         (BINFO_VPTR_INDEX): Likewise.
6683         (BINFO_PRIMARY_BASE_OF): Likewise,
6684         (CLASSTYPE_VFIELDS): Whitespace.
6685         (VF_DERIVED_VALUE): Wrap long line.
6686         (NAMESPACE_LEVEL): Whitespace.
6687         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
6688         (DEFARG_POINTER): Whitespace.
6689         (DECL_NEEDED_P): Remove parenthesis.
6690         (DECL_LANGUAGE): Whitespace.
6691         (SET_DECL_LANGUAGE): Add parenthesis.
6692         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
6693         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
6694         (DECL_IN_AGGR_P): Whitespace.
6695         (DECL_FRIEND_P): Likewise.
6696         (DECL_BEFRIENDING_CLASSES): Likewise.
6697         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
6698         (DECL_NONCONVERTING_P): Whitespace.
6699         (DECL_PURE_VIRTUAL_P): Likewise.
6700         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
6701         (DECL_PENDING_INLINE_INFO): Whitespace.
6702         (DECL_SORTED_FIELDS): Likewise.
6703         (DECL_DEFERRED_FN): Likewise.
6704         (DECL_TEMPLATE_INFO): Likewise.
6705         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
6706         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
6707         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
6708         (TMPL_ARGS_LEVEL): Likewise.
6709         (SET_TMPL_ARGS_LEVEL): Likewise.
6710         (INNERMOST_TEMPLATE_PARMS): Whitespace.
6711         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
6712         (INTEGRAL_CODE_P(CODE): Add parenthesis.
6713         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
6714         (TYPE_HAS_CONSTRUCTOR): Whitespace.
6715         (TREE_HAS_CONSTRUCTOR): Likewise.
6716         (TYPE_HAS_DESTRUCTOR): Likewise.
6717         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
6718         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
6719         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
6720         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
6721         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
6722         (TYPE_PTRMEMFUNC_P): Likewise.
6723         (TYPE_PTRMEMFUNC_FLAG): Likewise.
6724         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
6725         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
6726         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
6727         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
6728         (DECL_ACCESS): Whitespace.
6729         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
6730         (DECL_GLOBAL_DTOR_P): Likewise.
6731         (GLOBAL_INIT_PRIORITY): Likewise.
6732         (DECL_TEMPLATE_PARMS): Likewise.
6733         (DECL_TEMPLATE_RESULT): Likewise.
6734         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
6735         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
6736         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
6737         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
6738         (PRIMARY_TEMPLATE_P): Add parenthesis.
6739         (DECL_USE_TEMPLATE): Whitespace.
6740         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
6741         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
6742         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
6743         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
6744         (CALL_DECLARATOR_PARMS): Remove parenthesis.
6745         (CALL_DECLARATOR_QUALS): Likewise.
6746         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
6747         (TEMP_NAME_P): Wrap.
6748         (VFIELD_NAME_P): Likewise.
6749         (B_SET): Uppercase macro parameters and add parenthesis.
6750         (B_CLR): Likewise.
6751         (B_TST): Likewise.
6752         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
6753         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
6754         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
6755         (same_or_base_type_p): Likewise.
6756         (cp_deprecated): Likewise.
6757
6758 2002-01-05  Richard Henderson  <rth@redhat.com>
6759
6760         * semantics.c (expand_body): Revert last change.
6761
6762 2002-01-04  Jason Merrill  <jason@redhat.com>
6763
6764         PR c++/4122
6765         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
6766         lost primary.
6767
6768         * class.c (build_vtbl_initializer): Check for a lost primary
6769         before calculating the vtable entry to throw away.
6770
6771 2002-01-02  Jason Merrill  <jason@redhat.com>
6772
6773         * semantics.c (expand_body): Call outlining_inline_function when
6774         emitting an inline function out of line.
6775
6776 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6777
6778         PR c++/5116, c++/764 reversion
6779         * call.c (build_new_op): Revert the instantiations. They are
6780         incorrect.
6781
6782 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6783
6784         PR c++/5089
6785         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
6786
6787 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6788
6789         PR c++/3716
6790         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
6791         (tsubst, case POINTER_TYPE): Handle pmfs here.
6792         (tsubst, case OFFSET_TYPE): Check it is not an offset to
6793         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
6794
6795 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6796
6797         PR c++/35
6798         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
6799         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
6800         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
6801         PARM_DECL.
6802         (tsubst_template_parms): Break up loop statements.
6803         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
6804         parm PARM_DECLs don't get promoted.
6805
6806 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6807
6808         PR c++/5123
6809         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
6810         (build_x_function_call): Cope with a COMPONENT_REF containing a
6811         TEMPLATE_ID_EXPR.
6812
6813 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6814
6815         PR c++/5213
6816         * pt.c (convert_template_argument): Be more careful determining
6817         when RECORD_TYPE templates are or are not templates.
6818
6819 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6820
6821         PR c++/775
6822         * cp-tree.h (handle_class_head): Adjust prototype.
6823         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
6824         parameters. Use for all class heads.
6825         * parse.y (named_class_head_sans_basetype, named_class_head,
6826         named_complex_class_head_sans_basetype,
6827         named_class_head_sans_basetype_defn,
6828         unnamed_class_head): Remove.
6829         (class_head, class_head_apparent_template): Recognize class heads
6830         (class_head_decl, class_head_defn): New reductions. Process class
6831         heads.
6832         (structsp): Adjust class definition and class declaration
6833         reductions.
6834         (maybe_base_class_list): Give diagnostic on empty list.
6835
6836 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6837
6838         PR c++/4379
6839         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
6840         single non-static member.
6841         (unary_complex_lvalue): If it cannot be a pointer to member, don't
6842         make it so. Check it is not pointer to reference.
6843
6844 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6845
6846         PR c++/5132
6847         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
6848         are processing a template decl.
6849
6850 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6851
6852         PR c++/5116, c++/764
6853         * call.c (build_new_op): Make sure template class operands are
6854         instantiated. Simplify arglist construction.
6855
6856 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6857
6858         * call.c (build_user_type_conversion_1): Use my_friendly_assert
6859         rather than if ... abort.
6860         * cvt.c (convert_to_reference): Likewise.
6861         * semantics.c (setup_vtbl_ptr): Likewise.
6862         * pt.c (lookup_template_class): Comment typo.
6863
6864 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6865
6866         PR c++/5125
6867         * pt.c (push_template_decl_real): Make sure DECL has
6868         DECL_LANG_SPECIFIC.
6869
6870 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6871
6872         PR c++/335
6873         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
6874         for non-reference fields.
6875         * typeck.c (require_complete_type): Use resolve_offset_ref).
6876
6877 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
6878
6879         PR c++/196
6880         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
6881
6882 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
6883
6884         PR c++/160
6885         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
6886         up. Don't stabilize_references when initializing a reference.
6887
6888 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6889
6890         * decl2.c (lang_f_options): Const-ify.
6891
6892 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
6893
6894         * config-lang.in (diff_excludes): Remove.
6895
6896 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
6897
6898         PR c++/90
6899         * typeck.c (build_function_call_real): Use original function
6900         expression for errors.
6901
6902 2001-12-18  Jason Merrill  <jason@redhat.com>
6903
6904         PR c++/3242
6905         * class.c (add_method): Do compare 'this' quals when trying to match a
6906         used function.  Don't defer to another used function.
6907
6908 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
6909
6910         * pt.c (instantiate_clone): Remove, fold into ...
6911         (instantiate_template): ... here. Simplify by removing mutual
6912         recursion.
6913         * typeck2.c (build_m_component_ref): Don't cv qualify the function
6914         pointed to by a pointer to function.
6915         * class.c (delete_duplicate_fields_1): Typo.
6916
6917 2001-12-18  Jason Merrill  <jason@redhat.com>
6918
6919         C++ ABI change: destroy value arguments in caller.
6920         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
6921         create an extra binding level for the parameters.
6922         * decl.c (store_parm_decls): Don't do parameter cleanups.
6923
6924 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
6925
6926         * call.c (build_new_method_call): Use '%#V'.
6927         * error.c (cv_to_string): Use V parameter to determine padding.
6928
6929 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
6930
6931         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
6932         spellings in messages.
6933
6934 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
6935
6936         * cp-tree.h: Delete #defines for cp_error, cp_warning,
6937         cp_pedwarn, and cp_compiler_error.
6938         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
6939         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
6940         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
6941         typeck2.c: Change calls to the above macros to use their
6942         language-independent equivalents: error, warning, pedwarn, and
6943         internal_error respectively.
6944
6945 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
6946
6947         * decl2.c (finish_file): Remove back_end_hook.
6948
6949 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
6950
6951         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
6952         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
6953         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
6954
6955 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
6956
6957         * lang-options.h: Use American spelling in messages.
6958
6959 2001-12-13  Jason Merrill  <jason@redhat.com>
6960
6961         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
6962
6963         Use cleanups to run base and member destructors.
6964         * init.c (push_base_cleanups): New function, split out from...
6965         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
6966         * decl.c (finish_destructor_body): Move vbase destruction code to
6967         push_base_cleanups.
6968         (begin_function_body, finish_function_body): New fns.
6969         (finish_function): Move [cd]tor handling and call_poplevel to
6970         finish_function_body.
6971         (pushdecl): Skip the new level.
6972         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
6973         (setup_vtbl_ptr): Call push_base_cleanups.
6974         * method.c (synthesize_method): Call {begin,end}_function_body.
6975         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
6976         * cp-tree.h: Declare new fns.
6977         * parse.y (function_body, .begin_function_body): New nonterminals.
6978         (fndef, pending_inline, function_try_block): Use function_body.
6979         (ctor_initializer_opt, function_try_block): No longer has a value.
6980         (base_init): Remove .set_base_init token.
6981         (.set_base_init, compstmt_or_error): Remove.
6982         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
6983
6984         * optimize.c (maybe_clone_body): Fix parameter updating.
6985
6986 2001-12-12  Jason Merrill  <jason@redhat.com>
6987
6988         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
6989         * semantics.c (genrtl_start_function): Don't pass
6990         parms_have_cleanups or push an extra binding level.
6991         (genrtl_finish_function): Lose cleanup_label cruft.
6992
6993         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
6994         (ctor_label): Remove.
6995         * semantics.c (finish_return_stmt): Lose ctor_label support.
6996         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
6997         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
6998         dtor_label.
6999
7000         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
7001         check for [cd]tors.
7002         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
7003
7004         * decl.c (finish_function): Check VMS_TARGET, not VMS.
7005
7006         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
7007         (end_cleanup_fn): And poplevel.
7008
7009         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
7010         if we're in a template.
7011
7012 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
7013
7014         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
7015         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
7016         THIS_NAME_P): Delete.
7017         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
7018         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
7019         with internal naming scheme.
7020         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
7021
7022 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
7023
7024         * decl.c (grokdeclarator): Deprecated implicit typename use.
7025
7026 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
7027
7028         PR g++/51
7029         * parse.y (frob_specs): Indicate it is a language linkage which
7030         contained the extern.
7031         * decl.c (grokdeclarator): Allow extern language linkage with
7032         other specifiers.
7033
7034 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
7035
7036         PR g++/72
7037         * decl.c (add_binding): Don't reject duplicate typedefs involving
7038         template parameters.
7039
7040 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
7041
7042         * parse.y, semantics.c: Similarly.
7043
7044 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
7045
7046         PR g++/87
7047         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
7048         (copy_args_p): Rename to ...
7049         (copy_fn_p): ... here.
7050         (grok_special_member_properties): New function.
7051         (grok_op_properties): Lose VIRTUALP parameter.
7052         (copy_assignment_arg_p): Remove.
7053         * call.c (build_over_call): Use copy_fn_p.
7054         * decl.c (grokfndecl): Reformat. Adjust call to
7055         grok_op_properties.
7056         (copy_args_p): Rename to ...
7057         (copy_fn_p): ... here. Reject template functions. Check for pass
7058         by value.
7059         (grok_special_member_properties): Remember special functions.
7060         (grok_ctor_properties): Don't remember them here, just check.
7061         (grok_op_properties): Likewise.
7062         (start_method): Call grok_special_member_properties.
7063         * decl2.c (grokfield): Likewise.
7064         (copy_assignment_arg_p): Remove.
7065         (grok_function_init): Don't remember abstract assignment here.
7066         * pt.c (instantiate_class_template): Call
7067         grok_special_member_properties.
7068         (tsubst_decl): Adjust grok_op_properties call.
7069
7070 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
7071
7072         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
7073         RID_TYPES_COMPATIBLE_P.
7074
7075 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7076
7077         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
7078         call to build_aggr_init.
7079         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
7080
7081 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
7082
7083         * parse.y: Replace uses of the string non-terminal with STRING.
7084         Don't perform string concatentaion here.
7085         (string): Remove non-terminal.
7086         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
7087
7088 2001-12-05  Jason Merrill  <jason@redhat.com>
7089
7090         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
7091         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
7092         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
7093         * pt.c (push_tinst_level): No longer static.
7094         * cp-tree.h: Declare them.
7095
7096         * init.c (resolve_offset_ref): Don't check access for the base
7097         conversion to access a FIELD_DECL.
7098
7099         * cp-tree.h (TYPE_REFFN_P): New macro.
7100         * decl.c (bad_specifiers): Check it, too.
7101
7102         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
7103         on the __*_type_info type if we haven't seen a definition.
7104
7105 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
7106
7107         * decl.c: Include c-common.h.
7108         (shadow_warning): Move to c-common.c.
7109
7110 2001-12-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7111
7112         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
7113
7114 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
7115
7116         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
7117
7118 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
7119
7120         PR g++/164
7121         * init.c (sort_base_init): Allow binfos to be directly specified.
7122         * method.c (do_build_copy_constructor): Explicitly convert to the
7123         base instance.
7124         (do_build_assign_ref): Likewise.
7125
7126 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
7127
7128         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
7129         declaration and initialization.
7130
7131 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
7132
7133         * typeck2.c: Remove leading capital from diagnostic messages, as
7134         per GNU coding standards.
7135
7136 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
7137
7138         PR c++/3394
7139         * decl.c (xref_basetypes): Handle attributes between
7140         'class' and name.
7141
7142 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
7143
7144         PR g++/3381
7145         * parse.y (named_complex_class_head_sans_basetype): Add new
7146         reduction.
7147         * Make-lang.in (parse.c): Adjust expected conflict count.
7148
7149 2001-12-03  Jason Merrill  <jason@redhat.com>
7150
7151         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
7152         immediate binfos for our virtual bases.
7153
7154 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
7155
7156         * call.c (build_java_interface_fn_ref): Similarly.
7157         * except.c (is_admissible_throw_operand): Similarly.
7158         * init.c (build_java_class_ref): Similarly.
7159         * xref.c (open_xref_file): Similarly.
7160
7161 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7162
7163         * class.c (finish_struct): Remove trailing periods from messages.
7164         * decl.c (check_tag_decl): Similarly.
7165         * lex.c (cxx_set_yydebug): Similarly.
7166         * typeck2.c (friendly_abort): Similarly.
7167
7168 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
7169
7170         PR c++/3048
7171         * cp-tree.h (ovl_member): Remove.
7172         * decl2.c (merge_functions): Handle extern "C" functions
7173         specially.
7174         * tree.c (ovl_member): Remove.
7175
7176 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
7177
7178         PR c++/4842
7179         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
7180         FUNCTION_DECL, as input.
7181         (mark_overriders): Remove.
7182         (warn_hidden): Rework for the new ABI.
7183
7184 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
7185
7186         PR c++/3471
7187         * call.c (convert_like_real): Do not build additional temporaries
7188         for rvalues of class type.
7189
7190 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
7191
7192         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
7193         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
7194         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
7195         (DERIVED_FROM_P): Likewise.
7196         (enum base_access): Renumber, add ba_quiet bit mask.
7197         (get_binfo): Remove.
7198         (get_base_distance): Remove.
7199         (binfo_value): Remove.
7200         (ACCESSIBLY_DERIVED_FROM_P): Remove.
7201         * call.c (standard_conversion): Use lookup_base.
7202         * class.c (strictly_overrides): Likewise.
7203         (layout_virtual_bases): Likewise.
7204         (warn_about_ambiguous_direct_bases): Likewise.
7205         (is_base_of_enclosing_class): Likewise.
7206         (add_vcall_offset_vtbl_entries_1): Likewise.
7207         * cvt.c (build_up_reference): Adjust comment.
7208         * init.c (build_member_call): Reformat.
7209         * search.c (get_binfo): Remove.
7210         (get_base_distance_recursive): Remove.
7211         (get_base_distance): Remove.
7212         (lookup_base_r): Tweak.
7213         (lookup_base): Add ba_quiet control. Complete the types here.
7214         (covariant_return_p): Use lookup_base.
7215         * tree.c (binfo_value): Remove.
7216         (maybe_dummy_object): Use lookup_base.
7217         * typeck.c (build_static_cast): Use lookup_base.
7218         (get_delta_difference): Likewise.
7219         * typeck2.c (binfo_or_else): Use lookup_base.
7220         (build_scoped_ref): Add back error_mark_check.
7221         (build_m_component_ref): Use lookup_base.
7222
7223 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
7224
7225         * Make-lang.in (c++.generated-manpages): New dummy target.
7226
7227 2001-11-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7228
7229         * Make-lang.in (cp-lang.o): Depends on c-common.h.
7230         * cp-lang.c (c-common.h): Include.
7231         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
7232         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
7233         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
7234
7235 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
7236
7237         * decl2.c (c_language): Move to c-common.c.
7238         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
7239         functions.
7240         (cxx_init): Update.
7241
7242 2001-11-26  Jason Merrill  <jason@redhat.com>
7243
7244         * call.c (joust): Remove COND_EXPR hack.
7245
7246 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
7247
7248         * search.c (lookup_base_r): Declare bk in variable declaration
7249         space.
7250
7251 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
7252
7253         PR g++/3145
7254         * class.c (build_vbase_pointer): Remove.
7255         (build_vbase_path): Remove.
7256         (build_base_path): New function.
7257         * cp-tree.h (base_access, base_kind): New enumerations.
7258         (build_base_path): Declare.
7259         (convert_pointer_to_real): Remove.
7260         (convert_pointer_to): Remove.
7261         (lookup_base): Declare.
7262         (convert_pointer_to_vbase): Remove.
7263         * call.c (build_scoped_method_call): Use lookup_base &
7264         build_base_path instead of convert_pointer_to_real,
7265         get_base_distance & get_binfo.
7266         (build_over_call): Likewise.
7267         * cvt.c (cp_convert_to_pointer): Likewise.
7268         (convert_to_pointer_force): Likewise.
7269         (build_up_reference): Likewise.
7270         (convert_pointer_to_real): Remove.
7271         (convert_pointer_to): Remove.
7272         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
7273         instead of convert_pointer_to_vbase & build_vbase_path.
7274         (emit_base_init): Use build_base_path instead of
7275         convert_pointer_to_real.
7276         (expand_virtual_init): Lose unrequired conversions.
7277         (resolve_offset_ref): Use lookup_base and build_base_path
7278         instead of convert_pointer_to.
7279         * rtti.c (build_dynamic_cast_1): Use lookup_base &
7280         build_base_path instead of get_base_distance & build_vbase_path.
7281         * search.c (get_vbase_1): Remove.
7282         (get_vbase): Remove.
7283         (convert_pointer_to_vbase): Remove.
7284         (lookup_base_r): New function.
7285         (lookup_base): New function.
7286         * typeck.c (require_complete_type): Use lookup_base &
7287         build_base_path instead of convert_pointer_to.
7288         (build_component_ref): Likewise.
7289         (build_x_function_call): Likewise.
7290         (get_member_function_from_ptrfunc): Likewise.
7291         (build_component_addr): Likewise.
7292         * typeck2.c (build_scoped_ref): Likewise.
7293
7294 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7295
7296         * cp-tree.h (CP_TYPE_QUALS): Removed.
7297         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
7298         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
7299         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
7300         * dump.c (cp_dump_tree): Use void* dump_info argument to match
7301         lang-hooks prototype.
7302         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
7303         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
7304         CP_TYPE_QUALS changed to cp_type_quals.
7305         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
7306         (CXX_C_OBJS): Remove c-dump.o.
7307
7308 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
7309
7310         PR c++/3637
7311         * pt.c (lookup_template_class): Ensure that all specializations
7312         are registered on the list corresponding to the most general
7313         template.
7314
7315 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
7316
7317         * call.c (non_reference): Add documentation.
7318         (convert_class_to_reference): Do not strip reference types
7319         from conversion operators.
7320         (maybe_handle_ref_bind): Simplify.
7321         (compare_ics): Correct handling of references.
7322
7323 2001-11-19  John Wilkinson <johnw@research.att.com>
7324
7325         * dump.c (dump_op): New function.
7326         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
7327         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
7328         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
7329
7330 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
7331
7332         PR4629
7333         * semantics.c (finish_sizeof): Make sure that expression created
7334         while processing a template do not have a type.
7335         (finish_alignof): Likewise.
7336         * typeck.c (c_sizeof): Likewise.
7337         (expr_sizeof): Likewise.
7338
7339 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
7340
7341         * lex.c (cxx_finish): Call c_common_finish.
7342         (finish_parse): Remove.
7343
7344 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7345
7346         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
7347         when displaying error message about missing array bounds.
7348
7349 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7350
7351         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
7352         CONST_CAST_EXPR.
7353         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
7354
7355 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
7356
7357         * cp-tree.h (print_class_statistics): Restore.
7358
7359 2001-11-15  Jason Merrill  <jason@redhat.com>
7360
7361         * method.c (use_thunk): Don't emit debugging information for thunks.
7362
7363         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
7364         * decl.c (make_typename_type): Handle getting a class template.
7365         * search.c (lookup_field_r): A class template is good enough for
7366         want_type.
7367
7368         * call.c (convert_like_real): Only use cp_convert for the bad part.
7369         (standard_conversion): Also allow bad int->enum.
7370         * typeck.c (ptr_reasonably_similar): Also allow functions to
7371         interconvert.  Pointers to same-size integers are reasonably
7372         similar.
7373
7374         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
7375         give it void type.
7376
7377 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
7378
7379         PR g++/3154
7380         * init.c (sort_base_init): Remove unreachable code.
7381         (expand_member_init): Adjust comment to reflect reality. Simplify
7382         and remove unreachable code.
7383
7384 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
7385
7386         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
7387         (cxx_init): Update prototype.
7388         * decl.c (init_decl_processing): Rename.  Move null node init
7389         to its creation time.
7390         * lex.c (cxx_init_options): Update.
7391         (cxx_init): Combine with old init_parse; also call
7392         cxx_init_decl_processing.
7393
7394 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
7395
7396         * decl.c (check_initializer): Try to complete the type of an
7397         array element before checking whether it's complete.  Don't
7398         complain about arrays with complete element types but an
7399         unknown size.
7400         (cp_finish_decl): Build the hierarchical constructor before
7401         calling maybe_deduce_size_from_array_init.
7402
7403 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
7404
7405         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
7406
7407 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
7408
7409         PR g++/4206
7410         * parse.y (already_scoped_stmt): Remove.
7411         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
7412
7413 2001-11-12  H.J. Lu <hjl@gnu.org>
7414
7415         * cvt.c (ocp_convert): Don't warn the address of a weak
7416         function is always `true'.
7417
7418 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
7419
7420         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
7421         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
7422         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
7423         * cp-tree.h (print_class_statistics): Remove.
7424         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
7425         cxx_print_identifier, cxx_set_yydebug): New.
7426         * lex.c (set_yydebug): Rename c_set_yydebug.
7427         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
7428         lang_print_xnode): Rename.
7429         * tree.c (print_lang_statistics): Rename.
7430
7431 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7432
7433         * class.c (dump_array): Fix format specifier warning.
7434
7435 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
7436
7437         * cp-lang.c (LANG_HOOKS_NAME): Override.
7438         (struct lang_hooks): Constify.
7439         * lex.c (cxx_init_options): Update.
7440         (lang_identify): Remove.
7441         * parse.y (language_string): Remove.
7442
7443 2001-11-08  Andreas Franck  <afranck@gmx.de>
7444
7445         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
7446         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
7447         suggested by autoconf.
7448         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
7449         (c++.install-common): Use the transformed target alias names.
7450
7451 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7452
7453         * Make-lang.in: Update.
7454         * cp-lang.c: Include langhooks-def.h.
7455
7456 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7457
7458         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
7459
7460 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7461
7462         * lex.c (copy_lang_type): Add static prototype.
7463
7464 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7465
7466         * pt.c (unify): Handle SCOPE_REF.
7467
7468 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
7469
7470         * tree.c (cp_copy_res_decl_for_inlining): Adjust
7471         DECL_ABSTRACT_ORIGIN for the return variable.
7472
7473 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
7474
7475         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
7476
7477 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
7478
7479         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
7480         semantics.c, spew.c: Fix spelling errors.
7481
7482 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7483
7484         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
7485
7486 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
7487
7488         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
7489         pop_everything.
7490
7491 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7492
7493         * cp-lang.c (cxx_get_alias_set): New function.
7494         Point LANG_HOOKS_GET_ALIAS_SET to it.
7495
7496 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7497
7498         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
7499         * cp-tree.h (make_unbound_class_template): Prototype new function.
7500         * decl.c (make_unbound_class_template): New function.
7501         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
7502         * error.c (dump_type): Likewise.
7503         * mangle.c (write_type): Likewise.
7504         * parse.y (template_parm): Likewise.
7505         (template_argument): Use make_unbound_class_template.
7506         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
7507         (tsubst): Likewise.
7508         (tsubst_copy): Likewise.
7509         (unify): Likewise.
7510         * tree.c (walk_tree): Likewise.
7511         * typeck.c (comptypes): Likewise.
7512
7513 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7514
7515         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
7516         extra calls into fewer ones.
7517
7518 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
7519
7520         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
7521         Warn when merging inline with attribute noinline.
7522         (start_decl, start_function): Warn if inline and attribute
7523         noinline appear in the same declaration.
7524
7525 2001-10-16  H.J. Lu <hjl@gnu.org>
7526
7527         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
7528         for tree checking disabled.
7529
7530 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
7531
7532         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
7533         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
7534
7535 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
7536
7537         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
7538         (unify): Only handle MINUS_EXPR specially if the above flag is set
7539         and the subtracted constant is 1.  Clear the flag on recursive calls.
7540         Set it when unifying the maximum value in an INTEGER_TYPE's range.
7541
7542 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
7543
7544         * decl.c (bad_specifiers): Don't allow exception specifications
7545         on any typedefs.
7546
7547 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
7548
7549         * cp/lex.c (init_cp_pragma): Similarly.
7550
7551 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7552
7553         * pt.c (lookup_template_class): Build complete template arguments
7554         for BOUND_TEMPLATE_TEMPLATE_PARM.
7555
7556 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7557
7558         * cp-tree.h (TYPE_BINFO): Update comment.
7559         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
7560         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
7561         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
7562         (copy_type): Prototype new function.
7563         * lex.c (copy_lang_decl): Gather tree node statistics.
7564         (copy_lang_type): New function.
7565         (copy_type): Likewise.
7566         (cp_make_lang_type): Create lang_type for
7567         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
7568         and BOUND_TEMPLATE_TEMPLATE_PARM.
7569         * pt.c (tsubst): Use copy_type instead of copy_node.
7570         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
7571
7572 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7573
7574         * pt.c (determine_specialization): Ignore functions without
7575         DECL_TEMPLATE_INFO.
7576
7577 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
7578
7579         PR g++/4476
7580         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
7581
7582 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
7583
7584         * typeck2.c (store_init_value): Don't re-digest a bracketed
7585         initializer.
7586
7587         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
7588         ANON_AGGR_TYPE_P.
7589
7590 2001-10-11  Richard Henderson  <rth@redhat.com>
7591
7592         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
7593         of an asm statement.
7594         (build_vtbl_ref_1): Split out from build_vtbl_ref.
7595         (build_vfn_ref): Use it to handle vtable descriptors before
7596         calling build_vtable_entry_ref.
7597         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
7598
7599 2001-10-10  Richard Henderson  <rth@redhat.com>
7600
7601         * parse.y (asm_operand): Allow named operands.
7602         * semantics.c (finish_asm_stmt): Tweek for changed location
7603         of the operand constraint.
7604
7605 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
7606
7607         * call.c (standard_conversion): Add bad conversion between
7608         integers and pointers.
7609         (convert_like_real): Don't use convert_for_initialization for bad
7610         conversions; complain here and use cp_convert.
7611         (build_over_call): Don't handle bad conversions specially.
7612         (perform_implicit_conversion): Allow bad conversions.
7613         (can_convert_arg_bad): New fn.
7614         * cp-tree.h: Declare it.
7615         * typeck.c (convert_for_assignment): Use it.
7616         (ptr_reasonably_similar): Any target type is similar to void.
7617
7618 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
7619
7620         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
7621         (cp/cp-lang.o): New rule.
7622         * cp-tree.h: Declare hooks.
7623         * tree.c: Make hooks non-static.
7624         (init_tree): Don't initialize hooks here.
7625         * lex.c: Likewise.  Move definition of lang_hooks to...
7626         * cp-lang.c: ... new file.
7627
7628 2001-10-08  Richard Henderson  <rth@redhat.com>
7629
7630         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
7631         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
7632
7633 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7634
7635         * class.c (build_vtable_entry_ref): Const-ify.
7636         * decl.c (predefined_identifier,
7637         initialize_predefined_identifiers): Likewise.
7638         * init.c (build_new_1): Likewise.
7639         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
7640         Likewise.
7641
7642 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
7643
7644         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
7645         (INSNS_PER_STMT): Likewise.
7646         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
7647         (copy_body, initialize_inlined_parameters): Likewise.
7648         (declare_return_variable, inlinable_function_p): Likewise.
7649         (expand_call_inline, expand_calls_inline): Likewise.
7650         (optimize_inline_calls, clone_body): Likewise.
7651         * tree.c (walk_tree): Moved to ../tree-inline.c.
7652         (walk_tree_without_duplicates): Likewise.
7653         (copy_tree_r, remap_save_expr): Likewise.
7654
7655 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
7656
7657         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
7658         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
7659         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
7660         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
7661         (flag_inline_trees): Moved declaration to ../tree-inline.h.
7662         (walk_tree): Moved declaration to ../tree-inline.h.
7663         (walk_tree_without_duplicates, copy_tree_r): Likewise.
7664         (remap_save_expr): Likewise.
7665         * decl.c: Include tree-inline.h.
7666         (lang_mark_tree): Don't mark inlined_fns.
7667         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
7668         * optimize.c: Include tree-inline.h.
7669         (optimize_inline_calls): Move declaration to ../tree.h, as
7670         non-static.
7671         (remap_decl): Use language-independent constructs and hooks.
7672         (remap_block, copy_body_r, declare_return_variable): Likewise.
7673         (inlinable_function_p): Likewise.  Don't test for
7674         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
7675         no longer language-specific.
7676         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
7677         call of dump_function to...
7678         (optimize_function): Here...
7679         (clone_body): New function, extracted from...
7680         (maybe_clone_body): ... here.  Build decl_map locally and pass
7681         it on to clone_body.
7682         * pt.c, semantics.c: Include tree-inline.h.
7683         * tree.c: Likewise.
7684         (cp_walk_subtrees): New language-specific hook for tree inlining.
7685         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
7686         cp_is_overload_p, cp_auto_var_in_fn_p,
7687         cp_copy_res_decl_for_inlining): Likewise.
7688         (walk_tree): Move language-specific constructs into...
7689         (cp_walk_subtrees): this new function.
7690         (copy_tree_r): Use language-independent constructs and hooks.
7691         (init_tree): Initialize tree inlining hooks.
7692         (remap_save_expr): Adjust prototype so that the declaration
7693         does not require the definition of splay_tree.
7694
7695 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7696
7697         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
7698         to build the declaration instead of the declaration itself.
7699
7700 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
7701
7702         * decl2.c (cxx_decode_option): Add 'else'.
7703
7704         * spew.c (end_input): No longer static.
7705         * cp-tree.h: Declare it.
7706         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
7707
7708 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
7709
7710         * call.c (build_over_call), typeck.c (build_function_call_real):
7711         Pass type attributes to check_function_format rather than name or
7712         assembler name.  Don't require there to be a name or assembler
7713         name to check formats.
7714
7715 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
7716
7717         * decl.c (init_decl_processing): Don't call
7718         init_function_format_info.  Initialize lang_attribute_table
7719         earlier.
7720         (builtin_function): Call decl_attributes.
7721         (insert_default_attributes): New.
7722
7723 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
7724
7725         * decl.c (grokdeclarator): Copy array typedef handling from C
7726         frontend.
7727
7728         * decl.c (grokdeclarator): Copy too-large array handling from C
7729         frontend.
7730
7731 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
7732
7733         * config-lang.in (target_libs): Added target-gperf, so that we
7734         don't try to build it if C++ is disabled.
7735
7736 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
7737
7738         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
7739         (cp/errfn.o): Delete rule.
7740         (cp/error.o): Depend on flags.h.
7741         * errfn.c: Delete file.
7742         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
7743         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
7744         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
7745         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
7746         internal_error respectively.  Make cp_deprecated into a macro.
7747         Don't define cp_printer typedef or declare cp_printers.
7748         * error.c: Include flags.h.
7749         Delete: struct tree_formatting_info, print_function_argument_list,
7750         print_declaration, print_expression, print_function_declaration,
7751         print_function_parameter, print_type_id, print_cv_qualifier_seq,
7752         print_type_specifier_seq, print_simple_type_specifier,
7753         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
7754         print_parameter_declaration_clause, print_exception_specification,
7755         print_nested_name_specifier, and definition of cp_printers.
7756         (locate_error): New function.
7757         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
7758         rewritten in terms of locate_error and diagnostic.c.
7759         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
7760         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
7761         (init_error): Adjust to match.
7762
7763 2001-09-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7764
7765         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
7766
7767 2001-09-21  Richard Henderson  <rth@redhat.com>
7768
7769         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
7770         (build_vtbl_initializer): Likewise.
7771         (build_vfn_ref): New.
7772         * cp-tree.h: Declare it.
7773         * call.c (build_over_call): Use it.
7774         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
7775         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
7776
7777 2001-09-21  J"orn Rennecke <amylaar@redhat.com>
7778
7779         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
7780
7781 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
7782
7783         Table-driven attributes.
7784         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
7785         * decl2.c (cplus_decl_attributes): Only take one attributes
7786         parameter.
7787         * cp-tree.c (cplus_decl_attributes): Update prototype.
7788         * class.c (finish_struct), decl.c (start_decl, start_function),
7789         decl2.c (grokfield), friend.c (do_friend), parse.y
7790         (parse_bitfield): Update calls to cplus_decl_attributes.
7791         * decl.c (grokdeclarator): Take a pointer to a single ordinary
7792         attribute list.
7793         * decl.h (grokdeclarator): Update prototype.
7794         * decl2.c (grokfield): Take a single ordinary attribute list.
7795         * friend.c (do_friend): Likewise.
7796         * decl.c (shadow_tag, groktypename, start_decl,
7797         start_handler_parms, grokdeclarator, grokparms, start_function,
7798         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
7799         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
7800         (process_template_parm, do_decl_instantiation): Pass single
7801         ordinary attribute lists around.
7802         * decl.c (grokdeclarator): Correct handling of nested attributes.
7803         Revert the patch
7804         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
7805                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
7806                 not the left.
7807         .
7808         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
7809         (cp_attribute_table): Declare.
7810         * decl.c (valid_lang_attribute): Don't define.
7811         (lang_attribute_table): Define.
7812         (init_decl_processing): Initialize lang_attribute_table instead of
7813         valid_lang_attribute.
7814         * tree.c (cp_valid_lang_attribute): Remove.
7815         (handle_java_interface_attribute, handle_com_interface_attribute,
7816         handle_init_priority_attribute): New functions.
7817         (cp_attribute_table): New array.
7818         * decl2.c (import_export_class): Don't use
7819         targetm.valid_type_attribute.
7820
7821 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7822
7823         * Make-lang.in (cp/error.o): Depend on real.h
7824         * error.c: #include "real.h"
7825
7826 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7827
7828         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
7829         xmalloc/strcpy/strcat.
7830
7831 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7832
7833         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
7834         Const-ification.
7835         * pt.c (tsubst_decl): Likewise.
7836
7837 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7838
7839         * decl2.c (lang_f_options): Const-ification.
7840         * lex.c (cplus_tree_code_name): Likewise.
7841         * spew.c (yyerror): Likewise.
7842
7843 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
7844
7845         PR c++/3986
7846         * class.c (force_canonical_binfo_r): Check & move an indirect
7847         primary base first.
7848         (force_canonical_binfo): Check that it's not already
7849         canonical.
7850         (mark_primary_virtual_base): Remove BINFO parameter.
7851         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
7852
7853 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
7854
7855         Remove TYPE_NONCOPIED_PARTS.
7856         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
7857         CLASSTYPE_PURE_VIRTUALS.
7858         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
7859         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
7860         (layout_class_type): Don't call fixup_inline_methods here ...
7861         (finish_struct_1): ... call it here.
7862
7863 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
7864
7865         * decl.c (duplicate_decls): Remove code deadling with
7866         DECL_SAVED_INSNS.
7867         * decl2.c (finish_file): Likewise.
7868         * pt.c (instantiate_decl): Likewise.
7869         * semantics.c (expand_body): Don't defer local functions if
7870         they wouldn't be deferred for some other reason.  Don't
7871         generate RTL for functions that will not be emitted.
7872         (genrtl_start_function): Remove code deadling with
7873         DECL_SAVED_INSNS.
7874         (genrtl_finish_function): Likewise.
7875
7876 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
7877
7878         PR c++/4203
7879         * call.c (build_over_call): Do not optimize any empty base
7880         construction.
7881
7882 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7883
7884         * error.c (dump_template_decl): Output template parameters
7885         together with their specifiers.
7886         Output `class' prefix for template template parameter.
7887         (dump_decl): Fix formatting.
7888
7889 2001-08-30  Kurt Garloff  <garloff@suse.de>
7890
7891         * optimize.c (inlinable_function_p): Allow only smaller single
7892         functions. Halve inline limit after reaching recursive limit.
7893
7894 2001-08-30  Joern Rennecke <amylaar@redhat.com>
7895             Jason Merrill  <jason_merrill@redhat.com>
7896
7897         * class.c (build_vtable_entry_ref): Subtract in char*, not
7898         ptrdiff_t.
7899
7900 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
7901
7902         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
7903         (build_cplus_array_type): Use cp_build_qualified_type, not
7904         TYPE_MAIN_VARIANT, to get an unqualified version.
7905
7906         * decl2.c (grok_alignof): Lose.
7907         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
7908         * typeck.c (c_alignof): Lose.
7909         * semantics.c (finish_sizeof, finish_alignof): New.
7910         * parse.y: Use them.
7911         * cp-tree.h: Declare them.
7912
7913 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
7914
7915         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
7916         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
7917         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
7918
7919 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
7920
7921         * typeck2.c (add_exception_specifier): Only require complete type if
7922         not in processing template declaration.
7923
7924 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7925
7926         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
7927         GNU_xref_start_scope and GNU_xref_end_scope.
7928
7929         * tree.c (TYPE_HASH): Moved to ../tree.h.
7930
7931 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
7932
7933         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
7934         on COMPOUND_EXPRs.
7935
7936 2001-08-14  Richard Henderson  <rth@redhat.com>
7937
7938         * class.c, cp-tree.h (build_vfn_ref): Remove.
7939         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
7940
7941 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
7942
7943         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
7944         empty class assignment as having side-effects to avoid
7945         spurious warnings.
7946
7947 2001-08-13  Zack Weinberg  <zackw@panix.com>
7948
7949         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
7950         * except.c: Include libfuncs.h.
7951
7952 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7953
7954         * decl.c (grokdeclarator): Clarify diagnostic message.
7955
7956 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7957
7958         * decl2.c (do_nonmember_using_decl): Replace using directive
7959         with using declaration in the error message.
7960
7961 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7962
7963         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
7964         criterion to avoid rebuilding expression tree instead of
7965         processing_template_decl.
7966
7967 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
7968
7969         Support named return value optimization for inlines, too.
7970         * decl.c (finish_function): Nullify returns here.
7971         * semantics.c (genrtl_start_function): Not here.
7972         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
7973         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
7974         Also nullify the CLEANUP_STMT for the nrv.
7975         * cp-tree.h: Declare it.
7976         * optimize.c (declare_return_variable): Replace the nrv with the
7977         return variable.
7978         * typeck.c (check_return_expr): Be more flexible on alignment check.
7979         Ignore cv-quals when checking for a matching type.
7980
7981 2001-08-09  Richard Henderson  <rth@redhat.com>
7982
7983         * decl2.c (finish_objects): Use target hooks instead of
7984         assemble_constructor and assemble_destructor.
7985
7986 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7987
7988         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
7989
7990 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
7991
7992         PR c++/3820
7993         Stop using TYPE_NONCOPIED_PARTS.
7994         * call.c (build_over_call): Be careful when copy constructing
7995         or assigning to an empty class.
7996         * class.c (check_bases_and_members): It has a
7997         COMPLEX_ASSIGN_REF if it has a vptr.
7998         (layout_class_type): Don't add empty class padding to
7999         TYPE_NONCOPIED_PARTS.
8000         (finish_struct_1): Don't add the VFIELD either.
8001         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
8002         initialization.
8003
8004 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
8005
8006         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
8007
8008 2001-08-06  Richard Henderson  <rth@redhat.com>
8009
8010         * decl2.c (finish_objects): Pass a symbol_ref and priority to
8011         assemble_{constructor,destructor}.  Remove priority handling.
8012
8013 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8014
8015         Don't allow template-id in using-declaration.
8016         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
8017         (do_class_using_decl): Likewise.
8018
8019 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8020
8021         * cp/spew.c (read_token): No need to pop buffers.
8022
8023 2001-08-02  Stan Shebs  <shebs@apple.com>
8024
8025         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
8026         (fnaddr_from_vtable_entry): Remove decl.
8027         * method.c (use_thunk): Update comment.
8028
8029 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
8030
8031         * repo.c (get_base_filename): Change return value to const char
8032         pointer.
8033
8034 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
8035
8036         Kill -fhonor-std.
8037         * NEWS: Document.
8038         * cp-tree.h (flag_honor_std): Remove.
8039         (CPTI_FAKE_STD): Remove.
8040         (std_node): Remove comment about it being NULL.
8041         (fake_std_node): Remove.
8042         * decl.c (in_fake_std): Remove.
8043         (walk_namespaces_r): Remove fake_std_node check.
8044         (push_namespace): Remove in_fake_std code.
8045         (pop_namespace): Likewise.
8046         (lookup_name_real): Remove fake_std_node check.
8047         (init_decl_processing): Always create std_node. Always add
8048         std:: things there.
8049         (builtin_function): Always put non '_' fns in std.
8050         * decl2.c (flag_honor_std): Remove.
8051         (lang_f_options): Remove honor-std.
8052         (unsupported_options): Add honor-std.
8053         (set_decl_namespace): Remove fake_std_node check.
8054         (validate_nonmember_using_decl): Likewise.
8055         (do_using_directive): Likewise.
8056         (handle_class_head): Likewise.
8057         * dump.c (cp_dump_tree): Likewise.
8058         * except.c (init_exception_processing): Adjust.
8059         * init.c (build_member_call): Remove fake_std_node check.
8060         (build_offset_ref): Likewise.
8061         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
8062         * rtti.c (init_rtti_processing): Adjust.
8063
8064 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
8065
8066         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
8067         operand while calling cp_tree_equal.
8068
8069 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
8070
8071         The 3.0 ABI no longer has vbase pointer fields.
8072         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
8073         FORMAT_VBASE_NAME): Remove.
8074         * method.c (do_build_copy_constructor): Adjust.
8075         (do_build_assign_ref): Adjust.
8076         * search.c (lookup_field_r): Adjust.
8077         * typeck.c (build_component_ref): Adjust.
8078
8079         The 3.0 ABI always has a vtable pointer at the start of every
8080         polymorphic class.
8081         * rtti.c (build_headof_sub): Remove.
8082         (build_headof): Adjust.
8083         (get_tinfo_decl_dynamic): No need to check flag_rtti
8084         here. Adjust.
8085         (create_real_tinfo_var): Explain why we need a hidden name.
8086
8087 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
8088
8089         PR c++/3631
8090         * class.c (update_vtable_entry_for_fn): The fixed adjustment
8091         of a virtual thunk should be from declaring base.
8092
8093 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
8094
8095         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
8096         the shared virtual base, so preserving inheritance graph order.
8097
8098 2001-07-30  Andreas Jaeger  <aj@suse.de>
8099
8100         * decl2.c: Remove unused var global_temp_name_counter.
8101
8102 2001-07-28  Richard Henderson  <rth@redhat.com>
8103
8104         * method.c (pending_inlines): Remove.
8105
8106 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
8107
8108         * class.c (mark_primary_virtual_base): Don't adjust base
8109         offsets here.
8110         (dfs_unshared_virtual_bases): Adjust them here.
8111         (mark_primary_bases): Explain why we adjust at the end.
8112
8113 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
8114
8115         * class.c (finish_struct_1): When copying the primary base's
8116         VFIELD, make sure we find it is at offset zero.
8117
8118 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8119
8120         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
8121         tsubst_expr for default template arguments.
8122
8123 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
8124
8125         PR c++/3621
8126         * spew.c (yylex): Only copy the token's lineno, if it is
8127         nonzero.
8128
8129 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
8130
8131         PR c++/3624
8132         * call.c (resolve_args): Simplify, call
8133         convert_from_reference.
8134         (build_new_op): Resolve and convert from reference ARG1
8135         earlier. Adjust ARG2 & ARG3 resolve and conversion.
8136
8137 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
8138
8139         * decl.c (last_function_parm_tags): Remove.
8140         (current_function_parm_tags): Remove.
8141         (init_decl_processing): Adjust.
8142         (start_function): Adjust.
8143         (store_parm_decls): Adjust.
8144
8145         PR c++/3152
8146         * decl.c (grokdeclarator): Detect when a function typedef is
8147         declaring a function, and create last_function_parms correctly.
8148
8149 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
8150
8151         * call.c (joust): Only prefer a non-builtin candidate to a builtin
8152         one if they have the same signature.
8153
8154         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
8155         it rather than toplevel_bindings_p.  Give it a mangled name if static.
8156         (convert_to_reference): Adjust.
8157         * decl2.c (get_temp_name): Lose.
8158         * mangle.c (mangle_ref_init_variable): New fn.
8159         (mangle_guard_variable): Strip the ref-init header.
8160         * cp-tree.h: Adjust.
8161         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
8162         initializer.
8163         (grok_reference_init): Always use DECL_INITIAL.
8164
8165 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8166
8167         PR c++/3416
8168         * call.c (build_conditional_expr): Recheck args after
8169         conversions.
8170         * cp-tree.h (build_conditional_expr): Move to correct file.
8171         * typeck.c (decay_conversion): Diagnose any unknown types
8172         reaching here.
8173         (build_binary_op): Don't do initial decay or default
8174         conversions on overloaded functions.
8175         (build_static_cast): Don't do a decay conversion here.
8176
8177 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8178
8179         PR c++/3543
8180         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
8181         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
8182
8183 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8184
8185         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
8186         (create_vtbl_ptr): ... here.
8187
8188 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8189
8190         * class.c (build_vbase_offset_vbtl_entries): Look for
8191         non-primary base of which we are a sub vtable.
8192
8193 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
8194
8195         * semantics.c (finish_this_expr):  Remove unused code.
8196
8197 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
8198
8199         Simplify rtti, now we've only one ABI.
8200         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
8201         CPTI_TINFO_VAR_ID.
8202         (tinfo_decl_id, tinfo_var_id): Remove.
8203         (get_typeid_1): Remove.
8204         * rtti.c
8205         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
8206         (typeid_ok_p): New function.
8207         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
8208         (get_tinfo_decl): Remove old abi documentation.
8209         (tinfo_from_decl): Remove.
8210         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
8211         (get_typeid_1): Remove.
8212         (get_base_offset): Remove.
8213         (synthesize_tinfo_var): Absorb get_base_offset.
8214         (create_real_tinfo_var): Don't use tinfo_decl_id.
8215
8216 2001-07-23  Graham Stott  <grahams@redhat.com>
8217
8218         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
8219         variable has_two_argument_delete_p.
8220
8221 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
8222
8223         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
8224         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
8225         (CPTI_INDEX_IDENTIFIER): Remove.
8226         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
8227         (delta2_identifier): Remove.
8228         (index_identifier): Remove.
8229         (pfn_or_delta2_identifier): Remove.
8230         (flag_vtable_thunks): Remove.
8231         (VTABLE_DELTA2_NAME): Remove.
8232         (VTABLE_INDEX_NAME): Remove.
8233         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
8234         (vfunc_ptr_type_node): Adjust.
8235         (VTABLE_NAME_PREFIX): Adjust.
8236         (build_vfn_ref): Lose first parameter.
8237         (fixup_all_virtual_upcast_offsets): Remove.
8238         * decl.c (initialize_predefined_identifiers): Remove
8239         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
8240         (init_decl_processing): Remove no-vtable-thunk code.
8241         * decl2.c (flag_vtable_thunks): Remove.
8242         (mark_vtable_entries): Remove no-vtable-thunk code.
8243         * error.c (dump_decl): Remove no-vtable-thunk code.
8244         (dump_expr): Adjust ptr to member function code.
8245         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
8246         code.
8247         * rtti.c (build_headof): Remove no-vtable-thunk code.
8248         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
8249         * search.c (get_base_distance): Remove expand_upcast_fixups case.
8250         (virtual_context) Remove.
8251         (expand_upcast_fixups): Remove.
8252         (fixup_virtual_upcast_offsets): Remove.
8253         (fixup_all_virtual_upcast_offsets): Remove.
8254         * typeck.c (get_member_function_from_ptrfunc): Remove
8255         no-vtable-thunk code.
8256         * call.c (build_over_call): Adjust call to build_vfn_ref.
8257         * class.c (build_vfn_ref): Lose first parameter. Remove
8258         no-vtable-thunk code.
8259         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
8260         (build_vtable_entry): Remove no-vtable-thunk code.
8261
8262 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
8263
8264         Remove old-abi remnants. Remove comments about old abi
8265         behavior. Remove references to 'new-abi' in comments.
8266         * cp-tree.h: Adjust comments.
8267         (vbase_offsets_in_vtable_p): Delete.
8268         (vcall_offsets_in_vtable_p): Delete.
8269         (vptrs_present_everywhere_p): Delete.
8270         (all_overridden_vfuns_in_vtables_p): Delete.
8271         (merge_primary_and_secondary_vtables_p): Delete.
8272         (TYPE_CONTAINS_VPTR_P): Adjust.
8273         (VTT_NAME_PREFIX): Remove.
8274         (CTOR_VTBL_NAME_PREFIX): Remove.
8275         (init_vbase_pointers): Remove.
8276         * class.c: Adjust coments.
8277         (build_vbase_pointer_fields): Delete.
8278         (build_vbase_pointer): Remove old-abi code.
8279         (build_secondary_vtable): Likewise.
8280         (modify_all_vtables): Likewise.
8281         (create_vtable_ptr): Likewise.
8282         (layout_class_type): Likewise.
8283         (finish_struct_1): Likewise.
8284         (finish_vtbls): Likewise.
8285         (dfs_finish_vtbls): Delete.
8286         (build_vbase_offset_vtbl_entries): Remove old-abi code.
8287         * cvt.c: Adjust comments.
8288         * decl.c: Adjust comments.
8289         * decl2.c: Adjust comments.
8290         * init.c: Adjust comments.
8291         (construct_virtual_bases): Remove old-abi code.
8292         * lang-specs.h: Remove -fno-new-abi.
8293         * mangle.c: Adjust comments.
8294         * rtti.c: Adjust comments.
8295         (get_base_offset): Remove old-abi-code.
8296         * search.c: Adjust comments.
8297         (dfs_init_vbase_pointers): Remove.
8298         (dfs_vtable_path_unmark): Remove.
8299         (init_vbase_pointers): Remove.
8300         * semantics.c: Adjust comments.
8301         (emit_associated_thunks): Remove old-abi code.
8302         * typeck.c: Adjust comments.
8303
8304 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
8305
8306         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
8307         params.h.
8308
8309 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
8310
8311         * class.c (finish_struct_anon): Forbid nested classes.
8312
8313 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
8314
8315         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
8316         * optimize.c: Include debug.h.
8317         (maybe_clone_body): Use debug hook.
8318         * semantics.c: Include debug.h.
8319         (expand_body): Use debug hook.
8320
8321 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
8322
8323         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
8324
8325 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
8326
8327         * class.c (type_requires_array_cookie): New function.
8328         (check_methods): Don't try to figure out whether the type needs a
8329         cookie here.
8330         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
8331         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
8332         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
8333         * pt.c (instantiate_class_template): Don't set
8334         TYPE_VEC_DELETE_TAKES_SIZE.
8335         * NEWS: Document ABI changes from GCC 3.0.
8336
8337 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
8338             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
8339
8340         * NEWS (Changes in GCC 3.0): Fix typo.
8341
8342 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8343
8344         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
8345         which attributes are to be attached, and a flags argument.  Update
8346         call to decl_attributes.
8347         (grokfield): Update call to decl_attributes.
8348         * class.c (finish_struct): Update call to cplus_decl_attributes.
8349         * cp-tree.h (cplus_decl_attributes): Update prototype.
8350         * decl.c (start_decl, grokdeclarator, start_function): Update
8351         calls to decl_attributes and cplus_decl_attributes.
8352         * friend.c (do_friend): Update call to cplus_decl_attributes.
8353         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
8354
8355 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
8356
8357         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
8358         for `register' variables with an asm-specification.
8359
8360 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
8361
8362         * semantics.c (finish_asm_stmt): Mark the output operands
8363         to an asm addressable, if necessary.
8364
8365 2001-07-11  Ben Elliston  <bje@redhat.com>
8366
8367         * Revert this change -- there is a subtle bug.
8368
8369         PR c++/80
8370         * decl.c (finish_enum): New "attributes" argument; pass it to
8371         cplus_decl_attributes.  Use a narrower type if the enum is packed.
8372         * cp-tree.h (finish_enum): Adjust prototype.
8373         * parse.y (enum_head): New non-terminal.
8374         (structsp): Use it. Enums now may be preceded or followed by
8375         optional attributes -- pass their chained tree to finish_enum().
8376         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
8377
8378 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
8379
8380         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
8381         variables.
8382
8383 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
8384
8385         * semantics.c (cp_expand_stmt): Fix for null
8386         current_function_return_value.
8387
8388 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
8389
8390         * call.c (build_op_delete_call): Initialize fn.
8391         (convert_like_real): Delete conditional.
8392         (joust): Initialize *w and *l.
8393         * class.c: Add prototype for binfo_ctor_vtable.
8394         (get_primary_binfo): Initialize result.
8395         * init.c (build_java_class_ref): Initialize name.
8396
8397 2001-07-09  Erik Rozendaal  <dlr@acm.org>
8398
8399         * typeck.c (unary_complex_lvalue): Do not duplicate the
8400         argument to modify, pre-, or post-increment when used as an
8401         lvalue and when the argument has side-effects.
8402
8403 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
8404
8405         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
8406         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
8407         cplus_decl_attributes even if attrs is NULL.
8408         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
8409
8410 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
8411
8412         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
8413         calls to decl_attributes.
8414
8415 2001-07-06  Ira Ruben   <ira@apple.com>
8416
8417         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
8418         be DECL_TEMPLATE_RESULT.
8419
8420 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8421
8422         * cp-tree.h (copy_template_template_parm): Rename to ...
8423         (bind_template_template_parm): ... here.
8424         * tree.c (copy_template_template_parm): Rename to ...
8425         (bind_template_template_parm): ... here.  Remove the case when
8426         NEWARGS is NULL_TREE.
8427         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
8428         BOUND_TEMPLATE_TEMPLATE_PARM.
8429         * pt.c (lookup_template_class): Adjust.
8430
8431 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
8432
8433         * cvt.c (convert_lvalue): New fn.
8434         * cp-tree.h: Declare it.
8435         * method.c (do_build_assign_ref): Use it.
8436         (do_build_copy_constructor): Convert parm to base types
8437         before calling base constructors.
8438
8439         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
8440         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
8441         optimize.
8442         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
8443
8444 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
8445
8446         * optimize.c (optimize_inline_calls): New function, broken out
8447         of ...
8448         (optimize_function): ... here. Call it. Don't inline if it is
8449         a thunk.
8450         (dump_function): Print name of dump flag causing this dump.
8451         * semantics.c (expand_body): Move thunk inline check to
8452         optimize_function.
8453
8454 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8455
8456         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
8457         (comptypes): Use target.comp_type_attributes.
8458
8459 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
8460
8461         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
8462
8463 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8464
8465         * error.c (lang_print_error_function): Add a `diagnostic_context *'
8466         parameter. Tweak.
8467
8468 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8469
8470         * decl2.c (import_export_class): Update.
8471
8472 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
8473
8474         * error.c (init_error): Adjust settings.
8475
8476 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
8477
8478         * error.c (init_error): Adjust settings.
8479
8480 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
8481
8482         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
8483         return pointers to data members by reference rather than by value.
8484
8485 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
8486
8487         Implement the Named Return Value optimization.
8488         * cp-tree.h (struct cp_language_function): Add x_return_value.
8489         (current_function_return_value): Now a macro.
8490         * decl.c: Don't define it.
8491         (define_label, finish_case_label): Don't clear it.
8492         (init_decl_processing): Don't register it with GC.
8493         * semantics.c (genrtl_finish_function): Don't check it for
8494         no_return_label.  Copy the RTL from the return value to
8495         current_function_return_value and walk, calling...
8496         (nullify_returns_r): ...this new fn.
8497         * typeck.c (check_return_expr): Set current_function_return_value.
8498
8499 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
8500
8501         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
8502         sharing a ctor vtable with.  Merge code for cases 1 and 2.
8503         (binfo_ctor_vtable): New fn.
8504         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
8505
8506 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
8507
8508         * class.c (dfs_find_final_overrider): Fix logic.
8509
8510         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
8511         virtual thunk instead of non-virtual.
8512         (get_matching_virtual): Uncomment.
8513
8514         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
8515         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
8516         PARM, not ARG.
8517
8518 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
8519
8520         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
8521         we've not emerged from the hierarchy of RTTI_BINFO on reaching
8522         a non-virtual base.
8523
8524 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
8525
8526         * NEWS: Update release number.
8527
8528 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
8529
8530         PR c++/3130, c++/3131, c++/3132
8531         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
8532         * class.c (force_canonical_binfo_r): Move
8533         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
8534         virtual bases unless they're primary and what they're primary
8535         too has been moved.
8536         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
8537         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
8538         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
8539         derived binfo.
8540         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
8541         (layout_nonempty_base_or_field): Add most derived type
8542         parameter. Adjust.
8543         (layout_empty_base): Likewise.
8544         (build_base_field): Likewise.
8545         (build_base_fields): Likewise.
8546         (propagate_binfo_offsets): Add most derived type
8547         parameter. Skip non canonical virtual bases too.
8548         (dfs_set_offset_for_unshared_vbases): Don't skip primary
8549         bases. Do skip canonical bases.
8550         (layout_virtual_bases): Adjust.
8551         (layout_class_type): Adjust.
8552         (dfs_get_primary_binfo): Build list of virtual primary base
8553         candidates.
8554         (get_primary_binfo): Check that the shared virtual primary
8555         base candidate was found first.
8556         (accumulate_vtbl_inits): Don't do anything for non-vptr
8557         containing binfos. For case 1 primary virtual bases, keep
8558         checking that we've not emerged from the hierarchy of RTTI_BINFO.
8559
8560 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
8561
8562         PR c++/3089
8563         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
8564         hierarchy looking for primary bases for a ctor
8565         vtable. Recursively call oneself, if we meet our primary via
8566         this route and haven't met it yet via inheritance graph order.
8567
8568 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
8569
8570         * lang-options.h: Emit documentation for -fno-honor-std, not
8571         -fhonor-std.
8572
8573 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
8574
8575         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
8576         Don't clobber delta.
8577         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
8578
8579 2001-06-10  Mark Mitchell <mark@codesourcery.com>
8580             Gabriel Dos Reis  <gdr@codesourcery.com>
8581
8582         * Make-lang.in (cp/call.o): Depend on diagnostic.h
8583         (cp/typeck.o): Depend on diagnostic.h
8584         (cp/typeck2.o): Depend on diagnostic.h
8585         (cp/repo.o): Depend on dignostic.h
8586         * typeck.c: #include diagnostic.h
8587         (convert_for_initialization): Remove extern declaration for
8588         warningcount and errorcount.
8589
8590         * call.c: #include diagnostic.h
8591         (convert_like_real): Remove extern declaration for warnincount and
8592         errorcount.
8593
8594         * repo.c: #include diagnostic.h
8595         * typeck2.c: #include diagnostic.h
8596
8597 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8598
8599         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
8600         in previous change.
8601
8602 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8603
8604         PR c++/2929
8605         * friend.c (do_friend): Use push_decl_namespace for classes at
8606         namespace scope.
8607
8608 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8609             Jason Merrill <jason_merrill@redhat.com>
8610
8611         PR c++/3061
8612         * class.c (build_secondary_vtable): Use assert, rather than an error
8613         message.
8614         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
8615         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
8616         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
8617         Don't set BINFO_VTABLE for a primary virtual base.
8618
8619 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
8620
8621         * decl.c (duplicate_decls): Update source position information
8622         when a template function is defined.
8623
8624 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
8625
8626         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
8627
8628 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
8629
8630         PR c++/2914
8631         * decl.c (pushtag): Don't push into a complete type's scope.
8632
8633 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
8634
8635         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
8636         (struct lang_decl_flags): Lose generate_with_vtable_p.
8637         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
8638         * class.c (copy_virtuals): Adjust.
8639         * decl2.c (mark_vtable_entries): Adjust.
8640         * method.c (make_thunk, build_vtable_entry): Adjust.
8641         * class.c (update_vtable_entry_for_fn): Only look as far as the
8642         first defining class.
8643         (build_vtbl_initializer): Put nothing in the slot for a function only
8644         defined in a lost primary virtual base.
8645         (add_vcall_offset_vtbl_entries_1): Use the same code for
8646         the lost primary case and the normal case.
8647         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
8648         (get_vfield_offset, get_derived_offset): Lose.
8649         (dfs_find_final_overrider): Use look_for_overrides_here.
8650         (get_matching_virtual): New fn.
8651         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
8652         not BV_VCALL_INDEX.
8653         * search.c (look_for_overrides_here): Split out from...
8654         (look_for_overrides_r): Here.
8655
8656         * class.c (find_final_overrider): Return error_mark_node on error.
8657
8658         * decl2.c (key_method): #if 0 accidental change.
8659
8660 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8661
8662         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
8663         (build_over_call): Likewise.
8664         * decl.c (grokparms): Likewise.
8665         * pt.c (tsubst_decl): Likewise.
8666         * typeck.c (convert_arguments): Likewise.
8667
8668 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
8669
8670         * semantics.c (begin_class_definition): Robustify.
8671
8672         * pt.c (instantiate_decl): Tell the repository code about the
8673         clones, not the cloned functions.
8674         * repo.c (repo_template_used): Explicitly instantiate the cloned
8675         function, not the clones.
8676
8677 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8678
8679         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
8680         ICS_BAD_FLAG on created conversion.
8681         (compare_ics): Break out rank.
8682
8683 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8684
8685         * decl.c (xref_tag): Remove extraneous %s on dependent name
8686         lookup warning.
8687
8688 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8689
8690         * class.c (layout_vtable_decl): Fix off by one error on
8691         build_index_type.
8692         (build_vtt): Likewise.
8693         (build_ctor_vtbl_group): Likewise.
8694
8695 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8696
8697         * class.c (maybe_indent_hierarchy): New function.
8698         (dump_class_hierarchy_r): Add flags. Dump extra binfo
8699         information, if enabled. Use maybe_indent_hierarchy. Adjust
8700         output format.
8701         (dump_class_hierarchy): Adjust prototype. Adjust output format.
8702         (dump_array, dump_vtable, dump_vtt): New functions.
8703         (finish_struct_1): Adjust hierarchy dumping.
8704         (initialize_vtable): Call dump_vtable.
8705         (build_vtt): Call dump_vtt.
8706         (build_ctor_vtbl_group): Call dump_vtable.
8707         * decl2.c (flag_dump_class_layout): Remove.
8708         (cxx_decode_option): Remove dump translation unit
8709         and dump class hierarchy check. Call dump_switch_p.
8710         (finish_file): Adjust dumping.
8711         (dump.c): Only dump base classes if not TDF_SLIM.
8712         Only dump namespace members if not TDF_SLIM.
8713         * optimize.c (dump_function): New function.
8714         (optimize_function): Call dump_function.
8715         * semantics.c (expand_body): Use dump_enabled_p.
8716
8717 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
8718
8719         PR g++/2936
8720         Part missed from first commit
8721         * decl2.c (finish_anon_union): Copy context.
8722
8723 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
8724
8725         PR g++/2936
8726         * optimize.c (remap_decl): Remap anonymous aggregate members too.
8727
8728 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
8729
8730         PR g++/2823
8731         * semantics.c (expand_body): Don't optimize thunks.
8732
8733 2001-05-25  Sam TH  <sam@uchicago.edu>
8734
8735         * cp-tree.h lex.h: Fix header include guards.
8736
8737 2001-05-25  Mark Mitchell <mark@codesourcery.com>
8738
8739         * decl.c (init_decl_processing): Tweak.
8740
8741 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
8742
8743         * decl.c (duplicate_decls): Tidy.
8744         (init_decl_processing): Always set flag_no_builtin.
8745
8746 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
8747
8748         PR c++/2184
8749         * decl2.c (do_local_using_decl): Push the decls, even in a
8750         template.
8751
8752 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
8753
8754         * optimize.c (initialize_inlined_parameters): Don't set
8755         TREE_READONLY for a VAR_DECL taking the place of an inlined
8756         PARM_DECL.
8757
8758 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
8759
8760         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
8761         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
8762         attribute.
8763
8764 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
8765
8766         * parse.y: Refer to compound literals as such, not as
8767         constructor-expressions.
8768
8769 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
8770
8771         * call.c (build_op_delete_call): Ignore exception-specifications
8772         when looking for matching delete operators.
8773         * init.c (build_new_1): Compute whether or not the allocation
8774         function used is a placement allocation function or not, and
8775         communicate this information to build_op_delete_call.
8776
8777 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
8778
8779         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
8780         (build_vtbl_ref): Adjust.
8781         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
8782         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
8783         Re-add vtable-gc.
8784         (unsupported_options): Correspondingly.
8785
8786         * decl2.c (maybe_make_one_only): Check flag_weak, not
8787         supports_one_only().
8788
8789         * cp-tree.def (START_CATCH_STMT): Lose.
8790         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
8791         * tree.c (cp_statement_code_p): Don't case it.
8792         * semantics.c (cp_expand_stmt): Likewise.
8793         * cp-tree.h (START_CATCH_TYPE): Lose.
8794         (HANDLER_TYPE): New.
8795         * except.c (expand_start_catch_block): Don't start any blocks.
8796         Return the type.
8797         (expand_end_catch_block): Don't end any blocks.
8798         * parse.y (handler): Don't pass anything from finish_handler_parms
8799         to finish_handler.
8800         * pt.c (tsubst_expr): Likewise.
8801         * semantics.c (begin_handler): Call note_level_for_catch here.
8802         (finish_handler_parms): Don't return anything.
8803         (genrtl_catch_block, begin_catch_block): Lose.
8804         (genrtl_handler): Call expand_start_catch here.
8805
8806 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
8807
8808         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
8809         (get_vtable_decl, build_vtt): Not here.
8810
8811 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
8812
8813         PR c++/2781
8814         * optimize.c (update_cloned_parm): Copy addressability and other
8815         flags.
8816
8817 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8818
8819         * pt.c (determine_specialization): Ignore artificial functions.
8820
8821 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
8822
8823         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
8824         (C_RID_CODE): Remove.
8825         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
8826         (init_parse): Don't do it here.
8827
8828 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
8829
8830         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
8831         function declaration to avoid stripping the symbol's attributes.
8832
8833 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
8834
8835         * decl.c (pushdecl): Adjust error string.
8836         (xref_tag): Adjust friend class injection warning. Remove the
8837         inherited name from the class shadowed scope.
8838
8839 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
8840
8841         * except.c (cp_protect_cleanup_actions): New function.
8842         (init_exception_processing): Don't set protect_cleanup_actions
8843         here.  Do set lang_protect_cleanup_actions.
8844
8845 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
8846
8847         * spew.c (read_token): Call yyerror on all unexpected tokens.
8848
8849 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
8850
8851         * init.c (member_init_ok_or_else): Take a tree rather than
8852         string for name.
8853         (expand_member_init): Adjust.
8854
8855 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
8856
8857         * decl.c (duplicate_decls): Suppress warning about duplicate
8858         decls if the first decl is a friend.
8859
8860 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
8861
8862         * except.c (choose_personality_routine): Export.  Add
8863         explanatory comment.  Take an enum languages, not a boolean.
8864         (initialize_handler_parm): Adjust to match.
8865         * cp-tree.h: Prototype choose_personality_routine.
8866         * lex.c (handle_pragma_java_exceptions): New function.
8867         (init_cp_pragma): Register #pragma GCC java_exceptions.
8868
8869 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8870
8871         * method.c (build_mangled_C99_name): Remove unused prototype.
8872
8873 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
8874
8875         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
8876         * typeck.c (get_member_function_from_ptrfunc,
8877         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
8878         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
8879
8880         Reverted Geoff Keating's 2001-05-03's patch.
8881
8882 2001-05-11  Ira Ruben   <ira@apple.com>
8883
8884         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
8885
8886 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
8887
8888         * cp-tree.h (finish_label_expr, lookup_label): Delete.
8889         * parse.y: Update for '&&'; don't issue warning here.
8890         * semantics.c (finish_label_expr): Delete.
8891
8892 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
8893
8894         * splay-tree.h (splay_tree_max): New function.
8895         (splay_tree_min): Likewise.
8896
8897 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
8898
8899         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
8900         (pfn_vflag_identifier): Define.
8901         Update comment about layout of pointer functions.
8902         (build_ptrmemfunc1): Update prototype.
8903         (expand_ptrmemfunc_cst): Update prototype.
8904         * decl.c (initialize_predefined_identifiers): Initialize
8905         pfn_vflag_identifier.
8906         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
8907         an extra field to the type.
8908         * expr.c (cplus_expand_constant): Pass 'flag' between
8909         expand_ptrmemfunc_cst and build_ptrmemfunc1.
8910         * typeck.c (get_member_function_from_ptrfunc): When
8911         FUNCTION_BOUNDARY < 16, look at additional field to determine
8912         if a pointer-to-member is a real pointer or a vtable offset.
8913         (build_ptrmemfunc1): Add new parameter to contain extra field.
8914         (build_ptrmemfunc): Pass the extra field around.
8915         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
8916         (pfn_from_ptrmemfunc): Ignore the extra field.
8917
8918 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
8919
8920         * cp-tree.h (flag_inline_trees): Update documentation.
8921         * decl.c (init_decl_processing): Adjust handling of
8922         flag_inline_functions and flag_inline_trees to support -O3.
8923         (grokfndecl): Set DECL_INLINE on all functions if that's what
8924         the user requested.
8925         (save_function_data): Clear DECL_INLINE in
8926         current_function_cannot_inline is non-NULL.
8927         * decl2.c (flag_inline_trees): Update documentation.
8928
8929 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
8930
8931         * dump.c (cp_dump_tree, USING_STMT case): New case.
8932         * tree.c (cp_statement_code_p): Add USING_STMT.
8933         * decl2.c (do_using_directive): Add the using directive statement.
8934
8935         * tree.c (walk_tree): Reformat an if block.
8936
8937 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
8938
8939         * decl.c (compute_array_index_type): Don't try to do anything with
8940         the indices when processing a template.
8941
8942 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8943
8944         * call.c: NULL_PTR -> NULL.
8945         * class.c: Likewise.
8946         * cvt.c: Likewise.
8947         * decl.c: Likewise.
8948         * decl2.c: Likewise.
8949         * except.c: Likewise.
8950         * init.c: Likewise.
8951         * rtti.c: Likewise.
8952         * search.c: Likewise.
8953         * tree.c: Likewise.
8954         * typeck.c: Likewise.
8955         * typeck2.c: Likewise.
8956
8957 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
8958
8959         * decl2.c (do_using_directive): Revert previous patch.
8960
8961 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8962
8963         * cp-tree.def (USING_STMT): New statement node.
8964         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
8965         * decl2.c (do_using_directive): Add USING_STMT to statement
8966         tree. Don't emit errors when processing template decl.
8967         * pt.c (tsubst_expr, USING_STMT case): New case.
8968         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
8969
8970 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8971
8972         * call.c (build_new_op): Convert args from reference here.
8973         (build_conditional_expr): Don't convert here.
8974
8975 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8976
8977         * spew.c (last_token_id): New static variable.
8978         (read_token): Set it here.
8979         (yyerror): Use it here.
8980
8981 2001-04-30  Richard Henderson  <rth@redhat.com>
8982
8983         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
8984         * decl.c: Likewise.
8985
8986 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
8987
8988         * gxxint.texi: Remove.
8989         * Make-lang.in: Remove all traces of gxxint.texi.
8990
8991 2001-04-30  Mark P Mitchell  <mark@codesourcery.com>
8992
8993         * decl2.c (start_static_initialization_or_destruction): Correct
8994         logic to handle the -fno-use-cxa-atexit case.
8995
8996 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
8997
8998         * optimize.c (update_cloned_parm): New function.
8999         (maybe_clone_body): Use it.  Update the `this' parameter too.
9000
9001 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
9002
9003         * decl2.c (unsupported_options): Add new-abi.
9004         * lang-options.h: Remove no longer supported options.
9005
9006 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
9007
9008         * except.c (can_convert_eh): Don't check template parms,
9009         typename types etc.
9010
9011 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
9012
9013         * optimize.c (maybe_clone_body): Copy parameter names and locations.
9014
9015 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
9016
9017         * cp-tree.h (adjust_clone_args): Prototype new function.
9018         * class.c (adjust_clone_args): New function.
9019         * decl.c (start_function): Call it for in charge ctors.
9020
9021 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
9022
9023         * method.c (use_thunk): Make sure that thunks really are emitted
9024         when requested.
9025
9026 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
9027
9028         * mangle.c (write_chars): New macro.
9029         (hwint_to_ascii): New function
9030         (write_number): Use it.
9031         (write_integer_cst): Deal with really big numbers.
9032
9033 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
9034
9035         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
9036         the clone.
9037
9038 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
9039
9040         * decl.c (grokdeclarator): Set context of namespace scope
9041         TYPE_DECLS.
9042
9043 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
9044
9045         * cp/optimize.c: Include hashtab.h.
9046         (struct inline_data): Add tree_pruner.
9047         (expand_call_inline, expand_calls_inline): Use it when calling
9048         walk_tree.
9049         (optimize_function): Initialize and free tree_pruner.
9050
9051 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
9052
9053         Lazy __FUNCTION__ generation.
9054         * cp-tree.def (FUNCTION_NAME): Remove.
9055         * cp-tree.h (function_name_declared_p): Remove.
9056         (cp_fname_init): Prototype.
9057         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
9058         don't call declare_function_name. Call start_fname_decls.
9059         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
9060         clobber the line number.
9061         (cp_fname_init): New function.
9062         (start_function): Call start_fname_decls.
9063         (finish_function): Call finish_fname_decls.
9064         * lex.c (reswords): Add slots for __FUNCTION__ et al.
9065         (rid_to_yy): Add mappings for __FUNCTION__ et al.
9066         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
9067         * parse.y (VAR_FUNC_NAME): New token.
9068         (primary): Add VAR_FUNC_NAME.
9069         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
9070         generation.
9071         (tsubst, FUNCTION_NAME case): Remove.
9072         (tsubst_copy, FUNCTION_NAME case): Remove.
9073         (tsubst_expr, DECL_STMT case): Be careful with a
9074         DECL_PRETTY_FUNCTION_P.
9075         (instantiate_decl): Remove function_name_declared_p.
9076         * semantics.c (begin_compound_statement): Don't call
9077         declare_function_name here.
9078         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
9079         (finish_translation_unit): Call finish_fname_decls.
9080         (expand_body): Remove function_name_declared_p.
9081         * typeck2.c (digest_init): Allow any ERROR_MARK.
9082
9083 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
9084
9085         * pt.c (tsubst_decl): Use VOID_TYPE_P.
9086         * semantics.c: Fix some typos.
9087
9088 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
9089
9090         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
9091
9092 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9093
9094         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
9095
9096 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
9097
9098         * except.c (build_throw): Wrap the initialization of the exception
9099         object in a MUST_NOT_THROW_EXPR.
9100         (do_free_exception): #if 0.
9101
9102 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
9103
9104         * cp-tree.h (finish_enum): Change prototype.
9105         * decl.c (finish_enum): Reorganize.
9106         * parse.y (structsp): Adjust calls to finish_enum.
9107
9108 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
9109
9110         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
9111         't' case.
9112
9113 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
9114
9115         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
9116         (layout_empty_base): Return at end flag.
9117         (build_base_field): Likewise.
9118         (build_base_fields): Likewise.
9119         (layout_virtual_bases): Don't add 1 to eoc value.
9120         (end_of_class): Use full size for empty bases.
9121         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
9122         empty bases. Don't add 1 to eoc value. Only add trailing padding
9123         if we're an empty class with no empty bases.
9124         (dump_class_hierarchy): Dump size and alignment.
9125
9126 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
9127
9128         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
9129         ICS_BAD_FLAG.
9130
9131 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
9132
9133         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
9134         is found, look first if name does not match the structure name.
9135
9136 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
9137
9138         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
9139         set.
9140         (SET_DECL_LANGUAGE): New macro.
9141         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
9142         (pushdecl): Likewise.
9143         (build_library_fn_1): Likewise.
9144         (build_cp_library_fn): Likewise.
9145         (grokfndecl): Likewise.
9146         (grokvardecl): Mark `extern "C"' variables as having C linkage.
9147         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
9148         * lex.c (retrofit_lang_decl): Likewise.
9149         * mangle.c (mangle_decl_string): Don't mangle the names of
9150         variables declared with C language linkage.
9151         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
9152
9153 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
9154
9155         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
9156         flag_access_control from uninitialized storage.
9157
9158 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
9159
9160         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
9161         * mangle.c (write_pointer_to_member_type): Fix mangling of
9162         pointers to cv-qualified member function types.
9163
9164         * init.c (build_delete): Create a SAVE_EXPR for the address if
9165         we're going to use it more than once.
9166
9167 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
9168
9169         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
9170         (expand_ptremfunc_cst): Change prototype.
9171         (delta2_from_ptrmemfunc): Remove.
9172         * expr.c (cplus_expand_constant): Adjust call to
9173         expand_ptrmemfunc_cst.
9174         * typeck.c (build_ptrmemfunc1): Simplify.
9175         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
9176         results in a constant.
9177         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
9178         (delta2_from_ptrmemfunc): Remove.
9179         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
9180
9181 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
9182
9183         * cp-tree.h (decl_namespace_list): New macro.
9184         (struct saved_scope): Add decl_ns_list.
9185         * decl.c (mark_saved_scope): Mark it.
9186         * decl2.c: Lose static decl_namespace_list.
9187         (init_decl2): Don't save it.
9188
9189 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9190
9191         * cp-tree.h (warn_return_type, yylex): Delete redundant
9192         declarations.
9193
9194         * decl.c (current_class_depth, global_namespace): Likewise.
9195
9196         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
9197
9198         * repo.c (flag_use_repository): Likewise.
9199
9200 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9201
9202         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
9203         set_block, pushdecl, getdecls, gettags, init_decl_processing,
9204         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
9205         lvalue_or_else, print_lang_statistics, comp_target_types,
9206         unsigned_type, signed_type, signed_or_unsigned_type,
9207         build_function_call, mark_addressable, incomplete_type_error):
9208         Delete redundant declarations.
9209
9210 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
9211
9212         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
9213         (TYPE_ANONYMOUS_P): New macro.
9214         (TAGGED_TYPE_P): New macro.
9215         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
9216         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
9217         * tree.c (no_linkage_helper): Likewise.
9218         * semantics.c (begin_class_definition): Likewise.
9219         * pt.c (convert_template_argument): Likewise.
9220         * lex.c (check_for_missing_semicolon): Likewise.
9221
9222 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
9223
9224         * class.c (dfs_unshared_virtual_bases): New function.
9225         (mark_primary_bases): Call it.
9226         (check_bases): Ignore virtual bases when determining
9227         nearly-emptiness.
9228
9229 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
9230
9231         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
9232
9233 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
9234
9235         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
9236         cloned function to the clone.
9237
9238 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9239
9240         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
9241
9242         * semantics.c: Include expr.h.
9243
9244 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
9245
9246         * method.c (implicitly_declare_fn): Commonize code for copy ctor
9247         and assignment op. Set TREE_USED for parameter.
9248
9249 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
9250
9251         * class.c (find_final_overrider_data): Add `candidates'.
9252         (dfs_find_final_overrider): Don't issue error messages
9253         prematurely.
9254         (find_final_overrider): Issue error messages here.
9255         (build_base_field): Don't warn about amgibuous direct bases here.
9256         (warn_about_ambiguous_direct_bases): New function.
9257         (layout_class_type): Use it.
9258
9259 2001-04-10  Richard Henderson  <rth@redhat.com>
9260
9261         * typeck.c (build_array_ref): Push the array reference inside
9262         COMPOUND_EXPR and COND_EXPR.
9263
9264 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
9265
9266         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
9267         * decl.c (duplicate_decls): Adjust accordingly.
9268         (maybe_commonize_var): Likewise.
9269         (grokfndecl): Likewise.
9270         (start_function): Likewise.
9271         (start_method): Likewise.
9272         * decl2.c (key_method): Likewise.
9273         (import_export_decl): Likewise.
9274         * method.c (implicitly_declare_fn): Likewise.
9275         * optimize.c (maybe_clone_body): Likewise.
9276
9277 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
9278
9279         * lang-specs.h: Add __DEPRECATED.
9280
9281 2001-04-05  J"orn Rennecke <amylaar@redhat.com>
9282
9283         * search.c (get_dynamic_cast_base_type): When building a new
9284         constant, set its type to ssizetype.
9285
9286 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
9287
9288         * optimize.c (expand_call_inline): Only add newly inlined statements
9289         into inlined_stmts.
9290
9291 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
9292
9293         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
9294         (OPERATOR_FORMAT): Likewise.
9295         (OPERATOR_TYPENAME_FORMAT): Likewise.
9296         * operators.def: Remove old name-mangling information.
9297         * decl.c (grok_op_properties): Adjust accordingly.
9298         * lex.c (init_operators): Likewise.
9299         * rtti.c (get_tinfo_decl): Issue error messages about types that
9300         have variable size.
9301
9302 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
9303
9304         * decl2.c (import_export_decl): Don't call import_export_class
9305         when processing an inline member function.
9306         * semantics.c (expand_body): Call import_export_decl before
9307         emitting inline functions.
9308
9309 2001-03-28  Richard Henderson  <rth@redhat.com>
9310
9311         IA-64 ABI Exception Handling:
9312         * cp-tree.def (EH_SPEC_BLOCK): New.
9313         (MUST_NOT_THROW_EXPR): New.
9314         * cp-tree.h: Update changed function declarations.
9315         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
9316         (CPTI_CALL_UNEXPECTED): New.
9317         (struct cp_language_function): Rename x_eh_spec_try_block
9318         to x_eh_spec_block.
9319         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
9320         * decl.c (current_binding_level): If no current function
9321         bindings, revert to scope_chain.
9322         (initialize_predefined_identifiers): Remove __cp_push_exception.
9323         (store_parm_decls): Use begin_eh_spec_block.
9324         (finish_function): Use finish_eh_spec_block.
9325         (mark_lang_function): Update for name changes.
9326         * decl2.c (finish_file): No mark_all_runtime_matches.
9327         * dump.c (cp_dump_tree): Handle new tree codes.
9328         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
9329         * except.c (catch_language_init, catch_language): Remove.
9330         (init_exception_processing): Don't set language code.
9331         Initialize call_unexpected_node, protect_cleanup_actions,
9332         eh_personality_libfunc, lang_eh_runtime_type.
9333         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
9334         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
9335         (prepare_eh_type): Split out type canonicalizations ...
9336         (build_eh_type_type): ... from here.
9337         (build_eh_type_type_ref): Remove.
9338         (mark_all_runtime_matches): Remove.
9339         (build_exc_ptr): New.
9340         (do_begin_catch, do_end_catch): New.
9341         (do_pop_exception): Remove.
9342         (build_terminate_handler): Remove.
9343         (choose_personality_routine): Split out language choice from ...
9344         (initialize_handler_parm): ... here.
9345         Use MUST_NOT_THROW_EXPR.
9346         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
9347         exception object handling.
9348         (expand_start_eh_spec, expand_end_eh_spec): Remove.
9349         (expand_exception_blocks, alloc_eh_object): Remove.
9350         (begin_eh_spec_block, finish_eh_spec_block): New.
9351         (do_allocate_exception, do_free_exception): New.
9352         (expand_throw): Merge into ...
9353         (build_throw): ... here.  Update for abi.
9354         * expr.c (cplus_expand_expr): No expand_internal_throw.
9355         Handle MUST_NOT_THROW_EXPR.
9356         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
9357         * semantics.c (*) Update for except.h name changes.
9358         (genrtl_try_block): No protect_with_terminate.
9359         (genrtl_eh_spec_block): New.
9360         (genrtl_handler): Don't emit the goto here.
9361         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
9362         (genrtl_finish_function): Don't expand_exception_blocks.
9363         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
9364
9365 2001-03-28  Richard Henderson  <rth@redhat.com>
9366
9367         * decl.c (struct named_label_list): Rename eh_region to
9368         in_try_scope, add in_catch_scope.
9369         (struct binding_level): Rename eh_region to is_try_scope,
9370         add is_catch_scope.
9371         (note_level_for_try): Rename from note_level_for_eh.
9372         (note_level_for_catch): New.
9373         (poplevel): Copy both is_try_scope and is_catch_scope to
9374         the named_label_list struct.
9375         (check_previous_goto_1): Don't check for catch block via
9376         DECL_ARTIFICIAL; use in_try_scope instead.
9377         (check_goto): Likewise.
9378         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
9379         * except.c (expand_start_catch_block): Call note_level_for_catch.
9380         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
9381
9382 2001-03-27  Richard Henderson  <rth@redhat.com>
9383
9384         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
9385         exceptions_via_longjmp.
9386
9387 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
9388
9389         * pt.c (check_default_tmpl_args):  Make error messages clearer.
9390
9391 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
9392
9393         * error.c:  Also undefine 'A' macro used for cp_printers definition.
9394
9395 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9396
9397         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
9398
9399 2001-03-26  Mike Yang <yang@research.att.com>
9400             Mark Mitchell  <mark@codesourcery.com>
9401
9402         * dump.c (dump_access): New function.
9403         (cp_dump_tree): Use it.  Dump basetype information for class
9404         types.
9405
9406 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
9407
9408         * Makefile.in (optimize.o): Depend on params.h.
9409         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
9410         (init_decl_processing): Set flag_no_inline when doing
9411         inlining-on-trees.
9412         * optimize.c: Include params.h.
9413         (struct inline_data): Improve documentation of FNS.  Add
9414         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
9415         (INSNS_PER_STMT): New macro.
9416         (remap_block): Use CLONING_P.
9417         (inlinable_function_p): Don't inline big functions.
9418         (expand_call_inline): Keep track of how much inlining we've done.
9419         (optimize_function): Set FIRST_INLINED_FN.
9420         (maybe_clone_body): Set CLONING_P.
9421         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
9422         tree nodes.
9423         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
9424         rest_of_compilation.  Clear DECL_RTL for local variables
9425         afterwards.
9426         (clear_decl_rtl): New function.
9427
9428 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
9429
9430         Implement DR 209
9431         * cp-tree.h (skip_type_access_control,
9432         reset_type_access_control): Prototype.
9433         * decl.c (grokdeclarator): Access of friends is not checked.
9434         * parse.y (component_decl_list): Reset type access control.
9435         * semantics.c (decl_type_access_control): Clear
9436         current_type_lookups.
9437         (save_type_access_control): Don't save if not deferring.
9438         (skip_type_access_control, reset_type_access_control): New
9439         functions.
9440         (begin_class_definition): Do type access control for basetypes.
9441         Start deferred access control.
9442         (finish_class_definition): Resume immediate access control if
9443         this is a local class.
9444
9445 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9446
9447         * class.c (add_method): Use memcpy/memmove, not bcopy.
9448
9449         * decl.c (duplicate_decls): Likewise.
9450
9451 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
9452
9453         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
9454         not `_'.
9455
9456 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
9457
9458         * decl.c (local_names): Define.
9459         (push_local_name): New.
9460         (grok_reference_init): Return init if initializing static reference
9461         variable with non-constant instead of emitting it.
9462         Move expand_static_init call to cp_finish_decl.
9463         (layout_var_decl): Call push_local_name.
9464         (maybe_commonize_var): Allow inlining functions even if they have
9465         static local variables, use comdat_linkage for them if flag_weak.
9466         (check_initializer): Call obscure_complex_init if
9467         grok_reference_init returned nonzero.
9468         (save_function_data): Clear x_local_names.
9469         (pop_cp_function_context): Free x_local_names.
9470         (mark_inlined_fns): Remove.
9471         (mark_lang_function): Mark x_local_names.
9472         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
9473         Mark inlined_fns as tree, remove call to mark_inlined_fns.
9474         * class.c (alter_access): Ensure DECL_ACCESS is never set if
9475         DECL_DISCRIMINATOR_P.
9476         * cp-tree.h (cp_language_function): Add x_local_names.
9477         (lang_decl_flags): Add discriminator into u2.
9478         (lang_decl_inlined_fns): Remove.
9479         (lang_decl): inlined_fns is now a TREE_VEC.
9480         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
9481         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
9482         TREE_VEC, not a custom structure.
9483         (optimize_function): Likewise.
9484         * mangle.c (discriminator_for_local_entity): Discriminate among
9485         VAR_DECL local entities.
9486         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
9487         is not valid.
9488
9489 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
9490
9491         Add support for Java interface method calls.
9492         * cp-tree.h (struct lang_type): Add java_interface flag.
9493         (TYPE_JAVA_INTERFACE): New macro.
9494         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
9495         by setting TYPE_JAVA_INTERFACE.
9496         * call.c (java_iface_lookup_fn): New static.
9497         (build_over_call): If calling a method declared in a
9498         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
9499         expression which resolves the function address.
9500         (build_java_interface_fn_ref): New function.
9501
9502 2001-03-22  Richard Henderson  <rth@redhat.com>
9503
9504         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
9505         * except.c: Don't include it.
9506
9507 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
9508             based on an idea from Joe Buck <jbuck@synopsys.com>
9509
9510         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
9511         New nonterminals.
9512         (data_def, component_decl): Add reductions to bad_decl.
9513
9514 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
9515
9516         * method.c (do_build_assign_ref): Don't use build_modify_expr for
9517         anonymous aggregates, since they don't have assignment operator
9518         method.
9519         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
9520         assignment operators for anonymous structure fields.
9521
9522 2001-03-21  Jason Merrill  <jason@redhat.com>
9523
9524         * pt.c (instantiate_decl): Abort if we see a member constant
9525         instantiation that doesn't already have its initializer.
9526         Downgrade explicit instantiation without definition to pedwarn.
9527
9528         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
9529         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
9530         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
9531
9532         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
9533         (pending_vtables): Remove.
9534         * decl2.c (pending_vtables): Remove.
9535         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
9536         CLASSTYPE_VTABLE_NEEDS_WRITING.
9537         (import_export_class): Likewise.
9538         (init_decl2): Don't mark pending_vtables.
9539         * lex.c (handle_pragma_vtable): Just sorry.
9540         * pt.c (instantiate_class_template): Don't mess with
9541         CLASSTYPE_VTABLE_NEEDS_WRITING.
9542         (mark_class_instantiated): Likewise.
9543         * ptree.c (print_lang_type): Don't print it.
9544         * semantics.c (begin_class_definition): Don't set it.
9545
9546         * pt.c (template_tail): Replace with last_pending_template.
9547         (maybe_templates, maybe_template_tail): Remove.
9548         (add_pending_template): Adjust.
9549         (instantiate_pending_templates): Adjust.
9550
9551         * cp-tree.h (struct saved_scope): Remove lang_stack field.
9552         (current_lang_stack): Remove.
9553         * decl.c (maybe_push_to_top_level): Don't initialize it.
9554         (duplicate_decls): Use current_lang_depth.
9555         (xref_basetypes): Likewise.
9556         * class.c (current_lang_depth): New fn.
9557         (push_lang_context): Use more varray functionality.
9558         (pop_lang_context): Likewise.
9559
9560         * error.c (GLOBAL_THING): Always use '__'.
9561
9562 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
9563
9564         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
9565
9566         * mangle.c (mangle_decl_string): Mangle the names of overloaded
9567         operators, even when they have `extern "C"' linkage.
9568
9569 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
9570
9571         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
9572         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9573         where it's not necessary.
9574         (add_method): Remove optimization involving comparison of
9575         DECL_ASSEMBLER_NAME.
9576         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
9577         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9578         where it's not necessary.
9579         (check_methods): Likewise.
9580         (build_clone): Likewise.
9581         (built_vtt): Likewise.
9582         * cp-tree.h (DECL_NEEDED_P): Likewise.
9583         * decl.c (pushtag): Likewise.
9584         (duplicate_decls): Likewise.
9585         (pushdecl): Likewise.
9586         (builtin_function): Likewise.
9587         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
9588         (build_cp_library_fn): Likewise.
9589         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
9590         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9591         where it's not necessary.
9592         (make_rtl_for_nonlocal_decl): Likewise.
9593         (cp_finish_decl): Likewise.
9594         (grokfndecl): Likewise.
9595         (grokvardecl): Likewise.
9596         (grokdeclarator): Likewise.
9597         (start_function): Likewise.
9598         (cp_missing_return_ok_p): Likewise.
9599         * decl2.c (grokclassfn): Likewise.
9600         (check_classfn): Likewise.
9601         (finish_static_data_member_decl): Likewise.
9602         (grokfield): Likewise.
9603         * error.c (GLOBAL_IORD_P): Remove.
9604         (dump_global_iord): Improve output.
9605         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
9606         * except.c (nothrow_libfn_p): Summarily reject any function not in
9607         namespace-scope.
9608         * init.c (build_java_class_ref): Don't explicitly set
9609         DECL_ASSEMBLER_NAME after calling mangle_decl.
9610         * mangle.c (mangle_decl_string): Handle extern "C" functions.
9611         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
9612         * method.c (set_mangled_name_for_decl): Don't explicitly set
9613         DECL_ASSEMBLER_NAME after calling mangle_decl.
9614         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
9615         IDENTIFIER_GLOBAL_VALUE for the thunk.
9616         * pt.c (set_mangled_name_for_template_decl): Remove.
9617         (check_explicit_specialization): Don't use it.
9618         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
9619         (tsubst_friend_function): Likewise.
9620         (tsubst_decl): Likewise.
9621         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
9622         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
9623         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9624         where it's not necessary.
9625         (tinfo_base_init): Likewise.
9626         (create_real_tinfo_var): Likewise.
9627         * search.c (looup_field_1): Likewise.
9628         * semantics.c (finish_named_return_value): Likewise.
9629         * tree.c (init_tree): Set lang_set_decl_assembler_name.
9630
9631 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
9632
9633         Correct semantics restrictions checking in throw-expression.
9634         * except.c (is_admissible_throw_operand): New function.
9635         (build_throw): Use it.
9636
9637 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
9638
9639         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
9640         and its ilk.
9641
9642 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
9643
9644         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9645         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
9646         * decl.c (duplicate_decls): Likewise.
9647         (builtin_function): Likewise.
9648         (build_library_fn): Likewise.
9649         (build_cp_library_fn): Likewise.
9650         (check_initializer): Likewise.
9651         (cp_finish_decl): Likewise.
9652         * decl2.c (grokfield): Likewise.
9653         (grok_function_init): Remove #if 0'd code.
9654         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9655         * friend.c (do_friend): Likewise.
9656         * init.c (get_temp_regvar): Likewise.
9657         * method.c (make_thunk): Likewise.
9658         * pt.c (tsubst_friend_function): Likewise.
9659         (tsubst_decl): Likewise.
9660         (regenerate_decl_from_template): Likewise.
9661         * semantics.c (genrtl_named_return_value): Likewise.
9662         (expand_body): Likewise.
9663         (genrtl_finish_function): Likewise.
9664         * tree.c (cp_tree_equal): Likewise.
9665
9666 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
9667
9668         * call.c (convert_like_real): Add extra semantics to INNER
9669         parameter. Don't convert to temporary if a user conversion
9670         gives us an lvalue that we're about to bind to a reference.
9671         Set INNER to indicate pending reference binding on recursive
9672         calls.
9673
9674 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
9675
9676         * cp/lex.c: Delete duplicate pending_lang_change.
9677
9678 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
9679
9680         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
9681         Similarly.
9682         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
9683         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
9684
9685 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
9686
9687         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
9688
9689 2001-03-08  Stan Shebs  <shebs@apple.com>
9690
9691         * cp-tree.h (set_identifier_local_value): Remove unused decl.
9692
9693 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
9694
9695         * spew.c: Remove references to CPP_OSTRING.
9696
9697 2001-03-06  Andrew Haley  <aph@redhat.com>
9698
9699         * typeck.c (convert_arguments): Check that we have an fndecl.
9700
9701 2001-03-05  Andrew Haley  <aph@redhat.com>
9702
9703         * typeck.c (convert_arguments): Don't do ellipsis conversion for
9704         __built_in_constant_p.
9705
9706 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9707
9708         * typeck.c (build_static_cast): Allow enum to enum conversions
9709         as per DR 128.
9710
9711 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9712
9713         * class.c (check_field_decls): Pointers to member do not a
9714         non-pod struct make, as per DR 148.
9715
9716 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9717
9718         * call.c (joust): cp_pedwarn when using gnu extension concerning
9719         worst conversion sequences.
9720
9721 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9722
9723         * decl.c: Replace all uses of 'boolean' with 'bool'.
9724
9725 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9726
9727         * lang-specs.h: Add zero initializer for cpp_spec field to
9728         all array elements that need one.  Don't put an #ifdef inside
9729         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
9730         use it.
9731
9732 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
9733
9734         Implement using decls inside template functions.
9735         * decl2.c (validate_nonmember_using_decl): Don't special case
9736         fake_std_node in the global namespace. Don't reject early when
9737         processing a template.
9738         (do_local_using_decl): Add to statement tree. Don't do further
9739         processing when building a template.
9740         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
9741
9742 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
9743
9744         * decl2.c (do_nonmember_using_decl): Don't complain if we find
9745         same function. Do complain about ambiguating extern "C"
9746         declarations.
9747
9748 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
9749
9750         Remove floating point and complex type template constant parms.
9751         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
9752         COMPLEX_TYPE extensions.
9753         (invalid_nontype_parm_type_p): Likewise.
9754
9755 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
9756
9757         * except.c (call_eh_info): Revert "match_function"'s type.
9758
9759 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
9760
9761         Fix ctor vtable vcall offsets.
9762         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
9763         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
9764         (get_matching_base): Remove.
9765         (get_original_base): New function.
9766         (build_vtbl_initializer): Initialize vid.rtti_binfo.
9767         Use a virtual thunk for a ctor vtable with an index
9768         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
9769         primary base within a constructor vtable. Only set
9770         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
9771         when primary base has been lost.
9772         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
9773
9774 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
9775
9776         * call.c (joust): Ensure more_specialized()'s argument length
9777         parameter has correct value for constructors.
9778
9779 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
9780
9781         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
9782
9783         * decl.c (mark_inlined_fns): Prototype.
9784
9785 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
9786
9787         * spew.c (yylex): Correct handling of friends.
9788
9789 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
9790
9791         * mangle.c (write_encoding): Pass write_function_type the
9792         FUNCTION_DECL for the function being encoded.
9793         (write_function_type): Pass it along to write_bare_function_type.
9794         (write_bare_function_type): Pass it along to write_method_parms.
9795         (write_method_parms): Don't mangle the compiler-generated
9796         parameters to a constructor or destructor.
9797
9798 2001-02-22  Andreas Jaeger  <aj@suse.de>
9799
9800         * optimize.c: Include toplev.h for
9801         note_deferral_of_defined_inline_function prototype.
9802
9803 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
9804
9805         * cp-tree.h (struct lang_decl_inlined_fns): New.
9806         (struct lang_decls): Add inlined_fns.
9807         (DECL_INLINED_FNS): New macro.
9808         * optimize.c (struct inline_data): Add inlined_fns.
9809         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
9810         (inlinable_function_p): Likewise, fix typo in comment,
9811         function is not inlinable if it already inlined function currently
9812         being optimized.
9813         (expand_call_inline): Add fn to inlined_fns if necessary.
9814         (optimize_function): Initialize inlined_fns.
9815         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
9816         * decl.c (mark_inlined_fns): New function.
9817         (lang_mark_tree): Call it.
9818
9819 2001-02-21  Jason Merrill  <jason@redhat.com>
9820
9821         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
9822         (DECL_UNINLINABLE): Move to middle-end.
9823
9824         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
9825         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
9826         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
9827         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
9828         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
9829
9830         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
9831         second parm of op=.
9832
9833 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
9834
9835         * decl2.c (set_decl_namespace): Allow explicit instantiations in
9836         any namespace.
9837
9838 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9839
9840         * optimize.c (expand_call_inline): Don't walk subtrees of type
9841         nodes.
9842
9843 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
9844
9845         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
9846         for a destructor.
9847
9848 2001-02-18  Jason Merrill  <jason@redhat.com>
9849
9850         Do put the VTT parameter in DECL_ARGUMENTS.
9851         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
9852         (current_vtt_parm): New macro.
9853         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
9854         (DECL_HAS_VTT_PARM_P): New macro.
9855         (DECL_VTT_PARM): Remove.
9856         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
9857         * decl.c (duplicate_decls): Only copy the operator code if
9858         appropriate.
9859         (start_function): Set current_vtt_parm.
9860         (lang_mark_tree): Don't mark vtt_parm.
9861         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
9862         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
9863         * class.c (build_clone): Maybe remove the VTT parm.
9864         * optimize.c (maybe_clone_body): Set up the VTT parm.
9865         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
9866         * call.c (build_over_call): Just allow the VTT arg.
9867         * method.c (make_thunk): Don't set DECL_VTT_PARM.
9868         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
9869         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
9870         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
9871         * error.c (dump_function_decl): Likewise.
9872         * call.c (build_user_type_conversion_1, convert_like_real): Abort
9873         if we try to call a constructor with in-charge or VTT parms.
9874         * method.c (skip_artificial_parms_for): New fn.
9875         * call.c (add_function_candidate, build_over_call): Call it.
9876         * call.c (build_new_method_call): Use current_vtt_parm.
9877         * init.c (expand_virtual_init): Likewise.
9878         * class.c (same_signature_p): No longer static.
9879         * cp-tree.h: Declare it.
9880         * search.c (look_for_overrides_r): Use it.
9881
9882 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
9883
9884         * cp-tree.h (new_abi_rtti_p): Remove.
9885         (name_mangling_version): Likewise.
9886         (flag_do_squangling): Likewise.
9887         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
9888         * decl.c (grokfndecl): Likewise.
9889         * decl2.c (name_mangling_version): Remove.
9890         (flag_do_squangling): Likewise.
9891         (lang_f_options): Remove `squangle'.
9892         (unsupported_options): Add `squangle'.
9893         (cxx_decode_option): Issue a warning about uses of
9894         -fname-mangling-version.
9895         (finish_file): Remove old ABI support.
9896         * pt.c (check_explicit_specialization): Likewise.
9897         (tsubst_decl): Likewise.
9898         * rtti.c (init_rtti_processing): Likewise.
9899         (build_headof): Likewise.
9900         (get_tinfo_decl_dynamic): Likewise.
9901         (tinfo_from_decl): Likewise.
9902         (build_dynamic_cast_1): Likewise.
9903         (synthesize_tinfo_var): Likewise.
9904         * init.c (build_new): Allow enumeration types for the array-bounds
9905         in a direct-new-declarator.
9906
9907         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
9908
9909         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
9910         TREE_PROTECTED from the template being specialized.
9911
9912 2001-02-17  Jason Merrill  <jason@redhat.com>
9913
9914         * decl2.c (build_artificial_parm): Set TREE_READONLY.
9915
9916         * decl.c (bad_specifiers): Allow throw specs on things with
9917         pointer-to-function or -member-function type.
9918         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
9919         a pmf.
9920
9921 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
9922
9923         * call.c (check_dtor_name): Handle template names correctly.
9924
9925 2001-02-16  Jason Merrill  <jason@redhat.com>
9926
9927         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
9928         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
9929         * optimize.c (maybe_clone_body): Don't substitute it.
9930         * call.c (build_new_method_call): Check in_chrg instead.
9931         * init.c (expand_virtual_init): Likewise.
9932
9933 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
9934
9935         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
9936         class-type introduces at least a type-name.
9937
9938 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
9939
9940         * call.c (convert_like_real): Create a temporary for non-lvalue.
9941
9942 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
9943
9944         * cp-tree.h: Fix typos in comments.
9945
9946 2001-02-16  Jason Merrill  <jason@redhat.com>
9947
9948         * optimize.c (remap_block): If we're compiling a clone, pass the
9949         new block to insert_block.
9950
9951 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
9952
9953         * semantics.c (finish_asm_stmt): Robustify.
9954
9955 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
9956
9957         * pt.c (push_template_decl_real): Don't remangle the name of a
9958         class template.
9959
9960 2001-02-15  Jim Meyering  <meyering@lucent.com>
9961
9962         * Make-lang.in (c++.install-common): Depend on installdirs.
9963         (c++.install-info): Likewise.
9964         (c++.install-man): Likewise.
9965
9966 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
9967
9968         * typeck2.c (build_m_component_ref): Robustify.
9969
9970 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
9971
9972         * friend.c (do_friend): Don't take the nested [template] class
9973         into account when deciding whether to warn about the friend
9974         function not referring to a template function.
9975
9976 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
9977
9978         * typeck.c (build_unary_op): Clarify error message.
9979
9980 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
9981
9982         * parse.y (component_constructor_declarator): allow optional
9983         parentheses around constructor class name.
9984
9985 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9986
9987         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
9988         section.
9989         * init.c (emit_base_init): Remove incorrect comment about
9990         virtual bases.
9991         * method.c (make_thunk): Fix comment alignment.
9992
9993 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9994
9995         Kill remnants of this is variable.
9996         * cp-tree.h (flag_this_is_variable): Remove.
9997         * decl2.c (flag_this_is_variable): Remove.
9998         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
9999         (build_vbase_path): The path is non-static, even in a cdtor.
10000         (resolves_to_fixed_type_p): Add additional return value.
10001         * search.c (init_vbase_pointers): Adjust.
10002         * tree.c (lvalue_p_1): Adjust.
10003         * typeck.c (mark_addressable): Adjust.
10004
10005 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
10006
10007         * pt.c (unify): Don't check cv quals of array types.
10008
10009 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
10010
10011         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
10012         check whether we already have the type.
10013
10014 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
10015
10016         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
10017         * call.c (build_op_delete_call): Simplify to remove duplicate
10018         code.
10019         * class.c (clone_function_decl): Don't build the deleting variant
10020         of a non-virtual destructor.
10021         * decl.c (finish_destructor_body): Don't call delete if this is a
10022         non-virtual destructor.
10023         * init.c (build_delete): Explicitly call `operator delete' when
10024         deleting an object with a non-virtual destructor.
10025
10026 2001-02-13  Jason Merrill  <jason@redhat.com>
10027
10028         * lang-specs.h: Add more __EXCEPTIONS.
10029
10030 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
10031
10032         * typeck2.c (process_init_constructor): Check
10033         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
10034
10035 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
10036
10037         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
10038         Remove spurious information in comment. Allow further
10039         adjustments of REFERENCE_TYPE args.
10040
10041 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
10042
10043         * errfn.c (cp_deprecated): Tweak diagnostic text.
10044         * parse.y (new_initializer): Deprecate initializer lists
10045         extension.
10046
10047 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
10048
10049         Remove old ABI support.
10050
10051 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
10052
10053         * decl2.c (flag_vtable_thunks): Always set it to 1.
10054         (flag_new_abi): Likewise.
10055         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
10056
10057         * Makefile.in (g++spec.o): Fix typo.
10058
10059 2001-02-09  Jason Merrill  <jason@redhat.com>
10060
10061         * lang-specs.h: Restore definition of __EXCEPTIONS.
10062
10063 2001-02-08  Jason Merrill  <jason@redhat.com>
10064
10065         * search.c (shared_member_p): New function.
10066         (lookup_field_r): Use it.
10067         * cp-tree.h (SHARED_MEMBER_P): Remove.
10068
10069         * method.c (process_overload_item): Handle template-dependent array
10070         bounds.
10071         * pt.c (type_unification_real): If we end up with undeduced nontype
10072         parms, try again.
10073
10074         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
10075         types.
10076
10077         * typeck2.c (friendly_abort): Don't say anything if we have
10078         earlier errors or sorries.
10079
10080         * decl.c (check_tag_decl): Notice attempts to redefine bool and
10081         wchar_t.  Ignore if in_system_header.
10082
10083         * decl.c (maybe_push_cleanup_level): New fn...
10084         (start_decl_1): ...split out from here.
10085         * cvt.c (build_up_reference): Use it.
10086         * cp-tree.h: Declare it.
10087
10088 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
10089
10090         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
10091         spec.
10092
10093 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
10094
10095         * pt.c (lookup_template_class): Make sure it's a primary
10096         template or template_template_parm when called from the parser.
10097         (instantiate_template_class): Add assertion.
10098
10099 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
10100
10101         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
10102         from error_mark_node.
10103
10104 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
10105
10106         Fix specification and implementation bugs in V3 ABI
10107         construction vtables.
10108         * cp-tree.h (flag_dump_class_layout): New flag.
10109         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
10110         (BINFO_LOST_PRIMARY_P): New flag.
10111         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
10112         (BINFO_PRIMARY_MARKED_P): Rename to ...
10113         (BINFO_PRIMARY_P): ... here.
10114         (binfo_via_virtual): New prototype.
10115         * decl2.c (flag_dump_class_layout): New flag.
10116         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
10117         use `=' as a file name separator.
10118         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
10119         bases.
10120         (build_vtbl_address): If this is a virtual primary base, then
10121         get the vtbl of what it is ultimately primary for.
10122         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
10123         for BINFO_PRIMARY_P.
10124         (dfs_skip_nonprimary_vbases_markedp): Likewise.
10125         (get_shared_vbase_if_not_primary): Likewise.
10126         (dfs_get_pure_virtuals): Likewise.
10127         (expand_upcast_fixups): Likewise.
10128         (fixup_virtual_upcast_offsets): Likewise.
10129         (dfs_find_vbase_instance): Likewise.
10130         (find_vbase_instance): Likewise.
10131         (binfo_from_vbase): Adjust comment to reflect reality.
10132         (binfo_via_virtual): New function.
10133         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
10134         for binfo walking during VTT construction.
10135         (dfs_mark_primary_bases): Remove.
10136         (force_canonical_binfo_r): New function.
10137         (force_canonical_binfo): New function.
10138         (mark_primary_virtual_base): New function.
10139         (mark_primary_bases): Walk in inheritance graph order, use
10140         mark_primary_virtual_base.
10141         (determine_primary_base): Use some more intermediate variables.
10142         (dfs_find_final_overrider): Don't check for overriding along a
10143         virtual path.
10144         (dfs_modify_vtables): Walk into primary virtual bases too.
10145         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
10146         (build_base_fields): Likewise.
10147         (dfs_set_offset_for_unshared_vbases): Likewise.
10148         (layout_virtual_bases): Likewise.
10149         (end_of_class): Likewise.
10150         (finish_struct_1): Call dump_class_hierarchy, if requested.
10151         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
10152         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
10153         (dump_class_hierarchy): Add file parameter. Append to file, if
10154         required.
10155         (finish_vtbls): Adjust accumulate_vtbl_inits call.
10156         Use canonical base for virtual bases.
10157         (build_vtt): Add more comments. Adjust build_vtt_inits call.
10158         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
10159         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
10160         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
10161         virtual VTTs.
10162         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
10163         from DATA.  We want virtual primary bases and all bases via virtual.
10164         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
10165         virtual base when not a construction vtable.
10166         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
10167         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
10168         Use canonical bases when processing virtual bases.
10169         (accumulate_vtbl_inits): We're interested in any base via a
10170         virtual path.
10171         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
10172         within a construction vtable, determine what is being overridden.
10173         (build_vtbl_initializer): Add more comments
10174         (add_vcall_offset_vtbl_entries_1): Adjust comment.
10175         (build_rtti_vtbl_entries): Check if the base has lost its
10176         primary.
10177
10178 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
10179
10180         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
10181
10182 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10183
10184         * decl.c (pushdecl): Call abort instead of fatal.
10185         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
10186         * init.c (build_new_1): Likewise.
10187         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
10188         * decl.c (build_typename_type): hash_table_init now returns void.
10189         decl.c (init_decl_processing): Make an error non-fatal.
10190
10191 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
10192
10193         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
10194         Document.
10195         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10196         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10197         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10198         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10199         * decl.c (maybe_commonize_var): Use the new name-mangling where
10200         appropriate.
10201         * decl2.c (comdat_linkage): Enhance comments.  Make all
10202         compiler-generated things static, if COMDAT is not available.
10203         (get_tinfo_decl): Do not make typeinfo objects that belong in the
10204         library COMDAT.
10205         (tinfo_base_init): Use the correct mangled name for typeinfo
10206         strings, and push them into the global scope.
10207         (typeinfo_in_lib_p): New function.
10208         (synthesize_tinfo_var): Use it.
10209         (create_real_tinfo_var): Likewise.
10210
10211 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
10212
10213         * decl.c (push_class_binding): Use context_for_name_lookup instead
10214         of CP_DECL_CONTEXT.
10215         * search.c (context_for_name_lookup): Remove static.  Check for NULL
10216         context in the loop.
10217         * cp-tree.h (context_for_name_lookup): Add prototype.
10218
10219 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
10220
10221         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
10222         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
10223         Remove.
10224         * call.c (convert_class_to_reference, build_user_type_conversion_1,
10225         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
10226
10227 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
10228
10229         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
10230         of macros used when compiling g++spec.c.
10231         * g++spec.c (lang_specific_driver): Link with the shared
10232         libgcc by default.
10233
10234 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
10235
10236         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
10237         make_reference_declarator, make_call_declarator), method.c
10238         (implicitly_declare_fn), parse.y (namespace_using_decl,
10239         notype_unqualified_id, expr_or_declarator, new_type_id,
10240         after_type_declarator, direct_after_type_declarator,
10241         notype_declarator, complex_notype_declarator,
10242         complex_direct_notype_declarator, qualified_id,
10243         notype_qualified_id, overqualified_id, direct_new_declarator,
10244         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
10245         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
10246         instead of build_parse_node.
10247
10248 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10249
10250         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
10251         (minus_one_node): Moved to top level gcc directory.  Renamed
10252         to integer_minus_one_node.
10253
10254         * init.c (init_init_processing): Don't set minus_one_node.
10255         (build_vec_init): Use integer_minus_one_node.
10256
10257         * rtti.c (get_tinfo_decl_dynamic): Likewise.
10258
10259 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
10260
10261         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
10262         identical and they would be replaced with constant, remove
10263         MODIFY_EXPR from the tree.
10264
10265 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10266
10267         * Make-lang.in: Remove all dependencies on defaults.h.
10268         * call.c: Don't include defaults.h.
10269         * decl.c: Likewise.
10270         * decl2.c: Likewise.
10271         * except.c: Likewise.
10272         * pt.c: Likewise.
10273         * rtti.c: Likewise.
10274         * tree.c: Likewise.
10275         * typeck.c: Likewise.
10276
10277 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
10278
10279         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
10280         operators even in "C" linkage.
10281         * method.c (set_mangled_name_for_decl): Likewise.
10282         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
10283         overloaded operators in "C" linkage.
10284
10285 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
10286
10287         * pt.c (tsubst_decl): Remove IN_DECL parameter.
10288         (tsubst_arg_types): Check parameter is not void.
10289         (tsubst): Adjust tsubst_decl call.
10290
10291 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
10292
10293         * call.c (add_builtin_candidate): Quote std properly, from
10294         previous change.
10295
10296 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10297
10298         * pt.c (check_explicit_specialization): Clone constructors and
10299         destructors.
10300
10301 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
10302
10303         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
10304         indicates anything special about template depth. Make sure we
10305         only count the user visible template classes.
10306
10307 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
10308
10309         * call.c (build_conv): Typo in comment.
10310         (add_builtin_candidate): Add more explanation.
10311         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
10312         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
10313         when we have enumeral types.
10314         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
10315         candidates for relops and eqops.
10316         (joust): Simplify control flow. Allow a non-template user
10317         function to hide a builtin.
10318
10319 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
10320
10321         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
10322         (more_specialized): Add deduction parameter.
10323         * call.c (joust): Adjust more_specialized call.
10324         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
10325         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
10326         (get_bindings_order): Remove.
10327         (get_bindings_real): Add DEDUCE parameter.
10328         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
10329         REFERENCE_TYPE jig for DEDUCE_ORDER.
10330         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
10331         maybe_adjust_types_for_deduction.
10332         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
10333         directly.
10334         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
10335         (check_cv_quals_for_unify): Use new unify qualifier flags.
10336         (unify): Clear new unify qualifier flags.
10337         (get_bindings_real): Add DEDUCE parameter.
10338         (get_bindings): Adjust call to get_bindings_real.
10339         (get_bindings_overload): Likewise.
10340         (most_specialized_instantiation): Adjust call to
10341         more_specialized.
10342
10343 2001-01-19  Jason Merrill  <jason@redhat.com>
10344
10345         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
10346
10347         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
10348         -fnew-abi.
10349
10350 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
10351
10352         * decl2.c (arg_assoc_class): Fix double iteration logic.
10353
10354 2001-01-19  Jason Merrill  <jason@redhat.com>
10355
10356         * init.c (build_delete): Always call convert_force to strip cv-quals.
10357
10358         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
10359         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
10360         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
10361
10362 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10363
10364         * search.c (get_vbase_1): Count only virtual bases.
10365
10366 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10367
10368         * class.c (duplicate_tag_error): Robustify flag clearing.
10369
10370 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10371
10372         * cp-tree.h (lookup_template_class): Add complain parm.
10373         * decl.c (lookup_namespace_name): Adjust call to
10374         lookup_template_class.
10375         (make_typename_type): Likewise.
10376         * semantics.c (finish_template_type): Likewise.
10377         * pt.c (lookup_template_class): Add complain parm. Adjust.
10378         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
10379         (tsubst): Likewise.
10380
10381 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10382
10383         * pt.c (copy_default_args_to_explicit_spec): Preserve
10384         object's CV quals. Reorganize.
10385
10386 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10387
10388         * typeck.c (build_modify_expr): Say `initialization' for
10389         INIT_EXPRs.
10390         * init.c (build_default_init): Convert to enumeral type, if
10391         needed.
10392
10393 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
10394
10395         * parse.y (nomods_initdcl0): Properly set things up for
10396         initdcl0_innards.
10397
10398 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10399
10400         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
10401         (type_unification_real): Set it.
10402         (unify): Use it.
10403
10404 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10405
10406         * decl.c (finish_destructor_body): Convert to vbase pointer here.
10407
10408 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10409
10410         * semantics.c (begin_class_definition): Check we're not inside a
10411         template parm list.
10412
10413 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10414
10415         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
10416         BASELINK_P.
10417
10418 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10419
10420         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
10421         * call.c (build_over_call): Add comment.
10422
10423 2001-01-16 Daniel Berlin <dberlin@redhat.com>
10424
10425         * cvt.c (ocp_convert): Handle vector type conversion
10426         * typeck2.c (digest_init): Handle vector type initializations
10427
10428 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
10429
10430         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
10431           was given.
10432
10433 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
10434
10435         * pt.c (check_nontype_parm): Rename to ...
10436         (invalid_nontype_parm_type_p): ... here.
10437         (process_template_parm): Adjust.
10438         (convert_template_argument): Adjust.
10439
10440 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
10441
10442         * pt.c (check_nontype_parm): New function.
10443         (process_template_parm): Use it.
10444         (convert_template_argument): Use it.
10445         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
10446         member.
10447
10448 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
10449
10450         * tree.c: Add defaults.h
10451         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
10452         * Make-lang.in (cp/tree.o): Add defaults.h.
10453
10454 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10455
10456         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
10457
10458 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10459
10460         * g++.1: Change to be ".so man1/gcc.1".
10461
10462 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10463
10464         * Make-lang.in (c++.info, c++.install-info): Build and install g++
10465         internals info.
10466         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
10467         ($(srcdir)/cp/g++int.info): New target.
10468         * gxxint.texi: Add info directory entry.  Use @@ in email address.
10469         * .cvsignore: Update.
10470
10471 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
10472
10473         * typeck.c (build_c_cast): Do template processing earlier.
10474         Always pedwarn on array casts.
10475
10476 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
10477
10478         * friend.c (make_friend_class): Make sure a templated class is
10479         actually a template.
10480
10481 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10482
10483         * decl2.c (get_guard): Set linkage from guarded decl.
10484
10485 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10486
10487         * call.c (convert_default_arg): Check for unprocessed
10488         DEFAULT_ARG.
10489         * cp-tree.h (replace_defarg): Move to spew.c.
10490         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
10491         spew.c, which is where they really are.
10492         (done_pending_defargs): Declare.
10493         (unprocessed_defarg_fn): Declare.
10494         * decl.c (replace_defarg): Move to spew.c
10495         * parse.y (structsp): Call done_pending_defargs.
10496         * spew.c (defarg_fns): Rearrange list structure.
10497         (defarg_fnsdone): New static variable.
10498         (defarg_depfns): New static variable.
10499         (init_spew): Adjust.
10500         (add_defarg_fn): Store the type in TREE_TYPE.
10501         (do_pending_defargs): Detect and deal with ordering constraints
10502         and circularity.
10503         (done_pending_defargs): New function.
10504         (unprocessed_defarg_fn): New function.
10505         (replace_defarg): Moved from decl.c. Robustify. Don't save
10506         if circularity detected.
10507
10508 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10509
10510         * pt.c (unify): Check array has a domain, before checking
10511         whether it is variable sized.
10512
10513 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10514
10515         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
10516         parameters with pointers to arrays of unknown bound.
10517
10518 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10519
10520         * parse.y (template_parm_header, template_spec_header): New
10521         reductions. Split out from ...
10522         (template_header): ... here. Use them.
10523         (template_template_parm): Use template_parm_header.
10524         * semantics.c (finish_template_template_parm): Add assert.
10525
10526 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10527
10528         * mangle.c (write_builtin_type): Fix thinko.
10529
10530         * pt.c (copy_default_args_to_explicit_spec_1): New function.
10531         (copy_default_args_to_explicit_spec): Likewise.
10532         (check_explicit_specialization): Use it.
10533
10534         * class.c (finish_struct_1):  Remove last argument in call to
10535         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
10536         * decl.c (builtin_function): Likewise.
10537         (build_cp_library_fn): Likewise.
10538         (check_initializer): Likewise.
10539         (make_rtl_for_nonlocal_decl): Likewise.
10540         (cp_finish_decl): Likewise.
10541         (start_function): Likewise.
10542         * decl2.c (finish_anon_union): Likewise.
10543         * friend.c (do_friend): Likewise.
10544         * init.c (build_java_class_ref): Likewise.
10545         * method.c (make_thunk): Likewise.
10546         * pt.c (tsubst_friend_function): Likewise.
10547         * semantics.c (expand_body): Likewise.
10548
10549 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10550
10551         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
10552         looking at DECL_CLONED_FUNCTION for non-functions.
10553
10554 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10555
10556         * error.c (dump_template_parameter): Use parm to determine how
10557         to print default value.
10558
10559 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10560
10561         * class.c (duplicate_tag_error): Clear more flags.
10562
10563 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10564
10565         * call.c (build_new_method_call): Use binfo_for_vbase.
10566
10567 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
10568
10569         * cp-tree.h (flag_cond_mismatch): Don't declare.
10570         * decl2.c (flag_cond_mismatch): Don't define.
10571         (lang_f_options): Remove cond-mismatch.
10572         (unsupported_options): Add cond-mismatch.
10573
10574 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
10575
10576         * class.c (handle_using_decl): Reject using of constructor name
10577         of sourcing class. Allow injecting of a method with same name as
10578         nested class. Fixup error messages.
10579
10580 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
10581
10582         * decl2.c (lang_decode_option): Handle -Wformat=2.
10583
10584 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10585
10586         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
10587         initialized_in_class.
10588         (DECL_DEFINED_IN_CLASS_P): Rename to ...
10589         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
10590         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
10591         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
10592         * pt.c (check_default_tmpl_args): Adjust for
10593         DECL_INITIALIZED_IN_CLASS_P.
10594         (instantiate_class_template): Likewise.
10595         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
10596
10597         * class.c (finish_struct): Constify saved_filename.
10598
10599 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10600
10601         * class.c (duplicate_tag_error): Adjust diagnostic.
10602         (finish_struct): Locally set location to start of struct.
10603         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
10604
10605 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10606
10607         * decl.c (struct binding_level): Adjust class_shadowed comments
10608         to reflect reality.
10609         (push_class_level_binding): Adjust comments to reflect reality.
10610         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
10611         Don't set TREE_VALUE on the class_shadowed list.
10612
10613 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10614
10615         * decl2.c (acceptable_java_type): Allow references too.
10616         * init.c (build_java_class_ref): When using the new ABI, search
10617         `class$' and have it mangled with `mangle_decl.'
10618         * mangle.c (write_java_integer_type_codes): New function.
10619         (write_builtin_type): Detect and mangle Java integer and real
10620         types.
10621
10622 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
10623
10624         * decl2.c (grokfield): Don't accept `asm' specifiers for
10625         non-static data members.
10626
10627 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10628
10629         * expr.c (cplus_expand_expr): Don't reset `target'.
10630
10631 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
10632
10633         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
10634
10635 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
10636
10637         * parse.y (template_datadef): Check for error_mark_node.
10638
10639 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
10640
10641         * cp-tree.def (DEFAULT_ARG): Make `x' class.
10642
10643 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
10644
10645         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
10646         (record_builtin_type): Make non-static.
10647         (flag_short_double): Don't declare.
10648         (init_decl_processing): Remove the creation of many tree nodes now
10649         in c_common_nodes_and_builtins.
10650         (build_void_list_node): New function.
10651         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
10652         * cp-tree.h (flag_short_wchar): Don't declare.
10653
10654 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
10655
10656         * call.c (build_conv): Don't use build1 for USER_CONV.
10657         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
10658
10659 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
10660
10661         * lex.c (lang_init): Call c_common_lang_init.
10662
10663 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
10664
10665         * search.c (lookup_fnfields_here): Remove.
10666         (look_for_overrides_r): Use lookup_fnfields_1.
10667         Ignore functions from using declarations.
10668
10669 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
10670
10671         Implement exceptions specifiers for implicit member functions.
10672         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
10673         * method.c (synthesize_exception_spec): New function.
10674         (locate_dtor, locate_ctor, locate_copy): New functions.
10675         (implicitly_declare_fn): Generate the exception spec too.
10676         * search.c (check_final_overrider): Check artificial functions
10677         too.
10678         * typeck2.c (merge_exception_specifiers): New function.
10679
10680 2001-01-03  Jason Merrill  <jason@redhat.com>
10681
10682         * init.c (build_default_init): New fn.
10683         (perform_member_init): Split out from here.
10684         (build_new_1): Use it.  Simplify initialization logic.
10685         (build_vec_init): Take an array, rather than a pointer and maxindex.
10686         Speed up simple initializations.  Don't clean up if we're assigning.
10687         * cp-tree.h: Adjust.
10688         * decl2.c (do_static_initialization): Remove TREE_VEC case.
10689         * parse.y (new_initializer): Return void_zero_node for ().
10690         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
10691         * typeck2.c (digest_init): Only complain about user-written
10692         CONSTRUCTORs.
10693
10694 2000-12-22  Mike Stump  <mrs@wrs.com>
10695
10696         * decl2.c: (max_tinst_depth): Increase to 50.
10697
10698 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
10699
10700         * class.c (invalidate_class_lookup_cache): Zero the
10701         previous_class_values.
10702         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
10703         TREE_INT_CST_HIGH.
10704         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
10705         * decl.c (free_bindings): New variable.
10706         (push_binding): Don't create a new binding if we have one on the
10707         free list.
10708         (pop_binding): Put old bindings on the free list.
10709         (init_decl_processing): Use size_int, not build_int_2.
10710         Register free_bindings as a GC root.
10711         (cp_make_fname_decl): Use size_int, not build_int_2.
10712         (push_inline_template_parms_recursive): Likewise.
10713         (end_template_parm_list): Likewise.
10714         (for_each_template_parm): Do not use walk_tree_without_duplicates.
10715         (tsubst_template_parms): Use size_int, not build_int_2.
10716         (tsubst): Likewise.
10717         * rtti.c (get_vmi_pseudo_type_info): Likewise.
10718
10719 2001-01-02  Richard Henderson  <rth@redhat.com>
10720
10721         * parse.y (asm): Set ASM_INPUT_P.
10722
10723 2001-01-02  Jason Merrill  <jason@redhat.com>
10724
10725         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
10726         for v3 ABI.
10727
10728         * typeck.c (cp_truthvalue_conversion): New fn.
10729         * cvt.c (ocp_convert): Use it.
10730
10731         * cp-tree.h: Lose c-common.c decls.
10732
10733         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
10734         * cvt.c (convert_to_void): Use type_unknown_p.
10735
10736         * typeck.c (strip_all_pointer_quals): Also strip quals from
10737         pointer-to-member types.
10738
10739         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
10740         parse.y as C.
10741
10742         * call.c (build_new_method_call): Do evaluate the object parameter
10743         when accessing a static member.
10744         * typeck.c (build_component_ref): Likewise.
10745
10746 2001-01-02  Andreas Jaeger  <aj@suse.de>
10747
10748         * decl.c (cp_missing_noreturn_ok_p): New.
10749         (init_decl_processing): Set lang_missing_noreturn_ok_p.
10750
10751 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
10752
10753         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
10754
10755 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
10756
10757         * class.c (pushclass): Remove #if 0'd code.
10758         * cp-tree.h (overload_template_name): Remove.
10759         * decl.c (store_bindings): Simplify.
10760         (pop_from_top_level): Likewise.
10761         * pt.c (overload_template_name): Remove.
10762         (instantiate_decl): Don't call push_to_top_level if it's not
10763         needed.
10764
10765 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
10766
10767         * pt.c (register_local_specialization): Don't return a value.
10768         (lookup_template_class): Use move-to-front heuristic when looking
10769         up template instantiations.
10770         (instantiate_decl): Only push_to_top_level when we're actually
10771         going to instantiate the template.
10772
10773 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
10774
10775         * search.c (binfo_for_vtable): Return least derived class, not
10776         most.  Handle secondary vtables.
10777
10778 2000-12-22  Jason Merrill  <jason@redhat.com>
10779
10780         * pt.c (more_specialized): Don't optimize len==0.
10781         (fn_type_unification): If we're adding the return type, increase len.
10782
10783         * typeck.c (build_binary_op): Fix pmf comparison logic.
10784
10785         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
10786         DECL_STATIC_FUNCTION_P.
10787
10788         * semantics.c (genrtl_finish_function): Don't try to jump to
10789         return_label unless it exists.
10790
10791         In partial ordering for a call, ignore parms for which we don't have
10792         a real argument.
10793         * call.c (joust): Pass len to more_specialized.
10794         (add_template_candidate_real): Strip 'this', pass len.
10795         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
10796         (get_bindings_order): New fn.  Pass len down.
10797         (get_bindings_real): Strip 'this', pass len.
10798         (fn_type_unification): Likewise.
10799         (type_unification_real): Succeed after checking 'len' args.
10800         (most_specialized_instantiation): Lose explicit_args parm.
10801         * class.c (resolve_address_of_overloaded_function): Strip 'this',
10802         pass len.
10803
10804 2000-12-21  Jason Merrill  <jason@redhat.com>
10805
10806         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
10807         DECL_TEMPLATE_RESULT.
10808
10809         * search.c (lookup_field_r): Call lookup_fnfields_1, not
10810         lookup_fnfields_here.
10811
10812         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
10813
10814         * call.c (build_object_call): Also allow conversions that return
10815         reference to pointer to function.
10816         (add_conv_candidate): Handle totype being ref to ptr to fn.
10817         (build_field_call): Also allow members of type reference to function.
10818         Lose support for calling pointer to METHOD_TYPE fields.
10819
10820         * error.c (dump_expr): Handle *_CAST_EXPR.
10821
10822         * typeck2.c (build_scoped_ref): Always convert to the naming class.
10823
10824         * tree.c (break_out_cleanups): Lose.
10825         * cp-tree.h: Remove prototype.
10826         * typeck.c (build_component_ref): Don't break_out_cleanups.
10827         (build_compound_expr): Likewise.
10828         * semantics.c (finish_expr_stmt): Likewise.
10829
10830 2000-12-20  Richard Henderson  <rth@redhat.com>
10831
10832         * cp-tree.h: Update declarations.
10833         * decl.c (finish_case_label): Return the new stmt node.
10834         * semantics.c (finish_goto_stmt): Likewise.
10835         (finish_expr_stmt, finish_return_stmt): Likewise.
10836         (finish_break_stmt, finish_continue_stmt): Likewise.
10837         (finish_asm_stmt): Likewise.
10838         * parse.y (already_scoped_stmt): Set STMT_LINENO.
10839         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
10840         (simple_if, simple_stmt): Return the new stmt node.
10841         (save_lineno): New.
10842
10843 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
10844
10845         * cp-tree.h: Don't declare warn_long_long.
10846
10847 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10848
10849         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
10850         IS_AGGR_TYPE.
10851
10852 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10853
10854         * pt.c (unify): Handle when both ARG and PARM are
10855         BOUND_TEMPLATE_TEMPLATE_PARM.
10856
10857 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10858
10859         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
10860         DECL_TEMPLATE_PARM_P.
10861
10862 2000-12-15  Jason Merrill  <jason@redhat.com>
10863
10864         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
10865
10866         * init.c (build_new_1): Don't strip quals from type.
10867
10868         * decl.c (pushdecl): Don't check for linkage on a non-decl.
10869
10870         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
10871
10872         * call.c (build_new_function_call): Lose space before paren in
10873         error message.
10874         (build_new_method_call): Likewise.
10875
10876         * typeck2.c (build_m_component_ref): Propagate quals from datum.
10877
10878 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10879
10880         * pt.c (check_explicit_specialization): Propagate default
10881         function arguments to explicit specializations.
10882
10883 2000-12-13  DJ Delorie  <dj@redhat.com>
10884
10885         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
10886         and <? operators.
10887
10888 2000-12-08  Jason Merrill  <jason@redhat.com>
10889
10890         * error.c (dump_function_name): Don't let the user see __comp_ctor.
10891
10892         Clean up copy-initialization in overloading code.
10893         * call.c (build_user_type_conversion_1): Die if we are asked to
10894         convert to the same or a base type.
10895         (implicit_conversion): Avoid doing so.  Lose reference binding code.
10896         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
10897         direct-initialization.  Also do direct-init part of copy-init.
10898         (build_user_type_conversion): Don't provide context to convert_like.
10899         * cvt.c (ocp_convert): build_user_type_conversion will now provide
10900         the constructor call for copy-init.
10901
10902         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
10903         instantiation of a member template.
10904         (do_decl_instantiation): Not here.
10905
10906 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
10907
10908         * class.c (check_field_decls): Don't special case anonymous
10909         fields in error messages.
10910         (note_name_declared_in_class): Use %D on diagnostic.
10911
10912         * tree.c (pod_type_p): Use strip_array_types.
10913         (cp_valid_lang_attribute): Likewise.
10914         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
10915         multiple evaluations.
10916         (cp_has_mutable_p): Use strip_array_types.
10917
10918 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
10919
10920         * cp-tree.h (sufficient_parms_p): Declare new function.
10921         * call.c (sufficient_parms_p): New function, broken out of ...
10922         (add_function_candidate): ... here. Use it.
10923         (add_conv_candidate): Use it.
10924         * decl.c (grok_ctor_properties): Use it.
10925
10926 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
10927
10928         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
10929
10930 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10931
10932         * decl2.c (lang_decode_option): Handle -Wformat-security.
10933
10934 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10935
10936         * pt.c (verify_class_unification): New function.
10937         (get_class_bindings): Use it.
10938         (try_class_unification): Tidy.
10939         (unify): Handle when argument of a template-id is not
10940         template parameter dependent.
10941         (template_args_equal): Handle when TREE_CODE's do not match.
10942
10943 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
10944
10945         * lang-specs.h (c++): When invoking the stand-alone preprocessor
10946         for -save-temps, pass all relevant -Defines to it, and then don't
10947         pass them to cc1plus.
10948
10949 2000-12-05  Will Cohen  <wcohen@redhat.com>
10950
10951         * decl.c (finish_case_label): Cleared
10952         more_cleanups_ok in surrounding function scopes.
10953         (define_label): Likewise.
10954
10955 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
10956
10957         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
10958         (get_matching_virtual): Remove.
10959         (look_for_overrides): Declare new function.
10960         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
10961         DECL_VINDEX here.
10962         * class.c (check_for_override): Move base class iteration code
10963         to look_for_overrides.
10964         * search.c (next_baselink): Remove.
10965         (get_virtuals_named_this): Remove.
10966         (get_virtual_destructor): Remove.
10967         (tree_has_any_destructors_p): Remove.
10968         (struct gvnt_info): Remove.
10969         (check_final_overrider): Remove `virtual' from error messages.
10970         (get_matching_virtuals): Remove. Move functionality to ...
10971         (look_for_overrides): ... here, and ...
10972         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
10973         to be overriding.
10974
10975 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
10976
10977         * typeck.c (get_delta_difference): If via a virtual base,
10978         return zero.
10979         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
10980         adjustment.
10981
10982 2000-12-04  Richard Henderson  <rth@redhat.com>
10983
10984         * error.c (dump_tree): Use output_add_string not OB_PUTS.
10985
10986 2000-12-04  Jason Merrill  <jason@redhat.com>
10987
10988         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
10989         (write_builtin_type): Pass intSI_type_node and the like through
10990         type_for_mode.
10991         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
10992         Pass intSI_type_node and the like through type_for_mode.
10993         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
10994         * pt.c (tsubst, unify): Likewise.
10995         * tree.c (walk_tree): Likewise.
10996         * error.c (dump_type): Likewise.
10997         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
10998
10999         * Make-lang.in: Tweak top comment for emacs.
11000         (cp/TAGS): Restore.
11001
11002         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
11003
11004         * class.c (clone_function_decl): Robustify.
11005
11006 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
11007
11008         * decl.c (store_bindings): Only search in the non modified
11009         old_bindings for duplicates.
11010
11011 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
11012
11013         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
11014         TYPE_POLYMORPHIC_P.
11015
11016         * typeck.c (build_static_cast): Remove unused variable.
11017
11018 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11019
11020         * pt.c: Fix typo in comment.
11021
11022 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
11023
11024         * decl2.c (warn_format): Remove definition.
11025         (lang_decode_option): Handle -Wformat-nonliteral,
11026         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
11027
11028 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
11029
11030         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
11031         (init_decl_processing): Don't create string_type_node,
11032         const_string_type_node, wint_type_node, intmax_type_node,
11033         uintmax_type_node, default_function_type, ptrdiff_type_node and
11034         unsigned_ptrdiff_type_node.  Adjust position of call to
11035         c_common_nodes_and_builtins.
11036         (identifier_global_value): New function.
11037
11038 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
11039
11040         * call.c (standard_conversion): Reject pointer to member
11041         conversions from ambiguous, inaccessible or virtual bases.
11042         * typeck.c (build_static_cast): Don't check pointers to members
11043         specially.
11044
11045 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
11046
11047         * method.c (do_build_copy_constructor): Preserve cv
11048         qualifications when accessing source object members.
11049         (do_build_assign_ref): Likewise. Remove separate diagnostics for
11050         unnamed fields.
11051
11052 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
11053
11054         * method.c (do_build_assign_ref): Construct appropriately
11055         CV-qualified base reference. Don't allow const casts in base
11056         conversion.
11057
11058 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
11059
11060         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
11061         incomplete return type.
11062
11063 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11064
11065         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
11066         * semantics.c (finish_base_specifier): Accept a _TYPE not a
11067         _DECL.
11068
11069 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11070
11071         * spew.c (yyerror): Cope if yylval.ttype is NULL.
11072
11073 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11074
11075         * decl.c (grokdeclarator): Diagnose undefined template contexts.
11076
11077 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11078
11079         * decl.c (grokdeclarator): Do type access control on friend
11080         class.
11081
11082 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
11083
11084         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
11085         bison parser ickiness.
11086         * pt.c (tsubst_friend_function): Enter namespace scope when
11087         tsubsting the function name.
11088         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
11089
11090 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
11091
11092         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
11093         * cvt.c (cp_convert_to_pointer): Add force parameter.
11094         Allow conversions via virtual base if forced.
11095         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
11096         (ocp_convert): Likewise.
11097         * search.c (binfo_from_vbase): Return the virtual base's binfo.
11098         * typeck.c (get_delta_difference): Adjust handling of virtual
11099         bases.
11100
11101 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
11102
11103         * tree.c (struct list_hash): Remove.
11104         (list_hash_table): Make it be an htab.
11105         (struct list_proxy): New type.
11106         (list_hash_eq): New function.
11107         (list_hash_pieces): Renamed from ...
11108         (list_hash): ... this.
11109         (list_hash_lookup): Remove.
11110         (list_hash_add): Remove.
11111         (hash_tree_cons): Use the generic hashtable.
11112         (mark_list_hash): Remove.
11113         (init_tree): Create the hashtable.
11114
11115 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
11116
11117         * method.c (build_mangled_C9x_name): Rename to
11118         build_mangled_C99_name.  Change C9X references in comments to
11119         refer to C99.
11120
11121 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
11122
11123         * parse.y (unary_expr): Move VA_ARG from here ...
11124         (primary): ... to here.
11125
11126 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
11127
11128         * semantics.c (finish_id_expr): If type is error_mark, return
11129         error_mark.
11130
11131 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
11132
11133         * pt.c (lookup_template_class): Simplify loop exit constructs.
11134         Cope when there is no partial instantiation of a template
11135         template member.
11136
11137 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
11138
11139         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
11140
11141 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
11142
11143         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
11144         prefix.
11145
11146         * pt.c (do_decl_instantiate): Explicitly clone constructors and
11147         destructors that haven't already been cloned.
11148
11149 2000-11-20  Richard Henderson  <rth@redhat.com>
11150
11151         * parse.y (yyparse_1): Rename the parser entry point.
11152
11153 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
11154
11155         * mangle.c (write_name): Use <unscoped-name> for names directly in
11156         function scope.
11157         (write_unscoped_name): Accept names directly in function scope.
11158
11159 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
11160
11161         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
11162         * parse.y (extdef): Add EXPORT reduction.
11163         * spew.c (yylex): Don't skip export here.
11164
11165 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
11166
11167         * decl.c (init_decl_processing): Correct name of pure virtual
11168         function under the new ABI.
11169         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
11170         (throw_bad_typeid): Likewise for bad typeid function.
11171
11172 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
11173
11174         * decl.c (grokparms): Don't even function types of `void' type,
11175         either.
11176         * mangle.c (write_type): Don't crash when confronted with the
11177         error_mark_node.
11178
11179         * decl.c (grokparms): Don't create parameters of `void' type.
11180
11181 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
11182
11183         * lex.c (mark_impl_file_chain): Delete.
11184         (init_parse): Remove call to ggc_add_string_root.  No need to
11185         ggc_strdup a string constant.  Do not add impl_file_chain to GC
11186         roots.
11187         (handle_pragma_implementation): No need to ggc_strdup main_filename.
11188
11189 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
11190
11191         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
11192
11193 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
11194
11195         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
11196         * decl.c (grokdeclarator): Don't reject void parms here.
11197         (require_complete_types_for_parms): Simplify, use
11198         complete_type_or_else.
11199         (grokparms): Remove bitrot. Remove funcdef parm.
11200         Deal with ellipsis parm lists here.
11201         * semantics.c (finish_parmlist): Don't append void_list_node
11202         here. Set PARMLIST_ELLIPSIS_P.
11203
11204 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
11205
11206         * typeck2.c (incomplete_type_error): Reorganize to avoid
11207         excessive diagnostics.
11208
11209 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
11210
11211         * lex.c (struct impl_files, internal_filename): Constify a char *.
11212
11213 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
11214
11215         * mangle.c (write_special_name_constructor): Don't generate
11216         assembler junk when confronted with an old-style constructor.
11217         (write_special_name_destructor): Likewise.
11218         (mangle_decl_string): Do it here instead.
11219
11220 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
11221
11222         * call.c (op_error): Make error messages clearer.
11223
11224 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
11225
11226         * decl.c (wrapup_globals_for_namespace): Don't mark things
11227         TREE_ASM_WRITTEN when they're not.
11228
11229 2000-11-15  Jason Merrill  <jason@redhat.com>
11230
11231         * typeck2.c (friendly_abort): Uncount the error before handing
11232         off to fancy_abort.
11233
11234 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
11235
11236         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
11237
11238 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
11239
11240         * class.c (build_vtbl_initializer): Fix typo in comment.
11241         * typeck.c (expr_sizeof): Don't crash on errors.
11242
11243 2000-11-14  Jim Wilson  <wilson@redhat.com>
11244
11245         * lang-specs.h: Add %2 after %(cc1_options).
11246
11247 2000-11-14  Richard Henderson  <rth@redhat.com>
11248
11249         * typeck.c (c_sizeof): Be strict about casting result value
11250         back to c_size_type_node.
11251         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
11252
11253 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
11254
11255         * typeck.c (build_unary_op): Use boolean_increment from
11256         c-common.c, moving the relevant code there.
11257
11258 2000-11-11  Jason Merrill  <jason@redhat.com>
11259
11260         * typeck.c (mark_addressable): Don't call put_var_into_stack.
11261
11262         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
11263         in inlines.
11264
11265 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11266
11267         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
11268         * lex.c (copy_lang_decl): Likewise.
11269
11270 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
11271
11272         * dump.c (cp_dump_tree): Don't dump function bodies here.
11273
11274         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
11275         (dump.o): Update dependency list.
11276         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
11277         (flag_dump_translation_unit): Likewise.
11278         (CP_TYPE_QUALS): Adjust definition.
11279         (DECL_C_BIT_FIELD): Remove.
11280         (SET_DECL_C_BIT_FIELD): Likewise.
11281         (CLEAR_DECL_C_BIT_FIELD): Likewise.
11282         (add_maybe_template): Likewise.
11283         (strip_array_types): Likewise.
11284         (dump_node_to_file): Likewise.
11285         (cp_dump_tree): New function.
11286         * decl.c (init_decl_processing): Set lang_dump_tree.
11287         * decl2.c (flag_dump_translation_unit): Remove.
11288         * dump.c: Move most of it to ../c-dump.c.
11289         (cp_dump_tree): New function.
11290         * pt.c (add_maybe_template): Remove.
11291         * typeck.c (strip_array_types): Likewise.
11292
11293 2000-11-07  Eric Christopher  <echristo@redhat.com>
11294
11295         * decl.c (init_decl_processing): Change definition of
11296         __wchar_t to wchar_t.  Remove artificial declaration of
11297         wchar_t.
11298         * lex.c: Change instances of __wchar_t to wchar_t.
11299
11300 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
11301
11302         * lex.c (do_identifier): Don't lookup_name for operators.
11303         * parse.y (operator): Save looking_for_typename.
11304         (unoperator): Restore it.
11305         * spew.c (frob_opname): Use nth_token for lookahead.
11306
11307 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
11308
11309         * decl.c (grok_op_properties): Always use coerce_new_type and
11310         coerce_delete_type.
11311         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
11312         exception specification. Tidy up.
11313         (coerce_delete_type): Preserve exception specification. Tidy up.
11314
11315 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
11316
11317         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
11318         (push_binding_level), error.c (cp_tree_printer), pt.c
11319         (process_partial_specialization, tsubst_template_arg_vector),
11320         search.c (lookup_member): Use memset () instead of bzero ().
11321
11322 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
11323
11324         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
11325
11326 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
11327
11328         * Make-lang.in (c++.distdir): Remove.
11329
11330 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
11331
11332         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
11333         declarations from different namespaces to be combined.
11334
11335 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
11336
11337         * decl.c: Include tm_p.h.
11338
11339 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
11340
11341         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
11342
11343 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11344
11345         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
11346         (build_overload_value), repo.c (open_repo_file), xref.c
11347         (open_xref_file): Use strchr () and strrchr () instead of index ()
11348         and rindex ().
11349
11350 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
11351
11352         * call.c (build_over_call): Call fold on the CALL_EXPR.
11353
11354 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
11355
11356         * error.c (dump_template_decl): Separate template hearders with
11357         space not comma.
11358
11359 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
11360
11361         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
11362         TS_* flags with corresponding TFF_*.  Adjust prototypes of
11363         functions (which used to take a tree_string_flags) to take an int.
11364
11365         * cp-tree.h (enum tree_string_flags): Remove
11366         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
11367         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
11368         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
11369         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
11370         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
11371         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
11372         (type_as_string, decl_as_string, expr_as_string,
11373         context_as_string): Adjust prototype.
11374
11375         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
11376         instead of TS_PLAIN.
11377
11378         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
11379         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
11380         plain `0'.
11381
11382 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
11383
11384         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
11385         (linkage_kind): New enumeration.
11386         (decl_linkage): New function.
11387         * decl2.c (comdat_linkage): Extend comment.
11388         * error.c (dump_function_decl): Print the arguments used to
11389         instantiate a template, even when not printing the type of the
11390         function.
11391         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
11392         not TREE_PUBLIC, to test for external linkage.
11393         * tree.c (decl_linkage): New function.
11394
11395 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
11396
11397         * pt.c (instantiate_decl): Always instantiate static data members
11398         initialized in-class.
11399
11400 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
11401
11402         * Make-lang.in: Move all build rules here from Makefile.in,
11403         adapt to new context.  Wrap all rules that change the current
11404         directory in parentheses.  Expunge all references to $(P).
11405         When one command depends on another and they're run all at
11406         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
11407         all object-file generation rules.  Delete obsolete variables.
11408
11409         * Makefile.in: Delete.
11410         * config-lang.in: Delete outputs= line.
11411
11412 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
11413
11414         * error.c (dump_function_decl): Print no space between
11415         `ptr-operator' the `type-specifier' of the return type.
11416         (dump_type_prefix): Make sure we put space at the appropriate
11417         place.
11418
11419 2000-10-23  Jason Merrill  <jason@redhat.com>
11420
11421         * call.c (equal_functions): Also call decls_match for extern "C" fns.
11422
11423 2000-10-22  Jason Merrill  <jason@redhat.com>
11424
11425         * call.c (build_conditional_expr): Use ocp_convert to force
11426         rvalue conversion.
11427
11428 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
11429
11430         * call.c (standard_conversion): Use RVALUE_CONVs for all
11431         expressions that satisfy lvalue_p, not just those that satisfy
11432         real_lvalue_p.
11433
11434         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
11435
11436         * typeck.c (c_sizeof): Return an expression of `size_t' type,
11437         not one with TYPE_IS_SIZETYPE set.
11438         (dubious_conversion_warnings): Remove special-case code.
11439
11440 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
11441
11442         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
11443         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
11444         (dump_type_prefix): Print vector-of-int as 'int vector'.
11445         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
11446         * tree.c (walk_tree): Handle VECTOR_TYPE.
11447
11448         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
11449
11450 2000-10-21  Jason Merrill  <jason@redhat.com>
11451
11452         * parse.y (operator): Set got_object from got_scope.
11453         Set looking_for_typename.
11454         * decl.c (lookup_name_real): Clear val after setting from_obj.
11455         Reorganize diagnostic.
11456
11457 2000-10-20  Jason Merrill  <jason@redhat.com>
11458
11459         * tree.c (walk_tree): Don't walk into default args.
11460
11461         * error.c (dump_expr): Use host_integerp.
11462
11463 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
11464
11465         * typeck2.c (abstract_virtuals_error): Use "because" instead of
11466         "since" in error message.
11467
11468 2000-10-20  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11469
11470         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
11471
11472 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
11473
11474         * decl.c (revert_static_member_fn): Fixed typo.
11475
11476 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
11477
11478         * class.c (subobject_offset_fn): New type.
11479         (dfs_record_base_offsets): Remove.
11480         (record_base_offsets): Likewise.
11481         (dfs_search_base_offsets): Likewise.
11482         (record_subobject_offset): New function.
11483         (check_subobject_offset): Likewise.
11484         (walk_subobject_offsets): Likewise.
11485         (record_subobject_offsets): Likewise.
11486         (layout_conflict_p): Reimplement.
11487         (layout_nonempty_base_or_field): Correct handling of type
11488         conflicts during layout.
11489         (layout_empty_base): Likewise.
11490         (build_base_field): Adjust to handle new representation of empty
11491         base offset table.
11492         (build_base_fields): Likewise.
11493         (layout_virtual_bases): Likewise.
11494         (splay_tree_compare_integer_csts): New function.
11495         (layout_class_type): Use a splay_tree, rather than a varray, to
11496         represent the offsets of empty bases.
11497
11498         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
11499         * decl.c (select_decl): Don't return declarations that are
11500         DECL_ANTICIPATED.
11501
11502 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
11503
11504         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
11505         (fake_std_node): New macro.
11506         * decl.c (in_std): Rename to ...
11507         (in_fake_std): ... this.
11508         (flag_no_builtin): Remove.
11509         (flag_no_nonansi_builtin): Likewise.
11510         (walk_namespaces_r): Use fake_std_node.
11511         (push_namespace): Use std_identifier.
11512         (pop_namespace): Use in_fake_std.
11513         (lookup_name_real): Use fake_std_node.
11514         (init_decl_processing): When -fhonor-std, create the `std'
11515         namespace.  Don't create a dummy fake_std_node in that case.
11516         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
11517         (builtin_function): Put builtins whose names don't begin
11518         with `_' in the std namespace.
11519         * decl2.c (flag_no_builtin): Remove.
11520         (flag_no_nonansi_builtin): Likewise.
11521         (set_decl_namespace): Use fake_std_node.
11522         (validate_nonmember_using_decl): Likewise.
11523         (do_using_directive): Likewise.
11524         (handle_class_head): Likewise.
11525         * dump.c (dequeue_and_dump): Likewise.
11526         * except.c (init_exception_processing): Use std_identifier.
11527         * init.c (build_member_call): Use fake_std_node.
11528         * rtti.c (init_rtti_processing): Use std_identifier.
11529
11530 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
11531
11532         * cp-tree.h (back_end_hook): Remove declaration.
11533         * decl2.c (back_end_hook): Remove definition.
11534
11535         * dump.c (dequeue_and_dump): Dump TREE_USED.
11536
11537 2000-10-17  Brad Lucier <lucier@math.purdue.edu>
11538
11539         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
11540
11541 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
11542
11543         * decl.c (WINT_TYPE): Define.
11544         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
11545         c_size_type_node, signed_size_type_node and wint_type_node.
11546
11547 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
11548
11549         * decl2.c (warn_missing_format_attribute): New variable.
11550         (lang_decode_option): Decode -Wmissing-format-attribute.
11551
11552 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
11553
11554         * typeck.c (qualify_type): Remove.
11555         (composite_pointer_type): Fix handling of conversions to `cv void*'.
11556
11557 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11558
11559         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
11560
11561 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11562
11563         * Makefile.in (parse.c, parse.h): Create atomically.
11564
11565 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
11566
11567         * class.c (current_obstack): Remove.
11568         * decl.c (ggc_p): Remove.
11569         (start_decl): Don't use decl_tree_cons.
11570         (grokdeclarator): Don't use build_decl_list.
11571         (start_function): Don't use decl_tree_cons.
11572         (finish_function): Don't mess with obstacks.
11573         * decl2.c (grok_x_components): Don't use build_decl_list.
11574         * lex.c (make_call_declarator): Don't call decl_tree_cons.
11575         (implicitly_declare_fn): Don't call build_decl_list.
11576         * parse.y (frob_specs): Don't call build_decl_list or
11577         decl_tree_cons.
11578         (expr_or_declarator_intern): Don't call decl_tree_cons.
11579         (primary): Don't call build_decl_list.
11580         (fcast_or_absdcl): Likewise.
11581         (typed_declspecs): Don't call decl_tree_cons.
11582         (reserved_declspecs): Don't call build_decl_list.
11583         (declmods): Likewise.
11584         (reserved_typespecquals): Likewise.
11585         (aggr): Likewise.
11586         (new_type_id): Likewise.
11587         (cv_qualifiers): Likewise.
11588         (after_type_declarator_intern): Likewise.
11589         (notype_declarator_intern): Likewise.
11590         (absdcl_intern): Likewise.
11591         (named_parm): Likewise.
11592         * pt.c (most_specialized_class): Likewise.
11593         * repo.c (temporary_obstack): Make it a structure, not a pointer.
11594         (init_repo): Initialize it.
11595         * search.c (current_obstack): Remove.
11596         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
11597
11598 2000-10-09  Richard Henderson  <rth@cygnus.com>
11599
11600         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
11601         (c++ language support bits for libgcc): Remove.
11602         (c++.clean): Remove cplib2.txt cleanup.
11603         * config-lang.in (headers, lib2funcs): Remove.
11604
11605         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
11606         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
11607         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
11608         * inc/new.h, inc/typeinfo: Remove files.
11609
11610 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
11611
11612         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
11613         defined.
11614         (init_decl_processing): Initialize intmax_type_node and
11615         uintmax_type_node.
11616
11617 2000-10-06  Richard Henderson  <rth@cygnus.com>
11618
11619         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
11620         (original_result_rtx): Remove.
11621         * decl.c (save_function_data): Don't clear x_result_rtx.
11622         (mark_lang_function): Don't mark it either.
11623         * expr.c (fixup_result_decl): Remove.
11624         * semantics.c (genrtl_named_return_value): Frob the return decl
11625         before calling emit_local_var.
11626         (genrtl_finish_function): Don't call fixup_result_decl.
11627         Always emit the jump to return_label.
11628
11629 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
11630
11631         * pt.c (lookup_template_class): Set current access for enum.
11632         (tsubst_enum): Set file & line for enum decl.
11633
11634         * spew.c (yylex): Remove unused variable.
11635
11636 2000-10-05  Richard Henderson  <rth@cygnus.com>
11637
11638         * semantics.c (genrtl_finish_function): Don't init or check
11639         can_reach_end; remove noreturn and return value checks.
11640
11641 2000-10-05  Tom Tromey  <tromey@cygnus.com>
11642
11643         * init.c (build_java_class_ref): Use `build_static_name' with a
11644         suffix, not a prefix, to build the class object's name.
11645
11646 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11647
11648         * cp-tree.h (access_kind): Fix comment typo.
11649         * decl2.c (grokfield): Fix diagnostic typo.
11650         * semantics.c (finish_template_type): Fix comment typo.
11651         (finish_qualified_object_call_expr): Likewise.
11652
11653 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11654
11655         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
11656         tsubsting fails.
11657
11658 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11659
11660         * spew.c (frob_id): New static function.
11661         (frob_opname): Use it.
11662         (yylex): Use it.
11663
11664 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
11665
11666         * decl.c (lang_mark_false_label_stack): Remove.
11667         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
11668
11669 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
11670
11671         * gxxint.texi: Use @email for formatting email addresses.
11672
11673 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
11674
11675         * error.c: Remove direct obstack manipulation.  Replace with
11676         output_buffer-based formatting.  Adjust calls to removed macros.
11677         (obstack_chunk_alloc, obstack_chunk_free): Remove.
11678         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
11679         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
11680
11681 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
11682
11683         * ir.texi: Move to ../c-tree.texi.
11684
11685 2000-09-20  Jason Merrill  <jason@redhat.com>
11686
11687         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
11688
11689 2000-09-21  Andreas Jaeger  <aj@suse.de>
11690
11691         * errfn.c: Move declaration of cp_printer and cp_printers to ...
11692         * cp-tree.h: ... here.
11693
11694         * error.c: Remove declaration of cp_printer.
11695
11696 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
11697
11698         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
11699
11700 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
11701
11702         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
11703         users.
11704
11705 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
11706
11707         * decl.c (start_function): Robustify.
11708
11709 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11710
11711         * cp-tree.h (check_function_format): Accept a `status' parameter.
11712
11713         * call.c, typeck.c: Updates calls to `check_function_format'.
11714
11715 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
11716
11717         * decl2.c (handle_class_head): Always push some scope even
11718         in the error case.
11719
11720 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
11721
11722         * cp-tree.h (struct cp_language_function): Remove
11723         x_scope_stmt_stack and name_declared.
11724         (current_scope_stmt_stack): Remove.
11725         (function_name_declared_p): New macro.
11726         (struct lang_decl_flags): Use c_lang_decl as a base class.
11727         (context): Remove.
11728         (struct lang_decl): Replace saved_tree with context.
11729         (DECL_FRIEND_CONTEXT): Adjust accordingly.
11730         (SET_DECL_FRIEND_CONTEXT): Likewise.
11731         (DECL_VIRTUAL_CONTEXT): Likewise.
11732         (DECL_SAVED_TREE): Remove.
11733         (C_DECLARED_LABEL_FLAG): Likewise.
11734         (cplus_expand_expr_stmt): Don't declare.
11735         (add_decl_stmt): Likewise.
11736         (add_scope_stmt): Likewise.
11737         * decl.c (mark_stmt_tree): Remove.
11738         (case_compare): Likewise.
11739         (finish_case_label): Use c_add_case_label.
11740         (init_decl_processing): Set more language-specific hooks.
11741         (build_enumerator): Fix typo in comment.
11742         (cplus_expand_expr_stmt): Remove.
11743         (mark_lang_function): Use mark_c_language_function.
11744         (lang_mark_tree): Use c_mark_lang_decl.
11745         * decl2.c: Change order of inclusion.
11746         * except.c: Likewise.
11747         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
11748         back on c_expand_expr.
11749         * friend.c: Include expr.h.
11750         * init.c: Change order of inclusion.
11751         * Makefile.in: Update dependencies.
11752         * lex.h (free_lang_decl_chain): Remove.
11753         * optimize.c (maybe_clone_body): Use function_name_declared_p.
11754         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
11755         it doesn't exist.
11756         (instantiate_decl): Use function_name_declared_p.
11757         * semantics.c (lang_expand_expr_stmt): Remove.
11758         (set_current_function_name_declared): Likewise.
11759         (current_function_name_declared): Likewise.
11760         (begin_compound_stmt): Use function_name_declared_p.
11761         (add_decl_stmt): Remove.
11762         (setup_vtbl_ptr): Use function_name_declared_p.
11763         (add_scope_stmt): Remove.
11764         (current_scope_stmt_stack): New function.
11765         (cp_expand_stmt): Don't handle SCOPE_STMTs.
11766         (expand_body): Use function_name_declared_p.
11767         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
11768         * typeck.c: Change order of includes.
11769         (convert_sequence): Remove.
11770
11771 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
11772
11773         * lex.c (reswords): Add _Complex.
11774
11775 2000-09-14  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11776
11777         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
11778
11779 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
11780
11781         * init.c (begin_init_stmts): Don't use // comments.
11782
11783 2000-09-12  Jason Merrill  <jason@redhat.com>
11784
11785         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
11786         all non-extern arrays.
11787
11788         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
11789         typenames, too.  Downgrade complaint to pedwarn.
11790         (xref_tag): Warn about surprising behavior of 'friend struct T'.
11791         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
11792         'class This::Inherited'.
11793
11794 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
11795
11796         * decl.c (finish_case_label): Given the LABEL_DECL a
11797         DECL_CONTEXT.
11798
11799 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
11800
11801         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
11802         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
11803         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
11804         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
11805         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
11806         New macros.
11807         (sorry_for_unsupported_tree, print_scope_operator,
11808         print_left_paren, print_right_paren, print_left_bracket,
11809         print_right_bracket, print_whitespace): Likewise.
11810         (aggr_variety): Rename to class_key_or_enum.
11811         (print_type): Rename to print_type_id.
11812         (print_type_specifier_seq, print_simple_type_specifier,
11813         print_elaborated_type_specifier,
11814         print_rest_of_abstract_declarator,
11815         print_parameter_declaration_clause, print_exception_specification,
11816         print_nested_name_specifier, print_template_id,
11817         typedef_original_name,  print_template_argument_list_start,
11818         print_template_argument_list_end): New functions.
11819
11820 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
11821
11822         * ir.texi: Add more documentation.
11823
11824 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
11825
11826         * cp-tree.h (struct saved_scope): Remove x_function_parms.
11827         (current_function_parms): Don't define.
11828         (struct cp_language_function): Remove parms_stored.
11829         (current_function_just_assigned_this): Don't define.
11830         (current_function_parms_stored): Likewise.
11831         (static_ctors): Declare.
11832         (static_dtors): Likewise.
11833         (SF_EXPAND): Don't define.
11834         (expand_start_early_try_stmts): Remove declaration.
11835         (store_parm_decls): Likewise.
11836         * decl.c (static_ctors): Don't declare.
11837         (static_dtors): Likewise.
11838         (struct binding_level): Remove this_block.
11839         (poplevel): Remove dead code.
11840         (set_block): Likewise.
11841         (mark_binding_level): Don't mark this_block.
11842         (mark_saved_scope): Don't mark x_function_parms.
11843         (init_decl_processing): Don't add current_function_parms as a GC
11844         root.
11845         (check_function_type): Change prototype.
11846         (start_function): Remove RTL-generation code.
11847         (expand_start_early_try_stmts): Remove.
11848         (store_parm_decls): Give it internal linkage.  Remove
11849         RTL-generation code.
11850         (finish_function): Remove RTL-generation code.
11851         * decl2.c (static_ctors): Fix formatting.
11852         (static_dtors): Likewise.
11853         * method.c (use_thunk): Don't call store_parm_decls.
11854         (synthesize_method): Likewise.
11855         * optimize.c (maybe_clone_body): Likewise.
11856         * parse.y (fn.def2): Likewise.
11857         (.set_base_init): Likewise.
11858         (nodecls): Likewise.
11859         * pt.c (instantiate_decl): Likewise.
11860         * rtti.c (synthesize_tinfo_fn): Likewise.
11861         * semantics.c (genrtl_try_block): Simplify.
11862         (expand_body): Use genrtl_start_function and
11863         genrtl_finish_function.
11864         (genrtl_start_function): New function.
11865         (genrtl_finish_function): Likewise.
11866
11867 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
11868
11869         * error.c (cp_tree_printer, case 'P'): Append break.
11870
11871 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
11872
11873         * cp-tree.h (frob_opname): Declare.
11874         * parse.y (saved_scopes): New static variable.
11875         (cp_parse_init): Adjust.
11876         (do_id): If lastiddecl is NULL, do do_identifier.
11877         (operator): Save scope information.
11878         (unoperator): New reduction. Restore scope information.
11879         (operator_name): Append unoperator. Call frob_opname.
11880         * spew.c (frob_opname): Define.
11881
11882 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
11883
11884         * decl.c, rtti.c: Include defaults.h if not already included.
11885         Don't define the *_TYPE_SIZE macros.
11886
11887 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
11888
11889         * cp-tree.h (push_switch): Change prototype.
11890         (check_cp_case_value): Remove declaration.
11891         (decl_constant_value): Likewise.
11892         * decl.c (struct cp_switch): Add switch_stmt and cases.
11893         (case_compare): New function.
11894         (push_switch): Set switch_stmt.  Initialize cases.
11895         (pop_switch): Clean up cases.
11896         (define_case_label): Rename to ...
11897         (finish_case_label): ... this.  Do semantic analysis for case
11898         labels here.
11899         (start_function): Correct comment.
11900         * decl2.c (check_cp_case_value): Remove.
11901         * expr.c (do_case): Remove.
11902         * pt.c (tsubst_expr): Adjust call to finish_case_label.
11903         * semantics.c (genrtl_do_poplevel): Remove declaration.
11904         (RECHAIN_STMTS): Remove.
11905         (finish_break_stmt): Use build_break_stmt.
11906         (finish_continue_stmt): Use build_continue_stmt.
11907         (finish_switch_cond): Adjust condition here, rater than in
11908         c_expand_start_case.
11909         (finish_case_label): Remove.
11910         * typeck.c (c_expand_return): Remove.
11911         (c_expand_start_case): Likewise.
11912
11913 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
11914
11915         * ir.texi: Document type nodes.
11916
11917 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
11918
11919         * cp-tree.h (init_cp_semantics): Declare.
11920         (genrtl_try_block): Don't declare.
11921         (genrtl_handler): Likewise.
11922         (genrtl_catch_block): Likewise.
11923         (genrtl_ctor_stmt): Likewise.
11924         (genrtl_subobject): Likewise.
11925         (genrtl_do_poplevel): Likewise.
11926         (genrtl_named_return_value): Likewise.
11927         * lex.c (init_parse): Call init_cp_semantics.
11928         * semantics.c (genrtl_try_block): Give it internal linkage.
11929         (genrtl_handler): Likewise.
11930         (genrtl_catch_block): Likewise.
11931         (genrtl_ctor_stmt): Likewise.
11932         (genrtl_subobject): Likewise.
11933         (genrtl_do_poplevel): Likewise.
11934         (genrtl_named_return_value): Likewise.
11935         (lang_expand_stmt): Rename to ...
11936         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
11937         (init_cp_semantics): Define.
11938
11939         * decl.c (initialize_local_var): Remove RTL-generating code.
11940         * semantics.c (genrtl_try_block): Fix formatting.
11941
11942         Move statement-tree facilities from C++ to C front-end.
11943         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
11944         (void_zero_node): Remove.
11945         (stmt_tree): Likewise.
11946         (scope_chain): Adjust.
11947         (language_function): Rename to cp_language_function.
11948         (cp_function_chain): Adjust.
11949         (current_stmt_tree): Remove.
11950         (last_tree): Likewise.
11951         (last_expr_type): Likewise.
11952         (struct lang_decl): Adjust.
11953         (STMT_IS_FULL_EXPR_P): Remove.
11954         (add_tree): Remove.
11955         (begin_stmt_tree): Likewise.
11956         (finish_stmt_tree): Likewise.
11957         (walk_tree_fn): Likewise.
11958         (walk_stmt_tree): Likewise.
11959         * class.c (finish_struct): Replace use of add_tree with add_stmt.
11960         * decl.c (mark_stmt_tree): Adjust type.
11961         (init_decl_processing): Don't build void_zero_node.
11962         (initialize_local_var): Adjust usage of current_stmt_tree.
11963         (finish_enum): Use add_stmt, not add_tree.
11964         (save_function_data): Adjust use of language_function.
11965         (finish_constructor_body): Use add_stmt, not add_tree.
11966         (finish_destructor_body): Likewise.
11967         (push_cp_function_context): Adjust use of language_function.
11968         (pop_cp_function_context): Likewise.
11969         (mark_lang_function): Likewise.
11970         (mark_cp_function_context): Likewise.
11971         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
11972         (build_vec_init): Likewise.
11973         * semantics.c (SET_LAST_STMT): Remove.
11974         (RECHAIN_STMTS): Don't use it.
11975         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
11976         (current_stmt_tree): Define.
11977         (add_tree): Remove.
11978         (finish_goto_stmt): Use add_stmt, not add_tree.
11979         (finish_expr_stmt): Likewise.
11980         (begin_if_stmt): Likewise.
11981         (finish_then_clause): Likewise.
11982         (begin_while_stmt): Likewise.
11983         (begin_do_stmt): Likewise.
11984         (finish_return_stmt): Likewise.
11985         (begin_for_stmt): Likewise.
11986         (finish_break_stmt): Likewise.
11987         (finish_continue_stmt): Likewise.
11988         (begin_switch_stmt): Likewise.
11989         (finish_case_label): Likewise.
11990         (begin_try_block): Likewise.
11991         (begin_function_try_block): Likewise.
11992         (begin_handler): Likewise.
11993         (begin_catch_block): Likewise.
11994         (begin_compound_stmt): Likewise.
11995         (begin_asm_stmt): Likewise.
11996         (finish_asm_stmt): Likewise.
11997         (finish_label_stmt): Likewise.
11998         (add_decl_stmt): Likewise.
11999         (finish_subobject): Likewise.
12000         (finish_decl_cleanup): Likewise.
12001         (finish_named_return_value): Likewise.
12002         (setup_vtbl_ptr): Likewise.
12003         (add_scope_stmt): Likewise.
12004         (finish_stmt_expr): Likewise.
12005         (prune_unused_decls): Remove.
12006         (begin_stmt_tree): Likewise.
12007         (finish_stmt_tree): Likewise.
12008         (prep_stmt): Adjust use of current_stmt_tree.
12009         (lang_expand_stmt): Likewise.
12010         * tree.c (statement_code_p): Remove.
12011         (cp_statement_code_p): New function.
12012         (walk_stmt_tree): Remove.
12013         (init_tree): Set lang_statement_code_p.
12014
12015 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
12016
12017         Integrated preprocessor.
12018
12019         * Make-lang.in, Makefile.in: Remove all references to input.c,
12020         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
12021         * gxx.gperf, hash.h, input.c: Delete.
12022         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
12023         initialized properly.
12024
12025         * class.c (fixup_pending_inline): Take a tree, not a
12026         struct pending_inline *.  All callers changed.
12027         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
12028         RID_PROTECTED entries in ridpointers[] array here.
12029         * decl.c (duplicate_decls): Do not refer to struct
12030         pending_inline.
12031         (record_builtin_type, init_decl_processing): Use RID_MAX not
12032         CP_RID_MAX.
12033         (grokdeclarator): Use C_IS_RESERVED_WORD.
12034         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
12035         cpplib.
12036         (grok_x_components): Do not inspect pending_inlines chain.
12037
12038         * cp-tree.h (struct lang_identifier): Add rid_code entry.
12039         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
12040         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
12041         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
12042         TIME_IDENTIFIER_FILEINFO): Kill.
12043         Update prototypes.
12044         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
12045         single 32-bit word.
12046         * parse.y: Call do_pending_inlines unconditionally.
12047         reinit_parse_for_method is now snarf_method.  fn.defpen is no
12048         longer necessary.  Remove unnecessary <itype> annotation on
12049         SCOPE.  Do not refer to end_of_file or struct pending_inline.
12050         * semantics.c (begin_inline_definitions): Call
12051         do_pending_inlines unconditionally.
12052
12053         * lex.c: Remove all code now shared with C front end.
12054         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
12055         into the get_identifier table.  Rewrite pragma handling to
12056         work with the registry.  Move code to save tokens for later
12057         processing to spew.c.
12058
12059         * spew.c: Rewrite everything in terms of token streams instead
12060         of text.  Move routines here from lex.c / input.c as
12061         appropriate.  GC-mark trees hanging off the pending inlines
12062         chain.
12063
12064 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
12065
12066         * NEWS: Mention that the named return value extension has been
12067         deprecated.
12068         * cp-tree.h (original_result_rtx): Define.
12069         (TREE_REFERENCE_EXPR): Remove.
12070         (DECL_VPARENT): Likewise.
12071         (pushdecl_nonclass_level): Likewise.
12072         (store_return_init): Likewise.
12073         (reinit_lang_specific): Likewise.
12074         (genrtl_named_return_value): Change prototype.
12075         * decl.c (original_result_rtx): Remove.
12076         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
12077         Do not generate RTL for local variables here.
12078         (store_return_init): Remove.
12079         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
12080         store_return_init.
12081         (finish_named_return_value): Adjust accordingly.  Warn that this
12082         extension is deprecated.
12083         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
12084
12085 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12086
12087         * pt.c (type_unification_real): Replace switch with if.
12088         (unify): Tsubst non-type parms before comparing.
12089
12090 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12091
12092         * error.c (dump_typename): New function, broken out of ...
12093         (dump_type): ... here. Use it.
12094         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
12095
12096 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12097
12098         * init.c (build_offset_ref): Deal with namespace scoped
12099         TEMPLATE_ID_EXPRs.
12100
12101 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12102
12103         * class.c (resolve_address_of_overloaded_function): Add
12104         explanation message.
12105         * decl.c (define_case_label): Reformat explanation.
12106         * decl2.c (finish_static_data_member_decl): Likewise.
12107         (grokfield): Likewise.
12108         * friend.c (do_friend): Likewise.
12109
12110 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
12111
12112         * tree.c (walk_tree): Expose tail recursion.
12113         (walk_stmt_tree): New function.
12114         * cp-tree.h: Prototype walk_stmt_tree.
12115         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
12116         the BLOCKs directly.  If a BLOCK has no variables after
12117         pruning, discard it.
12118         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
12119         restore the line number.
12120
12121 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
12122
12123         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
12124         (pt.o): Remove dependency on HTAB_H.
12125         * cp-tree.h: Include hashtab.h.
12126         (walk_tree): Change prototype.
12127         (walk_tree_without_duplicates): New function.
12128         * decl.c (check_default_argument): Use it.
12129         * optimize.c (remap_decl): Adjust calls to walk_tree.
12130         (copy_body): Likewise.
12131         (expand_calls_inline): Likewise.
12132         (calls_setjmp_p): Use walk_tree_without_duplicates.
12133         * pt.c: Don't include hashtab.h.
12134         (for_each_template_parm): Use walk_tree_without_duplicates.
12135         * semantics.c (finish-stmt_tree): Likewise.
12136         (expand_body): Likewise.
12137         * tree.c (walk_tree): Add additional parameter.
12138         (walk_tree_without_duplicates): New function.
12139         (count_trees): Use it.
12140         (verify_stmt_tree): Adjust call to walk_tree.
12141         (find_tree): Use walk_tree_without_duplicates.
12142         (no_linkage_check): Likewise.
12143         (break_out_target_exprs): Adjust call to walk_tree.
12144         (cp_unsave): Likewise.
12145
12146 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12147
12148         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
12149         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
12150         * cp-tree.h (TYPE_BINFO): Adjust comment.
12151         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
12152         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
12153         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
12154         (TYPE_TEMPLATE_INFO): Likewise.
12155         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
12156         * class.c (push_nested_class): Likewise.
12157         * decl.c (lookup_name_real): Likewise.
12158         (grokdeclarator): Likewise.
12159         (grok_op_properties): Likewise.
12160         (xref_tag): Likewise.
12161         (xref_basetypes): Likewise.
12162         * decl2.c (constructor_name_full): Likewise.
12163         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
12164         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
12165         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
12166         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12167         (dump_type_suffix): Likewise.
12168         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
12169         instead.
12170         (get_aggr_from_typedef): Likewise.
12171         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
12172         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12173         (write_template_parm): Likewise.
12174         (write_template_template_parm): Check tree code instead of
12175         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12176         * method.c (build_overload_nested_name): Add
12177         BOUND_TEMPLATE_TEMPLATE_PARM.
12178         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
12179         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12180         * pt.c (convert_template_argument): Check tree code instead of
12181         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12182         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
12183         (for_each_template_parm): Adjust comment.
12184         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
12185         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12186         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
12187         template_args_equal to compare template template parameter cases.
12188         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12189         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
12190         instead.
12191         * tree.c (copy_template_template_parm): Decide whether to create
12192         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
12193         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12194         (copy_tree_r): Likewise.
12195         * typeck.c (comptypes): Likewise.  Check tree code instead of
12196         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12197
12198 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
12199
12200         * decl.c (finish_function): Move the code for handling functions
12201         marked with the constructor and destructor attributes inside the
12202         expand_p block.
12203
12204 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
12205
12206         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
12207
12208 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
12209
12210         * pt.c (lookup_template_class): Remove abort.
12211         * tree.c (get_type_decl): Allow error_mark_node.
12212
12213 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
12214
12215         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
12216         TEMPLATE_ID_EXPRs.
12217
12218 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
12219
12220         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
12221         new ABI mangling.
12222
12223 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
12224
12225         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
12226         union tag mismatch error reporting.
12227
12228 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
12229
12230         * call.c (build_scoped_method_call): Check it is not a namespace.
12231
12232 2000-08-30  Jason Merrill  <jason@redhat.com>
12233
12234         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
12235
12236         * tree.c (bot_manip): Check TREE_CONSTANT rather than
12237         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
12238         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
12239
12240         * decl.c (start_function): Always call make_function_rtl.
12241
12242 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
12243
12244         * semantics.c (prune_unused_decls): New function.
12245         (finish_stmt_tree): Call it via walk_tree.
12246
12247 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
12248
12249         * class.c (build_secondary_vtable): Constify a char *.
12250         * decl.c (init_decl_processing): Initialize function_id_node,
12251         pretty_function_id_node, and func_id_node.
12252         * input.c (struct input_source): Constify 'str'.
12253         (feed_input): Constify first argument.
12254         * mangle.c (write_identifier): Constify argument.
12255         * pt.c (mangle_class_name_for_template): Constify argument.
12256
12257 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
12258
12259         * typeck.c (mark_addressable): Remove code that pokes around in
12260         RTL.
12261
12262 2000-08-28  Jason Merrill  <jason@redhat.com>
12263
12264         * lex.c (file_name_nondirectory): Move to toplev.c.
12265
12266         * cp-tree.h (LOCAL_CLASS_P): New macro.
12267         * class.c (finish_struct_1): Use it.
12268
12269 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
12270
12271         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
12272         (write_encoding): Pass another argument to write_name.
12273         (write_name): Add ignore_local_scope parameter.  Fix handling of
12274         local names.
12275         (write_nested_name): Use write_unqualified_name.
12276         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
12277         (write_template_prefix): Use write_unqualified_name.
12278         (write_component): Remove.
12279         (write_local_name): Add parameter.  Use direct local entity to
12280         discriminator calculation.
12281         (write_class_enum_type): Pass another argument to write_name.
12282         (write_template_template_arg): Likewise.
12283         (make_guard_variable): Likewise.
12284
12285 2000-08-27  Jason Merrill  <jason@redhat.com>
12286
12287         * decl.c (pushdecl): Matching decls for local externs are found in
12288         the current level.  Propagate linkage information from previous
12289         declarations.
12290
12291 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
12292
12293         * ir.texi (Expressions): Fix typo.
12294
12295 2000-08-25  Greg McGary  <greg@mcgary.org>
12296
12297         * tree.c (init_tree): Use ARRAY_SIZE.
12298
12299 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
12300
12301         * error.c (cp_tree_printer): Rework.
12302
12303 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
12304
12305         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
12306         dyn-string.o.
12307         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
12308         (cp-demangle.o): Remove target.
12309         (dyn-string.o): Likewise.
12310
12311         * decl.c (grokfndecl): Require that `main' return an `int'.
12312         * mangle.c (write_encoding): Don't mangle return types for
12313         conversion functions.
12314
12315 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
12316
12317         * error.c (tree_formatting_info): New data type.
12318         (tree_being_formatted): New macro.
12319         (tree_formatting_flags): Likewise.
12320         (put_whitespace): Likewise.
12321         (print_tree_identifier): Likewise.
12322         (print_identifier): Likewise.
12323         (cp_tree_printer, print_function_argument_list, print_declaration,
12324         print_expression, print_function_declaration,
12325         print_function_parameter, print_type, print_cv_qualifier): New
12326         functions.
12327         (init_error): Initialize lang_printer.
12328
12329 2000-08-24  Jason Merrill  <jason@redhat.com>
12330
12331         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
12332         adjustment necessary.
12333
12334 2000-08-24  Greg McGary  <greg@mcgary.org>
12335
12336         * cp-tree.h (MAIN_NAME_P): Remove macro.
12337
12338 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
12339
12340         * error.c (print_instantiation_context): Don't forget to flush the
12341         buffer.
12342
12343 2000-08-23  Jason Merrill  <jason@redhat.com>
12344
12345         * typeck.c (build_ptrmemfunc): Save the input pmf.
12346
12347         * method.c (process_modifiers): Use same_type_p.
12348
12349 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
12350
12351         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
12352         * mangle.c (write_function_type): Change prototype.
12353         (write_encoding): Don't mangle return types for
12354         constructors or destructors.
12355         (write_type): Adjust call to write_function_type.
12356         * pt.c (instantiate_template): Instantiate alternate entry points
12357         when instantiating the main function.
12358
12359 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
12360
12361         * error.c (cp_print_error_function): Don't use embedded '\n' in
12362         output_printf.
12363
12364 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
12365
12366         * decl.c (init_decl_processing): Remove bogus initialization.
12367         * error.c (lang_print_error_function): Restore here.
12368         (init_error): Initialize print_error_function.
12369
12370 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
12371
12372         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
12373
12374 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
12375
12376         * Makefile.in (error.o): Depends on diagnostic.h
12377
12378         * cp-tree.h (problematic_instantiation_changed,
12379         record_last_problematic_instantiation, current_instantiation,
12380         print_instantiation_context): Declare.
12381         (maybe_print_template_context): Remove.
12382
12383         * decl.c (init_decl_processing): Set print_error_function to NULL.
12384         (lang_print_error_function): Remove, since we're using a new
12385         machinery.
12386
12387         * error.c: #include diagnostic.h
12388         (function_category): New function.
12389         (cp_diagnostic_starter): Likewise.
12390         (cp_diagnostic_finalizer): Likewise.
12391         (cp_print_error_function): Likewise.
12392         (maybe_print_instantiation_context): Likewise.
12393         (print_instantiation_full_context): Likewise.
12394         (print_instantiation_partial_context): Likewise.
12395         (print_instantiation_context): Define.
12396         (init_error): Initialize diagnostic pager and finalizer.
12397
12398         * pt.c (problematic_instantiation_changed): Define.
12399         (record_last_problematic_instantiation): Likewise.
12400         (current_instantiation): Likewise.
12401         (maybe_print_template_context): Remove.
12402         (print_template_context): Likewise.
12403         (current_tinst_level): Make static to reflect Brendan Kehoe's
12404         change of 1995-04-13.
12405         (push_tinst_level): Call print_instantiation_context.
12406
12407 2000-08-21  Nix  <nix@esperi.demon.co.uk>
12408
12409         * lang-specs.h: Do not process -o or run the assembler if
12410         -fsyntax-only.
12411
12412 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
12413
12414         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
12415         variables.
12416         * decl2.c (lang_decode_option): Disable gettext attributes for
12417         -ansi.
12418
12419 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
12420
12421         * lex.c (lang_init_options): Default diagnostic message maximum
12422         length to 80, when line-wrapping.
12423
12424 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
12425
12426         * class.c (build_vtbl_initializer): Clear the entire
12427         vtbl_init_data.  Start keeping track of the functions for which we
12428         have created vcall offsets here.
12429         (dfs_build_vcall_offset_vtbl_entries): Remove.
12430         (build_vcall_offset_vtbl_entries): Reimplement.
12431         (add_vcall_offset_vtbl_entries_r): New function.
12432         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
12433         computing when vcall offsets are necessary.
12434
12435 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12436
12437         * decl.c (member_function_or_else): Use cp_error ... %T.
12438         (grokdeclarator): Likewise.
12439         (start_method): Likewise.
12440         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
12441
12442 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12443
12444         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
12445         TYPE_DECLs.
12446
12447 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12448
12449         * cp-tree.h (PTRMEM_OK_P): New macro.
12450         (itf_ptrmem_ok): New enumeration value.
12451         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
12452         argument. Diagnose implicit pointer to member.
12453         (instantiate_type): Don't diagnose implicit pointer to member
12454         here. Pass itf_ptrmem_ok if ok. Adjust calls to
12455         resolve_address_of_overloaded_function.
12456         * init.c (build_offset_ref): Set PTRMEM_OK_P.
12457         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
12458         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
12459         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
12460         (build_unary_op): Deal with single non-static member in
12461         microsoft-land.
12462
12463 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12464
12465         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
12466
12467 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12468
12469         * cp-tree.h (enum_name_string): Remove prototype.
12470         (report_case_error): Remove prototype.
12471         * cp/typeck2.c (enum_name_string): Remove.
12472         (report_case_error): Remove.
12473         * error.c (dump_expr): Deal with enum values directly.
12474         Correctly negate integer constant.
12475
12476 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12477
12478         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
12479         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
12480         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
12481         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
12482         (__cxa_vec_new): Use __cxa_vec_new2.
12483         (__cxa_vec_delete): Use __cxa_vec_delete2.
12484
12485 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12486
12487         * vec.cc (__cxa_vec_new): Set "C" linkage.
12488         (__cxa_vec_ctor): Likewise.
12489         (__cxa_vec_cctor): Likewise.
12490         (__cxa_vec_dtor): Likewise.
12491         (__cxa_vec_delete): Likewise.
12492         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
12493         (__cxa_vec_ctor): Likewise.
12494         (__cxa_vec_cctor): Likewise.
12495         (__cxa_vec_dtor): Likewise.
12496         (__cxa_vec_delete): Likewise.
12497
12498 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12499
12500         * class.c (instantiate_type): Reinstate local variable
12501         deleted in previous change.
12502
12503         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
12504         itf_no_attributes.
12505
12506 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12507
12508         * cp-tree.h (instantiate_type_flags): New enumeration.
12509         (instantiate_type): Change parameter.
12510         * class.c (instantiate_type): Adjust prototype. Adjust.
12511         * call.c (standard_conversion): Adjust instantiate_type call.
12512         (reference_binding): Likewise.
12513         (build_op_delete_call): Likewise.
12514         (convert_like_real): Likewise.
12515         * cvt.c (cp_convert_to_pointer): Likewise.
12516         (convert_to_reference): Likewise.
12517         * pt.c (convert_nontype_argument): Likewise.
12518         * typeck.c (build_binary_op): Likewise.
12519         (build_ptrmemfunc): Likewise.
12520         (convert_for_assignment): Likewise.
12521
12522 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12523
12524         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
12525         (current_aggr): Define.
12526         * decl.c (grokdeclarator): Make sure a friend class is an
12527         elaborated type specifier.
12528         * parse.y (current_aggr): Remove static definition.
12529         (cp_parse_init): Adjust.
12530         (structsp): Clear and restore current_aggr.
12531         (component_decl_list): Clear current_aggr.
12532
12533         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
12534         aggregate tag on the typename's context.
12535
12536         * pt.c (tsubst_friend_class): Return error_mark_node, if
12537         parms becomes NULL.
12538         (instantiate_class_template): Ignore error_mark_node friend types.
12539
12540 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
12541
12542         * cvt.c (warn_ref_binding): New static function, broken out of ...
12543         (convert_to_reference): ... here. Use it.
12544
12545 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
12546
12547         * parse.y (template_arg): Add rule for template qualified with
12548         global scope.
12549
12550 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12551
12552         * decl2.c (add_function): Reorganize.
12553         (arg_assoc): Do not consider function template decls.
12554
12555 2000-08-11  Jason Merrill  <jason@redhat.com>
12556
12557         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
12558         looking inside.
12559
12560 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12561
12562         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
12563         (lookup_nested_tag): Likewise.
12564
12565         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
12566         can be produced.
12567
12568 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12569
12570         * parse.y (named_complex_class_head_sans_basetype): Remove
12571         always true if.
12572
12573 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12574
12575         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
12576         explicit TEMPLATE_ID_EXPR args.
12577         (build_expr_from_tree, case CALL_EXPR): Likewise.
12578
12579 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12580
12581         * decl.c (check_tag_decl): Diagnose typename's which don't
12582         declare anything.
12583
12584 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
12585
12586         * init.c (build_aggr_init): Reject bogus array initializers
12587         early.
12588
12589 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
12590
12591         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
12592         runtime.
12593         * cp/tinfo.cc (__dynamic_cast): Likewise.
12594         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
12595
12596 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
12597
12598         * cvt.c (convert_to_pointer_force): Fix error message when
12599         attempting to cast from ambiguous base.
12600
12601 2000-08-08  Jason Merrill  <jason@redhat.com>
12602
12603         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
12604         (tsubst_template_arg_vector): Likewise.
12605
12606         * decl2.c (build_anon_union_vars): Choose the largest field; don't
12607         assume that one will be as large as the union.
12608
12609 2000-08-07  Kazu Hirata  <kazu@hxi.com>
12610
12611         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
12612         * decl.c (pop_labels): Likewise.
12613
12614 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
12615
12616         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
12617         specifications.
12618         (__pointer_to_member_type_info): Likewise.
12619         (__base_class_info): Likewise.
12620         (__class_type_info): Likewise.
12621         (__si_class_type_info): Likewise.
12622         (__vmi_class_type_info): Likewise.
12623         * tinfo.cc (__si_class_type_info::__do_find_public_src):
12624         Changed member names to match specifications.
12625         (__vmi_class_type_info::__do_find_public_src): Likewise.
12626         (__si_class_type_info::__do_dyncast): Likewise.
12627         (__vmi_class_type_info::__do_dyncast): Likewise.
12628         (__si_class_type_info::__do_upcast): Likewise.
12629         (__vmi_class_type_info::__do_upcast): Likewise.
12630         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
12631         (__pbase_type_info::__pointer_catch): Likewise.
12632         (__pointer_type_info::__pointer_catch): Likewise.
12633         (__pointer_to_member_type_info::__pointer_catch): Likewise.
12634
12635 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
12636
12637         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
12638         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
12639         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
12640
12641 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
12642
12643         * cp-tree.h (add_method): Change prototype.
12644         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
12645         Don't double the size of the method vector in the error case.
12646         (handle_using_decl): Adjust call to add_method.
12647         (add_implicitly_declared_members): Likewise.
12648         (clone_function_decl): Likewise.
12649         * decl2.c (check_classfn): Likewise.
12650         * semantics.c (finish_member_declaration): Likewise.
12651
12652 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
12653
12654         * decl.c (flag_isoc94): New variable.
12655
12656 2000-08-02  Jason Merrill  <jason@redhat.com>
12657
12658         * pt.c (do_type_instantiation): Add complain parm; don't complain
12659         if called recursively.
12660         * cp-tree.h, parse.y: Adjust.
12661
12662 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
12663
12664         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
12665         -Wno-strict-prototypes.
12666
12667         * g++spec.c: Adjust type of second argument to
12668         lang_specific_driver, and update code as necessary.
12669
12670         * cp-tree.h: Don't prototype min_precision here.
12671         (my_friendly_assert): Cast expression to void.
12672         * semantics.c (do_poplevel): Initialize scope_stmts.
12673
12674 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
12675
12676         * cp-tree.h (DECL_NEEDED_P): Tweak.
12677
12678 2000-07-28  Jason Merrill  <jason@redhat.com>
12679
12680         * lang-specs.h: Use %i in rule for .ii files.
12681
12682 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
12683
12684         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
12685
12686 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
12687
12688         Allow indirect primary bases.
12689         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
12690         primary_base.
12691         (CLASSTYPE_VFIELD_PARENT): Remove.
12692         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
12693         (BINFO_PRIMARY_BINFO): Remove.
12694         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
12695         (BINFO_VBASE_PRIMARY_P): Likewise.
12696         (BINFO_PRIMARY_BASE_OF): New macro.
12697         (BINFO_INDIRECT_PRIMARY_P): Likewise.
12698         (get_primary_binfo): New function.
12699         * decl.c (lang_mark_tree): Make lang_type::primary_base.
12700         * class.c (vcall_offset_data_s): Rename to ...
12701         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
12702         and add ctor_vtbl_p.
12703         (get_derived_offset): Use get_primary_binfo.
12704         (dfs_mark_primary_bases): Adjust handling of virtual primary
12705         bases.
12706         (mark_primary_bases): Likewise.
12707         (set_primary_base): Take a binfo, not an integer, as a
12708         representation of the primary base.
12709         (indirect_primary_base_p): Remove.
12710         (determine_primary_base): Adjust for indirect primary bases.
12711         (dfs_find_final_overrider): Fix typo in coment.
12712         (update_vtable_entry_for_fn): Use get_primary_binfo.
12713         (layout_nonempty_base_or_field): Tweak.
12714         (build_base_fields): Adjust for new primary base semantics.
12715         (dfs_propagate_binfo_offsets): Remove.
12716         (propagate_binfo_offsets): Rewrite.
12717         (dfs_set_offset_for_shared_vbases): Remove.
12718         (layout_virtual_bases): Don't use it.
12719         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
12720         ABI.
12721         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
12722         CLASSTYPE_VFIELD_PARENT.
12723         (dfs_get_primary_binfo): New function.
12724         (get_primary_binfo): Likewise.
12725         (dump_class_hierarchy_r): Tweak printing of primary bases.
12726         (build_vtbl_initializer): Fix typo in comments.  Use
12727         vtbl_init_data.
12728         (build_vcall_and_vbase_vtbl_entries): Likewise.
12729         (build_vbaes_offset_vtbl_entries): Likewise.
12730         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
12731         BV_VCALL_INDEX to handle indirect primary bases.
12732         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
12733         (build_rtti_vtbl_entries): Likewise.
12734         * search.c (get_shared_vbase_if_not_primary): Tweak.
12735         (find_vbase_instance): Likewise.
12736         (binfo_for_vtable): Simplify.
12737         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
12738         (make_binfo): Make it have 11 entries.
12739
12740 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
12741
12742         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
12743         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
12744         ascertaining primaryness.
12745         (G): Remove template_args.
12746         (decl_is_template_id): New function.
12747         (write_encoding): Use decl_is_template_id.
12748         (write_name): Likewise.  Handle type_decls.  Get main variant of
12749         type decls.
12750         (write_nested_name): Likewise.
12751         (write_prefix): Likewise.
12752         (write_template_prefix): Likewise.
12753         (write_special_name_constructor): Remove defunct production from
12754         comment.
12755         (write_bare_function_type): Remove comment about absent parameter.
12756         (write_template_template_arg): Add missing grammar production to
12757         comment.
12758
12759 2000-07-27  Jason Merrill  <jason@redhat.com>
12760
12761         * decl.c (duplicate_decls): If common_type produces a non-typedef
12762         type for a typedef, just use the old type.
12763
12764 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
12765
12766         * cp-tree.h (function_depth): Declare.
12767         (verify_stmt_tree): Likewise.
12768         (find_tree): Likewise.
12769         * decl.c (function_depth): Give it external linkage.
12770         * optimize.c (optimize_function): Increment and decrement it.
12771         * tree.c (verify_stmt_tree_r): New function.
12772         (verify_stmt_tree): Likewise.
12773         (find_tree_r): Likewise.
12774         (find_tree): Likewise.
12775
12776 2000-07-27  Jason Merrill  <jason@redhat.com>
12777
12778         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
12779         TYPE_PTRMEMFUNC_P.
12780         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
12781
12782 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
12783
12784         * decl.c (start_cleanup_fn): Mark the function as `inline'.
12785         * decl2.c (get_guard): Call cp_finish_decl, not
12786         rest_of_decl_compilation, for local guards.
12787         * lex.c (do_identifier): Remove unused variable.
12788
12789 2000-07-26      Marc Espie <espie@cvs.openbsd.org>
12790
12791         * parse.y:  Add missing ';'.
12792
12793 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
12794
12795         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
12796         of `extern "C++"'.
12797
12798 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12799
12800         Kill strict_prototype. Backwards compatibility only for
12801         non NO_IMPLICIT_EXTERN_C systems.
12802         * cp-tree.h (flag_strict_prototype): Remove.
12803         (strict_prototype): Remove.
12804         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
12805         * decl.c (maybe_push_to_top_level): Adjust.
12806         (pop_from_top_level): Adjust.
12807         (decls_match): Only allow sloppy parm matching for ancient
12808         system headers.
12809         (init_decl_processing): Adjust.
12810         (grokdeclarator): Adjust.
12811         * decl2.c (flag_strict_prototype): Remove.
12812         (strict_prototype): Remove.
12813         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
12814         (lang_f_options): Remove "strict-prototype".
12815         (unsupported-options): Add "strict-prototype".
12816         * lex.c (do_identifier): Adjust.
12817         (do_scoped_id): Adjust.
12818         * parse.y (empty_parms): Adjust.
12819         * class.c (push_lang_context): Adjust.
12820         (pop_lang_context): Adjust.
12821         * typeck.c (comp_target_parms): Adjust.
12822
12823 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12824
12825         * decl.c (poplevel): Deal with anonymous variables at for scope.
12826         (maybe_inject_for_scope_var): Likewise.
12827
12828 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
12829
12830         * decl.c: Remove all signal handling code, now done in toplev.c.
12831
12832 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
12833
12834         * decl.c (make_rtl_for_nonlocal_decl): Rework.
12835
12836         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
12837         correctly.
12838
12839 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
12840
12841         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
12842         Define my_friendly_assert and my_friendly_abort as macros
12843         which may call friendly_abort.  Prototype friendly abort, not
12844         my_friendly_abort or my_friendly_assert.
12845         * decl.c (signal_catch): Report the signal caught in the error
12846         message.  Call fatal directly.
12847         * typeck2.c (ack, my_friendly_assert): Delete.
12848         (my_friendly_abort): Rename to friendly_abort.  Expect file,
12849         line, and function parameters.  Report the abort code, then
12850         call fancy_abort.  Do not mask an abort if errors have
12851         already occurred.
12852
12853 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
12854
12855         * typeck.c (comp_target_parms): Remove obsolete parameter.
12856         (comp_target_types): Adjust.
12857
12858 2000-07-17  Jason Merrill  <jason@redhat.com>
12859
12860         * typeck.c (mark_addressable): Never set TREE_USED.
12861         * call.c (build_call): Don't abort on calls to library functions
12862         that have been declared normally.
12863
12864         * typeck.c (build_binary_op): Fix grammar in warning.
12865
12866         * exception.cc (__eh_free): Fix prototype.
12867
12868         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
12869
12870         * decl.c (pushdecl): Handle seeing an OVERLOAD in
12871         IDENTIFIER_NAMESPACE_VALUE.
12872
12873 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
12874
12875         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
12876         * method.c (use_thunk): Correct handling of vcall offsets.
12877
12878 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
12879
12880         * .cvsignore: parse.h and parse.c have no cp- prefix.
12881
12882 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
12883
12884         * .cvsignore: New file.
12885
12886 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
12887
12888         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
12889
12890 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
12891
12892         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
12893         * parse.c: Remove.
12894         * parse.h: Likewise.
12895
12896 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
12897
12898         * class.c (layout_class_type): Add pointers to virtual bases after
12899         base classes under the old ABI.
12900
12901 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
12902
12903         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
12904         (finish_continue_stmt): Likewise.
12905         (begin_for_stmt): Remove call to note_level_for_for.
12906         (finish_goto_stmt): Change call from build_min_nt
12907         to build_stmt.
12908         (finish_expr_stmt): Likewise.
12909         (begin_if_stmt): Likewise.
12910         (begin_while_stmt): Likewise.
12911         (finish_while_stmt): Likewise.
12912         (finish_return_stmt): Likewise.
12913         (begin_for_stmt): Likewise.
12914         (finish_for_stmt): Likewise.
12915         (finish_break_stmt): Likewise.
12916         (begin_switch_stmt): Likewise.
12917         (finish_case_label): Likewise.
12918         (genrtl_try_block): Likewise.
12919         (begin_try_block): Likewise.
12920         (begin_handler): Likewise.
12921         (begin_compound_stmt): Likewise.
12922         (finish_asm_stmt): Likewise.
12923         (finish_label_stmt): Likewise.
12924         (add_decl_stmt): Likewise.
12925         (finish_subobject): Likewise.
12926         (finish_decl_cleanup): Likewise.
12927         (finish_named_return_value): Likewise.
12928         (setup_vtbl_ptr): Likewise.
12929         (add_scope_stmt): Likewise.
12930         * decl.c (finish_constructor_body): Likewise.
12931         (finish_destructor_body): Likewise.
12932         * optimize.c (copy_body_r): Likewise.
12933         (initialize_inlined_parameters): Likewise.
12934         (declare_return_variable): Likewise.
12935         (expand_call_inline): Likewise.
12936
12937 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
12938
12939         * semantics.c (expand_body): Sync interface information
12940         at the end of function body expansion.
12941
12942 2000-07-09  Jason Merrill  <jason@redhat.com>
12943
12944         * init.c (build_new_1): Bail early if the call to new fails.
12945
12946         * decl.c (compute_array_index_type): Check specifically for
12947         an INTEGER_CST, not just TREE_CONSTANT.
12948
12949         * decl.c (duplicate_decls): Don't call duplicate_decls on
12950         the DECL_TEMPLATE_RESULT.
12951         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
12952         codes.
12953
12954         * error.c (dump_template_bindings): Don't crash if we had an
12955         invalid argument list.
12956
12957         * typeck.c (c_expand_start_case): Do narrowing here.
12958         * semantics.c (finish_switch_cond): Not here.
12959
12960 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
12961
12962         * parse.y (asm_clobbers): Do string concatenation.
12963
12964 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
12965
12966         * decl.c (pushtag): Don't put local classes in template functions
12967         on the local_classes list.
12968
12969 2000-07-04  Scott Snyder  <snyder@fnal.gov>
12970
12971         * decl2.c (get_guard): Add missing return for old ABI local
12972         variable case.
12973
12974 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
12975
12976         * cp-tree.h (char_type_p): New function.
12977         * decl.c (init_decl_processing): Don't initialize
12978         signed_wchar_type_node or unsigned_wchar_type_node.
12979         (complete_array_type): Handle brace-enclosed string-constants.
12980         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
12981         * tree.c (char_type_p): New function.
12982         * typeck2.c (digest_init): Use char_type_p.
12983
12984 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
12985
12986         * pt.c (tsubst): Don't layout type, if it's error_mark.
12987
12988 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
12989
12990         * pt.c (instantiate_pending_templates): Reset template level.
12991
12992 2000-07-05  Jason Merrill  <jason@redhat.com>
12993
12994         * call.c (joust): Don't complain about `operator char *()' beating
12995         `operator const char *() const'.
12996
12997 2000-07-04  scott snyder  <snyder@fnal.gov>
12998             Jason Merrill  <jason@redhat.com>
12999
13000         * repo.c (repo_get_id): Handle the case where a class with virtual
13001         bases has a null TYPE_BINFO_VTABLE.
13002
13003 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
13004             Jason Merrill  <jason@redhat.com>
13005
13006         * parse.y (member_init): Just pass in the type.
13007         * init.c (expand_member_init): Handle getting a type.
13008
13009 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13010             Jason Merrill  <jason@redhat.com>
13011
13012         * decl.c (finish_function): Warn if a function has no return
13013         statement.
13014         Suggested by Andrew Koenig.
13015         * typeck.c (check_return_expr): Do set current_function_returns_value
13016         if we got an error_mark_node.
13017
13018 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
13019
13020         * decl2.c (push_decl_namespace): Push the original namespace.
13021
13022 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
13023
13024         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
13025         * semantics.c (begin_class_definition): Clear it.
13026
13027 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
13028
13029         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
13030         (genrtl_expr_stmt): Likewise.
13031         (genrtl_decl_stmt): Likewise.
13032         (genrtl_if_stmt): Likewise.
13033         (genrtl_while_stmt): Likewise.
13034         (genrtl_do_stmt): Likewise.
13035         (genrtl_return_stmt): Likewise.
13036         (genrtl_for_stmt): Likewise.
13037         (genrtl_break_stmt): Likewise.
13038         (genrtl_continue_stmt): Likewise.
13039         (genrtl_scope_stmt): Likewise.
13040         (genrtl_switch_stmt): Likewise.
13041         (genrtl_case_label): Likewise.
13042         (genrtl_begin_compound_stmt): Likewise.
13043         (genrtl_finish_compound_stmt): Likewise.
13044         (genrtl_compound_stmt): Likewise.
13045         (genrtl_asm_stmt): Likewise.
13046
13047         * init.c (begin_init_stmts): Remove call to
13048         genrtl_begin_compound_stmt.
13049         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
13050
13051         * semantics.c (lang_expand_stmt): Changed call to
13052         genrtl_compound_stmt to ignore return value.
13053
13054 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
13055
13056         * mangle.c (canonicalize_for_substitution): Return the canonical
13057         variant of a type.
13058
13059         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
13060         TYPE_DECL.
13061         * typeck.c (commonparms): Remove obstack manipulations.
13062
13063 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
13064
13065         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
13066
13067         * Makefile.in (OBJS): Added ../c-semantics.o.
13068         (OBJDEPS): Likewise.
13069
13070         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
13071         ../c-common.h.
13072         (struct stmt_tree): Added comment.
13073         (current_function_name_declared): Removed.
13074         (stmts_are_full_exprs_p): Likewise.
13075         (genrtl_do_pushlevel): Likewise.
13076         (genrtl_clear_out_block): Likewise.
13077         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
13078         (DECL_ANON_UNION_ELEMS): Likewise.
13079         (emit_local_var): Likewise.
13080         (make_rtl_for_local_static): Likewise.
13081         (do_case): Likewise.
13082         (expand_stmt): Likewise.
13083         (genrtl_decl_cleanup): Likewise.
13084         (c_expand_asm_operands): Likewise.
13085         (c_expand_return): Likewise.
13086         (c_expand_start_case): Likewise.
13087
13088         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
13089         (emit_local_var): Likewise.
13090         (initialize_local_var): Change reference to
13091         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
13092         Change reference to stmts_are_full_exprs_p to
13093         current_stmt_tree->stmts_are_full_exprs_p.
13094         (push_cp_function_context): Likewise.
13095
13096         * expect.c (expand_throw): Change reference to
13097         stmts_are_full_exprs_p.
13098
13099         * init.c (build_aggr_init): Change reference to
13100         stmts_are_full_exprs_p.
13101         (build_vec_init): Likewise.
13102
13103         * optimize.c (maybe_clone_body): Change reference to
13104         current_function_name_declared to
13105         cp_function_chain->name_declared.
13106
13107         * pt.c (instantiate_decl): Change reference to
13108         current_function_name_declared to
13109         cp_function_chain->name_declared.
13110
13111         * semantics.c (expand_cond): Moved declaration to c-common.h.
13112         (genrtl_do_pushlevel): Moved to c-semantics.c.
13113         (genrtl_clear_out_block): Likewise.
13114         (genrtl_goto_stmt): Likewise.
13115         (genrtl_expr_stmt): Likewise.
13116         (genrtl_decl_stmt): Likewise.
13117         (gerntl_if_stmt): Likewise.
13118         (genrtl_while_stmt): Likewise.
13119         (genrtl_do_stmt): Likewise.
13120         (genrtl_return_stmt): Likewise.
13121         (genrtl_for_stmt): Likewise.
13122         (genrtl_break_stmt): Likewise.
13123         (genrtl_continue_stmt): Likewise.
13124         (genrtl_scope_stmt): Likewise.
13125         (genrtl_switch_stmt): Likewise.
13126         (genrtl_case_label): Likewise.
13127         (genrtl_begin_compound_stmt): Likewise.
13128         (genrtl_finish_compound_stmt): Likewise.
13129         (genrtl_compound_stmt): Likewise.
13130         (genrtl_asm_stmt): Likewise.
13131         (genrtl_decl_cleanup): Likewise.
13132         (expand_cond): Likewise.
13133         (expand_stmt): Renamed to ...
13134         (lang_expand_stmt): ... this.
13135         (lang_expand_expr_stmt): Initialize.
13136         (set_current_function_name_declared): Likewise.
13137         (stmts_are_full_exprs_p): Likewise.
13138         (current_function_name_declared): Likewise.
13139         (anon_aggr_type_p): Likewise.
13140         (do_poplevel): Change reference to
13141         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
13142         Change reference to stmts_are_full_exprs_p to
13143         current_stmt_tree->stmts_are_full_exprs_p.
13144         (add_tree): Likewise.
13145         (finish_expr_stmt): Likewise.
13146         (prep_stmt): Likewise.
13147         (lang_expand_stmt): Likewise.
13148         (begin_compound_stmt): Change reference to
13149         current_function_name_declared to
13150         cp_function_chain->name_declared and call to
13151         current_function_name_declared().
13152         (setup_vtbl_ptr): Likewise.
13153         (genrtl_do_poplevel): Removed.
13154
13155 2000-06-30  Jason Merrill  <jason@redhat.com>
13156
13157         * init.c (init_init_processing): Go back to aligning like
13158         double_type_node for old ABI.
13159         (get_cookie_size): Make cookie larger if we get a type that needs
13160         more alignment.
13161         (build_vec_delete): Call it.
13162
13163         * typeck.c (qualify_type_recursive): New fn.
13164         (composite_pointer_type): Use it.
13165         (build_binary_op): Use composite_pointer_type.
13166
13167 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
13168             Jason Merrill  <jason@redhat.com>
13169
13170         * typeck.c (check_return_expr): Don't complain about returning
13171         NULL from operator new if -fcheck-new.
13172         * cp-tree.h: Declare flag_check_new here.
13173         * init.c: Not here.
13174
13175 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
13176
13177         * mangle.c (find_substitution): Use same_type_p.
13178         (write_encoding): Don't check for substitutions.
13179
13180 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
13181
13182         * parse.y (expr_no_comma_rangle): New non-terminal.
13183         (template_parm): Use it for default parameter case.
13184         (template_arg): Use it.
13185         (expr_no_commas): Remove commented out undefined extensions.
13186         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
13187         * parse.h, parse.c: Rebuilt.
13188
13189 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
13190
13191         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
13192         (finish_asm_stmt): Do it here, instead.
13193
13194         * cp-tree.h (ridpointers): Don't declare.
13195         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
13196         (record_builtin_java_type): Likewise.
13197         (init_decl_processing): Likewise.
13198         * lex.c: Move inclusion of lex.h.
13199         (ridpointers): Don't define.
13200         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
13201         RID_MAX.
13202         * lex.h (enum rid): Rename to ...
13203         (enum cp_rid): ... this.
13204         (ridpointers): Don't declare.
13205         * parse.y: Move inclusion of lex.h.
13206         * parse.c: Regenerated.
13207         * spew.c: Move inclusion of lex.h.
13208
13209         * cp-tree.h (struct language_function): Remove temp_name_counter.
13210         (temp_name_counter): Remove.
13211         (get_temp_name): Change prototype.
13212         (get_guard): New function.
13213         (get_guard_cond): Likewise.
13214         (set_guard): Likewise.
13215         * cvt.c (build_up_reference): Adjust call to get_temp_name.
13216         * decl.c (expand_static_init): Use get_guard and friends to
13217         implement guard variables.
13218         * decl2.c (get_temp_name): Assume that the variables created are
13219         always static.
13220         (get_sentry): Rename to ...
13221         (get_guard): ... this.  Implement new ABI guard variables.
13222         (get_guard_bits): New function.
13223         (get_guard_cond): Likewise.
13224         (set_guard): Likewise.
13225         (start_static_initialization_or_destruction): Use them.
13226         (do_static_initialization): Replace sentry with guard throughout.
13227         (do_static_destruction): Likewise.
13228         * init.c (create_temporary_var): Add comment.
13229
13230 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
13231
13232         * mangle.c (find_substitution): Use same_type_p.
13233         (write_encoding): Don't check for substitutions.
13234
13235 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
13236
13237         * parse.y (expr_no_comma_rangle): New non-terminal.
13238         (template_parm): Use it for default parameter case.
13239         (template_arg): Use it.
13240         (expr_no_commas): Remove commented out undefined extensions.
13241         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
13242         * parse.h, parse.c: Rebuilt.
13243
13244 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
13245
13246         * cp-tree.h (flag_const_strings): Remove.
13247         (warn_parentheses): Likewise.
13248         (warn_format): Likewise.
13249         (common_type): Likewise.
13250         (default_conversion): Likewise.
13251         (build_binary_op): Likewise.
13252         (cp_build_binary_op): New macro.
13253         * call.c (build_new_op): Use cp_build_binary_op instead of
13254         build_binary_op.
13255         * class.c (build_vtable_entry_ref): Likewise.
13256         * decl.c (expand_static_init): Likewise.
13257         (compute_array_index_type): Likewise.
13258         (build_enumerator): Likewise.
13259         * decl2.c (delete_sanity): Likewise.
13260         (start_static_initialization_or_destruction): Likewise.
13261         * error.c (dump_type_suffix): Likewise.
13262         * init.c (resolve_offset_ref): Likewise.
13263         (build_new): Likewise.
13264         (build_new_1): Likewise.
13265         (build_vec_delete_1): Likewise.
13266         (build_vec_init): Likewise.
13267         (build_delete): Likewise.
13268         * rtti.c (synthesize_tinfo_fn): Likewise.
13269         (synthesize_tinfo_var): Likewise.
13270         * search.c (expand_upcast_fixups): Likewise.
13271         (fixup_all_virtual_upcast_offsets): Likewise.
13272         * typeck.c (build_array_ref): Likewise.
13273         (get_member_function_from_ptrfunc): Likewise.
13274         (build_binary_op): Add parameter.
13275         (pointer_int_sum): Use cp_build_binary_op.
13276         (pointer_diff): Likewise.
13277         (build_modify_expr): Likewise.
13278         (get_delta_difference): Likewise.
13279         (build_ptrmemfunc): Likewise.
13280
13281 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
13282
13283         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
13284         * decl.c (create_implicit_typedef): Adjust.
13285         * decl2.c (build_artificial_parm): Adjust.
13286         * method.c (implicitly_declare_fn): Adjust.
13287         * pt.c (push_inline_template_parms_recursive): Adjust.
13288         (process_template_parm): Adjust.
13289         (overloaded_template_name): Adjust.
13290         * semantics.c (finish_template_template_parm): Adjust.
13291
13292 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
13293
13294         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
13295         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
13296         where to emit thunks.
13297         (build_vtt): Adjust call to build_vtt_inits.
13298         (build_vtt_inits): Add parameter to indicate whether or not
13299         sub-VTTs for virtual bases should be included.  Adjust handling of
13300         construction vtables.
13301         (get_matching_base): New function.
13302         (dfs_build_vtt_inits): Rename to ...
13303         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
13304         construction vtables.
13305         (dfs_fixup_binfo_vtbls): Likewise.
13306         (build_ctor_vtbl_groups): Build construction vtables for virtual
13307         bases, too.
13308         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
13309         to build construction vtbls.
13310         (dfs_accumulate_vtbl_inits): Adjust handling of
13311         construction vtables.
13312
13313         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
13314         types correctly.
13315
13316 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
13317
13318         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
13319
13320 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
13321
13322         * search.c (hides): Remove.
13323         (is_subobject_of_p): Add most_derived parameter. Use
13324         CANONICAL_BINFO.
13325         (lookup_field_queue_p): Adjust.
13326         (lookup_field_r): Adjust.
13327
13328 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
13329
13330         * decl2.c (handle_class_head): Bash typedefs to the type's main
13331         decl.
13332
13333 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
13334
13335         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
13336         (begin_global_stmt_expr): ... this.
13337         (genrtl_finish_stmt_expr): Rename to ...
13338         (finish_global_stmt_expr): ... this.
13339         * init.c (begin_init_stmts): Adjust calls.
13340         (finish_init_stmts): Likewise.
13341         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
13342         (begin_global_stmt_expr): ... this.
13343         (genrtl_finish_stmt_expr): Rename to ...
13344         (finish_global_stmt_expr): ... this.
13345
13346 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13347
13348         * search.c (lookup_member): Fix typo in comment.
13349
13350 2000-06-24  Jason Merrill  <jason@redhat.com>
13351
13352         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
13353         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
13354
13355 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13356
13357         * parse.y (complex_direct_notype_declarator): Support global_scope.
13358         * Makefile.in: Adjust conflict count.
13359
13360 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13361
13362         * parse.y (template_arg): Convert TEMPLATE_DECL
13363         that is a template template parameter to
13364         TEMPLATE_TEMPLATE_PARM here.
13365
13366         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
13367         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
13368         (copy_template_template_parm): Adjust prototype.
13369         * decl.c (grokdeclarator): Remove dead code.
13370         * pt.c (process_template_parm): Tidy.
13371         (lookup_template_class): Construct nodes in
13372         copy_template_template_parm.
13373         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
13374         lookup_template_class.  Use TYPE_TI_TEMPLATE.
13375         * tree.c (copy_template_template_parm): Add NEWARGS
13376         parameter.
13377         (mapcar): Adjust call to copy_template_template_parm.
13378         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
13379         * method.c (build_template_template_parm_names): Change error
13380         code to avoid compilation warning.
13381
13382         * gxxint.texi: Document template template parameter
13383         name mangling.
13384
13385 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
13386
13387         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
13388         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
13389         (cp-demangle.o): New rule.
13390         (dyn-string.o): Likewise.
13391         * inc/cxxabi.h (__cxa_demangle): New declaration.
13392
13393 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
13394
13395         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
13396         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
13397         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
13398         a tree, not an int.
13399         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
13400         (make_thunk): Change prototype.
13401         (emit_thunk): Rename to use_thunk.
13402         (mangle_thunk): Change prototype.
13403         * class.c (get_derived_offset): Simplify.
13404         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
13405         BV_GENERATE_THUNK_WITH_VTABLE_P.
13406         (build_primary_vtable): Simplify.
13407         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
13408         (dfs_find_base): Remove.
13409         (update_vtable_entry_for_fn): Correct bug in finding the base
13410         where a virtual function was first declared.  Figure out whether
13411         or not to emit a vcall-thunk with the vtables in which it appears.
13412         Correct logic for deciding whether to use an ordinary thunk, or a
13413         vcall thunk.
13414         (finish_struct_1): Remove unnecssary code.
13415         (build_vtbl_initializer): Use ssize_int for the running counter of
13416         negative indices.
13417         (build_vtbl_initializer): Only use vcall thunks where necessary.
13418         Mark thunks as needing to be emitted with their vtables, or not.
13419         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
13420         indices.  Use size_binop.
13421         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
13422         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
13423         size_binop.
13424         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
13425         (build_vtable_entry): Mark thunks as needing to be emitted with
13426         their vtables, or not.
13427         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
13428         * decl2.c (mark_vtable_entries): Use use_thunk instead of
13429         emit_thunk.
13430         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
13431         information.
13432         * error.c (dump_expr): Use BV_FN.
13433         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
13434         not an int.
13435         * method.c (make_thunk): Likewise.
13436         (emit_thunk): Rename to use_thunk.  Allow callers to decide
13437         whether or not to actually emit the thunk.  Adjust for changes in
13438         representation of vcall offsets.
13439         * search.c (dfs_get_pure_virtuals): Use BV_FN.
13440         * semantics.c (emit_associated_thunks): New function.
13441         (expand_body): Use it.
13442         * ir.texi: Adjust decriptions of thunks.
13443
13444 2000-06-22  Jason Merrill  <jason@redhat.com>
13445
13446         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
13447         (tsubst_friend_function): Copy it here.
13448
13449         * decl.c (grok_op_properties): Fix typo.
13450
13451         * decl2.c (delete_sanity): Clarify warning, avoid failure on
13452         deleting void*.
13453
13454         * pt.c (check_explicit_specialization): Clarify error.
13455
13456         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
13457         an old OVERLOAD when we're declaring a non-function.
13458         (pushdecl, destroy_local_var): Check for error_mark_node.
13459         (warn_extern_redeclared_static): Also bail early if
13460         we're a CONST_DECL.
13461         (push_overloaded_decl): Ignore an old error_mark_node.
13462
13463 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
13464
13465         * call.c (build_x_va_arg): Check if in a template decl.
13466         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
13467
13468 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13469
13470         * class.c (push_lang_context): TYPE_NAME gets you to the Java
13471         types DECLs.
13472         * decl.c (check_goto): Computed gotos assumed OK.
13473
13474 2000-06-20  Jason Merrill  <jason@redhat.com>
13475
13476         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
13477         for which we don't need to look for instantiations.
13478
13479 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
13480
13481         * parse.y (program): Always call finish_translation_unit.
13482         * parse.c, parse.h: Rebuilt.
13483
13484 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
13485
13486         * method.c: Don't include hard-reg-set.h.
13487
13488 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
13489
13490         * rtti.c (get_base_offset): Cope when vbase field is in a base.
13491
13492 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
13493
13494         * call.c (build_conditional_expr): Use VOID_TYPE_P.
13495         * cvt.c (cp_convert_to_pointer): Likewise.
13496         (convert_to_void): Likewise.
13497         * error.c (dump_expr): Likewise.
13498         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
13499         * init.c (build_delete): Likewise.
13500         * method.c (emit_thunk): Likewise.
13501         * optmize.c (declare_return_variable): Likewise.
13502         * rtti.c (get_tinfo_decl_dynamic): Likewise.
13503         (get_typeid): Likewise.
13504         (build_dynamic_cast_1): Likewise.
13505         * typeck.c (composite_pointer_type): Likewise.
13506         (common_type): Likewise.
13507         (build_indirect_ref): Likewise.
13508         (build_binary_op): Likewise.
13509         (build_x_compound_expr): Likewise.
13510         (check_return_expr): Likewise.
13511         * typeck2.c (add_exception_specifier): Likewise.
13512
13513         * mangle.c (write_method_parms): Use direct comparison for end
13514         of parmlist.
13515
13516 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
13517
13518         * cp-tree.h (genrtl_try_block): Declare function.
13519         (genrtl_handler): Likewise.
13520         (genrtl_catch_block): Likewise.
13521         (genrtl_ctor_stmt): Likewise.
13522         (genrtl_subobject): Likewise.
13523         (genrtl_decl_cleanup): Likewise.
13524         (genrtl_do_poplevel): Likewise.
13525         (genrtl_do_pushlevel): Likewise.
13526         (genrtl_clear_out_block): Likewise.
13527         (genrtl_goto_stmt): Likewise.
13528         (genrtl_expr_stmt): Likewise.
13529         (genrtl_decl_stmt): Likewise.
13530         (genrtl_if_stmt): Likewise.
13531         (genrtl_while_stmt): Likewise.
13532         (genrtl_do_stmt): Likewise.
13533         (genrtl_return_stmt): Likewise.
13534         (genrtl_for_stmt): Likewise.
13535         (genrtl_break_stmt): Likewise.
13536         (genrtl_continue_stmt): Likewise.
13537         (genrtl_scope_stmt): Likewise.
13538         (genrtl_switch_stmt): Likewise.
13539         (genrtl_case_label): Likewise.
13540         (genrtl_begin_compound_stmt): Likewise.
13541         (genrtl_finish_compound_stmt): Likewise.
13542         (genrtl_compound_stmt): Likewise.
13543         (genrtl_asm_stmt): Likewise.
13544         (genrtl_named_return_value): Likewise.
13545         (genrtl_begin_stmt_expr): Likewise.
13546         (genrtl_finish_stmt_expr): Likewise.
13547         (finish_for_stmt): Removed first argument.
13548         (finish_switch_stmt): Likewise.
13549
13550         * semantics.c (genrtl_try_block): Define function.
13551         (genrtl_handler): Likewise.
13552         (genrtl_catch_block): Likewise.
13553         (genrtl_ctor_stmt): Likewise.
13554         (genrtl_subobject): Likewise.
13555         (genrtl_decl_cleanup): Likewise.
13556         (genrtl_do_poplevel): Likewise.
13557         (genrtl_do_pushlevel): Likewise.
13558         (genrtl_clear_out_block): Likewise.
13559         (genrtl_goto_stmt): Likewise.
13560         (genrtl_expr_stmt): Likewise.
13561         (genrtl_decl_stmt): Likewise.
13562         (genrtl_if_stmt): Likewise.
13563         (genrtl_while_stmt): Likewise.
13564         (genrtl_do_stmt): Likewise.
13565         (genrtl_return_stmt): Likewise.
13566         (genrtl_for_stmt): Likewise.
13567         (genrtl_break_stmt): Likewise.
13568         (genrtl_continue_stmt): Likewise.
13569         (genrtl_scope_stmt): Likewise.
13570         (genrtl_switch_stmt): Likewise.
13571         (genrtl_case_label): Likewise.
13572         (genrtl_begin_compound_stmt): Likewise.
13573         (genrtl_finish_compound_stmt): Likewise.
13574         (genrtl_compound_stmt): Likewise.
13575         (genrtl_asm_stmt): Likewise.
13576         (genrtl_named_return_value): Likewise.
13577         (genrtl_begin_stmt_expr): Likewise.
13578         (genrtl_finish_stmt_expr): Likewise.
13579         (finish_for_stmt): Removed first argument and generate rtl
13580         specific code.
13581         (finish_switch_stmt): Likewise.
13582         (do_poplevel): Removed generate rtl specific code.
13583         (do_pushlevel): Likewise.
13584         (add_tree): Likewise.
13585         (finish_goto_stmt): Likewise.
13586         (finish_expr_stmt): Likewise.
13587         (begin_if_stmt): Likewise.
13588         (finish_if_stmt_cond): Likewise.
13589         (finish_then_clause): Likewise.
13590         (begin_else_clause): Likewise.
13591         (finish_else_clause): Likewise.
13592         (finish_if_stmt): Likewise.
13593         (clear_out_block): Likewise.
13594         (begin_while_stmt): Likewise.
13595         (finish_while_stmt_cond): Likewise.
13596         (finish_while_stmt): Likewise.
13597         (begin_do_stmt): Likewise.
13598         (finish_do_body): Likewise.
13599         (finish_do_stmt): Likewise.
13600         (finish_return_stmt): Likewise.
13601         (begin_for_stmt): Likewise.
13602         (finish_for_init_stmt): Likewise.
13603         (finish_for_cond): Likewise.
13604         (finish_for_expr): Likewise.
13605         (finish_break_stmt): Likewise.
13606         (finish_continue_stmt): Likewise.
13607         (begin_switch_stmt): Likewise.
13608         (finish_switch_cond): Likewise.
13609         (finish_case_label): Likewise.
13610         (begin_try_block): Likewise.
13611         (begin_function_try_block): Likewise.
13612         (finish_try_block): Likewise.
13613         (finish_cleanup_try_block): Likewise.
13614         (finish_cleanup): Likewise.
13615         (finish_function_try_block): Likewise.
13616         (finish_handler_sequence): Likewise.
13617         (finish_function_handler_sequence): Likewise.
13618         (begin_handler): Likewise.
13619         (finish_handler_parms): Likewise.
13620         (begin_catch_block): Likewise.
13621         (finish_handler): Likewise.
13622         (begin_compound_stmt): Likewise.
13623         (finish_compound_stmt): Likewise.
13624         (finish_asm_stmt): Likewise.
13625         (finish_label_stmt): Likewise.
13626         (finish_label_decl): Likewise.
13627         (finish_subobject): Likewise.
13628         (finish_decl_cleanup): Likewise.
13629         (finish_named_return_value): Likewise.
13630         (begin_stmt_expr): Likewise.
13631         (finish_stmt_expr): Likewise.
13632
13633         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
13634         to call genrtl_expr_stmt when appropriate.
13635
13636         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
13637         begin_compound_expr to call genrtl_begin_stmt_expr and
13638         genrtl_begin_compound_expr when appropriate.
13639         (finish_init_stmts): Changed calls to finish_compound_expr and
13640         finish_stmt_expr to call genrtl_finish_compound_expr and
13641         genrtl_finish_stmt_expr when appropriate.
13642         (expand_default_init): Changed call to finish_expr_stmt to call
13643         genrtl_expr_stmt when appropriate.
13644         (build_vec_init): Likewise.
13645
13646         * parse.y (simple_stmt): Removed first argument from call to
13647         finish_for_stmt. Removed first argument from call to
13648         finish_switch_stmt.
13649
13650         * parse.c: Regenerated.
13651
13652         * pt.c (tsubst_expr): Removed first argument from call to
13653         finish_for_stmt. Removed first argument from call to
13654         finish_switch_stmt.
13655
13656 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
13657
13658         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
13659         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
13660
13661         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
13662         (cplus_tree_code_length[]): Likewise.
13663         (cplus_tree_code_name[]): Likewise.
13664         (init_parse): Added call to add_c_tree_codes. Changed
13665         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
13666
13667 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
13668
13669         * cp-tree.h (finish_mem_initializers): Declare.
13670         (count_trees): Likewise.
13671         * parse.y (base_init): Use finish_mem_initializers.
13672         * semantics.c (finish_mem_initializers): New function.
13673
13674         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
13675         the number of trees.
13676         (n_trees): Remove.
13677         (count_trees): Don't use it.
13678
13679 2000-06-15  Jason Merrill  <jason@redhat.com>
13680
13681         * tree.c (count_trees): New debugging function.
13682
13683         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
13684         * init.c (build_member_call): Pull out the name of a DECL.
13685
13686         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
13687         * semantics.c (expand_body): Push to TV_INTEGRATION here.
13688         * optimize.c (optimize_function): Not here.
13689         * pt.c (instantiate_decl): Push to TV_PARSE.
13690
13691 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
13692
13693         * cp-tree.h (struct language_function): Remove x_base_init_list
13694         and x_member_init_list.
13695         (current_base_init_list): Remove.
13696         (current_member_init_list): Likewise.
13697         (setup_vtbl_ptr): Change prototype.
13698         (emit_base_init): Likewise.
13699         (expand_member_init): Likewise.
13700         (reinit_parse_for_function): Remove.
13701         * decl.c (save_function_data): Don't clear x_base_init_list and
13702         x_member_init_list.
13703         (mark_language_function): Don't mark them.
13704         * init.c (perform_member_init): Tweak comment.
13705         (sort_member_init): Take the list of initializers as an argument.
13706         (sort_base_init): Likewise.
13707         (emit_base_init): Likewise.
13708         (expand_member_init): Return the initializer.  Don't use global
13709         variables.
13710         * lex.c (reinit_parse_for_function): Remove.
13711         * method.c (build_template_parm_names): Correct substitution.
13712         (do_build_copy_constructor): Don't use current_member_init_list
13713         and current_base_init_list.
13714         (synthesize_method): Likewise.
13715         * parse.y (base_init): Split mem-initializers into
13716         base-initializers and field-initializers.
13717         (member_init_list): Build up the list here.
13718         (member_init): Return the initializer.
13719         (fn.depfn): Don't use reinit_parse_for_function.
13720         * parse.c: Regenerated.
13721         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
13722         ERROR_MARK.
13723         (tsubst_expr): Don't use current_member_init_list
13724         and current_base_init_list.
13725         (tsubst_expr_values): Rename to ...
13726         (tsubst_initializer_list): ... this.  Use convert_from_reference.
13727         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
13728         and current_base_init_list.
13729         (begin_function_definition): Don't call reinit_parse_for_function.
13730
13731         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
13732
13733         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
13734         correctly.
13735
13736         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
13737
13738 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
13739
13740         * cp-tree.h (IF_COND): Move to c-common.h.
13741         (THEN_CLAUSE): Likewise.
13742         (ELSE_CLAUSE): Likewise.
13743         (WHILE_COND): Likewise.
13744         (WHILE_BODY): Likewise.
13745         (DO_COND): Likewise.
13746         (DO_BODY): Likewise.
13747         (RETURN_EXPR): Likewise.
13748         (EXPR_STMT_EXPR): Likewise.
13749         (FOR_INIT_STMT): Likewise.
13750         (FOR_COND): Likewise.
13751         (FOR_EXPR): Likewise.
13752         (FOR_BODY): Likewise.
13753         (SWITCH_COND): Likewise.
13754         (SWITCH_BODY): Likewise.
13755         (CASE_LOW): Likewise.
13756         (CASE_HIGH): Likewise.
13757         (GOTO_DESTINATION): Likewise.
13758         (COMPOUND_BODY): Likewise.
13759         (ASM_CV_QUAL): Likewise.
13760         (ASM_STRING): Likewise.
13761         (ASM_OUTPUTS): Likewise.
13762         (ASM_INPUTS): Likewise.
13763         (ASM_CLOBBERS): Likewise.
13764         (DECL_STMT_DECL): Likewise.
13765         (STMT_EXPR_STMT): Likewise.
13766         (LABEL_STMT_LABEL): Likewise.
13767         (SCOPE_BEGIN_P): Likewise.
13768         (SCOPE_END_P): Likewise.
13769         (SCOPE_STMT_BLOCK): Likewise.
13770         (SCOPE_NULLIFIED_P): Likewise.
13771         (SCOPE_NO_CLEANUPS_P): Likewise.
13772         (SCOPE_PARTIAL_P): Likewise.
13773         (ASM_VOLATILE_P): Likewise.
13774         (STMT_LINENO): Likewise.
13775         (STMT_LINENO_FOR_FN_P): Likewise.
13776
13777         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
13778         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
13779         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
13780         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
13781         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
13782
13783         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
13784
13785         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
13786         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
13787
13788         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
13789         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
13790         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
13791
13792 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
13793
13794         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
13795         * class.c (dfs_find_final_overrider): Set it appropriately.
13796         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
13797         avoid unneeded secondary vptrs.
13798
13799 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
13800
13801         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
13802         (check_bitfield_decl, check_field_decl): Likewise.
13803         (build_vtbl_or_vbase_field, build_base_field): Likewise.
13804         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
13805         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
13806         (xfer_tag, finish_enum): Likewise.
13807         * decl2.c (finish_builtin_type): Likewise.
13808         * init.c (init_init_processing): Likewise.
13809         * pt.c (instantiate_class_template): Likewise.
13810         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
13811         * cp-tree.h (struct lang_type): Add user_align member.
13812         (CLASSTYPE_USER_ALIGN): Define.
13813
13814 2000-06-13  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
13815
13816         * Make-lang.in (c++.install-common): Install g++-cross in
13817         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
13818         $(target_alias)-g++ and $(target_alias)-c++.
13819
13820 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
13821
13822         * class.c (vcall_offset_data_s): Add last_init and fns.
13823         (overrides): Rename to same_signature_p.
13824         (dfs_find_final_overrider): Adjust accordingly.
13825         (mark_overriders): Likewise.
13826         (warn_hidden): Likewise.
13827         (build_vtbl_initializer): Reorganize machinery for building things
13828         at negative offsets.
13829         (build_vcall_and_vbase_vtbl_entries): Likewise.
13830         (build_vbase_offset_vtbl_entries): Likewise.
13831         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
13832         offset entries.  Do not create two entries for functions with the
13833         same signature.
13834         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
13835         (build_rtti_vtbl_entries): Reorganize machinery for building things
13836         at negative offsets.
13837
13838         * optimize.c (expand_call_inline): Don't recurse into the code
13839         used to initialize the parameters more than once.
13840
13841 2000-06-11  Mark Mitchell <mark@codesourcery.com>
13842
13843         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
13844         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
13845         (find_substitution): Only use the `Sa' substitution for
13846         std::allocator, not instantiations of it.
13847         (write_template_prefix): Move comment.  Only use a TREE_LIST to
13848         represent substitutions for a member template.
13849         (write_array_type): Mangle array dimensions correctly.
13850         * optimize.c (maybe_clone_body): Copy more information from the
13851         cloned function.
13852         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
13853         on the regenerated declaration.
13854
13855 2000-06-11  Chip Salzenberg  <chip@valinux.com>
13856             Mark Mitchell <mark@codesourcery.com>
13857
13858         * class.c (build_vtable): Clarify comment.
13859         (build_ctor_vtbl_group): Pass the most derived type to
13860         build_vtable.
13861
13862 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13863
13864         * decl2.c (compare_options): Don't needlessly cast away const-ness.
13865
13866 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
13867
13868         * decl.c (add_binding): Handle duplicate declarations of external
13869         variables.
13870
13871 2000-06-09  Chip Salzenberg  <chip@valinux.com>
13872             Mark Mitchell <mark@codesourcery.com>
13873
13874         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
13875         argument.
13876         (write_signed_number): New macro.
13877         (write_unsigned_number): Likewise.
13878         (write_source_name): Use them.
13879         (write_number): Handle signed and unsigned values.
13880         (write_integer_cst): Use tree_int_cst_sgn, and use
13881         write_unsigned_number or write_signed_number as appropriate.
13882         (write_discriminator): Use write_unsigned_number or
13883         write_signed_number as appropriate.
13884         (write_template_arg_literal): Likewise.
13885         (write_array_type): Use tree_low_cst.
13886         (write_template_parm):  Use write_unsigned_number or
13887         write_signed_number as appropriate.
13888         (write_substitution): Adjust call to write_number.
13889         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
13890         (write_expression): Handle non-type template arguments of
13891         reference type correctly.
13892         (mangle_thunk): Use write_signed_number.
13893
13894 2000-06-09  Chip Salzenberg  <chip@valinux.com>
13895
13896         * mangle.c (find_substition): Don't mangle objects with typename
13897         substitutions (e.g. "cin" as "Si").
13898
13899 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
13900
13901         * call.c (add_candidate): Use ggc_alloc_cleared.
13902         * decl.c (lookup_label): Likewise.
13903         * lex.c (retrofit_lang_decl): Likewise.
13904
13905 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
13906
13907         * semantics.c (expand_body): Push to TV_EXPAND.
13908         * optimize.c (optimize_function): Push to TV_INTEGRATION.
13909         * decl.c (start_function): Always call announce_function.
13910
13911         * tinfo2.cc: Just declare abort.
13912
13913 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
13914
13915         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
13916         whenever @ is a symbolic name.
13917
13918 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
13919
13920         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
13921
13922 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
13923
13924         * decl.c (pushdecl): Look up functions by DECL_NAME, not
13925         DECL_ASSEMBLER_NAME.
13926
13927 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
13928
13929         * decl2.c (c_language): Define.
13930
13931 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
13932
13933         * lex.c (lang_init_options): Tweak.
13934
13935         * decl2.c: Remove #inclusion of diagnostic.h
13936         (lang_decode_option): Move diagnostic formatting options to
13937         toplevel.
13938
13939         * lang-options.h: Remove documentation for diagnostic options.
13940
13941         * Makefile.in (lex.o): Depends upon diagnostic.h
13942
13943 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
13944
13945         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
13946         the same DECL_RESULT, it's not a redefinition.
13947         * pt.c (tsubst_decl): Remove code to handle illegal
13948         specializations.
13949
13950 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
13951
13952         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
13953
13954 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
13955
13956         * search.c (maybe_suppress_debug_info): Don't check
13957         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
13958
13959         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
13960         here if extern_p.
13961
13962         Remember instantiation context in deferred instantiations.
13963         * cp-tree.h (struct tinst_level): Remove.
13964         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
13965         * pt.c (current_tinst_level): Now a tree.
13966         (print_template_context, push_tinst_level, pop_tinst_level,
13967         tinst_for_decl): Adjust.
13968         (reopen_tinst_level): New fn.
13969         (init_pt): Register current_tinst_level as a root.
13970         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
13971         of the pending templates list.
13972         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
13973         * lex.c (extract_interface_info): Adjust.
13974         * decl2.c (warn_if_unknown_interface): Adjust.
13975
13976 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
13977
13978         * class.c (indirect_primary_base_p): New function.
13979         (determine_primary_base): Use it.
13980
13981 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
13982
13983         Update new-abi dynamic cast algorithm.
13984         * tinfo.cc (__class_type_info::__dyncast_result): Add
13985         whole_details. Adjust constructor.
13986         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
13987         Avoid unnecessary searching.
13988         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
13989
13990 2000-06-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13991
13992         * decl.c (init_decl_processing): Don't call record_component_aliases.
13993         * tree.c (build_cplus_array_type_1): Likewise.
13994
13995 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
13996
13997         * ir.texi: Correct typo.
13998         * mangle.c (write_expression): Handle non-type template arguments
13999         with reference type.
14000         * method.c (build_overload_value): Likewise.
14001         * pt.c (convert_nontype_argument): Explicitly represent conversion
14002         to a reference with an ADDR_EXPR.
14003         (unify): Always unify arguments in left-to-right order.
14004
14005 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
14006             Mark Mitchell  <mark@codesourcery.com>
14007
14008         * Make-lang.in (CXX_SRCS): Add mangle.c.
14009         * Makefile.in (CXX_OBJS): Add mangle.o.
14010         (mangle.o): New rule.
14011
14012         * class.c (local_classes): New variable.
14013         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
14014         (get_vtt_name): Use mangle_vtt_name for new ABI.
14015         (init_class_processing): Initialize local_classes.
14016         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
14017         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
14018         (std_identifier): New macro.
14019         (DECL_VOLATILE_MEMFUNC_P): New macro.
14020         (DECL_NAMESPACE_STD_P): Likewise.
14021         (local_classes): Declare.
14022         (get_mostly_instantiated_function_type): Declare.
14023         (init_mangle): Declare.
14024         (mangle_decl): Likewise.
14025         (mangle_type_string): Likewise.
14026         (mangle_type): Likewise.
14027         (mangle_typeinfo_for_type): Likewise.
14028         (mangle_typeinfo_string_for_type): Likewise.
14029         (mangle_vtbl_for_type): Likewise.
14030         (mangle_vtt_for_type): Likewise.
14031         (mangle_ctor_vtbl_for_type): Likewise.
14032         (mangle_thunk): Likewise.
14033         (mangle_conv_op_name_for_type): Likewise.
14034         (mangle_guard_variable): Likewise.
14035         * decl.c (pushtag): Keep track of local classes.
14036         (initialize_predefined_identifiers): Initialize std_identifier.
14037         (init_decl_processing): Use std_identifier.
14038         (start_decl): Don't treat instantiations as specializations.
14039         (grokdeclarator): Likewise.
14040         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
14041         name for fully-instantiated templates.
14042         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
14043         destructors with the new ABI.
14044         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
14045         (grokfield): Use mangle_type for new ABI.
14046         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
14047         (get_sentry): Use mangle_guard_variable for new ABI.
14048         (start_static_initialization_or_destruction): Likewise.
14049         * expr.c (extract_aggr_init): Remove.
14050         (extract_scalar_init): Likewise.
14051         (extract_init): Remove #if 0'd code.
14052         * mangle.c: New function.
14053         * method.c (build_mangled_name): Assert not flag_new_abi.
14054         (build_static_name): Likewise.
14055         (build_decl_overload_real): Likewise.
14056         (build_typename_overload): Likewise.
14057         (build_overload_with_type): Likewise.
14058         (build_overload_name): Likewise.
14059         (get_ctor_vtbl_name): Likewise.
14060         (start_squangling): Likewise.
14061         (get_id_2): Likewise.
14062         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
14063         (init_method): Call init_mangle for new ABI.
14064         (make_thunk): Call mangle_thunk for new ABI.
14065         * operators.def: Correct new ABI manglings for the `%' operator.
14066         Add `::' operator.
14067         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
14068         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
14069         (lookup_template_class): Call mangle_decl for new ABI.
14070         (get_mostly_instantiated_function_type): New function.
14071         (set_mangled_name_for_template_decl): Use it.
14072         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
14073         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
14074         conversion op names.
14075         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
14076         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
14077         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
14078         mangle_typeinfo_string_for_type.
14079
14080 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
14081
14082         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
14083         (INNERMOST_TEMPLATE_ARGS): New macro.
14084         (innermost_args): Remove.
14085         (get_innermost_template_args): New function.
14086         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
14087         * error.c (dump_function_decl): Be caution when using
14088         most_general_template.
14089         * method.c (build_template_parm_names):  Use
14090         INNERMOST_TEMPLATE_ARGS.
14091         * pt.c (add_to_template_args): Tidy comment
14092         (get_innermost_template_args): New function.
14093         (check_explicit_specialization): Clear DECL_INITIAL for a new
14094         specialization.
14095         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
14096         Tidy.
14097         (push_template_decl): Always register specializations of the most
14098         general template.
14099         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
14100         (coerce_template_parms): Likewise.
14101         (lookup_template_class): Likewise.
14102         (innermost_args): Remove.
14103         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
14104         (tsubst_decl): Handle tricky specializations.  Use
14105         get_innermost_template_args.
14106         (instantiate_template): Simplify handling of partial
14107         instantiations.
14108         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
14109         (most_general_template): Reimplement, in a more straightforward
14110         manner.
14111         (regenerate_decl_from_template): Tweak formatting.  Use
14112         TMPL_ARGS_DEPTH for clarity.
14113         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
14114
14115         * dump.c (dequeue_and_dump): Dump information about thunks.
14116
14117 2000-06-01  Richard Henderson  <rth@cygnus.com>
14118
14119         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
14120
14121 2000-06-01  Richard Henderson  <rth@cygnus.com>
14122
14123         * decl2.c (unsupported_options): Fix typo, make const.
14124         (lang_decode_option): Fix bsearch argument order.
14125
14126 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
14127
14128         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
14129         on FIELD_DECLs.
14130
14131 2000-05-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14132
14133         * cp-tree.h (c_get_alias_set): Deleted.
14134         * Makefile.in (decl.o): Include ../expr.h.
14135         * decl.c (expr.h): Include.
14136         (init_decl_processing): Call record_component_aliases for arrays.
14137         (grokdeclarator): Likewise.
14138         Set TREE_ADDRESSABLE for fields that aren't bitfields.
14139         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
14140
14141 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
14142
14143         Remove guiding declaration support.
14144         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
14145         (flag_guiding_decls): Remove.
14146         * call.c (build_user_type_conversion_1): Remove support for
14147         guiding decls.
14148         (build_new_function_call): Likewise.
14149         (build_new_op): Likewise.
14150         (build_new_method_call): Likewise.
14151         * decl.c (start_function): Likewise.
14152         * friend.c (is_friend): Likewise.
14153         (do_friend): Likewise.
14154         * decl2.c ((flag_dump_translation_unit): Make it const.
14155         (flag_guiding_decls): Remove.
14156         (unsupported_options): New variable
14157         (compare_options): New function.
14158         (lang_decode_option): Use them.
14159
14160         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
14161
14162         * method.c (mangle_expression): Adjust test for legal expression
14163         operators.
14164
14165         * pt.c (instantiate_decl): Save and restore the local
14166         specializations list.
14167
14168 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
14169
14170         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
14171
14172 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
14173
14174         * call.c (add_template_candidate_real): Handle member template
14175         constructors for classes with virtual bases.
14176         (build_user_type_conversion_1): Use in_charge_arg_for_name.
14177         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
14178
14179         * ir.texi: Update thunk documentation.
14180
14181         * call.c (joust): Fix handling of overloaded builtin operators.
14182
14183 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
14184
14185         * cp-tree.h (DECL_ANTICIPATED): New macro.
14186         Document new use of DECL_LANG_FLAG_7.
14187         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
14188         in the user namespace.
14189         * lex.c (do_identifier): If the identifier's declaration has
14190         DECL_ANTICIPATED on, it has not yet been declared.  But do not
14191         replace it with an ordinary implicit declaration.
14192
14193         * tinfo2.cc: Include stdlib.h.
14194
14195 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
14196
14197         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
14198         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
14199         CLASSTYPE_ALIGN.
14200
14201 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
14202
14203         * decl2.c (lang_decode_option): Use skip_leading_substring instead
14204         of plain strncmp.
14205
14206 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
14207
14208         * operators.def (<?): Duplicated, should have been...
14209         (>?): this.  Fixed.
14210
14211 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
14212             Mark Mitchell  <mark@codesourcery.com>
14213
14214         * cp-tree.h (ansi_opname): Make it a macro.
14215         (ansi_assopname): Likewise.
14216         (struct lang_decl_flags): Add assignment_operator_p.
14217         (struct lang_decl): Add operator_code.
14218         (DECL_VTT_PARM): Adjust.
14219         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
14220         overloaded operator.
14221         (SET_OVERLOADED_OPERATOR_CODE): New macro.
14222         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
14223         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
14224         (opname_tab): Remove.
14225         (assignop_tab): Likewise.
14226         (operator_name_info_t): New type.
14227         (operator_name_info): New variable.
14228         (assignment_operator_name_info): Likewise.
14229         (build_cp_library_fn): Remove declaration.
14230         (push_cp_library_fn): Likewise.
14231         (operator_name_string): Likewise.
14232         (build_decl_overload): Likewise.
14233         * call.c (print_z_candidates): Simplify.
14234         (build_object_call): Adjust usage of ansi_opname.  Use
14235         DECL_OVERLOADED_OPERATOR_P.
14236         (op_error): Adjust operator name lookup.
14237         (build_conditional_expr): Adjust usage of ansi_opname.
14238         (build_new_op): Likewise.
14239         (build_op_delete_call): Likewise.
14240         (build_over_call): Likewise.
14241         (joust): Use DECL_OVERLOADED_OPERATOR_P.
14242         * decl.c (duplicate_decls): Copy operator_code.
14243         (init_decl_processing): Adjust parameters to push_cp_library_fn.
14244         (builtin_function): Adjust parameters to build_library_fn_1.
14245         (build_library_fn_1): Accept an overloaded operator code.
14246         (build_library_fn): Pass ERROR_MARK.
14247         (build_cp_library_fn): Accept an overloaded operator code.
14248         (push_cp_library_fn): Likewise.
14249         (grokfndecl): Tweak.
14250         (grokdeclarator): Simplify code to compute names of overloaded
14251         operators.  Adjust use of ansi_opname.
14252         (ambi_op_p): Work on tree_codes, not identifiers.
14253         (unary_op_p): Likewise.
14254         (grok_op_properties): Likewise.
14255         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
14256         (lang_mark_tree): Don't try to mark the operator_code.
14257         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
14258         * error.c (dump_decl): Remove special handling for operator
14259         names.
14260         (dump_function_name): Likewise.
14261         (dump_expr): Adjust name lookup of operators.
14262         (op_to_string): Simplify.
14263         (assop_to_string): Likewise.
14264         * init.c (build_new_1): Adjust use of ansi_opname.
14265         * lex.c (opname_tab): Remove.
14266         (assignop_tab): Likewise.
14267         (ansi_opname): Likewise.
14268         (ansi_assopname): Likewise.
14269         (operator_name_string): Likewise.
14270         (reinit_lang_specific): Likewise.
14271         (operator_name_info): New variable.
14272         (assignment_operator_name_info): Likewise.
14273         (init_operators): New function.
14274         (init_parse): Use it.
14275         (do_identifier): Adjust use of ansi_opname.
14276         * method.c (mangle_expression): Don't use ansi_opname for
14277         mangling.
14278         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
14279         (build_decl_overload): Remove.
14280         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
14281         (do_build_assign_ref): Adjust use of ansi_opname.
14282         (synthesize_method): Likewise.
14283         (implicitly_declare_fn): Likewise.
14284         * operators.def: New file.
14285         * parse.y (operator): Adjust use of ansi_opname.
14286         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
14287         (set_mangled_name_for_template_decl): Don't play games with
14288         current_namespace.
14289         (special_function_p): Adjust use of ansi_opname.
14290         * typeck.c (check_return_expr): Likewise.
14291         * Make-lang.in (cc1plus): Depend on operators.def.
14292         * Makefile.in (lex.o): Likewise.
14293         (decl.o): Likewise.
14294
14295 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
14296
14297         * Make-lang.in (cplib2.ready): Eradicate.
14298
14299 2000-05-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14300
14301         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
14302         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
14303         (built_min, cp_tree_equal): Likewise.
14304
14305 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
14306
14307         * class.c (layout_nonempty_base_or_field): Replace
14308         `record_layout_info' with `record_layout_info_s'.
14309
14310 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
14311
14312         Fix goto checking.
14313         * cp-tree.h (struct language_function): x_named_labels is now
14314         a struct named_label_list*.
14315         * decl.c (struct named_label_use_list): Renamed from...
14316         (struct named_label_list): ...this.  New struct.
14317         (push_binding_level): Don't set eh_region.
14318         (note_level_for_eh): New fn.
14319         (pop_label): Take label and old value directly.
14320         (pop_labels): Adjust for new named_labels format.
14321         (lookup_label): Likewise.
14322         (poplevel): Note characteristics of a binding level containing a
14323         named label.  Mess with named label lists earlier.
14324         (mark_named_label_lists): New fn.
14325         (mark_lang_function): Call it.
14326         (use_label): New fn, split out from...
14327         (make_label_decl): ...here.  Don't call it.
14328         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
14329         check_previous_gotos): New fns, split out from...
14330         (define_label): ...here.
14331         (check_switch_goto): New fn.
14332         (define_case_label): Call it.
14333         (check_goto): New fn.
14334         * semantics.c (finish_goto_stmt): Call it and use_label.
14335         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
14336         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
14337
14338 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
14339
14340         * class.c (build_vtable_entry_ref): Correct usage of
14341         get_vtbl_decl_for_binfo.
14342
14343         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
14344         * method.c (implicitly_declare_fn): Not here.
14345
14346 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
14347
14348         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
14349         (CPTI_PTMD_DESC_TYPE): ... here.
14350         (ptmd_desc_type_node): Rename to ...
14351         (ptm_desc_type_node): ... here.
14352         * decl.c: Likewise.
14353         * rtti.c (ptmd_initializer): Rename to ...
14354         (ptm_initializer): ... here.
14355         (sythesize_tinfo_var): Adjust. Deal with pointer to member
14356         function.
14357         (create_tinfo_types): Adjust.
14358
14359 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
14360
14361         Finish implementation of VTTs.
14362         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
14363         CPTI_VTT_PARM_IDENTIFIER.
14364         (vtt_parm_identifier): New macro.
14365         (vtt_parm_type): Likewise.
14366         (BINFO_SUBVTT_INDEX): Likewise.
14367         (BINFO_VPTR_INDEX): Likewise.
14368         (struct lang_decl): Add vtt_parm.
14369         (DECL_VTT_PARM): New macro.
14370         (DECL_USE_VTT_PARM): Likewise.
14371         (DECL_NEEDS_VTT_PARM_P): Likewise.
14372         (get_vtt_name): Declare.
14373         (build_artificial_parm): Likewise.
14374         (fixup_all_virtual_upcast_offsets): Likewise.
14375         (expand_indirect_vtbls_init): Remove.
14376         * call.c (build_new_method_call): Pass the vtt to subobject
14377         constructors and destructors.
14378         * class.c (get_vtt_name): Give it external linkage.
14379         (build_clone): Handle the magic VTT parameters for clones.
14380         (clone_function_decl): Fix typo in comment.
14381         (build_vtt): Keep track of the indices in the VTTs where various
14382         entities are stored.
14383         (build_vtt_inits): Likewise.
14384         (dfs_build_vtt_inits): Likewise.
14385         (build_ctor_vtbl_group): Tweak type of construction vtables.
14386         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
14387         primary bases, when building construction vtables.
14388         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
14389         (initialize_predefined_identifiers): Add vtt_parm_identifier.
14390         (init_decl_processing): Initialize vtt_parm_type.
14391         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
14392         (lang_mark_tree): Make vtt_parm.
14393         * decl2.c (build_artificial_parm): New function.
14394         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
14395         (grokclassfn): Use build_artificial_parm.
14396         * init.c (initialize_vtbl_ptrs): Call
14397         fixup_all_virtual_upcast_offsets directly.
14398         (perform_member_init): Use the complete subobject destructor for
14399         member cleanups.
14400         (build_vtbl_address): New function.
14401         (expand_virtual_init): Handle VTTs.
14402         * optimize (maybe_clone_body): Likewise.
14403         * search.c (fixup_all_virtual_upcast_offsets): Give it external
14404         linkage.
14405         (expand_indirect_vtbls_init): Remove.
14406         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
14407         * tree.c (make_binfo): Make them bigger.
14408
14409 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
14410
14411         * inc/cxxabi.h (__pbase_type_info): Define, based on
14412         __pointer_type_info.
14413         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
14414         (__pointer_to_member_type_info): Likewise.
14415         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
14416         (__pointer_to_member_type_info::__is_pointer_p): Remove.
14417         (__pointer_type_info::__do_catch): Rename to ...
14418         (__pbase_type_info::__do_catch): ... here. Adjust.
14419         (__pbase_type_info::__pointer_catch): Implement.
14420         (__pointer_type_info::__pointer_catch): Adjust.
14421         (__pointer_to_member_type_info::__pointer_catch): Adjust.
14422
14423 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
14424
14425         * tinfo.h (__user_type_info::contained_virtual_p): New
14426         predicate.
14427         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
14428         shaped hierarchy.
14429         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
14430         diamond shaped hierarchy. Add early out for mixed diamond and
14431         duplicate shaped hierarchy.
14432
14433 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
14434
14435         * cp-tree.h (build_delete): Change prototype.
14436         (build_vec_delete): Likewise.
14437         * call.c (build_scoped_method_call): Use special_function_kind
14438         values to indicate the kind of destruction to be done.
14439         (build_method_call): Likewise.
14440         * decl.c (finish_destructor_body): Likewise.
14441         (maybe_build_cleanup_1): Likewise.  Rename to ...
14442         (maybe_build_cleanup): ... this.
14443         * decl2.c (delete_sanity): Use special_function_kind
14444         values to indicate the kind of destruction to be done.
14445         (build_cleanup): Likewise.
14446         * init.c (perform_member_init): Likewise.
14447         (build_vec_delete_1): Likewise.
14448         (build_dtor_call): Simplify.
14449         (build_delete): Use special_function_kind
14450         values to indicate the kind of destruction to be done.
14451         (build_vbase_delete): Likewise.
14452         (build_vec_delete): Likewise.
14453
14454         * init.c (sort_member_init): Fix typo in error message generation
14455         code.
14456
14457 2000-05-15  Donald Lindsay  <dlindsay@cygnus.com>
14458
14459         * semantics.c (begin_class_definition): make the packed
14460         attribute be sensitive to the "-fpack-struct" command line flag
14461
14462 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
14463
14464         Update new-abi upcast algorithm.
14465         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
14466         prototype and meaning of return value.
14467         (__si_class_type_info::__do_upcast): Likewise.
14468         (__vmi_class_type_info::__do_upcast): Likewise.
14469         * tinfo.cc (__class_type_info::__upcast_result): Replace
14470         whole2dst with part2dst. Adjust ctor.
14471         (__class_type_info::__do_upcast): Adjust call of worker function.
14472         (__class_type_info::__do_upcast): Adjust.
14473         (__si_class_type_info::__do_upcast): Adjust. Use parent's
14474         __do_upcast.
14475         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
14476         virtual base in diamond hierarchy bug.
14477
14478 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
14479
14480         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
14481         and bitfield to tinfo_fn_p.
14482         (DECL_TINFO_FN_P): Adjust.
14483         (SET_DECL_TINFO_FN_P): Likewise.
14484         (DECL_MUTABLE_P): Likewise.
14485         (DECL_C_BIT_FIELD): Likewise.
14486         (SET_DECL_C_BIT_FIELD): Likewise.
14487         (CLEAR_DECL_C_BIT_FIELD): Likewise.
14488         (DECL_UNINLINABLE): Likewise.
14489         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
14490         (handle_using_decl): Remove assertion.
14491         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
14492         to build FIELD_DECLs.
14493         (build_base_field): Likewise.
14494         (layout_class_type): Likewise.
14495         * decl.c (init_decl_processing): Likewise.
14496         (build_ptrmemfunc_type): Likewise.
14497         (grokdeclarator): Likewise.
14498         * decl2.c (grok_x_components): Likewise.
14499         * except.c (call_eh_info): Likewise.
14500         * init.c (init_init_processing): Likewise.
14501         * rtti.c (expand_class_desc): Likewise.
14502         (create_pseudo_type_info): Likewise.
14503         (get_vmi_pseudo_type_info): Likewise.
14504         (create_tinfo_types): Likewise.
14505         * ptree.c (print_lang_decl): Adjust.
14506         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
14507         before checking DECL_MUTABLE_P.
14508
14509         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
14510         parameters for template functions.
14511         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
14512         destructors as well as constructors.
14513
14514 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
14515
14516         * class.c (build_ctor_vtbl_group): Set inits.
14517         * optimize.c (maybe_clone_body): Set DECL_INLINE and
14518         DECL_THIS_INLINE appropriately for clones.
14519
14520         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
14521         (DECL_CONV_FN_P): Simplify.
14522         (DECL_OPERATOR): Remove.
14523         (language_to_string): Declare.
14524         * decl.c (duplicate_decls): Fix typo in comment.
14525         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
14526         (grok_op_properties): Use DECL_CONV_FN_P instead of
14527         IDENTIFIER_TYPENAME_P.
14528         * dump.c (dequeue_and_dump): Dump the language linkage of
14529         declarations.
14530         * error.c (language_to_string): Give it external linkage.
14531         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
14532         (implicitly_declare_fn): Set DECL_LANGUAGE.
14533         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
14534         IDENTIFIER_TYPENAME_P.
14535         (tsubst_decl): Likewise.
14536         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
14537         * semantics.c (finish_member_declaration): Don't mark members of
14538         classes declared in an extern "C" region as extern "C".
14539
14540 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14541
14542         * decl2.c (qualified_lookup_using_namespace): Look through
14543         namespace aliases.
14544
14545         * decl.c (push_using_decl): Return the old decl on namespace level.
14546
14547 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
14548
14549         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
14550         (VTT_NAME_PREFIX): New macro.
14551         (CTOR_VTBL_NAME_PREFIX): Likewise.
14552         (get_ctor_vtbl_name): New function.
14553         * class.c (get_vtable_name): Simplify.
14554         (get_vtt_name): New function.
14555         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
14556         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
14557         when a virtual base becomes primary.
14558         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
14559         VTTs.
14560         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
14561         additional parameters.
14562         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
14563         (initialize_array): New function.
14564         (build_vtt): Likewise.
14565         (build_vtt_inits): Likewise.
14566         (dfs_build_vtt_inits): Likewise.
14567         (dfs_fixup_binfo_vtbls): Likewise.
14568         (build_ctor_vtbl_group): Likewise.
14569         (initialize_vtable): Use initialize_array.
14570         (accumulate_vtbl_inits): Reimplement to handle construction
14571         vtables.
14572         (dfs_accumulate_vtbl_inits): Likewise.
14573         (bulid_vtbl_initializer): Adjust parameter name.
14574         * method.c (build_typename_overload): Remove #if 0'd code.
14575         (get_ctor_vtbl_name): New function.
14576         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
14577         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
14578
14579         * cp-tree.h (struct lang_type): Remove search_slot.
14580         (CLASSTYPE_SEARCH_SLOT): Remove.
14581         (emit_base_init): Change prototype.
14582         (initialize_vtbl_ptrs): Likewise.
14583         (expand_indirect_vtbls_init): Likewise.
14584         (clear_search_slots): Remove.
14585         * decl.c (lang_mark_tree): Don't mark search_slot.
14586         * init.c (initialize_vtbl_ptrs): Simplify.
14587         (emit_base_init): Likewise.
14588         * search.c (struct vbase_info): Document decl_ptr.
14589         (convert_pointer_to_single_level): Remove.
14590         (dfs_find_vbases): Remove.
14591         (dfs_init_base_pointers): Simplify.
14592         (dfs_clear_vbase_slots): Remove.
14593         (dfs_vtable_path_unmark): New function.
14594         (init_vbase_pointers): Simplify.
14595         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
14596         (expand_indirect_vtbls_init): Simplify.  Don't call
14597         mark_all_temps_used.
14598         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
14599         initialize_vtbl_ptrs.
14600
14601 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
14602
14603         * except.c: Add static prototypes.
14604
14605 2000-05-20  H.J. Lu  <hjl@gnu.org>
14606
14607         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
14608
14609 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
14610
14611         Don't create a separate copy of virtual bases for the
14612         CLASSTYPE_VBASECLASSES list.
14613         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
14614         (BINFO_FOR_VBASE): Remove.
14615         (CANONICAL_BINFO): Adjust.
14616         (binfo_for_vbase): New function.
14617         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
14618         instead of BINFO_FOR_VBASE.
14619         (build_vbase_pointer): Likewise.
14620         (build_secondary_vtable): Likewise.
14621         (dfs_mark_primary_bases): Likewise.
14622         (mark_primary_bases): Likewise.
14623         (layout_nonempty_base_or_field): Likewise.
14624         (dfs_set_offset_for_shared_vbases): Likewise.
14625         (dfs_set_offset_for_unshared_vbases): Likewise.
14626         (layout_virtual_bases): Likewise.  Adjust for changes to the
14627         CLASSTYPE_VBASECLASSES list.
14628         (dump_class_hierarchy_r): Use binfo_for_vbase
14629         instead of BINFO_FOR_VBASE.
14630         (dump_class_hierarchy): Likewise.
14631         (finish_vtbls): Likewise.
14632         (build_vtbl_initializer): Adjust for changes to the
14633         CLASSTYPE_VBASECLASSES list.
14634         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
14635         * decl.c (finish_destructor_body): Adjust for changes to the
14636         CLASSTYPE_VBASECLASSES list.
14637         * init.c (sort_base_init): Use binfo_for_vbase.
14638         (construct_virtual_bases): Adjust for changes to the
14639         CLASSTYPE_VBASECLASSES list.
14640         (expand_member_init): Use binfo_for_vbase.
14641         (build_vbase_delete):  Adjust for changes to the
14642         CLASSTYPE_VBASECLASSES list.
14643         * method.c (do_build_copy_constructor): Likewise.
14644         * rtti.c (get_base_offset): Use binfo_for_vbase.
14645         (expand_class_desc): Remove #if 0'd code.
14646         * search.c (struct vbase_info): Remove vbase_types.
14647         (get_base_distance):  Use binfo_for_vbase.
14648         (lookup_field_queue_p): Use CANONICAL_BINFO.
14649         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
14650         (get_pure_virtuals): Adjust for changes to the
14651         CLASSTYPE_VBASECLASSES list.
14652         (dfs_find_vbases): Use binfo_for_vbase.
14653         (dfs_init_vbase_pointers): Likewise.
14654         (init_vbase_pointers): Don't initialize vi.vbase_types.
14655         (virtual_context): Use binfo_for_vbase.
14656         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
14657         CLASSTYPE_VBASECLASSES list.
14658         (expand_indirect_vtbls_init): Simplify.
14659         (dfs_get_vbase_types): Don't replicate virtual bases.
14660         (find_vbase_instance): Use binfo_for_vbase.
14661         (binfo_for_vbase): New function.
14662         * typeck.c (get_delta_difference): Use binfo_for_vbase.
14663
14664 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
14665
14666         * decl2.c (finish_anon_union): Generalize error messages to handle
14667         anonymous structures.
14668         * init.c (perform_member_init): Remove `name' parameter.
14669         (build_field_list): New function.
14670         (sort_member_init): Handle anonymous union initialization order
14671         correctly.  Check for multiple initializations of the same union.
14672         (emit_base_init): Don't look up fields by name here.
14673         (expand_member_init): Record the result of name lookup for future
14674         reference.
14675         * typeck.c (build_component_ref): Fix formatting.
14676
14677 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
14678
14679         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
14680         * typeck.c (build_x_compound_expr): Replace warn_unused with
14681         warn_unused_value.
14682
14683         * decl2.c (lang_decode_option): Update -Wall unused flags by
14684         calling set_Wunused.
14685
14686 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
14687
14688         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
14689         * init.c (dfs_vtable_path_unmark): Remove.
14690         * search.c (marked_new_vtable_p): Likewise.
14691         (unmarked_new_vtable_p): Likewise.
14692         (dfs_search_slot_nonempty_p): Likewise.
14693         (dfs_mark): Likewise.
14694         (dfs_vtable_path_unmark): Likewise.
14695         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
14696         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
14697         (dfs_init_vbase_pointers): Remove special-case new ABI code.
14698         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
14699         (init_vbase_pointers): Simplify.
14700         (expand_indirect_vtbls_init): Likewise.
14701
14702         * class.c (copy_virtuals): New function.
14703         (build_primary_table): Use it.
14704         (build_secondary_vtable): Likewise.
14705         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
14706         indicate that no vcall offset is required.
14707         (add_virtual_function): Likewise.
14708         (modify_all_vtables): Likewise.
14709         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
14710         (dfs_accumulate_vtbl_inits): Likewise.
14711         (build_vtbl_initializer): Make changes to handle construction
14712         vtables.
14713         (dfs_build_vcall_offset_vtbl_entries): Likewise.
14714         (build_rtti_vtbl_entries): Likewise.
14715         (build_vtable_entries): Handle a NULL vcall_index.
14716
14717 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
14718
14719         * decl2.c (lang_decode_option): Fix thinko.
14720
14721 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
14722
14723         * except.c (check_handlers): New fn.
14724         * cp-tree.h: Declare it.
14725         * semantics.c (finish_handler_sequence): Call it.
14726         (finish_function_handler_sequence): Likewise.
14727         (finish_handler_parms): Set TREE_TYPE on the handler.
14728         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
14729         * search.c (get_base_distance_recursive): If protect>1, ignore
14730         special access.
14731         (get_base_distance): Don't reduce watch_access.
14732
14733 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
14734
14735         * lex.c: #include diagnostic.h.
14736         (lang_init_options): Set default prefixing rules.
14737
14738         * lang-options.h: Add -fdiagnostics-show-location=.
14739
14740         * decl2.c: #include diagnostic.h.
14741         (lang_decode_option): Handle -fdiagnostics-show-location=.
14742
14743 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
14744
14745         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
14746         * vec.cc: Revert my 2000-05-07 change.
14747
14748 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
14749
14750         * class.c (check_field_decls): Complain about non-static data
14751         members with same name as class in class with constructor.
14752
14753 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
14754
14755         * decl.c (grokdeclarator): Allow non-static data members with
14756         same name as class.
14757
14758 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
14759
14760         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
14761         and pending_inline.filename.  Update prototypes.
14762         * decl.c (define_label): Constify filename parameter.
14763         * decl2.c (warn_if_unknown_interface): Constify local char *.
14764         * input.c Constify input_source.filename. Don't declare
14765         input_filename or lineno.  Constify filename parameter to feed_input.
14766         * lex.c (init_parse): Constify parameter and return value.
14767         (cp_pragma_interface, cp_pragma_implementation): Constify
14768         filename argument.
14769         (reinit_parse_for_method, reinit_parse_for_block,
14770         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
14771         Constify local char *.
14772         * pt.c: Don't declare lineno or input_filename.
14773         (print_template_context, tsubst_friend_function, tsubst_decl,
14774         tsubst, instantiate_decl): Constify local char *.
14775         * semantics.c (expand_body): Constify local char *.
14776         * tree.c (build_srcloc): Constify filename parameter.
14777         * typeck.c (c_expand_asm_operands): Constify filename
14778         parameter.
14779
14780 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
14781
14782         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
14783         offsetof expansion.
14784
14785 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
14786
14787         * inc/cxxabi.h:  Fix typos in comment.
14788         (__base_class_info::__offset): Use a static_cast.
14789
14790 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
14791
14792         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
14793         of std::size_t and std::ptrdiff_t respectively.
14794         * tinfo.cc: Likewise.
14795         * vec.cc: Likewise.
14796
14797 2000-05-06  Richard Henderson  <rth@cygnus.com>
14798
14799         * typeck.c (build_c_cast): Don't warn integer->pointer size
14800         mismatch for constants.
14801
14802 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
14803
14804         * rtti.c (ptmd_initializer): Set non-public, if class is
14805         incomplete.
14806
14807         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
14808         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14809         __cxa_vec_delete): Likewise.
14810         * tinfo.cc (__dynamic_cast): Likewise.
14811         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14812         __cxa_vec_delete): Likewise.
14813
14814 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
14815
14816         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
14817         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
14818         (lang_decl_flags): Add vcall_offset.
14819         (THUNK_VCALL_OFFSET): Use it.
14820         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
14821         * method.c (make_thunk): Create the lang_decl here, not in
14822         emit_thunk.
14823         (emit_thunk): Make generic thunks into ordinary functions once
14824         they have been fed to expand_body.
14825         * semantics.c (expand_body): Set current_function_is_thunk here.
14826
14827 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14828
14829         * class.c (update_vtable_entry_for_fn): Prototype.
14830
14831         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
14832         and `tmpl'.
14833
14834         * search.c (dfs_build_inheritance_graph_order): Prototype.
14835
14836 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
14837
14838         * cp-tree.h (special_function_kind): Add various kinds of
14839         destructors.
14840         (special_function_p): New function.
14841         * class.c (overrides): Don't let one kind of destructor override
14842         another.
14843         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
14844         whether or not to instantiate a template.
14845         * tree.c (special_function_p): Define.
14846
14847 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
14848
14849         * cp-tree.def (THUNK_DECL): Remove.
14850         * cp-tree.h (DECL_THUNK_P): New macro.
14851         (DECL_NON_THUNK_FUNCTION_P): Likewise.
14852         (DECL_EXTERN_C_FUNCTION_P): Likewise.
14853         (SET_DECL_THUNK_P): Likewise.
14854         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
14855         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
14856         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
14857         * decl.c (decls_match): Use DECL_EXTERN_C_P.
14858         (duplicate_decls): Likewise.
14859         (pushdecl): Likewise.  Adjust thunk handling.
14860         (grokfndecl): Use DECL_EXTERN_C_P.
14861         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
14862         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
14863         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
14864         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
14865         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
14866         DECL_NO_STATIC_CHAIN.
14867         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
14868         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
14869         * search.c (covariant_return_p): Remove THUNK_DECL handling.
14870         * ir.texi: Update.
14871
14872 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
14873
14874         * tree.c (walk_tree): Set lineno.
14875
14876 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
14877
14878         * exception.cc: Update license notice.
14879         * new.cc: Likewise.
14880         * new1.cc: Likewise.
14881         * new2.cc: Likewise.
14882         * tinfo.cc: Likewise.
14883         * tinfo2.cc: Likewise.
14884         * vec.cc: Likewise.
14885         * inc/cxxabi.h: Likewise.
14886         * inc/exception: Likewise.
14887         * inc/new: Likewise.
14888         * inc/new.h: Likewise.
14889         * inc/typeinfo: Likewise.
14890
14891 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
14892
14893         * tree.c (build_target_expr_with_type): If we already have a
14894         TARGET_EXPR, just return it.
14895
14896         * optimize.c (initialize_inlined_parameters): Don't generate an
14897         EXPR_STMT if we can just use DECL_INITIAL.
14898         * decl.c (emit_local_var): Only make the initialization a
14899         full-expression if stmts_are_full_exprs_p.
14900
14901 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
14902
14903         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
14904         macro.
14905         * call.c (standard_conversion): Use it.
14906         (direct_reference_binding): Likewise.
14907         (build_over_call): Likewise.
14908         (is_properly_derived_from): Likewise.
14909         (compare_ics): Likewise.
14910         * class.c (resolves_to_fixed_type_p): Likewise.
14911         * optimize.c (declare_return_variable): Likewise.
14912         * pt.c (is_specialization_of): Likewise.
14913         (unify): Likewise.
14914         * typeck.c (comp_target_parms): Likeiwse.
14915         (build_static_cast): Likewise.
14916         (build_reinterpret_cast): Likewise.
14917         (build_const_cast): Likewise.
14918         (comp_ptr_ttypes_real): Likewise.
14919         (comp_ptr_ttypes_const): Likewise.
14920         * typeck2.c (process_init_constructor): Likewise.
14921
14922 2000-04-30  Scott Snyder <snyder@fnal.gov>
14923
14924         * decl.c (finish_destructor_body): Use the base destructor when
14925         destroying virtual bases.
14926
14927 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
14928
14929         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
14930         STMT_EXPRs.
14931         * optimize.c (struct inline_data): Add target_exprs field.
14932         (declare_return_variable): When a function returns an aggregate,
14933         use the variable declared in the TARGET_EXPR as the remapped
14934         DECL_RESULT.
14935         (expand_call_inline): Update the pending target_exprs stack.
14936         (optimize_function): Initialize the stack.
14937
14938         * decl2.c (finish_file): Fix typo in comment.
14939
14940         * method.c (emit_thunk): Don't try to return a `void' value.
14941
14942         * optimize.c (initialize_inlined_parameters): If the parameter is
14943         addressable, we need to make a new VAR_DECL, even if the
14944         initializer is constant.
14945
14946 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
14947
14948         * decl.c (grok_op_properties): Add an extra check of argtypes.
14949
14950 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
14951
14952         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
14953         variables.
14954         (initialize_inlined_parameters): Try to avoid creating new
14955         VAR_DECLs.
14956
14957 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
14958
14959         * lex.c (my_get_run_time): Remove.
14960         (init_filename_times): Use get_run_time instead of my_get_run_time.
14961         (check_newline): Likewise.
14962         (dump_time_statistics): Likewise.
14963         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
14964         of computing elapsed time explicitly.
14965
14966 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
14967
14968         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
14969         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
14970         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
14971         before calling decl_constant_value.
14972         * class.c (check_bitfield_decl): Likewise.
14973         * cvt.c (ocp_convert): Likewise.
14974         (convert): Likewise.
14975         * decl.c (compute_array_index_type): Likewise.
14976         (build_enumerator): Likewise.
14977         * decl2.c (check_cp_case_value): Likewise.
14978         * pt.c (convert_nontype_argument): Likewise.
14979         (tsubst): Likewise.
14980         * typeck.c (decay_conversion): Likewise.
14981         (build_compound_expr): Likewise.
14982         (build_reinterpret_cast): Likewise.
14983         (build_c_cast): Likewise.
14984         (convert_for_assignment): Likewise.
14985
14986 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
14987
14988         * decl.c (finish_function): Don't play games with DECL_INLINE.
14989
14990 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
14991
14992         * ir.texi: Correct typo.
14993
14994 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14995
14996         * decl.c (grokdeclarator): Reject VLAs as members.
14997
14998 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
14999
15000         * call.c (standard_conversion): Accept conversion between
15001         COMPLEX_TYPEs.
15002
15003         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
15004
15005 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
15006
15007         * decl2.c (finish_file): Remove double setup for accounting
15008         compile time.
15009
15010 2000-04-24  Robert Lipe <robertlipe@usa.net>
15011
15012         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
15013
15014 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
15015
15016         * new.cc (set_new_handler): Needs to be in std::.
15017
15018 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
15019
15020         * cp-tree.h (lang_decl): Remove pretty_function_p.
15021         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
15022         language-specific node.
15023         * decl.c (cp_make_fname_decl): Use build_decl, not
15024         build_lang_decl, to build the variables.
15025         (grokvardecl): Don't call build_lang_decl for local variables in
15026         templates.
15027         (grokdeclarator): Don't call build_lang_decl for local type
15028         declarations in templates.
15029         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
15030         zero'd memory, rather than calling memset.
15031         * pt.c: Include hashtab.h.
15032         (local_specializations): New variable.
15033         (retrieve_local_specialization): Use it.
15034         (register_local_specialization): Likewise.
15035         (tsubst_decl): Don't assume local variables have
15036         DECL_LANG_SPECIFIC.
15037         (instantiate_decl): Set up local_specializations.
15038         * Makefile.in (HTAB_H): New variable.
15039
15040 2000-04-23  Richard Henderson  <rth@cygnus.com>
15041
15042         * typeck.c (c_expand_asm_operands): Restore the original
15043         contents of the output list.
15044
15045 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
15046
15047         * ir.texi:  Document complex number representation.
15048
15049 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
15050
15051         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
15052         (target_incomplete_p): New function.
15053         (tinfo_base_init): Create comdat NTBS name variable.
15054         (ptr_initializer): Add non_public parameter. Calculate it.
15055         (ptmd_initializer): Likewise.
15056         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
15057         (create_real_tinfo_var): Add non_public parameter. Use it.
15058         Push proxy into global namespace.
15059         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
15060         New enumeration.
15061         * inc/typeinfo (type_info::before, type_info::operator==):
15062         Compare __name addresses.
15063
15064         * tinfo2.cc: Remove new-abi builtins comment.
15065
15066 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
15067
15068         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
15069
15070         * call.c (joust): Exit early if we get the same function, too.
15071
15072         * decl2.c (key_method): Return NULL_TREE for template classes.
15073         (import_export_class): Don't need to check for template classes.
15074
15075 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
15076
15077         * lex.c: Remove references to cccp.c.
15078
15079 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
15080
15081         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
15082         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
15083         (DECL_DESTRUCTOR_P): Use destructor_attr.
15084         (DECL_CONST_MEMFUNC_P): Reimplement.
15085         (DECL_VOLATILE_MEMFUNC_P): Remove.
15086         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
15087         (overrides): Use DECL_DESTRUCTOR_P.
15088         (check_for_override): Likewise.
15089         * decl.c (start_function): Likewise.
15090         * decl2.c (grokfclassfn): Likewise.
15091         (check_classfn): Likewise.
15092         (grok_function_init): Likewise.
15093
15094 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
15095
15096         * decl2.c (grokfield): Issue error on illegal data member
15097         declaration.
15098
15099 2000-04-17  Mark P Mitchell  <mark@codesourcery.com>
15100
15101         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
15102
15103 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
15104
15105         * class.c (build_vtable_entry): Don't build thunks for type-info
15106         functions.
15107
15108 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
15109
15110         * decl.c (decls_match): Allow a redeclaration of a builtin to
15111         specify args while the builtin did not.
15112
15113 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
15114
15115         * cp-tree.def (THUNK_DECL): Add to documentation.
15116         * cp-tree.h (flag_huge_objects): Declare.
15117         * class.c (modify_vtable_entry): Tidy.
15118         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
15119         Calculate delta appropriately for the new ABI.
15120         (dfs_modify_vtables): Use it.
15121         (modify_all_vtables): Fix thinko in code to add overriding copies
15122         of functions to primary vtables.
15123         (build_clone): Fix typo in comment.
15124         (clone_function_decl): Correct order of destructors in vtable.
15125         (build_vbase_offset_vtbl_entries): Adjust comment.
15126         (dfs_vcall_offset_queue_p): Remove.
15127         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
15128         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
15129         (build_vtable_entry): Correct check for pure virtual functions.
15130         Don't declare flag_huge_objects.
15131         * decl.c (flag_huge_objects): Remove declaration.
15132         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
15133         Use int_size_in_bytes.
15134         (emit_thunk): Handle vcall offset thunks.
15135
15136 2000-04-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15137
15138         * decl2.c (parse_time, varconst_time): Delete declarations.
15139         (finish_file): Delete LINENO declaration.
15140         START_TIME and THIS_TIME now long.
15141
15142 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
15143
15144         * class.c (build_base_field): Reformat comment.
15145
15146         * inc/cxxabi.h (stddef.h): Comment inclusion.
15147         (__base_class_info::__offset): Comment shift.
15148
15149 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
15150
15151         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
15152         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
15153         (cp_push_exception_identifier): New macro.
15154         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
15155         (DECL_BASE_DESTRUCTOR_P): Likewise.
15156         (DECL_DELETING_DESTRUCTOR_P): Likewise.
15157         (get_vtbl_decl_for_binfo): Fix formatting.
15158         (in_charge_arg_for_name): New macro.
15159         (maybe_build_cleanup_and_delete): Remove declaration.
15160         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
15161         (in_charge_arg_for_name): New function.
15162         (build_new_method_call): Use it.  Handle cloned destructors.
15163         (build_clone): Don't make the base constructor virtual.
15164         Automatically defer generated functions.
15165         (clone_function_decl): Handle destructors, too.
15166         (clone_constructors_and_destructors): Likewise.
15167         (create_vtable_ptr): Don't create a vtable entry for a cloned
15168         function.
15169         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
15170         (initialize_predefined_identifiers): Update appropriately.
15171         (finish_destructor_body): Simplify.
15172         (maybe_build_cleanup_and_delete): Remove.
15173         * except.c (expand_throw): Handle new-ABI destructors.
15174         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
15175         (build_dtor_call): New function.
15176         (build_delete): Use it.  Simplify.
15177         * optimize.c (maybe_clone_body): Handle destructors.
15178         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
15179
15180         * exception.cc (cleanup_fn): New typedef.
15181         (CALL_CLEANUP): New macro.
15182         (cp_eh_info): Use them.
15183         (__cp_push_exception): Likewise.
15184         (__cp_pop_exception): Likewise.
15185
15186 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
15187
15188         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
15189         (complete_dtor_identifier): New macro.
15190         (CLASSTYPE_FIRST_CONVERSION): Remove.
15191         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
15192         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
15193         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
15194         (CLASSTYPE_CONSTRUCTORS): Likewise.
15195         (CLASSTYPE_DESTRUCTORS): Likewise.
15196         (lang_decl): Add cloned_function.
15197         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
15198         (DECL_BASE_CONSTRUCTOR_P): Likewise.
15199         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
15200         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
15201         (DECL_CLONED_FUNCTION_P): Likewise.
15202         (DECL_CLONED_FUNCTION): Likewise.
15203         (clone_function_decl): Declare.
15204         (maybe_clone_body): Likewise.
15205         * call.c (build_user_type_conversion_1): Call complete object
15206         constructors in the new ABI.
15207         (build_new_method_call): Don't add in-charge parameters under the
15208         new ABI.
15209         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
15210         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
15211         CLASSTYPE_DESTRUCTOR_SLOT.
15212         (build_clone): New function.
15213         (clone_function_decl): Likewise.
15214         (clone_constructors_and_destructors): Likewise.
15215         (check_bases_and_members): Use it.
15216         * decl.c (iniitialize_predefined_identifiers): Initialize
15217         complete_dtor_identifier.
15218         (finish_function): Don't add extra code to a clone.
15219         (lang_mark_tree): Mark cloned_function.
15220         * decl2.c (mark_used): Don't bother trying to instantiate things
15221         we synthesized.
15222         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
15223         * method.c (set_mangled_name_for_decl): Don't treat clones as
15224         constructors.
15225         (synthesize_method): Sythesize cloned functions, not the clones.
15226         * optimize.c (inline_data): Update comment on ret_label.
15227         (remap_block): Don't assume DECL_INITIAL exists.
15228         (copy_body_r): Allow ret_label to be NULL.
15229         (maybe_clone_body): Define.
15230         * pt.c (tsubst_decl): Handle clones.
15231         (instantiate_clone): New function.
15232         (instantiate_template): Use it.
15233         (set_mangled_name_for_template_decl): Don't treat clones as
15234         constructors.
15235         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
15236         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
15237         * semantics.c (expand_body): Clone function bodies as necessary.
15238
15239         * optimize.c (remap_decl): Avoid sharing structure for arrays
15240         whose size is only known at run-time.
15241         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
15242
15243         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
15244         to has_in_charge_parm_p.
15245         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
15246         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
15247         (DECL_COPY_CONSTRUCTOR_P): New macro.
15248         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
15249         (build_user_type_conversion_1): Likewise.
15250         (convert_like_real): Likewise.
15251         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
15252         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
15253         (copy_args_p): Likewise.
15254         (grok_ctor_properties): Likewise.
15255         (start_function): Likewise.
15256         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
15257         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
15258         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
15259         * method.c (do_build_copy_constructor): Use
15260         DECL_HAS_IN_CHARGE_PARM_P.
15261         (synthesize_method): Likewise.
15262         * pt.c (instantiate_template): Remove goto.
15263         * tree.c (build_cplus_method_type): Remove mention of obstacks in
15264         comment.
15265
15266         * cp-tre.h (finish_function): Change prototype.
15267         * decl.c (end_cleanup_fn): Adjust caller.
15268         (finish_function): Take only one parameter.
15269         * decl2.c (finish_objects): Adjust caller.
15270         (finish_static_storage_duration_function): Likewise.
15271         * method.c (emit_thunk): Likewise.
15272         * parse.y: Likewise.
15273         * parse.c: Regenerated.
15274         * pt.c (instantiate_decl): Likewise.
15275         * rtti.c (synthesize_tinfo_fn): Likewise.
15276         * semantics.c (expand_body): Likewise.
15277
15278         * cp-tree.h (copy_decl): New function.
15279         * class.c (finish_struct_1): Use it.
15280         * lex.c (copy_decl): Define it.
15281         * pt.c (tsubst_decl): Likewise.
15282         * tree.c (copy_template_template_parm): Likewise.
15283
15284         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
15285         has_nonpublic_assign_ref.
15286         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
15287         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
15288         * class.c (finish_struct_methods): Don't set
15289         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
15290         (interface_only): Don't declare.
15291         (interface_unknown): Likewise.
15292
15293 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15294
15295         * tree.h (HAVE_TEMPLATES): Remove definition.
15296         * lang-options.h (-fthis-is-variable): Remove documentation.
15297
15298 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
15299
15300         * class.c (instantiate_type): Handle object-relative template-id.
15301
15302         * semantics.c (finish_expr_stmt): Call convert_to_void here.
15303         * decl.c (cplus_expand_expr_stmt): Not here.
15304
15305         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
15306         Initialize exprtype earlier.
15307
15308         * parse.y (fn.def1): Check for defining types in return types.
15309
15310         * decl.c (check_tag_decl): Notice extra fundamental types.
15311         Diagnose empty decls in classes, too.
15312
15313         * decl.c (grokdeclarator): Don't override an anonymous name if no
15314         declarator was given.
15315
15316         * cvt.c (convert_to_void): Call resolve_offset_ref.
15317
15318         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
15319
15320         * decl2.c (decl_namespace): Handle getting a type.
15321
15322         * typeck.c (build_c_cast): Re-enable warning for cast between
15323         pointer and integer of different size.
15324
15325 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
15326
15327         * inc/cxxabi.h (__pointer_type_info): Add restrict and
15328         incomplete flags.
15329         (__pointer_type_info::__pointer_catch): New virtual function.
15330         (__pointer_to_member_type_info): Derive from
15331         __pointer_type_info. Adjust.
15332         (__pointer_to_member_type_info::__do_catch): Remove.
15333         (__pointer_to_member_type_info::__is_pointer_p): Declare.
15334         (__pointer_to_member_type_info::__pointer_catch): Declare.
15335         * rtti.c (qualifier_flags): Add restrict flag.
15336         (ptmd_initializer): Reorder members.
15337         (create_tinfo_types): Expand comments. Reorder
15338         ptmd_desc_type_node members.
15339         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
15340         Implement.
15341         (__pointer_type_info::__do_catch): Move specific code into
15342         __pointer_catch. Call it.
15343         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
15344         specific catch checking. Fix void conversion check.
15345         (__pointer_to_member_type_info::__do_catch): Remove.
15346         (__pointer_to_member_type_info::__pointer_catch): Implement.
15347
15348 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15349
15350         * lex.c (init_parse): Remove traces of classof and headof.
15351         * decl2.c (flag_operator_names): Default to 1.
15352         (lang_decode_option): Do not set it for -ansi.
15353
15354 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
15355
15356         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
15357         (DECL_MAIN_VARIANT): Remove.
15358         * decl.c (duplicate_decls): Don't set it.
15359         (start_function): Likewise.
15360         (lang_mark_tree): Don't mark it.
15361         * decl2.c (defer_fn): Don't use it.
15362         * lex.c (retrofit_lang_decl): Don't set it.
15363         * pt.c (tsubst_decl): Likewise.
15364         * ptree.c (print_lang_decl): Don't print it.
15365         * typeck.c (mark_addressable): Don't use it.
15366
15367 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
15368
15369         * vec.cc: Include <new> and <exception>.
15370         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
15371         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
15372         terminate.
15373         (__cxa_vec_delete): Catch dtor exceptions.
15374
15375 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
15376
15377         Prepend __ to implementation defined names.
15378         * inc/typeinfo (type_info): Rename _name to __name.
15379         (type_info::type_info): Rename parameter.
15380         (type_info::operator==, type_info::operator!=,
15381         type_info::before): Likewise.
15382         (type_info::is_pointer_p, type_info::is_function_p,
15383         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
15384         parameters.
15385         * inc/cxxabi.h
15386         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
15387         (__pointer_type_info::__pointer_type_info): Likewise.
15388         (__pointer_type_info::is_pointer_p,
15389         __pointer_type_info::do_catch): Prepend __. Rename parameters.
15390         (__array_type_info::__array_type_info): Rename parameters.
15391         (__function_type_info::__function_type_info): Likewise.
15392         (__function_type_info::is_function_p): Prepend __.
15393         (__enum_type_info::__enum_type_info): Rename parameters.
15394         (__pointer_to_member_type_info::__pointer_to_member_type_info):
15395         Likewise.
15396         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
15397         parameters.
15398         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
15399         (__class_type_info::__class_type_info): Rename parameters.
15400         (__class_type_info::sub_kind): Prepend __. Adjust member names.
15401         (__class_type_info::upcast_result,
15402         __class_type_info::dyncast_result): Prepend __. Move definition
15403         into tinfo.cc.
15404         (__class_type_info::do_upcast, __class_type_info::do_catch,
15405         __class_type_info::find_public_src,
15406         __class_type_info::do_dyncast,
15407         __class_type_info::do_find_public_src): Prepend __. Rename
15408         parameters.
15409         (__si_class_type_info::__si_class_type_info): Rename parameters.
15410         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
15411         __si_class_type_info::do_find_public_src): Prepent __. Rename
15412         parameters.
15413         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
15414         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
15415         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
15416         parameters.
15417         (__dynamic_cast): Rename parameters.
15418         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
15419         type_info::do_catch, type_info::do_upcast): Prepend __.
15420         (contained_p, public_p, virtual_p, contained_public_p,
15421         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
15422         (__class_type_info::do_catch,
15423         __class_type_info::do_upcast): Prepend __. Adjust.
15424         (__class_type_info::__upcast_result,
15425         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
15426         Adjust.
15427         (__class_type_info::find_public_src): Prepend __. Adjust.
15428         (__class_type_info::do_find_public_src,
15429         __si_class_type_info::do_find_public_src,
15430         __vmi_class_type_info::do_find_public_src): Likewise.
15431         (__class_type_info::do_dyncast,
15432         __si_class_type_info::do_dyncast,
15433         __vmi_class_type_info::do_dyncast): Likewise.
15434         (__class_type_info::do_upcast,
15435         __si_class_type_info::do_upcast,
15436         __vmi_class_type_info::do_upcast): Likewise.
15437         (__dynamic_cast): Adjust.
15438         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
15439         (__function_type_info::is_function_p): Likewise.
15440         (__pointer_type_info::do_catch): Likewise. Adjust.
15441         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
15442         (__throw_type_match_rtti_2): Adjust.
15443         (__is_pointer): Adjust.
15444
15445 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
15446
15447         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
15448         (complete_ctor_identifier): New macro.
15449         (special_function_kind): Add sfk_copy_constructor and
15450         sfk_assignment_operator.
15451         (LOOKUP_HAS_IN_CHARGE): Remove.
15452         (cons_up_default_function): Rename to ...
15453         (implicitly_declare_fn): ... this.
15454         * call.c (build_new_method_call): Add in-charge parameters for
15455         constructors here.
15456         * class.c (add_implicitly_declared_members): Change parameter name
15457         from cant_have_assignment to cant_have_const_assignment.
15458         Replace calls to cons_up_default_function to implicitly_declare_fn.
15459         * cvt.c (ocp_convert): Use complete_ctor_identifier.
15460         * decl.c (initialize_predefined_identifiers): Initialize it.
15461         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
15462         complex expression.
15463         * init.c (expand_default_init): Don't calculate the in-charge
15464         parameter here.
15465         (build_new_1): Likewise.
15466         * lex.c (cons_up_default_function): Move to method.c.
15467         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
15468         (implicitly_declare_fn): New function.
15469         * typeck.c (build_static_cast): Use complete_ctor_identifier.
15470         (build_modify_expr): Likewise.
15471         * typeck2.c (build_functional_cast): Likewise.
15472
15473         Under the new ABI, constructors don't return `this'.
15474         * cp-tree.h (warn_reorder): Declare.
15475         (special_function_kind): New enum.
15476         (global_base_init_list): Remove declaration.
15477         (emit_base_init): Don't return a value.
15478         (check_base_init): Don't declare.
15479         (is_aggr_typedef): Likewise.
15480         * decl.c (check_special_function_return_type): New function.
15481         (return_types): Remove.
15482         (grokdeclarator): Use check_special_function_return_type.
15483         (start_function): Don't initialize ctor_label under the new ABI.
15484         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
15485         * init.c (begin_init_stmts): Move to top of file.
15486         (finish_init_stmts): Likewise.
15487         (warn_reorder): Don't declare.
15488         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
15489         value.
15490         (check_base_init): Remove.
15491         (is_aggr_typedef): Likewise.
15492         (build_new_1): Don't use the return value of a constructor.
15493         * semantics.c (setup_vtbl_ptr): Don't use the return value
15494         of emit_base_init.
15495         * typeck.c (check_return_expr): Don't magically convert return
15496         statements into `return this' in constructors under the new ABI.
15497
15498         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
15499         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
15500         (base_ctor_identifier): New macro.
15501         (base_dtor_identifier): Likewise.
15502         (deleting_dtor_identifier): Likewise.
15503         * decl.c: Don't include obstack.h.
15504         (obstack_chunk_alloc): Don't define.
15505         (obstack_chunk_free): Likewise.
15506         (struct predefined_identifier): New type.
15507         (initialize_predefined_identifiers): New function.
15508         (init_decl_processing): Use it.
15509         (debug_temp_inits): Remove.
15510         (start_method): Don't call preserve_data.
15511         (hack_incomplete_structures): Update comment.
15512         * init.c (init_init_processing): Don't initialize
15513         nelts_identifier.
15514         (build_offset_rf): Remove dead code.
15515         (build_delete): Use CLASSTYPE_N_BASECLASSES.
15516         * search.c (init_search_processing): Don't initialize
15517         vptr_identifier.
15518
15519 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15520
15521         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
15522         some sign_compare warnings.
15523
15524 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
15525
15526         Rename abi::__vmi_class_type_info members.
15527         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
15528         base_list, detail_masks members to vmi_flags, vmi_base_count,
15529         vmi_bases and vmi_flags_masks respectively.
15530         (__vmi_class_type_info::vmi_flags_masks): Rename
15531         details_unknown_mask to flags_unknown_mask.
15532         * tinfo.cc (__class_type_info::do_upcast): Adjust.
15533         (__vmi_class_type_info::do_find_public_src): Adjust.
15534         (__vmi_class_type_info::do_dyncast): Adjust.
15535         (__vmi_class_type_info::do_upcast): Adjust.
15536
15537 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
15538
15539         * tinfo.cc (convert_to_base): New function.
15540         (get_vbase_offset): Remove. Move into convert_to_base.
15541         (__vmi_class_type_info::do_find_public_src): Adjust.
15542         (__vmi_class_type_info::do_dyncast): Adjust.
15543         (__vmi_class_type_info::do_upcast): Adjust.
15544
15545 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
15546
15547         * tinfo.cc (operator=): Use __builtin_strcmp.
15548         * tinfo2.cc (before): Likewise.
15549
15550 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
15551
15552         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
15553         (DECL_SAVED_INLINE): Rename to ...
15554         (DECL_DEFERRED_FN): ... this.
15555         (in_function_p): Remove declaration.
15556         (mark_inline_for_output): Rename to ...
15557         (defer_fn): ... this.
15558         * decl.c (finish_function): Adjust call to mark_inline_for_output.
15559         (in_function_p): Remove definition.
15560         * decl2.c (saved_inlines): Rename to ...
15561         (deferred_fns): ... this.
15562         (saved_inlines_used): Rename to ...
15563         (deferred_fns_used): ... this.
15564         (mark_inline_for_output): Rename to ...
15565         (defer_fn): ... this.
15566         (finish_file): Adjust accordingly.
15567         (init_decl2): Likewise.
15568         * lex.c (cons_up_default_function): Likewise.
15569         * pt.c (mark_decl_instantiated): Likewise.
15570         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
15571         circumstances.
15572         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
15573         * semantics.c (expand_body): Defer more functions.
15574
15575 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
15576
15577         * vec.cc: New file.
15578         * Make-lang.in (CXX_LIB2FUNCS): Add it.
15579         (vec.o): Build it.
15580         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
15581         __cxa_vec_delete): Declare.
15582
15583 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
15584
15585         * rtti.c (dfs_class_hint_mark): New static function.
15586         (dfs_class_hint_unmark): New static function.
15587         (class_hint_flags): Use them.
15588
15589 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
15590
15591         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
15592
15593 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
15594
15595         * cp-tree.h (instantiate_decl): Change prototype.
15596         * decl2.c (mark_used): Adjust call.
15597         * optimize.c (inlinable_function_p): Adjust handling of templates.
15598         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
15599         (do_type_instantiation): Likewise.
15600         (instantiate_decl): Defer more templates.
15601         (instantiate_pending_templates): Adjust logic to handle inline
15602         friend functions.
15603
15604         * Makefile.in (GGC_H): New variable.  Use it throughout in place
15605         of ggc.h.
15606
15607         * call.c: Don't include obstack.h.  Include ggc.h.
15608         (obstack_chunk_alloc): Don't define.
15609         (obstack_chunk_free): Likewise.
15610         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
15611         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
15612         (pop_switch): Free it.
15613
15614         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
15615
15616         * dump.c (dequeue_and_dump): Don't try to print the bit_position
15617         if we don't have a DECL_FIELD_OFFSET.
15618
15619 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
15620
15621         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
15622         special_function_p.
15623
15624 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15625
15626         * cfns.gperf (hash, libc_name_p): Prototype.
15627
15628         * rtti.c (build_dynamic_cast_1): Constification.
15629
15630         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
15631
15632         * semantics.c (deferred_type_access_control): Prototype.
15633
15634 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
15635
15636         Correct many new ABI issues regarding vbase and vcall offset
15637         layout.
15638         * cp-tree.h (BINFO_VTABLE): Document.
15639         (struct lang_type): Tweak formatting.
15640         (BINFO_PRIMARY_BINFO): Add to documentation.
15641         (CLASSTYPE_VSIZE): Fix typo in comment.
15642         (CLASSTYPE_VBASECLASSES): Update documentation.
15643         (BINFO_VBASE_MARKED): Remove.
15644         (SET_BINFO_VBASE_MARKED): Likewise.
15645         (CLEAR_BINFO_VBASE_MARKED): Likewise.
15646         (BINFO_FIELDS_MARKED): Remove.
15647         (SET_BINFO_FIELDS_MARKED): Likewise.
15648         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
15649         (enum access_kind): New enumeration.
15650         (num_extra_vtbl_entries): Remove declaration.
15651         (size_extra_vtbl_entries): Likewise.
15652         (get_vtbl_decl_for_binfo): New function.
15653         (dfs_vbase_unmark): Remove declaration.
15654         (mark_primary_bases): Likewise.
15655         * class.c (SAME_FN): Remove.
15656         (struct vcall_offset_data_s): Move definition.
15657         (build_vbase_pointer): Use `build', not `build_binary_op', to
15658         access the vbase pointer under the new ABI.
15659         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
15660         (build_primary_vtable): Likewise.
15661         (dfs_mark_primary_bases): Move here from search.c.
15662         (mark_primary_bases): Likewise.
15663         (determine_primary_bases): Under the new ABI, don't make a base
15664         class a primary base just because we don't yet have any virtual
15665         functions.
15666         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
15667         (num_vfun_entries): Remove.
15668         (dfs_count_virtuals): Likewise.
15669         (num_extra_vtbl_entries): Likewise.
15670         (size_extra_vtbl_entries): Likewise.
15671         (layout_virtual_bases): Iterate in inheritance graph order under
15672         the new ABI.
15673         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
15674         indicate that a vfield is present.
15675         (init_class_processing): Initialize access_public_node, etc., from
15676         ak_public, etc.
15677         (get_vtbl_decl_for_binfo): New function.
15678         (dump_class_hierarchy_r): Likewise.
15679         (dump_class_hierarchy): Use it.
15680         (finish_vtbls): Build the vtbls in inheritance graph order.
15681         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
15682         (initialize_vtable): Use get_vtbl_decl_for_binfo.
15683         (accumulate_vtbl_inits): Add comments explaining why a pre-order
15684         walk is required.
15685         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
15686         where the vptr points, even for primary vtables.
15687         (build_vtbl_initializer): Adjust handling of vbase and vcall
15688         offsets.
15689         (build_vcall_and_vbase_vtable_entries): New function.
15690         (dfs_build_vbase_offset_vtbl_entries): Remove.
15691         (build_vbase_offset_vtbl_entries): Reimplement.
15692         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
15693         were already handled in a primary base class vtable.
15694         (build_vcall_offset_vtbl_entries): Adjust.
15695         (build_rtti_vtbl_entries): Adjust.
15696         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
15697         * init.c (expand_virtual_init): Simplify.
15698         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
15699         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
15700         * search.c (BINFO_ACCESS): New macro.
15701         (SET_BINFO_ACCESS): Likewise.
15702         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
15703         (access_in_type): Likewise.
15704         (dfs_accessible_p): Likewise.
15705         (protected_accessible_p): Likewise.
15706         (lookup_fnfields_1): Adjust documentation.
15707         (dfs_mark_primary_bases): Move to class.c
15708         (mark_primary_bases): Likewise.
15709         (dfs_vbase_unmark): Remove.
15710         (virtual_context): Use BINFO_FOR_VBASE.
15711         (dfs_get_vbase_types): Simplify.
15712         (dfs_build_inheritance_graph_order): New function.
15713         (get_vbase_types): Use it.
15714         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
15715
15716         * tinfo.cc (get_vbase_offset): New function.
15717         (__vmi_class_type_info::do_find_public_src): Use it.
15718         (__vmi_class_type_info::do_dyncast): Likewise.
15719         (__vmi_class_type_info::do_upcast): Likewise.
15720
15721 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
15722
15723         * lang-specs.h: Pass -fno-show-column to the preprocessor.
15724
15725 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
15726
15727         * rtti.c (class_hint_flags): Rename flags.
15728         (class_initializer): Remove flags.
15729         (synthesize_tinfo_var): Combine offset and flags. Add flags
15730         for __vmi_class_type_info.
15731         (create_tinfo_types): Remove flags from __class_type_info and
15732         __si_class_type_info. Merge flags and offset from
15733         base_class_type_info.
15734         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
15735         (__base_class_info::is_virtual_p): Adjust.
15736         (__base_class_info::is_public_p): Adjust.
15737         (__base_class_info::offset): New accessor.
15738         (__class_type_info::details): Remove member.
15739         (__class_type_info::__class_type_info): Lose details.
15740         (__class_type_info::detail_masks): Remove.
15741         (__si_class_type_info::__si_class_type_info): Lose details.
15742         (__vmi_class_type_info::details): New member.
15743         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
15744         (__vmi_class_type_info::detail_masks): New member.
15745         * tinfo.cc (__class_type_info::do_upcast): Initialize result
15746         with unknown_details_mask.
15747         (__vmi_class_type_info::do_find_public_src): Adjust
15748         (__vmi_class_type_info::do_dyncast): Adjust.
15749         (__vmi_class_type_info::do_upcast): Set result details, if
15750         needed. Adjust.
15751         (__dynamic_cast): Temporarily #if out optimization.
15752
15753 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
15754
15755         * rtti.c (get_tinfo_decl): Mark used.
15756         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
15757         mark as dealt with, if we output it.
15758
15759 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
15760
15761         * class.c: Reorganize to put virtual function table initialization
15762         machinery at the end of the file.
15763
15764 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
15765
15766         * class.c (finish_struct): Use bitsize_zero_node.
15767         * pt.c (instantiate_class_template): Likewise.
15768
15769 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
15770
15771         Put RTTI entries at negative offsets in new ABI.
15772         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
15773         vbase offset at index -3, not -1.
15774         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
15775         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
15776         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
15777         (build_rtti_vtbl_entries): New function.
15778         (set_rtti_entry): Remove.
15779         (build_primary_vtable): Don't use it.
15780         (build_secondary_vtable): Likewise.
15781         (start_vtable): Remove.
15782         (first_vfun_index): New function.
15783         (set_vindex): Likewise.
15784         (add_virtual_function): Don't call start_vtable.  Do call
15785         set_vindex.
15786         (set_primary_base): Rename parameter.
15787         (determine_primary_base): Likewise.
15788         (num_vfun_entries): Don't use skip_rtti_stuff.
15789         (num_extra_vtbl_entries): Include RTTI information.
15790         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
15791         (skip_rtti_stuff): Remove.
15792         (dfs_modify_vtables): Don't use it.
15793         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
15794         (layout_nonempty_base_or_field): Update size handling.
15795         (create_vtable_ptr): Tweak.
15796         (layout_class_type): Adjust parameter names.
15797         (finish_struct_1): Simplify.
15798         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
15799         (skip_rtti_stuff): Remove.
15800         (first_vfun_index): New function.
15801         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
15802         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
15803         (marked_vtable_pathp): Declare.
15804         (unmarked_vtable_pathp): Likewise.
15805         * error.c (dump_expr): Use first_vfun_index to calculate vtable
15806         offsets.
15807         * rtti.c (build_headof): Look for RTTI at negative offsets.
15808         (get_tinfo_decl_dynamic): Likewise.
15809         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
15810         here.
15811         (create_pseudo_type_info): Do it here instead.  Adjust so that
15812         vptr points at first virtual function.
15813         * search.c (marked_vtable_pathp): Make it global.
15814         (unmarked_vtable_pathp): Likewise.
15815         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
15816         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
15817         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
15818         (get_pure_virtuals): Likewise.
15819         (expand_upcast_fixups): Likewise.
15820         * tree.c (debug_binfo): Likewise.
15821         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
15822         negative offset.
15823
15824 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15825
15826         * class.c (check_field_decl): Fix typo.
15827         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
15828         (check_methods): Likewise.
15829         (check_field_decls): Likewise.
15830         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
15831         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
15832         Use DECL_RESULT_FLD, not DECL_RESULT.
15833         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
15834         * lex.c (identifier_type): Likewise.
15835         * pt.c (determine_specialization, lookup_template_class): Likewise.
15836         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
15837         (resolve_overloaded_unification, more_specialized): Likewise.
15838         * semantics.c (finish_member_declaration): Likewise.
15839         * typeck.c (build_x_function_call): Likewise.
15840
15841 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
15842
15843         * class.c (layout_empty_base): Handle empty bases with non-byte
15844         alignment.
15845         (build_base_field): Likewise.
15846         (layout_virtual_bases): Likewise.
15847
15848         * class.c (finish_struct_1): Fix typo in this change:
15849
15850         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15851
15852 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
15853
15854         * decl.c (grokdeclarator): Count partial specializations when
15855         keeping track of how many template classes have been seen.
15856
15857         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
15858
15859 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15860
15861         * class.c (build_vbase_pointer_fields): layout_field now place_field.
15862         (get_vfield_offset): Use byte_position.
15863         (set_rtti_entry): Set OFFSET to ssizetype zero.
15864         (get_binfo_offset_as_int): Deleted.
15865         (dfs_record_base_offsets): Use tree_low_cst.
15866         (dfs_search_base_offsets): Likewise.
15867         (layout_nonempty_base_or_field): Reflect changes in RLI format
15868         and call byte_position.
15869         (layout_empty_base): Convert offset to ssizetype.
15870         (build_base_field): use rli_size_unit_so_far.
15871         (dfs_propagate_binfo_offsets): Do computation in proper type.
15872         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
15873         (layout_class_type): Reflect changes in RLI names and fields.
15874         (finish_struct_1): Set DECL_FIELD_OFFSET.
15875         * dump.c (dequeue_and_dump): Call bit_position.
15876         * expr.c (cplus_expand_constant): Use byte_position.
15877         * rtti.c (expand_class_desc): Use bitsize_one_node.
15878         * typeck.c (build_component_addr): Use byte_position and don't
15879         special case for zero offset.
15880
15881 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
15882
15883         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
15884
15885         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
15886         tinfo object.
15887         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
15888         vtable.
15889
15890 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15891
15892         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
15893         DECL_P macros.
15894         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
15895         make_typename_type, check_initializer, cp_finish_decl,
15896         xref_tag): Likewise.
15897         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
15898         decl_namespace, arg_assoc_template_arg, arg_assoc,
15899         validate_nonmember_using_decl, do_class_using_decl): Likewise.
15900         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
15901         args_to_string): Likewise.
15902         * friend.c (is_friend): Likewise.
15903         * lex.c (note_got_semicolon, note_list_got_semicolon,
15904         is_global): Likewise.
15905         * method.c (build_overload_nested_name, build_overload_value,
15906         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
15907         * parse.y (typename_sub, typename_sub1): Likewise.
15908         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
15909         process_partial_specialization, convert_template_argument,
15910         template_args_equal, add_pending_template, lookup_template_class,
15911         for_each_template_parm_r, maybe_fold_nontype_arg,
15912         tsubst, instantiate_template, type_unification_real, unify,
15913         instantiate_pending_templates, set_mangled_name_for_template_decl):
15914         Likewise.
15915         * repo.c (repo_get_id, repo_template_used): Likewise.
15916         * search.c (lookup_field_1): Likewise.
15917         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
15918         * xref.c (classname): Likewise.
15919
15920 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
15921
15922         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
15923         (CANONICAL_BINFO): New macro.
15924         (BINFO_NEW_VTABLE_MARKED): Use it.
15925         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
15926         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
15927         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
15928         not TREE_TYPE.
15929         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15930         (build_secondary_vtable): Likewise.
15931         (dfs_finish_vtbls): Likewise.
15932         (dfs_accumulate_vtbl_inits): Likewise.
15933         (accumulate_vtbl_inits): New function.
15934         (finish_vtbls): Make sure that virtual bases come after
15935         non-virtual bases in the vtable group.
15936         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
15937         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15938         * search.c (struct vbase_info): Move definition.
15939         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15940         (unmarked_new_vtable_p): Likewise.
15941         (dfs_mark_vtable_path): Remove.
15942         (dfs_mark_new_vtable): Remove.
15943         (dfs_unmark_new_vtable): Likewise.
15944         (dfs_clear_search_slot): Likewise.
15945         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
15946         (dfs_clear_vbase_slots): Likewise.
15947         (init_vbase_pointers): LIkewise.
15948
15949 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
15950
15951         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
15952         SIZETYPE to a non-SIZETYPE.
15953
15954 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
15955
15956         * class.c (layout_virtual_bases): Adjust names in conditionally
15957         compiled code.
15958
15959         * class.c (record_base_offsets): New function.
15960         (layout_conflict_p): Likewise.
15961         (layout_nonempty_base_or_field): Use it.
15962         (layout_empty_base): New function.
15963         (build_base_field): Use it.
15964         (build_base_fields): Update comment.
15965         (layout_virtual_bases): Fold in a little code form
15966         layout_basetypes.  Use layout_empty_base.
15967         (layout_basetypes): Remove.
15968         (end_of_class): New function.
15969         (layout_class_type): Use it.  Adjust.
15970
15971         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
15972         (fntype_p): Remove.
15973         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
15974         comment.
15975         (dfs_skip_nonprimary_vbases_markedp): Likewise.
15976         * typeck.c (fntype_p): Remove.
15977
15978         * cp-tree.h (TI_SPEC_INFO): Remove.
15979         (CLASSTYPE_TI_SPEC_INFO): Likewise.
15980         * pt.c (process_partial_specialization): Likewise.
15981
15982         * class.c (build_base_field): Fix thinko in computation of binfo
15983         offsets.
15984
15985         * tree.c (mark_local_for_remap_p): Mark variables declared in
15986         TARGET_EXPRs as well.
15987
15988 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
15989
15990         * typeck.c (require_complete_type, complete_type,
15991         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
15992         build_array_ref, convert_arguments, pointer_diff,
15993         build_x_unary_op, build_unary_op, build_c_cast,
15994         build_modify_expr): Use COMPLETE_TYPE_P etc.
15995         * call.c (is_complete, convert_like_real,
15996         build_new_method_call): Likewise.
15997         * class.c (build_vbase_pointer_fields, check_bases,
15998         build_base_field, finish_struct_1, pushclass): Likewise.
15999         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
16000         * decl.c (maybe_process_template_type_declaration, pushtag,
16001         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
16002         layout_var_decl, check_initializer, cp_finish_decl,
16003         grokdeclarator, require_complete_types_for_parms,
16004         grok_op_properties, xref_tag, xref_basetypes,
16005         check_function_type): Likewise.
16006         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
16007         * friend.c (do_friend): Likewise.
16008         * init.c (build_offset_ref): Likewise.
16009         * parse.y (structsp): Likewise.
16010         * pt.c (maybe_process_partial_specialization,
16011         tsubst_friend_function, instantiate_class_template, tsubst,
16012         do_type_instantiation, instantiate_pending_templates): Likewise.
16013         * repo.c (repo_get_id): Likewise.
16014         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
16015         synthesize_tinfo_var, emit_support_tinfos): Likewise.
16016         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
16017         * semantics.c (begin_class_definition): Likewise.
16018         * tree.c (build_cplus_method_type): Likewise.
16019         * typeck2.c (digest_init, build_functional_cast,
16020         add_exception_specifier): Likewise.
16021         * parse.h, parse.c: Regenerated.
16022
16023 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
16024
16025         * inc/cxxabi.h: New header file. Define new-abi entry points.
16026         (__pointer_type_info::target): Rename member to ...
16027         (__pointer_type_info::type): ... here.
16028         (__base_class_info::type): Rename member to ...
16029         (__base_class_info::base): ... here.
16030         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
16031         * cp-tree.h (CPTI_ABI): New global tree enumeration.
16032         (abi_node): New global tree node.
16033         * decl.c (abi_node): Document.
16034         (init_decl_processing): Initialize abi_node.
16035         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
16036         (get_vmi_pseudo_type_info): Likewise.
16037         (create_tinfo_types): Likewise.
16038         (emit_support_tinfos): Likewise.
16039         * tinfo.h (cxxabi.h): Include for new-abi.
16040         Move rtti class definitions to new header file.
16041         * tinfo.cc (abi): Use the namespace.
16042         (std): Move new abi rtti classes from here ...
16043         (__cxxabiv1): ... to here.
16044         * tinfo2.cc (cxxabi.h): Include for new-abi.
16045         Move rtti class definitions to new header file.
16046         (std): Move new abi rtti classes from here ...
16047         (__cxxabiv1): ... to here.
16048         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
16049         namespace.
16050
16051 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
16052             Jason Merrill  <jason@casey.cygnus.com>
16053
16054         * method.c (build_overload_int): Use host_integerp.
16055
16056 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16057
16058         * init.c (build_offset_ref): Handle the case of a templated member
16059         function.
16060
16061 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16062
16063         * except.c (expand_exception_blocks): Clear catch_clauses_last.
16064
16065 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
16066
16067         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
16068         * class.c (check_bitfield_decl): Turn illegal bitfields into
16069         non-bitfields.
16070         (dfs_propagate_binfo_offsets): Adjust for new size_binop
16071         semantics.
16072         (dfs_offset_for_unshared_vbases): Likewise.
16073         * cvt.c (cp_convert_to_pointer): Convert NULL to a
16074         pointer-to-member correctly under the new ABI.
16075         * expr.c (cplus_expand_constant): Don't use cp_convert when
16076         turning an offset into a pointer-to-member.
16077         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
16078         when dereferencing them under the new ABI.
16079         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
16080         of pointers-to-members under the new ABI.
16081
16082         * class.c (check_bitfield_decl): Remove restriction on really long
16083         bitfields.
16084         (layout_class_type): Implement new ABI handling of bitfields
16085         longer than their types.
16086
16087 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16088
16089         * parse.y (extdefs): Call ggc_collect.
16090         * parse.c: Regenerated.
16091
16092 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
16093
16094         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
16095         (note_name_declared_in_class): Use OVL_CURRENT to get at a
16096         potential overload.
16097
16098 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16099
16100         * class.c (build_vbase_path): Use integer_zerop.
16101         (build_vtable_entry): Use tree_low_cst.
16102         (get_vfield_offset): Use bit_position.
16103         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
16104         Use tree_low_cst.
16105         (check_bitfield_decl): Set DECL_SIZE using convert.
16106         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
16107         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
16108         Use tree_low_cst.
16109         (finish_struct_1): Use bit_position.
16110         (dump_class_hierarchy): Use tree_low_cst.
16111         * cp-tree.h (min_precision): Add declaration.
16112         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
16113         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
16114         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
16115         * expr.c (cplus_expand_constant): Use bit_position.
16116         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
16117         * rtti.c (get_base_offset): Use bit_position.
16118         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
16119         host_integerp, and tree_low_cst.
16120         (pointer_int_sum): Use integer_zerop.
16121         (build_component_addr): Use bit_position.
16122
16123 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
16124
16125         * typeck.c (require_complete_type): Don't assume size_zero_node.
16126         (complete_type_or_else): Likewise.
16127
16128 2000-03-16  Steven Grady <grady@digitaldeck.com>
16129             Jason Merrill  <jason@casey.cygnus.com>
16130
16131         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
16132
16133 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
16134
16135         * decl2.c (grokfield): Bail out if type is error_mark_node.
16136
16137 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
16138
16139         * tinfo2.cc (__ptr_to_member_data): Rename to ...
16140         (__pointer_to_member_data): ... here. Adjust.
16141         * rtti.c (create_tinfo_types): Adjust.
16142
16143 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
16144
16145         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
16146         * decl.c (ref_desc_type_node): Undocument.
16147         * rtti.c (ptr_ref_initializer): Rename to ...
16148         (ptr_initializer): ... here. Adjust comments.
16149         (ptmd_initializer): Fix comment thinko.
16150         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
16151         (create_tinfo_types): Remove ref_desc_type_node init.
16152         * tinfo2.cc (__reference_type_info): Remove.
16153
16154 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
16155
16156         * decl.c (cp_finish_decl): Remove obsolete comment.
16157
16158         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
16159
16160 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
16161
16162         * cp-tree.h: Tweak documentation.
16163         * class.c (build_vbase_pointer_fields): Layout the fields, too.
16164         (avoid_overlap): Remove.
16165         (get_binfo_offset_as_int): New function.
16166         (dfs_serach_base_offsets): Likewise.
16167         (layout_nonempty_base_or_field): Likewise.
16168         (build_base_field): Layout fields here.  Avoid placing two objects
16169         of the same type at the same address, under the new ABI.
16170         (build_base_fields): Adjust accordingly.
16171         (create_vtable_ptr): Return the new field, but don't attach it to
16172         TYPE_FIELDS.
16173         (remove_base_field): Remove.
16174         (remove_base_fields): Remove.
16175         (layout_basetypes): Adjust accordingly.
16176         (layout_class_type): Call layout_field for each field, rather than
16177         just making a wholesale call to layout_type.
16178
16179 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
16180
16181         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
16182
16183 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
16184
16185         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
16186
16187         * except.c (dtor_nothrow): New fn.
16188         (do_pop_exception): Use it.  Take type parm.
16189         (push_eh_cleanup): Take type parm.
16190         (expand_start_catch_block): Pass it.
16191         (build_eh_type_type_ref): Accept null type.
16192
16193 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
16194
16195         * cp-tree.h (revert_static_member_fn): Change prototype.
16196         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
16197         (grok_op_properties): Likewise.
16198         (start_function): Likewise.
16199         (revert_static_member_fn): Simplify.
16200         * pt.c (check_explicit_specialization): Adjust call to
16201         revert_static_member_fn.
16202
16203 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
16204
16205         * cp-tree.h (scope_kind): New type.
16206         (tmpl_spec_kind): Likewise.
16207         (declare_pseudo_global_level): Remove.
16208         (pseudo_global_level_p): Rename to template_parm_scope_p.
16209         (pushlevel): Remove declaration.
16210         (begin_scope): New function.
16211         (finish_scope): Likewise.
16212         (current_tmpl_spec_kind): Likewise.
16213         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
16214         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
16215         Add template_spec_p.
16216         (toplevel_bindings_p): Adjust.
16217         (declare_pseudo_global_level): Remove.
16218         (pseudo_global_level_p): Rename to template_parm_scope_p.
16219         (current_tmpl_spec_kind): New function.
16220         (begin_scope): Likewise.
16221         (finish_scope): Likewise.
16222         (maybe_push_to_top_level): Adjust.
16223         (maybe_process_template_type_declaration): Likewise.
16224         (pushtag): Likewise.
16225         (pushdecl_nonclass_level): Likewise.
16226         (lookup_tag): Likewise.
16227         (grokfndecl): Handle member template specializations.  Share
16228         constructor and non-constructor code.
16229         * decl2.c (check_classfn): Handle member template specializations.
16230         * pt.c (begin_template_parm_list): Use begin_scope.
16231         (begin_specialization): Likewise.
16232         (end_specialization): Likewise.
16233         (check_explicit_specialization): Use current_tmpl_spec_kind.
16234         Handle member template specializations.
16235         (end_template_decl): Use finish_scope.  Remove call to
16236         get_pending_sizes.
16237         (push_template_decl_real): Remove bogus error message.
16238         (tsubst_decl): Fix typo in code contained in comment.
16239         (instantiate_template): Handle member template specializations.
16240         (most_general_template): Likewise.
16241
16242 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
16243
16244         * lex.c (whitespace_cr): Compress consecutive calls to warning().
16245         (do_identifier): Ditto for error().
16246
16247         * pt.c (convert_nontype_argument): Ditto for cp_error().
16248         (convert_template_argument): Ditto for cp_pedwarn().
16249
16250 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
16251
16252         * exception.cc (__check_null_eh_spec): New fn.
16253         * except.c (expand_end_eh_spec): Call it if the spec is throw().
16254
16255 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
16256
16257         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
16258         * except.c (expand_end_eh_spec): Add the return type.
16259         * rtti.c (throw_bad_cast): Add the parmtypes.
16260         (throw_bad_typeid): Likewise.
16261
16262         * semantics.c (expand_stmt): Only leave out rtl for unused
16263         artificials, and set DECL_IGNORED_P on them as well.
16264         * decl.c (wrapup_globals_for_namespace): Likewise.
16265
16266 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
16267
16268         * decl.c (maybe_commonize_var): Skip all artificial decls.
16269         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
16270
16271 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
16272
16273         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
16274         * cp-tree.h: Declare flag_enforce_eh_specs.
16275         * decl.c (store_parm_decls, finish_function): Check it.
16276
16277         C library functions don't throw.
16278         * Makefile.in (cfns.h): New target.
16279         (except.o): Depend on it.
16280         * Make-lang.in (cc1plus): Depend on cfns.gperf.
16281         * cfns.gperf: New file.
16282         * cfns.h: Generated.
16283         * except.c: Include it.
16284         (nothrow_libfn_p): New fn.
16285         * decl.c (grokfndecl): Use it.
16286         * cp-tree.h: Declare it.
16287
16288         * decl.c (push_overloaded_decl_1, auto_function,
16289         define_function): Lose.
16290         (build_library_fn_1): New static fn.
16291         (builtin_function): Use it.
16292         (get_atexit_node): Use build_library_fn_ptr.
16293         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
16294         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
16295         push_void_library_fn, push_throw_library_fn): New fns.
16296         * cp-tree.h: Declare them.
16297         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
16298         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
16299         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
16300         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
16301         * rtti.c (build_runtime_decl): Lose.
16302         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
16303         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
16304         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
16305
16306         * call.c (build_call): Remove result_type parm.
16307         Call mark_used on unused artificial fns.
16308         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
16309
16310 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
16311
16312         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
16313         appropriate.
16314         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
16315         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
16316         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
16317         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
16318         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
16319         expand_generic_desc): Likewise.
16320
16321 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16322
16323         * exception.cc (__cp_pop_exception): Cleanup the original object.
16324
16325 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16326
16327         * decl.c (grok_op_properties): Merge conversion to void warning
16328         with other silly op warnings.
16329
16330 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
16331
16332         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
16333         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
16334
16335 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16336
16337         * decl.c (cp_make_fname_decl): New function.
16338         (wrapup_globals_for_namespace): Don't emit unused static vars.
16339         (init_decl_processing): Remove comment about use of
16340         array_domain_type. Set make_fname_decl.
16341         (cp_finish_decl): Remove __FUNCTION__ nadgering.
16342         * semantics.c (begin_compound_stmt): Remove
16343         current_function_name_declared flagging.
16344         (expand_stmt): Don't emit unused local statics.
16345         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
16346         specially.
16347
16348 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16349
16350         * typeck.c (convert_for_assignment): Don't look at array
16351         initializer.
16352         * call.c (convert_like_real): Likewise.
16353
16354 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
16355
16356         Add initial support for '\uNNNN' specifier.
16357         * lex.c (read_ucs): New fn.
16358         (readescape, skip_white_space): Call it.
16359         (is_extended_char, is_extended_char_1): New fns.
16360         (utf8_extend_token): New fn, #if 0'd out.
16361         (real_yylex): Treat extended chars like letters.
16362
16363         * search.c (note_debug_info_needed): Walk the bases even if we
16364         weren't deferring the type itself.
16365
16366 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16367
16368         * decl2.c (finish_objects): Constify a char*.
16369
16370         * method.c (emit_thunk): Likewise.
16371
16372 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
16373
16374         * typeck.c (dubious_conversion_warnings): Look through
16375         REFERENCE_TYPE.
16376
16377 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16378
16379         * class.c (dfs_modify_vtables): I is now unsigned.
16380         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
16381         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
16382         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
16383         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
16384         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
16385         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
16386         Call integer_all_onesp.
16387         * typeck2.c (process_init_constructor): Use compare_tree_int.
16388
16389         * lang-specs.h (as): Don't call if -syntax-only.
16390
16391 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
16392
16393         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
16394         RTL_EXPR_HAS_NO_SCOPE after all.
16395
16396 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
16397
16398         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
16399         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
16400         RTL_EXPR_HAS_NO_SCOPE.
16401
16402         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
16403         later.
16404
16405         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
16406
16407 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
16408
16409         * call.c (convert_like): Macrofy.
16410         (convert_like_with_context): New macro.
16411         (convert_like_real): Renamed from convert_like.  Add calling
16412         context parameters, for diagnostics. Add recursive flag.  Call
16413         dubious_conversion_warnings for outer conversion.
16414         (build_user_type_conversion): Use convert_like_with_context.
16415         (build_over_call): Likewise. Don't warn about dubious
16416         conversions here. Adjust convert_default_arg calls.
16417         (convert_default_arg): Add context parameters for diagnostics.
16418         Pass through to convert_like_with_context.
16419         * cp-tree.h (convert_default_arg): Add context parameters.
16420         (dubious_conversion_warnings): Prototype new function.
16421         * typeck.c (convert_arguments): Adjust convert_default_arg call.
16422         (dubious_conversion_warnings): New function, broken
16423         out of convert_for_assignment.
16424         (convert_for_assignment): Adjust.
16425
16426 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
16427
16428         * decl2.c (key_method): Break out from...
16429         (import_export_vtable, import_export_class): ...here.
16430
16431         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
16432         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
16433
16434         * search.c (note_debug_info_needed, dfs_debug_mark,
16435         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
16436         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
16437
16438 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
16439
16440         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
16441         typos.
16442
16443 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
16444
16445         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
16446         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
16447         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
16448         (lang_type): Split gets_new into has_new and has_array_new.
16449         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16450         (TYPE_GETS_NEW): Split into ...
16451         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
16452         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
16453         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
16454         (build_op_new_call): Don't declare.
16455         (build_new_1): Likewise.
16456         * call.c (build_op_new_call): Remove.
16457         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
16458         instead of TYPE_NEEDS_DESTRUCTOR.
16459         (finish_struct_bits): Likewise.
16460         (add_implicitly_declared_members): Likewise.
16461         (check_field_decl): Likewise.
16462         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
16463         correctly under the new ABI.
16464         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
16465         instead of TYPE_NEEDS_DESTRUCTOR.
16466         (initialize_local_var): Likewise.
16467         (destroy_local_var): Likewise.
16468         (cp_finish_decl): Likewise.
16469         (register_dtor_fn): Likewise.
16470         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
16471         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
16472         TYPE_VEC_DELETE_TAKES_SIZE here.
16473         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
16474         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
16475         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16476         (finish_destructor_body): Likewise.
16477         (maybe_build_cleanup_1): Likewise.
16478         * decl2.c (do_static_destruction): Likewise.
16479         * init.c (build_new_1): Make it static.
16480         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16481         (expand_cleanup_for_base): Likewise.
16482         (get_cookie_size): New function.
16483         (build_new_1): Handle array-new cookies correctly under the new
16484         ABI.
16485         (build_vec_delete_1): Likewise.
16486         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16487         (build_delete): Likewise.
16488         (build_vec_delete): Handle array-new cookies correctly under the new
16489         ABI.
16490         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16491         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
16492         TYPE_HAS_ARRAY_NEW_OPERATOR.
16493         * ptree.c (print_lang_type): Check them.
16494         * search.c (context_for_name_lookup): Fix typo in comment.
16495         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16496         * tree.c (break_out_cleanups): Likewise.
16497         (build_cplus_array_test_1): Likewise.
16498         (cp_build_qualified_type_real): Likewise.
16499         * typeck.c (complete_type): Likewise.
16500
16501         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
16502         the command-line, not the end.
16503
16504 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
16505
16506         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
16507
16508 2000-03-02  Tom Tromey  <tromey@cygnus.com>
16509
16510         * cp-tree.h (build_java_class_ref): Declare.
16511         * init.c (build_java_class_ref): No longer static.
16512         * except.c (expand_throw): Generate a Java-style `throw' if the
16513         thrown object is a "Java" object.
16514         (initialize_handler_parm): Generate a Java-style lookup of
16515         exception info if the caught object is a "Java" object.
16516         (catch_language, catch_language_init): New globals.
16517         (decl_is_java_type): New function.
16518         (expand_start_catch_block): Don't call push_eh_info() or
16519         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
16520         class reference to build_catch_block.
16521
16522 2000-03-02  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16523
16524         * typeck.c (comptypes): Treat sizetype like its language equivalent.
16525
16526 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
16527
16528         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
16529         to merge reference/pointer code and fix incorrect warnings.
16530
16531 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
16532
16533         * search.c (protected_accessible_p): Use context_for_name_lookup.
16534
16535         * init.c (construct_virtual_bases): Fix thinko.
16536         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
16537
16538 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
16539
16540         * decl.c (current_function_decl): Move to toplev.c.
16541
16542 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
16543
16544         * pt.c (fn_type_unification): Unify return type, whenever
16545         provided.
16546         (get_bindings_real): Only pass return type when necessary.
16547         Remove explicit return type check.
16548         * class.c (resolve_address_of_overloaded_function): Pass desired
16549         return type to fn_type_unification.
16550
16551 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16552
16553         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
16554         DECL_FIELD_SIZE.
16555         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
16556         DECL_FIELD_SIZE.
16557         * rtti.c (expand_class_desc): Likewise.
16558         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
16559         (THUNK_VCALL_OFFSET): Likewise.
16560         (THUNK_DELTA): Reflect changes in ../tree.h.
16561
16562 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
16563
16564         * search.c (protected_accessible_p): Also allow the access if
16565         the member is public in DERIVED.  Lose TYPE parm.
16566         (friend_accessible_p): Lose TYPE parm.
16567         (accessible_p): Adjust.
16568
16569 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16570
16571         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
16572         on things that are not sizes; ssize_binop deleted.
16573         Call size_diffop when appropriate.
16574         (dfs_build_vcall_offset_vtbl_entries): Likewise.
16575         (build_primary_vtable, build_secondary_vtable): Likewise.
16576         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
16577         Variable I is HOST_WIDE_INT.
16578         (get_vfield_offset): Pass proper types to size_binop.
16579         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
16580         (finish_struct_1): Likewise.
16581         (skip_rtti_stuff): Arg N is now pointer to signed.
16582         (layout_class_type): Use size_zero_node.
16583         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
16584         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
16585         * decl.c (complete_arry_type): Pass proper types to size_binop.
16586         (xref_basetypes): BINFO_OFFSET is sizetype.
16587         * error.c (dump_expr): Don't use size_binop non-sizes.
16588         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
16589         * init.c (construct_virtual_bases): Fix type error.
16590         (build_vec_delete_1): Pass proper type to size_binop and don't
16591         fold result.
16592         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
16593         * rtti.c (get_base_offset): Pass proper type to size_binop.
16594         * search.c (dfs_find_vbases): Fix type error.
16595         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
16596         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
16597         * tree.c (debug_binfo): Variable N is signed.
16598         Use HOST_WIDE_INT_PRINT_DEC.
16599         * typeck.c (comptypes): sizetype is same as equivalent integer type.
16600         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
16601         size_one_node and size_zero_node.
16602         (c_alignof): Use size_one_node.
16603         (build_component_addr): Pass proper types to size_binop.
16604         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
16605
16606 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
16607
16608         Implement class scope using-declarations for functions.
16609         * class.c (handle_using_decl): Call add_method for used functions.
16610         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
16611         (add_method): Used functions are hidden by local functions.
16612         (check_bases_and_members): Handle using-decls before finalizing
16613         CLASSTYPE_METHOD_VEC.
16614         * call.c (add_function_candidate): Add ctype parm; if nonzero,
16615         override the type of 'this' accordingly.
16616         (add_template_candidate, add_template_candidate_real): Add ctype parm.
16617         (convert_class_to_reference, build_user_type_conversion_1,
16618         build_new_function_call, build_object_call, build_new_op,
16619         build_new_method_call): Pass ctype parm.
16620
16621         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
16622         the baselink.
16623         * call.c (convert_class_to_reference, build_user_type_conversion_1,
16624         build_new_function_call, build_object_call, build_new_op,
16625         build_new_method_call, build_op_delete_call): Don't get basetype_path
16626         from a baselink.
16627         * typeck.c (build_component_ref): Likewise.
16628         * init.c (build_offset_ref): Likewise.
16629         (resolve_offset_ref): Don't call enforce_access.
16630         Call build_scoped_ref.
16631         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
16632         would cause an error or if -pedantic.
16633         * class.c (alter_access): Lose binfo parm.
16634
16635 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
16636
16637         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
16638         types.
16639
16640 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
16641
16642         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
16643         pseudo_type_info creation into the std namespace
16644
16645 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
16646
16647         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
16648         (import_export_class): Remove declaration.
16649         * decl2.c (import_export_class): Make it static.
16650         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
16651         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
16652         EXPR_WITH_FILE_LOCATION.
16653         * lex.c (check_newline): Tweak filename/lineno setting.
16654         * semantics.c (begin_while_stmt): Fix typo in comment.
16655
16656 2000-02-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16657
16658         * lang-options.h (-fmessage-length=): Add missing option.
16659
16660         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
16661
16662 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
16663
16664         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
16665
16666 2000-02-25  Jim Wilson  <wilson@cygnus.com>
16667
16668         * optimize.c (expand_call_inline): Emit the return label before
16669         evaluating the return value.
16670
16671 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
16672
16673         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
16674         than duplicating functionality here.
16675         * optimize.c: Include input.h.
16676         (expand_call_inline): Use push_srcloc and pop_srcloc.
16677         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
16678         * parse.c: Regenerated.
16679         * Makefile.in (lex.o): Depend on input.h.
16680         (optimize.o): Likewise.
16681
16682 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
16683
16684         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
16685         function type, rather than ICE.
16686
16687 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
16688
16689         * decl.c (grokdeclarator): Call decl_type_access_control.
16690         * parse.y (parse_end_decl): Don't call decl_type_access_control if
16691         decl is null.
16692
16693 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
16694
16695         * decl.c (decls_match): Remove obsolete static member nadgering.
16696
16697 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16698
16699         * decl.c (grokdeclarator): Change ANSI to ISO.
16700         * lex.c (consume_string, readescape, do_identifier): Likewise.
16701         (parse_float, real_yylex): Likewise.
16702         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
16703         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
16704         new_type_id, maybe_label_decls, simple_stmt,
16705         for.init.statement): Likewise.
16706         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
16707         * semantics.c (finish_named_return_value): Likewise.
16708         * parse.c: Regenerate.
16709
16710 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
16711
16712         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
16713         (CPTI_CLASS_STAR_TYPE): Remove.
16714         (vtable_index_type): Likewise.
16715         (class_star_type_node): Remove.
16716         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
16717         (build_binary_op_nodefault): Remove.
16718         * call.c (build_new_op): Use build_binary_op instead of
16719         build_binary_op_nodefault.
16720         * decl.c (init_decl_processing): Remove class_star_type_node
16721         initialization.  Make delta_type_node ptrdiff_type_node under the
16722         new ABI.  Initialize vtable_index_type.
16723         (build_ptrmemfunc_type): Build different structures for the new
16724         ABI.
16725         (build_enumerator): Use build_binary_op instead of
16726         build_binary_op_nodefault.
16727         * method.c (build_overload_value): Mangle pointers-to-members
16728         appropriately under the new ABI.
16729         * typeck.c (build_array_ref): Use build_binary_op instead of
16730         build_binary_op_nodefault.
16731         (get_member_function_from_ptrfunc): Adjust for the new ABI.
16732         (build_binary_op_nodefault): Rename to ...
16733         (build_binary_op): ... this.  Remove old version.  Adjust for
16734         pointer-to-member comparisons under the new ABI.
16735         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
16736         (build_ptrmemfunc): Adjust for the new ABI.
16737         (expand_ptrmemfunc_cst): Likewise.
16738         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
16739         (pfn_from_ptrmemfunc): Adjust for the new ABI.
16740
16741 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
16742
16743         * call.c (build_object_call): Compress consecutive calls to
16744         cp_error.
16745         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
16746         (build_op_delete_call): Adjust message formatting.
16747
16748         * class.c (check_bases): Compress consecutive calls to
16749         cp_pedwarn.
16750         (finish_struct_anon): Say 'ISO C++'.
16751
16752         * decl.c (start_decl): Same here.
16753         (grok_reference_init): Likewise.
16754         (grokfndecl): Correct message formatting.
16755         (grokfndecl): Improve diagnostic.
16756         (check_static_variable_definition): Likewise. Say 'ISO C++'
16757         (compute_array_index_type): Say 'ISO C++'
16758         (create_array_type_for_decl): Compress consecutive calls to
16759         cp_error.
16760         (grokdeclarator): Say 'ISO C++'
16761         (grok_op_properties): Likewise.
16762
16763         * decl2.c (delete_sanity): Clairify diagnostic.
16764         (check_member_template): Same here.
16765         (grok_function_init): Use consistent terminology.
16766
16767         * expr.c (do_case): Say 'ISO C++'
16768
16769         * friend.c (do_friend): Compress consecutive calls to warning.
16770
16771 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
16772
16773         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
16774         * class.c (build_secondary_vtable): Reorganize.  Don't create a
16775         new vtable under the new ABI.
16776         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
16777         computing the size.
16778         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
16779         the initializing elements.
16780         (initialize_vtable): New function.
16781         (dfs_finish_vtbls): Use it.
16782         (dfs_accumulate_vtbl_inits): New function.
16783         (finish_vtbls): Merge primary and secondary vtables under the new
16784         ABI.
16785         (finish_struct_1): Remove redundant call to layout_vtable_decl.
16786         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
16787         aren't VAR_DECLs.
16788
16789         * class.c (build_vtable): New function, split out from ...
16790         (get_vtable_decl): ... here, and ...
16791         (build_secondary_vtable): ... here.
16792
16793         * pt.c (tsubst_decl): Fix formatting.
16794
16795 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16796
16797         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
16798         (avoid_overlap, build_base_field): Likewise.
16799         (build_base_field, build_base_fields, is_empty_class):
16800         Test DECL_SIZE with integer_zero.
16801         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
16802         * cp-tree.h (struct lang_type): New field size_unit.
16803         (CLASSTYPE_SIZE_UNIT): New macro.
16804         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
16805         (cp_finish_decl): Delete -Wlarger-than processing.
16806         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
16807         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
16808         * tree.c (make_binfo): binfo vector is one entry longer.
16809         (walk_tree): Walk DECL_SIZE_UNIT.
16810
16811 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
16812
16813         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
16814         comment.
16815         (build_vtable_entry): Don't assume all vtable entries are
16816         functions.
16817         (build_vtbl_initializer): Adjust accordingly.
16818         (get_vtable_decl): Fix formatting.
16819
16820 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
16821
16822         * semantics.c (deferred_type_access_control): Walk the entire
16823         type_lookups list.
16824         (save_type_access_control): Rename from
16825         initial_deferred_type_access_control.  Just remember the value.
16826         (decl_type_access_control): New fn.
16827         (begin_function_definition): Use deferred_type_access_control, after
16828         we've started the function.  Set type_lookups to error_mark_node.
16829         * parse.y (frob_specs, fn.def1): Adjust.
16830         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
16831         (parse_end_decl, parse_bitfield0, parse_method): New fns.
16832         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
16833         (after_type_component_declarator0): Likewise.
16834         (after_type_component_declarator): Likewise.
16835         (notype_component_declarator): Likewise.
16836         * cp-tree.h: Adjust.
16837
16838         * decl.c (redeclaration_error_message): Allow redeclaration of
16839         namespace-scope decls.
16840
16841 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
16842
16843         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
16844
16845 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
16846
16847         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
16848         * decl2.c (grokclassfn): Likewise.
16849
16850         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
16851
16852         * decl2.c (lang_decode_option): Don't set default message length
16853         here.
16854         * lex.c (lang_init_options): Set it here.
16855
16856 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
16857
16858         Make DECL_CONTEXT mean the class in which a member function was
16859         declared, even for a virtual function.
16860         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
16861         (DECL_FRIEND_CONTEXT): New macro.
16862         (DECL_REAL_CONTEXT): Remove.
16863         (SET_DECL_FRIEND_CONTEXT): Likewise.
16864         (DECL_VIRTUAL_CONTEXT): Adjust.
16865         (DECL_CLASS_SCOPE_P): Use TYPE_P.
16866         (add_friends): Remove.
16867         (hack_decl_function_context): Likewise.
16868         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
16869         CP_DECL_CONTEXT.
16870         (build_over_call): Fix indentation.  Use DECL_CONTEXT
16871         instead of DECL_CLASS_CONTEXT.
16872         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
16873         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
16874         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16875         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
16876         (build_base_field): Likewise.
16877         (finish_struct_1): Likewise.
16878         (build_self_reference): Likewise.
16879         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
16880         DECL_REAL_CONTEXT.
16881         (pushtag): Use decl_function_context, not
16882         hack_decl_function_context.
16883         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16884         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
16885         (pushdecl): Remove bogus code.
16886         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
16887         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16888         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16889         Use decl_function_context, nothack_decl_function_context.
16890         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
16891         (grokdeclarator): Likewise.  Use decl_function_context, not
16892         hack_decl_function_context.
16893         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
16894         (start_function): Use DECL_FRIEND_CONTEXT, not
16895         DECL_CLASS_CONTEXT.  Use decl_function_context, not
16896         hack_decl_function_context.
16897         (finish_function): Use decl_function_context, not
16898         hack_decl_function_context.
16899         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
16900         DECL_CLASS_CONTEXT.
16901         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
16902         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
16903         (grokfield): Likewise.
16904         (finish_builtin_type): Likewise.
16905         (finish_vtable_vardec): Use decl_function_context, not
16906         hack_decl_function_context.
16907         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16908         (start_static_initialization_or_destruction): Likewise.
16909         (finish_static_initialization_or_destruction): Likewise.
16910         (mark_used): Adjust logic for deciding when to synthesize methods.
16911         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
16912         DECL_REAL_CONTEXT.
16913         * error.c (dump_function_decl): Use DECL_CONTEXT, not
16914         DECL_CLASS_CONTEXT.
16915         * friend.c (is_friend): Likewise.
16916         (add_friends): Remove.
16917         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
16918         * lex.c (begin_definition_of_inclass_inline): Use
16919         decl_function_context, not hack_decl_function_context.
16920         (process_next_inline): Likewise.
16921         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16922         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
16923         DECL_CLASSS_CONTEXT.
16924         (hack_identifier): Likewise.
16925         (synthesize_method):  Use decl_function_context, not
16926         hack_decl_function_context.
16927         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
16928         DECL_REAL_CONTEXT.
16929         (is_member_template): Use decl_function_context, not
16930         hack_decl_function_context.  Use DECL_CONTEXT, not
16931         DECL_CLASS_CONTEXT.
16932         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
16933         DECL_CLASS_CONTEXT.
16934         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
16935         DECL_REAL_CONTEXT.
16936         (push_template_decl_real): Likewise.
16937         (instantiate_class_template): Don't call add_friends.
16938         (tsubst_default_argument): Use DECL_CONTEXT, not
16939         DECL_REAL_CONTEXT.
16940         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
16941         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16942         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
16943         DECL_CLASS_CONTEXT.
16944         * repo.c (repo_inline_used): Likewise.
16945         * search.c (current_scope): Adjust for new _CONTEXT macros.
16946         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
16947         DECL_REAL_CONTEXT.
16948         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16949         (lookup_fnfields_here):Likewise.
16950         (check_final_overrider): Likewise.
16951         (init_vbase_pointers): Likewise.
16952         (virtual_context): Likewise.
16953         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
16954         (expand_body): Use decl_function_context, not
16955         hack_decl_function_context.
16956         * tree.c (hack_decl_function_context): Remove.
16957         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
16958         DECL_CLASS_CONTEXT.
16959         * typeck2.c (error_not_base_type): Likewise.
16960
16961 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
16962
16963         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
16964
16965 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16966
16967         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
16968
16969 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
16970
16971         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
16972
16973 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
16974
16975         * decl2.c (lang_decode_option): Enable automatic line wrapping.
16976
16977 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
16978
16979         * parse.y (frob_specs): Split out...
16980         (parse_decl): From here.
16981         (fn.def2): Call initial_deferred_type_access_control.
16982         (after_type_component_declarator0): Call frob_specs.
16983         (notype_component_declarator0): Likewise.
16984         * search.c (friend_accessible_p): Nested classes are friends of their
16985         enclosing classes.
16986
16987 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
16988
16989         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
16990         used to create an implicit temporary.
16991
16992         * class.c (dfs_modify_vtables): Tweak calculation of functions to
16993         override.
16994
16995 2000-02-08  Nathan Sidwell  <nathan@acm.org>
16996
16997         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
16998         strip array element qualifiers too.
16999
17000 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
17001
17002         * decl.c (store_parm_decls): Don't build cleanups for parameters
17003         while processing_template_decl.
17004
17005 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
17006
17007         * cp-tree.h (struct saved_scope): Add incomplete field.
17008         (namespace_scope_incomplete): New macro.
17009         * decl.c (pushdecl): Use it.
17010         (hack_incomplete_structures): Use it.  See through artificial
17011         binding levels.
17012         (mark_saved_scope): Mark it.
17013
17014         Implement access control for nested types.
17015         * search.c (type_access_control): New fn.
17016         (accessible_p): Now we do perform access control for types.
17017         * semantics.c (deferred_type_access_control): New fn.
17018         (initial_deferred_type_access_control): New fn.
17019         (begin_function_definition): Call it.  Add lookups parm.
17020         * decl.c (struct binding_level): Add this_class field.
17021         (pushlevel_class): Set it.
17022         (mark_binding_level): Mark it.
17023         (lookup_name_real): Use it.  Call type_access_control.
17024         (mark_saved_scope): Mark lookups field.
17025         * cp-tree.h (flagged_type_tree): Add lookups field.
17026         (struct saved_scope): Add lookups field.
17027         (type_lookups): New macro.
17028         * parse.y (declmods): Now <ftype>.
17029         (parse_decl): Add lookups parm.  Call
17030         initial_deferred_type_access_control.
17031         (lang_extdef): Clear type_lookups.
17032         (typed_declspecs, declmods, typespec): Set lookups field.
17033         (initdcl): Call deferred_type_access_control.
17034         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
17035         component_decl_1, named_parm): Adjust.
17036         * friend.c (is_friend): Nested classes are friends of their
17037         enclosing classes.
17038
17039         * class.c (currently_open_derived_class): New fn.
17040         * method.c (hack_identifier): Use it.
17041
17042         * lex.c (do_identifier): Remove obsolete code.
17043
17044         * parse.y (typed_typespecs): Propagate new_type_flag properly.
17045
17046 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
17047
17048         * tinfo.h: Remove apostrophes from C++ comment (xgettext
17049         thinks this file is plain C).
17050
17051 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17052
17053         * Makefile.in (call.o): Depend on $(EXPR_H).
17054
17055         * call.c: Include "expr.h".
17056
17057         * class.c (dump_class_hierarchy): Add prototype.
17058
17059         * search.c (dfs_get_pure_virtuals): Likewise.
17060
17061 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
17062
17063         * parse.y (simple_stmt): Allow :: token in asm parameter list.
17064         * parse.c: Rebuilt.
17065
17066 2000-01-31  Jim Wilson  <wilson@cygnus.com>
17067
17068         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
17069         Store it in DECL_FCONTEXT.
17070         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
17071
17072 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
17073
17074         * tinfo.h (old abi): #include "tconfig.h".
17075         * tinfo.cc (convert_to_base): Move into old abi section.
17076
17077 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
17078
17079         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
17080         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
17081         (BINFO_PRIMARY_BINFO): New macro.
17082         (BF_DELTA): Rename to ...
17083         (BV_DELTA): ... this.
17084         (BF_VCALL_INDEX): Rename to ...
17085         (BV_VCALL_INDEX): ... this.
17086         (BF_FN): Rename to ...
17087         (BV_FN): ... this.
17088         * class.c (build_vbase_path): Adjust for changes to reverse_path.
17089         (set_rtti_entry): Rename BF_ macros to BV_ variants.
17090         (modify_vtable_entry): Simplify.
17091         (add_virtual_function): Rename BF_ macros to BV_ variants.
17092         (build_vtable_initializer): Likewise.
17093         (get_class_offset_1): Remove.
17094         (dfs_get_class_offset): Likewise.
17095         (get_class_offset): Likewise.
17096         (dfs_find_final_overrider): New function.
17097         (find_final_overrider): Likewise.
17098         (modify_one_vtable): Remove.
17099         (dfs_find_base): New function.
17100         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
17101         find_final_overrider.
17102         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
17103         virtuals.
17104         (dfs_fixup_vtable_deltas): Remove.
17105         (override_one_vtable): Remove.
17106         (merge_overrides): Likewise.
17107         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
17108         unreal chilren of virtual bases.
17109         (finish_struct_1): Don't use merge_overrides.  Don't use
17110         dfs_fixup_vtable_deltas.
17111         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
17112         BINFOs.
17113
17114 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
17115             Jason Merrill  <jason@yorick.cygnus.com>
17116
17117         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
17118
17119 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
17120
17121         * exception.cc (__throw_bad_typeid): Add missing std::.
17122
17123 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17124
17125         * cp-tree.h (make_thunk): PROTO -> PARAMS.
17126
17127 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
17128
17129         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
17130
17131         Runtime support for new-abi rtti.
17132         * inc/typeinfo (type_info::operator!=): Define in class.
17133         (type_info::before, type_info::name, type_info::operator==,
17134         type_info::operator!=): Define new ABI implementations.
17135         (type_info::is_pointer_p, type_info::is_function_p): Declare
17136         new virtual functions.
17137         (type_info::do_catch, type_info::do_upcast): Likewise.
17138
17139         * tinfo.h (__base_class_info): Define new class.
17140         (__class_type_info): Likewise.
17141         (__si_class_type_info): Likewise.
17142         (__vmi_class_type_info): Likewise.
17143         (__dynamic_cast): Prototype.
17144
17145         * tinfo.cc: Conditionalize old and new rtti mechanisms.
17146         (type_info::is_pointer_p): Define new function.
17147         (type_info::is_function_p): Likewise.
17148         (type_info::do_catch): Likewise.
17149         (type_info::do_upcast): Likewise.
17150         (vtable_prefix): New structure for vtable access.
17151         (adjust_pointer): Define new template function.
17152         (contained_p, public_p, virtual_p, contained_public_p,
17153         contained_nonpublic_p, contained_nonvirtual_p): Define new
17154         functions.
17155         (nonvirtual_base_type): New local variable.
17156         (__class_type_info::~__class_type_info): Define.
17157         (__si_class_type_info::~__si_class_type_info): Likewise.
17158         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
17159         (__class_type_info::do_catch): Define new function.
17160         (__class_type_info::do_upcast): Likewise.
17161         (__class_type_info::find_public_src): Likewise.
17162         (__class_type_info::do_find_public_src): Likewise.
17163         (__si_class_type_info::do_find_public_src): Likewise.
17164         (__vmi_class_type_info::do_find_public_src): Likewise.
17165         (__class_type_info::do_dyncast): Likewise.
17166         (__si_class_type_info::do_dyncast): Likewise.
17167         (__vmi_class_type_info::do_dyncast): Likewise.
17168         (__class_type_info::do_upcast): Likewise.
17169         (__si_class_type_info::do_upcast): Likewise.
17170         (__vmi_class_type_info::do_upcast): Likewise.
17171         (__dynamic_cast): Likewise.
17172
17173         * tinfo2.cc (__fundamental_type_info): Define new class.
17174         (__pointer_type_info): Likewise.
17175         (__reference_type_info): Likewise.
17176         (__array_type_info): Likewise.
17177         (__function_type_info): Likewise.
17178         (__enum_type_info): Likewise.
17179         (__ptr_to_member_type_info): Likewise.
17180         (__fundamental_type_info::~__fundamental_type_info): Define.
17181         (__pointer_type_info::~__pointer_type_info): Likewise.
17182         (__reference_type_info::~__reference_type_info): Likewise.
17183         (__array_type_info::~__array_type_info): Likewise.
17184         (__function_type_info::~__function_type_info): Likewise.
17185         (__enum_type_info::~__enum_type_info): Likewise.
17186         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
17187         (__pointer_type_info::do_catch): Define new function.
17188         (__ptr_to_member_type_info::do_catch): Define new function.
17189
17190         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
17191         (__is_pointer): Likewise.
17192
17193         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
17194
17195 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
17196
17197         * cp/class.c (build_vtable): Rename to build_primary_vtable.
17198         (prepare_fresh_vtable): Rename to build_secondary_vtable.
17199         (make_new_vtable): New function.
17200         (modify_vtable_entry): Handle generation of new vtables correctly.
17201         (modify_one_vtable): Remove unused parameter.
17202         (dfs_fixup_vtable_deltas): Likewise.
17203         (override_one_vtable): Use build_secondary_vtable.
17204         (finish_struct_1): Use build_primary_vtable and
17205         build_secondary_vtable.
17206
17207 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
17208
17209         * cp/decl.c: Adjust variable names, comments, help strings.
17210
17211 2000-01-29  Nathan Sidwell  <nathan@acm.org>
17212
17213         * new2.cc (operator delete[]): Use operator delete, don't assume
17214         implementation.
17215
17216 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
17217
17218         * class.c (build_vtbl_initializer): Add argument to
17219         build_vtable_entry call.
17220
17221 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
17222
17223         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
17224         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
17225         (BF_DELTA): New macro.
17226         (BF_VCALL_INDEX): Likewise.
17227         (BF_FN): Likewise.
17228         (THUNK_VCALL_OFFSET): Likewise.
17229         (make_thunk): Change prototype.
17230         * class.c (build_vtable_entry): Integrate
17231         build_vtable_entry_for_fn.  Handle vcall indices.
17232         (build_vtable_entry_for_fn): Remove.
17233         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
17234         BF_VCALL_INDEX, BF_FN.
17235         (modify_vtable_entry): Integrate common code from
17236         modify_one_vtable and dfs_fixup_vtable_deltas.
17237         (add_virtual_function): Set BF_VCALL_INDEX.
17238         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
17239         and BF_FN.
17240         (modify_one_vtable): Simplify.
17241         (dfs_fixup_vtable_deltas): Likewise.
17242         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
17243         * method.c (make_thunk): Handle vcall indices.
17244
17245 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
17246
17247         Compiler side new abi rtti (not enabled).
17248         * cp-tree.h (new_abi_rtti_p): New macro.
17249         (emit_support_tinfos): Prototype new function.
17250         (tinfo_decl_p): Likewise.
17251         (emit_tinfo_decl): Likwise.
17252         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
17253         macros.
17254         (doing_runtime): New local static.
17255         (init_rtti_processing): Add new-abi initializer.
17256         (get_tinfo_decl): Add new-abi logic.
17257         (tinfo_from_decl): Likewise.
17258         (build_dynamic_cast_1): Likewise.
17259         (qualifier_flags): New static function.
17260         (tinfo_base_init): Likewise.
17261         (generic_initializer): Likewise.
17262         (ptr_ref_initializer): Likewise.
17263         (ptmd_initializer): Likewise.
17264         (class_hint_flags): Likewise.
17265         (class_initializer): Likewise.
17266         (synthesize_tinfo_var): Likewise.
17267         (create_real_tinfo_var): Likewise.
17268         (create_pseudo_type_info): Likewise.
17269         (get_vmi_pseudo_type_info): Likewise.
17270         (create_tinfo_types): Likewise.
17271         (emit_support_tinfos): New global function.
17272         (tinfo_decl_p): New global predicate.
17273         (emit_tinfo_decl): New global function.
17274         * class.c (set_rtti_entry): Generalize for old and new rtti.
17275         (build_vtbl_initializer): Likewise.
17276         * decl2.c (finish_file): Likewise.
17277
17278 2000-01-27  Jim Wilson  <wilson@cygnus.com>
17279
17280         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
17281         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
17282
17283 2000-01-27  Mike Stump  <mrs@wrs.com>
17284
17285         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
17286         for scopes.
17287
17288 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
17289
17290         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
17291
17292 2000-01-26  J"orn Rennecke <amylaar@cygnus.co.uk>
17293
17294         * optimize.c (calls_setjmp_r): Supply new argument
17295         to special_function_p.
17296
17297 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17298
17299         * call.c: PROTO -> PARAMS.
17300         * class.c: Likewise.
17301         * cp-tree.h: Likewise.
17302         * cvt.c: Likewise.
17303         * decl.c: Likewise.
17304         * decl.h: Likewise.
17305         * decl2.c: Likewise.
17306         * dump.c: Likewise.
17307         * errfn.c: Likewise.
17308         * error.c: Likewise.
17309         * except.c: Likewise.
17310         * expr.c: Likewise.
17311         * init.c: Likewise.
17312         * input.c: Likewise.
17313         * lex.c: Likewise.
17314         * lex.h: Likewise.
17315         * method.c: Likewise.
17316         * optimize.c: Likewise.
17317         * parse.y: Likewise.
17318         * pt.c: Likewise.
17319         * repo.c: Likewise.
17320         * rtti.c: Likewise.
17321         * search.c: Likewise.
17322         * semantics.c: Likewise.
17323         * spew.c: Likewise.
17324         * tree.c: Likewise.
17325         * typeck.c: Likewise.
17326         * typeck2.c: Likewise.
17327         * xref.c: Likewise.
17328
17329 2000-01-25  Richard Henderson  <rth@cygnus.com>
17330
17331         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
17332
17333 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
17334
17335         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
17336         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
17337         (struct vcall_offset_data_s): New type.
17338         (dfs_vcall_offset_queue_p): New function.
17339         (dfs_build_vcall_offset_vtbl_entries): Likewise.
17340         (build_vcall_offset_vtbl_entries): Likewise.
17341         (layout_vtable_decl): Likewise.
17342         (num_vfun_entries): Likewise.
17343         (num_extra_vtbl_entries): Add the entries for vcall offsets.
17344         (build_vtbl_initializer): Likewise.
17345         (dfs_finish_vtabls): Use layout_vtable_decl.
17346         (modify_one_vtables): Always duplicate vtables under the new ABI.
17347         (finish_struct_1): Use layout_vtable_decl.
17348
17349 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17350
17351         * decl.c (member_function_or_else): Change third arg from a format
17352         specifier to an `enum overload_flags'.  Callers changed.
17353
17354 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
17355
17356         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
17357         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
17358         build_const_cast, get_delta_difference, check_return_expr): Avoid
17359         ANSI string concatenation usage.
17360
17361 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
17362
17363         * class.c (layout_class_type): Put the fields required to make a
17364         class non-empty at the end, not the beginning, of the TYPE_FIELDs
17365         list.
17366
17367 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
17368
17369         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
17370         template.
17371
17372         * decl2.c (mark_used): Do instantiate inlines that have been
17373         explicitly instantiated.
17374
17375 2000-01-24  Richard Henderson  <rth@cygnus.com>
17376
17377         * call.c (build_over_call): Use expand_tree_builtin.
17378         * typeck.c (build_function_call_real): Likewise.
17379         (build_binary_op_nodefault): Handle unordered compares.
17380
17381 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
17382
17383         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
17384         cp_tree_index values.
17385         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
17386         New global node #defines for them.
17387         * rtti.c (call_void_fn): Replace with ...
17388         (build_runtime_decl): ... new static function.
17389         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
17390         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
17391         (build_dynamic_cast_1): Always produce correctly typed result.
17392         Explicitly produce type_info addresses. Use dynamic_cast_node.
17393         * exception.cc (__throw_bad_cast): Return `void *'.
17394         (__throw_bad_typeid): Return `const type_info &'.
17395
17396 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
17397
17398         * cp-tree.h (get_vtable_decl): Prototype new function.
17399         * class.c (get_vtable_decl): New function. Broken out from ...
17400         (build_vtable): ... here. Use it.
17401         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
17402         by get_vtable_decl.
17403
17404 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
17405
17406         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
17407         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
17408         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
17409         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
17410         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
17411         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
17412         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
17413         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
17414         (CPTI_TINFO_VAR_ID): New enumeration.
17415         (__tp_desc_type_node, __access_mode_type_node,
17416         __bltn_desc_type_node, __user_desc_type_node,
17417         __class_desc_type_node, __ptr_desc_type_node,
17418         __attr_desc_type_node, __func_desc_type_node,
17419         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
17420         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
17421         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
17422         enum_desc_type_node, class_desc_type_node,
17423         si_class_desc_type_node, vmi_class_desc_type_node,
17424         ptmd_desc_type_node, base_desc_type_node): New #defines.
17425         (tinfo_fn_id, tinfo_fn_type): Rename to ...
17426         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
17427         (tinfo_var_id): New enumeration.
17428         (DECL_TINFO_FN_P): Augment comment.
17429         * decl.c (cp_global_trees): Adjust documentation.
17430         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
17431         tinfo_decl_type and tinfo_var_id.
17432         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
17433         (build_typeid): Remove unused variable.
17434         (get_tinfo_var): Use tinfo_var_id.
17435         (tinfo_name): New static function.
17436         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
17437         (tinfo_from_decl): Likewise.
17438         (get_base_offset): New static function, broken out of
17439         expand_class_desc.
17440         (expand_si_desc): Use tinfo_name.
17441         (expand_class_desc): Likewise. Lose local static variable.
17442         Use base_desc_type_node. Use get_base_offset.
17443         (expand_ptr_desc): Use tinfo_name.
17444         (expand_attr_desc): Likewise.
17445         (expand_generic_desc): Likewise.
17446
17447         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
17448         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
17449
17450 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
17451
17452         * cp-tree.h (__eprintf): Remove declaration.
17453         * tree.c (__eprintf): Remove definition.
17454
17455 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
17456             Mark Mitchell  <mark@codesourcery.com>
17457
17458         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
17459         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
17460
17461 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
17462
17463         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
17464
17465 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
17466
17467         * cp-tree.h (register_dtor_fn): New function.
17468         * decl.c (destroy_local_static): Rename to ...
17469         (register_dtor_fn): ... this.  Give it external linkage.
17470         (expand_static_init): Use it.
17471         * decl2.c (do_static_initialization): Likewise, if using
17472         __cxa_atexit.
17473         (do_static_destruction): Check that __cxa_atexit is not in use.
17474         (finish_file): Don't call do_static_destruction if using
17475         __cxa_atexit.
17476
17477         * typeck.c (convert_arguments): Restore two-message error
17478         reporting.
17479
17480 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
17481
17482         Remap dynamic cast hint values to be consistent across ABIs.
17483         * search.c (dynamic_cast_base_recurse): Remap generated value.
17484         (get_dynamic_cast_base_type): Adjust documentation.
17485         * tinfo.h (__user_type_info::dyncast): Likewise.
17486         (__user_type_info::find_public_subobj): Remap BOFF meaning.
17487         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
17488         (__class_type_info::do_dyncast): Likewise.
17489         (__class_type_info::do_find_public_subobj): Likewise.
17490         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
17491
17492 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
17493
17494         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
17495
17496         * typeck2.c (incomplete_type_error): Restore previous
17497         cp_error and cp_error_at call sequence.
17498
17499 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
17500
17501         * class.c (dump_class_hierarchy): Make format agree with argument;
17502         cast pointer to unsigned long and print with %lx.
17503
17504 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
17505
17506         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
17507
17508         * typeck.c (composite_pointer_type, common_type,
17509         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
17510         build_function_call_real, convert_arguments,
17511         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
17512         build_unary_op, mark_addressable, build_compound_expr,
17513         build_static_cast, build_reinterpret_cast, build_const_cast,
17514         build_c_cast, build_modify_expr, get_delta_difference,
17515         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
17516         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
17517         into a single one.
17518         * typeck2.c (readonly_error, abstract_virtuals_error,
17519         process_init_constructor, check_for_new_type): Likewise.
17520
17521 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
17522
17523         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
17524         VAR_DECLs.
17525
17526 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
17527
17528         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
17529         (build_x_typeid): Likewise.
17530         (get_tinfo_fn): Likewise.
17531         (get_tinfo_fn_unused): Rename to ...
17532         (get_tinfo_decl): ... here.
17533         * rtti.c (build_headof): Replace logic error with assertion.
17534         (get_tinfo_fn_dynamic): Rename to ...
17535         (get_tinfo_decl_dynamic): ... here. Make static. Use
17536         complete_type_or_else.
17537         (build_x_typeid): Move into ...
17538         (build_typeid): ... here. Adjust call to
17539         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
17540         throw_bad_typeid expression.
17541         (get_tinfo_fn_unused): Rename to ...
17542         (get_tinfo_decl): ... here. Adjust comment.
17543         (get_tinfo_fn): Delete.
17544         (tinfo_from_decl): New static function.
17545         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
17546         (get_typeid): Use complete_type_or_else.
17547         (build_dynamic_cast_1): Adjust calls to
17548         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
17549         * parse.y (primary): Adjust call to build_typeid.
17550         * except.c (build_eh_type_type_ref): Adjust call to
17551         get_tinfo_decl. Mark as used.
17552         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
17553         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
17554         * parse.c: Regenerated.
17555
17556 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
17557
17558         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
17559         calling convention.
17560         (resolves_to_fixed_type_p): Document calling convention.
17561         * rtti.c (build_x_typeid): Initialize NONNULL.
17562
17563         * cp-tree.h (build_shared_int_cst): New function.
17564         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
17565         * class.c (modify_vtable_entry): Likewise.
17566         (add_virtual_function): Split out code to generated shared
17567         INTEGER_CSTs to build_share_int_cst.
17568         (modify_all_vtables): Handle all the overridden functions here.
17569         Add overridden functions from non-primary virtual bases to the
17570         primary vtable.
17571         (finish_struct_1): Adjust call to modify_all_vtables.  Add
17572         overridden functions from non-primary bases to the vtable.
17573         * tree.c (build_shared_int_cst): New function.
17574
17575         * cp-tree.h (scratchalloc): Remove.
17576         (build_scratch_list): Likewise.
17577         * call.c (convert_class_to_reference): Replace build_scratch_list
17578         and build_expr_list with build_tree_list.
17579         (add_candidate): Replace scratchalloc with expralloc.  Note memory
17580         leak.
17581         (build_user_type_conversion_1):  Replace build_scratch_list
17582         and build_expr_list with build_tree_list.
17583         (build_new_op): Likewise.
17584         (build_op_delete_call): Likewise.
17585         (convert_like): Likewise.
17586         * cvt.c (ocp_convert): Likewise.
17587         * decl.c (start_decl): Likewise.
17588         (start_function): Likewise.
17589         (finish_destructor_body): Likewise.
17590         (maybe_build_cleanup_1): Likewise.
17591         * decl2.c (reparse_decl_as_expr): Likewise.
17592         * init.c (perform_member_init): Likewise.
17593         (expand_cleanup_for_base): Likewise.
17594         (build_builtin_delete_call): Likewise.
17595         (build_new_1): Likewise.
17596         (build_delete): Likewise.
17597         * method.c (do_build_assign_ref): Likewise.
17598         * parse.y (already_scoped_stmt): Likewise.
17599         (nontrivial_exprlist): Likewise.
17600         (net_initializer): Likewise.
17601         (initlist): Likewise.
17602         * parse.c: Regenerated.
17603         * rtti.c (build_x_typeid): Likewise.
17604         (build_dynamic_cast_1): Likewise.
17605         * typeck.c (build_x_compound_expr): Likewise.
17606         (build_static_cast): Likewise.
17607         (build_modify_expr): Likewise.
17608
17609         * cp-tree.h (DECL_VINDEX): Add documentation.
17610         * class.c (build_vtable_entry): Likewise.
17611         (start_vtable): Add comment.
17612         (add_virtual_function): Replace pending_hard_virtuals with
17613         overridden_virtuals and pending_virtuals with new_virtuals.
17614         Replace redundant assignments with assertions.
17615         (check_for_override): Add comment.
17616         (check_bases_and_members): Replace pending_hard_virtuals with
17617         overridden_virtuals and pending_virtuals with new_virtuals.
17618         (create_vtbl_ptr): Likewise.
17619         (layout_class_type): Likewise.
17620         (finish_struct_1): Likewise.  Add comments.
17621
17622 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
17623
17624         * class.c (finish_struct_1): Replace redundant code with
17625         assertions.
17626
17627         * cp-tree.h (flag_new_abi): Move.
17628         (flag_use_cxa_atexit): Likewise.
17629         (flag_honor_std): Likewise.
17630         (flag_rtti): Likewise.
17631         (vbase_offsets_in_vtable_p): Define.
17632         (vptrs_present_everywhere_p): Likewise.
17633         (TYPE_CONTAINS_VPTR_P): Likewise.
17634         (dfs_walk_real): Declare.
17635         * class.c (build_vbase_pointer_fields): Check
17636         vbase_offsets_in_vtable_p.
17637         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
17638         BINFO_VPTR_FIELD.
17639         (build_vbase_offset_vtbl_entries): Simplify.
17640         (build_vbase_offset_vtbl_entries): Adjust.
17641         (build_vbase_pointer): Add ability to look up vbase offsets in
17642         vtable.
17643         (start_vtable): New function.
17644         (add_virtual_function): Use it.
17645         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
17646         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
17647         (build_vtbl_initializer): Take the type of the complete object as
17648         input.  Use it to correctly calculate vbase offsets.
17649         (dfs_finish_vtbls): Pass the complete type to
17650         build_vtbl_initializer.
17651         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
17652         (create_vtable_ptr): Create a vtable even if there are no
17653         new virtual functions, under the new ABI.
17654         (finish_struct_1): Likewise.
17655         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
17656         * decl.c (exapnd_static_init): Remove call to
17657         preserve_initializer.
17658         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
17659         vtables.
17660         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
17661         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
17662         (construct_virtual_bases): Don't initialize virtual base pointers
17663         under the new ABI.
17664         (build_aggr_init): Clean up comment.
17665         (expand_aggr_init_1): Likewise.
17666         * rtti.c (expand_class_desc): Store the virtual function table
17667         index where the vbase offset lives in the offset field.
17668         * search.c (dfs_walk_real): Make it global.
17669         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
17670         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
17671
17672         * tinfo.h (USItype): Make it signed under the new ABI.
17673         * tinfo.cc (convert_to_base): New function.  Encapsulate base
17674         conversion logic here.
17675         (__class_type_info::do_upcast): Use it.
17676         (__class_type_info::do_dyncast): Likewise.
17677         (__class_type_info::do_find_public_subobj): Likewise.
17678
17679         * init.c (construct_virtual_bases): Don't look up the addresses of
17680         virtual bases at run-time.
17681
17682         * class.c (build_vbase_pointer): Relocate.
17683         (build_vbase_pointer_fields): Likewise.
17684         (dfs_build_vbase_offset_vtbl_entries): Likewise.
17685         (build_vbase_offset_vtbl_entries): Likewise.
17686
17687         * decl.c (init_decl_processing): Complain if -fnew-abi
17688         -fno-vtable-thunks is used.
17689
17690         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
17691         flag_new_abi.
17692
17693 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
17694
17695         * cp-tree.h (num_extra_vtbl_entries): New function.
17696         (size_extra_vtbl_entries): Likewise.
17697         (dfs_vtable_path_unmark): Likewise.
17698         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
17699         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
17700         * class.c (num_extra_vtbl_entries): New function.
17701         (size_extra_vtbl_entries): Likewise.
17702         (dfs_build_vbase_offset_vtbl_entries): New function.
17703         (build_vbase_offset_vtbl_entries): Likewise.
17704         (build_vtbl_initializer): Use it.
17705         (finish_struct_1): Adjust vtable sizes (using
17706         num_extra_vtbl_entries).
17707         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
17708         THUNK_DECL is non-NULL before expanding it.
17709         * init.c (expand_virtual_init): Adjust the vtable pointer by
17710         size_extra_vtbl_entries before storing it.
17711         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
17712         Handle TREE_LIST parameters here, not in the dfs_* functions.
17713         (dfs_unmarked_real_bases_queue_p): Adjust.
17714         (dfs_marked_real_bases_queue_p): Likewise.
17715         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
17716         (dfs_vtable_path_marked_real_bases_queue_p): New function.
17717         (dfs_vtable_path_unmark): Likewise.
17718
17719 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
17720
17721         * optimize.c (copy_body_r): Clear the operand three of a
17722         TARGET_EXPR when copying it.
17723
17724 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17725
17726         * method.c (build_decl_overload_real): Check whether we are in ::
17727         before returning __builtin_new/delete.
17728
17729 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
17730
17731         * pt.c (tsubst_friend_function): Improve comment.
17732         (instantiate_decl): Avoid crashing when a "nested" function is
17733         instantiated from the top level.
17734
17735         * dump.c (dqeueue_and_dump): Dump
17736         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
17737
17738 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17739
17740         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
17741
17742 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
17743
17744         * g++spec.c (lang_specific_driver): Add -fnew-abi if
17745         ENABLE_NEW_GXX_ABI defined.
17746         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
17747         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
17748         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
17749
17750 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
17751
17752         * decl.c (start_cleanup_fn): Call pushdecl.
17753
17754         * call.c (convert_class_to_reference): Fix typos.
17755         (build_conditional_expr): Handle errors gracefully.
17756         * class.c (push_nested_class): Likewise.
17757         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
17758         (DECL_THIS_EXTERN): Use it.
17759         (DECL_THIS_STATIC): Likewise.
17760         * cvt.c (convert_to_void): Handle errors gracefully.
17761         (build_expr_type_conversion): Likewise.
17762         * decl.c (maybe_push_decl): Likewise.
17763         (start_decl_1): Likewise.
17764         (require_complete_types_for_parms): Likewise.
17765         * parse.y (structsp): Likewise.
17766         (base_class): Likewise.
17767         * parse.c: Regenerated.
17768         * pt.c (finish_member_template_decl): Likewise.
17769         * typeck.c (decay_conversion): Likewise.
17770
17771         * cp-tree.h (dfs_skip_vbases): New function.
17772         (find_vbase_instance): Likewise.
17773         * class.c (determine_primary_base): Allow a nearly empty base to
17774         serve as a primary base class under the new ABI.
17775         (get_class_offset_1): Rename to ...
17776         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
17777         messages here.
17778         (get_class_offset): Use it.  Issue error messages here.
17779         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
17780         find the right copies of virtual bases.
17781         (fixup_vtable_deltas1): Rename to ...
17782         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
17783         bases as primary bases.
17784         (fixup_vtable_deltas): Remove.
17785         (override_one_vtable): Handle virtual bases as primary bases.
17786         (merge_overrides): Likewise.
17787         (finish_struct_1): Likewise.
17788         (dump_class_hierarchy): Dump primary-ness of bases as well.
17789         * search.c (mark_primary_bases): Use a pre-order traversal to
17790         handle primary virtual bases.
17791         (dfs_skip_vbases): New fiunction.
17792         (expand_upcast_fixups): Adjust to handle primary virtual bases.
17793         (fixup_virtual_upcast_offsets): Likewise.
17794         (fixup_all_virtual_upcast_offsets): Likewise.
17795         (dfs_find_vbase_instances): New function.
17796         (find_vbase_instance): Likewise.
17797
17798 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
17799
17800         * lex.c (DIR_SEPARATOR): Delete macro.
17801
17802 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
17803
17804        * decl2.c (lang_decode_option): Handle automatic line wrapping
17805        option.
17806
17807 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
17808
17809         * friend.c (do_friend): Don't resolve scopes when processing
17810         template declarations, even if the qualifying scope doesn't
17811         involve template parameters.
17812
17813 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
17814
17815         * class.c (dfs_modify_vtables_queue_p): Remove.
17816         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
17817         and dfs_marked_real_bases_queue_p instead of
17818         dfs_modify_vtables_queue_p.
17819
17820         * class.c (build_vbase_path): Simplify.
17821         (dfs_propagate_binfo_offsets): New function.
17822         (propagate_binfo_offsets): Use it.
17823         (remove_base_field): Simplify.
17824         (dfs_set_offset_for_vbases): Remove.
17825         (dfs_set_offset_for_shared_vbases): New function.
17826         (dfs_set_offset_for_unshared_vbases): Likewise.
17827         (layout_virtual_bases): Use them.
17828         (layout_basetypes): Don't call propagate_binfo_offsets.
17829         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
17830         for the vbases.
17831
17832         * class.c (build_base_field): New function, split out from ...
17833         (build_base_fields): ... here.  Use it.  Allocate primary bases
17834         first, under the new ABI.
17835         (get_vtable_entry): Remove.
17836         (remove_base_field): New function, split out from ...
17837         (remove_base_fields): ... here.  Adjust since primary bases come
17838         first under the new ABI.
17839
17840         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
17841         (initialize_vtbl_ptrs): New function.
17842         (expand_indirect_vtbls_init): Change prototype.
17843         (convert_pointer_to_vbase): Declare.
17844         * init.c (expand_direct_vtbls_init): Remove.
17845         (dfs_initialize_vtbl_ptrs): New function.
17846         (initialize_vtbl_ptrs): Likewise.
17847         (emit_base_init): Use initialize_vtbl_ptrs.
17848         * search.c (convert_pointer_to_vbase): Make it global.
17849         (expand_indirect_vtbls_init): Remove vtable initialization code.
17850         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
17851
17852         * class.c (dfs_finish_vtbls): New function.
17853         (finish_vtbls): Use it.
17854         (dump_class_hierarchy): New function.
17855
17856         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
17857         (BINFO_VBASE_PRIMARY_P): New macro.
17858         (BINFO_VIRTUALS): Add to documentation.
17859         (SET_BINFO_PRIMARY_MARKED_P): Remove.
17860         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17861         (dfs_mark_primary_bases_queue_p): Likewise.
17862         (dfs_unmarked_real_bases_queue_p): New function.
17863         (dfs_marked_real_bases_queue_p): Likewise.
17864         * search.c (dfs_mark_primary_bases): Adjust.
17865         (mark_primary_bases): Likewise.
17866         (get_shared_vbase_if_not_primary): New function.
17867         (dfs_unmarked_real_bases_queue_p): Likewise.
17868         (dfs_marked_real_bases_queue_p): Likewise.
17869         (dfs_get_pure_virtuals): Simplify.
17870         (get_pure_virtuals): Likewise.
17871
17872 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17873
17874         * lex.c: Include tm_p.h.
17875
17876 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
17877
17878         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
17879
17880 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
17881
17882         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
17883         * pt.c (instantiate_decl): Defer comdat templates that might not be
17884         needed.
17885
17886         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
17887         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
17888         (finish_file): Likewise.
17889
17890         * decl2.c (import_export_class): Undo 12/14 change.
17891
17892         * error.c (dump_decl): operator new, not operatornew.
17893
17894         * class.c (field_decl_cmp): A nontype is "greater" than a type.
17895         * search.c (lookup_field_1): Look for the last field with the
17896         desired name.
17897
17898 2000-01-05  Nathan Sidwell  <nathan@acm.org>
17899
17900         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
17901         FUNCTION_DECL.
17902
17903 2000-01-05  Nathan Sidwell  <nathan@acm.org>
17904
17905         * typeck.c (build_static_cast): Don't strip target qualifiers
17906         when casting from a class.
17907
17908 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17909
17910         * class.c (warn_hidden): Initialize variable `fndecl'.
17911
17912 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
17913
17914         * decl.c (flag_isoc9x): New variable to be able to use code in
17915         c-common.c.  For now always zero.
17916
17917 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
17918
17919         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
17920         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
17921         or unshare_base_binfos for virtual bases here.
17922         * search.c (dfs_get_vbase_types): Do it here.
17923         (get_vbase_types): Adjust.
17924
17925 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
17926
17927         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
17928         (BINFO_PRIMARY_MARKED_P): Use flag 5.
17929         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
17930         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17931         (unmark_primary_bases): Remove declaration.
17932         (unmarkedp): Declare.
17933         (dfs_vbase_unmark): Likewise.
17934         * class.c (determine_primary_base): Return immediately if there
17935         are no base classes.  Call mark_primary_bases here.
17936         (modify_all_direct_vtables): Remove.
17937         (modify_all_indirect_vtables): Remove.
17938         (dfs_modify_vtables_queue_p): New function.
17939         (dfs_modify_vtables): New function.
17940         (modify_all_vtables): Use them.
17941         (build_base_fields): Build FIELD_DECLs for primary virtual base
17942         classes.
17943         (create_vtable_ptr): Don't call determine_primary_base here.
17944         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
17945         (dfs_set_offset_for_vbases): ... this.
17946         (layout_virtual_bases): Use it.
17947         (layout_class_type): Call determine_primary_base here.
17948         * search.c (unmarkedp): Make it global.
17949         (shared_marked_p): Simplify.
17950         (shared_unmarked_p): Likewise.
17951         (dfs_primary_bases_queue_p): Remove.
17952         (dfs_unmark_primary_bases): Likewise.
17953         (unmark_primary_bases): Likewise.
17954         (mark_primary_bases): Simplify.
17955         (get_pure_virtuals): Don't call mark_primary_bases here.
17956         (dfs_vbase_unmark): New function.
17957         (get_vbase_types): Simplify.
17958
17959         * class.c (struct base_info): Remove.
17960         (determine_primary_base): Take has_virtual_p rather than a
17961         base_info as input.  Don't calculate max_has_virtual.
17962         (finish_struct_bits): Remove max_has_virtual argument.
17963         (create_vtable_ptr): Remove max_has_virtual_p argument.
17964         (layout_virtual_bases): Remove max argument.
17965         (layout_basetypes): Likewise.
17966         (layout_class_type): Remove max_has_virtual_p argument.
17967         (finish_struct_1): Remove max_has_virtual.
17968
17969         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
17970         (layout_basetypes): Remove.
17971         * class.c (propagate_binfo_offsets): Moved here from tree.c.
17972         Update to handle primary virtual bases.
17973         (remove_base_fields): New function, split out from
17974         layout_basetypes.
17975         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
17976         (layout_virtual_bases): New function, split out from
17977         layout_basetypes.  Update to handle primary virtual bases.
17978         (layout_basetypes): Moved here from tree.c.  Use
17979         remove_base_fields and layout_virtual_bases.
17980         * search.c (dfs_mark_primary_bases_queue_p): New function.
17981         (mark_primary_bases): Use it.
17982         * tree.c (CEIL): Remove.
17983         (propagate_binfo_offsets): Remove.
17984         (layout_basetypes): Remove.
17985
17986 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
17987
17988         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
17989         (BINFO_PRIMARY_MARKED_P): New macro.
17990         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
17991         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17992         (mark_primary_bases): New function.
17993         (unmark_primary_bases): Likewise.
17994         * search.c (get_abstract_virtuals_1): Remove.
17995         (dfs_mark_primary_bases): New function.
17996         (mark_primary_bases): Likewise.
17997         (dfs_unmark_primary_bases): Likewise.
17998         (unmark_primary_bases): Likewise.
17999         (dfs_get_pure_virtuals): Likewise.
18000
18001 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
18002
18003         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
18004         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
18005         (modify_one_vtable): Adjust.
18006         (fixup_vtable_deltas1): Likewise.
18007         (override_one_vtable): Likewise.
18008         * search.c (get_abstract_virtuals_1): Likewise.
18009         (get_pure_virtuals): Likewise.
18010         (expand_upcast_fixups): Likewise.
18011         * tree.c (debug_binfo): Likewise.
18012
18013         * class.c (build_vtable): Don't return a value.  Don't rebuild
18014         vtables for bases that have already been handled.
18015         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
18016         already been handled.
18017         (modify_one_vtable): Adjust accordingly.
18018         (fixup_vtable_deltas1): Likewise.
18019         (finish_struct_1): Likewise.
18020
18021 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18022
18023         * call.c (build_new_method_call): Also check destructors.