OSDN Git Service

2003-04-17 Roger Sayle <roger@eyesopen.com>
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-04-17  Roger Sayle  <roger@eyesopen.com>
2
3         PR c/10375
4         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
5         "nothrow" function attributes.
6
7 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8
9         PR c++/10347
10         * pt.c (type_dependent_expression_p): Handle array new.
11
12 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
13
14         PR c++/10381
15         * parser.c (cp_parser_primary_expression): Reorganize logic for
16         dealing with name lookup failures.
17
18 2003-04-15  Jason Merrill  <jason@redhat.com>
19
20         * decl2.c (mark_used): Don't instantiate anything if
21         skip_evaluation.
22
23 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
24
25         * tree.c (build_cplus_array_type_1): Do not call
26         uses_template_parms() on a NULL index_type.
27
28 2003-04-13  Roger Sayle  <roger@eyesopen.com>
29
30         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
31
32 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
33
34         PR c++/10300
35         * init.c (build_new_1): Reorganize.
36
37 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
38
39         * class.c (initialize_array)
40         * decl.c (reshape_init)
41         * decl2.c (build_expr_from_tree)
42         * init.c (build_zero_init)
43         * pt.c (tsubst_copy, tsubst_copy_and_build)
44         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
45         (ptm_initializer, class_initializer, get_pseudo_ti_init)
46         * semantics.c (finish_compound_literal)
47         * typeck.c (build_ptrmemfunc1)
48         * typeck2.c (store_init_value, process_init_constructor)
49         (build_functional_cast): Use build_constructor.
50
51 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
52
53         * call.c (print_z_candidates): Use gcc_gettext_width, not
54         strlen, to determine how much padding to use.
55
56 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
57
58         * decl.c: Update all calls to shadow_warning.
59
60 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
61
62         * class.c (layout_class_type): Correct handling for overlong
63         bit-fields whose width is the same as an integer type.
64
65 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
66
67         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
68         * cp-lang.c (cp_tree_size): New function.
69         (LANG_HOOKS_TREE_SIZE): Override.
70
71         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
72         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
73         (union lang_tree_node): Remove common and srcloc members.
74         (build_srcloc_here): Don't prototype.
75         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
76         * pt.c (pending_templates): Correct comment.
77         * tree.c (build_srcloc, build_srcloc_here): Kill.
78
79 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
80
81         * call.c: Include intl.h.
82         (print_z_candidate): Always use inform; get rid of errfn
83         argument. Reorganize so that all the strings get picked up
84         by xgettext.  Note obligation of caller to pass first argument
85         through gettext.
86         (print_z_candidates): Update to match.  Indent second and
87         successive candidates by strlen() of translated message.
88         (joust): Restructure ambiguous-conversion pedwarn so that
89         translators see a complete sentence.  Update calls to
90         print_z_candidate.
91
92         * Make-lang.in (cp/call.o): Update dependencies.
93
94 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
95
96         * decl.c (set_current_binding_level): Delete, revert last change.
97         (current_binding_level): Modify to allow it as as lvalue.
98
99 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
100
101         * name-lookup.c (find_binding): Pass appropriate pointer type to
102         POP_TIMEVAR_AND_RETURN.
103
104 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
105
106         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
107         * cp-tree.h: Don't insist on having GNUC.
108
109 2003-04-03  Jason Merrill  <jason@redhat.com>
110
111         * cvt.c (ocp_convert): Only abort if we try to convert an object
112         of TREE_ADDRESSABLE type.
113
114         * class.c (build_vtable): Set DECL_ALIGN here.
115         (get_vtable_decl): Not here.
116         (layout_vtable_decl): Or here.
117         (create_vtable_ptr): Or here.
118         (layout_class_type): Or here.
119         (check_bitfield_decl): Don't mess with field alignment.
120
121 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
122
123         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
124         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
125         * rtti.c (dfs_class_hint_mark): Likewise.
126
127         * decl.c (push_local_name, push_class_level_binding,
128         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
129         functions returning void.
130         * decl2.c (add_using_namespace): Likewise.
131
132         * decl.c (print_binding_level, print_other_binding_stack,
133         print_binding_stack): Cast argument of %p specifier to void*.
134         * ptree.c (cxx_print_decl): Likewise.
135
136         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
137         VAR_FUNCTION_OR_PARM_DECL_CHECK,
138         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
139         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
140         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
141
142         * decl.c (set_current_binding_level): New macro.  Use throughout
143         when setting the current binding level.
144
145         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
146         in enum.
147         * method.c (mangling_flags): Likewise.
148
149         * cp-tree.h (lang_type_header): Add __extension__ and use
150         CHAR_BITFIELD for members.
151
152 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
153
154         PR other/9274
155         * mangle.c: Include gt-cp-mangle.h.
156         (subst_identifiers): Mark with GTY.
157         * config-lang.in (gtfiles): Add cp/mangle.c.
158         * Make-lang.in: (gt-cp-mangle.h): New rule.
159         (cp/mangle.o): Depends on gt-cp-mangle.h.
160
161 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
162
163         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
164         after \$(srcdir)/cp/name-lookup.h.
165         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
166         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
167         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
168         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
169
170 2003-03-31  Jason Merrill  <jason@redhat.com>
171
172         PR java/10145
173         * class.c (check_field_decl): Don't set DECL_ALIGN.
174
175 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
176
177         PR c++/7647
178         * decl.c (grokdeclarator): Tidy, slightly.
179         * search.c (lookup_field_1): Add want_type parameter.
180         (lookup_field_r): Adjust call to lookup_field_1.
181
182 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
183
184         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
185
186 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
187
188         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
189         prototype.
190         (cxx_scope_find_binding_for_name): Likewise.
191         * decl.c (find_binding: Move to name-lookup.c.
192         (binding_for_name): Likewise.
193         (cxx_scope_find_binding_for_name): Likewise.
194         (BINDING_LEVEL):  Remove.
195         (push_binding): Tidy.
196         (push_class_binding): Likewise.
197         (pop_binding): Likewise.
198         (poplevel): Likewise.
199         (poplevel_class): Likewise.
200         (set_identifier_type_value_with_scope): Likewise.
201         (push_overloaded_decl): Likewise.
202         (lookup_tag): Likewise.
203         (unqualified_namespace_lookup): Likewise.
204         (lookup_name_current_level): Likewise.
205         (maybe_inject_for_scope_var): Likewise.
206         (namespace_binding): Move to name-lookup.c.
207         (set_namespace_binding): Likewise.
208         * decl2.c (lookup_using_namespace): Tidy.
209         (qualified_lookup_using_namespace): Likewise.
210         (do_toplevel_using_decl): Likewise.
211         * name-lookup.c: Include "timevar.h"
212         * name-lookup.h (cxx_scope):  Declare.
213         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
214         member declaration.
215         (BINDING_SCOPE): Adjust definition.
216         (BINDING_HAS_LEVEL_P): Remove.
217
218 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
219
220         * name-lookup.c: New file.
221         * name-lookup.h: Likewise..
222         * decl.c (push_binding): Adjust use cxx_binding_make.
223         (free_bindings): Move to name-lookup.c
224         (pop_binding): Use cxx_binding_free.
225         (binding_for_name): Tidy.
226         * cp-tree.h: Include "name-lookup.h"
227         (cxx_binding_make): Move to name-lookup.h
228         (cxx_binding_clear): Likewise.
229         (struct cxx_binding): Likewise.
230         (LOCAL_BINDING_P): Likewise.
231         (INHERITED_VALUE_BINDING_P): Likewise.
232         (BINDING_SCOPE): Likewise.
233         (BINDING_HAS_LEVEL_P): Likewise.
234         (BINDING_VALUE): Likewise.
235         (BINDING_TYPE): Likewise.
236         * config-lang.in (gtfiles): Add cp/name-lookup.h
237         * Make-lang.in (cp/name-lookup.o): New rule.
238         (CXX_OBJS): Add cp/name-lookup.o
239         (CXX_TREE_H): Add cp/name-lookup.h
240
241 2003-03-28  Jason Merrill  <jason@redhat.com>
242
243         PR c++/10245
244         * cvt.c (force_rvalue): New fn.
245         * call.c (build_conditional_expr): Use it.
246         * cp-tree.h: Declare it.
247
248 2003-03-28  Mike Stump  <mrs@apple.com>
249
250         * error.c (dump_expr): Add 0x to printed hex numbers to make
251         output match source code better.
252
253 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
254
255         PR c++/10218
256         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
257         definitions.
258
259         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
260         non-existant ssdf_decls array.
261         (finish_file): Call generator_ctor_or_dtor_function when there are
262         static constructors or destructors and no other static
263         initializations.
264
265 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
266
267         PR c++/10047
268         * decl2.c (finish_file): Don't warn about explicitly instantiated
269         inline decls.
270
271 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
272
273         PR c++/10224
274         * pt.c (lookup_template_class): Only check instantiated args if
275         they do not contain template parameters.
276
277 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
278
279         PR c++/10158
280         * parser.c (cp_parser_function_definition): Set
281         DECL_INITIALIZED_IN_CLASS for members.
282         * pt.c (instantiate_decl): Only reduce the template args for
283         friends that are not defined in class.
284
285 2003-03-25  Jason Merrill  <jason@redhat.com>
286
287         * call.c (print_z_candidate): Change name of first arg to msgid.
288         (joust): Add comment for translators.
289
290 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
291
292         PR c++/9898, PR c++/383, DR 322
293         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
294         through reference types on both PARM and ARG.
295
296 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
297
298         PR c++/10119
299         * error.c (dump_expr) <BASELINK>: Use dump_expr.
300         * pt.c (maybe_fold_nontype_args): New function.
301         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
302         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
303         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
304         maybe_fold_nontype_args.
305
306 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
307
308         PR c++/10026
309         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
310
311 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
312
313         PR c++/7086
314         * typeck.c (cxx_mark_addressable):  Adjust call to
315         gen_mem_addressof or put_var_into_stack.
316
317 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
318
319         PR c++/9978, c++/9708
320         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
321         * call.c (add_template_candidate_real): Adjust
322         instantiate_template call.
323         * class.c (resolve_address_of_overloaded_function): Likewise.
324         * decl.c (build_enumerator): Set TREE_CONSTANT.
325         * pt.c (check_instantiated_args): New.
326         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
327         TREE_READONLY.
328         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
329         (reduce_template_parm_level): Likewise.
330         (process_template_parm): Likewise.
331         (check_explicit_specialization): Adjust instantiate_template call.
332         (convert_template_argument): Don't check non-type argument here.
333         (lookup_template_class): Check them here.
334         (tsubst_friend_function): Adjust instantiate_template call.
335         (instantiate_template): Add tsubst_flags parameter, use it. Check
336         instantiated args.
337
338 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
339
340         * decl.c: Update calls to shadow_warning.
341
342 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
343
344         PR c++/9898
345         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
346         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
347
348 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
349
350         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
351         friends.
352         * cp/pt.c (instantiate_class_template): Fix formatting.
353
354 2003-03-14  Matt Austern  <austern@apple.com>
355
356         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
357         (unemitted_tinfo_decl_p): Remove.
358         (emit_tinfo_decl): Change declaration to remove unused parameter.
359         * decl2.c (finish_file): Change tinfo emission to loop through
360         unemitted_tinfo_decls array instead of looping through all decls.
361         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
362         unused second parameter.
363         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
364         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
365         (emit_tinfo_decl): remove unused second parameter, add assertion
366         that decl hasn't already been emitted.
367
368 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
369
370         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
371         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
372         return statements.
373
374 2003-03-19  Jason Merrill  <jason@redhat.com>
375
376         PR c++/8316, c++/9315, c++/10136
377         * call.c (print_z_candidate): Split out from...
378         (print_z_candidiates): ...here.
379         (joust): Use it.
380
381 2003-03-17  Roger Sayle  <roger@eyesopen.com>
382
383         PR c++/10031
384         * decl.c (duplicate_decls): Use the new type when prototyping
385         anticipated decls, even when the types match.  This defines the
386         exception list for the built-in function.
387
388 2003-03-17  Jason Merrill  <jason@redhat.com>
389
390         PR c++/10091
391         * typeck.c (build_class_member_access_expr): Compare
392         TYPE_MAIN_VARIANTs.
393
394 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
395
396         PR c++/9639
397         * parser.c (cp_parser_declarator_id): Clear parser->scope.
398
399 2003-03-16  Jason Merrill  <jason@redhat.com>
400
401         PR c++/9993
402         * decl.c (finish_function): Only allow the NRVO to use variables
403         declared at function scope.
404
405 2003-03-17  Andreas Jaeger  <aj@suse.de>
406
407         * Make-lang.in (cp/TAGS): Remove.
408
409 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
410
411         PR c++/9629
412         * cp-tree.h (struct language_function): Add in_base_initializer.
413         (in_base_initializer): define it.
414         (expand_member_init): Remove INIT param.
415         * init.c (expand_member_init): Remove INIT param, return the member.
416         (emit_mem_initializers): Set in_base_initializer.
417         * class.c (build_base_path): Check in_base_initializer.
418         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
419         * pt.c (tsubst_initializer_list): Likewise.
420
421 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
422
423         * decl.c (binding_for_name): Fix initialization thinko.
424
425 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
426
427         Compile-time improvement: 2/n.
428         * cp-tree.h (struct cxx_binding): New datatype;
429         (struct lang_identifier): Use it.
430         (LOCAL_BINDING_P): Adjust definition.
431         (INHERITED_VALUE_BINDING_P): Likewise.
432         (BINDING_SCOPE): Likewise.
433         (BINDING_HAS_LEVEL_P): Likewise.
434         (BINDING_VALUE): Likewise.
435         (BINDING_TYPE): Likewise.
436         (IDENTIFIER_VALUE): Likewise.
437         (struct tree_binding): Remove.
438         (TS_CP_BINDING): Likewise.
439         ((union lang_tree_node): Remove field "binding".
440         (cxx_binding_clear): New macro.
441         (binding_for_name): Adjust return type.
442         (qualified_lookup_using_namespace): Adjust prototype.
443         (lookup_using_namespace): Adjust prototype.
444         (cxx_scope_find_binding_for_name): Declare.
445         * cp-tree.def: Remove CPLUS_BINDING definition.
446         * decl.c (push_binding): Adjust local variable type.
447         (add_binding): Likewise.
448         (push_class_binding): Likewise.
449         (pop_binding): Likewise.
450         (poplevel): Likewise.
451         (poplevel_class): Likewise.
452         (free_bindings):  Adjust type.
453         (find_binding): Adjust return type, add a third parameter. Remove
454         non-useful assertion now that we use static typing.
455         (cxx_scope_find_binding_for_name): New function.
456         (binding_for_name): Use it.  Adjust local variable type. Simplify.
457         (namespace_binding):  Simplify.
458         (set_namespace_binding): Likewise.
459         (set_identifier_type_value_with_scope): Adjust local variable type.
460         (lookup_tag): Don't type-abuse of local variable 'old'.
461         (lookup_namespace_name): Likewise.  Allocate binding on stack.
462         (select_decl): Adjust prototype.
463         (unqualified_namespace_lookup):  Allocate binding on stack.
464         Don't type-abuse of local variable 'val'.
465         (lookup_name_real): Likewise.
466         (maybe_inject_for_scope_var): Adjust local variable type.
467         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
468         (namespace_binding): Adjust logic, simplify.
469         (BINDING_LEVEL): Adjust definition.
470         (push_class_level_binding): Adjust local variable type.
471         (struct cxx_saved_binding): Adjust field 'binding' type.
472         * decl2.c (ambiguous_decl): Adjust prototype.
473         (lookup_using_namespace): Adjust local variable type.
474         (qualified_lookup_using_namespace): Catch type error and correct
475         ensueing logic error.
476         (do_nonmember_using_decl): Adjust local variable type.  Allocate
477         temporary cxx_binding on stack.
478         (do_toplevel_using_decl): Adjust local variable type.
479         * ptree.c (cxx_print_cxx_binding): New function.
480         (cxx_print_identifier): Use it.
481         (cxx_print_xnode): Delete CPLUS_BINDING case label.
482
483 2003-03-15  Roger Sayle  <roger@eyesopen.com>
484
485         * tree.c (count_functions): Fix whitespace.
486
487 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
488
489         * Make-lang.in: Update.
490
491 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
492
493         PR c++/6440
494         * pt.c (maybe_process_partial_specialization): Handle
495         member class template when enclosing class template is
496         explicit specialized.
497         (most_general_template): Stop looking when DECL is already
498         specialized.
499
500 2003-03-13  Jason Merrill  <jason@redhat.com>
501
502         PR c++/9420
503         * search.c (lookup_conversions): Call complete_type here.
504         * call.c (implicit_conversion): Not here.
505
506 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
507
508         * decl2.c (do_nonmember_using_decl): Correct handling of
509         simultaneous type/non-type bindings.
510
511         * call.c (initialize_reference): Remove bogus assertion.
512         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
513
514 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
515
516         PR c++/7050
517         * expr.c (cxx_expand_expr): Return const0_rtx for throw
518         expressions.
519
520 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
521
522         PR c++/9474
523         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
524         to merge old and new declarations.
525
526 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
527
528         * g++.1: Remove.
529         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
530         (cp/g++.1): Build it from scratch in the build tree.
531         (c++.install-man): Depend on it.  Install it from the build tree.
532         (c++.mostlyclean): Clean it.
533
534 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
535
536         PR c++/9474
537         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
538         to merge old and new declarations.
539
540         PR c++/9924
541         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
542
543 2003-03-11  Jason Merrill  <jason@redhat.com>
544
545         PR c++/9820
546         * search.c (lookup_member): Fix handling of functions in a class
547         being defined.
548
549 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
550
551         PR c++/8700
552         * call.c (convert_class_to_reference): Adjust usage of
553         splice_viable.
554         (any_viable): Remove.
555         (splice_viable): Combine with any_viable.
556         (print_z_candidates): Avoid printing duplicates.
557         (build_user_type_conversion_1): Adjust usage of splice_viable.
558         (build_new_function_call): Likewise.
559         (build_operator_new_call): Likewise.
560         (build_object_call): Likewise.
561         (build_conditional_expr): Likewise.
562         (build_new_op): Likewise.
563         (build_new_method_call): Likewise.
564         (joust): Remove spurious comment.
565         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
566         * decl2.c (arg_assoc_class): Simplify.
567         * friend.c (add_friend): Likewise.
568
569 2003-03-11  Jason Merrill  <jason@redhat.com>
570
571         PR c++/8660
572         * decl2.c (check_classfn): A member template only matches a
573         member template.
574
575 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
576
577         * Make-lang.in (CXX_C_OBJS): Update.
578         * lang-specs.h: Don't define __GNUG__ here.
579
580 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
581
582         * call.c (perform_overload_resolution): New function.
583         (build_new_function_call): Use it.
584         (build_operator_new_call): Likewise.
585         (add_candidates): Add explicit_targs and template_only parameters.
586         (build_new_op): Adjust accordingly.
587         * cp-tree.h (build_operator_new_call): New function.
588         (build_function_call_real): Remove.
589         (build_function_call_maybe): Likewise.
590         * init.c (build_new_1): Use build_operator_new_call.
591         * typeck.c (build_function_call_real): Rename to ...
592         (build_function_call): ... this.
593
594 2003-03-10  Devang Patel  <dpatel@apple.com>
595
596         PR c++/9394
597         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
598
599 2003-03-10  Jason Merrill  <jason@redhat.com>
600
601         PR c++/9798
602         * decl.c (push_using_directive): Push before recursing.
603
604         PR c++/9868, c++/9524
605         * call.c (resolve_scoped_fn_name): Handle the case of a function
606         pointer member.
607
608         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
609         argument in the pointer-to-member case.
610
611 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
612
613         PR c++/9373
614         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
615         pointers to member functions.
616
617         PR c++/8534
618         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
619         in pointer-to-member-function types.
620
621 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
622
623         * expr.c (cplus_expand_constant): Use C90 prototype style.
624         (cxx_expand_expr): Likewise.
625
626 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
627
628         PR c++/9970
629         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
630         functions.
631
632 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
633
634         * lang-specs.h (c++-header): Change .pch to .gch.
635
636 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
637
638         * cp-tree.h (cxx_init): Update prototype.
639         * lex.c (cxx_init): Similarly.
640
641 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
642
643         PR c++/9823
644         * cp-tree.h (begin_mem_initializers): Remove.
645         * parser.c (cp_parser_mem_initializer_list): Inline it here.
646         Do not call finish_mem_initializers if not in a constructor.
647         (cp_parser_class_head): Fix typo in error message.
648         * semantics.c (begin_mem_initializers): Remove.
649         * testsuite/g++.dg/parser/constructor1.C: New test.
650
651         PR c++/9809
652         * call.c (add_function_candidate): Skip builtin fuctions that have
653         not yet been declared.
654
655         PR c++/9982
656         * init.c (build_new_1): Correct logic for determining whether or
657         not to use an array cookie.
658
659         PR c++/9524
660         * parser.c (cp_parser_postfix_expression): Call
661         finish_non_static_data_member, even when processing_template_decl.
662
663         PR c++/9912
664         * cp-tree.h (is_ancestor): New function.
665         (handle_class_head): Change prototype.
666         * decl2.c (is_namespace_ancestor): Rename to ...
667         (namespace_anecestor): ... this.
668         (set_decl_namespace): Adjust accordingly.
669         (handle_class_head): Remove unncessary parameters.
670         * parser.c (cp_parser_class_head): Check that
671         nested-name-specifiers are used appropriately.
672
673 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
674
675         * call.c (reference_binding): Remove REF_IS_VAR parameter.
676         (implicit_conversion): Adjust call to reference_binding.
677         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
678         (initialize_reference): Adjust handling for references bound to
679         rvalues.
680         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
681         prototype.
682         (real_non_cast_lvalue_p): New method.
683         * cvt.c (build_up_reference): Adjust use of
684         make_temporary_var_for_ref_to_temp.
685         * tree.c (real_non_cast_lvalue_p): New method.
686
687 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
688
689         * except.c (init_exception_processing): Use C90 prototype style.
690         (cp_protect_cleanup_actions): Likewise.
691         (prepare_eh_type): Likewise.
692         (build_eh_type_type): Likewise.
693         (build_exc_ptr): Likewise.
694         (do_begin_catch): Likewise.
695         (dtor_nothrow): Likewise.
696         (do_end_catch): Likewise.
697         (push_eh_cleanup): Likewise.
698         (decl_is_java_type): Likewise.
699         (choose_personality_routine): Likewise.
700         (initialize_handler_parm): Likewise.
701         (expand_start_catch_block): Likewise.
702         (expand_end_catch_block): Likewise.
703         (begin_eh_spec_block): Likewise.
704         (finish_eh_spec_block): Likewise.
705         (do_allocate_exception): Likewise.
706         (do_free_exception): Likewise.
707         (wrap_cleanups_r): Likewise.
708         (stabilize_throw_expr): Likewise.
709         (build_throw): Likewise.
710         (complete_ptr_ref_or_void_ptr_p): Likewise.
711         (is_admissible_throw_operand): Likewise.
712         (nothrow_libfn_p): Likewise.
713         (can_convert_eh): Likewise.
714         (check_handlers_1): Likewise.
715         (check_handlers): Likewise.
716
717 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
718
719         * call.c (merge_conversion_sequences): New function.
720         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
721         (convert_class_to_reference): Correct handling of second
722         standard conversion sequence in a user-defined conversion
723         sequence.
724         (build_user_type_conversion_1): Use merge_conversion_sequences.
725         * cp-tree.def: Add comments for CONV nodes.
726         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
727
728 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
729
730         * error.c (init_error): Use C90 prototype style.
731         (dump_scope): Likewise.
732         (dump_qualifiers): Likewise.
733         (dump_template_argument): Likewise.
734         (dump_template_argument_list): Likewise.
735         (dump_template_parameter): Likewise.
736         (dump_template_bindings): Likewise.
737         (dump_type): Likewise.
738         (dump_typename): Likewise.
739         (class_key_or_enum): Likewise.
740         (dump_aggr_type): Likewise.
741         (dump_type_prefix): Likewise.
742         (dump_type_suffix): Likewise.
743         (dump_global_iord): Likewise.
744         (dump_simple_decl): Likewise.
745         (dump_decl): Likewise.
746         (dump_template_decl): Likewise.
747         (dump_function_decl): Likewise.
748         (dump_parameters): Likewise.
749         (dump_exception_spec): Likewise.
750         (dump_function_name): Likewise.
751         (dump_template_parms): Likewise.
752         (dump_char): Likewise.
753         (dump_expr_list): Likewise.
754         (dump_expr): Likewise.
755         (dump_binary_op): Likewise.
756         (dump_unary_op): Likewise.
757         (type_as_string): Likewise.
758         (expr_as_string): Likewise.
759         (decl_as_string): Likewise.
760         (context_as_string): Likewise.
761         (lang_decl_name): Likewise.
762         (cp_file_of): Likewise.
763         (cp_line_of): Likewise.
764         (decl_to_string): Likewise.
765         (expr_to_string): Likewise.
766         (fndecl_to_string): Likewise.
767         (code_to_string): Likewise.
768         (language_to_string): Likewise.
769         (parm_to_string): Likewise.
770         (op_to_string): Likewise.
771         (type_to_string): Likewise.
772         (assop_to_string): Likewise.
773         (args_to_string): Likewise.
774         (cv_to_string): Likewise.
775         (cxx_print_error_function): Likewise.
776         (cp_diagnostic_starter): Likewise.
777         (cp_diagnostic_finalizer): Likewise.
778         (cp_print_error_function): Likewise.
779         (function_category): Likewise.
780         (print_instantiation_full_context): Likewise.
781         (print_instantiation_partial_context): Likewise.
782         (maybe_print_instantiation_context): Likewise.
783         (print_instantiation_context): Likewise.
784         (cp_printer): Likewise.
785         (print_integer): Likewise.
786         (print_non_consecutive_character): Likewise.
787         (locate_error): Likewise.
788
789 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
790
791         PR c++/9965
792         * call.c (reference_binding): Add ref_is_var parameter.
793         (implicit_conversion): Adjust call to reference_binding.
794         (initialize_reference): Likewise.
795
796         PR c++/9400
797         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
798         PARM_DECLs.
799
800         PR c++/9791
801         * class.c (get_basefndecls): Use lookup_fnfields_1.
802
803 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
804
805         PR c++/9188
806         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
807         in error message.
808         (cp_parser_single_declaration): Likewise.
809
810 2003-03-05  Jason Merrill  <jason@redhat.com>
811
812         PR c++/9440
813         * call.c (build_conditional_expr): Use convert rather than an
814         explicit NOP_EXPR.
815
816 2003-03-02  Matt Austern  <austern@apple.com>
817
818         * decl.c (cp_binding_level): Add static_decls varray member.
819         (add_decl_to_level): Add static/inline namespace scope
820         declarations to static_decls array.
821         (wrapup_global_for_namespace): Pass static_decls only, instead of
822         all decls, to wrapup_global_declarations/check_global_declarations.
823         (push_namespace): Initialize static_decls for ordinary namespaces.
824         (cxx_init_decl_processing): Initialize static_decls for global
825         namespace.
826
827 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
828
829         * class.c (end_of_class): Correct thinko.
830
831 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
832
833         * config-lang.in: Replace ${libstdcxx_version} by its value.
834
835 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
836
837         * cp-tree.h (cxx_saved_binding): Declare.
838         (struct saved_scope): Adjust type of field 'old_binding'.
839         * decl.c (cxx_saved_binding_make): New macro.
840         (struct cxx_saved_binding): Define.
841         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
842         C++ bindings.
843         (maybe_push_to_top_level): Adjust local variable type.
844         (pop_from_top_level): Likewise.
845
846 2003-03-04  Tom Tromey  <tromey@redhat.com>
847
848         * Make-lang.in (c++.tags): New target.
849
850 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
851
852         * Make-lang.in: Update.
853
854 2003-03-03  Jason Merrill  <jason@redhat.com>
855
856         * decl.c (finish_enum): Do set the type in a template. Simplify.
857         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
858
859 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
860
861         PR c++/9878
862         * call.c (convert_class_to_reference): Correct conversion
863         sequences.
864         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
865         (implicit_conversion): Adjust call to reference_binding.
866         (add_candidate): Change type of candidates parameter.
867         (add_function_candidate): Likewise.
868         (add_conv_candidate): Likewise.
869         (build_builtin_candidate): Likewise.
870         (add_builtin_candidate): Likewise.
871         (add_builtin_candidates): Likewise.
872         (add_template_candidate_real): Likewise.
873         (add_template_candidate): Likewise.
874         (add_template_conv_candidate): Likewise.
875         (build_user_type_conversion_1): Adjust accordingly.
876         (build_object_call): Likewise.
877         (build_conditional_expr): Likewise.
878         (add_candidates): Likewise.
879         (build_new_op): Likewise.
880         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
881         (build_new_method_call): Adjust calls to add_function_candidate.
882         (make_temporary_var_for_ref_to_temp): New function.
883         (initialize_reference): Add decl parameter.
884         * class.c (build_rtti_vtbl_entries): Use build_address and
885         build_nop.
886         * cp-tree.h (initialize_reference): Change prototype.
887         (make_temporary_var_for_ref_to_temp): New function.
888         (build_type_conversion): Change prototype.
889         (build_address): New function.
890         (build_nop): Likewise.
891         * cvt.c (cp_convert_to_pointer): Adjust call to
892         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
893         Use build_nop.
894         (convert_to_pointer_force): Use build_nop.
895         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
896         (convert_to_reference): Adjust call to build_type_conversion.
897         (ocp_convert): Likewise.
898         (build_type_conversion): Remove for_sure parameter.
899         * decl.c (grok_reference_init): Use initialize_reference.
900         * typeck.c (build_address): New function.
901         (build_nop): Likewise.
902         (build_unary_op): Use them.
903         (build_ptrmemfunc): Tidy slightly.
904         (convert_for_initialization): Adjust call to
905         initialize_reference.
906         * typeck2.c (store_init_value): Remove #if 0'd code.
907
908 2003-03-03  Jason Merrill  <jason@redhat.com>
909
910         * decl.c (start_function): Clear DECL_NUM_STMTS.
911
912         * class.c (get_vtable_decl): Use vtbl_type_node.
913         (build_primary_vtable): Check for it.
914
915 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
916
917         * decl.c (check_initializer): Check for vector_opaque_p.
918
919 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
920
921         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
922           invoke an external cpp during compilation.
923
924 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
925
926         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
927         that of warning().
928         (start_decl): Likewise.
929         (start_function): Likewise.
930
931 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
932
933         * Make-lang.in (CXX_C_OBJS): Update.
934
935 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
936
937         PR c++/9892
938         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
939         instantiating it.
940
941 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
942
943         * parser.c (cp_parser_init_declarator): Revert opaque
944         vector_opaque_p change.
945         Do not include target.h.
946
947 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
948
949         PR c++/9879
950         * cp-tree.h (build_zero_init): Add parameter.
951         * decl.c (cp_finish_decl): Adjust call.
952         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
953         calls.
954         (build_default_init): Add nelts parameter.  Adjust calls to
955         build_zero_init.
956         (build_new_1): Adjust call to build_default_init.
957         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
958
959 2003-02-26  Devang Patel  <dpatel@apple.com>
960
961         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
962         required.  Postpone enum setting for template decls.
963         (build_enumerator): Delay copying value node until finish_enum
964         (). Remove #if 0'ed code.
965         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
966         (tsubst_copy): Add check for enum type.
967
968 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
969
970         PR c++/9683
971         * decl2.c (prune_vars_needing_no_initialization): Do not throw
972         away initializations for DECL_EXTERNAL VAR_DECLs.
973         (finish_file): Adjust accordingly.
974         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
975
976 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
977
978         * decl.c (add_binding): Time TV_NAME_LOOKUP.
979         (push_class_binding): Likewise.
980         (set_namespace_binding): Likewise.
981
982 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
983
984         PR c++/9836
985         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
986         specializations back to the main template.
987         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
988         * pt.c (resolve_typename_type): Likewise.
989
990 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
991
992         PR c++/9778
993         * pt.c (tsubst_copy_and_build): For a templated function inside a
994         scope, process template arguments.
995
996 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
997
998         PR c++/9602
999         * typeck2.c (abstract_virtuals_error): Don't check when
1000         TYPE is still template parameter dependent.
1001
1002 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
1003
1004         PR c++/5333
1005         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
1006         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
1007         * pt.c (instantiate_class_template): Don't try to instantiate
1008         dependent types.
1009         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
1010
1011 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
1012
1013         PR c++/9749
1014         * decl.c (grokdeclarator): Do not allow parameters with variably
1015         modified types.
1016
1017 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
1018
1019         * search.c (grow_bfs_bases): Remove. Fold into ...
1020         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
1021         in previous patch.
1022
1023 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
1024
1025         PR c++/9729
1026         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
1027         when the G++ 3.2 ABI prevents correct compilation.
1028
1029 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
1030
1031         Change base class access representation. Share virtual base
1032         binfos.
1033         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
1034         call.
1035         * cp/class.c (build_base_path): Likewise.
1036         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
1037         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
1038         (make_new_vtable): Adjust.
1039         (force_canonical_binfo_r): Delete.
1040         (force_canonical_binfo): Delete.
1041         (mark_primary_virtual_base): Delete.
1042         (dfs_unshared_virtual_bases): Delete.
1043         (mark_primary_bases): Adjust.
1044         (maybe_warn_about_overly_private_class): Adjust.
1045         (dfs_base_derived_from): Delete.
1046         (base_derived_from): Follow the inheritance chain.
1047         (struct find_final_overrider_data): Add vpath member.
1048         (dfs_find_final_overrider): Adjust.
1049         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
1050         (find_final_overrider): Adjust.
1051         (update_vtable_entry_for_fn): Adjust.
1052         (modify_all_vtables): Adjust.
1053         (walk_subobject_offsets): Adjust.
1054         (layout_nonempty_base_or_field): Adjust.
1055         (layout_empty_base): Remove last parameter. Adjust.
1056         (build_base_field): Adjust.
1057         (build_base_fields): Adjust.
1058         (propagate_binfo_offsets): Remove last parameter. Adjust.
1059         (dfs_set_offset_for_unshared_vbases): Delete.
1060         (layout_virtual_bases): Adjust.
1061         (finish_struct_1): Adjust.
1062         (init_class_processing): Don't init access nodes.
1063         (dfs_get_primary_binfo): Delete.
1064         (get_primary_binfo): Adjust.
1065         (dump_class_hierarchy_r): Remove most derived arg, add IGO
1066         parameter. Adjust.
1067         (dump_class_hierarchy): Adjust.
1068         (finish_vtbls): Adjust.
1069         (get_original_base): Delete.
1070         (build_vtt_inits): Adjust.
1071         (dfs_build_secondary_vptr_vtt_inits): Adjust.
1072         (dfs_ctor_vtable_bases_queue_p): Adjust.
1073         (build_ctor_vtbl_group): Adjust.
1074         (dfs_accumulate_vtbl_inits): Adjust.
1075         (build_vtbl_initializer): Adjust.
1076         (build_vbase_offset_vtbl_entries): Adjust.
1077         (add_vcall_offset_vtbl_entries_1): Adjust.
1078         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
1079         (access_*_node): Remove.
1080         (CANONICAL_BINFO): Delete.
1081         (BINFO_UNSHARED_MARKED): Remove.
1082         (BINFO_MARKED): Set LANG_FLAG_0 directly.
1083         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
1084         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
1085         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
1086         Delete.
1087         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
1088         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
1089         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
1090         Delete.
1091         (BINFO_DEPENDENT_BASE_P): New.
1092         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
1093         index.
1094         (markedp, unmarkedp): Adjust.
1095         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
1096         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
1097         find_vbase_instance, binfo_for_vbase): Delete.
1098         (copied_binfo, original_binfo): Declare.
1099         (finish_base_specifier): Add virtual_p arg.
1100         (unshare_base_binfos): Delete.
1101         (copy_base_binfos): Declare.
1102         (reverse_path): Delete.
1103         * cp/decl.c (xref_basetypes): Access and virtuality passed
1104         differently. Don't copy direct base binfos here. Call
1105         copy_base_binfos.
1106         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
1107         (initialize_vtbl_ptrs): Adjust.
1108         (expand_member_init): Adjust.
1109         * cp/parser.c (cp_parser_base_specifier): Adjust.
1110         * cp/pt.c (instantiate_class_template): Adjust.
1111         (get_template_base_recursive): Adjust.
1112         * cp/rtti.c (get_pseudo_ti_init): Adjust.
1113         (get_pseudo_ti_desc): Adjust.
1114         * cp/tree.c (unshare_base_binfos): Rename to ...
1115         (copy_base_binfos): ... here, reimplement.
1116         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
1117         (reverse_path): Remove.
1118         * cp/typeck.c (get_delta_difference): Adjust error messages.
1119         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
1120         * cp/search.c (lookup_base_r): Adjust.
1121         (dynamic_cast_base_recurse): Adjust.
1122         (canonical_binfo): Remove.
1123         (dfs_canonical_queue): Remove.
1124         (dfs_assert_unmarked_p): Remove.
1125         (assert_canonical_unmarked): Remove.
1126         (shared_marked_p, shared_unmarked_p): Remove.
1127         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
1128         (dfs_access_in_type): Adjust.
1129         (access_in_type): Adjust.
1130         (dfs_accessible_queue_p): Adjust.
1131         (dfs_accessible_p): Adjust.
1132         (is_subobject_of_p_1, is_subobject_of_p): Remove.
1133         (struct lookup_field_info): Remove from_dep_base_p field.
1134         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
1135         (lookup_field_r): Remove dependent base code.
1136         (lookup_member): Likewise.
1137         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
1138         (dfs_unmarked_real_bases_queue_p): Remove.
1139         (dfs_marked_real_bases_queue_p): Remove.
1140         (dfs_skip_vbases): Remove.
1141         (dfs_get_pure_virtuals): Adjust.
1142         (markedp, unmarkedp): Adjust.
1143         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
1144         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
1145         (dfs_unmark): Adjust.
1146         (dfs_get_vbase_types):Remove.
1147         (dfs_build_inheritance_graph_order): Remove.
1148         (get_vbase_types): Remove
1149         (dfs_find_vbase_instance): Remove.
1150         (find_vbase_instance): Remove.
1151         (dfs_debug_unmarkedp): Adjust.
1152         (dependent_base_p): Remove.
1153         (dfs_push_type_decls): Adjust.
1154         (dfs_push_decls): Adjust.
1155         (dfs_no_overlap_yet): Adjust.
1156         (copied_binfo): New function.
1157         (original_binfo): New function.
1158         (binfo_for_vbase): Remove.
1159
1160 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
1161
1162         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
1163         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
1164         vectors, for speed.
1165
1166 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
1167
1168         PR c++/9704
1169         * class.c (layout_class_type): In the 3.2 ABI, take into account
1170         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
1171
1172 2003-02-18  Matt Austern <austern@apple.com>
1173
1174         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
1175         nothing for C++.
1176         * cp/decl.c (wrapup_globals_for_namespace): Remove special
1177         handling of global namespace.
1178
1179 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
1180
1181         * cp-tree.h (rid_to_yy): Delete.
1182         (C_RID_YYCODE): Delete.
1183         (finish_file): Delete redundant declaration.
1184
1185 2003-02-18  Jason Merrill  <jason@redhat.com>
1186
1187         PR c++/9623
1188         * decl.c (reshape_init): Don't mess with initializer labels.
1189
1190         PR c++/9485
1191         * parser.c (cp_parser_postfix_expression): Set idk properly for
1192         object->scope::member.
1193
1194 2003-02-18  Ben Elliston  <bje@redhat.com>
1195
1196         PR other/7350
1197         * decl.c (duplicate_decls): Fix typo in comment.
1198
1199 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
1200
1201         PR debug/9717
1202         * class.c (build_base_field): Mark fields for base classes with
1203         DECL_IGNORED_P.
1204
1205 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1206
1207         PR c++/9457
1208         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
1209         CONSTRUCTOR_ELTS only once.
1210
1211 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1212
1213         PR c++/9459
1214         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
1215         (dump_type_suffix): Likewise.
1216
1217 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
1218
1219         * search.c: ANSIfy function declarations and definitions.
1220         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
1221         * call.c (build_method_call, resolve_scoped_fn_name,
1222         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
1223         calls.
1224         * class.c (handle_using_decl): Likewise.
1225         * decl.c (make_typename_type, make_unmound_class_template,
1226         start_decl, compute_array_index_type): Likewise.
1227         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
1228         * init.c (expand_member_init, build_member_call): Likewise.
1229         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
1230         resolve_typename_type): Likewise.
1231         * typeck.c (lookup_destructor, finish_class_member_access_exprm
1232         build_prememfunc_access_expr): Likewise.
1233
1234 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
1235
1236         * decl2.c: Include "timevar.h".
1237         (namespace_ancestor): Time name lookup.
1238         (add_using_namespace): Likewise.
1239         (lookup_using_namespace): Likewise.
1240         (qualified_lookup_using_namespace): Likewise.
1241         (decl_namespace): Likewise.
1242         (lookup_arg_dependent): Likewise.
1243         * lex.c (do_identifier): Likewise.
1244         (do_scoped_id): Likewise.
1245         * pt.c (lookup_template_class): Likewise.
1246
1247 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
1248
1249         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
1250
1251 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1252
1253         * decl.c: Include "timevar.h".
1254         (poplevel): Time name lookup.
1255         (find_binding): Likewise.
1256         (push_namespace): Likewise.
1257         (pop_nested_namespace): Likewise.
1258         (store_bindings): Likewise.
1259         (maybe_push_to_top_level): Likewise.
1260         (pop_from_top_level): Likewise.
1261         (push_local_name): Likewise.
1262         (pushtag): Likewise.
1263         (pushdecl): Likewise.
1264         (pushdecl_with_scope): Likewise.
1265         (pushdecl_namespace_level): Likewise.
1266         (pushdecl_top_level): Likewise.
1267         (pushdecl_class_level): Likewise.
1268         (push_class_level_binding): Likewise.
1269         (push_using_decl): Likewise.
1270         (push_using_directive): Likewise.
1271         (push_overloaded_decl): Likewise.
1272         (lookup_label): Likewise.
1273         (define_label): Likewise.
1274         (lookup_tag): Likewise.
1275         (lookup_tag_reverse): Likewise.
1276         (lookup_namespace_name): Likewise.
1277         (select_decl): Likewise.
1278         (unqualified_namespace_lookup): Likewise.
1279         (lookup_name_real): Likewise.
1280         (lookup_name_current_level): Likewise.
1281         (lookup_type_current_level): Likewise.
1282         (maybe_inject_for_scope_var): Likewise.
1283         (xref_tag): Likewise.
1284
1285         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
1286
1287 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
1288
1289         * decl.c (build_enumerator):  Remove unneeded test.
1290
1291 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
1292
1293         * cp-tree.h (struct lang_type_header): Make all fields unsigned
1294         char.
1295
1296 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
1297
1298         PR c++/7129
1299         * call.c (z_candidate): Add args.
1300         (convert_class_to_reference): Set it.
1301         (implicit_conversion): Tidy.
1302         (add_candidate): Add args parameter.
1303         (add_function_candidate): Adjust call to add_candidate.
1304         (add_conv_candidate): Likewise.
1305         (build_builtin_candidate): Likewise.
1306         (build_user_type_conversion_1): Eliminate wasteful tree_cons
1307         usage.
1308         (build_new_function_call): Likewise.
1309         (build_object_call): Likewise.
1310         (add_candidates): New function.
1311         (build_new_op): Use it.
1312         (covert_like_real): Adjust call to build_over_call.
1313         (build_over_call): Remove args parameter.
1314         * operators.def: Add <?= and >?=.
1315
1316 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
1317
1318         * typeck.c (build_indirect_ref): Don't check flag_volatile.
1319
1320 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1321
1322         PR c++/8849
1323         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
1324
1325 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
1326
1327         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
1328         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
1329         (BINFO_LANG_ELTS): New #define.
1330         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
1331
1332 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
1333
1334         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
1335
1336 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
1337
1338         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
1339         for class types.
1340         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
1341         rather than TYPE_LANG_FLAG_0.
1342         (TYPE_BUILT_IN): Remove.
1343         (TYPE_DEPENDENT_P): New macro.
1344         (TYPE_DEPENDENT_P_VALID): Likewise.
1345         (lang_type_class): Add fields_readonly.
1346         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
1347         * pt.c (dependent_type_p_r): New function, split out from ...
1348         (dependent_type_p): ... here.  Memoize results.
1349         * search.c (dependent_base_p): Use dependent_type_p, not
1350         uses_template_parms.
1351         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
1352         for class types.
1353
1354 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
1355
1356         * call.c (build_field_call): Use build_new_op, not build_opfncall.
1357         (prep_operand): New function.
1358         (build_new_op): Use it.  Remove dead code.
1359         * class.c (pushclass): Change "modify" parameter type from int to
1360         bool.
1361         (currently_open_class): Use same_type_p, not pointer equality.
1362         (push_nested_class): Adjust calls to pushclass, remove modify
1363         parameter.
1364         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
1365         (pushclass): Change prototype.
1366         (push_nested_class): Likewise.
1367         (grokoptypename): Remove.
1368         (build_opfncall): Remove.
1369         (value_dependent_expression_p): Declare.
1370         (resolve_typename_type): Likewise.
1371         (resolve_typename_type_in_current_instantiation): Likewise.
1372         (enter_scope_of): Remove.
1373         (tsubst): Remove.
1374         (tsubst_expr): Likewise.
1375         (tsubst_copy): Likewise.
1376         (tsubst_copy_and_build): Likewise.
1377         * decl.c (warn_about_implicit_typename_lookup): Remove.
1378         (finish_case_label): Return error_mark_node for erroneous labels.
1379         (start_decl): Adjust calls to push_nested_class.
1380         (grokfndecl): Call push_scope/pop_scope around call to
1381         duplicate_decls.
1382         (grokdeclarator): Do not call tsubst.
1383         (start_function): Adjust calls to push_nested_class.
1384         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
1385         (check_classfn): Use push_scope/pop_scope around type comparisions.
1386         (grokoptypename): Remove.
1387         (push_sscope): Adjust call to push_nested_class.
1388         * error.c (dump_type): Show cv-qualification of typename types.
1389         * init.c (build_member_call): Use build_new_op, not
1390         build_opfncall.
1391         * method.c (build_opfncall): Remove.
1392         * parser.c (cp_parser): Add allow_non_constant_expression_p and
1393         non_constant_expression_p.
1394         (cp_parser_constant_expression): Adjust prototype.
1395         (cp_parser_resolve_typename_type): Remove.
1396         (cp_parser_non_constant_expression): New function.
1397         (cp_parser_non_constant_id_expression): Likewise.
1398         (cp_parser_new): Set allow_non_constant_expression_p and
1399         non_constant_expression_p.
1400         (cp_parser_primary_expression): Reject `this' and `va_arg' in
1401         constant-expressions.  Note that dependent names aren't really
1402         constant.
1403         (cp_parser_postfix_expression): Reject conversions to non-integral
1404         types in constant-expressions.  Neither are increments or
1405         decrements.
1406         (cp_parser_unary_expression): Reject increments and decrements in
1407         constant-expressions.
1408         (cp_parser_direct_new_declarator): Adjust call to
1409         cp_parser_constant_expression.
1410         (cp_parser_cast_expression): Reject conversions to non-integral
1411         types in constant-expressions.
1412         (cp_parser_assignment_expression): Rejects assignments in
1413         constant-expressions.
1414         (cp_parser_expression): Reject commas in constant-expressions.
1415         (cp_parser_labeled_statement): Adjust call to
1416         cp_parser_constant_expression.
1417         (cp_parser_direct_declarator): Simplify array bounds, even in
1418         templates, when they are non-dependent.  Use
1419         resolve_typename_type, not cp_parser_resolve_typename_type.
1420         (cp_parser_class_head): Use resolve_typename_type, not
1421         cp_parser_resolve_typename_type.
1422         (cp_parser_member_declaration): Adjust call to
1423         cp_parser_constant_expression.
1424         (cp_parser_constant_initializer): Likewise.
1425         (cp_parser_constructor_declarator): Use resolve_typename_type, not
1426         cp_parser_resolve_typename_type.
1427         (cp_parser_late_parsing_default_args): Adjust call to
1428         push_nested_class.
1429         * pt.c (tsubst): Give it internal linkage.
1430         (tsubst_expr): Likewise.
1431         (tsubst_copy): Likewise.
1432         (tsubst_copy_and_build): Likewise.
1433         (push_access_scope_real): Likewise.
1434         (tsubst_friend_class): Likewise.
1435         (instantiate_class_template): Adjust call to pushclass.
1436         (value_dependent_expression_p): Give it external linkage.
1437         Robustify.
1438         (resolve_typename_type): New function.
1439         * semantics.c (finish_call_expr): Use build_new_op, not
1440         build_opfncall.
1441         (begin_constructor_declarator): Remove.
1442         (begin_class_definition): Adjust call to pushclass.
1443         (enter_scope_of): Remove.
1444         * typeck.c (comptypes): Resolve typename types as appropriate.
1445         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
1446         (build_x_compound_expr): Likewise.
1447         (build_modify_expr): Likewise.
1448         (build_x_modify_expr): Likewise.
1449         * typeck2.c (build_x_arrow): Likewise.
1450
1451 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
1452
1453         * pt.c (last_pending_template) Declare GTY().
1454
1455 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1456
1457         PR c++/8591
1458         * parser.c (cp_parser_elaborated_type_specifier): Convert
1459         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
1460         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
1461
1462 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
1463
1464         PR c++/9437
1465         * pt.c (unify): Don't unify '*T' with 'U C::*'.
1466
1467         PR c++/3902
1468         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
1469         inside a declarator.
1470
1471 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
1472
1473         * class.c (update_vtable_entry_for_fn): Add index parameter.
1474         Generate vcall thunk for covariant overriding from a virtual
1475         primary base.
1476         (dfs_modify_vtables): Adjust.
1477
1478 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
1479
1480         PR c++/9403
1481         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
1482         template keyword.
1483         (cp_parser_base_specifier): Look for and consume a
1484         TEMPLATE keyword. Replace switch with array index.
1485
1486         PR c++/795
1487         * semantics.c (finish_non_static_data_member): Remember the
1488         field's type even in a template.
1489
1490         PR c++/9415
1491         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
1492         already scoped.
1493
1494         PR c++/8545
1495         * parser.c (cp_parser_cast_expression): Be more tentative.
1496
1497 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1498
1499         * cp-tree.h (flagged_type_tree_s): Remove.
1500         (check_for_new_type): Likewise.
1501         * typeck2.c (check_for_new_type): Likewise.
1502
1503 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
1504
1505         * dump.c: ANSIfy function declarations and definitions.
1506
1507         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
1508
1509 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1510
1511         PR c++/9354
1512         * init.c (build_new): Set the type of the new-expression, even
1513         when processing_templte_decl.
1514
1515         PR c++/9216
1516         * parser.c (cp_parser_primary_expression): Improve error message
1517         for templates used in an expression context.
1518
1519         PR c++/8696
1520         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
1521         parse when encountering "typedef".
1522
1523 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
1524
1525         * class.c, parser.c: ANSIfy function definitions and declarations.
1526
1527 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1528
1529         PR c++/9328
1530         * error.c (dump_decl): For an OVERLOAD, just print the name of the
1531         function; it doesn't make sense to try to print its type.
1532         * semantics.c (finish_typeof): Issue errors about invalid uses.
1533
1534         PR c++/9298
1535         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
1536         function.
1537         (cp_parser_expression_statement): Use it.
1538         (cp_parser_explicit_instantiation): Likewise.
1539         * pt.c (do_decl_instantiation): Improve error handling logic.
1540
1541 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1542
1543         PR c++/9384
1544         * parser.c (cp_parser_using_declaration): Issue error messages
1545         about name resolution failures here.
1546
1547         PR c++/9388
1548         * class.c (currently_open_derived_class): Use dependent_type_p.
1549         * cp-tree.h (dependent_type_p): New function.
1550         (dependent_template_arg_p): Likewise.
1551         (dependent_template_p): Likewise.
1552         (type_dependent_expression_p): Likewise.
1553         * parser.c (cp_parser_dependent_type_p): Remove.
1554         (cp_parser_value_dependent_type_p): Likewise.
1555         (cp_parser_type_dependent_expression_p): Likewise.
1556         (cp_parser_dependent_template_arg_p): Likewise.
1557         (cp_parser_dependent_template_id_p): Likewise.
1558         (cp_parser_dependent_template_p): Likewise.
1559         (cp_parser_diagnose_invalid_type_name): Replace
1560         cp_parser_dependent_type_p with dependent_type_p, etc.
1561         (cp_parser_primary_expresion): Likewise.
1562         (cp_parser_nested_name_specifier_opt): Likewise.
1563         (cp_parser_postfix_expression): Likewise.
1564         (cp_parser_unary_expression): Likewise.
1565         (cp_parser_template_name): Likewise.
1566         (cp_parser_class_name): Likewise.
1567         (cp_parser_lookup_name): Likewise.
1568         * pt.c (dependent_type_p): New function.
1569         (value_dependent_expression_p): Likewise.
1570         (type_dependent_expression_p): Likewise.
1571         (dependent_template_arg_p): Likewise.
1572         (dependent_template_id_p): Likewise.
1573         (dependent_template_p): Likewise.
1574
1575         PR c++/9285
1576         PR c++/9294
1577         * parser.c (cp_parser_simple_declaration): Return quickly when
1578         encountering errors.
1579
1580 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1581
1582         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
1583
1584 2003-01-17  Jason Merrill  <jason@redhat.com>
1585
1586         PR c++/9167, c++/9358
1587         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
1588
1589 2003-01-17  Jason Merrill  <jason@redhat.com>
1590
1591         PR c++/9342
1592         * call.c (build_conditional_expr): Always do lvalue-rvalue
1593         conversion.
1594
1595 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
1596
1597         PR c++/9294
1598         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
1599         * cp-tree.h (BASELINK_BINFO): Adjust.
1600         (BASELINK_FUNCTIONS): Likewise.
1601         (BASELINK_ACCESS_BINFO): Likewise.
1602         (tree_baselink): New structure.
1603         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
1604         (lang_tree_node): Add baselink.
1605         * decl.c (cp_tree_node_structure): Add BASELINK case.
1606         * search.c (build_baselink): Adjust.
1607         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
1608         test from TREE_LIST case.
1609
1610         PR c++/9272
1611         * parser.c (cp_parser_constructor_declarator_p): Do not assume
1612         that a constructor cannot be declared outside of its own class.
1613
1614         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
1615         be resolved, neither can the qualified name.
1616
1617         * rtti.c (get_pseudo_ti_desc): Fix thinko.
1618
1619 2003-01-16  Jason Merrill  <jason@redhat.com>
1620
1621         PR c++/8564
1622         * init.c (build_vec_init): Re-add maxindex parm.
1623         (perform_member_init, build_aggr_init): Pass it.
1624         (build_new_1): Pass it. Use an incomplete array type for full_type.
1625         * typeck.c (build_modify_expr): Pass it.
1626         * cp-tree.h: Adjust.
1627
1628 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
1629
1630         * cp-tree.h (tsubst_copy_and_build): New declaration.
1631         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
1632         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
1633         (tsubst_copy_and_build): New function.
1634
1635 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
1636
1637         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
1638         (PARTIAL_INSTANTIATION_P): Remove.
1639         (IMPLICIT_TYPENAME_P): Likewise.
1640         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
1641         (build_typename_type): Remove declaration.
1642         (parmlist_is_exprlist): Likewise.
1643         * decl.c (build_typename_type): Make it static, remove third
1644         parameter.
1645         (push_class_binding): Don't do implicit typename stuff.
1646         (make_typename_type): Likewise.
1647         (lookup_name_real): Likewise.
1648         (grokdeclarator): Don't try to convert declarations into
1649         initializations.  Don't do implicit typename stuff.
1650         (parmlist_is_exprlist): Remove.
1651         (xref_basetypes): Simplify.
1652         * decl2.c (grokfield): Don't try to convert declarations into
1653         initializations.
1654         (build_anon_union_vars): Do this while processing templates, too.
1655         (finish_anon_union): Likewise.
1656         * error.c (dump_type): Remove implicit typename handling.
1657         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
1658         (cp_parser_primary_expression): Correct handling of names not
1659         found by unqualified name lookup in templates.
1660         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
1661         of types when possible.
1662         (cp_parser_simple_declaration): Complain intelligently about some
1663         invalid declarations.
1664         (cp_parser_member_declaration): Likewise.
1665         (cp_parser_constructor_declarator_p): Don't check when we're in a
1666         function scope.
1667         * pt.c (instantiate_class_template): Remove
1668         PARTIAL_INSTANTIATION_P gunk.
1669         * search.c (lookup_field_r): Don't build implicit typenames.
1670         (marked_pushdecls_p): Don't enter dependent base types.
1671         (unmarked_pushdecls_p): Likewise.
1672         * semantics.c (begin_class_definition): Remove implicit typename
1673         stuff.
1674
1675 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
1676
1677         PR c++/9212
1678         * parser.c (cp_parser_direct_declarator): If accepting either
1679         abstract or named, the name must be an unqualified-id.
1680
1681 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1682
1683         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
1684
1685 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1686
1687         * decl2.c (check_classfn): Fix uninitialized warning.
1688         (build_anon_union_vars): Likewise.
1689         * pt.c (tsubst_copy): Likewise.
1690
1691 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
1692
1693         Further conform g++'s __vmi_class_type_info to the C++ ABI
1694         specification.
1695         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
1696         the specification.
1697         (class_hint_flags): Likewise.
1698
1699 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1700
1701         * config-lang.in: Add semantics.c to gtfiles.
1702         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
1703         (saved_scope): Likewise.
1704         (type_lookups): Remove.
1705         (deferred_access): New structure.
1706         (type_access_control): Remove.
1707         (save_type_access_control): Likewise.
1708         (reset_type_access_control): Likewise.
1709         (decl_type_access_control): Likewise.
1710         (push_deferring_access_checks): Declare.
1711         (resume_deferring_access_checks): Likewise.
1712         (stop_deferring_access_checks): Likewise.
1713         (pop_deferring_access_checks): Likewise.
1714         (get_deferred_access_checks): Likewise.
1715         (pop_to_parent_deferring_access_checks): Likewise.
1716         (perform_deferred_access_checks): Likewise.
1717         (perform_or_defer_access_check): Likewise.
1718         * decl.c (make_typename_type): Use perform_or_defer_access_check.
1719         (make_unbound_class_template): Likewise.
1720         (grokdeclarator): Don't call decl_type_access_control.
1721         * parser.c (cp_parser_context): Remove deferred_access_checks
1722         and deferring_access_checks_p fields.
1723         (cp_parser_context_new): Adjust.
1724         (cp_parser): Remove access_checks_lists.
1725         (cp_parser_defer_access_check): Remove.
1726         (cp_parser_start_deferring_access_checks): Remove.
1727         (cp_parser_stop_deferring_access_checks): Remove.
1728         (cp_parser_perform_deferred_access_checks): Remove.
1729         (cp_parser_nested_name_specifier_opt): Use new deferred access
1730         functions.
1731         (cp_parser_simple_declaration): Likewise.
1732         (cp_parser_template_id): Likewise.
1733         (cp_parser_function_definition): Likewise.
1734         (cp_parser_class_specifier): Likewise.
1735         (cp_parser_lookup_name): Likewise.
1736         (cp_parser_single_declaration): Likewise.
1737         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
1738         (cp_parser_parse_tentatively): Likewise.
1739         (cp_parser_parse_definitely): Likewise.
1740         (yyparse): Likewise.
1741         (cp_parser_init_declarator): Remove access_checks parameter.
1742         Use new deferred access functions.
1743         (cp_parser_function_definition_from_specifiers_and_declarator):
1744         Likewise.
1745         (cp_parser_class_head): Remove deferring_access_checks_p and
1746         saved_access_checks parameters.  Use new deferred access functions.
1747         (cp_parser_member_specification_opt): Don't call
1748         reset_type_access_control.
1749         * search.c (type_access_control): Remove.
1750         * semantics.c: Include "gt-cp-semantics.h".
1751         (deferred_type_access_control): Remove.
1752         (deferred_access_stack): New variable.
1753         (deferred_access_free_list): Likewise.
1754         (push_deferring_access_checks): New function.
1755         (resume_deferring_access_checks): Likewise.
1756         (stop_deferring_access_checks): Likewise.
1757         (pop_deferring_access_checks): Likewise.
1758         (get_deferred_access_checks): Likewise.
1759         (pop_to_parent_deferring_access_checks): Likewise.
1760         (perform_deferred_access_checks): New function, adapted from
1761         cp_parser_perform_deferred_access_checks.
1762         (perform_or_defer_access_check): New function, adapted from
1763         cp_parser_defer_access_check.
1764         (current_type_lookups): Remove.
1765         (deferred_type_access_control): Likewise.
1766         (decl_type_access_control): Likewise.
1767         (save_type_access_control): Likewise.
1768         (reset_type_access_control): Likewise.
1769         (begin_function_definition): Adjust.
1770         (begin_class_definiton): Likewise.
1771
1772 2003-01-13  Jason Merrill  <jason@redhat.com>
1773
1774         PR c++/8748
1775         * class.c (build_base_path): Take the address before calling save_expr.
1776
1777         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
1778         all the ambiguous conversions are bad.
1779
1780         * class.c (maybe_warn_about_overly_private_class): Don't stop
1781         searching when we find a nonprivate method.
1782
1783         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
1784
1785 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
1786
1787         * cp-tree.h (get_arglist_len_in_bytes): Remove.
1788
1789         PR c++/9264
1790         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
1791         typeame types more robustly.
1792
1793 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
1794
1795         * parser.c:  Fix comment typos.
1796
1797 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
1798
1799         PR c++/9099
1800         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
1801         an object_type which is not a class type.
1802
1803 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
1804
1805         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
1806         (cp_parser_late_parsing_default_args): Likewise.
1807
1808 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
1809
1810         * cfns.gperf: ANSIfy function declarations.
1811         * cfns.h: Regenerate.
1812         * cp-tree.h: ANSIfy function declarations.
1813
1814 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
1815
1816         * cp-tree.h (reparse_absdcl_as_expr): Remove.
1817         (reparse_absdcl_as_casts): Likewise.
1818         (reparse_decl_as_expr): Likewise.
1819         (finish_decl_parsing): Likewise.
1820         * decl2.c (reparse_absdcl_as_expr): Remove.
1821         (reparse_absdcl_as_casts): Likewise.
1822         (repase_decl_as_expr): Likewise.
1823         (finish_decl_parsing): Likewise.
1824
1825         PR c++/9128
1826         PR c++/9153
1827         PR c++/9171
1828         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
1829         function.
1830         (cp_parser_nested_name_specifier_opt): Correct the
1831         check_dependency_p false.
1832         (cp_parser_postfix_expression): Fix formatting.
1833         (cp_parser_decl_specifier_seq): Avoid looking for constructor
1834         declarators when possible.
1835         (cp_parser_template_id): Avoid performing name-lookup when
1836         possible.
1837         (cp_parser_class_head): Do not count specializations when counting
1838         levels of templates.
1839         (cp_parser_constructor_declarator_p): Return immediately if
1840         there's no chance that the tokens form a constructor declarator.
1841         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
1842         expression with reference type.
1843         (get_tinfo_decl_dynamic): Do not return an expression with
1844         reference type.
1845         (build_typeid): Add comment.  Do not return an expression with
1846         reference type.
1847         * typeck.c (build_class_member_access_expr): Improve handling of
1848         conditionals and comma-expressions as objects.
1849
1850 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
1851
1852         * cfns.gperf: ANSIfy function declarations.
1853         * cfns.h: Regenerate.
1854         * cp-tree.h: ANSIfy function declarations.
1855         * parser.c: ANSIfy function declarations & definitions.
1856
1857         * decl.c (bad_specifiers): Fix parameter order error I introduced.
1858
1859 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
1860
1861         Merge from pch-branch:
1862
1863         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
1864
1865         Merge to tag pch-merge-20030102:
1866
1867         * semantics.c (finish_translation_unit): Don't call finish_file.
1868         * parser.c: Don't include ggc.h.
1869         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
1870         read first token here.  Don't allow PCH files after the first
1871         token is read.
1872         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
1873         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
1874         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
1875         (cp_parser_late_parsing_for_member): Don't duplicate call to
1876         cp_lexer_set_source_position_from_token.
1877         (cp_parser_late_parsing_default_args): Likewise.
1878         (yyparse): Call finish_file after clearing the_parser.
1879
1880         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
1881
1882         * Make-lang.in: Remove $(GGC_H) from all dependencies.
1883         (CXX_TREE_H): Add $(GGC_H).
1884         * class.c: Don't include ggc.h.
1885         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
1886         (method_name_cmp): Likewise.
1887         (resort_data): New variable.
1888         (resort_field_decl_cmp): New.
1889         (resort_method_name_cmp): New.
1890         (resort_sorted_fields): New.
1891         (resort_type_method_vec): New.
1892         (finish_struct_methods): Delete cast.
1893         (finish_struct_1): Delete cast.
1894         * cp-tree.h: Include ggc.h.
1895         (struct lang_type_class): Add reorder attribute to field `methods'.
1896         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
1897         (resort_sorted_fields): New prototype.
1898         (resort_type_method_vec): New prototype.
1899         * call.c: Don't include ggc.h.
1900         * decl.c: Likewise.
1901         * decl2.c: Likewise.
1902         * init.c: Likewise.
1903         * lex.c: Likewise.
1904         * method.c: Likewise.
1905         * optimize.c: Likewise.
1906         * parse.y: Likewise.
1907         * pt.c: Likewise.
1908         * repo.c: Likewise.
1909         * search.c: Likewise.
1910         * semantics.c: Likewise.
1911         * spew.c: Likewise.
1912         * tree.c: Likewise.
1913
1914         * lang-specs.h: Remove comment.
1915
1916         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
1917
1918         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
1919         (operator_name_info): Mark to be saved for PCH, specify size.
1920         (assignment_operator_name_info): Likewise.
1921
1922         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
1923
1924         * decl.c (anon_cnt): Mark to be saved for PCH.
1925
1926         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
1927
1928         * lex.c  (init_reswords): Delete now-untrue comment.
1929         Allocate ridpointers using GGC.
1930
1931         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
1932
1933         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
1934
1935         * g++spec.c (lang_specific_driver): Don't include standard
1936         libraries in `added'.
1937
1938         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
1939
1940         * decl2.c (finish_file): Call c_common_write_pch.
1941         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
1942
1943         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
1944
1945         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
1946         files when using g++.
1947         * lang-specs.h: Handle compiling C++ header files.
1948
1949 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
1950
1951         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
1952
1953 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1954
1955         * pt.c (push_access_scope_real): Call push_to_top_level for
1956         function in namespace scope.
1957         (pop_access_scope): Call pop_from_top_level for function in
1958         namespace scope.
1959
1960 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
1961
1962         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
1963
1964 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
1965
1966         * Make-lang.in (c++.install-common, c++.install-man,
1967         c++.uninstall): Prepend $(DESTDIR) to destination paths in
1968         all (un)installation commands.
1969         (c++.install-common): Rewrite $(LN) commands to support
1970         DESTDIR with "ln" as well as with "ln -s".
1971
1972 2003-01-08  Jason Merrill  <jason@redhat.com>
1973
1974         * parser.c (cp_parser_primary_expression): See through explicitly
1975         scoped ALIAS_DECLs, too.
1976
1977 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
1978
1979         * decl.c: Remove some #if 0 code.
1980
1981         * decl.c: ANSIfy function declarations.
1982
1983 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
1984
1985         * parser.c (cp_parser_asm_definition): Correct handling of omitted
1986         operands.
1987
1988 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1989
1990         PR c++/9030
1991         * decl.c (make_typename_type): Check access only when tf_error.
1992         (make_unbound_class_template): Likewise.
1993         * pt.c (saved_access_scope): New variable.
1994         (push_access_scope_real): New function.
1995         (push_access_scope): Likewise.
1996         (pop_access_scope): Likewise.
1997         (tsubst_default_argument): Use them.
1998         (instantiate_template): Likewise.
1999         (regenerate_decl_from_template): Likewise.
2000         (instantiate_decl): Likewise.
2001         (get_mostly_instantiated_function_type): Likewise.
2002
2003 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
2004
2005         * tree.c: Delete bogus #if 0 code.
2006
2007 2003-01-07  Andreas Schwab  <schwab@suse.de>
2008
2009         * class.c (layout_class_type): Don't use
2010         PCC_BITFIELD_TYPE_MATTERS if not defined.
2011
2012 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
2013
2014         PR c++/9165
2015         * decl2.c (build_cleanup): Mark the object as used.
2016
2017         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
2018         (hash_local_specialization): New function.
2019         (register_local_specialization): Revert 2003-01-05 change.
2020         (instantiate_decl): Use hash_local_specialization when creating
2021         the local_specializations table.
2022
2023         * decl2.c (mark_used): Do not synthesize thunks.
2024
2025         * class.c (layout_class_type): Correct handling of unnamed
2026         bitfields wider than their types.
2027
2028         PR c++/9189
2029         * parser.c (cp_parser): Remove default_arg_types.  Update
2030         documentation for unparsed_functions_queues.
2031         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
2032         parameter.
2033         (cp_parser_new): Don't set parser->default_arg_types.
2034         (cp_parser_function_definition): Adjust usage of
2035         unparsed_funtions_queues.
2036         (cp_parser_class_specifier): Don't mess with
2037         parser->default_arg_types.  Handle default argument processing in
2038         a separate phase from function body processing.
2039         (cp_parser_template_declaration_after_export): Adjust usage of
2040         unparsed_functions_queues.
2041         (cp_parser_late_parsing_for_member): Do not handle default
2042         arguments.
2043
2044 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
2045
2046         PR c++/9109
2047         * parser.c (cp_parser_declarator_kind): New enum.
2048         (cp_parser_declarator): Adjust.
2049         (cp_parser_direct_declarator): Adjust. Allow for either named or
2050         abstract declarator. Prefer abstract, if possible. Allow
2051         parenthesized function name.
2052         (cp_parser_condition): Adjust cp_parser_declarator call.
2053         (cp_parser_explicit_instantiation): Likewise.
2054         (cp_parser_init_declarator): Likewise.
2055         (cp_parser_type_id): Likewise.
2056         (cp_parser_function_definition): Likewise.
2057         (cp_parser_member_declaration): Likewise.
2058         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
2059         the tentative parsing.
2060         (cp_parser_exception_declaration): Likewise.
2061
2062 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
2063
2064         * parser.c (cp_parser_template_parameter): Adjust call to
2065         cp_parser_parameter_declaration.
2066         (cp_parser_parameter_declaration_list): Likewise.
2067         (cp_parser_parameter_declaration): Replace
2068         greater_than_is_operator_p with template_parm_p parameter.  Do not
2069         cache tokens for template default arguments.
2070
2071         * pt.c (retrieve_local_specialization): Use htab_find, not
2072         htab_find_with_hash.
2073         (register_local_specialization): Use htab_find_slot, not
2074         htab_find_slot_with_hash.
2075         (instantiate_decl): Pass a hash function to htab_create.
2076
2077 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2078
2079         * parser.c (cp_parser_binary_expression,
2080         cp_parser_multiplicative_expression,
2081         cp_parser_additive_expression, cp_parser_shift_expression,
2082         cp_parser_relational_expression, cp_parser_equality_expression,
2083         cp_parser_and_expression, cp_parser_exclusive_or_expression,
2084         cp_parser_inclusive_or_expression,
2085         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
2086         cp_parser_binary_expression): Const-ify.
2087
2088 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
2089
2090         * method.c (use_thunk): Disable access control while building the
2091         body of the thunk.
2092
2093 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
2094
2095         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
2096         front end.
2097
2098 2003-01-03  Matt Austern  <austern@apple.com>
2099
2100         * cp-tree.h (struct lang_type_class): add field for key method
2101         (cp_global_trees): rename dynamic_classes to keyed_classes
2102         (key_method): add definition
2103         * class.c (finish_struct_1): compute class's key method, and add
2104         the class to keyed_classes list if there is no key method.
2105         * decl.c (finish_function): add class to keyed_classes list if we
2106         see a definition of the class's key method.
2107         * pt.c (instantiate_class_template): add template specialization
2108         of a dynamic class to keyed_classes list.
2109         * decl2.c (key_method): remove
2110         (finish_file): iterate only through keyed_classes list when
2111         deciding whether to emit vtables, remove class from its list after
2112         we do the emission.
2113
2114 2003-01-02  Jason Merrill  <jason@redhat.com>
2115
2116         * call.c (build_conditional_expr): Stabilize lvalues properly.
2117         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
2118         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
2119         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
2120
2121         * call.c (convert_like_real): Call decl_constant_value for an
2122         IDENTITY_CONV even if there are no more conversions.
2123
2124         * cvt.c (build_up_reference): Don't push unnamed temps.
2125
2126         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
2127
2128         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
2129         for a backend struct.
2130
2131         * except.c (wrap_cleanups_r, build_throw): Make
2132         MUST_NOT_THROW_EXPRs void.
2133         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
2134
2135         * init.c (build_vec_delete_1): Pre-evaluate the base address.
2136
2137         * init.c (get_temp_regvar): Simplify logic.
2138
2139         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
2140         our replacement is a decl.
2141
2142         * decl.c (cp_make_fname_decl): Push the decls inside the
2143         outermost scope.
2144
2145 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
2146
2147         PR c++/45, c++/3784
2148         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
2149         the same too.
2150
2151 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
2152
2153         * parser.c (struct cp_parser): Add access_checks_lists field
2154         (cp_parser_simple_declaration): Use.
2155         (cp_parser_init_declarator): Likewise.
2156
2157 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
2158
2159         * parser.c (cp_parser_declaration): Accept the __extension__
2160         keyword before the declaration.
2161
2162         PR c++/2843
2163         * parser.c (cp_parser_parameter_declaration): Allow attributes to
2164         appear after the declarator.
2165
2166         * call.c (build_new_method_call): Fix typo in message format
2167         string.
2168
2169 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
2170
2171         * parser.c (cp_lexer_next_token_is): Declare it inline.
2172         (cp_lexer_set_source_position_from_token): Likewise.
2173         (cp_lexer_debugging_p): Likewise.
2174         (cp_parser_parsing_tentatively): Likewise.
2175         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
2176         to the cp_lexer_peek_token.
2177
2178         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
2179         expression.
2180
2181 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
2182
2183         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
2184         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
2185         cp/repo.c: Fix copyright years.
2186
2187 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
2188
2189         * lex.c: Remove superfluous include of cpplib.h.
2190         (CONSTRAINT): Define without conditions.
2191         (init_cp_pragma): Use c_register_pragma.
2192
2193 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
2194
2195         * .cvsignore: Remove.
2196
2197 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2198
2199         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
2200           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
2201           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
2202           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
2203           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
2204           copyright header.
2205         * lex.h: parse.y is dead, so don't mention it.  Also replace the
2206           copyright header with the default GNU copyright header.
2207
2208 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2209
2210         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
2211         (lookup_name_namespace_only): Likewise.
2212         (begin_only_namespace_names): Likewise.
2213         (end_only_namespace_names): Likewise.
2214         * decl.c (only_namespace_names): Remove.
2215         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
2216         (lookup_name_real): Do not check only_namespace_names.
2217         (lookup_name_namespace_only): Remove.
2218         (begin_only_namespace_names): Likewise.
2219         (end_only_namespace_names): Likewise.
2220         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
2221         nested-name-specifiers more gracefully.
2222         (cp_parser_class_or_namespace_name): Avoid looking up namespace
2223         names when they cannot possibly appear.
2224         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
2225         (cp_parser_elaborated_type_specifier): Likewise.
2226         (cp_parser_namespace_name): Only look for namespace names.
2227         (cp_parser_lookup_name): Add is_namespace parameter.
2228         (cp_parser_lookup_name_simple): Adjust call to
2229         cp_parser_lookup_name.
2230
2231         * parser.c (cp_parser_dependent_type_p): Fix thinko.
2232
2233 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
2234
2235         * .cvsignore: Update.
2236
2237 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
2238
2239         * class.c (modify_vtable_entry): Remove unused variable.
2240         (get_vcall_index): Always expect a non-thunk.
2241         (update_vtable_entry_for_fn): Combine covariant adjustments, when
2242         overriding a thunk. Pass get_vcall_index a non-thunk.
2243
2244         * decl2.c (finish_file): Mark undefined inlines as extern.
2245
2246 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2247
2248         * cp-tree.def (RETURN_INIT): Remove.
2249         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
2250         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
2251         (note_level_for_for): Remove.
2252         (note_level_for_try): Likewise.
2253         (note_level_for_catch): Likewise.
2254         (finish_named_return_value): Likewise.
2255         (do_pushlevel): Change prototype.
2256         (pending_lang_change): Remove.
2257         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
2258         sk_for.
2259         (note_level_for_for): Remove.
2260         (note_level_for_try): Likewise.
2261         (note_level_for_catch): Likewise.
2262         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
2263         * parser.c (cp_parser_context_free_list): Make it "deletable".
2264         (cp_parser_template_argument): Remove misleading comment.
2265         * pt.c (tsubst_expr): Remove RETURN_INIT code.
2266         * semantics.c (genrtl_named_return_value): Remove.
2267         (do_pushlevel): Take a scope kind as an argument.
2268         (begin_if_stmt): Adjust.
2269         (begin_while_stmt): Likewise.
2270         (begin_for_stmt): Likewise.
2271         (finish_for_init_stmt): Likewise.
2272         (begin_switch_stmt): Likewise.
2273         (begin_handler): Likewise.
2274         (begin_compound_stmt): Likewise.
2275         (finish_named_return_value): Remove.
2276         (cp_expand_stmt): Remove RETURN_INIT case.
2277         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
2278
2279 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2280
2281         PR c++/9112
2282         * parser.c (cp_parser_direct_declarator): Handle erroneous
2283         parenthesized declarators correctly.
2284
2285 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2286
2287         * cp-tree.h (pending_lang_change): Declare.
2288
2289 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
2290
2291         * parser.c (cp_parser_context_free_list): New variable.
2292         (cp_parser_context_new): Use it.
2293         (cp_parser_error): Check return code from
2294         cp_parser_simulate_error.
2295         (cp_parser_simulate_error): Return a value.
2296         (cp_parser_id_expression): Optimize common case.
2297         (cp_parser_class_name): Likewise.
2298         (cp_parser_class_specifier): Adjust call to
2299         cp_parser_late_parsing_default_args.
2300         (cp_parser_lookup_name): Optimize common case.
2301         (cp_parser_late_parsing_for_member): Adjust call to
2302         cp_parser_late_parsing_default_args.
2303         (cp_parser_late_parsing_default_args): Add scope parameter.
2304         (cp_parser_require): Avoid creating the error message unless it's
2305         needed.
2306         (cp_parser_parse_definitely): Place free'd contexts on the free
2307         list.
2308
2309         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
2310
2311 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
2312
2313         * parser.c (cp_parser_parameter_declaration_clause): Treat system
2314         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
2315
2316 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
2317
2318         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
2319         GCC, not GNU CC.
2320
2321 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
2322
2323         * parse.y: Remove.
2324         * spew.c: Likewise.
2325         * Make-lang.in (gt-cp-spew.h): Remove.
2326         * cp-tree.h (do_pending_lang_change): Remove.
2327         (do_identifier): Change prototype.
2328         (finish_id_expr): Remove.
2329         * decl.c (lookup_name_real): Remove yylex variable.
2330         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
2331         * lex.c (init_cpp_parse): Remove.
2332         (reduce_cmp): Likewise.
2333         (token_cmp): Likewise.
2334         (yychar): Likewise.
2335         (lastiddecl): Likewise.
2336         (token_count): Likewise.
2337         (reduce_count): Likewise.
2338         (yyhook): Likewise.
2339         (print_parse_statistics): Likewise.
2340         (do_pending_lang_change): Likewise.
2341         (do_identifier): Remove parsing parameter.
2342         * lex.h (lastiddecl): Remove.
2343         (looking_for_typename): Remove.
2344         (looking_for_template): Likewise.
2345         (pending_lang_change): Likewise.
2346         (yylex): Likewise.
2347         * semantics.c (finish_id_expr): Remove.
2348
2349         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
2350         thread" correctly.
2351
2352 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
2353
2354         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
2355         end, not the C front end.
2356
2357 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
2358
2359         * cp-tree.h (THUNK_TARGET): New macro.
2360         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
2361         (finish_thunk): Remove offset parms.
2362         * class.c (find_final_overrider): Look through thunks.
2363         (get_vcall_index): Use THUNK_TARGET.
2364         (update_vtable_entry_for_fn): Look through thunks. Set covariant
2365         fixed offset here. Adjust finish_thunk call.
2366         (build_vtbl_initializer): Adjust finish_thunk calls.
2367         * mangle.c (mangle_call_offset): Remove superfluous if.
2368         (mangle_thunk): Adjust.
2369         * method.c (make_thunk): Adjust.
2370         (finish_thunk): Adjust.
2371         (thunk_adjust): Remove assert.
2372         (use_thunk): Use THUNK_TARGET
2373         * dump1.c (cp_dump_tree): Adjust thunk dumping.
2374
2375         PR c++/9054
2376         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
2377         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
2378
2379 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2380
2381         Remove traditional C constructs 4/n.
2382         * decl2.c (grok_method_quals, warn_if_unknown_interface,
2383         grok_x_components, cp_build_parm_decl, build_artificial_parm,
2384         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
2385         delete_sanity, check_member_template, check_java_method,
2386         check_classfn, finish_static_data_member_decl, grokfield,
2387         grokbitfield, grokoptypename, grok_function_init,
2388         cplus_decl_attributes, constructor_name, defer_fn,
2389         build_anon_union_vars, finish_anon_union, coerce_new_type,
2390         coerce_delete_type, comdat_linkage, maybe_make_one_only,
2391         key_method, import_export_vtable, import_export_class,
2392         output_vtable_inherit, import_export_decl, import_export_tinfo,
2393         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
2394         set_guard, start_objects, finish_objects,
2395         start_static_storage_duration_function,
2396         finish_static_storage_duration_function, get_priority_info,
2397         start_static_initialization_or_destruction,
2398         finish_static_initialization_or_destruction,
2399         do_static_initialization, do_static_destruction,
2400         prune_vars_needing_no_initialization, write_out_vars,
2401         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
2402         add_using_namespace, merge_functions, ambiguous_decl,
2403         lookup_using_namespace, lookup_using_namespace,
2404         qualified_lookup_using_namespace, set_decl_namespace,
2405         decl_namespace, current_decl_namespace, push_decl_namespace,
2406         pop_decl_namespace, push_scope, pop_scope, add_function,
2407         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
2408         lookup_arg_dependent, do_namespace_alias,
2409         validate_nonmember_using_decl, do_nonmember_using_decl,
2410         do_toplevel_using_decl, do_local_using_decl,
2411         do_class_using_decl, do_using_directive, check_default_args,
2412         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
2413         * parser.c (cp_parser_class_head): Use booleanss.
2414         * decl.c (walk_globals, walk_vtables): Likewise.
2415         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
2416         walk_globals): Change return type from 'int' to 'bool'.
2417         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
2418         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
2419         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
2420         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
2421         qualifier_flags, tinfo_base_init, generic_initializer,
2422         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
2423         dfs_class_hint_unmark, class_hint_flags, class_initializer,
2424         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
2425         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
2426         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
2427         * repo.c (repo_compile_flags, repo_template_declared,
2428         repo_template_defined, repo_class_defined, repo_get_id,
2429         repo_template_used, repo_vtable_used, repo_inline_used,
2430         repo_tinfo_used, repo_template_instantiated, extract_string,
2431         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
2432         finish_repo): Likewise.
2433         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
2434         cxx_print_xnode): Likewise..
2435         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
2436         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
2437         * cxxfilt.c (demangle_it, print_demangler_list, usage,
2438         standard_symbol_characters, hp_symbol_characters, main, fatal):
2439         Likewise.
2440         (strip_underscore):  Change type from 'int' to 'bool'.
2441         (main): Use boolean constants.
2442
2443 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2444
2445         Remove traditional C constructs 3/n.
2446         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2447         build_up_reference, warn_ref_binding, convert_to_reference,
2448         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
2449         convert_to_void, convert, convert_force, build_type_conversion,
2450         build_expr_type_conversion, type_promotes_to,
2451         perform_qualification_conversions): Use C90 prototyping style.
2452         * decl2.c (grok_array_decl): Use boolean constant.
2453         (delete_sanity): Likewise.
2454         * typeck.c (build_unary_op): Likewise.
2455         * semantics.c (finish_switch_cond): Likewise.
2456         * parser.c (cp_parser_direct_new_declarator): Likewise.
2457         * init.c (build_new): Likewise.
2458
2459 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
2460
2461         * Make-lang.in (po-generated): Remove parse.c.
2462         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
2463         ($(srcdir)/cp/parse.h): Remove target.
2464         ($(srcdir)/cp/parse.c): Likewise.
2465         (gt-cp-parse.h): Likewise.
2466         (gt-cp-parser.h): New target.
2467         (c++.distclean): Do not remove parse.output.
2468         (c++.maintainer-clean): Do not remove parse.c or parse.h.
2469         (cp/spew.o): Remove target.
2470         (cp/lex.o): Adjust dependencies.
2471         (cp/pt.o): Likewise.
2472         (cp/parse.o): Likewise.
2473         (cp/TAGS): Do not mention parse.c.
2474         (cp/parser.o): New target.
2475         * NEWS: Mention the new parser.
2476         * call.c (build_scoped_method_call): Simplify.
2477         (build_method_call): Likewise.
2478         (build_new_function_call): Adjust calls to add_function_candidate
2479         and add_template_candidate.
2480         (build_new_op): Improve handling of erroroneous operands.
2481         (convert_default_arg): Remove circular argument processing.
2482         (name_as_c_string): New function.
2483         (build_new_method_call): Use it.
2484         (perform_implicit_conversion): Use error_operand_p.
2485         * class.c (finish_struct_anon): Use constructor_name_p.
2486         (check_field_decls): Likewise.
2487         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
2488         (resolve_address_of_overloaded_function): Likewise.
2489         (instantiate_type): Tweak pointer-to-member handling.
2490         (get_primary_binfo): Remove incorrect assertion.
2491         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
2492         * cp-tree.h (DEFARG_TOKENS): New macro.
2493         (default_arg): New structure.
2494         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
2495         (lang_tree_node): Add default_arg.
2496         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
2497         (type_info_ref_type): New macro.
2498         (saved_scope): Make processing_explicit_instantiation a boolean.
2499         (check_access): New field.
2500         (unparsed_text): Remove.
2501         (language_function): Remove unparsed_inlines.
2502         (error_operand_p): New macro.
2503         (lang_decl): Adjust pending_inline_info.
2504         (DEFARG_POINTER): Remove.
2505         (tag_types): Add typenames.
2506         (lookup_ualified_name): Declare.
2507         (lookup_name_real): Likewise.
2508         (shadow_tag): Adjust prototype.
2509         (get_scope_of_declarator): Declare it.
2510         (process_next_inline): Remove it.
2511         (check_for_missing_semicolon): Likewise.
2512         (maybe_get_template_decl_from_type_decl): Declare it.
2513         (finish_label_stmt): Adjust prototype.
2514         (finish_non_static_data_meber): Declare it.
2515         (finish_pseudo_destructor_call_expr): Rename to ...
2516         (finish_pseudo_destructor_expr): ... this.
2517         (finish_compound_literal): Declare it.
2518         (begin_inline_definitions): Remove it.
2519         (init_spew): Remove.
2520         (peekyylex): Likewise.
2521         (arbitrate_lookup): Likewise.
2522         (frob_opname): Likewise.
2523         (maybe_snarf_defarg): Likewise.
2524         (add_defarg_fn): Likewise.
2525         (do_pending_defargs): Likewise.
2526         (done_pending_defargs): Likewise.
2527         (unprocessed_defarg_fn): Likewise.
2528         (replace_defarg): Likewise.
2529         (end_input): Likewise.
2530         (get_overloaded_fn): Likewise.
2531         * cvt.c (convert_to_reference): Improve error handling.
2532         * decl.c (lookup_name_real): Do not declare it static.
2533         (maybe_push_to_top_level): Set check_access.
2534         (identifier_type_value): Adjust call to lookup_name_real.
2535         (lookup_qualified_name): New method.
2536         (lookup_name_real): Remove special-case parsing code.
2537         (lookup_name-nonclass): Adjust call to lookup_name_real.
2538         (lookup_name_namespace_only): Likewise.
2539         (lookup_name): Likewise.
2540         (check_tag_decl): Return the type declared.
2541         (shadow_tag): Likewise.
2542         (register_dtor_fn): Tweak check_access.
2543         (grokfndecl): Use constructor_name_p.
2544         (get_scope_of_declarator): New function.
2545         (grokdeclarator): Obscure tweaks for slightly different declarator
2546         representations.
2547         (start_method): Return error_mark_node to indicate failure.
2548         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
2549         * decl2.c (constructor_name_full): Simplify.
2550         (constructor_name): Use it.
2551         (build_expr_from_tree): Adjust for changes to do new parser.
2552         (push_scope): Improve robustness.
2553         (validate_nonmember_using_decl): Process declarations, not names.
2554         (do_class_using_decl): Likewise.
2555         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
2556         here.
2557         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
2558         * expr.c (cxx_expand_expr): Handle BASELINKs.
2559         * init.c (member_init_ok_or_else): Issue more errors.
2560         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
2561         * lex.c: Do not include parse.h.
2562         (yypring): Do not declare.
2563         (yylval): Likewise.
2564         (make_reference_declarator): Remove error-generating code.
2565         (rid_to_yy): Remove.
2566         (cxx_init): Do not call init_spew.
2567         (yypring): Remove.
2568         (check_for_missing_semicolon): Remove.
2569         * lex.h (got_scope): Remove.
2570         (got_object): Remove.
2571         * method.c (hack_identifier): Use finish_non_static_data_member.
2572         (implicitly_declare_fn): Adjust use of constructor_name.
2573         * parser.c: New file.
2574         * pt.c (parse.h): Do not include it.
2575         (maybe_get_template_decl_from_template): Do not declare it.
2576         (finish_member_template_decl): Tweak.
2577         (begin_explicit_instantiation): Adjust for
2578         processing_explicit_instantiation being boolean.
2579         (end_explicit_instantiation): Likewise.
2580         (maybe_process_partial_specialization): Tighten specialization
2581         test.
2582         (retrieve_local_specialization): Adjust ue of hash table.
2583         (eq_local_specializations): New function.
2584         (register_local_specialization): Likewise.
2585         (push_template_decl_real): Remove unnecessary test.
2586         (maybe_get_template_decl_from_type_decl): Don't make it static.
2587         (for_each_template_parm_r): Handle TYPEOF_TYPE.
2588         (tsubst_copy): Use retrieive_local_specialization to handle
2589         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
2590         Handle COMPONENT_REFs with pseudo-destructor-expressions.
2591         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
2592         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
2593         (unify): Tweak handling of CONST_DECLs.
2594         (regenerate_decl_from_template): Use push_nested_class.
2595         (template_for_substitution): New funciton.
2596         (instantiate_decl): Use it.  Register parameters as local
2597         specializations.
2598         * rtti.c (init_rtti_processing): Set type_info_ref_type.
2599         (build_typeid): Use it.
2600         (get_typeid): Likeise.
2601         * search.c (accessible_p): Use check_access, not
2602         flag_access_control.
2603         (adjust_result_of_qualified_name_lookup): Pay attention to the
2604         context_class.
2605         * semantics.c (finish_asm_stmt): Adjust error handling.
2606         (finish_label_stmt): Return the statement.
2607         (finish_non_static_data_member): New function.
2608         (finish_class_expr): Handle BASELINKs.
2609         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
2610         (finish_object_call_expr): Simplify handling during templates.
2611         (finish_pseudo_destructor_call_expr): Rename to ...
2612         (finish_pseudo_dtor_expr): ... this.
2613         (finish_compound_literal): New function.
2614         (begin_inline_definitions): Remove.
2615         (finish_sizeof): Remove special template handling.
2616         * spew.c: Do not include parse.h.
2617         * tree.c (get_overloaded_fn): Remove.
2618         * typeck.c (build_class_member_access_expr): Handle
2619         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
2620         (lookup_destructor): New function.
2621         (finish_class_member_access_expr): Use it.
2622         (convert_arguments): Simplify.
2623         (build_unary_op): Handle BASELINKs.
2624
2625 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
2626
2627         PR c++/4803
2628         * decl2.c (mark_used): Defer inline functions.
2629         (finish_file): Merge deferred_fns loops. Check all used
2630         inline functions have a definition.
2631         * method.c (make_thunk): Thunks are not inline.
2632
2633         PR c++/5116, c++/764
2634         * call.c (build_new_op): Make sure template class operands are
2635         instantiated.
2636
2637 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
2638
2639         PR C++/7964
2640         * cp-tree.h (resolve_scoped_fn_name): Prototype.
2641         * call.c (resolve_scoped_fn_name): New function. Deal with
2642         more template expansion. Broken out of ...
2643         * parse.y (parse_finish_call_expr): ... here. Call it.
2644         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
2645         resolve_scoped_fn_name and build_call_from_tree.
2646
2647         PR c++/9053
2648         * decl.c (duplicate_decls): Templates may be disambiguated by
2649         return type.
2650
2651         PR c++/8702
2652         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
2653         conversion operators on failure.
2654
2655 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2656
2657         Remove traditional C constructs 2/n.
2658         * call.c (tourney, build_field_call, equal_functions, joust,
2659         compare_ics, build_over_call, build_java_interface_fn_ref,
2660         convert_like_real, op_error, build_object_call, resolve_args,
2661         build_vfield_ref, check_dtor_name, build_scoped_method_call,
2662         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
2663         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
2664         standard_conversion, reference_related_p,
2665         reference_compatible_p, convert_class_to_reference,
2666         direct_reference_binding, reference_binding,
2667         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
2668         add_template_conv_candidate, any_viable, any_strictly_viable,
2669         build_this, splice_viable, print_z_candidates,
2670         build_user_type_conversion, build_new_function_call,
2671         conditional_conversion, build_conditional_expr, build_new_op,
2672         build_op_delete_call, enforce_access, call_builtin_trap,
2673         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
2674         convert_default_arg, type_passed_as, convert_for_arg_passing,
2675         in_charge_arg_for_name, is_properly_derived_from,
2676         maybe_handle_implicit_object, maybe_handle_ref_bind,
2677         source_type, add_warning, can_convert, can_convert_arg,
2678         perform_implicit_conversion, can_convert_arg_bad,
2679         initialize_reference, add_conv_candidate,
2680         add_template_candidate_real, add_template_candidate): Ansify.
2681
2682 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
2683
2684         PR c++/8572
2685         * cp-tree.h (grokoptypename): Add SCOPE parameter.
2686         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
2687         if in a template scope.
2688         * parse.y (unoperator): Return the scope.
2689         (operator_name): Adjust grokoptypename call.
2690
2691 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2692
2693         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
2694         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
2695         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
2696
2697 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
2698
2699         * ChangeLog: Fix a typo.
2700         * class.c: Fix comment typos.
2701         * cp-tree.h: Likewise.
2702
2703 2002-12-18  Jason Merrill  <jason@redhat.com>
2704
2705         Handle anonymous unions at the tree level.
2706         C++ ABI change: Mangle anonymous unions using the name of their
2707         first named field (by depth-first search).  Should not cause
2708         binary compatibility problems, though, as the compiler previously
2709         didn't emit anything for affected unions.
2710         * cp-tree.def (ALIAS_DECL): New tree code.
2711         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
2712         first field, not the largest.
2713         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
2714         push the decl, and write it out at namespace scope.
2715         * decl.c (lookup_name_real): See through an ALIAS_DECL.
2716         (pushdecl): Add namespace bindings for ALIAS_DECLs.
2717         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
2718         of a decl which doesn't have one.
2719         * typeck.c (build_class_member_access_expr): Don't recurse if
2720         we already have the type we want.
2721
2722 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2723
2724         PR c++/8099
2725         * friend.c (make_friend_class): Allow partial specialization
2726         when declaration is not a template friend.
2727
2728 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2729
2730         PR c++/3663
2731         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
2732         TREE_PROTECTED to created decl nodes.
2733
2734 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
2735
2736         * class.c (build_base_field): Do not set DECL_PACKED on the
2737         FIELD_DECL.
2738
2739 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2740
2741         * cp-tree.h (struct tree_srcloc): Use location_t.
2742         (SOURCE_LOCUS): New.
2743         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
2744
2745 2002-12-17  Jason Merrill  <jason@redhat.com>
2746
2747         * decl.c (finish_function): Also complain about no return in
2748         templates.
2749         * semantics.c (finish_return_stmt): Also call check_return_expr in
2750         templates.
2751         * typeck.c (check_return_expr): In a template, just remember that we
2752         saw a return.
2753
2754 2002-12-16  Jason Merrill  <jason@redhat.com>
2755
2756         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
2757         of the CALL_EXPR.
2758
2759         * semantics.c (do_pushlevel): Call pushlevel after adding the
2760         SCOPE_STMT.
2761         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
2762         * parse.y (function_body): Go back to using compstmt.
2763         * decl.c (pushdecl): Skip another level to get to the parms level.
2764
2765         * call.c (build_new_method_call): Use is_dummy_object to determine
2766         whether or not to evaluate the object parameter to a static member
2767         function.
2768
2769 2002-12-14  Jason Merrill  <jason@redhat.com>
2770
2771         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
2772         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
2773         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
2774         don't bother with an AGGR_INIT_EXPR.
2775         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
2776         just generate a new decl normally.  Take return slot parm.
2777         * cp-tree.h: Adjust prototype.
2778
2779 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2780
2781         PR C++/8031
2782         * cvt.c (convert_to_pointer_force): Don't try comparing against
2783         erronous type.
2784
2785 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
2786
2787         * cp-tree.h: Have the multiple-include guards around
2788         the entire file.
2789
2790 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
2791
2792         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
2793         for SPEW_DEBUG.
2794         (snarf_method): Same.
2795         (snarf_defarg): Same.
2796
2797 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
2798
2799         PR c++/8372
2800         * pt.c (tsubst_copy): Handle destructor names more correctly.
2801
2802 2002-12-10  Matt Austern   <austern@apple.com>
2803
2804         * cp-tree.h: get rid of needs_virtual_reinit bit.
2805
2806 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
2807
2808         * NEWS: Document removal of in-class initialization extension for
2809         static data members of non-arithmetic, non-enumeration type.
2810         * decl.c (check_static_variable_definition): Do not allow that
2811         extension.
2812         * decl2.c (grokfield): Do not call digest_init when processing
2813         templates.
2814
2815 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2816
2817         * error.c (dump_expr): Fix format specifier warning.
2818
2819 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
2820
2821         * class.c (finish_struct_1): Correct comment.
2822         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
2823
2824 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2825
2826         PR C++/8799
2827         * error.c (dump_expr): Don't ever try to dump a non-existent
2828         expression.
2829
2830 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
2831
2832         Implement covariant returns.
2833         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
2834         (struct lang_decl_flags): Add this_thunk_p flag.
2835         Rename vcall_offset to virtual_offset.
2836         (struct lang_decl): Rename delta to fixed_offset.
2837         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
2838         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
2839         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
2840         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
2841         (make_thunk): Add this_adjusting arg.
2842         (finish_thunk): Declare.
2843         (mangle_thunk): Add this_adjusting arg.
2844         * class.c (get_vcall_index): Use base function for lookup.
2845         (update_vtable_entry_for_fn): Generate covariant thunk.
2846         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
2847         (build_vtbl_initializer): Use base function for lookup.
2848         Finish covariant thunk here. Adjust thunk generation.
2849         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
2850         Adjust thunk dumping.
2851         * mangle.c (mangle_call_offset): New function.
2852         (mangle_thunk): Adjust for covariant thunks.
2853         * method.c (make_thunk): Adjust. Do not set name here.
2854         (finish_thunk): New function. Set name here.
2855         (use_thunk): Generate covariant thunks too.
2856         (thunk_adjust): New function.
2857         * search.c (covariant_return_p): Remove. Fold into ...
2858         (check_final_overrider): ... here. Simplify.
2859         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
2860
2861 2002-12-03  Jason Merrill  <jason@redhat.com>
2862
2863         PR c++/8674
2864         * call.c (build_over_call): Check specifically for TARGET_EXPR
2865         when eliding.
2866
2867         PR c++/8461, c++/8625
2868         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
2869         (cp_convert_parm_for_inlining): Remove.
2870         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
2871         Remove.
2872         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
2873         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
2874
2875         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
2876         an ambiguous conversion.
2877
2878 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
2879
2880         PR c++/8688
2881         * decl.c (reshape_init): Handle erroneous initializers.
2882
2883 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
2884
2885         PR c++/8720
2886         * spew.c (remove_last_token): Make sure that last_chunk is set
2887         correctly.
2888
2889         PR c++/8615
2890         * error.c (dump_expr): Handle character constants with
2891         TREE_OVERFLOW set.
2892
2893 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2894
2895         DR 180
2896         * decl.c (grokdeclarator): Require class-key for all friend class.
2897         Output the correct type and context in the error message.
2898
2899 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
2900
2901         PR c++/5919
2902         * pt.c (unify): Use variably_modified_type_p to test validity of
2903         template argument types.
2904
2905         PR c++/8727
2906         * cp-tree.h (lang_type_class): Add typeinfo_var.
2907         (CLASSTYPE_TYPEINFO_VAR): New macro.
2908         * rtti.c (get_tinfo_decl): Use it.
2909
2910         PR c++/8663
2911         * init.c (expand_member_init): Always get the main variant of a
2912         base class.
2913
2914 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
2915
2916         PR c++/8332
2917         PR c++/8493
2918         * decl.c (cxx_init_decl_processing): Use size_type_node, not
2919         c_size_type_node.
2920         * decl2.c (coerce_new_type): Likewise.
2921         * except.c (do_allocate_exception): Likewise.
2922
2923 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
2924
2925         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
2926         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
2927         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
2928         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
2929         typeck2.c: Include coretypes.h and tm.h.
2930         * Make-lang.in: Update dependencies.
2931
2932 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
2933
2934         PR c++/8227
2935         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
2936         (check_initializer): Validate the type of the initialized
2937         variable, even if the initializer is absent.
2938         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
2939
2940         PR c++/8214
2941         * typeck.c (convert_for_assignment): Do not use
2942         decl_constant_value on the operand.
2943
2944         PR c++/8511
2945         * pt.c (instantiate_decl): Handle template friends defined outside
2946         of the class correctly.
2947
2948 2002-11-29  Joe Buck <jbuck@synopsys.com>
2949
2950         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
2951         anonymous structs.
2952
2953 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
2954
2955         * class.c (walk_subobject_offsets): Recur on binfos as well as on
2956         types.
2957         (layout_nonempty_base_or_field): Pass it a binfo when processing a
2958         base class.
2959         (layout_empty_base): Likewise.
2960         (build_base_field): Likewise.
2961
2962 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
2963
2964         * class.c (build_base_field): Make sure we get the canonical base
2965         when descending through primary bases.
2966
2967 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
2968
2969         * decl.c (check_initializer): Don't error on initialisation of
2970         a scalar with a brace-enclosed expression.
2971
2972 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
2973
2974         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
2975         (template_parms_equal): Remove prototype.
2976         * typeck.c (buuld_indirect_ref): Reformat.
2977
2978 2002-11-25  Jason Merrill  <jason@redhat.com>
2979
2980         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
2981         and a DO_STMT.
2982
2983 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
2984
2985         * tree.c (cp_build_qualified_type_real): Correct handling of
2986         array types.
2987         * class.c (walk_subobject_offsets): Fix thinko.
2988         (build_base_field): Record offsets of empty bases in primary
2989         virtual bases.
2990         (layout_class_type): Record offsets of empty bases in fields.
2991
2992         * search.c (is_subobject_of_p_1): Fix thinko.
2993         (lookup_field_queue_p): Likewise.
2994
2995 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
2996
2997         * class.c (layout_class_type): Reuse tail padding when laying out
2998         virtual bases.
2999
3000 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
3001
3002         * rtti.c (qualifier_flags): Fix thinko.
3003
3004 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3005
3006         Remove traditional C constructs 1/n.
3007         * cp-tree.h (init_method, set_mangled_name_for_decl,
3008         build_opfncall, hack_identifier, make_thunk, use_thunk,
3009         synthesize_method, implicitly_declare_fn,
3010         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
3011         maybe_clone_body): Remove use of PARAMS.
3012
3013         * method.c (do_build_assign_ref, do_build_copy_constructor,
3014         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
3015         Likewise.
3016         (synthesize_method): Use 'bool' type and constants instead of
3017         'int'.
3018         (locate_copy): Likewise.
3019         (implicitly_declare_fn): Likewise.
3020
3021         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
3022         Remove old-style declaration.
3023         (maybe_clone_body): Use 'bool' type and constants.
3024
3025 2002-11-21  Glen Nakamura  <glen@imodulo.com>
3026
3027         PR c++/8342
3028         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
3029         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
3030         of the branches of a COND_EXPR.
3031
3032 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
3033
3034         * pt.c (for_each_template_parm): Free allocated memory.
3035         * search.c (is_subobject_of_p_1): New function.
3036         (is_subobject_of_p): Avoid walking virtual bases multiple times.
3037
3038 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
3039
3040         * g++spec.c (lang_specific_spec_functions): New.
3041
3042 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
3043
3044         * ChangeLog: Follow spelling conventions.
3045         * class.c: Likewise.
3046         * decl2.c: Likewise.
3047
3048 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
3049
3050         * search.c (dfs_push_decls): Do not try to reorder elements
3051         3..n of method_vec if method_vec has only two elements.
3052         Reverse order of two tests to avoid accessing unallocated
3053         memory.
3054
3055 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
3056
3057         * class.c (dfs_find_final_overrider): Adjust so that the most
3058         derived object is a binfo, rather than a class type.
3059         (find_final_overrider): Likewise.
3060         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
3061         (add_vcall_offset): Likewise.
3062
3063 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3064
3065         PR c++/8389
3066         * pt.c (instantiate_template): Push class scope for member
3067         functions.
3068         (get_mostly_instantiated_function_type): Likewise.  Don't call
3069         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
3070         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
3071         * mangle.c (write_encoding, write_unqualified_name): Adjust.
3072
3073 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
3074
3075         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
3076         vcall offfsets.  Split out ...
3077         (add_vcall_offset): ... new function.
3078
3079         PR c++/8338
3080         * pt.c (for_each_template_parm): Add htab parameter.
3081         (process_partial_specialization): Adjust call.
3082         (push_template_decl_real): Likewise.
3083         (pair_fn_data): Add visited.
3084         (for_each_template_parm_r): Avoid walking duplicates more than
3085         once.
3086         (uses_template_parms): Adjust call to for_each_template_parm.
3087
3088 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
3089
3090         * class.c (add_implicitly_declared_members): Put implicitly
3091         declared functions at the end of TYPE_METHODs when -fabi-version
3092         is at least 2.
3093
3094 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
3095
3096         * decl2.c (finish_file): Correct spelling.
3097
3098 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
3099
3100         * call.c (build_special_member_call): Do not try to lookup VTTs by
3101         name.
3102         * class.c (vtbl_init_data): Add generate_vcall_entries.
3103         (get_vtable_decl): Do not look up virtual tables by name.
3104         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
3105         (set_primary_base): Do not set CLASSTYPE_RTTI.
3106         (determine_primary_base): Likewise.
3107         (get_matching_virtual): Remove.
3108         (get_vcall_index): New function.
3109         (update_vtable_entry_for_fn): Do not try to use virtual thunks
3110         when they are not required.  Assign vcall indices at this point.
3111         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
3112         Do update dynamic_classes.
3113         (build_vtt): Do not add VTTs to the symbol table.
3114         (build_ctor_vtbl_group): Likewise.
3115         (build_vtbl_initializer): Simplify handling of vcall indices.
3116         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
3117         for the most derived class.
3118         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
3119         the vtable.
3120         * cp-tree.h (dynamic_classes): New macro.
3121         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
3122         (CLASSTYPE_RTTI): Remove.
3123         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
3124         (CLASSTYPE_VCALL_INDICES): New macro.
3125         (CLASSTYPE_VTABLES): Likewise.
3126         (BV_USE_VCALL_INDEX_P): Remove.
3127         (build_vtable_path): Remove.
3128         * decl2.c (finish_vtable_vardecl): Remove.
3129         (key_method): Remove #if 0'd code.
3130         (finish_vtable_vardecl): Rename to ...
3131         (maybe_emit_vtables): ... this.
3132         (finish_file): Use it.
3133         * search.c (look_for_overrides_here): Update comment.
3134
3135 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
3136
3137         PR c/7353 redux
3138         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
3139
3140 2002-10-30  Jason Merrill  <jason@redhat.com>
3141
3142         PR c++/8186
3143         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
3144         * call.c (convert_for_arg_passing): Set it.
3145         * except.c (stabilize_throw_expr): Recurse for such an arg.
3146
3147 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
3148
3149         * cp-tree.h (lang_decl_flags): Remove init_priority.
3150         (lang_decl): Add delta.
3151         (GLOBAL_INIT_PRIORITY): Remove.
3152         (THUNK_DELTA): Revise definition.
3153         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
3154         * dump.c (cp_dump_tree): Don't dump it.
3155
3156 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
3157
3158         PR c++/8160
3159         * typeck2.c (process_init_constructor): Call complete_array_type.
3160
3161         PR c++/8149
3162         * decl.c (make_typename_type): Issue errors about invalid results.
3163
3164 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3165
3166         Core issue 287, PR c++/7639
3167         * cp-tree.h (lang_type_class): Add decl_list field.
3168         (CLASSTYPE_DECL_LIST): New macro.
3169         (maybe_add_class_template_decl_list): Add declaration.
3170         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
3171         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
3172         (maybe_add_class_template_decl_list): New function.
3173         (add_implicitly_declared_members): Use it.
3174         * decl.c (maybe_process_template_type_declaration): Likewise.
3175         (pushtag): Likewise.
3176         * friend.c (add_friend): Likewise.
3177         (make_friend_class): Likewise.
3178         * semantics.c (finish_member_declaration): Likewise.
3179         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
3180         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
3181         to process members and friends in the order of declaration.
3182
3183 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
3184
3185         PR c++/8287
3186         * decl.c (finish_destructor_body): Create the label to jump to
3187         when returning from a destructor here.
3188         (finish_function_body): Rather than here.
3189
3190 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
3191
3192         PR c++/7266
3193         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
3194         SCOPE_REF is not null before dereferencing it.
3195
3196 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
3197
3198         * call.c (build_over_call): Use DECL_CONTEXT, not
3199         DECL_VIRTUAL_CONTEXT.
3200         * class.c (modify_vtable_entry): Don't mess with
3201         DECL_VIRTUAL_CONTEXT.
3202         (set_vindex): Remove.
3203         (set_primary_base): Remove vfuns_p parameter.
3204         (determine_primary_base): Likewise.
3205         (modify_all_vtables): Likewise.
3206         (layout_class_type): Likewise.  Adjust calls to other functions
3207         accordingly.
3208         (finish_struct_1): Adjust calls to modified functions.  Set
3209         DECL_VINDEX here.
3210         * cp-tree.h (lang_type_class): Remove vsize.
3211         (CLASSTYPE_VSIZE): Remove.
3212         (lang_decl): Remove thunks.
3213         (DECL_THUNKS): Adjust.
3214         (DECL_VIRTUAL_CONTEXT): Remove.
3215         (duplicate_decls): Don't copy it.
3216         * pt.c (build_template_decl): Don't set it.
3217         (tsubst_decl): Likewise.
3218         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
3219
3220         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
3221         (build_vtable_entry): Remove.
3222         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
3223         (lang_decl): Add thunks.
3224         (DECL_THUNKS): New macro.
3225         * decl.c (duplicate_decls): Copy it.
3226         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
3227         * semantics.c (emit_associated_thunks): Simplify.
3228
3229 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
3230
3231         PR c++/7228
3232         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
3233         lang_type structure exists before accessing field.
3234         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
3235         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
3236         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
3237         * class.c (check_field_decls): Use new macros.
3238         * typeck2.c (process_init_constructor): Remove redundant check for
3239         existence of lang_type structure.
3240
3241 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
3242
3243         * class.c (end_of_base): New method.
3244         (end_of_class): Use it.  Check indirect virtual bases.
3245
3246         * class.c (check_field_decls): Fix typo.
3247
3248 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
3249
3250         PR c++/8067
3251         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
3252         related variables.
3253
3254         PR c++/7679
3255         * spew.c (next_token): Do not return an endless stream of
3256         END_OF_SAVED_INPUT tokens.
3257         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
3258         the cached token stream.
3259         (snarf_defarg): Likewise.
3260
3261 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
3262
3263         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
3264         variably_modified_type_p.
3265         * cp-tree.h: Remove prototype of variably_modified_type_p.
3266         * tree.c (variably_modified_type_p): Remove; now implemented
3267         in language-independent code.
3268
3269 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
3270
3271         PR c++/6579
3272         * spew.c (snarf_parenthesized_expression): New function.
3273         (snarf_block): Use it.
3274
3275 2002-10-22  Richard Henderson  <rth@redhat.com>
3276
3277         * method.c (use_thunk): Always compute vcall_value; assert that
3278         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
3279         for vcall thunks as well.
3280
3281 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
3282
3283         * class.c (empty_base_at_nonzero_offset_p): New function.
3284         (layout_nonempty_base_or_field): Do not check for conflicts when
3285         laying out a virtual base using the GCC 3.2 ABI.
3286         (build_base_field): Correct checking for presence of empty classes
3287         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
3288
3289         * class.c (include_empty_classes): Use normalize_rli.
3290         (layout_class_type): Likewise.
3291
3292         * decl.c (reshape_init): Tweak handling of character arrays.
3293
3294         PR c++/8218
3295         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
3296         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
3297         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
3298         (check_field_decls): Likewise.
3299         (layout_class_type): Likewise.
3300         (finish_struct_1): Initialize it.
3301         (walk_subobject_offsets): Use it to prune searches.
3302
3303 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
3304
3305         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
3306         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
3307         TARGET_ASM_OUTPUT_MI_THUNK in comments.
3308
3309 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
3310
3311         * decl.c (start_decl): Point users of the old initialized-
3312         typedef extension at __typeof__.
3313
3314 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3315
3316         * Make-lang.in (method.o): Depend on TARGET_H.
3317         * method.c (target.h): Include it.
3318         (use_thunk): Use target hooks.  Use vcall thunks, if available.
3319
3320 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3321
3322         * class.c (base_derived_from): Make sure return value is a bool.
3323
3324 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3325
3326         * class.c (find_final_overrider_data_s): Remove overriding_fn and
3327         overriding_base.
3328         (dfs_base_derived_from): New function.
3329         (base_derived_from): Likewise.
3330         (dfs_find_final_overrider): Use base_derived_from.
3331         (find_final_overrider): Adjust.
3332
3333 2002-10-18  Jason Merrill  <jason@redhat.com>
3334
3335         PR c++/8080
3336         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
3337         with condition decls in a template.
3338
3339 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
3340
3341         * class.c (add_method): Compare template parms too.
3342
3343 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
3344
3345         PR c++/7584
3346         * class.c (handle_using_decl): Allow the declaration used to be
3347         from an ambiguous base.
3348
3349         * pt.c (convert_template_argument): Revert this change:
3350                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3351                 * pt.c (convert_template_argument): Do not fold non-type
3352                 template rguments when inside a template.
3353
3354         * init.c (expand_default_init): Handle brace-enclosed initializers
3355         correctly.
3356
3357 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3358
3359         * mangle.c (write_expression): Correct handling of enumeration
3360         constants.
3361         (write_template_arg): Likewise.
3362         * pt.c (convert_template_argument): Do not fold non-type template
3363         arguments when inside a template.
3364
3365         PR c++/7478
3366         * cvt.c (convert_to_reference): Allow references as the incoming
3367         type.
3368
3369 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3370
3371         PR c++/7524
3372         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
3373         build_qualified_type.
3374
3375 2002-10-15  Richard Henderson  <rth@redhat.com>
3376
3377         * error.c (dump_expr): Use real_to_decimal directly, and with
3378         the new arguments.
3379
3380 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
3381
3382         * decl.c (reshape_init): Fix typo.
3383
3384         * cp-tree.h (operator_name_info_t): Add arity.
3385         * lex.c (init_operators): Initialize it.
3386         * mangle.c (write_conversion_operator_name): New function.
3387         (write_unqualified_name): Use it.
3388         (write_template_args): Accept template arguments as a TREE_LIST.
3389         (write_expression): Adjust handling of qualified names to match
3390         specification.
3391
3392 2002-10-15  Jason Merrill  <jason@redhat.com>
3393
3394         * call.c (call_builtin_trap): New fn.
3395         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
3396         (build_call): Don't set current_function_returns_abnormally outside
3397         a function.
3398
3399 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
3400
3401         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
3402         clear CLASSTYPE_EMPTY_P.
3403         (build_base_field): Likewise.
3404         (build_base_fields): Likewise.
3405         (check_bases_and_members): Likewise.
3406         (create_vtbl_ptr): Likewise.
3407         (layout_class_type): Likewise.  Ensure that empty classes have
3408         size zero when used as base classes in the 3.2 ABI.
3409         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
3410         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
3411         parameter.
3412         (is_empty_class): Correct definition when using post-3.2 ABI.
3413         * cp-tree.h (lang_type_class): Add empty_p.
3414         (CLASSTYPE_EMPTY_P): New macro.
3415
3416 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
3417
3418         * init.c (build_delete): Do not apply save_expr for arrays.
3419         (build_vec_delete): Likewise.
3420
3421 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
3422
3423         * decl.c (layout_var_decl): Call layout_decl even for variables
3424         whose type is an array with unspecified bounds.
3425
3426         PR c++/7176
3427         * lex.c (do_identifier): Add another option for the parsing
3428         parameter.
3429         * parse.y (do_id): Use it.
3430
3431 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3432
3433         PRs C++/6803, C++/7721 and C++/7803
3434         * decl.c (grokdeclarator): Gracefully handle template-name as
3435         decl-specifier.
3436
3437 2002-10-11  Jason Molenda  <jmolenda@apple.com>
3438
3439         * init.c (build_field_list): Provide uses_unions_p with a default
3440         value.
3441
3442 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
3443
3444         PR c++/5661
3445         * cp-tree.h (variably_modified_type_p): New function.
3446         (grokdeclarator) Tighten check for variably modified types as
3447         fields.
3448         * pt.c (convert_template_argument): Do not allow variably modified
3449         types as template arguments.
3450         * tree.c (variably_modified_type_p): New function.
3451
3452         * NEWS: Document removal of "new X = ..." extension.
3453         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
3454         brace-enclosed initializers.
3455         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
3456         (initialize_local_var): Remove declaration.
3457         (expand_static_init): Likewise.
3458         * decl.c (next_initializable_field): New function.
3459         (reshape_init): Likewise.
3460         (check_initializer): Use them.  Build dynamic initializer for
3461         aggregates here too.
3462         (initialize_local_var): Simplify, and incorporate cleanup
3463         insertion code as well.
3464         (destroy_local_var): Remove.
3465         (cp_finish_decl): Tidy.
3466         (expand_static_init): Fold checks for whether or not a variable
3467         needs initialization into this function.  Simplify.
3468         * decl2.c (do_static_initialization): Simplify.
3469         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
3470         be done for us automatically.
3471         (expand_default_init): Handle brace-enclosed initializers
3472         correctly.
3473         (expand_aggr_init_1): Remove RTL-generation code.
3474         (build_vec_init): Remove "new X = ..." support.
3475         * parse.y (new_initializer): Likewise.
3476         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
3477         brace-enclosed initializer.
3478         (create_pseudo_type_info): Likewise.
3479         * typeck2.c (store_init_value): Don't try to handle digest_init
3480         being called more than once.
3481         (digest_init): Tidy handling of brace-enclosed initializers.
3482
3483 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3484
3485         * decl.c (typename_hash): Use htab_hash_pointer.
3486
3487 2002-10-10  Jim Wilson  <wilson@redhat.com>
3488
3489         * decl.c (duplicate_decls): Don't call decl_attributes.
3490
3491 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
3492
3493         PR c/7353
3494         * decl.c (start_decl): Unconditionally issue error for
3495         'typedef foo = bar'.
3496         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
3497         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
3498
3499 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3500
3501         * decl2.c (prune_vtable_vardecl): Delete unused function.
3502
3503 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3504
3505         PR c++/7754
3506         * decl2.c (finish_anon_union): Do not expand anonymous unions when
3507         procesing template functions.
3508         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
3509         type. Call layout_decl.
3510         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
3511
3512 2002-10-07  Richard Henderson  <rth@redhat.com>
3513
3514         * decl2.c, pt.c: Revert c++/7754 fix.
3515
3516 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3517
3518         PR c++/7804
3519         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
3520
3521 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3522
3523         PR c++/7931
3524         * pt.c (for_each_template_parm_r): Handle BASELINKs.
3525
3526         PR c++/7754
3527         * decl2.c (finish_anon_union): Do not expand anonymous unions when
3528         procesing template functions.
3529         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
3530         type. Call layout_decl.
3531         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
3532
3533 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3534
3535         PR c++/8006
3536         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
3537         template parameters.
3538         (globals): Add entity and need_abi_warning.
3539         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
3540         CLASSTYPE_TEMPLATE_INFO.
3541         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
3542         TYPE_TI_TEMPLATE.
3543         (write_prefix): Handle typename types correctly.
3544         (write_template_prefix): Handle template template parameters
3545         correctly.
3546         (start_mangling): Add entity parameter.
3547         (finish_mangling): Warn about names whose mangling will change.
3548         (mangle_decl_string): Adjust.
3549         (mangle_type_string): Likewise.
3550         (mangle_special_for_type): Likewise.
3551         (mangle_ctor_vtbl_for_type): Likewise.
3552         (mangle_thunk): Likewise.
3553         (mangle_guard_variable): Likewise.
3554         (mangle_ref_init_variable): Likewise.
3555
3556 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
3557
3558         PR c++/7188.
3559         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
3560         * cp-tree.h (emit_base_init): Rename to ....
3561         (emit_mem_initializers): ... this.
3562         (expand_member_init): Change prototype.
3563         * init.c (perform_member_init): Compute explicit, rather than
3564         requiring it as a parameter.
3565         (sort_member_init): Rename to ...
3566         (sort_mem_initializers): ... this.  Process bases and data members
3567         together.
3568         (sort_base_init): Remove.
3569         (emit_base_init): Rename to ...
3570         (emit_mem_initializers): ... this.
3571         (expand_aggr_vbase_init_1): Remove.
3572         (construct_virtual_bases): Rename to ...
3573         (construct_virtual_base): ... this.
3574         (expand_member_init): Rework handling of base initializers.
3575         * method.c (do_build_copy_constructor): Use
3576         finish_mem_initializers.
3577         * parse.y (member_init): Adjust calls to expand_member_init.
3578         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
3579         (tsubst_initializer_list): Use expand_member_init.
3580         * semantics.c (finish_mem_intiailizers): Simplify.
3581
3582 2002-10-02  Matt Austern  <austern@apple.com>
3583         * decl.c (walk_vtables_r): Fixed typo that caused result to
3584         never get a nonzero value.
3585
3586 2002-10-02  Roger Sayle  <roger@eyesopen.com>
3587
3588         PR optimization/6627
3589         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
3590         from here, and move it to tree.h.
3591         * decl.c (cxx_init_decl_processing): If storing the vbit
3592         in function pointers, ensure that force_align_functions_log
3593         is atleast one.
3594
3595 2002-10-02  Matt Austern  <austern@apple.com>
3596
3597         * class.c (check_field_decls): Changed warning about const member
3598         variables so that it doesn't get issued for a class aggregate.
3599
3600 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
3601
3602         * decl.c (cp_finish_decl): Make sure array types are laid out,
3603         even if the array bounds are unknown.
3604
3605 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
3606
3607         * class.c (build_vtbl_initializer): Change build_c_cast
3608         to build1.
3609
3610 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
3611
3612         * decl.c (cp_finish_decl): Make sure array types are laid out,
3613         even if the array bounds are unknown.
3614
3615         * decl.c (cp_finish_decl): Correct check for dynamic
3616         initialization of thread-local storage.
3617
3618 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
3619
3620         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
3621         overloaded.
3622
3623 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
3624
3625         * class.c (build_vtbl_initializer): Add cast.
3626         (add_vcall_offset_vtbl_entries_1):
3627         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
3628
3629 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
3630
3631         * class.c (walk_subobject_offsets): Correct the calculation of
3632         offsets for virtual bases.  Correct the counting of array
3633         elements.
3634         (layout_nonempty_base_or_field): Simplify.  Correct the
3635         calculation of offsets to be propagated through the binfo
3636         hierarchy.
3637         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
3638         Add the FIELD_DECL to TYPE_FIELDS.
3639         (build_base_fields): Adjust accordingly.
3640         (layout_virtual_bases): Use build_base_field.
3641         (end_of_class): Return a tree, not an integer.
3642         (warn_about_ambiguous_direct_bases): Rename to ...
3643         (warn_about_ambiguous_bases): ... this.
3644         (include_empty_classes): New function.
3645         (layout_class_type): Create an alternative version of the type to
3646         be used when as a base class type.  Do not call
3647         finish_record_layout until we are done laying out the class.
3648         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
3649         as_base.
3650         (CLASSTYPE_SIZE): Reimplement.
3651         (CLASSTYPE_SIZE_UNIT): Likewise.
3652         (CLASSTYPE_ALIGN): Likweise.
3653         (CLASSTYPE_USER_ALIGN): Likewise.
3654         (CLASSTYPE_AS_BASE): New macro.
3655         (DECL_INITIALIZED_P): Likewise.
3656         (extract_init): Remove prototype.
3657         (build_forced_zero_init): Rename to ...
3658         (build_zero_init): ... this.
3659         (force_store_init_value): Remove.
3660         * decl.c (obscure_complex_init): Remove.
3661         (duplicate_decls): Copy DECL_INITIALIZED_P.
3662         (check_initializer): Do not leave junk in DECL_INITIAL.
3663         (cp_finish_decl): Handle zero-initialization of entities with
3664         static storage duration.
3665         * expr.c (extract_init): Remove.
3666         * init.c (build_forced_zero_init): Remove.
3667         (build_zero_init): New function.
3668         (build_default_init): Use it.
3669         (build_field_list): Skip FIELD_DECLs for base subobjects.
3670         (push_base_cleanups): Likewise.
3671         * method.c (do_build_assign_ref): Likewise.
3672         (synthesize_exception_spec): Likewise.
3673         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
3674         (regenerate_decl_from_template): To not set DECL_INITIAL for a
3675         static data member whose initialization took place in its class.
3676         (instantiate_decl): Do not pass an initializer to cp_finish_decl
3677         in that situation.
3678         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
3679         (dfs_unuse_fields): Likewise.
3680         * tree.c (pod_type_p): Handle error_mark_node.
3681         (zero_init_p): Likewise.
3682         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
3683         subobjects.
3684         * typeck2.c (store_init_value): Remove #if 0'd code.
3685         (force_store_init_value): Remove.
3686         (process_init_constructor): Use build_zero_init.
3687
3688 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
3689
3690         PR c++/7788
3691         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
3692
3693 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
3694
3695         * cp-tree.h: Fix comment typos.
3696         * decl.c: Likewise.
3697         * pt.c: Likewise.
3698
3699 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
3700
3701         * cp/class.c (contains_empty_class_p): New method.
3702         (walk_subobject_offsets): Correct computation of field offset.
3703         (layout_empty_base): Correct placement of emtpy base classes.
3704         (layout_class_type): Warn about ABI changes.
3705
3706 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
3707
3708         * cp/class.c (layout_virtual_bases): Do not round the size of the
3709         type to a multiple of the alignment before laying out virtual bases.
3710         (layout_class_type): Correct handling of bit-fields that are wider
3711         than their type inside unions.  Round the size of the type to a
3712         even number of bytes when computing the size without virtual
3713         bases.
3714         * cp/cp-tree.h (abi_version_at_least): New macro.
3715
3716 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
3717
3718         * ChangeLog: Follow spelling conventions.
3719         * ChangeLog.2: Likewise.
3720         * call.c: Likewise.
3721         * class.c: Likewise.
3722         * cp-tree.h: Likewise.
3723         * cvt.c: Likewise.
3724         * decl.c: Likewise.
3725         * decl2.c: Likewise.
3726         * except.c: Likewise.
3727         * friend.c: Likewise.
3728         * g++spec.c: Likewise.
3729         * init.c: Likewise.
3730         * lex.c: Likewise.
3731         * mangle.c: Likewise.
3732         * method.c: Likewise.
3733         * operators.def: Likewise.
3734         * optimize.c: Likewise.
3735         * pt.c: Likewise.
3736         * rtti.c: Likewise.
3737         * search.c: Likewise.
3738         * semantics.c: Likewise.
3739         * spew.c: Likewise.
3740         * tree.c: Likewise.
3741         * typeck.c: Likewise.
3742
3743 2002-09-18  Devang Patel  <dpatel@apple.com>
3744
3745         * cp/cp-tree.h: New prototype for walk_vtabls().
3746         * cp/decl.c (walk_vtables_r): New function.
3747         (struct cp_binding_level): Add new members, namespaces,
3748         names_size and vtables.
3749         (add_decl_to_level): Add decl in namespaces or vtables
3750         chain, if conditions match.
3751         (walk_vtables): New function.
3752         (walk_namespaces_r): Travers separate namespace chain
3753         for namespace decls.
3754         (wrapup_globals_for_namespace): Use names_size instead
3755         of list_length().
3756         * cp/decl2.c (finish_file): Use walk_vtables() instead of
3757         walk_globals() to walk vtable decls.
3758
3759 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
3760
3761         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
3762         ICE with invalid pointers & references.
3763
3764 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
3765
3766         * Make-lang.in: Remove all references to the demangler.
3767         * cxxfilt.c: Moved to binutils.
3768
3769 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3770
3771         PR c++/7718
3772         * pt.c (tsubst_decl): Remove assert.
3773
3774         Remove DR 295 implementation.
3775         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
3776         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
3777         about ignoring volatile qualifiers.
3778
3779         * search.c (lookup_member): Correct documentation.
3780
3781 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
3782
3783         * cp-tree.h (union lang_tree_node): Add chain_next option.
3784
3785 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3786
3787         * parse.y (parse_finish_call_expr): Check lookup_member result.
3788
3789         PR c++/7015
3790         * semantic.c (finish_asm_stmt): Fix operand/output_operands
3791         thinko.
3792         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
3793
3794 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
3795
3796         PR c++/7919
3797         * call.c (build_over_call): Convert this pointer for fns found by
3798         using decls.
3799
3800 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
3801
3802         * ChangeLog: Follow spelling conventions.
3803         * ChangeLog.1: Likewise.
3804
3805 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
3806
3807         PR c++/7768
3808         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
3809
3810 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
3811
3812         * error.c: Fix comment formatting.
3813         * except.c: Likewise.
3814         * expr.c: Likewise.
3815         * friend.c: Likewise.
3816         * g++spec.c: Likewise.
3817         * init.c: Likewise.
3818         * lex.c: Likewise.
3819         * mangle.c: Likewise.
3820         * method.c: Likewise.
3821         * optimize.c: Likewise.
3822         * pt.c: Likewise.
3823         * rtti.c: Likewise.
3824         * search.c: Likewise.
3825         * semantics.c: Likewise.
3826         * spew.c: Likewise.
3827         * tree.c: Likewise.
3828         * typeck.c: Likewise.
3829         * typeck2.c: Likewise.
3830
3831 2002-09-13  Matt Austern  <austern@apple.com>
3832
3833         PR C++/7828
3834         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
3835         * cp/call.c: Change call-by-const-reference mechanism to use
3836         non_cast_lvalue_p when deciding whether the create a temporary.
3837         We need a temporary when passing, e.g. (long) x by const ref.
3838
3839 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
3840
3841         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
3842
3843 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
3844
3845         * decl.c: Fix comment formatting.
3846         * decl2.c: Likewise.
3847
3848 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
3849
3850         * call.c: Fix comment formatting.
3851         * class.c: Likewise.
3852         * cp-lang.c: Likewise.
3853         * cp-tree.h: Likewise.
3854         * cvt.c: Likewise.
3855
3856 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
3857
3858         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
3859         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
3860         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
3861         minor adjustments (use version_string, eliminate yet another
3862         duplicate of xmalloc)
3863
3864 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3865
3866         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
3867
3868 2002-09-05  Jason Merrill  <jason@redhat.com>
3869
3870         * typeck2.c (add_exception_specifier): Only pedwarn for an
3871         incomplete type.
3872         (require_complete_eh_spec_types): New fn.
3873         (cxx_incomplete_type_diagnostic): Also support pedwarning.
3874         * typeck.c (complete_type_or_diagnostic): Likewise.
3875         * call.c (build_call): Call require_complete_eh_spec_types.
3876         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
3877         on an incomplete type.
3878
3879 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
3880
3881         * decl.c (start_cleanup_fn): Clear interface_only before
3882         start_function, restore it afterwards.
3883
3884 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
3885
3886         * cp-tree.h (finish_builtin_type): Remove.
3887         * decl2.c (finish_builtin_type): Move to common code.
3888         * decl.c (build_ptrmemfunc_type): Adjust.
3889         * rtti.c (create_pseudo_type_info): Adjust.
3890         (create_tinfo_types): Adjust.
3891
3892 2002-08-31  Jason Merrill  <jason@redhat.com>
3893
3894         * cp-lang.c (cp_expr_size): Allow initialization from a
3895         CONSTRUCTOR.
3896
3897 2002-08-30  Richard Henderson  <rth@redhat.com>
3898
3899         PR opt/7515
3900         * tree.c: Include target.h.
3901         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
3902         don't bind locally.
3903         * Makefile.in (tree.o): Update.
3904
3905 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
3906
3907         * class.c (layout_virtual_bases): Warn about bugs in G++ that
3908         result in incorrect object layouts.
3909         (layout_class_type): Likewise.
3910
3911 2002-08-24  Matt Austern  <austern@apple.com>
3912
3913         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
3914         are allowable.
3915         (real_lvalue_p): Update caller.
3916         (lvalue_p): Ditto.
3917         (non_cast_lvalue_or_else): New.
3918         * tree.h: Declare it.
3919         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
3920
3921 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
3922
3923         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
3924         and COND_EXPR specially; fix error message output.
3925
3926 2002-08-22  Jason Merrill  <jason@redhat.com>
3927
3928         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
3929         * semantics.c (nullify_returns_r): Likewise.
3930
3931 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3932
3933         Fix PR/7621
3934         * typeck.c (finish_class_member_access_expr): Diagnose cases where
3935         name lookup finds nothing.
3936
3937 2002-08-15  Jason Merrill  <jason@redhat.com>
3938
3939         * semantics.c (finish_then_clause): Remove redundant assignment.
3940         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
3941         extra binding level outside the if/switch statement.
3942         (finish_while_cond, finish_for_cond): Rewrite complex condition
3943         into the loop body.
3944
3945 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
3946
3947         * parse.y (sizeof, alignof, typeof): New non-terminals to
3948         increment skip_evaluation.  Replace terminals with them and
3949         decrement skip_evaluation at the end of rules using them.
3950         * decl2.c (mark_used): Don't assemble_external if
3951         skipping evaluation.
3952
3953 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
3954
3955         Fix PR/7504
3956         * parse.y (parse_finish_call_expr): Handle incomplete
3957         type used to name a scope.
3958
3959 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
3960
3961         PR c++/7598
3962         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
3963         regression caused by my 2002-08-08 patch.
3964
3965 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
3966
3967         * decl.c (pushdecl_class_level): Honor requests to bind names to
3968         OVERLOADs.
3969
3970 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3971
3972         * decl2.c (build_call_from_tree): Fix uninitialized variable.
3973         * parse.y (parse_finish_call_expr): Likewise.
3974         * repo.c (old_args, old_dir, old_main): Const-ify.
3975
3976 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
3977
3978         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
3979         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
3980         * optimize.c (maybe_clone_body): Likewise.
3981         * pt.c (tsubst_enum): Likewise.
3982         (lookup_template_class): Likewise.
3983         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
3984
3985 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
3986
3987         * lang-specs.h: Remove -ansi.
3988
3989 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
3990
3991         * tree.c (maybe_dummy_object): Replace // with /* */
3992
3993 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
3994
3995         * call.c (standard_conversion): Use build_ptrmem_type.
3996         * cp-tree.h (build_ptrmem_type): New function.
3997         (adjust_result_of_qualified_name_lookup): Likewise.
3998         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
3999         static data members.
4000         (build_ptrmem_type): New function.
4001         (grokdeclarator): Do not use build_offset_type when encountering a
4002         qualified name.
4003         * parse.y (parse_finish_call_expr): Use
4004         adjust_result_of_qualified_name_lookup.
4005         * search.c (adjust_result_of_qualified_name_lookup): New function.
4006         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
4007         accessing OFFSET_TYPEs directly.
4008
4009 2002-08-08  Mike Stump  <mrs@apple.com>
4010
4011         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
4012         (type_decays_to): Likewise.
4013         * class.c (find_final_overrider): Likewise.
4014         (maybe_note_name_used_in_class): Likewise.
4015         * decl.c (current_tmpl_spec_kind): Likewise.
4016         (add_binding): Likewise.
4017         (push_class_binding): Likewise.
4018         (duplicate_decls): Likewise.
4019         (layout_var_decl): Likewise.
4020         (grokfndecl): Likewise.
4021         (grokdeclarator): Likewise.
4022         (check_default_argument): Likewise.
4023         * decl2.c (handle_class_head): Likewise.
4024         * error.c (dump_template_decl): Likewise.
4025         * init.c (build_offset_ref): Likewise.
4026         * pt.c (check_specialization_scope): Likewise.
4027         (determine_specialization): Likewise.
4028         (check_explicit_specialization): Likewise.
4029         (maybe_check_template_type): Likewise.
4030         (process_partial_specialization): Likewise.
4031         (check_default_tmpl_args): Likewise.
4032         (push_template_decl_real): Likewise.
4033         (convert_template_argument): Likewise.
4034         (try_class_unification): Likewise.
4035         (get_bindings_real): Likewise.
4036         (do_decl_instantiation): Likewise.
4037         * semantics.c (begin_function_definition): Likewise.
4038         (finish_member_declaration): Likewise.
4039         (check_multiple_declarators): Likewise.
4040         * typeck.c (comp_array_types): Likewise.
4041         (comptypes): Likewise.
4042         (expr_sizeof): Likewise.
4043         (build_binary_op): Likewise.
4044         (dubious_conversion_warnings): Likewise.
4045         (check_return_expr): Likewise.
4046
4047 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
4048
4049         * typeck.c (build_class_member_access_expr): Do not return
4050         error_mark_node when no error has occurred.
4051
4052 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4053
4054         * typeck.c (build_component_addr): Remove.
4055         (build_unary_op): Just check it's not a bitfield, and then build
4056         an ADDR_EXPR.
4057
4058 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4059
4060         * class.c (convert_to_base): Correct check for error_mark_node.
4061         (create_vtable_ptr): Remove unused VFUNS_P parm.
4062
4063 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4064
4065         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
4066
4067 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
4068
4069         Rework build_component_ref.
4070         * call.c (build_vfield_ref): Do not go through build_component_ref.
4071         (build_field_call): Use build_class_member_access_expr.
4072         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
4073         (build_object_call): Likewise.
4074         * class.c (convert_to_base): New function.
4075         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
4076         (instantiate_type): Handle BASELINKs.
4077         * cp-tree.def (BASELINK): New tree code.
4078         * cp-tree.h (BASELINK_P): Reimplement.
4079         (SET_BASELINK_P): Remove.
4080         (BASELINK_BINFO): Reimplement.
4081         (BASELINK_FUNCTIONS): Likewise.
4082         (BASELINK_ACCESS_BINFO): Likewise.
4083         (BASELINK_OPTYPE): Likewise.
4084         (convert_to_base): New function.
4085         (name_p): Likewise.
4086         (build_object_ref): Remove.
4087         (build_component_ref_1): Likewise.
4088         (build_component_ref): Likewise.
4089         (build_x_component_ref): Likewise.
4090         (build_class_member_access_expr): New function.
4091         (finish_class_member_access_expr): Likewise.
4092         (build_ptrmemfunc_access_expr): Likewise.
4093         * decl.c (grokdeclarator): Handle BASELINKs.
4094         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
4095         finish_class_member_access_expr.
4096         (arg_assoc): Handle BASELINKs.
4097         (do_class_using_decl): Likewise.
4098         * error.c (dump_decl): Likewise.
4099         (dump_expr): Use build_ptrmemfunc_access_expr.
4100         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
4101         destructors.
4102         (build_throw): Use BASELINK_FUNCTIONS.
4103         * init.c (perform_member_init): Use
4104         build_class_member_access_expr.
4105         (build_offset_ref): Handle BASELINKs.  Use
4106         build_class_member_access_expr.
4107         * method.c (hack_identifier): Likewise.
4108         * parse.y (do_id): Use BASELINK, not TREE_LIST.
4109         (primary): Remove uses of build_object_ref.
4110         * pt.c (lookup_template_function): Handle BASELINKs.
4111         (resolve_overloaded_unification): Likewise.
4112         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
4113         (lookup_field): Use BASELINK, not TREE_LIST.
4114         (lookup_fnfiels): Likewise.
4115         (setup_class_bindings): Likewise.
4116         * semantics.c (finish_object_call_expr): Do not use
4117         build_method_call when we already know what function is being
4118         called.
4119         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
4120         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
4121         TREE_CHAIN.
4122         (name_p): New function.
4123         * typeck.c (build_object_ref): Remove.
4124         (build_component_ref_1): Likewise.
4125         (build_x_component_ref): Likewise.
4126         (build_class_member_access_expr): New function.
4127         (finish_class_member_access_expr): Likewise.
4128         (build_ptrmemfunc_access_expr): Likewise.
4129         (get_member_function_from_ptrfunc): Use
4130         build_ptrmemfunc_access_expr.
4131         (build_binary_op): Likewise.
4132         (build_unary_op): Likewise.
4133         (build_ptrmemfunc): Likewise.
4134         (pfn_from_ptrmemfunc): Likewise.
4135         * typeck2.c (build_m_component_ref): Adjust comment.
4136
4137 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
4138
4139         * Make-lang.in (CXX_C_OBJS): Update.
4140         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
4141         * cp-tree.h (cxx_decode_option): Remove.
4142         * decl2.c (compare_options, lang_f_options, unsupported_options,
4143         cxx_decode_option): Remove.
4144
4145 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
4146
4147         * typeck.c (build_x_unary_op): Handle pointer-to-member.
4148
4149 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
4150
4151         * class.c: Don't include obstack.h.
4152         (popclass):
4153         * decl2.c: Delete bogus comment.
4154         * error.c: Don't include obstack.h.
4155         * except.c: Likewise.
4156         (dump_type): Correct comment.
4157         * method.c: Don't include obstack.h.
4158         * tree.c: Likewise.
4159
4160 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
4161
4162         Fix PR/2213
4163         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
4164         expressions to pointer-to-data-member of pointer-to-member-functions.
4165
4166 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
4167
4168         * cvt.c (ocp_convert): Delete obsolete code.
4169         * parse.y (permanent_obstack): Delete declaration.
4170         * pt.c (permanent_obstack): Delete declaration.
4171         * repo.c (permanent_obstack): Delete declaration.
4172         (open_repo_file): Use xmalloc instead of permanent_obstack.
4173         (init_repo): Use xstrdup instead of permanent_obstack.
4174
4175 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
4176
4177         * cp-tree.h (VF_DERIVED_VALUE): Remove.
4178         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
4179
4180 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
4181
4182         PR 7470.
4183         C++ ABI change - vfunc ordering.
4184         * class.c (add_virtual_function): Remove.
4185         (dfs_modify_all_vtables): Take list of all declared
4186         virtuals. Assign all that are not in primary base.
4187         (check_for_override): Adjust comments.
4188         (create_vtable_ptr): Take single list of virtuals. Build chain
4189         of declared virtuals here.
4190         (layout_class_type): Take single list of virtuals. Adjust.
4191         (finish_struct_1): Keep virtuals on single list. Adjust.
4192
4193 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
4194
4195         * init.c (build_member_call): Use build_new_method_call, not
4196         build_method_call.
4197
4198 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
4199
4200         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
4201
4202 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
4203
4204         * call.c (build_method_call): Issue a more helpful error message
4205         about ambiguous method names.
4206
4207 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
4208
4209         * tree.c (build_shared_int_cst): Make cache file scope, and
4210         GTY it.
4211
4212 2002-08-02  Jason Merrill  <jason@redhat.com>
4213
4214         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
4215         (cp_expr_size): New fn.
4216         * call.c (build_over_call): Lose empty class hackery.
4217         (convert_arg_to_ellipsis): Promote non-POD warning to error.
4218         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
4219
4220         * semantics.c (expand_body): Do tree optimization in the function
4221         context, too.
4222
4223 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
4224
4225         * cp-tree.h: Move all warning and flag declarations to c-common.h.
4226         * decl.c: Move all warning and flag variables to c-common.c.
4227         * decl2.c: Move all warning and flag variables to c-common.c.
4228         * lex.c (flag_digraphs): Remove.
4229         (warn_traditional): Now in c-common.c.
4230
4231 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
4232
4233         * call.c (build_field_call): Do not look up the field by name.
4234         (build_method_call): Simplify.
4235         (struct z_candidate): Add access_path and conversion_path.  Remove
4236         basetype_path.
4237         (convert_class_to_reference): Adjust use of
4238         add_function_candidate.
4239         (add_candidate): Add conversion_path argument.
4240         (add_function_candidate): Use it.
4241         (add_conv_dndidate): Likewise.
4242         (build_builtin_candidate): Likewise.
4243         (add_template_candidate_real): Add conversion_path argument.
4244         (add_template_conv_candidate): Likewise.
4245         (add_template_candidate): Likewise.
4246         (build_user_type_conversion_1): Use it.
4247         (build_new_function_call): Remove name lookup code.  Adjust use of
4248         add_template_candidate and add_function_candidate.
4249         (build_new_op): Likewise.
4250         (convert_like_real): Use build_special_member_call.
4251         (build_over_call): Use cand->conversion_path.
4252         (build_special_member_call): New method.
4253         (build_new_method_call): Remove name lookup code.
4254         * cp-tree.def (OFFSET_REF): Update documentation.
4255         (TEMPLATE_ID_EXPR): Likewise.
4256         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
4257         (BASELINK_OPTYPE): Likewise.
4258         (build_new_method_call): Adjust prototype.
4259         (build_special_member_call): New method.
4260         (build_baselink): New method.
4261         (build_offset_ref_call_from_tree): Likewise.
4262         (build_call_from_tree): Likewise.
4263         (finish_qualified_call_expr): Remove.
4264         (finish_call_expr): Adjust prototype.
4265         (build_x_function_call): Remove.
4266         * cvt.c (ocp_convert): Use build_special_member_call.
4267         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
4268         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
4269         CALL_EXPR.
4270         (build_offset_ref_call_from_tree): New function.
4271         (build_call_from_tree): Likewise.
4272         * init.c (expand_cleanup): Use build_special_member_call.
4273         (expand_default_init): Likewise.
4274         (build_member_call): Use finish_call_expr.
4275         (build_new_1): Use build_special_member_call.
4276         (push_base_cleanups): Likewise.
4277         * method.c (do_build_assign_ref): Likewise.
4278         * parse.y (template_id): Do not pass a COMPONENT_REF to
4279         lookup_template_function.
4280         (primary): Use parse_finish_call_epxr, not finish_call_expr.
4281         (parse_finish_call_expr): New function.
4282         * pt.c (lookup_template_function): Add assertions.
4283         * search.c (lookup_base): Allow T to be a binfo.
4284         (build_baselink): New function.
4285         (lookup_member): Use it.
4286         * semantics.c (finish_call_expr): Do not do name lookup.
4287         (finish_object_call_expr): Remove #if 0'd code.
4288         (finish_qualified_call_expr): Remove.
4289         * typeck.c (build_x_function_call): Remove.
4290         (build_static_case): Use build_special_member_call.
4291         * typeck2.c (build_functional_cast): Likewise.
4292
4293 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
4294
4295         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
4296
4297 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
4298
4299         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
4300
4301 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
4302
4303         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
4304         documentation.
4305
4306 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
4307
4308         * cp-tree.h: Comment typo fix.
4309
4310 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
4311
4312         * spew.c (space_for_token): Allocate zeroed memory for a new token
4313         chunk.
4314
4315 2002-07-27  Roger Sayle  <roger@eyesopen.com>
4316
4317         * decl.c (builtin_function_1): No need to explicitly mark
4318         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
4319
4320 2002-07-27  Roger Sayle  <roger@eyesopen.com>
4321
4322         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
4323
4324 2002-07-26  Jason Merrill  <jason@redhat.com>
4325
4326         * call.c (build_over_call): Likewise.
4327         (cp_convert_parm_for_inlining): New fn.
4328         (convert_for_arg_passing): New fn.
4329         (convert_default_arg, build_over_call): Use it.
4330         (type_passed_as): New fn.
4331         * pt.c (tsubst_decl): Use it.
4332         * decl2.c (cp_build_parm_decl): New fn.
4333         (build_artificial_parm): Use it.
4334         (start_static_storage_duration_function): Likewise.
4335         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
4336         (grokparms): Don't mess with DECL_ARG_TYPE.
4337         * typeck.c (convert_arguments): Use convert_for_arg_passing.
4338         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
4339         Define.
4340         * cp-tree.h: Declare new fns.
4341
4342 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
4343
4344         * cp-tree.h (flag_operator_names): Remove.
4345         * decl2.c (flag_operator_names): Remove.
4346         (lang_f_options): Remove operator-names.
4347         * lex.c (D_OPNAME): Remove.
4348         (reswords): Remove operator names.
4349         (rid_to_yy): Remove operator names.
4350         (init_reswords): No need to handle D_OPNAME.
4351         * spew.c (read_process_identifier): There are no operator
4352         names.
4353
4354 2002-07-26  Jason Merrill  <jason@redhat.com>
4355
4356         * dump.c (cp_dump_tree): Call c_dump_tree.
4357         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
4358
4359 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
4360
4361         * error.c (print_whitespace): Remove.
4362         * g++spec.c (LIBUNWIND): Move.
4363         * mangle.c (mangled_position, write_signed_number): Remove.
4364
4365 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
4366
4367         * decl2.c (cxx_decode_option): Similarly.
4368
4369 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
4370
4371         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
4372         (cxx_sizeof_or_alignof_type): Take a third argument.
4373         (cxx_sizeof): Adjust definition.
4374         (cxx_alignof): Likewise.
4375         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
4376         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
4377         complaining.
4378         (c_sizeof_nowarn): Remove definition.
4379         (build_unary_op): Use cxx_sizeof_nowarn.
4380
4381 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
4382
4383         * tree.c (cp_build_qualified_type_real): When copying
4384         pointer-to-method types, unshare the record that holds
4385         the cached pointer-to-member-function type.
4386
4387 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
4388
4389         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
4390
4391 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
4392
4393         Fix PR/7363:
4394         * typeck.c (cxx_sizeof_or_alignof_type): New function.
4395         (c_sizeof): Remove definition.
4396         (expr_sizeof): Use cxx_sizeof.
4397         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
4398         * decl.c (finish_destructor_body): Use cxx_sizeof.
4399         * semantics.c (finish_alignof): Likewise.
4400         (finish_alignof): Use cxx_alignof.
4401         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
4402         (cxx_sizeof_or_alignof_type): Declare.
4403         (my_friendly_assert): Move to ../c-common.h.
4404
4405 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
4406
4407         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
4408
4409 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4410
4411         PR c++/7347, c++/7348
4412         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
4413         * decl.c (make_typename_type): Use it.
4414         (make_unbound_class_template): Likewise.
4415         (lookup_name_real): Don't call type_access_control if scope is
4416         template parameter dependent.
4417         * parse.y (template_arg): Call make_unbound_class_template with
4418         tf_parsing set.
4419         (nest_name_specifier): Call make_typename_type with tf_parsing set.
4420         (typename_sub0): Likewise.
4421         (typename_sub1): Likewise.
4422         (instantiate_decl): Push class scope.
4423         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
4424         for both static variable and member function template.
4425         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
4426         and arguments.
4427         * search.c (type_access_control): Do type access for TEMPLATE_DECL
4428         too.
4429
4430 2002-07-20  Roger Sayle  <roger@eyesopen.com>
4431
4432         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
4433         test by using positive_option.  Make whitespace consistent.
4434
4435 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
4436
4437         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
4438         members with 'locus'.  Adjust use throughout.
4439         (struct feed):  Likewise.
4440         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
4441         Adjust use.
4442         (snarf_defarg): Use error(), not error_with_file_and_line().
4443
4444 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
4445
4446         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
4447         cpp_options is included.
4448
4449 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4450
4451         PR c++/2862, c++/2863
4452         * pt.c (determine_specialization): Compare the length of
4453         TYPE_ARG_TYPES.  Tidy.
4454
4455 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4456
4457         PR c++/3797
4458         * decl.c (duplicate_decls): Don't propagate inlining parameters from
4459         olddecl to newdecl when newdecl is a specialization of the
4460         instantiation olddecl.
4461
4462 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4463
4464         PR c++/4802, c++/5387
4465         * decl.c (make_typename_type): Use enforce_access.
4466
4467 2002-07-17  Scott Snyder <snyder@fnal.gov>
4468
4469         PR c++/7320
4470         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
4471
4472 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
4473
4474         * class.c (add_method): Correct handling of conversion operators.
4475
4476 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
4477
4478         PR c++/7224
4479         * class.c (add_method): Simplify.
4480
4481 2002-07-11  Jason Merrill  <jason@redhat.com>
4482
4483         PR c++/7279
4484         * tree.c (cp_copy_res_decl_for_inlining): Also copy
4485         TREE_ADDRESSABLE.
4486
4487 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
4488
4489         * pt.c (template_parm_this_level_p, push_template_decl_real):
4490         Pass depth as int pointer.
4491
4492 2002-07-11  Tim Josling  <tej@melbpc.org.au>
4493
4494         Remove front end hard coding from gengtype.c.
4495
4496         * config-lang.in (gtfiles): Add files needed for this front end.
4497
4498 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
4499
4500         * cp-tree.h (unqualified_name_lookup_error): Declare it.
4501         (begin_function_definition): Adjust prototype.
4502         * lex.c (unqualified_name_lookup_error): New function, split out
4503         from ...
4504         (do_identifier): ... here.
4505         * parse.y (parse_begin_function_definition): New function.
4506         (fn.def1): Use it.
4507         * semantics.c (begin_function_definition): Accept decl-specifiers
4508         and attributes as separate parameters.
4509
4510 2002-07-10  Jason Merrill  <jason@redhat.com>
4511
4512         PR c++/6255
4513         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
4514         modifying the old one.
4515
4516 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
4517
4518         * cp-tree.h (constructor_name_p): Declare it.
4519         (check_template_template_default_arg): Likewise.
4520         * class.c (handle_using_decl): Use constructor_name_p.
4521         * decl.c (grokdeclarator): Likewise.
4522         * decl2.c (constructor_name_p): Define it.
4523         * init.c (build_member_call): Use constructor_name_p.
4524         * parse.y (template_parm): Use check_template_template_default_arg.
4525         * pt.c (check_explicit_specialization): Use constructor_name_p.
4526         * semantics.c (check_template_template_default_arg): New function.
4527
4528 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4529
4530         * pt.c (can_complete_type_without_circularity): Add static to
4531         function definition.
4532
4533 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
4534
4535         * cp-tree.h (have_extern_spec): Declare it
4536         * decl.c (have_extern_spec): Define it.
4537         (start_decl): Eliminate use of used_extern_spec.
4538         (start_function): Likewise.
4539         * parse.y (have_extern_spec): Remove declaration.
4540         (used_extern_spec): Likewise.
4541         (frob_specs): Eliminate use of used_extern_spec.
4542         (.hush_warning): Likewise.
4543
4544 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
4545
4546         * Make-lang.in (cp/parse.o): Depend on decl.h.
4547         * cp-tree.h (do_decl_instantiation): Change prototype.
4548         * parse.y: Include decl.h.
4549         (parse_decl_instantiation): New function.
4550         (explicit_instantiation): Use it.
4551         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
4552         and DECLSPECS.
4553
4554 2002-07-07  Roger Sayle  <roger@eyesopen.com>
4555
4556         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
4557         constructor and destructor tests when passed a TEMPLATE_DECL.
4558
4559 2002-07-05  Jason Merrill  <jason@redhat.com>
4560
4561         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
4562         pointers.
4563
4564         PR optimization/7145
4565         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
4566
4567 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
4568
4569         Repair damage on weak-impared targets caused by my previous patch.
4570         * cp-tree.h (import_export_tinfo): Add parameter.
4571         * decl2.c (import_export_tinfo): Add parameter, post adjust
4572         DECL_COMDAT.
4573         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
4574         import_export_tinfo.
4575
4576 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4577
4578         PR c++/6944
4579         * init.c (build_aggr_init): Remove qualifiers of init before calling
4580         build_vec_init.
4581         (build_vec_init): Flatten multi-dimensional array during cleanup.
4582         (build_vec_delete_1): Abort if the type of each element is array.
4583
4584 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
4585
4586         * pt.c (instantiate_class_template): Fix typo.
4587
4588 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4589
4590         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
4591         by CVS conflict in my last patch.
4592
4593 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4594
4595         PR c++/6716
4596         * pt.c (can_complete_type_without_circularity): New function.
4597         (instantiate_class_template): Use it.
4598         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
4599         message due to incomplete fields.
4600
4601 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
4602
4603         PR c++/7112
4604         * mangle.c (write_expression): Add mangling for sizeof when
4605         applied to a type.
4606         * operators.def: Remove stale comment.
4607
4608 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
4609
4610         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
4611         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
4612         (tinfo_decl_type): Replace with ...
4613         (type_info_ptr_type): ... this.
4614         (import_export_tinfo): Declare.
4615         (tinfo_decl_p): Rename to ...
4616         (unemitted_tinfo_decl_p): ... this.
4617         * decl2.c (import_export_decl): Break out tinfo handling into ...
4618         (import_export_tinfo): ... here. New function.
4619         (finish_file): Adjust.
4620         * rtti.c (TINFO_REAL_NAME): New macro.
4621         (init_rtti_processing): Create the tinfo types.
4622         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
4623         (get_tinfo_decl): Adjust.
4624         (get_tinfo_ptr): New function.
4625         (get_type_id): Use it.
4626         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
4627         (ptr_initializer): Use get_tinfo_ptr.
4628         (ptm_initializer): Likewise.
4629         (synthesize_tinfo_var): Break into ...
4630         (get_pseudo_ti_init): ... this. Just create the initializer.
4631         (get_pseudo_ti_desc): .. and this.
4632         (create_real_tinfo_var): Remove.
4633         (create_pseudo_type_info): Don't create the vtable decl here.
4634         (get_vmi_pseudo_type_info): Remove.
4635         (create_tinfo_types): Adjust.
4636         (tinfo_decl_p): Rename to ...
4637         (unemitted_tinfo_decl_p): ... here. Adjust.
4638         (emit_tinfo_decl): Adjust. Create the initializer.
4639
4640 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
4641
4642         PR c++/6695
4643         * pt.c (tsubst_friend_class): Substitute into the context of the
4644         friend before using it.
4645
4646 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
4647
4648         * cp-tree.h (xref_tag): Change prototype.
4649         (handle_class_head): Likewise.
4650         (build_x_component_ref): Likewise.
4651         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
4652         (xref_tag): Take attributes as a separate parameter.
4653         (xref_tag_from_type): Adjust call to xref_tag.
4654         * decl2.c (build_expr_from_tree): Adjust call to
4655         build_x_component_ref.
4656         (handle_class_head): Take attributes as a separate parameter.
4657         * parse.y (parse_xref_tag): New function.
4658         (parse_handle_class_head): Likewise.
4659         (primary): Use parse_xref_tag.
4660         (class_head_decl): Use parse_handle_class_head.
4661         (class_head_defn): Likewise.
4662         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
4663         (build_dynamic_cast_1): Likewise.
4664         (create_pseudo_type_info): Likewise.
4665         (emit_support_tinfos): Likewise.
4666         * typeck.c (build_object_ref): Adjust call to
4667         build_x_component_ref.
4668         (build_x_component_ref): Remove protect parameter.
4669
4670 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
4671
4672         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
4673         * class.c (handle_using_decl): Likewise.
4674         (instantiate_type): Likewise.
4675         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
4676         (xref_basetypes): Change prototype.
4677         (begin_mem_initializers): New function.
4678         (get_overloaded_fn): Likewise.
4679         * decl.c (xref_basetypes): Simplify.
4680         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
4681         * init.c (build_offset_ref): Likewise.
4682         * parse.y (base_init): Use begin_mem_initializers().
4683         (structsp): Adjust call to xref_basetypes.
4684         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
4685         (instantiate_class_template): Adjust call to xref_basetypes.
4686         * semantics.c (begin_mem_initializers): New function.
4687         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
4688         (really_overlaoded_fn): Likewise.
4689         (get_overloaded_fn): New function.'
4690         (get_first_fn): USe BASELINK_FUNCTIONS.
4691
4692 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
4693
4694         * cp-tree.h (SCALAR_TYPE_P): New macro.
4695         (check_for_out_of_scope_variable): New function.
4696         (at_class_scope_p): Likewise.
4697         (finish_fname): Likewise.
4698         * class.c (finish_struct): Use at_function_scope_p.
4699         * decl.c (check_for_out_of_scope_variable): New function, split
4700         out from do_identifier.
4701         (finish_enum): Use at_function_scope_p.
4702         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
4703         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
4704         (primary): Use at_function_scope_p.
4705         * search.c (at_class_scope_p): New function.
4706         * semantics.c (finish_fname): Likewise.
4707         (check_multiple_declarators): Use at_function_scope_p.
4708
4709 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
4710
4711         * parse.y (parse_scoped_id): New function.
4712         (primary): Use it.
4713         * cp-tree.h (do_scoped_id): Adjust declaration.
4714         * lex.c (do_scoped_id): Remove call to yylex.
4715         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
4716         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
4717         expanding it inline.
4718
4719 2002-06-23  Matt Thomas  <matt@3am-software.com>
4720
4721         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
4722         "#if VMS_TARGET".
4723
4724 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4725
4726         * mangle.c (integer_type_codes): Const-ify.
4727
4728 2002-06-20  Richard Henderson  <rth@redhat.com>
4729
4730         PR c++/6747
4731         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
4732         Call put_var_into_stack.
4733
4734 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4735
4736         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
4737         array size calculation.
4738
4739 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4740
4741         PR c++/6892
4742         * pt.c (tsubst_expr): Handle FILE_STMT.
4743
4744 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4745
4746         PR c++/6723
4747         * pt.c (lookup_template_class): Don't build complete argument of
4748         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
4749         argument.
4750
4751 2002-06-19  Akim Demaille  <akim@epita.fr>
4752
4753         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
4754         decl.h's TYPENAME.
4755         * spew.c, lex.c: Adjust.
4756         * parse.y (explicit_instantiation): Add empty action to override
4757         the default $$ = $1 where it introduces a type clash.
4758
4759 2002-06-14  Jason Merrill  <jason@redhat.com>
4760
4761         * semantics.c (begin_for_stmt): Push the 'for' scope before
4762         adding the FOR_STMT.
4763
4764         C++ ABI changes.
4765         * class.c (build_base_field): Set DECL_PACKED.
4766         (layout_class_type): Don't use tail padding of PODs.
4767         * mangle.c (write_unqualified_name): Fix template conversion op
4768         mangling.
4769
4770 2002-06-16  Richard Henderson  <rth@redhat.com>
4771
4772         PR opt/6793
4773         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
4774         after template instantiation.
4775
4776 2002-06-16  Richard Henderson  <rth@redhat.com>
4777
4778         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
4779
4780 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
4781
4782         * cp-tree.h (compiler_error): Remove declaration.
4783         * lex.c (compiler_error): Remove definition.
4784
4785 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
4786
4787         * g++spec.c (LIBUNWIND): New.
4788         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
4789
4790 2002-06-13  Jessica Han  <jessica@cup.hp.com>
4791
4792         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
4793         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
4794         (build_vbase_offset_vtbl_entries): Likewise.
4795         * rtti.c (build_headof): Likewise.
4796         (get_tinfo_decl_dynamic): Likewise.
4797         (create_pseudo_type_info): Likewise.
4798
4799 2002-06-12  Stan Shebs  <shebs@apple.com>
4800
4801         * mpw-config.in: Remove file, no longer used.
4802         * mpw-make.sed: Ditto.
4803
4804 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
4805
4806         * decl2.c: Update call to cpp_handle_option.
4807
4808 2002-06-07  H.J. Lu  (hjl@gnu.org)
4809
4810         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
4811
4812 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
4813
4814         * error.c (cp_error_at): Fix typo.
4815
4816 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
4817
4818         * error.c (cp_diagnostic_starter): Adjust call.
4819         (maybe_print_instantiation_context): Change prototype to take a
4820         'diagnostic_info *'.
4821         (print_instantiation_full_context): Likewise.
4822         (print_instantiation_partial_context): Likewise.
4823         (cp_diagnostic_starter): Likewise.
4824         (cp_diagnostic_finalizer): Likewise.
4825         (cp_print_error_function): Likewise.
4826         (cp_printer): Take a secondary parameter as a 'text_info *'.
4827         Remove output_state savings.  Adjust calls.
4828
4829 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
4830
4831         * pt.c (inline_parm_levels): Mark for GC.
4832
4833         * mangle.c (start_mangling): Allocate G.substitutions here...
4834         (init_mangle): ... rather than here.
4835         (finish_mangling): Clear the varray pointer when done with it.
4836         * spew.c (yylexstring): Don't use VARRAY_FREE.
4837         * search.c (bfs_walk): Don't use VARRAY_FREE.
4838         * decl2.c (pending_statics): Use gengtype to mark.
4839         (deferred_fns): Likewise.
4840         (ssdf_decls): Likewise.
4841         (init_decl2): Delete.
4842         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
4843         (cxx_init_decl_processing): Don't call init_decl2.
4844         (cxx_pop_function_context): Don't use VARRAY_FREE.
4845         * cp-tree.h (struct saved_scope): No need for special marking
4846         of varrays.
4847         (struct language_function): Likewise.
4848         (local_classes): Use gengtype to mark.
4849         (init_decl2): Delete prototype.
4850         * class.c (init_class_processing): Don't use
4851         ggc_add_tree_varray_root.
4852         (build_vtbl_initializer): Don't use VARRAY_FREE.
4853
4854         * decl.c (typename_compare): Don't use same_type_p.
4855
4856         * decl.c: Include hashtab.h instead of hash.h.
4857         (typename_hash): Update to use htab_h.
4858         (typename_compare): Likewise.
4859         (typename_htab): Use gengtype to mark.
4860         (build_typename_type): Update to use htab_h.
4861         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
4862
4863         * Make-lang.in (gt-cp-tree.h): New rule.
4864         (cp/tree.o): Depend on gt-cp-tree.h.
4865         * config-lang.in (gtfiles): Add cp/tree.c.
4866         * tree.c: Include gt-cp-tree.h.
4867         (list_hash_table): Use gengtype to mark.
4868         (init_tree): Use gengtype to mark trees.
4869
4870         * Make-lang.in (cp/decl.o): Add debug.h dependency.
4871         * call.c (struct z_candidate): Use gengtype.
4872         (USER_CONV_CAND): Use WRAPPER_ZC.
4873         (convert_class_to_reference): Use build_zc_wrapper.
4874         (build_type_conversion_1): Likewise.
4875         (build_over_call): Use WRAPPER_ZC.
4876         (add_warning): Use build_zc_wrapper.
4877         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
4878         * cp-tree.h (struct lang_identifier): Use gengtype.
4879         (struct template_parm_index_s): Likewise.
4880         (struct ptrmem_cst): Likewise.
4881         (struct tree_binding): Likewise.
4882         (struct tree_overload): Likewise.
4883         (struct tree_srcloc): Likewise.
4884         (struct tree_wrapper): Likewise.  Also modify to have a pointer
4885         to struct z_candidate rather than void.
4886         (enum cp_tree_node_structure_enum): New.
4887         (union lang_tree_node): New.
4888         (cxx_mark_tree): Delete prototype.
4889         (cp_tree_node_structure): New prototype.
4890         (build_ptr_wrapper): Delete prototype.
4891         (build_int_wrapper): Delete prototype.
4892         (build_zc_wrapper): New prototype.
4893         * decl.c: Include debug.h
4894         (cxx_mark_tree): Delete.
4895         (cp_tree_node_structure): New.
4896         * tree.c (build_ptr_wrapper): Delete.
4897         (build_int_wrapper): Delete.
4898         (build_zc_wrapper): New.
4899
4900         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
4901         Correct typo.  Patch from k_fukui@highway.ne.jp.
4902
4903         * semantics.c (current_stmt_tree): Update for change to
4904         struct language_function.
4905         (finish_mem_initializers): Likewise.
4906         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
4907         * cp-tree.h (struct language_function): Rename from
4908         cp_language_function.  Change all uses.
4909         (cp_function_chain): Don't need to cast.
4910
4911         * class.c (duplicate_tag_error): Reset discriminator.
4912         (check_bases_and_members): Update for data structure changes.
4913         * cp-tree.h (struct lang_id2): Use gengtype.
4914         (flagged_type_tree): Likewise.
4915         (SET_LANG_ID): Use GGC on struct lang_id2.
4916         (struct cp_language_function): Use gengtype.  Remove field
4917         'x_vcalls_possible_p'.
4918         (current_vcalls_possible_p): Delete.
4919         (struct lang_type_header): New.
4920         (struct lang_type_class): Rename from struct lang_type.  Include
4921         struct lang_type_header.
4922         (struct lang_type_ptrmem): New.
4923         (struct lang_type): New.
4924         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
4925         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
4926         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
4927         (struct lang_decl_flags): Use gengtype.  Add discriminators.
4928         (struct lang_decl): Use gengtype.  Add and use discriminators.
4929         Update the macros that reference moved fields.
4930         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
4931         (SET_DECL_THUNK_P): Set discriminator too.
4932         (clear_inline_text_obstack): Delete prototype.
4933         (finish_inline_definitions): Delete prototype.
4934         (mark_pending_inlines): Delete prototype.
4935         (lang_check_failed): New prototype.
4936         * decl.c (struct named_label_use_list): Use gengtype.
4937         (struct named_label_list): Likewise.
4938         (mark_binding_level): Delete.
4939         (mark_named_label_lists): Delete.
4940         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
4941         (cxx_init_decl_processing): Use generated marker routine.
4942         (begin_destructor_body): Delete dead set to
4943         current_vcalls_possible_p.
4944         (mark_lang_function): Delete.
4945         (mark_cp_function_context): Delete.
4946         (lang_mark_tree): Use generated marker routines.
4947         * decl2.c (start_objects): Set discriminator when setting
4948         GLOBAL_INIT_PRIORITY.
4949         * lex.c (retrofit_lang_decl): Set discriminators.
4950         (copy_lang_type): Update for changes to lang_type structure.
4951         (cp_make_lang_type): Set discriminator.
4952         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
4953         * search.c: Include ggc.h.
4954         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
4955         (finish_inline_definitions): Delete.
4956         * spew.c (struct token): Use gengtype.
4957         (struct token_chunk): New.
4958         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
4959         (struct feed): Use gengtype.
4960         (feed_obstack): Delete.
4961         (feed): Mark as GC root.
4962         (pending_inlines): Mark as GC root.
4963         (pending_inlines_tail): Likewise.
4964         (processing_these_inlines): Likewise.
4965         (token_obstack): Make static.
4966         (first_token): Likewise.
4967         (init_spew): Don't initialize deleted things; use gengtype for roots.
4968         (clear_inline_text_obstack): Delete.
4969         (feed_input): Use GC for struct feed.  Update for changes to
4970         struct unparsed_text.
4971         (mark_pending_inlines): Delete.
4972         (next_token): Rename from add_token.  Change all callers.  Update
4973         for changes to struct unparsed_text.
4974         (space_for_token): New.
4975         (remove_last_token): New.
4976         (alloc_unparsed_text): New.
4977         (snarf_block): Take an unparsed_text.  Update for changes to struct
4978         unparsed_text.
4979         (snarf_method): Update for changes to struct unparsed_text.
4980         (snarf_defarg): Update for changes to struct unparsed_text.
4981         * tree.c (lang_check_failed): New.
4982
4983         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
4984         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
4985         (cp/spew.o): Add dependency on gt-<filename>.h.
4986         (cp/decl2.o): Add dependency on gt-<filename>.h.
4987         (cp/call.o): Add dependency on gt-<filename>.h.
4988         (cp/pt.o): Add dependency on gt-<filename>.h.
4989         (cp/repo.o): Add dependency on gt-<filename>.h.
4990         (cp/parse.o): Add dependency on gt-<filename>.h.
4991         * call.c: Use gengtype for roots.
4992         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
4993         decl2.c parse.y pt.c repo.c spew.c.
4994         * cp-tree.h: Use gengtype for roots.
4995         (struct saved_scope): Use GGC, gengtype.
4996         (cp_parse_init): Delete prototype.
4997         (init_pt): Delete prototype.
4998         * decl.c: Use gengtype for roots.
4999         (mark_saved_scope): Delete.
5000         (cxx_init_decl_processing): Don't call deleted initilisation
5001         routines.
5002         (signed_size_zero_node): Delete, unused.
5003         * decl.h: Use gengtype for roots.
5004         * decl2.c: Use gengtype for roots.
5005         * lex.h: Use gengtype for roots.
5006         * parse.y: Use gengtype for roots.
5007         (cp_parse_init): Delete.
5008         * pt.c: Use gengtype for roots.
5009         (init_pt): Delete.
5010         * repo.c: Use gengtype for roots.
5011         * spew.c: Use gengtype for roots.
5012
5013         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
5014         (cp/decl.o): Add dependency on gtype-cp.h.
5015         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
5016         Include gtype-cp.h.  Allow for filename changes.
5017
5018         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
5019         (cp/decl.o): Add cp/gt-decl.h dependency.
5020         * config-lang.in (gtfiles): New.
5021         * tree.h: Rename struct binding_level to struct cp_binding_level.
5022         * decl.c: Rename struct binding_level to struct cp_binding_level.
5023         Include cp/gt-decl.h.
5024         (struct cp_binding_level): Use gengtype.
5025         (make_binding_level): Use GGC on struct cp_binding_level.
5026         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
5027         (cxx_init_decl_processing): Mark free_binding_level as
5028         deletable.
5029
5030         * decl.c (mark_cp_function_context): Update calling sequence.
5031
5032         * decl.c (start_function): Don't free 'struct
5033         cp_language_function'.
5034         (pop_cp_function_context): Likewise.
5035         (save_function_data): Allocate it using GC.
5036         * semantics.c (genrtl_start_function): Don't free 'struct
5037         cp_language_function'.
5038
5039 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
5040
5041         * lang-specs.h: Use cpp_debug_options.
5042
5043 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
5044
5045         * mangle.c, tree.c: Include real.h.
5046         * Make-lang.in: Update dependency lists.
5047
5048 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5049
5050         * lex.c: Don't include c-lex.h.
5051         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
5052
5053 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
5054
5055         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
5056
5057 2002-05-22  Richard Henderson  <rth@redhat.com>
5058
5059         * decl.c (obscure_complex_init): Check for VAR_DECL
5060         before using DECL_THREAD_LOCAL.
5061
5062 2002-05-22  Richard Henderson  <rth@redhat.com>
5063
5064         * decl.c (check_tag_decl): Handle RID_THREAD.
5065         (obscure_complex_init): Reject run-time init of tls.
5066         (grokvardecl, grokdeclarator): Handle RID_THREAD.
5067         * lex.c (reswords): Add __thread.
5068         (rid_to_yy): Map RID_THREAD to SCSPEC.
5069
5070 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
5071
5072         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
5073         * cp-tree.h (cxx_post_options): Kill.
5074         * cp-lex.c (cxx_post_options): Kill.
5075
5076 2002-05-21  Richard Henderson  <rth@redhat.com>
5077
5078         * lex.c (rid_to_yy): Add RID_THREAD.
5079
5080 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
5081
5082         * init.c (build_vec_init): Test for trivial copy-assignment when
5083         copy-assigning arrays.
5084
5085 2002-05-20  Andreas Jaeger  <aj@suse.de>
5086
5087         * init.c (build_default_init): Remove unused variable.
5088
5089 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
5090
5091         * call.c (any_strictly_viable): New.
5092         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
5093
5094 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5095
5096         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
5097
5098 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5099
5100         PR c++/186, DR 259
5101         * pt.c (do_decl_instantiation): Don't complain explicit
5102         instantiation after explicit specialization.
5103         (do_type_instantiation): Likewise.
5104
5105 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
5106
5107         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
5108         renamed from...
5109         (complete_type_or_else): ... this.  Redefined as macro.
5110         (cxx_incomplete_type_diagnostic): Declare.
5111         (cxx_incomplete_type_error): Define as macro.
5112         * init.c (build_delete): Warn about incomplete types other than
5113         void, and use the built-in operator delete for them.
5114         * typeck.c (complete_type_or_diagnostic): Renamed from
5115         complete_type_or_else.  Added warn_only argument, passed to...
5116         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
5117         warnings or errors depending on new warn_only argument.  Renamed
5118         from...
5119         (cxx_incomplete_type_error): ... this.  New implementation in
5120         terms of cxx_incomplete_type_diagnostic.
5121
5122 2002-05-18  Jason Merrill  <jason@redhat.com>
5123
5124         PR c++/6611
5125         * decl2.c (import_export_decl): If we clear
5126         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
5127
5128 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5129
5130         PR c++/6620
5131         * pt.c (verify_class_unification): Don't check if PARM is template
5132         parameter dependent.  Simplify.
5133         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
5134         parameter dependent expression.
5135
5136 2002-05-14  Jason Merrill  <jason@redhat.com>
5137
5138         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
5139         Do set DECL_COMDAT.
5140         (synthesize_tinfo_var): Take the public decl.
5141         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
5142         (emit_tinfo_decl): Adjust.  Call import_export_decl.
5143         * decl2.c (import_export_decl): Simplify tinfo decl handling.
5144
5145 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
5146
5147         * cp-tree.h (struct lang_type): Added non_zero_init.
5148         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
5149         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
5150         * class.c (check_field_decls): Test non_zero_init.
5151         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
5152         zero-to-NULL conversions.
5153         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
5154         type that needs zero-initialization without zeros.
5155         (check_initializer_decl): Compute zero-initializer for types
5156         that require a non-trivial one.
5157         * init.c (build_forced_zero_init): New function.
5158         (build_default_init): Use it.
5159         * tree.c (zero_init_p): New function.
5160         * typeck2.c (force_store_init_value): New function.
5161         (process_init_constructor): Create non-trivial zero-initializers
5162         for array members and class fields.
5163
5164 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
5165
5166         * lang-specs.h: Remove redundant -lang-c++.
5167
5168 2002-05-13  Jason Merrill  <jason@redhat.com>
5169
5170         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
5171         (fixed_type_or_null): See through reference vars.
5172         (build_base_path): Vtable contents are constant.
5173         * typeck.c (get_member_function_from_ptrfunc): Likewise.
5174
5175 2002-05-12  Jason Merrill  <jason@redhat.com>
5176
5177         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
5178         structs are safe.
5179
5180 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
5181
5182         * cp-tree.h (flag_ansi): Remove.
5183         * decl2.c (flag_ansi): Remove.
5184         (cxx_decode_option): Set flag_iso and flag_undef.
5185
5186 2002-05-09  Jason Merrill  <jason@redhat.com>
5187
5188         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
5189         Use subtraction rather than a bitmask to get the index.
5190         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
5191
5192         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
5193
5194 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
5195
5196         * Make-lang.in (decl2.o): Update.
5197         * cp-tree.h (warn_multichar): Remove.
5198         * decl2.c: Include c-common.h.
5199         (warn_multichar): Remove.
5200
5201 2002-05-03  Jason Merrill  <jason@redhat.com>
5202
5203         * tree.c (build_cplus_array_type): Only const and volatile get
5204         special handling.
5205
5206         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
5207
5208 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
5209
5210         ABI change, returning simple classes from functions.
5211         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
5212         TYPE_HAS_TRIVIAL_INIT_REF is false or
5213         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
5214
5215 2002-04-30  Jason Merrill  <jason@redhat.com>
5216
5217         PR debug/6436
5218         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
5219         anonymous class with a typedef if there are attributes.
5220
5221 2002-04-29  Paul Eggert  <eggert@twinsun.com>
5222
5223         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
5224
5225 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
5226
5227         PR c++/6477
5228         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
5229         non-NULL first.
5230
5231 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
5232
5233         PR c++/6492
5234         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
5235         enter that scope before name lookup.
5236
5237         PR c++/6486
5238         * method.c (do_build_copy_constructor): Avoid building
5239         cv-qualified reference types.
5240
5241 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
5242
5243         PR c++/5719
5244         * decl.c (grok_op_properties): Assignment ops don't have to return
5245         by value. operator% should.
5246
5247 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
5248
5249         PR c/6343
5250         * decl.c (duplicate_decls): Call merge_weak.
5251
5252 2002-04-26  Richard Henderson  <rth@redhat.com>
5253
5254         * parse.y (malloced_yyss, malloced_yyvs): New.
5255         (yyoverflow): Re-add.  Set them.
5256         (free_parser_stacks): New.
5257
5258 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
5259
5260         PR c++/6497
5261         * method.c (do_build_assign_ref): Pass a derivation to
5262         build_method_call when calling base class assignment operators.
5263
5264 2002-04-26  Richard Henderson  <rth@redhat.com>
5265
5266         * parse.y (yyoverflow): Revert.
5267
5268 2002-04-26  Richard Henderson  <rth@redhat.com>
5269
5270         PR c/3581
5271         * parse.y (string): Remove.  Update all uses to use STRING
5272         instead, and not call combine_strings.
5273         * rtti.c (tinfo_name): Use fix_string_type.
5274         * semantics.c (finish_asm_stmt): Don't call combine_strings.
5275         * spew.c (yylexstring): New.
5276         (read_token): Use it.
5277
5278 2002-04-25  Richard Henderson  <rth@redhat.com>
5279
5280         PR c/2161
5281         * parse.y (yyoverflow): New.
5282
5283 2002-04-25  Jason Merrill  <jason@redhat.com>
5284
5285         PR c++/5607
5286         * search.c (check_final_overrider): No longer static.
5287         * class.c (update_vtable_entry_for_fn): Call it.
5288         * cp-tree.h: Adjust.
5289
5290 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5291
5292         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
5293         * cp-tree.h (cxx_set_yydebug): Die.
5294         * lex.c (YYDEBUG): Get from c-lex.h.
5295         (cxx_set_yydebug): Remove.
5296         * parse.y: Include c-lex.h.
5297         (YYDEBUG): Get from c-lex.h.
5298
5299 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
5300
5301         PR c++/6438.
5302         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
5303         void.
5304
5305 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
5306
5307         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
5308         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
5309         Redefine.
5310         * cp-tree.h (cp_attribute_table): Rename.
5311         * decl.c (lang_attribute_table): Remove declaration.
5312         (cxx_init_decl_processing): Don't set it.
5313         * tree.c (cp_attribute_table): Rename.
5314
5315 2002-04-24  Jason Merrill  <jason@redhat.com>
5316
5317         PR c++/6331
5318         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
5319         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
5320         The pedwarn for array assignment is now unconditional.
5321         * tree.c (build_cplus_array_type_1): Still process simple array types
5322         normally in templates.
5323
5324         PR c++/6395
5325         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
5326         stuff for comdats.
5327
5328 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
5329
5330         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
5331         node with attributes.
5332
5333 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
5334
5335         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
5336         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
5337
5338 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
5339
5340         PR c++/6256:
5341         * pt.c (tsubst_friend_class): Handle templates with explicit
5342         nested names.
5343
5344         PR c++/6331:
5345         * typeck.c (merge_types): Remember the cv-qualification of pointer
5346         types when merging them.
5347
5348 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
5349
5350         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
5351         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
5352         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
5353         cxx_mark_function_context): New.
5354         * decl.c (push_cp_function_context, pop_cp_function_context,
5355         mark_cp_function_context): Rename for consistency.
5356         (cxx_init_decl_processing): Don't set old hooks.
5357
5358 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
5359
5360         * call.c (convert_type_from_ellipsis): Rename, update.
5361         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
5362         * cp-tree.h (convert_type_from_ellipsis): Rename.
5363         * decl.c (cxx_init_decl_processing): Don't set hook.
5364
5365 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
5366
5367         * call.c (build_new_method_call): Update.
5368         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
5369         * cp-tree.h (cxx_incomplete_type_error): New.
5370         * decl.c (grokdeclarator, grokparms): Update.
5371         * decl2.c (check_classfn): Update.
5372         * pt.c (tsubst): Update.
5373         * typeck.c (complete_type_or_else, expr_sizeof,
5374         decay_conversion): Update.
5375         * typeck2.c (incomplete_type_error): Rename.
5376         (add_exception_specifier): Update.
5377
5378 2002-04-18  Jason Merrill  <jason@redhat.com>
5379
5380         PR c++/5658
5381         * search.c (setup_class_bindings): A class template qualifies as a
5382         type binding.
5383
5384 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
5385
5386         PR c++/6316
5387         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
5388         before expanding.
5389
5390 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
5391
5392         * init.c (begin_init_stmts): Remove commented out code.
5393         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
5394         * semantics.c (begin_gobal_stmt_expr): Adjust call to
5395         expand_start_stmt_expr.
5396
5397 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
5398
5399         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
5400         dso_handle itself, to __cxa_atexit.
5401
5402 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5403
5404         * error.c (cxx_print_error_function): Adjust call to macros.
5405
5406 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
5407
5408         * class.c (layout_virtual_bases): Do all dsize computation on trees.
5409
5410 2002-04-14  Jason Merrill  <jason@redhat.com>
5411
5412         * typeck.c (get_member_function_from_ptrfunc): Don't do
5413         gratuitious division and multiplication on
5414         ptrmemfunc_vbit_in_delta targets.
5415
5416 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5417
5418         PR c++/5373.
5419         * semantics.c (finish_expr_stmt): Remember the type of the
5420         expression before any conversions are performed.
5421
5422 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5423
5424         PR c++/5189.
5425         * call.c (add_template_candidate_real): Do not treat member
5426         templates as copy constructors.
5427
5428 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5429
5430         * decl.c (duplicate_decls): Do not copy the RTL for a variable
5431         declaration if the old variable had an incomplete type and the new
5432         variable does not.
5433         (complete_vars): Do not call layout_decl for completed variables.
5434
5435 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
5436
5437         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
5438         with an explicit one.
5439         (follow_tag_typedef): New.
5440         (lookup_tag): Use it to extract the tag of an explicit typedef.
5441         (xref_tag): Likewise.
5442
5443 2002-04-11  Andrew Haley  <aph@redhat.com>
5444
5445         * typeck.c (type_after_usual_arithmetic_conversions):
5446         If two types have the same variant, return immediately.
5447         When two floating-point operands are the same precision:
5448           convert to float if one of the operands is float;
5449           if neither operand is one of the standard types, return the type
5450           of the first operand.
5451
5452 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
5453
5454         PR c++/5507
5455         * decl.c (make_typename_type): Remove implicit typenameness.
5456
5457 2002-04-09  Jason Merrill  <jason@redhat.com>
5458
5459         PR optimization/6189
5460         * semantics.c (genrtl_start_function): Don't free
5461         DECL_SAVED_FUNCTION_DATA for inline functions.
5462
5463         * init.c (build_member_call): For now, don't convert to
5464         intermediate base if it would cause an error.
5465
5466 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
5467
5468         * parse.y (namespace_qualifier, maybe_identifier,
5469         begin_explicit_instantiation, end_explicit_instantiation,
5470         apparent_template_type, .finish_template_type,
5471         do_id, maybe_init, defarg_again, component_decl_1):
5472         Add ending ';', in accordance with POSIX.
5473
5474 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
5475
5476         PR c++/5571
5477         * class.c (layout_class_type): Remember incomplete static
5478         variables.
5479         (finish_struct_1): Call complete_vars, not
5480         hack_incomplete_structures.
5481         * cp-tree.h (hack_incomplete_structures): Rename to ...
5482         (complete_vars): ... this.
5483         (struct saved_scope): Remove incomplete.
5484         (namespace_scope_incomplete): Remove.
5485         * decl.c (struct binding_level): Remove incomplete.
5486         (incomplete_vars): New variable.
5487         (mark_binding_level): Don't mark incomplete.
5488         (print_binding_level): Don't print it.
5489         (mark_saved_scope): Don't mark incomplete.
5490         (pushdecl): Use maybe_register_incopmlete_var.
5491         (cxx_init_decl_processing): Register incomplete_vars for GC.
5492         (start_decl_1): Clarify error message.
5493         (hack_incomplete_vars): Remove.
5494         (maybe_register_incomplete_var): New function.
5495         (complete_vars): Likewise.
5496
5497 2002-04-06  Jason Merrill  <jason@redhat.com>
5498
5499         PR c++/4934
5500         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
5501         set before checking it.
5502
5503         PR c++/525
5504         * init.c (build_member_call): Use build_scoped_ref.
5505         (resolve_offset_ref): Likewise.
5506         * call.c (build_scoped_method_call): Likewise.
5507         * tree.c (maybe_dummy_object): Kludge around current_class_type being
5508         wrong.
5509         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
5510         * cp-tree.h: Adjust.
5511
5512         * init.c (push_base_cleanups): Just use build_scoped_method_call.
5513
5514         PR c++/6179
5515         * method.c (implicitly_declare_fn): Pass unqualified type to
5516         synthesize_exception_spec.
5517
5518 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
5519
5520         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
5521         * cvt.c: Update comment.
5522         * init.c (expand_cleanup_for_base): Update.
5523         * semantics.c (finish_parenthesized_expr): Update.
5524         * typeck.c (cp_truthvalue_conversion): Update.
5525
5526 2002-04-04  Jason Merrill  <jason@redhat.com>
5527
5528         * semantics.c (finish_eh_cleanup): New fn.
5529         * cp-tree.h: Add prototype.
5530         * init.c (perform_member_init, expand_cleanup_for_base): Use
5531         finish_eh_cleanup.
5532         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
5533         * cp-tree.h: Remove references.
5534         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
5535         * dump.c (cp_dump_tree): Likewise.
5536         * pt.c (tsubst_expr): Likewise.
5537         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
5538         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
5539         * tree.c (cp_statement_code_p): Likewise.
5540
5541         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
5542
5543         PR c++/5636
5544         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
5545         cleanup for nrv.
5546
5547         PR c++/5104
5548         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
5549         specifiers.
5550         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
5551
5552 2002-04-03  Richard Henderson  <rth@redhat.com>
5553
5554         * cp-lang.c (cxx_warn_unused_global_decl): New.
5555         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
5556
5557 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
5558
5559         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
5560         * tree.c (init_tree): Don't set hook.
5561
5562 2002-04-03  Roger Sayle  <roger@eyesopen.com>
5563
5564         PR c++/5998:
5565         * decl.c (duplicate_decls): Don't mess with assembler names when
5566         redeclaring builtin functions as static.
5567
5568 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5569
5570         * call.c (build_addr_func): Update.
5571         * class.c (resolve_address_of_overloaded_function): Update.
5572         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
5573         * cp-tree.h (cxx_mark_addressable): New.
5574         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
5575         * decl2.c (build_cleanup): Update.
5576         * except.c (build_throw): Update.
5577         * init.c (resolve_offset_ref): Update.
5578         * pt.c (convert_nontype_argument): Update.
5579         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
5580         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
5581         unary_complex_lvalue): Update.
5582         (mark_addressable): Rename.
5583
5584 2002-04-01  Roger Sayle  <roger@eyesopen.com>
5585
5586         PR c++/5998:
5587         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
5588         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
5589         but follow the SET_DECL_RTL idiom used elsewhere in the function.
5590
5591 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5592
5593         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
5594         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
5595         * decl.c (grokdeclarator): Update.
5596         * mangle.c (write_integer_cst): Update.
5597         * typeck.c (build_binary_op): Update.
5598
5599 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
5600
5601         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
5602         * lex.c (cxx_init): Don't set hook.
5603
5604 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
5605
5606         * Make-lang.in (error.o): Update.
5607         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
5608         * cp-tree.h (struct diagnostic_context): Predeclare.
5609         (cxx_print_error_function): New.
5610         * error.c: Include langhooks-def.h.
5611         (lang_print_error_function): Rename.  Update.
5612         (init_error): Don't set hook.
5613
5614 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
5615
5616         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
5617         Redefine.
5618         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
5619         * decl.c (finish_enum): Similarly.
5620         * error.c (dump_type): Similarly.
5621         * lex.c (cxx_init): Similarly.
5622         * mangle.c (write_builtin_type): Similarly.
5623         * typeck.c (comptypes): Similarly.
5624
5625 2002-03-28  Roger Sayle  <roger@eyesopen.com>
5626
5627         PR c++/5998:
5628         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
5629         in the g++ front-end.
5630         (duplicate_decl): Allow redefinition of anticipated built-ins.
5631         Fix inlining problem by over-writing the old DECL_RTL.
5632         (lookup_namespace_name): Fail to find an identifier in the
5633         specified namespace if its still anticipated.
5634         (builtin_function_1): New function split out from builtin_function
5635         to create a builtin in the current namespace with given context.
5636         (builtin_function): Call builtin_function_1 to define the
5637         appropriate builtins in both the std and global namespaces.
5638         (select_decl): Don't test for anticipated decls here.
5639         (unqualified_namespace_lookup): Instead ignore them whilst
5640         searching through scopes and namespaces.
5641         * decl2.c (do_nonmember_using_decl): If a using declaration
5642         specifies an anticipated built-in function, mark it as no longer
5643         anticipated in that scope.
5644         (ambiguous_decl):  Avoid resolving to an anticipated decl.
5645         * lex.c (do_scoped_id): Fail to find an identifier in the global
5646         namespace if its still anticipated.
5647
5648 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
5649
5650         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
5651         * cp-tree.h (cp_make_lang_type): Rename.
5652         * lex.c (cp_make_lang_type): Rename.
5653         (make_aggr_type): Update.
5654         * tree.c (init_tree): Don't set make_lang_type_fn.
5655
5656 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
5657
5658         PR c++/6073
5659         * class.c (finish_struct_1): Update static field's DECL_MODE even
5660         if its type is a variant of t.
5661
5662 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
5663
5664         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
5665         * cp-tree.h (cxx_insert_default_attributes): New.
5666         * decl.c (insert_default_attributes): Rename.
5667
5668 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
5669
5670         PR c++/4884
5671         * call.c (build_op_delete_call): Allow for the fact the placement
5672         may be a COMPOUND_EXPR.
5673
5674 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
5675
5676         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
5677         * cp-tree.h (init_cplus_expand): Remove.
5678         (cxx_expand_expr): New.
5679         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
5680         fix prototype.
5681         (init_cplus_expand): Remove.
5682         * lex.c (cxx_init): Don't call init_cplus_expand.
5683
5684 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
5685
5686         PR c++/4884.
5687         * init.c (build_new_1): Allow for the fact the result of
5688         build_function_call may be a COMPOUND_EXPR.
5689
5690 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
5691
5692         PR c++/5682
5693         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
5694         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
5695         (dfs_skip_nonprimary_vbases_markedp): Remove.
5696         * search.c (get_shared_vbase_if_not_primary): Remove.
5697         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
5698         (dfs_skip_nonprimary_vbases_markedp): Remove.
5699         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
5700         (dfs_marked_real_bases_queue_p): Likewise.
5701
5702 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
5703
5704         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
5705         * cp-tree.h (cxx_mark_tree): New.
5706         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
5707
5708 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5709
5710         * cp-tree.h (cxx_maybe_build_cleanup): New.
5711         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
5712         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
5713         * tree.c (build_target_expr): Update.
5714         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
5715
5716 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
5717
5718         * decl2.c (cxx_decode_option): Handle -E.
5719         * lang-specs.h (default_compilers): Preprocess with cc1plus.
5720         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
5721
5722 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
5723
5724         PR c++/6037
5725         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
5726
5727 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5728
5729         * error.c (dump_type): Be careful about implicit typenames.
5730
5731 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5732
5733         PR C++/3656
5734         * semantics.c (finish_base_specifier): Handle erronous base
5735         classes.
5736
5737 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
5738
5739         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
5740         REAL_IS_NOT_DOUBLE.
5741
5742 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
5743
5744         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
5745         an index into the vtable_entry array regardless of
5746         TARGET_PTRMEMFUNC_VBIT_LOCATION.
5747
5748 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
5749
5750         * tree.c (cp_cannot_inline_tree_fn): Same.
5751
5752 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
5753
5754         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
5755         insert_block, getdecls, global_bindings_p): New.
5756
5757 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
5758
5759         PR c++/4361
5760         * mangle.c (struct globals) Add internal_mangling_p member.
5761         (write_template_param): Do internal mangling, if needed.
5762         (mangle_conv_op_name_for_type): Request internal mangling.
5763
5764 2002-03-20  Jason Merrill  <jason@redhat.com>
5765
5766         PR c++/2136
5767         * init.c (build_delete): Check access for a member op delete here.
5768         * decl2.c (delete_sanity): Not here.
5769
5770 2002-03-19  Jason Merrill  <jason@redhat.com>
5771
5772         PR c++/5118
5773         * class.c (get_vfield_name): Use the constructor_name.
5774
5775 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
5776
5777         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
5778         * cp-tree.h (lang_printable_name): Rename.
5779         * error.c (lang_decl_name): Use new hook.
5780         * lex.c (cxx_init): Remove old hook.
5781         * pt.c (tsubst_decl): Use new hook.
5782         * tree.c (lang_printable_name): Rename.
5783
5784 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
5785
5786         PR c++/3882
5787         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
5788         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
5789         only after recording the declaration.
5790
5791 2002-03-18  Jason Merrill  <jason@redhat.com>
5792
5793         PR c++/2039
5794         * init.c (resolve_offset_ref): Hand off to build_component_ref.
5795
5796         PR c++/4222, c++/5995
5797         * call.c (build_over_call): Fix empty class logic.
5798
5799         PR c++/3870
5800         * cp-tree.h (struct saved_scope): Add last_parms field.
5801         * decl.c (maybe_push_to_top_level): Save last_function_parms.
5802         (pop_from_top_level): Restore it.
5803
5804         PR c++/4377
5805         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
5806         NON_LVALUE_EXPRs.
5807
5808         PR c++/4003
5809         * pt.c (tsubst_friend_function): Use decl_namespace_context.
5810
5811         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
5812         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
5813         type with a nontrivial destructor.
5814
5815 2002-03-17  Jason Merrill  <jason@redhat.com>
5816
5817         PR c++/4460
5818         * class.c (build_base_path): Virtual base layout is fixed in
5819         in-charge [cd]tors.
5820
5821 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
5822
5823         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
5824         * parse.y (yyparse): Remove macro.
5825
5826 2002-03-17  Jason Merrill  <jason@redhat.com>
5827
5828         PR c++/5757
5829         * init.c (build_new_1): Pass the right pointer to op delete.
5830
5831 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
5832
5833         PR c++/4361
5834         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
5835         conversion operators go.
5836         (struct lang_decl_flags): Add template_conv_p and unused
5837         bitfields.
5838         (DECL_TEMPLATE_CONV_FN_P): New macro.
5839         * call.c (build_user_type_conversion_1): Don't check second type
5840         conversion of overload set first.
5841         * class.c (add_method): Make sure templated conversion operators
5842         all end up on slot 2.
5843         * lex.c (do_identifier): A conversion operator token might be
5844         satisfied by a templated conversion operator.
5845         * pt.c (check_explicit_specialization): Use
5846         CLASSTYPE_FIRST_CONVERSION_SLOT.
5847         (template_parm_this_level_p): New function.
5848         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
5849         * search.c (lookup_fnfields_1): Template conversions will be on
5850         the first slot.
5851         * typeck.c (build_component_ref): Preserve the type of an
5852         conversion operator name on the overload type.
5853         (build_x_function_call): Retrieve the conversion operator name.
5854
5855 2002-03-15  Richard Henderson  <rth@redhat.com>
5856
5857         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
5858
5859 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
5860
5861         * cp-tree.h (CLEANUP_DECL): Remove.
5862         (CLEANUP_EXPR): Likewise.
5863         * decl.c (destroy_local_var): Simplify.
5864         (maybe_build_cleanup): Tidy.
5865         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
5866         * semantics.c (cp_expand_stmt): Likewise.
5867         * cp/tree.c (cp_statement_code_p): Likewise.
5868
5869 2002-03-15  Jason Merrill  <jason@redhat.com>
5870
5871         PR c++/5857
5872         * decl.c (duplicate_decls): Use merge_types instead of common_type.
5873         * typeck.c (common_type): Just hand off to
5874         type_after_usual_arithmetic_conversions and
5875         composite_pointer_type.
5876         (merge_types): New fn.
5877         (commonparms): Use it instead of common_type.
5878         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
5879         (composite_pointer_type): Also handle attributes.
5880         * cp-tree.h: Declare merge_types.
5881
5882         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
5883         variables.
5884         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
5885
5886 2002-03-14  Richard Henderson  <rth@redhat.com>
5887
5888         * decl.c: Include c-pragma.h.
5889         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
5890         * Make-lang.in: Update dependencies.
5891
5892 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
5893
5894         PR c++/5908
5895         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
5896         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
5897
5898 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
5899
5900         * mangle.c (write_builtin_type): Handle 128-bit integers even if
5901         they are not a standard integer type.
5902
5903 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
5904
5905         * cp-tree.h (init_init_processing): Remove declaration.
5906         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
5907         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
5908
5909 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5910
5911         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
5912         Define.
5913         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
5914         tree_code_length.
5915         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
5916         cplus_tree_code_name): Delete.
5917         (cxx_init): Don't call add_c_tree_codes, instead set
5918         lang_unsafe_for_reeval.  Don't try to copy into the various
5919         tree_code arrays.
5920
5921 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
5922
5923         PR c++/5659
5924         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
5925         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
5926         definitions.
5927
5928 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
5929
5930         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
5931         DR209 is now not a defect.
5932         * cp-tree.h (skip_type_access_control): Remove.
5933         * decl.c (grokdeclarator): Do type access control for friend
5934         declarations.
5935         * semantics.c (decl_type_access_control): Don't reset
5936         current_type_lookups.
5937         (save_type_access_control): Always save the lookups.
5938         (skip_type_access_control): Remove.
5939         (finish_class_definition): Don't change type_lookups.
5940
5941 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
5942
5943         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
5944         It is incorrect.
5945         * typeck.c (build_static_cast): Compare non-qualified types
5946         with pointer to member conversions.
5947
5948 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
5949             Daniel Berlin  <dan@dberlin.org>
5950
5951         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
5952         (cxx_get_alias_set): Use it.
5953
5954 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5955
5956         * cp-tree.h (stabilize_expr): Prototype.
5957
5958 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5959
5960         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
5961         conditional return void.
5962
5963 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
5964
5965         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
5966         * cp-tree.h (cxx_unsave): New.
5967         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
5968         (init_tree): Update.
5969
5970 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5971
5972         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
5973         explicit sizeof/sizeof.
5974         * decl2.c (cxx_decode_option): Likewise.
5975         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
5976
5977 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
5978
5979         PR c++/775
5980         * decl.c (lookup_tag): Only reject enum/class mismatch, not
5981         class/union mismatch.
5982         * parse.y (check_class_key): New function.
5983         (structsp): Call it.
5984
5985 2002-03-01  Michael Matz  <matz@suse.de>
5986
5987         * typeck.c (cp_pointer_int_sum): Complete inner type which is
5988         used later by size_in_bytes().
5989
5990 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
5991
5992         * cp-tree.h:  Require __GNUC__ to be #defined.
5993         (build_init):  Add missing prototype.
5994
5995 2002-03-01  Jason Merrill  <jason@redhat.com>
5996
5997         * except.c: Don't include decl.h or obstack.h.  Do include
5998         tree-inline.h.
5999         (build_throw): Destroy temporaries from the thrown
6000         expression before calling __cxa_throw.  Construct a thrown
6001         temporary directly into the exception object.
6002         (stabilize_throw_expr): New function.
6003         (wrap_cleanups_r): New function.
6004         * tree.c (stabilize_expr): New function.
6005         * init.c (build_init): New function.
6006         * Make-lang.in (cp/except.o): Adjust .h deps.
6007
6008 2002-02-28  Jason Merrill  <jason@redhat.com>
6009
6010         * search.c (lookup_base_r): Don't clear is_non_public just because
6011         we found a friendly scope.
6012
6013         * decl.c (finish_function): Only warn about missing return
6014         statement with -Wreturn-type.
6015
6016 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
6017
6018         * class.c (build_clone): Update.
6019         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
6020         * cp-tree.h (cxx_dup_lang_specific_decl): New.
6021         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
6022         (copy_decl): Update.
6023         * method.c (make_thunk): Update.
6024
6025 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
6026
6027         * decl2.c: Delete traditional-mode-related code copied from
6028         the C front end but not used, or used only to permit the
6029         compiler to link.
6030
6031 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
6032
6033         PR c++/4093
6034         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
6035         to void.
6036
6037 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
6038
6039         PR other/5746
6040         * semantics.c (finish_switch_cond): Don't call get_unwidened
6041         if error_mark_node.
6042
6043 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
6044
6045         PR c++/2645, DR 295
6046         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
6047         tf_keep_type_decl.
6048         (make_typename_type): Use tsubst_flags_t.
6049         * decl.c (make_typename_type): Adjust. Return non-artificial
6050         TYPE_DECLs, if required.
6051         (grokdeclarator): Simplify CVR qualification handling. Allow bad
6052         qualifiers on typedef types.
6053         * decl2.c (handle_class_head): Adjust make_typename_type call.
6054         * parse.y (nested_name_specifier): Likewise.
6055         (typename_sub0): Likewise.
6056         (typename_sub1): Likewise.
6057         * pt.c (convert_template_argument): Adjust make_typename_type
6058         return value.
6059         (tsubst): Adjust cp_build_qualified_type_real calls.
6060         (check_cv_quals_for_unify): Cope with allowing bad qualifications
6061         on template type parms.
6062         (instantiate_decl): Recheck substitutions to give warnings on bad
6063         qualifications.
6064         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
6065
6066 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
6067
6068         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
6069
6070         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
6071         unless DECL_ALWAYS_INLINE.
6072
6073 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
6074
6075         * typeck.c (cp_pointer_int_sum): Renamed from
6076         pointer_int_sum, call pointer_int_sum.
6077
6078 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
6079
6080         * decl.c (duplicate_decls): Return 0 if issued error about
6081         redeclaration.
6082
6083 2002-02-19  Jason Merrill  <jason@redhat.com>
6084
6085         ABI change: Mangle `void (A::*)() const' as
6086         M1AKFvvE, not MK1AFvvE.
6087         * mangle.c (write_function_type): Write cv-quals for member
6088         function type here.
6089         (write_pointer_to_member_type): Not here.
6090
6091 2002-02-18  Jason Merrill  <jason@redhat.com>
6092
6093         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
6094         (do_decl_instantiation): Likewise.
6095
6096 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6097
6098         PR c++/5685
6099         * decl.c (duplicate_decls): Make warning unconditional
6100         if duplicate default argument declarations are present.
6101
6102 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
6103
6104         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
6105         shortening.
6106
6107 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
6108
6109         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
6110         remove incorrect comment. Move #if 0'd code to common path. Use
6111         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
6112
6113 2002-02-13  Jason Merrill  <jason@redhat.com>
6114
6115         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
6116         (finish_function): Don't warn if current_function_returns_null.
6117
6118         * typeck2.c (digest_init): Do handle values of vector type.
6119
6120         * typeck2.c (digest_init, process_init_constructor): Treat vectors
6121         like arrays.
6122
6123 2002-02-11  Jason Merrill  <jason@redhat.com>
6124
6125         * parse.y (reserved_declspecs): Don't handle attributes.
6126         (reserved_typespecquals): Handle them here.
6127         * Make-lang.in (parse.c): Adjust expected conflicts.
6128
6129 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
6130
6131         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
6132         instead of compstmt.
6133         (compstmt_or_stmtexpr): Renamed from compstmt.
6134         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
6135
6136 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
6137
6138         Rename instantiate_type_flags to tsubst_flags_t & expand use.
6139         * cp-tree.h (instantiate_type_flags): Rename to ...
6140         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
6141         add tf_warning flag.
6142         (instantiate_type): Adjust prototype.
6143         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
6144         do_type_instantiation, cp_build_qualified_type_real): Likewise.
6145         cp_build_qualified_type: Adjust.
6146         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
6147         tf_*.
6148         * call.c (standard_conversion): Rename itf_* to tf_*.
6149         (reference_binding): Likewise.
6150         (convert_like_real): Likewise.
6151         * cvt.c (cp_convert_to_pointer): Likewise.
6152         (convert_to_reference): Likewise.
6153         * decl.c (lookup_namespace_name): Use tf_* flags.
6154         (make_typename_type): Likewise.
6155         (grokdeclarator): Likewise.
6156         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
6157         (coerce_template_template_parms, convert_template_argument,
6158         coerce_template_parms, maybe_get_template_decl_from_type_decl,
6159         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
6160         instantiate_class_template, tsubst_template_arg_vector,
6161         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
6162         tsubst_decl, tsubst_arg_types, tsubst_function_type,
6163         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
6164         instantiate_template, fn_type_unification,
6165         resolve_overloaded_unification, verify_class_unification,
6166         unify, get_bindings_real, do_type_instantiation,
6167         regenerate_decl_from_template, instantiate_decl,
6168         tsubst_initializer_list, tsubst_enum,
6169         get_mostly_instantiated_function_type,
6170         invalid_nontype_parm_type_p): Likewise.
6171         * tree.c (cp_build_qualified_type_real): Likewise.
6172         * typeck.c (build_binary_op): Rename itf_* to tf_*.
6173         (build_ptrmemfunc): Likewise.
6174         (convert_for_assignment): Likewise.
6175
6176 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
6177
6178         PR c++/109
6179         * decl.c (grokdeclarator): Allow friend declarations from
6180         dependent types.
6181         * decl2.c (handle_class_head): Don't push into template parm contexts.
6182         * pt.c (push_template_decl_real): Template parm contexts are never
6183         being defined.
6184
6185 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
6186
6187         * class.c: Include target.h.
6188         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
6189         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
6190         bit-field layout.
6191         * Make-lang.in: Adjust deps.
6192
6193 2002-02-05  Jason Merrill  <jason@redhat.com>
6194
6195         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
6196
6197 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
6198
6199         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
6200         (finish_switch_cond): Set SWITCH_TYPE.
6201
6202 2002-02-04  Richard Henderson  <rth@redhat.com>
6203
6204         * method.c (use_thunk): Always initialize the block tree.  Reindent.
6205         * semantics.c (expand_body): Emit thunks after function, not before.
6206
6207 2002-02-04  Jason Merrill  <jason@redhat.com>
6208
6209         * decl.c (start_function): Call cplus_decl_attributes immediately
6210         after grokdeclarator.
6211
6212         * decl.c (start_function): Combine DECL_RESULT handling code.
6213
6214 2002-02-03  Jason Merrill  <jason@redhat.com>
6215
6216         * xref.c: Remove.
6217         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
6218         (cp/xref.o): Remove dependencies.
6219         * class.c (finish_struct_1, check_methods): Don't call xref fns.
6220         (finish_struct_1): Likewise.
6221         * friend.c (make_friend_class): Likewise.
6222         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
6223         * spew.c (read_process_identifier): Likewise.
6224
6225 2002-02-01  Jason Merrill  <jason@redhat.com>
6226
6227         PR c++/4872
6228         * decl.c (finish_function): Warn about a non-void function with
6229         no return statement and no abnormal exit.
6230         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
6231         (current_function_returns_abnormally): New macro.
6232         * call.c (build_call): Set it.
6233
6234         * typeck.c (build_component_ref): Always complain about offsetof
6235         constructs on non-PODs.  Only make it an error for members of
6236         virtual bases.
6237
6238         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
6239         (dump_function_decl): Always dump parms.
6240
6241         * decl2.c (finish_static_data_member_decl): Complain about a local
6242         class with a static data member.
6243
6244         PR c++/4286
6245         * search.c (lookup_field_1): Don't xref a static data member
6246         just because we looked it up.
6247
6248 2002-01-31  Jason Merrill  <jason@redhat.com>
6249
6250         * Make-lang.in (parse.c): Handle .output file.
6251
6252         PR c++/3395
6253         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
6254         not TREE_TYPE.
6255         * semantics.c (finish_class_definition): Adjust.
6256
6257         Allow attributes in parms and casts.
6258         * parse.y (named_parm): Don't strip attrs.
6259         (declmods): Remove 'attributes' production.
6260         (nonempty_cv_qualifiers): Accept attributes.
6261         (ATTRIBUTE): Give precedence.
6262         * decl.c (groktypename): Handle attributes.
6263         (grokparms): Likewise.
6264
6265 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
6266
6267         * decl2.c (cxx_decode_option): Pass 0 as last argument to
6268         cpp_handle_option.
6269         * lang-specs.h: Use cpp_unique_options instead of cpp_options
6270         when used together with cc1_options.
6271
6272 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
6273
6274         PR c++/5132
6275         * typeck2.c (digest_init): Make sure non-array core type is
6276         instantiated.
6277         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
6278         constructor, rather than build a new one.
6279         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
6280         PURPOSE of constructor elts.
6281
6282 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
6283
6284         * Make-lang.in (parse.c): Adjust expected number of
6285         shift-reduce conflicts.
6286         (decl.o): Depend on diagnostic.h.
6287         * decl.c: Include diagnostic.h.
6288         (grokdeclarator): Check for null pointer.
6289         (finish_function): Don't abort when
6290         current_binding_level->parm_flag != 1, if errors have
6291         occurred; throw away the statement tree and extra binding
6292         levels, and continue.
6293         * lex.c (note_list_got_semicolon): Check for null pointer.
6294         * method.c (hack_identifier): Just return error_mark_node if
6295         value is error_mark_node.
6296         * parse.y (primary: TYPEID(type_id)): No need to use
6297         TYPE_MAIN_VARIANT here.
6298         (handler_seq): Accept an empty list of catch clauses and
6299         generate a fake handler block to avoid later crashes.
6300         (ansi_raise_identifier): Accept the error token too.
6301         * semantics.c (begin_class_definition,
6302         finish_class_definition): Check for error_mark_node.
6303
6304 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
6305
6306         * typeck2.c (friendly_abort): Delete definition.
6307         * cp-tree.h (friendly_abort): Don't prototype.
6308         (my_friendly_assert): Use fancy_abort.
6309
6310 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6311
6312         * cp-tree.h (my_friendly_abort): Remove.
6313
6314 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
6315
6316         * spew.c (pending_inlines, pending_inlines_tail,
6317         processing_these_inlines): Make static.
6318         (mark_pending_inlines): Remove static.
6319         (begin_parsing_inclass_inline): If in function, save pi
6320         for GC to cp_function_chain->unparsed_inlines instead.
6321         (process_next_inline): Likewise.
6322         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
6323         (mark_pending_inlines): Add prototype.
6324         * decl.c (spew_debug): Remove unused extern.
6325         (mark_lang_function): Call mark_pending_inlines.
6326
6327 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6328
6329         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
6330         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
6331         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
6332         Change my_fancy_abort() to abort().
6333
6334 2002-01-23  Jason Merrill  <jason@redhat.com>
6335
6336         PR c++/5453
6337         * class.c (fixed_type_or_null): Fix thinko.
6338
6339         PR c++/3331
6340         * init.c (resolve_offset_ref): Use build_indirect_ref.
6341
6342         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
6343
6344 2002-01-22  Jason Merrill  <jason@redhat.com>
6345
6346         * parse.y (function_body): Suppress the block for the outermost
6347         curly braces.
6348         * decl.c (pushdecl): Don't try to skip it.
6349         (begin_function_body): Keep the block we create, not the next one.
6350         * init.c (emit_base_init): Don't mess with keep_next_level.
6351
6352         * class.c (build_base_path): Tweak formatting.
6353
6354 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
6355
6356         Fix regression introduced with patch for c++/775
6357         * parse.y (class_head_defn): Check for template specializations
6358         with a different class-key.
6359
6360 2002-01-17  Jason Merrill  <jason@redhat.com>
6361
6362         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
6363         (begin_function_body): Call them and keep_next_level.
6364         * init.c (emit_base_init): Call keep_next_level.
6365         * semantics.c (setup_vtbl_ptr): Lose.
6366         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
6367         (vtbls_set_up_p): Lose.
6368         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
6369         * method.c (do_build_copy_constructor): Likewise.
6370         (synthesize_method): Call finish_mem_initializers.
6371         * parse.y (nodecls): Likewise.
6372
6373         * error.c (dump_type_suffix): Print the exception specs before
6374         recursing.
6375         (dump_function_decl): Here, too.
6376
6377         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
6378
6379 2002-01-10  Ira Ruben   <ira@apple.com>
6380
6381         PR c++/907
6382         * decl.c (start_method): Handle attrlist.
6383
6384 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
6385
6386         * decl2.c (max_tinst_depth): Increase default limit to 500.
6387
6388 2002-01-10  Graham Stott  <grahams@redhat.com>
6389
6390         * spew.c (YYCHAR): Uppercase macro parameter and add
6391         parenthesis.
6392         (YYCODE): Likewise.
6393         (NAME): Uppercase macro parameter.
6394
6395 2002-01-09  Graham Stott  <grahams@redhat.com>
6396
6397         * decl.h (grokdeclarator): Wrap long line.
6398
6399         * semantics.c (FINISH_COND): Uppercase macro paramaters and
6400         add parenthesis.
6401
6402 2002-01-08  Graham Stott  <grahams@redhat.com>
6403
6404         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
6405         (PALLOC): Uppercase macro parameter and whitespace.
6406         (SALLOC): Uppercase macro parameter.
6407         (SFREE): Uppercase macros parameter, add parenthese and
6408         whitespace.
6409         (STREQL): Uppercase macro parameter and whitespace.
6410         (STRNEQ): Likewise.
6411         (STRLSS): Likewise.
6412         (STRLEQ): Likewise.
6413         (STRGTR): Likewise.
6414         (STRGEQ): Likewise.
6415
6416         * call.c (convert_like): Add parenthesis and wrap.
6417         (convert_like_with_context): Likewise.
6418         (ICS_RANK): Whitespace.
6419         (NEED_TEMPORARY_P): Remove parenthesis.
6420
6421         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
6422         whitespace.
6423         (VTT_MARKED_BINFO_P): Likewise.
6424
6425         * decl.c (BINDING_LEVEL): Add parenthesis.
6426         (DEF_OPERATOR): Likewise.
6427
6428         * mangle.c (MANGLE_TRACE): Add parenthesis.
6429         (MANGLE_TRACE_TREE): Likewise.
6430         (write_signed_number): Likewise.
6431         (write_unsigned_number): Likewise.
6432
6433         * pt.c (ccat): Uppercase macro parameter.
6434         (cat): Likewise
6435
6436         * search.c (SET_BINFO_ACCESS): Add parenthesis.
6437
6438 2002-01-07  Jason Merrill  <jason@redhat.com>
6439
6440         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
6441         to pedwarn.
6442
6443         PR c++/3536
6444         * method.c (make_thunk): If !flag_weak, give the thunk the
6445         function's linkage.
6446         (use_thunk): Here, too.
6447
6448 2002-01-07  Graham Stott  <grahams@redhat.com>
6449
6450         * error.c: Update copyright date.
6451         (print_scope_operator): Add parenthesis.
6452         (print_left_paren): Likewise.
6453         (print_right_paren): Likewise.
6454         (print_left_bracket): Likewise.
6455         (print_right_bracket): Likewise.
6456         (print_template_argument_list_start): Likewise.
6457         (print_template_argument_list_end): Likewise.
6458         (print_non_consecutive_character): Likewise.
6459         (print_tree_identifier): Likewise.
6460         (print_identifier): Likewise.
6461         (NEXT_CODE): Uppercase macro parameter.
6462         (ident_fndecl): Delete unused.
6463         (GLOBAL_THING): Likewise.
6464
6465 2002-01-06  Graham Stott  <grahams@redhat.com>
6466
6467         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
6468         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
6469         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
6470         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
6471         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
6472         (C_IS_RESERVED_WORD): Uppercase macro parameter.
6473         (C_RID_YYCODE) Likewise.
6474         (ptrmem_cst): Use rtx.
6475         (LOCAL_BINDING_P): Add whitespace.
6476         (INHERITED_VALUE_BINDING_P): Likewise.
6477         (BINDING_SCOPE): Wrap long line.
6478         (BINDING_HAS_LEVEL_P): Remove parenthesis.
6479         (BINDING_VALUE): Wrap long line.
6480         (BINDING_TYPE): Whitespace.
6481         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
6482         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
6483         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
6484         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
6485         (same_type_p): Uppercase macro parameters.
6486         (same_type_ignoring_top_level_qualifiers_p): Likewise.
6487         (OVL_FUNCTION): Wrap long line.
6488         (OVL_CHAIN): Whitespace.
6489         (OVL_CURRENT): Add parenthesis and whitespace.
6490         (OVL_NEXT): Whitespace.
6491         (OVL_USED): Likewise.
6492         (IDENTIFIER_TYPE_VALUE): Likewise.
6493         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
6494         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
6495         (LANG_ID_FIELD): Whitespace.
6496         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
6497         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
6498         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
6499         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
6500         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
6501         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
6502         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
6503         (IDENTIFIER_VIRTUAL_P): Likewise.
6504         (IDENTIFIER_OPNAME_P): Likewise.
6505         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
6506         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
6507         (C_SET_EXP_ORIGINAL_CODE): Likewise.
6508         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
6509         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
6510         (IS_AGGR_TYPE): Uppercase macro parameter.
6511         (CLASS_TYPE_P): Likewise.
6512         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
6513         (IS_AGGR_TYPE_2): Whitespace.
6514         (TAGGED_TYPE_P): Uppercase macro parameter.
6515         (TYPE_BUILT_IN): Whitespace.
6516         (TYPE_FOR_JAVA): Likewise.
6517         (FUNCTION_ARG_CHAIN): Remove parenthesis.
6518         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
6519         (FUNCTION_FIRST_USER_PARAM): Likewise.
6520         (PROMOTES_TO_AGGR_TYPE): Whitespace.
6521         (DERIVED_FROM_P): Add parenthesis and wrap.
6522         (UNIQUELY_DERIVED_FROM_P): Likewise.
6523         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
6524         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
6525         (CLASSTYPE_USE_TEMPLATE): Whitespace.
6526         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
6527         (TYPE_GETS_DELETE): Add parenthesis.
6528         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
6529         (TYPE_HAS_ASSIGN_REF): Likewise,
6530         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
6531         (TYPE_HAS_INIT_REF): Likewise.
6532         (TYPE_HAS_CONST_INIT_REF): Likewise.
6533         (TYPE_BEING_DEFINED): Likewise.
6534         (TYPE_LANG_SPECIFIC): Likewise.
6535         (CLASSTYPE_RTTI): Likewise.
6536         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
6537         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
6538         (TYPE_OVERLOADS_ARROW): Likewise.
6539         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
6540         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
6541         (CLASSTYPE_METHOD_VEC): Likewise.
6542         (CLASSTYPE_MARKED_N): Likewise.
6543         (CLASSTYPE_MARKED): Likewise.
6544         (CLASSTYPE_MARKED2): Likewise.
6545         (CLASSTYPE_MARKED3): Likewise.
6546         (CLASSTYPE_MARKED4): Likewise.
6547         (CLASSTYPE_MARKED5): Likewise.
6548         (CLASSTYPE_MARKED6): Likewise.
6549         (SET_CLASSTYPE_MARKED): Whitespace.
6550         (CLEAR_CLASSTYPE_MARKED): Likewise.
6551         (SET_CLASSTYPE_MARKED2): Likewise.
6552         (CLEAR_CLASSTYPE_MARKED2): Likewise.
6553         (SET_CLASSTYPE_MARKED3): Likewise.
6554         (CLEAR_CLASSTYPE_MARKED3): Likewise.
6555         (SET_CLASSTYPE_MARKED4): Likewise.
6556         (CLEAR_CLASSTYPE_MARKED4): Likewise.
6557         (SET_CLASSTYPE_MARKED5): Likewise.
6558         (CLEAR_CLASSTYPE_MARKED5): Likewise.
6559         (SET_CLASSTYPE_MARKED6): Likewise.
6560         (CLEAR_CLASSTYPE_MARKED6): Likewise.
6561         (CLASSTYPE_TAGS): Likewise.
6562         (CLASSTYPE_VSIZE): Likewise.
6563         (CLASSTYPE_VBASECLASSES): Likewise.
6564         (CANONICAL_BINFO): Add parenthesis.
6565         (CLASSTYPE_SIZE(NODE): Likewise.
6566         (CLASSTYPE_SIZE_UNIT): Likewise.
6567         (CLASSTYPE_ALIGN(NODE): Likewise.
6568         (CLASSTYPE_USER_ALIGN): Likewise.
6569         (TYPE_JAVA_INTERFACE): Likewise.
6570         (CLASSTYPE_PURE_VIRTUALS): Likewise.
6571         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
6572         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
6573         (CLASSTYPE_HAS_MUTABLE): Likewise.
6574         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
6575         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
6576         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
6577         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
6578         (CLASSTYPE_INTERFACE_ONLY): Likewise.
6579         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
6580         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
6581         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
6582         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
6583         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
6584         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
6585         (BINFO_UNSHARED_MARKED): Whitespace.
6586         (BINFO_MARKED): Whitespace and wrap.
6587         (SET_BINFO_MARKED): Likewise.
6588         (CLEAR_BINFO_MARKED): Likewise.
6589         (BINFO_VTABLE_PATH_MARKED): Likewise.
6590         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
6591         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
6592         (BINFO_SUBVTT_INDEX): Remove parenthesis.
6593         (BINFO_VPTR_INDEX): Likewise.
6594         (BINFO_PRIMARY_BASE_OF): Likewise,
6595         (CLASSTYPE_VFIELDS): Whitespace.
6596         (VF_DERIVED_VALUE): Wrap long line.
6597         (NAMESPACE_LEVEL): Whitespace.
6598         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
6599         (DEFARG_POINTER): Whitespace.
6600         (DECL_NEEDED_P): Remove parenthesis.
6601         (DECL_LANGUAGE): Whitespace.
6602         (SET_DECL_LANGUAGE): Add parenthesis.
6603         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
6604         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
6605         (DECL_IN_AGGR_P): Whitespace.
6606         (DECL_FRIEND_P): Likewise.
6607         (DECL_BEFRIENDING_CLASSES): Likewise.
6608         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
6609         (DECL_NONCONVERTING_P): Whitespace.
6610         (DECL_PURE_VIRTUAL_P): Likewise.
6611         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
6612         (DECL_PENDING_INLINE_INFO): Whitespace.
6613         (DECL_SORTED_FIELDS): Likewise.
6614         (DECL_DEFERRED_FN): Likewise.
6615         (DECL_TEMPLATE_INFO): Likewise.
6616         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
6617         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
6618         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
6619         (TMPL_ARGS_LEVEL): Likewise.
6620         (SET_TMPL_ARGS_LEVEL): Likewise.
6621         (INNERMOST_TEMPLATE_PARMS): Whitespace.
6622         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
6623         (INTEGRAL_CODE_P(CODE): Add parenthesis.
6624         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
6625         (TYPE_HAS_CONSTRUCTOR): Whitespace.
6626         (TREE_HAS_CONSTRUCTOR): Likewise.
6627         (TYPE_HAS_DESTRUCTOR): Likewise.
6628         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
6629         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
6630         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
6631         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
6632         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
6633         (TYPE_PTRMEMFUNC_P): Likewise.
6634         (TYPE_PTRMEMFUNC_FLAG): Likewise.
6635         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
6636         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
6637         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
6638         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
6639         (DECL_ACCESS): Whitespace.
6640         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
6641         (DECL_GLOBAL_DTOR_P): Likewise.
6642         (GLOBAL_INIT_PRIORITY): Likewise.
6643         (DECL_TEMPLATE_PARMS): Likewise.
6644         (DECL_TEMPLATE_RESULT): Likewise.
6645         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
6646         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
6647         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
6648         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
6649         (PRIMARY_TEMPLATE_P): Add parenthesis.
6650         (DECL_USE_TEMPLATE): Whitespace.
6651         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
6652         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
6653         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
6654         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
6655         (CALL_DECLARATOR_PARMS): Remove parenthesis.
6656         (CALL_DECLARATOR_QUALS): Likewise.
6657         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
6658         (TEMP_NAME_P): Wrap.
6659         (VFIELD_NAME_P): Likewise.
6660         (B_SET): Uppercase macro parameters and add parenthesis.
6661         (B_CLR): Likewise.
6662         (B_TST): Likewise.
6663         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
6664         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
6665         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
6666         (same_or_base_type_p): Likewise.
6667         (cp_deprecated): Likewise.
6668
6669 2002-01-05  Richard Henderson  <rth@redhat.com>
6670
6671         * semantics.c (expand_body): Revert last change.
6672
6673 2002-01-04  Jason Merrill  <jason@redhat.com>
6674
6675         PR c++/4122
6676         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
6677         lost primary.
6678
6679         * class.c (build_vtbl_initializer): Check for a lost primary
6680         before calculating the vtable entry to throw away.
6681
6682 2002-01-02  Jason Merrill  <jason@redhat.com>
6683
6684         * semantics.c (expand_body): Call outlining_inline_function when
6685         emitting an inline function out of line.
6686
6687 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6688
6689         PR c++/5116, c++/764 reversion
6690         * call.c (build_new_op): Revert the instantiations. They are
6691         incorrect.
6692
6693 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6694
6695         PR c++/5089
6696         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
6697
6698 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6699
6700         PR c++/3716
6701         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
6702         (tsubst, case POINTER_TYPE): Handle pmfs here.
6703         (tsubst, case OFFSET_TYPE): Check it is not an offset to
6704         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
6705
6706 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6707
6708         PR c++/35
6709         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
6710         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
6711         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
6712         PARM_DECL.
6713         (tsubst_template_parms): Break up loop statements.
6714         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
6715         parm PARM_DECLs don't get promoted.
6716
6717 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6718
6719         PR c++/5123
6720         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
6721         (build_x_function_call): Cope with a COMPONENT_REF containing a
6722         TEMPLATE_ID_EXPR.
6723
6724 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6725
6726         PR c++/5213
6727         * pt.c (convert_template_argument): Be more careful determining
6728         when RECORD_TYPE templates are or are not templates.
6729
6730 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6731
6732         PR c++/775
6733         * cp-tree.h (handle_class_head): Adjust prototype.
6734         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
6735         parameters. Use for all class heads.
6736         * parse.y (named_class_head_sans_basetype, named_class_head,
6737         named_complex_class_head_sans_basetype,
6738         named_class_head_sans_basetype_defn,
6739         unnamed_class_head): Remove.
6740         (class_head, class_head_apparent_template): Recognize class heads
6741         (class_head_decl, class_head_defn): New reductions. Process class
6742         heads.
6743         (structsp): Adjust class definition and class declaration
6744         reductions.
6745         (maybe_base_class_list): Give diagnostic on empty list.
6746
6747 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6748
6749         PR c++/4379
6750         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
6751         single non-static member.
6752         (unary_complex_lvalue): If it cannot be a pointer to member, don't
6753         make it so. Check it is not pointer to reference.
6754
6755 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6756
6757         PR c++/5132
6758         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
6759         are processing a template decl.
6760
6761 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6762
6763         PR c++/5116, c++/764
6764         * call.c (build_new_op): Make sure template class operands are
6765         instantiated. Simplify arglist construction.
6766
6767 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6768
6769         * call.c (build_user_type_conversion_1): Use my_friendly_assert
6770         rather than if ... abort.
6771         * cvt.c (convert_to_reference): Likewise.
6772         * semantics.c (setup_vtbl_ptr): Likewise.
6773         * pt.c (lookup_template_class): Comment typo.
6774
6775 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6776
6777         PR c++/5125
6778         * pt.c (push_template_decl_real): Make sure DECL has
6779         DECL_LANG_SPECIFIC.
6780
6781 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6782
6783         PR c++/335
6784         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
6785         for non-reference fields.
6786         * typeck.c (require_complete_type): Use resolve_offset_ref).
6787
6788 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
6789
6790         PR c++/196
6791         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
6792
6793 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
6794
6795         PR c++/160
6796         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
6797         up. Don't stabilize_references when initializing a reference.
6798
6799 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6800
6801         * decl2.c (lang_f_options): Const-ify.
6802
6803 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
6804
6805         * config-lang.in (diff_excludes): Remove.
6806
6807 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
6808
6809         PR c++/90
6810         * typeck.c (build_function_call_real): Use original function
6811         expression for errors.
6812
6813 2001-12-18  Jason Merrill  <jason@redhat.com>
6814
6815         PR c++/3242
6816         * class.c (add_method): Do compare 'this' quals when trying to match a
6817         used function.  Don't defer to another used function.
6818
6819 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
6820
6821         * pt.c (instantiate_clone): Remove, fold into ...
6822         (instantiate_template): ... here. Simplify by removing mutual
6823         recursion.
6824         * typeck2.c (build_m_component_ref): Don't cv qualify the function
6825         pointed to by a pointer to function.
6826         * class.c (delete_duplicate_fields_1): Typo.
6827
6828 2001-12-18  Jason Merrill  <jason@redhat.com>
6829
6830         C++ ABI change: destroy value arguments in caller.
6831         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
6832         create an extra binding level for the parameters.
6833         * decl.c (store_parm_decls): Don't do parameter cleanups.
6834
6835 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
6836
6837         * call.c (build_new_method_call): Use '%#V'.
6838         * error.c (cv_to_string): Use V parameter to determine padding.
6839
6840 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
6841
6842         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
6843         spellings in messages.
6844
6845 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
6846
6847         * cp-tree.h: Delete #defines for cp_error, cp_warning,
6848         cp_pedwarn, and cp_compiler_error.
6849         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
6850         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
6851         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
6852         typeck2.c: Change calls to the above macros to use their
6853         language-independent equivalents: error, warning, pedwarn, and
6854         internal_error respectively.
6855
6856 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
6857
6858         * decl2.c (finish_file): Remove back_end_hook.
6859
6860 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
6861
6862         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
6863         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
6864         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
6865
6866 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
6867
6868         * lang-options.h: Use American spelling in messages.
6869
6870 2001-12-13  Jason Merrill  <jason@redhat.com>
6871
6872         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
6873
6874         Use cleanups to run base and member destructors.
6875         * init.c (push_base_cleanups): New function, split out from...
6876         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
6877         * decl.c (finish_destructor_body): Move vbase destruction code to
6878         push_base_cleanups.
6879         (begin_function_body, finish_function_body): New fns.
6880         (finish_function): Move [cd]tor handling and call_poplevel to
6881         finish_function_body.
6882         (pushdecl): Skip the new level.
6883         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
6884         (setup_vtbl_ptr): Call push_base_cleanups.
6885         * method.c (synthesize_method): Call {begin,end}_function_body.
6886         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
6887         * cp-tree.h: Declare new fns.
6888         * parse.y (function_body, .begin_function_body): New nonterminals.
6889         (fndef, pending_inline, function_try_block): Use function_body.
6890         (ctor_initializer_opt, function_try_block): No longer has a value.
6891         (base_init): Remove .set_base_init token.
6892         (.set_base_init, compstmt_or_error): Remove.
6893         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
6894
6895         * optimize.c (maybe_clone_body): Fix parameter updating.
6896
6897 2001-12-12  Jason Merrill  <jason@redhat.com>
6898
6899         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
6900         * semantics.c (genrtl_start_function): Don't pass
6901         parms_have_cleanups or push an extra binding level.
6902         (genrtl_finish_function): Lose cleanup_label cruft.
6903
6904         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
6905         (ctor_label): Remove.
6906         * semantics.c (finish_return_stmt): Lose ctor_label support.
6907         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
6908         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
6909         dtor_label.
6910
6911         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
6912         check for [cd]tors.
6913         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
6914
6915         * decl.c (finish_function): Check VMS_TARGET, not VMS.
6916
6917         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
6918         (end_cleanup_fn): And poplevel.
6919
6920         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
6921         if we're in a template.
6922
6923 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
6924
6925         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
6926         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
6927         THIS_NAME_P): Delete.
6928         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
6929         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
6930         with internal naming scheme.
6931         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
6932
6933 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
6934
6935         * decl.c (grokdeclarator): Deprecated implicit typename use.
6936
6937 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
6938
6939         PR g++/51
6940         * parse.y (frob_specs): Indicate it is a language linkage which
6941         contained the extern.
6942         * decl.c (grokdeclarator): Allow extern language linkage with
6943         other specifiers.
6944
6945 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
6946
6947         PR g++/72
6948         * decl.c (add_binding): Don't reject duplicate typedefs involving
6949         template parameters.
6950
6951 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
6952
6953         * parse.y, semantics.c: Similarly.
6954
6955 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
6956
6957         PR g++/87
6958         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
6959         (copy_args_p): Rename to ...
6960         (copy_fn_p): ... here.
6961         (grok_special_member_properties): New function.
6962         (grok_op_properties): Lose VIRTUALP parameter.
6963         (copy_assignment_arg_p): Remove.
6964         * call.c (build_over_call): Use copy_fn_p.
6965         * decl.c (grokfndecl): Reformat. Adjust call to
6966         grok_op_properties.
6967         (copy_args_p): Rename to ...
6968         (copy_fn_p): ... here. Reject template functions. Check for pass
6969         by value.
6970         (grok_special_member_properties): Remember special functions.
6971         (grok_ctor_properties): Don't remember them here, just check.
6972         (grok_op_properties): Likewise.
6973         (start_method): Call grok_special_member_properties.
6974         * decl2.c (grokfield): Likewise.
6975         (copy_assignment_arg_p): Remove.
6976         (grok_function_init): Don't remember abstract assignment here.
6977         * pt.c (instantiate_class_template): Call
6978         grok_special_member_properties.
6979         (tsubst_decl): Adjust grok_op_properties call.
6980
6981 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
6982
6983         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
6984         RID_TYPES_COMPATIBLE_P.
6985
6986 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6987
6988         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
6989         call to build_aggr_init.
6990         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
6991
6992 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
6993
6994         * parse.y: Replace uses of the string non-terminal with STRING.
6995         Don't perform string concatentaion here.
6996         (string): Remove non-terminal.
6997         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
6998
6999 2001-12-05  Jason Merrill  <jason@redhat.com>
7000
7001         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
7002         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
7003         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
7004         * pt.c (push_tinst_level): No longer static.
7005         * cp-tree.h: Declare them.
7006
7007         * init.c (resolve_offset_ref): Don't check access for the base
7008         conversion to access a FIELD_DECL.
7009
7010         * cp-tree.h (TYPE_REFFN_P): New macro.
7011         * decl.c (bad_specifiers): Check it, too.
7012
7013         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
7014         on the __*_type_info type if we haven't seen a definition.
7015
7016 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
7017
7018         * decl.c: Include c-common.h.
7019         (shadow_warning): Move to c-common.c.
7020
7021 2001-12-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7022
7023         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
7024
7025 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
7026
7027         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
7028
7029 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
7030
7031         PR g++/164
7032         * init.c (sort_base_init): Allow binfos to be directly specified.
7033         * method.c (do_build_copy_constructor): Explicitly convert to the
7034         base instance.
7035         (do_build_assign_ref): Likewise.
7036
7037 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
7038
7039         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
7040         declaration and initialization.
7041
7042 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
7043
7044         * typeck2.c: Remove leading capital from diagnostic messages, as
7045         per GNU coding standards.
7046
7047 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
7048
7049         PR c++/3394
7050         * decl.c (xref_basetypes): Handle attributes between
7051         'class' and name.
7052
7053 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
7054
7055         PR g++/3381
7056         * parse.y (named_complex_class_head_sans_basetype): Add new
7057         reduction.
7058         * Make-lang.in (parse.c): Adjust expected conflict count.
7059
7060 2001-12-03  Jason Merrill  <jason@redhat.com>
7061
7062         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
7063         immediate binfos for our virtual bases.
7064
7065 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
7066
7067         * call.c (build_java_interface_fn_ref): Similarly.
7068         * except.c (is_admissible_throw_operand): Similarly.
7069         * init.c (build_java_class_ref): Similarly.
7070         * xref.c (open_xref_file): Similarly.
7071
7072 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7073
7074         * class.c (finish_struct): Remove trailing periods from messages.
7075         * decl.c (check_tag_decl): Similarly.
7076         * lex.c (cxx_set_yydebug): Similarly.
7077         * typeck2.c (friendly_abort): Similarly.
7078
7079 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
7080
7081         PR c++/3048
7082         * cp-tree.h (ovl_member): Remove.
7083         * decl2.c (merge_functions): Handle extern "C" functions
7084         specially.
7085         * tree.c (ovl_member): Remove.
7086
7087 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
7088
7089         PR c++/4842
7090         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
7091         FUNCTION_DECL, as input.
7092         (mark_overriders): Remove.
7093         (warn_hidden): Rework for the new ABI.
7094
7095 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
7096
7097         PR c++/3471
7098         * call.c (convert_like_real): Do not build additional temporaries
7099         for rvalues of class type.
7100
7101 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
7102
7103         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
7104         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
7105         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
7106         (DERIVED_FROM_P): Likewise.
7107         (enum base_access): Renumber, add ba_quiet bit mask.
7108         (get_binfo): Remove.
7109         (get_base_distance): Remove.
7110         (binfo_value): Remove.
7111         (ACCESSIBLY_DERIVED_FROM_P): Remove.
7112         * call.c (standard_conversion): Use lookup_base.
7113         * class.c (strictly_overrides): Likewise.
7114         (layout_virtual_bases): Likewise.
7115         (warn_about_ambiguous_direct_bases): Likewise.
7116         (is_base_of_enclosing_class): Likewise.
7117         (add_vcall_offset_vtbl_entries_1): Likewise.
7118         * cvt.c (build_up_reference): Adjust comment.
7119         * init.c (build_member_call): Reformat.
7120         * search.c (get_binfo): Remove.
7121         (get_base_distance_recursive): Remove.
7122         (get_base_distance): Remove.
7123         (lookup_base_r): Tweak.
7124         (lookup_base): Add ba_quiet control. Complete the types here.
7125         (covariant_return_p): Use lookup_base.
7126         * tree.c (binfo_value): Remove.
7127         (maybe_dummy_object): Use lookup_base.
7128         * typeck.c (build_static_cast): Use lookup_base.
7129         (get_delta_difference): Likewise.
7130         * typeck2.c (binfo_or_else): Use lookup_base.
7131         (build_scoped_ref): Add back error_mark_check.
7132         (build_m_component_ref): Use lookup_base.
7133
7134 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
7135
7136         * Make-lang.in (c++.generated-manpages): New dummy target.
7137
7138 2001-11-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7139
7140         * Make-lang.in (cp-lang.o): Depends on c-common.h.
7141         * cp-lang.c (c-common.h): Include.
7142         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
7143         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
7144         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
7145
7146 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
7147
7148         * decl2.c (c_language): Move to c-common.c.
7149         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
7150         functions.
7151         (cxx_init): Update.
7152
7153 2001-11-26  Jason Merrill  <jason@redhat.com>
7154
7155         * call.c (joust): Remove COND_EXPR hack.
7156
7157 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
7158
7159         * search.c (lookup_base_r): Declare bk in variable declaration
7160         space.
7161
7162 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
7163
7164         PR g++/3145
7165         * class.c (build_vbase_pointer): Remove.
7166         (build_vbase_path): Remove.
7167         (build_base_path): New function.
7168         * cp-tree.h (base_access, base_kind): New enumerations.
7169         (build_base_path): Declare.
7170         (convert_pointer_to_real): Remove.
7171         (convert_pointer_to): Remove.
7172         (lookup_base): Declare.
7173         (convert_pointer_to_vbase): Remove.
7174         * call.c (build_scoped_method_call): Use lookup_base &
7175         build_base_path instead of convert_pointer_to_real,
7176         get_base_distance & get_binfo.
7177         (build_over_call): Likewise.
7178         * cvt.c (cp_convert_to_pointer): Likewise.
7179         (convert_to_pointer_force): Likewise.
7180         (build_up_reference): Likewise.
7181         (convert_pointer_to_real): Remove.
7182         (convert_pointer_to): Remove.
7183         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
7184         instead of convert_pointer_to_vbase & build_vbase_path.
7185         (emit_base_init): Use build_base_path instead of
7186         convert_pointer_to_real.
7187         (expand_virtual_init): Lose unrequired conversions.
7188         (resolve_offset_ref): Use lookup_base and build_base_path
7189         instead of convert_pointer_to.
7190         * rtti.c (build_dynamic_cast_1): Use lookup_base &
7191         build_base_path instead of get_base_distance & build_vbase_path.
7192         * search.c (get_vbase_1): Remove.
7193         (get_vbase): Remove.
7194         (convert_pointer_to_vbase): Remove.
7195         (lookup_base_r): New function.
7196         (lookup_base): New function.
7197         * typeck.c (require_complete_type): Use lookup_base &
7198         build_base_path instead of convert_pointer_to.
7199         (build_component_ref): Likewise.
7200         (build_x_function_call): Likewise.
7201         (get_member_function_from_ptrfunc): Likewise.
7202         (build_component_addr): Likewise.
7203         * typeck2.c (build_scoped_ref): Likewise.
7204
7205 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7206
7207         * cp-tree.h (CP_TYPE_QUALS): Removed.
7208         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
7209         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
7210         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
7211         * dump.c (cp_dump_tree): Use void* dump_info argument to match
7212         lang-hooks prototype.
7213         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
7214         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
7215         CP_TYPE_QUALS changed to cp_type_quals.
7216         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
7217         (CXX_C_OBJS): Remove c-dump.o.
7218
7219 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
7220
7221         PR c++/3637
7222         * pt.c (lookup_template_class): Ensure that all specializations
7223         are registered on the list corresponding to the most general
7224         template.
7225
7226 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
7227
7228         * call.c (non_reference): Add documentation.
7229         (convert_class_to_reference): Do not strip reference types
7230         from conversion operators.
7231         (maybe_handle_ref_bind): Simplify.
7232         (compare_ics): Correct handling of references.
7233
7234 2001-11-19  John Wilkinson <johnw@research.att.com>
7235
7236         * dump.c (dump_op): New function.
7237         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
7238         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
7239         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
7240
7241 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
7242
7243         PR4629
7244         * semantics.c (finish_sizeof): Make sure that expression created
7245         while processing a template do not have a type.
7246         (finish_alignof): Likewise.
7247         * typeck.c (c_sizeof): Likewise.
7248         (expr_sizeof): Likewise.
7249
7250 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
7251
7252         * lex.c (cxx_finish): Call c_common_finish.
7253         (finish_parse): Remove.
7254
7255 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7256
7257         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
7258         when displaying error message about missing array bounds.
7259
7260 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7261
7262         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
7263         CONST_CAST_EXPR.
7264         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
7265
7266 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
7267
7268         * cp-tree.h (print_class_statistics): Restore.
7269
7270 2001-11-15  Jason Merrill  <jason@redhat.com>
7271
7272         * method.c (use_thunk): Don't emit debugging information for thunks.
7273
7274         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
7275         * decl.c (make_typename_type): Handle getting a class template.
7276         * search.c (lookup_field_r): A class template is good enough for
7277         want_type.
7278
7279         * call.c (convert_like_real): Only use cp_convert for the bad part.
7280         (standard_conversion): Also allow bad int->enum.
7281         * typeck.c (ptr_reasonably_similar): Also allow functions to
7282         interconvert.  Pointers to same-size integers are reasonably
7283         similar.
7284
7285         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
7286         give it void type.
7287
7288 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
7289
7290         PR g++/3154
7291         * init.c (sort_base_init): Remove unreachable code.
7292         (expand_member_init): Adjust comment to reflect reality. Simplify
7293         and remove unreachable code.
7294
7295 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
7296
7297         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
7298         (cxx_init): Update prototype.
7299         * decl.c (init_decl_processing): Rename.  Move null node init
7300         to its creation time.
7301         * lex.c (cxx_init_options): Update.
7302         (cxx_init): Combine with old init_parse; also call
7303         cxx_init_decl_processing.
7304
7305 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
7306
7307         * decl.c (check_initializer): Try to complete the type of an
7308         array element before checking whether it's complete.  Don't
7309         complain about arrays with complete element types but an
7310         unknown size.
7311         (cp_finish_decl): Build the hierarchical constructor before
7312         calling maybe_deduce_size_from_array_init.
7313
7314 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
7315
7316         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
7317
7318 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
7319
7320         PR g++/4206
7321         * parse.y (already_scoped_stmt): Remove.
7322         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
7323
7324 2001-11-12  H.J. Lu <hjl@gnu.org>
7325
7326         * cvt.c (ocp_convert): Don't warn the address of a weak
7327         function is always `true'.
7328
7329 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
7330
7331         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
7332         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
7333         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
7334         * cp-tree.h (print_class_statistics): Remove.
7335         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
7336         cxx_print_identifier, cxx_set_yydebug): New.
7337         * lex.c (set_yydebug): Rename c_set_yydebug.
7338         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
7339         lang_print_xnode): Rename.
7340         * tree.c (print_lang_statistics): Rename.
7341
7342 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7343
7344         * class.c (dump_array): Fix format specifier warning.
7345
7346 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
7347
7348         * cp-lang.c (LANG_HOOKS_NAME): Override.
7349         (struct lang_hooks): Constify.
7350         * lex.c (cxx_init_options): Update.
7351         (lang_identify): Remove.
7352         * parse.y (language_string): Remove.
7353
7354 2001-11-08  Andreas Franck  <afranck@gmx.de>
7355
7356         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
7357         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
7358         suggested by autoconf.
7359         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
7360         (c++.install-common): Use the transformed target alias names.
7361
7362 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7363
7364         * Make-lang.in: Update.
7365         * cp-lang.c: Include langhooks-def.h.
7366
7367 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7368
7369         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
7370
7371 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7372
7373         * lex.c (copy_lang_type): Add static prototype.
7374
7375 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7376
7377         * pt.c (unify): Handle SCOPE_REF.
7378
7379 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
7380
7381         * tree.c (cp_copy_res_decl_for_inlining): Adjust
7382         DECL_ABSTRACT_ORIGIN for the return variable.
7383
7384 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
7385
7386         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
7387
7388 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
7389
7390         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
7391         semantics.c, spew.c: Fix spelling errors.
7392
7393 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7394
7395         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
7396
7397 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
7398
7399         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
7400         pop_everything.
7401
7402 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7403
7404         * cp-lang.c (cxx_get_alias_set): New function.
7405         Point LANG_HOOKS_GET_ALIAS_SET to it.
7406
7407 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7408
7409         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
7410         * cp-tree.h (make_unbound_class_template): Prototype new function.
7411         * decl.c (make_unbound_class_template): New function.
7412         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
7413         * error.c (dump_type): Likewise.
7414         * mangle.c (write_type): Likewise.
7415         * parse.y (template_parm): Likewise.
7416         (template_argument): Use make_unbound_class_template.
7417         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
7418         (tsubst): Likewise.
7419         (tsubst_copy): Likewise.
7420         (unify): Likewise.
7421         * tree.c (walk_tree): Likewise.
7422         * typeck.c (comptypes): Likewise.
7423
7424 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7425
7426         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
7427         extra calls into fewer ones.
7428
7429 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
7430
7431         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
7432         Warn when merging inline with attribute noinline.
7433         (start_decl, start_function): Warn if inline and attribute
7434         noinline appear in the same declaration.
7435
7436 2001-10-16  H.J. Lu <hjl@gnu.org>
7437
7438         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
7439         for tree checking disabled.
7440
7441 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
7442
7443         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
7444         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
7445
7446 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
7447
7448         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
7449         (unify): Only handle MINUS_EXPR specially if the above flag is set
7450         and the subtracted constant is 1.  Clear the flag on recursive calls.
7451         Set it when unifying the maximum value in an INTEGER_TYPE's range.
7452
7453 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
7454
7455         * decl.c (bad_specifiers): Don't allow exception specifications
7456         on any typedefs.
7457
7458 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
7459
7460         * cp/lex.c (init_cp_pragma): Similarly.
7461
7462 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7463
7464         * pt.c (lookup_template_class): Build complete template arguments
7465         for BOUND_TEMPLATE_TEMPLATE_PARM.
7466
7467 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7468
7469         * cp-tree.h (TYPE_BINFO): Update comment.
7470         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
7471         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
7472         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
7473         (copy_type): Prototype new function.
7474         * lex.c (copy_lang_decl): Gather tree node statistics.
7475         (copy_lang_type): New function.
7476         (copy_type): Likewise.
7477         (cp_make_lang_type): Create lang_type for
7478         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
7479         and BOUND_TEMPLATE_TEMPLATE_PARM.
7480         * pt.c (tsubst): Use copy_type instead of copy_node.
7481         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
7482
7483 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7484
7485         * pt.c (determine_specialization): Ignore functions without
7486         DECL_TEMPLATE_INFO.
7487
7488 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
7489
7490         PR g++/4476
7491         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
7492
7493 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
7494
7495         * typeck2.c (store_init_value): Don't re-digest a bracketed
7496         initializer.
7497
7498         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
7499         ANON_AGGR_TYPE_P.
7500
7501 2001-10-11  Richard Henderson  <rth@redhat.com>
7502
7503         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
7504         of an asm statement.
7505         (build_vtbl_ref_1): Split out from build_vtbl_ref.
7506         (build_vfn_ref): Use it to handle vtable descriptors before
7507         calling build_vtable_entry_ref.
7508         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
7509
7510 2001-10-10  Richard Henderson  <rth@redhat.com>
7511
7512         * parse.y (asm_operand): Allow named operands.
7513         * semantics.c (finish_asm_stmt): Tweek for changed location
7514         of the operand constraint.
7515
7516 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
7517
7518         * call.c (standard_conversion): Add bad conversion between
7519         integers and pointers.
7520         (convert_like_real): Don't use convert_for_initialization for bad
7521         conversions; complain here and use cp_convert.
7522         (build_over_call): Don't handle bad conversions specially.
7523         (perform_implicit_conversion): Allow bad conversions.
7524         (can_convert_arg_bad): New fn.
7525         * cp-tree.h: Declare it.
7526         * typeck.c (convert_for_assignment): Use it.
7527         (ptr_reasonably_similar): Any target type is similar to void.
7528
7529 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
7530
7531         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
7532         (cp/cp-lang.o): New rule.
7533         * cp-tree.h: Declare hooks.
7534         * tree.c: Make hooks non-static.
7535         (init_tree): Don't initialize hooks here.
7536         * lex.c: Likewise.  Move definition of lang_hooks to...
7537         * cp-lang.c: ... new file.
7538
7539 2001-10-08  Richard Henderson  <rth@redhat.com>
7540
7541         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
7542         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
7543
7544 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7545
7546         * class.c (build_vtable_entry_ref): Const-ify.
7547         * decl.c (predefined_identifier,
7548         initialize_predefined_identifiers): Likewise.
7549         * init.c (build_new_1): Likewise.
7550         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
7551         Likewise.
7552
7553 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
7554
7555         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
7556         (INSNS_PER_STMT): Likewise.
7557         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
7558         (copy_body, initialize_inlined_parameters): Likewise.
7559         (declare_return_variable, inlinable_function_p): Likewise.
7560         (expand_call_inline, expand_calls_inline): Likewise.
7561         (optimize_inline_calls, clone_body): Likewise.
7562         * tree.c (walk_tree): Moved to ../tree-inline.c.
7563         (walk_tree_without_duplicates): Likewise.
7564         (copy_tree_r, remap_save_expr): Likewise.
7565
7566 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
7567
7568         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
7569         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
7570         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
7571         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
7572         (flag_inline_trees): Moved declaration to ../tree-inline.h.
7573         (walk_tree): Moved declaration to ../tree-inline.h.
7574         (walk_tree_without_duplicates, copy_tree_r): Likewise.
7575         (remap_save_expr): Likewise.
7576         * decl.c: Include tree-inline.h.
7577         (lang_mark_tree): Don't mark inlined_fns.
7578         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
7579         * optimize.c: Include tree-inline.h.
7580         (optimize_inline_calls): Move declaration to ../tree.h, as
7581         non-static.
7582         (remap_decl): Use language-independent constructs and hooks.
7583         (remap_block, copy_body_r, declare_return_variable): Likewise.
7584         (inlinable_function_p): Likewise.  Don't test for
7585         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
7586         no longer language-specific.
7587         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
7588         call of dump_function to...
7589         (optimize_function): Here...
7590         (clone_body): New function, extracted from...
7591         (maybe_clone_body): ... here.  Build decl_map locally and pass
7592         it on to clone_body.
7593         * pt.c, semantics.c: Include tree-inline.h.
7594         * tree.c: Likewise.
7595         (cp_walk_subtrees): New language-specific hook for tree inlining.
7596         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
7597         cp_is_overload_p, cp_auto_var_in_fn_p,
7598         cp_copy_res_decl_for_inlining): Likewise.
7599         (walk_tree): Move language-specific constructs into...
7600         (cp_walk_subtrees): this new function.
7601         (copy_tree_r): Use language-independent constructs and hooks.
7602         (init_tree): Initialize tree inlining hooks.
7603         (remap_save_expr): Adjust prototype so that the declaration
7604         does not require the definition of splay_tree.
7605
7606 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7607
7608         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
7609         to build the declaration instead of the declaration itself.
7610
7611 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
7612
7613         * decl2.c (cxx_decode_option): Add 'else'.
7614
7615         * spew.c (end_input): No longer static.
7616         * cp-tree.h: Declare it.
7617         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
7618
7619 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
7620
7621         * call.c (build_over_call), typeck.c (build_function_call_real):
7622         Pass type attributes to check_function_format rather than name or
7623         assembler name.  Don't require there to be a name or assembler
7624         name to check formats.
7625
7626 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
7627
7628         * decl.c (init_decl_processing): Don't call
7629         init_function_format_info.  Initialize lang_attribute_table
7630         earlier.
7631         (builtin_function): Call decl_attributes.
7632         (insert_default_attributes): New.
7633
7634 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
7635
7636         * decl.c (grokdeclarator): Copy array typedef handling from C
7637         frontend.
7638
7639         * decl.c (grokdeclarator): Copy too-large array handling from C
7640         frontend.
7641
7642 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
7643
7644         * config-lang.in (target_libs): Added target-gperf, so that we
7645         don't try to build it if C++ is disabled.
7646
7647 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
7648
7649         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
7650         (cp/errfn.o): Delete rule.
7651         (cp/error.o): Depend on flags.h.
7652         * errfn.c: Delete file.
7653         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
7654         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
7655         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
7656         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
7657         internal_error respectively.  Make cp_deprecated into a macro.
7658         Don't define cp_printer typedef or declare cp_printers.
7659         * error.c: Include flags.h.
7660         Delete: struct tree_formatting_info, print_function_argument_list,
7661         print_declaration, print_expression, print_function_declaration,
7662         print_function_parameter, print_type_id, print_cv_qualifier_seq,
7663         print_type_specifier_seq, print_simple_type_specifier,
7664         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
7665         print_parameter_declaration_clause, print_exception_specification,
7666         print_nested_name_specifier, and definition of cp_printers.
7667         (locate_error): New function.
7668         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
7669         rewritten in terms of locate_error and diagnostic.c.
7670         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
7671         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
7672         (init_error): Adjust to match.
7673
7674 2001-09-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7675
7676         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
7677
7678 2001-09-21  Richard Henderson  <rth@redhat.com>
7679
7680         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
7681         (build_vtbl_initializer): Likewise.
7682         (build_vfn_ref): New.
7683         * cp-tree.h: Declare it.
7684         * call.c (build_over_call): Use it.
7685         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
7686         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
7687
7688 2001-09-21  J"orn Rennecke <amylaar@redhat.com>
7689
7690         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
7691
7692 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
7693
7694         Table-driven attributes.
7695         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
7696         * decl2.c (cplus_decl_attributes): Only take one attributes
7697         parameter.
7698         * cp-tree.c (cplus_decl_attributes): Update prototype.
7699         * class.c (finish_struct), decl.c (start_decl, start_function),
7700         decl2.c (grokfield), friend.c (do_friend), parse.y
7701         (parse_bitfield): Update calls to cplus_decl_attributes.
7702         * decl.c (grokdeclarator): Take a pointer to a single ordinary
7703         attribute list.
7704         * decl.h (grokdeclarator): Update prototype.
7705         * decl2.c (grokfield): Take a single ordinary attribute list.
7706         * friend.c (do_friend): Likewise.
7707         * decl.c (shadow_tag, groktypename, start_decl,
7708         start_handler_parms, grokdeclarator, grokparms, start_function,
7709         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
7710         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
7711         (process_template_parm, do_decl_instantiation): Pass single
7712         ordinary attribute lists around.
7713         * decl.c (grokdeclarator): Correct handling of nested attributes.
7714         Revert the patch
7715         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
7716                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
7717                 not the left.
7718         .
7719         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
7720         (cp_attribute_table): Declare.
7721         * decl.c (valid_lang_attribute): Don't define.
7722         (lang_attribute_table): Define.
7723         (init_decl_processing): Initialize lang_attribute_table instead of
7724         valid_lang_attribute.
7725         * tree.c (cp_valid_lang_attribute): Remove.
7726         (handle_java_interface_attribute, handle_com_interface_attribute,
7727         handle_init_priority_attribute): New functions.
7728         (cp_attribute_table): New array.
7729         * decl2.c (import_export_class): Don't use
7730         targetm.valid_type_attribute.
7731
7732 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7733
7734         * Make-lang.in (cp/error.o): Depend on real.h
7735         * error.c: #include "real.h"
7736
7737 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7738
7739         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
7740         xmalloc/strcpy/strcat.
7741
7742 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7743
7744         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
7745         Const-ification.
7746         * pt.c (tsubst_decl): Likewise.
7747
7748 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7749
7750         * decl2.c (lang_f_options): Const-ification.
7751         * lex.c (cplus_tree_code_name): Likewise.
7752         * spew.c (yyerror): Likewise.
7753
7754 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
7755
7756         PR c++/3986
7757         * class.c (force_canonical_binfo_r): Check & move an indirect
7758         primary base first.
7759         (force_canonical_binfo): Check that it's not already
7760         canonical.
7761         (mark_primary_virtual_base): Remove BINFO parameter.
7762         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
7763
7764 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
7765
7766         Remove TYPE_NONCOPIED_PARTS.
7767         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
7768         CLASSTYPE_PURE_VIRTUALS.
7769         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
7770         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
7771         (layout_class_type): Don't call fixup_inline_methods here ...
7772         (finish_struct_1): ... call it here.
7773
7774 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
7775
7776         * decl.c (duplicate_decls): Remove code deadling with
7777         DECL_SAVED_INSNS.
7778         * decl2.c (finish_file): Likewise.
7779         * pt.c (instantiate_decl): Likewise.
7780         * semantics.c (expand_body): Don't defer local functions if
7781         they wouldn't be deferred for some other reason.  Don't
7782         generate RTL for functions that will not be emitted.
7783         (genrtl_start_function): Remove code deadling with
7784         DECL_SAVED_INSNS.
7785         (genrtl_finish_function): Likewise.
7786
7787 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
7788
7789         PR c++/4203
7790         * call.c (build_over_call): Do not optimize any empty base
7791         construction.
7792
7793 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7794
7795         * error.c (dump_template_decl): Output template parameters
7796         together with their specifiers.
7797         Output `class' prefix for template template parameter.
7798         (dump_decl): Fix formatting.
7799
7800 2001-08-30  Kurt Garloff  <garloff@suse.de>
7801
7802         * optimize.c (inlinable_function_p): Allow only smaller single
7803         functions. Halve inline limit after reaching recursive limit.
7804
7805 2001-08-30  Joern Rennecke <amylaar@redhat.com>
7806             Jason Merrill  <jason_merrill@redhat.com>
7807
7808         * class.c (build_vtable_entry_ref): Subtract in char*, not
7809         ptrdiff_t.
7810
7811 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
7812
7813         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
7814         (build_cplus_array_type): Use cp_build_qualified_type, not
7815         TYPE_MAIN_VARIANT, to get an unqualified version.
7816
7817         * decl2.c (grok_alignof): Lose.
7818         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
7819         * typeck.c (c_alignof): Lose.
7820         * semantics.c (finish_sizeof, finish_alignof): New.
7821         * parse.y: Use them.
7822         * cp-tree.h: Declare them.
7823
7824 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
7825
7826         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
7827         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
7828         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
7829
7830 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
7831
7832         * typeck2.c (add_exception_specifier): Only require complete type if
7833         not in processing template declaration.
7834
7835 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7836
7837         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
7838         GNU_xref_start_scope and GNU_xref_end_scope.
7839
7840         * tree.c (TYPE_HASH): Moved to ../tree.h.
7841
7842 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
7843
7844         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
7845         on COMPOUND_EXPRs.
7846
7847 2001-08-14  Richard Henderson  <rth@redhat.com>
7848
7849         * class.c, cp-tree.h (build_vfn_ref): Remove.
7850         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
7851
7852 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
7853
7854         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
7855         empty class assignment as having side-effects to avoid
7856         spurious warnings.
7857
7858 2001-08-13  Zack Weinberg  <zackw@panix.com>
7859
7860         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
7861         * except.c: Include libfuncs.h.
7862
7863 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7864
7865         * decl.c (grokdeclarator): Clarify diagnostic message.
7866
7867 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7868
7869         * decl2.c (do_nonmember_using_decl): Replace using directive
7870         with using declaration in the error message.
7871
7872 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7873
7874         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
7875         criterion to avoid rebuilding expression tree instead of
7876         processing_template_decl.
7877
7878 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
7879
7880         Support named return value optimization for inlines, too.
7881         * decl.c (finish_function): Nullify returns here.
7882         * semantics.c (genrtl_start_function): Not here.
7883         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
7884         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
7885         Also nullify the CLEANUP_STMT for the nrv.
7886         * cp-tree.h: Declare it.
7887         * optimize.c (declare_return_variable): Replace the nrv with the
7888         return variable.
7889         * typeck.c (check_return_expr): Be more flexible on alignment check.
7890         Ignore cv-quals when checking for a matching type.
7891
7892 2001-08-09  Richard Henderson  <rth@redhat.com>
7893
7894         * decl2.c (finish_objects): Use target hooks instead of
7895         assemble_constructor and assemble_destructor.
7896
7897 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7898
7899         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
7900
7901 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
7902
7903         PR c++/3820
7904         Stop using TYPE_NONCOPIED_PARTS.
7905         * call.c (build_over_call): Be careful when copy constructing
7906         or assigning to an empty class.
7907         * class.c (check_bases_and_members): It has a
7908         COMPLEX_ASSIGN_REF if it has a vptr.
7909         (layout_class_type): Don't add empty class padding to
7910         TYPE_NONCOPIED_PARTS.
7911         (finish_struct_1): Don't add the VFIELD either.
7912         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
7913         initialization.
7914
7915 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
7916
7917         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
7918
7919 2001-08-06  Richard Henderson  <rth@redhat.com>
7920
7921         * decl2.c (finish_objects): Pass a symbol_ref and priority to
7922         assemble_{constructor,destructor}.  Remove priority handling.
7923
7924 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7925
7926         Don't allow template-id in using-declaration.
7927         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
7928         (do_class_using_decl): Likewise.
7929
7930 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7931
7932         * cp/spew.c (read_token): No need to pop buffers.
7933
7934 2001-08-02  Stan Shebs  <shebs@apple.com>
7935
7936         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
7937         (fnaddr_from_vtable_entry): Remove decl.
7938         * method.c (use_thunk): Update comment.
7939
7940 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
7941
7942         * repo.c (get_base_filename): Change return value to const char
7943         pointer.
7944
7945 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
7946
7947         Kill -fhonor-std.
7948         * NEWS: Document.
7949         * cp-tree.h (flag_honor_std): Remove.
7950         (CPTI_FAKE_STD): Remove.
7951         (std_node): Remove comment about it being NULL.
7952         (fake_std_node): Remove.
7953         * decl.c (in_fake_std): Remove.
7954         (walk_namespaces_r): Remove fake_std_node check.
7955         (push_namespace): Remove in_fake_std code.
7956         (pop_namespace): Likewise.
7957         (lookup_name_real): Remove fake_std_node check.
7958         (init_decl_processing): Always create std_node. Always add
7959         std:: things there.
7960         (builtin_function): Always put non '_' fns in std.
7961         * decl2.c (flag_honor_std): Remove.
7962         (lang_f_options): Remove honor-std.
7963         (unsupported_options): Add honor-std.
7964         (set_decl_namespace): Remove fake_std_node check.
7965         (validate_nonmember_using_decl): Likewise.
7966         (do_using_directive): Likewise.
7967         (handle_class_head): Likewise.
7968         * dump.c (cp_dump_tree): Likewise.
7969         * except.c (init_exception_processing): Adjust.
7970         * init.c (build_member_call): Remove fake_std_node check.
7971         (build_offset_ref): Likewise.
7972         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
7973         * rtti.c (init_rtti_processing): Adjust.
7974
7975 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
7976
7977         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
7978         operand while calling cp_tree_equal.
7979
7980 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
7981
7982         The 3.0 ABI no longer has vbase pointer fields.
7983         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
7984         FORMAT_VBASE_NAME): Remove.
7985         * method.c (do_build_copy_constructor): Adjust.
7986         (do_build_assign_ref): Adjust.
7987         * search.c (lookup_field_r): Adjust.
7988         * typeck.c (build_component_ref): Adjust.
7989
7990         The 3.0 ABI always has a vtable pointer at the start of every
7991         polymorphic class.
7992         * rtti.c (build_headof_sub): Remove.
7993         (build_headof): Adjust.
7994         (get_tinfo_decl_dynamic): No need to check flag_rtti
7995         here. Adjust.
7996         (create_real_tinfo_var): Explain why we need a hidden name.
7997
7998 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
7999
8000         PR c++/3631
8001         * class.c (update_vtable_entry_for_fn): The fixed adjustment
8002         of a virtual thunk should be from declaring base.
8003
8004 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
8005
8006         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
8007         the shared virtual base, so preserving inheritance graph order.
8008
8009 2001-07-30  Andreas Jaeger  <aj@suse.de>
8010
8011         * decl2.c: Remove unused var global_temp_name_counter.
8012
8013 2001-07-28  Richard Henderson  <rth@redhat.com>
8014
8015         * method.c (pending_inlines): Remove.
8016
8017 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
8018
8019         * class.c (mark_primary_virtual_base): Don't adjust base
8020         offsets here.
8021         (dfs_unshared_virtual_bases): Adjust them here.
8022         (mark_primary_bases): Explain why we adjust at the end.
8023
8024 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
8025
8026         * class.c (finish_struct_1): When copying the primary base's
8027         VFIELD, make sure we find it is at offset zero.
8028
8029 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8030
8031         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
8032         tsubst_expr for default template arguments.
8033
8034 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
8035
8036         PR c++/3621
8037         * spew.c (yylex): Only copy the token's lineno, if it is
8038         nonzero.
8039
8040 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
8041
8042         PR c++/3624
8043         * call.c (resolve_args): Simplify, call
8044         convert_from_reference.
8045         (build_new_op): Resolve and convert from reference ARG1
8046         earlier. Adjust ARG2 & ARG3 resolve and conversion.
8047
8048 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
8049
8050         * decl.c (last_function_parm_tags): Remove.
8051         (current_function_parm_tags): Remove.
8052         (init_decl_processing): Adjust.
8053         (start_function): Adjust.
8054         (store_parm_decls): Adjust.
8055
8056         PR c++/3152
8057         * decl.c (grokdeclarator): Detect when a function typedef is
8058         declaring a function, and create last_function_parms correctly.
8059
8060 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
8061
8062         * call.c (joust): Only prefer a non-builtin candidate to a builtin
8063         one if they have the same signature.
8064
8065         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
8066         it rather than toplevel_bindings_p.  Give it a mangled name if static.
8067         (convert_to_reference): Adjust.
8068         * decl2.c (get_temp_name): Lose.
8069         * mangle.c (mangle_ref_init_variable): New fn.
8070         (mangle_guard_variable): Strip the ref-init header.
8071         * cp-tree.h: Adjust.
8072         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
8073         initializer.
8074         (grok_reference_init): Always use DECL_INITIAL.
8075
8076 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8077
8078         PR c++/3416
8079         * call.c (build_conditional_expr): Recheck args after
8080         conversions.
8081         * cp-tree.h (build_conditional_expr): Move to correct file.
8082         * typeck.c (decay_conversion): Diagnose any unknown types
8083         reaching here.
8084         (build_binary_op): Don't do initial decay or default
8085         conversions on overloaded functions.
8086         (build_static_cast): Don't do a decay conversion here.
8087
8088 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8089
8090         PR c++/3543
8091         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
8092         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
8093
8094 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8095
8096         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
8097         (create_vtbl_ptr): ... here.
8098
8099 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8100
8101         * class.c (build_vbase_offset_vbtl_entries): Look for
8102         non-primary base of which we are a sub vtable.
8103
8104 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
8105
8106         * semantics.c (finish_this_expr):  Remove unused code.
8107
8108 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
8109
8110         Simplify rtti, now we've only one ABI.
8111         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
8112         CPTI_TINFO_VAR_ID.
8113         (tinfo_decl_id, tinfo_var_id): Remove.
8114         (get_typeid_1): Remove.
8115         * rtti.c
8116         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
8117         (typeid_ok_p): New function.
8118         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
8119         (get_tinfo_decl): Remove old abi documentation.
8120         (tinfo_from_decl): Remove.
8121         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
8122         (get_typeid_1): Remove.
8123         (get_base_offset): Remove.
8124         (synthesize_tinfo_var): Absorb get_base_offset.
8125         (create_real_tinfo_var): Don't use tinfo_decl_id.
8126
8127 2001-07-23  Graham Stott  <grahams@redhat.com>
8128
8129         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
8130         variable has_two_argument_delete_p.
8131
8132 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
8133
8134         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
8135         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
8136         (CPTI_INDEX_IDENTIFIER): Remove.
8137         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
8138         (delta2_identifier): Remove.
8139         (index_identifier): Remove.
8140         (pfn_or_delta2_identifier): Remove.
8141         (flag_vtable_thunks): Remove.
8142         (VTABLE_DELTA2_NAME): Remove.
8143         (VTABLE_INDEX_NAME): Remove.
8144         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
8145         (vfunc_ptr_type_node): Adjust.
8146         (VTABLE_NAME_PREFIX): Adjust.
8147         (build_vfn_ref): Lose first parameter.
8148         (fixup_all_virtual_upcast_offsets): Remove.
8149         * decl.c (initialize_predefined_identifiers): Remove
8150         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
8151         (init_decl_processing): Remove no-vtable-thunk code.
8152         * decl2.c (flag_vtable_thunks): Remove.
8153         (mark_vtable_entries): Remove no-vtable-thunk code.
8154         * error.c (dump_decl): Remove no-vtable-thunk code.
8155         (dump_expr): Adjust ptr to member function code.
8156         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
8157         code.
8158         * rtti.c (build_headof): Remove no-vtable-thunk code.
8159         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
8160         * search.c (get_base_distance): Remove expand_upcast_fixups case.
8161         (virtual_context) Remove.
8162         (expand_upcast_fixups): Remove.
8163         (fixup_virtual_upcast_offsets): Remove.
8164         (fixup_all_virtual_upcast_offsets): Remove.
8165         * typeck.c (get_member_function_from_ptrfunc): Remove
8166         no-vtable-thunk code.
8167         * call.c (build_over_call): Adjust call to build_vfn_ref.
8168         * class.c (build_vfn_ref): Lose first parameter. Remove
8169         no-vtable-thunk code.
8170         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
8171         (build_vtable_entry): Remove no-vtable-thunk code.
8172
8173 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
8174
8175         Remove old-abi remnants. Remove comments about old abi
8176         behavior. Remove references to 'new-abi' in comments.
8177         * cp-tree.h: Adjust comments.
8178         (vbase_offsets_in_vtable_p): Delete.
8179         (vcall_offsets_in_vtable_p): Delete.
8180         (vptrs_present_everywhere_p): Delete.
8181         (all_overridden_vfuns_in_vtables_p): Delete.
8182         (merge_primary_and_secondary_vtables_p): Delete.
8183         (TYPE_CONTAINS_VPTR_P): Adjust.
8184         (VTT_NAME_PREFIX): Remove.
8185         (CTOR_VTBL_NAME_PREFIX): Remove.
8186         (init_vbase_pointers): Remove.
8187         * class.c: Adjust coments.
8188         (build_vbase_pointer_fields): Delete.
8189         (build_vbase_pointer): Remove old-abi code.
8190         (build_secondary_vtable): Likewise.
8191         (modify_all_vtables): Likewise.
8192         (create_vtable_ptr): Likewise.
8193         (layout_class_type): Likewise.
8194         (finish_struct_1): Likewise.
8195         (finish_vtbls): Likewise.
8196         (dfs_finish_vtbls): Delete.
8197         (build_vbase_offset_vtbl_entries): Remove old-abi code.
8198         * cvt.c: Adjust comments.
8199         * decl.c: Adjust comments.
8200         * decl2.c: Adjust comments.
8201         * init.c: Adjust comments.
8202         (construct_virtual_bases): Remove old-abi code.
8203         * lang-specs.h: Remove -fno-new-abi.
8204         * mangle.c: Adjust comments.
8205         * rtti.c: Adjust comments.
8206         (get_base_offset): Remove old-abi-code.
8207         * search.c: Adjust comments.
8208         (dfs_init_vbase_pointers): Remove.
8209         (dfs_vtable_path_unmark): Remove.
8210         (init_vbase_pointers): Remove.
8211         * semantics.c: Adjust comments.
8212         (emit_associated_thunks): Remove old-abi code.
8213         * typeck.c: Adjust comments.
8214
8215 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
8216
8217         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
8218         params.h.
8219
8220 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
8221
8222         * class.c (finish_struct_anon): Forbid nested classes.
8223
8224 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
8225
8226         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
8227         * optimize.c: Include debug.h.
8228         (maybe_clone_body): Use debug hook.
8229         * semantics.c: Include debug.h.
8230         (expand_body): Use debug hook.
8231
8232 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
8233
8234         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
8235
8236 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
8237
8238         * class.c (type_requires_array_cookie): New function.
8239         (check_methods): Don't try to figure out whether the type needs a
8240         cookie here.
8241         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
8242         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
8243         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
8244         * pt.c (instantiate_class_template): Don't set
8245         TYPE_VEC_DELETE_TAKES_SIZE.
8246         * NEWS: Document ABI changes from GCC 3.0.
8247
8248 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
8249             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
8250
8251         * NEWS (Changes in GCC 3.0): Fix typo.
8252
8253 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8254
8255         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
8256         which attributes are to be attached, and a flags argument.  Update
8257         call to decl_attributes.
8258         (grokfield): Update call to decl_attributes.
8259         * class.c (finish_struct): Update call to cplus_decl_attributes.
8260         * cp-tree.h (cplus_decl_attributes): Update prototype.
8261         * decl.c (start_decl, grokdeclarator, start_function): Update
8262         calls to decl_attributes and cplus_decl_attributes.
8263         * friend.c (do_friend): Update call to cplus_decl_attributes.
8264         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
8265
8266 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
8267
8268         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
8269         for `register' variables with an asm-specification.
8270
8271 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
8272
8273         * semantics.c (finish_asm_stmt): Mark the output operands
8274         to an asm addressable, if necessary.
8275
8276 2001-07-11  Ben Elliston  <bje@redhat.com>
8277
8278         * Revert this change -- there is a subtle bug.
8279
8280         PR c++/80
8281         * decl.c (finish_enum): New "attributes" argument; pass it to
8282         cplus_decl_attributes.  Use a narrower type if the enum is packed.
8283         * cp-tree.h (finish_enum): Adjust prototype.
8284         * parse.y (enum_head): New non-terminal.
8285         (structsp): Use it. Enums now may be preceded or followed by
8286         optional attributes -- pass their chained tree to finish_enum().
8287         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
8288
8289 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
8290
8291         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
8292         variables.
8293
8294 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
8295
8296         * semantics.c (cp_expand_stmt): Fix for null
8297         current_function_return_value.
8298
8299 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
8300
8301         * call.c (build_op_delete_call): Initialize fn.
8302         (convert_like_real): Delete conditional.
8303         (joust): Initialize *w and *l.
8304         * class.c: Add prototype for binfo_ctor_vtable.
8305         (get_primary_binfo): Initialize result.
8306         * init.c (build_java_class_ref): Initialize name.
8307
8308 2001-07-09  Erik Rozendaal  <dlr@acm.org>
8309
8310         * typeck.c (unary_complex_lvalue): Do not duplicate the
8311         argument to modify, pre-, or post-increment when used as an
8312         lvalue and when the argument has side-effects.
8313
8314 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
8315
8316         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
8317         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
8318         cplus_decl_attributes even if attrs is NULL.
8319         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
8320
8321 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
8322
8323         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
8324         calls to decl_attributes.
8325
8326 2001-07-06  Ira Ruben   <ira@apple.com>
8327
8328         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
8329         be DECL_TEMPLATE_RESULT.
8330
8331 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8332
8333         * cp-tree.h (copy_template_template_parm): Rename to ...
8334         (bind_template_template_parm): ... here.
8335         * tree.c (copy_template_template_parm): Rename to ...
8336         (bind_template_template_parm): ... here.  Remove the case when
8337         NEWARGS is NULL_TREE.
8338         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
8339         BOUND_TEMPLATE_TEMPLATE_PARM.
8340         * pt.c (lookup_template_class): Adjust.
8341
8342 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
8343
8344         * cvt.c (convert_lvalue): New fn.
8345         * cp-tree.h: Declare it.
8346         * method.c (do_build_assign_ref): Use it.
8347         (do_build_copy_constructor): Convert parm to base types
8348         before calling base constructors.
8349
8350         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
8351         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
8352         optimize.
8353         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
8354
8355 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
8356
8357         * optimize.c (optimize_inline_calls): New function, broken out
8358         of ...
8359         (optimize_function): ... here. Call it. Don't inline if it is
8360         a thunk.
8361         (dump_function): Print name of dump flag causing this dump.
8362         * semantics.c (expand_body): Move thunk inline check to
8363         optimize_function.
8364
8365 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8366
8367         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
8368         (comptypes): Use target.comp_type_attributes.
8369
8370 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
8371
8372         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
8373
8374 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8375
8376         * error.c (lang_print_error_function): Add a `diagnostic_context *'
8377         parameter. Tweak.
8378
8379 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8380
8381         * decl2.c (import_export_class): Update.
8382
8383 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
8384
8385         * error.c (init_error): Adjust settings.
8386
8387 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
8388
8389         * error.c (init_error): Adjust settings.
8390
8391 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
8392
8393         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
8394         return pointers to data members by reference rather than by value.
8395
8396 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
8397
8398         Implement the Named Return Value optimization.
8399         * cp-tree.h (struct cp_language_function): Add x_return_value.
8400         (current_function_return_value): Now a macro.
8401         * decl.c: Don't define it.
8402         (define_label, finish_case_label): Don't clear it.
8403         (init_decl_processing): Don't register it with GC.
8404         * semantics.c (genrtl_finish_function): Don't check it for
8405         no_return_label.  Copy the RTL from the return value to
8406         current_function_return_value and walk, calling...
8407         (nullify_returns_r): ...this new fn.
8408         * typeck.c (check_return_expr): Set current_function_return_value.
8409
8410 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
8411
8412         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
8413         sharing a ctor vtable with.  Merge code for cases 1 and 2.
8414         (binfo_ctor_vtable): New fn.
8415         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
8416
8417 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
8418
8419         * class.c (dfs_find_final_overrider): Fix logic.
8420
8421         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
8422         virtual thunk instead of non-virtual.
8423         (get_matching_virtual): Uncomment.
8424
8425         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
8426         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
8427         PARM, not ARG.
8428
8429 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
8430
8431         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
8432         we've not emerged from the hierarchy of RTTI_BINFO on reaching
8433         a non-virtual base.
8434
8435 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
8436
8437         * NEWS: Update release number.
8438
8439 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
8440
8441         PR c++/3130, c++/3131, c++/3132
8442         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
8443         * class.c (force_canonical_binfo_r): Move
8444         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
8445         virtual bases unless they're primary and what they're primary
8446         too has been moved.
8447         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
8448         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
8449         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
8450         derived binfo.
8451         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
8452         (layout_nonempty_base_or_field): Add most derived type
8453         parameter. Adjust.
8454         (layout_empty_base): Likewise.
8455         (build_base_field): Likewise.
8456         (build_base_fields): Likewise.
8457         (propagate_binfo_offsets): Add most derived type
8458         parameter. Skip non canonical virtual bases too.
8459         (dfs_set_offset_for_unshared_vbases): Don't skip primary
8460         bases. Do skip canonical bases.
8461         (layout_virtual_bases): Adjust.
8462         (layout_class_type): Adjust.
8463         (dfs_get_primary_binfo): Build list of virtual primary base
8464         candidates.
8465         (get_primary_binfo): Check that the shared virtual primary
8466         base candidate was found first.
8467         (accumulate_vtbl_inits): Don't do anything for non-vptr
8468         containing binfos. For case 1 primary virtual bases, keep
8469         checking that we've not emerged from the hierarchy of RTTI_BINFO.
8470
8471 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
8472
8473         PR c++/3089
8474         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
8475         hierarchy looking for primary bases for a ctor
8476         vtable. Recursively call oneself, if we meet our primary via
8477         this route and haven't met it yet via inheritance graph order.
8478
8479 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
8480
8481         * lang-options.h: Emit documentation for -fno-honor-std, not
8482         -fhonor-std.
8483
8484 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
8485
8486         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
8487         Don't clobber delta.
8488         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
8489
8490 2001-06-10  Mark Mitchell <mark@codesourcery.com>
8491             Gabriel Dos Reis  <gdr@codesourcery.com>
8492
8493         * Make-lang.in (cp/call.o): Depend on diagnostic.h
8494         (cp/typeck.o): Depend on diagnostic.h
8495         (cp/typeck2.o): Depend on diagnostic.h
8496         (cp/repo.o): Depend on dignostic.h
8497         * typeck.c: #include diagnostic.h
8498         (convert_for_initialization): Remove extern declaration for
8499         warningcount and errorcount.
8500
8501         * call.c: #include diagnostic.h
8502         (convert_like_real): Remove extern declaration for warnincount and
8503         errorcount.
8504
8505         * repo.c: #include diagnostic.h
8506         * typeck2.c: #include diagnostic.h
8507
8508 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8509
8510         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
8511         in previous change.
8512
8513 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8514
8515         PR c++/2929
8516         * friend.c (do_friend): Use push_decl_namespace for classes at
8517         namespace scope.
8518
8519 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8520             Jason Merrill <jason_merrill@redhat.com>
8521
8522         PR c++/3061
8523         * class.c (build_secondary_vtable): Use assert, rather than an error
8524         message.
8525         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
8526         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
8527         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
8528         Don't set BINFO_VTABLE for a primary virtual base.
8529
8530 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
8531
8532         * decl.c (duplicate_decls): Update source position information
8533         when a template function is defined.
8534
8535 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
8536
8537         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
8538
8539 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
8540
8541         PR c++/2914
8542         * decl.c (pushtag): Don't push into a complete type's scope.
8543
8544 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
8545
8546         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
8547         (struct lang_decl_flags): Lose generate_with_vtable_p.
8548         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
8549         * class.c (copy_virtuals): Adjust.
8550         * decl2.c (mark_vtable_entries): Adjust.
8551         * method.c (make_thunk, build_vtable_entry): Adjust.
8552         * class.c (update_vtable_entry_for_fn): Only look as far as the
8553         first defining class.
8554         (build_vtbl_initializer): Put nothing in the slot for a function only
8555         defined in a lost primary virtual base.
8556         (add_vcall_offset_vtbl_entries_1): Use the same code for
8557         the lost primary case and the normal case.
8558         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
8559         (get_vfield_offset, get_derived_offset): Lose.
8560         (dfs_find_final_overrider): Use look_for_overrides_here.
8561         (get_matching_virtual): New fn.
8562         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
8563         not BV_VCALL_INDEX.
8564         * search.c (look_for_overrides_here): Split out from...
8565         (look_for_overrides_r): Here.
8566
8567         * class.c (find_final_overrider): Return error_mark_node on error.
8568
8569         * decl2.c (key_method): #if 0 accidental change.
8570
8571 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8572
8573         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
8574         (build_over_call): Likewise.
8575         * decl.c (grokparms): Likewise.
8576         * pt.c (tsubst_decl): Likewise.
8577         * typeck.c (convert_arguments): Likewise.
8578
8579 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
8580
8581         * semantics.c (begin_class_definition): Robustify.
8582
8583         * pt.c (instantiate_decl): Tell the repository code about the
8584         clones, not the cloned functions.
8585         * repo.c (repo_template_used): Explicitly instantiate the cloned
8586         function, not the clones.
8587
8588 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8589
8590         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
8591         ICS_BAD_FLAG on created conversion.
8592         (compare_ics): Break out rank.
8593
8594 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8595
8596         * decl.c (xref_tag): Remove extraneous %s on dependent name
8597         lookup warning.
8598
8599 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8600
8601         * class.c (layout_vtable_decl): Fix off by one error on
8602         build_index_type.
8603         (build_vtt): Likewise.
8604         (build_ctor_vtbl_group): Likewise.
8605
8606 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8607
8608         * class.c (maybe_indent_hierarchy): New function.
8609         (dump_class_hierarchy_r): Add flags. Dump extra binfo
8610         information, if enabled. Use maybe_indent_hierarchy. Adjust
8611         output format.
8612         (dump_class_hierarchy): Adjust prototype. Adjust output format.
8613         (dump_array, dump_vtable, dump_vtt): New functions.
8614         (finish_struct_1): Adjust hierarchy dumping.
8615         (initialize_vtable): Call dump_vtable.
8616         (build_vtt): Call dump_vtt.
8617         (build_ctor_vtbl_group): Call dump_vtable.
8618         * decl2.c (flag_dump_class_layout): Remove.
8619         (cxx_decode_option): Remove dump translation unit
8620         and dump class hierarchy check. Call dump_switch_p.
8621         (finish_file): Adjust dumping.
8622         (dump.c): Only dump base classes if not TDF_SLIM.
8623         Only dump namespace members if not TDF_SLIM.
8624         * optimize.c (dump_function): New function.
8625         (optimize_function): Call dump_function.
8626         * semantics.c (expand_body): Use dump_enabled_p.
8627
8628 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
8629
8630         PR g++/2936
8631         Part missed from first commit
8632         * decl2.c (finish_anon_union): Copy context.
8633
8634 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
8635
8636         PR g++/2936
8637         * optimize.c (remap_decl): Remap anonymous aggregate members too.
8638
8639 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
8640
8641         PR g++/2823
8642         * semantics.c (expand_body): Don't optimize thunks.
8643
8644 2001-05-25  Sam TH  <sam@uchicago.edu>
8645
8646         * cp-tree.h lex.h: Fix header include guards.
8647
8648 2001-05-25  Mark Mitchell <mark@codesourcery.com>
8649
8650         * decl.c (init_decl_processing): Tweak.
8651
8652 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
8653
8654         * decl.c (duplicate_decls): Tidy.
8655         (init_decl_processing): Always set flag_no_builtin.
8656
8657 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
8658
8659         PR c++/2184
8660         * decl2.c (do_local_using_decl): Push the decls, even in a
8661         template.
8662
8663 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
8664
8665         * optimize.c (initialize_inlined_parameters): Don't set
8666         TREE_READONLY for a VAR_DECL taking the place of an inlined
8667         PARM_DECL.
8668
8669 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
8670
8671         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
8672         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
8673         attribute.
8674
8675 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
8676
8677         * parse.y: Refer to compound literals as such, not as
8678         constructor-expressions.
8679
8680 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
8681
8682         * call.c (build_op_delete_call): Ignore exception-specifications
8683         when looking for matching delete operators.
8684         * init.c (build_new_1): Compute whether or not the allocation
8685         function used is a placement allocation function or not, and
8686         communicate this information to build_op_delete_call.
8687
8688 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
8689
8690         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
8691         (build_vtbl_ref): Adjust.
8692         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
8693         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
8694         Re-add vtable-gc.
8695         (unsupported_options): Correspondingly.
8696
8697         * decl2.c (maybe_make_one_only): Check flag_weak, not
8698         supports_one_only().
8699
8700         * cp-tree.def (START_CATCH_STMT): Lose.
8701         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
8702         * tree.c (cp_statement_code_p): Don't case it.
8703         * semantics.c (cp_expand_stmt): Likewise.
8704         * cp-tree.h (START_CATCH_TYPE): Lose.
8705         (HANDLER_TYPE): New.
8706         * except.c (expand_start_catch_block): Don't start any blocks.
8707         Return the type.
8708         (expand_end_catch_block): Don't end any blocks.
8709         * parse.y (handler): Don't pass anything from finish_handler_parms
8710         to finish_handler.
8711         * pt.c (tsubst_expr): Likewise.
8712         * semantics.c (begin_handler): Call note_level_for_catch here.
8713         (finish_handler_parms): Don't return anything.
8714         (genrtl_catch_block, begin_catch_block): Lose.
8715         (genrtl_handler): Call expand_start_catch here.
8716
8717 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
8718
8719         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
8720         (get_vtable_decl, build_vtt): Not here.
8721
8722 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
8723
8724         PR c++/2781
8725         * optimize.c (update_cloned_parm): Copy addressability and other
8726         flags.
8727
8728 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8729
8730         * pt.c (determine_specialization): Ignore artificial functions.
8731
8732 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
8733
8734         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
8735         (C_RID_CODE): Remove.
8736         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
8737         (init_parse): Don't do it here.
8738
8739 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
8740
8741         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
8742         function declaration to avoid stripping the symbol's attributes.
8743
8744 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
8745
8746         * decl.c (pushdecl): Adjust error string.
8747         (xref_tag): Adjust friend class injection warning. Remove the
8748         inherited name from the class shadowed scope.
8749
8750 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
8751
8752         * except.c (cp_protect_cleanup_actions): New function.
8753         (init_exception_processing): Don't set protect_cleanup_actions
8754         here.  Do set lang_protect_cleanup_actions.
8755
8756 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
8757
8758         * spew.c (read_token): Call yyerror on all unexpected tokens.
8759
8760 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
8761
8762         * init.c (member_init_ok_or_else): Take a tree rather than
8763         string for name.
8764         (expand_member_init): Adjust.
8765
8766 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
8767
8768         * decl.c (duplicate_decls): Suppress warning about duplicate
8769         decls if the first decl is a friend.
8770
8771 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
8772
8773         * except.c (choose_personality_routine): Export.  Add
8774         explanatory comment.  Take an enum languages, not a boolean.
8775         (initialize_handler_parm): Adjust to match.
8776         * cp-tree.h: Prototype choose_personality_routine.
8777         * lex.c (handle_pragma_java_exceptions): New function.
8778         (init_cp_pragma): Register #pragma GCC java_exceptions.
8779
8780 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8781
8782         * method.c (build_mangled_C99_name): Remove unused prototype.
8783
8784 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
8785
8786         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
8787         * typeck.c (get_member_function_from_ptrfunc,
8788         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
8789         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
8790
8791         Reverted Geoff Keating's 2001-05-03's patch.
8792
8793 2001-05-11  Ira Ruben   <ira@apple.com>
8794
8795         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
8796
8797 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
8798
8799         * cp-tree.h (finish_label_expr, lookup_label): Delete.
8800         * parse.y: Update for '&&'; don't issue warning here.
8801         * semantics.c (finish_label_expr): Delete.
8802
8803 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
8804
8805         * splay-tree.h (splay_tree_max): New function.
8806         (splay_tree_min): Likewise.
8807
8808 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
8809
8810         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
8811         (pfn_vflag_identifier): Define.
8812         Update comment about layout of pointer functions.
8813         (build_ptrmemfunc1): Update prototype.
8814         (expand_ptrmemfunc_cst): Update prototype.
8815         * decl.c (initialize_predefined_identifiers): Initialize
8816         pfn_vflag_identifier.
8817         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
8818         an extra field to the type.
8819         * expr.c (cplus_expand_constant): Pass 'flag' between
8820         expand_ptrmemfunc_cst and build_ptrmemfunc1.
8821         * typeck.c (get_member_function_from_ptrfunc): When
8822         FUNCTION_BOUNDARY < 16, look at additional field to determine
8823         if a pointer-to-member is a real pointer or a vtable offset.
8824         (build_ptrmemfunc1): Add new parameter to contain extra field.
8825         (build_ptrmemfunc): Pass the extra field around.
8826         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
8827         (pfn_from_ptrmemfunc): Ignore the extra field.
8828
8829 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
8830
8831         * cp-tree.h (flag_inline_trees): Update documentation.
8832         * decl.c (init_decl_processing): Adjust handling of
8833         flag_inline_functions and flag_inline_trees to support -O3.
8834         (grokfndecl): Set DECL_INLINE on all functions if that's what
8835         the user requested.
8836         (save_function_data): Clear DECL_INLINE in
8837         current_function_cannot_inline is non-NULL.
8838         * decl2.c (flag_inline_trees): Update documentation.
8839
8840 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
8841
8842         * dump.c (cp_dump_tree, USING_STMT case): New case.
8843         * tree.c (cp_statement_code_p): Add USING_STMT.
8844         * decl2.c (do_using_directive): Add the using directive statement.
8845
8846         * tree.c (walk_tree): Reformat an if block.
8847
8848 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
8849
8850         * decl.c (compute_array_index_type): Don't try to do anything with
8851         the indices when processing a template.
8852
8853 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8854
8855         * call.c: NULL_PTR -> NULL.
8856         * class.c: Likewise.
8857         * cvt.c: Likewise.
8858         * decl.c: Likewise.
8859         * decl2.c: Likewise.
8860         * except.c: Likewise.
8861         * init.c: Likewise.
8862         * rtti.c: Likewise.
8863         * search.c: Likewise.
8864         * tree.c: Likewise.
8865         * typeck.c: Likewise.
8866         * typeck2.c: Likewise.
8867
8868 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
8869
8870         * decl2.c (do_using_directive): Revert previous patch.
8871
8872 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8873
8874         * cp-tree.def (USING_STMT): New statement node.
8875         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
8876         * decl2.c (do_using_directive): Add USING_STMT to statement
8877         tree. Don't emit errors when processing template decl.
8878         * pt.c (tsubst_expr, USING_STMT case): New case.
8879         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
8880
8881 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8882
8883         * call.c (build_new_op): Convert args from reference here.
8884         (build_conditional_expr): Don't convert here.
8885
8886 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8887
8888         * spew.c (last_token_id): New static variable.
8889         (read_token): Set it here.
8890         (yyerror): Use it here.
8891
8892 2001-04-30  Richard Henderson  <rth@redhat.com>
8893
8894         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
8895         * decl.c: Likewise.
8896
8897 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
8898
8899         * gxxint.texi: Remove.
8900         * Make-lang.in: Remove all traces of gxxint.texi.
8901
8902 2001-04-30  Mark P Mitchell  <mark@codesourcery.com>
8903
8904         * decl2.c (start_static_initialization_or_destruction): Correct
8905         logic to handle the -fno-use-cxa-atexit case.
8906
8907 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
8908
8909         * optimize.c (update_cloned_parm): New function.
8910         (maybe_clone_body): Use it.  Update the `this' parameter too.
8911
8912 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8913
8914         * decl2.c (unsupported_options): Add new-abi.
8915         * lang-options.h: Remove no longer supported options.
8916
8917 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
8918
8919         * except.c (can_convert_eh): Don't check template parms,
8920         typename types etc.
8921
8922 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
8923
8924         * optimize.c (maybe_clone_body): Copy parameter names and locations.
8925
8926 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
8927
8928         * cp-tree.h (adjust_clone_args): Prototype new function.
8929         * class.c (adjust_clone_args): New function.
8930         * decl.c (start_function): Call it for in charge ctors.
8931
8932 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
8933
8934         * method.c (use_thunk): Make sure that thunks really are emitted
8935         when requested.
8936
8937 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
8938
8939         * mangle.c (write_chars): New macro.
8940         (hwint_to_ascii): New function
8941         (write_number): Use it.
8942         (write_integer_cst): Deal with really big numbers.
8943
8944 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
8945
8946         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
8947         the clone.
8948
8949 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
8950
8951         * decl.c (grokdeclarator): Set context of namespace scope
8952         TYPE_DECLS.
8953
8954 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
8955
8956         * cp/optimize.c: Include hashtab.h.
8957         (struct inline_data): Add tree_pruner.
8958         (expand_call_inline, expand_calls_inline): Use it when calling
8959         walk_tree.
8960         (optimize_function): Initialize and free tree_pruner.
8961
8962 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
8963
8964         Lazy __FUNCTION__ generation.
8965         * cp-tree.def (FUNCTION_NAME): Remove.
8966         * cp-tree.h (function_name_declared_p): Remove.
8967         (cp_fname_init): Prototype.
8968         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
8969         don't call declare_function_name. Call start_fname_decls.
8970         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
8971         clobber the line number.
8972         (cp_fname_init): New function.
8973         (start_function): Call start_fname_decls.
8974         (finish_function): Call finish_fname_decls.
8975         * lex.c (reswords): Add slots for __FUNCTION__ et al.
8976         (rid_to_yy): Add mappings for __FUNCTION__ et al.
8977         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
8978         * parse.y (VAR_FUNC_NAME): New token.
8979         (primary): Add VAR_FUNC_NAME.
8980         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
8981         generation.
8982         (tsubst, FUNCTION_NAME case): Remove.
8983         (tsubst_copy, FUNCTION_NAME case): Remove.
8984         (tsubst_expr, DECL_STMT case): Be careful with a
8985         DECL_PRETTY_FUNCTION_P.
8986         (instantiate_decl): Remove function_name_declared_p.
8987         * semantics.c (begin_compound_statement): Don't call
8988         declare_function_name here.
8989         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
8990         (finish_translation_unit): Call finish_fname_decls.
8991         (expand_body): Remove function_name_declared_p.
8992         * typeck2.c (digest_init): Allow any ERROR_MARK.
8993
8994 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
8995
8996         * pt.c (tsubst_decl): Use VOID_TYPE_P.
8997         * semantics.c: Fix some typos.
8998
8999 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
9000
9001         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
9002
9003 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9004
9005         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
9006
9007 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
9008
9009         * except.c (build_throw): Wrap the initialization of the exception
9010         object in a MUST_NOT_THROW_EXPR.
9011         (do_free_exception): #if 0.
9012
9013 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
9014
9015         * cp-tree.h (finish_enum): Change prototype.
9016         * decl.c (finish_enum): Reorganize.
9017         * parse.y (structsp): Adjust calls to finish_enum.
9018
9019 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
9020
9021         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
9022         't' case.
9023
9024 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
9025
9026         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
9027         (layout_empty_base): Return at end flag.
9028         (build_base_field): Likewise.
9029         (build_base_fields): Likewise.
9030         (layout_virtual_bases): Don't add 1 to eoc value.
9031         (end_of_class): Use full size for empty bases.
9032         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
9033         empty bases. Don't add 1 to eoc value. Only add trailing padding
9034         if we're an empty class with no empty bases.
9035         (dump_class_hierarchy): Dump size and alignment.
9036
9037 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
9038
9039         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
9040         ICS_BAD_FLAG.
9041
9042 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
9043
9044         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
9045         is found, look first if name does not match the structure name.
9046
9047 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
9048
9049         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
9050         set.
9051         (SET_DECL_LANGUAGE): New macro.
9052         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
9053         (pushdecl): Likewise.
9054         (build_library_fn_1): Likewise.
9055         (build_cp_library_fn): Likewise.
9056         (grokfndecl): Likewise.
9057         (grokvardecl): Mark `extern "C"' variables as having C linkage.
9058         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
9059         * lex.c (retrofit_lang_decl): Likewise.
9060         * mangle.c (mangle_decl_string): Don't mangle the names of
9061         variables declared with C language linkage.
9062         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
9063
9064 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
9065
9066         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
9067         flag_access_control from uninitialized storage.
9068
9069 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
9070
9071         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
9072         * mangle.c (write_pointer_to_member_type): Fix mangling of
9073         pointers to cv-qualified member function types.
9074
9075         * init.c (build_delete): Create a SAVE_EXPR for the address if
9076         we're going to use it more than once.
9077
9078 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
9079
9080         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
9081         (expand_ptremfunc_cst): Change prototype.
9082         (delta2_from_ptrmemfunc): Remove.
9083         * expr.c (cplus_expand_constant): Adjust call to
9084         expand_ptrmemfunc_cst.
9085         * typeck.c (build_ptrmemfunc1): Simplify.
9086         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
9087         results in a constant.
9088         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
9089         (delta2_from_ptrmemfunc): Remove.
9090         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
9091
9092 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
9093
9094         * cp-tree.h (decl_namespace_list): New macro.
9095         (struct saved_scope): Add decl_ns_list.
9096         * decl.c (mark_saved_scope): Mark it.
9097         * decl2.c: Lose static decl_namespace_list.
9098         (init_decl2): Don't save it.
9099
9100 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9101
9102         * cp-tree.h (warn_return_type, yylex): Delete redundant
9103         declarations.
9104
9105         * decl.c (current_class_depth, global_namespace): Likewise.
9106
9107         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
9108
9109         * repo.c (flag_use_repository): Likewise.
9110
9111 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9112
9113         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
9114         set_block, pushdecl, getdecls, gettags, init_decl_processing,
9115         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
9116         lvalue_or_else, print_lang_statistics, comp_target_types,
9117         unsigned_type, signed_type, signed_or_unsigned_type,
9118         build_function_call, mark_addressable, incomplete_type_error):
9119         Delete redundant declarations.
9120
9121 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
9122
9123         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
9124         (TYPE_ANONYMOUS_P): New macro.
9125         (TAGGED_TYPE_P): New macro.
9126         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
9127         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
9128         * tree.c (no_linkage_helper): Likewise.
9129         * semantics.c (begin_class_definition): Likewise.
9130         * pt.c (convert_template_argument): Likewise.
9131         * lex.c (check_for_missing_semicolon): Likewise.
9132
9133 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
9134
9135         * class.c (dfs_unshared_virtual_bases): New function.
9136         (mark_primary_bases): Call it.
9137         (check_bases): Ignore virtual bases when determining
9138         nearly-emptiness.
9139
9140 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
9141
9142         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
9143
9144 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
9145
9146         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
9147         cloned function to the clone.
9148
9149 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9150
9151         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
9152
9153         * semantics.c: Include expr.h.
9154
9155 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
9156
9157         * method.c (implicitly_declare_fn): Commonize code for copy ctor
9158         and assignment op. Set TREE_USED for parameter.
9159
9160 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
9161
9162         * class.c (find_final_overrider_data): Add `candidates'.
9163         (dfs_find_final_overrider): Don't issue error messages
9164         prematurely.
9165         (find_final_overrider): Issue error messages here.
9166         (build_base_field): Don't warn about amgibuous direct bases here.
9167         (warn_about_ambiguous_direct_bases): New function.
9168         (layout_class_type): Use it.
9169
9170 2001-04-10  Richard Henderson  <rth@redhat.com>
9171
9172         * typeck.c (build_array_ref): Push the array reference inside
9173         COMPOUND_EXPR and COND_EXPR.
9174
9175 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
9176
9177         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
9178         * decl.c (duplicate_decls): Adjust accordingly.
9179         (maybe_commonize_var): Likewise.
9180         (grokfndecl): Likewise.
9181         (start_function): Likewise.
9182         (start_method): Likewise.
9183         * decl2.c (key_method): Likewise.
9184         (import_export_decl): Likewise.
9185         * method.c (implicitly_declare_fn): Likewise.
9186         * optimize.c (maybe_clone_body): Likewise.
9187
9188 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
9189
9190         * lang-specs.h: Add __DEPRECATED.
9191
9192 2001-04-05  J"orn Rennecke <amylaar@redhat.com>
9193
9194         * search.c (get_dynamic_cast_base_type): When building a new
9195         constant, set its type to ssizetype.
9196
9197 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
9198
9199         * optimize.c (expand_call_inline): Only add newly inlined statements
9200         into inlined_stmts.
9201
9202 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
9203
9204         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
9205         (OPERATOR_FORMAT): Likewise.
9206         (OPERATOR_TYPENAME_FORMAT): Likewise.
9207         * operators.def: Remove old name-mangling information.
9208         * decl.c (grok_op_properties): Adjust accordingly.
9209         * lex.c (init_operators): Likewise.
9210         * rtti.c (get_tinfo_decl): Issue error messages about types that
9211         have variable size.
9212
9213 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
9214
9215         * decl2.c (import_export_decl): Don't call import_export_class
9216         when processing an inline member function.
9217         * semantics.c (expand_body): Call import_export_decl before
9218         emitting inline functions.
9219
9220 2001-03-28  Richard Henderson  <rth@redhat.com>
9221
9222         IA-64 ABI Exception Handling:
9223         * cp-tree.def (EH_SPEC_BLOCK): New.
9224         (MUST_NOT_THROW_EXPR): New.
9225         * cp-tree.h: Update changed function declarations.
9226         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
9227         (CPTI_CALL_UNEXPECTED): New.
9228         (struct cp_language_function): Rename x_eh_spec_try_block
9229         to x_eh_spec_block.
9230         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
9231         * decl.c (current_binding_level): If no current function
9232         bindings, revert to scope_chain.
9233         (initialize_predefined_identifiers): Remove __cp_push_exception.
9234         (store_parm_decls): Use begin_eh_spec_block.
9235         (finish_function): Use finish_eh_spec_block.
9236         (mark_lang_function): Update for name changes.
9237         * decl2.c (finish_file): No mark_all_runtime_matches.
9238         * dump.c (cp_dump_tree): Handle new tree codes.
9239         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
9240         * except.c (catch_language_init, catch_language): Remove.
9241         (init_exception_processing): Don't set language code.
9242         Initialize call_unexpected_node, protect_cleanup_actions,
9243         eh_personality_libfunc, lang_eh_runtime_type.
9244         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
9245         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
9246         (prepare_eh_type): Split out type canonicalizations ...
9247         (build_eh_type_type): ... from here.
9248         (build_eh_type_type_ref): Remove.
9249         (mark_all_runtime_matches): Remove.
9250         (build_exc_ptr): New.
9251         (do_begin_catch, do_end_catch): New.
9252         (do_pop_exception): Remove.
9253         (build_terminate_handler): Remove.
9254         (choose_personality_routine): Split out language choice from ...
9255         (initialize_handler_parm): ... here.
9256         Use MUST_NOT_THROW_EXPR.
9257         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
9258         exception object handling.
9259         (expand_start_eh_spec, expand_end_eh_spec): Remove.
9260         (expand_exception_blocks, alloc_eh_object): Remove.
9261         (begin_eh_spec_block, finish_eh_spec_block): New.
9262         (do_allocate_exception, do_free_exception): New.
9263         (expand_throw): Merge into ...
9264         (build_throw): ... here.  Update for abi.
9265         * expr.c (cplus_expand_expr): No expand_internal_throw.
9266         Handle MUST_NOT_THROW_EXPR.
9267         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
9268         * semantics.c (*) Update for except.h name changes.
9269         (genrtl_try_block): No protect_with_terminate.
9270         (genrtl_eh_spec_block): New.
9271         (genrtl_handler): Don't emit the goto here.
9272         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
9273         (genrtl_finish_function): Don't expand_exception_blocks.
9274         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
9275
9276 2001-03-28  Richard Henderson  <rth@redhat.com>
9277
9278         * decl.c (struct named_label_list): Rename eh_region to
9279         in_try_scope, add in_catch_scope.
9280         (struct binding_level): Rename eh_region to is_try_scope,
9281         add is_catch_scope.
9282         (note_level_for_try): Rename from note_level_for_eh.
9283         (note_level_for_catch): New.
9284         (poplevel): Copy both is_try_scope and is_catch_scope to
9285         the named_label_list struct.
9286         (check_previous_goto_1): Don't check for catch block via
9287         DECL_ARTIFICIAL; use in_try_scope instead.
9288         (check_goto): Likewise.
9289         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
9290         * except.c (expand_start_catch_block): Call note_level_for_catch.
9291         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
9292
9293 2001-03-27  Richard Henderson  <rth@redhat.com>
9294
9295         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
9296         exceptions_via_longjmp.
9297
9298 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
9299
9300         * pt.c (check_default_tmpl_args):  Make error messages clearer.
9301
9302 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
9303
9304         * error.c:  Also undefine 'A' macro used for cp_printers definition.
9305
9306 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9307
9308         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
9309
9310 2001-03-26  Mike Yang <yang@research.att.com>
9311             Mark Mitchell  <mark@codesourcery.com>
9312
9313         * dump.c (dump_access): New function.
9314         (cp_dump_tree): Use it.  Dump basetype information for class
9315         types.
9316
9317 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
9318
9319         * Makefile.in (optimize.o): Depend on params.h.
9320         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
9321         (init_decl_processing): Set flag_no_inline when doing
9322         inlining-on-trees.
9323         * optimize.c: Include params.h.
9324         (struct inline_data): Improve documentation of FNS.  Add
9325         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
9326         (INSNS_PER_STMT): New macro.
9327         (remap_block): Use CLONING_P.
9328         (inlinable_function_p): Don't inline big functions.
9329         (expand_call_inline): Keep track of how much inlining we've done.
9330         (optimize_function): Set FIRST_INLINED_FN.
9331         (maybe_clone_body): Set CLONING_P.
9332         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
9333         tree nodes.
9334         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
9335         rest_of_compilation.  Clear DECL_RTL for local variables
9336         afterwards.
9337         (clear_decl_rtl): New function.
9338
9339 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
9340
9341         Implement DR 209
9342         * cp-tree.h (skip_type_access_control,
9343         reset_type_access_control): Prototype.
9344         * decl.c (grokdeclarator): Access of friends is not checked.
9345         * parse.y (component_decl_list): Reset type access control.
9346         * semantics.c (decl_type_access_control): Clear
9347         current_type_lookups.
9348         (save_type_access_control): Don't save if not deferring.
9349         (skip_type_access_control, reset_type_access_control): New
9350         functions.
9351         (begin_class_definition): Do type access control for basetypes.
9352         Start deferred access control.
9353         (finish_class_definition): Resume immediate access control if
9354         this is a local class.
9355
9356 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9357
9358         * class.c (add_method): Use memcpy/memmove, not bcopy.
9359
9360         * decl.c (duplicate_decls): Likewise.
9361
9362 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
9363
9364         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
9365         not `_'.
9366
9367 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
9368
9369         * decl.c (local_names): Define.
9370         (push_local_name): New.
9371         (grok_reference_init): Return init if initializing static reference
9372         variable with non-constant instead of emitting it.
9373         Move expand_static_init call to cp_finish_decl.
9374         (layout_var_decl): Call push_local_name.
9375         (maybe_commonize_var): Allow inlining functions even if they have
9376         static local variables, use comdat_linkage for them if flag_weak.
9377         (check_initializer): Call obscure_complex_init if
9378         grok_reference_init returned nonzero.
9379         (save_function_data): Clear x_local_names.
9380         (pop_cp_function_context): Free x_local_names.
9381         (mark_inlined_fns): Remove.
9382         (mark_lang_function): Mark x_local_names.
9383         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
9384         Mark inlined_fns as tree, remove call to mark_inlined_fns.
9385         * class.c (alter_access): Ensure DECL_ACCESS is never set if
9386         DECL_DISCRIMINATOR_P.
9387         * cp-tree.h (cp_language_function): Add x_local_names.
9388         (lang_decl_flags): Add discriminator into u2.
9389         (lang_decl_inlined_fns): Remove.
9390         (lang_decl): inlined_fns is now a TREE_VEC.
9391         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
9392         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
9393         TREE_VEC, not a custom structure.
9394         (optimize_function): Likewise.
9395         * mangle.c (discriminator_for_local_entity): Discriminate among
9396         VAR_DECL local entities.
9397         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
9398         is not valid.
9399
9400 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
9401
9402         Add support for Java interface method calls.
9403         * cp-tree.h (struct lang_type): Add java_interface flag.
9404         (TYPE_JAVA_INTERFACE): New macro.
9405         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
9406         by setting TYPE_JAVA_INTERFACE.
9407         * call.c (java_iface_lookup_fn): New static.
9408         (build_over_call): If calling a method declared in a
9409         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
9410         expression which resolves the function address.
9411         (build_java_interface_fn_ref): New function.
9412
9413 2001-03-22  Richard Henderson  <rth@redhat.com>
9414
9415         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
9416         * except.c: Don't include it.
9417
9418 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
9419             based on an idea from Joe Buck <jbuck@synopsys.com>
9420
9421         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
9422         New nonterminals.
9423         (data_def, component_decl): Add reductions to bad_decl.
9424
9425 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
9426
9427         * method.c (do_build_assign_ref): Don't use build_modify_expr for
9428         anonymous aggregates, since they don't have assignment operator
9429         method.
9430         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
9431         assignment operators for anonymous structure fields.
9432
9433 2001-03-21  Jason Merrill  <jason@redhat.com>
9434
9435         * pt.c (instantiate_decl): Abort if we see a member constant
9436         instantiation that doesn't already have its initializer.
9437         Downgrade explicit instantiation without definition to pedwarn.
9438
9439         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
9440         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
9441         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
9442
9443         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
9444         (pending_vtables): Remove.
9445         * decl2.c (pending_vtables): Remove.
9446         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
9447         CLASSTYPE_VTABLE_NEEDS_WRITING.
9448         (import_export_class): Likewise.
9449         (init_decl2): Don't mark pending_vtables.
9450         * lex.c (handle_pragma_vtable): Just sorry.
9451         * pt.c (instantiate_class_template): Don't mess with
9452         CLASSTYPE_VTABLE_NEEDS_WRITING.
9453         (mark_class_instantiated): Likewise.
9454         * ptree.c (print_lang_type): Don't print it.
9455         * semantics.c (begin_class_definition): Don't set it.
9456
9457         * pt.c (template_tail): Replace with last_pending_template.
9458         (maybe_templates, maybe_template_tail): Remove.
9459         (add_pending_template): Adjust.
9460         (instantiate_pending_templates): Adjust.
9461
9462         * cp-tree.h (struct saved_scope): Remove lang_stack field.
9463         (current_lang_stack): Remove.
9464         * decl.c (maybe_push_to_top_level): Don't initialize it.
9465         (duplicate_decls): Use current_lang_depth.
9466         (xref_basetypes): Likewise.
9467         * class.c (current_lang_depth): New fn.
9468         (push_lang_context): Use more varray functionality.
9469         (pop_lang_context): Likewise.
9470
9471         * error.c (GLOBAL_THING): Always use '__'.
9472
9473 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
9474
9475         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
9476
9477         * mangle.c (mangle_decl_string): Mangle the names of overloaded
9478         operators, even when they have `extern "C"' linkage.
9479
9480 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
9481
9482         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
9483         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9484         where it's not necessary.
9485         (add_method): Remove optimization involving comparison of
9486         DECL_ASSEMBLER_NAME.
9487         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
9488         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9489         where it's not necessary.
9490         (check_methods): Likewise.
9491         (build_clone): Likewise.
9492         (built_vtt): Likewise.
9493         * cp-tree.h (DECL_NEEDED_P): Likewise.
9494         * decl.c (pushtag): Likewise.
9495         (duplicate_decls): Likewise.
9496         (pushdecl): Likewise.
9497         (builtin_function): Likewise.
9498         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
9499         (build_cp_library_fn): Likewise.
9500         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
9501         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9502         where it's not necessary.
9503         (make_rtl_for_nonlocal_decl): Likewise.
9504         (cp_finish_decl): Likewise.
9505         (grokfndecl): Likewise.
9506         (grokvardecl): Likewise.
9507         (grokdeclarator): Likewise.
9508         (start_function): Likewise.
9509         (cp_missing_return_ok_p): Likewise.
9510         * decl2.c (grokclassfn): Likewise.
9511         (check_classfn): Likewise.
9512         (finish_static_data_member_decl): Likewise.
9513         (grokfield): Likewise.
9514         * error.c (GLOBAL_IORD_P): Remove.
9515         (dump_global_iord): Improve output.
9516         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
9517         * except.c (nothrow_libfn_p): Summarily reject any function not in
9518         namespace-scope.
9519         * init.c (build_java_class_ref): Don't explicitly set
9520         DECL_ASSEMBLER_NAME after calling mangle_decl.
9521         * mangle.c (mangle_decl_string): Handle extern "C" functions.
9522         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
9523         * method.c (set_mangled_name_for_decl): Don't explicitly set
9524         DECL_ASSEMBLER_NAME after calling mangle_decl.
9525         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
9526         IDENTIFIER_GLOBAL_VALUE for the thunk.
9527         * pt.c (set_mangled_name_for_template_decl): Remove.
9528         (check_explicit_specialization): Don't use it.
9529         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
9530         (tsubst_friend_function): Likewise.
9531         (tsubst_decl): Likewise.
9532         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
9533         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
9534         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9535         where it's not necessary.
9536         (tinfo_base_init): Likewise.
9537         (create_real_tinfo_var): Likewise.
9538         * search.c (looup_field_1): Likewise.
9539         * semantics.c (finish_named_return_value): Likewise.
9540         * tree.c (init_tree): Set lang_set_decl_assembler_name.
9541
9542 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
9543
9544         Correct semantics restrictions checking in throw-expression.
9545         * except.c (is_admissible_throw_operand): New function.
9546         (build_throw): Use it.
9547
9548 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
9549
9550         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
9551         and its ilk.
9552
9553 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
9554
9555         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9556         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
9557         * decl.c (duplicate_decls): Likewise.
9558         (builtin_function): Likewise.
9559         (build_library_fn): Likewise.
9560         (build_cp_library_fn): Likewise.
9561         (check_initializer): Likewise.
9562         (cp_finish_decl): Likewise.
9563         * decl2.c (grokfield): Likewise.
9564         (grok_function_init): Remove #if 0'd code.
9565         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9566         * friend.c (do_friend): Likewise.
9567         * init.c (get_temp_regvar): Likewise.
9568         * method.c (make_thunk): Likewise.
9569         * pt.c (tsubst_friend_function): Likewise.
9570         (tsubst_decl): Likewise.
9571         (regenerate_decl_from_template): Likewise.
9572         * semantics.c (genrtl_named_return_value): Likewise.
9573         (expand_body): Likewise.
9574         (genrtl_finish_function): Likewise.
9575         * tree.c (cp_tree_equal): Likewise.
9576
9577 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
9578
9579         * call.c (convert_like_real): Add extra semantics to INNER
9580         parameter. Don't convert to temporary if a user conversion
9581         gives us an lvalue that we're about to bind to a reference.
9582         Set INNER to indicate pending reference binding on recursive
9583         calls.
9584
9585 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
9586
9587         * cp/lex.c: Delete duplicate pending_lang_change.
9588
9589 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
9590
9591         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
9592         Similarly.
9593         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
9594         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
9595
9596 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
9597
9598         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
9599
9600 2001-03-08  Stan Shebs  <shebs@apple.com>
9601
9602         * cp-tree.h (set_identifier_local_value): Remove unused decl.
9603
9604 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
9605
9606         * spew.c: Remove references to CPP_OSTRING.
9607
9608 2001-03-06  Andrew Haley  <aph@redhat.com>
9609
9610         * typeck.c (convert_arguments): Check that we have an fndecl.
9611
9612 2001-03-05  Andrew Haley  <aph@redhat.com>
9613
9614         * typeck.c (convert_arguments): Don't do ellipsis conversion for
9615         __built_in_constant_p.
9616
9617 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9618
9619         * typeck.c (build_static_cast): Allow enum to enum conversions
9620         as per DR 128.
9621
9622 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9623
9624         * class.c (check_field_decls): Pointers to member do not a
9625         non-pod struct make, as per DR 148.
9626
9627 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9628
9629         * call.c (joust): cp_pedwarn when using gnu extension concerning
9630         worst conversion sequences.
9631
9632 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9633
9634         * decl.c: Replace all uses of 'boolean' with 'bool'.
9635
9636 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9637
9638         * lang-specs.h: Add zero initializer for cpp_spec field to
9639         all array elements that need one.  Don't put an #ifdef inside
9640         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
9641         use it.
9642
9643 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
9644
9645         Implement using decls inside template functions.
9646         * decl2.c (validate_nonmember_using_decl): Don't special case
9647         fake_std_node in the global namespace. Don't reject early when
9648         processing a template.
9649         (do_local_using_decl): Add to statement tree. Don't do further
9650         processing when building a template.
9651         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
9652
9653 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
9654
9655         * decl2.c (do_nonmember_using_decl): Don't complain if we find
9656         same function. Do complain about ambiguating extern "C"
9657         declarations.
9658
9659 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
9660
9661         Remove floating point and complex type template constant parms.
9662         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
9663         COMPLEX_TYPE extensions.
9664         (invalid_nontype_parm_type_p): Likewise.
9665
9666 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
9667
9668         * except.c (call_eh_info): Revert "match_function"'s type.
9669
9670 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
9671
9672         Fix ctor vtable vcall offsets.
9673         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
9674         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
9675         (get_matching_base): Remove.
9676         (get_original_base): New function.
9677         (build_vtbl_initializer): Initialize vid.rtti_binfo.
9678         Use a virtual thunk for a ctor vtable with an index
9679         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
9680         primary base within a constructor vtable. Only set
9681         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
9682         when primary base has been lost.
9683         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
9684
9685 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
9686
9687         * call.c (joust): Ensure more_specialized()'s argument length
9688         parameter has correct value for constructors.
9689
9690 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
9691
9692         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
9693
9694         * decl.c (mark_inlined_fns): Prototype.
9695
9696 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
9697
9698         * spew.c (yylex): Correct handling of friends.
9699
9700 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
9701
9702         * mangle.c (write_encoding): Pass write_function_type the
9703         FUNCTION_DECL for the function being encoded.
9704         (write_function_type): Pass it along to write_bare_function_type.
9705         (write_bare_function_type): Pass it along to write_method_parms.
9706         (write_method_parms): Don't mangle the compiler-generated
9707         parameters to a constructor or destructor.
9708
9709 2001-02-22  Andreas Jaeger  <aj@suse.de>
9710
9711         * optimize.c: Include toplev.h for
9712         note_deferral_of_defined_inline_function prototype.
9713
9714 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
9715
9716         * cp-tree.h (struct lang_decl_inlined_fns): New.
9717         (struct lang_decls): Add inlined_fns.
9718         (DECL_INLINED_FNS): New macro.
9719         * optimize.c (struct inline_data): Add inlined_fns.
9720         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
9721         (inlinable_function_p): Likewise, fix typo in comment,
9722         function is not inlinable if it already inlined function currently
9723         being optimized.
9724         (expand_call_inline): Add fn to inlined_fns if necessary.
9725         (optimize_function): Initialize inlined_fns.
9726         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
9727         * decl.c (mark_inlined_fns): New function.
9728         (lang_mark_tree): Call it.
9729
9730 2001-02-21  Jason Merrill  <jason@redhat.com>
9731
9732         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
9733         (DECL_UNINLINABLE): Move to middle-end.
9734
9735         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
9736         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
9737         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
9738         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
9739         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
9740
9741         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
9742         second parm of op=.
9743
9744 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
9745
9746         * decl2.c (set_decl_namespace): Allow explicit instantiations in
9747         any namespace.
9748
9749 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9750
9751         * optimize.c (expand_call_inline): Don't walk subtrees of type
9752         nodes.
9753
9754 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
9755
9756         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
9757         for a destructor.
9758
9759 2001-02-18  Jason Merrill  <jason@redhat.com>
9760
9761         Do put the VTT parameter in DECL_ARGUMENTS.
9762         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
9763         (current_vtt_parm): New macro.
9764         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
9765         (DECL_HAS_VTT_PARM_P): New macro.
9766         (DECL_VTT_PARM): Remove.
9767         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
9768         * decl.c (duplicate_decls): Only copy the operator code if
9769         appropriate.
9770         (start_function): Set current_vtt_parm.
9771         (lang_mark_tree): Don't mark vtt_parm.
9772         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
9773         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
9774         * class.c (build_clone): Maybe remove the VTT parm.
9775         * optimize.c (maybe_clone_body): Set up the VTT parm.
9776         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
9777         * call.c (build_over_call): Just allow the VTT arg.
9778         * method.c (make_thunk): Don't set DECL_VTT_PARM.
9779         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
9780         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
9781         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
9782         * error.c (dump_function_decl): Likewise.
9783         * call.c (build_user_type_conversion_1, convert_like_real): Abort
9784         if we try to call a constructor with in-charge or VTT parms.
9785         * method.c (skip_artificial_parms_for): New fn.
9786         * call.c (add_function_candidate, build_over_call): Call it.
9787         * call.c (build_new_method_call): Use current_vtt_parm.
9788         * init.c (expand_virtual_init): Likewise.
9789         * class.c (same_signature_p): No longer static.
9790         * cp-tree.h: Declare it.
9791         * search.c (look_for_overrides_r): Use it.
9792
9793 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
9794
9795         * cp-tree.h (new_abi_rtti_p): Remove.
9796         (name_mangling_version): Likewise.
9797         (flag_do_squangling): Likewise.
9798         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
9799         * decl.c (grokfndecl): Likewise.
9800         * decl2.c (name_mangling_version): Remove.
9801         (flag_do_squangling): Likewise.
9802         (lang_f_options): Remove `squangle'.
9803         (unsupported_options): Add `squangle'.
9804         (cxx_decode_option): Issue a warning about uses of
9805         -fname-mangling-version.
9806         (finish_file): Remove old ABI support.
9807         * pt.c (check_explicit_specialization): Likewise.
9808         (tsubst_decl): Likewise.
9809         * rtti.c (init_rtti_processing): Likewise.
9810         (build_headof): Likewise.
9811         (get_tinfo_decl_dynamic): Likewise.
9812         (tinfo_from_decl): Likewise.
9813         (build_dynamic_cast_1): Likewise.
9814         (synthesize_tinfo_var): Likewise.
9815         * init.c (build_new): Allow enumeration types for the array-bounds
9816         in a direct-new-declarator.
9817
9818         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
9819
9820         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
9821         TREE_PROTECTED from the template being specialized.
9822
9823 2001-02-17  Jason Merrill  <jason@redhat.com>
9824
9825         * decl2.c (build_artificial_parm): Set TREE_READONLY.
9826
9827         * decl.c (bad_specifiers): Allow throw specs on things with
9828         pointer-to-function or -member-function type.
9829         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
9830         a pmf.
9831
9832 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
9833
9834         * call.c (check_dtor_name): Handle template names correctly.
9835
9836 2001-02-16  Jason Merrill  <jason@redhat.com>
9837
9838         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
9839         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
9840         * optimize.c (maybe_clone_body): Don't substitute it.
9841         * call.c (build_new_method_call): Check in_chrg instead.
9842         * init.c (expand_virtual_init): Likewise.
9843
9844 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
9845
9846         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
9847         class-type introduces at least a type-name.
9848
9849 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
9850
9851         * call.c (convert_like_real): Create a temporary for non-lvalue.
9852
9853 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
9854
9855         * cp-tree.h: Fix typos in comments.
9856
9857 2001-02-16  Jason Merrill  <jason@redhat.com>
9858
9859         * optimize.c (remap_block): If we're compiling a clone, pass the
9860         new block to insert_block.
9861
9862 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
9863
9864         * semantics.c (finish_asm_stmt): Robustify.
9865
9866 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
9867
9868         * pt.c (push_template_decl_real): Don't remangle the name of a
9869         class template.
9870
9871 2001-02-15  Jim Meyering  <meyering@lucent.com>
9872
9873         * Make-lang.in (c++.install-common): Depend on installdirs.
9874         (c++.install-info): Likewise.
9875         (c++.install-man): Likewise.
9876
9877 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
9878
9879         * typeck2.c (build_m_component_ref): Robustify.
9880
9881 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
9882
9883         * friend.c (do_friend): Don't take the nested [template] class
9884         into account when deciding whether to warn about the friend
9885         function not referring to a template function.
9886
9887 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
9888
9889         * typeck.c (build_unary_op): Clarify error message.
9890
9891 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
9892
9893         * parse.y (component_constructor_declarator): allow optional
9894         parentheses around constructor class name.
9895
9896 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9897
9898         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
9899         section.
9900         * init.c (emit_base_init): Remove incorrect comment about
9901         virtual bases.
9902         * method.c (make_thunk): Fix comment alignment.
9903
9904 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9905
9906         Kill remnants of this is variable.
9907         * cp-tree.h (flag_this_is_variable): Remove.
9908         * decl2.c (flag_this_is_variable): Remove.
9909         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
9910         (build_vbase_path): The path is non-static, even in a cdtor.
9911         (resolves_to_fixed_type_p): Add additional return value.
9912         * search.c (init_vbase_pointers): Adjust.
9913         * tree.c (lvalue_p_1): Adjust.
9914         * typeck.c (mark_addressable): Adjust.
9915
9916 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9917
9918         * pt.c (unify): Don't check cv quals of array types.
9919
9920 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9921
9922         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
9923         check whether we already have the type.
9924
9925 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
9926
9927         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
9928         * call.c (build_op_delete_call): Simplify to remove duplicate
9929         code.
9930         * class.c (clone_function_decl): Don't build the deleting variant
9931         of a non-virtual destructor.
9932         * decl.c (finish_destructor_body): Don't call delete if this is a
9933         non-virtual destructor.
9934         * init.c (build_delete): Explicitly call `operator delete' when
9935         deleting an object with a non-virtual destructor.
9936
9937 2001-02-13  Jason Merrill  <jason@redhat.com>
9938
9939         * lang-specs.h: Add more __EXCEPTIONS.
9940
9941 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
9942
9943         * typeck2.c (process_init_constructor): Check
9944         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
9945
9946 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
9947
9948         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
9949         Remove spurious information in comment. Allow further
9950         adjustments of REFERENCE_TYPE args.
9951
9952 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
9953
9954         * errfn.c (cp_deprecated): Tweak diagnostic text.
9955         * parse.y (new_initializer): Deprecate initializer lists
9956         extension.
9957
9958 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
9959
9960         Remove old ABI support.
9961
9962 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
9963
9964         * decl2.c (flag_vtable_thunks): Always set it to 1.
9965         (flag_new_abi): Likewise.
9966         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
9967
9968         * Makefile.in (g++spec.o): Fix typo.
9969
9970 2001-02-09  Jason Merrill  <jason@redhat.com>
9971
9972         * lang-specs.h: Restore definition of __EXCEPTIONS.
9973
9974 2001-02-08  Jason Merrill  <jason@redhat.com>
9975
9976         * search.c (shared_member_p): New function.
9977         (lookup_field_r): Use it.
9978         * cp-tree.h (SHARED_MEMBER_P): Remove.
9979
9980         * method.c (process_overload_item): Handle template-dependent array
9981         bounds.
9982         * pt.c (type_unification_real): If we end up with undeduced nontype
9983         parms, try again.
9984
9985         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
9986         types.
9987
9988         * typeck2.c (friendly_abort): Don't say anything if we have
9989         earlier errors or sorries.
9990
9991         * decl.c (check_tag_decl): Notice attempts to redefine bool and
9992         wchar_t.  Ignore if in_system_header.
9993
9994         * decl.c (maybe_push_cleanup_level): New fn...
9995         (start_decl_1): ...split out from here.
9996         * cvt.c (build_up_reference): Use it.
9997         * cp-tree.h: Declare it.
9998
9999 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
10000
10001         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
10002         spec.
10003
10004 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
10005
10006         * pt.c (lookup_template_class): Make sure it's a primary
10007         template or template_template_parm when called from the parser.
10008         (instantiate_template_class): Add assertion.
10009
10010 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
10011
10012         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
10013         from error_mark_node.
10014
10015 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
10016
10017         Fix specification and implementation bugs in V3 ABI
10018         construction vtables.
10019         * cp-tree.h (flag_dump_class_layout): New flag.
10020         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
10021         (BINFO_LOST_PRIMARY_P): New flag.
10022         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
10023         (BINFO_PRIMARY_MARKED_P): Rename to ...
10024         (BINFO_PRIMARY_P): ... here.
10025         (binfo_via_virtual): New prototype.
10026         * decl2.c (flag_dump_class_layout): New flag.
10027         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
10028         use `=' as a file name separator.
10029         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
10030         bases.
10031         (build_vtbl_address): If this is a virtual primary base, then
10032         get the vtbl of what it is ultimately primary for.
10033         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
10034         for BINFO_PRIMARY_P.
10035         (dfs_skip_nonprimary_vbases_markedp): Likewise.
10036         (get_shared_vbase_if_not_primary): Likewise.
10037         (dfs_get_pure_virtuals): Likewise.
10038         (expand_upcast_fixups): Likewise.
10039         (fixup_virtual_upcast_offsets): Likewise.
10040         (dfs_find_vbase_instance): Likewise.
10041         (find_vbase_instance): Likewise.
10042         (binfo_from_vbase): Adjust comment to reflect reality.
10043         (binfo_via_virtual): New function.
10044         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
10045         for binfo walking during VTT construction.
10046         (dfs_mark_primary_bases): Remove.
10047         (force_canonical_binfo_r): New function.
10048         (force_canonical_binfo): New function.
10049         (mark_primary_virtual_base): New function.
10050         (mark_primary_bases): Walk in inheritance graph order, use
10051         mark_primary_virtual_base.
10052         (determine_primary_base): Use some more intermediate variables.
10053         (dfs_find_final_overrider): Don't check for overriding along a
10054         virtual path.
10055         (dfs_modify_vtables): Walk into primary virtual bases too.
10056         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
10057         (build_base_fields): Likewise.
10058         (dfs_set_offset_for_unshared_vbases): Likewise.
10059         (layout_virtual_bases): Likewise.
10060         (end_of_class): Likewise.
10061         (finish_struct_1): Call dump_class_hierarchy, if requested.
10062         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
10063         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
10064         (dump_class_hierarchy): Add file parameter. Append to file, if
10065         required.
10066         (finish_vtbls): Adjust accumulate_vtbl_inits call.
10067         Use canonical base for virtual bases.
10068         (build_vtt): Add more comments. Adjust build_vtt_inits call.
10069         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
10070         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
10071         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
10072         virtual VTTs.
10073         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
10074         from DATA.  We want virtual primary bases and all bases via virtual.
10075         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
10076         virtual base when not a construction vtable.
10077         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
10078         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
10079         Use canonical bases when processing virtual bases.
10080         (accumulate_vtbl_inits): We're interested in any base via a
10081         virtual path.
10082         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
10083         within a construction vtable, determine what is being overridden.
10084         (build_vtbl_initializer): Add more comments
10085         (add_vcall_offset_vtbl_entries_1): Adjust comment.
10086         (build_rtti_vtbl_entries): Check if the base has lost its
10087         primary.
10088
10089 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
10090
10091         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
10092
10093 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10094
10095         * decl.c (pushdecl): Call abort instead of fatal.
10096         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
10097         * init.c (build_new_1): Likewise.
10098         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
10099         * decl.c (build_typename_type): hash_table_init now returns void.
10100         decl.c (init_decl_processing): Make an error non-fatal.
10101
10102 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
10103
10104         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
10105         Document.
10106         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10107         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10108         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10109         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10110         * decl.c (maybe_commonize_var): Use the new name-mangling where
10111         appropriate.
10112         * decl2.c (comdat_linkage): Enhance comments.  Make all
10113         compiler-generated things static, if COMDAT is not available.
10114         (get_tinfo_decl): Do not make typeinfo objects that belong in the
10115         library COMDAT.
10116         (tinfo_base_init): Use the correct mangled name for typeinfo
10117         strings, and push them into the global scope.
10118         (typeinfo_in_lib_p): New function.
10119         (synthesize_tinfo_var): Use it.
10120         (create_real_tinfo_var): Likewise.
10121
10122 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
10123
10124         * decl.c (push_class_binding): Use context_for_name_lookup instead
10125         of CP_DECL_CONTEXT.
10126         * search.c (context_for_name_lookup): Remove static.  Check for NULL
10127         context in the loop.
10128         * cp-tree.h (context_for_name_lookup): Add prototype.
10129
10130 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
10131
10132         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
10133         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
10134         Remove.
10135         * call.c (convert_class_to_reference, build_user_type_conversion_1,
10136         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
10137
10138 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
10139
10140         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
10141         of macros used when compiling g++spec.c.
10142         * g++spec.c (lang_specific_driver): Link with the shared
10143         libgcc by default.
10144
10145 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
10146
10147         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
10148         make_reference_declarator, make_call_declarator), method.c
10149         (implicitly_declare_fn), parse.y (namespace_using_decl,
10150         notype_unqualified_id, expr_or_declarator, new_type_id,
10151         after_type_declarator, direct_after_type_declarator,
10152         notype_declarator, complex_notype_declarator,
10153         complex_direct_notype_declarator, qualified_id,
10154         notype_qualified_id, overqualified_id, direct_new_declarator,
10155         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
10156         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
10157         instead of build_parse_node.
10158
10159 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10160
10161         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
10162         (minus_one_node): Moved to top level gcc directory.  Renamed
10163         to integer_minus_one_node.
10164
10165         * init.c (init_init_processing): Don't set minus_one_node.
10166         (build_vec_init): Use integer_minus_one_node.
10167
10168         * rtti.c (get_tinfo_decl_dynamic): Likewise.
10169
10170 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
10171
10172         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
10173         identical and they would be replaced with constant, remove
10174         MODIFY_EXPR from the tree.
10175
10176 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10177
10178         * Make-lang.in: Remove all dependencies on defaults.h.
10179         * call.c: Don't include defaults.h.
10180         * decl.c: Likewise.
10181         * decl2.c: Likewise.
10182         * except.c: Likewise.
10183         * pt.c: Likewise.
10184         * rtti.c: Likewise.
10185         * tree.c: Likewise.
10186         * typeck.c: Likewise.
10187
10188 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
10189
10190         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
10191         operators even in "C" linkage.
10192         * method.c (set_mangled_name_for_decl): Likewise.
10193         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
10194         overloaded operators in "C" linkage.
10195
10196 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
10197
10198         * pt.c (tsubst_decl): Remove IN_DECL parameter.
10199         (tsubst_arg_types): Check parameter is not void.
10200         (tsubst): Adjust tsubst_decl call.
10201
10202 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
10203
10204         * call.c (add_builtin_candidate): Quote std properly, from
10205         previous change.
10206
10207 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10208
10209         * pt.c (check_explicit_specialization): Clone constructors and
10210         destructors.
10211
10212 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
10213
10214         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
10215         indicates anything special about template depth. Make sure we
10216         only count the user visible template classes.
10217
10218 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
10219
10220         * call.c (build_conv): Typo in comment.
10221         (add_builtin_candidate): Add more explanation.
10222         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
10223         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
10224         when we have enumeral types.
10225         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
10226         candidates for relops and eqops.
10227         (joust): Simplify control flow. Allow a non-template user
10228         function to hide a builtin.
10229
10230 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
10231
10232         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
10233         (more_specialized): Add deduction parameter.
10234         * call.c (joust): Adjust more_specialized call.
10235         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
10236         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
10237         (get_bindings_order): Remove.
10238         (get_bindings_real): Add DEDUCE parameter.
10239         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
10240         REFERENCE_TYPE jig for DEDUCE_ORDER.
10241         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
10242         maybe_adjust_types_for_deduction.
10243         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
10244         directly.
10245         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
10246         (check_cv_quals_for_unify): Use new unify qualifier flags.
10247         (unify): Clear new unify qualifier flags.
10248         (get_bindings_real): Add DEDUCE parameter.
10249         (get_bindings): Adjust call to get_bindings_real.
10250         (get_bindings_overload): Likewise.
10251         (most_specialized_instantiation): Adjust call to
10252         more_specialized.
10253
10254 2001-01-19  Jason Merrill  <jason@redhat.com>
10255
10256         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
10257
10258         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
10259         -fnew-abi.
10260
10261 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
10262
10263         * decl2.c (arg_assoc_class): Fix double iteration logic.
10264
10265 2001-01-19  Jason Merrill  <jason@redhat.com>
10266
10267         * init.c (build_delete): Always call convert_force to strip cv-quals.
10268
10269         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
10270         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
10271         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
10272
10273 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10274
10275         * search.c (get_vbase_1): Count only virtual bases.
10276
10277 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10278
10279         * class.c (duplicate_tag_error): Robustify flag clearing.
10280
10281 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10282
10283         * cp-tree.h (lookup_template_class): Add complain parm.
10284         * decl.c (lookup_namespace_name): Adjust call to
10285         lookup_template_class.
10286         (make_typename_type): Likewise.
10287         * semantics.c (finish_template_type): Likewise.
10288         * pt.c (lookup_template_class): Add complain parm. Adjust.
10289         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
10290         (tsubst): Likewise.
10291
10292 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10293
10294         * pt.c (copy_default_args_to_explicit_spec): Preserve
10295         object's CV quals. Reorganize.
10296
10297 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10298
10299         * typeck.c (build_modify_expr): Say `initialization' for
10300         INIT_EXPRs.
10301         * init.c (build_default_init): Convert to enumeral type, if
10302         needed.
10303
10304 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
10305
10306         * parse.y (nomods_initdcl0): Properly set things up for
10307         initdcl0_innards.
10308
10309 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10310
10311         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
10312         (type_unification_real): Set it.
10313         (unify): Use it.
10314
10315 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10316
10317         * decl.c (finish_destructor_body): Convert to vbase pointer here.
10318
10319 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10320
10321         * semantics.c (begin_class_definition): Check we're not inside a
10322         template parm list.
10323
10324 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10325
10326         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
10327         BASELINK_P.
10328
10329 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10330
10331         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
10332         * call.c (build_over_call): Add comment.
10333
10334 2001-01-16 Daniel Berlin <dberlin@redhat.com>
10335
10336         * cvt.c (ocp_convert): Handle vector type conversion
10337         * typeck2.c (digest_init): Handle vector type initializations
10338
10339 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
10340
10341         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
10342           was given.
10343
10344 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
10345
10346         * pt.c (check_nontype_parm): Rename to ...
10347         (invalid_nontype_parm_type_p): ... here.
10348         (process_template_parm): Adjust.
10349         (convert_template_argument): Adjust.
10350
10351 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
10352
10353         * pt.c (check_nontype_parm): New function.
10354         (process_template_parm): Use it.
10355         (convert_template_argument): Use it.
10356         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
10357         member.
10358
10359 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
10360
10361         * tree.c: Add defaults.h
10362         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
10363         * Make-lang.in (cp/tree.o): Add defaults.h.
10364
10365 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10366
10367         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
10368
10369 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10370
10371         * g++.1: Change to be ".so man1/gcc.1".
10372
10373 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10374
10375         * Make-lang.in (c++.info, c++.install-info): Build and install g++
10376         internals info.
10377         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
10378         ($(srcdir)/cp/g++int.info): New target.
10379         * gxxint.texi: Add info directory entry.  Use @@ in email address.
10380         * .cvsignore: Update.
10381
10382 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
10383
10384         * typeck.c (build_c_cast): Do template processing earlier.
10385         Always pedwarn on array casts.
10386
10387 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
10388
10389         * friend.c (make_friend_class): Make sure a templated class is
10390         actually a template.
10391
10392 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10393
10394         * decl2.c (get_guard): Set linkage from guarded decl.
10395
10396 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10397
10398         * call.c (convert_default_arg): Check for unprocessed
10399         DEFAULT_ARG.
10400         * cp-tree.h (replace_defarg): Move to spew.c.
10401         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
10402         spew.c, which is where they really are.
10403         (done_pending_defargs): Declare.
10404         (unprocessed_defarg_fn): Declare.
10405         * decl.c (replace_defarg): Move to spew.c
10406         * parse.y (structsp): Call done_pending_defargs.
10407         * spew.c (defarg_fns): Rearrange list structure.
10408         (defarg_fnsdone): New static variable.
10409         (defarg_depfns): New static variable.
10410         (init_spew): Adjust.
10411         (add_defarg_fn): Store the type in TREE_TYPE.
10412         (do_pending_defargs): Detect and deal with ordering constraints
10413         and circularity.
10414         (done_pending_defargs): New function.
10415         (unprocessed_defarg_fn): New function.
10416         (replace_defarg): Moved from decl.c. Robustify. Don't save
10417         if circularity detected.
10418
10419 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10420
10421         * pt.c (unify): Check array has a domain, before checking
10422         whether it is variable sized.
10423
10424 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10425
10426         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
10427         parameters with pointers to arrays of unknown bound.
10428
10429 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10430
10431         * parse.y (template_parm_header, template_spec_header): New
10432         reductions. Split out from ...
10433         (template_header): ... here. Use them.
10434         (template_template_parm): Use template_parm_header.
10435         * semantics.c (finish_template_template_parm): Add assert.
10436
10437 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10438
10439         * mangle.c (write_builtin_type): Fix thinko.
10440
10441         * pt.c (copy_default_args_to_explicit_spec_1): New function.
10442         (copy_default_args_to_explicit_spec): Likewise.
10443         (check_explicit_specialization): Use it.
10444
10445         * class.c (finish_struct_1):  Remove last argument in call to
10446         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
10447         * decl.c (builtin_function): Likewise.
10448         (build_cp_library_fn): Likewise.
10449         (check_initializer): Likewise.
10450         (make_rtl_for_nonlocal_decl): Likewise.
10451         (cp_finish_decl): Likewise.
10452         (start_function): Likewise.
10453         * decl2.c (finish_anon_union): Likewise.
10454         * friend.c (do_friend): Likewise.
10455         * init.c (build_java_class_ref): Likewise.
10456         * method.c (make_thunk): Likewise.
10457         * pt.c (tsubst_friend_function): Likewise.
10458         * semantics.c (expand_body): Likewise.
10459
10460 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10461
10462         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
10463         looking at DECL_CLONED_FUNCTION for non-functions.
10464
10465 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10466
10467         * error.c (dump_template_parameter): Use parm to determine how
10468         to print default value.
10469
10470 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10471
10472         * class.c (duplicate_tag_error): Clear more flags.
10473
10474 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10475
10476         * call.c (build_new_method_call): Use binfo_for_vbase.
10477
10478 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
10479
10480         * cp-tree.h (flag_cond_mismatch): Don't declare.
10481         * decl2.c (flag_cond_mismatch): Don't define.
10482         (lang_f_options): Remove cond-mismatch.
10483         (unsupported_options): Add cond-mismatch.
10484
10485 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
10486
10487         * class.c (handle_using_decl): Reject using of constructor name
10488         of sourcing class. Allow injecting of a method with same name as
10489         nested class. Fixup error messages.
10490
10491 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
10492
10493         * decl2.c (lang_decode_option): Handle -Wformat=2.
10494
10495 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10496
10497         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
10498         initialized_in_class.
10499         (DECL_DEFINED_IN_CLASS_P): Rename to ...
10500         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
10501         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
10502         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
10503         * pt.c (check_default_tmpl_args): Adjust for
10504         DECL_INITIALIZED_IN_CLASS_P.
10505         (instantiate_class_template): Likewise.
10506         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
10507
10508         * class.c (finish_struct): Constify saved_filename.
10509
10510 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10511
10512         * class.c (duplicate_tag_error): Adjust diagnostic.
10513         (finish_struct): Locally set location to start of struct.
10514         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
10515
10516 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10517
10518         * decl.c (struct binding_level): Adjust class_shadowed comments
10519         to reflect reality.
10520         (push_class_level_binding): Adjust comments to reflect reality.
10521         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
10522         Don't set TREE_VALUE on the class_shadowed list.
10523
10524 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10525
10526         * decl2.c (acceptable_java_type): Allow references too.
10527         * init.c (build_java_class_ref): When using the new ABI, search
10528         `class$' and have it mangled with `mangle_decl.'
10529         * mangle.c (write_java_integer_type_codes): New function.
10530         (write_builtin_type): Detect and mangle Java integer and real
10531         types.
10532
10533 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
10534
10535         * decl2.c (grokfield): Don't accept `asm' specifiers for
10536         non-static data members.
10537
10538 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10539
10540         * expr.c (cplus_expand_expr): Don't reset `target'.
10541
10542 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
10543
10544         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
10545
10546 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
10547
10548         * parse.y (template_datadef): Check for error_mark_node.
10549
10550 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
10551
10552         * cp-tree.def (DEFAULT_ARG): Make `x' class.
10553
10554 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
10555
10556         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
10557         (record_builtin_type): Make non-static.
10558         (flag_short_double): Don't declare.
10559         (init_decl_processing): Remove the creation of many tree nodes now
10560         in c_common_nodes_and_builtins.
10561         (build_void_list_node): New function.
10562         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
10563         * cp-tree.h (flag_short_wchar): Don't declare.
10564
10565 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
10566
10567         * call.c (build_conv): Don't use build1 for USER_CONV.
10568         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
10569
10570 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
10571
10572         * lex.c (lang_init): Call c_common_lang_init.
10573
10574 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
10575
10576         * search.c (lookup_fnfields_here): Remove.
10577         (look_for_overrides_r): Use lookup_fnfields_1.
10578         Ignore functions from using declarations.
10579
10580 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
10581
10582         Implement exceptions specifiers for implicit member functions.
10583         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
10584         * method.c (synthesize_exception_spec): New function.
10585         (locate_dtor, locate_ctor, locate_copy): New functions.
10586         (implicitly_declare_fn): Generate the exception spec too.
10587         * search.c (check_final_overrider): Check artificial functions
10588         too.
10589         * typeck2.c (merge_exception_specifiers): New function.
10590
10591 2001-01-03  Jason Merrill  <jason@redhat.com>
10592
10593         * init.c (build_default_init): New fn.
10594         (perform_member_init): Split out from here.
10595         (build_new_1): Use it.  Simplify initialization logic.
10596         (build_vec_init): Take an array, rather than a pointer and maxindex.
10597         Speed up simple initializations.  Don't clean up if we're assigning.
10598         * cp-tree.h: Adjust.
10599         * decl2.c (do_static_initialization): Remove TREE_VEC case.
10600         * parse.y (new_initializer): Return void_zero_node for ().
10601         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
10602         * typeck2.c (digest_init): Only complain about user-written
10603         CONSTRUCTORs.
10604
10605 2000-12-22  Mike Stump  <mrs@wrs.com>
10606
10607         * decl2.c: (max_tinst_depth): Increase to 50.
10608
10609 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
10610
10611         * class.c (invalidate_class_lookup_cache): Zero the
10612         previous_class_values.
10613         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
10614         TREE_INT_CST_HIGH.
10615         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
10616         * decl.c (free_bindings): New variable.
10617         (push_binding): Don't create a new binding if we have one on the
10618         free list.
10619         (pop_binding): Put old bindings on the free list.
10620         (init_decl_processing): Use size_int, not build_int_2.
10621         Register free_bindings as a GC root.
10622         (cp_make_fname_decl): Use size_int, not build_int_2.
10623         (push_inline_template_parms_recursive): Likewise.
10624         (end_template_parm_list): Likewise.
10625         (for_each_template_parm): Do not use walk_tree_without_duplicates.
10626         (tsubst_template_parms): Use size_int, not build_int_2.
10627         (tsubst): Likewise.
10628         * rtti.c (get_vmi_pseudo_type_info): Likewise.
10629
10630 2001-01-02  Richard Henderson  <rth@redhat.com>
10631
10632         * parse.y (asm): Set ASM_INPUT_P.
10633
10634 2001-01-02  Jason Merrill  <jason@redhat.com>
10635
10636         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
10637         for v3 ABI.
10638
10639         * typeck.c (cp_truthvalue_conversion): New fn.
10640         * cvt.c (ocp_convert): Use it.
10641
10642         * cp-tree.h: Lose c-common.c decls.
10643
10644         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
10645         * cvt.c (convert_to_void): Use type_unknown_p.
10646
10647         * typeck.c (strip_all_pointer_quals): Also strip quals from
10648         pointer-to-member types.
10649
10650         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
10651         parse.y as C.
10652
10653         * call.c (build_new_method_call): Do evaluate the object parameter
10654         when accessing a static member.
10655         * typeck.c (build_component_ref): Likewise.
10656
10657 2001-01-02  Andreas Jaeger  <aj@suse.de>
10658
10659         * decl.c (cp_missing_noreturn_ok_p): New.
10660         (init_decl_processing): Set lang_missing_noreturn_ok_p.
10661
10662 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
10663
10664         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
10665
10666 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
10667
10668         * class.c (pushclass): Remove #if 0'd code.
10669         * cp-tree.h (overload_template_name): Remove.
10670         * decl.c (store_bindings): Simplify.
10671         (pop_from_top_level): Likewise.
10672         * pt.c (overload_template_name): Remove.
10673         (instantiate_decl): Don't call push_to_top_level if it's not
10674         needed.
10675
10676 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
10677
10678         * pt.c (register_local_specialization): Don't return a value.
10679         (lookup_template_class): Use move-to-front heuristic when looking
10680         up template instantiations.
10681         (instantiate_decl): Only push_to_top_level when we're actually
10682         going to instantiate the template.
10683
10684 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
10685
10686         * search.c (binfo_for_vtable): Return least derived class, not
10687         most.  Handle secondary vtables.
10688
10689 2000-12-22  Jason Merrill  <jason@redhat.com>
10690
10691         * pt.c (more_specialized): Don't optimize len==0.
10692         (fn_type_unification): If we're adding the return type, increase len.
10693
10694         * typeck.c (build_binary_op): Fix pmf comparison logic.
10695
10696         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
10697         DECL_STATIC_FUNCTION_P.
10698
10699         * semantics.c (genrtl_finish_function): Don't try to jump to
10700         return_label unless it exists.
10701
10702         In partial ordering for a call, ignore parms for which we don't have
10703         a real argument.
10704         * call.c (joust): Pass len to more_specialized.
10705         (add_template_candidate_real): Strip 'this', pass len.
10706         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
10707         (get_bindings_order): New fn.  Pass len down.
10708         (get_bindings_real): Strip 'this', pass len.
10709         (fn_type_unification): Likewise.
10710         (type_unification_real): Succeed after checking 'len' args.
10711         (most_specialized_instantiation): Lose explicit_args parm.
10712         * class.c (resolve_address_of_overloaded_function): Strip 'this',
10713         pass len.
10714
10715 2000-12-21  Jason Merrill  <jason@redhat.com>
10716
10717         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
10718         DECL_TEMPLATE_RESULT.
10719
10720         * search.c (lookup_field_r): Call lookup_fnfields_1, not
10721         lookup_fnfields_here.
10722
10723         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
10724
10725         * call.c (build_object_call): Also allow conversions that return
10726         reference to pointer to function.
10727         (add_conv_candidate): Handle totype being ref to ptr to fn.
10728         (build_field_call): Also allow members of type reference to function.
10729         Lose support for calling pointer to METHOD_TYPE fields.
10730
10731         * error.c (dump_expr): Handle *_CAST_EXPR.
10732
10733         * typeck2.c (build_scoped_ref): Always convert to the naming class.
10734
10735         * tree.c (break_out_cleanups): Lose.
10736         * cp-tree.h: Remove prototype.
10737         * typeck.c (build_component_ref): Don't break_out_cleanups.
10738         (build_compound_expr): Likewise.
10739         * semantics.c (finish_expr_stmt): Likewise.
10740
10741 2000-12-20  Richard Henderson  <rth@redhat.com>
10742
10743         * cp-tree.h: Update declarations.
10744         * decl.c (finish_case_label): Return the new stmt node.
10745         * semantics.c (finish_goto_stmt): Likewise.
10746         (finish_expr_stmt, finish_return_stmt): Likewise.
10747         (finish_break_stmt, finish_continue_stmt): Likewise.
10748         (finish_asm_stmt): Likewise.
10749         * parse.y (already_scoped_stmt): Set STMT_LINENO.
10750         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
10751         (simple_if, simple_stmt): Return the new stmt node.
10752         (save_lineno): New.
10753
10754 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
10755
10756         * cp-tree.h: Don't declare warn_long_long.
10757
10758 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10759
10760         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
10761         IS_AGGR_TYPE.
10762
10763 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10764
10765         * pt.c (unify): Handle when both ARG and PARM are
10766         BOUND_TEMPLATE_TEMPLATE_PARM.
10767
10768 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10769
10770         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
10771         DECL_TEMPLATE_PARM_P.
10772
10773 2000-12-15  Jason Merrill  <jason@redhat.com>
10774
10775         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
10776
10777         * init.c (build_new_1): Don't strip quals from type.
10778
10779         * decl.c (pushdecl): Don't check for linkage on a non-decl.
10780
10781         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
10782
10783         * call.c (build_new_function_call): Lose space before paren in
10784         error message.
10785         (build_new_method_call): Likewise.
10786
10787         * typeck2.c (build_m_component_ref): Propagate quals from datum.
10788
10789 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10790
10791         * pt.c (check_explicit_specialization): Propagate default
10792         function arguments to explicit specializations.
10793
10794 2000-12-13  DJ Delorie  <dj@redhat.com>
10795
10796         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
10797         and <? operators.
10798
10799 2000-12-08  Jason Merrill  <jason@redhat.com>
10800
10801         * error.c (dump_function_name): Don't let the user see __comp_ctor.
10802
10803         Clean up copy-initialization in overloading code.
10804         * call.c (build_user_type_conversion_1): Die if we are asked to
10805         convert to the same or a base type.
10806         (implicit_conversion): Avoid doing so.  Lose reference binding code.
10807         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
10808         direct-initialization.  Also do direct-init part of copy-init.
10809         (build_user_type_conversion): Don't provide context to convert_like.
10810         * cvt.c (ocp_convert): build_user_type_conversion will now provide
10811         the constructor call for copy-init.
10812
10813         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
10814         instantiation of a member template.
10815         (do_decl_instantiation): Not here.
10816
10817 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
10818
10819         * class.c (check_field_decls): Don't special case anonymous
10820         fields in error messages.
10821         (note_name_declared_in_class): Use %D on diagnostic.
10822
10823         * tree.c (pod_type_p): Use strip_array_types.
10824         (cp_valid_lang_attribute): Likewise.
10825         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
10826         multiple evaluations.
10827         (cp_has_mutable_p): Use strip_array_types.
10828
10829 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
10830
10831         * cp-tree.h (sufficient_parms_p): Declare new function.
10832         * call.c (sufficient_parms_p): New function, broken out of ...
10833         (add_function_candidate): ... here. Use it.
10834         (add_conv_candidate): Use it.
10835         * decl.c (grok_ctor_properties): Use it.
10836
10837 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
10838
10839         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
10840
10841 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10842
10843         * decl2.c (lang_decode_option): Handle -Wformat-security.
10844
10845 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10846
10847         * pt.c (verify_class_unification): New function.
10848         (get_class_bindings): Use it.
10849         (try_class_unification): Tidy.
10850         (unify): Handle when argument of a template-id is not
10851         template parameter dependent.
10852         (template_args_equal): Handle when TREE_CODE's do not match.
10853
10854 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
10855
10856         * lang-specs.h (c++): When invoking the stand-alone preprocessor
10857         for -save-temps, pass all relevant -Defines to it, and then don't
10858         pass them to cc1plus.
10859
10860 2000-12-05  Will Cohen  <wcohen@redhat.com>
10861
10862         * decl.c (finish_case_label): Cleared
10863         more_cleanups_ok in surrounding function scopes.
10864         (define_label): Likewise.
10865
10866 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
10867
10868         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
10869         (get_matching_virtual): Remove.
10870         (look_for_overrides): Declare new function.
10871         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
10872         DECL_VINDEX here.
10873         * class.c (check_for_override): Move base class iteration code
10874         to look_for_overrides.
10875         * search.c (next_baselink): Remove.
10876         (get_virtuals_named_this): Remove.
10877         (get_virtual_destructor): Remove.
10878         (tree_has_any_destructors_p): Remove.
10879         (struct gvnt_info): Remove.
10880         (check_final_overrider): Remove `virtual' from error messages.
10881         (get_matching_virtuals): Remove. Move functionality to ...
10882         (look_for_overrides): ... here, and ...
10883         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
10884         to be overriding.
10885
10886 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
10887
10888         * typeck.c (get_delta_difference): If via a virtual base,
10889         return zero.
10890         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
10891         adjustment.
10892
10893 2000-12-04  Richard Henderson  <rth@redhat.com>
10894
10895         * error.c (dump_tree): Use output_add_string not OB_PUTS.
10896
10897 2000-12-04  Jason Merrill  <jason@redhat.com>
10898
10899         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
10900         (write_builtin_type): Pass intSI_type_node and the like through
10901         type_for_mode.
10902         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
10903         Pass intSI_type_node and the like through type_for_mode.
10904         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
10905         * pt.c (tsubst, unify): Likewise.
10906         * tree.c (walk_tree): Likewise.
10907         * error.c (dump_type): Likewise.
10908         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
10909
10910         * Make-lang.in: Tweak top comment for emacs.
10911         (cp/TAGS): Restore.
10912
10913         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
10914
10915         * class.c (clone_function_decl): Robustify.
10916
10917 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
10918
10919         * decl.c (store_bindings): Only search in the non modified
10920         old_bindings for duplicates.
10921
10922 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
10923
10924         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
10925         TYPE_POLYMORPHIC_P.
10926
10927         * typeck.c (build_static_cast): Remove unused variable.
10928
10929 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10930
10931         * pt.c: Fix typo in comment.
10932
10933 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
10934
10935         * decl2.c (warn_format): Remove definition.
10936         (lang_decode_option): Handle -Wformat-nonliteral,
10937         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
10938
10939 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
10940
10941         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
10942         (init_decl_processing): Don't create string_type_node,
10943         const_string_type_node, wint_type_node, intmax_type_node,
10944         uintmax_type_node, default_function_type, ptrdiff_type_node and
10945         unsigned_ptrdiff_type_node.  Adjust position of call to
10946         c_common_nodes_and_builtins.
10947         (identifier_global_value): New function.
10948
10949 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
10950
10951         * call.c (standard_conversion): Reject pointer to member
10952         conversions from ambiguous, inaccessible or virtual bases.
10953         * typeck.c (build_static_cast): Don't check pointers to members
10954         specially.
10955
10956 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
10957
10958         * method.c (do_build_copy_constructor): Preserve cv
10959         qualifications when accessing source object members.
10960         (do_build_assign_ref): Likewise. Remove separate diagnostics for
10961         unnamed fields.
10962
10963 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
10964
10965         * method.c (do_build_assign_ref): Construct appropriately
10966         CV-qualified base reference. Don't allow const casts in base
10967         conversion.
10968
10969 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
10970
10971         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
10972         incomplete return type.
10973
10974 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10975
10976         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
10977         * semantics.c (finish_base_specifier): Accept a _TYPE not a
10978         _DECL.
10979
10980 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10981
10982         * spew.c (yyerror): Cope if yylval.ttype is NULL.
10983
10984 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10985
10986         * decl.c (grokdeclarator): Diagnose undefined template contexts.
10987
10988 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10989
10990         * decl.c (grokdeclarator): Do type access control on friend
10991         class.
10992
10993 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
10994
10995         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
10996         bison parser ickiness.
10997         * pt.c (tsubst_friend_function): Enter namespace scope when
10998         tsubsting the function name.
10999         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
11000
11001 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
11002
11003         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
11004         * cvt.c (cp_convert_to_pointer): Add force parameter.
11005         Allow conversions via virtual base if forced.
11006         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
11007         (ocp_convert): Likewise.
11008         * search.c (binfo_from_vbase): Return the virtual base's binfo.
11009         * typeck.c (get_delta_difference): Adjust handling of virtual
11010         bases.
11011
11012 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
11013
11014         * tree.c (struct list_hash): Remove.
11015         (list_hash_table): Make it be an htab.
11016         (struct list_proxy): New type.
11017         (list_hash_eq): New function.
11018         (list_hash_pieces): Renamed from ...
11019         (list_hash): ... this.
11020         (list_hash_lookup): Remove.
11021         (list_hash_add): Remove.
11022         (hash_tree_cons): Use the generic hashtable.
11023         (mark_list_hash): Remove.
11024         (init_tree): Create the hashtable.
11025
11026 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
11027
11028         * method.c (build_mangled_C9x_name): Rename to
11029         build_mangled_C99_name.  Change C9X references in comments to
11030         refer to C99.
11031
11032 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
11033
11034         * parse.y (unary_expr): Move VA_ARG from here ...
11035         (primary): ... to here.
11036
11037 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
11038
11039         * semantics.c (finish_id_expr): If type is error_mark, return
11040         error_mark.
11041
11042 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
11043
11044         * pt.c (lookup_template_class): Simplify loop exit constructs.
11045         Cope when there is no partial instantiation of a template
11046         template member.
11047
11048 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
11049
11050         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
11051
11052 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
11053
11054         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
11055         prefix.
11056
11057         * pt.c (do_decl_instantiate): Explicitly clone constructors and
11058         destructors that haven't already been cloned.
11059
11060 2000-11-20  Richard Henderson  <rth@redhat.com>
11061
11062         * parse.y (yyparse_1): Rename the parser entry point.
11063
11064 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
11065
11066         * mangle.c (write_name): Use <unscoped-name> for names directly in
11067         function scope.
11068         (write_unscoped_name): Accept names directly in function scope.
11069
11070 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
11071
11072         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
11073         * parse.y (extdef): Add EXPORT reduction.
11074         * spew.c (yylex): Don't skip export here.
11075
11076 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
11077
11078         * decl.c (init_decl_processing): Correct name of pure virtual
11079         function under the new ABI.
11080         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
11081         (throw_bad_typeid): Likewise for bad typeid function.
11082
11083 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
11084
11085         * decl.c (grokparms): Don't even function types of `void' type,
11086         either.
11087         * mangle.c (write_type): Don't crash when confronted with the
11088         error_mark_node.
11089
11090         * decl.c (grokparms): Don't create parameters of `void' type.
11091
11092 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
11093
11094         * lex.c (mark_impl_file_chain): Delete.
11095         (init_parse): Remove call to ggc_add_string_root.  No need to
11096         ggc_strdup a string constant.  Do not add impl_file_chain to GC
11097         roots.
11098         (handle_pragma_implementation): No need to ggc_strdup main_filename.
11099
11100 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
11101
11102         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
11103
11104 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
11105
11106         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
11107         * decl.c (grokdeclarator): Don't reject void parms here.
11108         (require_complete_types_for_parms): Simplify, use
11109         complete_type_or_else.
11110         (grokparms): Remove bitrot. Remove funcdef parm.
11111         Deal with ellipsis parm lists here.
11112         * semantics.c (finish_parmlist): Don't append void_list_node
11113         here. Set PARMLIST_ELLIPSIS_P.
11114
11115 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
11116
11117         * typeck2.c (incomplete_type_error): Reorganize to avoid
11118         excessive diagnostics.
11119
11120 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
11121
11122         * lex.c (struct impl_files, internal_filename): Constify a char *.
11123
11124 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
11125
11126         * mangle.c (write_special_name_constructor): Don't generate
11127         assembler junk when confronted with an old-style constructor.
11128         (write_special_name_destructor): Likewise.
11129         (mangle_decl_string): Do it here instead.
11130
11131 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
11132
11133         * call.c (op_error): Make error messages clearer.
11134
11135 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
11136
11137         * decl.c (wrapup_globals_for_namespace): Don't mark things
11138         TREE_ASM_WRITTEN when they're not.
11139
11140 2000-11-15  Jason Merrill  <jason@redhat.com>
11141
11142         * typeck2.c (friendly_abort): Uncount the error before handing
11143         off to fancy_abort.
11144
11145 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
11146
11147         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
11148
11149 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
11150
11151         * class.c (build_vtbl_initializer): Fix typo in comment.
11152         * typeck.c (expr_sizeof): Don't crash on errors.
11153
11154 2000-11-14  Jim Wilson  <wilson@redhat.com>
11155
11156         * lang-specs.h: Add %2 after %(cc1_options).
11157
11158 2000-11-14  Richard Henderson  <rth@redhat.com>
11159
11160         * typeck.c (c_sizeof): Be strict about casting result value
11161         back to c_size_type_node.
11162         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
11163
11164 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
11165
11166         * typeck.c (build_unary_op): Use boolean_increment from
11167         c-common.c, moving the relevant code there.
11168
11169 2000-11-11  Jason Merrill  <jason@redhat.com>
11170
11171         * typeck.c (mark_addressable): Don't call put_var_into_stack.
11172
11173         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
11174         in inlines.
11175
11176 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11177
11178         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
11179         * lex.c (copy_lang_decl): Likewise.
11180
11181 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
11182
11183         * dump.c (cp_dump_tree): Don't dump function bodies here.
11184
11185         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
11186         (dump.o): Update dependency list.
11187         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
11188         (flag_dump_translation_unit): Likewise.
11189         (CP_TYPE_QUALS): Adjust definition.
11190         (DECL_C_BIT_FIELD): Remove.
11191         (SET_DECL_C_BIT_FIELD): Likewise.
11192         (CLEAR_DECL_C_BIT_FIELD): Likewise.
11193         (add_maybe_template): Likewise.
11194         (strip_array_types): Likewise.
11195         (dump_node_to_file): Likewise.
11196         (cp_dump_tree): New function.
11197         * decl.c (init_decl_processing): Set lang_dump_tree.
11198         * decl2.c (flag_dump_translation_unit): Remove.
11199         * dump.c: Move most of it to ../c-dump.c.
11200         (cp_dump_tree): New function.
11201         * pt.c (add_maybe_template): Remove.
11202         * typeck.c (strip_array_types): Likewise.
11203
11204 2000-11-07  Eric Christopher  <echristo@redhat.com>
11205
11206         * decl.c (init_decl_processing): Change definition of
11207         __wchar_t to wchar_t.  Remove artificial declaration of
11208         wchar_t.
11209         * lex.c: Change instances of __wchar_t to wchar_t.
11210
11211 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
11212
11213         * lex.c (do_identifier): Don't lookup_name for operators.
11214         * parse.y (operator): Save looking_for_typename.
11215         (unoperator): Restore it.
11216         * spew.c (frob_opname): Use nth_token for lookahead.
11217
11218 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
11219
11220         * decl.c (grok_op_properties): Always use coerce_new_type and
11221         coerce_delete_type.
11222         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
11223         exception specification. Tidy up.
11224         (coerce_delete_type): Preserve exception specification. Tidy up.
11225
11226 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
11227
11228         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
11229         (push_binding_level), error.c (cp_tree_printer), pt.c
11230         (process_partial_specialization, tsubst_template_arg_vector),
11231         search.c (lookup_member): Use memset () instead of bzero ().
11232
11233 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
11234
11235         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
11236
11237 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
11238
11239         * Make-lang.in (c++.distdir): Remove.
11240
11241 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
11242
11243         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
11244         declarations from different namespaces to be combined.
11245
11246 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
11247
11248         * decl.c: Include tm_p.h.
11249
11250 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
11251
11252         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
11253
11254 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11255
11256         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
11257         (build_overload_value), repo.c (open_repo_file), xref.c
11258         (open_xref_file): Use strchr () and strrchr () instead of index ()
11259         and rindex ().
11260
11261 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
11262
11263         * call.c (build_over_call): Call fold on the CALL_EXPR.
11264
11265 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
11266
11267         * error.c (dump_template_decl): Separate template hearders with
11268         space not comma.
11269
11270 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
11271
11272         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
11273         TS_* flags with corresponding TFF_*.  Adjust prototypes of
11274         functions (which used to take a tree_string_flags) to take an int.
11275
11276         * cp-tree.h (enum tree_string_flags): Remove
11277         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
11278         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
11279         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
11280         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
11281         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
11282         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
11283         (type_as_string, decl_as_string, expr_as_string,
11284         context_as_string): Adjust prototype.
11285
11286         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
11287         instead of TS_PLAIN.
11288
11289         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
11290         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
11291         plain `0'.
11292
11293 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
11294
11295         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
11296         (linkage_kind): New enumeration.
11297         (decl_linkage): New function.
11298         * decl2.c (comdat_linkage): Extend comment.
11299         * error.c (dump_function_decl): Print the arguments used to
11300         instantiate a template, even when not printing the type of the
11301         function.
11302         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
11303         not TREE_PUBLIC, to test for external linkage.
11304         * tree.c (decl_linkage): New function.
11305
11306 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
11307
11308         * pt.c (instantiate_decl): Always instantiate static data members
11309         initialized in-class.
11310
11311 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
11312
11313         * Make-lang.in: Move all build rules here from Makefile.in,
11314         adapt to new context.  Wrap all rules that change the current
11315         directory in parentheses.  Expunge all references to $(P).
11316         When one command depends on another and they're run all at
11317         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
11318         all object-file generation rules.  Delete obsolete variables.
11319
11320         * Makefile.in: Delete.
11321         * config-lang.in: Delete outputs= line.
11322
11323 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
11324
11325         * error.c (dump_function_decl): Print no space between
11326         `ptr-operator' the `type-specifier' of the return type.
11327         (dump_type_prefix): Make sure we put space at the appropriate
11328         place.
11329
11330 2000-10-23  Jason Merrill  <jason@redhat.com>
11331
11332         * call.c (equal_functions): Also call decls_match for extern "C" fns.
11333
11334 2000-10-22  Jason Merrill  <jason@redhat.com>
11335
11336         * call.c (build_conditional_expr): Use ocp_convert to force
11337         rvalue conversion.
11338
11339 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
11340
11341         * call.c (standard_conversion): Use RVALUE_CONVs for all
11342         expressions that satisfy lvalue_p, not just those that satisfy
11343         real_lvalue_p.
11344
11345         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
11346
11347         * typeck.c (c_sizeof): Return an expression of `size_t' type,
11348         not one with TYPE_IS_SIZETYPE set.
11349         (dubious_conversion_warnings): Remove special-case code.
11350
11351 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
11352
11353         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
11354         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
11355         (dump_type_prefix): Print vector-of-int as 'int vector'.
11356         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
11357         * tree.c (walk_tree): Handle VECTOR_TYPE.
11358
11359         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
11360
11361 2000-10-21  Jason Merrill  <jason@redhat.com>
11362
11363         * parse.y (operator): Set got_object from got_scope.
11364         Set looking_for_typename.
11365         * decl.c (lookup_name_real): Clear val after setting from_obj.
11366         Reorganize diagnostic.
11367
11368 2000-10-20  Jason Merrill  <jason@redhat.com>
11369
11370         * tree.c (walk_tree): Don't walk into default args.
11371
11372         * error.c (dump_expr): Use host_integerp.
11373
11374 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
11375
11376         * typeck2.c (abstract_virtuals_error): Use "because" instead of
11377         "since" in error message.
11378
11379 2000-10-20  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11380
11381         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
11382
11383 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
11384
11385         * decl.c (revert_static_member_fn): Fixed typo.
11386
11387 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
11388
11389         * class.c (subobject_offset_fn): New type.
11390         (dfs_record_base_offsets): Remove.
11391         (record_base_offsets): Likewise.
11392         (dfs_search_base_offsets): Likewise.
11393         (record_subobject_offset): New function.
11394         (check_subobject_offset): Likewise.
11395         (walk_subobject_offsets): Likewise.
11396         (record_subobject_offsets): Likewise.
11397         (layout_conflict_p): Reimplement.
11398         (layout_nonempty_base_or_field): Correct handling of type
11399         conflicts during layout.
11400         (layout_empty_base): Likewise.
11401         (build_base_field): Adjust to handle new representation of empty
11402         base offset table.
11403         (build_base_fields): Likewise.
11404         (layout_virtual_bases): Likewise.
11405         (splay_tree_compare_integer_csts): New function.
11406         (layout_class_type): Use a splay_tree, rather than a varray, to
11407         represent the offsets of empty bases.
11408
11409         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
11410         * decl.c (select_decl): Don't return declarations that are
11411         DECL_ANTICIPATED.
11412
11413 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
11414
11415         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
11416         (fake_std_node): New macro.
11417         * decl.c (in_std): Rename to ...
11418         (in_fake_std): ... this.
11419         (flag_no_builtin): Remove.
11420         (flag_no_nonansi_builtin): Likewise.
11421         (walk_namespaces_r): Use fake_std_node.
11422         (push_namespace): Use std_identifier.
11423         (pop_namespace): Use in_fake_std.
11424         (lookup_name_real): Use fake_std_node.
11425         (init_decl_processing): When -fhonor-std, create the `std'
11426         namespace.  Don't create a dummy fake_std_node in that case.
11427         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
11428         (builtin_function): Put builtins whose names don't begin
11429         with `_' in the std namespace.
11430         * decl2.c (flag_no_builtin): Remove.
11431         (flag_no_nonansi_builtin): Likewise.
11432         (set_decl_namespace): Use fake_std_node.
11433         (validate_nonmember_using_decl): Likewise.
11434         (do_using_directive): Likewise.
11435         (handle_class_head): Likewise.
11436         * dump.c (dequeue_and_dump): Likewise.
11437         * except.c (init_exception_processing): Use std_identifier.
11438         * init.c (build_member_call): Use fake_std_node.
11439         * rtti.c (init_rtti_processing): Use std_identifier.
11440
11441 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
11442
11443         * cp-tree.h (back_end_hook): Remove declaration.
11444         * decl2.c (back_end_hook): Remove definition.
11445
11446         * dump.c (dequeue_and_dump): Dump TREE_USED.
11447
11448 2000-10-17  Brad Lucier <lucier@math.purdue.edu>
11449
11450         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
11451
11452 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
11453
11454         * decl.c (WINT_TYPE): Define.
11455         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
11456         c_size_type_node, signed_size_type_node and wint_type_node.
11457
11458 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
11459
11460         * decl2.c (warn_missing_format_attribute): New variable.
11461         (lang_decode_option): Decode -Wmissing-format-attribute.
11462
11463 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
11464
11465         * typeck.c (qualify_type): Remove.
11466         (composite_pointer_type): Fix handling of conversions to `cv void*'.
11467
11468 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11469
11470         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
11471
11472 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11473
11474         * Makefile.in (parse.c, parse.h): Create atomically.
11475
11476 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
11477
11478         * class.c (current_obstack): Remove.
11479         * decl.c (ggc_p): Remove.
11480         (start_decl): Don't use decl_tree_cons.
11481         (grokdeclarator): Don't use build_decl_list.
11482         (start_function): Don't use decl_tree_cons.
11483         (finish_function): Don't mess with obstacks.
11484         * decl2.c (grok_x_components): Don't use build_decl_list.
11485         * lex.c (make_call_declarator): Don't call decl_tree_cons.
11486         (implicitly_declare_fn): Don't call build_decl_list.
11487         * parse.y (frob_specs): Don't call build_decl_list or
11488         decl_tree_cons.
11489         (expr_or_declarator_intern): Don't call decl_tree_cons.
11490         (primary): Don't call build_decl_list.
11491         (fcast_or_absdcl): Likewise.
11492         (typed_declspecs): Don't call decl_tree_cons.
11493         (reserved_declspecs): Don't call build_decl_list.
11494         (declmods): Likewise.
11495         (reserved_typespecquals): Likewise.
11496         (aggr): Likewise.
11497         (new_type_id): Likewise.
11498         (cv_qualifiers): Likewise.
11499         (after_type_declarator_intern): Likewise.
11500         (notype_declarator_intern): Likewise.
11501         (absdcl_intern): Likewise.
11502         (named_parm): Likewise.
11503         * pt.c (most_specialized_class): Likewise.
11504         * repo.c (temporary_obstack): Make it a structure, not a pointer.
11505         (init_repo): Initialize it.
11506         * search.c (current_obstack): Remove.
11507         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
11508
11509 2000-10-09  Richard Henderson  <rth@cygnus.com>
11510
11511         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
11512         (c++ language support bits for libgcc): Remove.
11513         (c++.clean): Remove cplib2.txt cleanup.
11514         * config-lang.in (headers, lib2funcs): Remove.
11515
11516         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
11517         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
11518         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
11519         * inc/new.h, inc/typeinfo: Remove files.
11520
11521 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
11522
11523         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
11524         defined.
11525         (init_decl_processing): Initialize intmax_type_node and
11526         uintmax_type_node.
11527
11528 2000-10-06  Richard Henderson  <rth@cygnus.com>
11529
11530         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
11531         (original_result_rtx): Remove.
11532         * decl.c (save_function_data): Don't clear x_result_rtx.
11533         (mark_lang_function): Don't mark it either.
11534         * expr.c (fixup_result_decl): Remove.
11535         * semantics.c (genrtl_named_return_value): Frob the return decl
11536         before calling emit_local_var.
11537         (genrtl_finish_function): Don't call fixup_result_decl.
11538         Always emit the jump to return_label.
11539
11540 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
11541
11542         * pt.c (lookup_template_class): Set current access for enum.
11543         (tsubst_enum): Set file & line for enum decl.
11544
11545         * spew.c (yylex): Remove unused variable.
11546
11547 2000-10-05  Richard Henderson  <rth@cygnus.com>
11548
11549         * semantics.c (genrtl_finish_function): Don't init or check
11550         can_reach_end; remove noreturn and return value checks.
11551
11552 2000-10-05  Tom Tromey  <tromey@cygnus.com>
11553
11554         * init.c (build_java_class_ref): Use `build_static_name' with a
11555         suffix, not a prefix, to build the class object's name.
11556
11557 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11558
11559         * cp-tree.h (access_kind): Fix comment typo.
11560         * decl2.c (grokfield): Fix diagnostic typo.
11561         * semantics.c (finish_template_type): Fix comment typo.
11562         (finish_qualified_object_call_expr): Likewise.
11563
11564 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11565
11566         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
11567         tsubsting fails.
11568
11569 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11570
11571         * spew.c (frob_id): New static function.
11572         (frob_opname): Use it.
11573         (yylex): Use it.
11574
11575 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
11576
11577         * decl.c (lang_mark_false_label_stack): Remove.
11578         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
11579
11580 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
11581
11582         * gxxint.texi: Use @email for formatting email addresses.
11583
11584 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
11585
11586         * error.c: Remove direct obstack manipulation.  Replace with
11587         output_buffer-based formatting.  Adjust calls to removed macros.
11588         (obstack_chunk_alloc, obstack_chunk_free): Remove.
11589         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
11590         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
11591
11592 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
11593
11594         * ir.texi: Move to ../c-tree.texi.
11595
11596 2000-09-20  Jason Merrill  <jason@redhat.com>
11597
11598         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
11599
11600 2000-09-21  Andreas Jaeger  <aj@suse.de>
11601
11602         * errfn.c: Move declaration of cp_printer and cp_printers to ...
11603         * cp-tree.h: ... here.
11604
11605         * error.c: Remove declaration of cp_printer.
11606
11607 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
11608
11609         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
11610
11611 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
11612
11613         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
11614         users.
11615
11616 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
11617
11618         * decl.c (start_function): Robustify.
11619
11620 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11621
11622         * cp-tree.h (check_function_format): Accept a `status' parameter.
11623
11624         * call.c, typeck.c: Updates calls to `check_function_format'.
11625
11626 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
11627
11628         * decl2.c (handle_class_head): Always push some scope even
11629         in the error case.
11630
11631 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
11632
11633         * cp-tree.h (struct cp_language_function): Remove
11634         x_scope_stmt_stack and name_declared.
11635         (current_scope_stmt_stack): Remove.
11636         (function_name_declared_p): New macro.
11637         (struct lang_decl_flags): Use c_lang_decl as a base class.
11638         (context): Remove.
11639         (struct lang_decl): Replace saved_tree with context.
11640         (DECL_FRIEND_CONTEXT): Adjust accordingly.
11641         (SET_DECL_FRIEND_CONTEXT): Likewise.
11642         (DECL_VIRTUAL_CONTEXT): Likewise.
11643         (DECL_SAVED_TREE): Remove.
11644         (C_DECLARED_LABEL_FLAG): Likewise.
11645         (cplus_expand_expr_stmt): Don't declare.
11646         (add_decl_stmt): Likewise.
11647         (add_scope_stmt): Likewise.
11648         * decl.c (mark_stmt_tree): Remove.
11649         (case_compare): Likewise.
11650         (finish_case_label): Use c_add_case_label.
11651         (init_decl_processing): Set more language-specific hooks.
11652         (build_enumerator): Fix typo in comment.
11653         (cplus_expand_expr_stmt): Remove.
11654         (mark_lang_function): Use mark_c_language_function.
11655         (lang_mark_tree): Use c_mark_lang_decl.
11656         * decl2.c: Change order of inclusion.
11657         * except.c: Likewise.
11658         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
11659         back on c_expand_expr.
11660         * friend.c: Include expr.h.
11661         * init.c: Change order of inclusion.
11662         * Makefile.in: Update dependencies.
11663         * lex.h (free_lang_decl_chain): Remove.
11664         * optimize.c (maybe_clone_body): Use function_name_declared_p.
11665         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
11666         it doesn't exist.
11667         (instantiate_decl): Use function_name_declared_p.
11668         * semantics.c (lang_expand_expr_stmt): Remove.
11669         (set_current_function_name_declared): Likewise.
11670         (current_function_name_declared): Likewise.
11671         (begin_compound_stmt): Use function_name_declared_p.
11672         (add_decl_stmt): Remove.
11673         (setup_vtbl_ptr): Use function_name_declared_p.
11674         (add_scope_stmt): Remove.
11675         (current_scope_stmt_stack): New function.
11676         (cp_expand_stmt): Don't handle SCOPE_STMTs.
11677         (expand_body): Use function_name_declared_p.
11678         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
11679         * typeck.c: Change order of includes.
11680         (convert_sequence): Remove.
11681
11682 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
11683
11684         * lex.c (reswords): Add _Complex.
11685
11686 2000-09-14  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11687
11688         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
11689
11690 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
11691
11692         * init.c (begin_init_stmts): Don't use // comments.
11693
11694 2000-09-12  Jason Merrill  <jason@redhat.com>
11695
11696         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
11697         all non-extern arrays.
11698
11699         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
11700         typenames, too.  Downgrade complaint to pedwarn.
11701         (xref_tag): Warn about surprising behavior of 'friend struct T'.
11702         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
11703         'class This::Inherited'.
11704
11705 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
11706
11707         * decl.c (finish_case_label): Given the LABEL_DECL a
11708         DECL_CONTEXT.
11709
11710 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
11711
11712         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
11713         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
11714         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
11715         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
11716         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
11717         New macros.
11718         (sorry_for_unsupported_tree, print_scope_operator,
11719         print_left_paren, print_right_paren, print_left_bracket,
11720         print_right_bracket, print_whitespace): Likewise.
11721         (aggr_variety): Rename to class_key_or_enum.
11722         (print_type): Rename to print_type_id.
11723         (print_type_specifier_seq, print_simple_type_specifier,
11724         print_elaborated_type_specifier,
11725         print_rest_of_abstract_declarator,
11726         print_parameter_declaration_clause, print_exception_specification,
11727         print_nested_name_specifier, print_template_id,
11728         typedef_original_name,  print_template_argument_list_start,
11729         print_template_argument_list_end): New functions.
11730
11731 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
11732
11733         * ir.texi: Add more documentation.
11734
11735 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
11736
11737         * cp-tree.h (struct saved_scope): Remove x_function_parms.
11738         (current_function_parms): Don't define.
11739         (struct cp_language_function): Remove parms_stored.
11740         (current_function_just_assigned_this): Don't define.
11741         (current_function_parms_stored): Likewise.
11742         (static_ctors): Declare.
11743         (static_dtors): Likewise.
11744         (SF_EXPAND): Don't define.
11745         (expand_start_early_try_stmts): Remove declaration.
11746         (store_parm_decls): Likewise.
11747         * decl.c (static_ctors): Don't declare.
11748         (static_dtors): Likewise.
11749         (struct binding_level): Remove this_block.
11750         (poplevel): Remove dead code.
11751         (set_block): Likewise.
11752         (mark_binding_level): Don't mark this_block.
11753         (mark_saved_scope): Don't mark x_function_parms.
11754         (init_decl_processing): Don't add current_function_parms as a GC
11755         root.
11756         (check_function_type): Change prototype.
11757         (start_function): Remove RTL-generation code.
11758         (expand_start_early_try_stmts): Remove.
11759         (store_parm_decls): Give it internal linkage.  Remove
11760         RTL-generation code.
11761         (finish_function): Remove RTL-generation code.
11762         * decl2.c (static_ctors): Fix formatting.
11763         (static_dtors): Likewise.
11764         * method.c (use_thunk): Don't call store_parm_decls.
11765         (synthesize_method): Likewise.
11766         * optimize.c (maybe_clone_body): Likewise.
11767         * parse.y (fn.def2): Likewise.
11768         (.set_base_init): Likewise.
11769         (nodecls): Likewise.
11770         * pt.c (instantiate_decl): Likewise.
11771         * rtti.c (synthesize_tinfo_fn): Likewise.
11772         * semantics.c (genrtl_try_block): Simplify.
11773         (expand_body): Use genrtl_start_function and
11774         genrtl_finish_function.
11775         (genrtl_start_function): New function.
11776         (genrtl_finish_function): Likewise.
11777
11778 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
11779
11780         * error.c (cp_tree_printer, case 'P'): Append break.
11781
11782 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
11783
11784         * cp-tree.h (frob_opname): Declare.
11785         * parse.y (saved_scopes): New static variable.
11786         (cp_parse_init): Adjust.
11787         (do_id): If lastiddecl is NULL, do do_identifier.
11788         (operator): Save scope information.
11789         (unoperator): New reduction. Restore scope information.
11790         (operator_name): Append unoperator. Call frob_opname.
11791         * spew.c (frob_opname): Define.
11792
11793 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
11794
11795         * decl.c, rtti.c: Include defaults.h if not already included.
11796         Don't define the *_TYPE_SIZE macros.
11797
11798 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
11799
11800         * cp-tree.h (push_switch): Change prototype.
11801         (check_cp_case_value): Remove declaration.
11802         (decl_constant_value): Likewise.
11803         * decl.c (struct cp_switch): Add switch_stmt and cases.
11804         (case_compare): New function.
11805         (push_switch): Set switch_stmt.  Initialize cases.
11806         (pop_switch): Clean up cases.
11807         (define_case_label): Rename to ...
11808         (finish_case_label): ... this.  Do semantic analysis for case
11809         labels here.
11810         (start_function): Correct comment.
11811         * decl2.c (check_cp_case_value): Remove.
11812         * expr.c (do_case): Remove.
11813         * pt.c (tsubst_expr): Adjust call to finish_case_label.
11814         * semantics.c (genrtl_do_poplevel): Remove declaration.
11815         (RECHAIN_STMTS): Remove.
11816         (finish_break_stmt): Use build_break_stmt.
11817         (finish_continue_stmt): Use build_continue_stmt.
11818         (finish_switch_cond): Adjust condition here, rater than in
11819         c_expand_start_case.
11820         (finish_case_label): Remove.
11821         * typeck.c (c_expand_return): Remove.
11822         (c_expand_start_case): Likewise.
11823
11824 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
11825
11826         * ir.texi: Document type nodes.
11827
11828 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
11829
11830         * cp-tree.h (init_cp_semantics): Declare.
11831         (genrtl_try_block): Don't declare.
11832         (genrtl_handler): Likewise.
11833         (genrtl_catch_block): Likewise.
11834         (genrtl_ctor_stmt): Likewise.
11835         (genrtl_subobject): Likewise.
11836         (genrtl_do_poplevel): Likewise.
11837         (genrtl_named_return_value): Likewise.
11838         * lex.c (init_parse): Call init_cp_semantics.
11839         * semantics.c (genrtl_try_block): Give it internal linkage.
11840         (genrtl_handler): Likewise.
11841         (genrtl_catch_block): Likewise.
11842         (genrtl_ctor_stmt): Likewise.
11843         (genrtl_subobject): Likewise.
11844         (genrtl_do_poplevel): Likewise.
11845         (genrtl_named_return_value): Likewise.
11846         (lang_expand_stmt): Rename to ...
11847         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
11848         (init_cp_semantics): Define.
11849
11850         * decl.c (initialize_local_var): Remove RTL-generating code.
11851         * semantics.c (genrtl_try_block): Fix formatting.
11852
11853         Move statement-tree facilities from C++ to C front-end.
11854         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
11855         (void_zero_node): Remove.
11856         (stmt_tree): Likewise.
11857         (scope_chain): Adjust.
11858         (language_function): Rename to cp_language_function.
11859         (cp_function_chain): Adjust.
11860         (current_stmt_tree): Remove.
11861         (last_tree): Likewise.
11862         (last_expr_type): Likewise.
11863         (struct lang_decl): Adjust.
11864         (STMT_IS_FULL_EXPR_P): Remove.
11865         (add_tree): Remove.
11866         (begin_stmt_tree): Likewise.
11867         (finish_stmt_tree): Likewise.
11868         (walk_tree_fn): Likewise.
11869         (walk_stmt_tree): Likewise.
11870         * class.c (finish_struct): Replace use of add_tree with add_stmt.
11871         * decl.c (mark_stmt_tree): Adjust type.
11872         (init_decl_processing): Don't build void_zero_node.
11873         (initialize_local_var): Adjust usage of current_stmt_tree.
11874         (finish_enum): Use add_stmt, not add_tree.
11875         (save_function_data): Adjust use of language_function.
11876         (finish_constructor_body): Use add_stmt, not add_tree.
11877         (finish_destructor_body): Likewise.
11878         (push_cp_function_context): Adjust use of language_function.
11879         (pop_cp_function_context): Likewise.
11880         (mark_lang_function): Likewise.
11881         (mark_cp_function_context): Likewise.
11882         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
11883         (build_vec_init): Likewise.
11884         * semantics.c (SET_LAST_STMT): Remove.
11885         (RECHAIN_STMTS): Don't use it.
11886         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
11887         (current_stmt_tree): Define.
11888         (add_tree): Remove.
11889         (finish_goto_stmt): Use add_stmt, not add_tree.
11890         (finish_expr_stmt): Likewise.
11891         (begin_if_stmt): Likewise.
11892         (finish_then_clause): Likewise.
11893         (begin_while_stmt): Likewise.
11894         (begin_do_stmt): Likewise.
11895         (finish_return_stmt): Likewise.
11896         (begin_for_stmt): Likewise.
11897         (finish_break_stmt): Likewise.
11898         (finish_continue_stmt): Likewise.
11899         (begin_switch_stmt): Likewise.
11900         (finish_case_label): Likewise.
11901         (begin_try_block): Likewise.
11902         (begin_function_try_block): Likewise.
11903         (begin_handler): Likewise.
11904         (begin_catch_block): Likewise.
11905         (begin_compound_stmt): Likewise.
11906         (begin_asm_stmt): Likewise.
11907         (finish_asm_stmt): Likewise.
11908         (finish_label_stmt): Likewise.
11909         (add_decl_stmt): Likewise.
11910         (finish_subobject): Likewise.
11911         (finish_decl_cleanup): Likewise.
11912         (finish_named_return_value): Likewise.
11913         (setup_vtbl_ptr): Likewise.
11914         (add_scope_stmt): Likewise.
11915         (finish_stmt_expr): Likewise.
11916         (prune_unused_decls): Remove.
11917         (begin_stmt_tree): Likewise.
11918         (finish_stmt_tree): Likewise.
11919         (prep_stmt): Adjust use of current_stmt_tree.
11920         (lang_expand_stmt): Likewise.
11921         * tree.c (statement_code_p): Remove.
11922         (cp_statement_code_p): New function.
11923         (walk_stmt_tree): Remove.
11924         (init_tree): Set lang_statement_code_p.
11925
11926 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
11927
11928         Integrated preprocessor.
11929
11930         * Make-lang.in, Makefile.in: Remove all references to input.c,
11931         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
11932         * gxx.gperf, hash.h, input.c: Delete.
11933         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
11934         initialized properly.
11935
11936         * class.c (fixup_pending_inline): Take a tree, not a
11937         struct pending_inline *.  All callers changed.
11938         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
11939         RID_PROTECTED entries in ridpointers[] array here.
11940         * decl.c (duplicate_decls): Do not refer to struct
11941         pending_inline.
11942         (record_builtin_type, init_decl_processing): Use RID_MAX not
11943         CP_RID_MAX.
11944         (grokdeclarator): Use C_IS_RESERVED_WORD.
11945         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
11946         cpplib.
11947         (grok_x_components): Do not inspect pending_inlines chain.
11948
11949         * cp-tree.h (struct lang_identifier): Add rid_code entry.
11950         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
11951         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
11952         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
11953         TIME_IDENTIFIER_FILEINFO): Kill.
11954         Update prototypes.
11955         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
11956         single 32-bit word.
11957         * parse.y: Call do_pending_inlines unconditionally.
11958         reinit_parse_for_method is now snarf_method.  fn.defpen is no
11959         longer necessary.  Remove unnecessary <itype> annotation on
11960         SCOPE.  Do not refer to end_of_file or struct pending_inline.
11961         * semantics.c (begin_inline_definitions): Call
11962         do_pending_inlines unconditionally.
11963
11964         * lex.c: Remove all code now shared with C front end.
11965         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
11966         into the get_identifier table.  Rewrite pragma handling to
11967         work with the registry.  Move code to save tokens for later
11968         processing to spew.c.
11969
11970         * spew.c: Rewrite everything in terms of token streams instead
11971         of text.  Move routines here from lex.c / input.c as
11972         appropriate.  GC-mark trees hanging off the pending inlines
11973         chain.
11974
11975 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
11976
11977         * NEWS: Mention that the named return value extension has been
11978         deprecated.
11979         * cp-tree.h (original_result_rtx): Define.
11980         (TREE_REFERENCE_EXPR): Remove.
11981         (DECL_VPARENT): Likewise.
11982         (pushdecl_nonclass_level): Likewise.
11983         (store_return_init): Likewise.
11984         (reinit_lang_specific): Likewise.
11985         (genrtl_named_return_value): Change prototype.
11986         * decl.c (original_result_rtx): Remove.
11987         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
11988         Do not generate RTL for local variables here.
11989         (store_return_init): Remove.
11990         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
11991         store_return_init.
11992         (finish_named_return_value): Adjust accordingly.  Warn that this
11993         extension is deprecated.
11994         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
11995
11996 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11997
11998         * pt.c (type_unification_real): Replace switch with if.
11999         (unify): Tsubst non-type parms before comparing.
12000
12001 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12002
12003         * error.c (dump_typename): New function, broken out of ...
12004         (dump_type): ... here. Use it.
12005         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
12006
12007 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12008
12009         * init.c (build_offset_ref): Deal with namespace scoped
12010         TEMPLATE_ID_EXPRs.
12011
12012 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12013
12014         * class.c (resolve_address_of_overloaded_function): Add
12015         explanation message.
12016         * decl.c (define_case_label): Reformat explanation.
12017         * decl2.c (finish_static_data_member_decl): Likewise.
12018         (grokfield): Likewise.
12019         * friend.c (do_friend): Likewise.
12020
12021 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
12022
12023         * tree.c (walk_tree): Expose tail recursion.
12024         (walk_stmt_tree): New function.
12025         * cp-tree.h: Prototype walk_stmt_tree.
12026         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
12027         the BLOCKs directly.  If a BLOCK has no variables after
12028         pruning, discard it.
12029         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
12030         restore the line number.
12031
12032 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
12033
12034         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
12035         (pt.o): Remove dependency on HTAB_H.
12036         * cp-tree.h: Include hashtab.h.
12037         (walk_tree): Change prototype.
12038         (walk_tree_without_duplicates): New function.
12039         * decl.c (check_default_argument): Use it.
12040         * optimize.c (remap_decl): Adjust calls to walk_tree.
12041         (copy_body): Likewise.
12042         (expand_calls_inline): Likewise.
12043         (calls_setjmp_p): Use walk_tree_without_duplicates.
12044         * pt.c: Don't include hashtab.h.
12045         (for_each_template_parm): Use walk_tree_without_duplicates.
12046         * semantics.c (finish-stmt_tree): Likewise.
12047         (expand_body): Likewise.
12048         * tree.c (walk_tree): Add additional parameter.
12049         (walk_tree_without_duplicates): New function.
12050         (count_trees): Use it.
12051         (verify_stmt_tree): Adjust call to walk_tree.
12052         (find_tree): Use walk_tree_without_duplicates.
12053         (no_linkage_check): Likewise.
12054         (break_out_target_exprs): Adjust call to walk_tree.
12055         (cp_unsave): Likewise.
12056
12057 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12058
12059         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
12060         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
12061         * cp-tree.h (TYPE_BINFO): Adjust comment.
12062         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
12063         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
12064         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
12065         (TYPE_TEMPLATE_INFO): Likewise.
12066         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
12067         * class.c (push_nested_class): Likewise.
12068         * decl.c (lookup_name_real): Likewise.
12069         (grokdeclarator): Likewise.
12070         (grok_op_properties): Likewise.
12071         (xref_tag): Likewise.
12072         (xref_basetypes): Likewise.
12073         * decl2.c (constructor_name_full): Likewise.
12074         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
12075         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
12076         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
12077         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12078         (dump_type_suffix): Likewise.
12079         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
12080         instead.
12081         (get_aggr_from_typedef): Likewise.
12082         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
12083         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12084         (write_template_parm): Likewise.
12085         (write_template_template_parm): Check tree code instead of
12086         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12087         * method.c (build_overload_nested_name): Add
12088         BOUND_TEMPLATE_TEMPLATE_PARM.
12089         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
12090         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12091         * pt.c (convert_template_argument): Check tree code instead of
12092         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12093         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
12094         (for_each_template_parm): Adjust comment.
12095         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
12096         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12097         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
12098         template_args_equal to compare template template parameter cases.
12099         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12100         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
12101         instead.
12102         * tree.c (copy_template_template_parm): Decide whether to create
12103         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
12104         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12105         (copy_tree_r): Likewise.
12106         * typeck.c (comptypes): Likewise.  Check tree code instead of
12107         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12108
12109 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
12110
12111         * decl.c (finish_function): Move the code for handling functions
12112         marked with the constructor and destructor attributes inside the
12113         expand_p block.
12114
12115 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
12116
12117         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
12118
12119 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
12120
12121         * pt.c (lookup_template_class): Remove abort.
12122         * tree.c (get_type_decl): Allow error_mark_node.
12123
12124 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
12125
12126         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
12127         TEMPLATE_ID_EXPRs.
12128
12129 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
12130
12131         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
12132         new ABI mangling.
12133
12134 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
12135
12136         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
12137         union tag mismatch error reporting.
12138
12139 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
12140
12141         * call.c (build_scoped_method_call): Check it is not a namespace.
12142
12143 2000-08-30  Jason Merrill  <jason@redhat.com>
12144
12145         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
12146
12147         * tree.c (bot_manip): Check TREE_CONSTANT rather than
12148         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
12149         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
12150
12151         * decl.c (start_function): Always call make_function_rtl.
12152
12153 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
12154
12155         * semantics.c (prune_unused_decls): New function.
12156         (finish_stmt_tree): Call it via walk_tree.
12157
12158 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
12159
12160         * class.c (build_secondary_vtable): Constify a char *.
12161         * decl.c (init_decl_processing): Initialize function_id_node,
12162         pretty_function_id_node, and func_id_node.
12163         * input.c (struct input_source): Constify 'str'.
12164         (feed_input): Constify first argument.
12165         * mangle.c (write_identifier): Constify argument.
12166         * pt.c (mangle_class_name_for_template): Constify argument.
12167
12168 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
12169
12170         * typeck.c (mark_addressable): Remove code that pokes around in
12171         RTL.
12172
12173 2000-08-28  Jason Merrill  <jason@redhat.com>
12174
12175         * lex.c (file_name_nondirectory): Move to toplev.c.
12176
12177         * cp-tree.h (LOCAL_CLASS_P): New macro.
12178         * class.c (finish_struct_1): Use it.
12179
12180 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
12181
12182         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
12183         (write_encoding): Pass another argument to write_name.
12184         (write_name): Add ignore_local_scope parameter.  Fix handling of
12185         local names.
12186         (write_nested_name): Use write_unqualified_name.
12187         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
12188         (write_template_prefix): Use write_unqualified_name.
12189         (write_component): Remove.
12190         (write_local_name): Add parameter.  Use direct local entity to
12191         discriminator calculation.
12192         (write_class_enum_type): Pass another argument to write_name.
12193         (write_template_template_arg): Likewise.
12194         (make_guard_variable): Likewise.
12195
12196 2000-08-27  Jason Merrill  <jason@redhat.com>
12197
12198         * decl.c (pushdecl): Matching decls for local externs are found in
12199         the current level.  Propagate linkage information from previous
12200         declarations.
12201
12202 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
12203
12204         * ir.texi (Expressions): Fix typo.
12205
12206 2000-08-25  Greg McGary  <greg@mcgary.org>
12207
12208         * tree.c (init_tree): Use ARRAY_SIZE.
12209
12210 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
12211
12212         * error.c (cp_tree_printer): Rework.
12213
12214 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
12215
12216         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
12217         dyn-string.o.
12218         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
12219         (cp-demangle.o): Remove target.
12220         (dyn-string.o): Likewise.
12221
12222         * decl.c (grokfndecl): Require that `main' return an `int'.
12223         * mangle.c (write_encoding): Don't mangle return types for
12224         conversion functions.
12225
12226 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
12227
12228         * error.c (tree_formatting_info): New data type.
12229         (tree_being_formatted): New macro.
12230         (tree_formatting_flags): Likewise.
12231         (put_whitespace): Likewise.
12232         (print_tree_identifier): Likewise.
12233         (print_identifier): Likewise.
12234         (cp_tree_printer, print_function_argument_list, print_declaration,
12235         print_expression, print_function_declaration,
12236         print_function_parameter, print_type, print_cv_qualifier): New
12237         functions.
12238         (init_error): Initialize lang_printer.
12239
12240 2000-08-24  Jason Merrill  <jason@redhat.com>
12241
12242         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
12243         adjustment necessary.
12244
12245 2000-08-24  Greg McGary  <greg@mcgary.org>
12246
12247         * cp-tree.h (MAIN_NAME_P): Remove macro.
12248
12249 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
12250
12251         * error.c (print_instantiation_context): Don't forget to flush the
12252         buffer.
12253
12254 2000-08-23  Jason Merrill  <jason@redhat.com>
12255
12256         * typeck.c (build_ptrmemfunc): Save the input pmf.
12257
12258         * method.c (process_modifiers): Use same_type_p.
12259
12260 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
12261
12262         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
12263         * mangle.c (write_function_type): Change prototype.
12264         (write_encoding): Don't mangle return types for
12265         constructors or destructors.
12266         (write_type): Adjust call to write_function_type.
12267         * pt.c (instantiate_template): Instantiate alternate entry points
12268         when instantiating the main function.
12269
12270 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
12271
12272         * error.c (cp_print_error_function): Don't use embedded '\n' in
12273         output_printf.
12274
12275 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
12276
12277         * decl.c (init_decl_processing): Remove bogus initialization.
12278         * error.c (lang_print_error_function): Restore here.
12279         (init_error): Initialize print_error_function.
12280
12281 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
12282
12283         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
12284
12285 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
12286
12287         * Makefile.in (error.o): Depends on diagnostic.h
12288
12289         * cp-tree.h (problematic_instantiation_changed,
12290         record_last_problematic_instantiation, current_instantiation,
12291         print_instantiation_context): Declare.
12292         (maybe_print_template_context): Remove.
12293
12294         * decl.c (init_decl_processing): Set print_error_function to NULL.
12295         (lang_print_error_function): Remove, since we're using a new
12296         machinery.
12297
12298         * error.c: #include diagnostic.h
12299         (function_category): New function.
12300         (cp_diagnostic_starter): Likewise.
12301         (cp_diagnostic_finalizer): Likewise.
12302         (cp_print_error_function): Likewise.
12303         (maybe_print_instantiation_context): Likewise.
12304         (print_instantiation_full_context): Likewise.
12305         (print_instantiation_partial_context): Likewise.
12306         (print_instantiation_context): Define.
12307         (init_error): Initialize diagnostic pager and finalizer.
12308
12309         * pt.c (problematic_instantiation_changed): Define.
12310         (record_last_problematic_instantiation): Likewise.
12311         (current_instantiation): Likewise.
12312         (maybe_print_template_context): Remove.
12313         (print_template_context): Likewise.
12314         (current_tinst_level): Make static to reflect Brendan Kehoe's
12315         change of 1995-04-13.
12316         (push_tinst_level): Call print_instantiation_context.
12317
12318 2000-08-21  Nix  <nix@esperi.demon.co.uk>
12319
12320         * lang-specs.h: Do not process -o or run the assembler if
12321         -fsyntax-only.
12322
12323 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
12324
12325         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
12326         variables.
12327         * decl2.c (lang_decode_option): Disable gettext attributes for
12328         -ansi.
12329
12330 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
12331
12332         * lex.c (lang_init_options): Default diagnostic message maximum
12333         length to 80, when line-wrapping.
12334
12335 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
12336
12337         * class.c (build_vtbl_initializer): Clear the entire
12338         vtbl_init_data.  Start keeping track of the functions for which we
12339         have created vcall offsets here.
12340         (dfs_build_vcall_offset_vtbl_entries): Remove.
12341         (build_vcall_offset_vtbl_entries): Reimplement.
12342         (add_vcall_offset_vtbl_entries_r): New function.
12343         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
12344         computing when vcall offsets are necessary.
12345
12346 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12347
12348         * decl.c (member_function_or_else): Use cp_error ... %T.
12349         (grokdeclarator): Likewise.
12350         (start_method): Likewise.
12351         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
12352
12353 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12354
12355         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
12356         TYPE_DECLs.
12357
12358 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12359
12360         * cp-tree.h (PTRMEM_OK_P): New macro.
12361         (itf_ptrmem_ok): New enumeration value.
12362         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
12363         argument. Diagnose implicit pointer to member.
12364         (instantiate_type): Don't diagnose implicit pointer to member
12365         here. Pass itf_ptrmem_ok if ok. Adjust calls to
12366         resolve_address_of_overloaded_function.
12367         * init.c (build_offset_ref): Set PTRMEM_OK_P.
12368         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
12369         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
12370         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
12371         (build_unary_op): Deal with single non-static member in
12372         microsoft-land.
12373
12374 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12375
12376         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
12377
12378 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12379
12380         * cp-tree.h (enum_name_string): Remove prototype.
12381         (report_case_error): Remove prototype.
12382         * cp/typeck2.c (enum_name_string): Remove.
12383         (report_case_error): Remove.
12384         * error.c (dump_expr): Deal with enum values directly.
12385         Correctly negate integer constant.
12386
12387 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12388
12389         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
12390         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
12391         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
12392         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
12393         (__cxa_vec_new): Use __cxa_vec_new2.
12394         (__cxa_vec_delete): Use __cxa_vec_delete2.
12395
12396 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12397
12398         * vec.cc (__cxa_vec_new): Set "C" linkage.
12399         (__cxa_vec_ctor): Likewise.
12400         (__cxa_vec_cctor): Likewise.
12401         (__cxa_vec_dtor): Likewise.
12402         (__cxa_vec_delete): Likewise.
12403         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
12404         (__cxa_vec_ctor): Likewise.
12405         (__cxa_vec_cctor): Likewise.
12406         (__cxa_vec_dtor): Likewise.
12407         (__cxa_vec_delete): Likewise.
12408
12409 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12410
12411         * class.c (instantiate_type): Reinstate local variable
12412         deleted in previous change.
12413
12414         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
12415         itf_no_attributes.
12416
12417 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12418
12419         * cp-tree.h (instantiate_type_flags): New enumeration.
12420         (instantiate_type): Change parameter.
12421         * class.c (instantiate_type): Adjust prototype. Adjust.
12422         * call.c (standard_conversion): Adjust instantiate_type call.
12423         (reference_binding): Likewise.
12424         (build_op_delete_call): Likewise.
12425         (convert_like_real): Likewise.
12426         * cvt.c (cp_convert_to_pointer): Likewise.
12427         (convert_to_reference): Likewise.
12428         * pt.c (convert_nontype_argument): Likewise.
12429         * typeck.c (build_binary_op): Likewise.
12430         (build_ptrmemfunc): Likewise.
12431         (convert_for_assignment): Likewise.
12432
12433 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12434
12435         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
12436         (current_aggr): Define.
12437         * decl.c (grokdeclarator): Make sure a friend class is an
12438         elaborated type specifier.
12439         * parse.y (current_aggr): Remove static definition.
12440         (cp_parse_init): Adjust.
12441         (structsp): Clear and restore current_aggr.
12442         (component_decl_list): Clear current_aggr.
12443
12444         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
12445         aggregate tag on the typename's context.
12446
12447         * pt.c (tsubst_friend_class): Return error_mark_node, if
12448         parms becomes NULL.
12449         (instantiate_class_template): Ignore error_mark_node friend types.
12450
12451 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
12452
12453         * cvt.c (warn_ref_binding): New static function, broken out of ...
12454         (convert_to_reference): ... here. Use it.
12455
12456 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
12457
12458         * parse.y (template_arg): Add rule for template qualified with
12459         global scope.
12460
12461 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12462
12463         * decl2.c (add_function): Reorganize.
12464         (arg_assoc): Do not consider function template decls.
12465
12466 2000-08-11  Jason Merrill  <jason@redhat.com>
12467
12468         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
12469         looking inside.
12470
12471 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12472
12473         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
12474         (lookup_nested_tag): Likewise.
12475
12476         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
12477         can be produced.
12478
12479 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12480
12481         * parse.y (named_complex_class_head_sans_basetype): Remove
12482         always true if.
12483
12484 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12485
12486         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
12487         explicit TEMPLATE_ID_EXPR args.
12488         (build_expr_from_tree, case CALL_EXPR): Likewise.
12489
12490 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12491
12492         * decl.c (check_tag_decl): Diagnose typename's which don't
12493         declare anything.
12494
12495 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
12496
12497         * init.c (build_aggr_init): Reject bogus array initializers
12498         early.
12499
12500 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
12501
12502         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
12503         runtime.
12504         * cp/tinfo.cc (__dynamic_cast): Likewise.
12505         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
12506
12507 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
12508
12509         * cvt.c (convert_to_pointer_force): Fix error message when
12510         attempting to cast from ambiguous base.
12511
12512 2000-08-08  Jason Merrill  <jason@redhat.com>
12513
12514         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
12515         (tsubst_template_arg_vector): Likewise.
12516
12517         * decl2.c (build_anon_union_vars): Choose the largest field; don't
12518         assume that one will be as large as the union.
12519
12520 2000-08-07  Kazu Hirata  <kazu@hxi.com>
12521
12522         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
12523         * decl.c (pop_labels): Likewise.
12524
12525 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
12526
12527         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
12528         specifications.
12529         (__pointer_to_member_type_info): Likewise.
12530         (__base_class_info): Likewise.
12531         (__class_type_info): Likewise.
12532         (__si_class_type_info): Likewise.
12533         (__vmi_class_type_info): Likewise.
12534         * tinfo.cc (__si_class_type_info::__do_find_public_src):
12535         Changed member names to match specifications.
12536         (__vmi_class_type_info::__do_find_public_src): Likewise.
12537         (__si_class_type_info::__do_dyncast): Likewise.
12538         (__vmi_class_type_info::__do_dyncast): Likewise.
12539         (__si_class_type_info::__do_upcast): Likewise.
12540         (__vmi_class_type_info::__do_upcast): Likewise.
12541         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
12542         (__pbase_type_info::__pointer_catch): Likewise.
12543         (__pointer_type_info::__pointer_catch): Likewise.
12544         (__pointer_to_member_type_info::__pointer_catch): Likewise.
12545
12546 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
12547
12548         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
12549         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
12550         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
12551
12552 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
12553
12554         * cp-tree.h (add_method): Change prototype.
12555         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
12556         Don't double the size of the method vector in the error case.
12557         (handle_using_decl): Adjust call to add_method.
12558         (add_implicitly_declared_members): Likewise.
12559         (clone_function_decl): Likewise.
12560         * decl2.c (check_classfn): Likewise.
12561         * semantics.c (finish_member_declaration): Likewise.
12562
12563 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
12564
12565         * decl.c (flag_isoc94): New variable.
12566
12567 2000-08-02  Jason Merrill  <jason@redhat.com>
12568
12569         * pt.c (do_type_instantiation): Add complain parm; don't complain
12570         if called recursively.
12571         * cp-tree.h, parse.y: Adjust.
12572
12573 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
12574
12575         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
12576         -Wno-strict-prototypes.
12577
12578         * g++spec.c: Adjust type of second argument to
12579         lang_specific_driver, and update code as necessary.
12580
12581         * cp-tree.h: Don't prototype min_precision here.
12582         (my_friendly_assert): Cast expression to void.
12583         * semantics.c (do_poplevel): Initialize scope_stmts.
12584
12585 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
12586
12587         * cp-tree.h (DECL_NEEDED_P): Tweak.
12588
12589 2000-07-28  Jason Merrill  <jason@redhat.com>
12590
12591         * lang-specs.h: Use %i in rule for .ii files.
12592
12593 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
12594
12595         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
12596
12597 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
12598
12599         Allow indirect primary bases.
12600         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
12601         primary_base.
12602         (CLASSTYPE_VFIELD_PARENT): Remove.
12603         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
12604         (BINFO_PRIMARY_BINFO): Remove.
12605         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
12606         (BINFO_VBASE_PRIMARY_P): Likewise.
12607         (BINFO_PRIMARY_BASE_OF): New macro.
12608         (BINFO_INDIRECT_PRIMARY_P): Likewise.
12609         (get_primary_binfo): New function.
12610         * decl.c (lang_mark_tree): Make lang_type::primary_base.
12611         * class.c (vcall_offset_data_s): Rename to ...
12612         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
12613         and add ctor_vtbl_p.
12614         (get_derived_offset): Use get_primary_binfo.
12615         (dfs_mark_primary_bases): Adjust handling of virtual primary
12616         bases.
12617         (mark_primary_bases): Likewise.
12618         (set_primary_base): Take a binfo, not an integer, as a
12619         representation of the primary base.
12620         (indirect_primary_base_p): Remove.
12621         (determine_primary_base): Adjust for indirect primary bases.
12622         (dfs_find_final_overrider): Fix typo in coment.
12623         (update_vtable_entry_for_fn): Use get_primary_binfo.
12624         (layout_nonempty_base_or_field): Tweak.
12625         (build_base_fields): Adjust for new primary base semantics.
12626         (dfs_propagate_binfo_offsets): Remove.
12627         (propagate_binfo_offsets): Rewrite.
12628         (dfs_set_offset_for_shared_vbases): Remove.
12629         (layout_virtual_bases): Don't use it.
12630         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
12631         ABI.
12632         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
12633         CLASSTYPE_VFIELD_PARENT.
12634         (dfs_get_primary_binfo): New function.
12635         (get_primary_binfo): Likewise.
12636         (dump_class_hierarchy_r): Tweak printing of primary bases.
12637         (build_vtbl_initializer): Fix typo in comments.  Use
12638         vtbl_init_data.
12639         (build_vcall_and_vbase_vtbl_entries): Likewise.
12640         (build_vbaes_offset_vtbl_entries): Likewise.
12641         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
12642         BV_VCALL_INDEX to handle indirect primary bases.
12643         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
12644         (build_rtti_vtbl_entries): Likewise.
12645         * search.c (get_shared_vbase_if_not_primary): Tweak.
12646         (find_vbase_instance): Likewise.
12647         (binfo_for_vtable): Simplify.
12648         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
12649         (make_binfo): Make it have 11 entries.
12650
12651 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
12652
12653         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
12654         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
12655         ascertaining primaryness.
12656         (G): Remove template_args.
12657         (decl_is_template_id): New function.
12658         (write_encoding): Use decl_is_template_id.
12659         (write_name): Likewise.  Handle type_decls.  Get main variant of
12660         type decls.
12661         (write_nested_name): Likewise.
12662         (write_prefix): Likewise.
12663         (write_template_prefix): Likewise.
12664         (write_special_name_constructor): Remove defunct production from
12665         comment.
12666         (write_bare_function_type): Remove comment about absent parameter.
12667         (write_template_template_arg): Add missing grammar production to
12668         comment.
12669
12670 2000-07-27  Jason Merrill  <jason@redhat.com>
12671
12672         * decl.c (duplicate_decls): If common_type produces a non-typedef
12673         type for a typedef, just use the old type.
12674
12675 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
12676
12677         * cp-tree.h (function_depth): Declare.
12678         (verify_stmt_tree): Likewise.
12679         (find_tree): Likewise.
12680         * decl.c (function_depth): Give it external linkage.
12681         * optimize.c (optimize_function): Increment and decrement it.
12682         * tree.c (verify_stmt_tree_r): New function.
12683         (verify_stmt_tree): Likewise.
12684         (find_tree_r): Likewise.
12685         (find_tree): Likewise.
12686
12687 2000-07-27  Jason Merrill  <jason@redhat.com>
12688
12689         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
12690         TYPE_PTRMEMFUNC_P.
12691         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
12692
12693 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
12694
12695         * decl.c (start_cleanup_fn): Mark the function as `inline'.
12696         * decl2.c (get_guard): Call cp_finish_decl, not
12697         rest_of_decl_compilation, for local guards.
12698         * lex.c (do_identifier): Remove unused variable.
12699
12700 2000-07-26      Marc Espie <espie@cvs.openbsd.org>
12701
12702         * parse.y:  Add missing ';'.
12703
12704 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
12705
12706         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
12707         of `extern "C++"'.
12708
12709 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12710
12711         Kill strict_prototype. Backwards compatibility only for
12712         non NO_IMPLICIT_EXTERN_C systems.
12713         * cp-tree.h (flag_strict_prototype): Remove.
12714         (strict_prototype): Remove.
12715         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
12716         * decl.c (maybe_push_to_top_level): Adjust.
12717         (pop_from_top_level): Adjust.
12718         (decls_match): Only allow sloppy parm matching for ancient
12719         system headers.
12720         (init_decl_processing): Adjust.
12721         (grokdeclarator): Adjust.
12722         * decl2.c (flag_strict_prototype): Remove.
12723         (strict_prototype): Remove.
12724         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
12725         (lang_f_options): Remove "strict-prototype".
12726         (unsupported-options): Add "strict-prototype".
12727         * lex.c (do_identifier): Adjust.
12728         (do_scoped_id): Adjust.
12729         * parse.y (empty_parms): Adjust.
12730         * class.c (push_lang_context): Adjust.
12731         (pop_lang_context): Adjust.
12732         * typeck.c (comp_target_parms): Adjust.
12733
12734 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12735
12736         * decl.c (poplevel): Deal with anonymous variables at for scope.
12737         (maybe_inject_for_scope_var): Likewise.
12738
12739 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
12740
12741         * decl.c: Remove all signal handling code, now done in toplev.c.
12742
12743 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
12744
12745         * decl.c (make_rtl_for_nonlocal_decl): Rework.
12746
12747         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
12748         correctly.
12749
12750 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
12751
12752         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
12753         Define my_friendly_assert and my_friendly_abort as macros
12754         which may call friendly_abort.  Prototype friendly abort, not
12755         my_friendly_abort or my_friendly_assert.
12756         * decl.c (signal_catch): Report the signal caught in the error
12757         message.  Call fatal directly.
12758         * typeck2.c (ack, my_friendly_assert): Delete.
12759         (my_friendly_abort): Rename to friendly_abort.  Expect file,
12760         line, and function parameters.  Report the abort code, then
12761         call fancy_abort.  Do not mask an abort if errors have
12762         already occurred.
12763
12764 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
12765
12766         * typeck.c (comp_target_parms): Remove obsolete parameter.
12767         (comp_target_types): Adjust.
12768
12769 2000-07-17  Jason Merrill  <jason@redhat.com>
12770
12771         * typeck.c (mark_addressable): Never set TREE_USED.
12772         * call.c (build_call): Don't abort on calls to library functions
12773         that have been declared normally.
12774
12775         * typeck.c (build_binary_op): Fix grammar in warning.
12776
12777         * exception.cc (__eh_free): Fix prototype.
12778
12779         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
12780
12781         * decl.c (pushdecl): Handle seeing an OVERLOAD in
12782         IDENTIFIER_NAMESPACE_VALUE.
12783
12784 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
12785
12786         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
12787         * method.c (use_thunk): Correct handling of vcall offsets.
12788
12789 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
12790
12791         * .cvsignore: parse.h and parse.c have no cp- prefix.
12792
12793 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
12794
12795         * .cvsignore: New file.
12796
12797 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
12798
12799         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
12800
12801 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
12802
12803         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
12804         * parse.c: Remove.
12805         * parse.h: Likewise.
12806
12807 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
12808
12809         * class.c (layout_class_type): Add pointers to virtual bases after
12810         base classes under the old ABI.
12811
12812 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
12813
12814         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
12815         (finish_continue_stmt): Likewise.
12816         (begin_for_stmt): Remove call to note_level_for_for.
12817         (finish_goto_stmt): Change call from build_min_nt
12818         to build_stmt.
12819         (finish_expr_stmt): Likewise.
12820         (begin_if_stmt): Likewise.
12821         (begin_while_stmt): Likewise.
12822         (finish_while_stmt): Likewise.
12823         (finish_return_stmt): Likewise.
12824         (begin_for_stmt): Likewise.
12825         (finish_for_stmt): Likewise.
12826         (finish_break_stmt): Likewise.
12827         (begin_switch_stmt): Likewise.
12828         (finish_case_label): Likewise.
12829         (genrtl_try_block): Likewise.
12830         (begin_try_block): Likewise.
12831         (begin_handler): Likewise.
12832         (begin_compound_stmt): Likewise.
12833         (finish_asm_stmt): Likewise.
12834         (finish_label_stmt): Likewise.
12835         (add_decl_stmt): Likewise.
12836         (finish_subobject): Likewise.
12837         (finish_decl_cleanup): Likewise.
12838         (finish_named_return_value): Likewise.
12839         (setup_vtbl_ptr): Likewise.
12840         (add_scope_stmt): Likewise.
12841         * decl.c (finish_constructor_body): Likewise.
12842         (finish_destructor_body): Likewise.
12843         * optimize.c (copy_body_r): Likewise.
12844         (initialize_inlined_parameters): Likewise.
12845         (declare_return_variable): Likewise.
12846         (expand_call_inline): Likewise.
12847
12848 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
12849
12850         * semantics.c (expand_body): Sync interface information
12851         at the end of function body expansion.
12852
12853 2000-07-09  Jason Merrill  <jason@redhat.com>
12854
12855         * init.c (build_new_1): Bail early if the call to new fails.
12856
12857         * decl.c (compute_array_index_type): Check specifically for
12858         an INTEGER_CST, not just TREE_CONSTANT.
12859
12860         * decl.c (duplicate_decls): Don't call duplicate_decls on
12861         the DECL_TEMPLATE_RESULT.
12862         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
12863         codes.
12864
12865         * error.c (dump_template_bindings): Don't crash if we had an
12866         invalid argument list.
12867
12868         * typeck.c (c_expand_start_case): Do narrowing here.
12869         * semantics.c (finish_switch_cond): Not here.
12870
12871 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
12872
12873         * parse.y (asm_clobbers): Do string concatenation.
12874
12875 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
12876
12877         * decl.c (pushtag): Don't put local classes in template functions
12878         on the local_classes list.
12879
12880 2000-07-04  Scott Snyder  <snyder@fnal.gov>
12881
12882         * decl2.c (get_guard): Add missing return for old ABI local
12883         variable case.
12884
12885 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
12886
12887         * cp-tree.h (char_type_p): New function.
12888         * decl.c (init_decl_processing): Don't initialize
12889         signed_wchar_type_node or unsigned_wchar_type_node.
12890         (complete_array_type): Handle brace-enclosed string-constants.
12891         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
12892         * tree.c (char_type_p): New function.
12893         * typeck2.c (digest_init): Use char_type_p.
12894
12895 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
12896
12897         * pt.c (tsubst): Don't layout type, if it's error_mark.
12898
12899 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
12900
12901         * pt.c (instantiate_pending_templates): Reset template level.
12902
12903 2000-07-05  Jason Merrill  <jason@redhat.com>
12904
12905         * call.c (joust): Don't complain about `operator char *()' beating
12906         `operator const char *() const'.
12907
12908 2000-07-04  scott snyder  <snyder@fnal.gov>
12909             Jason Merrill  <jason@redhat.com>
12910
12911         * repo.c (repo_get_id): Handle the case where a class with virtual
12912         bases has a null TYPE_BINFO_VTABLE.
12913
12914 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
12915             Jason Merrill  <jason@redhat.com>
12916
12917         * parse.y (member_init): Just pass in the type.
12918         * init.c (expand_member_init): Handle getting a type.
12919
12920 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12921             Jason Merrill  <jason@redhat.com>
12922
12923         * decl.c (finish_function): Warn if a function has no return
12924         statement.
12925         Suggested by Andrew Koenig.
12926         * typeck.c (check_return_expr): Do set current_function_returns_value
12927         if we got an error_mark_node.
12928
12929 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
12930
12931         * decl2.c (push_decl_namespace): Push the original namespace.
12932
12933 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
12934
12935         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
12936         * semantics.c (begin_class_definition): Clear it.
12937
12938 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
12939
12940         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
12941         (genrtl_expr_stmt): Likewise.
12942         (genrtl_decl_stmt): Likewise.
12943         (genrtl_if_stmt): Likewise.
12944         (genrtl_while_stmt): Likewise.
12945         (genrtl_do_stmt): Likewise.
12946         (genrtl_return_stmt): Likewise.
12947         (genrtl_for_stmt): Likewise.
12948         (genrtl_break_stmt): Likewise.
12949         (genrtl_continue_stmt): Likewise.
12950         (genrtl_scope_stmt): Likewise.
12951         (genrtl_switch_stmt): Likewise.
12952         (genrtl_case_label): Likewise.
12953         (genrtl_begin_compound_stmt): Likewise.
12954         (genrtl_finish_compound_stmt): Likewise.
12955         (genrtl_compound_stmt): Likewise.
12956         (genrtl_asm_stmt): Likewise.
12957
12958         * init.c (begin_init_stmts): Remove call to
12959         genrtl_begin_compound_stmt.
12960         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
12961
12962         * semantics.c (lang_expand_stmt): Changed call to
12963         genrtl_compound_stmt to ignore return value.
12964
12965 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
12966
12967         * mangle.c (canonicalize_for_substitution): Return the canonical
12968         variant of a type.
12969
12970         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
12971         TYPE_DECL.
12972         * typeck.c (commonparms): Remove obstack manipulations.
12973
12974 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
12975
12976         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
12977
12978         * Makefile.in (OBJS): Added ../c-semantics.o.
12979         (OBJDEPS): Likewise.
12980
12981         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
12982         ../c-common.h.
12983         (struct stmt_tree): Added comment.
12984         (current_function_name_declared): Removed.
12985         (stmts_are_full_exprs_p): Likewise.
12986         (genrtl_do_pushlevel): Likewise.
12987         (genrtl_clear_out_block): Likewise.
12988         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
12989         (DECL_ANON_UNION_ELEMS): Likewise.
12990         (emit_local_var): Likewise.
12991         (make_rtl_for_local_static): Likewise.
12992         (do_case): Likewise.
12993         (expand_stmt): Likewise.
12994         (genrtl_decl_cleanup): Likewise.
12995         (c_expand_asm_operands): Likewise.
12996         (c_expand_return): Likewise.
12997         (c_expand_start_case): Likewise.
12998
12999         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
13000         (emit_local_var): Likewise.
13001         (initialize_local_var): Change reference to
13002         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
13003         Change reference to stmts_are_full_exprs_p to
13004         current_stmt_tree->stmts_are_full_exprs_p.
13005         (push_cp_function_context): Likewise.
13006
13007         * expect.c (expand_throw): Change reference to
13008         stmts_are_full_exprs_p.
13009
13010         * init.c (build_aggr_init): Change reference to
13011         stmts_are_full_exprs_p.
13012         (build_vec_init): Likewise.
13013
13014         * optimize.c (maybe_clone_body): Change reference to
13015         current_function_name_declared to
13016         cp_function_chain->name_declared.
13017
13018         * pt.c (instantiate_decl): Change reference to
13019         current_function_name_declared to
13020         cp_function_chain->name_declared.
13021
13022         * semantics.c (expand_cond): Moved declaration to c-common.h.
13023         (genrtl_do_pushlevel): Moved to c-semantics.c.
13024         (genrtl_clear_out_block): Likewise.
13025         (genrtl_goto_stmt): Likewise.
13026         (genrtl_expr_stmt): Likewise.
13027         (genrtl_decl_stmt): Likewise.
13028         (gerntl_if_stmt): Likewise.
13029         (genrtl_while_stmt): Likewise.
13030         (genrtl_do_stmt): Likewise.
13031         (genrtl_return_stmt): Likewise.
13032         (genrtl_for_stmt): Likewise.
13033         (genrtl_break_stmt): Likewise.
13034         (genrtl_continue_stmt): Likewise.
13035         (genrtl_scope_stmt): Likewise.
13036         (genrtl_switch_stmt): Likewise.
13037         (genrtl_case_label): Likewise.
13038         (genrtl_begin_compound_stmt): Likewise.
13039         (genrtl_finish_compound_stmt): Likewise.
13040         (genrtl_compound_stmt): Likewise.
13041         (genrtl_asm_stmt): Likewise.
13042         (genrtl_decl_cleanup): Likewise.
13043         (expand_cond): Likewise.
13044         (expand_stmt): Renamed to ...
13045         (lang_expand_stmt): ... this.
13046         (lang_expand_expr_stmt): Initialize.
13047         (set_current_function_name_declared): Likewise.
13048         (stmts_are_full_exprs_p): Likewise.
13049         (current_function_name_declared): Likewise.
13050         (anon_aggr_type_p): Likewise.
13051         (do_poplevel): Change reference to
13052         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
13053         Change reference to stmts_are_full_exprs_p to
13054         current_stmt_tree->stmts_are_full_exprs_p.
13055         (add_tree): Likewise.
13056         (finish_expr_stmt): Likewise.
13057         (prep_stmt): Likewise.
13058         (lang_expand_stmt): Likewise.
13059         (begin_compound_stmt): Change reference to
13060         current_function_name_declared to
13061         cp_function_chain->name_declared and call to
13062         current_function_name_declared().
13063         (setup_vtbl_ptr): Likewise.
13064         (genrtl_do_poplevel): Removed.
13065
13066 2000-06-30  Jason Merrill  <jason@redhat.com>
13067
13068         * init.c (init_init_processing): Go back to aligning like
13069         double_type_node for old ABI.
13070         (get_cookie_size): Make cookie larger if we get a type that needs
13071         more alignment.
13072         (build_vec_delete): Call it.
13073
13074         * typeck.c (qualify_type_recursive): New fn.
13075         (composite_pointer_type): Use it.
13076         (build_binary_op): Use composite_pointer_type.
13077
13078 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
13079             Jason Merrill  <jason@redhat.com>
13080
13081         * typeck.c (check_return_expr): Don't complain about returning
13082         NULL from operator new if -fcheck-new.
13083         * cp-tree.h: Declare flag_check_new here.
13084         * init.c: Not here.
13085
13086 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
13087
13088         * mangle.c (find_substitution): Use same_type_p.
13089         (write_encoding): Don't check for substitutions.
13090
13091 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
13092
13093         * parse.y (expr_no_comma_rangle): New non-terminal.
13094         (template_parm): Use it for default parameter case.
13095         (template_arg): Use it.
13096         (expr_no_commas): Remove commented out undefined extensions.
13097         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
13098         * parse.h, parse.c: Rebuilt.
13099
13100 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
13101
13102         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
13103         (finish_asm_stmt): Do it here, instead.
13104
13105         * cp-tree.h (ridpointers): Don't declare.
13106         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
13107         (record_builtin_java_type): Likewise.
13108         (init_decl_processing): Likewise.
13109         * lex.c: Move inclusion of lex.h.
13110         (ridpointers): Don't define.
13111         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
13112         RID_MAX.
13113         * lex.h (enum rid): Rename to ...
13114         (enum cp_rid): ... this.
13115         (ridpointers): Don't declare.
13116         * parse.y: Move inclusion of lex.h.
13117         * parse.c: Regenerated.
13118         * spew.c: Move inclusion of lex.h.
13119
13120         * cp-tree.h (struct language_function): Remove temp_name_counter.
13121         (temp_name_counter): Remove.
13122         (get_temp_name): Change prototype.
13123         (get_guard): New function.
13124         (get_guard_cond): Likewise.
13125         (set_guard): Likewise.
13126         * cvt.c (build_up_reference): Adjust call to get_temp_name.
13127         * decl.c (expand_static_init): Use get_guard and friends to
13128         implement guard variables.
13129         * decl2.c (get_temp_name): Assume that the variables created are
13130         always static.
13131         (get_sentry): Rename to ...
13132         (get_guard): ... this.  Implement new ABI guard variables.
13133         (get_guard_bits): New function.
13134         (get_guard_cond): Likewise.
13135         (set_guard): Likewise.
13136         (start_static_initialization_or_destruction): Use them.
13137         (do_static_initialization): Replace sentry with guard throughout.
13138         (do_static_destruction): Likewise.
13139         * init.c (create_temporary_var): Add comment.
13140
13141 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
13142
13143         * mangle.c (find_substitution): Use same_type_p.
13144         (write_encoding): Don't check for substitutions.
13145
13146 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
13147
13148         * parse.y (expr_no_comma_rangle): New non-terminal.
13149         (template_parm): Use it for default parameter case.
13150         (template_arg): Use it.
13151         (expr_no_commas): Remove commented out undefined extensions.
13152         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
13153         * parse.h, parse.c: Rebuilt.
13154
13155 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
13156
13157         * cp-tree.h (flag_const_strings): Remove.
13158         (warn_parentheses): Likewise.
13159         (warn_format): Likewise.
13160         (common_type): Likewise.
13161         (default_conversion): Likewise.
13162         (build_binary_op): Likewise.
13163         (cp_build_binary_op): New macro.
13164         * call.c (build_new_op): Use cp_build_binary_op instead of
13165         build_binary_op.
13166         * class.c (build_vtable_entry_ref): Likewise.
13167         * decl.c (expand_static_init): Likewise.
13168         (compute_array_index_type): Likewise.
13169         (build_enumerator): Likewise.
13170         * decl2.c (delete_sanity): Likewise.
13171         (start_static_initialization_or_destruction): Likewise.
13172         * error.c (dump_type_suffix): Likewise.
13173         * init.c (resolve_offset_ref): Likewise.
13174         (build_new): Likewise.
13175         (build_new_1): Likewise.
13176         (build_vec_delete_1): Likewise.
13177         (build_vec_init): Likewise.
13178         (build_delete): Likewise.
13179         * rtti.c (synthesize_tinfo_fn): Likewise.
13180         (synthesize_tinfo_var): Likewise.
13181         * search.c (expand_upcast_fixups): Likewise.
13182         (fixup_all_virtual_upcast_offsets): Likewise.
13183         * typeck.c (build_array_ref): Likewise.
13184         (get_member_function_from_ptrfunc): Likewise.
13185         (build_binary_op): Add parameter.
13186         (pointer_int_sum): Use cp_build_binary_op.
13187         (pointer_diff): Likewise.
13188         (build_modify_expr): Likewise.
13189         (get_delta_difference): Likewise.
13190         (build_ptrmemfunc): Likewise.
13191
13192 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
13193
13194         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
13195         * decl.c (create_implicit_typedef): Adjust.
13196         * decl2.c (build_artificial_parm): Adjust.
13197         * method.c (implicitly_declare_fn): Adjust.
13198         * pt.c (push_inline_template_parms_recursive): Adjust.
13199         (process_template_parm): Adjust.
13200         (overloaded_template_name): Adjust.
13201         * semantics.c (finish_template_template_parm): Adjust.
13202
13203 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
13204
13205         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
13206         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
13207         where to emit thunks.
13208         (build_vtt): Adjust call to build_vtt_inits.
13209         (build_vtt_inits): Add parameter to indicate whether or not
13210         sub-VTTs for virtual bases should be included.  Adjust handling of
13211         construction vtables.
13212         (get_matching_base): New function.
13213         (dfs_build_vtt_inits): Rename to ...
13214         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
13215         construction vtables.
13216         (dfs_fixup_binfo_vtbls): Likewise.
13217         (build_ctor_vtbl_groups): Build construction vtables for virtual
13218         bases, too.
13219         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
13220         to build construction vtbls.
13221         (dfs_accumulate_vtbl_inits): Adjust handling of
13222         construction vtables.
13223
13224         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
13225         types correctly.
13226
13227 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
13228
13229         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
13230
13231 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
13232
13233         * search.c (hides): Remove.
13234         (is_subobject_of_p): Add most_derived parameter. Use
13235         CANONICAL_BINFO.
13236         (lookup_field_queue_p): Adjust.
13237         (lookup_field_r): Adjust.
13238
13239 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
13240
13241         * decl2.c (handle_class_head): Bash typedefs to the type's main
13242         decl.
13243
13244 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
13245
13246         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
13247         (begin_global_stmt_expr): ... this.
13248         (genrtl_finish_stmt_expr): Rename to ...
13249         (finish_global_stmt_expr): ... this.
13250         * init.c (begin_init_stmts): Adjust calls.
13251         (finish_init_stmts): Likewise.
13252         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
13253         (begin_global_stmt_expr): ... this.
13254         (genrtl_finish_stmt_expr): Rename to ...
13255         (finish_global_stmt_expr): ... this.
13256
13257 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13258
13259         * search.c (lookup_member): Fix typo in comment.
13260
13261 2000-06-24  Jason Merrill  <jason@redhat.com>
13262
13263         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
13264         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
13265
13266 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13267
13268         * parse.y (complex_direct_notype_declarator): Support global_scope.
13269         * Makefile.in: Adjust conflict count.
13270
13271 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13272
13273         * parse.y (template_arg): Convert TEMPLATE_DECL
13274         that is a template template parameter to
13275         TEMPLATE_TEMPLATE_PARM here.
13276
13277         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
13278         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
13279         (copy_template_template_parm): Adjust prototype.
13280         * decl.c (grokdeclarator): Remove dead code.
13281         * pt.c (process_template_parm): Tidy.
13282         (lookup_template_class): Construct nodes in
13283         copy_template_template_parm.
13284         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
13285         lookup_template_class.  Use TYPE_TI_TEMPLATE.
13286         * tree.c (copy_template_template_parm): Add NEWARGS
13287         parameter.
13288         (mapcar): Adjust call to copy_template_template_parm.
13289         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
13290         * method.c (build_template_template_parm_names): Change error
13291         code to avoid compilation warning.
13292
13293         * gxxint.texi: Document template template parameter
13294         name mangling.
13295
13296 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
13297
13298         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
13299         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
13300         (cp-demangle.o): New rule.
13301         (dyn-string.o): Likewise.
13302         * inc/cxxabi.h (__cxa_demangle): New declaration.
13303
13304 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
13305
13306         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
13307         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
13308         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
13309         a tree, not an int.
13310         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
13311         (make_thunk): Change prototype.
13312         (emit_thunk): Rename to use_thunk.
13313         (mangle_thunk): Change prototype.
13314         * class.c (get_derived_offset): Simplify.
13315         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
13316         BV_GENERATE_THUNK_WITH_VTABLE_P.
13317         (build_primary_vtable): Simplify.
13318         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
13319         (dfs_find_base): Remove.
13320         (update_vtable_entry_for_fn): Correct bug in finding the base
13321         where a virtual function was first declared.  Figure out whether
13322         or not to emit a vcall-thunk with the vtables in which it appears.
13323         Correct logic for deciding whether to use an ordinary thunk, or a
13324         vcall thunk.
13325         (finish_struct_1): Remove unnecssary code.
13326         (build_vtbl_initializer): Use ssize_int for the running counter of
13327         negative indices.
13328         (build_vtbl_initializer): Only use vcall thunks where necessary.
13329         Mark thunks as needing to be emitted with their vtables, or not.
13330         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
13331         indices.  Use size_binop.
13332         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
13333         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
13334         size_binop.
13335         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
13336         (build_vtable_entry): Mark thunks as needing to be emitted with
13337         their vtables, or not.
13338         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
13339         * decl2.c (mark_vtable_entries): Use use_thunk instead of
13340         emit_thunk.
13341         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
13342         information.
13343         * error.c (dump_expr): Use BV_FN.
13344         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
13345         not an int.
13346         * method.c (make_thunk): Likewise.
13347         (emit_thunk): Rename to use_thunk.  Allow callers to decide
13348         whether or not to actually emit the thunk.  Adjust for changes in
13349         representation of vcall offsets.
13350         * search.c (dfs_get_pure_virtuals): Use BV_FN.
13351         * semantics.c (emit_associated_thunks): New function.
13352         (expand_body): Use it.
13353         * ir.texi: Adjust decriptions of thunks.
13354
13355 2000-06-22  Jason Merrill  <jason@redhat.com>
13356
13357         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
13358         (tsubst_friend_function): Copy it here.
13359
13360         * decl.c (grok_op_properties): Fix typo.
13361
13362         * decl2.c (delete_sanity): Clarify warning, avoid failure on
13363         deleting void*.
13364
13365         * pt.c (check_explicit_specialization): Clarify error.
13366
13367         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
13368         an old OVERLOAD when we're declaring a non-function.
13369         (pushdecl, destroy_local_var): Check for error_mark_node.
13370         (warn_extern_redeclared_static): Also bail early if
13371         we're a CONST_DECL.
13372         (push_overloaded_decl): Ignore an old error_mark_node.
13373
13374 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
13375
13376         * call.c (build_x_va_arg): Check if in a template decl.
13377         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
13378
13379 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13380
13381         * class.c (push_lang_context): TYPE_NAME gets you to the Java
13382         types DECLs.
13383         * decl.c (check_goto): Computed gotos assumed OK.
13384
13385 2000-06-20  Jason Merrill  <jason@redhat.com>
13386
13387         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
13388         for which we don't need to look for instantiations.
13389
13390 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
13391
13392         * parse.y (program): Always call finish_translation_unit.
13393         * parse.c, parse.h: Rebuilt.
13394
13395 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
13396
13397         * method.c: Don't include hard-reg-set.h.
13398
13399 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
13400
13401         * rtti.c (get_base_offset): Cope when vbase field is in a base.
13402
13403 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
13404
13405         * call.c (build_conditional_expr): Use VOID_TYPE_P.
13406         * cvt.c (cp_convert_to_pointer): Likewise.
13407         (convert_to_void): Likewise.
13408         * error.c (dump_expr): Likewise.
13409         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
13410         * init.c (build_delete): Likewise.
13411         * method.c (emit_thunk): Likewise.
13412         * optmize.c (declare_return_variable): Likewise.
13413         * rtti.c (get_tinfo_decl_dynamic): Likewise.
13414         (get_typeid): Likewise.
13415         (build_dynamic_cast_1): Likewise.
13416         * typeck.c (composite_pointer_type): Likewise.
13417         (common_type): Likewise.
13418         (build_indirect_ref): Likewise.
13419         (build_binary_op): Likewise.
13420         (build_x_compound_expr): Likewise.
13421         (check_return_expr): Likewise.
13422         * typeck2.c (add_exception_specifier): Likewise.
13423
13424         * mangle.c (write_method_parms): Use direct comparison for end
13425         of parmlist.
13426
13427 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
13428
13429         * cp-tree.h (genrtl_try_block): Declare function.
13430         (genrtl_handler): Likewise.
13431         (genrtl_catch_block): Likewise.
13432         (genrtl_ctor_stmt): Likewise.
13433         (genrtl_subobject): Likewise.
13434         (genrtl_decl_cleanup): Likewise.
13435         (genrtl_do_poplevel): Likewise.
13436         (genrtl_do_pushlevel): Likewise.
13437         (genrtl_clear_out_block): Likewise.
13438         (genrtl_goto_stmt): Likewise.
13439         (genrtl_expr_stmt): Likewise.
13440         (genrtl_decl_stmt): Likewise.
13441         (genrtl_if_stmt): Likewise.
13442         (genrtl_while_stmt): Likewise.
13443         (genrtl_do_stmt): Likewise.
13444         (genrtl_return_stmt): Likewise.
13445         (genrtl_for_stmt): Likewise.
13446         (genrtl_break_stmt): Likewise.
13447         (genrtl_continue_stmt): Likewise.
13448         (genrtl_scope_stmt): Likewise.
13449         (genrtl_switch_stmt): Likewise.
13450         (genrtl_case_label): Likewise.
13451         (genrtl_begin_compound_stmt): Likewise.
13452         (genrtl_finish_compound_stmt): Likewise.
13453         (genrtl_compound_stmt): Likewise.
13454         (genrtl_asm_stmt): Likewise.
13455         (genrtl_named_return_value): Likewise.
13456         (genrtl_begin_stmt_expr): Likewise.
13457         (genrtl_finish_stmt_expr): Likewise.
13458         (finish_for_stmt): Removed first argument.
13459         (finish_switch_stmt): Likewise.
13460
13461         * semantics.c (genrtl_try_block): Define function.
13462         (genrtl_handler): Likewise.
13463         (genrtl_catch_block): Likewise.
13464         (genrtl_ctor_stmt): Likewise.
13465         (genrtl_subobject): Likewise.
13466         (genrtl_decl_cleanup): Likewise.
13467         (genrtl_do_poplevel): Likewise.
13468         (genrtl_do_pushlevel): Likewise.
13469         (genrtl_clear_out_block): Likewise.
13470         (genrtl_goto_stmt): Likewise.
13471         (genrtl_expr_stmt): Likewise.
13472         (genrtl_decl_stmt): Likewise.
13473         (genrtl_if_stmt): Likewise.
13474         (genrtl_while_stmt): Likewise.
13475         (genrtl_do_stmt): Likewise.
13476         (genrtl_return_stmt): Likewise.
13477         (genrtl_for_stmt): Likewise.
13478         (genrtl_break_stmt): Likewise.
13479         (genrtl_continue_stmt): Likewise.
13480         (genrtl_scope_stmt): Likewise.
13481         (genrtl_switch_stmt): Likewise.
13482         (genrtl_case_label): Likewise.
13483         (genrtl_begin_compound_stmt): Likewise.
13484         (genrtl_finish_compound_stmt): Likewise.
13485         (genrtl_compound_stmt): Likewise.
13486         (genrtl_asm_stmt): Likewise.
13487         (genrtl_named_return_value): Likewise.
13488         (genrtl_begin_stmt_expr): Likewise.
13489         (genrtl_finish_stmt_expr): Likewise.
13490         (finish_for_stmt): Removed first argument and generate rtl
13491         specific code.
13492         (finish_switch_stmt): Likewise.
13493         (do_poplevel): Removed generate rtl specific code.
13494         (do_pushlevel): Likewise.
13495         (add_tree): Likewise.
13496         (finish_goto_stmt): Likewise.
13497         (finish_expr_stmt): Likewise.
13498         (begin_if_stmt): Likewise.
13499         (finish_if_stmt_cond): Likewise.
13500         (finish_then_clause): Likewise.
13501         (begin_else_clause): Likewise.
13502         (finish_else_clause): Likewise.
13503         (finish_if_stmt): Likewise.
13504         (clear_out_block): Likewise.
13505         (begin_while_stmt): Likewise.
13506         (finish_while_stmt_cond): Likewise.
13507         (finish_while_stmt): Likewise.
13508         (begin_do_stmt): Likewise.
13509         (finish_do_body): Likewise.
13510         (finish_do_stmt): Likewise.
13511         (finish_return_stmt): Likewise.
13512         (begin_for_stmt): Likewise.
13513         (finish_for_init_stmt): Likewise.
13514         (finish_for_cond): Likewise.
13515         (finish_for_expr): Likewise.
13516         (finish_break_stmt): Likewise.
13517         (finish_continue_stmt): Likewise.
13518         (begin_switch_stmt): Likewise.
13519         (finish_switch_cond): Likewise.
13520         (finish_case_label): Likewise.
13521         (begin_try_block): Likewise.
13522         (begin_function_try_block): Likewise.
13523         (finish_try_block): Likewise.
13524         (finish_cleanup_try_block): Likewise.
13525         (finish_cleanup): Likewise.
13526         (finish_function_try_block): Likewise.
13527         (finish_handler_sequence): Likewise.
13528         (finish_function_handler_sequence): Likewise.
13529         (begin_handler): Likewise.
13530         (finish_handler_parms): Likewise.
13531         (begin_catch_block): Likewise.
13532         (finish_handler): Likewise.
13533         (begin_compound_stmt): Likewise.
13534         (finish_compound_stmt): Likewise.
13535         (finish_asm_stmt): Likewise.
13536         (finish_label_stmt): Likewise.
13537         (finish_label_decl): Likewise.
13538         (finish_subobject): Likewise.
13539         (finish_decl_cleanup): Likewise.
13540         (finish_named_return_value): Likewise.
13541         (begin_stmt_expr): Likewise.
13542         (finish_stmt_expr): Likewise.
13543
13544         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
13545         to call genrtl_expr_stmt when appropriate.
13546
13547         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
13548         begin_compound_expr to call genrtl_begin_stmt_expr and
13549         genrtl_begin_compound_expr when appropriate.
13550         (finish_init_stmts): Changed calls to finish_compound_expr and
13551         finish_stmt_expr to call genrtl_finish_compound_expr and
13552         genrtl_finish_stmt_expr when appropriate.
13553         (expand_default_init): Changed call to finish_expr_stmt to call
13554         genrtl_expr_stmt when appropriate.
13555         (build_vec_init): Likewise.
13556
13557         * parse.y (simple_stmt): Removed first argument from call to
13558         finish_for_stmt. Removed first argument from call to
13559         finish_switch_stmt.
13560
13561         * parse.c: Regenerated.
13562
13563         * pt.c (tsubst_expr): Removed first argument from call to
13564         finish_for_stmt. Removed first argument from call to
13565         finish_switch_stmt.
13566
13567 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
13568
13569         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
13570         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
13571
13572         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
13573         (cplus_tree_code_length[]): Likewise.
13574         (cplus_tree_code_name[]): Likewise.
13575         (init_parse): Added call to add_c_tree_codes. Changed
13576         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
13577
13578 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
13579
13580         * cp-tree.h (finish_mem_initializers): Declare.
13581         (count_trees): Likewise.
13582         * parse.y (base_init): Use finish_mem_initializers.
13583         * semantics.c (finish_mem_initializers): New function.
13584
13585         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
13586         the number of trees.
13587         (n_trees): Remove.
13588         (count_trees): Don't use it.
13589
13590 2000-06-15  Jason Merrill  <jason@redhat.com>
13591
13592         * tree.c (count_trees): New debugging function.
13593
13594         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
13595         * init.c (build_member_call): Pull out the name of a DECL.
13596
13597         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
13598         * semantics.c (expand_body): Push to TV_INTEGRATION here.
13599         * optimize.c (optimize_function): Not here.
13600         * pt.c (instantiate_decl): Push to TV_PARSE.
13601
13602 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
13603
13604         * cp-tree.h (struct language_function): Remove x_base_init_list
13605         and x_member_init_list.
13606         (current_base_init_list): Remove.
13607         (current_member_init_list): Likewise.
13608         (setup_vtbl_ptr): Change prototype.
13609         (emit_base_init): Likewise.
13610         (expand_member_init): Likewise.
13611         (reinit_parse_for_function): Remove.
13612         * decl.c (save_function_data): Don't clear x_base_init_list and
13613         x_member_init_list.
13614         (mark_language_function): Don't mark them.
13615         * init.c (perform_member_init): Tweak comment.
13616         (sort_member_init): Take the list of initializers as an argument.
13617         (sort_base_init): Likewise.
13618         (emit_base_init): Likewise.
13619         (expand_member_init): Return the initializer.  Don't use global
13620         variables.
13621         * lex.c (reinit_parse_for_function): Remove.
13622         * method.c (build_template_parm_names): Correct substitution.
13623         (do_build_copy_constructor): Don't use current_member_init_list
13624         and current_base_init_list.
13625         (synthesize_method): Likewise.
13626         * parse.y (base_init): Split mem-initializers into
13627         base-initializers and field-initializers.
13628         (member_init_list): Build up the list here.
13629         (member_init): Return the initializer.
13630         (fn.depfn): Don't use reinit_parse_for_function.
13631         * parse.c: Regenerated.
13632         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
13633         ERROR_MARK.
13634         (tsubst_expr): Don't use current_member_init_list
13635         and current_base_init_list.
13636         (tsubst_expr_values): Rename to ...
13637         (tsubst_initializer_list): ... this.  Use convert_from_reference.
13638         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
13639         and current_base_init_list.
13640         (begin_function_definition): Don't call reinit_parse_for_function.
13641
13642         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
13643
13644         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
13645         correctly.
13646
13647         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
13648
13649 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
13650
13651         * cp-tree.h (IF_COND): Move to c-common.h.
13652         (THEN_CLAUSE): Likewise.
13653         (ELSE_CLAUSE): Likewise.
13654         (WHILE_COND): Likewise.
13655         (WHILE_BODY): Likewise.
13656         (DO_COND): Likewise.
13657         (DO_BODY): Likewise.
13658         (RETURN_EXPR): Likewise.
13659         (EXPR_STMT_EXPR): Likewise.
13660         (FOR_INIT_STMT): Likewise.
13661         (FOR_COND): Likewise.
13662         (FOR_EXPR): Likewise.
13663         (FOR_BODY): Likewise.
13664         (SWITCH_COND): Likewise.
13665         (SWITCH_BODY): Likewise.
13666         (CASE_LOW): Likewise.
13667         (CASE_HIGH): Likewise.
13668         (GOTO_DESTINATION): Likewise.
13669         (COMPOUND_BODY): Likewise.
13670         (ASM_CV_QUAL): Likewise.
13671         (ASM_STRING): Likewise.
13672         (ASM_OUTPUTS): Likewise.
13673         (ASM_INPUTS): Likewise.
13674         (ASM_CLOBBERS): Likewise.
13675         (DECL_STMT_DECL): Likewise.
13676         (STMT_EXPR_STMT): Likewise.
13677         (LABEL_STMT_LABEL): Likewise.
13678         (SCOPE_BEGIN_P): Likewise.
13679         (SCOPE_END_P): Likewise.
13680         (SCOPE_STMT_BLOCK): Likewise.
13681         (SCOPE_NULLIFIED_P): Likewise.
13682         (SCOPE_NO_CLEANUPS_P): Likewise.
13683         (SCOPE_PARTIAL_P): Likewise.
13684         (ASM_VOLATILE_P): Likewise.
13685         (STMT_LINENO): Likewise.
13686         (STMT_LINENO_FOR_FN_P): Likewise.
13687
13688         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
13689         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
13690         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
13691         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
13692         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
13693
13694         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
13695
13696         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
13697         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
13698
13699         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
13700         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
13701         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
13702
13703 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
13704
13705         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
13706         * class.c (dfs_find_final_overrider): Set it appropriately.
13707         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
13708         avoid unneeded secondary vptrs.
13709
13710 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
13711
13712         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
13713         (check_bitfield_decl, check_field_decl): Likewise.
13714         (build_vtbl_or_vbase_field, build_base_field): Likewise.
13715         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
13716         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
13717         (xfer_tag, finish_enum): Likewise.
13718         * decl2.c (finish_builtin_type): Likewise.
13719         * init.c (init_init_processing): Likewise.
13720         * pt.c (instantiate_class_template): Likewise.
13721         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
13722         * cp-tree.h (struct lang_type): Add user_align member.
13723         (CLASSTYPE_USER_ALIGN): Define.
13724
13725 2000-06-13  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
13726
13727         * Make-lang.in (c++.install-common): Install g++-cross in
13728         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
13729         $(target_alias)-g++ and $(target_alias)-c++.
13730
13731 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
13732
13733         * class.c (vcall_offset_data_s): Add last_init and fns.
13734         (overrides): Rename to same_signature_p.
13735         (dfs_find_final_overrider): Adjust accordingly.
13736         (mark_overriders): Likewise.
13737         (warn_hidden): Likewise.
13738         (build_vtbl_initializer): Reorganize machinery for building things
13739         at negative offsets.
13740         (build_vcall_and_vbase_vtbl_entries): Likewise.
13741         (build_vbase_offset_vtbl_entries): Likewise.
13742         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
13743         offset entries.  Do not create two entries for functions with the
13744         same signature.
13745         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
13746         (build_rtti_vtbl_entries): Reorganize machinery for building things
13747         at negative offsets.
13748
13749         * optimize.c (expand_call_inline): Don't recurse into the code
13750         used to initialize the parameters more than once.
13751
13752 2000-06-11  Mark Mitchell <mark@codesourcery.com>
13753
13754         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
13755         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
13756         (find_substitution): Only use the `Sa' substitution for
13757         std::allocator, not instantiations of it.
13758         (write_template_prefix): Move comment.  Only use a TREE_LIST to
13759         represent substitutions for a member template.
13760         (write_array_type): Mangle array dimensions correctly.
13761         * optimize.c (maybe_clone_body): Copy more information from the
13762         cloned function.
13763         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
13764         on the regenerated declaration.
13765
13766 2000-06-11  Chip Salzenberg  <chip@valinux.com>
13767             Mark Mitchell <mark@codesourcery.com>
13768
13769         * class.c (build_vtable): Clarify comment.
13770         (build_ctor_vtbl_group): Pass the most derived type to
13771         build_vtable.
13772
13773 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13774
13775         * decl2.c (compare_options): Don't needlessly cast away const-ness.
13776
13777 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
13778
13779         * decl.c (add_binding): Handle duplicate declarations of external
13780         variables.
13781
13782 2000-06-09  Chip Salzenberg  <chip@valinux.com>
13783             Mark Mitchell <mark@codesourcery.com>
13784
13785         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
13786         argument.
13787         (write_signed_number): New macro.
13788         (write_unsigned_number): Likewise.
13789         (write_source_name): Use them.
13790         (write_number): Handle signed and unsigned values.
13791         (write_integer_cst): Use tree_int_cst_sgn, and use
13792         write_unsigned_number or write_signed_number as appropriate.
13793         (write_discriminator): Use write_unsigned_number or
13794         write_signed_number as appropriate.
13795         (write_template_arg_literal): Likewise.
13796         (write_array_type): Use tree_low_cst.
13797         (write_template_parm):  Use write_unsigned_number or
13798         write_signed_number as appropriate.
13799         (write_substitution): Adjust call to write_number.
13800         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
13801         (write_expression): Handle non-type template arguments of
13802         reference type correctly.
13803         (mangle_thunk): Use write_signed_number.
13804
13805 2000-06-09  Chip Salzenberg  <chip@valinux.com>
13806
13807         * mangle.c (find_substition): Don't mangle objects with typename
13808         substitutions (e.g. "cin" as "Si").
13809
13810 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
13811
13812         * call.c (add_candidate): Use ggc_alloc_cleared.
13813         * decl.c (lookup_label): Likewise.
13814         * lex.c (retrofit_lang_decl): Likewise.
13815
13816 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
13817
13818         * semantics.c (expand_body): Push to TV_EXPAND.
13819         * optimize.c (optimize_function): Push to TV_INTEGRATION.
13820         * decl.c (start_function): Always call announce_function.
13821
13822         * tinfo2.cc: Just declare abort.
13823
13824 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
13825
13826         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
13827         whenever @ is a symbolic name.
13828
13829 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
13830
13831         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
13832
13833 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
13834
13835         * decl.c (pushdecl): Look up functions by DECL_NAME, not
13836         DECL_ASSEMBLER_NAME.
13837
13838 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
13839
13840         * decl2.c (c_language): Define.
13841
13842 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
13843
13844         * lex.c (lang_init_options): Tweak.
13845
13846         * decl2.c: Remove #inclusion of diagnostic.h
13847         (lang_decode_option): Move diagnostic formatting options to
13848         toplevel.
13849
13850         * lang-options.h: Remove documentation for diagnostic options.
13851
13852         * Makefile.in (lex.o): Depends upon diagnostic.h
13853
13854 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
13855
13856         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
13857         the same DECL_RESULT, it's not a redefinition.
13858         * pt.c (tsubst_decl): Remove code to handle illegal
13859         specializations.
13860
13861 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
13862
13863         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
13864
13865 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
13866
13867         * search.c (maybe_suppress_debug_info): Don't check
13868         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
13869
13870         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
13871         here if extern_p.
13872
13873         Remember instantiation context in deferred instantiations.
13874         * cp-tree.h (struct tinst_level): Remove.
13875         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
13876         * pt.c (current_tinst_level): Now a tree.
13877         (print_template_context, push_tinst_level, pop_tinst_level,
13878         tinst_for_decl): Adjust.
13879         (reopen_tinst_level): New fn.
13880         (init_pt): Register current_tinst_level as a root.
13881         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
13882         of the pending templates list.
13883         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
13884         * lex.c (extract_interface_info): Adjust.
13885         * decl2.c (warn_if_unknown_interface): Adjust.
13886
13887 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
13888
13889         * class.c (indirect_primary_base_p): New function.
13890         (determine_primary_base): Use it.
13891
13892 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
13893
13894         Update new-abi dynamic cast algorithm.
13895         * tinfo.cc (__class_type_info::__dyncast_result): Add
13896         whole_details. Adjust constructor.
13897         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
13898         Avoid unnecessary searching.
13899         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
13900
13901 2000-06-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13902
13903         * decl.c (init_decl_processing): Don't call record_component_aliases.
13904         * tree.c (build_cplus_array_type_1): Likewise.
13905
13906 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
13907
13908         * ir.texi: Correct typo.
13909         * mangle.c (write_expression): Handle non-type template arguments
13910         with reference type.
13911         * method.c (build_overload_value): Likewise.
13912         * pt.c (convert_nontype_argument): Explicitly represent conversion
13913         to a reference with an ADDR_EXPR.
13914         (unify): Always unify arguments in left-to-right order.
13915
13916 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
13917             Mark Mitchell  <mark@codesourcery.com>
13918
13919         * Make-lang.in (CXX_SRCS): Add mangle.c.
13920         * Makefile.in (CXX_OBJS): Add mangle.o.
13921         (mangle.o): New rule.
13922
13923         * class.c (local_classes): New variable.
13924         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
13925         (get_vtt_name): Use mangle_vtt_name for new ABI.
13926         (init_class_processing): Initialize local_classes.
13927         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
13928         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
13929         (std_identifier): New macro.
13930         (DECL_VOLATILE_MEMFUNC_P): New macro.
13931         (DECL_NAMESPACE_STD_P): Likewise.
13932         (local_classes): Declare.
13933         (get_mostly_instantiated_function_type): Declare.
13934         (init_mangle): Declare.
13935         (mangle_decl): Likewise.
13936         (mangle_type_string): Likewise.
13937         (mangle_type): Likewise.
13938         (mangle_typeinfo_for_type): Likewise.
13939         (mangle_typeinfo_string_for_type): Likewise.
13940         (mangle_vtbl_for_type): Likewise.
13941         (mangle_vtt_for_type): Likewise.
13942         (mangle_ctor_vtbl_for_type): Likewise.
13943         (mangle_thunk): Likewise.
13944         (mangle_conv_op_name_for_type): Likewise.
13945         (mangle_guard_variable): Likewise.
13946         * decl.c (pushtag): Keep track of local classes.
13947         (initialize_predefined_identifiers): Initialize std_identifier.
13948         (init_decl_processing): Use std_identifier.
13949         (start_decl): Don't treat instantiations as specializations.
13950         (grokdeclarator): Likewise.
13951         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
13952         name for fully-instantiated templates.
13953         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
13954         destructors with the new ABI.
13955         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
13956         (grokfield): Use mangle_type for new ABI.
13957         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
13958         (get_sentry): Use mangle_guard_variable for new ABI.
13959         (start_static_initialization_or_destruction): Likewise.
13960         * expr.c (extract_aggr_init): Remove.
13961         (extract_scalar_init): Likewise.
13962         (extract_init): Remove #if 0'd code.
13963         * mangle.c: New function.
13964         * method.c (build_mangled_name): Assert not flag_new_abi.
13965         (build_static_name): Likewise.
13966         (build_decl_overload_real): Likewise.
13967         (build_typename_overload): Likewise.
13968         (build_overload_with_type): Likewise.
13969         (build_overload_name): Likewise.
13970         (get_ctor_vtbl_name): Likewise.
13971         (start_squangling): Likewise.
13972         (get_id_2): Likewise.
13973         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
13974         (init_method): Call init_mangle for new ABI.
13975         (make_thunk): Call mangle_thunk for new ABI.
13976         * operators.def: Correct new ABI manglings for the `%' operator.
13977         Add `::' operator.
13978         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
13979         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
13980         (lookup_template_class): Call mangle_decl for new ABI.
13981         (get_mostly_instantiated_function_type): New function.
13982         (set_mangled_name_for_template_decl): Use it.
13983         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
13984         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
13985         conversion op names.
13986         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
13987         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
13988         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
13989         mangle_typeinfo_string_for_type.
13990
13991 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
13992
13993         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
13994         (INNERMOST_TEMPLATE_ARGS): New macro.
13995         (innermost_args): Remove.
13996         (get_innermost_template_args): New function.
13997         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
13998         * error.c (dump_function_decl): Be caution when using
13999         most_general_template.
14000         * method.c (build_template_parm_names):  Use
14001         INNERMOST_TEMPLATE_ARGS.
14002         * pt.c (add_to_template_args): Tidy comment
14003         (get_innermost_template_args): New function.
14004         (check_explicit_specialization): Clear DECL_INITIAL for a new
14005         specialization.
14006         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
14007         Tidy.
14008         (push_template_decl): Always register specializations of the most
14009         general template.
14010         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
14011         (coerce_template_parms): Likewise.
14012         (lookup_template_class): Likewise.
14013         (innermost_args): Remove.
14014         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
14015         (tsubst_decl): Handle tricky specializations.  Use
14016         get_innermost_template_args.
14017         (instantiate_template): Simplify handling of partial
14018         instantiations.
14019         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
14020         (most_general_template): Reimplement, in a more straightforward
14021         manner.
14022         (regenerate_decl_from_template): Tweak formatting.  Use
14023         TMPL_ARGS_DEPTH for clarity.
14024         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
14025
14026         * dump.c (dequeue_and_dump): Dump information about thunks.
14027
14028 2000-06-01  Richard Henderson  <rth@cygnus.com>
14029
14030         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
14031
14032 2000-06-01  Richard Henderson  <rth@cygnus.com>
14033
14034         * decl2.c (unsupported_options): Fix typo, make const.
14035         (lang_decode_option): Fix bsearch argument order.
14036
14037 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
14038
14039         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
14040         on FIELD_DECLs.
14041
14042 2000-05-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14043
14044         * cp-tree.h (c_get_alias_set): Deleted.
14045         * Makefile.in (decl.o): Include ../expr.h.
14046         * decl.c (expr.h): Include.
14047         (init_decl_processing): Call record_component_aliases for arrays.
14048         (grokdeclarator): Likewise.
14049         Set TREE_ADDRESSABLE for fields that aren't bitfields.
14050         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
14051
14052 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
14053
14054         Remove guiding declaration support.
14055         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
14056         (flag_guiding_decls): Remove.
14057         * call.c (build_user_type_conversion_1): Remove support for
14058         guiding decls.
14059         (build_new_function_call): Likewise.
14060         (build_new_op): Likewise.
14061         (build_new_method_call): Likewise.
14062         * decl.c (start_function): Likewise.
14063         * friend.c (is_friend): Likewise.
14064         (do_friend): Likewise.
14065         * decl2.c ((flag_dump_translation_unit): Make it const.
14066         (flag_guiding_decls): Remove.
14067         (unsupported_options): New variable
14068         (compare_options): New function.
14069         (lang_decode_option): Use them.
14070
14071         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
14072
14073         * method.c (mangle_expression): Adjust test for legal expression
14074         operators.
14075
14076         * pt.c (instantiate_decl): Save and restore the local
14077         specializations list.
14078
14079 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
14080
14081         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
14082
14083 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
14084
14085         * call.c (add_template_candidate_real): Handle member template
14086         constructors for classes with virtual bases.
14087         (build_user_type_conversion_1): Use in_charge_arg_for_name.
14088         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
14089
14090         * ir.texi: Update thunk documentation.
14091
14092         * call.c (joust): Fix handling of overloaded builtin operators.
14093
14094 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
14095
14096         * cp-tree.h (DECL_ANTICIPATED): New macro.
14097         Document new use of DECL_LANG_FLAG_7.
14098         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
14099         in the user namespace.
14100         * lex.c (do_identifier): If the identifier's declaration has
14101         DECL_ANTICIPATED on, it has not yet been declared.  But do not
14102         replace it with an ordinary implicit declaration.
14103
14104         * tinfo2.cc: Include stdlib.h.
14105
14106 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
14107
14108         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
14109         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
14110         CLASSTYPE_ALIGN.
14111
14112 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
14113
14114         * decl2.c (lang_decode_option): Use skip_leading_substring instead
14115         of plain strncmp.
14116
14117 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
14118
14119         * operators.def (<?): Duplicated, should have been...
14120         (>?): this.  Fixed.
14121
14122 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
14123             Mark Mitchell  <mark@codesourcery.com>
14124
14125         * cp-tree.h (ansi_opname): Make it a macro.
14126         (ansi_assopname): Likewise.
14127         (struct lang_decl_flags): Add assignment_operator_p.
14128         (struct lang_decl): Add operator_code.
14129         (DECL_VTT_PARM): Adjust.
14130         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
14131         overloaded operator.
14132         (SET_OVERLOADED_OPERATOR_CODE): New macro.
14133         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
14134         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
14135         (opname_tab): Remove.
14136         (assignop_tab): Likewise.
14137         (operator_name_info_t): New type.
14138         (operator_name_info): New variable.
14139         (assignment_operator_name_info): Likewise.
14140         (build_cp_library_fn): Remove declaration.
14141         (push_cp_library_fn): Likewise.
14142         (operator_name_string): Likewise.
14143         (build_decl_overload): Likewise.
14144         * call.c (print_z_candidates): Simplify.
14145         (build_object_call): Adjust usage of ansi_opname.  Use
14146         DECL_OVERLOADED_OPERATOR_P.
14147         (op_error): Adjust operator name lookup.
14148         (build_conditional_expr): Adjust usage of ansi_opname.
14149         (build_new_op): Likewise.
14150         (build_op_delete_call): Likewise.
14151         (build_over_call): Likewise.
14152         (joust): Use DECL_OVERLOADED_OPERATOR_P.
14153         * decl.c (duplicate_decls): Copy operator_code.
14154         (init_decl_processing): Adjust parameters to push_cp_library_fn.
14155         (builtin_function): Adjust parameters to build_library_fn_1.
14156         (build_library_fn_1): Accept an overloaded operator code.
14157         (build_library_fn): Pass ERROR_MARK.
14158         (build_cp_library_fn): Accept an overloaded operator code.
14159         (push_cp_library_fn): Likewise.
14160         (grokfndecl): Tweak.
14161         (grokdeclarator): Simplify code to compute names of overloaded
14162         operators.  Adjust use of ansi_opname.
14163         (ambi_op_p): Work on tree_codes, not identifiers.
14164         (unary_op_p): Likewise.
14165         (grok_op_properties): Likewise.
14166         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
14167         (lang_mark_tree): Don't try to mark the operator_code.
14168         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
14169         * error.c (dump_decl): Remove special handling for operator
14170         names.
14171         (dump_function_name): Likewise.
14172         (dump_expr): Adjust name lookup of operators.
14173         (op_to_string): Simplify.
14174         (assop_to_string): Likewise.
14175         * init.c (build_new_1): Adjust use of ansi_opname.
14176         * lex.c (opname_tab): Remove.
14177         (assignop_tab): Likewise.
14178         (ansi_opname): Likewise.
14179         (ansi_assopname): Likewise.
14180         (operator_name_string): Likewise.
14181         (reinit_lang_specific): Likewise.
14182         (operator_name_info): New variable.
14183         (assignment_operator_name_info): Likewise.
14184         (init_operators): New function.
14185         (init_parse): Use it.
14186         (do_identifier): Adjust use of ansi_opname.
14187         * method.c (mangle_expression): Don't use ansi_opname for
14188         mangling.
14189         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
14190         (build_decl_overload): Remove.
14191         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
14192         (do_build_assign_ref): Adjust use of ansi_opname.
14193         (synthesize_method): Likewise.
14194         (implicitly_declare_fn): Likewise.
14195         * operators.def: New file.
14196         * parse.y (operator): Adjust use of ansi_opname.
14197         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
14198         (set_mangled_name_for_template_decl): Don't play games with
14199         current_namespace.
14200         (special_function_p): Adjust use of ansi_opname.
14201         * typeck.c (check_return_expr): Likewise.
14202         * Make-lang.in (cc1plus): Depend on operators.def.
14203         * Makefile.in (lex.o): Likewise.
14204         (decl.o): Likewise.
14205
14206 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
14207
14208         * Make-lang.in (cplib2.ready): Eradicate.
14209
14210 2000-05-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14211
14212         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
14213         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
14214         (built_min, cp_tree_equal): Likewise.
14215
14216 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
14217
14218         * class.c (layout_nonempty_base_or_field): Replace
14219         `record_layout_info' with `record_layout_info_s'.
14220
14221 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
14222
14223         Fix goto checking.
14224         * cp-tree.h (struct language_function): x_named_labels is now
14225         a struct named_label_list*.
14226         * decl.c (struct named_label_use_list): Renamed from...
14227         (struct named_label_list): ...this.  New struct.
14228         (push_binding_level): Don't set eh_region.
14229         (note_level_for_eh): New fn.
14230         (pop_label): Take label and old value directly.
14231         (pop_labels): Adjust for new named_labels format.
14232         (lookup_label): Likewise.
14233         (poplevel): Note characteristics of a binding level containing a
14234         named label.  Mess with named label lists earlier.
14235         (mark_named_label_lists): New fn.
14236         (mark_lang_function): Call it.
14237         (use_label): New fn, split out from...
14238         (make_label_decl): ...here.  Don't call it.
14239         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
14240         check_previous_gotos): New fns, split out from...
14241         (define_label): ...here.
14242         (check_switch_goto): New fn.
14243         (define_case_label): Call it.
14244         (check_goto): New fn.
14245         * semantics.c (finish_goto_stmt): Call it and use_label.
14246         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
14247         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
14248
14249 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
14250
14251         * class.c (build_vtable_entry_ref): Correct usage of
14252         get_vtbl_decl_for_binfo.
14253
14254         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
14255         * method.c (implicitly_declare_fn): Not here.
14256
14257 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
14258
14259         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
14260         (CPTI_PTMD_DESC_TYPE): ... here.
14261         (ptmd_desc_type_node): Rename to ...
14262         (ptm_desc_type_node): ... here.
14263         * decl.c: Likewise.
14264         * rtti.c (ptmd_initializer): Rename to ...
14265         (ptm_initializer): ... here.
14266         (sythesize_tinfo_var): Adjust. Deal with pointer to member
14267         function.
14268         (create_tinfo_types): Adjust.
14269
14270 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
14271
14272         Finish implementation of VTTs.
14273         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
14274         CPTI_VTT_PARM_IDENTIFIER.
14275         (vtt_parm_identifier): New macro.
14276         (vtt_parm_type): Likewise.
14277         (BINFO_SUBVTT_INDEX): Likewise.
14278         (BINFO_VPTR_INDEX): Likewise.
14279         (struct lang_decl): Add vtt_parm.
14280         (DECL_VTT_PARM): New macro.
14281         (DECL_USE_VTT_PARM): Likewise.
14282         (DECL_NEEDS_VTT_PARM_P): Likewise.
14283         (get_vtt_name): Declare.
14284         (build_artificial_parm): Likewise.
14285         (fixup_all_virtual_upcast_offsets): Likewise.
14286         (expand_indirect_vtbls_init): Remove.
14287         * call.c (build_new_method_call): Pass the vtt to subobject
14288         constructors and destructors.
14289         * class.c (get_vtt_name): Give it external linkage.
14290         (build_clone): Handle the magic VTT parameters for clones.
14291         (clone_function_decl): Fix typo in comment.
14292         (build_vtt): Keep track of the indices in the VTTs where various
14293         entities are stored.
14294         (build_vtt_inits): Likewise.
14295         (dfs_build_vtt_inits): Likewise.
14296         (build_ctor_vtbl_group): Tweak type of construction vtables.
14297         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
14298         primary bases, when building construction vtables.
14299         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
14300         (initialize_predefined_identifiers): Add vtt_parm_identifier.
14301         (init_decl_processing): Initialize vtt_parm_type.
14302         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
14303         (lang_mark_tree): Make vtt_parm.
14304         * decl2.c (build_artificial_parm): New function.
14305         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
14306         (grokclassfn): Use build_artificial_parm.
14307         * init.c (initialize_vtbl_ptrs): Call
14308         fixup_all_virtual_upcast_offsets directly.
14309         (perform_member_init): Use the complete subobject destructor for
14310         member cleanups.
14311         (build_vtbl_address): New function.
14312         (expand_virtual_init): Handle VTTs.
14313         * optimize (maybe_clone_body): Likewise.
14314         * search.c (fixup_all_virtual_upcast_offsets): Give it external
14315         linkage.
14316         (expand_indirect_vtbls_init): Remove.
14317         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
14318         * tree.c (make_binfo): Make them bigger.
14319
14320 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
14321
14322         * inc/cxxabi.h (__pbase_type_info): Define, based on
14323         __pointer_type_info.
14324         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
14325         (__pointer_to_member_type_info): Likewise.
14326         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
14327         (__pointer_to_member_type_info::__is_pointer_p): Remove.
14328         (__pointer_type_info::__do_catch): Rename to ...
14329         (__pbase_type_info::__do_catch): ... here. Adjust.
14330         (__pbase_type_info::__pointer_catch): Implement.
14331         (__pointer_type_info::__pointer_catch): Adjust.
14332         (__pointer_to_member_type_info::__pointer_catch): Adjust.
14333
14334 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
14335
14336         * tinfo.h (__user_type_info::contained_virtual_p): New
14337         predicate.
14338         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
14339         shaped hierarchy.
14340         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
14341         diamond shaped hierarchy. Add early out for mixed diamond and
14342         duplicate shaped hierarchy.
14343
14344 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
14345
14346         * cp-tree.h (build_delete): Change prototype.
14347         (build_vec_delete): Likewise.
14348         * call.c (build_scoped_method_call): Use special_function_kind
14349         values to indicate the kind of destruction to be done.
14350         (build_method_call): Likewise.
14351         * decl.c (finish_destructor_body): Likewise.
14352         (maybe_build_cleanup_1): Likewise.  Rename to ...
14353         (maybe_build_cleanup): ... this.
14354         * decl2.c (delete_sanity): Use special_function_kind
14355         values to indicate the kind of destruction to be done.
14356         (build_cleanup): Likewise.
14357         * init.c (perform_member_init): Likewise.
14358         (build_vec_delete_1): Likewise.
14359         (build_dtor_call): Simplify.
14360         (build_delete): Use special_function_kind
14361         values to indicate the kind of destruction to be done.
14362         (build_vbase_delete): Likewise.
14363         (build_vec_delete): Likewise.
14364
14365         * init.c (sort_member_init): Fix typo in error message generation
14366         code.
14367
14368 2000-05-15  Donald Lindsay  <dlindsay@cygnus.com>
14369
14370         * semantics.c (begin_class_definition): make the packed
14371         attribute be sensitive to the "-fpack-struct" command line flag
14372
14373 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
14374
14375         Update new-abi upcast algorithm.
14376         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
14377         prototype and meaning of return value.
14378         (__si_class_type_info::__do_upcast): Likewise.
14379         (__vmi_class_type_info::__do_upcast): Likewise.
14380         * tinfo.cc (__class_type_info::__upcast_result): Replace
14381         whole2dst with part2dst. Adjust ctor.
14382         (__class_type_info::__do_upcast): Adjust call of worker function.
14383         (__class_type_info::__do_upcast): Adjust.
14384         (__si_class_type_info::__do_upcast): Adjust. Use parent's
14385         __do_upcast.
14386         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
14387         virtual base in diamond hierarchy bug.
14388
14389 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
14390
14391         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
14392         and bitfield to tinfo_fn_p.
14393         (DECL_TINFO_FN_P): Adjust.
14394         (SET_DECL_TINFO_FN_P): Likewise.
14395         (DECL_MUTABLE_P): Likewise.
14396         (DECL_C_BIT_FIELD): Likewise.
14397         (SET_DECL_C_BIT_FIELD): Likewise.
14398         (CLEAR_DECL_C_BIT_FIELD): Likewise.
14399         (DECL_UNINLINABLE): Likewise.
14400         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
14401         (handle_using_decl): Remove assertion.
14402         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
14403         to build FIELD_DECLs.
14404         (build_base_field): Likewise.
14405         (layout_class_type): Likewise.
14406         * decl.c (init_decl_processing): Likewise.
14407         (build_ptrmemfunc_type): Likewise.
14408         (grokdeclarator): Likewise.
14409         * decl2.c (grok_x_components): Likewise.
14410         * except.c (call_eh_info): Likewise.
14411         * init.c (init_init_processing): Likewise.
14412         * rtti.c (expand_class_desc): Likewise.
14413         (create_pseudo_type_info): Likewise.
14414         (get_vmi_pseudo_type_info): Likewise.
14415         (create_tinfo_types): Likewise.
14416         * ptree.c (print_lang_decl): Adjust.
14417         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
14418         before checking DECL_MUTABLE_P.
14419
14420         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
14421         parameters for template functions.
14422         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
14423         destructors as well as constructors.
14424
14425 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
14426
14427         * class.c (build_ctor_vtbl_group): Set inits.
14428         * optimize.c (maybe_clone_body): Set DECL_INLINE and
14429         DECL_THIS_INLINE appropriately for clones.
14430
14431         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
14432         (DECL_CONV_FN_P): Simplify.
14433         (DECL_OPERATOR): Remove.
14434         (language_to_string): Declare.
14435         * decl.c (duplicate_decls): Fix typo in comment.
14436         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
14437         (grok_op_properties): Use DECL_CONV_FN_P instead of
14438         IDENTIFIER_TYPENAME_P.
14439         * dump.c (dequeue_and_dump): Dump the language linkage of
14440         declarations.
14441         * error.c (language_to_string): Give it external linkage.
14442         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
14443         (implicitly_declare_fn): Set DECL_LANGUAGE.
14444         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
14445         IDENTIFIER_TYPENAME_P.
14446         (tsubst_decl): Likewise.
14447         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
14448         * semantics.c (finish_member_declaration): Don't mark members of
14449         classes declared in an extern "C" region as extern "C".
14450
14451 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14452
14453         * decl2.c (qualified_lookup_using_namespace): Look through
14454         namespace aliases.
14455
14456         * decl.c (push_using_decl): Return the old decl on namespace level.
14457
14458 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
14459
14460         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
14461         (VTT_NAME_PREFIX): New macro.
14462         (CTOR_VTBL_NAME_PREFIX): Likewise.
14463         (get_ctor_vtbl_name): New function.
14464         * class.c (get_vtable_name): Simplify.
14465         (get_vtt_name): New function.
14466         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
14467         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
14468         when a virtual base becomes primary.
14469         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
14470         VTTs.
14471         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
14472         additional parameters.
14473         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
14474         (initialize_array): New function.
14475         (build_vtt): Likewise.
14476         (build_vtt_inits): Likewise.
14477         (dfs_build_vtt_inits): Likewise.
14478         (dfs_fixup_binfo_vtbls): Likewise.
14479         (build_ctor_vtbl_group): Likewise.
14480         (initialize_vtable): Use initialize_array.
14481         (accumulate_vtbl_inits): Reimplement to handle construction
14482         vtables.
14483         (dfs_accumulate_vtbl_inits): Likewise.
14484         (bulid_vtbl_initializer): Adjust parameter name.
14485         * method.c (build_typename_overload): Remove #if 0'd code.
14486         (get_ctor_vtbl_name): New function.
14487         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
14488         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
14489
14490         * cp-tree.h (struct lang_type): Remove search_slot.
14491         (CLASSTYPE_SEARCH_SLOT): Remove.
14492         (emit_base_init): Change prototype.
14493         (initialize_vtbl_ptrs): Likewise.
14494         (expand_indirect_vtbls_init): Likewise.
14495         (clear_search_slots): Remove.
14496         * decl.c (lang_mark_tree): Don't mark search_slot.
14497         * init.c (initialize_vtbl_ptrs): Simplify.
14498         (emit_base_init): Likewise.
14499         * search.c (struct vbase_info): Document decl_ptr.
14500         (convert_pointer_to_single_level): Remove.
14501         (dfs_find_vbases): Remove.
14502         (dfs_init_base_pointers): Simplify.
14503         (dfs_clear_vbase_slots): Remove.
14504         (dfs_vtable_path_unmark): New function.
14505         (init_vbase_pointers): Simplify.
14506         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
14507         (expand_indirect_vtbls_init): Simplify.  Don't call
14508         mark_all_temps_used.
14509         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
14510         initialize_vtbl_ptrs.
14511
14512 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
14513
14514         * except.c: Add static prototypes.
14515
14516 2000-05-20  H.J. Lu  <hjl@gnu.org>
14517
14518         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
14519
14520 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
14521
14522         Don't create a separate copy of virtual bases for the
14523         CLASSTYPE_VBASECLASSES list.
14524         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
14525         (BINFO_FOR_VBASE): Remove.
14526         (CANONICAL_BINFO): Adjust.
14527         (binfo_for_vbase): New function.
14528         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
14529         instead of BINFO_FOR_VBASE.
14530         (build_vbase_pointer): Likewise.
14531         (build_secondary_vtable): Likewise.
14532         (dfs_mark_primary_bases): Likewise.
14533         (mark_primary_bases): Likewise.
14534         (layout_nonempty_base_or_field): Likewise.
14535         (dfs_set_offset_for_shared_vbases): Likewise.
14536         (dfs_set_offset_for_unshared_vbases): Likewise.
14537         (layout_virtual_bases): Likewise.  Adjust for changes to the
14538         CLASSTYPE_VBASECLASSES list.
14539         (dump_class_hierarchy_r): Use binfo_for_vbase
14540         instead of BINFO_FOR_VBASE.
14541         (dump_class_hierarchy): Likewise.
14542         (finish_vtbls): Likewise.
14543         (build_vtbl_initializer): Adjust for changes to the
14544         CLASSTYPE_VBASECLASSES list.
14545         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
14546         * decl.c (finish_destructor_body): Adjust for changes to the
14547         CLASSTYPE_VBASECLASSES list.
14548         * init.c (sort_base_init): Use binfo_for_vbase.
14549         (construct_virtual_bases): Adjust for changes to the
14550         CLASSTYPE_VBASECLASSES list.
14551         (expand_member_init): Use binfo_for_vbase.
14552         (build_vbase_delete):  Adjust for changes to the
14553         CLASSTYPE_VBASECLASSES list.
14554         * method.c (do_build_copy_constructor): Likewise.
14555         * rtti.c (get_base_offset): Use binfo_for_vbase.
14556         (expand_class_desc): Remove #if 0'd code.
14557         * search.c (struct vbase_info): Remove vbase_types.
14558         (get_base_distance):  Use binfo_for_vbase.
14559         (lookup_field_queue_p): Use CANONICAL_BINFO.
14560         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
14561         (get_pure_virtuals): Adjust for changes to the
14562         CLASSTYPE_VBASECLASSES list.
14563         (dfs_find_vbases): Use binfo_for_vbase.
14564         (dfs_init_vbase_pointers): Likewise.
14565         (init_vbase_pointers): Don't initialize vi.vbase_types.
14566         (virtual_context): Use binfo_for_vbase.
14567         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
14568         CLASSTYPE_VBASECLASSES list.
14569         (expand_indirect_vtbls_init): Simplify.
14570         (dfs_get_vbase_types): Don't replicate virtual bases.
14571         (find_vbase_instance): Use binfo_for_vbase.
14572         (binfo_for_vbase): New function.
14573         * typeck.c (get_delta_difference): Use binfo_for_vbase.
14574
14575 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
14576
14577         * decl2.c (finish_anon_union): Generalize error messages to handle
14578         anonymous structures.
14579         * init.c (perform_member_init): Remove `name' parameter.
14580         (build_field_list): New function.
14581         (sort_member_init): Handle anonymous union initialization order
14582         correctly.  Check for multiple initializations of the same union.
14583         (emit_base_init): Don't look up fields by name here.
14584         (expand_member_init): Record the result of name lookup for future
14585         reference.
14586         * typeck.c (build_component_ref): Fix formatting.
14587
14588 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
14589
14590         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
14591         * typeck.c (build_x_compound_expr): Replace warn_unused with
14592         warn_unused_value.
14593
14594         * decl2.c (lang_decode_option): Update -Wall unused flags by
14595         calling set_Wunused.
14596
14597 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
14598
14599         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
14600         * init.c (dfs_vtable_path_unmark): Remove.
14601         * search.c (marked_new_vtable_p): Likewise.
14602         (unmarked_new_vtable_p): Likewise.
14603         (dfs_search_slot_nonempty_p): Likewise.
14604         (dfs_mark): Likewise.
14605         (dfs_vtable_path_unmark): Likewise.
14606         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
14607         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
14608         (dfs_init_vbase_pointers): Remove special-case new ABI code.
14609         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
14610         (init_vbase_pointers): Simplify.
14611         (expand_indirect_vtbls_init): Likewise.
14612
14613         * class.c (copy_virtuals): New function.
14614         (build_primary_table): Use it.
14615         (build_secondary_vtable): Likewise.
14616         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
14617         indicate that no vcall offset is required.
14618         (add_virtual_function): Likewise.
14619         (modify_all_vtables): Likewise.
14620         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
14621         (dfs_accumulate_vtbl_inits): Likewise.
14622         (build_vtbl_initializer): Make changes to handle construction
14623         vtables.
14624         (dfs_build_vcall_offset_vtbl_entries): Likewise.
14625         (build_rtti_vtbl_entries): Likewise.
14626         (build_vtable_entries): Handle a NULL vcall_index.
14627
14628 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
14629
14630         * decl2.c (lang_decode_option): Fix thinko.
14631
14632 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
14633
14634         * except.c (check_handlers): New fn.
14635         * cp-tree.h: Declare it.
14636         * semantics.c (finish_handler_sequence): Call it.
14637         (finish_function_handler_sequence): Likewise.
14638         (finish_handler_parms): Set TREE_TYPE on the handler.
14639         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
14640         * search.c (get_base_distance_recursive): If protect>1, ignore
14641         special access.
14642         (get_base_distance): Don't reduce watch_access.
14643
14644 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
14645
14646         * lex.c: #include diagnostic.h.
14647         (lang_init_options): Set default prefixing rules.
14648
14649         * lang-options.h: Add -fdiagnostics-show-location=.
14650
14651         * decl2.c: #include diagnostic.h.
14652         (lang_decode_option): Handle -fdiagnostics-show-location=.
14653
14654 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
14655
14656         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
14657         * vec.cc: Revert my 2000-05-07 change.
14658
14659 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
14660
14661         * class.c (check_field_decls): Complain about non-static data
14662         members with same name as class in class with constructor.
14663
14664 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
14665
14666         * decl.c (grokdeclarator): Allow non-static data members with
14667         same name as class.
14668
14669 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
14670
14671         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
14672         and pending_inline.filename.  Update prototypes.
14673         * decl.c (define_label): Constify filename parameter.
14674         * decl2.c (warn_if_unknown_interface): Constify local char *.
14675         * input.c Constify input_source.filename. Don't declare
14676         input_filename or lineno.  Constify filename parameter to feed_input.
14677         * lex.c (init_parse): Constify parameter and return value.
14678         (cp_pragma_interface, cp_pragma_implementation): Constify
14679         filename argument.
14680         (reinit_parse_for_method, reinit_parse_for_block,
14681         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
14682         Constify local char *.
14683         * pt.c: Don't declare lineno or input_filename.
14684         (print_template_context, tsubst_friend_function, tsubst_decl,
14685         tsubst, instantiate_decl): Constify local char *.
14686         * semantics.c (expand_body): Constify local char *.
14687         * tree.c (build_srcloc): Constify filename parameter.
14688         * typeck.c (c_expand_asm_operands): Constify filename
14689         parameter.
14690
14691 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
14692
14693         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
14694         offsetof expansion.
14695
14696 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
14697
14698         * inc/cxxabi.h:  Fix typos in comment.
14699         (__base_class_info::__offset): Use a static_cast.
14700
14701 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
14702
14703         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
14704         of std::size_t and std::ptrdiff_t respectively.
14705         * tinfo.cc: Likewise.
14706         * vec.cc: Likewise.
14707
14708 2000-05-06  Richard Henderson  <rth@cygnus.com>
14709
14710         * typeck.c (build_c_cast): Don't warn integer->pointer size
14711         mismatch for constants.
14712
14713 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
14714
14715         * rtti.c (ptmd_initializer): Set non-public, if class is
14716         incomplete.
14717
14718         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
14719         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14720         __cxa_vec_delete): Likewise.
14721         * tinfo.cc (__dynamic_cast): Likewise.
14722         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14723         __cxa_vec_delete): Likewise.
14724
14725 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
14726
14727         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
14728         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
14729         (lang_decl_flags): Add vcall_offset.
14730         (THUNK_VCALL_OFFSET): Use it.
14731         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
14732         * method.c (make_thunk): Create the lang_decl here, not in
14733         emit_thunk.
14734         (emit_thunk): Make generic thunks into ordinary functions once
14735         they have been fed to expand_body.
14736         * semantics.c (expand_body): Set current_function_is_thunk here.
14737
14738 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14739
14740         * class.c (update_vtable_entry_for_fn): Prototype.
14741
14742         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
14743         and `tmpl'.
14744
14745         * search.c (dfs_build_inheritance_graph_order): Prototype.
14746
14747 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
14748
14749         * cp-tree.h (special_function_kind): Add various kinds of
14750         destructors.
14751         (special_function_p): New function.
14752         * class.c (overrides): Don't let one kind of destructor override
14753         another.
14754         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
14755         whether or not to instantiate a template.
14756         * tree.c (special_function_p): Define.
14757
14758 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
14759
14760         * cp-tree.def (THUNK_DECL): Remove.
14761         * cp-tree.h (DECL_THUNK_P): New macro.
14762         (DECL_NON_THUNK_FUNCTION_P): Likewise.
14763         (DECL_EXTERN_C_FUNCTION_P): Likewise.
14764         (SET_DECL_THUNK_P): Likewise.
14765         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
14766         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
14767         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
14768         * decl.c (decls_match): Use DECL_EXTERN_C_P.
14769         (duplicate_decls): Likewise.
14770         (pushdecl): Likewise.  Adjust thunk handling.
14771         (grokfndecl): Use DECL_EXTERN_C_P.
14772         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
14773         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
14774         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
14775         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
14776         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
14777         DECL_NO_STATIC_CHAIN.
14778         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
14779         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
14780         * search.c (covariant_return_p): Remove THUNK_DECL handling.
14781         * ir.texi: Update.
14782
14783 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
14784
14785         * tree.c (walk_tree): Set lineno.
14786
14787 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
14788
14789         * exception.cc: Update license notice.
14790         * new.cc: Likewise.
14791         * new1.cc: Likewise.
14792         * new2.cc: Likewise.
14793         * tinfo.cc: Likewise.
14794         * tinfo2.cc: Likewise.
14795         * vec.cc: Likewise.
14796         * inc/cxxabi.h: Likewise.
14797         * inc/exception: Likewise.
14798         * inc/new: Likewise.
14799         * inc/new.h: Likewise.
14800         * inc/typeinfo: Likewise.
14801
14802 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
14803
14804         * tree.c (build_target_expr_with_type): If we already have a
14805         TARGET_EXPR, just return it.
14806
14807         * optimize.c (initialize_inlined_parameters): Don't generate an
14808         EXPR_STMT if we can just use DECL_INITIAL.
14809         * decl.c (emit_local_var): Only make the initialization a
14810         full-expression if stmts_are_full_exprs_p.
14811
14812 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
14813
14814         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
14815         macro.
14816         * call.c (standard_conversion): Use it.
14817         (direct_reference_binding): Likewise.
14818         (build_over_call): Likewise.
14819         (is_properly_derived_from): Likewise.
14820         (compare_ics): Likewise.
14821         * class.c (resolves_to_fixed_type_p): Likewise.
14822         * optimize.c (declare_return_variable): Likewise.
14823         * pt.c (is_specialization_of): Likewise.
14824         (unify): Likewise.
14825         * typeck.c (comp_target_parms): Likeiwse.
14826         (build_static_cast): Likewise.
14827         (build_reinterpret_cast): Likewise.
14828         (build_const_cast): Likewise.
14829         (comp_ptr_ttypes_real): Likewise.
14830         (comp_ptr_ttypes_const): Likewise.
14831         * typeck2.c (process_init_constructor): Likewise.
14832
14833 2000-04-30  Scott Snyder <snyder@fnal.gov>
14834
14835         * decl.c (finish_destructor_body): Use the base destructor when
14836         destroying virtual bases.
14837
14838 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
14839
14840         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
14841         STMT_EXPRs.
14842         * optimize.c (struct inline_data): Add target_exprs field.
14843         (declare_return_variable): When a function returns an aggregate,
14844         use the variable declared in the TARGET_EXPR as the remapped
14845         DECL_RESULT.
14846         (expand_call_inline): Update the pending target_exprs stack.
14847         (optimize_function): Initialize the stack.
14848
14849         * decl2.c (finish_file): Fix typo in comment.
14850
14851         * method.c (emit_thunk): Don't try to return a `void' value.
14852
14853         * optimize.c (initialize_inlined_parameters): If the parameter is
14854         addressable, we need to make a new VAR_DECL, even if the
14855         initializer is constant.
14856
14857 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
14858
14859         * decl.c (grok_op_properties): Add an extra check of argtypes.
14860
14861 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
14862
14863         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
14864         variables.
14865         (initialize_inlined_parameters): Try to avoid creating new
14866         VAR_DECLs.
14867
14868 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
14869
14870         * lex.c (my_get_run_time): Remove.
14871         (init_filename_times): Use get_run_time instead of my_get_run_time.
14872         (check_newline): Likewise.
14873         (dump_time_statistics): Likewise.
14874         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
14875         of computing elapsed time explicitly.
14876
14877 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
14878
14879         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
14880         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
14881         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
14882         before calling decl_constant_value.
14883         * class.c (check_bitfield_decl): Likewise.
14884         * cvt.c (ocp_convert): Likewise.
14885         (convert): Likewise.
14886         * decl.c (compute_array_index_type): Likewise.
14887         (build_enumerator): Likewise.
14888         * decl2.c (check_cp_case_value): Likewise.
14889         * pt.c (convert_nontype_argument): Likewise.
14890         (tsubst): Likewise.
14891         * typeck.c (decay_conversion): Likewise.
14892         (build_compound_expr): Likewise.
14893         (build_reinterpret_cast): Likewise.
14894         (build_c_cast): Likewise.
14895         (convert_for_assignment): Likewise.
14896
14897 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
14898
14899         * decl.c (finish_function): Don't play games with DECL_INLINE.
14900
14901 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
14902
14903         * ir.texi: Correct typo.
14904
14905 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14906
14907         * decl.c (grokdeclarator): Reject VLAs as members.
14908
14909 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
14910
14911         * call.c (standard_conversion): Accept conversion between
14912         COMPLEX_TYPEs.
14913
14914         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
14915
14916 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
14917
14918         * decl2.c (finish_file): Remove double setup for accounting
14919         compile time.
14920
14921 2000-04-24  Robert Lipe <robertlipe@usa.net>
14922
14923         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
14924
14925 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
14926
14927         * new.cc (set_new_handler): Needs to be in std::.
14928
14929 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
14930
14931         * cp-tree.h (lang_decl): Remove pretty_function_p.
14932         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
14933         language-specific node.
14934         * decl.c (cp_make_fname_decl): Use build_decl, not
14935         build_lang_decl, to build the variables.
14936         (grokvardecl): Don't call build_lang_decl for local variables in
14937         templates.
14938         (grokdeclarator): Don't call build_lang_decl for local type
14939         declarations in templates.
14940         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
14941         zero'd memory, rather than calling memset.
14942         * pt.c: Include hashtab.h.
14943         (local_specializations): New variable.
14944         (retrieve_local_specialization): Use it.
14945         (register_local_specialization): Likewise.
14946         (tsubst_decl): Don't assume local variables have
14947         DECL_LANG_SPECIFIC.
14948         (instantiate_decl): Set up local_specializations.
14949         * Makefile.in (HTAB_H): New variable.
14950
14951 2000-04-23  Richard Henderson  <rth@cygnus.com>
14952
14953         * typeck.c (c_expand_asm_operands): Restore the original
14954         contents of the output list.
14955
14956 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
14957
14958         * ir.texi:  Document complex number representation.
14959
14960 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
14961
14962         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
14963         (target_incomplete_p): New function.
14964         (tinfo_base_init): Create comdat NTBS name variable.
14965         (ptr_initializer): Add non_public parameter. Calculate it.
14966         (ptmd_initializer): Likewise.
14967         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
14968         (create_real_tinfo_var): Add non_public parameter. Use it.
14969         Push proxy into global namespace.
14970         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
14971         New enumeration.
14972         * inc/typeinfo (type_info::before, type_info::operator==):
14973         Compare __name addresses.
14974
14975         * tinfo2.cc: Remove new-abi builtins comment.
14976
14977 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
14978
14979         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
14980
14981         * call.c (joust): Exit early if we get the same function, too.
14982
14983         * decl2.c (key_method): Return NULL_TREE for template classes.
14984         (import_export_class): Don't need to check for template classes.
14985
14986 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
14987
14988         * lex.c: Remove references to cccp.c.
14989
14990 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
14991
14992         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
14993         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
14994         (DECL_DESTRUCTOR_P): Use destructor_attr.
14995         (DECL_CONST_MEMFUNC_P): Reimplement.
14996         (DECL_VOLATILE_MEMFUNC_P): Remove.
14997         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
14998         (overrides): Use DECL_DESTRUCTOR_P.
14999         (check_for_override): Likewise.
15000         * decl.c (start_function): Likewise.
15001         * decl2.c (grokfclassfn): Likewise.
15002         (check_classfn): Likewise.
15003         (grok_function_init): Likewise.
15004
15005 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
15006
15007         * decl2.c (grokfield): Issue error on illegal data member
15008         declaration.
15009
15010 2000-04-17  Mark P Mitchell  <mark@codesourcery.com>
15011
15012         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
15013
15014 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
15015
15016         * class.c (build_vtable_entry): Don't build thunks for type-info
15017         functions.
15018
15019 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
15020
15021         * decl.c (decls_match): Allow a redeclaration of a builtin to
15022         specify args while the builtin did not.
15023
15024 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
15025
15026         * cp-tree.def (THUNK_DECL): Add to documentation.
15027         * cp-tree.h (flag_huge_objects): Declare.
15028         * class.c (modify_vtable_entry): Tidy.
15029         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
15030         Calculate delta appropriately for the new ABI.
15031         (dfs_modify_vtables): Use it.
15032         (modify_all_vtables): Fix thinko in code to add overriding copies
15033         of functions to primary vtables.
15034         (build_clone): Fix typo in comment.
15035         (clone_function_decl): Correct order of destructors in vtable.
15036         (build_vbase_offset_vtbl_entries): Adjust comment.
15037         (dfs_vcall_offset_queue_p): Remove.
15038         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
15039         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
15040         (build_vtable_entry): Correct check for pure virtual functions.
15041         Don't declare flag_huge_objects.
15042         * decl.c (flag_huge_objects): Remove declaration.
15043         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
15044         Use int_size_in_bytes.
15045         (emit_thunk): Handle vcall offset thunks.
15046
15047 2000-04-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15048
15049         * decl2.c (parse_time, varconst_time): Delete declarations.
15050         (finish_file): Delete LINENO declaration.
15051         START_TIME and THIS_TIME now long.
15052
15053 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
15054
15055         * class.c (build_base_field): Reformat comment.
15056
15057         * inc/cxxabi.h (stddef.h): Comment inclusion.
15058         (__base_class_info::__offset): Comment shift.
15059
15060 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
15061
15062         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
15063         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
15064         (cp_push_exception_identifier): New macro.
15065         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
15066         (DECL_BASE_DESTRUCTOR_P): Likewise.
15067         (DECL_DELETING_DESTRUCTOR_P): Likewise.
15068         (get_vtbl_decl_for_binfo): Fix formatting.
15069         (in_charge_arg_for_name): New macro.
15070         (maybe_build_cleanup_and_delete): Remove declaration.
15071         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
15072         (in_charge_arg_for_name): New function.
15073         (build_new_method_call): Use it.  Handle cloned destructors.
15074         (build_clone): Don't make the base constructor virtual.
15075         Automatically defer generated functions.
15076         (clone_function_decl): Handle destructors, too.
15077         (clone_constructors_and_destructors): Likewise.
15078         (create_vtable_ptr): Don't create a vtable entry for a cloned
15079         function.
15080         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
15081         (initialize_predefined_identifiers): Update appropriately.
15082         (finish_destructor_body): Simplify.
15083         (maybe_build_cleanup_and_delete): Remove.
15084         * except.c (expand_throw): Handle new-ABI destructors.
15085         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
15086         (build_dtor_call): New function.
15087         (build_delete): Use it.  Simplify.
15088         * optimize.c (maybe_clone_body): Handle destructors.
15089         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
15090
15091         * exception.cc (cleanup_fn): New typedef.
15092         (CALL_CLEANUP): New macro.
15093         (cp_eh_info): Use them.
15094         (__cp_push_exception): Likewise.
15095         (__cp_pop_exception): Likewise.
15096
15097 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
15098
15099         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
15100         (complete_dtor_identifier): New macro.
15101         (CLASSTYPE_FIRST_CONVERSION): Remove.
15102         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
15103         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
15104         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
15105         (CLASSTYPE_CONSTRUCTORS): Likewise.
15106         (CLASSTYPE_DESTRUCTORS): Likewise.
15107         (lang_decl): Add cloned_function.
15108         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
15109         (DECL_BASE_CONSTRUCTOR_P): Likewise.
15110         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
15111         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
15112         (DECL_CLONED_FUNCTION_P): Likewise.
15113         (DECL_CLONED_FUNCTION): Likewise.
15114         (clone_function_decl): Declare.
15115         (maybe_clone_body): Likewise.
15116         * call.c (build_user_type_conversion_1): Call complete object
15117         constructors in the new ABI.
15118         (build_new_method_call): Don't add in-charge parameters under the
15119         new ABI.
15120         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
15121         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
15122         CLASSTYPE_DESTRUCTOR_SLOT.
15123         (build_clone): New function.
15124         (clone_function_decl): Likewise.
15125         (clone_constructors_and_destructors): Likewise.
15126         (check_bases_and_members): Use it.
15127         * decl.c (iniitialize_predefined_identifiers): Initialize
15128         complete_dtor_identifier.
15129         (finish_function): Don't add extra code to a clone.
15130         (lang_mark_tree): Mark cloned_function.
15131         * decl2.c (mark_used): Don't bother trying to instantiate things
15132         we synthesized.
15133         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
15134         * method.c (set_mangled_name_for_decl): Don't treat clones as
15135         constructors.
15136         (synthesize_method): Sythesize cloned functions, not the clones.
15137         * optimize.c (inline_data): Update comment on ret_label.
15138         (remap_block): Don't assume DECL_INITIAL exists.
15139         (copy_body_r): Allow ret_label to be NULL.
15140         (maybe_clone_body): Define.
15141         * pt.c (tsubst_decl): Handle clones.
15142         (instantiate_clone): New function.
15143         (instantiate_template): Use it.
15144         (set_mangled_name_for_template_decl): Don't treat clones as
15145         constructors.
15146         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
15147         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
15148         * semantics.c (expand_body): Clone function bodies as necessary.
15149
15150         * optimize.c (remap_decl): Avoid sharing structure for arrays
15151         whose size is only known at run-time.
15152         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
15153
15154         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
15155         to has_in_charge_parm_p.
15156         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
15157         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
15158         (DECL_COPY_CONSTRUCTOR_P): New macro.
15159         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
15160         (build_user_type_conversion_1): Likewise.
15161         (convert_like_real): Likewise.
15162         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
15163         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
15164         (copy_args_p): Likewise.
15165         (grok_ctor_properties): Likewise.
15166         (start_function): Likewise.
15167         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
15168         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
15169         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
15170         * method.c (do_build_copy_constructor): Use
15171         DECL_HAS_IN_CHARGE_PARM_P.
15172         (synthesize_method): Likewise.
15173         * pt.c (instantiate_template): Remove goto.
15174         * tree.c (build_cplus_method_type): Remove mention of obstacks in
15175         comment.
15176
15177         * cp-tre.h (finish_function): Change prototype.
15178         * decl.c (end_cleanup_fn): Adjust caller.
15179         (finish_function): Take only one parameter.
15180         * decl2.c (finish_objects): Adjust caller.
15181         (finish_static_storage_duration_function): Likewise.
15182         * method.c (emit_thunk): Likewise.
15183         * parse.y: Likewise.
15184         * parse.c: Regenerated.
15185         * pt.c (instantiate_decl): Likewise.
15186         * rtti.c (synthesize_tinfo_fn): Likewise.
15187         * semantics.c (expand_body): Likewise.
15188
15189         * cp-tree.h (copy_decl): New function.
15190         * class.c (finish_struct_1): Use it.
15191         * lex.c (copy_decl): Define it.
15192         * pt.c (tsubst_decl): Likewise.
15193         * tree.c (copy_template_template_parm): Likewise.
15194
15195         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
15196         has_nonpublic_assign_ref.
15197         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
15198         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
15199         * class.c (finish_struct_methods): Don't set
15200         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
15201         (interface_only): Don't declare.
15202         (interface_unknown): Likewise.
15203
15204 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15205
15206         * tree.h (HAVE_TEMPLATES): Remove definition.
15207         * lang-options.h (-fthis-is-variable): Remove documentation.
15208
15209 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
15210
15211         * class.c (instantiate_type): Handle object-relative template-id.
15212
15213         * semantics.c (finish_expr_stmt): Call convert_to_void here.
15214         * decl.c (cplus_expand_expr_stmt): Not here.
15215
15216         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
15217         Initialize exprtype earlier.
15218
15219         * parse.y (fn.def1): Check for defining types in return types.
15220
15221         * decl.c (check_tag_decl): Notice extra fundamental types.
15222         Diagnose empty decls in classes, too.
15223
15224         * decl.c (grokdeclarator): Don't override an anonymous name if no
15225         declarator was given.
15226
15227         * cvt.c (convert_to_void): Call resolve_offset_ref.
15228
15229         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
15230
15231         * decl2.c (decl_namespace): Handle getting a type.
15232
15233         * typeck.c (build_c_cast): Re-enable warning for cast between
15234         pointer and integer of different size.
15235
15236 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
15237
15238         * inc/cxxabi.h (__pointer_type_info): Add restrict and
15239         incomplete flags.
15240         (__pointer_type_info::__pointer_catch): New virtual function.
15241         (__pointer_to_member_type_info): Derive from
15242         __pointer_type_info. Adjust.
15243         (__pointer_to_member_type_info::__do_catch): Remove.
15244         (__pointer_to_member_type_info::__is_pointer_p): Declare.
15245         (__pointer_to_member_type_info::__pointer_catch): Declare.
15246         * rtti.c (qualifier_flags): Add restrict flag.
15247         (ptmd_initializer): Reorder members.
15248         (create_tinfo_types): Expand comments. Reorder
15249         ptmd_desc_type_node members.
15250         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
15251         Implement.
15252         (__pointer_type_info::__do_catch): Move specific code into
15253         __pointer_catch. Call it.
15254         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
15255         specific catch checking. Fix void conversion check.
15256         (__pointer_to_member_type_info::__do_catch): Remove.
15257         (__pointer_to_member_type_info::__pointer_catch): Implement.
15258
15259 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15260
15261         * lex.c (init_parse): Remove traces of classof and headof.
15262         * decl2.c (flag_operator_names): Default to 1.
15263         (lang_decode_option): Do not set it for -ansi.
15264
15265 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
15266
15267         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
15268         (DECL_MAIN_VARIANT): Remove.
15269         * decl.c (duplicate_decls): Don't set it.
15270         (start_function): Likewise.
15271         (lang_mark_tree): Don't mark it.
15272         * decl2.c (defer_fn): Don't use it.
15273         * lex.c (retrofit_lang_decl): Don't set it.
15274         * pt.c (tsubst_decl): Likewise.
15275         * ptree.c (print_lang_decl): Don't print it.
15276         * typeck.c (mark_addressable): Don't use it.
15277
15278 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
15279
15280         * vec.cc: Include <new> and <exception>.
15281         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
15282         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
15283         terminate.
15284         (__cxa_vec_delete): Catch dtor exceptions.
15285
15286 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
15287
15288         Prepend __ to implementation defined names.
15289         * inc/typeinfo (type_info): Rename _name to __name.
15290         (type_info::type_info): Rename parameter.
15291         (type_info::operator==, type_info::operator!=,
15292         type_info::before): Likewise.
15293         (type_info::is_pointer_p, type_info::is_function_p,
15294         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
15295         parameters.
15296         * inc/cxxabi.h
15297         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
15298         (__pointer_type_info::__pointer_type_info): Likewise.
15299         (__pointer_type_info::is_pointer_p,
15300         __pointer_type_info::do_catch): Prepend __. Rename parameters.
15301         (__array_type_info::__array_type_info): Rename parameters.
15302         (__function_type_info::__function_type_info): Likewise.
15303         (__function_type_info::is_function_p): Prepend __.
15304         (__enum_type_info::__enum_type_info): Rename parameters.
15305         (__pointer_to_member_type_info::__pointer_to_member_type_info):
15306         Likewise.
15307         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
15308         parameters.
15309         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
15310         (__class_type_info::__class_type_info): Rename parameters.
15311         (__class_type_info::sub_kind): Prepend __. Adjust member names.
15312         (__class_type_info::upcast_result,
15313         __class_type_info::dyncast_result): Prepend __. Move definition
15314         into tinfo.cc.
15315         (__class_type_info::do_upcast, __class_type_info::do_catch,
15316         __class_type_info::find_public_src,
15317         __class_type_info::do_dyncast,
15318         __class_type_info::do_find_public_src): Prepend __. Rename
15319         parameters.
15320         (__si_class_type_info::__si_class_type_info): Rename parameters.
15321         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
15322         __si_class_type_info::do_find_public_src): Prepent __. Rename
15323         parameters.
15324         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
15325         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
15326         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
15327         parameters.
15328         (__dynamic_cast): Rename parameters.
15329         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
15330         type_info::do_catch, type_info::do_upcast): Prepend __.
15331         (contained_p, public_p, virtual_p, contained_public_p,
15332         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
15333         (__class_type_info::do_catch,
15334         __class_type_info::do_upcast): Prepend __. Adjust.
15335         (__class_type_info::__upcast_result,
15336         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
15337         Adjust.
15338         (__class_type_info::find_public_src): Prepend __. Adjust.
15339         (__class_type_info::do_find_public_src,
15340         __si_class_type_info::do_find_public_src,
15341         __vmi_class_type_info::do_find_public_src): Likewise.
15342         (__class_type_info::do_dyncast,
15343         __si_class_type_info::do_dyncast,
15344         __vmi_class_type_info::do_dyncast): Likewise.
15345         (__class_type_info::do_upcast,
15346         __si_class_type_info::do_upcast,
15347         __vmi_class_type_info::do_upcast): Likewise.
15348         (__dynamic_cast): Adjust.
15349         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
15350         (__function_type_info::is_function_p): Likewise.
15351         (__pointer_type_info::do_catch): Likewise. Adjust.
15352         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
15353         (__throw_type_match_rtti_2): Adjust.
15354         (__is_pointer): Adjust.
15355
15356 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
15357
15358         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
15359         (complete_ctor_identifier): New macro.
15360         (special_function_kind): Add sfk_copy_constructor and
15361         sfk_assignment_operator.
15362         (LOOKUP_HAS_IN_CHARGE): Remove.
15363         (cons_up_default_function): Rename to ...
15364         (implicitly_declare_fn): ... this.
15365         * call.c (build_new_method_call): Add in-charge parameters for
15366         constructors here.
15367         * class.c (add_implicitly_declared_members): Change parameter name
15368         from cant_have_assignment to cant_have_const_assignment.
15369         Replace calls to cons_up_default_function to implicitly_declare_fn.
15370         * cvt.c (ocp_convert): Use complete_ctor_identifier.
15371         * decl.c (initialize_predefined_identifiers): Initialize it.
15372         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
15373         complex expression.
15374         * init.c (expand_default_init): Don't calculate the in-charge
15375         parameter here.
15376         (build_new_1): Likewise.
15377         * lex.c (cons_up_default_function): Move to method.c.
15378         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
15379         (implicitly_declare_fn): New function.
15380         * typeck.c (build_static_cast): Use complete_ctor_identifier.
15381         (build_modify_expr): Likewise.
15382         * typeck2.c (build_functional_cast): Likewise.
15383
15384         Under the new ABI, constructors don't return `this'.
15385         * cp-tree.h (warn_reorder): Declare.
15386         (special_function_kind): New enum.
15387         (global_base_init_list): Remove declaration.
15388         (emit_base_init): Don't return a value.
15389         (check_base_init): Don't declare.
15390         (is_aggr_typedef): Likewise.
15391         * decl.c (check_special_function_return_type): New function.
15392         (return_types): Remove.
15393         (grokdeclarator): Use check_special_function_return_type.
15394         (start_function): Don't initialize ctor_label under the new ABI.
15395         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
15396         * init.c (begin_init_stmts): Move to top of file.
15397         (finish_init_stmts): Likewise.
15398         (warn_reorder): Don't declare.
15399         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
15400         value.
15401         (check_base_init): Remove.
15402         (is_aggr_typedef): Likewise.
15403         (build_new_1): Don't use the return value of a constructor.
15404         * semantics.c (setup_vtbl_ptr): Don't use the return value
15405         of emit_base_init.
15406         * typeck.c (check_return_expr): Don't magically convert return
15407         statements into `return this' in constructors under the new ABI.
15408
15409         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
15410         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
15411         (base_ctor_identifier): New macro.
15412         (base_dtor_identifier): Likewise.
15413         (deleting_dtor_identifier): Likewise.
15414         * decl.c: Don't include obstack.h.
15415         (obstack_chunk_alloc): Don't define.
15416         (obstack_chunk_free): Likewise.
15417         (struct predefined_identifier): New type.
15418         (initialize_predefined_identifiers): New function.
15419         (init_decl_processing): Use it.
15420         (debug_temp_inits): Remove.
15421         (start_method): Don't call preserve_data.
15422         (hack_incomplete_structures): Update comment.
15423         * init.c (init_init_processing): Don't initialize
15424         nelts_identifier.
15425         (build_offset_rf): Remove dead code.
15426         (build_delete): Use CLASSTYPE_N_BASECLASSES.
15427         * search.c (init_search_processing): Don't initialize
15428         vptr_identifier.
15429
15430 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15431
15432         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
15433         some sign_compare warnings.
15434
15435 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
15436
15437         Rename abi::__vmi_class_type_info members.
15438         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
15439         base_list, detail_masks members to vmi_flags, vmi_base_count,
15440         vmi_bases and vmi_flags_masks respectively.
15441         (__vmi_class_type_info::vmi_flags_masks): Rename
15442         details_unknown_mask to flags_unknown_mask.
15443         * tinfo.cc (__class_type_info::do_upcast): Adjust.
15444         (__vmi_class_type_info::do_find_public_src): Adjust.
15445         (__vmi_class_type_info::do_dyncast): Adjust.
15446         (__vmi_class_type_info::do_upcast): Adjust.
15447
15448 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
15449
15450         * tinfo.cc (convert_to_base): New function.
15451         (get_vbase_offset): Remove. Move into convert_to_base.
15452         (__vmi_class_type_info::do_find_public_src): Adjust.
15453         (__vmi_class_type_info::do_dyncast): Adjust.
15454         (__vmi_class_type_info::do_upcast): Adjust.
15455
15456 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
15457
15458         * tinfo.cc (operator=): Use __builtin_strcmp.
15459         * tinfo2.cc (before): Likewise.
15460
15461 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
15462
15463         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
15464         (DECL_SAVED_INLINE): Rename to ...
15465         (DECL_DEFERRED_FN): ... this.
15466         (in_function_p): Remove declaration.
15467         (mark_inline_for_output): Rename to ...
15468         (defer_fn): ... this.
15469         * decl.c (finish_function): Adjust call to mark_inline_for_output.
15470         (in_function_p): Remove definition.
15471         * decl2.c (saved_inlines): Rename to ...
15472         (deferred_fns): ... this.
15473         (saved_inlines_used): Rename to ...
15474         (deferred_fns_used): ... this.
15475         (mark_inline_for_output): Rename to ...
15476         (defer_fn): ... this.
15477         (finish_file): Adjust accordingly.
15478         (init_decl2): Likewise.
15479         * lex.c (cons_up_default_function): Likewise.
15480         * pt.c (mark_decl_instantiated): Likewise.
15481         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
15482         circumstances.
15483         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
15484         * semantics.c (expand_body): Defer more functions.
15485
15486 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
15487
15488         * vec.cc: New file.
15489         * Make-lang.in (CXX_LIB2FUNCS): Add it.
15490         (vec.o): Build it.
15491         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
15492         __cxa_vec_delete): Declare.
15493
15494 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
15495
15496         * rtti.c (dfs_class_hint_mark): New static function.
15497         (dfs_class_hint_unmark): New static function.
15498         (class_hint_flags): Use them.
15499
15500 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
15501
15502         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
15503
15504 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
15505
15506         * cp-tree.h (instantiate_decl): Change prototype.
15507         * decl2.c (mark_used): Adjust call.
15508         * optimize.c (inlinable_function_p): Adjust handling of templates.
15509         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
15510         (do_type_instantiation): Likewise.
15511         (instantiate_decl): Defer more templates.
15512         (instantiate_pending_templates): Adjust logic to handle inline
15513         friend functions.
15514
15515         * Makefile.in (GGC_H): New variable.  Use it throughout in place
15516         of ggc.h.
15517
15518         * call.c: Don't include obstack.h.  Include ggc.h.
15519         (obstack_chunk_alloc): Don't define.
15520         (obstack_chunk_free): Likewise.
15521         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
15522         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
15523         (pop_switch): Free it.
15524
15525         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
15526
15527         * dump.c (dequeue_and_dump): Don't try to print the bit_position
15528         if we don't have a DECL_FIELD_OFFSET.
15529
15530 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
15531
15532         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
15533         special_function_p.
15534
15535 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15536
15537         * cfns.gperf (hash, libc_name_p): Prototype.
15538
15539         * rtti.c (build_dynamic_cast_1): Constification.
15540
15541         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
15542
15543         * semantics.c (deferred_type_access_control): Prototype.
15544
15545 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
15546
15547         Correct many new ABI issues regarding vbase and vcall offset
15548         layout.
15549         * cp-tree.h (BINFO_VTABLE): Document.
15550         (struct lang_type): Tweak formatting.
15551         (BINFO_PRIMARY_BINFO): Add to documentation.
15552         (CLASSTYPE_VSIZE): Fix typo in comment.
15553         (CLASSTYPE_VBASECLASSES): Update documentation.
15554         (BINFO_VBASE_MARKED): Remove.
15555         (SET_BINFO_VBASE_MARKED): Likewise.
15556         (CLEAR_BINFO_VBASE_MARKED): Likewise.
15557         (BINFO_FIELDS_MARKED): Remove.
15558         (SET_BINFO_FIELDS_MARKED): Likewise.
15559         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
15560         (enum access_kind): New enumeration.
15561         (num_extra_vtbl_entries): Remove declaration.
15562         (size_extra_vtbl_entries): Likewise.
15563         (get_vtbl_decl_for_binfo): New function.
15564         (dfs_vbase_unmark): Remove declaration.
15565         (mark_primary_bases): Likewise.
15566         * class.c (SAME_FN): Remove.
15567         (struct vcall_offset_data_s): Move definition.
15568         (build_vbase_pointer): Use `build', not `build_binary_op', to
15569         access the vbase pointer under the new ABI.
15570         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
15571         (build_primary_vtable): Likewise.
15572         (dfs_mark_primary_bases): Move here from search.c.
15573         (mark_primary_bases): Likewise.
15574         (determine_primary_bases): Under the new ABI, don't make a base
15575         class a primary base just because we don't yet have any virtual
15576         functions.
15577         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
15578         (num_vfun_entries): Remove.
15579         (dfs_count_virtuals): Likewise.
15580         (num_extra_vtbl_entries): Likewise.
15581         (size_extra_vtbl_entries): Likewise.
15582         (layout_virtual_bases): Iterate in inheritance graph order under
15583         the new ABI.
15584         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
15585         indicate that a vfield is present.
15586         (init_class_processing): Initialize access_public_node, etc., from
15587         ak_public, etc.
15588         (get_vtbl_decl_for_binfo): New function.
15589         (dump_class_hierarchy_r): Likewise.
15590         (dump_class_hierarchy): Use it.
15591         (finish_vtbls): Build the vtbls in inheritance graph order.
15592         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
15593         (initialize_vtable): Use get_vtbl_decl_for_binfo.
15594         (accumulate_vtbl_inits): Add comments explaining why a pre-order
15595         walk is required.
15596         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
15597         where the vptr points, even for primary vtables.
15598         (build_vtbl_initializer): Adjust handling of vbase and vcall
15599         offsets.
15600         (build_vcall_and_vbase_vtable_entries): New function.
15601         (dfs_build_vbase_offset_vtbl_entries): Remove.
15602         (build_vbase_offset_vtbl_entries): Reimplement.
15603         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
15604         were already handled in a primary base class vtable.
15605         (build_vcall_offset_vtbl_entries): Adjust.
15606         (build_rtti_vtbl_entries): Adjust.
15607         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
15608         * init.c (expand_virtual_init): Simplify.
15609         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
15610         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
15611         * search.c (BINFO_ACCESS): New macro.
15612         (SET_BINFO_ACCESS): Likewise.
15613         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
15614         (access_in_type): Likewise.
15615         (dfs_accessible_p): Likewise.
15616         (protected_accessible_p): Likewise.
15617         (lookup_fnfields_1): Adjust documentation.
15618         (dfs_mark_primary_bases): Move to class.c
15619         (mark_primary_bases): Likewise.
15620         (dfs_vbase_unmark): Remove.
15621         (virtual_context): Use BINFO_FOR_VBASE.
15622         (dfs_get_vbase_types): Simplify.
15623         (dfs_build_inheritance_graph_order): New function.
15624         (get_vbase_types): Use it.
15625         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
15626
15627         * tinfo.cc (get_vbase_offset): New function.
15628         (__vmi_class_type_info::do_find_public_src): Use it.
15629         (__vmi_class_type_info::do_dyncast): Likewise.
15630         (__vmi_class_type_info::do_upcast): Likewise.
15631
15632 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
15633
15634         * lang-specs.h: Pass -fno-show-column to the preprocessor.
15635
15636 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
15637
15638         * rtti.c (class_hint_flags): Rename flags.
15639         (class_initializer): Remove flags.
15640         (synthesize_tinfo_var): Combine offset and flags. Add flags
15641         for __vmi_class_type_info.
15642         (create_tinfo_types): Remove flags from __class_type_info and
15643         __si_class_type_info. Merge flags and offset from
15644         base_class_type_info.
15645         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
15646         (__base_class_info::is_virtual_p): Adjust.
15647         (__base_class_info::is_public_p): Adjust.
15648         (__base_class_info::offset): New accessor.
15649         (__class_type_info::details): Remove member.
15650         (__class_type_info::__class_type_info): Lose details.
15651         (__class_type_info::detail_masks): Remove.
15652         (__si_class_type_info::__si_class_type_info): Lose details.
15653         (__vmi_class_type_info::details): New member.
15654         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
15655         (__vmi_class_type_info::detail_masks): New member.
15656         * tinfo.cc (__class_type_info::do_upcast): Initialize result
15657         with unknown_details_mask.
15658         (__vmi_class_type_info::do_find_public_src): Adjust
15659         (__vmi_class_type_info::do_dyncast): Adjust.
15660         (__vmi_class_type_info::do_upcast): Set result details, if
15661         needed. Adjust.
15662         (__dynamic_cast): Temporarily #if out optimization.
15663
15664 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
15665
15666         * rtti.c (get_tinfo_decl): Mark used.
15667         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
15668         mark as dealt with, if we output it.
15669
15670 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
15671
15672         * class.c: Reorganize to put virtual function table initialization
15673         machinery at the end of the file.
15674
15675 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
15676
15677         * class.c (finish_struct): Use bitsize_zero_node.
15678         * pt.c (instantiate_class_template): Likewise.
15679
15680 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
15681
15682         Put RTTI entries at negative offsets in new ABI.
15683         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
15684         vbase offset at index -3, not -1.
15685         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
15686         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
15687         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
15688         (build_rtti_vtbl_entries): New function.
15689         (set_rtti_entry): Remove.
15690         (build_primary_vtable): Don't use it.
15691         (build_secondary_vtable): Likewise.
15692         (start_vtable): Remove.
15693         (first_vfun_index): New function.
15694         (set_vindex): Likewise.
15695         (add_virtual_function): Don't call start_vtable.  Do call
15696         set_vindex.
15697         (set_primary_base): Rename parameter.
15698         (determine_primary_base): Likewise.
15699         (num_vfun_entries): Don't use skip_rtti_stuff.
15700         (num_extra_vtbl_entries): Include RTTI information.
15701         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
15702         (skip_rtti_stuff): Remove.
15703         (dfs_modify_vtables): Don't use it.
15704         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
15705         (layout_nonempty_base_or_field): Update size handling.
15706         (create_vtable_ptr): Tweak.
15707         (layout_class_type): Adjust parameter names.
15708         (finish_struct_1): Simplify.
15709         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
15710         (skip_rtti_stuff): Remove.
15711         (first_vfun_index): New function.
15712         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
15713         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
15714         (marked_vtable_pathp): Declare.
15715         (unmarked_vtable_pathp): Likewise.
15716         * error.c (dump_expr): Use first_vfun_index to calculate vtable
15717         offsets.
15718         * rtti.c (build_headof): Look for RTTI at negative offsets.
15719         (get_tinfo_decl_dynamic): Likewise.
15720         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
15721         here.
15722         (create_pseudo_type_info): Do it here instead.  Adjust so that
15723         vptr points at first virtual function.
15724         * search.c (marked_vtable_pathp): Make it global.
15725         (unmarked_vtable_pathp): Likewise.
15726         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
15727         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
15728         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
15729         (get_pure_virtuals): Likewise.
15730         (expand_upcast_fixups): Likewise.
15731         * tree.c (debug_binfo): Likewise.
15732         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
15733         negative offset.
15734
15735 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15736
15737         * class.c (check_field_decl): Fix typo.
15738         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
15739         (check_methods): Likewise.
15740         (check_field_decls): Likewise.
15741         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
15742         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
15743         Use DECL_RESULT_FLD, not DECL_RESULT.
15744         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
15745         * lex.c (identifier_type): Likewise.
15746         * pt.c (determine_specialization, lookup_template_class): Likewise.
15747         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
15748         (resolve_overloaded_unification, more_specialized): Likewise.
15749         * semantics.c (finish_member_declaration): Likewise.
15750         * typeck.c (build_x_function_call): Likewise.
15751
15752 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
15753
15754         * class.c (layout_empty_base): Handle empty bases with non-byte
15755         alignment.
15756         (build_base_field): Likewise.
15757         (layout_virtual_bases): Likewise.
15758
15759         * class.c (finish_struct_1): Fix typo in this change:
15760
15761         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15762
15763 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
15764
15765         * decl.c (grokdeclarator): Count partial specializations when
15766         keeping track of how many template classes have been seen.
15767
15768         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
15769
15770 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15771
15772         * class.c (build_vbase_pointer_fields): layout_field now place_field.
15773         (get_vfield_offset): Use byte_position.
15774         (set_rtti_entry): Set OFFSET to ssizetype zero.
15775         (get_binfo_offset_as_int): Deleted.
15776         (dfs_record_base_offsets): Use tree_low_cst.
15777         (dfs_search_base_offsets): Likewise.
15778         (layout_nonempty_base_or_field): Reflect changes in RLI format
15779         and call byte_position.
15780         (layout_empty_base): Convert offset to ssizetype.
15781         (build_base_field): use rli_size_unit_so_far.
15782         (dfs_propagate_binfo_offsets): Do computation in proper type.
15783         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
15784         (layout_class_type): Reflect changes in RLI names and fields.
15785         (finish_struct_1): Set DECL_FIELD_OFFSET.
15786         * dump.c (dequeue_and_dump): Call bit_position.
15787         * expr.c (cplus_expand_constant): Use byte_position.
15788         * rtti.c (expand_class_desc): Use bitsize_one_node.
15789         * typeck.c (build_component_addr): Use byte_position and don't
15790         special case for zero offset.
15791
15792 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
15793
15794         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
15795
15796         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
15797         tinfo object.
15798         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
15799         vtable.
15800
15801 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15802
15803         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
15804         DECL_P macros.
15805         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
15806         make_typename_type, check_initializer, cp_finish_decl,
15807         xref_tag): Likewise.
15808         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
15809         decl_namespace, arg_assoc_template_arg, arg_assoc,
15810         validate_nonmember_using_decl, do_class_using_decl): Likewise.
15811         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
15812         args_to_string): Likewise.
15813         * friend.c (is_friend): Likewise.
15814         * lex.c (note_got_semicolon, note_list_got_semicolon,
15815         is_global): Likewise.
15816         * method.c (build_overload_nested_name, build_overload_value,
15817         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
15818         * parse.y (typename_sub, typename_sub1): Likewise.
15819         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
15820         process_partial_specialization, convert_template_argument,
15821         template_args_equal, add_pending_template, lookup_template_class,
15822         for_each_template_parm_r, maybe_fold_nontype_arg,
15823         tsubst, instantiate_template, type_unification_real, unify,
15824         instantiate_pending_templates, set_mangled_name_for_template_decl):
15825         Likewise.
15826         * repo.c (repo_get_id, repo_template_used): Likewise.
15827         * search.c (lookup_field_1): Likewise.
15828         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
15829         * xref.c (classname): Likewise.
15830
15831 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
15832
15833         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
15834         (CANONICAL_BINFO): New macro.
15835         (BINFO_NEW_VTABLE_MARKED): Use it.
15836         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
15837         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
15838         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
15839         not TREE_TYPE.
15840         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15841         (build_secondary_vtable): Likewise.
15842         (dfs_finish_vtbls): Likewise.
15843         (dfs_accumulate_vtbl_inits): Likewise.
15844         (accumulate_vtbl_inits): New function.
15845         (finish_vtbls): Make sure that virtual bases come after
15846         non-virtual bases in the vtable group.
15847         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
15848         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15849         * search.c (struct vbase_info): Move definition.
15850         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15851         (unmarked_new_vtable_p): Likewise.
15852         (dfs_mark_vtable_path): Remove.
15853         (dfs_mark_new_vtable): Remove.
15854         (dfs_unmark_new_vtable): Likewise.
15855         (dfs_clear_search_slot): Likewise.
15856         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
15857         (dfs_clear_vbase_slots): Likewise.
15858         (init_vbase_pointers): LIkewise.
15859
15860 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
15861
15862         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
15863         SIZETYPE to a non-SIZETYPE.
15864
15865 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
15866
15867         * class.c (layout_virtual_bases): Adjust names in conditionally
15868         compiled code.
15869
15870         * class.c (record_base_offsets): New function.
15871         (layout_conflict_p): Likewise.
15872         (layout_nonempty_base_or_field): Use it.
15873         (layout_empty_base): New function.
15874         (build_base_field): Use it.
15875         (build_base_fields): Update comment.
15876         (layout_virtual_bases): Fold in a little code form
15877         layout_basetypes.  Use layout_empty_base.
15878         (layout_basetypes): Remove.
15879         (end_of_class): New function.
15880         (layout_class_type): Use it.  Adjust.
15881
15882         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
15883         (fntype_p): Remove.
15884         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
15885         comment.
15886         (dfs_skip_nonprimary_vbases_markedp): Likewise.
15887         * typeck.c (fntype_p): Remove.
15888
15889         * cp-tree.h (TI_SPEC_INFO): Remove.
15890         (CLASSTYPE_TI_SPEC_INFO): Likewise.
15891         * pt.c (process_partial_specialization): Likewise.
15892
15893         * class.c (build_base_field): Fix thinko in computation of binfo
15894         offsets.
15895
15896         * tree.c (mark_local_for_remap_p): Mark variables declared in
15897         TARGET_EXPRs as well.
15898
15899 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
15900
15901         * typeck.c (require_complete_type, complete_type,
15902         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
15903         build_array_ref, convert_arguments, pointer_diff,
15904         build_x_unary_op, build_unary_op, build_c_cast,
15905         build_modify_expr): Use COMPLETE_TYPE_P etc.
15906         * call.c (is_complete, convert_like_real,
15907         build_new_method_call): Likewise.
15908         * class.c (build_vbase_pointer_fields, check_bases,
15909         build_base_field, finish_struct_1, pushclass): Likewise.
15910         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
15911         * decl.c (maybe_process_template_type_declaration, pushtag,
15912         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
15913         layout_var_decl, check_initializer, cp_finish_decl,
15914         grokdeclarator, require_complete_types_for_parms,
15915         grok_op_properties, xref_tag, xref_basetypes,
15916         check_function_type): Likewise.
15917         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
15918         * friend.c (do_friend): Likewise.
15919         * init.c (build_offset_ref): Likewise.
15920         * parse.y (structsp): Likewise.
15921         * pt.c (maybe_process_partial_specialization,
15922         tsubst_friend_function, instantiate_class_template, tsubst,
15923         do_type_instantiation, instantiate_pending_templates): Likewise.
15924         * repo.c (repo_get_id): Likewise.
15925         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
15926         synthesize_tinfo_var, emit_support_tinfos): Likewise.
15927         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
15928         * semantics.c (begin_class_definition): Likewise.
15929         * tree.c (build_cplus_method_type): Likewise.
15930         * typeck2.c (digest_init, build_functional_cast,
15931         add_exception_specifier): Likewise.
15932         * parse.h, parse.c: Regenerated.
15933
15934 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
15935
15936         * inc/cxxabi.h: New header file. Define new-abi entry points.
15937         (__pointer_type_info::target): Rename member to ...
15938         (__pointer_type_info::type): ... here.
15939         (__base_class_info::type): Rename member to ...
15940         (__base_class_info::base): ... here.
15941         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
15942         * cp-tree.h (CPTI_ABI): New global tree enumeration.
15943         (abi_node): New global tree node.
15944         * decl.c (abi_node): Document.
15945         (init_decl_processing): Initialize abi_node.
15946         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
15947         (get_vmi_pseudo_type_info): Likewise.
15948         (create_tinfo_types): Likewise.
15949         (emit_support_tinfos): Likewise.
15950         * tinfo.h (cxxabi.h): Include for new-abi.
15951         Move rtti class definitions to new header file.
15952         * tinfo.cc (abi): Use the namespace.
15953         (std): Move new abi rtti classes from here ...
15954         (__cxxabiv1): ... to here.
15955         * tinfo2.cc (cxxabi.h): Include for new-abi.
15956         Move rtti class definitions to new header file.
15957         (std): Move new abi rtti classes from here ...
15958         (__cxxabiv1): ... to here.
15959         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
15960         namespace.
15961
15962 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
15963             Jason Merrill  <jason@casey.cygnus.com>
15964
15965         * method.c (build_overload_int): Use host_integerp.
15966
15967 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15968
15969         * init.c (build_offset_ref): Handle the case of a templated member
15970         function.
15971
15972 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15973
15974         * except.c (expand_exception_blocks): Clear catch_clauses_last.
15975
15976 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
15977
15978         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
15979         * class.c (check_bitfield_decl): Turn illegal bitfields into
15980         non-bitfields.
15981         (dfs_propagate_binfo_offsets): Adjust for new size_binop
15982         semantics.
15983         (dfs_offset_for_unshared_vbases): Likewise.
15984         * cvt.c (cp_convert_to_pointer): Convert NULL to a
15985         pointer-to-member correctly under the new ABI.
15986         * expr.c (cplus_expand_constant): Don't use cp_convert when
15987         turning an offset into a pointer-to-member.
15988         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
15989         when dereferencing them under the new ABI.
15990         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
15991         of pointers-to-members under the new ABI.
15992
15993         * class.c (check_bitfield_decl): Remove restriction on really long
15994         bitfields.
15995         (layout_class_type): Implement new ABI handling of bitfields
15996         longer than their types.
15997
15998 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15999
16000         * parse.y (extdefs): Call ggc_collect.
16001         * parse.c: Regenerated.
16002
16003 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
16004
16005         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
16006         (note_name_declared_in_class): Use OVL_CURRENT to get at a
16007         potential overload.
16008
16009 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16010
16011         * class.c (build_vbase_path): Use integer_zerop.
16012         (build_vtable_entry): Use tree_low_cst.
16013         (get_vfield_offset): Use bit_position.
16014         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
16015         Use tree_low_cst.
16016         (check_bitfield_decl): Set DECL_SIZE using convert.
16017         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
16018         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
16019         Use tree_low_cst.
16020         (finish_struct_1): Use bit_position.
16021         (dump_class_hierarchy): Use tree_low_cst.
16022         * cp-tree.h (min_precision): Add declaration.
16023         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
16024         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
16025         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
16026         * expr.c (cplus_expand_constant): Use bit_position.
16027         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
16028         * rtti.c (get_base_offset): Use bit_position.
16029         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
16030         host_integerp, and tree_low_cst.
16031         (pointer_int_sum): Use integer_zerop.
16032         (build_component_addr): Use bit_position.
16033
16034 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
16035
16036         * typeck.c (require_complete_type): Don't assume size_zero_node.
16037         (complete_type_or_else): Likewise.
16038
16039 2000-03-16  Steven Grady <grady@digitaldeck.com>
16040             Jason Merrill  <jason@casey.cygnus.com>
16041
16042         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
16043
16044 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
16045
16046         * decl2.c (grokfield): Bail out if type is error_mark_node.
16047
16048 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
16049
16050         * tinfo2.cc (__ptr_to_member_data): Rename to ...
16051         (__pointer_to_member_data): ... here. Adjust.
16052         * rtti.c (create_tinfo_types): Adjust.
16053
16054 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
16055
16056         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
16057         * decl.c (ref_desc_type_node): Undocument.
16058         * rtti.c (ptr_ref_initializer): Rename to ...
16059         (ptr_initializer): ... here. Adjust comments.
16060         (ptmd_initializer): Fix comment thinko.
16061         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
16062         (create_tinfo_types): Remove ref_desc_type_node init.
16063         * tinfo2.cc (__reference_type_info): Remove.
16064
16065 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
16066
16067         * decl.c (cp_finish_decl): Remove obsolete comment.
16068
16069         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
16070
16071 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
16072
16073         * cp-tree.h: Tweak documentation.
16074         * class.c (build_vbase_pointer_fields): Layout the fields, too.
16075         (avoid_overlap): Remove.
16076         (get_binfo_offset_as_int): New function.
16077         (dfs_serach_base_offsets): Likewise.
16078         (layout_nonempty_base_or_field): Likewise.
16079         (build_base_field): Layout fields here.  Avoid placing two objects
16080         of the same type at the same address, under the new ABI.
16081         (build_base_fields): Adjust accordingly.
16082         (create_vtable_ptr): Return the new field, but don't attach it to
16083         TYPE_FIELDS.
16084         (remove_base_field): Remove.
16085         (remove_base_fields): Remove.
16086         (layout_basetypes): Adjust accordingly.
16087         (layout_class_type): Call layout_field for each field, rather than
16088         just making a wholesale call to layout_type.
16089
16090 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
16091
16092         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
16093
16094 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
16095
16096         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
16097
16098         * except.c (dtor_nothrow): New fn.
16099         (do_pop_exception): Use it.  Take type parm.
16100         (push_eh_cleanup): Take type parm.
16101         (expand_start_catch_block): Pass it.
16102         (build_eh_type_type_ref): Accept null type.
16103
16104 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
16105
16106         * cp-tree.h (revert_static_member_fn): Change prototype.
16107         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
16108         (grok_op_properties): Likewise.
16109         (start_function): Likewise.
16110         (revert_static_member_fn): Simplify.
16111         * pt.c (check_explicit_specialization): Adjust call to
16112         revert_static_member_fn.
16113
16114 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
16115
16116         * cp-tree.h (scope_kind): New type.
16117         (tmpl_spec_kind): Likewise.
16118         (declare_pseudo_global_level): Remove.
16119         (pseudo_global_level_p): Rename to template_parm_scope_p.
16120         (pushlevel): Remove declaration.
16121         (begin_scope): New function.
16122         (finish_scope): Likewise.
16123         (current_tmpl_spec_kind): Likewise.
16124         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
16125         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
16126         Add template_spec_p.
16127         (toplevel_bindings_p): Adjust.
16128         (declare_pseudo_global_level): Remove.
16129         (pseudo_global_level_p): Rename to template_parm_scope_p.
16130         (current_tmpl_spec_kind): New function.
16131         (begin_scope): Likewise.
16132         (finish_scope): Likewise.
16133         (maybe_push_to_top_level): Adjust.
16134         (maybe_process_template_type_declaration): Likewise.
16135         (pushtag): Likewise.
16136         (pushdecl_nonclass_level): Likewise.
16137         (lookup_tag): Likewise.
16138         (grokfndecl): Handle member template specializations.  Share
16139         constructor and non-constructor code.
16140         * decl2.c (check_classfn): Handle member template specializations.
16141         * pt.c (begin_template_parm_list): Use begin_scope.
16142         (begin_specialization): Likewise.
16143         (end_specialization): Likewise.
16144         (check_explicit_specialization): Use current_tmpl_spec_kind.
16145         Handle member template specializations.
16146         (end_template_decl): Use finish_scope.  Remove call to
16147         get_pending_sizes.
16148         (push_template_decl_real): Remove bogus error message.
16149         (tsubst_decl): Fix typo in code contained in comment.
16150         (instantiate_template): Handle member template specializations.
16151         (most_general_template): Likewise.
16152
16153 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
16154
16155         * lex.c (whitespace_cr): Compress consecutive calls to warning().
16156         (do_identifier): Ditto for error().
16157
16158         * pt.c (convert_nontype_argument): Ditto for cp_error().
16159         (convert_template_argument): Ditto for cp_pedwarn().
16160
16161 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
16162
16163         * exception.cc (__check_null_eh_spec): New fn.
16164         * except.c (expand_end_eh_spec): Call it if the spec is throw().
16165
16166 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
16167
16168         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
16169         * except.c (expand_end_eh_spec): Add the return type.
16170         * rtti.c (throw_bad_cast): Add the parmtypes.
16171         (throw_bad_typeid): Likewise.
16172
16173         * semantics.c (expand_stmt): Only leave out rtl for unused
16174         artificials, and set DECL_IGNORED_P on them as well.
16175         * decl.c (wrapup_globals_for_namespace): Likewise.
16176
16177 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
16178
16179         * decl.c (maybe_commonize_var): Skip all artificial decls.
16180         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
16181
16182 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
16183
16184         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
16185         * cp-tree.h: Declare flag_enforce_eh_specs.
16186         * decl.c (store_parm_decls, finish_function): Check it.
16187
16188         C library functions don't throw.
16189         * Makefile.in (cfns.h): New target.
16190         (except.o): Depend on it.
16191         * Make-lang.in (cc1plus): Depend on cfns.gperf.
16192         * cfns.gperf: New file.
16193         * cfns.h: Generated.
16194         * except.c: Include it.
16195         (nothrow_libfn_p): New fn.
16196         * decl.c (grokfndecl): Use it.
16197         * cp-tree.h: Declare it.
16198
16199         * decl.c (push_overloaded_decl_1, auto_function,
16200         define_function): Lose.
16201         (build_library_fn_1): New static fn.
16202         (builtin_function): Use it.
16203         (get_atexit_node): Use build_library_fn_ptr.
16204         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
16205         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
16206         push_void_library_fn, push_throw_library_fn): New fns.
16207         * cp-tree.h: Declare them.
16208         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
16209         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
16210         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
16211         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
16212         * rtti.c (build_runtime_decl): Lose.
16213         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
16214         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
16215         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
16216
16217         * call.c (build_call): Remove result_type parm.
16218         Call mark_used on unused artificial fns.
16219         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
16220
16221 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
16222
16223         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
16224         appropriate.
16225         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
16226         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
16227         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
16228         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
16229         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
16230         expand_generic_desc): Likewise.
16231
16232 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16233
16234         * exception.cc (__cp_pop_exception): Cleanup the original object.
16235
16236 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16237
16238         * decl.c (grok_op_properties): Merge conversion to void warning
16239         with other silly op warnings.
16240
16241 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
16242
16243         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
16244         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
16245
16246 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16247
16248         * decl.c (cp_make_fname_decl): New function.
16249         (wrapup_globals_for_namespace): Don't emit unused static vars.
16250         (init_decl_processing): Remove comment about use of
16251         array_domain_type. Set make_fname_decl.
16252         (cp_finish_decl): Remove __FUNCTION__ nadgering.
16253         * semantics.c (begin_compound_stmt): Remove
16254         current_function_name_declared flagging.
16255         (expand_stmt): Don't emit unused local statics.
16256         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
16257         specially.
16258
16259 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16260
16261         * typeck.c (convert_for_assignment): Don't look at array
16262         initializer.
16263         * call.c (convert_like_real): Likewise.
16264
16265 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
16266
16267         Add initial support for '\uNNNN' specifier.
16268         * lex.c (read_ucs): New fn.
16269         (readescape, skip_white_space): Call it.
16270         (is_extended_char, is_extended_char_1): New fns.
16271         (utf8_extend_token): New fn, #if 0'd out.
16272         (real_yylex): Treat extended chars like letters.
16273
16274         * search.c (note_debug_info_needed): Walk the bases even if we
16275         weren't deferring the type itself.
16276
16277 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16278
16279         * decl2.c (finish_objects): Constify a char*.
16280
16281         * method.c (emit_thunk): Likewise.
16282
16283 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
16284
16285         * typeck.c (dubious_conversion_warnings): Look through
16286         REFERENCE_TYPE.
16287
16288 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16289
16290         * class.c (dfs_modify_vtables): I is now unsigned.
16291         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
16292         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
16293         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
16294         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
16295         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
16296         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
16297         Call integer_all_onesp.
16298         * typeck2.c (process_init_constructor): Use compare_tree_int.
16299
16300         * lang-specs.h (as): Don't call if -syntax-only.
16301
16302 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
16303
16304         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
16305         RTL_EXPR_HAS_NO_SCOPE after all.
16306
16307 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
16308
16309         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
16310         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
16311         RTL_EXPR_HAS_NO_SCOPE.
16312
16313         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
16314         later.
16315
16316         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
16317
16318 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
16319
16320         * call.c (convert_like): Macrofy.
16321         (convert_like_with_context): New macro.
16322         (convert_like_real): Renamed from convert_like.  Add calling
16323         context parameters, for diagnostics. Add recursive flag.  Call
16324         dubious_conversion_warnings for outer conversion.
16325         (build_user_type_conversion): Use convert_like_with_context.
16326         (build_over_call): Likewise. Don't warn about dubious
16327         conversions here. Adjust convert_default_arg calls.
16328         (convert_default_arg): Add context parameters for diagnostics.
16329         Pass through to convert_like_with_context.
16330         * cp-tree.h (convert_default_arg): Add context parameters.
16331         (dubious_conversion_warnings): Prototype new function.
16332         * typeck.c (convert_arguments): Adjust convert_default_arg call.
16333         (dubious_conversion_warnings): New function, broken
16334         out of convert_for_assignment.
16335         (convert_for_assignment): Adjust.
16336
16337 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
16338
16339         * decl2.c (key_method): Break out from...
16340         (import_export_vtable, import_export_class): ...here.
16341
16342         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
16343         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
16344
16345         * search.c (note_debug_info_needed, dfs_debug_mark,
16346         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
16347         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
16348
16349 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
16350
16351         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
16352         typos.
16353
16354 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
16355
16356         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
16357         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
16358         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
16359         (lang_type): Split gets_new into has_new and has_array_new.
16360         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16361         (TYPE_GETS_NEW): Split into ...
16362         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
16363         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
16364         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
16365         (build_op_new_call): Don't declare.
16366         (build_new_1): Likewise.
16367         * call.c (build_op_new_call): Remove.
16368         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
16369         instead of TYPE_NEEDS_DESTRUCTOR.
16370         (finish_struct_bits): Likewise.
16371         (add_implicitly_declared_members): Likewise.
16372         (check_field_decl): Likewise.
16373         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
16374         correctly under the new ABI.
16375         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
16376         instead of TYPE_NEEDS_DESTRUCTOR.
16377         (initialize_local_var): Likewise.
16378         (destroy_local_var): Likewise.
16379         (cp_finish_decl): Likewise.
16380         (register_dtor_fn): Likewise.
16381         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
16382         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
16383         TYPE_VEC_DELETE_TAKES_SIZE here.
16384         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
16385         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
16386         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16387         (finish_destructor_body): Likewise.
16388         (maybe_build_cleanup_1): Likewise.
16389         * decl2.c (do_static_destruction): Likewise.
16390         * init.c (build_new_1): Make it static.
16391         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16392         (expand_cleanup_for_base): Likewise.
16393         (get_cookie_size): New function.
16394         (build_new_1): Handle array-new cookies correctly under the new
16395         ABI.
16396         (build_vec_delete_1): Likewise.
16397         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16398         (build_delete): Likewise.
16399         (build_vec_delete): Handle array-new cookies correctly under the new
16400         ABI.
16401         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16402         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
16403         TYPE_HAS_ARRAY_NEW_OPERATOR.
16404         * ptree.c (print_lang_type): Check them.
16405         * search.c (context_for_name_lookup): Fix typo in comment.
16406         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16407         * tree.c (break_out_cleanups): Likewise.
16408         (build_cplus_array_test_1): Likewise.
16409         (cp_build_qualified_type_real): Likewise.
16410         * typeck.c (complete_type): Likewise.
16411
16412         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
16413         the command-line, not the end.
16414
16415 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
16416
16417         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
16418
16419 2000-03-02  Tom Tromey  <tromey@cygnus.com>
16420
16421         * cp-tree.h (build_java_class_ref): Declare.
16422         * init.c (build_java_class_ref): No longer static.
16423         * except.c (expand_throw): Generate a Java-style `throw' if the
16424         thrown object is a "Java" object.
16425         (initialize_handler_parm): Generate a Java-style lookup of
16426         exception info if the caught object is a "Java" object.
16427         (catch_language, catch_language_init): New globals.
16428         (decl_is_java_type): New function.
16429         (expand_start_catch_block): Don't call push_eh_info() or
16430         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
16431         class reference to build_catch_block.
16432
16433 2000-03-02  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16434
16435         * typeck.c (comptypes): Treat sizetype like its language equivalent.
16436
16437 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
16438
16439         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
16440         to merge reference/pointer code and fix incorrect warnings.
16441
16442 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
16443
16444         * search.c (protected_accessible_p): Use context_for_name_lookup.
16445
16446         * init.c (construct_virtual_bases): Fix thinko.
16447         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
16448
16449 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
16450
16451         * decl.c (current_function_decl): Move to toplev.c.
16452
16453 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
16454
16455         * pt.c (fn_type_unification): Unify return type, whenever
16456         provided.
16457         (get_bindings_real): Only pass return type when necessary.
16458         Remove explicit return type check.
16459         * class.c (resolve_address_of_overloaded_function): Pass desired
16460         return type to fn_type_unification.
16461
16462 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16463
16464         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
16465         DECL_FIELD_SIZE.
16466         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
16467         DECL_FIELD_SIZE.
16468         * rtti.c (expand_class_desc): Likewise.
16469         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
16470         (THUNK_VCALL_OFFSET): Likewise.
16471         (THUNK_DELTA): Reflect changes in ../tree.h.
16472
16473 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
16474
16475         * search.c (protected_accessible_p): Also allow the access if
16476         the member is public in DERIVED.  Lose TYPE parm.
16477         (friend_accessible_p): Lose TYPE parm.
16478         (accessible_p): Adjust.
16479
16480 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16481
16482         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
16483         on things that are not sizes; ssize_binop deleted.
16484         Call size_diffop when appropriate.
16485         (dfs_build_vcall_offset_vtbl_entries): Likewise.
16486         (build_primary_vtable, build_secondary_vtable): Likewise.
16487         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
16488         Variable I is HOST_WIDE_INT.
16489         (get_vfield_offset): Pass proper types to size_binop.
16490         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
16491         (finish_struct_1): Likewise.
16492         (skip_rtti_stuff): Arg N is now pointer to signed.
16493         (layout_class_type): Use size_zero_node.
16494         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
16495         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
16496         * decl.c (complete_arry_type): Pass proper types to size_binop.
16497         (xref_basetypes): BINFO_OFFSET is sizetype.
16498         * error.c (dump_expr): Don't use size_binop non-sizes.
16499         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
16500         * init.c (construct_virtual_bases): Fix type error.
16501         (build_vec_delete_1): Pass proper type to size_binop and don't
16502         fold result.
16503         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
16504         * rtti.c (get_base_offset): Pass proper type to size_binop.
16505         * search.c (dfs_find_vbases): Fix type error.
16506         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
16507         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
16508         * tree.c (debug_binfo): Variable N is signed.
16509         Use HOST_WIDE_INT_PRINT_DEC.
16510         * typeck.c (comptypes): sizetype is same as equivalent integer type.
16511         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
16512         size_one_node and size_zero_node.
16513         (c_alignof): Use size_one_node.
16514         (build_component_addr): Pass proper types to size_binop.
16515         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
16516
16517 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
16518
16519         Implement class scope using-declarations for functions.
16520         * class.c (handle_using_decl): Call add_method for used functions.
16521         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
16522         (add_method): Used functions are hidden by local functions.
16523         (check_bases_and_members): Handle using-decls before finalizing
16524         CLASSTYPE_METHOD_VEC.
16525         * call.c (add_function_candidate): Add ctype parm; if nonzero,
16526         override the type of 'this' accordingly.
16527         (add_template_candidate, add_template_candidate_real): Add ctype parm.
16528         (convert_class_to_reference, build_user_type_conversion_1,
16529         build_new_function_call, build_object_call, build_new_op,
16530         build_new_method_call): Pass ctype parm.
16531
16532         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
16533         the baselink.
16534         * call.c (convert_class_to_reference, build_user_type_conversion_1,
16535         build_new_function_call, build_object_call, build_new_op,
16536         build_new_method_call, build_op_delete_call): Don't get basetype_path
16537         from a baselink.
16538         * typeck.c (build_component_ref): Likewise.
16539         * init.c (build_offset_ref): Likewise.
16540         (resolve_offset_ref): Don't call enforce_access.
16541         Call build_scoped_ref.
16542         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
16543         would cause an error or if -pedantic.
16544         * class.c (alter_access): Lose binfo parm.
16545
16546 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
16547
16548         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
16549         types.
16550
16551 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
16552
16553         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
16554         pseudo_type_info creation into the std namespace
16555
16556 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
16557
16558         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
16559         (import_export_class): Remove declaration.
16560         * decl2.c (import_export_class): Make it static.
16561         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
16562         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
16563         EXPR_WITH_FILE_LOCATION.
16564         * lex.c (check_newline): Tweak filename/lineno setting.
16565         * semantics.c (begin_while_stmt): Fix typo in comment.
16566
16567 2000-02-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16568
16569         * lang-options.h (-fmessage-length=): Add missing option.
16570
16571         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
16572
16573 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
16574
16575         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
16576
16577 2000-02-25  Jim Wilson  <wilson@cygnus.com>
16578
16579         * optimize.c (expand_call_inline): Emit the return label before
16580         evaluating the return value.
16581
16582 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
16583
16584         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
16585         than duplicating functionality here.
16586         * optimize.c: Include input.h.
16587         (expand_call_inline): Use push_srcloc and pop_srcloc.
16588         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
16589         * parse.c: Regenerated.
16590         * Makefile.in (lex.o): Depend on input.h.
16591         (optimize.o): Likewise.
16592
16593 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
16594
16595         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
16596         function type, rather than ICE.
16597
16598 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
16599
16600         * decl.c (grokdeclarator): Call decl_type_access_control.
16601         * parse.y (parse_end_decl): Don't call decl_type_access_control if
16602         decl is null.
16603
16604 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
16605
16606         * decl.c (decls_match): Remove obsolete static member nadgering.
16607
16608 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16609
16610         * decl.c (grokdeclarator): Change ANSI to ISO.
16611         * lex.c (consume_string, readescape, do_identifier): Likewise.
16612         (parse_float, real_yylex): Likewise.
16613         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
16614         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
16615         new_type_id, maybe_label_decls, simple_stmt,
16616         for.init.statement): Likewise.
16617         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
16618         * semantics.c (finish_named_return_value): Likewise.
16619         * parse.c: Regenerate.
16620
16621 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
16622
16623         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
16624         (CPTI_CLASS_STAR_TYPE): Remove.
16625         (vtable_index_type): Likewise.
16626         (class_star_type_node): Remove.
16627         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
16628         (build_binary_op_nodefault): Remove.
16629         * call.c (build_new_op): Use build_binary_op instead of
16630         build_binary_op_nodefault.
16631         * decl.c (init_decl_processing): Remove class_star_type_node
16632         initialization.  Make delta_type_node ptrdiff_type_node under the
16633         new ABI.  Initialize vtable_index_type.
16634         (build_ptrmemfunc_type): Build different structures for the new
16635         ABI.
16636         (build_enumerator): Use build_binary_op instead of
16637         build_binary_op_nodefault.
16638         * method.c (build_overload_value): Mangle pointers-to-members
16639         appropriately under the new ABI.
16640         * typeck.c (build_array_ref): Use build_binary_op instead of
16641         build_binary_op_nodefault.
16642         (get_member_function_from_ptrfunc): Adjust for the new ABI.
16643         (build_binary_op_nodefault): Rename to ...
16644         (build_binary_op): ... this.  Remove old version.  Adjust for
16645         pointer-to-member comparisons under the new ABI.
16646         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
16647         (build_ptrmemfunc): Adjust for the new ABI.
16648         (expand_ptrmemfunc_cst): Likewise.
16649         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
16650         (pfn_from_ptrmemfunc): Adjust for the new ABI.
16651
16652 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
16653
16654         * call.c (build_object_call): Compress consecutive calls to
16655         cp_error.
16656         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
16657         (build_op_delete_call): Adjust message formatting.
16658
16659         * class.c (check_bases): Compress consecutive calls to
16660         cp_pedwarn.
16661         (finish_struct_anon): Say 'ISO C++'.
16662
16663         * decl.c (start_decl): Same here.
16664         (grok_reference_init): Likewise.
16665         (grokfndecl): Correct message formatting.
16666         (grokfndecl): Improve diagnostic.
16667         (check_static_variable_definition): Likewise. Say 'ISO C++'
16668         (compute_array_index_type): Say 'ISO C++'
16669         (create_array_type_for_decl): Compress consecutive calls to
16670         cp_error.
16671         (grokdeclarator): Say 'ISO C++'
16672         (grok_op_properties): Likewise.
16673
16674         * decl2.c (delete_sanity): Clairify diagnostic.
16675         (check_member_template): Same here.
16676         (grok_function_init): Use consistent terminology.
16677
16678         * expr.c (do_case): Say 'ISO C++'
16679
16680         * friend.c (do_friend): Compress consecutive calls to warning.
16681
16682 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
16683
16684         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
16685         * class.c (build_secondary_vtable): Reorganize.  Don't create a
16686         new vtable under the new ABI.
16687         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
16688         computing the size.
16689         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
16690         the initializing elements.
16691         (initialize_vtable): New function.
16692         (dfs_finish_vtbls): Use it.
16693         (dfs_accumulate_vtbl_inits): New function.
16694         (finish_vtbls): Merge primary and secondary vtables under the new
16695         ABI.
16696         (finish_struct_1): Remove redundant call to layout_vtable_decl.
16697         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
16698         aren't VAR_DECLs.
16699
16700         * class.c (build_vtable): New function, split out from ...
16701         (get_vtable_decl): ... here, and ...
16702         (build_secondary_vtable): ... here.
16703
16704         * pt.c (tsubst_decl): Fix formatting.
16705
16706 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16707
16708         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
16709         (avoid_overlap, build_base_field): Likewise.
16710         (build_base_field, build_base_fields, is_empty_class):
16711         Test DECL_SIZE with integer_zero.
16712         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
16713         * cp-tree.h (struct lang_type): New field size_unit.
16714         (CLASSTYPE_SIZE_UNIT): New macro.
16715         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
16716         (cp_finish_decl): Delete -Wlarger-than processing.
16717         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
16718         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
16719         * tree.c (make_binfo): binfo vector is one entry longer.
16720         (walk_tree): Walk DECL_SIZE_UNIT.
16721
16722 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
16723
16724         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
16725         comment.
16726         (build_vtable_entry): Don't assume all vtable entries are
16727         functions.
16728         (build_vtbl_initializer): Adjust accordingly.
16729         (get_vtable_decl): Fix formatting.
16730
16731 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
16732
16733         * semantics.c (deferred_type_access_control): Walk the entire
16734         type_lookups list.
16735         (save_type_access_control): Rename from
16736         initial_deferred_type_access_control.  Just remember the value.
16737         (decl_type_access_control): New fn.
16738         (begin_function_definition): Use deferred_type_access_control, after
16739         we've started the function.  Set type_lookups to error_mark_node.
16740         * parse.y (frob_specs, fn.def1): Adjust.
16741         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
16742         (parse_end_decl, parse_bitfield0, parse_method): New fns.
16743         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
16744         (after_type_component_declarator0): Likewise.
16745         (after_type_component_declarator): Likewise.
16746         (notype_component_declarator): Likewise.
16747         * cp-tree.h: Adjust.
16748
16749         * decl.c (redeclaration_error_message): Allow redeclaration of
16750         namespace-scope decls.
16751
16752 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
16753
16754         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
16755
16756 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
16757
16758         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
16759         * decl2.c (grokclassfn): Likewise.
16760
16761         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
16762
16763         * decl2.c (lang_decode_option): Don't set default message length
16764         here.
16765         * lex.c (lang_init_options): Set it here.
16766
16767 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
16768
16769         Make DECL_CONTEXT mean the class in which a member function was
16770         declared, even for a virtual function.
16771         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
16772         (DECL_FRIEND_CONTEXT): New macro.
16773         (DECL_REAL_CONTEXT): Remove.
16774         (SET_DECL_FRIEND_CONTEXT): Likewise.
16775         (DECL_VIRTUAL_CONTEXT): Adjust.
16776         (DECL_CLASS_SCOPE_P): Use TYPE_P.
16777         (add_friends): Remove.
16778         (hack_decl_function_context): Likewise.
16779         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
16780         CP_DECL_CONTEXT.
16781         (build_over_call): Fix indentation.  Use DECL_CONTEXT
16782         instead of DECL_CLASS_CONTEXT.
16783         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
16784         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
16785         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16786         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
16787         (build_base_field): Likewise.
16788         (finish_struct_1): Likewise.
16789         (build_self_reference): Likewise.
16790         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
16791         DECL_REAL_CONTEXT.
16792         (pushtag): Use decl_function_context, not
16793         hack_decl_function_context.
16794         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16795         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
16796         (pushdecl): Remove bogus code.
16797         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
16798         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16799         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16800         Use decl_function_context, nothack_decl_function_context.
16801         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
16802         (grokdeclarator): Likewise.  Use decl_function_context, not
16803         hack_decl_function_context.
16804         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
16805         (start_function): Use DECL_FRIEND_CONTEXT, not
16806         DECL_CLASS_CONTEXT.  Use decl_function_context, not
16807         hack_decl_function_context.
16808         (finish_function): Use decl_function_context, not
16809         hack_decl_function_context.
16810         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
16811         DECL_CLASS_CONTEXT.
16812         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
16813         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
16814         (grokfield): Likewise.
16815         (finish_builtin_type): Likewise.
16816         (finish_vtable_vardec): Use decl_function_context, not
16817         hack_decl_function_context.
16818         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16819         (start_static_initialization_or_destruction): Likewise.
16820         (finish_static_initialization_or_destruction): Likewise.
16821         (mark_used): Adjust logic for deciding when to synthesize methods.
16822         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
16823         DECL_REAL_CONTEXT.
16824         * error.c (dump_function_decl): Use DECL_CONTEXT, not
16825         DECL_CLASS_CONTEXT.
16826         * friend.c (is_friend): Likewise.
16827         (add_friends): Remove.
16828         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
16829         * lex.c (begin_definition_of_inclass_inline): Use
16830         decl_function_context, not hack_decl_function_context.
16831         (process_next_inline): Likewise.
16832         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16833         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
16834         DECL_CLASSS_CONTEXT.
16835         (hack_identifier): Likewise.
16836         (synthesize_method):  Use decl_function_context, not
16837         hack_decl_function_context.
16838         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
16839         DECL_REAL_CONTEXT.
16840         (is_member_template): Use decl_function_context, not
16841         hack_decl_function_context.  Use DECL_CONTEXT, not
16842         DECL_CLASS_CONTEXT.
16843         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
16844         DECL_CLASS_CONTEXT.
16845         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
16846         DECL_REAL_CONTEXT.
16847         (push_template_decl_real): Likewise.
16848         (instantiate_class_template): Don't call add_friends.
16849         (tsubst_default_argument): Use DECL_CONTEXT, not
16850         DECL_REAL_CONTEXT.
16851         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
16852         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16853         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
16854         DECL_CLASS_CONTEXT.
16855         * repo.c (repo_inline_used): Likewise.
16856         * search.c (current_scope): Adjust for new _CONTEXT macros.
16857         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
16858         DECL_REAL_CONTEXT.
16859         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16860         (lookup_fnfields_here):Likewise.
16861         (check_final_overrider): Likewise.
16862         (init_vbase_pointers): Likewise.
16863         (virtual_context): Likewise.
16864         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
16865         (expand_body): Use decl_function_context, not
16866         hack_decl_function_context.
16867         * tree.c (hack_decl_function_context): Remove.
16868         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
16869         DECL_CLASS_CONTEXT.
16870         * typeck2.c (error_not_base_type): Likewise.
16871
16872 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
16873
16874         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
16875
16876 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16877
16878         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
16879
16880 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
16881
16882         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
16883
16884 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
16885
16886         * decl2.c (lang_decode_option): Enable automatic line wrapping.
16887
16888 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
16889
16890         * parse.y (frob_specs): Split out...
16891         (parse_decl): From here.
16892         (fn.def2): Call initial_deferred_type_access_control.
16893         (after_type_component_declarator0): Call frob_specs.
16894         (notype_component_declarator0): Likewise.
16895         * search.c (friend_accessible_p): Nested classes are friends of their
16896         enclosing classes.
16897
16898 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
16899
16900         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
16901         used to create an implicit temporary.
16902
16903         * class.c (dfs_modify_vtables): Tweak calculation of functions to
16904         override.
16905
16906 2000-02-08  Nathan Sidwell  <nathan@acm.org>
16907
16908         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
16909         strip array element qualifiers too.
16910
16911 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
16912
16913         * decl.c (store_parm_decls): Don't build cleanups for parameters
16914         while processing_template_decl.
16915
16916 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
16917
16918         * cp-tree.h (struct saved_scope): Add incomplete field.
16919         (namespace_scope_incomplete): New macro.
16920         * decl.c (pushdecl): Use it.
16921         (hack_incomplete_structures): Use it.  See through artificial
16922         binding levels.
16923         (mark_saved_scope): Mark it.
16924
16925         Implement access control for nested types.
16926         * search.c (type_access_control): New fn.
16927         (accessible_p): Now we do perform access control for types.
16928         * semantics.c (deferred_type_access_control): New fn.
16929         (initial_deferred_type_access_control): New fn.
16930         (begin_function_definition): Call it.  Add lookups parm.
16931         * decl.c (struct binding_level): Add this_class field.
16932         (pushlevel_class): Set it.
16933         (mark_binding_level): Mark it.
16934         (lookup_name_real): Use it.  Call type_access_control.
16935         (mark_saved_scope): Mark lookups field.
16936         * cp-tree.h (flagged_type_tree): Add lookups field.
16937         (struct saved_scope): Add lookups field.
16938         (type_lookups): New macro.
16939         * parse.y (declmods): Now <ftype>.
16940         (parse_decl): Add lookups parm.  Call
16941         initial_deferred_type_access_control.
16942         (lang_extdef): Clear type_lookups.
16943         (typed_declspecs, declmods, typespec): Set lookups field.
16944         (initdcl): Call deferred_type_access_control.
16945         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
16946         component_decl_1, named_parm): Adjust.
16947         * friend.c (is_friend): Nested classes are friends of their
16948         enclosing classes.
16949
16950         * class.c (currently_open_derived_class): New fn.
16951         * method.c (hack_identifier): Use it.
16952
16953         * lex.c (do_identifier): Remove obsolete code.
16954
16955         * parse.y (typed_typespecs): Propagate new_type_flag properly.
16956
16957 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
16958
16959         * tinfo.h: Remove apostrophes from C++ comment (xgettext
16960         thinks this file is plain C).
16961
16962 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16963
16964         * Makefile.in (call.o): Depend on $(EXPR_H).
16965
16966         * call.c: Include "expr.h".
16967
16968         * class.c (dump_class_hierarchy): Add prototype.
16969
16970         * search.c (dfs_get_pure_virtuals): Likewise.
16971
16972 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
16973
16974         * parse.y (simple_stmt): Allow :: token in asm parameter list.
16975         * parse.c: Rebuilt.
16976
16977 2000-01-31  Jim Wilson  <wilson@cygnus.com>
16978
16979         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
16980         Store it in DECL_FCONTEXT.
16981         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
16982
16983 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
16984
16985         * tinfo.h (old abi): #include "tconfig.h".
16986         * tinfo.cc (convert_to_base): Move into old abi section.
16987
16988 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
16989
16990         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
16991         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
16992         (BINFO_PRIMARY_BINFO): New macro.
16993         (BF_DELTA): Rename to ...
16994         (BV_DELTA): ... this.
16995         (BF_VCALL_INDEX): Rename to ...
16996         (BV_VCALL_INDEX): ... this.
16997         (BF_FN): Rename to ...
16998         (BV_FN): ... this.
16999         * class.c (build_vbase_path): Adjust for changes to reverse_path.
17000         (set_rtti_entry): Rename BF_ macros to BV_ variants.
17001         (modify_vtable_entry): Simplify.
17002         (add_virtual_function): Rename BF_ macros to BV_ variants.
17003         (build_vtable_initializer): Likewise.
17004         (get_class_offset_1): Remove.
17005         (dfs_get_class_offset): Likewise.
17006         (get_class_offset): Likewise.
17007         (dfs_find_final_overrider): New function.
17008         (find_final_overrider): Likewise.
17009         (modify_one_vtable): Remove.
17010         (dfs_find_base): New function.
17011         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
17012         find_final_overrider.
17013         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
17014         virtuals.
17015         (dfs_fixup_vtable_deltas): Remove.
17016         (override_one_vtable): Remove.
17017         (merge_overrides): Likewise.
17018         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
17019         unreal chilren of virtual bases.
17020         (finish_struct_1): Don't use merge_overrides.  Don't use
17021         dfs_fixup_vtable_deltas.
17022         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
17023         BINFOs.
17024
17025 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
17026             Jason Merrill  <jason@yorick.cygnus.com>
17027
17028         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
17029
17030 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
17031
17032         * exception.cc (__throw_bad_typeid): Add missing std::.
17033
17034 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17035
17036         * cp-tree.h (make_thunk): PROTO -> PARAMS.
17037
17038 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
17039
17040         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
17041
17042         Runtime support for new-abi rtti.
17043         * inc/typeinfo (type_info::operator!=): Define in class.
17044         (type_info::before, type_info::name, type_info::operator==,
17045         type_info::operator!=): Define new ABI implementations.
17046         (type_info::is_pointer_p, type_info::is_function_p): Declare
17047         new virtual functions.
17048         (type_info::do_catch, type_info::do_upcast): Likewise.
17049
17050         * tinfo.h (__base_class_info): Define new class.
17051         (__class_type_info): Likewise.
17052         (__si_class_type_info): Likewise.
17053         (__vmi_class_type_info): Likewise.
17054         (__dynamic_cast): Prototype.
17055
17056         * tinfo.cc: Conditionalize old and new rtti mechanisms.
17057         (type_info::is_pointer_p): Define new function.
17058         (type_info::is_function_p): Likewise.
17059         (type_info::do_catch): Likewise.
17060         (type_info::do_upcast): Likewise.
17061         (vtable_prefix): New structure for vtable access.
17062         (adjust_pointer): Define new template function.
17063         (contained_p, public_p, virtual_p, contained_public_p,
17064         contained_nonpublic_p, contained_nonvirtual_p): Define new
17065         functions.
17066         (nonvirtual_base_type): New local variable.
17067         (__class_type_info::~__class_type_info): Define.
17068         (__si_class_type_info::~__si_class_type_info): Likewise.
17069         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
17070         (__class_type_info::do_catch): Define new function.
17071         (__class_type_info::do_upcast): Likewise.
17072         (__class_type_info::find_public_src): Likewise.
17073         (__class_type_info::do_find_public_src): Likewise.
17074         (__si_class_type_info::do_find_public_src): Likewise.
17075         (__vmi_class_type_info::do_find_public_src): Likewise.
17076         (__class_type_info::do_dyncast): Likewise.
17077         (__si_class_type_info::do_dyncast): Likewise.
17078         (__vmi_class_type_info::do_dyncast): Likewise.
17079         (__class_type_info::do_upcast): Likewise.
17080         (__si_class_type_info::do_upcast): Likewise.
17081         (__vmi_class_type_info::do_upcast): Likewise.
17082         (__dynamic_cast): Likewise.
17083
17084         * tinfo2.cc (__fundamental_type_info): Define new class.
17085         (__pointer_type_info): Likewise.
17086         (__reference_type_info): Likewise.
17087         (__array_type_info): Likewise.
17088         (__function_type_info): Likewise.
17089         (__enum_type_info): Likewise.
17090         (__ptr_to_member_type_info): Likewise.
17091         (__fundamental_type_info::~__fundamental_type_info): Define.
17092         (__pointer_type_info::~__pointer_type_info): Likewise.
17093         (__reference_type_info::~__reference_type_info): Likewise.
17094         (__array_type_info::~__array_type_info): Likewise.
17095         (__function_type_info::~__function_type_info): Likewise.
17096         (__enum_type_info::~__enum_type_info): Likewise.
17097         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
17098         (__pointer_type_info::do_catch): Define new function.
17099         (__ptr_to_member_type_info::do_catch): Define new function.
17100
17101         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
17102         (__is_pointer): Likewise.
17103
17104         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
17105
17106 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
17107
17108         * cp/class.c (build_vtable): Rename to build_primary_vtable.
17109         (prepare_fresh_vtable): Rename to build_secondary_vtable.
17110         (make_new_vtable): New function.
17111         (modify_vtable_entry): Handle generation of new vtables correctly.
17112         (modify_one_vtable): Remove unused parameter.
17113         (dfs_fixup_vtable_deltas): Likewise.
17114         (override_one_vtable): Use build_secondary_vtable.
17115         (finish_struct_1): Use build_primary_vtable and
17116         build_secondary_vtable.
17117
17118 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
17119
17120         * cp/decl.c: Adjust variable names, comments, help strings.
17121
17122 2000-01-29  Nathan Sidwell  <nathan@acm.org>
17123
17124         * new2.cc (operator delete[]): Use operator delete, don't assume
17125         implementation.
17126
17127 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
17128
17129         * class.c (build_vtbl_initializer): Add argument to
17130         build_vtable_entry call.
17131
17132 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
17133
17134         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
17135         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
17136         (BF_DELTA): New macro.
17137         (BF_VCALL_INDEX): Likewise.
17138         (BF_FN): Likewise.
17139         (THUNK_VCALL_OFFSET): Likewise.
17140         (make_thunk): Change prototype.
17141         * class.c (build_vtable_entry): Integrate
17142         build_vtable_entry_for_fn.  Handle vcall indices.
17143         (build_vtable_entry_for_fn): Remove.
17144         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
17145         BF_VCALL_INDEX, BF_FN.
17146         (modify_vtable_entry): Integrate common code from
17147         modify_one_vtable and dfs_fixup_vtable_deltas.
17148         (add_virtual_function): Set BF_VCALL_INDEX.
17149         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
17150         and BF_FN.
17151         (modify_one_vtable): Simplify.
17152         (dfs_fixup_vtable_deltas): Likewise.
17153         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
17154         * method.c (make_thunk): Handle vcall indices.
17155
17156 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
17157
17158         Compiler side new abi rtti (not enabled).
17159         * cp-tree.h (new_abi_rtti_p): New macro.
17160         (emit_support_tinfos): Prototype new function.
17161         (tinfo_decl_p): Likewise.
17162         (emit_tinfo_decl): Likwise.
17163         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
17164         macros.
17165         (doing_runtime): New local static.
17166         (init_rtti_processing): Add new-abi initializer.
17167         (get_tinfo_decl): Add new-abi logic.
17168         (tinfo_from_decl): Likewise.
17169         (build_dynamic_cast_1): Likewise.
17170         (qualifier_flags): New static function.
17171         (tinfo_base_init): Likewise.
17172         (generic_initializer): Likewise.
17173         (ptr_ref_initializer): Likewise.
17174         (ptmd_initializer): Likewise.
17175         (class_hint_flags): Likewise.
17176         (class_initializer): Likewise.
17177         (synthesize_tinfo_var): Likewise.
17178         (create_real_tinfo_var): Likewise.
17179         (create_pseudo_type_info): Likewise.
17180         (get_vmi_pseudo_type_info): Likewise.
17181         (create_tinfo_types): Likewise.
17182         (emit_support_tinfos): New global function.
17183         (tinfo_decl_p): New global predicate.
17184         (emit_tinfo_decl): New global function.
17185         * class.c (set_rtti_entry): Generalize for old and new rtti.
17186         (build_vtbl_initializer): Likewise.
17187         * decl2.c (finish_file): Likewise.
17188
17189 2000-01-27  Jim Wilson  <wilson@cygnus.com>
17190
17191         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
17192         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
17193
17194 2000-01-27  Mike Stump  <mrs@wrs.com>
17195
17196         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
17197         for scopes.
17198
17199 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
17200
17201         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
17202
17203 2000-01-26  J"orn Rennecke <amylaar@cygnus.co.uk>
17204
17205         * optimize.c (calls_setjmp_r): Supply new argument
17206         to special_function_p.
17207
17208 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17209
17210         * call.c: PROTO -> PARAMS.
17211         * class.c: Likewise.
17212         * cp-tree.h: Likewise.
17213         * cvt.c: Likewise.
17214         * decl.c: Likewise.
17215         * decl.h: Likewise.
17216         * decl2.c: Likewise.
17217         * dump.c: Likewise.
17218         * errfn.c: Likewise.
17219         * error.c: Likewise.
17220         * except.c: Likewise.
17221         * expr.c: Likewise.
17222         * init.c: Likewise.
17223         * input.c: Likewise.
17224         * lex.c: Likewise.
17225         * lex.h: Likewise.
17226         * method.c: Likewise.
17227         * optimize.c: Likewise.
17228         * parse.y: Likewise.
17229         * pt.c: Likewise.
17230         * repo.c: Likewise.
17231         * rtti.c: Likewise.
17232         * search.c: Likewise.
17233         * semantics.c: Likewise.
17234         * spew.c: Likewise.
17235         * tree.c: Likewise.
17236         * typeck.c: Likewise.
17237         * typeck2.c: Likewise.
17238         * xref.c: Likewise.
17239
17240 2000-01-25  Richard Henderson  <rth@cygnus.com>
17241
17242         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
17243
17244 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
17245
17246         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
17247         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
17248         (struct vcall_offset_data_s): New type.
17249         (dfs_vcall_offset_queue_p): New function.
17250         (dfs_build_vcall_offset_vtbl_entries): Likewise.
17251         (build_vcall_offset_vtbl_entries): Likewise.
17252         (layout_vtable_decl): Likewise.
17253         (num_vfun_entries): Likewise.
17254         (num_extra_vtbl_entries): Add the entries for vcall offsets.
17255         (build_vtbl_initializer): Likewise.
17256         (dfs_finish_vtabls): Use layout_vtable_decl.
17257         (modify_one_vtables): Always duplicate vtables under the new ABI.
17258         (finish_struct_1): Use layout_vtable_decl.
17259
17260 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17261
17262         * decl.c (member_function_or_else): Change third arg from a format
17263         specifier to an `enum overload_flags'.  Callers changed.
17264
17265 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
17266
17267         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
17268         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
17269         build_const_cast, get_delta_difference, check_return_expr): Avoid
17270         ANSI string concatenation usage.
17271
17272 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
17273
17274         * class.c (layout_class_type): Put the fields required to make a
17275         class non-empty at the end, not the beginning, of the TYPE_FIELDs
17276         list.
17277
17278 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
17279
17280         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
17281         template.
17282
17283         * decl2.c (mark_used): Do instantiate inlines that have been
17284         explicitly instantiated.
17285
17286 2000-01-24  Richard Henderson  <rth@cygnus.com>
17287
17288         * call.c (build_over_call): Use expand_tree_builtin.
17289         * typeck.c (build_function_call_real): Likewise.
17290         (build_binary_op_nodefault): Handle unordered compares.
17291
17292 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
17293
17294         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
17295         cp_tree_index values.
17296         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
17297         New global node #defines for them.
17298         * rtti.c (call_void_fn): Replace with ...
17299         (build_runtime_decl): ... new static function.
17300         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
17301         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
17302         (build_dynamic_cast_1): Always produce correctly typed result.
17303         Explicitly produce type_info addresses. Use dynamic_cast_node.
17304         * exception.cc (__throw_bad_cast): Return `void *'.
17305         (__throw_bad_typeid): Return `const type_info &'.
17306
17307 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
17308
17309         * cp-tree.h (get_vtable_decl): Prototype new function.
17310         * class.c (get_vtable_decl): New function. Broken out from ...
17311         (build_vtable): ... here. Use it.
17312         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
17313         by get_vtable_decl.
17314
17315 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
17316
17317         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
17318         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
17319         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
17320         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
17321         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
17322         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
17323         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
17324         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
17325         (CPTI_TINFO_VAR_ID): New enumeration.
17326         (__tp_desc_type_node, __access_mode_type_node,
17327         __bltn_desc_type_node, __user_desc_type_node,
17328         __class_desc_type_node, __ptr_desc_type_node,
17329         __attr_desc_type_node, __func_desc_type_node,
17330         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
17331         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
17332         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
17333         enum_desc_type_node, class_desc_type_node,
17334         si_class_desc_type_node, vmi_class_desc_type_node,
17335         ptmd_desc_type_node, base_desc_type_node): New #defines.
17336         (tinfo_fn_id, tinfo_fn_type): Rename to ...
17337         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
17338         (tinfo_var_id): New enumeration.
17339         (DECL_TINFO_FN_P): Augment comment.
17340         * decl.c (cp_global_trees): Adjust documentation.
17341         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
17342         tinfo_decl_type and tinfo_var_id.
17343         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
17344         (build_typeid): Remove unused variable.
17345         (get_tinfo_var): Use tinfo_var_id.
17346         (tinfo_name): New static function.
17347         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
17348         (tinfo_from_decl): Likewise.
17349         (get_base_offset): New static function, broken out of
17350         expand_class_desc.
17351         (expand_si_desc): Use tinfo_name.
17352         (expand_class_desc): Likewise. Lose local static variable.
17353         Use base_desc_type_node. Use get_base_offset.
17354         (expand_ptr_desc): Use tinfo_name.
17355         (expand_attr_desc): Likewise.
17356         (expand_generic_desc): Likewise.
17357
17358         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
17359         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
17360
17361 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
17362
17363         * cp-tree.h (__eprintf): Remove declaration.
17364         * tree.c (__eprintf): Remove definition.
17365
17366 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
17367             Mark Mitchell  <mark@codesourcery.com>
17368
17369         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
17370         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
17371
17372 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
17373
17374         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
17375
17376 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
17377
17378         * cp-tree.h (register_dtor_fn): New function.
17379         * decl.c (destroy_local_static): Rename to ...
17380         (register_dtor_fn): ... this.  Give it external linkage.
17381         (expand_static_init): Use it.
17382         * decl2.c (do_static_initialization): Likewise, if using
17383         __cxa_atexit.
17384         (do_static_destruction): Check that __cxa_atexit is not in use.
17385         (finish_file): Don't call do_static_destruction if using
17386         __cxa_atexit.
17387
17388         * typeck.c (convert_arguments): Restore two-message error
17389         reporting.
17390
17391 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
17392
17393         Remap dynamic cast hint values to be consistent across ABIs.
17394         * search.c (dynamic_cast_base_recurse): Remap generated value.
17395         (get_dynamic_cast_base_type): Adjust documentation.
17396         * tinfo.h (__user_type_info::dyncast): Likewise.
17397         (__user_type_info::find_public_subobj): Remap BOFF meaning.
17398         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
17399         (__class_type_info::do_dyncast): Likewise.
17400         (__class_type_info::do_find_public_subobj): Likewise.
17401         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
17402
17403 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
17404
17405         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
17406
17407         * typeck2.c (incomplete_type_error): Restore previous
17408         cp_error and cp_error_at call sequence.
17409
17410 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
17411
17412         * class.c (dump_class_hierarchy): Make format agree with argument;
17413         cast pointer to unsigned long and print with %lx.
17414
17415 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
17416
17417         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
17418
17419         * typeck.c (composite_pointer_type, common_type,
17420         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
17421         build_function_call_real, convert_arguments,
17422         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
17423         build_unary_op, mark_addressable, build_compound_expr,
17424         build_static_cast, build_reinterpret_cast, build_const_cast,
17425         build_c_cast, build_modify_expr, get_delta_difference,
17426         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
17427         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
17428         into a single one.
17429         * typeck2.c (readonly_error, abstract_virtuals_error,
17430         process_init_constructor, check_for_new_type): Likewise.
17431
17432 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
17433
17434         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
17435         VAR_DECLs.
17436
17437 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
17438
17439         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
17440         (build_x_typeid): Likewise.
17441         (get_tinfo_fn): Likewise.
17442         (get_tinfo_fn_unused): Rename to ...
17443         (get_tinfo_decl): ... here.
17444         * rtti.c (build_headof): Replace logic error with assertion.
17445         (get_tinfo_fn_dynamic): Rename to ...
17446         (get_tinfo_decl_dynamic): ... here. Make static. Use
17447         complete_type_or_else.
17448         (build_x_typeid): Move into ...
17449         (build_typeid): ... here. Adjust call to
17450         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
17451         throw_bad_typeid expression.
17452         (get_tinfo_fn_unused): Rename to ...
17453         (get_tinfo_decl): ... here. Adjust comment.
17454         (get_tinfo_fn): Delete.
17455         (tinfo_from_decl): New static function.
17456         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
17457         (get_typeid): Use complete_type_or_else.
17458         (build_dynamic_cast_1): Adjust calls to
17459         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
17460         * parse.y (primary): Adjust call to build_typeid.
17461         * except.c (build_eh_type_type_ref): Adjust call to
17462         get_tinfo_decl. Mark as used.
17463         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
17464         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
17465         * parse.c: Regenerated.
17466
17467 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
17468
17469         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
17470         calling convention.
17471         (resolves_to_fixed_type_p): Document calling convention.
17472         * rtti.c (build_x_typeid): Initialize NONNULL.
17473
17474         * cp-tree.h (build_shared_int_cst): New function.
17475         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
17476         * class.c (modify_vtable_entry): Likewise.
17477         (add_virtual_function): Split out code to generated shared
17478         INTEGER_CSTs to build_share_int_cst.
17479         (modify_all_vtables): Handle all the overridden functions here.
17480         Add overridden functions from non-primary virtual bases to the
17481         primary vtable.
17482         (finish_struct_1): Adjust call to modify_all_vtables.  Add
17483         overridden functions from non-primary bases to the vtable.
17484         * tree.c (build_shared_int_cst): New function.
17485
17486         * cp-tree.h (scratchalloc): Remove.
17487         (build_scratch_list): Likewise.
17488         * call.c (convert_class_to_reference): Replace build_scratch_list
17489         and build_expr_list with build_tree_list.
17490         (add_candidate): Replace scratchalloc with expralloc.  Note memory
17491         leak.
17492         (build_user_type_conversion_1):  Replace build_scratch_list
17493         and build_expr_list with build_tree_list.
17494         (build_new_op): Likewise.
17495         (build_op_delete_call): Likewise.
17496         (convert_like): Likewise.
17497         * cvt.c (ocp_convert): Likewise.
17498         * decl.c (start_decl): Likewise.
17499         (start_function): Likewise.
17500         (finish_destructor_body): Likewise.
17501         (maybe_build_cleanup_1): Likewise.
17502         * decl2.c (reparse_decl_as_expr): Likewise.
17503         * init.c (perform_member_init): Likewise.
17504         (expand_cleanup_for_base): Likewise.
17505         (build_builtin_delete_call): Likewise.
17506         (build_new_1): Likewise.
17507         (build_delete): Likewise.
17508         * method.c (do_build_assign_ref): Likewise.
17509         * parse.y (already_scoped_stmt): Likewise.
17510         (nontrivial_exprlist): Likewise.
17511         (net_initializer): Likewise.
17512         (initlist): Likewise.
17513         * parse.c: Regenerated.
17514         * rtti.c (build_x_typeid): Likewise.
17515         (build_dynamic_cast_1): Likewise.
17516         * typeck.c (build_x_compound_expr): Likewise.
17517         (build_static_cast): Likewise.
17518         (build_modify_expr): Likewise.
17519
17520         * cp-tree.h (DECL_VINDEX): Add documentation.
17521         * class.c (build_vtable_entry): Likewise.
17522         (start_vtable): Add comment.
17523         (add_virtual_function): Replace pending_hard_virtuals with
17524         overridden_virtuals and pending_virtuals with new_virtuals.
17525         Replace redundant assignments with assertions.
17526         (check_for_override): Add comment.
17527         (check_bases_and_members): Replace pending_hard_virtuals with
17528         overridden_virtuals and pending_virtuals with new_virtuals.
17529         (create_vtbl_ptr): Likewise.
17530         (layout_class_type): Likewise.
17531         (finish_struct_1): Likewise.  Add comments.
17532
17533 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
17534
17535         * class.c (finish_struct_1): Replace redundant code with
17536         assertions.
17537
17538         * cp-tree.h (flag_new_abi): Move.
17539         (flag_use_cxa_atexit): Likewise.
17540         (flag_honor_std): Likewise.
17541         (flag_rtti): Likewise.
17542         (vbase_offsets_in_vtable_p): Define.
17543         (vptrs_present_everywhere_p): Likewise.
17544         (TYPE_CONTAINS_VPTR_P): Likewise.
17545         (dfs_walk_real): Declare.
17546         * class.c (build_vbase_pointer_fields): Check
17547         vbase_offsets_in_vtable_p.
17548         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
17549         BINFO_VPTR_FIELD.
17550         (build_vbase_offset_vtbl_entries): Simplify.
17551         (build_vbase_offset_vtbl_entries): Adjust.
17552         (build_vbase_pointer): Add ability to look up vbase offsets in
17553         vtable.
17554         (start_vtable): New function.
17555         (add_virtual_function): Use it.
17556         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
17557         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
17558         (build_vtbl_initializer): Take the type of the complete object as
17559         input.  Use it to correctly calculate vbase offsets.
17560         (dfs_finish_vtbls): Pass the complete type to
17561         build_vtbl_initializer.
17562         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
17563         (create_vtable_ptr): Create a vtable even if there are no
17564         new virtual functions, under the new ABI.
17565         (finish_struct_1): Likewise.
17566         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
17567         * decl.c (exapnd_static_init): Remove call to
17568         preserve_initializer.
17569         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
17570         vtables.
17571         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
17572         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
17573         (construct_virtual_bases): Don't initialize virtual base pointers
17574         under the new ABI.
17575         (build_aggr_init): Clean up comment.
17576         (expand_aggr_init_1): Likewise.
17577         * rtti.c (expand_class_desc): Store the virtual function table
17578         index where the vbase offset lives in the offset field.
17579         * search.c (dfs_walk_real): Make it global.
17580         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
17581         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
17582
17583         * tinfo.h (USItype): Make it signed under the new ABI.
17584         * tinfo.cc (convert_to_base): New function.  Encapsulate base
17585         conversion logic here.
17586         (__class_type_info::do_upcast): Use it.
17587         (__class_type_info::do_dyncast): Likewise.
17588         (__class_type_info::do_find_public_subobj): Likewise.
17589
17590         * init.c (construct_virtual_bases): Don't look up the addresses of
17591         virtual bases at run-time.
17592
17593         * class.c (build_vbase_pointer): Relocate.
17594         (build_vbase_pointer_fields): Likewise.
17595         (dfs_build_vbase_offset_vtbl_entries): Likewise.
17596         (build_vbase_offset_vtbl_entries): Likewise.
17597
17598         * decl.c (init_decl_processing): Complain if -fnew-abi
17599         -fno-vtable-thunks is used.
17600
17601         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
17602         flag_new_abi.
17603
17604 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
17605
17606         * cp-tree.h (num_extra_vtbl_entries): New function.
17607         (size_extra_vtbl_entries): Likewise.
17608         (dfs_vtable_path_unmark): Likewise.
17609         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
17610         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
17611         * class.c (num_extra_vtbl_entries): New function.
17612         (size_extra_vtbl_entries): Likewise.
17613         (dfs_build_vbase_offset_vtbl_entries): New function.
17614         (build_vbase_offset_vtbl_entries): Likewise.
17615         (build_vtbl_initializer): Use it.
17616         (finish_struct_1): Adjust vtable sizes (using
17617         num_extra_vtbl_entries).
17618         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
17619         THUNK_DECL is non-NULL before expanding it.
17620         * init.c (expand_virtual_init): Adjust the vtable pointer by
17621         size_extra_vtbl_entries before storing it.
17622         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
17623         Handle TREE_LIST parameters here, not in the dfs_* functions.
17624         (dfs_unmarked_real_bases_queue_p): Adjust.
17625         (dfs_marked_real_bases_queue_p): Likewise.
17626         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
17627         (dfs_vtable_path_marked_real_bases_queue_p): New function.
17628         (dfs_vtable_path_unmark): Likewise.
17629
17630 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
17631
17632         * optimize.c (copy_body_r): Clear the operand three of a
17633         TARGET_EXPR when copying it.
17634
17635 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17636
17637         * method.c (build_decl_overload_real): Check whether we are in ::
17638         before returning __builtin_new/delete.
17639
17640 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
17641
17642         * pt.c (tsubst_friend_function): Improve comment.
17643         (instantiate_decl): Avoid crashing when a "nested" function is
17644         instantiated from the top level.
17645
17646         * dump.c (dqeueue_and_dump): Dump
17647         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
17648
17649 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17650
17651         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
17652
17653 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
17654
17655         * g++spec.c (lang_specific_driver): Add -fnew-abi if
17656         ENABLE_NEW_GXX_ABI defined.
17657         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
17658         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
17659         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
17660
17661 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
17662
17663         * decl.c (start_cleanup_fn): Call pushdecl.
17664
17665         * call.c (convert_class_to_reference): Fix typos.
17666         (build_conditional_expr): Handle errors gracefully.
17667         * class.c (push_nested_class): Likewise.
17668         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
17669         (DECL_THIS_EXTERN): Use it.
17670         (DECL_THIS_STATIC): Likewise.
17671         * cvt.c (convert_to_void): Handle errors gracefully.
17672         (build_expr_type_conversion): Likewise.
17673         * decl.c (maybe_push_decl): Likewise.
17674         (start_decl_1): Likewise.
17675         (require_complete_types_for_parms): Likewise.
17676         * parse.y (structsp): Likewise.
17677         (base_class): Likewise.
17678         * parse.c: Regenerated.
17679         * pt.c (finish_member_template_decl): Likewise.
17680         * typeck.c (decay_conversion): Likewise.
17681
17682         * cp-tree.h (dfs_skip_vbases): New function.
17683         (find_vbase_instance): Likewise.
17684         * class.c (determine_primary_base): Allow a nearly empty base to
17685         serve as a primary base class under the new ABI.
17686         (get_class_offset_1): Rename to ...
17687         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
17688         messages here.
17689         (get_class_offset): Use it.  Issue error messages here.
17690         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
17691         find the right copies of virtual bases.
17692         (fixup_vtable_deltas1): Rename to ...
17693         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
17694         bases as primary bases.
17695         (fixup_vtable_deltas): Remove.
17696         (override_one_vtable): Handle virtual bases as primary bases.
17697         (merge_overrides): Likewise.
17698         (finish_struct_1): Likewise.
17699         (dump_class_hierarchy): Dump primary-ness of bases as well.
17700         * search.c (mark_primary_bases): Use a pre-order traversal to
17701         handle primary virtual bases.
17702         (dfs_skip_vbases): New fiunction.
17703         (expand_upcast_fixups): Adjust to handle primary virtual bases.
17704         (fixup_virtual_upcast_offsets): Likewise.
17705         (fixup_all_virtual_upcast_offsets): Likewise.
17706         (dfs_find_vbase_instances): New function.
17707         (find_vbase_instance): Likewise.
17708
17709 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
17710
17711         * lex.c (DIR_SEPARATOR): Delete macro.
17712
17713 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
17714
17715        * decl2.c (lang_decode_option): Handle automatic line wrapping
17716        option.
17717
17718 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
17719
17720         * friend.c (do_friend): Don't resolve scopes when processing
17721         template declarations, even if the qualifying scope doesn't
17722         involve template parameters.
17723
17724 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
17725
17726         * class.c (dfs_modify_vtables_queue_p): Remove.
17727         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
17728         and dfs_marked_real_bases_queue_p instead of
17729         dfs_modify_vtables_queue_p.
17730
17731         * class.c (build_vbase_path): Simplify.
17732         (dfs_propagate_binfo_offsets): New function.
17733         (propagate_binfo_offsets): Use it.
17734         (remove_base_field): Simplify.
17735         (dfs_set_offset_for_vbases): Remove.
17736         (dfs_set_offset_for_shared_vbases): New function.
17737         (dfs_set_offset_for_unshared_vbases): Likewise.
17738         (layout_virtual_bases): Use them.
17739         (layout_basetypes): Don't call propagate_binfo_offsets.
17740         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
17741         for the vbases.
17742
17743         * class.c (build_base_field): New function, split out from ...
17744         (build_base_fields): ... here.  Use it.  Allocate primary bases
17745         first, under the new ABI.
17746         (get_vtable_entry): Remove.
17747         (remove_base_field): New function, split out from ...
17748         (remove_base_fields): ... here.  Adjust since primary bases come
17749         first under the new ABI.
17750
17751         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
17752         (initialize_vtbl_ptrs): New function.
17753         (expand_indirect_vtbls_init): Change prototype.
17754         (convert_pointer_to_vbase): Declare.
17755         * init.c (expand_direct_vtbls_init): Remove.
17756         (dfs_initialize_vtbl_ptrs): New function.
17757         (initialize_vtbl_ptrs): Likewise.
17758         (emit_base_init): Use initialize_vtbl_ptrs.
17759         * search.c (convert_pointer_to_vbase): Make it global.
17760         (expand_indirect_vtbls_init): Remove vtable initialization code.
17761         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
17762
17763         * class.c (dfs_finish_vtbls): New function.
17764         (finish_vtbls): Use it.
17765         (dump_class_hierarchy): New function.
17766
17767         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
17768         (BINFO_VBASE_PRIMARY_P): New macro.
17769         (BINFO_VIRTUALS): Add to documentation.
17770         (SET_BINFO_PRIMARY_MARKED_P): Remove.
17771         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17772         (dfs_mark_primary_bases_queue_p): Likewise.
17773         (dfs_unmarked_real_bases_queue_p): New function.
17774         (dfs_marked_real_bases_queue_p): Likewise.
17775         * search.c (dfs_mark_primary_bases): Adjust.
17776         (mark_primary_bases): Likewise.
17777         (get_shared_vbase_if_not_primary): New function.
17778         (dfs_unmarked_real_bases_queue_p): Likewise.
17779         (dfs_marked_real_bases_queue_p): Likewise.
17780         (dfs_get_pure_virtuals): Simplify.
17781         (get_pure_virtuals): Likewise.
17782
17783 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17784
17785         * lex.c: Include tm_p.h.
17786
17787 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
17788
17789         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
17790
17791 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
17792
17793         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
17794         * pt.c (instantiate_decl): Defer comdat templates that might not be
17795         needed.
17796
17797         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
17798         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
17799         (finish_file): Likewise.
17800
17801         * decl2.c (import_export_class): Undo 12/14 change.
17802
17803         * error.c (dump_decl): operator new, not operatornew.
17804
17805         * class.c (field_decl_cmp): A nontype is "greater" than a type.
17806         * search.c (lookup_field_1): Look for the last field with the
17807         desired name.
17808
17809 2000-01-05  Nathan Sidwell  <nathan@acm.org>
17810
17811         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
17812         FUNCTION_DECL.
17813
17814 2000-01-05  Nathan Sidwell  <nathan@acm.org>
17815
17816         * typeck.c (build_static_cast): Don't strip target qualifiers
17817         when casting from a class.
17818
17819 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17820
17821         * class.c (warn_hidden): Initialize variable `fndecl'.
17822
17823 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
17824
17825         * decl.c (flag_isoc9x): New variable to be able to use code in
17826         c-common.c.  For now always zero.
17827
17828 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
17829
17830         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
17831         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
17832         or unshare_base_binfos for virtual bases here.
17833         * search.c (dfs_get_vbase_types): Do it here.
17834         (get_vbase_types): Adjust.
17835
17836 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
17837
17838         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
17839         (BINFO_PRIMARY_MARKED_P): Use flag 5.
17840         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
17841         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17842         (unmark_primary_bases): Remove declaration.
17843         (unmarkedp): Declare.
17844         (dfs_vbase_unmark): Likewise.
17845         * class.c (determine_primary_base): Return immediately if there
17846         are no base classes.  Call mark_primary_bases here.
17847         (modify_all_direct_vtables): Remove.
17848         (modify_all_indirect_vtables): Remove.
17849         (dfs_modify_vtables_queue_p): New function.
17850         (dfs_modify_vtables): New function.
17851         (modify_all_vtables): Use them.
17852         (build_base_fields): Build FIELD_DECLs for primary virtual base
17853         classes.
17854         (create_vtable_ptr): Don't call determine_primary_base here.
17855         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
17856         (dfs_set_offset_for_vbases): ... this.
17857         (layout_virtual_bases): Use it.
17858         (layout_class_type): Call determine_primary_base here.
17859         * search.c (unmarkedp): Make it global.
17860         (shared_marked_p): Simplify.
17861         (shared_unmarked_p): Likewise.
17862         (dfs_primary_bases_queue_p): Remove.
17863         (dfs_unmark_primary_bases): Likewise.
17864         (unmark_primary_bases): Likewise.
17865         (mark_primary_bases): Simplify.
17866         (get_pure_virtuals): Don't call mark_primary_bases here.
17867         (dfs_vbase_unmark): New function.
17868         (get_vbase_types): Simplify.
17869
17870         * class.c (struct base_info): Remove.
17871         (determine_primary_base): Take has_virtual_p rather than a
17872         base_info as input.  Don't calculate max_has_virtual.
17873         (finish_struct_bits): Remove max_has_virtual argument.
17874         (create_vtable_ptr): Remove max_has_virtual_p argument.
17875         (layout_virtual_bases): Remove max argument.
17876         (layout_basetypes): Likewise.
17877         (layout_class_type): Remove max_has_virtual_p argument.
17878         (finish_struct_1): Remove max_has_virtual.
17879
17880         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
17881         (layout_basetypes): Remove.
17882         * class.c (propagate_binfo_offsets): Moved here from tree.c.
17883         Update to handle primary virtual bases.
17884         (remove_base_fields): New function, split out from
17885         layout_basetypes.
17886         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
17887         (layout_virtual_bases): New function, split out from
17888         layout_basetypes.  Update to handle primary virtual bases.
17889         (layout_basetypes): Moved here from tree.c.  Use
17890         remove_base_fields and layout_virtual_bases.
17891         * search.c (dfs_mark_primary_bases_queue_p): New function.
17892         (mark_primary_bases): Use it.
17893         * tree.c (CEIL): Remove.
17894         (propagate_binfo_offsets): Remove.
17895         (layout_basetypes): Remove.
17896
17897 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
17898
17899         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
17900         (BINFO_PRIMARY_MARKED_P): New macro.
17901         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
17902         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17903         (mark_primary_bases): New function.
17904         (unmark_primary_bases): Likewise.
17905         * search.c (get_abstract_virtuals_1): Remove.
17906         (dfs_mark_primary_bases): New function.
17907         (mark_primary_bases): Likewise.
17908         (dfs_unmark_primary_bases): Likewise.
17909         (unmark_primary_bases): Likewise.
17910         (dfs_get_pure_virtuals): Likewise.
17911
17912 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
17913
17914         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
17915         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
17916         (modify_one_vtable): Adjust.
17917         (fixup_vtable_deltas1): Likewise.
17918         (override_one_vtable): Likewise.
17919         * search.c (get_abstract_virtuals_1): Likewise.
17920         (get_pure_virtuals): Likewise.
17921         (expand_upcast_fixups): Likewise.
17922         * tree.c (debug_binfo): Likewise.
17923
17924         * class.c (build_vtable): Don't return a value.  Don't rebuild
17925         vtables for bases that have already been handled.
17926         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
17927         already been handled.
17928         (modify_one_vtable): Adjust accordingly.
17929         (fixup_vtable_deltas1): Likewise.
17930         (finish_struct_1): Likewise.
17931
17932 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17933
17934         * call.c (build_new_method_call): Also check destructors.