OSDN Git Service

cp:
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
2
3         PR c++/10224
4         * pt.c (lookup_template_class): Only check instantiated args if
5         they do not contain template parameters.
6
7 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
8
9         PR c++/10158
10         * parser.c (cp_parser_function_definition): Set
11         DECL_INITIALIZED_IN_CLASS for members.
12         * pt.c (instantiate_decl): Only reduce the template args for
13         friends that are not defined in class.
14
15 2003-03-25  Jason Merrill  <jason@redhat.com>
16
17         * call.c (print_z_candidate): Change name of first arg to msgid.
18         (joust): Add comment for translators.
19
20 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
21         
22         PR c++/9898, PR c++/383, DR 322
23         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
24         through reference types on both PARM and ARG.
25
26 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
27
28         PR c++/10119
29         * error.c (dump_expr) <BASELINK>: Use dump_expr.
30         * pt.c (maybe_fold_nontype_args): New function.
31         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
32         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
33         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
34         maybe_fold_nontype_args.
35
36 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
37
38         PR c++/10026
39         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
40
41 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
42
43         PR c++/7086
44         * typeck.c (cxx_mark_addressable):  Adjust call to
45         gen_mem_addressof or put_var_into_stack.
46
47 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
48
49         PR c++/9978, c++/9708
50         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
51         * call.c (add_template_candidate_real): Adjust
52         instantiate_template call.
53         * class.c (resolve_address_of_overloaded_function): Likewise.
54         * decl.c (build_enumerator): Set TREE_CONSTANT.
55         * pt.c (check_instantiated_args): New.
56         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
57         TREE_READONLY.
58         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
59         (reduce_template_parm_level): Likewise.
60         (process_template_parm): Likewise.
61         (check_explicit_specialization): Adjust instantiate_template call.
62         (convert_template_argument): Don't check non-type argument here.
63         (lookup_template_class): Check them here.
64         (tsubst_friend_function): Adjust instantiate_template call.
65         (instantiate_template): Add tsubst_flags parameter, use it. Check
66         instantiated args.
67
68 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
69
70         * decl.c: Update calls to shadow_warning.
71
72 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
73
74         PR c++/9898
75         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
76         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
77
78 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
79
80         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
81         friends.
82         * cp/pt.c (instantiate_class_template): Fix formatting.
83
84 2003-03-14  Matt Austern  <austern@apple.com>
85
86         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
87         (unemitted_tinfo_decl_p): Remove.
88         (emit_tinfo_decl): Change declaration to remove unused parameter.
89         * decl2.c (finish_file): Change tinfo emission to loop through
90         unemitted_tinfo_decls array instead of looping through all decls.
91         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
92         unused second parameter.
93         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
94         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
95         (emit_tinfo_decl): remove unused second parameter, add assertion
96         that decl hasn't already been emitted.
97
98 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
99
100         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
101         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
102         return statements.
103
104 2003-03-19  Jason Merrill  <jason@redhat.com>
105
106         PR c++/8316, c++/9315, c++/10136
107         * call.c (print_z_candidate): Split out from...
108         (print_z_candidiates): ...here.
109         (joust): Use it.
110
111 2003-03-17  Roger Sayle  <roger@eyesopen.com>
112
113         PR c++/10031
114         * decl.c (duplicate_decls): Use the new type when prototyping
115         anticipated decls, even when the types match.  This defines the
116         exception list for the built-in function.
117
118 2003-03-17  Jason Merrill  <jason@redhat.com>
119
120         PR c++/10091
121         * typeck.c (build_class_member_access_expr): Compare
122         TYPE_MAIN_VARIANTs.
123
124 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
125
126         PR c++/9639
127         * parser.c (cp_parser_declarator_id): Clear parser->scope.
128
129 2003-03-16  Jason Merrill  <jason@redhat.com>
130
131         PR c++/9993
132         * decl.c (finish_function): Only allow the NRVO to use variables
133         declared at function scope.
134
135 2003-03-17  Andreas Jaeger  <aj@suse.de>
136
137         * Make-lang.in (cp/TAGS): Remove.
138
139 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
140
141         PR c++/9629
142         * cp-tree.h (struct language_function): Add in_base_initializer.
143         (in_base_initializer): define it.
144         (expand_member_init): Remove INIT param.
145         * init.c (expand_member_init): Remove INIT param, return the member.
146         (emit_mem_initializers): Set in_base_initializer.
147         * class.c (build_base_path): Check in_base_initializer.
148         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
149         * pt.c (tsubst_initializer_list): Likewise.
150
151 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
152
153         * decl.c (binding_for_name): Fix initialization thinko.
154
155 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
156
157         Compile-time improvement: 2/n.
158         * cp-tree.h (struct cxx_binding): New datatype;
159         (struct lang_identifier): Use it.
160         (LOCAL_BINDING_P): Adjust definition.
161         (INHERITED_VALUE_BINDING_P): Likewise.
162         (BINDING_SCOPE): Likewise.
163         (BINDING_HAS_LEVEL_P): Likewise.
164         (BINDING_VALUE): Likewise.
165         (BINDING_TYPE): Likewise.
166         (IDENTIFIER_VALUE): Likewise.
167         (struct tree_binding): Remove.
168         (TS_CP_BINDING): Likewise.
169         ((union lang_tree_node): Remove field "binding".
170         (cxx_binding_clear): New macro.
171         (binding_for_name): Adjust return type.
172         (qualified_lookup_using_namespace): Adjust prototype.
173         (lookup_using_namespace): Adjust prototype.
174         (cxx_scope_find_binding_for_name): Declare.
175         * cp-tree.def: Remove CPLUS_BINDING definition.
176         * decl.c (push_binding): Adjust local variable type.
177         (add_binding): Likewise.
178         (push_class_binding): Likewise.
179         (pop_binding): Likewise.
180         (poplevel): Likewise.
181         (poplevel_class): Likewise.
182         (free_bindings):  Adjust type.
183         (find_binding): Adjust return type, add a third parameter. Remove
184         non-useful assertion now that we use static typing.
185         (cxx_scope_find_binding_for_name): New function.
186         (binding_for_name): Use it.  Adjust local variable type. Simplify.
187         (namespace_binding):  Simplify.
188         (set_namespace_binding): Likewise.
189         (set_identifier_type_value_with_scope): Adjust local variable type.
190         (lookup_tag): Don't type-abuse of local variable 'old'.
191         (lookup_namespace_name): Likewise.  Allocate binding on stack.
192         (select_decl): Adjust prototype.
193         (unqualified_namespace_lookup):  Allocate binding on stack.
194         Don't type-abuse of local variable 'val'.
195         (lookup_name_real): Likewise.
196         (maybe_inject_for_scope_var): Adjust local variable type.
197         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
198         (namespace_binding): Adjust logic, simplify.
199         (BINDING_LEVEL): Adjust definition.
200         (push_class_level_binding): Adjust local variable type.
201         (struct cxx_saved_binding): Adjust field 'binding' type.
202         * decl2.c (ambiguous_decl): Adjust prototype.
203         (lookup_using_namespace): Adjust local variable type.
204         (qualified_lookup_using_namespace): Catch type error and correct
205         ensueing logic error.
206         (do_nonmember_using_decl): Adjust local variable type.  Allocate
207         temporary cxx_binding on stack.
208         (do_toplevel_using_decl): Adjust local variable type.
209         * ptree.c (cxx_print_cxx_binding): New function.
210         (cxx_print_identifier): Use it.
211         (cxx_print_xnode): Delete CPLUS_BINDING case label.
212
213 2003-03-15  Roger Sayle  <roger@eyesopen.com>
214
215         * tree.c (count_functions): Fix whitespace.
216
217 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
218
219         * Make-lang.in: Update.
220
221 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
222
223         PR c++/6440
224         * pt.c (maybe_process_partial_specialization): Handle
225         member class template when enclosing class template is
226         explicit specialized.
227         (most_general_template): Stop looking when DECL is already
228         specialized.
229
230 2003-03-13  Jason Merrill  <jason@redhat.com>
231
232         PR c++/9420
233         * search.c (lookup_conversions): Call complete_type here.
234         * call.c (implicit_conversion): Not here.
235
236 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
237
238         * decl2.c (do_nonmember_using_decl): Correct handling of
239         simultaneous type/non-type bindings.
240
241         * call.c (initialize_reference): Remove bogus assertion.
242         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
243
244 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
245
246         PR c++/7050
247         * expr.c (cxx_expand_expr): Return const0_rtx for throw
248         expressions.
249
250 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
251
252         PR c++/9474
253         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
254         to merge old and new declarations.
255
256 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
257
258         * g++.1: Remove.
259         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
260         (cp/g++.1): Build it from scratch in the build tree.
261         (c++.install-man): Depend on it.  Install it from the build tree.
262         (c++.mostlyclean): Clean it.
263
264 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
265
266         PR c++/9474
267         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
268         to merge old and new declarations.
269
270         PR c++/9924
271         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
272
273 2003-03-11  Jason Merrill  <jason@redhat.com>
274
275         PR c++/9820
276         * search.c (lookup_member): Fix handling of functions in a class
277         being defined.
278
279 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
280
281         PR c++/8700
282         * call.c (convert_class_to_reference): Adjust usage of
283         splice_viable.
284         (any_viable): Remove.
285         (splice_viable): Combine with any_viable.
286         (print_z_candidates): Avoid printing duplicates.
287         (build_user_type_conversion_1): Adjust usage of splice_viable.
288         (build_new_function_call): Likewise.
289         (build_operator_new_call): Likewise.
290         (build_object_call): Likewise.
291         (build_conditional_expr): Likewise.
292         (build_new_op): Likewise.
293         (build_new_method_call): Likewise.
294         (joust): Remove spurious comment.
295         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
296         * decl2.c (arg_assoc_class): Simplify.
297         * friend.c (add_friend): Likewise.
298
299 2003-03-11  Jason Merrill  <jason@redhat.com>
300
301         PR c++/8660
302         * decl2.c (check_classfn): A member template only matches a
303         member template.
304
305 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
306
307         * Make-lang.in (CXX_C_OBJS): Update.
308         * lang-specs.h: Don't define __GNUG__ here.
309
310 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
311
312         * call.c (perform_overload_resolution): New function.
313         (build_new_function_call): Use it.
314         (build_operator_new_call): Likewise.
315         (add_candidates): Add explicit_targs and template_only parameters.
316         (build_new_op): Adjust accordingly.
317         * cp-tree.h (build_operator_new_call): New function.
318         (build_function_call_real): Remove.
319         (build_function_call_maybe): Likewise.
320         * init.c (build_new_1): Use build_operator_new_call.
321         * typeck.c (build_function_call_real): Rename to ...
322         (build_function_call): ... this.
323
324 2003-03-10  Devang Patel  <dpatel@apple.com>
325
326         PR c++/9394
327         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
328
329 2003-03-10  Jason Merrill  <jason@redhat.com>
330
331         PR c++/9798
332         * decl.c (push_using_directive): Push before recursing.
333
334         PR c++/9868, c++/9524
335         * call.c (resolve_scoped_fn_name): Handle the case of a function
336         pointer member.
337
338         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
339         argument in the pointer-to-member case.
340
341 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
342
343         PR c++/9373
344         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
345         pointers to member functions.
346
347         PR c++/8534
348         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
349         in pointer-to-member-function types.
350
351 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
352
353         * expr.c (cplus_expand_constant): Use C90 prototype style.
354         (cxx_expand_expr): Likewise.
355
356 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
357
358         PR c++/9970
359         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
360         functions.
361
362 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
363
364         * lang-specs.h (c++-header): Change .pch to .gch.
365
366 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
367
368         * cp-tree.h (cxx_init): Update prototype.
369         * lex.c (cxx_init): Similarly.
370
371 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
372
373         PR c++/9823
374         * cp-tree.h (begin_mem_initializers): Remove.
375         * parser.c (cp_parser_mem_initializer_list): Inline it here.
376         Do not call finish_mem_initializers if not in a constructor.
377         (cp_parser_class_head): Fix typo in error message.
378         * semantics.c (begin_mem_initializers): Remove.
379         * testsuite/g++.dg/parser/constructor1.C: New test.
380
381         PR c++/9809
382         * call.c (add_function_candidate): Skip builtin fuctions that have
383         not yet been declared.
384
385         PR c++/9982
386         * init.c (build_new_1): Correct logic for determining whether or
387         not to use an array cookie.
388
389         PR c++/9524
390         * parser.c (cp_parser_postfix_expression): Call
391         finish_non_static_data_member, even when processing_template_decl.
392
393         PR c++/9912
394         * cp-tree.h (is_ancestor): New function.
395         (handle_class_head): Change prototype.
396         * decl2.c (is_namespace_ancestor): Rename to ...
397         (namespace_anecestor): ... this.
398         (set_decl_namespace): Adjust accordingly.
399         (handle_class_head): Remove unncessary parameters.
400         * parser.c (cp_parser_class_head): Check that
401         nested-name-specifiers are used appropriately.
402
403 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
404
405         * call.c (reference_binding): Remove REF_IS_VAR parameter.
406         (implicit_conversion): Adjust call to reference_binding.
407         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
408         (initialize_reference): Adjust handling for references bound to
409         rvalues.
410         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
411         prototype.
412         (real_non_cast_lvalue_p): New method.
413         * cvt.c (build_up_reference): Adjust use of
414         make_temporary_var_for_ref_to_temp.
415         * tree.c (real_non_cast_lvalue_p): New method.
416
417 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
418
419         * except.c (init_exception_processing): Use C90 prototype style.
420         (cp_protect_cleanup_actions): Likewise.
421         (prepare_eh_type): Likewise.
422         (build_eh_type_type): Likewise.
423         (build_exc_ptr): Likewise.
424         (do_begin_catch): Likewise.
425         (dtor_nothrow): Likewise.
426         (do_end_catch): Likewise.
427         (push_eh_cleanup): Likewise.
428         (decl_is_java_type): Likewise.
429         (choose_personality_routine): Likewise.
430         (initialize_handler_parm): Likewise.
431         (expand_start_catch_block): Likewise.
432         (expand_end_catch_block): Likewise.
433         (begin_eh_spec_block): Likewise.
434         (finish_eh_spec_block): Likewise.
435         (do_allocate_exception): Likewise.
436         (do_free_exception): Likewise.
437         (wrap_cleanups_r): Likewise.
438         (stabilize_throw_expr): Likewise.
439         (build_throw): Likewise.
440         (complete_ptr_ref_or_void_ptr_p): Likewise.
441         (is_admissible_throw_operand): Likewise.
442         (nothrow_libfn_p): Likewise.
443         (can_convert_eh): Likewise.
444         (check_handlers_1): Likewise.
445         (check_handlers): Likewise.
446
447 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
448
449         * call.c (merge_conversion_sequences): New function.
450         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
451         (convert_class_to_reference): Correct handling of second
452         standard conversion sequence in a user-defined conversion
453         sequence.
454         (build_user_type_conversion_1): Use merge_conversion_sequences.
455         * cp-tree.def: Add comments for CONV nodes.
456         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
457
458 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
459
460         * error.c (init_error): Use C90 prototype style.
461         (dump_scope): Likewise.
462         (dump_qualifiers): Likewise.
463         (dump_template_argument): Likewise.
464         (dump_template_argument_list): Likewise.
465         (dump_template_parameter): Likewise.
466         (dump_template_bindings): Likewise.
467         (dump_type): Likewise.
468         (dump_typename): Likewise.
469         (class_key_or_enum): Likewise.
470         (dump_aggr_type): Likewise.
471         (dump_type_prefix): Likewise.
472         (dump_type_suffix): Likewise.
473         (dump_global_iord): Likewise.
474         (dump_simple_decl): Likewise.
475         (dump_decl): Likewise.
476         (dump_template_decl): Likewise.
477         (dump_function_decl): Likewise.
478         (dump_parameters): Likewise.
479         (dump_exception_spec): Likewise.
480         (dump_function_name): Likewise.
481         (dump_template_parms): Likewise.
482         (dump_char): Likewise.
483         (dump_expr_list): Likewise.
484         (dump_expr): Likewise.
485         (dump_binary_op): Likewise.
486         (dump_unary_op): Likewise.
487         (type_as_string): Likewise.
488         (expr_as_string): Likewise.
489         (decl_as_string): Likewise.
490         (context_as_string): Likewise.
491         (lang_decl_name): Likewise.
492         (cp_file_of): Likewise.
493         (cp_line_of): Likewise.
494         (decl_to_string): Likewise.
495         (expr_to_string): Likewise.
496         (fndecl_to_string): Likewise.
497         (code_to_string): Likewise.
498         (language_to_string): Likewise.
499         (parm_to_string): Likewise.
500         (op_to_string): Likewise.
501         (type_to_string): Likewise.
502         (assop_to_string): Likewise.
503         (args_to_string): Likewise.
504         (cv_to_string): Likewise.
505         (cxx_print_error_function): Likewise.
506         (cp_diagnostic_starter): Likewise.
507         (cp_diagnostic_finalizer): Likewise.
508         (cp_print_error_function): Likewise.
509         (function_category): Likewise.
510         (print_instantiation_full_context): Likewise.
511         (print_instantiation_partial_context): Likewise.
512         (maybe_print_instantiation_context): Likewise.
513         (print_instantiation_context): Likewise.
514         (cp_printer): Likewise.
515         (print_integer): Likewise.
516         (print_non_consecutive_character): Likewise.
517         (locate_error): Likewise.
518
519 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
520
521         PR c++/9965
522         * call.c (reference_binding): Add ref_is_var parameter.
523         (implicit_conversion): Adjust call to reference_binding.
524         (initialize_reference): Likewise.
525
526         PR c++/9400
527         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
528         PARM_DECLs.
529
530         PR c++/9791
531         * class.c (get_basefndecls): Use lookup_fnfields_1.
532
533 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
534
535         PR c++/9188
536         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
537         in error message.
538         (cp_parser_single_declaration): Likewise.
539
540 2003-03-05  Jason Merrill  <jason@redhat.com>
541
542         PR c++/9440
543         * call.c (build_conditional_expr): Use convert rather than an
544         explicit NOP_EXPR.
545
546 2003-03-02  Matt Austern  <austern@apple.com>
547
548         * decl.c (cp_binding_level): Add static_decls varray member.
549         (add_decl_to_level): Add static/inline namespace scope
550         declarations to static_decls array.
551         (wrapup_global_for_namespace): Pass static_decls only, instead of
552         all decls, to wrapup_global_declarations/check_global_declarations.
553         (push_namespace): Initialize static_decls for ordinary namespaces.
554         (cxx_init_decl_processing): Initialize static_decls for global
555         namespace.
556
557 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
558
559         * class.c (end_of_class): Correct thinko.
560
561 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
562
563         * config-lang.in: Replace ${libstdcxx_version} by its value.
564
565 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
566
567         * cp-tree.h (cxx_saved_binding): Declare.
568         (struct saved_scope): Adjust type of field 'old_binding'.
569         * decl.c (cxx_saved_binding_make): New macro.
570         (struct cxx_saved_binding): Define.
571         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
572         C++ bindings.
573         (maybe_push_to_top_level): Adjust local variable type.
574         (pop_from_top_level): Likewise.
575
576 2003-03-04  Tom Tromey  <tromey@redhat.com>
577
578         * Make-lang.in (c++.tags): New target.
579
580 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
581
582         * Make-lang.in: Update.
583
584 2003-03-03  Jason Merrill  <jason@redhat.com>
585
586         * decl.c (finish_enum): Do set the type in a template. Simplify.
587         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
588
589 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
590
591         PR c++/9878
592         * call.c (convert_class_to_reference): Correct conversion
593         sequences.
594         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
595         (implicit_conversion): Adjust call to reference_binding.
596         (add_candidate): Change type of candidates parameter.
597         (add_function_candidate): Likewise.
598         (add_conv_candidate): Likewise.
599         (build_builtin_candidate): Likewise.
600         (add_builtin_candidate): Likewise.
601         (add_builtin_candidates): Likewise.
602         (add_template_candidate_real): Likewise.
603         (add_template_candidate): Likewise.
604         (add_template_conv_candidate): Likewise.
605         (build_user_type_conversion_1): Adjust accordingly.
606         (build_object_call): Likewise.
607         (build_conditional_expr): Likewise.
608         (add_candidates): Likewise.
609         (build_new_op): Likewise.
610         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
611         (build_new_method_call): Adjust calls to add_function_candidate.
612         (make_temporary_var_for_ref_to_temp): New function.
613         (initialize_reference): Add decl parameter.
614         * class.c (build_rtti_vtbl_entries): Use build_address and
615         build_nop.
616         * cp-tree.h (initialize_reference): Change prototype.
617         (make_temporary_var_for_ref_to_temp): New function.
618         (build_type_conversion): Change prototype.
619         (build_address): New function.
620         (build_nop): Likewise.
621         * cvt.c (cp_convert_to_pointer): Adjust call to
622         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
623         Use build_nop.
624         (convert_to_pointer_force): Use build_nop.
625         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
626         (convert_to_reference): Adjust call to build_type_conversion.
627         (ocp_convert): Likewise.
628         (build_type_conversion): Remove for_sure parameter.
629         * decl.c (grok_reference_init): Use initialize_reference.
630         * typeck.c (build_address): New function.
631         (build_nop): Likewise.
632         (build_unary_op): Use them.
633         (build_ptrmemfunc): Tidy slightly.
634         (convert_for_initialization): Adjust call to
635         initialize_reference.
636         * typeck2.c (store_init_value): Remove #if 0'd code.
637
638 2003-03-03  Jason Merrill  <jason@redhat.com>
639
640         * decl.c (start_function): Clear DECL_NUM_STMTS.
641
642         * class.c (get_vtable_decl): Use vtbl_type_node.
643         (build_primary_vtable): Check for it.
644
645 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
646
647         * decl.c (check_initializer): Check for vector_opaque_p.
648
649 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
650
651         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
652           invoke an external cpp during compilation.
653
654 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
655
656         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
657         that of warning().
658         (start_decl): Likewise.
659         (start_function): Likewise.
660
661 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
662
663         * Make-lang.in (CXX_C_OBJS): Update.
664
665 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
666
667         PR c++/9892
668         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
669         instantiating it.
670
671 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
672
673         * parser.c (cp_parser_init_declarator): Revert opaque
674         vector_opaque_p change.
675         Do not include target.h.
676
677 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
678
679         PR c++/9879
680         * cp-tree.h (build_zero_init): Add parameter.
681         * decl.c (cp_finish_decl): Adjust call.
682         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
683         calls.
684         (build_default_init): Add nelts parameter.  Adjust calls to
685         build_zero_init.
686         (build_new_1): Adjust call to build_default_init.
687         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
688
689 2003-02-26  Devang Patel  <dpatel@apple.com>
690
691         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
692         required.  Postpone enum setting for template decls.
693         (build_enumerator): Delay copying value node until finish_enum
694         (). Remove #if 0'ed code.
695         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
696         (tsubst_copy): Add check for enum type.
697
698 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
699
700         PR c++/9683
701         * decl2.c (prune_vars_needing_no_initialization): Do not throw
702         away initializations for DECL_EXTERNAL VAR_DECLs.
703         (finish_file): Adjust accordingly.
704         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
705
706 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
707
708         * decl.c (add_binding): Time TV_NAME_LOOKUP.
709         (push_class_binding): Likewise.
710         (set_namespace_binding): Likewise.
711
712 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
713
714         PR c++/9836
715         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
716         specializations back to the main template.
717         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
718         * pt.c (resolve_typename_type): Likewise.
719
720 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
721
722         PR c++/9778
723         * pt.c (tsubst_copy_and_build): For a templated function inside a
724         scope, process template arguments.
725
726 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
727
728         PR c++/9602
729         * typeck2.c (abstract_virtuals_error): Don't check when
730         TYPE is still template parameter dependent.
731
732 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
733
734         PR c++/5333
735         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
736         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
737         * pt.c (instantiate_class_template): Don't try to instantiate
738         dependent types.
739         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
740
741 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
742
743         PR c++/9749
744         * decl.c (grokdeclarator): Do not allow parameters with variably
745         modified types.
746
747 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
748
749         * search.c (grow_bfs_bases): Remove. Fold into ...
750         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
751         in previous patch.
752
753 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
754
755         PR c++/9729
756         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
757         when the G++ 3.2 ABI prevents correct compilation.
758
759 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
760
761         Change base class access representation. Share virtual base
762         binfos.
763         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
764         call.
765         * cp/class.c (build_base_path): Likewise.
766         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
767         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
768         (make_new_vtable): Adjust.
769         (force_canonical_binfo_r): Delete.
770         (force_canonical_binfo): Delete.
771         (mark_primary_virtual_base): Delete.
772         (dfs_unshared_virtual_bases): Delete.
773         (mark_primary_bases): Adjust.
774         (maybe_warn_about_overly_private_class): Adjust.
775         (dfs_base_derived_from): Delete.
776         (base_derived_from): Follow the inheritance chain.
777         (struct find_final_overrider_data): Add vpath member.
778         (dfs_find_final_overrider): Adjust.
779         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
780         (find_final_overrider): Adjust.
781         (update_vtable_entry_for_fn): Adjust.
782         (modify_all_vtables): Adjust.
783         (walk_subobject_offsets): Adjust.
784         (layout_nonempty_base_or_field): Adjust.
785         (layout_empty_base): Remove last parameter. Adjust.
786         (build_base_field): Adjust.
787         (build_base_fields): Adjust.
788         (propagate_binfo_offsets): Remove last parameter. Adjust.
789         (dfs_set_offset_for_unshared_vbases): Delete.
790         (layout_virtual_bases): Adjust.
791         (finish_struct_1): Adjust.
792         (init_class_processing): Don't init access nodes.
793         (dfs_get_primary_binfo): Delete.
794         (get_primary_binfo): Adjust.
795         (dump_class_hierarchy_r): Remove most derived arg, add IGO
796         parameter. Adjust.
797         (dump_class_hierarchy): Adjust.
798         (finish_vtbls): Adjust.
799         (get_original_base): Delete.
800         (build_vtt_inits): Adjust.
801         (dfs_build_secondary_vptr_vtt_inits): Adjust.
802         (dfs_ctor_vtable_bases_queue_p): Adjust.
803         (build_ctor_vtbl_group): Adjust.
804         (dfs_accumulate_vtbl_inits): Adjust.
805         (build_vtbl_initializer): Adjust.
806         (build_vbase_offset_vtbl_entries): Adjust.
807         (add_vcall_offset_vtbl_entries_1): Adjust.
808         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
809         (access_*_node): Remove.
810         (CANONICAL_BINFO): Delete.
811         (BINFO_UNSHARED_MARKED): Remove.
812         (BINFO_MARKED): Set LANG_FLAG_0 directly.
813         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
814         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
815         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
816         Delete.
817         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
818         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
819         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
820         Delete.
821         (BINFO_DEPENDENT_BASE_P): New.
822         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
823         index.
824         (markedp, unmarkedp): Adjust.
825         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
826         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
827         find_vbase_instance, binfo_for_vbase): Delete.
828         (copied_binfo, original_binfo): Declare.
829         (finish_base_specifier): Add virtual_p arg.
830         (unshare_base_binfos): Delete.
831         (copy_base_binfos): Declare.
832         (reverse_path): Delete.
833         * cp/decl.c (xref_basetypes): Access and virtuality passed
834         differently. Don't copy direct base binfos here. Call
835         copy_base_binfos.
836         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
837         (initialize_vtbl_ptrs): Adjust.
838         (expand_member_init): Adjust.
839         * cp/parser.c (cp_parser_base_specifier): Adjust.
840         * cp/pt.c (instantiate_class_template): Adjust.
841         (get_template_base_recursive): Adjust.
842         * cp/rtti.c (get_pseudo_ti_init): Adjust.
843         (get_pseudo_ti_desc): Adjust.
844         * cp/tree.c (unshare_base_binfos): Rename to ...
845         (copy_base_binfos): ... here, reimplement.
846         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
847         (reverse_path): Remove.
848         * cp/typeck.c (get_delta_difference): Adjust error messages.
849         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
850         * cp/search.c (lookup_base_r): Adjust.
851         (dynamic_cast_base_recurse): Adjust.
852         (canonical_binfo): Remove.
853         (dfs_canonical_queue): Remove.
854         (dfs_assert_unmarked_p): Remove.
855         (assert_canonical_unmarked): Remove.
856         (shared_marked_p, shared_unmarked_p): Remove.
857         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
858         (dfs_access_in_type): Adjust.
859         (access_in_type): Adjust.
860         (dfs_accessible_queue_p): Adjust.
861         (dfs_accessible_p): Adjust.
862         (is_subobject_of_p_1, is_subobject_of_p): Remove.
863         (struct lookup_field_info): Remove from_dep_base_p field.
864         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
865         (lookup_field_r): Remove dependent base code.
866         (lookup_member): Likewise.
867         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
868         (dfs_unmarked_real_bases_queue_p): Remove.
869         (dfs_marked_real_bases_queue_p): Remove.
870         (dfs_skip_vbases): Remove.
871         (dfs_get_pure_virtuals): Adjust.
872         (markedp, unmarkedp): Adjust.
873         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
874         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
875         (dfs_unmark): Adjust.
876         (dfs_get_vbase_types):Remove.
877         (dfs_build_inheritance_graph_order): Remove.
878         (get_vbase_types): Remove
879         (dfs_find_vbase_instance): Remove.
880         (find_vbase_instance): Remove.
881         (dfs_debug_unmarkedp): Adjust.
882         (dependent_base_p): Remove.
883         (dfs_push_type_decls): Adjust.
884         (dfs_push_decls): Adjust.
885         (dfs_no_overlap_yet): Adjust.
886         (copied_binfo): New function.
887         (original_binfo): New function.
888         (binfo_for_vbase): Remove.
889
890 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
891
892         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
893         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
894         vectors, for speed.
895
896 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
897
898         PR c++/9704
899         * class.c (layout_class_type): In the 3.2 ABI, take into account
900         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
901
902 2003-02-18  Matt Austern <austern@apple.com>
903
904         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
905         nothing for C++.
906         * cp/decl.c (wrapup_globals_for_namespace): Remove special
907         handling of global namespace.
908
909 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
910
911         * cp-tree.h (rid_to_yy): Delete.
912         (C_RID_YYCODE): Delete.
913         (finish_file): Delete redundant declaration.
914
915 2003-02-18  Jason Merrill  <jason@redhat.com>
916
917         PR c++/9623
918         * decl.c (reshape_init): Don't mess with initializer labels.
919
920         PR c++/9485
921         * parser.c (cp_parser_postfix_expression): Set idk properly for
922         object->scope::member.
923
924 2003-02-18  Ben Elliston  <bje@redhat.com>
925
926         PR other/7350
927         * decl.c (duplicate_decls): Fix typo in comment.
928
929 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
930
931         PR debug/9717
932         * class.c (build_base_field): Mark fields for base classes with
933         DECL_IGNORED_P.
934
935 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
936
937         PR c++/9457
938         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
939         CONSTRUCTOR_ELTS only once.
940
941 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
942
943         PR c++/9459
944         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
945         (dump_type_suffix): Likewise.
946
947 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
948
949         * search.c: ANSIfy function declarations and definitions.
950         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
951         * call.c (build_method_call, resolve_scoped_fn_name,
952         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
953         calls.
954         * class.c (handle_using_decl): Likewise.
955         * decl.c (make_typename_type, make_unmound_class_template,
956         start_decl, compute_array_index_type): Likewise.
957         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
958         * init.c (expand_member_init, build_member_call): Likewise.
959         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
960         resolve_typename_type): Likewise.
961         * typeck.c (lookup_destructor, finish_class_member_access_exprm
962         build_prememfunc_access_expr): Likewise.
963
964 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
965
966         * decl2.c: Include "timevar.h".
967         (namespace_ancestor): Time name lookup.
968         (add_using_namespace): Likewise.
969         (lookup_using_namespace): Likewise.
970         (qualified_lookup_using_namespace): Likewise.
971         (decl_namespace): Likewise.
972         (lookup_arg_dependent): Likewise.
973         * lex.c (do_identifier): Likewise.
974         (do_scoped_id): Likewise.
975         * pt.c (lookup_template_class): Likewise.
976
977 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
978
979         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
980
981 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
982
983         * decl.c: Include "timevar.h".
984         (poplevel): Time name lookup.
985         (find_binding): Likewise.
986         (push_namespace): Likewise.
987         (pop_nested_namespace): Likewise.
988         (store_bindings): Likewise.
989         (maybe_push_to_top_level): Likewise.
990         (pop_from_top_level): Likewise.
991         (push_local_name): Likewise.
992         (pushtag): Likewise.
993         (pushdecl): Likewise.
994         (pushdecl_with_scope): Likewise.
995         (pushdecl_namespace_level): Likewise.
996         (pushdecl_top_level): Likewise.
997         (pushdecl_class_level): Likewise.
998         (push_class_level_binding): Likewise.
999         (push_using_decl): Likewise.
1000         (push_using_directive): Likewise.
1001         (push_overloaded_decl): Likewise.
1002         (lookup_label): Likewise.
1003         (define_label): Likewise.
1004         (lookup_tag): Likewise.
1005         (lookup_tag_reverse): Likewise.
1006         (lookup_namespace_name): Likewise.
1007         (select_decl): Likewise.
1008         (unqualified_namespace_lookup): Likewise.
1009         (lookup_name_real): Likewise.
1010         (lookup_name_current_level): Likewise.
1011         (lookup_type_current_level): Likewise.
1012         (maybe_inject_for_scope_var): Likewise.
1013         (xref_tag): Likewise.
1014
1015         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
1016
1017 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
1018
1019         * decl.c (build_enumerator):  Remove unneeded test.
1020
1021 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
1022
1023         * cp-tree.h (struct lang_type_header): Make all fields unsigned
1024         char.
1025
1026 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
1027
1028         PR c++/7129
1029         * call.c (z_candidate): Add args.
1030         (convert_class_to_reference): Set it.
1031         (implicit_conversion): Tidy.
1032         (add_candidate): Add args parameter.
1033         (add_function_candidate): Adjust call to add_candidate.
1034         (add_conv_candidate): Likewise.
1035         (build_builtin_candidate): Likewise.
1036         (build_user_type_conversion_1): Eliminate wasteful tree_cons
1037         usage.
1038         (build_new_function_call): Likewise.
1039         (build_object_call): Likewise.
1040         (add_candidates): New function.
1041         (build_new_op): Use it.
1042         (covert_like_real): Adjust call to build_over_call.
1043         (build_over_call): Remove args parameter.
1044         * operators.def: Add <?= and >?=.
1045
1046 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
1047
1048         * typeck.c (build_indirect_ref): Don't check flag_volatile.
1049
1050 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1051
1052         PR c++/8849
1053         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
1054
1055 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
1056
1057         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
1058         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
1059         (BINFO_LANG_ELTS): New #define.
1060         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
1061
1062 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
1063
1064         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
1065
1066 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
1067
1068         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
1069         for class types.
1070         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
1071         rather than TYPE_LANG_FLAG_0.
1072         (TYPE_BUILT_IN): Remove.
1073         (TYPE_DEPENDENT_P): New macro.
1074         (TYPE_DEPENDENT_P_VALID): Likewise.
1075         (lang_type_class): Add fields_readonly.
1076         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
1077         * pt.c (dependent_type_p_r): New function, split out from ...
1078         (dependent_type_p): ... here.  Memoize results.
1079         * search.c (dependent_base_p): Use dependent_type_p, not
1080         uses_template_parms.
1081         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
1082         for class types.
1083
1084 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
1085
1086         * call.c (build_field_call): Use build_new_op, not build_opfncall.
1087         (prep_operand): New function.
1088         (build_new_op): Use it.  Remove dead code.
1089         * class.c (pushclass): Change "modify" parameter type from int to
1090         bool.
1091         (currently_open_class): Use same_type_p, not pointer equality.
1092         (push_nested_class): Adjust calls to pushclass, remove modify
1093         parameter.
1094         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
1095         (pushclass): Change prototype.
1096         (push_nested_class): Likewise.
1097         (grokoptypename): Remove.
1098         (build_opfncall): Remove.
1099         (value_dependent_expression_p): Declare.
1100         (resolve_typename_type): Likewise.
1101         (resolve_typename_type_in_current_instantiation): Likewise.
1102         (enter_scope_of): Remove.
1103         (tsubst): Remove.
1104         (tsubst_expr): Likewise.
1105         (tsubst_copy): Likewise.
1106         (tsubst_copy_and_build): Likewise.
1107         * decl.c (warn_about_implicit_typename_lookup): Remove.
1108         (finish_case_label): Return error_mark_node for erroneous labels.
1109         (start_decl): Adjust calls to push_nested_class.
1110         (grokfndecl): Call push_scope/pop_scope around call to
1111         duplicate_decls.
1112         (grokdeclarator): Do not call tsubst.
1113         (start_function): Adjust calls to push_nested_class.
1114         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
1115         (check_classfn): Use push_scope/pop_scope around type comparisions.
1116         (grokoptypename): Remove.
1117         (push_sscope): Adjust call to push_nested_class.
1118         * error.c (dump_type): Show cv-qualification of typename types.
1119         * init.c (build_member_call): Use build_new_op, not
1120         build_opfncall.
1121         * method.c (build_opfncall): Remove.
1122         * parser.c (cp_parser): Add allow_non_constant_expression_p and
1123         non_constant_expression_p.
1124         (cp_parser_constant_expression): Adjust prototype.
1125         (cp_parser_resolve_typename_type): Remove.
1126         (cp_parser_non_constant_expression): New function.
1127         (cp_parser_non_constant_id_expression): Likewise.
1128         (cp_parser_new): Set allow_non_constant_expression_p and
1129         non_constant_expression_p.
1130         (cp_parser_primary_expression): Reject `this' and `va_arg' in
1131         constant-expressions.  Note that dependent names aren't really
1132         constant.
1133         (cp_parser_postfix_expression): Reject conversions to non-integral
1134         types in constant-expressions.  Neither are increments or
1135         decrements.
1136         (cp_parser_unary_expression): Reject increments and decrements in
1137         constant-expressions.
1138         (cp_parser_direct_new_declarator): Adjust call to
1139         cp_parser_constant_expression.
1140         (cp_parser_cast_expression): Reject conversions to non-integral
1141         types in constant-expressions.
1142         (cp_parser_assignment_expression): Rejects assignments in
1143         constant-expressions.
1144         (cp_parser_expression): Reject commas in constant-expressions.
1145         (cp_parser_labeled_statement): Adjust call to
1146         cp_parser_constant_expression.
1147         (cp_parser_direct_declarator): Simplify array bounds, even in
1148         templates, when they are non-dependent.  Use
1149         resolve_typename_type, not cp_parser_resolve_typename_type.
1150         (cp_parser_class_head): Use resolve_typename_type, not
1151         cp_parser_resolve_typename_type.
1152         (cp_parser_member_declaration): Adjust call to
1153         cp_parser_constant_expression.
1154         (cp_parser_constant_initializer): Likewise.
1155         (cp_parser_constructor_declarator): Use resolve_typename_type, not
1156         cp_parser_resolve_typename_type.
1157         (cp_parser_late_parsing_default_args): Adjust call to
1158         push_nested_class.
1159         * pt.c (tsubst): Give it internal linkage.
1160         (tsubst_expr): Likewise.
1161         (tsubst_copy): Likewise.
1162         (tsubst_copy_and_build): Likewise.
1163         (push_access_scope_real): Likewise.
1164         (tsubst_friend_class): Likewise.
1165         (instantiate_class_template): Adjust call to pushclass.
1166         (value_dependent_expression_p): Give it external linkage.
1167         Robustify.
1168         (resolve_typename_type): New function.
1169         * semantics.c (finish_call_expr): Use build_new_op, not
1170         build_opfncall.
1171         (begin_constructor_declarator): Remove.
1172         (begin_class_definition): Adjust call to pushclass.
1173         (enter_scope_of): Remove.
1174         * typeck.c (comptypes): Resolve typename types as appropriate.
1175         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
1176         (build_x_compound_expr): Likewise.
1177         (build_modify_expr): Likewise.
1178         (build_x_modify_expr): Likewise.
1179         * typeck2.c (build_x_arrow): Likewise.
1180
1181 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
1182
1183         * pt.c (last_pending_template) Declare GTY().
1184
1185 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1186
1187         PR c++/8591
1188         * parser.c (cp_parser_elaborated_type_specifier): Convert
1189         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
1190         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
1191
1192 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
1193
1194         PR c++/9437
1195         * pt.c (unify): Don't unify '*T' with 'U C::*'.
1196
1197         PR c++/3902
1198         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
1199         inside a declarator.
1200
1201 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
1202
1203         * class.c (update_vtable_entry_for_fn): Add index parameter.
1204         Generate vcall thunk for covariant overriding from a virtual
1205         primary base.
1206         (dfs_modify_vtables): Adjust.
1207
1208 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
1209
1210         PR c++/9403
1211         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
1212         template keyword.
1213         (cp_parser_base_specifier): Look for and consume a
1214         TEMPLATE keyword. Replace switch with array index.
1215
1216         PR c++/795
1217         * semantics.c (finish_non_static_data_member): Remember the
1218         field's type even in a template.
1219
1220         PR c++/9415
1221         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
1222         already scoped.
1223
1224         PR c++/8545
1225         * parser.c (cp_parser_cast_expression): Be more tentative.
1226
1227 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1228
1229         * cp-tree.h (flagged_type_tree_s): Remove.
1230         (check_for_new_type): Likewise.
1231         * typeck2.c (check_for_new_type): Likewise.
1232
1233 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
1234
1235         * dump.c: ANSIfy function declarations and definitions.
1236
1237         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
1238
1239 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1240
1241         PR c++/9354
1242         * init.c (build_new): Set the type of the new-expression, even
1243         when processing_templte_decl.
1244
1245         PR c++/9216
1246         * parser.c (cp_parser_primary_expression): Improve error message
1247         for templates used in an expression context.
1248
1249         PR c++/8696
1250         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
1251         parse when encountering "typedef".
1252
1253 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
1254
1255         * class.c, parser.c: ANSIfy function definitions and declarations.
1256
1257 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1258
1259         PR c++/9328
1260         * error.c (dump_decl): For an OVERLOAD, just print the name of the
1261         function; it doesn't make sense to try to print its type.
1262         * semantics.c (finish_typeof): Issue errors about invalid uses.
1263
1264         PR c++/9298
1265         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
1266         function.
1267         (cp_parser_expression_statement): Use it.
1268         (cp_parser_explicit_instantiation): Likewise.
1269         * pt.c (do_decl_instantiation): Improve error handling logic.
1270
1271 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1272
1273         PR c++/9384
1274         * parser.c (cp_parser_using_declaration): Issue error messages
1275         about name resolution failures here.
1276
1277         PR c++/9388
1278         * class.c (currently_open_derived_class): Use dependent_type_p.
1279         * cp-tree.h (dependent_type_p): New function.
1280         (dependent_template_arg_p): Likewise.
1281         (dependent_template_p): Likewise.
1282         (type_dependent_expression_p): Likewise.
1283         * parser.c (cp_parser_dependent_type_p): Remove.
1284         (cp_parser_value_dependent_type_p): Likewise.
1285         (cp_parser_type_dependent_expression_p): Likewise.
1286         (cp_parser_dependent_template_arg_p): Likewise.
1287         (cp_parser_dependent_template_id_p): Likewise.
1288         (cp_parser_dependent_template_p): Likewise.
1289         (cp_parser_diagnose_invalid_type_name): Replace
1290         cp_parser_dependent_type_p with dependent_type_p, etc.
1291         (cp_parser_primary_expresion): Likewise.
1292         (cp_parser_nested_name_specifier_opt): Likewise.
1293         (cp_parser_postfix_expression): Likewise.
1294         (cp_parser_unary_expression): Likewise.
1295         (cp_parser_template_name): Likewise.
1296         (cp_parser_class_name): Likewise.
1297         (cp_parser_lookup_name): Likewise.
1298         * pt.c (dependent_type_p): New function.
1299         (value_dependent_expression_p): Likewise.
1300         (type_dependent_expression_p): Likewise.
1301         (dependent_template_arg_p): Likewise.
1302         (dependent_template_id_p): Likewise.
1303         (dependent_template_p): Likewise.
1304
1305         PR c++/9285
1306         PR c++/9294
1307         * parser.c (cp_parser_simple_declaration): Return quickly when
1308         encountering errors.
1309
1310 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1311
1312         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
1313
1314 2003-01-17  Jason Merrill  <jason@redhat.com>
1315
1316         PR c++/9167, c++/9358
1317         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
1318
1319 2003-01-17  Jason Merrill  <jason@redhat.com>
1320
1321         PR c++/9342
1322         * call.c (build_conditional_expr): Always do lvalue-rvalue
1323         conversion.
1324
1325 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
1326
1327         PR c++/9294
1328         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
1329         * cp-tree.h (BASELINK_BINFO): Adjust.
1330         (BASELINK_FUNCTIONS): Likewise.
1331         (BASELINK_ACCESS_BINFO): Likewise.
1332         (tree_baselink): New structure.
1333         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
1334         (lang_tree_node): Add baselink.
1335         * decl.c (cp_tree_node_structure): Add BASELINK case.
1336         * search.c (build_baselink): Adjust.
1337         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
1338         test from TREE_LIST case.
1339
1340         PR c++/9272
1341         * parser.c (cp_parser_constructor_declarator_p): Do not assume
1342         that a constructor cannot be declared outside of its own class.
1343
1344         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
1345         be resolved, neither can the qualified name.
1346
1347         * rtti.c (get_pseudo_ti_desc): Fix thinko.
1348
1349 2003-01-16  Jason Merrill  <jason@redhat.com>
1350
1351         PR c++/8564
1352         * init.c (build_vec_init): Re-add maxindex parm.
1353         (perform_member_init, build_aggr_init): Pass it.
1354         (build_new_1): Pass it. Use an incomplete array type for full_type.
1355         * typeck.c (build_modify_expr): Pass it.
1356         * cp-tree.h: Adjust.
1357
1358 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
1359
1360         * cp-tree.h (tsubst_copy_and_build): New declaration.
1361         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
1362         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
1363         (tsubst_copy_and_build): New function.
1364
1365 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
1366
1367         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
1368         (PARTIAL_INSTANTIATION_P): Remove.
1369         (IMPLICIT_TYPENAME_P): Likewise.
1370         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
1371         (build_typename_type): Remove declaration.
1372         (parmlist_is_exprlist): Likewise.
1373         * decl.c (build_typename_type): Make it static, remove third
1374         parameter.
1375         (push_class_binding): Don't do implicit typename stuff.
1376         (make_typename_type): Likewise.
1377         (lookup_name_real): Likewise.
1378         (grokdeclarator): Don't try to convert declarations into
1379         initializations.  Don't do implicit typename stuff.
1380         (parmlist_is_exprlist): Remove.
1381         (xref_basetypes): Simplify.
1382         * decl2.c (grokfield): Don't try to convert declarations into
1383         initializations.
1384         (build_anon_union_vars): Do this while processing templates, too.
1385         (finish_anon_union): Likewise.
1386         * error.c (dump_type): Remove implicit typename handling.
1387         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
1388         (cp_parser_primary_expression): Correct handling of names not
1389         found by unqualified name lookup in templates.
1390         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
1391         of types when possible.
1392         (cp_parser_simple_declaration): Complain intelligently about some
1393         invalid declarations.
1394         (cp_parser_member_declaration): Likewise.
1395         (cp_parser_constructor_declarator_p): Don't check when we're in a
1396         function scope.
1397         * pt.c (instantiate_class_template): Remove
1398         PARTIAL_INSTANTIATION_P gunk.
1399         * search.c (lookup_field_r): Don't build implicit typenames.
1400         (marked_pushdecls_p): Don't enter dependent base types.
1401         (unmarked_pushdecls_p): Likewise.
1402         * semantics.c (begin_class_definition): Remove implicit typename
1403         stuff.
1404
1405 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
1406
1407         PR c++/9212
1408         * parser.c (cp_parser_direct_declarator): If accepting either
1409         abstract or named, the name must be an unqualified-id.
1410
1411 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1412
1413         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
1414
1415 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1416
1417         * decl2.c (check_classfn): Fix uninitialized warning.
1418         (build_anon_union_vars): Likewise.
1419         * pt.c (tsubst_copy): Likewise.
1420
1421 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
1422
1423         Further conform g++'s __vmi_class_type_info to the C++ ABI
1424         specification.
1425         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
1426         the specification.
1427         (class_hint_flags): Likewise.
1428
1429 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1430
1431         * config-lang.in: Add semantics.c to gtfiles.
1432         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
1433         (saved_scope): Likewise.
1434         (type_lookups): Remove.
1435         (deferred_access): New structure.
1436         (type_access_control): Remove.
1437         (save_type_access_control): Likewise.
1438         (reset_type_access_control): Likewise.
1439         (decl_type_access_control): Likewise.
1440         (push_deferring_access_checks): Declare.
1441         (resume_deferring_access_checks): Likewise.
1442         (stop_deferring_access_checks): Likewise.
1443         (pop_deferring_access_checks): Likewise.
1444         (get_deferred_access_checks): Likewise.
1445         (pop_to_parent_deferring_access_checks): Likewise.
1446         (perform_deferred_access_checks): Likewise.
1447         (perform_or_defer_access_check): Likewise.
1448         * decl.c (make_typename_type): Use perform_or_defer_access_check.
1449         (make_unbound_class_template): Likewise.
1450         (grokdeclarator): Don't call decl_type_access_control.
1451         * parser.c (cp_parser_context): Remove deferred_access_checks
1452         and deferring_access_checks_p fields.
1453         (cp_parser_context_new): Adjust.
1454         (cp_parser): Remove access_checks_lists.
1455         (cp_parser_defer_access_check): Remove.
1456         (cp_parser_start_deferring_access_checks): Remove.
1457         (cp_parser_stop_deferring_access_checks): Remove.
1458         (cp_parser_perform_deferred_access_checks): Remove.
1459         (cp_parser_nested_name_specifier_opt): Use new deferred access
1460         functions.
1461         (cp_parser_simple_declaration): Likewise.
1462         (cp_parser_template_id): Likewise.
1463         (cp_parser_function_definition): Likewise.
1464         (cp_parser_class_specifier): Likewise.
1465         (cp_parser_lookup_name): Likewise.
1466         (cp_parser_single_declaration): Likewise.
1467         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
1468         (cp_parser_parse_tentatively): Likewise.
1469         (cp_parser_parse_definitely): Likewise.
1470         (yyparse): Likewise.
1471         (cp_parser_init_declarator): Remove access_checks parameter.
1472         Use new deferred access functions.
1473         (cp_parser_function_definition_from_specifiers_and_declarator):
1474         Likewise.
1475         (cp_parser_class_head): Remove deferring_access_checks_p and
1476         saved_access_checks parameters.  Use new deferred access functions.
1477         (cp_parser_member_specification_opt): Don't call
1478         reset_type_access_control.
1479         * search.c (type_access_control): Remove.
1480         * semantics.c: Include "gt-cp-semantics.h".
1481         (deferred_type_access_control): Remove.
1482         (deferred_access_stack): New variable.
1483         (deferred_access_free_list): Likewise.
1484         (push_deferring_access_checks): New function.
1485         (resume_deferring_access_checks): Likewise.
1486         (stop_deferring_access_checks): Likewise.
1487         (pop_deferring_access_checks): Likewise.
1488         (get_deferred_access_checks): Likewise.
1489         (pop_to_parent_deferring_access_checks): Likewise.
1490         (perform_deferred_access_checks): New function, adapted from
1491         cp_parser_perform_deferred_access_checks.
1492         (perform_or_defer_access_check): New function, adapted from
1493         cp_parser_defer_access_check.
1494         (current_type_lookups): Remove.
1495         (deferred_type_access_control): Likewise.
1496         (decl_type_access_control): Likewise.
1497         (save_type_access_control): Likewise.
1498         (reset_type_access_control): Likewise.
1499         (begin_function_definition): Adjust.
1500         (begin_class_definiton): Likewise.
1501
1502 2003-01-13  Jason Merrill  <jason@redhat.com>
1503
1504         PR c++/8748
1505         * class.c (build_base_path): Take the address before calling save_expr.
1506
1507         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
1508         all the ambiguous conversions are bad.
1509
1510         * class.c (maybe_warn_about_overly_private_class): Don't stop
1511         searching when we find a nonprivate method.
1512
1513         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
1514
1515 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
1516
1517         * cp-tree.h (get_arglist_len_in_bytes): Remove.
1518
1519         PR c++/9264
1520         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
1521         typeame types more robustly.
1522
1523 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
1524
1525         * parser.c:  Fix comment typos.
1526
1527 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
1528
1529         PR c++/9099
1530         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
1531         an object_type which is not a class type.
1532
1533 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
1534
1535         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
1536         (cp_parser_late_parsing_default_args): Likewise.
1537
1538 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
1539
1540         * cfns.gperf: ANSIfy function declarations.
1541         * cfns.h: Regenerate.
1542         * cp-tree.h: ANSIfy function declarations.
1543
1544 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
1545
1546         * cp-tree.h (reparse_absdcl_as_expr): Remove.
1547         (reparse_absdcl_as_casts): Likewise.
1548         (reparse_decl_as_expr): Likewise.
1549         (finish_decl_parsing): Likewise.
1550         * decl2.c (reparse_absdcl_as_expr): Remove.
1551         (reparse_absdcl_as_casts): Likewise.
1552         (repase_decl_as_expr): Likewise.
1553         (finish_decl_parsing): Likewise.
1554
1555         PR c++/9128
1556         PR c++/9153
1557         PR c++/9171
1558         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
1559         function.
1560         (cp_parser_nested_name_specifier_opt): Correct the
1561         check_dependency_p false.
1562         (cp_parser_postfix_expression): Fix formatting.
1563         (cp_parser_decl_specifier_seq): Avoid looking for constructor
1564         declarators when possible.
1565         (cp_parser_template_id): Avoid performing name-lookup when
1566         possible.
1567         (cp_parser_class_head): Do not count specializations when counting
1568         levels of templates.
1569         (cp_parser_constructor_declarator_p): Return immediately if
1570         there's no chance that the tokens form a constructor declarator.
1571         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
1572         expression with reference type.
1573         (get_tinfo_decl_dynamic): Do not return an expression with
1574         reference type.
1575         (build_typeid): Add comment.  Do not return an expression with
1576         reference type.
1577         * typeck.c (build_class_member_access_expr): Improve handling of
1578         conditionals and comma-expressions as objects.
1579
1580 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
1581
1582         * cfns.gperf: ANSIfy function declarations.
1583         * cfns.h: Regenerate.
1584         * cp-tree.h: ANSIfy function declarations.
1585         * parser.c: ANSIfy function declarations & definitions.
1586
1587         * decl.c (bad_specifiers): Fix parameter order error I introduced.
1588
1589 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
1590
1591         Merge from pch-branch:
1592
1593         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
1594
1595         Merge to tag pch-merge-20030102:
1596
1597         * semantics.c (finish_translation_unit): Don't call finish_file.
1598         * parser.c: Don't include ggc.h.
1599         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
1600         read first token here.  Don't allow PCH files after the first
1601         token is read.
1602         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
1603         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
1604         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
1605         (cp_parser_late_parsing_for_member): Don't duplicate call to
1606         cp_lexer_set_source_position_from_token.
1607         (cp_parser_late_parsing_default_args): Likewise.
1608         (yyparse): Call finish_file after clearing the_parser.
1609
1610         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
1611
1612         * Make-lang.in: Remove $(GGC_H) from all dependencies.
1613         (CXX_TREE_H): Add $(GGC_H).
1614         * class.c: Don't include ggc.h.
1615         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
1616         (method_name_cmp): Likewise.
1617         (resort_data): New variable.
1618         (resort_field_decl_cmp): New.
1619         (resort_method_name_cmp): New.
1620         (resort_sorted_fields): New.
1621         (resort_type_method_vec): New.
1622         (finish_struct_methods): Delete cast.
1623         (finish_struct_1): Delete cast.
1624         * cp-tree.h: Include ggc.h.
1625         (struct lang_type_class): Add reorder attribute to field `methods'.
1626         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
1627         (resort_sorted_fields): New prototype.
1628         (resort_type_method_vec): New prototype.
1629         * call.c: Don't include ggc.h.
1630         * decl.c: Likewise.
1631         * decl2.c: Likewise.
1632         * init.c: Likewise.
1633         * lex.c: Likewise.
1634         * method.c: Likewise.
1635         * optimize.c: Likewise.
1636         * parse.y: Likewise.
1637         * pt.c: Likewise.
1638         * repo.c: Likewise.
1639         * search.c: Likewise.
1640         * semantics.c: Likewise.
1641         * spew.c: Likewise.
1642         * tree.c: Likewise.
1643
1644         * lang-specs.h: Remove comment.
1645
1646         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
1647
1648         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
1649         (operator_name_info): Mark to be saved for PCH, specify size.
1650         (assignment_operator_name_info): Likewise.
1651
1652         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
1653
1654         * decl.c (anon_cnt): Mark to be saved for PCH.
1655
1656         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
1657
1658         * lex.c  (init_reswords): Delete now-untrue comment.
1659         Allocate ridpointers using GGC.
1660
1661         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
1662
1663         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
1664
1665         * g++spec.c (lang_specific_driver): Don't include standard
1666         libraries in `added'.
1667
1668         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
1669
1670         * decl2.c (finish_file): Call c_common_write_pch.
1671         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
1672
1673         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
1674
1675         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
1676         files when using g++.
1677         * lang-specs.h: Handle compiling C++ header files.
1678
1679 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
1680
1681         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
1682
1683 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1684
1685         * pt.c (push_access_scope_real): Call push_to_top_level for
1686         function in namespace scope.
1687         (pop_access_scope): Call pop_from_top_level for function in
1688         namespace scope.
1689
1690 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
1691
1692         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
1693
1694 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
1695
1696         * Make-lang.in (c++.install-common, c++.install-man,
1697         c++.uninstall): Prepend $(DESTDIR) to destination paths in
1698         all (un)installation commands.
1699         (c++.install-common): Rewrite $(LN) commands to support
1700         DESTDIR with "ln" as well as with "ln -s".
1701
1702 2003-01-08  Jason Merrill  <jason@redhat.com>
1703
1704         * parser.c (cp_parser_primary_expression): See through explicitly
1705         scoped ALIAS_DECLs, too.
1706
1707 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
1708
1709         * decl.c: Remove some #if 0 code.
1710
1711         * decl.c: ANSIfy function declarations.
1712
1713 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
1714
1715         * parser.c (cp_parser_asm_definition): Correct handling of omitted
1716         operands.
1717
1718 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1719
1720         PR c++/9030
1721         * decl.c (make_typename_type): Check access only when tf_error.
1722         (make_unbound_class_template): Likewise.
1723         * pt.c (saved_access_scope): New variable.
1724         (push_access_scope_real): New function.
1725         (push_access_scope): Likewise.
1726         (pop_access_scope): Likewise.
1727         (tsubst_default_argument): Use them.
1728         (instantiate_template): Likewise.
1729         (regenerate_decl_from_template): Likewise.
1730         (instantiate_decl): Likewise.
1731         (get_mostly_instantiated_function_type): Likewise.
1732
1733 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
1734
1735         * tree.c: Delete bogus #if 0 code.
1736
1737 2003-01-07  Andreas Schwab  <schwab@suse.de>
1738
1739         * class.c (layout_class_type): Don't use
1740         PCC_BITFIELD_TYPE_MATTERS if not defined.
1741
1742 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
1743
1744         PR c++/9165
1745         * decl2.c (build_cleanup): Mark the object as used.
1746
1747         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
1748         (hash_local_specialization): New function.
1749         (register_local_specialization): Revert 2003-01-05 change.
1750         (instantiate_decl): Use hash_local_specialization when creating
1751         the local_specializations table.
1752
1753         * decl2.c (mark_used): Do not synthesize thunks.
1754
1755         * class.c (layout_class_type): Correct handling of unnamed
1756         bitfields wider than their types.
1757
1758         PR c++/9189
1759         * parser.c (cp_parser): Remove default_arg_types.  Update
1760         documentation for unparsed_functions_queues.
1761         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
1762         parameter.
1763         (cp_parser_new): Don't set parser->default_arg_types.
1764         (cp_parser_function_definition): Adjust usage of
1765         unparsed_funtions_queues.
1766         (cp_parser_class_specifier): Don't mess with
1767         parser->default_arg_types.  Handle default argument processing in
1768         a separate phase from function body processing.
1769         (cp_parser_template_declaration_after_export): Adjust usage of
1770         unparsed_functions_queues.
1771         (cp_parser_late_parsing_for_member): Do not handle default
1772         arguments.
1773
1774 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
1775
1776         PR c++/9109
1777         * parser.c (cp_parser_declarator_kind): New enum.
1778         (cp_parser_declarator): Adjust.
1779         (cp_parser_direct_declarator): Adjust. Allow for either named or
1780         abstract declarator. Prefer abstract, if possible. Allow
1781         parenthesized function name.
1782         (cp_parser_condition): Adjust cp_parser_declarator call.
1783         (cp_parser_explicit_instantiation): Likewise.
1784         (cp_parser_init_declarator): Likewise.
1785         (cp_parser_type_id): Likewise.
1786         (cp_parser_function_definition): Likewise.
1787         (cp_parser_member_declaration): Likewise.
1788         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
1789         the tentative parsing.
1790         (cp_parser_exception_declaration): Likewise.
1791
1792 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
1793
1794         * parser.c (cp_parser_template_parameter): Adjust call to
1795         cp_parser_parameter_declaration.
1796         (cp_parser_parameter_declaration_list): Likewise.
1797         (cp_parser_parameter_declaration): Replace
1798         greater_than_is_operator_p with template_parm_p parameter.  Do not
1799         cache tokens for template default arguments.
1800
1801         * pt.c (retrieve_local_specialization): Use htab_find, not
1802         htab_find_with_hash.
1803         (register_local_specialization): Use htab_find_slot, not
1804         htab_find_slot_with_hash.
1805         (instantiate_decl): Pass a hash function to htab_create.
1806
1807 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1808
1809         * parser.c (cp_parser_binary_expression,
1810         cp_parser_multiplicative_expression,
1811         cp_parser_additive_expression, cp_parser_shift_expression,
1812         cp_parser_relational_expression, cp_parser_equality_expression,
1813         cp_parser_and_expression, cp_parser_exclusive_or_expression,
1814         cp_parser_inclusive_or_expression,
1815         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
1816         cp_parser_binary_expression): Const-ify.
1817
1818 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
1819
1820         * method.c (use_thunk): Disable access control while building the
1821         body of the thunk.
1822
1823 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
1824
1825         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
1826         front end.
1827
1828 2003-01-03  Matt Austern  <austern@apple.com>
1829
1830         * cp-tree.h (struct lang_type_class): add field for key method
1831         (cp_global_trees): rename dynamic_classes to keyed_classes
1832         (key_method): add definition
1833         * class.c (finish_struct_1): compute class's key method, and add
1834         the class to keyed_classes list if there is no key method.
1835         * decl.c (finish_function): add class to keyed_classes list if we
1836         see a definition of the class's key method.
1837         * pt.c (instantiate_class_template): add template specialization
1838         of a dynamic class to keyed_classes list.
1839         * decl2.c (key_method): remove
1840         (finish_file): iterate only through keyed_classes list when
1841         deciding whether to emit vtables, remove class from its list after
1842         we do the emission.
1843
1844 2003-01-02  Jason Merrill  <jason@redhat.com>
1845
1846         * call.c (build_conditional_expr): Stabilize lvalues properly.
1847         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
1848         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
1849         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
1850
1851         * call.c (convert_like_real): Call decl_constant_value for an
1852         IDENTITY_CONV even if there are no more conversions.
1853
1854         * cvt.c (build_up_reference): Don't push unnamed temps.
1855
1856         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
1857
1858         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
1859         for a backend struct.
1860
1861         * except.c (wrap_cleanups_r, build_throw): Make
1862         MUST_NOT_THROW_EXPRs void.
1863         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
1864
1865         * init.c (build_vec_delete_1): Pre-evaluate the base address.
1866
1867         * init.c (get_temp_regvar): Simplify logic.
1868
1869         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
1870         our replacement is a decl.
1871
1872         * decl.c (cp_make_fname_decl): Push the decls inside the
1873         outermost scope.
1874
1875 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
1876
1877         PR c++/45, c++/3784
1878         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
1879         the same too.
1880
1881 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
1882
1883         * parser.c (struct cp_parser): Add access_checks_lists field
1884         (cp_parser_simple_declaration): Use.
1885         (cp_parser_init_declarator): Likewise.
1886
1887 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
1888
1889         * parser.c (cp_parser_declaration): Accept the __extension__
1890         keyword before the declaration.
1891
1892         PR c++/2843
1893         * parser.c (cp_parser_parameter_declaration): Allow attributes to
1894         appear after the declarator.
1895
1896         * call.c (build_new_method_call): Fix typo in message format
1897         string.
1898
1899 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
1900
1901         * parser.c (cp_lexer_next_token_is): Declare it inline.
1902         (cp_lexer_set_source_position_from_token): Likewise.
1903         (cp_lexer_debugging_p): Likewise.
1904         (cp_parser_parsing_tentatively): Likewise.
1905         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
1906         to the cp_lexer_peek_token.
1907
1908         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
1909         expression.
1910
1911 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
1912
1913         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
1914         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
1915         cp/repo.c: Fix copyright years.
1916
1917 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
1918
1919         * lex.c: Remove superfluous include of cpplib.h.
1920         (CONSTRAINT): Define without conditions.
1921         (init_cp_pragma): Use c_register_pragma.
1922
1923 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
1924
1925         * .cvsignore: Remove.
1926
1927 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
1928
1929         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
1930           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
1931           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
1932           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
1933           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
1934           copyright header.
1935         * lex.h: parse.y is dead, so don't mention it.  Also replace the
1936           copyright header with the default GNU copyright header.
1937
1938 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
1939
1940         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
1941         (lookup_name_namespace_only): Likewise.
1942         (begin_only_namespace_names): Likewise.
1943         (end_only_namespace_names): Likewise.
1944         * decl.c (only_namespace_names): Remove.
1945         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
1946         (lookup_name_real): Do not check only_namespace_names.
1947         (lookup_name_namespace_only): Remove.
1948         (begin_only_namespace_names): Likewise.
1949         (end_only_namespace_names): Likewise.
1950         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
1951         nested-name-specifiers more gracefully.
1952         (cp_parser_class_or_namespace_name): Avoid looking up namespace
1953         names when they cannot possibly appear.
1954         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
1955         (cp_parser_elaborated_type_specifier): Likewise.
1956         (cp_parser_namespace_name): Only look for namespace names.
1957         (cp_parser_lookup_name): Add is_namespace parameter.
1958         (cp_parser_lookup_name_simple): Adjust call to
1959         cp_parser_lookup_name.
1960
1961         * parser.c (cp_parser_dependent_type_p): Fix thinko.
1962
1963 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
1964
1965         * .cvsignore: Update.
1966
1967 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
1968
1969         * class.c (modify_vtable_entry): Remove unused variable.
1970         (get_vcall_index): Always expect a non-thunk.
1971         (update_vtable_entry_for_fn): Combine covariant adjustments, when
1972         overriding a thunk. Pass get_vcall_index a non-thunk.
1973
1974         * decl2.c (finish_file): Mark undefined inlines as extern.
1975
1976 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
1977
1978         * cp-tree.def (RETURN_INIT): Remove.
1979         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
1980         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
1981         (note_level_for_for): Remove.
1982         (note_level_for_try): Likewise.
1983         (note_level_for_catch): Likewise.
1984         (finish_named_return_value): Likewise.
1985         (do_pushlevel): Change prototype.
1986         (pending_lang_change): Remove.
1987         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
1988         sk_for.
1989         (note_level_for_for): Remove.
1990         (note_level_for_try): Likewise.
1991         (note_level_for_catch): Likewise.
1992         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
1993         * parser.c (cp_parser_context_free_list): Make it "deletable".
1994         (cp_parser_template_argument): Remove misleading comment.
1995         * pt.c (tsubst_expr): Remove RETURN_INIT code.
1996         * semantics.c (genrtl_named_return_value): Remove.
1997         (do_pushlevel): Take a scope kind as an argument.
1998         (begin_if_stmt): Adjust.
1999         (begin_while_stmt): Likewise.
2000         (begin_for_stmt): Likewise.
2001         (finish_for_init_stmt): Likewise.
2002         (begin_switch_stmt): Likewise.
2003         (begin_handler): Likewise.
2004         (begin_compound_stmt): Likewise.
2005         (finish_named_return_value): Remove.
2006         (cp_expand_stmt): Remove RETURN_INIT case.
2007         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
2008
2009 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2010
2011         PR c++/9112
2012         * parser.c (cp_parser_direct_declarator): Handle erroneous
2013         parenthesized declarators correctly.
2014
2015 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2016
2017         * cp-tree.h (pending_lang_change): Declare.
2018
2019 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
2020
2021         * parser.c (cp_parser_context_free_list): New variable.
2022         (cp_parser_context_new): Use it.
2023         (cp_parser_error): Check return code from
2024         cp_parser_simulate_error.
2025         (cp_parser_simulate_error): Return a value.
2026         (cp_parser_id_expression): Optimize common case.
2027         (cp_parser_class_name): Likewise.
2028         (cp_parser_class_specifier): Adjust call to
2029         cp_parser_late_parsing_default_args.
2030         (cp_parser_lookup_name): Optimize common case.
2031         (cp_parser_late_parsing_for_member): Adjust call to
2032         cp_parser_late_parsing_default_args.
2033         (cp_parser_late_parsing_default_args): Add scope parameter.
2034         (cp_parser_require): Avoid creating the error message unless it's
2035         needed.
2036         (cp_parser_parse_definitely): Place free'd contexts on the free
2037         list.
2038
2039         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
2040
2041 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
2042
2043         * parser.c (cp_parser_parameter_declaration_clause): Treat system
2044         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
2045
2046 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
2047
2048         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
2049         GCC, not GNU CC.
2050
2051 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
2052
2053         * parse.y: Remove.
2054         * spew.c: Likewise.
2055         * Make-lang.in (gt-cp-spew.h): Remove.
2056         * cp-tree.h (do_pending_lang_change): Remove.
2057         (do_identifier): Change prototype.
2058         (finish_id_expr): Remove.
2059         * decl.c (lookup_name_real): Remove yylex variable.
2060         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
2061         * lex.c (init_cpp_parse): Remove.
2062         (reduce_cmp): Likewise.
2063         (token_cmp): Likewise.
2064         (yychar): Likewise.
2065         (lastiddecl): Likewise.
2066         (token_count): Likewise.
2067         (reduce_count): Likewise.
2068         (yyhook): Likewise.
2069         (print_parse_statistics): Likewise.
2070         (do_pending_lang_change): Likewise.
2071         (do_identifier): Remove parsing parameter.
2072         * lex.h (lastiddecl): Remove.
2073         (looking_for_typename): Remove.
2074         (looking_for_template): Likewise.
2075         (pending_lang_change): Likewise.
2076         (yylex): Likewise.
2077         * semantics.c (finish_id_expr): Remove.
2078
2079         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
2080         thread" correctly.
2081
2082 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
2083
2084         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
2085         end, not the C front end.
2086
2087 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
2088
2089         * cp-tree.h (THUNK_TARGET): New macro.
2090         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
2091         (finish_thunk): Remove offset parms.
2092         * class.c (find_final_overrider): Look through thunks.
2093         (get_vcall_index): Use THUNK_TARGET.
2094         (update_vtable_entry_for_fn): Look through thunks. Set covariant
2095         fixed offset here. Adjust finish_thunk call.
2096         (build_vtbl_initializer): Adjust finish_thunk calls.
2097         * mangle.c (mangle_call_offset): Remove superfluous if.
2098         (mangle_thunk): Adjust.
2099         * method.c (make_thunk): Adjust.
2100         (finish_thunk): Adjust.
2101         (thunk_adjust): Remove assert.
2102         (use_thunk): Use THUNK_TARGET
2103         * dump1.c (cp_dump_tree): Adjust thunk dumping.
2104
2105         PR c++/9054
2106         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
2107         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
2108
2109 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2110
2111         Remove traditional C constructs 4/n.
2112         * decl2.c (grok_method_quals, warn_if_unknown_interface,
2113         grok_x_components, cp_build_parm_decl, build_artificial_parm,
2114         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
2115         delete_sanity, check_member_template, check_java_method,
2116         check_classfn, finish_static_data_member_decl, grokfield,
2117         grokbitfield, grokoptypename, grok_function_init,
2118         cplus_decl_attributes, constructor_name, defer_fn,
2119         build_anon_union_vars, finish_anon_union, coerce_new_type,
2120         coerce_delete_type, comdat_linkage, maybe_make_one_only,
2121         key_method, import_export_vtable, import_export_class,
2122         output_vtable_inherit, import_export_decl, import_export_tinfo,
2123         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
2124         set_guard, start_objects, finish_objects,
2125         start_static_storage_duration_function,
2126         finish_static_storage_duration_function, get_priority_info,
2127         start_static_initialization_or_destruction,
2128         finish_static_initialization_or_destruction,
2129         do_static_initialization, do_static_destruction,
2130         prune_vars_needing_no_initialization, write_out_vars,
2131         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
2132         add_using_namespace, merge_functions, ambiguous_decl,
2133         lookup_using_namespace, lookup_using_namespace,
2134         qualified_lookup_using_namespace, set_decl_namespace,
2135         decl_namespace, current_decl_namespace, push_decl_namespace,
2136         pop_decl_namespace, push_scope, pop_scope, add_function,
2137         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
2138         lookup_arg_dependent, do_namespace_alias,
2139         validate_nonmember_using_decl, do_nonmember_using_decl,
2140         do_toplevel_using_decl, do_local_using_decl,
2141         do_class_using_decl, do_using_directive, check_default_args,
2142         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
2143         * parser.c (cp_parser_class_head): Use booleanss.
2144         * decl.c (walk_globals, walk_vtables): Likewise.
2145         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
2146         walk_globals): Change return type from 'int' to 'bool'.
2147         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
2148         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
2149         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
2150         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
2151         qualifier_flags, tinfo_base_init, generic_initializer,
2152         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
2153         dfs_class_hint_unmark, class_hint_flags, class_initializer,
2154         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
2155         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
2156         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
2157         * repo.c (repo_compile_flags, repo_template_declared,
2158         repo_template_defined, repo_class_defined, repo_get_id,
2159         repo_template_used, repo_vtable_used, repo_inline_used,
2160         repo_tinfo_used, repo_template_instantiated, extract_string,
2161         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
2162         finish_repo): Likewise.
2163         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
2164         cxx_print_xnode): Likewise..
2165         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
2166         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
2167         * cxxfilt.c (demangle_it, print_demangler_list, usage,
2168         standard_symbol_characters, hp_symbol_characters, main, fatal):
2169         Likewise.
2170         (strip_underscore):  Change type from 'int' to 'bool'.
2171         (main): Use boolean constants.
2172
2173 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2174
2175         Remove traditional C constructs 3/n.
2176         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2177         build_up_reference, warn_ref_binding, convert_to_reference,
2178         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
2179         convert_to_void, convert, convert_force, build_type_conversion,
2180         build_expr_type_conversion, type_promotes_to,
2181         perform_qualification_conversions): Use C90 prototyping style.
2182         * decl2.c (grok_array_decl): Use boolean constant.
2183         (delete_sanity): Likewise.
2184         * typeck.c (build_unary_op): Likewise.
2185         * semantics.c (finish_switch_cond): Likewise.
2186         * parser.c (cp_parser_direct_new_declarator): Likewise.
2187         * init.c (build_new): Likewise.
2188
2189 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
2190
2191         * Make-lang.in (po-generated): Remove parse.c.
2192         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
2193         ($(srcdir)/cp/parse.h): Remove target.
2194         ($(srcdir)/cp/parse.c): Likewise.
2195         (gt-cp-parse.h): Likewise.
2196         (gt-cp-parser.h): New target.
2197         (c++.distclean): Do not remove parse.output.
2198         (c++.maintainer-clean): Do not remove parse.c or parse.h.
2199         (cp/spew.o): Remove target.
2200         (cp/lex.o): Adjust dependencies.
2201         (cp/pt.o): Likewise.
2202         (cp/parse.o): Likewise.
2203         (cp/TAGS): Do not mention parse.c.
2204         (cp/parser.o): New target.
2205         * NEWS: Mention the new parser.
2206         * call.c (build_scoped_method_call): Simplify.
2207         (build_method_call): Likewise.
2208         (build_new_function_call): Adjust calls to add_function_candidate
2209         and add_template_candidate.
2210         (build_new_op): Improve handling of erroroneous operands.
2211         (convert_default_arg): Remove circular argument processing.
2212         (name_as_c_string): New function.
2213         (build_new_method_call): Use it.
2214         (perform_implicit_conversion): Use error_operand_p.
2215         * class.c (finish_struct_anon): Use constructor_name_p.
2216         (check_field_decls): Likewise.
2217         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
2218         (resolve_address_of_overloaded_function): Likewise.
2219         (instantiate_type): Tweak pointer-to-member handling.
2220         (get_primary_binfo): Remove incorrect assertion.
2221         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
2222         * cp-tree.h (DEFARG_TOKENS): New macro.
2223         (default_arg): New structure.
2224         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
2225         (lang_tree_node): Add default_arg.
2226         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
2227         (type_info_ref_type): New macro.
2228         (saved_scope): Make processing_explicit_instantiation a boolean.
2229         (check_access): New field.
2230         (unparsed_text): Remove.
2231         (language_function): Remove unparsed_inlines.
2232         (error_operand_p): New macro.
2233         (lang_decl): Adjust pending_inline_info.
2234         (DEFARG_POINTER): Remove.
2235         (tag_types): Add typenames.
2236         (lookup_ualified_name): Declare.
2237         (lookup_name_real): Likewise.
2238         (shadow_tag): Adjust prototype.
2239         (get_scope_of_declarator): Declare it.
2240         (process_next_inline): Remove it.
2241         (check_for_missing_semicolon): Likewise.
2242         (maybe_get_template_decl_from_type_decl): Declare it.
2243         (finish_label_stmt): Adjust prototype.
2244         (finish_non_static_data_meber): Declare it.
2245         (finish_pseudo_destructor_call_expr): Rename to ...
2246         (finish_pseudo_destructor_expr): ... this.
2247         (finish_compound_literal): Declare it.
2248         (begin_inline_definitions): Remove it.
2249         (init_spew): Remove.
2250         (peekyylex): Likewise.
2251         (arbitrate_lookup): Likewise.
2252         (frob_opname): Likewise.
2253         (maybe_snarf_defarg): Likewise.
2254         (add_defarg_fn): Likewise.
2255         (do_pending_defargs): Likewise.
2256         (done_pending_defargs): Likewise.
2257         (unprocessed_defarg_fn): Likewise.
2258         (replace_defarg): Likewise.
2259         (end_input): Likewise.
2260         (get_overloaded_fn): Likewise.
2261         * cvt.c (convert_to_reference): Improve error handling.
2262         * decl.c (lookup_name_real): Do not declare it static.
2263         (maybe_push_to_top_level): Set check_access.
2264         (identifier_type_value): Adjust call to lookup_name_real.
2265         (lookup_qualified_name): New method.
2266         (lookup_name_real): Remove special-case parsing code.
2267         (lookup_name-nonclass): Adjust call to lookup_name_real.
2268         (lookup_name_namespace_only): Likewise.
2269         (lookup_name): Likewise.
2270         (check_tag_decl): Return the type declared.
2271         (shadow_tag): Likewise.
2272         (register_dtor_fn): Tweak check_access.
2273         (grokfndecl): Use constructor_name_p.
2274         (get_scope_of_declarator): New function.
2275         (grokdeclarator): Obscure tweaks for slightly different declarator
2276         representations.
2277         (start_method): Return error_mark_node to indicate failure.
2278         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
2279         * decl2.c (constructor_name_full): Simplify.
2280         (constructor_name): Use it.
2281         (build_expr_from_tree): Adjust for changes to do new parser.
2282         (push_scope): Improve robustness.
2283         (validate_nonmember_using_decl): Process declarations, not names.
2284         (do_class_using_decl): Likewise.
2285         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
2286         here.
2287         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
2288         * expr.c (cxx_expand_expr): Handle BASELINKs.
2289         * init.c (member_init_ok_or_else): Issue more errors.
2290         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
2291         * lex.c: Do not include parse.h.
2292         (yypring): Do not declare.
2293         (yylval): Likewise.
2294         (make_reference_declarator): Remove error-generating code.
2295         (rid_to_yy): Remove.
2296         (cxx_init): Do not call init_spew.
2297         (yypring): Remove.
2298         (check_for_missing_semicolon): Remove.
2299         * lex.h (got_scope): Remove.
2300         (got_object): Remove.
2301         * method.c (hack_identifier): Use finish_non_static_data_member.
2302         (implicitly_declare_fn): Adjust use of constructor_name.
2303         * parser.c: New file.
2304         * pt.c (parse.h): Do not include it.
2305         (maybe_get_template_decl_from_template): Do not declare it.
2306         (finish_member_template_decl): Tweak.
2307         (begin_explicit_instantiation): Adjust for
2308         processing_explicit_instantiation being boolean.
2309         (end_explicit_instantiation): Likewise.
2310         (maybe_process_partial_specialization): Tighten specialization
2311         test.
2312         (retrieve_local_specialization): Adjust ue of hash table.
2313         (eq_local_specializations): New function.
2314         (register_local_specialization): Likewise.
2315         (push_template_decl_real): Remove unnecessary test.
2316         (maybe_get_template_decl_from_type_decl): Don't make it static.
2317         (for_each_template_parm_r): Handle TYPEOF_TYPE.
2318         (tsubst_copy): Use retrieive_local_specialization to handle
2319         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
2320         Handle COMPONENT_REFs with pseudo-destructor-expressions.
2321         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
2322         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
2323         (unify): Tweak handling of CONST_DECLs.
2324         (regenerate_decl_from_template): Use push_nested_class.
2325         (template_for_substitution): New funciton.
2326         (instantiate_decl): Use it.  Register parameters as local
2327         specializations.
2328         * rtti.c (init_rtti_processing): Set type_info_ref_type.
2329         (build_typeid): Use it.
2330         (get_typeid): Likeise.
2331         * search.c (accessible_p): Use check_access, not
2332         flag_access_control.
2333         (adjust_result_of_qualified_name_lookup): Pay attention to the
2334         context_class.
2335         * semantics.c (finish_asm_stmt): Adjust error handling.
2336         (finish_label_stmt): Return the statement.
2337         (finish_non_static_data_member): New function.
2338         (finish_class_expr): Handle BASELINKs.
2339         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
2340         (finish_object_call_expr): Simplify handling during templates.
2341         (finish_pseudo_destructor_call_expr): Rename to ...
2342         (finish_pseudo_dtor_expr): ... this.
2343         (finish_compound_literal): New function.
2344         (begin_inline_definitions): Remove.
2345         (finish_sizeof): Remove special template handling.
2346         * spew.c: Do not include parse.h.
2347         * tree.c (get_overloaded_fn): Remove.
2348         * typeck.c (build_class_member_access_expr): Handle
2349         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
2350         (lookup_destructor): New function.
2351         (finish_class_member_access_expr): Use it.
2352         (convert_arguments): Simplify.
2353         (build_unary_op): Handle BASELINKs.
2354
2355 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
2356
2357         PR c++/4803
2358         * decl2.c (mark_used): Defer inline functions.
2359         (finish_file): Merge deferred_fns loops. Check all used
2360         inline functions have a definition.
2361         * method.c (make_thunk): Thunks are not inline.
2362
2363         PR c++/5116, c++/764
2364         * call.c (build_new_op): Make sure template class operands are
2365         instantiated.
2366
2367 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
2368
2369         PR C++/7964
2370         * cp-tree.h (resolve_scoped_fn_name): Prototype.
2371         * call.c (resolve_scoped_fn_name): New function. Deal with
2372         more template expansion. Broken out of ...
2373         * parse.y (parse_finish_call_expr): ... here. Call it.
2374         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
2375         resolve_scoped_fn_name and build_call_from_tree.
2376
2377         PR c++/9053
2378         * decl.c (duplicate_decls): Templates may be disambiguated by
2379         return type.
2380
2381         PR c++/8702
2382         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
2383         conversion operators on failure.
2384
2385 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2386
2387         Remove traditional C constructs 2/n.
2388         * call.c (tourney, build_field_call, equal_functions, joust,
2389         compare_ics, build_over_call, build_java_interface_fn_ref,
2390         convert_like_real, op_error, build_object_call, resolve_args,
2391         build_vfield_ref, check_dtor_name, build_scoped_method_call,
2392         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
2393         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
2394         standard_conversion, reference_related_p,
2395         reference_compatible_p, convert_class_to_reference,
2396         direct_reference_binding, reference_binding,
2397         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
2398         add_template_conv_candidate, any_viable, any_strictly_viable,
2399         build_this, splice_viable, print_z_candidates,
2400         build_user_type_conversion, build_new_function_call,
2401         conditional_conversion, build_conditional_expr, build_new_op,
2402         build_op_delete_call, enforce_access, call_builtin_trap,
2403         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
2404         convert_default_arg, type_passed_as, convert_for_arg_passing,
2405         in_charge_arg_for_name, is_properly_derived_from,
2406         maybe_handle_implicit_object, maybe_handle_ref_bind,
2407         source_type, add_warning, can_convert, can_convert_arg,
2408         perform_implicit_conversion, can_convert_arg_bad,
2409         initialize_reference, add_conv_candidate,
2410         add_template_candidate_real, add_template_candidate): Ansify.
2411
2412 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
2413
2414         PR c++/8572
2415         * cp-tree.h (grokoptypename): Add SCOPE parameter.
2416         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
2417         if in a template scope.
2418         * parse.y (unoperator): Return the scope.
2419         (operator_name): Adjust grokoptypename call.
2420
2421 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2422
2423         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
2424         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
2425         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
2426
2427 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
2428
2429         * ChangeLog: Fix a typo.
2430         * class.c: Fix comment typos.
2431         * cp-tree.h: Likewise.
2432
2433 2002-12-18  Jason Merrill  <jason@redhat.com>
2434
2435         Handle anonymous unions at the tree level.
2436         C++ ABI change: Mangle anonymous unions using the name of their
2437         first named field (by depth-first search).  Should not cause
2438         binary compatibility problems, though, as the compiler previously
2439         didn't emit anything for affected unions.
2440         * cp-tree.def (ALIAS_DECL): New tree code.
2441         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
2442         first field, not the largest.
2443         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
2444         push the decl, and write it out at namespace scope.
2445         * decl.c (lookup_name_real): See through an ALIAS_DECL.
2446         (pushdecl): Add namespace bindings for ALIAS_DECLs.
2447         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
2448         of a decl which doesn't have one.
2449         * typeck.c (build_class_member_access_expr): Don't recurse if
2450         we already have the type we want.
2451
2452 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2453
2454         PR c++/8099
2455         * friend.c (make_friend_class): Allow partial specialization
2456         when declaration is not a template friend.
2457
2458 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2459
2460         PR c++/3663
2461         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
2462         TREE_PROTECTED to created decl nodes.
2463
2464 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
2465
2466         * class.c (build_base_field): Do not set DECL_PACKED on the
2467         FIELD_DECL.
2468
2469 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2470
2471         * cp-tree.h (struct tree_srcloc): Use location_t.
2472         (SOURCE_LOCUS): New.
2473         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
2474
2475 2002-12-17  Jason Merrill  <jason@redhat.com>
2476
2477         * decl.c (finish_function): Also complain about no return in
2478         templates.
2479         * semantics.c (finish_return_stmt): Also call check_return_expr in
2480         templates.
2481         * typeck.c (check_return_expr): In a template, just remember that we
2482         saw a return.
2483
2484 2002-12-16  Jason Merrill  <jason@redhat.com>
2485
2486         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
2487         of the CALL_EXPR.
2488
2489         * semantics.c (do_pushlevel): Call pushlevel after adding the
2490         SCOPE_STMT.
2491         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
2492         * parse.y (function_body): Go back to using compstmt.
2493         * decl.c (pushdecl): Skip another level to get to the parms level.
2494
2495         * call.c (build_new_method_call): Use is_dummy_object to determine
2496         whether or not to evaluate the object parameter to a static member
2497         function.
2498
2499 2002-12-14  Jason Merrill  <jason@redhat.com>
2500
2501         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
2502         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
2503         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
2504         don't bother with an AGGR_INIT_EXPR.
2505         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
2506         just generate a new decl normally.  Take return slot parm.
2507         * cp-tree.h: Adjust prototype.
2508
2509 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2510
2511         PR C++/8031
2512         * cvt.c (convert_to_pointer_force): Don't try comparing against
2513         erronous type.
2514
2515 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
2516
2517         * cp-tree.h: Have the multiple-include guards around
2518         the entire file.
2519
2520 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
2521
2522         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
2523         for SPEW_DEBUG.
2524         (snarf_method): Same.
2525         (snarf_defarg): Same.
2526
2527 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
2528
2529         PR c++/8372
2530         * pt.c (tsubst_copy): Handle destructor names more correctly.
2531
2532 2002-12-10  Matt Austern   <austern@apple.com>
2533
2534         * cp-tree.h: get rid of needs_virtual_reinit bit.
2535
2536 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
2537
2538         * NEWS: Document removal of in-class initialization extension for
2539         static data members of non-arithmetic, non-enumeration type.
2540         * decl.c (check_static_variable_definition): Do not allow that
2541         extension.
2542         * decl2.c (grokfield): Do not call digest_init when processing
2543         templates.
2544
2545 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2546
2547         * error.c (dump_expr): Fix format specifier warning.
2548
2549 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
2550
2551         * class.c (finish_struct_1): Correct comment.
2552         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
2553
2554 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2555
2556         PR C++/8799
2557         * error.c (dump_expr): Don't ever try to dump a non-existent
2558         expression.
2559
2560 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
2561
2562         Implement covariant returns.
2563         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
2564         (struct lang_decl_flags): Add this_thunk_p flag.
2565         Rename vcall_offset to virtual_offset.
2566         (struct lang_decl): Rename delta to fixed_offset.
2567         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
2568         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
2569         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
2570         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
2571         (make_thunk): Add this_adjusting arg.
2572         (finish_thunk): Declare.
2573         (mangle_thunk): Add this_adjusting arg.
2574         * class.c (get_vcall_index): Use base function for lookup.
2575         (update_vtable_entry_for_fn): Generate covariant thunk.
2576         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
2577         (build_vtbl_initializer): Use base function for lookup.
2578         Finish covariant thunk here. Adjust thunk generation.
2579         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
2580         Adjust thunk dumping.
2581         * mangle.c (mangle_call_offset): New function.
2582         (mangle_thunk): Adjust for covariant thunks.
2583         * method.c (make_thunk): Adjust. Do not set name here.
2584         (finish_thunk): New function. Set name here.
2585         (use_thunk): Generate covariant thunks too.
2586         (thunk_adjust): New function.
2587         * search.c (covariant_return_p): Remove. Fold into ...
2588         (check_final_overrider): ... here. Simplify.
2589         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
2590
2591 2002-12-03  Jason Merrill  <jason@redhat.com>
2592
2593         PR c++/8674
2594         * call.c (build_over_call): Check specifically for TARGET_EXPR
2595         when eliding.
2596
2597         PR c++/8461, c++/8625
2598         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
2599         (cp_convert_parm_for_inlining): Remove.
2600         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
2601         Remove.
2602         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
2603         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
2604
2605         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
2606         an ambiguous conversion.
2607
2608 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
2609
2610         PR c++/8688
2611         * decl.c (reshape_init): Handle erroneous initializers.
2612
2613 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
2614
2615         PR c++/8720
2616         * spew.c (remove_last_token): Make sure that last_chunk is set
2617         correctly.
2618
2619         PR c++/8615
2620         * error.c (dump_expr): Handle character constants with
2621         TREE_OVERFLOW set.
2622
2623 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2624
2625         DR 180
2626         * decl.c (grokdeclarator): Require class-key for all friend class.
2627         Output the correct type and context in the error message.
2628
2629 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
2630
2631         PR c++/5919
2632         * pt.c (unify): Use variably_modified_type_p to test validity of
2633         template argument types.
2634
2635         PR c++/8727
2636         * cp-tree.h (lang_type_class): Add typeinfo_var.
2637         (CLASSTYPE_TYPEINFO_VAR): New macro.
2638         * rtti.c (get_tinfo_decl): Use it.
2639
2640         PR c++/8663
2641         * init.c (expand_member_init): Always get the main variant of a
2642         base class.
2643
2644 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
2645
2646         PR c++/8332
2647         PR c++/8493
2648         * decl.c (cxx_init_decl_processing): Use size_type_node, not
2649         c_size_type_node.
2650         * decl2.c (coerce_new_type): Likewise.
2651         * except.c (do_allocate_exception): Likewise.
2652
2653 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
2654
2655         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
2656         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
2657         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
2658         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
2659         typeck2.c: Include coretypes.h and tm.h.
2660         * Make-lang.in: Update dependencies.
2661
2662 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
2663
2664         PR c++/8227
2665         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
2666         (check_initializer): Validate the type of the initialized
2667         variable, even if the initializer is absent.
2668         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
2669
2670         PR c++/8214
2671         * typeck.c (convert_for_assignment): Do not use
2672         decl_constant_value on the operand.
2673
2674         PR c++/8511
2675         * pt.c (instantiate_decl): Handle template friends defined outside
2676         of the class correctly.
2677
2678 2002-11-29  Joe Buck <jbuck@synopsys.com>
2679
2680         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
2681         anonymous structs.
2682
2683 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
2684
2685         * class.c (walk_subobject_offsets): Recur on binfos as well as on
2686         types.
2687         (layout_nonempty_base_or_field): Pass it a binfo when processing a
2688         base class.
2689         (layout_empty_base): Likewise.
2690         (build_base_field): Likewise.
2691
2692 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
2693
2694         * class.c (build_base_field): Make sure we get the canonical base
2695         when descending through primary bases.
2696
2697 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
2698
2699         * decl.c (check_initializer): Don't error on initialisation of
2700         a scalar with a brace-enclosed expression.
2701
2702 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
2703
2704         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
2705         (template_parms_equal): Remove prototype.
2706         * typeck.c (buuld_indirect_ref): Reformat.
2707
2708 2002-11-25  Jason Merrill  <jason@redhat.com>
2709
2710         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
2711         and a DO_STMT.
2712
2713 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
2714
2715         * tree.c (cp_build_qualified_type_real): Correct handling of
2716         array types.
2717         * class.c (walk_subobject_offsets): Fix thinko.
2718         (build_base_field): Record offsets of empty bases in primary
2719         virtual bases.
2720         (layout_class_type): Record offsets of empty bases in fields.
2721
2722         * search.c (is_subobject_of_p_1): Fix thinko.
2723         (lookup_field_queue_p): Likewise.
2724
2725 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
2726
2727         * class.c (layout_class_type): Reuse tail padding when laying out
2728         virtual bases.
2729
2730 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
2731
2732         * rtti.c (qualifier_flags): Fix thinko.
2733
2734 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2735
2736         Remove traditional C constructs 1/n.
2737         * cp-tree.h (init_method, set_mangled_name_for_decl,
2738         build_opfncall, hack_identifier, make_thunk, use_thunk,
2739         synthesize_method, implicitly_declare_fn,
2740         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
2741         maybe_clone_body): Remove use of PARAMS.
2742
2743         * method.c (do_build_assign_ref, do_build_copy_constructor,
2744         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
2745         Likewise.
2746         (synthesize_method): Use 'bool' type and constants instead of
2747         'int'.
2748         (locate_copy): Likewise.
2749         (implicitly_declare_fn): Likewise.
2750
2751         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
2752         Remove old-style declaration.
2753         (maybe_clone_body): Use 'bool' type and constants.
2754
2755 2002-11-21  Glen Nakamura  <glen@imodulo.com>
2756
2757         PR c++/8342
2758         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
2759         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
2760         of the branches of a COND_EXPR.
2761
2762 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
2763
2764         * pt.c (for_each_template_parm): Free allocated memory.
2765         * search.c (is_subobject_of_p_1): New function.
2766         (is_subobject_of_p): Avoid walking virtual bases multiple times.
2767
2768 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
2769
2770         * g++spec.c (lang_specific_spec_functions): New.
2771
2772 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
2773
2774         * ChangeLog: Follow spelling conventions.
2775         * class.c: Likewise.
2776         * decl2.c: Likewise.
2777
2778 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
2779
2780         * search.c (dfs_push_decls): Do not try to reorder elements
2781         3..n of method_vec if method_vec has only two elements.
2782         Reverse order of two tests to avoid accessing unallocated
2783         memory.
2784
2785 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
2786
2787         * class.c (dfs_find_final_overrider): Adjust so that the most
2788         derived object is a binfo, rather than a class type.
2789         (find_final_overrider): Likewise.
2790         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
2791         (add_vcall_offset): Likewise.
2792
2793 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2794
2795         PR c++/8389
2796         * pt.c (instantiate_template): Push class scope for member
2797         functions.
2798         (get_mostly_instantiated_function_type): Likewise.  Don't call
2799         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
2800         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
2801         * mangle.c (write_encoding, write_unqualified_name): Adjust.
2802
2803 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
2804
2805         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
2806         vcall offfsets.  Split out ...
2807         (add_vcall_offset): ... new function.
2808
2809         PR c++/8338
2810         * pt.c (for_each_template_parm): Add htab parameter.
2811         (process_partial_specialization): Adjust call.
2812         (push_template_decl_real): Likewise.
2813         (pair_fn_data): Add visited.
2814         (for_each_template_parm_r): Avoid walking duplicates more than
2815         once.
2816         (uses_template_parms): Adjust call to for_each_template_parm.
2817
2818 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
2819
2820         * class.c (add_implicitly_declared_members): Put implicitly
2821         declared functions at the end of TYPE_METHODs when -fabi-version
2822         is at least 2.
2823
2824 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
2825
2826         * decl2.c (finish_file): Correct spelling.
2827
2828 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
2829
2830         * call.c (build_special_member_call): Do not try to lookup VTTs by
2831         name.
2832         * class.c (vtbl_init_data): Add generate_vcall_entries.
2833         (get_vtable_decl): Do not look up virtual tables by name.
2834         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
2835         (set_primary_base): Do not set CLASSTYPE_RTTI.
2836         (determine_primary_base): Likewise.
2837         (get_matching_virtual): Remove.
2838         (get_vcall_index): New function.
2839         (update_vtable_entry_for_fn): Do not try to use virtual thunks
2840         when they are not required.  Assign vcall indices at this point.
2841         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
2842         Do update dynamic_classes.
2843         (build_vtt): Do not add VTTs to the symbol table.
2844         (build_ctor_vtbl_group): Likewise.
2845         (build_vtbl_initializer): Simplify handling of vcall indices.
2846         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
2847         for the most derived class.
2848         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
2849         the vtable.
2850         * cp-tree.h (dynamic_classes): New macro.
2851         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
2852         (CLASSTYPE_RTTI): Remove.
2853         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
2854         (CLASSTYPE_VCALL_INDICES): New macro.
2855         (CLASSTYPE_VTABLES): Likewise.
2856         (BV_USE_VCALL_INDEX_P): Remove.
2857         (build_vtable_path): Remove.
2858         * decl2.c (finish_vtable_vardecl): Remove.
2859         (key_method): Remove #if 0'd code.
2860         (finish_vtable_vardecl): Rename to ...
2861         (maybe_emit_vtables): ... this.
2862         (finish_file): Use it.
2863         * search.c (look_for_overrides_here): Update comment.
2864
2865 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
2866
2867         PR c/7353 redux
2868         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
2869
2870 2002-10-30  Jason Merrill  <jason@redhat.com>
2871
2872         PR c++/8186
2873         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
2874         * call.c (convert_for_arg_passing): Set it.
2875         * except.c (stabilize_throw_expr): Recurse for such an arg.
2876
2877 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
2878
2879         * cp-tree.h (lang_decl_flags): Remove init_priority.
2880         (lang_decl): Add delta.
2881         (GLOBAL_INIT_PRIORITY): Remove.
2882         (THUNK_DELTA): Revise definition.
2883         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
2884         * dump.c (cp_dump_tree): Don't dump it.
2885
2886 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
2887
2888         PR c++/8160
2889         * typeck2.c (process_init_constructor): Call complete_array_type.
2890
2891         PR c++/8149
2892         * decl.c (make_typename_type): Issue errors about invalid results.
2893
2894 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2895
2896         Core issue 287, PR c++/7639
2897         * cp-tree.h (lang_type_class): Add decl_list field.
2898         (CLASSTYPE_DECL_LIST): New macro.
2899         (maybe_add_class_template_decl_list): Add declaration.
2900         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
2901         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
2902         (maybe_add_class_template_decl_list): New function.
2903         (add_implicitly_declared_members): Use it.
2904         * decl.c (maybe_process_template_type_declaration): Likewise.
2905         (pushtag): Likewise.
2906         * friend.c (add_friend): Likewise.
2907         (make_friend_class): Likewise.
2908         * semantics.c (finish_member_declaration): Likewise.
2909         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
2910         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
2911         to process members and friends in the order of declaration.
2912
2913 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
2914
2915         PR c++/8287
2916         * decl.c (finish_destructor_body): Create the label to jump to
2917         when returning from a destructor here.
2918         (finish_function_body): Rather than here.
2919
2920 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
2921
2922         PR c++/7266
2923         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
2924         SCOPE_REF is not null before dereferencing it.
2925
2926 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
2927
2928         * call.c (build_over_call): Use DECL_CONTEXT, not
2929         DECL_VIRTUAL_CONTEXT.
2930         * class.c (modify_vtable_entry): Don't mess with
2931         DECL_VIRTUAL_CONTEXT.
2932         (set_vindex): Remove.
2933         (set_primary_base): Remove vfuns_p parameter.
2934         (determine_primary_base): Likewise.
2935         (modify_all_vtables): Likewise.
2936         (layout_class_type): Likewise.  Adjust calls to other functions
2937         accordingly.
2938         (finish_struct_1): Adjust calls to modified functions.  Set
2939         DECL_VINDEX here.
2940         * cp-tree.h (lang_type_class): Remove vsize.
2941         (CLASSTYPE_VSIZE): Remove.
2942         (lang_decl): Remove thunks.
2943         (DECL_THUNKS): Adjust.
2944         (DECL_VIRTUAL_CONTEXT): Remove.
2945         (duplicate_decls): Don't copy it.
2946         * pt.c (build_template_decl): Don't set it.
2947         (tsubst_decl): Likewise.
2948         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
2949
2950         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
2951         (build_vtable_entry): Remove.
2952         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
2953         (lang_decl): Add thunks.
2954         (DECL_THUNKS): New macro.
2955         * decl.c (duplicate_decls): Copy it.
2956         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
2957         * semantics.c (emit_associated_thunks): Simplify.
2958
2959 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
2960
2961         PR c++/7228
2962         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
2963         lang_type structure exists before accessing field.
2964         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
2965         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
2966         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
2967         * class.c (check_field_decls): Use new macros.
2968         * typeck2.c (process_init_constructor): Remove redundant check for
2969         existence of lang_type structure.
2970
2971 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
2972
2973         * class.c (end_of_base): New method.
2974         (end_of_class): Use it.  Check indirect virtual bases.
2975
2976         * class.c (check_field_decls): Fix typo.
2977
2978 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
2979
2980         PR c++/8067
2981         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
2982         related variables.
2983
2984         PR c++/7679
2985         * spew.c (next_token): Do not return an endless stream of
2986         END_OF_SAVED_INPUT tokens.
2987         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
2988         the cached token stream.
2989         (snarf_defarg): Likewise.
2990
2991 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
2992
2993         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
2994         variably_modified_type_p.
2995         * cp-tree.h: Remove prototype of variably_modified_type_p.
2996         * tree.c (variably_modified_type_p): Remove; now implemented
2997         in language-independent code.
2998
2999 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
3000
3001         PR c++/6579
3002         * spew.c (snarf_parenthesized_expression): New function.
3003         (snarf_block): Use it.
3004
3005 2002-10-22  Richard Henderson  <rth@redhat.com>
3006
3007         * method.c (use_thunk): Always compute vcall_value; assert that
3008         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
3009         for vcall thunks as well.
3010
3011 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
3012
3013         * class.c (empty_base_at_nonzero_offset_p): New function.
3014         (layout_nonempty_base_or_field): Do not check for conflicts when
3015         laying out a virtual base using the GCC 3.2 ABI.
3016         (build_base_field): Correct checking for presence of empty classes
3017         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
3018
3019         * class.c (include_empty_classes): Use normalize_rli.
3020         (layout_class_type): Likewise.
3021
3022         * decl.c (reshape_init): Tweak handling of character arrays.
3023
3024         PR c++/8218
3025         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
3026         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
3027         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
3028         (check_field_decls): Likewise.
3029         (layout_class_type): Likewise.
3030         (finish_struct_1): Initialize it.
3031         (walk_subobject_offsets): Use it to prune searches.
3032
3033 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
3034
3035         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
3036         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
3037         TARGET_ASM_OUTPUT_MI_THUNK in comments.
3038
3039 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
3040
3041         * decl.c (start_decl): Point users of the old initialized-
3042         typedef extension at __typeof__.
3043
3044 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3045
3046         * Make-lang.in (method.o): Depend on TARGET_H.
3047         * method.c (target.h): Include it.
3048         (use_thunk): Use target hooks.  Use vcall thunks, if available.
3049
3050 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3051
3052         * class.c (base_derived_from): Make sure return value is a bool.
3053
3054 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3055
3056         * class.c (find_final_overrider_data_s): Remove overriding_fn and
3057         overriding_base.
3058         (dfs_base_derived_from): New function.
3059         (base_derived_from): Likewise.
3060         (dfs_find_final_overrider): Use base_derived_from.
3061         (find_final_overrider): Adjust.
3062
3063 2002-10-18  Jason Merrill  <jason@redhat.com>
3064
3065         PR c++/8080
3066         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
3067         with condition decls in a template.
3068
3069 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
3070
3071         * class.c (add_method): Compare template parms too.
3072
3073 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
3074
3075         PR c++/7584
3076         * class.c (handle_using_decl): Allow the declaration used to be
3077         from an ambiguous base.
3078
3079         * pt.c (convert_template_argument): Revert this change:
3080                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3081                 * pt.c (convert_template_argument): Do not fold non-type
3082                 template rguments when inside a template.
3083
3084         * init.c (expand_default_init): Handle brace-enclosed initializers
3085         correctly.
3086
3087 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3088
3089         * mangle.c (write_expression): Correct handling of enumeration
3090         constants.
3091         (write_template_arg): Likewise.
3092         * pt.c (convert_template_argument): Do not fold non-type template
3093         arguments when inside a template.
3094
3095         PR c++/7478
3096         * cvt.c (convert_to_reference): Allow references as the incoming
3097         type.
3098
3099 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3100
3101         PR c++/7524
3102         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
3103         build_qualified_type.
3104
3105 2002-10-15  Richard Henderson  <rth@redhat.com>
3106
3107         * error.c (dump_expr): Use real_to_decimal directly, and with
3108         the new arguments.
3109
3110 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
3111
3112         * decl.c (reshape_init): Fix typo.
3113
3114         * cp-tree.h (operator_name_info_t): Add arity.
3115         * lex.c (init_operators): Initialize it.
3116         * mangle.c (write_conversion_operator_name): New function.
3117         (write_unqualified_name): Use it.
3118         (write_template_args): Accept template arguments as a TREE_LIST.
3119         (write_expression): Adjust handling of qualified names to match
3120         specification.
3121
3122 2002-10-15  Jason Merrill  <jason@redhat.com>
3123
3124         * call.c (call_builtin_trap): New fn.
3125         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
3126         (build_call): Don't set current_function_returns_abnormally outside
3127         a function.
3128
3129 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
3130
3131         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
3132         clear CLASSTYPE_EMPTY_P.
3133         (build_base_field): Likewise.
3134         (build_base_fields): Likewise.
3135         (check_bases_and_members): Likewise.
3136         (create_vtbl_ptr): Likewise.
3137         (layout_class_type): Likewise.  Ensure that empty classes have
3138         size zero when used as base classes in the 3.2 ABI.
3139         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
3140         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
3141         parameter.
3142         (is_empty_class): Correct definition when using post-3.2 ABI.
3143         * cp-tree.h (lang_type_class): Add empty_p.
3144         (CLASSTYPE_EMPTY_P): New macro.
3145
3146 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
3147
3148         * init.c (build_delete): Do not apply save_expr for arrays.
3149         (build_vec_delete): Likewise.
3150
3151 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
3152
3153         * decl.c (layout_var_decl): Call layout_decl even for variables
3154         whose type is an array with unspecified bounds.
3155
3156         PR c++/7176
3157         * lex.c (do_identifier): Add another option for the parsing
3158         parameter.
3159         * parse.y (do_id): Use it.
3160
3161 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3162
3163         PRs C++/6803, C++/7721 and C++/7803
3164         * decl.c (grokdeclarator): Gracefully handle template-name as
3165         decl-specifier.
3166
3167 2002-10-11  Jason Molenda  <jmolenda@apple.com>
3168
3169         * init.c (build_field_list): Provide uses_unions_p with a default
3170         value.
3171
3172 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
3173
3174         PR c++/5661
3175         * cp-tree.h (variably_modified_type_p): New function.
3176         (grokdeclarator) Tighten check for variably modified types as
3177         fields.
3178         * pt.c (convert_template_argument): Do not allow variably modified
3179         types as template arguments.
3180         * tree.c (variably_modified_type_p): New function.
3181
3182         * NEWS: Document removal of "new X = ..." extension.
3183         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
3184         brace-enclosed initializers.
3185         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
3186         (initialize_local_var): Remove declaration.
3187         (expand_static_init): Likewise.
3188         * decl.c (next_initializable_field): New function.
3189         (reshape_init): Likewise.
3190         (check_initializer): Use them.  Build dynamic initializer for
3191         aggregates here too.
3192         (initialize_local_var): Simplify, and incorporate cleanup
3193         insertion code as well.
3194         (destroy_local_var): Remove.
3195         (cp_finish_decl): Tidy.
3196         (expand_static_init): Fold checks for whether or not a variable
3197         needs initialization into this function.  Simplify.
3198         * decl2.c (do_static_initialization): Simplify.
3199         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
3200         be done for us automatically.
3201         (expand_default_init): Handle brace-enclosed initializers
3202         correctly.
3203         (expand_aggr_init_1): Remove RTL-generation code.
3204         (build_vec_init): Remove "new X = ..." support.
3205         * parse.y (new_initializer): Likewise.
3206         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
3207         brace-enclosed initializer.
3208         (create_pseudo_type_info): Likewise.
3209         * typeck2.c (store_init_value): Don't try to handle digest_init
3210         being called more than once.
3211         (digest_init): Tidy handling of brace-enclosed initializers.
3212
3213 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3214
3215         * decl.c (typename_hash): Use htab_hash_pointer.
3216
3217 2002-10-10  Jim Wilson  <wilson@redhat.com>
3218
3219         * decl.c (duplicate_decls): Don't call decl_attributes.
3220
3221 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
3222
3223         PR c/7353
3224         * decl.c (start_decl): Unconditionally issue error for
3225         'typedef foo = bar'.
3226         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
3227         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
3228
3229 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3230
3231         * decl2.c (prune_vtable_vardecl): Delete unused function.
3232
3233 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3234
3235         PR c++/7754
3236         * decl2.c (finish_anon_union): Do not expand anonymous unions when
3237         procesing template functions.
3238         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
3239         type. Call layout_decl.
3240         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
3241
3242 2002-10-07  Richard Henderson  <rth@redhat.com>
3243
3244         * decl2.c, pt.c: Revert c++/7754 fix.
3245
3246 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3247
3248         PR c++/7804
3249         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
3250
3251 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3252
3253         PR c++/7931
3254         * pt.c (for_each_template_parm_r): Handle BASELINKs.
3255
3256         PR c++/7754
3257         * decl2.c (finish_anon_union): Do not expand anonymous unions when
3258         procesing template functions.
3259         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
3260         type. Call layout_decl.
3261         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
3262
3263 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3264
3265         PR c++/8006
3266         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
3267         template parameters.
3268         (globals): Add entity and need_abi_warning.
3269         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
3270         CLASSTYPE_TEMPLATE_INFO.
3271         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
3272         TYPE_TI_TEMPLATE.
3273         (write_prefix): Handle typename types correctly.
3274         (write_template_prefix): Handle template template parameters
3275         correctly.
3276         (start_mangling): Add entity parameter.
3277         (finish_mangling): Warn about names whose mangling will change.
3278         (mangle_decl_string): Adjust.
3279         (mangle_type_string): Likewise.
3280         (mangle_special_for_type): Likewise.
3281         (mangle_ctor_vtbl_for_type): Likewise.
3282         (mangle_thunk): Likewise.
3283         (mangle_guard_variable): Likewise.
3284         (mangle_ref_init_variable): Likewise.
3285
3286 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
3287
3288         PR c++/7188.
3289         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
3290         * cp-tree.h (emit_base_init): Rename to ....
3291         (emit_mem_initializers): ... this.
3292         (expand_member_init): Change prototype.
3293         * init.c (perform_member_init): Compute explicit, rather than
3294         requiring it as a parameter.
3295         (sort_member_init): Rename to ...
3296         (sort_mem_initializers): ... this.  Process bases and data members
3297         together.
3298         (sort_base_init): Remove.
3299         (emit_base_init): Rename to ...
3300         (emit_mem_initializers): ... this.
3301         (expand_aggr_vbase_init_1): Remove.
3302         (construct_virtual_bases): Rename to ...
3303         (construct_virtual_base): ... this.
3304         (expand_member_init): Rework handling of base initializers.
3305         * method.c (do_build_copy_constructor): Use
3306         finish_mem_initializers.
3307         * parse.y (member_init): Adjust calls to expand_member_init.
3308         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
3309         (tsubst_initializer_list): Use expand_member_init.
3310         * semantics.c (finish_mem_intiailizers): Simplify.
3311
3312 2002-10-02  Matt Austern  <austern@apple.com>
3313         * decl.c (walk_vtables_r): Fixed typo that caused result to
3314         never get a nonzero value.
3315
3316 2002-10-02  Roger Sayle  <roger@eyesopen.com>
3317
3318         PR optimization/6627
3319         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
3320         from here, and move it to tree.h.
3321         * decl.c (cxx_init_decl_processing): If storing the vbit
3322         in function pointers, ensure that force_align_functions_log
3323         is atleast one.
3324
3325 2002-10-02  Matt Austern  <austern@apple.com>
3326
3327         * class.c (check_field_decls): Changed warning about const member
3328         variables so that it doesn't get issued for a class aggregate.
3329
3330 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
3331
3332         * decl.c (cp_finish_decl): Make sure array types are laid out,
3333         even if the array bounds are unknown.
3334
3335 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
3336
3337         * class.c (build_vtbl_initializer): Change build_c_cast
3338         to build1.
3339
3340 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
3341
3342         * decl.c (cp_finish_decl): Make sure array types are laid out,
3343         even if the array bounds are unknown.
3344
3345         * decl.c (cp_finish_decl): Correct check for dynamic
3346         initialization of thread-local storage.
3347
3348 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
3349
3350         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
3351         overloaded.
3352
3353 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
3354
3355         * class.c (build_vtbl_initializer): Add cast.
3356         (add_vcall_offset_vtbl_entries_1):
3357         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
3358
3359 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
3360
3361         * class.c (walk_subobject_offsets): Correct the calculation of
3362         offsets for virtual bases.  Correct the counting of array
3363         elements.
3364         (layout_nonempty_base_or_field): Simplify.  Correct the
3365         calculation of offsets to be propagated through the binfo
3366         hierarchy.
3367         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
3368         Add the FIELD_DECL to TYPE_FIELDS.
3369         (build_base_fields): Adjust accordingly.
3370         (layout_virtual_bases): Use build_base_field.
3371         (end_of_class): Return a tree, not an integer.
3372         (warn_about_ambiguous_direct_bases): Rename to ...
3373         (warn_about_ambiguous_bases): ... this.
3374         (include_empty_classes): New function.
3375         (layout_class_type): Create an alternative version of the type to
3376         be used when as a base class type.  Do not call
3377         finish_record_layout until we are done laying out the class.
3378         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
3379         as_base.
3380         (CLASSTYPE_SIZE): Reimplement.
3381         (CLASSTYPE_SIZE_UNIT): Likewise.
3382         (CLASSTYPE_ALIGN): Likweise.
3383         (CLASSTYPE_USER_ALIGN): Likewise.
3384         (CLASSTYPE_AS_BASE): New macro.
3385         (DECL_INITIALIZED_P): Likewise.
3386         (extract_init): Remove prototype.
3387         (build_forced_zero_init): Rename to ...
3388         (build_zero_init): ... this.
3389         (force_store_init_value): Remove.
3390         * decl.c (obscure_complex_init): Remove.
3391         (duplicate_decls): Copy DECL_INITIALIZED_P.
3392         (check_initializer): Do not leave junk in DECL_INITIAL.
3393         (cp_finish_decl): Handle zero-initialization of entities with
3394         static storage duration.
3395         * expr.c (extract_init): Remove.
3396         * init.c (build_forced_zero_init): Remove.
3397         (build_zero_init): New function.
3398         (build_default_init): Use it.
3399         (build_field_list): Skip FIELD_DECLs for base subobjects.
3400         (push_base_cleanups): Likewise.
3401         * method.c (do_build_assign_ref): Likewise.
3402         (synthesize_exception_spec): Likewise.
3403         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
3404         (regenerate_decl_from_template): To not set DECL_INITIAL for a
3405         static data member whose initialization took place in its class.
3406         (instantiate_decl): Do not pass an initializer to cp_finish_decl
3407         in that situation.
3408         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
3409         (dfs_unuse_fields): Likewise.
3410         * tree.c (pod_type_p): Handle error_mark_node.
3411         (zero_init_p): Likewise.
3412         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
3413         subobjects.
3414         * typeck2.c (store_init_value): Remove #if 0'd code.
3415         (force_store_init_value): Remove.
3416         (process_init_constructor): Use build_zero_init.
3417
3418 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
3419
3420         PR c++/7788
3421         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
3422
3423 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
3424
3425         * cp-tree.h: Fix comment typos.
3426         * decl.c: Likewise.
3427         * pt.c: Likewise.
3428
3429 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
3430
3431         * cp/class.c (contains_empty_class_p): New method.
3432         (walk_subobject_offsets): Correct computation of field offset.
3433         (layout_empty_base): Correct placement of emtpy base classes.
3434         (layout_class_type): Warn about ABI changes.
3435
3436 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
3437
3438         * cp/class.c (layout_virtual_bases): Do not round the size of the
3439         type to a multiple of the alignment before laying out virtual bases.
3440         (layout_class_type): Correct handling of bit-fields that are wider
3441         than their type inside unions.  Round the size of the type to a
3442         even number of bytes when computing the size without virtual
3443         bases.
3444         * cp/cp-tree.h (abi_version_at_least): New macro.
3445
3446 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
3447
3448         * ChangeLog: Follow spelling conventions.
3449         * ChangeLog.2: Likewise.
3450         * call.c: Likewise.
3451         * class.c: Likewise.
3452         * cp-tree.h: Likewise.
3453         * cvt.c: Likewise.
3454         * decl.c: Likewise.
3455         * decl2.c: Likewise.
3456         * except.c: Likewise.
3457         * friend.c: Likewise.
3458         * g++spec.c: Likewise.
3459         * init.c: Likewise.
3460         * lex.c: Likewise.
3461         * mangle.c: Likewise.
3462         * method.c: Likewise.
3463         * operators.def: Likewise.
3464         * optimize.c: Likewise.
3465         * pt.c: Likewise.
3466         * rtti.c: Likewise.
3467         * search.c: Likewise.
3468         * semantics.c: Likewise.
3469         * spew.c: Likewise.
3470         * tree.c: Likewise.
3471         * typeck.c: Likewise.
3472
3473 2002-09-18  Devang Patel  <dpatel@apple.com>
3474
3475         * cp/cp-tree.h: New prototype for walk_vtabls().
3476         * cp/decl.c (walk_vtables_r): New function.
3477         (struct cp_binding_level): Add new members, namespaces,
3478         names_size and vtables.
3479         (add_decl_to_level): Add decl in namespaces or vtables
3480         chain, if conditions match.
3481         (walk_vtables): New function.
3482         (walk_namespaces_r): Travers separate namespace chain
3483         for namespace decls.
3484         (wrapup_globals_for_namespace): Use names_size instead
3485         of list_length().
3486         * cp/decl2.c (finish_file): Use walk_vtables() instead of
3487         walk_globals() to walk vtable decls.
3488
3489 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
3490
3491         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
3492         ICE with invalid pointers & references.
3493
3494 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
3495
3496         * Make-lang.in: Remove all references to the demangler.
3497         * cxxfilt.c: Moved to binutils.
3498
3499 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3500
3501         PR c++/7718
3502         * pt.c (tsubst_decl): Remove assert.
3503
3504         Remove DR 295 implementation.
3505         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
3506         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
3507         about ignoring volatile qualifiers.
3508
3509         * search.c (lookup_member): Correct documentation.
3510
3511 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
3512
3513         * cp-tree.h (union lang_tree_node): Add chain_next option.
3514
3515 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3516
3517         * parse.y (parse_finish_call_expr): Check lookup_member result.
3518
3519         PR c++/7015
3520         * semantic.c (finish_asm_stmt): Fix operand/output_operands
3521         thinko.
3522         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
3523
3524 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
3525
3526         PR c++/7919
3527         * call.c (build_over_call): Convert this pointer for fns found by
3528         using decls.
3529
3530 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
3531
3532         * ChangeLog: Follow spelling conventions.
3533         * ChangeLog.1: Likewise.
3534
3535 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
3536
3537         PR c++/7768
3538         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
3539
3540 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
3541
3542         * error.c: Fix comment formatting.
3543         * except.c: Likewise.
3544         * expr.c: Likewise.
3545         * friend.c: Likewise.
3546         * g++spec.c: Likewise.
3547         * init.c: Likewise.
3548         * lex.c: Likewise.
3549         * mangle.c: Likewise.
3550         * method.c: Likewise.
3551         * optimize.c: Likewise.
3552         * pt.c: Likewise.
3553         * rtti.c: Likewise.
3554         * search.c: Likewise.
3555         * semantics.c: Likewise.
3556         * spew.c: Likewise.
3557         * tree.c: Likewise.
3558         * typeck.c: Likewise.
3559         * typeck2.c: Likewise.
3560
3561 2002-09-13  Matt Austern  <austern@apple.com>
3562
3563         PR C++/7828
3564         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
3565         * cp/call.c: Change call-by-const-reference mechanism to use
3566         non_cast_lvalue_p when deciding whether the create a temporary.
3567         We need a temporary when passing, e.g. (long) x by const ref.
3568
3569 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
3570
3571         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
3572
3573 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
3574
3575         * decl.c: Fix comment formatting.
3576         * decl2.c: Likewise.
3577
3578 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
3579
3580         * call.c: Fix comment formatting.
3581         * class.c: Likewise.
3582         * cp-lang.c: Likewise.
3583         * cp-tree.h: Likewise.
3584         * cvt.c: Likewise.
3585
3586 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
3587
3588         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
3589         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
3590         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
3591         minor adjustments (use version_string, eliminate yet another
3592         duplicate of xmalloc)
3593
3594 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3595
3596         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
3597
3598 2002-09-05  Jason Merrill  <jason@redhat.com>
3599
3600         * typeck2.c (add_exception_specifier): Only pedwarn for an
3601         incomplete type.
3602         (require_complete_eh_spec_types): New fn.
3603         (cxx_incomplete_type_diagnostic): Also support pedwarning.
3604         * typeck.c (complete_type_or_diagnostic): Likewise.
3605         * call.c (build_call): Call require_complete_eh_spec_types.
3606         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
3607         on an incomplete type.
3608
3609 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
3610
3611         * decl.c (start_cleanup_fn): Clear interface_only before
3612         start_function, restore it afterwards.
3613
3614 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
3615
3616         * cp-tree.h (finish_builtin_type): Remove.
3617         * decl2.c (finish_builtin_type): Move to common code.
3618         * decl.c (build_ptrmemfunc_type): Adjust.
3619         * rtti.c (create_pseudo_type_info): Adjust.
3620         (create_tinfo_types): Adjust.
3621
3622 2002-08-31  Jason Merrill  <jason@redhat.com>
3623
3624         * cp-lang.c (cp_expr_size): Allow initialization from a
3625         CONSTRUCTOR.
3626
3627 2002-08-30  Richard Henderson  <rth@redhat.com>
3628
3629         PR opt/7515
3630         * tree.c: Include target.h.
3631         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
3632         don't bind locally.
3633         * Makefile.in (tree.o): Update.
3634
3635 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
3636
3637         * class.c (layout_virtual_bases): Warn about bugs in G++ that
3638         result in incorrect object layouts.
3639         (layout_class_type): Likewise.
3640
3641 2002-08-24  Matt Austern  <austern@apple.com>
3642
3643         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
3644         are allowable.
3645         (real_lvalue_p): Update caller.
3646         (lvalue_p): Ditto.
3647         (non_cast_lvalue_or_else): New.
3648         * tree.h: Declare it.
3649         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
3650
3651 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
3652
3653         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
3654         and COND_EXPR specially; fix error message output.
3655
3656 2002-08-22  Jason Merrill  <jason@redhat.com>
3657
3658         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
3659         * semantics.c (nullify_returns_r): Likewise.
3660
3661 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3662
3663         Fix PR/7621
3664         * typeck.c (finish_class_member_access_expr): Diagnose cases where
3665         name lookup finds nothing.
3666
3667 2002-08-15  Jason Merrill  <jason@redhat.com>
3668
3669         * semantics.c (finish_then_clause): Remove redundant assignment.
3670         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
3671         extra binding level outside the if/switch statement.
3672         (finish_while_cond, finish_for_cond): Rewrite complex condition
3673         into the loop body.
3674
3675 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
3676
3677         * parse.y (sizeof, alignof, typeof): New non-terminals to
3678         increment skip_evaluation.  Replace terminals with them and
3679         decrement skip_evaluation at the end of rules using them.
3680         * decl2.c (mark_used): Don't assemble_external if
3681         skipping evaluation.
3682
3683 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
3684
3685         Fix PR/7504
3686         * parse.y (parse_finish_call_expr): Handle incomplete
3687         type used to name a scope.
3688
3689 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
3690
3691         PR c++/7598
3692         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
3693         regression caused by my 2002-08-08 patch.
3694
3695 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
3696
3697         * decl.c (pushdecl_class_level): Honor requests to bind names to
3698         OVERLOADs.
3699
3700 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3701
3702         * decl2.c (build_call_from_tree): Fix uninitialized variable.
3703         * parse.y (parse_finish_call_expr): Likewise.
3704         * repo.c (old_args, old_dir, old_main): Const-ify.
3705
3706 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
3707
3708         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
3709         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
3710         * optimize.c (maybe_clone_body): Likewise.
3711         * pt.c (tsubst_enum): Likewise.
3712         (lookup_template_class): Likewise.
3713         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
3714
3715 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
3716
3717         * lang-specs.h: Remove -ansi.
3718
3719 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
3720
3721         * tree.c (maybe_dummy_object): Replace // with /* */
3722
3723 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
3724
3725         * call.c (standard_conversion): Use build_ptrmem_type.
3726         * cp-tree.h (build_ptrmem_type): New function.
3727         (adjust_result_of_qualified_name_lookup): Likewise.
3728         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
3729         static data members.
3730         (build_ptrmem_type): New function.
3731         (grokdeclarator): Do not use build_offset_type when encountering a
3732         qualified name.
3733         * parse.y (parse_finish_call_expr): Use
3734         adjust_result_of_qualified_name_lookup.
3735         * search.c (adjust_result_of_qualified_name_lookup): New function.
3736         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
3737         accessing OFFSET_TYPEs directly.
3738
3739 2002-08-08  Mike Stump  <mrs@apple.com>
3740
3741         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
3742         (type_decays_to): Likewise.
3743         * class.c (find_final_overrider): Likewise.
3744         (maybe_note_name_used_in_class): Likewise.
3745         * decl.c (current_tmpl_spec_kind): Likewise.
3746         (add_binding): Likewise.
3747         (push_class_binding): Likewise.
3748         (duplicate_decls): Likewise.
3749         (layout_var_decl): Likewise.
3750         (grokfndecl): Likewise.
3751         (grokdeclarator): Likewise.
3752         (check_default_argument): Likewise.
3753         * decl2.c (handle_class_head): Likewise.
3754         * error.c (dump_template_decl): Likewise.
3755         * init.c (build_offset_ref): Likewise.
3756         * pt.c (check_specialization_scope): Likewise.
3757         (determine_specialization): Likewise.
3758         (check_explicit_specialization): Likewise.
3759         (maybe_check_template_type): Likewise.
3760         (process_partial_specialization): Likewise.
3761         (check_default_tmpl_args): Likewise.
3762         (push_template_decl_real): Likewise.
3763         (convert_template_argument): Likewise.
3764         (try_class_unification): Likewise.
3765         (get_bindings_real): Likewise.
3766         (do_decl_instantiation): Likewise.
3767         * semantics.c (begin_function_definition): Likewise.
3768         (finish_member_declaration): Likewise.
3769         (check_multiple_declarators): Likewise.
3770         * typeck.c (comp_array_types): Likewise.
3771         (comptypes): Likewise.
3772         (expr_sizeof): Likewise.
3773         (build_binary_op): Likewise.
3774         (dubious_conversion_warnings): Likewise.
3775         (check_return_expr): Likewise.
3776
3777 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
3778
3779         * typeck.c (build_class_member_access_expr): Do not return
3780         error_mark_node when no error has occurred.
3781
3782 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3783
3784         * typeck.c (build_component_addr): Remove.
3785         (build_unary_op): Just check it's not a bitfield, and then build
3786         an ADDR_EXPR.
3787
3788 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3789
3790         * class.c (convert_to_base): Correct check for error_mark_node.
3791         (create_vtable_ptr): Remove unused VFUNS_P parm.
3792
3793 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3794
3795         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
3796
3797 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
3798
3799         Rework build_component_ref.
3800         * call.c (build_vfield_ref): Do not go through build_component_ref.
3801         (build_field_call): Use build_class_member_access_expr.
3802         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
3803         (build_object_call): Likewise.
3804         * class.c (convert_to_base): New function.
3805         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
3806         (instantiate_type): Handle BASELINKs.
3807         * cp-tree.def (BASELINK): New tree code.
3808         * cp-tree.h (BASELINK_P): Reimplement.
3809         (SET_BASELINK_P): Remove.
3810         (BASELINK_BINFO): Reimplement.
3811         (BASELINK_FUNCTIONS): Likewise.
3812         (BASELINK_ACCESS_BINFO): Likewise.
3813         (BASELINK_OPTYPE): Likewise.
3814         (convert_to_base): New function.
3815         (name_p): Likewise.
3816         (build_object_ref): Remove.
3817         (build_component_ref_1): Likewise.
3818         (build_component_ref): Likewise.
3819         (build_x_component_ref): Likewise.
3820         (build_class_member_access_expr): New function.
3821         (finish_class_member_access_expr): Likewise.
3822         (build_ptrmemfunc_access_expr): Likewise.
3823         * decl.c (grokdeclarator): Handle BASELINKs.
3824         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
3825         finish_class_member_access_expr.
3826         (arg_assoc): Handle BASELINKs.
3827         (do_class_using_decl): Likewise.
3828         * error.c (dump_decl): Likewise.
3829         (dump_expr): Use build_ptrmemfunc_access_expr.
3830         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
3831         destructors.
3832         (build_throw): Use BASELINK_FUNCTIONS.
3833         * init.c (perform_member_init): Use
3834         build_class_member_access_expr.
3835         (build_offset_ref): Handle BASELINKs.  Use
3836         build_class_member_access_expr.
3837         * method.c (hack_identifier): Likewise.
3838         * parse.y (do_id): Use BASELINK, not TREE_LIST.
3839         (primary): Remove uses of build_object_ref.
3840         * pt.c (lookup_template_function): Handle BASELINKs.
3841         (resolve_overloaded_unification): Likewise.
3842         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
3843         (lookup_field): Use BASELINK, not TREE_LIST.
3844         (lookup_fnfiels): Likewise.
3845         (setup_class_bindings): Likewise.
3846         * semantics.c (finish_object_call_expr): Do not use
3847         build_method_call when we already know what function is being
3848         called.
3849         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
3850         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
3851         TREE_CHAIN.
3852         (name_p): New function.
3853         * typeck.c (build_object_ref): Remove.
3854         (build_component_ref_1): Likewise.
3855         (build_x_component_ref): Likewise.
3856         (build_class_member_access_expr): New function.
3857         (finish_class_member_access_expr): Likewise.
3858         (build_ptrmemfunc_access_expr): Likewise.
3859         (get_member_function_from_ptrfunc): Use
3860         build_ptrmemfunc_access_expr.
3861         (build_binary_op): Likewise.
3862         (build_unary_op): Likewise.
3863         (build_ptrmemfunc): Likewise.
3864         (pfn_from_ptrmemfunc): Likewise.
3865         * typeck2.c (build_m_component_ref): Adjust comment.
3866
3867 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
3868
3869         * Make-lang.in (CXX_C_OBJS): Update.
3870         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
3871         * cp-tree.h (cxx_decode_option): Remove.
3872         * decl2.c (compare_options, lang_f_options, unsupported_options,
3873         cxx_decode_option): Remove.
3874
3875 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
3876
3877         * typeck.c (build_x_unary_op): Handle pointer-to-member.
3878
3879 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
3880
3881         * class.c: Don't include obstack.h.
3882         (popclass):
3883         * decl2.c: Delete bogus comment.
3884         * error.c: Don't include obstack.h.
3885         * except.c: Likewise.
3886         (dump_type): Correct comment.
3887         * method.c: Don't include obstack.h.
3888         * tree.c: Likewise.
3889
3890 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
3891
3892         Fix PR/2213
3893         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
3894         expressions to pointer-to-data-member of pointer-to-member-functions.
3895
3896 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
3897
3898         * cvt.c (ocp_convert): Delete obsolete code.
3899         * parse.y (permanent_obstack): Delete declaration.
3900         * pt.c (permanent_obstack): Delete declaration.
3901         * repo.c (permanent_obstack): Delete declaration.
3902         (open_repo_file): Use xmalloc instead of permanent_obstack.
3903         (init_repo): Use xstrdup instead of permanent_obstack.
3904
3905 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
3906
3907         * cp-tree.h (VF_DERIVED_VALUE): Remove.
3908         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
3909
3910 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
3911
3912         PR 7470.
3913         C++ ABI change - vfunc ordering.
3914         * class.c (add_virtual_function): Remove.
3915         (dfs_modify_all_vtables): Take list of all declared
3916         virtuals. Assign all that are not in primary base.
3917         (check_for_override): Adjust comments.
3918         (create_vtable_ptr): Take single list of virtuals. Build chain
3919         of declared virtuals here.
3920         (layout_class_type): Take single list of virtuals. Adjust.
3921         (finish_struct_1): Keep virtuals on single list. Adjust.
3922
3923 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
3924
3925         * init.c (build_member_call): Use build_new_method_call, not
3926         build_method_call.
3927
3928 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
3929
3930         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
3931
3932 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
3933
3934         * call.c (build_method_call): Issue a more helpful error message
3935         about ambiguous method names.
3936
3937 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
3938
3939         * tree.c (build_shared_int_cst): Make cache file scope, and
3940         GTY it.
3941
3942 2002-08-02  Jason Merrill  <jason@redhat.com>
3943
3944         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
3945         (cp_expr_size): New fn.
3946         * call.c (build_over_call): Lose empty class hackery.
3947         (convert_arg_to_ellipsis): Promote non-POD warning to error.
3948         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
3949
3950         * semantics.c (expand_body): Do tree optimization in the function
3951         context, too.
3952
3953 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
3954
3955         * cp-tree.h: Move all warning and flag declarations to c-common.h.
3956         * decl.c: Move all warning and flag variables to c-common.c.
3957         * decl2.c: Move all warning and flag variables to c-common.c.
3958         * lex.c (flag_digraphs): Remove.
3959         (warn_traditional): Now in c-common.c.
3960
3961 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
3962
3963         * call.c (build_field_call): Do not look up the field by name.
3964         (build_method_call): Simplify.
3965         (struct z_candidate): Add access_path and conversion_path.  Remove
3966         basetype_path.
3967         (convert_class_to_reference): Adjust use of
3968         add_function_candidate.
3969         (add_candidate): Add conversion_path argument.
3970         (add_function_candidate): Use it.
3971         (add_conv_dndidate): Likewise.
3972         (build_builtin_candidate): Likewise.
3973         (add_template_candidate_real): Add conversion_path argument.
3974         (add_template_conv_candidate): Likewise.
3975         (add_template_candidate): Likewise.
3976         (build_user_type_conversion_1): Use it.
3977         (build_new_function_call): Remove name lookup code.  Adjust use of
3978         add_template_candidate and add_function_candidate.
3979         (build_new_op): Likewise.
3980         (convert_like_real): Use build_special_member_call.
3981         (build_over_call): Use cand->conversion_path.
3982         (build_special_member_call): New method.
3983         (build_new_method_call): Remove name lookup code.
3984         * cp-tree.def (OFFSET_REF): Update documentation.
3985         (TEMPLATE_ID_EXPR): Likewise.
3986         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
3987         (BASELINK_OPTYPE): Likewise.
3988         (build_new_method_call): Adjust prototype.
3989         (build_special_member_call): New method.
3990         (build_baselink): New method.
3991         (build_offset_ref_call_from_tree): Likewise.
3992         (build_call_from_tree): Likewise.
3993         (finish_qualified_call_expr): Remove.
3994         (finish_call_expr): Adjust prototype.
3995         (build_x_function_call): Remove.
3996         * cvt.c (ocp_convert): Use build_special_member_call.
3997         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
3998         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
3999         CALL_EXPR.
4000         (build_offset_ref_call_from_tree): New function.
4001         (build_call_from_tree): Likewise.
4002         * init.c (expand_cleanup): Use build_special_member_call.
4003         (expand_default_init): Likewise.
4004         (build_member_call): Use finish_call_expr.
4005         (build_new_1): Use build_special_member_call.
4006         (push_base_cleanups): Likewise.
4007         * method.c (do_build_assign_ref): Likewise.
4008         * parse.y (template_id): Do not pass a COMPONENT_REF to
4009         lookup_template_function.
4010         (primary): Use parse_finish_call_epxr, not finish_call_expr.
4011         (parse_finish_call_expr): New function.
4012         * pt.c (lookup_template_function): Add assertions.
4013         * search.c (lookup_base): Allow T to be a binfo.
4014         (build_baselink): New function.
4015         (lookup_member): Use it.
4016         * semantics.c (finish_call_expr): Do not do name lookup.
4017         (finish_object_call_expr): Remove #if 0'd code.
4018         (finish_qualified_call_expr): Remove.
4019         * typeck.c (build_x_function_call): Remove.
4020         (build_static_case): Use build_special_member_call.
4021         * typeck2.c (build_functional_cast): Likewise.
4022
4023 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
4024
4025         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
4026
4027 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
4028
4029         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
4030
4031 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
4032
4033         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
4034         documentation.
4035
4036 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
4037
4038         * cp-tree.h: Comment typo fix.
4039
4040 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
4041
4042         * spew.c (space_for_token): Allocate zeroed memory for a new token
4043         chunk.
4044
4045 2002-07-27  Roger Sayle  <roger@eyesopen.com>
4046
4047         * decl.c (builtin_function_1): No need to explicitly mark
4048         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
4049
4050 2002-07-27  Roger Sayle  <roger@eyesopen.com>
4051
4052         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
4053
4054 2002-07-26  Jason Merrill  <jason@redhat.com>
4055
4056         * call.c (build_over_call): Likewise.
4057         (cp_convert_parm_for_inlining): New fn.
4058         (convert_for_arg_passing): New fn.
4059         (convert_default_arg, build_over_call): Use it.
4060         (type_passed_as): New fn.
4061         * pt.c (tsubst_decl): Use it.
4062         * decl2.c (cp_build_parm_decl): New fn.
4063         (build_artificial_parm): Use it.
4064         (start_static_storage_duration_function): Likewise.
4065         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
4066         (grokparms): Don't mess with DECL_ARG_TYPE.
4067         * typeck.c (convert_arguments): Use convert_for_arg_passing.
4068         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
4069         Define.
4070         * cp-tree.h: Declare new fns.
4071
4072 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
4073
4074         * cp-tree.h (flag_operator_names): Remove.
4075         * decl2.c (flag_operator_names): Remove.
4076         (lang_f_options): Remove operator-names.
4077         * lex.c (D_OPNAME): Remove.
4078         (reswords): Remove operator names.
4079         (rid_to_yy): Remove operator names.
4080         (init_reswords): No need to handle D_OPNAME.
4081         * spew.c (read_process_identifier): There are no operator
4082         names.
4083
4084 2002-07-26  Jason Merrill  <jason@redhat.com>
4085
4086         * dump.c (cp_dump_tree): Call c_dump_tree.
4087         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
4088
4089 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
4090
4091         * error.c (print_whitespace): Remove.
4092         * g++spec.c (LIBUNWIND): Move.
4093         * mangle.c (mangled_position, write_signed_number): Remove.
4094
4095 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
4096
4097         * decl2.c (cxx_decode_option): Similarly.
4098
4099 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
4100
4101         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
4102         (cxx_sizeof_or_alignof_type): Take a third argument.
4103         (cxx_sizeof): Adjust definition.
4104         (cxx_alignof): Likewise.
4105         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
4106         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
4107         complaining.
4108         (c_sizeof_nowarn): Remove definition.
4109         (build_unary_op): Use cxx_sizeof_nowarn.
4110
4111 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
4112
4113         * tree.c (cp_build_qualified_type_real): When copying
4114         pointer-to-method types, unshare the record that holds
4115         the cached pointer-to-member-function type.
4116
4117 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
4118
4119         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
4120
4121 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
4122
4123         Fix PR/7363:
4124         * typeck.c (cxx_sizeof_or_alignof_type): New function.
4125         (c_sizeof): Remove definition.
4126         (expr_sizeof): Use cxx_sizeof.
4127         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
4128         * decl.c (finish_destructor_body): Use cxx_sizeof.
4129         * semantics.c (finish_alignof): Likewise.
4130         (finish_alignof): Use cxx_alignof.
4131         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
4132         (cxx_sizeof_or_alignof_type): Declare.
4133         (my_friendly_assert): Move to ../c-common.h.
4134
4135 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
4136
4137         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
4138
4139 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4140
4141         PR c++/7347, c++/7348
4142         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
4143         * decl.c (make_typename_type): Use it.
4144         (make_unbound_class_template): Likewise.
4145         (lookup_name_real): Don't call type_access_control if scope is
4146         template parameter dependent.
4147         * parse.y (template_arg): Call make_unbound_class_template with
4148         tf_parsing set.
4149         (nest_name_specifier): Call make_typename_type with tf_parsing set.
4150         (typename_sub0): Likewise.
4151         (typename_sub1): Likewise.
4152         (instantiate_decl): Push class scope.
4153         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
4154         for both static variable and member function template.
4155         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
4156         and arguments.
4157         * search.c (type_access_control): Do type access for TEMPLATE_DECL
4158         too.
4159
4160 2002-07-20  Roger Sayle  <roger@eyesopen.com>
4161
4162         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
4163         test by using positive_option.  Make whitespace consistent.
4164
4165 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
4166
4167         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
4168         members with 'locus'.  Adjust use throughout.
4169         (struct feed):  Likewise.
4170         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
4171         Adjust use.
4172         (snarf_defarg): Use error(), not error_with_file_and_line().
4173
4174 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
4175
4176         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
4177         cpp_options is included.
4178
4179 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4180
4181         PR c++/2862, c++/2863
4182         * pt.c (determine_specialization): Compare the length of
4183         TYPE_ARG_TYPES.  Tidy.
4184
4185 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4186
4187         PR c++/3797
4188         * decl.c (duplicate_decls): Don't propagate inlining parameters from
4189         olddecl to newdecl when newdecl is a specialization of the
4190         instantiation olddecl.
4191
4192 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4193
4194         PR c++/4802, c++/5387
4195         * decl.c (make_typename_type): Use enforce_access.
4196
4197 2002-07-17  Scott Snyder <snyder@fnal.gov>
4198
4199         PR c++/7320
4200         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
4201
4202 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
4203
4204         * class.c (add_method): Correct handling of conversion operators.
4205
4206 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
4207
4208         PR c++/7224
4209         * class.c (add_method): Simplify.
4210
4211 2002-07-11  Jason Merrill  <jason@redhat.com>
4212
4213         PR c++/7279
4214         * tree.c (cp_copy_res_decl_for_inlining): Also copy
4215         TREE_ADDRESSABLE.
4216
4217 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
4218
4219         * pt.c (template_parm_this_level_p, push_template_decl_real):
4220         Pass depth as int pointer.
4221
4222 2002-07-11  Tim Josling  <tej@melbpc.org.au>
4223
4224         Remove front end hard coding from gengtype.c.
4225
4226         * config-lang.in (gtfiles): Add files needed for this front end.
4227
4228 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
4229
4230         * cp-tree.h (unqualified_name_lookup_error): Declare it.
4231         (begin_function_definition): Adjust prototype.
4232         * lex.c (unqualified_name_lookup_error): New function, split out
4233         from ...
4234         (do_identifier): ... here.
4235         * parse.y (parse_begin_function_definition): New function.
4236         (fn.def1): Use it.
4237         * semantics.c (begin_function_definition): Accept decl-specifiers
4238         and attributes as separate parameters.
4239
4240 2002-07-10  Jason Merrill  <jason@redhat.com>
4241
4242         PR c++/6255
4243         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
4244         modifying the old one.
4245
4246 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
4247
4248         * cp-tree.h (constructor_name_p): Declare it.
4249         (check_template_template_default_arg): Likewise.
4250         * class.c (handle_using_decl): Use constructor_name_p.
4251         * decl.c (grokdeclarator): Likewise.
4252         * decl2.c (constructor_name_p): Define it.
4253         * init.c (build_member_call): Use constructor_name_p.
4254         * parse.y (template_parm): Use check_template_template_default_arg.
4255         * pt.c (check_explicit_specialization): Use constructor_name_p.
4256         * semantics.c (check_template_template_default_arg): New function.
4257
4258 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4259
4260         * pt.c (can_complete_type_without_circularity): Add static to
4261         function definition.
4262
4263 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
4264
4265         * cp-tree.h (have_extern_spec): Declare it
4266         * decl.c (have_extern_spec): Define it.
4267         (start_decl): Eliminate use of used_extern_spec.
4268         (start_function): Likewise.
4269         * parse.y (have_extern_spec): Remove declaration.
4270         (used_extern_spec): Likewise.
4271         (frob_specs): Eliminate use of used_extern_spec.
4272         (.hush_warning): Likewise.
4273
4274 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
4275
4276         * Make-lang.in (cp/parse.o): Depend on decl.h.
4277         * cp-tree.h (do_decl_instantiation): Change prototype.
4278         * parse.y: Include decl.h.
4279         (parse_decl_instantiation): New function.
4280         (explicit_instantiation): Use it.
4281         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
4282         and DECLSPECS.
4283
4284 2002-07-07  Roger Sayle  <roger@eyesopen.com>
4285
4286         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
4287         constructor and destructor tests when passed a TEMPLATE_DECL.
4288
4289 2002-07-05  Jason Merrill  <jason@redhat.com>
4290
4291         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
4292         pointers.
4293
4294         PR optimization/7145
4295         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
4296
4297 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
4298
4299         Repair damage on weak-impared targets caused by my previous patch.
4300         * cp-tree.h (import_export_tinfo): Add parameter.
4301         * decl2.c (import_export_tinfo): Add parameter, post adjust
4302         DECL_COMDAT.
4303         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
4304         import_export_tinfo.
4305
4306 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4307
4308         PR c++/6944
4309         * init.c (build_aggr_init): Remove qualifiers of init before calling
4310         build_vec_init.
4311         (build_vec_init): Flatten multi-dimensional array during cleanup.
4312         (build_vec_delete_1): Abort if the type of each element is array.
4313
4314 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
4315
4316         * pt.c (instantiate_class_template): Fix typo.
4317
4318 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4319
4320         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
4321         by CVS conflict in my last patch.
4322
4323 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4324
4325         PR c++/6716
4326         * pt.c (can_complete_type_without_circularity): New function.
4327         (instantiate_class_template): Use it.
4328         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
4329         message due to incomplete fields.
4330
4331 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
4332
4333         PR c++/7112
4334         * mangle.c (write_expression): Add mangling for sizeof when
4335         applied to a type.
4336         * operators.def: Remove stale comment.
4337
4338 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
4339
4340         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
4341         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
4342         (tinfo_decl_type): Replace with ...
4343         (type_info_ptr_type): ... this.
4344         (import_export_tinfo): Declare.
4345         (tinfo_decl_p): Rename to ...
4346         (unemitted_tinfo_decl_p): ... this.
4347         * decl2.c (import_export_decl): Break out tinfo handling into ...
4348         (import_export_tinfo): ... here. New function.
4349         (finish_file): Adjust.
4350         * rtti.c (TINFO_REAL_NAME): New macro.
4351         (init_rtti_processing): Create the tinfo types.
4352         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
4353         (get_tinfo_decl): Adjust.
4354         (get_tinfo_ptr): New function.
4355         (get_type_id): Use it.
4356         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
4357         (ptr_initializer): Use get_tinfo_ptr.
4358         (ptm_initializer): Likewise.
4359         (synthesize_tinfo_var): Break into ...
4360         (get_pseudo_ti_init): ... this. Just create the initializer.
4361         (get_pseudo_ti_desc): .. and this.
4362         (create_real_tinfo_var): Remove.
4363         (create_pseudo_type_info): Don't create the vtable decl here.
4364         (get_vmi_pseudo_type_info): Remove.
4365         (create_tinfo_types): Adjust.
4366         (tinfo_decl_p): Rename to ...
4367         (unemitted_tinfo_decl_p): ... here. Adjust.
4368         (emit_tinfo_decl): Adjust. Create the initializer.
4369
4370 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
4371
4372         PR c++/6695
4373         * pt.c (tsubst_friend_class): Substitute into the context of the
4374         friend before using it.
4375
4376 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
4377
4378         * cp-tree.h (xref_tag): Change prototype.
4379         (handle_class_head): Likewise.
4380         (build_x_component_ref): Likewise.
4381         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
4382         (xref_tag): Take attributes as a separate parameter.
4383         (xref_tag_from_type): Adjust call to xref_tag.
4384         * decl2.c (build_expr_from_tree): Adjust call to
4385         build_x_component_ref.
4386         (handle_class_head): Take attributes as a separate parameter.
4387         * parse.y (parse_xref_tag): New function.
4388         (parse_handle_class_head): Likewise.
4389         (primary): Use parse_xref_tag.
4390         (class_head_decl): Use parse_handle_class_head.
4391         (class_head_defn): Likewise.
4392         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
4393         (build_dynamic_cast_1): Likewise.
4394         (create_pseudo_type_info): Likewise.
4395         (emit_support_tinfos): Likewise.
4396         * typeck.c (build_object_ref): Adjust call to
4397         build_x_component_ref.
4398         (build_x_component_ref): Remove protect parameter.
4399
4400 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
4401
4402         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
4403         * class.c (handle_using_decl): Likewise.
4404         (instantiate_type): Likewise.
4405         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
4406         (xref_basetypes): Change prototype.
4407         (begin_mem_initializers): New function.
4408         (get_overloaded_fn): Likewise.
4409         * decl.c (xref_basetypes): Simplify.
4410         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
4411         * init.c (build_offset_ref): Likewise.
4412         * parse.y (base_init): Use begin_mem_initializers().
4413         (structsp): Adjust call to xref_basetypes.
4414         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
4415         (instantiate_class_template): Adjust call to xref_basetypes.
4416         * semantics.c (begin_mem_initializers): New function.
4417         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
4418         (really_overlaoded_fn): Likewise.
4419         (get_overloaded_fn): New function.'
4420         (get_first_fn): USe BASELINK_FUNCTIONS.
4421
4422 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
4423
4424         * cp-tree.h (SCALAR_TYPE_P): New macro.
4425         (check_for_out_of_scope_variable): New function.
4426         (at_class_scope_p): Likewise.
4427         (finish_fname): Likewise.
4428         * class.c (finish_struct): Use at_function_scope_p.
4429         * decl.c (check_for_out_of_scope_variable): New function, split
4430         out from do_identifier.
4431         (finish_enum): Use at_function_scope_p.
4432         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
4433         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
4434         (primary): Use at_function_scope_p.
4435         * search.c (at_class_scope_p): New function.
4436         * semantics.c (finish_fname): Likewise.
4437         (check_multiple_declarators): Use at_function_scope_p.
4438
4439 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
4440
4441         * parse.y (parse_scoped_id): New function.
4442         (primary): Use it.
4443         * cp-tree.h (do_scoped_id): Adjust declaration.
4444         * lex.c (do_scoped_id): Remove call to yylex.
4445         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
4446         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
4447         expanding it inline.
4448
4449 2002-06-23  Matt Thomas  <matt@3am-software.com>
4450
4451         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
4452         "#if VMS_TARGET".
4453
4454 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4455
4456         * mangle.c (integer_type_codes): Const-ify.
4457
4458 2002-06-20  Richard Henderson  <rth@redhat.com>
4459
4460         PR c++/6747
4461         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
4462         Call put_var_into_stack.
4463
4464 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4465
4466         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
4467         array size calculation.
4468
4469 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4470
4471         PR c++/6892
4472         * pt.c (tsubst_expr): Handle FILE_STMT.
4473
4474 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4475
4476         PR c++/6723
4477         * pt.c (lookup_template_class): Don't build complete argument of
4478         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
4479         argument.
4480
4481 2002-06-19  Akim Demaille  <akim@epita.fr>
4482
4483         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
4484         decl.h's TYPENAME.
4485         * spew.c, lex.c: Adjust.
4486         * parse.y (explicit_instantiation): Add empty action to override
4487         the default $$ = $1 where it introduces a type clash.
4488
4489 2002-06-14  Jason Merrill  <jason@redhat.com>
4490
4491         * semantics.c (begin_for_stmt): Push the 'for' scope before
4492         adding the FOR_STMT.
4493
4494         C++ ABI changes.
4495         * class.c (build_base_field): Set DECL_PACKED.
4496         (layout_class_type): Don't use tail padding of PODs.
4497         * mangle.c (write_unqualified_name): Fix template conversion op
4498         mangling.
4499
4500 2002-06-16  Richard Henderson  <rth@redhat.com>
4501
4502         PR opt/6793
4503         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
4504         after template instantiation.
4505
4506 2002-06-16  Richard Henderson  <rth@redhat.com>
4507
4508         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
4509
4510 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
4511
4512         * cp-tree.h (compiler_error): Remove declaration.
4513         * lex.c (compiler_error): Remove definition.
4514
4515 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
4516
4517         * g++spec.c (LIBUNWIND): New.
4518         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
4519
4520 2002-06-13  Jessica Han  <jessica@cup.hp.com>
4521
4522         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
4523         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
4524         (build_vbase_offset_vtbl_entries): Likewise.
4525         * rtti.c (build_headof): Likewise.
4526         (get_tinfo_decl_dynamic): Likewise.
4527         (create_pseudo_type_info): Likewise.
4528
4529 2002-06-12  Stan Shebs  <shebs@apple.com>
4530
4531         * mpw-config.in: Remove file, no longer used.
4532         * mpw-make.sed: Ditto.
4533
4534 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
4535
4536         * decl2.c: Update call to cpp_handle_option.
4537
4538 2002-06-07  H.J. Lu  (hjl@gnu.org)
4539
4540         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
4541
4542 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
4543
4544         * error.c (cp_error_at): Fix typo.
4545
4546 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
4547
4548         * error.c (cp_diagnostic_starter): Adjust call.
4549         (maybe_print_instantiation_context): Change prototype to take a
4550         'diagnostic_info *'.
4551         (print_instantiation_full_context): Likewise.
4552         (print_instantiation_partial_context): Likewise.
4553         (cp_diagnostic_starter): Likewise.
4554         (cp_diagnostic_finalizer): Likewise.
4555         (cp_print_error_function): Likewise.
4556         (cp_printer): Take a secondary parameter as a 'text_info *'.
4557         Remove output_state savings.  Adjust calls.
4558
4559 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
4560
4561         * pt.c (inline_parm_levels): Mark for GC.
4562
4563         * mangle.c (start_mangling): Allocate G.substitutions here...
4564         (init_mangle): ... rather than here.
4565         (finish_mangling): Clear the varray pointer when done with it.
4566         * spew.c (yylexstring): Don't use VARRAY_FREE.
4567         * search.c (bfs_walk): Don't use VARRAY_FREE.
4568         * decl2.c (pending_statics): Use gengtype to mark.
4569         (deferred_fns): Likewise.
4570         (ssdf_decls): Likewise.
4571         (init_decl2): Delete.
4572         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
4573         (cxx_init_decl_processing): Don't call init_decl2.
4574         (cxx_pop_function_context): Don't use VARRAY_FREE.
4575         * cp-tree.h (struct saved_scope): No need for special marking
4576         of varrays.
4577         (struct language_function): Likewise.
4578         (local_classes): Use gengtype to mark.
4579         (init_decl2): Delete prototype.
4580         * class.c (init_class_processing): Don't use
4581         ggc_add_tree_varray_root.
4582         (build_vtbl_initializer): Don't use VARRAY_FREE.
4583
4584         * decl.c (typename_compare): Don't use same_type_p.
4585
4586         * decl.c: Include hashtab.h instead of hash.h.
4587         (typename_hash): Update to use htab_h.
4588         (typename_compare): Likewise.
4589         (typename_htab): Use gengtype to mark.
4590         (build_typename_type): Update to use htab_h.
4591         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
4592
4593         * Make-lang.in (gt-cp-tree.h): New rule.
4594         (cp/tree.o): Depend on gt-cp-tree.h.
4595         * config-lang.in (gtfiles): Add cp/tree.c.
4596         * tree.c: Include gt-cp-tree.h.
4597         (list_hash_table): Use gengtype to mark.
4598         (init_tree): Use gengtype to mark trees.
4599
4600         * Make-lang.in (cp/decl.o): Add debug.h dependency.
4601         * call.c (struct z_candidate): Use gengtype.
4602         (USER_CONV_CAND): Use WRAPPER_ZC.
4603         (convert_class_to_reference): Use build_zc_wrapper.
4604         (build_type_conversion_1): Likewise.
4605         (build_over_call): Use WRAPPER_ZC.
4606         (add_warning): Use build_zc_wrapper.
4607         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
4608         * cp-tree.h (struct lang_identifier): Use gengtype.
4609         (struct template_parm_index_s): Likewise.
4610         (struct ptrmem_cst): Likewise.
4611         (struct tree_binding): Likewise.
4612         (struct tree_overload): Likewise.
4613         (struct tree_srcloc): Likewise.
4614         (struct tree_wrapper): Likewise.  Also modify to have a pointer
4615         to struct z_candidate rather than void.
4616         (enum cp_tree_node_structure_enum): New.
4617         (union lang_tree_node): New.
4618         (cxx_mark_tree): Delete prototype.
4619         (cp_tree_node_structure): New prototype.
4620         (build_ptr_wrapper): Delete prototype.
4621         (build_int_wrapper): Delete prototype.
4622         (build_zc_wrapper): New prototype.
4623         * decl.c: Include debug.h
4624         (cxx_mark_tree): Delete.
4625         (cp_tree_node_structure): New.
4626         * tree.c (build_ptr_wrapper): Delete.
4627         (build_int_wrapper): Delete.
4628         (build_zc_wrapper): New.
4629
4630         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
4631         Correct typo.  Patch from k_fukui@highway.ne.jp.
4632
4633         * semantics.c (current_stmt_tree): Update for change to
4634         struct language_function.
4635         (finish_mem_initializers): Likewise.
4636         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
4637         * cp-tree.h (struct language_function): Rename from
4638         cp_language_function.  Change all uses.
4639         (cp_function_chain): Don't need to cast.
4640
4641         * class.c (duplicate_tag_error): Reset discriminator.
4642         (check_bases_and_members): Update for data structure changes.
4643         * cp-tree.h (struct lang_id2): Use gengtype.
4644         (flagged_type_tree): Likewise.
4645         (SET_LANG_ID): Use GGC on struct lang_id2.
4646         (struct cp_language_function): Use gengtype.  Remove field
4647         'x_vcalls_possible_p'.
4648         (current_vcalls_possible_p): Delete.
4649         (struct lang_type_header): New.
4650         (struct lang_type_class): Rename from struct lang_type.  Include
4651         struct lang_type_header.
4652         (struct lang_type_ptrmem): New.
4653         (struct lang_type): New.
4654         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
4655         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
4656         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
4657         (struct lang_decl_flags): Use gengtype.  Add discriminators.
4658         (struct lang_decl): Use gengtype.  Add and use discriminators.
4659         Update the macros that reference moved fields.
4660         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
4661         (SET_DECL_THUNK_P): Set discriminator too.
4662         (clear_inline_text_obstack): Delete prototype.
4663         (finish_inline_definitions): Delete prototype.
4664         (mark_pending_inlines): Delete prototype.
4665         (lang_check_failed): New prototype.
4666         * decl.c (struct named_label_use_list): Use gengtype.
4667         (struct named_label_list): Likewise.
4668         (mark_binding_level): Delete.
4669         (mark_named_label_lists): Delete.
4670         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
4671         (cxx_init_decl_processing): Use generated marker routine.
4672         (begin_destructor_body): Delete dead set to
4673         current_vcalls_possible_p.
4674         (mark_lang_function): Delete.
4675         (mark_cp_function_context): Delete.
4676         (lang_mark_tree): Use generated marker routines.
4677         * decl2.c (start_objects): Set discriminator when setting
4678         GLOBAL_INIT_PRIORITY.
4679         * lex.c (retrofit_lang_decl): Set discriminators.
4680         (copy_lang_type): Update for changes to lang_type structure.
4681         (cp_make_lang_type): Set discriminator.
4682         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
4683         * search.c: Include ggc.h.
4684         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
4685         (finish_inline_definitions): Delete.
4686         * spew.c (struct token): Use gengtype.
4687         (struct token_chunk): New.
4688         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
4689         (struct feed): Use gengtype.
4690         (feed_obstack): Delete.
4691         (feed): Mark as GC root.
4692         (pending_inlines): Mark as GC root.
4693         (pending_inlines_tail): Likewise.
4694         (processing_these_inlines): Likewise.
4695         (token_obstack): Make static.
4696         (first_token): Likewise.
4697         (init_spew): Don't initialize deleted things; use gengtype for roots.
4698         (clear_inline_text_obstack): Delete.
4699         (feed_input): Use GC for struct feed.  Update for changes to
4700         struct unparsed_text.
4701         (mark_pending_inlines): Delete.
4702         (next_token): Rename from add_token.  Change all callers.  Update
4703         for changes to struct unparsed_text.
4704         (space_for_token): New.
4705         (remove_last_token): New.
4706         (alloc_unparsed_text): New.
4707         (snarf_block): Take an unparsed_text.  Update for changes to struct
4708         unparsed_text.
4709         (snarf_method): Update for changes to struct unparsed_text.
4710         (snarf_defarg): Update for changes to struct unparsed_text.
4711         * tree.c (lang_check_failed): New.
4712
4713         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
4714         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
4715         (cp/spew.o): Add dependency on gt-<filename>.h.
4716         (cp/decl2.o): Add dependency on gt-<filename>.h.
4717         (cp/call.o): Add dependency on gt-<filename>.h.
4718         (cp/pt.o): Add dependency on gt-<filename>.h.
4719         (cp/repo.o): Add dependency on gt-<filename>.h.
4720         (cp/parse.o): Add dependency on gt-<filename>.h.
4721         * call.c: Use gengtype for roots.
4722         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
4723         decl2.c parse.y pt.c repo.c spew.c.
4724         * cp-tree.h: Use gengtype for roots.
4725         (struct saved_scope): Use GGC, gengtype.
4726         (cp_parse_init): Delete prototype.
4727         (init_pt): Delete prototype.
4728         * decl.c: Use gengtype for roots.
4729         (mark_saved_scope): Delete.
4730         (cxx_init_decl_processing): Don't call deleted initilisation
4731         routines.
4732         (signed_size_zero_node): Delete, unused.
4733         * decl.h: Use gengtype for roots.
4734         * decl2.c: Use gengtype for roots.
4735         * lex.h: Use gengtype for roots.
4736         * parse.y: Use gengtype for roots.
4737         (cp_parse_init): Delete.
4738         * pt.c: Use gengtype for roots.
4739         (init_pt): Delete.
4740         * repo.c: Use gengtype for roots.
4741         * spew.c: Use gengtype for roots.
4742
4743         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
4744         (cp/decl.o): Add dependency on gtype-cp.h.
4745         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
4746         Include gtype-cp.h.  Allow for filename changes.
4747
4748         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
4749         (cp/decl.o): Add cp/gt-decl.h dependency.
4750         * config-lang.in (gtfiles): New.
4751         * tree.h: Rename struct binding_level to struct cp_binding_level.
4752         * decl.c: Rename struct binding_level to struct cp_binding_level.
4753         Include cp/gt-decl.h.
4754         (struct cp_binding_level): Use gengtype.
4755         (make_binding_level): Use GGC on struct cp_binding_level.
4756         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
4757         (cxx_init_decl_processing): Mark free_binding_level as
4758         deletable.
4759
4760         * decl.c (mark_cp_function_context): Update calling sequence.
4761
4762         * decl.c (start_function): Don't free 'struct
4763         cp_language_function'.
4764         (pop_cp_function_context): Likewise.
4765         (save_function_data): Allocate it using GC.
4766         * semantics.c (genrtl_start_function): Don't free 'struct
4767         cp_language_function'.
4768
4769 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
4770
4771         * lang-specs.h: Use cpp_debug_options.
4772
4773 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
4774
4775         * mangle.c, tree.c: Include real.h.
4776         * Make-lang.in: Update dependency lists.
4777
4778 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
4779
4780         * lex.c: Don't include c-lex.h.
4781         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
4782
4783 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
4784
4785         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
4786
4787 2002-05-22  Richard Henderson  <rth@redhat.com>
4788
4789         * decl.c (obscure_complex_init): Check for VAR_DECL
4790         before using DECL_THREAD_LOCAL.
4791
4792 2002-05-22  Richard Henderson  <rth@redhat.com>
4793
4794         * decl.c (check_tag_decl): Handle RID_THREAD.
4795         (obscure_complex_init): Reject run-time init of tls.
4796         (grokvardecl, grokdeclarator): Handle RID_THREAD.
4797         * lex.c (reswords): Add __thread.
4798         (rid_to_yy): Map RID_THREAD to SCSPEC.
4799
4800 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
4801
4802         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
4803         * cp-tree.h (cxx_post_options): Kill.
4804         * cp-lex.c (cxx_post_options): Kill.
4805
4806 2002-05-21  Richard Henderson  <rth@redhat.com>
4807
4808         * lex.c (rid_to_yy): Add RID_THREAD.
4809
4810 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
4811
4812         * init.c (build_vec_init): Test for trivial copy-assignment when
4813         copy-assigning arrays.
4814
4815 2002-05-20  Andreas Jaeger  <aj@suse.de>
4816
4817         * init.c (build_default_init): Remove unused variable.
4818
4819 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
4820
4821         * call.c (any_strictly_viable): New.
4822         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
4823
4824 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4825
4826         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
4827
4828 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4829
4830         PR c++/186, DR 259
4831         * pt.c (do_decl_instantiation): Don't complain explicit
4832         instantiation after explicit specialization.
4833         (do_type_instantiation): Likewise.
4834
4835 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
4836
4837         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
4838         renamed from...
4839         (complete_type_or_else): ... this.  Redefined as macro.
4840         (cxx_incomplete_type_diagnostic): Declare.
4841         (cxx_incomplete_type_error): Define as macro.
4842         * init.c (build_delete): Warn about incomplete types other than
4843         void, and use the built-in operator delete for them.
4844         * typeck.c (complete_type_or_diagnostic): Renamed from
4845         complete_type_or_else.  Added warn_only argument, passed to...
4846         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
4847         warnings or errors depending on new warn_only argument.  Renamed
4848         from...
4849         (cxx_incomplete_type_error): ... this.  New implementation in
4850         terms of cxx_incomplete_type_diagnostic.
4851
4852 2002-05-18  Jason Merrill  <jason@redhat.com>
4853
4854         PR c++/6611
4855         * decl2.c (import_export_decl): If we clear
4856         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
4857
4858 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4859
4860         PR c++/6620
4861         * pt.c (verify_class_unification): Don't check if PARM is template
4862         parameter dependent.  Simplify.
4863         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
4864         parameter dependent expression.
4865
4866 2002-05-14  Jason Merrill  <jason@redhat.com>
4867
4868         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
4869         Do set DECL_COMDAT.
4870         (synthesize_tinfo_var): Take the public decl.
4871         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
4872         (emit_tinfo_decl): Adjust.  Call import_export_decl.
4873         * decl2.c (import_export_decl): Simplify tinfo decl handling.
4874
4875 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
4876
4877         * cp-tree.h (struct lang_type): Added non_zero_init.
4878         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
4879         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
4880         * class.c (check_field_decls): Test non_zero_init.
4881         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
4882         zero-to-NULL conversions.
4883         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
4884         type that needs zero-initialization without zeros.
4885         (check_initializer_decl): Compute zero-initializer for types
4886         that require a non-trivial one.
4887         * init.c (build_forced_zero_init): New function.
4888         (build_default_init): Use it.
4889         * tree.c (zero_init_p): New function.
4890         * typeck2.c (force_store_init_value): New function.
4891         (process_init_constructor): Create non-trivial zero-initializers
4892         for array members and class fields.
4893
4894 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
4895
4896         * lang-specs.h: Remove redundant -lang-c++.
4897
4898 2002-05-13  Jason Merrill  <jason@redhat.com>
4899
4900         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
4901         (fixed_type_or_null): See through reference vars.
4902         (build_base_path): Vtable contents are constant.
4903         * typeck.c (get_member_function_from_ptrfunc): Likewise.
4904
4905 2002-05-12  Jason Merrill  <jason@redhat.com>
4906
4907         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
4908         structs are safe.
4909
4910 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
4911
4912         * cp-tree.h (flag_ansi): Remove.
4913         * decl2.c (flag_ansi): Remove.
4914         (cxx_decode_option): Set flag_iso and flag_undef.
4915
4916 2002-05-09  Jason Merrill  <jason@redhat.com>
4917
4918         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
4919         Use subtraction rather than a bitmask to get the index.
4920         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
4921
4922         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
4923
4924 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
4925
4926         * Make-lang.in (decl2.o): Update.
4927         * cp-tree.h (warn_multichar): Remove.
4928         * decl2.c: Include c-common.h.
4929         (warn_multichar): Remove.
4930
4931 2002-05-03  Jason Merrill  <jason@redhat.com>
4932
4933         * tree.c (build_cplus_array_type): Only const and volatile get
4934         special handling.
4935
4936         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
4937
4938 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
4939
4940         ABI change, returning simple classes from functions.
4941         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
4942         TYPE_HAS_TRIVIAL_INIT_REF is false or
4943         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
4944
4945 2002-04-30  Jason Merrill  <jason@redhat.com>
4946
4947         PR debug/6436
4948         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
4949         anonymous class with a typedef if there are attributes.
4950
4951 2002-04-29  Paul Eggert  <eggert@twinsun.com>
4952
4953         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
4954
4955 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
4956
4957         PR c++/6477
4958         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
4959         non-NULL first.
4960
4961 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
4962
4963         PR c++/6492
4964         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
4965         enter that scope before name lookup.
4966
4967         PR c++/6486
4968         * method.c (do_build_copy_constructor): Avoid building
4969         cv-qualified reference types.
4970
4971 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
4972
4973         PR c++/5719
4974         * decl.c (grok_op_properties): Assignment ops don't have to return
4975         by value. operator% should.
4976
4977 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
4978
4979         PR c/6343
4980         * decl.c (duplicate_decls): Call merge_weak.
4981
4982 2002-04-26  Richard Henderson  <rth@redhat.com>
4983
4984         * parse.y (malloced_yyss, malloced_yyvs): New.
4985         (yyoverflow): Re-add.  Set them.
4986         (free_parser_stacks): New.
4987
4988 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
4989
4990         PR c++/6497
4991         * method.c (do_build_assign_ref): Pass a derivation to
4992         build_method_call when calling base class assignment operators.
4993
4994 2002-04-26  Richard Henderson  <rth@redhat.com>
4995
4996         * parse.y (yyoverflow): Revert.
4997
4998 2002-04-26  Richard Henderson  <rth@redhat.com>
4999
5000         PR c/3581
5001         * parse.y (string): Remove.  Update all uses to use STRING
5002         instead, and not call combine_strings.
5003         * rtti.c (tinfo_name): Use fix_string_type.
5004         * semantics.c (finish_asm_stmt): Don't call combine_strings.
5005         * spew.c (yylexstring): New.
5006         (read_token): Use it.
5007
5008 2002-04-25  Richard Henderson  <rth@redhat.com>
5009
5010         PR c/2161
5011         * parse.y (yyoverflow): New.
5012
5013 2002-04-25  Jason Merrill  <jason@redhat.com>
5014
5015         PR c++/5607
5016         * search.c (check_final_overrider): No longer static.
5017         * class.c (update_vtable_entry_for_fn): Call it.
5018         * cp-tree.h: Adjust.
5019
5020 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5021
5022         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
5023         * cp-tree.h (cxx_set_yydebug): Die.
5024         * lex.c (YYDEBUG): Get from c-lex.h.
5025         (cxx_set_yydebug): Remove.
5026         * parse.y: Include c-lex.h.
5027         (YYDEBUG): Get from c-lex.h.
5028
5029 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
5030
5031         PR c++/6438.
5032         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
5033         void.
5034
5035 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
5036
5037         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
5038         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
5039         Redefine.
5040         * cp-tree.h (cp_attribute_table): Rename.
5041         * decl.c (lang_attribute_table): Remove declaration.
5042         (cxx_init_decl_processing): Don't set it.
5043         * tree.c (cp_attribute_table): Rename.
5044
5045 2002-04-24  Jason Merrill  <jason@redhat.com>
5046
5047         PR c++/6331
5048         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
5049         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
5050         The pedwarn for array assignment is now unconditional.
5051         * tree.c (build_cplus_array_type_1): Still process simple array types
5052         normally in templates.
5053
5054         PR c++/6395
5055         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
5056         stuff for comdats.
5057
5058 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
5059
5060         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
5061         node with attributes.
5062
5063 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
5064
5065         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
5066         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
5067
5068 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
5069
5070         PR c++/6256:
5071         * pt.c (tsubst_friend_class): Handle templates with explicit
5072         nested names.
5073
5074         PR c++/6331:
5075         * typeck.c (merge_types): Remember the cv-qualification of pointer
5076         types when merging them.
5077
5078 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
5079
5080         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
5081         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
5082         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
5083         cxx_mark_function_context): New.
5084         * decl.c (push_cp_function_context, pop_cp_function_context,
5085         mark_cp_function_context): Rename for consistency.
5086         (cxx_init_decl_processing): Don't set old hooks.
5087
5088 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
5089
5090         * call.c (convert_type_from_ellipsis): Rename, update.
5091         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
5092         * cp-tree.h (convert_type_from_ellipsis): Rename.
5093         * decl.c (cxx_init_decl_processing): Don't set hook.
5094
5095 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
5096
5097         * call.c (build_new_method_call): Update.
5098         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
5099         * cp-tree.h (cxx_incomplete_type_error): New.
5100         * decl.c (grokdeclarator, grokparms): Update.
5101         * decl2.c (check_classfn): Update.
5102         * pt.c (tsubst): Update.
5103         * typeck.c (complete_type_or_else, expr_sizeof,
5104         decay_conversion): Update.
5105         * typeck2.c (incomplete_type_error): Rename.
5106         (add_exception_specifier): Update.
5107
5108 2002-04-18  Jason Merrill  <jason@redhat.com>
5109
5110         PR c++/5658
5111         * search.c (setup_class_bindings): A class template qualifies as a
5112         type binding.
5113
5114 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
5115
5116         PR c++/6316
5117         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
5118         before expanding.
5119
5120 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
5121
5122         * init.c (begin_init_stmts): Remove commented out code.
5123         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
5124         * semantics.c (begin_gobal_stmt_expr): Adjust call to
5125         expand_start_stmt_expr.
5126
5127 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
5128
5129         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
5130         dso_handle itself, to __cxa_atexit.
5131
5132 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5133
5134         * error.c (cxx_print_error_function): Adjust call to macros.
5135
5136 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
5137
5138         * class.c (layout_virtual_bases): Do all dsize computation on trees.
5139
5140 2002-04-14  Jason Merrill  <jason@redhat.com>
5141
5142         * typeck.c (get_member_function_from_ptrfunc): Don't do
5143         gratuitious division and multiplication on
5144         ptrmemfunc_vbit_in_delta targets.
5145
5146 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5147
5148         PR c++/5373.
5149         * semantics.c (finish_expr_stmt): Remember the type of the
5150         expression before any conversions are performed.
5151
5152 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5153
5154         PR c++/5189.
5155         * call.c (add_template_candidate_real): Do not treat member
5156         templates as copy constructors.
5157
5158 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5159
5160         * decl.c (duplicate_decls): Do not copy the RTL for a variable
5161         declaration if the old variable had an incomplete type and the new
5162         variable does not.
5163         (complete_vars): Do not call layout_decl for completed variables.
5164
5165 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
5166
5167         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
5168         with an explicit one.
5169         (follow_tag_typedef): New.
5170         (lookup_tag): Use it to extract the tag of an explicit typedef.
5171         (xref_tag): Likewise.
5172
5173 2002-04-11  Andrew Haley  <aph@redhat.com>
5174
5175         * typeck.c (type_after_usual_arithmetic_conversions):
5176         If two types have the same variant, return immediately.
5177         When two floating-point operands are the same precision:
5178           convert to float if one of the operands is float;
5179           if neither operand is one of the standard types, return the type
5180           of the first operand.
5181
5182 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
5183
5184         PR c++/5507
5185         * decl.c (make_typename_type): Remove implicit typenameness.
5186
5187 2002-04-09  Jason Merrill  <jason@redhat.com>
5188
5189         PR optimization/6189
5190         * semantics.c (genrtl_start_function): Don't free
5191         DECL_SAVED_FUNCTION_DATA for inline functions.
5192
5193         * init.c (build_member_call): For now, don't convert to
5194         intermediate base if it would cause an error.
5195
5196 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
5197
5198         * parse.y (namespace_qualifier, maybe_identifier,
5199         begin_explicit_instantiation, end_explicit_instantiation,
5200         apparent_template_type, .finish_template_type,
5201         do_id, maybe_init, defarg_again, component_decl_1):
5202         Add ending ';', in accordance with POSIX.
5203
5204 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
5205
5206         PR c++/5571
5207         * class.c (layout_class_type): Remember incomplete static
5208         variables.
5209         (finish_struct_1): Call complete_vars, not
5210         hack_incomplete_structures.
5211         * cp-tree.h (hack_incomplete_structures): Rename to ...
5212         (complete_vars): ... this.
5213         (struct saved_scope): Remove incomplete.
5214         (namespace_scope_incomplete): Remove.
5215         * decl.c (struct binding_level): Remove incomplete.
5216         (incomplete_vars): New variable.
5217         (mark_binding_level): Don't mark incomplete.
5218         (print_binding_level): Don't print it.
5219         (mark_saved_scope): Don't mark incomplete.
5220         (pushdecl): Use maybe_register_incopmlete_var.
5221         (cxx_init_decl_processing): Register incomplete_vars for GC.
5222         (start_decl_1): Clarify error message.
5223         (hack_incomplete_vars): Remove.
5224         (maybe_register_incomplete_var): New function.
5225         (complete_vars): Likewise.
5226
5227 2002-04-06  Jason Merrill  <jason@redhat.com>
5228
5229         PR c++/4934
5230         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
5231         set before checking it.
5232
5233         PR c++/525
5234         * init.c (build_member_call): Use build_scoped_ref.
5235         (resolve_offset_ref): Likewise.
5236         * call.c (build_scoped_method_call): Likewise.
5237         * tree.c (maybe_dummy_object): Kludge around current_class_type being
5238         wrong.
5239         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
5240         * cp-tree.h: Adjust.
5241
5242         * init.c (push_base_cleanups): Just use build_scoped_method_call.
5243
5244         PR c++/6179
5245         * method.c (implicitly_declare_fn): Pass unqualified type to
5246         synthesize_exception_spec.
5247
5248 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
5249
5250         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
5251         * cvt.c: Update comment.
5252         * init.c (expand_cleanup_for_base): Update.
5253         * semantics.c (finish_parenthesized_expr): Update.
5254         * typeck.c (cp_truthvalue_conversion): Update.
5255
5256 2002-04-04  Jason Merrill  <jason@redhat.com>
5257
5258         * semantics.c (finish_eh_cleanup): New fn.
5259         * cp-tree.h: Add prototype.
5260         * init.c (perform_member_init, expand_cleanup_for_base): Use
5261         finish_eh_cleanup.
5262         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
5263         * cp-tree.h: Remove references.
5264         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
5265         * dump.c (cp_dump_tree): Likewise.
5266         * pt.c (tsubst_expr): Likewise.
5267         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
5268         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
5269         * tree.c (cp_statement_code_p): Likewise.
5270
5271         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
5272
5273         PR c++/5636
5274         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
5275         cleanup for nrv.
5276
5277         PR c++/5104
5278         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
5279         specifiers.
5280         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
5281
5282 2002-04-03  Richard Henderson  <rth@redhat.com>
5283
5284         * cp-lang.c (cxx_warn_unused_global_decl): New.
5285         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
5286
5287 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
5288
5289         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
5290         * tree.c (init_tree): Don't set hook.
5291
5292 2002-04-03  Roger Sayle  <roger@eyesopen.com>
5293
5294         PR c++/5998:
5295         * decl.c (duplicate_decls): Don't mess with assembler names when
5296         redeclaring builtin functions as static.
5297
5298 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5299
5300         * call.c (build_addr_func): Update.
5301         * class.c (resolve_address_of_overloaded_function): Update.
5302         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
5303         * cp-tree.h (cxx_mark_addressable): New.
5304         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
5305         * decl2.c (build_cleanup): Update.
5306         * except.c (build_throw): Update.
5307         * init.c (resolve_offset_ref): Update.
5308         * pt.c (convert_nontype_argument): Update.
5309         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
5310         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
5311         unary_complex_lvalue): Update.
5312         (mark_addressable): Rename.
5313
5314 2002-04-01  Roger Sayle  <roger@eyesopen.com>
5315
5316         PR c++/5998:
5317         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
5318         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
5319         but follow the SET_DECL_RTL idiom used elsewhere in the function.
5320
5321 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5322
5323         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
5324         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
5325         * decl.c (grokdeclarator): Update.
5326         * mangle.c (write_integer_cst): Update.
5327         * typeck.c (build_binary_op): Update.
5328
5329 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
5330
5331         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
5332         * lex.c (cxx_init): Don't set hook.
5333
5334 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
5335
5336         * Make-lang.in (error.o): Update.
5337         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
5338         * cp-tree.h (struct diagnostic_context): Predeclare.
5339         (cxx_print_error_function): New.
5340         * error.c: Include langhooks-def.h.
5341         (lang_print_error_function): Rename.  Update.
5342         (init_error): Don't set hook.
5343
5344 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
5345
5346         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
5347         Redefine.
5348         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
5349         * decl.c (finish_enum): Similarly.
5350         * error.c (dump_type): Similarly.
5351         * lex.c (cxx_init): Similarly.
5352         * mangle.c (write_builtin_type): Similarly.
5353         * typeck.c (comptypes): Similarly.
5354
5355 2002-03-28  Roger Sayle  <roger@eyesopen.com>
5356
5357         PR c++/5998:
5358         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
5359         in the g++ front-end.
5360         (duplicate_decl): Allow redefinition of anticipated built-ins.
5361         Fix inlining problem by over-writing the old DECL_RTL.
5362         (lookup_namespace_name): Fail to find an identifier in the
5363         specified namespace if its still anticipated.
5364         (builtin_function_1): New function split out from builtin_function
5365         to create a builtin in the current namespace with given context.
5366         (builtin_function): Call builtin_function_1 to define the
5367         appropriate builtins in both the std and global namespaces.
5368         (select_decl): Don't test for anticipated decls here.
5369         (unqualified_namespace_lookup): Instead ignore them whilst
5370         searching through scopes and namespaces.
5371         * decl2.c (do_nonmember_using_decl): If a using declaration
5372         specifies an anticipated built-in function, mark it as no longer
5373         anticipated in that scope.
5374         (ambiguous_decl):  Avoid resolving to an anticipated decl.
5375         * lex.c (do_scoped_id): Fail to find an identifier in the global
5376         namespace if its still anticipated.
5377
5378 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
5379
5380         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
5381         * cp-tree.h (cp_make_lang_type): Rename.
5382         * lex.c (cp_make_lang_type): Rename.
5383         (make_aggr_type): Update.
5384         * tree.c (init_tree): Don't set make_lang_type_fn.
5385
5386 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
5387
5388         PR c++/6073
5389         * class.c (finish_struct_1): Update static field's DECL_MODE even
5390         if its type is a variant of t.
5391
5392 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
5393
5394         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
5395         * cp-tree.h (cxx_insert_default_attributes): New.
5396         * decl.c (insert_default_attributes): Rename.
5397
5398 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
5399
5400         PR c++/4884
5401         * call.c (build_op_delete_call): Allow for the fact the placement
5402         may be a COMPOUND_EXPR.
5403
5404 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
5405
5406         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
5407         * cp-tree.h (init_cplus_expand): Remove.
5408         (cxx_expand_expr): New.
5409         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
5410         fix prototype.
5411         (init_cplus_expand): Remove.
5412         * lex.c (cxx_init): Don't call init_cplus_expand.
5413
5414 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
5415
5416         PR c++/4884.
5417         * init.c (build_new_1): Allow for the fact the result of
5418         build_function_call may be a COMPOUND_EXPR.
5419
5420 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
5421
5422         PR c++/5682
5423         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
5424         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
5425         (dfs_skip_nonprimary_vbases_markedp): Remove.
5426         * search.c (get_shared_vbase_if_not_primary): Remove.
5427         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
5428         (dfs_skip_nonprimary_vbases_markedp): Remove.
5429         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
5430         (dfs_marked_real_bases_queue_p): Likewise.
5431
5432 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
5433
5434         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
5435         * cp-tree.h (cxx_mark_tree): New.
5436         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
5437
5438 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5439
5440         * cp-tree.h (cxx_maybe_build_cleanup): New.
5441         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
5442         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
5443         * tree.c (build_target_expr): Update.
5444         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
5445
5446 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
5447
5448         * decl2.c (cxx_decode_option): Handle -E.
5449         * lang-specs.h (default_compilers): Preprocess with cc1plus.
5450         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
5451
5452 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
5453
5454         PR c++/6037
5455         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
5456
5457 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5458
5459         * error.c (dump_type): Be careful about implicit typenames.
5460
5461 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5462
5463         PR C++/3656
5464         * semantics.c (finish_base_specifier): Handle erronous base
5465         classes.
5466
5467 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
5468
5469         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
5470         REAL_IS_NOT_DOUBLE.
5471
5472 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
5473
5474         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
5475         an index into the vtable_entry array regardless of
5476         TARGET_PTRMEMFUNC_VBIT_LOCATION.
5477
5478 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
5479
5480         * tree.c (cp_cannot_inline_tree_fn): Same.
5481
5482 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
5483
5484         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
5485         insert_block, getdecls, global_bindings_p): New.
5486
5487 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
5488
5489         PR c++/4361
5490         * mangle.c (struct globals) Add internal_mangling_p member.
5491         (write_template_param): Do internal mangling, if needed.
5492         (mangle_conv_op_name_for_type): Request internal mangling.
5493
5494 2002-03-20  Jason Merrill  <jason@redhat.com>
5495
5496         PR c++/2136
5497         * init.c (build_delete): Check access for a member op delete here.
5498         * decl2.c (delete_sanity): Not here.
5499
5500 2002-03-19  Jason Merrill  <jason@redhat.com>
5501
5502         PR c++/5118
5503         * class.c (get_vfield_name): Use the constructor_name.
5504
5505 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
5506
5507         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
5508         * cp-tree.h (lang_printable_name): Rename.
5509         * error.c (lang_decl_name): Use new hook.
5510         * lex.c (cxx_init): Remove old hook.
5511         * pt.c (tsubst_decl): Use new hook.
5512         * tree.c (lang_printable_name): Rename.
5513
5514 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
5515
5516         PR c++/3882
5517         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
5518         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
5519         only after recording the declaration.
5520
5521 2002-03-18  Jason Merrill  <jason@redhat.com>
5522
5523         PR c++/2039
5524         * init.c (resolve_offset_ref): Hand off to build_component_ref.
5525
5526         PR c++/4222, c++/5995
5527         * call.c (build_over_call): Fix empty class logic.
5528
5529         PR c++/3870
5530         * cp-tree.h (struct saved_scope): Add last_parms field.
5531         * decl.c (maybe_push_to_top_level): Save last_function_parms.
5532         (pop_from_top_level): Restore it.
5533
5534         PR c++/4377
5535         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
5536         NON_LVALUE_EXPRs.
5537
5538         PR c++/4003
5539         * pt.c (tsubst_friend_function): Use decl_namespace_context.
5540
5541         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
5542         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
5543         type with a nontrivial destructor.
5544
5545 2002-03-17  Jason Merrill  <jason@redhat.com>
5546
5547         PR c++/4460
5548         * class.c (build_base_path): Virtual base layout is fixed in
5549         in-charge [cd]tors.
5550
5551 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
5552
5553         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
5554         * parse.y (yyparse): Remove macro.
5555
5556 2002-03-17  Jason Merrill  <jason@redhat.com>
5557
5558         PR c++/5757
5559         * init.c (build_new_1): Pass the right pointer to op delete.
5560
5561 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
5562
5563         PR c++/4361
5564         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
5565         conversion operators go.
5566         (struct lang_decl_flags): Add template_conv_p and unused
5567         bitfields.
5568         (DECL_TEMPLATE_CONV_FN_P): New macro.
5569         * call.c (build_user_type_conversion_1): Don't check second type
5570         conversion of overload set first.
5571         * class.c (add_method): Make sure templated conversion operators
5572         all end up on slot 2.
5573         * lex.c (do_identifier): A conversion operator token might be
5574         satisfied by a templated conversion operator.
5575         * pt.c (check_explicit_specialization): Use
5576         CLASSTYPE_FIRST_CONVERSION_SLOT.
5577         (template_parm_this_level_p): New function.
5578         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
5579         * search.c (lookup_fnfields_1): Template conversions will be on
5580         the first slot.
5581         * typeck.c (build_component_ref): Preserve the type of an
5582         conversion operator name on the overload type.
5583         (build_x_function_call): Retrieve the conversion operator name.
5584
5585 2002-03-15  Richard Henderson  <rth@redhat.com>
5586
5587         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
5588
5589 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
5590
5591         * cp-tree.h (CLEANUP_DECL): Remove.
5592         (CLEANUP_EXPR): Likewise.
5593         * decl.c (destroy_local_var): Simplify.
5594         (maybe_build_cleanup): Tidy.
5595         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
5596         * semantics.c (cp_expand_stmt): Likewise.
5597         * cp/tree.c (cp_statement_code_p): Likewise.
5598
5599 2002-03-15  Jason Merrill  <jason@redhat.com>
5600
5601         PR c++/5857
5602         * decl.c (duplicate_decls): Use merge_types instead of common_type.
5603         * typeck.c (common_type): Just hand off to
5604         type_after_usual_arithmetic_conversions and
5605         composite_pointer_type.
5606         (merge_types): New fn.
5607         (commonparms): Use it instead of common_type.
5608         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
5609         (composite_pointer_type): Also handle attributes.
5610         * cp-tree.h: Declare merge_types.
5611
5612         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
5613         variables.
5614         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
5615
5616 2002-03-14  Richard Henderson  <rth@redhat.com>
5617
5618         * decl.c: Include c-pragma.h.
5619         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
5620         * Make-lang.in: Update dependencies.
5621
5622 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
5623
5624         PR c++/5908
5625         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
5626         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
5627
5628 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
5629
5630         * mangle.c (write_builtin_type): Handle 128-bit integers even if
5631         they are not a standard integer type.
5632
5633 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
5634
5635         * cp-tree.h (init_init_processing): Remove declaration.
5636         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
5637         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
5638
5639 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5640
5641         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
5642         Define.
5643         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
5644         tree_code_length.
5645         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
5646         cplus_tree_code_name): Delete.
5647         (cxx_init): Don't call add_c_tree_codes, instead set
5648         lang_unsafe_for_reeval.  Don't try to copy into the various
5649         tree_code arrays.
5650
5651 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
5652
5653         PR c++/5659
5654         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
5655         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
5656         definitions.
5657
5658 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
5659
5660         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
5661         DR209 is now not a defect.
5662         * cp-tree.h (skip_type_access_control): Remove.
5663         * decl.c (grokdeclarator): Do type access control for friend
5664         declarations.
5665         * semantics.c (decl_type_access_control): Don't reset
5666         current_type_lookups.
5667         (save_type_access_control): Always save the lookups.
5668         (skip_type_access_control): Remove.
5669         (finish_class_definition): Don't change type_lookups.
5670
5671 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
5672
5673         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
5674         It is incorrect.
5675         * typeck.c (build_static_cast): Compare non-qualified types
5676         with pointer to member conversions.
5677
5678 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
5679             Daniel Berlin  <dan@dberlin.org>
5680
5681         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
5682         (cxx_get_alias_set): Use it.
5683
5684 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5685
5686         * cp-tree.h (stabilize_expr): Prototype.
5687
5688 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5689
5690         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
5691         conditional return void.
5692
5693 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
5694
5695         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
5696         * cp-tree.h (cxx_unsave): New.
5697         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
5698         (init_tree): Update.
5699
5700 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5701
5702         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
5703         explicit sizeof/sizeof.
5704         * decl2.c (cxx_decode_option): Likewise.
5705         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
5706
5707 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
5708
5709         PR c++/775
5710         * decl.c (lookup_tag): Only reject enum/class mismatch, not
5711         class/union mismatch.
5712         * parse.y (check_class_key): New function.
5713         (structsp): Call it.
5714
5715 2002-03-01  Michael Matz  <matz@suse.de>
5716
5717         * typeck.c (cp_pointer_int_sum): Complete inner type which is
5718         used later by size_in_bytes().
5719
5720 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
5721
5722         * cp-tree.h:  Require __GNUC__ to be #defined.
5723         (build_init):  Add missing prototype.
5724
5725 2002-03-01  Jason Merrill  <jason@redhat.com>
5726
5727         * except.c: Don't include decl.h or obstack.h.  Do include
5728         tree-inline.h.
5729         (build_throw): Destroy temporaries from the thrown
5730         expression before calling __cxa_throw.  Construct a thrown
5731         temporary directly into the exception object.
5732         (stabilize_throw_expr): New function.
5733         (wrap_cleanups_r): New function.
5734         * tree.c (stabilize_expr): New function.
5735         * init.c (build_init): New function.
5736         * Make-lang.in (cp/except.o): Adjust .h deps.
5737
5738 2002-02-28  Jason Merrill  <jason@redhat.com>
5739
5740         * search.c (lookup_base_r): Don't clear is_non_public just because
5741         we found a friendly scope.
5742
5743         * decl.c (finish_function): Only warn about missing return
5744         statement with -Wreturn-type.
5745
5746 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
5747
5748         * class.c (build_clone): Update.
5749         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
5750         * cp-tree.h (cxx_dup_lang_specific_decl): New.
5751         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
5752         (copy_decl): Update.
5753         * method.c (make_thunk): Update.
5754
5755 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
5756
5757         * decl2.c: Delete traditional-mode-related code copied from
5758         the C front end but not used, or used only to permit the
5759         compiler to link.
5760
5761 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
5762
5763         PR c++/4093
5764         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
5765         to void.
5766
5767 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
5768
5769         PR other/5746
5770         * semantics.c (finish_switch_cond): Don't call get_unwidened
5771         if error_mark_node.
5772
5773 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
5774
5775         PR c++/2645, DR 295
5776         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
5777         tf_keep_type_decl.
5778         (make_typename_type): Use tsubst_flags_t.
5779         * decl.c (make_typename_type): Adjust. Return non-artificial
5780         TYPE_DECLs, if required.
5781         (grokdeclarator): Simplify CVR qualification handling. Allow bad
5782         qualifiers on typedef types.
5783         * decl2.c (handle_class_head): Adjust make_typename_type call.
5784         * parse.y (nested_name_specifier): Likewise.
5785         (typename_sub0): Likewise.
5786         (typename_sub1): Likewise.
5787         * pt.c (convert_template_argument): Adjust make_typename_type
5788         return value.
5789         (tsubst): Adjust cp_build_qualified_type_real calls.
5790         (check_cv_quals_for_unify): Cope with allowing bad qualifications
5791         on template type parms.
5792         (instantiate_decl): Recheck substitutions to give warnings on bad
5793         qualifications.
5794         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
5795
5796 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
5797
5798         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
5799
5800         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
5801         unless DECL_ALWAYS_INLINE.
5802
5803 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
5804
5805         * typeck.c (cp_pointer_int_sum): Renamed from
5806         pointer_int_sum, call pointer_int_sum.
5807
5808 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
5809
5810         * decl.c (duplicate_decls): Return 0 if issued error about
5811         redeclaration.
5812
5813 2002-02-19  Jason Merrill  <jason@redhat.com>
5814
5815         ABI change: Mangle `void (A::*)() const' as
5816         M1AKFvvE, not MK1AFvvE.
5817         * mangle.c (write_function_type): Write cv-quals for member
5818         function type here.
5819         (write_pointer_to_member_type): Not here.
5820
5821 2002-02-18  Jason Merrill  <jason@redhat.com>
5822
5823         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
5824         (do_decl_instantiation): Likewise.
5825
5826 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5827
5828         PR c++/5685
5829         * decl.c (duplicate_decls): Make warning unconditional
5830         if duplicate default argument declarations are present.
5831
5832 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
5833
5834         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
5835         shortening.
5836
5837 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
5838
5839         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
5840         remove incorrect comment. Move #if 0'd code to common path. Use
5841         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
5842
5843 2002-02-13  Jason Merrill  <jason@redhat.com>
5844
5845         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
5846         (finish_function): Don't warn if current_function_returns_null.
5847
5848         * typeck2.c (digest_init): Do handle values of vector type.
5849
5850         * typeck2.c (digest_init, process_init_constructor): Treat vectors
5851         like arrays.
5852
5853 2002-02-11  Jason Merrill  <jason@redhat.com>
5854
5855         * parse.y (reserved_declspecs): Don't handle attributes.
5856         (reserved_typespecquals): Handle them here.
5857         * Make-lang.in (parse.c): Adjust expected conflicts.
5858
5859 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
5860
5861         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
5862         instead of compstmt.
5863         (compstmt_or_stmtexpr): Renamed from compstmt.
5864         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
5865
5866 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
5867
5868         Rename instantiate_type_flags to tsubst_flags_t & expand use.
5869         * cp-tree.h (instantiate_type_flags): Rename to ...
5870         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
5871         add tf_warning flag.
5872         (instantiate_type): Adjust prototype.
5873         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
5874         do_type_instantiation, cp_build_qualified_type_real): Likewise.
5875         cp_build_qualified_type: Adjust.
5876         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
5877         tf_*.
5878         * call.c (standard_conversion): Rename itf_* to tf_*.
5879         (reference_binding): Likewise.
5880         (convert_like_real): Likewise.
5881         * cvt.c (cp_convert_to_pointer): Likewise.
5882         (convert_to_reference): Likewise.
5883         * decl.c (lookup_namespace_name): Use tf_* flags.
5884         (make_typename_type): Likewise.
5885         (grokdeclarator): Likewise.
5886         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
5887         (coerce_template_template_parms, convert_template_argument,
5888         coerce_template_parms, maybe_get_template_decl_from_type_decl,
5889         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
5890         instantiate_class_template, tsubst_template_arg_vector,
5891         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
5892         tsubst_decl, tsubst_arg_types, tsubst_function_type,
5893         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
5894         instantiate_template, fn_type_unification,
5895         resolve_overloaded_unification, verify_class_unification,
5896         unify, get_bindings_real, do_type_instantiation,
5897         regenerate_decl_from_template, instantiate_decl,
5898         tsubst_initializer_list, tsubst_enum,
5899         get_mostly_instantiated_function_type,
5900         invalid_nontype_parm_type_p): Likewise.
5901         * tree.c (cp_build_qualified_type_real): Likewise.
5902         * typeck.c (build_binary_op): Rename itf_* to tf_*.
5903         (build_ptrmemfunc): Likewise.
5904         (convert_for_assignment): Likewise.
5905
5906 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
5907
5908         PR c++/109
5909         * decl.c (grokdeclarator): Allow friend declarations from
5910         dependent types.
5911         * decl2.c (handle_class_head): Don't push into template parm contexts.
5912         * pt.c (push_template_decl_real): Template parm contexts are never
5913         being defined.
5914
5915 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
5916
5917         * class.c: Include target.h.
5918         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
5919         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
5920         bit-field layout.
5921         * Make-lang.in: Adjust deps.
5922
5923 2002-02-05  Jason Merrill  <jason@redhat.com>
5924
5925         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
5926
5927 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
5928
5929         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
5930         (finish_switch_cond): Set SWITCH_TYPE.
5931
5932 2002-02-04  Richard Henderson  <rth@redhat.com>
5933
5934         * method.c (use_thunk): Always initialize the block tree.  Reindent.
5935         * semantics.c (expand_body): Emit thunks after function, not before.
5936
5937 2002-02-04  Jason Merrill  <jason@redhat.com>
5938
5939         * decl.c (start_function): Call cplus_decl_attributes immediately
5940         after grokdeclarator.
5941
5942         * decl.c (start_function): Combine DECL_RESULT handling code.
5943
5944 2002-02-03  Jason Merrill  <jason@redhat.com>
5945
5946         * xref.c: Remove.
5947         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
5948         (cp/xref.o): Remove dependencies.
5949         * class.c (finish_struct_1, check_methods): Don't call xref fns.
5950         (finish_struct_1): Likewise.
5951         * friend.c (make_friend_class): Likewise.
5952         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
5953         * spew.c (read_process_identifier): Likewise.
5954
5955 2002-02-01  Jason Merrill  <jason@redhat.com>
5956
5957         PR c++/4872
5958         * decl.c (finish_function): Warn about a non-void function with
5959         no return statement and no abnormal exit.
5960         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
5961         (current_function_returns_abnormally): New macro.
5962         * call.c (build_call): Set it.
5963
5964         * typeck.c (build_component_ref): Always complain about offsetof
5965         constructs on non-PODs.  Only make it an error for members of
5966         virtual bases.
5967
5968         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
5969         (dump_function_decl): Always dump parms.
5970
5971         * decl2.c (finish_static_data_member_decl): Complain about a local
5972         class with a static data member.
5973
5974         PR c++/4286
5975         * search.c (lookup_field_1): Don't xref a static data member
5976         just because we looked it up.
5977
5978 2002-01-31  Jason Merrill  <jason@redhat.com>
5979
5980         * Make-lang.in (parse.c): Handle .output file.
5981
5982         PR c++/3395
5983         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
5984         not TREE_TYPE.
5985         * semantics.c (finish_class_definition): Adjust.
5986
5987         Allow attributes in parms and casts.
5988         * parse.y (named_parm): Don't strip attrs.
5989         (declmods): Remove 'attributes' production.
5990         (nonempty_cv_qualifiers): Accept attributes.
5991         (ATTRIBUTE): Give precedence.
5992         * decl.c (groktypename): Handle attributes.
5993         (grokparms): Likewise.
5994
5995 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
5996
5997         * decl2.c (cxx_decode_option): Pass 0 as last argument to
5998         cpp_handle_option.
5999         * lang-specs.h: Use cpp_unique_options instead of cpp_options
6000         when used together with cc1_options.
6001
6002 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
6003
6004         PR c++/5132
6005         * typeck2.c (digest_init): Make sure non-array core type is
6006         instantiated.
6007         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
6008         constructor, rather than build a new one.
6009         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
6010         PURPOSE of constructor elts.
6011
6012 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
6013
6014         * Make-lang.in (parse.c): Adjust expected number of
6015         shift-reduce conflicts.
6016         (decl.o): Depend on diagnostic.h.
6017         * decl.c: Include diagnostic.h.
6018         (grokdeclarator): Check for null pointer.
6019         (finish_function): Don't abort when
6020         current_binding_level->parm_flag != 1, if errors have
6021         occurred; throw away the statement tree and extra binding
6022         levels, and continue.
6023         * lex.c (note_list_got_semicolon): Check for null pointer.
6024         * method.c (hack_identifier): Just return error_mark_node if
6025         value is error_mark_node.
6026         * parse.y (primary: TYPEID(type_id)): No need to use
6027         TYPE_MAIN_VARIANT here.
6028         (handler_seq): Accept an empty list of catch clauses and
6029         generate a fake handler block to avoid later crashes.
6030         (ansi_raise_identifier): Accept the error token too.
6031         * semantics.c (begin_class_definition,
6032         finish_class_definition): Check for error_mark_node.
6033
6034 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
6035
6036         * typeck2.c (friendly_abort): Delete definition.
6037         * cp-tree.h (friendly_abort): Don't prototype.
6038         (my_friendly_assert): Use fancy_abort.
6039
6040 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6041
6042         * cp-tree.h (my_friendly_abort): Remove.
6043
6044 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
6045
6046         * spew.c (pending_inlines, pending_inlines_tail,
6047         processing_these_inlines): Make static.
6048         (mark_pending_inlines): Remove static.
6049         (begin_parsing_inclass_inline): If in function, save pi
6050         for GC to cp_function_chain->unparsed_inlines instead.
6051         (process_next_inline): Likewise.
6052         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
6053         (mark_pending_inlines): Add prototype.
6054         * decl.c (spew_debug): Remove unused extern.
6055         (mark_lang_function): Call mark_pending_inlines.
6056
6057 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6058
6059         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
6060         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
6061         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
6062         Change my_fancy_abort() to abort().
6063
6064 2002-01-23  Jason Merrill  <jason@redhat.com>
6065
6066         PR c++/5453
6067         * class.c (fixed_type_or_null): Fix thinko.
6068
6069         PR c++/3331
6070         * init.c (resolve_offset_ref): Use build_indirect_ref.
6071
6072         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
6073
6074 2002-01-22  Jason Merrill  <jason@redhat.com>
6075
6076         * parse.y (function_body): Suppress the block for the outermost
6077         curly braces.
6078         * decl.c (pushdecl): Don't try to skip it.
6079         (begin_function_body): Keep the block we create, not the next one.
6080         * init.c (emit_base_init): Don't mess with keep_next_level.
6081
6082         * class.c (build_base_path): Tweak formatting.
6083
6084 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
6085
6086         Fix regression introduced with patch for c++/775
6087         * parse.y (class_head_defn): Check for template specializations
6088         with a different class-key.
6089
6090 2002-01-17  Jason Merrill  <jason@redhat.com>
6091
6092         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
6093         (begin_function_body): Call them and keep_next_level.
6094         * init.c (emit_base_init): Call keep_next_level.
6095         * semantics.c (setup_vtbl_ptr): Lose.
6096         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
6097         (vtbls_set_up_p): Lose.
6098         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
6099         * method.c (do_build_copy_constructor): Likewise.
6100         (synthesize_method): Call finish_mem_initializers.
6101         * parse.y (nodecls): Likewise.
6102
6103         * error.c (dump_type_suffix): Print the exception specs before
6104         recursing.
6105         (dump_function_decl): Here, too.
6106
6107         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
6108
6109 2002-01-10  Ira Ruben   <ira@apple.com>
6110
6111         PR c++/907
6112         * decl.c (start_method): Handle attrlist.
6113
6114 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
6115
6116         * decl2.c (max_tinst_depth): Increase default limit to 500.
6117
6118 2002-01-10  Graham Stott  <grahams@redhat.com>
6119
6120         * spew.c (YYCHAR): Uppercase macro parameter and add
6121         parenthesis.
6122         (YYCODE): Likewise.
6123         (NAME): Uppercase macro parameter.
6124
6125 2002-01-09  Graham Stott  <grahams@redhat.com>
6126
6127         * decl.h (grokdeclarator): Wrap long line.
6128
6129         * semantics.c (FINISH_COND): Uppercase macro paramaters and
6130         add parenthesis.
6131
6132 2002-01-08  Graham Stott  <grahams@redhat.com>
6133
6134         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
6135         (PALLOC): Uppercase macro parameter and whitespace.
6136         (SALLOC): Uppercase macro parameter.
6137         (SFREE): Uppercase macros parameter, add parenthese and
6138         whitespace.
6139         (STREQL): Uppercase macro parameter and whitespace.
6140         (STRNEQ): Likewise.
6141         (STRLSS): Likewise.
6142         (STRLEQ): Likewise.
6143         (STRGTR): Likewise.
6144         (STRGEQ): Likewise.
6145
6146         * call.c (convert_like): Add parenthesis and wrap.
6147         (convert_like_with_context): Likewise.
6148         (ICS_RANK): Whitespace.
6149         (NEED_TEMPORARY_P): Remove parenthesis.
6150
6151         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
6152         whitespace.
6153         (VTT_MARKED_BINFO_P): Likewise.
6154
6155         * decl.c (BINDING_LEVEL): Add parenthesis.
6156         (DEF_OPERATOR): Likewise.
6157
6158         * mangle.c (MANGLE_TRACE): Add parenthesis.
6159         (MANGLE_TRACE_TREE): Likewise.
6160         (write_signed_number): Likewise.
6161         (write_unsigned_number): Likewise.
6162
6163         * pt.c (ccat): Uppercase macro parameter.
6164         (cat): Likewise
6165
6166         * search.c (SET_BINFO_ACCESS): Add parenthesis.
6167
6168 2002-01-07  Jason Merrill  <jason@redhat.com>
6169
6170         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
6171         to pedwarn.
6172
6173         PR c++/3536
6174         * method.c (make_thunk): If !flag_weak, give the thunk the
6175         function's linkage.
6176         (use_thunk): Here, too.
6177
6178 2002-01-07  Graham Stott  <grahams@redhat.com>
6179
6180         * error.c: Update copyright date.
6181         (print_scope_operator): Add parenthesis.
6182         (print_left_paren): Likewise.
6183         (print_right_paren): Likewise.
6184         (print_left_bracket): Likewise.
6185         (print_right_bracket): Likewise.
6186         (print_template_argument_list_start): Likewise.
6187         (print_template_argument_list_end): Likewise.
6188         (print_non_consecutive_character): Likewise.
6189         (print_tree_identifier): Likewise.
6190         (print_identifier): Likewise.
6191         (NEXT_CODE): Uppercase macro parameter.
6192         (ident_fndecl): Delete unused.
6193         (GLOBAL_THING): Likewise.
6194
6195 2002-01-06  Graham Stott  <grahams@redhat.com>
6196
6197         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
6198         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
6199         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
6200         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
6201         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
6202         (C_IS_RESERVED_WORD): Uppercase macro parameter.
6203         (C_RID_YYCODE) Likewise.
6204         (ptrmem_cst): Use rtx.
6205         (LOCAL_BINDING_P): Add whitespace.
6206         (INHERITED_VALUE_BINDING_P): Likewise.
6207         (BINDING_SCOPE): Wrap long line.
6208         (BINDING_HAS_LEVEL_P): Remove parenthesis.
6209         (BINDING_VALUE): Wrap long line.
6210         (BINDING_TYPE): Whitespace.
6211         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
6212         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
6213         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
6214         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
6215         (same_type_p): Uppercase macro parameters.
6216         (same_type_ignoring_top_level_qualifiers_p): Likewise.
6217         (OVL_FUNCTION): Wrap long line.
6218         (OVL_CHAIN): Whitespace.
6219         (OVL_CURRENT): Add parenthesis and whitespace.
6220         (OVL_NEXT): Whitespace.
6221         (OVL_USED): Likewise.
6222         (IDENTIFIER_TYPE_VALUE): Likewise.
6223         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
6224         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
6225         (LANG_ID_FIELD): Whitespace.
6226         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
6227         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
6228         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
6229         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
6230         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
6231         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
6232         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
6233         (IDENTIFIER_VIRTUAL_P): Likewise.
6234         (IDENTIFIER_OPNAME_P): Likewise.
6235         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
6236         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
6237         (C_SET_EXP_ORIGINAL_CODE): Likewise.
6238         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
6239         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
6240         (IS_AGGR_TYPE): Uppercase macro parameter.
6241         (CLASS_TYPE_P): Likewise.
6242         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
6243         (IS_AGGR_TYPE_2): Whitespace.
6244         (TAGGED_TYPE_P): Uppercase macro parameter.
6245         (TYPE_BUILT_IN): Whitespace.
6246         (TYPE_FOR_JAVA): Likewise.
6247         (FUNCTION_ARG_CHAIN): Remove parenthesis.
6248         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
6249         (FUNCTION_FIRST_USER_PARAM): Likewise.
6250         (PROMOTES_TO_AGGR_TYPE): Whitespace.
6251         (DERIVED_FROM_P): Add parenthesis and wrap.
6252         (UNIQUELY_DERIVED_FROM_P): Likewise.
6253         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
6254         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
6255         (CLASSTYPE_USE_TEMPLATE): Whitespace.
6256         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
6257         (TYPE_GETS_DELETE): Add parenthesis.
6258         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
6259         (TYPE_HAS_ASSIGN_REF): Likewise,
6260         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
6261         (TYPE_HAS_INIT_REF): Likewise.
6262         (TYPE_HAS_CONST_INIT_REF): Likewise.
6263         (TYPE_BEING_DEFINED): Likewise.
6264         (TYPE_LANG_SPECIFIC): Likewise.
6265         (CLASSTYPE_RTTI): Likewise.
6266         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
6267         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
6268         (TYPE_OVERLOADS_ARROW): Likewise.
6269         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
6270         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
6271         (CLASSTYPE_METHOD_VEC): Likewise.
6272         (CLASSTYPE_MARKED_N): Likewise.
6273         (CLASSTYPE_MARKED): Likewise.
6274         (CLASSTYPE_MARKED2): Likewise.
6275         (CLASSTYPE_MARKED3): Likewise.
6276         (CLASSTYPE_MARKED4): Likewise.
6277         (CLASSTYPE_MARKED5): Likewise.
6278         (CLASSTYPE_MARKED6): Likewise.
6279         (SET_CLASSTYPE_MARKED): Whitespace.
6280         (CLEAR_CLASSTYPE_MARKED): Likewise.
6281         (SET_CLASSTYPE_MARKED2): Likewise.
6282         (CLEAR_CLASSTYPE_MARKED2): Likewise.
6283         (SET_CLASSTYPE_MARKED3): Likewise.
6284         (CLEAR_CLASSTYPE_MARKED3): Likewise.
6285         (SET_CLASSTYPE_MARKED4): Likewise.
6286         (CLEAR_CLASSTYPE_MARKED4): Likewise.
6287         (SET_CLASSTYPE_MARKED5): Likewise.
6288         (CLEAR_CLASSTYPE_MARKED5): Likewise.
6289         (SET_CLASSTYPE_MARKED6): Likewise.
6290         (CLEAR_CLASSTYPE_MARKED6): Likewise.
6291         (CLASSTYPE_TAGS): Likewise.
6292         (CLASSTYPE_VSIZE): Likewise.
6293         (CLASSTYPE_VBASECLASSES): Likewise.
6294         (CANONICAL_BINFO): Add parenthesis.
6295         (CLASSTYPE_SIZE(NODE): Likewise.
6296         (CLASSTYPE_SIZE_UNIT): Likewise.
6297         (CLASSTYPE_ALIGN(NODE): Likewise.
6298         (CLASSTYPE_USER_ALIGN): Likewise.
6299         (TYPE_JAVA_INTERFACE): Likewise.
6300         (CLASSTYPE_PURE_VIRTUALS): Likewise.
6301         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
6302         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
6303         (CLASSTYPE_HAS_MUTABLE): Likewise.
6304         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
6305         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
6306         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
6307         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
6308         (CLASSTYPE_INTERFACE_ONLY): Likewise.
6309         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
6310         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
6311         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
6312         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
6313         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
6314         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
6315         (BINFO_UNSHARED_MARKED): Whitespace.
6316         (BINFO_MARKED): Whitespace and wrap.
6317         (SET_BINFO_MARKED): Likewise.
6318         (CLEAR_BINFO_MARKED): Likewise.
6319         (BINFO_VTABLE_PATH_MARKED): Likewise.
6320         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
6321         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
6322         (BINFO_SUBVTT_INDEX): Remove parenthesis.
6323         (BINFO_VPTR_INDEX): Likewise.
6324         (BINFO_PRIMARY_BASE_OF): Likewise,
6325         (CLASSTYPE_VFIELDS): Whitespace.
6326         (VF_DERIVED_VALUE): Wrap long line.
6327         (NAMESPACE_LEVEL): Whitespace.
6328         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
6329         (DEFARG_POINTER): Whitespace.
6330         (DECL_NEEDED_P): Remove parenthesis.
6331         (DECL_LANGUAGE): Whitespace.
6332         (SET_DECL_LANGUAGE): Add parenthesis.
6333         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
6334         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
6335         (DECL_IN_AGGR_P): Whitespace.
6336         (DECL_FRIEND_P): Likewise.
6337         (DECL_BEFRIENDING_CLASSES): Likewise.
6338         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
6339         (DECL_NONCONVERTING_P): Whitespace.
6340         (DECL_PURE_VIRTUAL_P): Likewise.
6341         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
6342         (DECL_PENDING_INLINE_INFO): Whitespace.
6343         (DECL_SORTED_FIELDS): Likewise.
6344         (DECL_DEFERRED_FN): Likewise.
6345         (DECL_TEMPLATE_INFO): Likewise.
6346         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
6347         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
6348         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
6349         (TMPL_ARGS_LEVEL): Likewise.
6350         (SET_TMPL_ARGS_LEVEL): Likewise.
6351         (INNERMOST_TEMPLATE_PARMS): Whitespace.
6352         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
6353         (INTEGRAL_CODE_P(CODE): Add parenthesis.
6354         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
6355         (TYPE_HAS_CONSTRUCTOR): Whitespace.
6356         (TREE_HAS_CONSTRUCTOR): Likewise.
6357         (TYPE_HAS_DESTRUCTOR): Likewise.
6358         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
6359         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
6360         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
6361         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
6362         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
6363         (TYPE_PTRMEMFUNC_P): Likewise.
6364         (TYPE_PTRMEMFUNC_FLAG): Likewise.
6365         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
6366         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
6367         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
6368         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
6369         (DECL_ACCESS): Whitespace.
6370         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
6371         (DECL_GLOBAL_DTOR_P): Likewise.
6372         (GLOBAL_INIT_PRIORITY): Likewise.
6373         (DECL_TEMPLATE_PARMS): Likewise.
6374         (DECL_TEMPLATE_RESULT): Likewise.
6375         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
6376         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
6377         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
6378         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
6379         (PRIMARY_TEMPLATE_P): Add parenthesis.
6380         (DECL_USE_TEMPLATE): Whitespace.
6381         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
6382         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
6383         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
6384         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
6385         (CALL_DECLARATOR_PARMS): Remove parenthesis.
6386         (CALL_DECLARATOR_QUALS): Likewise.
6387         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
6388         (TEMP_NAME_P): Wrap.
6389         (VFIELD_NAME_P): Likewise.
6390         (B_SET): Uppercase macro parameters and add parenthesis.
6391         (B_CLR): Likewise.
6392         (B_TST): Likewise.
6393         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
6394         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
6395         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
6396         (same_or_base_type_p): Likewise.
6397         (cp_deprecated): Likewise.
6398
6399 2002-01-05  Richard Henderson  <rth@redhat.com>
6400
6401         * semantics.c (expand_body): Revert last change.
6402
6403 2002-01-04  Jason Merrill  <jason@redhat.com>
6404
6405         PR c++/4122
6406         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
6407         lost primary.
6408
6409         * class.c (build_vtbl_initializer): Check for a lost primary
6410         before calculating the vtable entry to throw away.
6411
6412 2002-01-02  Jason Merrill  <jason@redhat.com>
6413
6414         * semantics.c (expand_body): Call outlining_inline_function when
6415         emitting an inline function out of line.
6416
6417 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6418
6419         PR c++/5116, c++/764 reversion
6420         * call.c (build_new_op): Revert the instantiations. They are
6421         incorrect.
6422
6423 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6424
6425         PR c++/5089
6426         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
6427
6428 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6429
6430         PR c++/3716
6431         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
6432         (tsubst, case POINTER_TYPE): Handle pmfs here.
6433         (tsubst, case OFFSET_TYPE): Check it is not an offset to
6434         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
6435
6436 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6437
6438         PR c++/35
6439         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
6440         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
6441         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
6442         PARM_DECL.
6443         (tsubst_template_parms): Break up loop statements.
6444         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
6445         parm PARM_DECLs don't get promoted.
6446
6447 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6448
6449         PR c++/5123
6450         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
6451         (build_x_function_call): Cope with a COMPONENT_REF containing a
6452         TEMPLATE_ID_EXPR.
6453
6454 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6455
6456         PR c++/5213
6457         * pt.c (convert_template_argument): Be more careful determining
6458         when RECORD_TYPE templates are or are not templates.
6459
6460 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6461
6462         PR c++/775
6463         * cp-tree.h (handle_class_head): Adjust prototype.
6464         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
6465         parameters. Use for all class heads.
6466         * parse.y (named_class_head_sans_basetype, named_class_head,
6467         named_complex_class_head_sans_basetype,
6468         named_class_head_sans_basetype_defn,
6469         unnamed_class_head): Remove.
6470         (class_head, class_head_apparent_template): Recognize class heads
6471         (class_head_decl, class_head_defn): New reductions. Process class
6472         heads.
6473         (structsp): Adjust class definition and class declaration
6474         reductions.
6475         (maybe_base_class_list): Give diagnostic on empty list.
6476
6477 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6478
6479         PR c++/4379
6480         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
6481         single non-static member.
6482         (unary_complex_lvalue): If it cannot be a pointer to member, don't
6483         make it so. Check it is not pointer to reference.
6484
6485 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6486
6487         PR c++/5132
6488         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
6489         are processing a template decl.
6490
6491 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6492
6493         PR c++/5116, c++/764
6494         * call.c (build_new_op): Make sure template class operands are
6495         instantiated. Simplify arglist construction.
6496
6497 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6498
6499         * call.c (build_user_type_conversion_1): Use my_friendly_assert
6500         rather than if ... abort.
6501         * cvt.c (convert_to_reference): Likewise.
6502         * semantics.c (setup_vtbl_ptr): Likewise.
6503         * pt.c (lookup_template_class): Comment typo.
6504
6505 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6506
6507         PR c++/5125
6508         * pt.c (push_template_decl_real): Make sure DECL has
6509         DECL_LANG_SPECIFIC.
6510
6511 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6512
6513         PR c++/335
6514         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
6515         for non-reference fields.
6516         * typeck.c (require_complete_type): Use resolve_offset_ref).
6517
6518 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
6519
6520         PR c++/196
6521         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
6522
6523 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
6524
6525         PR c++/160
6526         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
6527         up. Don't stabilize_references when initializing a reference.
6528
6529 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6530
6531         * decl2.c (lang_f_options): Const-ify.
6532
6533 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
6534
6535         * config-lang.in (diff_excludes): Remove.
6536
6537 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
6538
6539         PR c++/90
6540         * typeck.c (build_function_call_real): Use original function
6541         expression for errors.
6542
6543 2001-12-18  Jason Merrill  <jason@redhat.com>
6544
6545         PR c++/3242
6546         * class.c (add_method): Do compare 'this' quals when trying to match a
6547         used function.  Don't defer to another used function.
6548
6549 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
6550
6551         * pt.c (instantiate_clone): Remove, fold into ...
6552         (instantiate_template): ... here. Simplify by removing mutual
6553         recursion.
6554         * typeck2.c (build_m_component_ref): Don't cv qualify the function
6555         pointed to by a pointer to function.
6556         * class.c (delete_duplicate_fields_1): Typo.
6557
6558 2001-12-18  Jason Merrill  <jason@redhat.com>
6559
6560         C++ ABI change: destroy value arguments in caller.
6561         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
6562         create an extra binding level for the parameters.
6563         * decl.c (store_parm_decls): Don't do parameter cleanups.
6564
6565 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
6566
6567         * call.c (build_new_method_call): Use '%#V'.
6568         * error.c (cv_to_string): Use V parameter to determine padding.
6569
6570 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
6571
6572         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
6573         spellings in messages.
6574
6575 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
6576
6577         * cp-tree.h: Delete #defines for cp_error, cp_warning,
6578         cp_pedwarn, and cp_compiler_error.
6579         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
6580         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
6581         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
6582         typeck2.c: Change calls to the above macros to use their
6583         language-independent equivalents: error, warning, pedwarn, and
6584         internal_error respectively.
6585
6586 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
6587
6588         * decl2.c (finish_file): Remove back_end_hook.
6589
6590 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
6591
6592         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
6593         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
6594         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
6595
6596 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
6597
6598         * lang-options.h: Use American spelling in messages.
6599
6600 2001-12-13  Jason Merrill  <jason@redhat.com>
6601
6602         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
6603
6604         Use cleanups to run base and member destructors.
6605         * init.c (push_base_cleanups): New function, split out from...
6606         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
6607         * decl.c (finish_destructor_body): Move vbase destruction code to
6608         push_base_cleanups.
6609         (begin_function_body, finish_function_body): New fns.
6610         (finish_function): Move [cd]tor handling and call_poplevel to
6611         finish_function_body.
6612         (pushdecl): Skip the new level.
6613         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
6614         (setup_vtbl_ptr): Call push_base_cleanups.
6615         * method.c (synthesize_method): Call {begin,end}_function_body.
6616         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
6617         * cp-tree.h: Declare new fns.
6618         * parse.y (function_body, .begin_function_body): New nonterminals.
6619         (fndef, pending_inline, function_try_block): Use function_body.
6620         (ctor_initializer_opt, function_try_block): No longer has a value.
6621         (base_init): Remove .set_base_init token.
6622         (.set_base_init, compstmt_or_error): Remove.
6623         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
6624
6625         * optimize.c (maybe_clone_body): Fix parameter updating.
6626
6627 2001-12-12  Jason Merrill  <jason@redhat.com>
6628
6629         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
6630         * semantics.c (genrtl_start_function): Don't pass
6631         parms_have_cleanups or push an extra binding level.
6632         (genrtl_finish_function): Lose cleanup_label cruft.
6633
6634         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
6635         (ctor_label): Remove.
6636         * semantics.c (finish_return_stmt): Lose ctor_label support.
6637         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
6638         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
6639         dtor_label.
6640
6641         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
6642         check for [cd]tors.
6643         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
6644
6645         * decl.c (finish_function): Check VMS_TARGET, not VMS.
6646
6647         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
6648         (end_cleanup_fn): And poplevel.
6649
6650         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
6651         if we're in a template.
6652
6653 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
6654
6655         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
6656         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
6657         THIS_NAME_P): Delete.
6658         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
6659         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
6660         with internal naming scheme.
6661         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
6662
6663 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
6664
6665         * decl.c (grokdeclarator): Deprecated implicit typename use.
6666
6667 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
6668
6669         PR g++/51
6670         * parse.y (frob_specs): Indicate it is a language linkage which
6671         contained the extern.
6672         * decl.c (grokdeclarator): Allow extern language linkage with
6673         other specifiers.
6674
6675 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
6676
6677         PR g++/72
6678         * decl.c (add_binding): Don't reject duplicate typedefs involving
6679         template parameters.
6680
6681 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
6682
6683         * parse.y, semantics.c: Similarly.
6684
6685 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
6686
6687         PR g++/87
6688         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
6689         (copy_args_p): Rename to ...
6690         (copy_fn_p): ... here.
6691         (grok_special_member_properties): New function.
6692         (grok_op_properties): Lose VIRTUALP parameter.
6693         (copy_assignment_arg_p): Remove.
6694         * call.c (build_over_call): Use copy_fn_p.
6695         * decl.c (grokfndecl): Reformat. Adjust call to
6696         grok_op_properties.
6697         (copy_args_p): Rename to ...
6698         (copy_fn_p): ... here. Reject template functions. Check for pass
6699         by value.
6700         (grok_special_member_properties): Remember special functions.
6701         (grok_ctor_properties): Don't remember them here, just check.
6702         (grok_op_properties): Likewise.
6703         (start_method): Call grok_special_member_properties.
6704         * decl2.c (grokfield): Likewise.
6705         (copy_assignment_arg_p): Remove.
6706         (grok_function_init): Don't remember abstract assignment here.
6707         * pt.c (instantiate_class_template): Call
6708         grok_special_member_properties.
6709         (tsubst_decl): Adjust grok_op_properties call.
6710
6711 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
6712
6713         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
6714         RID_TYPES_COMPATIBLE_P.
6715
6716 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6717
6718         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
6719         call to build_aggr_init.
6720         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
6721
6722 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
6723
6724         * parse.y: Replace uses of the string non-terminal with STRING.
6725         Don't perform string concatentaion here.
6726         (string): Remove non-terminal.
6727         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
6728
6729 2001-12-05  Jason Merrill  <jason@redhat.com>
6730
6731         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
6732         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
6733         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
6734         * pt.c (push_tinst_level): No longer static.
6735         * cp-tree.h: Declare them.
6736
6737         * init.c (resolve_offset_ref): Don't check access for the base
6738         conversion to access a FIELD_DECL.
6739
6740         * cp-tree.h (TYPE_REFFN_P): New macro.
6741         * decl.c (bad_specifiers): Check it, too.
6742
6743         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
6744         on the __*_type_info type if we haven't seen a definition.
6745
6746 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
6747
6748         * decl.c: Include c-common.h.
6749         (shadow_warning): Move to c-common.c.
6750
6751 Wed Dec  5 17:00:49 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6752
6753         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
6754
6755 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
6756
6757         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
6758
6759 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
6760
6761         PR g++/164
6762         * init.c (sort_base_init): Allow binfos to be directly specified.
6763         * method.c (do_build_copy_constructor): Explicitly convert to the
6764         base instance.
6765         (do_build_assign_ref): Likewise.
6766
6767 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
6768
6769         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
6770         declaration and initialization.
6771
6772 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
6773
6774         * typeck2.c: Remove leading capital from diagnostic messages, as
6775         per GNU coding standards.
6776
6777 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
6778
6779         PR c++/3394
6780         * decl.c (xref_basetypes): Handle attributes between
6781         'class' and name.
6782
6783 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
6784
6785         PR g++/3381
6786         * parse.y (named_complex_class_head_sans_basetype): Add new
6787         reduction.
6788         * Make-lang.in (parse.c): Adjust expected conflict count.
6789
6790 2001-12-03  Jason Merrill  <jason@redhat.com>
6791
6792         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
6793         immediate binfos for our virtual bases.
6794
6795 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
6796
6797         * call.c (build_java_interface_fn_ref): Similarly.
6798         * except.c (is_admissible_throw_operand): Similarly.
6799         * init.c (build_java_class_ref): Similarly.
6800         * xref.c (open_xref_file): Similarly.
6801
6802 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
6803
6804         * class.c (finish_struct): Remove trailing periods from messages.
6805         * decl.c (check_tag_decl): Similarly.
6806         * lex.c (cxx_set_yydebug): Similarly.
6807         * typeck2.c (friendly_abort): Similarly.
6808
6809 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
6810
6811         PR c++/3048
6812         * cp-tree.h (ovl_member): Remove.
6813         * decl2.c (merge_functions): Handle extern "C" functions
6814         specially.
6815         * tree.c (ovl_member): Remove.
6816
6817 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
6818
6819         PR c++/4842
6820         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
6821         FUNCTION_DECL, as input.
6822         (mark_overriders): Remove.
6823         (warn_hidden): Rework for the new ABI.
6824
6825 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
6826
6827         PR c++/3471
6828         * call.c (convert_like_real): Do not build additional temporaries
6829         for rvalues of class type.
6830
6831 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
6832
6833         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
6834         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
6835         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
6836         (DERIVED_FROM_P): Likewise.
6837         (enum base_access): Renumber, add ba_quiet bit mask.
6838         (get_binfo): Remove.
6839         (get_base_distance): Remove.
6840         (binfo_value): Remove.
6841         (ACCESSIBLY_DERIVED_FROM_P): Remove.
6842         * call.c (standard_conversion): Use lookup_base.
6843         * class.c (strictly_overrides): Likewise.
6844         (layout_virtual_bases): Likewise.
6845         (warn_about_ambiguous_direct_bases): Likewise.
6846         (is_base_of_enclosing_class): Likewise.
6847         (add_vcall_offset_vtbl_entries_1): Likewise.
6848         * cvt.c (build_up_reference): Adjust comment.
6849         * init.c (build_member_call): Reformat.
6850         * search.c (get_binfo): Remove.
6851         (get_base_distance_recursive): Remove.
6852         (get_base_distance): Remove.
6853         (lookup_base_r): Tweak.
6854         (lookup_base): Add ba_quiet control. Complete the types here.
6855         (covariant_return_p): Use lookup_base.
6856         * tree.c (binfo_value): Remove.
6857         (maybe_dummy_object): Use lookup_base.
6858         * typeck.c (build_static_cast): Use lookup_base.
6859         (get_delta_difference): Likewise.
6860         * typeck2.c (binfo_or_else): Use lookup_base.
6861         (build_scoped_ref): Add back error_mark_check.
6862         (build_m_component_ref): Use lookup_base.
6863
6864 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
6865
6866         * Make-lang.in (c++.generated-manpages): New dummy target.
6867
6868 Tue Nov 27 09:03:47 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6869
6870         * Make-lang.in (cp-lang.o): Depends on c-common.h.
6871         * cp-lang.c (c-common.h): Include.
6872         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
6873         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
6874         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
6875
6876 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
6877
6878         * decl2.c (c_language): Move to c-common.c.
6879         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
6880         functions.
6881         (cxx_init): Update.
6882
6883 2001-11-26  Jason Merrill  <jason@redhat.com>
6884
6885         * call.c (joust): Remove COND_EXPR hack.
6886
6887 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
6888
6889         * search.c (lookup_base_r): Declare bk in variable declaration
6890         space.
6891
6892 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
6893
6894         PR g++/3145
6895         * class.c (build_vbase_pointer): Remove.
6896         (build_vbase_path): Remove.
6897         (build_base_path): New function.
6898         * cp-tree.h (base_access, base_kind): New enumerations.
6899         (build_base_path): Declare.
6900         (convert_pointer_to_real): Remove.
6901         (convert_pointer_to): Remove.
6902         (lookup_base): Declare.
6903         (convert_pointer_to_vbase): Remove.
6904         * call.c (build_scoped_method_call): Use lookup_base &
6905         build_base_path instead of convert_pointer_to_real,
6906         get_base_distance & get_binfo.
6907         (build_over_call): Likewise.
6908         * cvt.c (cp_convert_to_pointer): Likewise.
6909         (convert_to_pointer_force): Likewise.
6910         (build_up_reference): Likewise.
6911         (convert_pointer_to_real): Remove.
6912         (convert_pointer_to): Remove.
6913         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
6914         instead of convert_pointer_to_vbase & build_vbase_path.
6915         (emit_base_init): Use build_base_path instead of
6916         convert_pointer_to_real.
6917         (expand_virtual_init): Lose unrequired conversions.
6918         (resolve_offset_ref): Use lookup_base and build_base_path
6919         instead of convert_pointer_to.
6920         * rtti.c (build_dynamic_cast_1): Use lookup_base &
6921         build_base_path instead of get_base_distance & build_vbase_path.
6922         * search.c (get_vbase_1): Remove.
6923         (get_vbase): Remove.
6924         (convert_pointer_to_vbase): Remove.
6925         (lookup_base_r): New function.
6926         (lookup_base): New function.
6927         * typeck.c (require_complete_type): Use lookup_base &
6928         build_base_path instead of convert_pointer_to.
6929         (build_component_ref): Likewise.
6930         (build_x_function_call): Likewise.
6931         (get_member_function_from_ptrfunc): Likewise.
6932         (build_component_addr): Likewise.
6933         * typeck2.c (build_scoped_ref): Likewise.
6934
6935 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6936
6937         * cp-tree.h (CP_TYPE_QUALS): Removed.
6938         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
6939         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
6940         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
6941         * dump.c (cp_dump_tree): Use void* dump_info argument to match
6942         lang-hooks prototype.
6943         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
6944         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
6945         CP_TYPE_QUALS changed to cp_type_quals.
6946         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
6947         (CXX_C_OBJS): Remove c-dump.o.
6948
6949 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
6950
6951         PR c++/3637
6952         * pt.c (lookup_template_class): Ensure that all specializations
6953         are registered on the list corresponding to the most general
6954         template.
6955
6956 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
6957
6958         * call.c (non_reference): Add documentation.
6959         (convert_class_to_reference): Do not strip reference types
6960         from conversion operators.
6961         (maybe_handle_ref_bind): Simplify.
6962         (compare_ics): Correct handling of references.
6963
6964 2001-11-19  John Wilkinson <johnw@research.att.com>
6965
6966         * dump.c (dump_op): New function.
6967         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
6968         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
6969         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
6970
6971 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
6972
6973         PR4629
6974         * semantics.c (finish_sizeof): Make sure that expression created
6975         while processing a template do not have a type.
6976         (finish_alignof): Likewise.
6977         * typeck.c (c_sizeof): Likewise.
6978         (expr_sizeof): Likewise.
6979
6980 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
6981
6982         * lex.c (cxx_finish): Call c_common_finish.
6983         (finish_parse): Remove.
6984
6985 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6986
6987         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
6988         when displaying error message about missing array bounds.
6989
6990 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6991
6992         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
6993         CONST_CAST_EXPR.
6994         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
6995
6996 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
6997
6998         * cp-tree.h (print_class_statistics): Restore.
6999
7000 2001-11-15  Jason Merrill  <jason@redhat.com>
7001
7002         * method.c (use_thunk): Don't emit debugging information for thunks.
7003
7004         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
7005         * decl.c (make_typename_type): Handle getting a class template.
7006         * search.c (lookup_field_r): A class template is good enough for
7007         want_type.
7008
7009         * call.c (convert_like_real): Only use cp_convert for the bad part.
7010         (standard_conversion): Also allow bad int->enum.
7011         * typeck.c (ptr_reasonably_similar): Also allow functions to
7012         interconvert.  Pointers to same-size integers are reasonably
7013         similar.
7014
7015         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
7016         give it void type.
7017
7018 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
7019
7020         PR g++/3154
7021         * init.c (sort_base_init): Remove unreachable code.
7022         (expand_member_init): Adjust comment to reflect reality. Simplify
7023         and remove unreachable code.
7024
7025 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
7026
7027         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
7028         (cxx_init): Update prototype.
7029         * decl.c (init_decl_processing): Rename.  Move null node init
7030         to its creation time.
7031         * lex.c (cxx_init_options): Update.
7032         (cxx_init): Combine with old init_parse; also call
7033         cxx_init_decl_processing.
7034
7035 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
7036
7037         * decl.c (check_initializer): Try to complete the type of an
7038         array element before checking whether it's complete.  Don't
7039         complain about arrays with complete element types but an
7040         unknown size.
7041         (cp_finish_decl): Build the hierarchical constructor before
7042         calling maybe_deduce_size_from_array_init.
7043
7044 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
7045
7046         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
7047
7048 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
7049
7050         PR g++/4206
7051         * parse.y (already_scoped_stmt): Remove.
7052         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
7053
7054 2001-11-12  H.J. Lu <hjl@gnu.org>
7055
7056         * cvt.c (ocp_convert): Don't warn the address of a weak
7057         function is always `true'.
7058
7059 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
7060
7061         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
7062         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
7063         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
7064         * cp-tree.h (print_class_statistics): Remove.
7065         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
7066         cxx_print_identifier, cxx_set_yydebug): New.
7067         * lex.c (set_yydebug): Rename c_set_yydebug.
7068         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
7069         lang_print_xnode): Rename.
7070         * tree.c (print_lang_statistics): Rename.
7071
7072 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7073
7074         * class.c (dump_array): Fix format specifier warning.
7075
7076 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
7077
7078         * cp-lang.c (LANG_HOOKS_NAME): Override.
7079         (struct lang_hooks): Constify.
7080         * lex.c (cxx_init_options): Update.
7081         (lang_identify): Remove.
7082         * parse.y (language_string): Remove.
7083
7084 2001-11-08  Andreas Franck  <afranck@gmx.de>
7085
7086         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
7087         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
7088         suggested by autoconf.
7089         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
7090         (c++.install-common): Use the transformed target alias names.
7091
7092 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7093
7094         * Make-lang.in: Update.
7095         * cp-lang.c: Include langhooks-def.h.
7096
7097 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7098
7099         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
7100
7101 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7102
7103         * lex.c (copy_lang_type): Add static prototype.
7104
7105 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7106
7107         * pt.c (unify): Handle SCOPE_REF.
7108
7109 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
7110
7111         * tree.c (cp_copy_res_decl_for_inlining): Adjust
7112         DECL_ABSTRACT_ORIGIN for the return variable.
7113
7114 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
7115
7116         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
7117
7118 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
7119
7120         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
7121         semantics.c, spew.c: Fix spelling errors.
7122
7123 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7124
7125         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
7126
7127 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
7128
7129         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
7130         pop_everything.
7131
7132 Tue Oct 23 14:00:20 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7133
7134         * cp-lang.c (cxx_get_alias_set): New function.
7135         Point LANG_HOOKS_GET_ALIAS_SET to it.
7136
7137 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7138
7139         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
7140         * cp-tree.h (make_unbound_class_template): Prototype new function.
7141         * decl.c (make_unbound_class_template): New function.
7142         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
7143         * error.c (dump_type): Likewise.
7144         * mangle.c (write_type): Likewise.
7145         * parse.y (template_parm): Likewise.
7146         (template_argument): Use make_unbound_class_template.
7147         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
7148         (tsubst): Likewise.
7149         (tsubst_copy): Likewise.
7150         (unify): Likewise.
7151         * tree.c (walk_tree): Likewise.
7152         * typeck.c (comptypes): Likewise.
7153
7154 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7155
7156         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
7157         extra calls into fewer ones.
7158
7159 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
7160
7161         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
7162         Warn when merging inline with attribute noinline.
7163         (start_decl, start_function): Warn if inline and attribute
7164         noinline appear in the same declaration.
7165
7166 2001-10-16  H.J. Lu <hjl@gnu.org>
7167
7168         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
7169         for tree checking disabled.
7170
7171 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
7172
7173         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
7174         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
7175
7176 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
7177
7178         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
7179         (unify): Only handle MINUS_EXPR specially if the above flag is set
7180         and the subtracted constant is 1.  Clear the flag on recursive calls.
7181         Set it when unifying the maximum value in an INTEGER_TYPE's range.
7182
7183 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
7184
7185         * decl.c (bad_specifiers): Don't allow exception specifications
7186         on any typedefs.
7187
7188 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
7189
7190         * cp/lex.c (init_cp_pragma): Similarly.
7191
7192 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7193
7194         * pt.c (lookup_template_class): Build complete template arguments
7195         for BOUND_TEMPLATE_TEMPLATE_PARM.
7196
7197 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7198
7199         * cp-tree.h (TYPE_BINFO): Update comment.
7200         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
7201         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
7202         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
7203         (copy_type): Prototype new function.
7204         * lex.c (copy_lang_decl): Gather tree node statistics.
7205         (copy_lang_type): New function.
7206         (copy_type): Likewise.
7207         (cp_make_lang_type): Create lang_type for
7208         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
7209         and BOUND_TEMPLATE_TEMPLATE_PARM.
7210         * pt.c (tsubst): Use copy_type instead of copy_node.
7211         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
7212
7213 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7214
7215         * pt.c (determine_specialization): Ignore functions without
7216         DECL_TEMPLATE_INFO.
7217
7218 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
7219
7220         PR g++/4476
7221         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
7222
7223 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
7224
7225         * typeck2.c (store_init_value): Don't re-digest a bracketed
7226         initializer.
7227
7228         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
7229         ANON_AGGR_TYPE_P.
7230
7231 2001-10-11  Richard Henderson  <rth@redhat.com>
7232
7233         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
7234         of an asm statement.
7235         (build_vtbl_ref_1): Split out from build_vtbl_ref.
7236         (build_vfn_ref): Use it to handle vtable descriptors before
7237         calling build_vtable_entry_ref.
7238         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
7239
7240 2001-10-10  Richard Henderson  <rth@redhat.com>
7241
7242         * parse.y (asm_operand): Allow named operands.
7243         * semantics.c (finish_asm_stmt): Tweek for changed location
7244         of the operand constraint.
7245
7246 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
7247
7248         * call.c (standard_conversion): Add bad conversion between
7249         integers and pointers.
7250         (convert_like_real): Don't use convert_for_initialization for bad
7251         conversions; complain here and use cp_convert.
7252         (build_over_call): Don't handle bad conversions specially.
7253         (perform_implicit_conversion): Allow bad conversions.
7254         (can_convert_arg_bad): New fn.
7255         * cp-tree.h: Declare it.
7256         * typeck.c (convert_for_assignment): Use it.
7257         (ptr_reasonably_similar): Any target type is similar to void.
7258
7259 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
7260
7261         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
7262         (cp/cp-lang.o): New rule.
7263         * cp-tree.h: Declare hooks.
7264         * tree.c: Make hooks non-static.
7265         (init_tree): Don't initialize hooks here.
7266         * lex.c: Likewise.  Move definition of lang_hooks to...
7267         * cp-lang.c: ... new file.
7268
7269 2001-10-08  Richard Henderson  <rth@redhat.com>
7270
7271         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
7272         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
7273
7274 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7275
7276         * class.c (build_vtable_entry_ref): Const-ify.
7277         * decl.c (predefined_identifier,
7278         initialize_predefined_identifiers): Likewise.
7279         * init.c (build_new_1): Likewise.
7280         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
7281         Likewise.
7282
7283 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
7284
7285         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
7286         (INSNS_PER_STMT): Likewise.
7287         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
7288         (copy_body, initialize_inlined_parameters): Likewise.
7289         (declare_return_variable, inlinable_function_p): Likewise.
7290         (expand_call_inline, expand_calls_inline): Likewise.
7291         (optimize_inline_calls, clone_body): Likewise.
7292         * tree.c (walk_tree): Moved to ../tree-inline.c.
7293         (walk_tree_without_duplicates): Likewise.
7294         (copy_tree_r, remap_save_expr): Likewise.
7295
7296 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
7297
7298         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
7299         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
7300         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
7301         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
7302         (flag_inline_trees): Moved declaration to ../tree-inline.h.
7303         (walk_tree): Moved declaration to ../tree-inline.h.
7304         (walk_tree_without_duplicates, copy_tree_r): Likewise.
7305         (remap_save_expr): Likewise.
7306         * decl.c: Include tree-inline.h.
7307         (lang_mark_tree): Don't mark inlined_fns.
7308         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
7309         * optimize.c: Include tree-inline.h.
7310         (optimize_inline_calls): Move declaration to ../tree.h, as
7311         non-static.
7312         (remap_decl): Use language-independent constructs and hooks.
7313         (remap_block, copy_body_r, declare_return_variable): Likewise.
7314         (inlinable_function_p): Likewise.  Don't test for
7315         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
7316         no longer language-specific.
7317         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
7318         call of dump_function to...
7319         (optimize_function): Here...
7320         (clone_body): New function, extracted from...
7321         (maybe_clone_body): ... here.  Build decl_map locally and pass
7322         it on to clone_body.
7323         * pt.c, semantics.c: Include tree-inline.h.
7324         * tree.c: Likewise.
7325         (cp_walk_subtrees): New language-specific hook for tree inlining.
7326         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
7327         cp_is_overload_p, cp_auto_var_in_fn_p,
7328         cp_copy_res_decl_for_inlining): Likewise.
7329         (walk_tree): Move language-specific constructs into...
7330         (cp_walk_subtrees): this new function.
7331         (copy_tree_r): Use language-independent constructs and hooks.
7332         (init_tree): Initialize tree inlining hooks.
7333         (remap_save_expr): Adjust prototype so that the declaration
7334         does not require the definition of splay_tree.
7335
7336 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7337
7338         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
7339         to build the declaration instead of the declaration itself.
7340
7341 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
7342
7343         * decl2.c (cxx_decode_option): Add 'else'.
7344
7345         * spew.c (end_input): No longer static.
7346         * cp-tree.h: Declare it.
7347         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
7348
7349 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
7350
7351         * call.c (build_over_call), typeck.c (build_function_call_real):
7352         Pass type attributes to check_function_format rather than name or
7353         assembler name.  Don't require there to be a name or assembler
7354         name to check formats.
7355
7356 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
7357
7358         * decl.c (init_decl_processing): Don't call
7359         init_function_format_info.  Initialize lang_attribute_table
7360         earlier.
7361         (builtin_function): Call decl_attributes.
7362         (insert_default_attributes): New.
7363
7364 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
7365
7366         * decl.c (grokdeclarator): Copy array typedef handling from C
7367         frontend.
7368
7369         * decl.c (grokdeclarator): Copy too-large array handling from C
7370         frontend.
7371
7372 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
7373
7374         * config-lang.in (target_libs): Added target-gperf, so that we
7375         don't try to build it if C++ is disabled.
7376
7377 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
7378
7379         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
7380         (cp/errfn.o): Delete rule.
7381         (cp/error.o): Depend on flags.h.
7382         * errfn.c: Delete file.
7383         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
7384         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
7385         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
7386         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
7387         internal_error respectively.  Make cp_deprecated into a macro.
7388         Don't define cp_printer typedef or declare cp_printers.
7389         * error.c: Include flags.h.
7390         Delete: struct tree_formatting_info, print_function_argument_list,
7391         print_declaration, print_expression, print_function_declaration,
7392         print_function_parameter, print_type_id, print_cv_qualifier_seq,
7393         print_type_specifier_seq, print_simple_type_specifier,
7394         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
7395         print_parameter_declaration_clause, print_exception_specification,
7396         print_nested_name_specifier, and definition of cp_printers.
7397         (locate_error): New function.
7398         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
7399         rewritten in terms of locate_error and diagnostic.c.
7400         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
7401         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
7402         (init_error): Adjust to match.
7403
7404 Sat Sep 22 09:15:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7405
7406         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
7407
7408 2001-09-21  Richard Henderson  <rth@redhat.com>
7409
7410         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
7411         (build_vtbl_initializer): Likewise.
7412         (build_vfn_ref): New.
7413         * cp-tree.h: Declare it.
7414         * call.c (build_over_call): Use it.
7415         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
7416         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
7417
7418 Fri Sep 21 08:16:19 2001  J"orn Rennecke <amylaar@redhat.com>
7419
7420         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
7421
7422 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
7423
7424         Table-driven attributes.
7425         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
7426         * decl2.c (cplus_decl_attributes): Only take one attributes
7427         parameter.
7428         * cp-tree.c (cplus_decl_attributes): Update prototype.
7429         * class.c (finish_struct), decl.c (start_decl, start_function),
7430         decl2.c (grokfield), friend.c (do_friend), parse.y
7431         (parse_bitfield): Update calls to cplus_decl_attributes.
7432         * decl.c (grokdeclarator): Take a pointer to a single ordinary
7433         attribute list.
7434         * decl.h (grokdeclarator): Update prototype.
7435         * decl2.c (grokfield): Take a single ordinary attribute list.
7436         * friend.c (do_friend): Likewise.
7437         * decl.c (shadow_tag, groktypename, start_decl,
7438         start_handler_parms, grokdeclarator, grokparms, start_function,
7439         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
7440         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
7441         (process_template_parm, do_decl_instantiation): Pass single
7442         ordinary attribute lists around.
7443         * decl.c (grokdeclarator): Correct handling of nested attributes.
7444         Revert the patch
7445         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
7446                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
7447                 not the left.
7448         .
7449         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
7450         (cp_attribute_table): Declare.
7451         * decl.c (valid_lang_attribute): Don't define.
7452         (lang_attribute_table): Define.
7453         (init_decl_processing): Initialize lang_attribute_table instead of
7454         valid_lang_attribute.
7455         * tree.c (cp_valid_lang_attribute): Remove.
7456         (handle_java_interface_attribute, handle_com_interface_attribute,
7457         handle_init_priority_attribute): New functions.
7458         (cp_attribute_table): New array.
7459         * decl2.c (import_export_class): Don't use
7460         targetm.valid_type_attribute.
7461
7462 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7463
7464         * Make-lang.in (cp/error.o): Depend on real.h
7465         * error.c: #include "real.h"
7466
7467 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7468
7469         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
7470         xmalloc/strcpy/strcat.
7471
7472 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7473
7474         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
7475         Const-ification.
7476         * pt.c (tsubst_decl): Likewise.
7477
7478 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7479
7480         * decl2.c (lang_f_options): Const-ification.
7481         * lex.c (cplus_tree_code_name): Likewise.
7482         * spew.c (yyerror): Likewise.
7483
7484 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
7485
7486         PR c++/3986
7487         * class.c (force_canonical_binfo_r): Check & move an indirect
7488         primary base first.
7489         (force_canonical_binfo): Check that it's not already
7490         canonical.
7491         (mark_primary_virtual_base): Remove BINFO parameter.
7492         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
7493
7494 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
7495
7496         Remove TYPE_NONCOPIED_PARTS.
7497         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
7498         CLASSTYPE_PURE_VIRTUALS.
7499         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
7500         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
7501         (layout_class_type): Don't call fixup_inline_methods here ...
7502         (finish_struct_1): ... call it here.
7503
7504 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
7505
7506         * decl.c (duplicate_decls): Remove code deadling with
7507         DECL_SAVED_INSNS.
7508         * decl2.c (finish_file): Likewise.
7509         * pt.c (instantiate_decl): Likewise.
7510         * semantics.c (expand_body): Don't defer local functions if
7511         they wouldn't be deferred for some other reason.  Don't
7512         generate RTL for functions that will not be emitted.
7513         (genrtl_start_function): Remove code deadling with
7514         DECL_SAVED_INSNS.
7515         (genrtl_finish_function): Likewise.
7516
7517 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
7518
7519         PR c++/4203
7520         * call.c (build_over_call): Do not optimize any empty base
7521         construction.
7522
7523 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7524
7525         * error.c (dump_template_decl): Output template parameters
7526         together with their specifiers.
7527         Output `class' prefix for template template parameter.
7528         (dump_decl): Fix formatting.
7529
7530 2001-08-30  Kurt Garloff  <garloff@suse.de>
7531
7532         * optimize.c (inlinable_function_p): Allow only smaller single
7533         functions. Halve inline limit after reaching recursive limit.
7534
7535 2001-08-30  Joern Rennecke <amylaar@redhat.com>
7536             Jason Merrill  <jason_merrill@redhat.com>
7537
7538         * class.c (build_vtable_entry_ref): Subtract in char*, not
7539         ptrdiff_t.
7540
7541 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
7542
7543         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
7544         (build_cplus_array_type): Use cp_build_qualified_type, not
7545         TYPE_MAIN_VARIANT, to get an unqualified version.
7546
7547         * decl2.c (grok_alignof): Lose.
7548         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
7549         * typeck.c (c_alignof): Lose.
7550         * semantics.c (finish_sizeof, finish_alignof): New.
7551         * parse.y: Use them.
7552         * cp-tree.h: Declare them.
7553
7554 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
7555
7556         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
7557         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
7558         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
7559
7560 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
7561
7562         * typeck2.c (add_exception_specifier): Only require complete type if
7563         not in processing template declaration.
7564
7565 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7566
7567         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
7568         GNU_xref_start_scope and GNU_xref_end_scope.
7569
7570         * tree.c (TYPE_HASH): Moved to ../tree.h.
7571
7572 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
7573
7574         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
7575         on COMPOUND_EXPRs.
7576
7577 2001-08-14  Richard Henderson  <rth@redhat.com>
7578
7579         * class.c, cp-tree.h (build_vfn_ref): Remove.
7580         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
7581
7582 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
7583
7584         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
7585         empty class assignment as having side-effects to avoid
7586         spurious warnings.
7587
7588 2001-08-13  Zack Weinberg  <zackw@panix.com>
7589
7590         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
7591         * except.c: Include libfuncs.h.
7592
7593 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7594
7595         * decl.c (grokdeclarator): Clarify diagnostic message.
7596
7597 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7598
7599         * decl2.c (do_nonmember_using_decl): Replace using directive
7600         with using declaration in the error message.
7601
7602 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7603
7604         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
7605         criterion to avoid rebuilding expression tree instead of
7606         processing_template_decl.
7607
7608 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
7609
7610         Support named return value optimization for inlines, too.
7611         * decl.c (finish_function): Nullify returns here.
7612         * semantics.c (genrtl_start_function): Not here.
7613         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
7614         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
7615         Also nullify the CLEANUP_STMT for the nrv.
7616         * cp-tree.h: Declare it.
7617         * optimize.c (declare_return_variable): Replace the nrv with the
7618         return variable.
7619         * typeck.c (check_return_expr): Be more flexible on alignment check.
7620         Ignore cv-quals when checking for a matching type.
7621
7622 2001-08-09  Richard Henderson  <rth@redhat.com>
7623
7624         * decl2.c (finish_objects): Use target hooks instead of
7625         assemble_constructor and assemble_destructor.
7626
7627 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7628
7629         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
7630
7631 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
7632
7633         PR c++/3820
7634         Stop using TYPE_NONCOPIED_PARTS.
7635         * call.c (build_over_call): Be careful when copy constructing
7636         or assigning to an empty class.
7637         * class.c (check_bases_and_members): It has a
7638         COMPLEX_ASSIGN_REF if it has a vptr.
7639         (layout_class_type): Don't add empty class padding to
7640         TYPE_NONCOPIED_PARTS.
7641         (finish_struct_1): Don't add the VFIELD either.
7642         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
7643         initialization.
7644
7645 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
7646
7647         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
7648
7649 2001-08-06  Richard Henderson  <rth@redhat.com>
7650
7651         * decl2.c (finish_objects): Pass a symbol_ref and priority to
7652         assemble_{constructor,destructor}.  Remove priority handling.
7653
7654 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7655
7656         Don't allow template-id in using-declaration.
7657         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
7658         (do_class_using_decl): Likewise.
7659
7660 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7661
7662         * cp/spew.c (read_token): No need to pop buffers.
7663
7664 2001-08-02  Stan Shebs  <shebs@apple.com>
7665
7666         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
7667         (fnaddr_from_vtable_entry): Remove decl.
7668         * method.c (use_thunk): Update comment.
7669
7670 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
7671
7672         * repo.c (get_base_filename): Change return value to const char
7673         pointer.
7674
7675 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
7676
7677         Kill -fhonor-std.
7678         * NEWS: Document.
7679         * cp-tree.h (flag_honor_std): Remove.
7680         (CPTI_FAKE_STD): Remove.
7681         (std_node): Remove comment about it being NULL.
7682         (fake_std_node): Remove.
7683         * decl.c (in_fake_std): Remove.
7684         (walk_namespaces_r): Remove fake_std_node check.
7685         (push_namespace): Remove in_fake_std code.
7686         (pop_namespace): Likewise.
7687         (lookup_name_real): Remove fake_std_node check.
7688         (init_decl_processing): Always create std_node. Always add
7689         std:: things there.
7690         (builtin_function): Always put non '_' fns in std.
7691         * decl2.c (flag_honor_std): Remove.
7692         (lang_f_options): Remove honor-std.
7693         (unsupported_options): Add honor-std.
7694         (set_decl_namespace): Remove fake_std_node check.
7695         (validate_nonmember_using_decl): Likewise.
7696         (do_using_directive): Likewise.
7697         (handle_class_head): Likewise.
7698         * dump.c (cp_dump_tree): Likewise.
7699         * except.c (init_exception_processing): Adjust.
7700         * init.c (build_member_call): Remove fake_std_node check.
7701         (build_offset_ref): Likewise.
7702         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
7703         * rtti.c (init_rtti_processing): Adjust.
7704
7705 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
7706
7707         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
7708         operand while calling cp_tree_equal.
7709
7710 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
7711
7712         The 3.0 ABI no longer has vbase pointer fields.
7713         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
7714         FORMAT_VBASE_NAME): Remove.
7715         * method.c (do_build_copy_constructor): Adjust.
7716         (do_build_assign_ref): Adjust.
7717         * search.c (lookup_field_r): Adjust.
7718         * typeck.c (build_component_ref): Adjust.
7719
7720         The 3.0 ABI always has a vtable pointer at the start of every
7721         polymorphic class.
7722         * rtti.c (build_headof_sub): Remove.
7723         (build_headof): Adjust.
7724         (get_tinfo_decl_dynamic): No need to check flag_rtti
7725         here. Adjust.
7726         (create_real_tinfo_var): Explain why we need a hidden name.
7727
7728 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
7729
7730         PR c++/3631
7731         * class.c (update_vtable_entry_for_fn): The fixed adjustment
7732         of a virtual thunk should be from declaring base.
7733
7734 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
7735
7736         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
7737         the shared virtual base, so preserving inheritance graph order.
7738
7739 2001-07-30  Andreas Jaeger  <aj@suse.de>
7740
7741         * decl2.c: Remove unused var global_temp_name_counter.
7742
7743 2001-07-28  Richard Henderson  <rth@redhat.com>
7744
7745         * method.c (pending_inlines): Remove.
7746
7747 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
7748
7749         * class.c (mark_primary_virtual_base): Don't adjust base
7750         offsets here.
7751         (dfs_unshared_virtual_bases): Adjust them here.
7752         (mark_primary_bases): Explain why we adjust at the end.
7753
7754 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
7755
7756         * class.c (finish_struct_1): When copying the primary base's
7757         VFIELD, make sure we find it is at offset zero.
7758
7759 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7760
7761         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
7762         tsubst_expr for default template arguments.
7763
7764 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
7765
7766         PR c++/3621
7767         * spew.c (yylex): Only copy the token's lineno, if it is
7768         nonzero.
7769
7770 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
7771
7772         PR c++/3624
7773         * call.c (resolve_args): Simplify, call
7774         convert_from_reference.
7775         (build_new_op): Resolve and convert from reference ARG1
7776         earlier. Adjust ARG2 & ARG3 resolve and conversion.
7777
7778 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
7779
7780         * decl.c (last_function_parm_tags): Remove.
7781         (current_function_parm_tags): Remove.
7782         (init_decl_processing): Adjust.
7783         (start_function): Adjust.
7784         (store_parm_decls): Adjust.
7785
7786         PR c++/3152
7787         * decl.c (grokdeclarator): Detect when a function typedef is
7788         declaring a function, and create last_function_parms correctly.
7789
7790 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
7791
7792         * call.c (joust): Only prefer a non-builtin candidate to a builtin
7793         one if they have the same signature.
7794
7795         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
7796         it rather than toplevel_bindings_p.  Give it a mangled name if static.
7797         (convert_to_reference): Adjust.
7798         * decl2.c (get_temp_name): Lose.
7799         * mangle.c (mangle_ref_init_variable): New fn.
7800         (mangle_guard_variable): Strip the ref-init header.
7801         * cp-tree.h: Adjust.
7802         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
7803         initializer.
7804         (grok_reference_init): Always use DECL_INITIAL.
7805
7806 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7807
7808         PR c++/3416
7809         * call.c (build_conditional_expr): Recheck args after
7810         conversions.
7811         * cp-tree.h (build_conditional_expr): Move to correct file.
7812         * typeck.c (decay_conversion): Diagnose any unknown types
7813         reaching here.
7814         (build_binary_op): Don't do initial decay or default
7815         conversions on overloaded functions.
7816         (build_static_cast): Don't do a decay conversion here.
7817
7818 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7819
7820         PR c++/3543
7821         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
7822         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
7823
7824 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7825
7826         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
7827         (create_vtbl_ptr): ... here.
7828
7829 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7830
7831         * class.c (build_vbase_offset_vbtl_entries): Look for
7832         non-primary base of which we are a sub vtable.
7833
7834 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
7835
7836         * semantics.c (finish_this_expr):  Remove unused code.
7837
7838 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
7839
7840         Simplify rtti, now we've only one ABI.
7841         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
7842         CPTI_TINFO_VAR_ID.
7843         (tinfo_decl_id, tinfo_var_id): Remove.
7844         (get_typeid_1): Remove.
7845         * rtti.c
7846         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
7847         (typeid_ok_p): New function.
7848         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
7849         (get_tinfo_decl): Remove old abi documentation.
7850         (tinfo_from_decl): Remove.
7851         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
7852         (get_typeid_1): Remove.
7853         (get_base_offset): Remove.
7854         (synthesize_tinfo_var): Absorb get_base_offset.
7855         (create_real_tinfo_var): Don't use tinfo_decl_id.
7856
7857 2001-07-23  Graham Stott  <grahams@redhat.com>
7858
7859         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
7860         variable has_two_argument_delete_p.
7861
7862 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
7863
7864         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
7865         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
7866         (CPTI_INDEX_IDENTIFIER): Remove.
7867         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
7868         (delta2_identifier): Remove.
7869         (index_identifier): Remove.
7870         (pfn_or_delta2_identifier): Remove.
7871         (flag_vtable_thunks): Remove.
7872         (VTABLE_DELTA2_NAME): Remove.
7873         (VTABLE_INDEX_NAME): Remove.
7874         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
7875         (vfunc_ptr_type_node): Adjust.
7876         (VTABLE_NAME_PREFIX): Adjust.
7877         (build_vfn_ref): Lose first parameter.
7878         (fixup_all_virtual_upcast_offsets): Remove.
7879         * decl.c (initialize_predefined_identifiers): Remove
7880         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
7881         (init_decl_processing): Remove no-vtable-thunk code.
7882         * decl2.c (flag_vtable_thunks): Remove.
7883         (mark_vtable_entries): Remove no-vtable-thunk code.
7884         * error.c (dump_decl): Remove no-vtable-thunk code.
7885         (dump_expr): Adjust ptr to member function code.
7886         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
7887         code.
7888         * rtti.c (build_headof): Remove no-vtable-thunk code.
7889         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
7890         * search.c (get_base_distance): Remove expand_upcast_fixups case.
7891         (virtual_context) Remove.
7892         (expand_upcast_fixups): Remove.
7893         (fixup_virtual_upcast_offsets): Remove.
7894         (fixup_all_virtual_upcast_offsets): Remove.
7895         * typeck.c (get_member_function_from_ptrfunc): Remove
7896         no-vtable-thunk code.
7897         * call.c (build_over_call): Adjust call to build_vfn_ref.
7898         * class.c (build_vfn_ref): Lose first parameter. Remove
7899         no-vtable-thunk code.
7900         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
7901         (build_vtable_entry): Remove no-vtable-thunk code.
7902
7903 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
7904
7905         Remove old-abi remnants. Remove comments about old abi
7906         behavior. Remove references to 'new-abi' in comments.
7907         * cp-tree.h: Adjust comments.
7908         (vbase_offsets_in_vtable_p): Delete.
7909         (vcall_offsets_in_vtable_p): Delete.
7910         (vptrs_present_everywhere_p): Delete.
7911         (all_overridden_vfuns_in_vtables_p): Delete.
7912         (merge_primary_and_secondary_vtables_p): Delete.
7913         (TYPE_CONTAINS_VPTR_P): Adjust.
7914         (VTT_NAME_PREFIX): Remove.
7915         (CTOR_VTBL_NAME_PREFIX): Remove.
7916         (init_vbase_pointers): Remove.
7917         * class.c: Adjust coments.
7918         (build_vbase_pointer_fields): Delete.
7919         (build_vbase_pointer): Remove old-abi code.
7920         (build_secondary_vtable): Likewise.
7921         (modify_all_vtables): Likewise.
7922         (create_vtable_ptr): Likewise.
7923         (layout_class_type): Likewise.
7924         (finish_struct_1): Likewise.
7925         (finish_vtbls): Likewise.
7926         (dfs_finish_vtbls): Delete.
7927         (build_vbase_offset_vtbl_entries): Remove old-abi code.
7928         * cvt.c: Adjust comments.
7929         * decl.c: Adjust comments.
7930         * decl2.c: Adjust comments.
7931         * init.c: Adjust comments.
7932         (construct_virtual_bases): Remove old-abi code.
7933         * lang-specs.h: Remove -fno-new-abi.
7934         * mangle.c: Adjust comments.
7935         * rtti.c: Adjust comments.
7936         (get_base_offset): Remove old-abi-code.
7937         * search.c: Adjust comments.
7938         (dfs_init_vbase_pointers): Remove.
7939         (dfs_vtable_path_unmark): Remove.
7940         (init_vbase_pointers): Remove.
7941         * semantics.c: Adjust comments.
7942         (emit_associated_thunks): Remove old-abi code.
7943         * typeck.c: Adjust comments.
7944
7945 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
7946
7947         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
7948         params.h.
7949
7950 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
7951
7952         * class.c (finish_struct_anon): Forbid nested classes.
7953
7954 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
7955
7956         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
7957         * optimize.c: Include debug.h.
7958         (maybe_clone_body): Use debug hook.
7959         * semantics.c: Include debug.h.
7960         (expand_body): Use debug hook.
7961
7962 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
7963
7964         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
7965
7966 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
7967
7968         * class.c (type_requires_array_cookie): New function.
7969         (check_methods): Don't try to figure out whether the type needs a
7970         cookie here.
7971         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
7972         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
7973         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
7974         * pt.c (instantiate_class_template): Don't set
7975         TYPE_VEC_DELETE_TAKES_SIZE.
7976         * NEWS: Document ABI changes from GCC 3.0.
7977
7978 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
7979             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
7980
7981         * NEWS (Changes in GCC 3.0): Fix typo.
7982
7983 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
7984
7985         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
7986         which attributes are to be attached, and a flags argument.  Update
7987         call to decl_attributes.
7988         (grokfield): Update call to decl_attributes.
7989         * class.c (finish_struct): Update call to cplus_decl_attributes.
7990         * cp-tree.h (cplus_decl_attributes): Update prototype.
7991         * decl.c (start_decl, grokdeclarator, start_function): Update
7992         calls to decl_attributes and cplus_decl_attributes.
7993         * friend.c (do_friend): Update call to cplus_decl_attributes.
7994         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
7995
7996 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
7997
7998         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
7999         for `register' variables with an asm-specification.
8000
8001 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
8002
8003         * semantics.c (finish_asm_stmt): Mark the output operands
8004         to an asm addressable, if necessary.
8005
8006 2001-07-11  Ben Elliston  <bje@redhat.com>
8007
8008         * Revert this change -- there is a subtle bug.
8009
8010         PR c++/80
8011         * decl.c (finish_enum): New "attributes" argument; pass it to
8012         cplus_decl_attributes.  Use a narrower type if the enum is packed.
8013         * cp-tree.h (finish_enum): Adjust prototype.
8014         * parse.y (enum_head): New non-terminal.
8015         (structsp): Use it. Enums now may be preceded or followed by
8016         optional attributes -- pass their chained tree to finish_enum().
8017         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
8018
8019 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
8020
8021         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
8022         variables.
8023
8024 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
8025
8026         * semantics.c (cp_expand_stmt): Fix for null
8027         current_function_return_value.
8028
8029 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
8030
8031         * call.c (build_op_delete_call): Initialize fn.
8032         (convert_like_real): Delete conditional.
8033         (joust): Initialize *w and *l.
8034         * class.c: Add prototype for binfo_ctor_vtable.
8035         (get_primary_binfo): Initialize result.
8036         * init.c (build_java_class_ref): Initialize name.
8037
8038 2001-07-09  Erik Rozendaal  <dlr@acm.org>
8039
8040         * typeck.c (unary_complex_lvalue): Do not duplicate the
8041         argument to modify, pre-, or post-increment when used as an
8042         lvalue and when the argument has side-effects.
8043
8044 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
8045
8046         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
8047         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
8048         cplus_decl_attributes even if attrs is NULL.
8049         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
8050
8051 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
8052
8053         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
8054         calls to decl_attributes.
8055
8056 2001-07-06  Ira Ruben   <ira@apple.com>
8057
8058         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
8059         be DECL_TEMPLATE_RESULT.
8060
8061 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8062
8063         * cp-tree.h (copy_template_template_parm): Rename to ...
8064         (bind_template_template_parm): ... here.
8065         * tree.c (copy_template_template_parm): Rename to ...
8066         (bind_template_template_parm): ... here.  Remove the case when
8067         NEWARGS is NULL_TREE.
8068         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
8069         BOUND_TEMPLATE_TEMPLATE_PARM.
8070         * pt.c (lookup_template_class): Adjust.
8071
8072 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
8073
8074         * cvt.c (convert_lvalue): New fn.
8075         * cp-tree.h: Declare it.
8076         * method.c (do_build_assign_ref): Use it.
8077         (do_build_copy_constructor): Convert parm to base types
8078         before calling base constructors.
8079
8080         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
8081         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
8082         optimize.
8083         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
8084
8085 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
8086
8087         * optimize.c (optimize_inline_calls): New function, broken out
8088         of ...
8089         (optimize_function): ... here. Call it. Don't inline if it is
8090         a thunk.
8091         (dump_function): Print name of dump flag causing this dump.
8092         * semantics.c (expand_body): Move thunk inline check to
8093         optimize_function.
8094
8095 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8096
8097         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
8098         (comptypes): Use target.comp_type_attributes.
8099
8100 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
8101
8102         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
8103
8104 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8105
8106         * error.c (lang_print_error_function): Add a `diagnostic_context *'
8107         parameter. Tweak.
8108
8109 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8110
8111         * decl2.c (import_export_class): Update.
8112
8113 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
8114
8115         * error.c (init_error): Adjust settings.
8116
8117 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
8118
8119         * error.c (init_error): Adjust settings.
8120
8121 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
8122
8123         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
8124         return pointers to data members by reference rather than by value.
8125
8126 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
8127
8128         Implement the Named Return Value optimization.
8129         * cp-tree.h (struct cp_language_function): Add x_return_value.
8130         (current_function_return_value): Now a macro.
8131         * decl.c: Don't define it.
8132         (define_label, finish_case_label): Don't clear it.
8133         (init_decl_processing): Don't register it with GC.
8134         * semantics.c (genrtl_finish_function): Don't check it for
8135         no_return_label.  Copy the RTL from the return value to
8136         current_function_return_value and walk, calling...
8137         (nullify_returns_r): ...this new fn.
8138         * typeck.c (check_return_expr): Set current_function_return_value.
8139
8140 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
8141
8142         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
8143         sharing a ctor vtable with.  Merge code for cases 1 and 2.
8144         (binfo_ctor_vtable): New fn.
8145         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
8146
8147 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
8148
8149         * class.c (dfs_find_final_overrider): Fix logic.
8150
8151         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
8152         virtual thunk instead of non-virtual.
8153         (get_matching_virtual): Uncomment.
8154
8155         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
8156         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
8157         PARM, not ARG.
8158
8159 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
8160
8161         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
8162         we've not emerged from the hierarchy of RTTI_BINFO on reaching
8163         a non-virtual base.
8164
8165 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
8166
8167         * NEWS: Update release number.
8168
8169 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
8170
8171         PR c++/3130, c++/3131, c++/3132
8172         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
8173         * class.c (force_canonical_binfo_r): Move
8174         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
8175         virtual bases unless they're primary and what they're primary
8176         too has been moved.
8177         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
8178         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
8179         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
8180         derived binfo.
8181         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
8182         (layout_nonempty_base_or_field): Add most derived type
8183         parameter. Adjust.
8184         (layout_empty_base): Likewise.
8185         (build_base_field): Likewise.
8186         (build_base_fields): Likewise.
8187         (propagate_binfo_offsets): Add most derived type
8188         parameter. Skip non canonical virtual bases too.
8189         (dfs_set_offset_for_unshared_vbases): Don't skip primary
8190         bases. Do skip canonical bases.
8191         (layout_virtual_bases): Adjust.
8192         (layout_class_type): Adjust.
8193         (dfs_get_primary_binfo): Build list of virtual primary base
8194         candidates.
8195         (get_primary_binfo): Check that the shared virtual primary
8196         base candidate was found first.
8197         (accumulate_vtbl_inits): Don't do anything for non-vptr
8198         containing binfos. For case 1 primary virtual bases, keep
8199         checking that we've not emerged from the hierarchy of RTTI_BINFO.
8200
8201 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
8202
8203         PR c++/3089
8204         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
8205         hierarchy looking for primary bases for a ctor
8206         vtable. Recursively call oneself, if we meet our primary via
8207         this route and haven't met it yet via inheritance graph order.
8208
8209 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
8210
8211         * lang-options.h: Emit documentation for -fno-honor-std, not
8212         -fhonor-std.
8213
8214 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
8215
8216         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
8217         Don't clobber delta.
8218         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
8219
8220 2001-06-10  Mark Mitchell <mark@codesourcery.com>
8221             Gabriel Dos Reis  <gdr@codesourcery.com>
8222
8223         * Make-lang.in (cp/call.o): Depend on diagnostic.h
8224         (cp/typeck.o): Depend on diagnostic.h
8225         (cp/typeck2.o): Depend on diagnostic.h
8226         (cp/repo.o): Depend on dignostic.h
8227         * typeck.c: #include diagnostic.h
8228         (convert_for_initialization): Remove extern declaration for
8229         warningcount and errorcount.
8230
8231         * call.c: #include diagnostic.h
8232         (convert_like_real): Remove extern declaration for warnincount and
8233         errorcount.
8234
8235         * repo.c: #include diagnostic.h
8236         * typeck2.c: #include diagnostic.h
8237
8238 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8239
8240         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
8241         in previous change.
8242
8243 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8244
8245         PR c++/2929
8246         * friend.c (do_friend): Use push_decl_namespace for classes at
8247         namespace scope.
8248
8249 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8250             Jason Merrill <jason_merrill@redhat.com>
8251
8252         PR c++/3061
8253         * class.c (build_secondary_vtable): Use assert, rather than an error
8254         message.
8255         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
8256         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
8257         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
8258         Don't set BINFO_VTABLE for a primary virtual base.
8259
8260 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
8261
8262         * decl.c (duplicate_decls): Update source position information
8263         when a template function is defined.
8264
8265 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
8266
8267         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
8268
8269 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
8270
8271         PR c++/2914
8272         * decl.c (pushtag): Don't push into a complete type's scope.
8273
8274 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
8275
8276         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
8277         (struct lang_decl_flags): Lose generate_with_vtable_p.
8278         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
8279         * class.c (copy_virtuals): Adjust.
8280         * decl2.c (mark_vtable_entries): Adjust.
8281         * method.c (make_thunk, build_vtable_entry): Adjust.
8282         * class.c (update_vtable_entry_for_fn): Only look as far as the
8283         first defining class.
8284         (build_vtbl_initializer): Put nothing in the slot for a function only
8285         defined in a lost primary virtual base.
8286         (add_vcall_offset_vtbl_entries_1): Use the same code for
8287         the lost primary case and the normal case.
8288         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
8289         (get_vfield_offset, get_derived_offset): Lose.
8290         (dfs_find_final_overrider): Use look_for_overrides_here.
8291         (get_matching_virtual): New fn.
8292         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
8293         not BV_VCALL_INDEX.
8294         * search.c (look_for_overrides_here): Split out from...
8295         (look_for_overrides_r): Here.
8296
8297         * class.c (find_final_overrider): Return error_mark_node on error.
8298
8299         * decl2.c (key_method): #if 0 accidental change.
8300
8301 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8302
8303         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
8304         (build_over_call): Likewise.
8305         * decl.c (grokparms): Likewise.
8306         * pt.c (tsubst_decl): Likewise.
8307         * typeck.c (convert_arguments): Likewise.
8308
8309 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
8310
8311         * semantics.c (begin_class_definition): Robustify.
8312
8313         * pt.c (instantiate_decl): Tell the repository code about the
8314         clones, not the cloned functions.
8315         * repo.c (repo_template_used): Explicitly instantiate the cloned
8316         function, not the clones.
8317
8318 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8319
8320         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
8321         ICS_BAD_FLAG on created conversion.
8322         (compare_ics): Break out rank.
8323
8324 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8325
8326         * decl.c (xref_tag): Remove extraneous %s on dependent name
8327         lookup warning.
8328
8329 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8330
8331         * class.c (layout_vtable_decl): Fix off by one error on
8332         build_index_type.
8333         (build_vtt): Likewise.
8334         (build_ctor_vtbl_group): Likewise.
8335
8336 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8337
8338         * class.c (maybe_indent_hierarchy): New function.
8339         (dump_class_hierarchy_r): Add flags. Dump extra binfo
8340         information, if enabled. Use maybe_indent_hierarchy. Adjust
8341         output format.
8342         (dump_class_hierarchy): Adjust prototype. Adjust output format.
8343         (dump_array, dump_vtable, dump_vtt): New functions.
8344         (finish_struct_1): Adjust hierarchy dumping.
8345         (initialize_vtable): Call dump_vtable.
8346         (build_vtt): Call dump_vtt.
8347         (build_ctor_vtbl_group): Call dump_vtable.
8348         * decl2.c (flag_dump_class_layout): Remove.
8349         (cxx_decode_option): Remove dump translation unit
8350         and dump class hierarchy check. Call dump_switch_p.
8351         (finish_file): Adjust dumping.
8352         (dump.c): Only dump base classes if not TDF_SLIM.
8353         Only dump namespace members if not TDF_SLIM.
8354         * optimize.c (dump_function): New function.
8355         (optimize_function): Call dump_function.
8356         * semantics.c (expand_body): Use dump_enabled_p.
8357
8358 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
8359
8360         PR g++/2936
8361         Part missed from first commit
8362         * decl2.c (finish_anon_union): Copy context.
8363
8364 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
8365
8366         PR g++/2936
8367         * optimize.c (remap_decl): Remap anonymous aggregate members too.
8368
8369 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
8370
8371         PR g++/2823
8372         * semantics.c (expand_body): Don't optimize thunks.
8373
8374 2001-05-25  Sam TH  <sam@uchicago.edu>
8375
8376         * cp-tree.h lex.h: Fix header include guards.
8377
8378 2001-05-25  Mark Mitchell <mark@codesourcery.com>
8379
8380         * decl.c (init_decl_processing): Tweak.
8381
8382 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
8383
8384         * decl.c (duplicate_decls): Tidy.
8385         (init_decl_processing): Always set flag_no_builtin.
8386
8387 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
8388
8389         PR c++/2184
8390         * decl2.c (do_local_using_decl): Push the decls, even in a
8391         template.
8392
8393 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
8394
8395         * optimize.c (initialize_inlined_parameters): Don't set
8396         TREE_READONLY for a VAR_DECL taking the place of an inlined
8397         PARM_DECL.
8398
8399 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
8400
8401         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
8402         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
8403         attribute.
8404
8405 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
8406
8407         * parse.y: Refer to compound literals as such, not as
8408         constructor-expressions.
8409
8410 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
8411
8412         * call.c (build_op_delete_call): Ignore exception-specifications
8413         when looking for matching delete operators.
8414         * init.c (build_new_1): Compute whether or not the allocation
8415         function used is a placement allocation function or not, and
8416         communicate this information to build_op_delete_call.
8417
8418 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
8419
8420         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
8421         (build_vtbl_ref): Adjust.
8422         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
8423         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
8424         Re-add vtable-gc.
8425         (unsupported_options): Correspondingly.
8426
8427         * decl2.c (maybe_make_one_only): Check flag_weak, not
8428         supports_one_only().
8429
8430         * cp-tree.def (START_CATCH_STMT): Lose.
8431         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
8432         * tree.c (cp_statement_code_p): Don't case it.
8433         * semantics.c (cp_expand_stmt): Likewise.
8434         * cp-tree.h (START_CATCH_TYPE): Lose.
8435         (HANDLER_TYPE): New.
8436         * except.c (expand_start_catch_block): Don't start any blocks.
8437         Return the type.
8438         (expand_end_catch_block): Don't end any blocks.
8439         * parse.y (handler): Don't pass anything from finish_handler_parms
8440         to finish_handler.
8441         * pt.c (tsubst_expr): Likewise.
8442         * semantics.c (begin_handler): Call note_level_for_catch here.
8443         (finish_handler_parms): Don't return anything.
8444         (genrtl_catch_block, begin_catch_block): Lose.
8445         (genrtl_handler): Call expand_start_catch here.
8446
8447 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
8448
8449         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
8450         (get_vtable_decl, build_vtt): Not here.
8451
8452 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
8453
8454         PR c++/2781
8455         * optimize.c (update_cloned_parm): Copy addressability and other
8456         flags.
8457
8458 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8459
8460         * pt.c (determine_specialization): Ignore artificial functions.
8461
8462 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
8463
8464         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
8465         (C_RID_CODE): Remove.
8466         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
8467         (init_parse): Don't do it here.
8468
8469 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
8470
8471         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
8472         function declaration to avoid stripping the symbol's attributes.
8473
8474 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
8475
8476         * decl.c (pushdecl): Adjust error string.
8477         (xref_tag): Adjust friend class injection warning. Remove the
8478         inherited name from the class shadowed scope.
8479
8480 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
8481
8482         * except.c (cp_protect_cleanup_actions): New function.
8483         (init_exception_processing): Don't set protect_cleanup_actions
8484         here.  Do set lang_protect_cleanup_actions.
8485
8486 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
8487
8488         * spew.c (read_token): Call yyerror on all unexpected tokens.
8489
8490 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
8491
8492         * init.c (member_init_ok_or_else): Take a tree rather than
8493         string for name.
8494         (expand_member_init): Adjust.
8495
8496 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
8497
8498         * decl.c (duplicate_decls): Suppress warning about duplicate
8499         decls if the first decl is a friend.
8500
8501 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
8502
8503         * except.c (choose_personality_routine): Export.  Add
8504         explanatory comment.  Take an enum languages, not a boolean.
8505         (initialize_handler_parm): Adjust to match.
8506         * cp-tree.h: Prototype choose_personality_routine.
8507         * lex.c (handle_pragma_java_exceptions): New function.
8508         (init_cp_pragma): Register #pragma GCC java_exceptions.
8509
8510 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8511
8512         * method.c (build_mangled_C99_name): Remove unused prototype.
8513
8514 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
8515
8516         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
8517         * typeck.c (get_member_function_from_ptrfunc,
8518         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
8519         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
8520
8521         Reverted Geoff Keating's 2001-05-03's patch.
8522
8523 2001-05-11  Ira Ruben   <ira@apple.com>
8524
8525         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
8526
8527 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
8528
8529         * cp-tree.h (finish_label_expr, lookup_label): Delete.
8530         * parse.y: Update for '&&'; don't issue warning here.
8531         * semantics.c (finish_label_expr): Delete.
8532
8533 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
8534
8535         * splay-tree.h (splay_tree_max): New function.
8536         (splay_tree_min): Likewise.
8537
8538 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
8539
8540         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
8541         (pfn_vflag_identifier): Define.
8542         Update comment about layout of pointer functions.
8543         (build_ptrmemfunc1): Update prototype.
8544         (expand_ptrmemfunc_cst): Update prototype.
8545         * decl.c (initialize_predefined_identifiers): Initialize
8546         pfn_vflag_identifier.
8547         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
8548         an extra field to the type.
8549         * expr.c (cplus_expand_constant): Pass 'flag' between
8550         expand_ptrmemfunc_cst and build_ptrmemfunc1.
8551         * typeck.c (get_member_function_from_ptrfunc): When
8552         FUNCTION_BOUNDARY < 16, look at additional field to determine
8553         if a pointer-to-member is a real pointer or a vtable offset.
8554         (build_ptrmemfunc1): Add new parameter to contain extra field.
8555         (build_ptrmemfunc): Pass the extra field around.
8556         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
8557         (pfn_from_ptrmemfunc): Ignore the extra field.
8558
8559 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
8560
8561         * cp-tree.h (flag_inline_trees): Update documentation.
8562         * decl.c (init_decl_processing): Adjust handling of
8563         flag_inline_functions and flag_inline_trees to support -O3.
8564         (grokfndecl): Set DECL_INLINE on all functions if that's what
8565         the user requested.
8566         (save_function_data): Clear DECL_INLINE in
8567         current_function_cannot_inline is non-NULL.
8568         * decl2.c (flag_inline_trees): Update documentation.
8569
8570 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
8571
8572         * dump.c (cp_dump_tree, USING_STMT case): New case.
8573         * tree.c (cp_statement_code_p): Add USING_STMT.
8574         * decl2.c (do_using_directive): Add the using directive statement.
8575
8576         * tree.c (walk_tree): Reformat an if block.
8577
8578 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
8579
8580         * decl.c (compute_array_index_type): Don't try to do anything with
8581         the indices when processing a template.
8582
8583 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8584
8585         * call.c: NULL_PTR -> NULL.
8586         * class.c: Likewise.
8587         * cvt.c: Likewise.
8588         * decl.c: Likewise.
8589         * decl2.c: Likewise.
8590         * except.c: Likewise.
8591         * init.c: Likewise.
8592         * rtti.c: Likewise.
8593         * search.c: Likewise.
8594         * tree.c: Likewise.
8595         * typeck.c: Likewise.
8596         * typeck2.c: Likewise.
8597
8598 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
8599
8600         * decl2.c (do_using_directive): Revert previous patch.
8601
8602 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8603
8604         * cp-tree.def (USING_STMT): New statement node.
8605         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
8606         * decl2.c (do_using_directive): Add USING_STMT to statement
8607         tree. Don't emit errors when processing template decl.
8608         * pt.c (tsubst_expr, USING_STMT case): New case.
8609         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
8610
8611 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8612
8613         * call.c (build_new_op): Convert args from reference here.
8614         (build_conditional_expr): Don't convert here.
8615
8616 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8617
8618         * spew.c (last_token_id): New static variable.
8619         (read_token): Set it here.
8620         (yyerror): Use it here.
8621
8622 2001-04-30  Richard Henderson  <rth@redhat.com>
8623
8624         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
8625         * decl.c: Likewise.
8626
8627 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
8628
8629         * gxxint.texi: Remove.
8630         * Make-lang.in: Remove all traces of gxxint.texi.
8631
8632 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
8633
8634         * decl2.c (start_static_initialization_or_destruction): Correct
8635         logic to handle the -fno-use-cxa-atexit case.
8636
8637 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
8638
8639         * optimize.c (update_cloned_parm): New function.
8640         (maybe_clone_body): Use it.  Update the `this' parameter too.
8641
8642 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8643
8644         * decl2.c (unsupported_options): Add new-abi.
8645         * lang-options.h: Remove no longer supported options.
8646
8647 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
8648
8649         * except.c (can_convert_eh): Don't check template parms,
8650         typename types etc.
8651
8652 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
8653
8654         * optimize.c (maybe_clone_body): Copy parameter names and locations.
8655
8656 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
8657
8658         * cp-tree.h (adjust_clone_args): Prototype new function.
8659         * class.c (adjust_clone_args): New function.
8660         * decl.c (start_function): Call it for in charge ctors.
8661
8662 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
8663
8664         * method.c (use_thunk): Make sure that thunks really are emitted
8665         when requested.
8666
8667 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
8668
8669         * mangle.c (write_chars): New macro.
8670         (hwint_to_ascii): New function
8671         (write_number): Use it.
8672         (write_integer_cst): Deal with really big numbers.
8673
8674 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
8675
8676         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
8677         the clone.
8678
8679 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
8680
8681         * decl.c (grokdeclarator): Set context of namespace scope
8682         TYPE_DECLS.
8683
8684 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
8685
8686         * cp/optimize.c: Include hashtab.h.
8687         (struct inline_data): Add tree_pruner.
8688         (expand_call_inline, expand_calls_inline): Use it when calling
8689         walk_tree.
8690         (optimize_function): Initialize and free tree_pruner.
8691
8692 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
8693
8694         Lazy __FUNCTION__ generation.
8695         * cp-tree.def (FUNCTION_NAME): Remove.
8696         * cp-tree.h (function_name_declared_p): Remove.
8697         (cp_fname_init): Prototype.
8698         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
8699         don't call declare_function_name. Call start_fname_decls.
8700         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
8701         clobber the line number.
8702         (cp_fname_init): New function.
8703         (start_function): Call start_fname_decls.
8704         (finish_function): Call finish_fname_decls.
8705         * lex.c (reswords): Add slots for __FUNCTION__ et al.
8706         (rid_to_yy): Add mappings for __FUNCTION__ et al.
8707         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
8708         * parse.y (VAR_FUNC_NAME): New token.
8709         (primary): Add VAR_FUNC_NAME.
8710         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
8711         generation.
8712         (tsubst, FUNCTION_NAME case): Remove.
8713         (tsubst_copy, FUNCTION_NAME case): Remove.
8714         (tsubst_expr, DECL_STMT case): Be careful with a
8715         DECL_PRETTY_FUNCTION_P.
8716         (instantiate_decl): Remove function_name_declared_p.
8717         * semantics.c (begin_compound_statement): Don't call
8718         declare_function_name here.
8719         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
8720         (finish_translation_unit): Call finish_fname_decls.
8721         (expand_body): Remove function_name_declared_p.
8722         * typeck2.c (digest_init): Allow any ERROR_MARK.
8723
8724 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
8725
8726         * pt.c (tsubst_decl): Use VOID_TYPE_P.
8727         * semantics.c: Fix some typos.
8728
8729 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
8730
8731         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
8732
8733 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8734
8735         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
8736
8737 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
8738
8739         * except.c (build_throw): Wrap the initialization of the exception
8740         object in a MUST_NOT_THROW_EXPR.
8741         (do_free_exception): #if 0.
8742
8743 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
8744
8745         * cp-tree.h (finish_enum): Change prototype.
8746         * decl.c (finish_enum): Reorganize.
8747         * parse.y (structsp): Adjust calls to finish_enum.
8748
8749 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
8750
8751         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
8752         't' case.
8753
8754 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
8755
8756         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
8757         (layout_empty_base): Return at end flag.
8758         (build_base_field): Likewise.
8759         (build_base_fields): Likewise.
8760         (layout_virtual_bases): Don't add 1 to eoc value.
8761         (end_of_class): Use full size for empty bases.
8762         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
8763         empty bases. Don't add 1 to eoc value. Only add trailing padding
8764         if we're an empty class with no empty bases.
8765         (dump_class_hierarchy): Dump size and alignment.
8766
8767 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
8768
8769         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
8770         ICS_BAD_FLAG.
8771
8772 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
8773
8774         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
8775         is found, look first if name does not match the structure name.
8776
8777 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
8778
8779         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
8780         set.
8781         (SET_DECL_LANGUAGE): New macro.
8782         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
8783         (pushdecl): Likewise.
8784         (build_library_fn_1): Likewise.
8785         (build_cp_library_fn): Likewise.
8786         (grokfndecl): Likewise.
8787         (grokvardecl): Mark `extern "C"' variables as having C linkage.
8788         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
8789         * lex.c (retrofit_lang_decl): Likewise.
8790         * mangle.c (mangle_decl_string): Don't mangle the names of
8791         variables declared with C language linkage.
8792         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
8793
8794 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8795
8796         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
8797         flag_access_control from uninitialized storage.
8798
8799 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
8800
8801         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
8802         * mangle.c (write_pointer_to_member_type): Fix mangling of
8803         pointers to cv-qualified member function types.
8804
8805         * init.c (build_delete): Create a SAVE_EXPR for the address if
8806         we're going to use it more than once.
8807
8808 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
8809
8810         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
8811         (expand_ptremfunc_cst): Change prototype.
8812         (delta2_from_ptrmemfunc): Remove.
8813         * expr.c (cplus_expand_constant): Adjust call to
8814         expand_ptrmemfunc_cst.
8815         * typeck.c (build_ptrmemfunc1): Simplify.
8816         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
8817         results in a constant.
8818         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
8819         (delta2_from_ptrmemfunc): Remove.
8820         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
8821
8822 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
8823
8824         * cp-tree.h (decl_namespace_list): New macro.
8825         (struct saved_scope): Add decl_ns_list.
8826         * decl.c (mark_saved_scope): Mark it.
8827         * decl2.c: Lose static decl_namespace_list.
8828         (init_decl2): Don't save it.
8829
8830 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8831
8832         * cp-tree.h (warn_return_type, yylex): Delete redundant
8833         declarations.
8834
8835         * decl.c (current_class_depth, global_namespace): Likewise.
8836
8837         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
8838
8839         * repo.c (flag_use_repository): Likewise.
8840
8841 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8842
8843         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
8844         set_block, pushdecl, getdecls, gettags, init_decl_processing,
8845         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
8846         lvalue_or_else, print_lang_statistics, comp_target_types,
8847         unsigned_type, signed_type, signed_or_unsigned_type,
8848         build_function_call, mark_addressable, incomplete_type_error):
8849         Delete redundant declarations.
8850
8851 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
8852
8853         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
8854         (TYPE_ANONYMOUS_P): New macro.
8855         (TAGGED_TYPE_P): New macro.
8856         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
8857         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
8858         * tree.c (no_linkage_helper): Likewise.
8859         * semantics.c (begin_class_definition): Likewise.
8860         * pt.c (convert_template_argument): Likewise.
8861         * lex.c (check_for_missing_semicolon): Likewise.
8862
8863 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
8864
8865         * class.c (dfs_unshared_virtual_bases): New function.
8866         (mark_primary_bases): Call it.
8867         (check_bases): Ignore virtual bases when determining
8868         nearly-emptiness.
8869
8870 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
8871
8872         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
8873
8874 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
8875
8876         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
8877         cloned function to the clone.
8878
8879 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8880
8881         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
8882
8883         * semantics.c: Include expr.h.
8884
8885 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
8886
8887         * method.c (implicitly_declare_fn): Commonize code for copy ctor
8888         and assignment op. Set TREE_USED for parameter.
8889
8890 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
8891
8892         * class.c (find_final_overrider_data): Add `candidates'.
8893         (dfs_find_final_overrider): Don't issue error messages
8894         prematurely.
8895         (find_final_overrider): Issue error messages here.
8896         (build_base_field): Don't warn about amgibuous direct bases here.
8897         (warn_about_ambiguous_direct_bases): New function.
8898         (layout_class_type): Use it.
8899
8900 2001-04-10  Richard Henderson  <rth@redhat.com>
8901
8902         * typeck.c (build_array_ref): Push the array reference inside
8903         COMPOUND_EXPR and COND_EXPR.
8904
8905 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
8906
8907         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
8908         * decl.c (duplicate_decls): Adjust accordingly.
8909         (maybe_commonize_var): Likewise.
8910         (grokfndecl): Likewise.
8911         (start_function): Likewise.
8912         (start_method): Likewise.
8913         * decl2.c (key_method): Likewise.
8914         (import_export_decl): Likewise.
8915         * method.c (implicitly_declare_fn): Likewise.
8916         * optimize.c (maybe_clone_body): Likewise.
8917
8918 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
8919
8920         * lang-specs.h: Add __DEPRECATED.
8921
8922 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
8923
8924         * search.c (get_dynamic_cast_base_type): When building a new
8925         constant, set its type to ssizetype.
8926
8927 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
8928
8929         * optimize.c (expand_call_inline): Only add newly inlined statements
8930         into inlined_stmts.
8931
8932 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
8933
8934         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
8935         (OPERATOR_FORMAT): Likewise.
8936         (OPERATOR_TYPENAME_FORMAT): Likewise.
8937         * operators.def: Remove old name-mangling information.
8938         * decl.c (grok_op_properties): Adjust accordingly.
8939         * lex.c (init_operators): Likewise.
8940         * rtti.c (get_tinfo_decl): Issue error messages about types that
8941         have variable size.
8942
8943 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
8944
8945         * decl2.c (import_export_decl): Don't call import_export_class
8946         when processing an inline member function.
8947         * semantics.c (expand_body): Call import_export_decl before
8948         emitting inline functions.
8949
8950 2001-03-28  Richard Henderson  <rth@redhat.com>
8951
8952         IA-64 ABI Exception Handling:
8953         * cp-tree.def (EH_SPEC_BLOCK): New.
8954         (MUST_NOT_THROW_EXPR): New.
8955         * cp-tree.h: Update changed function declarations.
8956         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
8957         (CPTI_CALL_UNEXPECTED): New.
8958         (struct cp_language_function): Rename x_eh_spec_try_block
8959         to x_eh_spec_block.
8960         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
8961         * decl.c (current_binding_level): If no current function
8962         bindings, revert to scope_chain.
8963         (initialize_predefined_identifiers): Remove __cp_push_exception.
8964         (store_parm_decls): Use begin_eh_spec_block.
8965         (finish_function): Use finish_eh_spec_block.
8966         (mark_lang_function): Update for name changes.
8967         * decl2.c (finish_file): No mark_all_runtime_matches.
8968         * dump.c (cp_dump_tree): Handle new tree codes.
8969         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
8970         * except.c (catch_language_init, catch_language): Remove.
8971         (init_exception_processing): Don't set language code.
8972         Initialize call_unexpected_node, protect_cleanup_actions,
8973         eh_personality_libfunc, lang_eh_runtime_type.
8974         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
8975         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
8976         (prepare_eh_type): Split out type canonicalizations ...
8977         (build_eh_type_type): ... from here.
8978         (build_eh_type_type_ref): Remove.
8979         (mark_all_runtime_matches): Remove.
8980         (build_exc_ptr): New.
8981         (do_begin_catch, do_end_catch): New.
8982         (do_pop_exception): Remove.
8983         (build_terminate_handler): Remove.
8984         (choose_personality_routine): Split out language choice from ...
8985         (initialize_handler_parm): ... here.
8986         Use MUST_NOT_THROW_EXPR.
8987         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
8988         exception object handling.
8989         (expand_start_eh_spec, expand_end_eh_spec): Remove.
8990         (expand_exception_blocks, alloc_eh_object): Remove.
8991         (begin_eh_spec_block, finish_eh_spec_block): New.
8992         (do_allocate_exception, do_free_exception): New.
8993         (expand_throw): Merge into ...
8994         (build_throw): ... here.  Update for abi.
8995         * expr.c (cplus_expand_expr): No expand_internal_throw.
8996         Handle MUST_NOT_THROW_EXPR.
8997         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
8998         * semantics.c (*) Update for except.h name changes.
8999         (genrtl_try_block): No protect_with_terminate.
9000         (genrtl_eh_spec_block): New.
9001         (genrtl_handler): Don't emit the goto here.
9002         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
9003         (genrtl_finish_function): Don't expand_exception_blocks.
9004         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
9005
9006 2001-03-28  Richard Henderson  <rth@redhat.com>
9007
9008         * decl.c (struct named_label_list): Rename eh_region to
9009         in_try_scope, add in_catch_scope.
9010         (struct binding_level): Rename eh_region to is_try_scope,
9011         add is_catch_scope.
9012         (note_level_for_try): Rename from note_level_for_eh.
9013         (note_level_for_catch): New.
9014         (poplevel): Copy both is_try_scope and is_catch_scope to
9015         the named_label_list struct.
9016         (check_previous_goto_1): Don't check for catch block via
9017         DECL_ARTIFICIAL; use in_try_scope instead.
9018         (check_goto): Likewise.
9019         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
9020         * except.c (expand_start_catch_block): Call note_level_for_catch.
9021         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
9022
9023 2001-03-27  Richard Henderson  <rth@redhat.com>
9024
9025         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
9026         exceptions_via_longjmp.
9027
9028 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
9029
9030         * pt.c (check_default_tmpl_args):  Make error messages clearer.
9031
9032 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
9033
9034         * error.c:  Also undefine 'A' macro used for cp_printers definition.
9035
9036 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9037
9038         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
9039
9040 2001-03-26  Mike Yang <yang@research.att.com>
9041             Mark Mitchell  <mark@codesourcery.com>
9042
9043         * dump.c (dump_access): New function.
9044         (cp_dump_tree): Use it.  Dump basetype information for class
9045         types.
9046
9047 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
9048
9049         * Makefile.in (optimize.o): Depend on params.h.
9050         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
9051         (init_decl_processing): Set flag_no_inline when doing
9052         inlining-on-trees.
9053         * optimize.c: Include params.h.
9054         (struct inline_data): Improve documentation of FNS.  Add
9055         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
9056         (INSNS_PER_STMT): New macro.
9057         (remap_block): Use CLONING_P.
9058         (inlinable_function_p): Don't inline big functions.
9059         (expand_call_inline): Keep track of how much inlining we've done.
9060         (optimize_function): Set FIRST_INLINED_FN.
9061         (maybe_clone_body): Set CLONING_P.
9062         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
9063         tree nodes.
9064         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
9065         rest_of_compilation.  Clear DECL_RTL for local variables
9066         afterwards.
9067         (clear_decl_rtl): New function.
9068
9069 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
9070
9071         Implement DR 209
9072         * cp-tree.h (skip_type_access_control,
9073         reset_type_access_control): Prototype.
9074         * decl.c (grokdeclarator): Access of friends is not checked.
9075         * parse.y (component_decl_list): Reset type access control.
9076         * semantics.c (decl_type_access_control): Clear
9077         current_type_lookups.
9078         (save_type_access_control): Don't save if not deferring.
9079         (skip_type_access_control, reset_type_access_control): New
9080         functions.
9081         (begin_class_definition): Do type access control for basetypes.
9082         Start deferred access control.
9083         (finish_class_definition): Resume immediate access control if
9084         this is a local class.
9085
9086 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9087
9088         * class.c (add_method): Use memcpy/memmove, not bcopy.
9089
9090         * decl.c (duplicate_decls): Likewise.
9091
9092 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
9093
9094         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
9095         not `_'.
9096
9097 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
9098
9099         * decl.c (local_names): Define.
9100         (push_local_name): New.
9101         (grok_reference_init): Return init if initializing static reference
9102         variable with non-constant instead of emitting it.
9103         Move expand_static_init call to cp_finish_decl.
9104         (layout_var_decl): Call push_local_name.
9105         (maybe_commonize_var): Allow inlining functions even if they have
9106         static local variables, use comdat_linkage for them if flag_weak.
9107         (check_initializer): Call obscure_complex_init if
9108         grok_reference_init returned nonzero.
9109         (save_function_data): Clear x_local_names.
9110         (pop_cp_function_context): Free x_local_names.
9111         (mark_inlined_fns): Remove.
9112         (mark_lang_function): Mark x_local_names.
9113         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
9114         Mark inlined_fns as tree, remove call to mark_inlined_fns.
9115         * class.c (alter_access): Ensure DECL_ACCESS is never set if
9116         DECL_DISCRIMINATOR_P.
9117         * cp-tree.h (cp_language_function): Add x_local_names.
9118         (lang_decl_flags): Add discriminator into u2.
9119         (lang_decl_inlined_fns): Remove.
9120         (lang_decl): inlined_fns is now a TREE_VEC.
9121         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
9122         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
9123         TREE_VEC, not a custom structure.
9124         (optimize_function): Likewise.
9125         * mangle.c (discriminator_for_local_entity): Discriminate among
9126         VAR_DECL local entities.
9127         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
9128         is not valid.
9129
9130 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
9131
9132         Add support for Java interface method calls.
9133         * cp-tree.h (struct lang_type): Add java_interface flag.
9134         (TYPE_JAVA_INTERFACE): New macro.
9135         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
9136         by setting TYPE_JAVA_INTERFACE.
9137         * call.c (java_iface_lookup_fn): New static.
9138         (build_over_call): If calling a method declared in a
9139         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
9140         expression which resolves the function address.
9141         (build_java_interface_fn_ref): New function.
9142
9143 2001-03-22  Richard Henderson  <rth@redhat.com>
9144
9145         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
9146         * except.c: Don't include it.
9147
9148 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
9149             based on an idea from Joe Buck <jbuck@synopsys.com>
9150
9151         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
9152         New nonterminals.
9153         (data_def, component_decl): Add reductions to bad_decl.
9154
9155 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
9156
9157         * method.c (do_build_assign_ref): Don't use build_modify_expr for
9158         anonymous aggregates, since they don't have assignment operator
9159         method.
9160         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
9161         assignment operators for anonymous structure fields.
9162
9163 2001-03-21  Jason Merrill  <jason@redhat.com>
9164
9165         * pt.c (instantiate_decl): Abort if we see a member constant
9166         instantiation that doesn't already have its initializer.
9167         Downgrade explicit instantiation without definition to pedwarn.
9168
9169         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
9170         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
9171         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
9172
9173         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
9174         (pending_vtables): Remove.
9175         * decl2.c (pending_vtables): Remove.
9176         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
9177         CLASSTYPE_VTABLE_NEEDS_WRITING.
9178         (import_export_class): Likewise.
9179         (init_decl2): Don't mark pending_vtables.
9180         * lex.c (handle_pragma_vtable): Just sorry.
9181         * pt.c (instantiate_class_template): Don't mess with
9182         CLASSTYPE_VTABLE_NEEDS_WRITING.
9183         (mark_class_instantiated): Likewise.
9184         * ptree.c (print_lang_type): Don't print it.
9185         * semantics.c (begin_class_definition): Don't set it.
9186
9187         * pt.c (template_tail): Replace with last_pending_template.
9188         (maybe_templates, maybe_template_tail): Remove.
9189         (add_pending_template): Adjust.
9190         (instantiate_pending_templates): Adjust.
9191
9192         * cp-tree.h (struct saved_scope): Remove lang_stack field.
9193         (current_lang_stack): Remove.
9194         * decl.c (maybe_push_to_top_level): Don't initialize it.
9195         (duplicate_decls): Use current_lang_depth.
9196         (xref_basetypes): Likewise.
9197         * class.c (current_lang_depth): New fn.
9198         (push_lang_context): Use more varray functionality.
9199         (pop_lang_context): Likewise.
9200
9201         * error.c (GLOBAL_THING): Always use '__'.
9202
9203 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
9204
9205         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
9206
9207         * mangle.c (mangle_decl_string): Mangle the names of overloaded
9208         operators, even when they have `extern "C"' linkage.
9209
9210 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
9211
9212         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
9213         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9214         where it's not necessary.
9215         (add_method): Remove optimization involving comparison of
9216         DECL_ASSEMBLER_NAME.
9217         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
9218         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9219         where it's not necessary.
9220         (check_methods): Likewise.
9221         (build_clone): Likewise.
9222         (built_vtt): Likewise.
9223         * cp-tree.h (DECL_NEEDED_P): Likewise.
9224         * decl.c (pushtag): Likewise.
9225         (duplicate_decls): Likewise.
9226         (pushdecl): Likewise.
9227         (builtin_function): Likewise.
9228         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
9229         (build_cp_library_fn): Likewise.
9230         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
9231         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9232         where it's not necessary.
9233         (make_rtl_for_nonlocal_decl): Likewise.
9234         (cp_finish_decl): Likewise.
9235         (grokfndecl): Likewise.
9236         (grokvardecl): Likewise.
9237         (grokdeclarator): Likewise.
9238         (start_function): Likewise.
9239         (cp_missing_return_ok_p): Likewise.
9240         * decl2.c (grokclassfn): Likewise.
9241         (check_classfn): Likewise.
9242         (finish_static_data_member_decl): Likewise.
9243         (grokfield): Likewise.
9244         * error.c (GLOBAL_IORD_P): Remove.
9245         (dump_global_iord): Improve output.
9246         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
9247         * except.c (nothrow_libfn_p): Summarily reject any function not in
9248         namespace-scope.
9249         * init.c (build_java_class_ref): Don't explicitly set
9250         DECL_ASSEMBLER_NAME after calling mangle_decl.
9251         * mangle.c (mangle_decl_string): Handle extern "C" functions.
9252         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
9253         * method.c (set_mangled_name_for_decl): Don't explicitly set
9254         DECL_ASSEMBLER_NAME after calling mangle_decl.
9255         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
9256         IDENTIFIER_GLOBAL_VALUE for the thunk.
9257         * pt.c (set_mangled_name_for_template_decl): Remove.
9258         (check_explicit_specialization): Don't use it.
9259         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
9260         (tsubst_friend_function): Likewise.
9261         (tsubst_decl): Likewise.
9262         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
9263         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
9264         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9265         where it's not necessary.
9266         (tinfo_base_init): Likewise.
9267         (create_real_tinfo_var): Likewise.
9268         * search.c (looup_field_1): Likewise.
9269         * semantics.c (finish_named_return_value): Likewise.
9270         * tree.c (init_tree): Set lang_set_decl_assembler_name.
9271
9272 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
9273
9274         Correct semantics restrictions checking in throw-expression.
9275         * except.c (is_admissible_throw_operand): New function.
9276         (build_throw): Use it.
9277
9278 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
9279
9280         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
9281         and its ilk.
9282
9283 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
9284
9285         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9286         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
9287         * decl.c (duplicate_decls): Likewise.
9288         (builtin_function): Likewise.
9289         (build_library_fn): Likewise.
9290         (build_cp_library_fn): Likewise.
9291         (check_initializer): Likewise.
9292         (cp_finish_decl): Likewise.
9293         * decl2.c (grokfield): Likewise.
9294         (grok_function_init): Remove #if 0'd code.
9295         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9296         * friend.c (do_friend): Likewise.
9297         * init.c (get_temp_regvar): Likewise.
9298         * method.c (make_thunk): Likewise.
9299         * pt.c (tsubst_friend_function): Likewise.
9300         (tsubst_decl): Likewise.
9301         (regenerate_decl_from_template): Likewise.
9302         * semantics.c (genrtl_named_return_value): Likewise.
9303         (expand_body): Likewise.
9304         (genrtl_finish_function): Likewise.
9305         * tree.c (cp_tree_equal): Likewise.
9306
9307 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
9308
9309         * call.c (convert_like_real): Add extra semantics to INNER
9310         parameter. Don't convert to temporary if a user conversion
9311         gives us an lvalue that we're about to bind to a reference.
9312         Set INNER to indicate pending reference binding on recursive
9313         calls.
9314
9315 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
9316
9317         * cp/lex.c: Delete duplicate pending_lang_change.
9318
9319 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
9320
9321         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
9322         Similarly.
9323         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
9324         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
9325
9326 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
9327
9328         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
9329
9330 2001-03-08  Stan Shebs  <shebs@apple.com>
9331
9332         * cp-tree.h (set_identifier_local_value): Remove unused decl.
9333
9334 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
9335
9336         * spew.c: Remove references to CPP_OSTRING.
9337
9338 2001-03-06  Andrew Haley  <aph@redhat.com>
9339
9340         * typeck.c (convert_arguments): Check that we have an fndecl.
9341
9342 2001-03-05  Andrew Haley  <aph@redhat.com>
9343
9344         * typeck.c (convert_arguments): Don't do ellipsis conversion for
9345         __built_in_constant_p.
9346
9347 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9348
9349         * typeck.c (build_static_cast): Allow enum to enum conversions
9350         as per DR 128.
9351
9352 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9353
9354         * class.c (check_field_decls): Pointers to member do not a
9355         non-pod struct make, as per DR 148.
9356
9357 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9358
9359         * call.c (joust): cp_pedwarn when using gnu extension concerning
9360         worst conversion sequences.
9361
9362 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9363
9364         * decl.c: Replace all uses of 'boolean' with 'bool'.
9365
9366 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9367
9368         * lang-specs.h: Add zero initializer for cpp_spec field to
9369         all array elements that need one.  Don't put an #ifdef inside
9370         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
9371         use it.
9372
9373 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
9374
9375         Implement using decls inside template functions.
9376         * decl2.c (validate_nonmember_using_decl): Don't special case
9377         fake_std_node in the global namespace. Don't reject early when
9378         processing a template.
9379         (do_local_using_decl): Add to statement tree. Don't do further
9380         processing when building a template.
9381         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
9382
9383 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
9384
9385         * decl2.c (do_nonmember_using_decl): Don't complain if we find
9386         same function. Do complain about ambiguating extern "C"
9387         declarations.
9388
9389 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
9390
9391         Remove floating point and complex type template constant parms.
9392         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
9393         COMPLEX_TYPE extensions.
9394         (invalid_nontype_parm_type_p): Likewise.
9395
9396 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
9397
9398         * except.c (call_eh_info): Revert "match_function"'s type.
9399
9400 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
9401
9402         Fix ctor vtable vcall offsets.
9403         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
9404         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
9405         (get_matching_base): Remove.
9406         (get_original_base): New function.
9407         (build_vtbl_initializer): Initialize vid.rtti_binfo.
9408         Use a virtual thunk for a ctor vtable with an index
9409         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
9410         primary base within a constructor vtable. Only set
9411         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
9412         when primary base has been lost.
9413         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
9414
9415 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
9416
9417         * call.c (joust): Ensure more_specialized()'s argument length
9418         parameter has correct value for constructors.
9419
9420 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
9421
9422         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
9423
9424         * decl.c (mark_inlined_fns): Prototype.
9425
9426 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
9427
9428         * spew.c (yylex): Correct handling of friends.
9429
9430 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
9431
9432         * mangle.c (write_encoding): Pass write_function_type the
9433         FUNCTION_DECL for the function being encoded.
9434         (write_function_type): Pass it along to write_bare_function_type.
9435         (write_bare_function_type): Pass it along to write_method_parms.
9436         (write_method_parms): Don't mangle the compiler-generated
9437         parameters to a constructor or destructor.
9438
9439 2001-02-22  Andreas Jaeger  <aj@suse.de>
9440
9441         * optimize.c: Include toplev.h for
9442         note_deferral_of_defined_inline_function prototype.
9443
9444 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
9445
9446         * cp-tree.h (struct lang_decl_inlined_fns): New.
9447         (struct lang_decls): Add inlined_fns.
9448         (DECL_INLINED_FNS): New macro.
9449         * optimize.c (struct inline_data): Add inlined_fns.
9450         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
9451         (inlinable_function_p): Likewise, fix typo in comment,
9452         function is not inlinable if it already inlined function currently
9453         being optimized.
9454         (expand_call_inline): Add fn to inlined_fns if necessary.
9455         (optimize_function): Initialize inlined_fns.
9456         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
9457         * decl.c (mark_inlined_fns): New function.
9458         (lang_mark_tree): Call it.
9459
9460 2001-02-21  Jason Merrill  <jason@redhat.com>
9461
9462         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
9463         (DECL_UNINLINABLE): Move to middle-end.
9464
9465         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
9466         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
9467         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
9468         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
9469         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
9470
9471         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
9472         second parm of op=.
9473
9474 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
9475
9476         * decl2.c (set_decl_namespace): Allow explicit instantiations in
9477         any namespace.
9478
9479 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9480
9481         * optimize.c (expand_call_inline): Don't walk subtrees of type
9482         nodes.
9483
9484 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
9485
9486         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
9487         for a destructor.
9488
9489 2001-02-18  Jason Merrill  <jason@redhat.com>
9490
9491         Do put the VTT parameter in DECL_ARGUMENTS.
9492         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
9493         (current_vtt_parm): New macro.
9494         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
9495         (DECL_HAS_VTT_PARM_P): New macro.
9496         (DECL_VTT_PARM): Remove.
9497         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
9498         * decl.c (duplicate_decls): Only copy the operator code if
9499         appropriate.
9500         (start_function): Set current_vtt_parm.
9501         (lang_mark_tree): Don't mark vtt_parm.
9502         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
9503         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
9504         * class.c (build_clone): Maybe remove the VTT parm.
9505         * optimize.c (maybe_clone_body): Set up the VTT parm.
9506         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
9507         * call.c (build_over_call): Just allow the VTT arg.
9508         * method.c (make_thunk): Don't set DECL_VTT_PARM.
9509         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
9510         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
9511         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
9512         * error.c (dump_function_decl): Likewise.
9513         * call.c (build_user_type_conversion_1, convert_like_real): Abort
9514         if we try to call a constructor with in-charge or VTT parms.
9515         * method.c (skip_artificial_parms_for): New fn.
9516         * call.c (add_function_candidate, build_over_call): Call it.
9517         * call.c (build_new_method_call): Use current_vtt_parm.
9518         * init.c (expand_virtual_init): Likewise.
9519         * class.c (same_signature_p): No longer static.
9520         * cp-tree.h: Declare it.
9521         * search.c (look_for_overrides_r): Use it.
9522
9523 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
9524
9525         * cp-tree.h (new_abi_rtti_p): Remove.
9526         (name_mangling_version): Likewise.
9527         (flag_do_squangling): Likewise.
9528         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
9529         * decl.c (grokfndecl): Likewise.
9530         * decl2.c (name_mangling_version): Remove.
9531         (flag_do_squangling): Likewise.
9532         (lang_f_options): Remove `squangle'.
9533         (unsupported_options): Add `squangle'.
9534         (cxx_decode_option): Issue a warning about uses of
9535         -fname-mangling-version.
9536         (finish_file): Remove old ABI support.
9537         * pt.c (check_explicit_specialization): Likewise.
9538         (tsubst_decl): Likewise.
9539         * rtti.c (init_rtti_processing): Likewise.
9540         (build_headof): Likewise.
9541         (get_tinfo_decl_dynamic): Likewise.
9542         (tinfo_from_decl): Likewise.
9543         (build_dynamic_cast_1): Likewise.
9544         (synthesize_tinfo_var): Likewise.
9545         * init.c (build_new): Allow enumeration types for the array-bounds
9546         in a direct-new-declarator.
9547
9548         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
9549
9550         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
9551         TREE_PROTECTED from the template being specialized.
9552
9553 2001-02-17  Jason Merrill  <jason@redhat.com>
9554
9555         * decl2.c (build_artificial_parm): Set TREE_READONLY.
9556
9557         * decl.c (bad_specifiers): Allow throw specs on things with
9558         pointer-to-function or -member-function type.
9559         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
9560         a pmf.
9561
9562 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
9563
9564         * call.c (check_dtor_name): Handle template names correctly.
9565
9566 2001-02-16  Jason Merrill  <jason@redhat.com>
9567
9568         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
9569         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
9570         * optimize.c (maybe_clone_body): Don't substitute it.
9571         * call.c (build_new_method_call): Check in_chrg instead.
9572         * init.c (expand_virtual_init): Likewise.
9573
9574 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
9575
9576         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
9577         class-type introduces at least a type-name.
9578
9579 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
9580
9581         * call.c (convert_like_real): Create a temporary for non-lvalue.
9582
9583 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
9584
9585         * cp-tree.h: Fix typos in comments.
9586
9587 2001-02-16  Jason Merrill  <jason@redhat.com>
9588
9589         * optimize.c (remap_block): If we're compiling a clone, pass the
9590         new block to insert_block.
9591
9592 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
9593
9594         * semantics.c (finish_asm_stmt): Robustify.
9595
9596 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
9597
9598         * pt.c (push_template_decl_real): Don't remangle the name of a
9599         class template.
9600
9601 2001-02-15  Jim Meyering  <meyering@lucent.com>
9602
9603         * Make-lang.in (c++.install-common): Depend on installdirs.
9604         (c++.install-info): Likewise.
9605         (c++.install-man): Likewise.
9606
9607 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
9608
9609         * typeck2.c (build_m_component_ref): Robustify.
9610
9611 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
9612
9613         * friend.c (do_friend): Don't take the nested [template] class
9614         into account when deciding whether to warn about the friend
9615         function not referring to a template function.
9616
9617 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
9618
9619         * typeck.c (build_unary_op): Clarify error message.
9620
9621 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
9622
9623         * parse.y (component_constructor_declarator): allow optional
9624         parentheses around constructor class name.
9625
9626 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9627
9628         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
9629         section.
9630         * init.c (emit_base_init): Remove incorrect comment about
9631         virtual bases.
9632         * method.c (make_thunk): Fix comment alignment.
9633
9634 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9635
9636         Kill remnants of this is variable.
9637         * cp-tree.h (flag_this_is_variable): Remove.
9638         * decl2.c (flag_this_is_variable): Remove.
9639         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
9640         (build_vbase_path): The path is non-static, even in a cdtor.
9641         (resolves_to_fixed_type_p): Add additional return value.
9642         * search.c (init_vbase_pointers): Adjust.
9643         * tree.c (lvalue_p_1): Adjust.
9644         * typeck.c (mark_addressable): Adjust.
9645
9646 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9647
9648         * pt.c (unify): Don't check cv quals of array types.
9649
9650 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9651
9652         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
9653         check whether we already have the type.
9654
9655 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
9656
9657         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
9658         * call.c (build_op_delete_call): Simplify to remove duplicate
9659         code.
9660         * class.c (clone_function_decl): Don't build the deleting variant
9661         of a non-virtual destructor.
9662         * decl.c (finish_destructor_body): Don't call delete if this is a
9663         non-virtual destructor.
9664         * init.c (build_delete): Explicitly call `operator delete' when
9665         deleting an object with a non-virtual destructor.
9666
9667 2001-02-13  Jason Merrill  <jason@redhat.com>
9668
9669         * lang-specs.h: Add more __EXCEPTIONS.
9670
9671 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
9672
9673         * typeck2.c (process_init_constructor): Check
9674         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
9675
9676 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
9677
9678         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
9679         Remove spurious information in comment. Allow further
9680         adjustments of REFERENCE_TYPE args.
9681
9682 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
9683
9684         * errfn.c (cp_deprecated): Tweak diagnostic text.
9685         * parse.y (new_initializer): Deprecate initializer lists
9686         extension.
9687
9688 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
9689
9690         Remove old ABI support.
9691
9692 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
9693
9694         * decl2.c (flag_vtable_thunks): Always set it to 1.
9695         (flag_new_abi): Likewise.
9696         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
9697
9698         * Makefile.in (g++spec.o): Fix typo.
9699
9700 2001-02-09  Jason Merrill  <jason@redhat.com>
9701
9702         * lang-specs.h: Restore definition of __EXCEPTIONS.
9703
9704 2001-02-08  Jason Merrill  <jason@redhat.com>
9705
9706         * search.c (shared_member_p): New function.
9707         (lookup_field_r): Use it.
9708         * cp-tree.h (SHARED_MEMBER_P): Remove.
9709
9710         * method.c (process_overload_item): Handle template-dependent array
9711         bounds.
9712         * pt.c (type_unification_real): If we end up with undeduced nontype
9713         parms, try again.
9714
9715         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
9716         types.
9717
9718         * typeck2.c (friendly_abort): Don't say anything if we have
9719         earlier errors or sorries.
9720
9721         * decl.c (check_tag_decl): Notice attempts to redefine bool and
9722         wchar_t.  Ignore if in_system_header.
9723
9724         * decl.c (maybe_push_cleanup_level): New fn...
9725         (start_decl_1): ...split out from here.
9726         * cvt.c (build_up_reference): Use it.
9727         * cp-tree.h: Declare it.
9728
9729 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
9730
9731         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
9732         spec.
9733
9734 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
9735
9736         * pt.c (lookup_template_class): Make sure it's a primary
9737         template or template_template_parm when called from the parser.
9738         (instantiate_template_class): Add assertion.
9739
9740 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
9741
9742         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
9743         from error_mark_node.
9744
9745 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
9746
9747         Fix specification and implementation bugs in V3 ABI
9748         construction vtables.
9749         * cp-tree.h (flag_dump_class_layout): New flag.
9750         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
9751         (BINFO_LOST_PRIMARY_P): New flag.
9752         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
9753         (BINFO_PRIMARY_MARKED_P): Rename to ...
9754         (BINFO_PRIMARY_P): ... here.
9755         (binfo_via_virtual): New prototype.
9756         * decl2.c (flag_dump_class_layout): New flag.
9757         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
9758         use `=' as a file name separator.
9759         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
9760         bases.
9761         (build_vtbl_address): If this is a virtual primary base, then
9762         get the vtbl of what it is ultimately primary for.
9763         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
9764         for BINFO_PRIMARY_P.
9765         (dfs_skip_nonprimary_vbases_markedp): Likewise.
9766         (get_shared_vbase_if_not_primary): Likewise.
9767         (dfs_get_pure_virtuals): Likewise.
9768         (expand_upcast_fixups): Likewise.
9769         (fixup_virtual_upcast_offsets): Likewise.
9770         (dfs_find_vbase_instance): Likewise.
9771         (find_vbase_instance): Likewise.
9772         (binfo_from_vbase): Adjust comment to reflect reality.
9773         (binfo_via_virtual): New function.
9774         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
9775         for binfo walking during VTT construction.
9776         (dfs_mark_primary_bases): Remove.
9777         (force_canonical_binfo_r): New function.
9778         (force_canonical_binfo): New function.
9779         (mark_primary_virtual_base): New function.
9780         (mark_primary_bases): Walk in inheritance graph order, use
9781         mark_primary_virtual_base.
9782         (determine_primary_base): Use some more intermediate variables.
9783         (dfs_find_final_overrider): Don't check for overriding along a
9784         virtual path.
9785         (dfs_modify_vtables): Walk into primary virtual bases too.
9786         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
9787         (build_base_fields): Likewise.
9788         (dfs_set_offset_for_unshared_vbases): Likewise.
9789         (layout_virtual_bases): Likewise.
9790         (end_of_class): Likewise.
9791         (finish_struct_1): Call dump_class_hierarchy, if requested.
9792         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
9793         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
9794         (dump_class_hierarchy): Add file parameter. Append to file, if
9795         required.
9796         (finish_vtbls): Adjust accumulate_vtbl_inits call.
9797         Use canonical base for virtual bases.
9798         (build_vtt): Add more comments. Adjust build_vtt_inits call.
9799         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
9800         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
9801         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
9802         virtual VTTs.
9803         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
9804         from DATA.  We want virtual primary bases and all bases via virtual.
9805         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
9806         virtual base when not a construction vtable.
9807         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
9808         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
9809         Use canonical bases when processing virtual bases.
9810         (accumulate_vtbl_inits): We're interested in any base via a
9811         virtual path.
9812         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
9813         within a construction vtable, determine what is being overridden.
9814         (build_vtbl_initializer): Add more comments
9815         (add_vcall_offset_vtbl_entries_1): Adjust comment.
9816         (build_rtti_vtbl_entries): Check if the base has lost its
9817         primary.
9818
9819 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
9820
9821         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
9822
9823 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9824
9825         * decl.c (pushdecl): Call abort instead of fatal.
9826         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
9827         * init.c (build_new_1): Likewise.
9828         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
9829         * decl.c (build_typename_type): hash_table_init now returns void.
9830         decl.c (init_decl_processing): Make an error non-fatal.
9831
9832 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
9833
9834         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
9835         Document.
9836         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
9837         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
9838         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
9839         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
9840         * decl.c (maybe_commonize_var): Use the new name-mangling where
9841         appropriate.
9842         * decl2.c (comdat_linkage): Enhance comments.  Make all
9843         compiler-generated things static, if COMDAT is not available.
9844         (get_tinfo_decl): Do not make typeinfo objects that belong in the
9845         library COMDAT.
9846         (tinfo_base_init): Use the correct mangled name for typeinfo
9847         strings, and push them into the global scope.
9848         (typeinfo_in_lib_p): New function.
9849         (synthesize_tinfo_var): Use it.
9850         (create_real_tinfo_var): Likewise.
9851
9852 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
9853
9854         * decl.c (push_class_binding): Use context_for_name_lookup instead
9855         of CP_DECL_CONTEXT.
9856         * search.c (context_for_name_lookup): Remove static.  Check for NULL
9857         context in the loop.
9858         * cp-tree.h (context_for_name_lookup): Add prototype.
9859
9860 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
9861
9862         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
9863         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
9864         Remove.
9865         * call.c (convert_class_to_reference, build_user_type_conversion_1,
9866         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
9867
9868 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
9869
9870         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
9871         of macros used when compiling g++spec.c.
9872         * g++spec.c (lang_specific_driver): Link with the shared
9873         libgcc by default.
9874
9875 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
9876
9877         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
9878         make_reference_declarator, make_call_declarator), method.c
9879         (implicitly_declare_fn), parse.y (namespace_using_decl,
9880         notype_unqualified_id, expr_or_declarator, new_type_id,
9881         after_type_declarator, direct_after_type_declarator,
9882         notype_declarator, complex_notype_declarator,
9883         complex_direct_notype_declarator, qualified_id,
9884         notype_qualified_id, overqualified_id, direct_new_declarator,
9885         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
9886         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
9887         instead of build_parse_node.
9888
9889 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9890
9891         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
9892         (minus_one_node): Moved to top level gcc directory.  Renamed
9893         to integer_minus_one_node.
9894
9895         * init.c (init_init_processing): Don't set minus_one_node.
9896         (build_vec_init): Use integer_minus_one_node.
9897
9898         * rtti.c (get_tinfo_decl_dynamic): Likewise.
9899
9900 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
9901
9902         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
9903         identical and they would be replaced with constant, remove
9904         MODIFY_EXPR from the tree.
9905
9906 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9907
9908         * Make-lang.in: Remove all dependencies on defaults.h.
9909         * call.c: Don't include defaults.h.
9910         * decl.c: Likewise.
9911         * decl2.c: Likewise.
9912         * except.c: Likewise.
9913         * pt.c: Likewise.
9914         * rtti.c: Likewise.
9915         * tree.c: Likewise.
9916         * typeck.c: Likewise.
9917
9918 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
9919
9920         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
9921         operators even in "C" linkage.
9922         * method.c (set_mangled_name_for_decl): Likewise.
9923         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
9924         overloaded operators in "C" linkage.
9925
9926 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
9927
9928         * pt.c (tsubst_decl): Remove IN_DECL parameter.
9929         (tsubst_arg_types): Check parameter is not void.
9930         (tsubst): Adjust tsubst_decl call.
9931
9932 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
9933
9934         * call.c (add_builtin_candidate): Quote std properly, from
9935         previous change.
9936
9937 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9938
9939         * pt.c (check_explicit_specialization): Clone constructors and
9940         destructors.
9941
9942 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
9943
9944         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
9945         indicates anything special about template depth. Make sure we
9946         only count the user visible template classes.
9947
9948 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
9949
9950         * call.c (build_conv): Typo in comment.
9951         (add_builtin_candidate): Add more explanation.
9952         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
9953         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
9954         when we have enumeral types.
9955         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
9956         candidates for relops and eqops.
9957         (joust): Simplify control flow. Allow a non-template user
9958         function to hide a builtin.
9959
9960 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
9961
9962         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
9963         (more_specialized): Add deduction parameter.
9964         * call.c (joust): Adjust more_specialized call.
9965         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
9966         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
9967         (get_bindings_order): Remove.
9968         (get_bindings_real): Add DEDUCE parameter.
9969         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
9970         REFERENCE_TYPE jig for DEDUCE_ORDER.
9971         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
9972         maybe_adjust_types_for_deduction.
9973         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
9974         directly.
9975         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
9976         (check_cv_quals_for_unify): Use new unify qualifier flags.
9977         (unify): Clear new unify qualifier flags.
9978         (get_bindings_real): Add DEDUCE parameter.
9979         (get_bindings): Adjust call to get_bindings_real.
9980         (get_bindings_overload): Likewise.
9981         (most_specialized_instantiation): Adjust call to
9982         more_specialized.
9983
9984 2001-01-19  Jason Merrill  <jason@redhat.com>
9985
9986         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
9987
9988         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
9989         -fnew-abi.
9990
9991 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
9992
9993         * decl2.c (arg_assoc_class): Fix double iteration logic.
9994
9995 2001-01-19  Jason Merrill  <jason@redhat.com>
9996
9997         * init.c (build_delete): Always call convert_force to strip cv-quals.
9998
9999         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
10000         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
10001         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
10002
10003 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10004
10005         * search.c (get_vbase_1): Count only virtual bases.
10006
10007 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10008
10009         * class.c (duplicate_tag_error): Robustify flag clearing.
10010
10011 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10012
10013         * cp-tree.h (lookup_template_class): Add complain parm.
10014         * decl.c (lookup_namespace_name): Adjust call to
10015         lookup_template_class.
10016         (make_typename_type): Likewise.
10017         * semantics.c (finish_template_type): Likewise.
10018         * pt.c (lookup_template_class): Add complain parm. Adjust.
10019         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
10020         (tsubst): Likewise.
10021
10022 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10023
10024         * pt.c (copy_default_args_to_explicit_spec): Preserve
10025         object's CV quals. Reorganize.
10026
10027 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10028
10029         * typeck.c (build_modify_expr): Say `initialization' for
10030         INIT_EXPRs.
10031         * init.c (build_default_init): Convert to enumeral type, if
10032         needed.
10033
10034 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
10035
10036         * parse.y (nomods_initdcl0): Properly set things up for
10037         initdcl0_innards.
10038
10039 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10040
10041         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
10042         (type_unification_real): Set it.
10043         (unify): Use it.
10044
10045 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10046
10047         * decl.c (finish_destructor_body): Convert to vbase pointer here.
10048
10049 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10050
10051         * semantics.c (begin_class_definition): Check we're not inside a
10052         template parm list.
10053
10054 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10055
10056         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
10057         BASELINK_P.
10058
10059 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10060
10061         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
10062         * call.c (build_over_call): Add comment.
10063
10064 2001-01-16 Daniel Berlin <dberlin@redhat.com>
10065
10066         * cvt.c (ocp_convert): Handle vector type conversion
10067         * typeck2.c (digest_init): Handle vector type initializations
10068
10069 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
10070
10071         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
10072           was given.
10073
10074 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
10075
10076         * pt.c (check_nontype_parm): Rename to ...
10077         (invalid_nontype_parm_type_p): ... here.
10078         (process_template_parm): Adjust.
10079         (convert_template_argument): Adjust.
10080
10081 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
10082
10083         * pt.c (check_nontype_parm): New function.
10084         (process_template_parm): Use it.
10085         (convert_template_argument): Use it.
10086         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
10087         member.
10088
10089 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
10090
10091         * tree.c: Add defaults.h
10092         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
10093         * Make-lang.in (cp/tree.o): Add defaults.h.
10094
10095 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10096
10097         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
10098
10099 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10100
10101         * g++.1: Change to be ".so man1/gcc.1".
10102
10103 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10104
10105         * Make-lang.in (c++.info, c++.install-info): Build and install g++
10106         internals info.
10107         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
10108         ($(srcdir)/cp/g++int.info): New target.
10109         * gxxint.texi: Add info directory entry.  Use @@ in email address.
10110         * .cvsignore: Update.
10111
10112 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
10113
10114         * typeck.c (build_c_cast): Do template processing earlier.
10115         Always pedwarn on array casts.
10116
10117 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
10118
10119         * friend.c (make_friend_class): Make sure a templated class is
10120         actually a template.
10121
10122 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10123
10124         * decl2.c (get_guard): Set linkage from guarded decl.
10125
10126 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10127
10128         * call.c (convert_default_arg): Check for unprocessed
10129         DEFAULT_ARG.
10130         * cp-tree.h (replace_defarg): Move to spew.c.
10131         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
10132         spew.c, which is where they really are.
10133         (done_pending_defargs): Declare.
10134         (unprocessed_defarg_fn): Declare.
10135         * decl.c (replace_defarg): Move to spew.c
10136         * parse.y (structsp): Call done_pending_defargs.
10137         * spew.c (defarg_fns): Rearrange list structure.
10138         (defarg_fnsdone): New static variable.
10139         (defarg_depfns): New static variable.
10140         (init_spew): Adjust.
10141         (add_defarg_fn): Store the type in TREE_TYPE.
10142         (do_pending_defargs): Detect and deal with ordering constraints
10143         and circularity.
10144         (done_pending_defargs): New function.
10145         (unprocessed_defarg_fn): New function.
10146         (replace_defarg): Moved from decl.c. Robustify. Don't save
10147         if circularity detected.
10148
10149 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10150
10151         * pt.c (unify): Check array has a domain, before checking
10152         whether it is variable sized.
10153
10154 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10155
10156         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
10157         parameters with pointers to arrays of unknown bound.
10158
10159 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10160
10161         * parse.y (template_parm_header, template_spec_header): New
10162         reductions. Split out from ...
10163         (template_header): ... here. Use them.
10164         (template_template_parm): Use template_parm_header.
10165         * semantics.c (finish_template_template_parm): Add assert.
10166
10167 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10168
10169         * mangle.c (write_builtin_type): Fix thinko.
10170
10171         * pt.c (copy_default_args_to_explicit_spec_1): New function.
10172         (copy_default_args_to_explicit_spec): Likewise.
10173         (check_explicit_specialization): Use it.
10174
10175         * class.c (finish_struct_1):  Remove last argument in call to
10176         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
10177         * decl.c (builtin_function): Likewise.
10178         (build_cp_library_fn): Likewise.
10179         (check_initializer): Likewise.
10180         (make_rtl_for_nonlocal_decl): Likewise.
10181         (cp_finish_decl): Likewise.
10182         (start_function): Likewise.
10183         * decl2.c (finish_anon_union): Likewise.
10184         * friend.c (do_friend): Likewise.
10185         * init.c (build_java_class_ref): Likewise.
10186         * method.c (make_thunk): Likewise.
10187         * pt.c (tsubst_friend_function): Likewise.
10188         * semantics.c (expand_body): Likewise.
10189
10190 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10191
10192         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
10193         looking at DECL_CLONED_FUNCTION for non-functions.
10194
10195 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10196
10197         * error.c (dump_template_parameter): Use parm to determine how
10198         to print default value.
10199
10200 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10201
10202         * class.c (duplicate_tag_error): Clear more flags.
10203
10204 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10205
10206         * call.c (build_new_method_call): Use binfo_for_vbase.
10207
10208 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
10209
10210         * cp-tree.h (flag_cond_mismatch): Don't declare.
10211         * decl2.c (flag_cond_mismatch): Don't define.
10212         (lang_f_options): Remove cond-mismatch.
10213         (unsupported_options): Add cond-mismatch.
10214
10215 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
10216
10217         * class.c (handle_using_decl): Reject using of constructor name
10218         of sourcing class. Allow injecting of a method with same name as
10219         nested class. Fixup error messages.
10220
10221 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
10222
10223         * decl2.c (lang_decode_option): Handle -Wformat=2.
10224
10225 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10226
10227         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
10228         initialized_in_class.
10229         (DECL_DEFINED_IN_CLASS_P): Rename to ...
10230         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
10231         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
10232         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
10233         * pt.c (check_default_tmpl_args): Adjust for
10234         DECL_INITIALIZED_IN_CLASS_P.
10235         (instantiate_class_template): Likewise.
10236         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
10237
10238         * class.c (finish_struct): Constify saved_filename.
10239
10240 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10241
10242         * class.c (duplicate_tag_error): Adjust diagnostic.
10243         (finish_struct): Locally set location to start of struct.
10244         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
10245
10246 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10247
10248         * decl.c (struct binding_level): Adjust class_shadowed comments
10249         to reflect reality.
10250         (push_class_level_binding): Adjust comments to reflect reality.
10251         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
10252         Don't set TREE_VALUE on the class_shadowed list.
10253
10254 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10255
10256         * decl2.c (acceptable_java_type): Allow references too.
10257         * init.c (build_java_class_ref): When using the new ABI, search
10258         `class$' and have it mangled with `mangle_decl.'
10259         * mangle.c (write_java_integer_type_codes): New function.
10260         (write_builtin_type): Detect and mangle Java integer and real
10261         types.
10262
10263 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
10264
10265         * decl2.c (grokfield): Don't accept `asm' specifiers for
10266         non-static data members.
10267
10268 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10269
10270         * expr.c (cplus_expand_expr): Don't reset `target'.
10271
10272 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
10273
10274         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
10275
10276 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
10277
10278         * parse.y (template_datadef): Check for error_mark_node.
10279
10280 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
10281
10282         * cp-tree.def (DEFAULT_ARG): Make `x' class.
10283
10284 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
10285
10286         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
10287         (record_builtin_type): Make non-static.
10288         (flag_short_double): Don't declare.
10289         (init_decl_processing): Remove the creation of many tree nodes now
10290         in c_common_nodes_and_builtins.
10291         (build_void_list_node): New function.
10292         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
10293         * cp-tree.h (flag_short_wchar): Don't declare.
10294
10295 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
10296
10297         * call.c (build_conv): Don't use build1 for USER_CONV.
10298         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
10299
10300 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
10301
10302         * lex.c (lang_init): Call c_common_lang_init.
10303
10304 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
10305
10306         * search.c (lookup_fnfields_here): Remove.
10307         (look_for_overrides_r): Use lookup_fnfields_1.
10308         Ignore functions from using declarations.
10309
10310 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
10311
10312         Implement exceptions specifiers for implicit member functions.
10313         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
10314         * method.c (synthesize_exception_spec): New function.
10315         (locate_dtor, locate_ctor, locate_copy): New functions.
10316         (implicitly_declare_fn): Generate the exception spec too.
10317         * search.c (check_final_overrider): Check artificial functions
10318         too.
10319         * typeck2.c (merge_exception_specifiers): New function.
10320
10321 2001-01-03  Jason Merrill  <jason@redhat.com>
10322
10323         * init.c (build_default_init): New fn.
10324         (perform_member_init): Split out from here.
10325         (build_new_1): Use it.  Simplify initialization logic.
10326         (build_vec_init): Take an array, rather than a pointer and maxindex.
10327         Speed up simple initializations.  Don't clean up if we're assigning.
10328         * cp-tree.h: Adjust.
10329         * decl2.c (do_static_initialization): Remove TREE_VEC case.
10330         * parse.y (new_initializer): Return void_zero_node for ().
10331         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
10332         * typeck2.c (digest_init): Only complain about user-written
10333         CONSTRUCTORs.
10334
10335 2000-12-22  Mike Stump  <mrs@wrs.com>
10336
10337         * decl2.c: (max_tinst_depth): Increase to 50.
10338
10339 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
10340
10341         * class.c (invalidate_class_lookup_cache): Zero the
10342         previous_class_values.
10343         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
10344         TREE_INT_CST_HIGH.
10345         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
10346         * decl.c (free_bindings): New variable.
10347         (push_binding): Don't create a new binding if we have one on the
10348         free list.
10349         (pop_binding): Put old bindings on the free list.
10350         (init_decl_processing): Use size_int, not build_int_2.
10351         Register free_bindings as a GC root.
10352         (cp_make_fname_decl): Use size_int, not build_int_2.
10353         (push_inline_template_parms_recursive): Likewise.
10354         (end_template_parm_list): Likewise.
10355         (for_each_template_parm): Do not use walk_tree_without_duplicates.
10356         (tsubst_template_parms): Use size_int, not build_int_2.
10357         (tsubst): Likewise.
10358         * rtti.c (get_vmi_pseudo_type_info): Likewise.
10359
10360 2001-01-02  Richard Henderson  <rth@redhat.com>
10361
10362         * parse.y (asm): Set ASM_INPUT_P.
10363
10364 2001-01-02  Jason Merrill  <jason@redhat.com>
10365
10366         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
10367         for v3 ABI.
10368
10369         * typeck.c (cp_truthvalue_conversion): New fn.
10370         * cvt.c (ocp_convert): Use it.
10371
10372         * cp-tree.h: Lose c-common.c decls.
10373
10374         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
10375         * cvt.c (convert_to_void): Use type_unknown_p.
10376
10377         * typeck.c (strip_all_pointer_quals): Also strip quals from
10378         pointer-to-member types.
10379
10380         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
10381         parse.y as C.
10382
10383         * call.c (build_new_method_call): Do evaluate the object parameter
10384         when accessing a static member.
10385         * typeck.c (build_component_ref): Likewise.
10386
10387 2001-01-02  Andreas Jaeger  <aj@suse.de>
10388
10389         * decl.c (cp_missing_noreturn_ok_p): New.
10390         (init_decl_processing): Set lang_missing_noreturn_ok_p.
10391
10392 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
10393
10394         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
10395
10396 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
10397
10398         * class.c (pushclass): Remove #if 0'd code.
10399         * cp-tree.h (overload_template_name): Remove.
10400         * decl.c (store_bindings): Simplify.
10401         (pop_from_top_level): Likewise.
10402         * pt.c (overload_template_name): Remove.
10403         (instantiate_decl): Don't call push_to_top_level if it's not
10404         needed.
10405
10406 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
10407
10408         * pt.c (register_local_specialization): Don't return a value.
10409         (lookup_template_class): Use move-to-front heuristic when looking
10410         up template instantiations.
10411         (instantiate_decl): Only push_to_top_level when we're actually
10412         going to instantiate the template.
10413
10414 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
10415
10416         * search.c (binfo_for_vtable): Return least derived class, not
10417         most.  Handle secondary vtables.
10418
10419 2000-12-22  Jason Merrill  <jason@redhat.com>
10420
10421         * pt.c (more_specialized): Don't optimize len==0.
10422         (fn_type_unification): If we're adding the return type, increase len.
10423
10424         * typeck.c (build_binary_op): Fix pmf comparison logic.
10425
10426         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
10427         DECL_STATIC_FUNCTION_P.
10428
10429         * semantics.c (genrtl_finish_function): Don't try to jump to
10430         return_label unless it exists.
10431
10432         In partial ordering for a call, ignore parms for which we don't have
10433         a real argument.
10434         * call.c (joust): Pass len to more_specialized.
10435         (add_template_candidate_real): Strip 'this', pass len.
10436         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
10437         (get_bindings_order): New fn.  Pass len down.
10438         (get_bindings_real): Strip 'this', pass len.
10439         (fn_type_unification): Likewise.
10440         (type_unification_real): Succeed after checking 'len' args.
10441         (most_specialized_instantiation): Lose explicit_args parm.
10442         * class.c (resolve_address_of_overloaded_function): Strip 'this',
10443         pass len.
10444
10445 2000-12-21  Jason Merrill  <jason@redhat.com>
10446
10447         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
10448         DECL_TEMPLATE_RESULT.
10449
10450         * search.c (lookup_field_r): Call lookup_fnfields_1, not
10451         lookup_fnfields_here.
10452
10453         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
10454
10455         * call.c (build_object_call): Also allow conversions that return
10456         reference to pointer to function.
10457         (add_conv_candidate): Handle totype being ref to ptr to fn.
10458         (build_field_call): Also allow members of type reference to function.
10459         Lose support for calling pointer to METHOD_TYPE fields.
10460
10461         * error.c (dump_expr): Handle *_CAST_EXPR.
10462
10463         * typeck2.c (build_scoped_ref): Always convert to the naming class.
10464
10465         * tree.c (break_out_cleanups): Lose.
10466         * cp-tree.h: Remove prototype.
10467         * typeck.c (build_component_ref): Don't break_out_cleanups.
10468         (build_compound_expr): Likewise.
10469         * semantics.c (finish_expr_stmt): Likewise.
10470
10471 2000-12-20  Richard Henderson  <rth@redhat.com>
10472
10473         * cp-tree.h: Update declarations.
10474         * decl.c (finish_case_label): Return the new stmt node.
10475         * semantics.c (finish_goto_stmt): Likewise.
10476         (finish_expr_stmt, finish_return_stmt): Likewise.
10477         (finish_break_stmt, finish_continue_stmt): Likewise.
10478         (finish_asm_stmt): Likewise.
10479         * parse.y (already_scoped_stmt): Set STMT_LINENO.
10480         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
10481         (simple_if, simple_stmt): Return the new stmt node.
10482         (save_lineno): New.
10483
10484 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
10485
10486         * cp-tree.h: Don't declare warn_long_long.
10487
10488 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10489
10490         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
10491         IS_AGGR_TYPE.
10492
10493 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10494
10495         * pt.c (unify): Handle when both ARG and PARM are
10496         BOUND_TEMPLATE_TEMPLATE_PARM.
10497
10498 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10499
10500         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
10501         DECL_TEMPLATE_PARM_P.
10502
10503 2000-12-15  Jason Merrill  <jason@redhat.com>
10504
10505         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
10506
10507         * init.c (build_new_1): Don't strip quals from type.
10508
10509         * decl.c (pushdecl): Don't check for linkage on a non-decl.
10510
10511         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
10512
10513         * call.c (build_new_function_call): Lose space before paren in
10514         error message.
10515         (build_new_method_call): Likewise.
10516
10517         * typeck2.c (build_m_component_ref): Propagate quals from datum.
10518
10519 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10520
10521         * pt.c (check_explicit_specialization): Propagate default
10522         function arguments to explicit specializations.
10523
10524 2000-12-13  DJ Delorie  <dj@redhat.com>
10525
10526         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
10527         and <? operators.
10528
10529 2000-12-08  Jason Merrill  <jason@redhat.com>
10530
10531         * error.c (dump_function_name): Don't let the user see __comp_ctor.
10532
10533         Clean up copy-initialization in overloading code.
10534         * call.c (build_user_type_conversion_1): Die if we are asked to
10535         convert to the same or a base type.
10536         (implicit_conversion): Avoid doing so.  Lose reference binding code.
10537         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
10538         direct-initialization.  Also do direct-init part of copy-init.
10539         (build_user_type_conversion): Don't provide context to convert_like.
10540         * cvt.c (ocp_convert): build_user_type_conversion will now provide
10541         the constructor call for copy-init.
10542
10543         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
10544         instantiation of a member template.
10545         (do_decl_instantiation): Not here.
10546
10547 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
10548
10549         * class.c (check_field_decls): Don't special case anonymous
10550         fields in error messages.
10551         (note_name_declared_in_class): Use %D on diagnostic.
10552
10553         * tree.c (pod_type_p): Use strip_array_types.
10554         (cp_valid_lang_attribute): Likewise.
10555         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
10556         multiple evaluations.
10557         (cp_has_mutable_p): Use strip_array_types.
10558
10559 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
10560
10561         * cp-tree.h (sufficient_parms_p): Declare new function.
10562         * call.c (sufficient_parms_p): New function, broken out of ...
10563         (add_function_candidate): ... here. Use it.
10564         (add_conv_candidate): Use it.
10565         * decl.c (grok_ctor_properties): Use it.
10566
10567 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
10568
10569         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
10570
10571 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10572
10573         * decl2.c (lang_decode_option): Handle -Wformat-security.
10574
10575 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10576
10577         * pt.c (verify_class_unification): New function.
10578         (get_class_bindings): Use it.
10579         (try_class_unification): Tidy.
10580         (unify): Handle when argument of a template-id is not
10581         template parameter dependent.
10582         (template_args_equal): Handle when TREE_CODE's do not match.
10583
10584 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
10585
10586         * lang-specs.h (c++): When invoking the stand-alone preprocessor
10587         for -save-temps, pass all relevant -Defines to it, and then don't
10588         pass them to cc1plus.
10589
10590 2000-12-05  Will Cohen  <wcohen@redhat.com>
10591
10592         * decl.c (finish_case_label): Cleared
10593         more_cleanups_ok in surrounding function scopes.
10594         (define_label): Likewise.
10595
10596 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
10597
10598         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
10599         (get_matching_virtual): Remove.
10600         (look_for_overrides): Declare new function.
10601         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
10602         DECL_VINDEX here.
10603         * class.c (check_for_override): Move base class iteration code
10604         to look_for_overrides.
10605         * search.c (next_baselink): Remove.
10606         (get_virtuals_named_this): Remove.
10607         (get_virtual_destructor): Remove.
10608         (tree_has_any_destructors_p): Remove.
10609         (struct gvnt_info): Remove.
10610         (check_final_overrider): Remove `virtual' from error messages.
10611         (get_matching_virtuals): Remove. Move functionality to ...
10612         (look_for_overrides): ... here, and ...
10613         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
10614         to be overriding.
10615
10616 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
10617
10618         * typeck.c (get_delta_difference): If via a virtual base,
10619         return zero.
10620         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
10621         adjustment.
10622
10623 2000-12-04  Richard Henderson  <rth@redhat.com>
10624
10625         * error.c (dump_tree): Use output_add_string not OB_PUTS.
10626
10627 2000-12-04  Jason Merrill  <jason@redhat.com>
10628
10629         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
10630         (write_builtin_type): Pass intSI_type_node and the like through
10631         type_for_mode.
10632         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
10633         Pass intSI_type_node and the like through type_for_mode.
10634         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
10635         * pt.c (tsubst, unify): Likewise.
10636         * tree.c (walk_tree): Likewise.
10637         * error.c (dump_type): Likewise.
10638         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
10639
10640         * Make-lang.in: Tweak top comment for emacs.
10641         (cp/TAGS): Restore.
10642
10643         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
10644
10645         * class.c (clone_function_decl): Robustify.
10646
10647 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
10648
10649         * decl.c (store_bindings): Only search in the non modified
10650         old_bindings for duplicates.
10651
10652 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
10653
10654         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
10655         TYPE_POLYMORPHIC_P.
10656
10657         * typeck.c (build_static_cast): Remove unused variable.
10658
10659 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10660
10661         * pt.c: Fix typo in comment.
10662
10663 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
10664
10665         * decl2.c (warn_format): Remove definition.
10666         (lang_decode_option): Handle -Wformat-nonliteral,
10667         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
10668
10669 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
10670
10671         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
10672         (init_decl_processing): Don't create string_type_node,
10673         const_string_type_node, wint_type_node, intmax_type_node,
10674         uintmax_type_node, default_function_type, ptrdiff_type_node and
10675         unsigned_ptrdiff_type_node.  Adjust position of call to
10676         c_common_nodes_and_builtins.
10677         (identifier_global_value): New function.
10678
10679 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
10680
10681         * call.c (standard_conversion): Reject pointer to member
10682         conversions from ambiguous, inaccessible or virtual bases.
10683         * typeck.c (build_static_cast): Don't check pointers to members
10684         specially.
10685
10686 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
10687
10688         * method.c (do_build_copy_constructor): Preserve cv
10689         qualifications when accessing source object members.
10690         (do_build_assign_ref): Likewise. Remove separate diagnostics for
10691         unnamed fields.
10692
10693 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
10694
10695         * method.c (do_build_assign_ref): Construct appropriately
10696         CV-qualified base reference. Don't allow const casts in base
10697         conversion.
10698
10699 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
10700
10701         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
10702         incomplete return type.
10703
10704 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10705
10706         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
10707         * semantics.c (finish_base_specifier): Accept a _TYPE not a
10708         _DECL.
10709
10710 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10711
10712         * spew.c (yyerror): Cope if yylval.ttype is NULL.
10713
10714 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10715
10716         * decl.c (grokdeclarator): Diagnose undefined template contexts.
10717
10718 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10719
10720         * decl.c (grokdeclarator): Do type access control on friend
10721         class.
10722
10723 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
10724
10725         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
10726         bison parser ickiness.
10727         * pt.c (tsubst_friend_function): Enter namespace scope when
10728         tsubsting the function name.
10729         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
10730
10731 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
10732
10733         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
10734         * cvt.c (cp_convert_to_pointer): Add force parameter.
10735         Allow conversions via virtual base if forced.
10736         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
10737         (ocp_convert): Likewise.
10738         * search.c (binfo_from_vbase): Return the virtual base's binfo.
10739         * typeck.c (get_delta_difference): Adjust handling of virtual
10740         bases.
10741
10742 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
10743
10744         * tree.c (struct list_hash): Remove.
10745         (list_hash_table): Make it be an htab.
10746         (struct list_proxy): New type.
10747         (list_hash_eq): New function.
10748         (list_hash_pieces): Renamed from ...
10749         (list_hash): ... this.
10750         (list_hash_lookup): Remove.
10751         (list_hash_add): Remove.
10752         (hash_tree_cons): Use the generic hashtable.
10753         (mark_list_hash): Remove.
10754         (init_tree): Create the hashtable.
10755
10756 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
10757
10758         * method.c (build_mangled_C9x_name): Rename to
10759         build_mangled_C99_name.  Change C9X references in comments to
10760         refer to C99.
10761
10762 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
10763
10764         * parse.y (unary_expr): Move VA_ARG from here ...
10765         (primary): ... to here.
10766
10767 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
10768
10769         * semantics.c (finish_id_expr): If type is error_mark, return
10770         error_mark.
10771
10772 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
10773
10774         * pt.c (lookup_template_class): Simplify loop exit constructs.
10775         Cope when there is no partial instantiation of a template
10776         template member.
10777
10778 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
10779
10780         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
10781
10782 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
10783
10784         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
10785         prefix.
10786
10787         * pt.c (do_decl_instantiate): Explicitly clone constructors and
10788         destructors that haven't already been cloned.
10789
10790 2000-11-20  Richard Henderson  <rth@redhat.com>
10791
10792         * parse.y (yyparse_1): Rename the parser entry point.
10793
10794 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
10795
10796         * mangle.c (write_name): Use <unscoped-name> for names directly in
10797         function scope.
10798         (write_unscoped_name): Accept names directly in function scope.
10799
10800 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
10801
10802         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
10803         * parse.y (extdef): Add EXPORT reduction.
10804         * spew.c (yylex): Don't skip export here.
10805
10806 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
10807
10808         * decl.c (init_decl_processing): Correct name of pure virtual
10809         function under the new ABI.
10810         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
10811         (throw_bad_typeid): Likewise for bad typeid function.
10812
10813 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
10814
10815         * decl.c (grokparms): Don't even function types of `void' type,
10816         either.
10817         * mangle.c (write_type): Don't crash when confronted with the
10818         error_mark_node.
10819
10820         * decl.c (grokparms): Don't create parameters of `void' type.
10821
10822 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
10823
10824         * lex.c (mark_impl_file_chain): Delete.
10825         (init_parse): Remove call to ggc_add_string_root.  No need to
10826         ggc_strdup a string constant.  Do not add impl_file_chain to GC
10827         roots.
10828         (handle_pragma_implementation): No need to ggc_strdup main_filename.
10829
10830 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
10831
10832         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
10833
10834 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
10835
10836         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
10837         * decl.c (grokdeclarator): Don't reject void parms here.
10838         (require_complete_types_for_parms): Simplify, use
10839         complete_type_or_else.
10840         (grokparms): Remove bitrot. Remove funcdef parm.
10841         Deal with ellipsis parm lists here.
10842         * semantics.c (finish_parmlist): Don't append void_list_node
10843         here. Set PARMLIST_ELLIPSIS_P.
10844
10845 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
10846
10847         * typeck2.c (incomplete_type_error): Reorganize to avoid
10848         excessive diagnostics.
10849
10850 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
10851
10852         * lex.c (struct impl_files, internal_filename): Constify a char *.
10853
10854 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
10855
10856         * mangle.c (write_special_name_constructor): Don't generate
10857         assembler junk when confronted with an old-style constructor.
10858         (write_special_name_destructor): Likewise.
10859         (mangle_decl_string): Do it here instead.
10860
10861 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
10862
10863         * call.c (op_error): Make error messages clearer.
10864
10865 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
10866
10867         * decl.c (wrapup_globals_for_namespace): Don't mark things
10868         TREE_ASM_WRITTEN when they're not.
10869
10870 2000-11-15  Jason Merrill  <jason@redhat.com>
10871
10872         * typeck2.c (friendly_abort): Uncount the error before handing
10873         off to fancy_abort.
10874
10875 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
10876
10877         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
10878
10879 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
10880
10881         * class.c (build_vtbl_initializer): Fix typo in comment.
10882         * typeck.c (expr_sizeof): Don't crash on errors.
10883
10884 2000-11-14  Jim Wilson  <wilson@redhat.com>
10885
10886         * lang-specs.h: Add %2 after %(cc1_options).
10887
10888 2000-11-14  Richard Henderson  <rth@redhat.com>
10889
10890         * typeck.c (c_sizeof): Be strict about casting result value
10891         back to c_size_type_node.
10892         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
10893
10894 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10895
10896         * typeck.c (build_unary_op): Use boolean_increment from
10897         c-common.c, moving the relevant code there.
10898
10899 2000-11-11  Jason Merrill  <jason@redhat.com>
10900
10901         * typeck.c (mark_addressable): Don't call put_var_into_stack.
10902
10903         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
10904         in inlines.
10905
10906 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10907
10908         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
10909         * lex.c (copy_lang_decl): Likewise.
10910
10911 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
10912
10913         * dump.c (cp_dump_tree): Don't dump function bodies here.
10914
10915         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
10916         (dump.o): Update dependency list.
10917         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
10918         (flag_dump_translation_unit): Likewise.
10919         (CP_TYPE_QUALS): Adjust definition.
10920         (DECL_C_BIT_FIELD): Remove.
10921         (SET_DECL_C_BIT_FIELD): Likewise.
10922         (CLEAR_DECL_C_BIT_FIELD): Likewise.
10923         (add_maybe_template): Likewise.
10924         (strip_array_types): Likewise.
10925         (dump_node_to_file): Likewise.
10926         (cp_dump_tree): New function.
10927         * decl.c (init_decl_processing): Set lang_dump_tree.
10928         * decl2.c (flag_dump_translation_unit): Remove.
10929         * dump.c: Move most of it to ../c-dump.c.
10930         (cp_dump_tree): New function.
10931         * pt.c (add_maybe_template): Remove.
10932         * typeck.c (strip_array_types): Likewise.
10933
10934 2000-11-07  Eric Christopher  <echristo@redhat.com>
10935
10936         * decl.c (init_decl_processing): Change definition of
10937         __wchar_t to wchar_t.  Remove artificial declaration of
10938         wchar_t.
10939         * lex.c: Change instances of __wchar_t to wchar_t.
10940
10941 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
10942
10943         * lex.c (do_identifier): Don't lookup_name for operators.
10944         * parse.y (operator): Save looking_for_typename.
10945         (unoperator): Restore it.
10946         * spew.c (frob_opname): Use nth_token for lookahead.
10947
10948 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
10949
10950         * decl.c (grok_op_properties): Always use coerce_new_type and
10951         coerce_delete_type.
10952         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
10953         exception specification. Tidy up.
10954         (coerce_delete_type): Preserve exception specification. Tidy up.
10955
10956 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10957
10958         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
10959         (push_binding_level), error.c (cp_tree_printer), pt.c
10960         (process_partial_specialization, tsubst_template_arg_vector),
10961         search.c (lookup_member): Use memset () instead of bzero ().
10962
10963 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
10964
10965         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
10966
10967 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
10968
10969         * Make-lang.in (c++.distdir): Remove.
10970
10971 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
10972
10973         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
10974         declarations from different namespaces to be combined.
10975
10976 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
10977
10978         * decl.c: Include tm_p.h.
10979
10980 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
10981
10982         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
10983
10984 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
10985
10986         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
10987         (build_overload_value), repo.c (open_repo_file), xref.c
10988         (open_xref_file): Use strchr () and strrchr () instead of index ()
10989         and rindex ().
10990
10991 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
10992
10993         * call.c (build_over_call): Call fold on the CALL_EXPR.
10994
10995 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
10996
10997         * error.c (dump_template_decl): Separate template hearders with
10998         space not comma.
10999
11000 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
11001
11002         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
11003         TS_* flags with corresponding TFF_*.  Adjust prototypes of
11004         functions (which used to take a tree_string_flags) to take an int.
11005
11006         * cp-tree.h (enum tree_string_flags): Remove
11007         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
11008         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
11009         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
11010         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
11011         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
11012         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
11013         (type_as_string, decl_as_string, expr_as_string,
11014         context_as_string): Adjust prototype.
11015
11016         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
11017         instead of TS_PLAIN.
11018
11019         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
11020         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
11021         plain `0'.
11022
11023 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
11024
11025         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
11026         (linkage_kind): New enumeration.
11027         (decl_linkage): New function.
11028         * decl2.c (comdat_linkage): Extend comment.
11029         * error.c (dump_function_decl): Print the arguments used to
11030         instantiate a template, even when not printing the type of the
11031         function.
11032         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
11033         not TREE_PUBLIC, to test for external linkage.
11034         * tree.c (decl_linkage): New function.
11035
11036 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
11037
11038         * pt.c (instantiate_decl): Always instantiate static data members
11039         initialized in-class.
11040
11041 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
11042
11043         * Make-lang.in: Move all build rules here from Makefile.in,
11044         adapt to new context.  Wrap all rules that change the current
11045         directory in parentheses.  Expunge all references to $(P).
11046         When one command depends on another and they're run all at
11047         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
11048         all object-file generation rules.  Delete obsolete variables.
11049
11050         * Makefile.in: Delete.
11051         * config-lang.in: Delete outputs= line.
11052
11053 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
11054
11055         * error.c (dump_function_decl): Print no space between
11056         `ptr-operator' the `type-specifier' of the return type.
11057         (dump_type_prefix): Make sure we put space at the appropriate
11058         place.
11059
11060 2000-10-23  Jason Merrill  <jason@redhat.com>
11061
11062         * call.c (equal_functions): Also call decls_match for extern "C" fns.
11063
11064 2000-10-22  Jason Merrill  <jason@redhat.com>
11065
11066         * call.c (build_conditional_expr): Use ocp_convert to force
11067         rvalue conversion.
11068
11069 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
11070
11071         * call.c (standard_conversion): Use RVALUE_CONVs for all
11072         expressions that satisfy lvalue_p, not just those that satisfy
11073         real_lvalue_p.
11074
11075         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
11076
11077         * typeck.c (c_sizeof): Return an expression of `size_t' type,
11078         not one with TYPE_IS_SIZETYPE set.
11079         (dubious_conversion_warnings): Remove special-case code.
11080
11081 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
11082
11083         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
11084         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
11085         (dump_type_prefix): Print vector-of-int as 'int vector'.
11086         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
11087         * tree.c (walk_tree): Handle VECTOR_TYPE.
11088
11089         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
11090
11091 2000-10-21  Jason Merrill  <jason@redhat.com>
11092
11093         * parse.y (operator): Set got_object from got_scope.
11094         Set looking_for_typename.
11095         * decl.c (lookup_name_real): Clear val after setting from_obj.
11096         Reorganize diagnostic.
11097
11098 2000-10-20  Jason Merrill  <jason@redhat.com>
11099
11100         * tree.c (walk_tree): Don't walk into default args.
11101
11102         * error.c (dump_expr): Use host_integerp.
11103
11104 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
11105
11106         * typeck2.c (abstract_virtuals_error): Use "because" instead of
11107         "since" in error message.
11108
11109 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11110
11111         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
11112
11113 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
11114
11115         * decl.c (revert_static_member_fn): Fixed typo.
11116
11117 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
11118
11119         * class.c (subobject_offset_fn): New type.
11120         (dfs_record_base_offsets): Remove.
11121         (record_base_offsets): Likewise.
11122         (dfs_search_base_offsets): Likewise.
11123         (record_subobject_offset): New function.
11124         (check_subobject_offset): Likewise.
11125         (walk_subobject_offsets): Likewise.
11126         (record_subobject_offsets): Likewise.
11127         (layout_conflict_p): Reimplement.
11128         (layout_nonempty_base_or_field): Correct handling of type
11129         conflicts during layout.
11130         (layout_empty_base): Likewise.
11131         (build_base_field): Adjust to handle new representation of empty
11132         base offset table.
11133         (build_base_fields): Likewise.
11134         (layout_virtual_bases): Likewise.
11135         (splay_tree_compare_integer_csts): New function.
11136         (layout_class_type): Use a splay_tree, rather than a varray, to
11137         represent the offsets of empty bases.
11138
11139         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
11140         * decl.c (select_decl): Don't return declarations that are
11141         DECL_ANTICIPATED.
11142
11143 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
11144
11145         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
11146         (fake_std_node): New macro.
11147         * decl.c (in_std): Rename to ...
11148         (in_fake_std): ... this.
11149         (flag_no_builtin): Remove.
11150         (flag_no_nonansi_builtin): Likewise.
11151         (walk_namespaces_r): Use fake_std_node.
11152         (push_namespace): Use std_identifier.
11153         (pop_namespace): Use in_fake_std.
11154         (lookup_name_real): Use fake_std_node.
11155         (init_decl_processing): When -fhonor-std, create the `std'
11156         namespace.  Don't create a dummy fake_std_node in that case.
11157         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
11158         (builtin_function): Put builtins whose names don't begin
11159         with `_' in the std namespace.
11160         * decl2.c (flag_no_builtin): Remove.
11161         (flag_no_nonansi_builtin): Likewise.
11162         (set_decl_namespace): Use fake_std_node.
11163         (validate_nonmember_using_decl): Likewise.
11164         (do_using_directive): Likewise.
11165         (handle_class_head): Likewise.
11166         * dump.c (dequeue_and_dump): Likewise.
11167         * except.c (init_exception_processing): Use std_identifier.
11168         * init.c (build_member_call): Use fake_std_node.
11169         * rtti.c (init_rtti_processing): Use std_identifier.
11170
11171 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
11172
11173         * cp-tree.h (back_end_hook): Remove declaration.
11174         * decl2.c (back_end_hook): Remove definition.
11175
11176         * dump.c (dequeue_and_dump): Dump TREE_USED.
11177
11178 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
11179
11180         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
11181
11182 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
11183
11184         * decl.c (WINT_TYPE): Define.
11185         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
11186         c_size_type_node, signed_size_type_node and wint_type_node.
11187
11188 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
11189
11190         * decl2.c (warn_missing_format_attribute): New variable.
11191         (lang_decode_option): Decode -Wmissing-format-attribute.
11192
11193 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
11194
11195         * typeck.c (qualify_type): Remove.
11196         (composite_pointer_type): Fix handling of conversions to `cv void*'.
11197
11198 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11199
11200         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
11201
11202 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11203
11204         * Makefile.in (parse.c, parse.h): Create atomically.
11205
11206 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
11207
11208         * class.c (current_obstack): Remove.
11209         * decl.c (ggc_p): Remove.
11210         (start_decl): Don't use decl_tree_cons.
11211         (grokdeclarator): Don't use build_decl_list.
11212         (start_function): Don't use decl_tree_cons.
11213         (finish_function): Don't mess with obstacks.
11214         * decl2.c (grok_x_components): Don't use build_decl_list.
11215         * lex.c (make_call_declarator): Don't call decl_tree_cons.
11216         (implicitly_declare_fn): Don't call build_decl_list.
11217         * parse.y (frob_specs): Don't call build_decl_list or
11218         decl_tree_cons.
11219         (expr_or_declarator_intern): Don't call decl_tree_cons.
11220         (primary): Don't call build_decl_list.
11221         (fcast_or_absdcl): Likewise.
11222         (typed_declspecs): Don't call decl_tree_cons.
11223         (reserved_declspecs): Don't call build_decl_list.
11224         (declmods): Likewise.
11225         (reserved_typespecquals): Likewise.
11226         (aggr): Likewise.
11227         (new_type_id): Likewise.
11228         (cv_qualifiers): Likewise.
11229         (after_type_declarator_intern): Likewise.
11230         (notype_declarator_intern): Likewise.
11231         (absdcl_intern): Likewise.
11232         (named_parm): Likewise.
11233         * pt.c (most_specialized_class): Likewise.
11234         * repo.c (temporary_obstack): Make it a structure, not a pointer.
11235         (init_repo): Initialize it.
11236         * search.c (current_obstack): Remove.
11237         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
11238
11239 2000-10-09  Richard Henderson  <rth@cygnus.com>
11240
11241         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
11242         (c++ language support bits for libgcc): Remove.
11243         (c++.clean): Remove cplib2.txt cleanup.
11244         * config-lang.in (headers, lib2funcs): Remove.
11245
11246         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
11247         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
11248         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
11249         * inc/new.h, inc/typeinfo: Remove files.
11250
11251 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
11252
11253         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
11254         defined.
11255         (init_decl_processing): Initialize intmax_type_node and
11256         uintmax_type_node.
11257
11258 2000-10-06  Richard Henderson  <rth@cygnus.com>
11259
11260         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
11261         (original_result_rtx): Remove.
11262         * decl.c (save_function_data): Don't clear x_result_rtx.
11263         (mark_lang_function): Don't mark it either.
11264         * expr.c (fixup_result_decl): Remove.
11265         * semantics.c (genrtl_named_return_value): Frob the return decl
11266         before calling emit_local_var.
11267         (genrtl_finish_function): Don't call fixup_result_decl.
11268         Always emit the jump to return_label.
11269
11270 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
11271
11272         * pt.c (lookup_template_class): Set current access for enum.
11273         (tsubst_enum): Set file & line for enum decl.
11274
11275         * spew.c (yylex): Remove unused variable.
11276
11277 2000-10-05  Richard Henderson  <rth@cygnus.com>
11278
11279         * semantics.c (genrtl_finish_function): Don't init or check
11280         can_reach_end; remove noreturn and return value checks.
11281
11282 2000-10-05  Tom Tromey  <tromey@cygnus.com>
11283
11284         * init.c (build_java_class_ref): Use `build_static_name' with a
11285         suffix, not a prefix, to build the class object's name.
11286
11287 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11288
11289         * cp-tree.h (access_kind): Fix comment typo.
11290         * decl2.c (grokfield): Fix diagnostic typo.
11291         * semantics.c (finish_template_type): Fix comment typo.
11292         (finish_qualified_object_call_expr): Likewise.
11293
11294 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11295
11296         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
11297         tsubsting fails.
11298
11299 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11300
11301         * spew.c (frob_id): New static function.
11302         (frob_opname): Use it.
11303         (yylex): Use it.
11304
11305 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
11306
11307         * decl.c (lang_mark_false_label_stack): Remove.
11308         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
11309
11310 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
11311
11312         * gxxint.texi: Use @email for formatting email addresses.
11313
11314 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
11315
11316         * error.c: Remove direct obstack manipulation.  Replace with
11317         output_buffer-based formatting.  Adjust calls to removed macros.
11318         (obstack_chunk_alloc, obstack_chunk_free): Remove.
11319         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
11320         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
11321
11322 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
11323
11324         * ir.texi: Move to ../c-tree.texi.
11325
11326 2000-09-20  Jason Merrill  <jason@redhat.com>
11327
11328         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
11329
11330 2000-09-21  Andreas Jaeger  <aj@suse.de>
11331
11332         * errfn.c: Move declaration of cp_printer and cp_printers to ...
11333         * cp-tree.h: ... here.
11334
11335         * error.c: Remove declaration of cp_printer.
11336
11337 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
11338
11339         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
11340
11341 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
11342
11343         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
11344         users.
11345
11346 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
11347
11348         * decl.c (start_function): Robustify.
11349
11350 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11351
11352         * cp-tree.h (check_function_format): Accept a `status' parameter.
11353
11354         * call.c, typeck.c: Updates calls to `check_function_format'.
11355
11356 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
11357
11358         * decl2.c (handle_class_head): Always push some scope even
11359         in the error case.
11360
11361 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
11362
11363         * cp-tree.h (struct cp_language_function): Remove
11364         x_scope_stmt_stack and name_declared.
11365         (current_scope_stmt_stack): Remove.
11366         (function_name_declared_p): New macro.
11367         (struct lang_decl_flags): Use c_lang_decl as a base class.
11368         (context): Remove.
11369         (struct lang_decl): Replace saved_tree with context.
11370         (DECL_FRIEND_CONTEXT): Adjust accordingly.
11371         (SET_DECL_FRIEND_CONTEXT): Likewise.
11372         (DECL_VIRTUAL_CONTEXT): Likewise.
11373         (DECL_SAVED_TREE): Remove.
11374         (C_DECLARED_LABEL_FLAG): Likewise.
11375         (cplus_expand_expr_stmt): Don't declare.
11376         (add_decl_stmt): Likewise.
11377         (add_scope_stmt): Likewise.
11378         * decl.c (mark_stmt_tree): Remove.
11379         (case_compare): Likewise.
11380         (finish_case_label): Use c_add_case_label.
11381         (init_decl_processing): Set more language-specific hooks.
11382         (build_enumerator): Fix typo in comment.
11383         (cplus_expand_expr_stmt): Remove.
11384         (mark_lang_function): Use mark_c_language_function.
11385         (lang_mark_tree): Use c_mark_lang_decl.
11386         * decl2.c: Change order of inclusion.
11387         * except.c: Likewise.
11388         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
11389         back on c_expand_expr.
11390         * friend.c: Include expr.h.
11391         * init.c: Change order of inclusion.
11392         * Makefile.in: Update dependencies.
11393         * lex.h (free_lang_decl_chain): Remove.
11394         * optimize.c (maybe_clone_body): Use function_name_declared_p.
11395         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
11396         it doesn't exist.
11397         (instantiate_decl): Use function_name_declared_p.
11398         * semantics.c (lang_expand_expr_stmt): Remove.
11399         (set_current_function_name_declared): Likewise.
11400         (current_function_name_declared): Likewise.
11401         (begin_compound_stmt): Use function_name_declared_p.
11402         (add_decl_stmt): Remove.
11403         (setup_vtbl_ptr): Use function_name_declared_p.
11404         (add_scope_stmt): Remove.
11405         (current_scope_stmt_stack): New function.
11406         (cp_expand_stmt): Don't handle SCOPE_STMTs.
11407         (expand_body): Use function_name_declared_p.
11408         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
11409         * typeck.c: Change order of includes.
11410         (convert_sequence): Remove.
11411
11412 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
11413
11414         * lex.c (reswords): Add _Complex.
11415
11416 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11417
11418         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
11419
11420 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
11421
11422         * init.c (begin_init_stmts): Don't use // comments.
11423
11424 2000-09-12  Jason Merrill  <jason@redhat.com>
11425
11426         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
11427         all non-extern arrays.
11428
11429         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
11430         typenames, too.  Downgrade complaint to pedwarn.
11431         (xref_tag): Warn about surprising behavior of 'friend struct T'.
11432         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
11433         'class This::Inherited'.
11434
11435 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
11436
11437         * decl.c (finish_case_label): Given the LABEL_DECL a
11438         DECL_CONTEXT.
11439
11440 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
11441
11442         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
11443         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
11444         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
11445         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
11446         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
11447         New macros.
11448         (sorry_for_unsupported_tree, print_scope_operator,
11449         print_left_paren, print_right_paren, print_left_bracket,
11450         print_right_bracket, print_whitespace): Likewise.
11451         (aggr_variety): Rename to class_key_or_enum.
11452         (print_type): Rename to print_type_id.
11453         (print_type_specifier_seq, print_simple_type_specifier,
11454         print_elaborated_type_specifier,
11455         print_rest_of_abstract_declarator,
11456         print_parameter_declaration_clause, print_exception_specification,
11457         print_nested_name_specifier, print_template_id,
11458         typedef_original_name,  print_template_argument_list_start,
11459         print_template_argument_list_end): New functions.
11460
11461 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
11462
11463         * ir.texi: Add more documentation.
11464
11465 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
11466
11467         * cp-tree.h (struct saved_scope): Remove x_function_parms.
11468         (current_function_parms): Don't define.
11469         (struct cp_language_function): Remove parms_stored.
11470         (current_function_just_assigned_this): Don't define.
11471         (current_function_parms_stored): Likewise.
11472         (static_ctors): Declare.
11473         (static_dtors): Likewise.
11474         (SF_EXPAND): Don't define.
11475         (expand_start_early_try_stmts): Remove declaration.
11476         (store_parm_decls): Likewise.
11477         * decl.c (static_ctors): Don't declare.
11478         (static_dtors): Likewise.
11479         (struct binding_level): Remove this_block.
11480         (poplevel): Remove dead code.
11481         (set_block): Likewise.
11482         (mark_binding_level): Don't mark this_block.
11483         (mark_saved_scope): Don't mark x_function_parms.
11484         (init_decl_processing): Don't add current_function_parms as a GC
11485         root.
11486         (check_function_type): Change prototype.
11487         (start_function): Remove RTL-generation code.
11488         (expand_start_early_try_stmts): Remove.
11489         (store_parm_decls): Give it internal linkage.  Remove
11490         RTL-generation code.
11491         (finish_function): Remove RTL-generation code.
11492         * decl2.c (static_ctors): Fix formatting.
11493         (static_dtors): Likewise.
11494         * method.c (use_thunk): Don't call store_parm_decls.
11495         (synthesize_method): Likewise.
11496         * optimize.c (maybe_clone_body): Likewise.
11497         * parse.y (fn.def2): Likewise.
11498         (.set_base_init): Likewise.
11499         (nodecls): Likewise.
11500         * pt.c (instantiate_decl): Likewise.
11501         * rtti.c (synthesize_tinfo_fn): Likewise.
11502         * semantics.c (genrtl_try_block): Simplify.
11503         (expand_body): Use genrtl_start_function and
11504         genrtl_finish_function.
11505         (genrtl_start_function): New function.
11506         (genrtl_finish_function): Likewise.
11507
11508 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
11509
11510         * error.c (cp_tree_printer, case 'P'): Append break.
11511
11512 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
11513
11514         * cp-tree.h (frob_opname): Declare.
11515         * parse.y (saved_scopes): New static variable.
11516         (cp_parse_init): Adjust.
11517         (do_id): If lastiddecl is NULL, do do_identifier.
11518         (operator): Save scope information.
11519         (unoperator): New reduction. Restore scope information.
11520         (operator_name): Append unoperator. Call frob_opname.
11521         * spew.c (frob_opname): Define.
11522
11523 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
11524
11525         * decl.c, rtti.c: Include defaults.h if not already included.
11526         Don't define the *_TYPE_SIZE macros.
11527
11528 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
11529
11530         * cp-tree.h (push_switch): Change prototype.
11531         (check_cp_case_value): Remove declaration.
11532         (decl_constant_value): Likewise.
11533         * decl.c (struct cp_switch): Add switch_stmt and cases.
11534         (case_compare): New function.
11535         (push_switch): Set switch_stmt.  Initialize cases.
11536         (pop_switch): Clean up cases.
11537         (define_case_label): Rename to ...
11538         (finish_case_label): ... this.  Do semantic analysis for case
11539         labels here.
11540         (start_function): Correct comment.
11541         * decl2.c (check_cp_case_value): Remove.
11542         * expr.c (do_case): Remove.
11543         * pt.c (tsubst_expr): Adjust call to finish_case_label.
11544         * semantics.c (genrtl_do_poplevel): Remove declaration.
11545         (RECHAIN_STMTS): Remove.
11546         (finish_break_stmt): Use build_break_stmt.
11547         (finish_continue_stmt): Use build_continue_stmt.
11548         (finish_switch_cond): Adjust condition here, rater than in
11549         c_expand_start_case.
11550         (finish_case_label): Remove.
11551         * typeck.c (c_expand_return): Remove.
11552         (c_expand_start_case): Likewise.
11553
11554 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
11555
11556         * ir.texi: Document type nodes.
11557
11558 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
11559
11560         * cp-tree.h (init_cp_semantics): Declare.
11561         (genrtl_try_block): Don't declare.
11562         (genrtl_handler): Likewise.
11563         (genrtl_catch_block): Likewise.
11564         (genrtl_ctor_stmt): Likewise.
11565         (genrtl_subobject): Likewise.
11566         (genrtl_do_poplevel): Likewise.
11567         (genrtl_named_return_value): Likewise.
11568         * lex.c (init_parse): Call init_cp_semantics.
11569         * semantics.c (genrtl_try_block): Give it internal linkage.
11570         (genrtl_handler): Likewise.
11571         (genrtl_catch_block): Likewise.
11572         (genrtl_ctor_stmt): Likewise.
11573         (genrtl_subobject): Likewise.
11574         (genrtl_do_poplevel): Likewise.
11575         (genrtl_named_return_value): Likewise.
11576         (lang_expand_stmt): Rename to ...
11577         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
11578         (init_cp_semantics): Define.
11579
11580         * decl.c (initialize_local_var): Remove RTL-generating code.
11581         * semantics.c (genrtl_try_block): Fix formatting.
11582
11583         Move statement-tree facilities from C++ to C front-end.
11584         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
11585         (void_zero_node): Remove.
11586         (stmt_tree): Likewise.
11587         (scope_chain): Adjust.
11588         (language_function): Rename to cp_language_function.
11589         (cp_function_chain): Adjust.
11590         (current_stmt_tree): Remove.
11591         (last_tree): Likewise.
11592         (last_expr_type): Likewise.
11593         (struct lang_decl): Adjust.
11594         (STMT_IS_FULL_EXPR_P): Remove.
11595         (add_tree): Remove.
11596         (begin_stmt_tree): Likewise.
11597         (finish_stmt_tree): Likewise.
11598         (walk_tree_fn): Likewise.
11599         (walk_stmt_tree): Likewise.
11600         * class.c (finish_struct): Replace use of add_tree with add_stmt.
11601         * decl.c (mark_stmt_tree): Adjust type.
11602         (init_decl_processing): Don't build void_zero_node.
11603         (initialize_local_var): Adjust usage of current_stmt_tree.
11604         (finish_enum): Use add_stmt, not add_tree.
11605         (save_function_data): Adjust use of language_function.
11606         (finish_constructor_body): Use add_stmt, not add_tree.
11607         (finish_destructor_body): Likewise.
11608         (push_cp_function_context): Adjust use of language_function.
11609         (pop_cp_function_context): Likewise.
11610         (mark_lang_function): Likewise.
11611         (mark_cp_function_context): Likewise.
11612         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
11613         (build_vec_init): Likewise.
11614         * semantics.c (SET_LAST_STMT): Remove.
11615         (RECHAIN_STMTS): Don't use it.
11616         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
11617         (current_stmt_tree): Define.
11618         (add_tree): Remove.
11619         (finish_goto_stmt): Use add_stmt, not add_tree.
11620         (finish_expr_stmt): Likewise.
11621         (begin_if_stmt): Likewise.
11622         (finish_then_clause): Likewise.
11623         (begin_while_stmt): Likewise.
11624         (begin_do_stmt): Likewise.
11625         (finish_return_stmt): Likewise.
11626         (begin_for_stmt): Likewise.
11627         (finish_break_stmt): Likewise.
11628         (finish_continue_stmt): Likewise.
11629         (begin_switch_stmt): Likewise.
11630         (finish_case_label): Likewise.
11631         (begin_try_block): Likewise.
11632         (begin_function_try_block): Likewise.
11633         (begin_handler): Likewise.
11634         (begin_catch_block): Likewise.
11635         (begin_compound_stmt): Likewise.
11636         (begin_asm_stmt): Likewise.
11637         (finish_asm_stmt): Likewise.
11638         (finish_label_stmt): Likewise.
11639         (add_decl_stmt): Likewise.
11640         (finish_subobject): Likewise.
11641         (finish_decl_cleanup): Likewise.
11642         (finish_named_return_value): Likewise.
11643         (setup_vtbl_ptr): Likewise.
11644         (add_scope_stmt): Likewise.
11645         (finish_stmt_expr): Likewise.
11646         (prune_unused_decls): Remove.
11647         (begin_stmt_tree): Likewise.
11648         (finish_stmt_tree): Likewise.
11649         (prep_stmt): Adjust use of current_stmt_tree.
11650         (lang_expand_stmt): Likewise.
11651         * tree.c (statement_code_p): Remove.
11652         (cp_statement_code_p): New function.
11653         (walk_stmt_tree): Remove.
11654         (init_tree): Set lang_statement_code_p.
11655
11656 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
11657
11658         Integrated preprocessor.
11659
11660         * Make-lang.in, Makefile.in: Remove all references to input.c,
11661         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
11662         * gxx.gperf, hash.h, input.c: Delete.
11663         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
11664         initialized properly.
11665
11666         * class.c (fixup_pending_inline): Take a tree, not a
11667         struct pending_inline *.  All callers changed.
11668         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
11669         RID_PROTECTED entries in ridpointers[] array here.
11670         * decl.c (duplicate_decls): Do not refer to struct
11671         pending_inline.
11672         (record_builtin_type, init_decl_processing): Use RID_MAX not
11673         CP_RID_MAX.
11674         (grokdeclarator): Use C_IS_RESERVED_WORD.
11675         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
11676         cpplib.
11677         (grok_x_components): Do not inspect pending_inlines chain.
11678
11679         * cp-tree.h (struct lang_identifier): Add rid_code entry.
11680         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
11681         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
11682         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
11683         TIME_IDENTIFIER_FILEINFO): Kill.
11684         Update prototypes.
11685         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
11686         single 32-bit word.
11687         * parse.y: Call do_pending_inlines unconditionally.
11688         reinit_parse_for_method is now snarf_method.  fn.defpen is no
11689         longer necessary.  Remove unnecessary <itype> annotation on
11690         SCOPE.  Do not refer to end_of_file or struct pending_inline.
11691         * semantics.c (begin_inline_definitions): Call
11692         do_pending_inlines unconditionally.
11693
11694         * lex.c: Remove all code now shared with C front end.
11695         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
11696         into the get_identifier table.  Rewrite pragma handling to
11697         work with the registry.  Move code to save tokens for later
11698         processing to spew.c.
11699
11700         * spew.c: Rewrite everything in terms of token streams instead
11701         of text.  Move routines here from lex.c / input.c as
11702         appropriate.  GC-mark trees hanging off the pending inlines
11703         chain.
11704
11705 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
11706
11707         * NEWS: Mention that the named return value extension has been
11708         deprecated.
11709         * cp-tree.h (original_result_rtx): Define.
11710         (TREE_REFERENCE_EXPR): Remove.
11711         (DECL_VPARENT): Likewise.
11712         (pushdecl_nonclass_level): Likewise.
11713         (store_return_init): Likewise.
11714         (reinit_lang_specific): Likewise.
11715         (genrtl_named_return_value): Change prototype.
11716         * decl.c (original_result_rtx): Remove.
11717         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
11718         Do not generate RTL for local variables here.
11719         (store_return_init): Remove.
11720         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
11721         store_return_init.
11722         (finish_named_return_value): Adjust accordingly.  Warn that this
11723         extension is deprecated.
11724         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
11725
11726 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11727
11728         * pt.c (type_unification_real): Replace switch with if.
11729         (unify): Tsubst non-type parms before comparing.
11730
11731 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11732
11733         * error.c (dump_typename): New function, broken out of ...
11734         (dump_type): ... here. Use it.
11735         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
11736
11737 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11738
11739         * init.c (build_offset_ref): Deal with namespace scoped
11740         TEMPLATE_ID_EXPRs.
11741
11742 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11743
11744         * class.c (resolve_address_of_overloaded_function): Add
11745         explanation message.
11746         * decl.c (define_case_label): Reformat explanation.
11747         * decl2.c (finish_static_data_member_decl): Likewise.
11748         (grokfield): Likewise.
11749         * friend.c (do_friend): Likewise.
11750
11751 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
11752
11753         * tree.c (walk_tree): Expose tail recursion.
11754         (walk_stmt_tree): New function.
11755         * cp-tree.h: Prototype walk_stmt_tree.
11756         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
11757         the BLOCKs directly.  If a BLOCK has no variables after
11758         pruning, discard it.
11759         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
11760         restore the line number.
11761
11762 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
11763
11764         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
11765         (pt.o): Remove dependency on HTAB_H.
11766         * cp-tree.h: Include hashtab.h.
11767         (walk_tree): Change prototype.
11768         (walk_tree_without_duplicates): New function.
11769         * decl.c (check_default_argument): Use it.
11770         * optimize.c (remap_decl): Adjust calls to walk_tree.
11771         (copy_body): Likewise.
11772         (expand_calls_inline): Likewise.
11773         (calls_setjmp_p): Use walk_tree_without_duplicates.
11774         * pt.c: Don't include hashtab.h.
11775         (for_each_template_parm): Use walk_tree_without_duplicates.
11776         * semantics.c (finish-stmt_tree): Likewise.
11777         (expand_body): Likewise.
11778         * tree.c (walk_tree): Add additional parameter.
11779         (walk_tree_without_duplicates): New function.
11780         (count_trees): Use it.
11781         (verify_stmt_tree): Adjust call to walk_tree.
11782         (find_tree): Use walk_tree_without_duplicates.
11783         (no_linkage_check): Likewise.
11784         (break_out_target_exprs): Adjust call to walk_tree.
11785         (cp_unsave): Likewise.
11786
11787 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11788
11789         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
11790         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
11791         * cp-tree.h (TYPE_BINFO): Adjust comment.
11792         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
11793         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
11794         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
11795         (TYPE_TEMPLATE_INFO): Likewise.
11796         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
11797         * class.c (push_nested_class): Likewise.
11798         * decl.c (lookup_name_real): Likewise.
11799         (grokdeclarator): Likewise.
11800         (grok_op_properties): Likewise.
11801         (xref_tag): Likewise.
11802         (xref_basetypes): Likewise.
11803         * decl2.c (constructor_name_full): Likewise.
11804         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
11805         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
11806         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
11807         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11808         (dump_type_suffix): Likewise.
11809         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
11810         instead.
11811         (get_aggr_from_typedef): Likewise.
11812         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
11813         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11814         (write_template_parm): Likewise.
11815         (write_template_template_parm): Check tree code instead of
11816         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11817         * method.c (build_overload_nested_name): Add
11818         BOUND_TEMPLATE_TEMPLATE_PARM.
11819         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
11820         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11821         * pt.c (convert_template_argument): Check tree code instead of
11822         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11823         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
11824         (for_each_template_parm): Adjust comment.
11825         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
11826         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11827         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
11828         template_args_equal to compare template template parameter cases.
11829         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11830         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
11831         instead.
11832         * tree.c (copy_template_template_parm): Decide whether to create
11833         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
11834         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11835         (copy_tree_r): Likewise.
11836         * typeck.c (comptypes): Likewise.  Check tree code instead of
11837         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11838
11839 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
11840
11841         * decl.c (finish_function): Move the code for handling functions
11842         marked with the constructor and destructor attributes inside the
11843         expand_p block.
11844
11845 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
11846
11847         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
11848
11849 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
11850
11851         * pt.c (lookup_template_class): Remove abort.
11852         * tree.c (get_type_decl): Allow error_mark_node.
11853
11854 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
11855
11856         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
11857         TEMPLATE_ID_EXPRs.
11858
11859 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
11860
11861         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
11862         new ABI mangling.
11863
11864 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
11865
11866         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
11867         union tag mismatch error reporting.
11868
11869 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
11870
11871         * call.c (build_scoped_method_call): Check it is not a namespace.
11872
11873 2000-08-30  Jason Merrill  <jason@redhat.com>
11874
11875         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
11876
11877         * tree.c (bot_manip): Check TREE_CONSTANT rather than
11878         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
11879         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
11880
11881         * decl.c (start_function): Always call make_function_rtl.
11882
11883 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
11884
11885         * semantics.c (prune_unused_decls): New function.
11886         (finish_stmt_tree): Call it via walk_tree.
11887
11888 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
11889
11890         * class.c (build_secondary_vtable): Constify a char *.
11891         * decl.c (init_decl_processing): Initialize function_id_node,
11892         pretty_function_id_node, and func_id_node.
11893         * input.c (struct input_source): Constify 'str'.
11894         (feed_input): Constify first argument.
11895         * mangle.c (write_identifier): Constify argument.
11896         * pt.c (mangle_class_name_for_template): Constify argument.
11897
11898 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
11899
11900         * typeck.c (mark_addressable): Remove code that pokes around in
11901         RTL.
11902
11903 2000-08-28  Jason Merrill  <jason@redhat.com>
11904
11905         * lex.c (file_name_nondirectory): Move to toplev.c.
11906
11907         * cp-tree.h (LOCAL_CLASS_P): New macro.
11908         * class.c (finish_struct_1): Use it.
11909
11910 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
11911
11912         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
11913         (write_encoding): Pass another argument to write_name.
11914         (write_name): Add ignore_local_scope parameter.  Fix handling of
11915         local names.
11916         (write_nested_name): Use write_unqualified_name.
11917         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
11918         (write_template_prefix): Use write_unqualified_name.
11919         (write_component): Remove.
11920         (write_local_name): Add parameter.  Use direct local entity to
11921         discriminator calculation.
11922         (write_class_enum_type): Pass another argument to write_name.
11923         (write_template_template_arg): Likewise.
11924         (make_guard_variable): Likewise.
11925
11926 2000-08-27  Jason Merrill  <jason@redhat.com>
11927
11928         * decl.c (pushdecl): Matching decls for local externs are found in
11929         the current level.  Propagate linkage information from previous
11930         declarations.
11931
11932 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
11933
11934         * ir.texi (Expressions): Fix typo.
11935
11936 2000-08-25  Greg McGary  <greg@mcgary.org>
11937
11938         * tree.c (init_tree): Use ARRAY_SIZE.
11939
11940 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
11941
11942         * error.c (cp_tree_printer): Rework.
11943
11944 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
11945
11946         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
11947         dyn-string.o.
11948         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
11949         (cp-demangle.o): Remove target.
11950         (dyn-string.o): Likewise.
11951
11952         * decl.c (grokfndecl): Require that `main' return an `int'.
11953         * mangle.c (write_encoding): Don't mangle return types for
11954         conversion functions.
11955
11956 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
11957
11958         * error.c (tree_formatting_info): New data type.
11959         (tree_being_formatted): New macro.
11960         (tree_formatting_flags): Likewise.
11961         (put_whitespace): Likewise.
11962         (print_tree_identifier): Likewise.
11963         (print_identifier): Likewise.
11964         (cp_tree_printer, print_function_argument_list, print_declaration,
11965         print_expression, print_function_declaration,
11966         print_function_parameter, print_type, print_cv_qualifier): New
11967         functions.
11968         (init_error): Initialize lang_printer.
11969
11970 2000-08-24  Jason Merrill  <jason@redhat.com>
11971
11972         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
11973         adjustment necessary.
11974
11975 2000-08-24  Greg McGary  <greg@mcgary.org>
11976
11977         * cp-tree.h (MAIN_NAME_P): Remove macro.
11978
11979 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
11980
11981         * error.c (print_instantiation_context): Don't forget to flush the
11982         buffer.
11983
11984 2000-08-23  Jason Merrill  <jason@redhat.com>
11985
11986         * typeck.c (build_ptrmemfunc): Save the input pmf.
11987
11988         * method.c (process_modifiers): Use same_type_p.
11989
11990 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
11991
11992         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
11993         * mangle.c (write_function_type): Change prototype.
11994         (write_encoding): Don't mangle return types for
11995         constructors or destructors.
11996         (write_type): Adjust call to write_function_type.
11997         * pt.c (instantiate_template): Instantiate alternate entry points
11998         when instantiating the main function.
11999
12000 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
12001
12002         * error.c (cp_print_error_function): Don't use embedded '\n' in
12003         output_printf.
12004
12005 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
12006
12007         * decl.c (init_decl_processing): Remove bogus initialization.
12008         * error.c (lang_print_error_function): Restore here.
12009         (init_error): Initialize print_error_function.
12010
12011 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
12012
12013         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
12014
12015 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
12016
12017         * Makefile.in (error.o): Depends on diagnostic.h
12018
12019         * cp-tree.h (problematic_instantiation_changed,
12020         record_last_problematic_instantiation, current_instantiation,
12021         print_instantiation_context): Declare.
12022         (maybe_print_template_context): Remove.
12023
12024         * decl.c (init_decl_processing): Set print_error_function to NULL.
12025         (lang_print_error_function): Remove, since we're using a new
12026         machinery.
12027
12028         * error.c: #include diagnostic.h
12029         (function_category): New function.
12030         (cp_diagnostic_starter): Likewise.
12031         (cp_diagnostic_finalizer): Likewise.
12032         (cp_print_error_function): Likewise.
12033         (maybe_print_instantiation_context): Likewise.
12034         (print_instantiation_full_context): Likewise.
12035         (print_instantiation_partial_context): Likewise.
12036         (print_instantiation_context): Define.
12037         (init_error): Initialize diagnostic pager and finalizer.
12038
12039         * pt.c (problematic_instantiation_changed): Define.
12040         (record_last_problematic_instantiation): Likewise.
12041         (current_instantiation): Likewise.
12042         (maybe_print_template_context): Remove.
12043         (print_template_context): Likewise.
12044         (current_tinst_level): Make static to reflect Brendan Kehoe's
12045         change of 1995-04-13.
12046         (push_tinst_level): Call print_instantiation_context.
12047
12048 2000-08-21  Nix  <nix@esperi.demon.co.uk>
12049
12050         * lang-specs.h: Do not process -o or run the assembler if
12051         -fsyntax-only.
12052
12053 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
12054
12055         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
12056         variables.
12057         * decl2.c (lang_decode_option): Disable gettext attributes for
12058         -ansi.
12059
12060 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
12061
12062         * lex.c (lang_init_options): Default diagnostic message maximum
12063         length to 80, when line-wrapping.
12064
12065 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
12066
12067         * class.c (build_vtbl_initializer): Clear the entire
12068         vtbl_init_data.  Start keeping track of the functions for which we
12069         have created vcall offsets here.
12070         (dfs_build_vcall_offset_vtbl_entries): Remove.
12071         (build_vcall_offset_vtbl_entries): Reimplement.
12072         (add_vcall_offset_vtbl_entries_r): New function.
12073         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
12074         computing when vcall offsets are necessary.
12075
12076 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12077
12078         * decl.c (member_function_or_else): Use cp_error ... %T.
12079         (grokdeclarator): Likewise.
12080         (start_method): Likewise.
12081         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
12082
12083 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12084
12085         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
12086         TYPE_DECLs.
12087
12088 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12089
12090         * cp-tree.h (PTRMEM_OK_P): New macro.
12091         (itf_ptrmem_ok): New enumeration value.
12092         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
12093         argument. Diagnose implicit pointer to member.
12094         (instantiate_type): Don't diagnose implicit pointer to member
12095         here. Pass itf_ptrmem_ok if ok. Adjust calls to
12096         resolve_address_of_overloaded_function.
12097         * init.c (build_offset_ref): Set PTRMEM_OK_P.
12098         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
12099         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
12100         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
12101         (build_unary_op): Deal with single non-static member in
12102         microsoft-land.
12103
12104 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12105
12106         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
12107
12108 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12109
12110         * cp-tree.h (enum_name_string): Remove prototype.
12111         (report_case_error): Remove prototype.
12112         * cp/typeck2.c (enum_name_string): Remove.
12113         (report_case_error): Remove.
12114         * error.c (dump_expr): Deal with enum values directly.
12115         Correctly negate integer constant.
12116
12117 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12118
12119         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
12120         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
12121         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
12122         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
12123         (__cxa_vec_new): Use __cxa_vec_new2.
12124         (__cxa_vec_delete): Use __cxa_vec_delete2.
12125
12126 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12127
12128         * vec.cc (__cxa_vec_new): Set "C" linkage.
12129         (__cxa_vec_ctor): Likewise.
12130         (__cxa_vec_cctor): Likewise.
12131         (__cxa_vec_dtor): Likewise.
12132         (__cxa_vec_delete): Likewise.
12133         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
12134         (__cxa_vec_ctor): Likewise.
12135         (__cxa_vec_cctor): Likewise.
12136         (__cxa_vec_dtor): Likewise.
12137         (__cxa_vec_delete): Likewise.
12138
12139 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12140
12141         * class.c (instantiate_type): Reinstate local variable
12142         deleted in previous change.
12143
12144         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
12145         itf_no_attributes.
12146
12147 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12148
12149         * cp-tree.h (instantiate_type_flags): New enumeration.
12150         (instantiate_type): Change parameter.
12151         * class.c (instantiate_type): Adjust prototype. Adjust.
12152         * call.c (standard_conversion): Adjust instantiate_type call.
12153         (reference_binding): Likewise.
12154         (build_op_delete_call): Likewise.
12155         (convert_like_real): Likewise.
12156         * cvt.c (cp_convert_to_pointer): Likewise.
12157         (convert_to_reference): Likewise.
12158         * pt.c (convert_nontype_argument): Likewise.
12159         * typeck.c (build_binary_op): Likewise.
12160         (build_ptrmemfunc): Likewise.
12161         (convert_for_assignment): Likewise.
12162
12163 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12164
12165         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
12166         (current_aggr): Define.
12167         * decl.c (grokdeclarator): Make sure a friend class is an
12168         elaborated type specifier.
12169         * parse.y (current_aggr): Remove static definition.
12170         (cp_parse_init): Adjust.
12171         (structsp): Clear and restore current_aggr.
12172         (component_decl_list): Clear current_aggr.
12173
12174         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
12175         aggregate tag on the typename's context.
12176
12177         * pt.c (tsubst_friend_class): Return error_mark_node, if
12178         parms becomes NULL.
12179         (instantiate_class_template): Ignore error_mark_node friend types.
12180
12181 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
12182
12183         * cvt.c (warn_ref_binding): New static function, broken out of ...
12184         (convert_to_reference): ... here. Use it.
12185
12186 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
12187
12188         * parse.y (template_arg): Add rule for template qualified with
12189         global scope.
12190
12191 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12192
12193         * decl2.c (add_function): Reorganize.
12194         (arg_assoc): Do not consider function template decls.
12195
12196 2000-08-11  Jason Merrill  <jason@redhat.com>
12197
12198         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
12199         looking inside.
12200
12201 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12202
12203         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
12204         (lookup_nested_tag): Likewise.
12205
12206         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
12207         can be produced.
12208
12209 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12210
12211         * parse.y (named_complex_class_head_sans_basetype): Remove
12212         always true if.
12213
12214 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12215
12216         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
12217         explicit TEMPLATE_ID_EXPR args.
12218         (build_expr_from_tree, case CALL_EXPR): Likewise.
12219
12220 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12221
12222         * decl.c (check_tag_decl): Diagnose typename's which don't
12223         declare anything.
12224
12225 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
12226
12227         * init.c (build_aggr_init): Reject bogus array initializers
12228         early.
12229
12230 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
12231
12232         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
12233         runtime.
12234         * cp/tinfo.cc (__dynamic_cast): Likewise.
12235         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
12236
12237 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
12238
12239         * cvt.c (convert_to_pointer_force): Fix error message when
12240         attempting to cast from ambiguous base.
12241
12242 2000-08-08  Jason Merrill  <jason@redhat.com>
12243
12244         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
12245         (tsubst_template_arg_vector): Likewise.
12246
12247         * decl2.c (build_anon_union_vars): Choose the largest field; don't
12248         assume that one will be as large as the union.
12249
12250 2000-08-07  Kazu Hirata  <kazu@hxi.com>
12251
12252         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
12253         * decl.c (pop_labels): Likewise.
12254
12255 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
12256
12257         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
12258         specifications.
12259         (__pointer_to_member_type_info): Likewise.
12260         (__base_class_info): Likewise.
12261         (__class_type_info): Likewise.
12262         (__si_class_type_info): Likewise.
12263         (__vmi_class_type_info): Likewise.
12264         * tinfo.cc (__si_class_type_info::__do_find_public_src):
12265         Changed member names to match specifications.
12266         (__vmi_class_type_info::__do_find_public_src): Likewise.
12267         (__si_class_type_info::__do_dyncast): Likewise.
12268         (__vmi_class_type_info::__do_dyncast): Likewise.
12269         (__si_class_type_info::__do_upcast): Likewise.
12270         (__vmi_class_type_info::__do_upcast): Likewise.
12271         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
12272         (__pbase_type_info::__pointer_catch): Likewise.
12273         (__pointer_type_info::__pointer_catch): Likewise.
12274         (__pointer_to_member_type_info::__pointer_catch): Likewise.
12275
12276 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
12277
12278         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
12279         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
12280         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
12281
12282 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
12283
12284         * cp-tree.h (add_method): Change prototype.
12285         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
12286         Don't double the size of the method vector in the error case.
12287         (handle_using_decl): Adjust call to add_method.
12288         (add_implicitly_declared_members): Likewise.
12289         (clone_function_decl): Likewise.
12290         * decl2.c (check_classfn): Likewise.
12291         * semantics.c (finish_member_declaration): Likewise.
12292
12293 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
12294
12295         * decl.c (flag_isoc94): New variable.
12296
12297 2000-08-02  Jason Merrill  <jason@redhat.com>
12298
12299         * pt.c (do_type_instantiation): Add complain parm; don't complain
12300         if called recursively.
12301         * cp-tree.h, parse.y: Adjust.
12302
12303 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
12304
12305         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
12306         -Wno-strict-prototypes.
12307
12308         * g++spec.c: Adjust type of second argument to
12309         lang_specific_driver, and update code as necessary.
12310
12311         * cp-tree.h: Don't prototype min_precision here.
12312         (my_friendly_assert): Cast expression to void.
12313         * semantics.c (do_poplevel): Initialize scope_stmts.
12314
12315 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
12316
12317         * cp-tree.h (DECL_NEEDED_P): Tweak.
12318
12319 2000-07-28  Jason Merrill  <jason@redhat.com>
12320
12321         * lang-specs.h: Use %i in rule for .ii files.
12322
12323 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
12324
12325         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
12326
12327 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
12328
12329         Allow indirect primary bases.
12330         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
12331         primary_base.
12332         (CLASSTYPE_VFIELD_PARENT): Remove.
12333         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
12334         (BINFO_PRIMARY_BINFO): Remove.
12335         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
12336         (BINFO_VBASE_PRIMARY_P): Likewise.
12337         (BINFO_PRIMARY_BASE_OF): New macro.
12338         (BINFO_INDIRECT_PRIMARY_P): Likewise.
12339         (get_primary_binfo): New function.
12340         * decl.c (lang_mark_tree): Make lang_type::primary_base.
12341         * class.c (vcall_offset_data_s): Rename to ...
12342         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
12343         and add ctor_vtbl_p.
12344         (get_derived_offset): Use get_primary_binfo.
12345         (dfs_mark_primary_bases): Adjust handling of virtual primary
12346         bases.
12347         (mark_primary_bases): Likewise.
12348         (set_primary_base): Take a binfo, not an integer, as a
12349         representation of the primary base.
12350         (indirect_primary_base_p): Remove.
12351         (determine_primary_base): Adjust for indirect primary bases.
12352         (dfs_find_final_overrider): Fix typo in coment.
12353         (update_vtable_entry_for_fn): Use get_primary_binfo.
12354         (layout_nonempty_base_or_field): Tweak.
12355         (build_base_fields): Adjust for new primary base semantics.
12356         (dfs_propagate_binfo_offsets): Remove.
12357         (propagate_binfo_offsets): Rewrite.
12358         (dfs_set_offset_for_shared_vbases): Remove.
12359         (layout_virtual_bases): Don't use it.
12360         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
12361         ABI.
12362         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
12363         CLASSTYPE_VFIELD_PARENT.
12364         (dfs_get_primary_binfo): New function.
12365         (get_primary_binfo): Likewise.
12366         (dump_class_hierarchy_r): Tweak printing of primary bases.
12367         (build_vtbl_initializer): Fix typo in comments.  Use
12368         vtbl_init_data.
12369         (build_vcall_and_vbase_vtbl_entries): Likewise.
12370         (build_vbaes_offset_vtbl_entries): Likewise.
12371         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
12372         BV_VCALL_INDEX to handle indirect primary bases.
12373         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
12374         (build_rtti_vtbl_entries): Likewise.
12375         * search.c (get_shared_vbase_if_not_primary): Tweak.
12376         (find_vbase_instance): Likewise.
12377         (binfo_for_vtable): Simplify.
12378         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
12379         (make_binfo): Make it have 11 entries.
12380
12381 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
12382
12383         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
12384         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
12385         ascertaining primaryness.
12386         (G): Remove template_args.
12387         (decl_is_template_id): New function.
12388         (write_encoding): Use decl_is_template_id.
12389         (write_name): Likewise.  Handle type_decls.  Get main variant of
12390         type decls.
12391         (write_nested_name): Likewise.
12392         (write_prefix): Likewise.
12393         (write_template_prefix): Likewise.
12394         (write_special_name_constructor): Remove defunct production from
12395         comment.
12396         (write_bare_function_type): Remove comment about absent parameter.
12397         (write_template_template_arg): Add missing grammar production to
12398         comment.
12399
12400 2000-07-27  Jason Merrill  <jason@redhat.com>
12401
12402         * decl.c (duplicate_decls): If common_type produces a non-typedef
12403         type for a typedef, just use the old type.
12404
12405 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
12406
12407         * cp-tree.h (function_depth): Declare.
12408         (verify_stmt_tree): Likewise.
12409         (find_tree): Likewise.
12410         * decl.c (function_depth): Give it external linkage.
12411         * optimize.c (optimize_function): Increment and decrement it.
12412         * tree.c (verify_stmt_tree_r): New function.
12413         (verify_stmt_tree): Likewise.
12414         (find_tree_r): Likewise.
12415         (find_tree): Likewise.
12416
12417 2000-07-27  Jason Merrill  <jason@redhat.com>
12418
12419         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
12420         TYPE_PTRMEMFUNC_P.
12421         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
12422
12423 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
12424
12425         * decl.c (start_cleanup_fn): Mark the function as `inline'.
12426         * decl2.c (get_guard): Call cp_finish_decl, not
12427         rest_of_decl_compilation, for local guards.
12428         * lex.c (do_identifier): Remove unused variable.
12429
12430 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
12431
12432         * parse.y:  Add missing ';'.
12433
12434 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
12435
12436         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
12437         of `extern "C++"'.
12438
12439 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12440
12441         Kill strict_prototype. Backwards compatibility only for
12442         non NO_IMPLICIT_EXTERN_C systems.
12443         * cp-tree.h (flag_strict_prototype): Remove.
12444         (strict_prototype): Remove.
12445         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
12446         * decl.c (maybe_push_to_top_level): Adjust.
12447         (pop_from_top_level): Adjust.
12448         (decls_match): Only allow sloppy parm matching for ancient
12449         system headers.
12450         (init_decl_processing): Adjust.
12451         (grokdeclarator): Adjust.
12452         * decl2.c (flag_strict_prototype): Remove.
12453         (strict_prototype): Remove.
12454         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
12455         (lang_f_options): Remove "strict-prototype".
12456         (unsupported-options): Add "strict-prototype".
12457         * lex.c (do_identifier): Adjust.
12458         (do_scoped_id): Adjust.
12459         * parse.y (empty_parms): Adjust.
12460         * class.c (push_lang_context): Adjust.
12461         (pop_lang_context): Adjust.
12462         * typeck.c (comp_target_parms): Adjust.
12463
12464 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12465
12466         * decl.c (poplevel): Deal with anonymous variables at for scope.
12467         (maybe_inject_for_scope_var): Likewise.
12468
12469 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
12470
12471         * decl.c: Remove all signal handling code, now done in toplev.c.
12472
12473 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
12474
12475         * decl.c (make_rtl_for_nonlocal_decl): Rework.
12476
12477         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
12478         correctly.
12479
12480 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
12481
12482         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
12483         Define my_friendly_assert and my_friendly_abort as macros
12484         which may call friendly_abort.  Prototype friendly abort, not
12485         my_friendly_abort or my_friendly_assert.
12486         * decl.c (signal_catch): Report the signal caught in the error
12487         message.  Call fatal directly.
12488         * typeck2.c (ack, my_friendly_assert): Delete.
12489         (my_friendly_abort): Rename to friendly_abort.  Expect file,
12490         line, and function parameters.  Report the abort code, then
12491         call fancy_abort.  Do not mask an abort if errors have
12492         already occurred.
12493
12494 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
12495
12496         * typeck.c (comp_target_parms): Remove obsolete parameter.
12497         (comp_target_types): Adjust.
12498
12499 2000-07-17  Jason Merrill  <jason@redhat.com>
12500
12501         * typeck.c (mark_addressable): Never set TREE_USED.
12502         * call.c (build_call): Don't abort on calls to library functions
12503         that have been declared normally.
12504
12505         * typeck.c (build_binary_op): Fix grammar in warning.
12506
12507         * exception.cc (__eh_free): Fix prototype.
12508
12509         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
12510
12511         * decl.c (pushdecl): Handle seeing an OVERLOAD in
12512         IDENTIFIER_NAMESPACE_VALUE.
12513
12514 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
12515
12516         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
12517         * method.c (use_thunk): Correct handling of vcall offsets.
12518
12519 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
12520
12521         * .cvsignore: parse.h and parse.c have no cp- prefix.
12522
12523 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
12524
12525         * .cvsignore: New file.
12526
12527 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
12528
12529         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
12530
12531 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
12532
12533         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
12534         * parse.c: Remove.
12535         * parse.h: Likewise.
12536
12537 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
12538
12539         * class.c (layout_class_type): Add pointers to virtual bases after
12540         base classes under the old ABI.
12541
12542 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
12543
12544         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
12545         (finish_continue_stmt): Likewise.
12546         (begin_for_stmt): Remove call to note_level_for_for.
12547         (finish_goto_stmt): Change call from build_min_nt
12548         to build_stmt.
12549         (finish_expr_stmt): Likewise.
12550         (begin_if_stmt): Likewise.
12551         (begin_while_stmt): Likewise.
12552         (finish_while_stmt): Likewise.
12553         (finish_return_stmt): Likewise.
12554         (begin_for_stmt): Likewise.
12555         (finish_for_stmt): Likewise.
12556         (finish_break_stmt): Likewise.
12557         (begin_switch_stmt): Likewise.
12558         (finish_case_label): Likewise.
12559         (genrtl_try_block): Likewise.
12560         (begin_try_block): Likewise.
12561         (begin_handler): Likewise.
12562         (begin_compound_stmt): Likewise.
12563         (finish_asm_stmt): Likewise.
12564         (finish_label_stmt): Likewise.
12565         (add_decl_stmt): Likewise.
12566         (finish_subobject): Likewise.
12567         (finish_decl_cleanup): Likewise.
12568         (finish_named_return_value): Likewise.
12569         (setup_vtbl_ptr): Likewise.
12570         (add_scope_stmt): Likewise.
12571         * decl.c (finish_constructor_body): Likewise.
12572         (finish_destructor_body): Likewise.
12573         * optimize.c (copy_body_r): Likewise.
12574         (initialize_inlined_parameters): Likewise.
12575         (declare_return_variable): Likewise.
12576         (expand_call_inline): Likewise.
12577
12578 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
12579
12580         * semantics.c (expand_body): Sync interface information
12581         at the end of function body expansion.
12582
12583 2000-07-09  Jason Merrill  <jason@redhat.com>
12584
12585         * init.c (build_new_1): Bail early if the call to new fails.
12586
12587         * decl.c (compute_array_index_type): Check specifically for
12588         an INTEGER_CST, not just TREE_CONSTANT.
12589
12590         * decl.c (duplicate_decls): Don't call duplicate_decls on
12591         the DECL_TEMPLATE_RESULT.
12592         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
12593         codes.
12594
12595         * error.c (dump_template_bindings): Don't crash if we had an
12596         invalid argument list.
12597
12598         * typeck.c (c_expand_start_case): Do narrowing here.
12599         * semantics.c (finish_switch_cond): Not here.
12600
12601 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
12602
12603         * parse.y (asm_clobbers): Do string concatenation.
12604
12605 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
12606
12607         * decl.c (pushtag): Don't put local classes in template functions
12608         on the local_classes list.
12609
12610 2000-07-04  Scott Snyder  <snyder@fnal.gov>
12611
12612         * decl2.c (get_guard): Add missing return for old ABI local
12613         variable case.
12614
12615 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
12616
12617         * cp-tree.h (char_type_p): New function.
12618         * decl.c (init_decl_processing): Don't initialize
12619         signed_wchar_type_node or unsigned_wchar_type_node.
12620         (complete_array_type): Handle brace-enclosed string-constants.
12621         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
12622         * tree.c (char_type_p): New function.
12623         * typeck2.c (digest_init): Use char_type_p.
12624
12625 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
12626
12627         * pt.c (tsubst): Don't layout type, if it's error_mark.
12628
12629 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
12630
12631         * pt.c (instantiate_pending_templates): Reset template level.
12632
12633 2000-07-05  Jason Merrill  <jason@redhat.com>
12634
12635         * call.c (joust): Don't complain about `operator char *()' beating
12636         `operator const char *() const'.
12637
12638 2000-07-04  scott snyder  <snyder@fnal.gov>
12639             Jason Merrill  <jason@redhat.com>
12640
12641         * repo.c (repo_get_id): Handle the case where a class with virtual
12642         bases has a null TYPE_BINFO_VTABLE.
12643
12644 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
12645             Jason Merrill  <jason@redhat.com>
12646
12647         * parse.y (member_init): Just pass in the type.
12648         * init.c (expand_member_init): Handle getting a type.
12649
12650 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12651             Jason Merrill  <jason@redhat.com>
12652
12653         * decl.c (finish_function): Warn if a function has no return
12654         statement.
12655         Suggested by Andrew Koenig.
12656         * typeck.c (check_return_expr): Do set current_function_returns_value
12657         if we got an error_mark_node.
12658
12659 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
12660
12661         * decl2.c (push_decl_namespace): Push the original namespace.
12662
12663 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
12664
12665         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
12666         * semantics.c (begin_class_definition): Clear it.
12667
12668 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
12669
12670         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
12671         (genrtl_expr_stmt): Likewise.
12672         (genrtl_decl_stmt): Likewise.
12673         (genrtl_if_stmt): Likewise.
12674         (genrtl_while_stmt): Likewise.
12675         (genrtl_do_stmt): Likewise.
12676         (genrtl_return_stmt): Likewise.
12677         (genrtl_for_stmt): Likewise.
12678         (genrtl_break_stmt): Likewise.
12679         (genrtl_continue_stmt): Likewise.
12680         (genrtl_scope_stmt): Likewise.
12681         (genrtl_switch_stmt): Likewise.
12682         (genrtl_case_label): Likewise.
12683         (genrtl_begin_compound_stmt): Likewise.
12684         (genrtl_finish_compound_stmt): Likewise.
12685         (genrtl_compound_stmt): Likewise.
12686         (genrtl_asm_stmt): Likewise.
12687
12688         * init.c (begin_init_stmts): Remove call to
12689         genrtl_begin_compound_stmt.
12690         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
12691
12692         * semantics.c (lang_expand_stmt): Changed call to
12693         genrtl_compound_stmt to ignore return value.
12694
12695 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
12696
12697         * mangle.c (canonicalize_for_substitution): Return the canonical
12698         variant of a type.
12699
12700         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
12701         TYPE_DECL.
12702         * typeck.c (commonparms): Remove obstack manipulations.
12703
12704 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
12705
12706         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
12707
12708         * Makefile.in (OBJS): Added ../c-semantics.o.
12709         (OBJDEPS): Likewise.
12710
12711         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
12712         ../c-common.h.
12713         (struct stmt_tree): Added comment.
12714         (current_function_name_declared): Removed.
12715         (stmts_are_full_exprs_p): Likewise.
12716         (genrtl_do_pushlevel): Likewise.
12717         (genrtl_clear_out_block): Likewise.
12718         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
12719         (DECL_ANON_UNION_ELEMS): Likewise.
12720         (emit_local_var): Likewise.
12721         (make_rtl_for_local_static): Likewise.
12722         (do_case): Likewise.
12723         (expand_stmt): Likewise.
12724         (genrtl_decl_cleanup): Likewise.
12725         (c_expand_asm_operands): Likewise.
12726         (c_expand_return): Likewise.
12727         (c_expand_start_case): Likewise.
12728
12729         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
12730         (emit_local_var): Likewise.
12731         (initialize_local_var): Change reference to
12732         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
12733         Change reference to stmts_are_full_exprs_p to
12734         current_stmt_tree->stmts_are_full_exprs_p.
12735         (push_cp_function_context): Likewise.
12736
12737         * expect.c (expand_throw): Change reference to
12738         stmts_are_full_exprs_p.
12739
12740         * init.c (build_aggr_init): Change reference to
12741         stmts_are_full_exprs_p.
12742         (build_vec_init): Likewise.
12743
12744         * optimize.c (maybe_clone_body): Change reference to
12745         current_function_name_declared to
12746         cp_function_chain->name_declared.
12747
12748         * pt.c (instantiate_decl): Change reference to
12749         current_function_name_declared to
12750         cp_function_chain->name_declared.
12751
12752         * semantics.c (expand_cond): Moved declaration to c-common.h.
12753         (genrtl_do_pushlevel): Moved to c-semantics.c.
12754         (genrtl_clear_out_block): Likewise.
12755         (genrtl_goto_stmt): Likewise.
12756         (genrtl_expr_stmt): Likewise.
12757         (genrtl_decl_stmt): Likewise.
12758         (gerntl_if_stmt): Likewise.
12759         (genrtl_while_stmt): Likewise.
12760         (genrtl_do_stmt): Likewise.
12761         (genrtl_return_stmt): Likewise.
12762         (genrtl_for_stmt): Likewise.
12763         (genrtl_break_stmt): Likewise.
12764         (genrtl_continue_stmt): Likewise.
12765         (genrtl_scope_stmt): Likewise.
12766         (genrtl_switch_stmt): Likewise.
12767         (genrtl_case_label): Likewise.
12768         (genrtl_begin_compound_stmt): Likewise.
12769         (genrtl_finish_compound_stmt): Likewise.
12770         (genrtl_compound_stmt): Likewise.
12771         (genrtl_asm_stmt): Likewise.
12772         (genrtl_decl_cleanup): Likewise.
12773         (expand_cond): Likewise.
12774         (expand_stmt): Renamed to ...
12775         (lang_expand_stmt): ... this.
12776         (lang_expand_expr_stmt): Initialize.
12777         (set_current_function_name_declared): Likewise.
12778         (stmts_are_full_exprs_p): Likewise.
12779         (current_function_name_declared): Likewise.
12780         (anon_aggr_type_p): Likewise.
12781         (do_poplevel): Change reference to
12782         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
12783         Change reference to stmts_are_full_exprs_p to
12784         current_stmt_tree->stmts_are_full_exprs_p.
12785         (add_tree): Likewise.
12786         (finish_expr_stmt): Likewise.
12787         (prep_stmt): Likewise.
12788         (lang_expand_stmt): Likewise.
12789         (begin_compound_stmt): Change reference to
12790         current_function_name_declared to
12791         cp_function_chain->name_declared and call to
12792         current_function_name_declared().
12793         (setup_vtbl_ptr): Likewise.
12794         (genrtl_do_poplevel): Removed.
12795
12796 2000-06-30  Jason Merrill  <jason@redhat.com>
12797
12798         * init.c (init_init_processing): Go back to aligning like
12799         double_type_node for old ABI.
12800         (get_cookie_size): Make cookie larger if we get a type that needs
12801         more alignment.
12802         (build_vec_delete): Call it.
12803
12804         * typeck.c (qualify_type_recursive): New fn.
12805         (composite_pointer_type): Use it.
12806         (build_binary_op): Use composite_pointer_type.
12807
12808 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
12809             Jason Merrill  <jason@redhat.com>
12810
12811         * typeck.c (check_return_expr): Don't complain about returning
12812         NULL from operator new if -fcheck-new.
12813         * cp-tree.h: Declare flag_check_new here.
12814         * init.c: Not here.
12815
12816 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
12817
12818         * mangle.c (find_substitution): Use same_type_p.
12819         (write_encoding): Don't check for substitutions.
12820
12821 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
12822
12823         * parse.y (expr_no_comma_rangle): New non-terminal.
12824         (template_parm): Use it for default parameter case.
12825         (template_arg): Use it.
12826         (expr_no_commas): Remove commented out undefined extensions.
12827         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
12828         * parse.h, parse.c: Rebuilt.
12829
12830 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
12831
12832         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
12833         (finish_asm_stmt): Do it here, instead.
12834
12835         * cp-tree.h (ridpointers): Don't declare.
12836         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
12837         (record_builtin_java_type): Likewise.
12838         (init_decl_processing): Likewise.
12839         * lex.c: Move inclusion of lex.h.
12840         (ridpointers): Don't define.
12841         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
12842         RID_MAX.
12843         * lex.h (enum rid): Rename to ...
12844         (enum cp_rid): ... this.
12845         (ridpointers): Don't declare.
12846         * parse.y: Move inclusion of lex.h.
12847         * parse.c: Regenerated.
12848         * spew.c: Move inclusion of lex.h.
12849
12850         * cp-tree.h (struct language_function): Remove temp_name_counter.
12851         (temp_name_counter): Remove.
12852         (get_temp_name): Change prototype.
12853         (get_guard): New function.
12854         (get_guard_cond): Likewise.
12855         (set_guard): Likewise.
12856         * cvt.c (build_up_reference): Adjust call to get_temp_name.
12857         * decl.c (expand_static_init): Use get_guard and friends to
12858         implement guard variables.
12859         * decl2.c (get_temp_name): Assume that the variables created are
12860         always static.
12861         (get_sentry): Rename to ...
12862         (get_guard): ... this.  Implement new ABI guard variables.
12863         (get_guard_bits): New function.
12864         (get_guard_cond): Likewise.
12865         (set_guard): Likewise.
12866         (start_static_initialization_or_destruction): Use them.
12867         (do_static_initialization): Replace sentry with guard throughout.
12868         (do_static_destruction): Likewise.
12869         * init.c (create_temporary_var): Add comment.
12870
12871 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
12872
12873         * mangle.c (find_substitution): Use same_type_p.
12874         (write_encoding): Don't check for substitutions.
12875
12876 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
12877
12878         * parse.y (expr_no_comma_rangle): New non-terminal.
12879         (template_parm): Use it for default parameter case.
12880         (template_arg): Use it.
12881         (expr_no_commas): Remove commented out undefined extensions.
12882         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
12883         * parse.h, parse.c: Rebuilt.
12884
12885 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
12886
12887         * cp-tree.h (flag_const_strings): Remove.
12888         (warn_parentheses): Likewise.
12889         (warn_format): Likewise.
12890         (common_type): Likewise.
12891         (default_conversion): Likewise.
12892         (build_binary_op): Likewise.
12893         (cp_build_binary_op): New macro.
12894         * call.c (build_new_op): Use cp_build_binary_op instead of
12895         build_binary_op.
12896         * class.c (build_vtable_entry_ref): Likewise.
12897         * decl.c (expand_static_init): Likewise.
12898         (compute_array_index_type): Likewise.
12899         (build_enumerator): Likewise.
12900         * decl2.c (delete_sanity): Likewise.
12901         (start_static_initialization_or_destruction): Likewise.
12902         * error.c (dump_type_suffix): Likewise.
12903         * init.c (resolve_offset_ref): Likewise.
12904         (build_new): Likewise.
12905         (build_new_1): Likewise.
12906         (build_vec_delete_1): Likewise.
12907         (build_vec_init): Likewise.
12908         (build_delete): Likewise.
12909         * rtti.c (synthesize_tinfo_fn): Likewise.
12910         (synthesize_tinfo_var): Likewise.
12911         * search.c (expand_upcast_fixups): Likewise.
12912         (fixup_all_virtual_upcast_offsets): Likewise.
12913         * typeck.c (build_array_ref): Likewise.
12914         (get_member_function_from_ptrfunc): Likewise.
12915         (build_binary_op): Add parameter.
12916         (pointer_int_sum): Use cp_build_binary_op.
12917         (pointer_diff): Likewise.
12918         (build_modify_expr): Likewise.
12919         (get_delta_difference): Likewise.
12920         (build_ptrmemfunc): Likewise.
12921
12922 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
12923
12924         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
12925         * decl.c (create_implicit_typedef): Adjust.
12926         * decl2.c (build_artificial_parm): Adjust.
12927         * method.c (implicitly_declare_fn): Adjust.
12928         * pt.c (push_inline_template_parms_recursive): Adjust.
12929         (process_template_parm): Adjust.
12930         (overloaded_template_name): Adjust.
12931         * semantics.c (finish_template_template_parm): Adjust.
12932
12933 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
12934
12935         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
12936         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
12937         where to emit thunks.
12938         (build_vtt): Adjust call to build_vtt_inits.
12939         (build_vtt_inits): Add parameter to indicate whether or not
12940         sub-VTTs for virtual bases should be included.  Adjust handling of
12941         construction vtables.
12942         (get_matching_base): New function.
12943         (dfs_build_vtt_inits): Rename to ...
12944         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
12945         construction vtables.
12946         (dfs_fixup_binfo_vtbls): Likewise.
12947         (build_ctor_vtbl_groups): Build construction vtables for virtual
12948         bases, too.
12949         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
12950         to build construction vtbls.
12951         (dfs_accumulate_vtbl_inits): Adjust handling of
12952         construction vtables.
12953
12954         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
12955         types correctly.
12956
12957 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
12958
12959         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
12960
12961 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
12962
12963         * search.c (hides): Remove.
12964         (is_subobject_of_p): Add most_derived parameter. Use
12965         CANONICAL_BINFO.
12966         (lookup_field_queue_p): Adjust.
12967         (lookup_field_r): Adjust.
12968
12969 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
12970
12971         * decl2.c (handle_class_head): Bash typedefs to the type's main
12972         decl.
12973
12974 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
12975
12976         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
12977         (begin_global_stmt_expr): ... this.
12978         (genrtl_finish_stmt_expr): Rename to ...
12979         (finish_global_stmt_expr): ... this.
12980         * init.c (begin_init_stmts): Adjust calls.
12981         (finish_init_stmts): Likewise.
12982         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
12983         (begin_global_stmt_expr): ... this.
12984         (genrtl_finish_stmt_expr): Rename to ...
12985         (finish_global_stmt_expr): ... this.
12986
12987 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12988
12989         * search.c (lookup_member): Fix typo in comment.
12990
12991 2000-06-24  Jason Merrill  <jason@redhat.com>
12992
12993         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
12994         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
12995
12996 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12997
12998         * parse.y (complex_direct_notype_declarator): Support global_scope.
12999         * Makefile.in: Adjust conflict count.
13000
13001 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13002
13003         * parse.y (template_arg): Convert TEMPLATE_DECL
13004         that is a template template parameter to
13005         TEMPLATE_TEMPLATE_PARM here.
13006
13007         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
13008         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
13009         (copy_template_template_parm): Adjust prototype.
13010         * decl.c (grokdeclarator): Remove dead code.
13011         * pt.c (process_template_parm): Tidy.
13012         (lookup_template_class): Construct nodes in
13013         copy_template_template_parm.
13014         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
13015         lookup_template_class.  Use TYPE_TI_TEMPLATE.
13016         * tree.c (copy_template_template_parm): Add NEWARGS
13017         parameter.
13018         (mapcar): Adjust call to copy_template_template_parm.
13019         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
13020         * method.c (build_template_template_parm_names): Change error
13021         code to avoid compilation warning.
13022
13023         * gxxint.texi: Document template template parameter
13024         name mangling.
13025
13026 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
13027
13028         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
13029         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
13030         (cp-demangle.o): New rule.
13031         (dyn-string.o): Likewise.
13032         * inc/cxxabi.h (__cxa_demangle): New declaration.
13033
13034 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
13035
13036         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
13037         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
13038         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
13039         a tree, not an int.
13040         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
13041         (make_thunk): Change prototype.
13042         (emit_thunk): Rename to use_thunk.
13043         (mangle_thunk): Change prototype.
13044         * class.c (get_derived_offset): Simplify.
13045         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
13046         BV_GENERATE_THUNK_WITH_VTABLE_P.
13047         (build_primary_vtable): Simplify.
13048         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
13049         (dfs_find_base): Remove.
13050         (update_vtable_entry_for_fn): Correct bug in finding the base
13051         where a virtual function was first declared.  Figure out whether
13052         or not to emit a vcall-thunk with the vtables in which it appears.
13053         Correct logic for deciding whether to use an ordinary thunk, or a
13054         vcall thunk.
13055         (finish_struct_1): Remove unnecssary code.
13056         (build_vtbl_initializer): Use ssize_int for the running counter of
13057         negative indices.
13058         (build_vtbl_initializer): Only use vcall thunks where necessary.
13059         Mark thunks as needing to be emitted with their vtables, or not.
13060         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
13061         indices.  Use size_binop.
13062         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
13063         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
13064         size_binop.
13065         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
13066         (build_vtable_entry): Mark thunks as needing to be emitted with
13067         their vtables, or not.
13068         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
13069         * decl2.c (mark_vtable_entries): Use use_thunk instead of
13070         emit_thunk.
13071         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
13072         information.
13073         * error.c (dump_expr): Use BV_FN.
13074         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
13075         not an int.
13076         * method.c (make_thunk): Likewise.
13077         (emit_thunk): Rename to use_thunk.  Allow callers to decide
13078         whether or not to actually emit the thunk.  Adjust for changes in
13079         representation of vcall offsets.
13080         * search.c (dfs_get_pure_virtuals): Use BV_FN.
13081         * semantics.c (emit_associated_thunks): New function.
13082         (expand_body): Use it.
13083         * ir.texi: Adjust decriptions of thunks.
13084
13085 2000-06-22  Jason Merrill  <jason@redhat.com>
13086
13087         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
13088         (tsubst_friend_function): Copy it here.
13089
13090         * decl.c (grok_op_properties): Fix typo.
13091
13092         * decl2.c (delete_sanity): Clarify warning, avoid failure on
13093         deleting void*.
13094
13095         * pt.c (check_explicit_specialization): Clarify error.
13096
13097         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
13098         an old OVERLOAD when we're declaring a non-function.
13099         (pushdecl, destroy_local_var): Check for error_mark_node.
13100         (warn_extern_redeclared_static): Also bail early if
13101         we're a CONST_DECL.
13102         (push_overloaded_decl): Ignore an old error_mark_node.
13103
13104 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
13105
13106         * call.c (build_x_va_arg): Check if in a template decl.
13107         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
13108
13109 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13110
13111         * class.c (push_lang_context): TYPE_NAME gets you to the Java
13112         types DECLs.
13113         * decl.c (check_goto): Computed gotos assumed OK.
13114
13115 2000-06-20  Jason Merrill  <jason@redhat.com>
13116
13117         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
13118         for which we don't need to look for instantiations.
13119
13120 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
13121
13122         * parse.y (program): Always call finish_translation_unit.
13123         * parse.c, parse.h: Rebuilt.
13124
13125 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
13126
13127         * method.c: Don't include hard-reg-set.h.
13128
13129 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
13130
13131         * rtti.c (get_base_offset): Cope when vbase field is in a base.
13132
13133 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
13134
13135         * call.c (build_conditional_expr): Use VOID_TYPE_P.
13136         * cvt.c (cp_convert_to_pointer): Likewise.
13137         (convert_to_void): Likewise.
13138         * error.c (dump_expr): Likewise.
13139         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
13140         * init.c (build_delete): Likewise.
13141         * method.c (emit_thunk): Likewise.
13142         * optmize.c (declare_return_variable): Likewise.
13143         * rtti.c (get_tinfo_decl_dynamic): Likewise.
13144         (get_typeid): Likewise.
13145         (build_dynamic_cast_1): Likewise.
13146         * typeck.c (composite_pointer_type): Likewise.
13147         (common_type): Likewise.
13148         (build_indirect_ref): Likewise.
13149         (build_binary_op): Likewise.
13150         (build_x_compound_expr): Likewise.
13151         (check_return_expr): Likewise.
13152         * typeck2.c (add_exception_specifier): Likewise.
13153
13154         * mangle.c (write_method_parms): Use direct comparison for end
13155         of parmlist.
13156
13157 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
13158
13159         * cp-tree.h (genrtl_try_block): Declare function.
13160         (genrtl_handler): Likewise.
13161         (genrtl_catch_block): Likewise.
13162         (genrtl_ctor_stmt): Likewise.
13163         (genrtl_subobject): Likewise.
13164         (genrtl_decl_cleanup): Likewise.
13165         (genrtl_do_poplevel): Likewise.
13166         (genrtl_do_pushlevel): Likewise.
13167         (genrtl_clear_out_block): Likewise.
13168         (genrtl_goto_stmt): Likewise.
13169         (genrtl_expr_stmt): Likewise.
13170         (genrtl_decl_stmt): Likewise.
13171         (genrtl_if_stmt): Likewise.
13172         (genrtl_while_stmt): Likewise.
13173         (genrtl_do_stmt): Likewise.
13174         (genrtl_return_stmt): Likewise.
13175         (genrtl_for_stmt): Likewise.
13176         (genrtl_break_stmt): Likewise.
13177         (genrtl_continue_stmt): Likewise.
13178         (genrtl_scope_stmt): Likewise.
13179         (genrtl_switch_stmt): Likewise.
13180         (genrtl_case_label): Likewise.
13181         (genrtl_begin_compound_stmt): Likewise.
13182         (genrtl_finish_compound_stmt): Likewise.
13183         (genrtl_compound_stmt): Likewise.
13184         (genrtl_asm_stmt): Likewise.
13185         (genrtl_named_return_value): Likewise.
13186         (genrtl_begin_stmt_expr): Likewise.
13187         (genrtl_finish_stmt_expr): Likewise.
13188         (finish_for_stmt): Removed first argument.
13189         (finish_switch_stmt): Likewise.
13190
13191         * semantics.c (genrtl_try_block): Define function.
13192         (genrtl_handler): Likewise.
13193         (genrtl_catch_block): Likewise.
13194         (genrtl_ctor_stmt): Likewise.
13195         (genrtl_subobject): Likewise.
13196         (genrtl_decl_cleanup): Likewise.
13197         (genrtl_do_poplevel): Likewise.
13198         (genrtl_do_pushlevel): Likewise.
13199         (genrtl_clear_out_block): Likewise.
13200         (genrtl_goto_stmt): Likewise.
13201         (genrtl_expr_stmt): Likewise.
13202         (genrtl_decl_stmt): Likewise.
13203         (genrtl_if_stmt): Likewise.
13204         (genrtl_while_stmt): Likewise.
13205         (genrtl_do_stmt): Likewise.
13206         (genrtl_return_stmt): Likewise.
13207         (genrtl_for_stmt): Likewise.
13208         (genrtl_break_stmt): Likewise.
13209         (genrtl_continue_stmt): Likewise.
13210         (genrtl_scope_stmt): Likewise.
13211         (genrtl_switch_stmt): Likewise.
13212         (genrtl_case_label): Likewise.
13213         (genrtl_begin_compound_stmt): Likewise.
13214         (genrtl_finish_compound_stmt): Likewise.
13215         (genrtl_compound_stmt): Likewise.
13216         (genrtl_asm_stmt): Likewise.
13217         (genrtl_named_return_value): Likewise.
13218         (genrtl_begin_stmt_expr): Likewise.
13219         (genrtl_finish_stmt_expr): Likewise.
13220         (finish_for_stmt): Removed first argument and generate rtl
13221         specific code.
13222         (finish_switch_stmt): Likewise.
13223         (do_poplevel): Removed generate rtl specific code.
13224         (do_pushlevel): Likewise.
13225         (add_tree): Likewise.
13226         (finish_goto_stmt): Likewise.
13227         (finish_expr_stmt): Likewise.
13228         (begin_if_stmt): Likewise.
13229         (finish_if_stmt_cond): Likewise.
13230         (finish_then_clause): Likewise.
13231         (begin_else_clause): Likewise.
13232         (finish_else_clause): Likewise.
13233         (finish_if_stmt): Likewise.
13234         (clear_out_block): Likewise.
13235         (begin_while_stmt): Likewise.
13236         (finish_while_stmt_cond): Likewise.
13237         (finish_while_stmt): Likewise.
13238         (begin_do_stmt): Likewise.
13239         (finish_do_body): Likewise.
13240         (finish_do_stmt): Likewise.
13241         (finish_return_stmt): Likewise.
13242         (begin_for_stmt): Likewise.
13243         (finish_for_init_stmt): Likewise.
13244         (finish_for_cond): Likewise.
13245         (finish_for_expr): Likewise.
13246         (finish_break_stmt): Likewise.
13247         (finish_continue_stmt): Likewise.
13248         (begin_switch_stmt): Likewise.
13249         (finish_switch_cond): Likewise.
13250         (finish_case_label): Likewise.
13251         (begin_try_block): Likewise.
13252         (begin_function_try_block): Likewise.
13253         (finish_try_block): Likewise.
13254         (finish_cleanup_try_block): Likewise.
13255         (finish_cleanup): Likewise.
13256         (finish_function_try_block): Likewise.
13257         (finish_handler_sequence): Likewise.
13258         (finish_function_handler_sequence): Likewise.
13259         (begin_handler): Likewise.
13260         (finish_handler_parms): Likewise.
13261         (begin_catch_block): Likewise.
13262         (finish_handler): Likewise.
13263         (begin_compound_stmt): Likewise.
13264         (finish_compound_stmt): Likewise.
13265         (finish_asm_stmt): Likewise.
13266         (finish_label_stmt): Likewise.
13267         (finish_label_decl): Likewise.
13268         (finish_subobject): Likewise.
13269         (finish_decl_cleanup): Likewise.
13270         (finish_named_return_value): Likewise.
13271         (begin_stmt_expr): Likewise.
13272         (finish_stmt_expr): Likewise.
13273
13274         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
13275         to call genrtl_expr_stmt when appropriate.
13276
13277         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
13278         begin_compound_expr to call genrtl_begin_stmt_expr and
13279         genrtl_begin_compound_expr when appropriate.
13280         (finish_init_stmts): Changed calls to finish_compound_expr and
13281         finish_stmt_expr to call genrtl_finish_compound_expr and
13282         genrtl_finish_stmt_expr when appropriate.
13283         (expand_default_init): Changed call to finish_expr_stmt to call
13284         genrtl_expr_stmt when appropriate.
13285         (build_vec_init): Likewise.
13286
13287         * parse.y (simple_stmt): Removed first argument from call to
13288         finish_for_stmt. Removed first argument from call to
13289         finish_switch_stmt.
13290
13291         * parse.c: Regenerated.
13292
13293         * pt.c (tsubst_expr): Removed first argument from call to
13294         finish_for_stmt. Removed first argument from call to
13295         finish_switch_stmt.
13296
13297 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
13298
13299         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
13300         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
13301
13302         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
13303         (cplus_tree_code_length[]): Likewise.
13304         (cplus_tree_code_name[]): Likewise.
13305         (init_parse): Added call to add_c_tree_codes. Changed
13306         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
13307
13308 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
13309
13310         * cp-tree.h (finish_mem_initializers): Declare.
13311         (count_trees): Likewise.
13312         * parse.y (base_init): Use finish_mem_initializers.
13313         * semantics.c (finish_mem_initializers): New function.
13314
13315         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
13316         the number of trees.
13317         (n_trees): Remove.
13318         (count_trees): Don't use it.
13319
13320 2000-06-15  Jason Merrill  <jason@redhat.com>
13321
13322         * tree.c (count_trees): New debugging function.
13323
13324         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
13325         * init.c (build_member_call): Pull out the name of a DECL.
13326
13327         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
13328         * semantics.c (expand_body): Push to TV_INTEGRATION here.
13329         * optimize.c (optimize_function): Not here.
13330         * pt.c (instantiate_decl): Push to TV_PARSE.
13331
13332 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
13333
13334         * cp-tree.h (struct language_function): Remove x_base_init_list
13335         and x_member_init_list.
13336         (current_base_init_list): Remove.
13337         (current_member_init_list): Likewise.
13338         (setup_vtbl_ptr): Change prototype.
13339         (emit_base_init): Likewise.
13340         (expand_member_init): Likewise.
13341         (reinit_parse_for_function): Remove.
13342         * decl.c (save_function_data): Don't clear x_base_init_list and
13343         x_member_init_list.
13344         (mark_language_function): Don't mark them.
13345         * init.c (perform_member_init): Tweak comment.
13346         (sort_member_init): Take the list of initializers as an argument.
13347         (sort_base_init): Likewise.
13348         (emit_base_init): Likewise.
13349         (expand_member_init): Return the initializer.  Don't use global
13350         variables.
13351         * lex.c (reinit_parse_for_function): Remove.
13352         * method.c (build_template_parm_names): Correct substitution.
13353         (do_build_copy_constructor): Don't use current_member_init_list
13354         and current_base_init_list.
13355         (synthesize_method): Likewise.
13356         * parse.y (base_init): Split mem-initializers into
13357         base-initializers and field-initializers.
13358         (member_init_list): Build up the list here.
13359         (member_init): Return the initializer.
13360         (fn.depfn): Don't use reinit_parse_for_function.
13361         * parse.c: Regenerated.
13362         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
13363         ERROR_MARK.
13364         (tsubst_expr): Don't use current_member_init_list
13365         and current_base_init_list.
13366         (tsubst_expr_values): Rename to ...
13367         (tsubst_initializer_list): ... this.  Use convert_from_reference.
13368         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
13369         and current_base_init_list.
13370         (begin_function_definition): Don't call reinit_parse_for_function.
13371
13372         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
13373
13374         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
13375         correctly.
13376
13377         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
13378
13379 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
13380
13381         * cp-tree.h (IF_COND): Move to c-common.h.
13382         (THEN_CLAUSE): Likewise.
13383         (ELSE_CLAUSE): Likewise.
13384         (WHILE_COND): Likewise.
13385         (WHILE_BODY): Likewise.
13386         (DO_COND): Likewise.
13387         (DO_BODY): Likewise.
13388         (RETURN_EXPR): Likewise.
13389         (EXPR_STMT_EXPR): Likewise.
13390         (FOR_INIT_STMT): Likewise.
13391         (FOR_COND): Likewise.
13392         (FOR_EXPR): Likewise.
13393         (FOR_BODY): Likewise.
13394         (SWITCH_COND): Likewise.
13395         (SWITCH_BODY): Likewise.
13396         (CASE_LOW): Likewise.
13397         (CASE_HIGH): Likewise.
13398         (GOTO_DESTINATION): Likewise.
13399         (COMPOUND_BODY): Likewise.
13400         (ASM_CV_QUAL): Likewise.
13401         (ASM_STRING): Likewise.
13402         (ASM_OUTPUTS): Likewise.
13403         (ASM_INPUTS): Likewise.
13404         (ASM_CLOBBERS): Likewise.
13405         (DECL_STMT_DECL): Likewise.
13406         (STMT_EXPR_STMT): Likewise.
13407         (LABEL_STMT_LABEL): Likewise.
13408         (SCOPE_BEGIN_P): Likewise.
13409         (SCOPE_END_P): Likewise.
13410         (SCOPE_STMT_BLOCK): Likewise.
13411         (SCOPE_NULLIFIED_P): Likewise.
13412         (SCOPE_NO_CLEANUPS_P): Likewise.
13413         (SCOPE_PARTIAL_P): Likewise.
13414         (ASM_VOLATILE_P): Likewise.
13415         (STMT_LINENO): Likewise.
13416         (STMT_LINENO_FOR_FN_P): Likewise.
13417
13418         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
13419         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
13420         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
13421         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
13422         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
13423
13424         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
13425
13426         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
13427         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
13428
13429         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
13430         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
13431         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
13432
13433 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
13434
13435         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
13436         * class.c (dfs_find_final_overrider): Set it appropriately.
13437         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
13438         avoid unneeded secondary vptrs.
13439
13440 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
13441
13442         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
13443         (check_bitfield_decl, check_field_decl): Likewise.
13444         (build_vtbl_or_vbase_field, build_base_field): Likewise.
13445         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
13446         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
13447         (xfer_tag, finish_enum): Likewise.
13448         * decl2.c (finish_builtin_type): Likewise.
13449         * init.c (init_init_processing): Likewise.
13450         * pt.c (instantiate_class_template): Likewise.
13451         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
13452         * cp-tree.h (struct lang_type): Add user_align member.
13453         (CLASSTYPE_USER_ALIGN): Define.
13454
13455 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
13456
13457         * Make-lang.in (c++.install-common): Install g++-cross in
13458         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
13459         $(target_alias)-g++ and $(target_alias)-c++.
13460
13461 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
13462
13463         * class.c (vcall_offset_data_s): Add last_init and fns.
13464         (overrides): Rename to same_signature_p.
13465         (dfs_find_final_overrider): Adjust accordingly.
13466         (mark_overriders): Likewise.
13467         (warn_hidden): Likewise.
13468         (build_vtbl_initializer): Reorganize machinery for building things
13469         at negative offsets.
13470         (build_vcall_and_vbase_vtbl_entries): Likewise.
13471         (build_vbase_offset_vtbl_entries): Likewise.
13472         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
13473         offset entries.  Do not create two entries for functions with the
13474         same signature.
13475         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
13476         (build_rtti_vtbl_entries): Reorganize machinery for building things
13477         at negative offsets.
13478
13479         * optimize.c (expand_call_inline): Don't recurse into the code
13480         used to initialize the parameters more than once.
13481
13482 2000-06-11  Mark Mitchell <mark@codesourcery.com>
13483
13484         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
13485         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
13486         (find_substitution): Only use the `Sa' substitution for
13487         std::allocator, not instantiations of it.
13488         (write_template_prefix): Move comment.  Only use a TREE_LIST to
13489         represent substitutions for a member template.
13490         (write_array_type): Mangle array dimensions correctly.
13491         * optimize.c (maybe_clone_body): Copy more information from the
13492         cloned function.
13493         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
13494         on the regenerated declaration.
13495
13496 2000-06-11  Chip Salzenberg  <chip@valinux.com>
13497             Mark Mitchell <mark@codesourcery.com>
13498
13499         * class.c (build_vtable): Clarify comment.
13500         (build_ctor_vtbl_group): Pass the most derived type to
13501         build_vtable.
13502
13503 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13504
13505         * decl2.c (compare_options): Don't needlessly cast away const-ness.
13506
13507 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
13508
13509         * decl.c (add_binding): Handle duplicate declarations of external
13510         variables.
13511
13512 2000-06-09  Chip Salzenberg  <chip@valinux.com>
13513             Mark Mitchell <mark@codesourcery.com>
13514
13515         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
13516         argument.
13517         (write_signed_number): New macro.
13518         (write_unsigned_number): Likewise.
13519         (write_source_name): Use them.
13520         (write_number): Handle signed and unsigned values.
13521         (write_integer_cst): Use tree_int_cst_sgn, and use
13522         write_unsigned_number or write_signed_number as appropriate.
13523         (write_discriminator): Use write_unsigned_number or
13524         write_signed_number as appropriate.
13525         (write_template_arg_literal): Likewise.
13526         (write_array_type): Use tree_low_cst.
13527         (write_template_parm):  Use write_unsigned_number or
13528         write_signed_number as appropriate.
13529         (write_substitution): Adjust call to write_number.
13530         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
13531         (write_expression): Handle non-type template arguments of
13532         reference type correctly.
13533         (mangle_thunk): Use write_signed_number.
13534
13535 2000-06-09  Chip Salzenberg  <chip@valinux.com>
13536
13537         * mangle.c (find_substition): Don't mangle objects with typename
13538         substitutions (e.g. "cin" as "Si").
13539
13540 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
13541
13542         * call.c (add_candidate): Use ggc_alloc_cleared.
13543         * decl.c (lookup_label): Likewise.
13544         * lex.c (retrofit_lang_decl): Likewise.
13545
13546 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
13547
13548         * semantics.c (expand_body): Push to TV_EXPAND.
13549         * optimize.c (optimize_function): Push to TV_INTEGRATION.
13550         * decl.c (start_function): Always call announce_function.
13551
13552         * tinfo2.cc: Just declare abort.
13553
13554 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
13555
13556         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
13557         whenever @ is a symbolic name.
13558
13559 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
13560
13561         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
13562
13563 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
13564
13565         * decl.c (pushdecl): Look up functions by DECL_NAME, not
13566         DECL_ASSEMBLER_NAME.
13567
13568 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
13569
13570         * decl2.c (c_language): Define.
13571
13572 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
13573
13574         * lex.c (lang_init_options): Tweak.
13575
13576         * decl2.c: Remove #inclusion of diagnostic.h
13577         (lang_decode_option): Move diagnostic formatting options to
13578         toplevel.
13579
13580         * lang-options.h: Remove documentation for diagnostic options.
13581
13582         * Makefile.in (lex.o): Depends upon diagnostic.h
13583
13584 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
13585
13586         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
13587         the same DECL_RESULT, it's not a redefinition.
13588         * pt.c (tsubst_decl): Remove code to handle illegal
13589         specializations.
13590
13591 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
13592
13593         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
13594
13595 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
13596
13597         * search.c (maybe_suppress_debug_info): Don't check
13598         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
13599
13600         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
13601         here if extern_p.
13602
13603         Remember instantiation context in deferred instantiations.
13604         * cp-tree.h (struct tinst_level): Remove.
13605         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
13606         * pt.c (current_tinst_level): Now a tree.
13607         (print_template_context, push_tinst_level, pop_tinst_level,
13608         tinst_for_decl): Adjust.
13609         (reopen_tinst_level): New fn.
13610         (init_pt): Register current_tinst_level as a root.
13611         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
13612         of the pending templates list.
13613         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
13614         * lex.c (extract_interface_info): Adjust.
13615         * decl2.c (warn_if_unknown_interface): Adjust.
13616
13617 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
13618
13619         * class.c (indirect_primary_base_p): New function.
13620         (determine_primary_base): Use it.
13621
13622 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
13623
13624         Update new-abi dynamic cast algorithm.
13625         * tinfo.cc (__class_type_info::__dyncast_result): Add
13626         whole_details. Adjust constructor.
13627         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
13628         Avoid unnecessary searching.
13629         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
13630
13631 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13632
13633         * decl.c (init_decl_processing): Don't call record_component_aliases.
13634         * tree.c (build_cplus_array_type_1): Likewise.
13635
13636 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
13637
13638         * ir.texi: Correct typo.
13639         * mangle.c (write_expression): Handle non-type template arguments
13640         with reference type.
13641         * method.c (build_overload_value): Likewise.
13642         * pt.c (convert_nontype_argument): Explicitly represent conversion
13643         to a reference with an ADDR_EXPR.
13644         (unify): Always unify arguments in left-to-right order.
13645
13646 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
13647             Mark Mitchell  <mark@codesourcery.com>
13648
13649         * Make-lang.in (CXX_SRCS): Add mangle.c.
13650         * Makefile.in (CXX_OBJS): Add mangle.o.
13651         (mangle.o): New rule.
13652
13653         * class.c (local_classes): New variable.
13654         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
13655         (get_vtt_name): Use mangle_vtt_name for new ABI.
13656         (init_class_processing): Initialize local_classes.
13657         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
13658         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
13659         (std_identifier): New macro.
13660         (DECL_VOLATILE_MEMFUNC_P): New macro.
13661         (DECL_NAMESPACE_STD_P): Likewise.
13662         (local_classes): Declare.
13663         (get_mostly_instantiated_function_type): Declare.
13664         (init_mangle): Declare.
13665         (mangle_decl): Likewise.
13666         (mangle_type_string): Likewise.
13667         (mangle_type): Likewise.
13668         (mangle_typeinfo_for_type): Likewise.
13669         (mangle_typeinfo_string_for_type): Likewise.
13670         (mangle_vtbl_for_type): Likewise.
13671         (mangle_vtt_for_type): Likewise.
13672         (mangle_ctor_vtbl_for_type): Likewise.
13673         (mangle_thunk): Likewise.
13674         (mangle_conv_op_name_for_type): Likewise.
13675         (mangle_guard_variable): Likewise.
13676         * decl.c (pushtag): Keep track of local classes.
13677         (initialize_predefined_identifiers): Initialize std_identifier.
13678         (init_decl_processing): Use std_identifier.
13679         (start_decl): Don't treat instantiations as specializations.
13680         (grokdeclarator): Likewise.
13681         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
13682         name for fully-instantiated templates.
13683         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
13684         destructors with the new ABI.
13685         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
13686         (grokfield): Use mangle_type for new ABI.
13687         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
13688         (get_sentry): Use mangle_guard_variable for new ABI.
13689         (start_static_initialization_or_destruction): Likewise.
13690         * expr.c (extract_aggr_init): Remove.
13691         (extract_scalar_init): Likewise.
13692         (extract_init): Remove #if 0'd code.
13693         * mangle.c: New function.
13694         * method.c (build_mangled_name): Assert not flag_new_abi.
13695         (build_static_name): Likewise.
13696         (build_decl_overload_real): Likewise.
13697         (build_typename_overload): Likewise.
13698         (build_overload_with_type): Likewise.
13699         (build_overload_name): Likewise.
13700         (get_ctor_vtbl_name): Likewise.
13701         (start_squangling): Likewise.
13702         (get_id_2): Likewise.
13703         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
13704         (init_method): Call init_mangle for new ABI.
13705         (make_thunk): Call mangle_thunk for new ABI.
13706         * operators.def: Correct new ABI manglings for the `%' operator.
13707         Add `::' operator.
13708         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
13709         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
13710         (lookup_template_class): Call mangle_decl for new ABI.
13711         (get_mostly_instantiated_function_type): New function.
13712         (set_mangled_name_for_template_decl): Use it.
13713         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
13714         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
13715         conversion op names.
13716         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
13717         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
13718         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
13719         mangle_typeinfo_string_for_type.
13720
13721 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
13722
13723         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
13724         (INNERMOST_TEMPLATE_ARGS): New macro.
13725         (innermost_args): Remove.
13726         (get_innermost_template_args): New function.
13727         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
13728         * error.c (dump_function_decl): Be caution when using
13729         most_general_template.
13730         * method.c (build_template_parm_names):  Use
13731         INNERMOST_TEMPLATE_ARGS.
13732         * pt.c (add_to_template_args): Tidy comment
13733         (get_innermost_template_args): New function.
13734         (check_explicit_specialization): Clear DECL_INITIAL for a new
13735         specialization.
13736         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
13737         Tidy.
13738         (push_template_decl): Always register specializations of the most
13739         general template.
13740         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
13741         (coerce_template_parms): Likewise.
13742         (lookup_template_class): Likewise.
13743         (innermost_args): Remove.
13744         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
13745         (tsubst_decl): Handle tricky specializations.  Use
13746         get_innermost_template_args.
13747         (instantiate_template): Simplify handling of partial
13748         instantiations.
13749         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
13750         (most_general_template): Reimplement, in a more straightforward
13751         manner.
13752         (regenerate_decl_from_template): Tweak formatting.  Use
13753         TMPL_ARGS_DEPTH for clarity.
13754         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
13755
13756         * dump.c (dequeue_and_dump): Dump information about thunks.
13757
13758 2000-06-01  Richard Henderson  <rth@cygnus.com>
13759
13760         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
13761
13762 2000-06-01  Richard Henderson  <rth@cygnus.com>
13763
13764         * decl2.c (unsupported_options): Fix typo, make const.
13765         (lang_decode_option): Fix bsearch argument order.
13766
13767 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
13768
13769         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
13770         on FIELD_DECLs.
13771
13772 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13773
13774         * cp-tree.h (c_get_alias_set): Deleted.
13775         * Makefile.in (decl.o): Include ../expr.h.
13776         * decl.c (expr.h): Include.
13777         (init_decl_processing): Call record_component_aliases for arrays.
13778         (grokdeclarator): Likewise.
13779         Set TREE_ADDRESSABLE for fields that aren't bitfields.
13780         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
13781
13782 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
13783
13784         Remove guiding declaration support.
13785         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
13786         (flag_guiding_decls): Remove.
13787         * call.c (build_user_type_conversion_1): Remove support for
13788         guiding decls.
13789         (build_new_function_call): Likewise.
13790         (build_new_op): Likewise.
13791         (build_new_method_call): Likewise.
13792         * decl.c (start_function): Likewise.
13793         * friend.c (is_friend): Likewise.
13794         (do_friend): Likewise.
13795         * decl2.c ((flag_dump_translation_unit): Make it const.
13796         (flag_guiding_decls): Remove.
13797         (unsupported_options): New variable
13798         (compare_options): New function.
13799         (lang_decode_option): Use them.
13800
13801         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
13802
13803         * method.c (mangle_expression): Adjust test for legal expression
13804         operators.
13805
13806         * pt.c (instantiate_decl): Save and restore the local
13807         specializations list.
13808
13809 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
13810
13811         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
13812
13813 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
13814
13815         * call.c (add_template_candidate_real): Handle member template
13816         constructors for classes with virtual bases.
13817         (build_user_type_conversion_1): Use in_charge_arg_for_name.
13818         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
13819
13820         * ir.texi: Update thunk documentation.
13821
13822         * call.c (joust): Fix handling of overloaded builtin operators.
13823
13824 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
13825
13826         * cp-tree.h (DECL_ANTICIPATED): New macro.
13827         Document new use of DECL_LANG_FLAG_7.
13828         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
13829         in the user namespace.
13830         * lex.c (do_identifier): If the identifier's declaration has
13831         DECL_ANTICIPATED on, it has not yet been declared.  But do not
13832         replace it with an ordinary implicit declaration.
13833
13834         * tinfo2.cc: Include stdlib.h.
13835
13836 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
13837
13838         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
13839         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
13840         CLASSTYPE_ALIGN.
13841
13842 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
13843
13844         * decl2.c (lang_decode_option): Use skip_leading_substring instead
13845         of plain strncmp.
13846
13847 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
13848
13849         * operators.def (<?): Duplicated, should have been...
13850         (>?): this.  Fixed.
13851
13852 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
13853             Mark Mitchell  <mark@codesourcery.com>
13854
13855         * cp-tree.h (ansi_opname): Make it a macro.
13856         (ansi_assopname): Likewise.
13857         (struct lang_decl_flags): Add assignment_operator_p.
13858         (struct lang_decl): Add operator_code.
13859         (DECL_VTT_PARM): Adjust.
13860         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
13861         overloaded operator.
13862         (SET_OVERLOADED_OPERATOR_CODE): New macro.
13863         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
13864         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
13865         (opname_tab): Remove.
13866         (assignop_tab): Likewise.
13867         (operator_name_info_t): New type.
13868         (operator_name_info): New variable.
13869         (assignment_operator_name_info): Likewise.
13870         (build_cp_library_fn): Remove declaration.
13871         (push_cp_library_fn): Likewise.
13872         (operator_name_string): Likewise.
13873         (build_decl_overload): Likewise.
13874         * call.c (print_z_candidates): Simplify.
13875         (build_object_call): Adjust usage of ansi_opname.  Use
13876         DECL_OVERLOADED_OPERATOR_P.
13877         (op_error): Adjust operator name lookup.
13878         (build_conditional_expr): Adjust usage of ansi_opname.
13879         (build_new_op): Likewise.
13880         (build_op_delete_call): Likewise.
13881         (build_over_call): Likewise.
13882         (joust): Use DECL_OVERLOADED_OPERATOR_P.
13883         * decl.c (duplicate_decls): Copy operator_code.
13884         (init_decl_processing): Adjust parameters to push_cp_library_fn.
13885         (builtin_function): Adjust parameters to build_library_fn_1.
13886         (build_library_fn_1): Accept an overloaded operator code.
13887         (build_library_fn): Pass ERROR_MARK.
13888         (build_cp_library_fn): Accept an overloaded operator code.
13889         (push_cp_library_fn): Likewise.
13890         (grokfndecl): Tweak.
13891         (grokdeclarator): Simplify code to compute names of overloaded
13892         operators.  Adjust use of ansi_opname.
13893         (ambi_op_p): Work on tree_codes, not identifiers.
13894         (unary_op_p): Likewise.
13895         (grok_op_properties): Likewise.
13896         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
13897         (lang_mark_tree): Don't try to mark the operator_code.
13898         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
13899         * error.c (dump_decl): Remove special handling for operator
13900         names.
13901         (dump_function_name): Likewise.
13902         (dump_expr): Adjust name lookup of operators.
13903         (op_to_string): Simplify.
13904         (assop_to_string): Likewise.
13905         * init.c (build_new_1): Adjust use of ansi_opname.
13906         * lex.c (opname_tab): Remove.
13907         (assignop_tab): Likewise.
13908         (ansi_opname): Likewise.
13909         (ansi_assopname): Likewise.
13910         (operator_name_string): Likewise.
13911         (reinit_lang_specific): Likewise.
13912         (operator_name_info): New variable.
13913         (assignment_operator_name_info): Likewise.
13914         (init_operators): New function.
13915         (init_parse): Use it.
13916         (do_identifier): Adjust use of ansi_opname.
13917         * method.c (mangle_expression): Don't use ansi_opname for
13918         mangling.
13919         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
13920         (build_decl_overload): Remove.
13921         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
13922         (do_build_assign_ref): Adjust use of ansi_opname.
13923         (synthesize_method): Likewise.
13924         (implicitly_declare_fn): Likewise.
13925         * operators.def: New file.
13926         * parse.y (operator): Adjust use of ansi_opname.
13927         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
13928         (set_mangled_name_for_template_decl): Don't play games with
13929         current_namespace.
13930         (special_function_p): Adjust use of ansi_opname.
13931         * typeck.c (check_return_expr): Likewise.
13932         * Make-lang.in (cc1plus): Depend on operators.def.
13933         * Makefile.in (lex.o): Likewise.
13934         (decl.o): Likewise.
13935
13936 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
13937
13938         * Make-lang.in (cplib2.ready): Eradicate.
13939
13940 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13941
13942         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
13943         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
13944         (built_min, cp_tree_equal): Likewise.
13945
13946 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
13947
13948         * class.c (layout_nonempty_base_or_field): Replace
13949         `record_layout_info' with `record_layout_info_s'.
13950
13951 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
13952
13953         Fix goto checking.
13954         * cp-tree.h (struct language_function): x_named_labels is now
13955         a struct named_label_list*.
13956         * decl.c (struct named_label_use_list): Renamed from...
13957         (struct named_label_list): ...this.  New struct.
13958         (push_binding_level): Don't set eh_region.
13959         (note_level_for_eh): New fn.
13960         (pop_label): Take label and old value directly.
13961         (pop_labels): Adjust for new named_labels format.
13962         (lookup_label): Likewise.
13963         (poplevel): Note characteristics of a binding level containing a
13964         named label.  Mess with named label lists earlier.
13965         (mark_named_label_lists): New fn.
13966         (mark_lang_function): Call it.
13967         (use_label): New fn, split out from...
13968         (make_label_decl): ...here.  Don't call it.
13969         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
13970         check_previous_gotos): New fns, split out from...
13971         (define_label): ...here.
13972         (check_switch_goto): New fn.
13973         (define_case_label): Call it.
13974         (check_goto): New fn.
13975         * semantics.c (finish_goto_stmt): Call it and use_label.
13976         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
13977         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
13978
13979 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
13980
13981         * class.c (build_vtable_entry_ref): Correct usage of
13982         get_vtbl_decl_for_binfo.
13983
13984         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
13985         * method.c (implicitly_declare_fn): Not here.
13986
13987 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
13988
13989         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
13990         (CPTI_PTMD_DESC_TYPE): ... here.
13991         (ptmd_desc_type_node): Rename to ...
13992         (ptm_desc_type_node): ... here.
13993         * decl.c: Likewise.
13994         * rtti.c (ptmd_initializer): Rename to ...
13995         (ptm_initializer): ... here.
13996         (sythesize_tinfo_var): Adjust. Deal with pointer to member
13997         function.
13998         (create_tinfo_types): Adjust.
13999
14000 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
14001
14002         Finish implementation of VTTs.
14003         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
14004         CPTI_VTT_PARM_IDENTIFIER.
14005         (vtt_parm_identifier): New macro.
14006         (vtt_parm_type): Likewise.
14007         (BINFO_SUBVTT_INDEX): Likewise.
14008         (BINFO_VPTR_INDEX): Likewise.
14009         (struct lang_decl): Add vtt_parm.
14010         (DECL_VTT_PARM): New macro.
14011         (DECL_USE_VTT_PARM): Likewise.
14012         (DECL_NEEDS_VTT_PARM_P): Likewise.
14013         (get_vtt_name): Declare.
14014         (build_artificial_parm): Likewise.
14015         (fixup_all_virtual_upcast_offsets): Likewise.
14016         (expand_indirect_vtbls_init): Remove.
14017         * call.c (build_new_method_call): Pass the vtt to subobject
14018         constructors and destructors.
14019         * class.c (get_vtt_name): Give it external linkage.
14020         (build_clone): Handle the magic VTT parameters for clones.
14021         (clone_function_decl): Fix typo in comment.
14022         (build_vtt): Keep track of the indices in the VTTs where various
14023         entities are stored.
14024         (build_vtt_inits): Likewise.
14025         (dfs_build_vtt_inits): Likewise.
14026         (build_ctor_vtbl_group): Tweak type of construction vtables.
14027         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
14028         primary bases, when building construction vtables.
14029         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
14030         (initialize_predefined_identifiers): Add vtt_parm_identifier.
14031         (init_decl_processing): Initialize vtt_parm_type.
14032         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
14033         (lang_mark_tree): Make vtt_parm.
14034         * decl2.c (build_artificial_parm): New function.
14035         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
14036         (grokclassfn): Use build_artificial_parm.
14037         * init.c (initialize_vtbl_ptrs): Call
14038         fixup_all_virtual_upcast_offsets directly.
14039         (perform_member_init): Use the complete subobject destructor for
14040         member cleanups.
14041         (build_vtbl_address): New function.
14042         (expand_virtual_init): Handle VTTs.
14043         * optimize (maybe_clone_body): Likewise.
14044         * search.c (fixup_all_virtual_upcast_offsets): Give it external
14045         linkage.
14046         (expand_indirect_vtbls_init): Remove.
14047         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
14048         * tree.c (make_binfo): Make them bigger.
14049
14050 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
14051
14052         * inc/cxxabi.h (__pbase_type_info): Define, based on
14053         __pointer_type_info.
14054         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
14055         (__pointer_to_member_type_info): Likewise.
14056         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
14057         (__pointer_to_member_type_info::__is_pointer_p): Remove.
14058         (__pointer_type_info::__do_catch): Rename to ...
14059         (__pbase_type_info::__do_catch): ... here. Adjust.
14060         (__pbase_type_info::__pointer_catch): Implement.
14061         (__pointer_type_info::__pointer_catch): Adjust.
14062         (__pointer_to_member_type_info::__pointer_catch): Adjust.
14063
14064 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
14065
14066         * tinfo.h (__user_type_info::contained_virtual_p): New
14067         predicate.
14068         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
14069         shaped hierarchy.
14070         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
14071         diamond shaped hierarchy. Add early out for mixed diamond and
14072         duplicate shaped hierarchy.
14073
14074 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
14075
14076         * cp-tree.h (build_delete): Change prototype.
14077         (build_vec_delete): Likewise.
14078         * call.c (build_scoped_method_call): Use special_function_kind
14079         values to indicate the kind of destruction to be done.
14080         (build_method_call): Likewise.
14081         * decl.c (finish_destructor_body): Likewise.
14082         (maybe_build_cleanup_1): Likewise.  Rename to ...
14083         (maybe_build_cleanup): ... this.
14084         * decl2.c (delete_sanity): Use special_function_kind
14085         values to indicate the kind of destruction to be done.
14086         (build_cleanup): Likewise.
14087         * init.c (perform_member_init): Likewise.
14088         (build_vec_delete_1): Likewise.
14089         (build_dtor_call): Simplify.
14090         (build_delete): Use special_function_kind
14091         values to indicate the kind of destruction to be done.
14092         (build_vbase_delete): Likewise.
14093         (build_vec_delete): Likewise.
14094
14095         * init.c (sort_member_init): Fix typo in error message generation
14096         code.
14097
14098 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
14099
14100         * semantics.c (begin_class_definition): make the packed
14101         attribute be sensitive to the "-fpack-struct" command line flag
14102
14103 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
14104
14105         Update new-abi upcast algorithm.
14106         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
14107         prototype and meaning of return value.
14108         (__si_class_type_info::__do_upcast): Likewise.
14109         (__vmi_class_type_info::__do_upcast): Likewise.
14110         * tinfo.cc (__class_type_info::__upcast_result): Replace
14111         whole2dst with part2dst. Adjust ctor.
14112         (__class_type_info::__do_upcast): Adjust call of worker function.
14113         (__class_type_info::__do_upcast): Adjust.
14114         (__si_class_type_info::__do_upcast): Adjust. Use parent's
14115         __do_upcast.
14116         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
14117         virtual base in diamond hierarchy bug.
14118
14119 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
14120
14121         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
14122         and bitfield to tinfo_fn_p.
14123         (DECL_TINFO_FN_P): Adjust.
14124         (SET_DECL_TINFO_FN_P): Likewise.
14125         (DECL_MUTABLE_P): Likewise.
14126         (DECL_C_BIT_FIELD): Likewise.
14127         (SET_DECL_C_BIT_FIELD): Likewise.
14128         (CLEAR_DECL_C_BIT_FIELD): Likewise.
14129         (DECL_UNINLINABLE): Likewise.
14130         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
14131         (handle_using_decl): Remove assertion.
14132         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
14133         to build FIELD_DECLs.
14134         (build_base_field): Likewise.
14135         (layout_class_type): Likewise.
14136         * decl.c (init_decl_processing): Likewise.
14137         (build_ptrmemfunc_type): Likewise.
14138         (grokdeclarator): Likewise.
14139         * decl2.c (grok_x_components): Likewise.
14140         * except.c (call_eh_info): Likewise.
14141         * init.c (init_init_processing): Likewise.
14142         * rtti.c (expand_class_desc): Likewise.
14143         (create_pseudo_type_info): Likewise.
14144         (get_vmi_pseudo_type_info): Likewise.
14145         (create_tinfo_types): Likewise.
14146         * ptree.c (print_lang_decl): Adjust.
14147         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
14148         before checking DECL_MUTABLE_P.
14149
14150         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
14151         parameters for template functions.
14152         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
14153         destructors as well as constructors.
14154
14155 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
14156
14157         * class.c (build_ctor_vtbl_group): Set inits.
14158         * optimize.c (maybe_clone_body): Set DECL_INLINE and
14159         DECL_THIS_INLINE appropriately for clones.
14160
14161         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
14162         (DECL_CONV_FN_P): Simplify.
14163         (DECL_OPERATOR): Remove.
14164         (language_to_string): Declare.
14165         * decl.c (duplicate_decls): Fix typo in comment.
14166         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
14167         (grok_op_properties): Use DECL_CONV_FN_P instead of
14168         IDENTIFIER_TYPENAME_P.
14169         * dump.c (dequeue_and_dump): Dump the language linkage of
14170         declarations.
14171         * error.c (language_to_string): Give it external linkage.
14172         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
14173         (implicitly_declare_fn): Set DECL_LANGUAGE.
14174         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
14175         IDENTIFIER_TYPENAME_P.
14176         (tsubst_decl): Likewise.
14177         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
14178         * semantics.c (finish_member_declaration): Don't mark members of
14179         classes declared in an extern "C" region as extern "C".
14180
14181 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14182
14183         * decl2.c (qualified_lookup_using_namespace): Look through
14184         namespace aliases.
14185
14186         * decl.c (push_using_decl): Return the old decl on namespace level.
14187
14188 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
14189
14190         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
14191         (VTT_NAME_PREFIX): New macro.
14192         (CTOR_VTBL_NAME_PREFIX): Likewise.
14193         (get_ctor_vtbl_name): New function.
14194         * class.c (get_vtable_name): Simplify.
14195         (get_vtt_name): New function.
14196         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
14197         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
14198         when a virtual base becomes primary.
14199         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
14200         VTTs.
14201         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
14202         additional parameters.
14203         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
14204         (initialize_array): New function.
14205         (build_vtt): Likewise.
14206         (build_vtt_inits): Likewise.
14207         (dfs_build_vtt_inits): Likewise.
14208         (dfs_fixup_binfo_vtbls): Likewise.
14209         (build_ctor_vtbl_group): Likewise.
14210         (initialize_vtable): Use initialize_array.
14211         (accumulate_vtbl_inits): Reimplement to handle construction
14212         vtables.
14213         (dfs_accumulate_vtbl_inits): Likewise.
14214         (bulid_vtbl_initializer): Adjust parameter name.
14215         * method.c (build_typename_overload): Remove #if 0'd code.
14216         (get_ctor_vtbl_name): New function.
14217         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
14218         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
14219
14220         * cp-tree.h (struct lang_type): Remove search_slot.
14221         (CLASSTYPE_SEARCH_SLOT): Remove.
14222         (emit_base_init): Change prototype.
14223         (initialize_vtbl_ptrs): Likewise.
14224         (expand_indirect_vtbls_init): Likewise.
14225         (clear_search_slots): Remove.
14226         * decl.c (lang_mark_tree): Don't mark search_slot.
14227         * init.c (initialize_vtbl_ptrs): Simplify.
14228         (emit_base_init): Likewise.
14229         * search.c (struct vbase_info): Document decl_ptr.
14230         (convert_pointer_to_single_level): Remove.
14231         (dfs_find_vbases): Remove.
14232         (dfs_init_base_pointers): Simplify.
14233         (dfs_clear_vbase_slots): Remove.
14234         (dfs_vtable_path_unmark): New function.
14235         (init_vbase_pointers): Simplify.
14236         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
14237         (expand_indirect_vtbls_init): Simplify.  Don't call
14238         mark_all_temps_used.
14239         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
14240         initialize_vtbl_ptrs.
14241
14242 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
14243
14244         * except.c: Add static prototypes.
14245
14246 2000-05-20  H.J. Lu  <hjl@gnu.org>
14247
14248         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
14249
14250 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
14251
14252         Don't create a separate copy of virtual bases for the
14253         CLASSTYPE_VBASECLASSES list.
14254         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
14255         (BINFO_FOR_VBASE): Remove.
14256         (CANONICAL_BINFO): Adjust.
14257         (binfo_for_vbase): New function.
14258         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
14259         instead of BINFO_FOR_VBASE.
14260         (build_vbase_pointer): Likewise.
14261         (build_secondary_vtable): Likewise.
14262         (dfs_mark_primary_bases): Likewise.
14263         (mark_primary_bases): Likewise.
14264         (layout_nonempty_base_or_field): Likewise.
14265         (dfs_set_offset_for_shared_vbases): Likewise.
14266         (dfs_set_offset_for_unshared_vbases): Likewise.
14267         (layout_virtual_bases): Likewise.  Adjust for changes to the
14268         CLASSTYPE_VBASECLASSES list.
14269         (dump_class_hierarchy_r): Use binfo_for_vbase
14270         instead of BINFO_FOR_VBASE.
14271         (dump_class_hierarchy): Likewise.
14272         (finish_vtbls): Likewise.
14273         (build_vtbl_initializer): Adjust for changes to the
14274         CLASSTYPE_VBASECLASSES list.
14275         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
14276         * decl.c (finish_destructor_body): Adjust for changes to the
14277         CLASSTYPE_VBASECLASSES list.
14278         * init.c (sort_base_init): Use binfo_for_vbase.
14279         (construct_virtual_bases): Adjust for changes to the
14280         CLASSTYPE_VBASECLASSES list.
14281         (expand_member_init): Use binfo_for_vbase.
14282         (build_vbase_delete):  Adjust for changes to the
14283         CLASSTYPE_VBASECLASSES list.
14284         * method.c (do_build_copy_constructor): Likewise.
14285         * rtti.c (get_base_offset): Use binfo_for_vbase.
14286         (expand_class_desc): Remove #if 0'd code.
14287         * search.c (struct vbase_info): Remove vbase_types.
14288         (get_base_distance):  Use binfo_for_vbase.
14289         (lookup_field_queue_p): Use CANONICAL_BINFO.
14290         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
14291         (get_pure_virtuals): Adjust for changes to the
14292         CLASSTYPE_VBASECLASSES list.
14293         (dfs_find_vbases): Use binfo_for_vbase.
14294         (dfs_init_vbase_pointers): Likewise.
14295         (init_vbase_pointers): Don't initialize vi.vbase_types.
14296         (virtual_context): Use binfo_for_vbase.
14297         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
14298         CLASSTYPE_VBASECLASSES list.
14299         (expand_indirect_vtbls_init): Simplify.
14300         (dfs_get_vbase_types): Don't replicate virtual bases.
14301         (find_vbase_instance): Use binfo_for_vbase.
14302         (binfo_for_vbase): New function.
14303         * typeck.c (get_delta_difference): Use binfo_for_vbase.
14304
14305 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
14306
14307         * decl2.c (finish_anon_union): Generalize error messages to handle
14308         anonymous structures.
14309         * init.c (perform_member_init): Remove `name' parameter.
14310         (build_field_list): New function.
14311         (sort_member_init): Handle anonymous union initialization order
14312         correctly.  Check for multiple initializations of the same union.
14313         (emit_base_init): Don't look up fields by name here.
14314         (expand_member_init): Record the result of name lookup for future
14315         reference.
14316         * typeck.c (build_component_ref): Fix formatting.
14317
14318 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
14319
14320         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
14321         * typeck.c (build_x_compound_expr): Replace warn_unused with
14322         warn_unused_value.
14323
14324         * decl2.c (lang_decode_option): Update -Wall unused flags by
14325         calling set_Wunused.
14326
14327 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
14328
14329         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
14330         * init.c (dfs_vtable_path_unmark): Remove.
14331         * search.c (marked_new_vtable_p): Likewise.
14332         (unmarked_new_vtable_p): Likewise.
14333         (dfs_search_slot_nonempty_p): Likewise.
14334         (dfs_mark): Likewise.
14335         (dfs_vtable_path_unmark): Likewise.
14336         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
14337         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
14338         (dfs_init_vbase_pointers): Remove special-case new ABI code.
14339         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
14340         (init_vbase_pointers): Simplify.
14341         (expand_indirect_vtbls_init): Likewise.
14342
14343         * class.c (copy_virtuals): New function.
14344         (build_primary_table): Use it.
14345         (build_secondary_vtable): Likewise.
14346         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
14347         indicate that no vcall offset is required.
14348         (add_virtual_function): Likewise.
14349         (modify_all_vtables): Likewise.
14350         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
14351         (dfs_accumulate_vtbl_inits): Likewise.
14352         (build_vtbl_initializer): Make changes to handle construction
14353         vtables.
14354         (dfs_build_vcall_offset_vtbl_entries): Likewise.
14355         (build_rtti_vtbl_entries): Likewise.
14356         (build_vtable_entries): Handle a NULL vcall_index.
14357
14358 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
14359
14360         * decl2.c (lang_decode_option): Fix thinko.
14361
14362 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
14363
14364         * except.c (check_handlers): New fn.
14365         * cp-tree.h: Declare it.
14366         * semantics.c (finish_handler_sequence): Call it.
14367         (finish_function_handler_sequence): Likewise.
14368         (finish_handler_parms): Set TREE_TYPE on the handler.
14369         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
14370         * search.c (get_base_distance_recursive): If protect>1, ignore
14371         special access.
14372         (get_base_distance): Don't reduce watch_access.
14373
14374 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
14375
14376         * lex.c: #include diagnostic.h.
14377         (lang_init_options): Set default prefixing rules.
14378
14379         * lang-options.h: Add -fdiagnostics-show-location=.
14380
14381         * decl2.c: #include diagnostic.h.
14382         (lang_decode_option): Handle -fdiagnostics-show-location=.
14383
14384 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
14385
14386         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
14387         * vec.cc: Revert my 2000-05-07 change.
14388
14389 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
14390
14391         * class.c (check_field_decls): Complain about non-static data
14392         members with same name as class in class with constructor.
14393
14394 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
14395
14396         * decl.c (grokdeclarator): Allow non-static data members with
14397         same name as class.
14398
14399 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
14400
14401         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
14402         and pending_inline.filename.  Update prototypes.
14403         * decl.c (define_label): Constify filename parameter.
14404         * decl2.c (warn_if_unknown_interface): Constify local char *.
14405         * input.c Constify input_source.filename. Don't declare
14406         input_filename or lineno.  Constify filename parameter to feed_input.
14407         * lex.c (init_parse): Constify parameter and return value.
14408         (cp_pragma_interface, cp_pragma_implementation): Constify
14409         filename argument.
14410         (reinit_parse_for_method, reinit_parse_for_block,
14411         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
14412         Constify local char *.
14413         * pt.c: Don't declare lineno or input_filename.
14414         (print_template_context, tsubst_friend_function, tsubst_decl,
14415         tsubst, instantiate_decl): Constify local char *.
14416         * semantics.c (expand_body): Constify local char *.
14417         * tree.c (build_srcloc): Constify filename parameter.
14418         * typeck.c (c_expand_asm_operands): Constify filename
14419         parameter.
14420
14421 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
14422
14423         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
14424         offsetof expansion.
14425
14426 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
14427
14428         * inc/cxxabi.h:  Fix typos in comment.
14429         (__base_class_info::__offset): Use a static_cast.
14430
14431 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
14432
14433         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
14434         of std::size_t and std::ptrdiff_t respectively.
14435         * tinfo.cc: Likewise.
14436         * vec.cc: Likewise.
14437
14438 2000-05-06  Richard Henderson  <rth@cygnus.com>
14439
14440         * typeck.c (build_c_cast): Don't warn integer->pointer size
14441         mismatch for constants.
14442
14443 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
14444
14445         * rtti.c (ptmd_initializer): Set non-public, if class is
14446         incomplete.
14447
14448         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
14449         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14450         __cxa_vec_delete): Likewise.
14451         * tinfo.cc (__dynamic_cast): Likewise.
14452         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14453         __cxa_vec_delete): Likewise.
14454
14455 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
14456
14457         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
14458         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
14459         (lang_decl_flags): Add vcall_offset.
14460         (THUNK_VCALL_OFFSET): Use it.
14461         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
14462         * method.c (make_thunk): Create the lang_decl here, not in
14463         emit_thunk.
14464         (emit_thunk): Make generic thunks into ordinary functions once
14465         they have been fed to expand_body.
14466         * semantics.c (expand_body): Set current_function_is_thunk here.
14467
14468 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14469
14470         * class.c (update_vtable_entry_for_fn): Prototype.
14471
14472         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
14473         and `tmpl'.
14474
14475         * search.c (dfs_build_inheritance_graph_order): Prototype.
14476
14477 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
14478
14479         * cp-tree.h (special_function_kind): Add various kinds of
14480         destructors.
14481         (special_function_p): New function.
14482         * class.c (overrides): Don't let one kind of destructor override
14483         another.
14484         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
14485         whether or not to instantiate a template.
14486         * tree.c (special_function_p): Define.
14487
14488 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
14489
14490         * cp-tree.def (THUNK_DECL): Remove.
14491         * cp-tree.h (DECL_THUNK_P): New macro.
14492         (DECL_NON_THUNK_FUNCTION_P): Likewise.
14493         (DECL_EXTERN_C_FUNCTION_P): Likewise.
14494         (SET_DECL_THUNK_P): Likewise.
14495         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
14496         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
14497         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
14498         * decl.c (decls_match): Use DECL_EXTERN_C_P.
14499         (duplicate_decls): Likewise.
14500         (pushdecl): Likewise.  Adjust thunk handling.
14501         (grokfndecl): Use DECL_EXTERN_C_P.
14502         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
14503         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
14504         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
14505         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
14506         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
14507         DECL_NO_STATIC_CHAIN.
14508         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
14509         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
14510         * search.c (covariant_return_p): Remove THUNK_DECL handling.
14511         * ir.texi: Update.
14512
14513 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
14514
14515         * tree.c (walk_tree): Set lineno.
14516
14517 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
14518
14519         * exception.cc: Update license notice.
14520         * new.cc: Likewise.
14521         * new1.cc: Likewise.
14522         * new2.cc: Likewise.
14523         * tinfo.cc: Likewise.
14524         * tinfo2.cc: Likewise.
14525         * vec.cc: Likewise.
14526         * inc/cxxabi.h: Likewise.
14527         * inc/exception: Likewise.
14528         * inc/new: Likewise.
14529         * inc/new.h: Likewise.
14530         * inc/typeinfo: Likewise.
14531
14532 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
14533
14534         * tree.c (build_target_expr_with_type): If we already have a
14535         TARGET_EXPR, just return it.
14536
14537         * optimize.c (initialize_inlined_parameters): Don't generate an
14538         EXPR_STMT if we can just use DECL_INITIAL.
14539         * decl.c (emit_local_var): Only make the initialization a
14540         full-expression if stmts_are_full_exprs_p.
14541
14542 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
14543
14544         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
14545         macro.
14546         * call.c (standard_conversion): Use it.
14547         (direct_reference_binding): Likewise.
14548         (build_over_call): Likewise.
14549         (is_properly_derived_from): Likewise.
14550         (compare_ics): Likewise.
14551         * class.c (resolves_to_fixed_type_p): Likewise.
14552         * optimize.c (declare_return_variable): Likewise.
14553         * pt.c (is_specialization_of): Likewise.
14554         (unify): Likewise.
14555         * typeck.c (comp_target_parms): Likeiwse.
14556         (build_static_cast): Likewise.
14557         (build_reinterpret_cast): Likewise.
14558         (build_const_cast): Likewise.
14559         (comp_ptr_ttypes_real): Likewise.
14560         (comp_ptr_ttypes_const): Likewise.
14561         * typeck2.c (process_init_constructor): Likewise.
14562
14563 2000-04-30  Scott Snyder <snyder@fnal.gov>
14564
14565         * decl.c (finish_destructor_body): Use the base destructor when
14566         destroying virtual bases.
14567
14568 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
14569
14570         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
14571         STMT_EXPRs.
14572         * optimize.c (struct inline_data): Add target_exprs field.
14573         (declare_return_variable): When a function returns an aggregate,
14574         use the variable declared in the TARGET_EXPR as the remapped
14575         DECL_RESULT.
14576         (expand_call_inline): Update the pending target_exprs stack.
14577         (optimize_function): Initialize the stack.
14578
14579         * decl2.c (finish_file): Fix typo in comment.
14580
14581         * method.c (emit_thunk): Don't try to return a `void' value.
14582
14583         * optimize.c (initialize_inlined_parameters): If the parameter is
14584         addressable, we need to make a new VAR_DECL, even if the
14585         initializer is constant.
14586
14587 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
14588
14589         * decl.c (grok_op_properties): Add an extra check of argtypes.
14590
14591 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
14592
14593         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
14594         variables.
14595         (initialize_inlined_parameters): Try to avoid creating new
14596         VAR_DECLs.
14597
14598 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
14599
14600         * lex.c (my_get_run_time): Remove.
14601         (init_filename_times): Use get_run_time instead of my_get_run_time.
14602         (check_newline): Likewise.
14603         (dump_time_statistics): Likewise.
14604         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
14605         of computing elapsed time explicitly.
14606
14607 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
14608
14609         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
14610         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
14611         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
14612         before calling decl_constant_value.
14613         * class.c (check_bitfield_decl): Likewise.
14614         * cvt.c (ocp_convert): Likewise.
14615         (convert): Likewise.
14616         * decl.c (compute_array_index_type): Likewise.
14617         (build_enumerator): Likewise.
14618         * decl2.c (check_cp_case_value): Likewise.
14619         * pt.c (convert_nontype_argument): Likewise.
14620         (tsubst): Likewise.
14621         * typeck.c (decay_conversion): Likewise.
14622         (build_compound_expr): Likewise.
14623         (build_reinterpret_cast): Likewise.
14624         (build_c_cast): Likewise.
14625         (convert_for_assignment): Likewise.
14626
14627 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
14628
14629         * decl.c (finish_function): Don't play games with DECL_INLINE.
14630
14631 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
14632
14633         * ir.texi: Correct typo.
14634
14635 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14636
14637         * decl.c (grokdeclarator): Reject VLAs as members.
14638
14639 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
14640
14641         * call.c (standard_conversion): Accept conversion between
14642         COMPLEX_TYPEs.
14643
14644         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
14645
14646 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
14647
14648         * decl2.c (finish_file): Remove double setup for accounting
14649         compile time.
14650
14651 2000-04-24  Robert Lipe <robertlipe@usa.net>
14652
14653         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
14654
14655 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
14656
14657         * new.cc (set_new_handler): Needs to be in std::.
14658
14659 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
14660
14661         * cp-tree.h (lang_decl): Remove pretty_function_p.
14662         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
14663         language-specific node.
14664         * decl.c (cp_make_fname_decl): Use build_decl, not
14665         build_lang_decl, to build the variables.
14666         (grokvardecl): Don't call build_lang_decl for local variables in
14667         templates.
14668         (grokdeclarator): Don't call build_lang_decl for local type
14669         declarations in templates.
14670         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
14671         zero'd memory, rather than calling memset.
14672         * pt.c: Include hashtab.h.
14673         (local_specializations): New variable.
14674         (retrieve_local_specialization): Use it.
14675         (register_local_specialization): Likewise.
14676         (tsubst_decl): Don't assume local variables have
14677         DECL_LANG_SPECIFIC.
14678         (instantiate_decl): Set up local_specializations.
14679         * Makefile.in (HTAB_H): New variable.
14680
14681 2000-04-23  Richard Henderson  <rth@cygnus.com>
14682
14683         * typeck.c (c_expand_asm_operands): Restore the original
14684         contents of the output list.
14685
14686 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
14687
14688         * ir.texi:  Document complex number representation.
14689
14690 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
14691
14692         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
14693         (target_incomplete_p): New function.
14694         (tinfo_base_init): Create comdat NTBS name variable.
14695         (ptr_initializer): Add non_public parameter. Calculate it.
14696         (ptmd_initializer): Likewise.
14697         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
14698         (create_real_tinfo_var): Add non_public parameter. Use it.
14699         Push proxy into global namespace.
14700         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
14701         New enumeration.
14702         * inc/typeinfo (type_info::before, type_info::operator==):
14703         Compare __name addresses.
14704
14705         * tinfo2.cc: Remove new-abi builtins comment.
14706
14707 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
14708
14709         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
14710
14711         * call.c (joust): Exit early if we get the same function, too.
14712
14713         * decl2.c (key_method): Return NULL_TREE for template classes.
14714         (import_export_class): Don't need to check for template classes.
14715
14716 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
14717
14718         * lex.c: Remove references to cccp.c.
14719
14720 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
14721
14722         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
14723         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
14724         (DECL_DESTRUCTOR_P): Use destructor_attr.
14725         (DECL_CONST_MEMFUNC_P): Reimplement.
14726         (DECL_VOLATILE_MEMFUNC_P): Remove.
14727         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
14728         (overrides): Use DECL_DESTRUCTOR_P.
14729         (check_for_override): Likewise.
14730         * decl.c (start_function): Likewise.
14731         * decl2.c (grokfclassfn): Likewise.
14732         (check_classfn): Likewise.
14733         (grok_function_init): Likewise.
14734
14735 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
14736
14737         * decl2.c (grokfield): Issue error on illegal data member
14738         declaration.
14739
14740 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
14741
14742         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
14743
14744 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
14745
14746         * class.c (build_vtable_entry): Don't build thunks for type-info
14747         functions.
14748
14749 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
14750
14751         * decl.c (decls_match): Allow a redeclaration of a builtin to
14752         specify args while the builtin did not.
14753
14754 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
14755
14756         * cp-tree.def (THUNK_DECL): Add to documentation.
14757         * cp-tree.h (flag_huge_objects): Declare.
14758         * class.c (modify_vtable_entry): Tidy.
14759         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
14760         Calculate delta appropriately for the new ABI.
14761         (dfs_modify_vtables): Use it.
14762         (modify_all_vtables): Fix thinko in code to add overriding copies
14763         of functions to primary vtables.
14764         (build_clone): Fix typo in comment.
14765         (clone_function_decl): Correct order of destructors in vtable.
14766         (build_vbase_offset_vtbl_entries): Adjust comment.
14767         (dfs_vcall_offset_queue_p): Remove.
14768         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
14769         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
14770         (build_vtable_entry): Correct check for pure virtual functions.
14771         Don't declare flag_huge_objects.
14772         * decl.c (flag_huge_objects): Remove declaration.
14773         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
14774         Use int_size_in_bytes.
14775         (emit_thunk): Handle vcall offset thunks.
14776
14777 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14778
14779         * decl2.c (parse_time, varconst_time): Delete declarations.
14780         (finish_file): Delete LINENO declaration.
14781         START_TIME and THIS_TIME now long.
14782
14783 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
14784
14785         * class.c (build_base_field): Reformat comment.
14786
14787         * inc/cxxabi.h (stddef.h): Comment inclusion.
14788         (__base_class_info::__offset): Comment shift.
14789
14790 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
14791
14792         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
14793         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
14794         (cp_push_exception_identifier): New macro.
14795         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
14796         (DECL_BASE_DESTRUCTOR_P): Likewise.
14797         (DECL_DELETING_DESTRUCTOR_P): Likewise.
14798         (get_vtbl_decl_for_binfo): Fix formatting.
14799         (in_charge_arg_for_name): New macro.
14800         (maybe_build_cleanup_and_delete): Remove declaration.
14801         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
14802         (in_charge_arg_for_name): New function.
14803         (build_new_method_call): Use it.  Handle cloned destructors.
14804         (build_clone): Don't make the base constructor virtual.
14805         Automatically defer generated functions.
14806         (clone_function_decl): Handle destructors, too.
14807         (clone_constructors_and_destructors): Likewise.
14808         (create_vtable_ptr): Don't create a vtable entry for a cloned
14809         function.
14810         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
14811         (initialize_predefined_identifiers): Update appropriately.
14812         (finish_destructor_body): Simplify.
14813         (maybe_build_cleanup_and_delete): Remove.
14814         * except.c (expand_throw): Handle new-ABI destructors.
14815         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
14816         (build_dtor_call): New function.
14817         (build_delete): Use it.  Simplify.
14818         * optimize.c (maybe_clone_body): Handle destructors.
14819         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
14820
14821         * exception.cc (cleanup_fn): New typedef.
14822         (CALL_CLEANUP): New macro.
14823         (cp_eh_info): Use them.
14824         (__cp_push_exception): Likewise.
14825         (__cp_pop_exception): Likewise.
14826
14827 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
14828
14829         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
14830         (complete_dtor_identifier): New macro.
14831         (CLASSTYPE_FIRST_CONVERSION): Remove.
14832         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
14833         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
14834         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
14835         (CLASSTYPE_CONSTRUCTORS): Likewise.
14836         (CLASSTYPE_DESTRUCTORS): Likewise.
14837         (lang_decl): Add cloned_function.
14838         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
14839         (DECL_BASE_CONSTRUCTOR_P): Likewise.
14840         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
14841         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
14842         (DECL_CLONED_FUNCTION_P): Likewise.
14843         (DECL_CLONED_FUNCTION): Likewise.
14844         (clone_function_decl): Declare.
14845         (maybe_clone_body): Likewise.
14846         * call.c (build_user_type_conversion_1): Call complete object
14847         constructors in the new ABI.
14848         (build_new_method_call): Don't add in-charge parameters under the
14849         new ABI.
14850         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
14851         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
14852         CLASSTYPE_DESTRUCTOR_SLOT.
14853         (build_clone): New function.
14854         (clone_function_decl): Likewise.
14855         (clone_constructors_and_destructors): Likewise.
14856         (check_bases_and_members): Use it.
14857         * decl.c (iniitialize_predefined_identifiers): Initialize
14858         complete_dtor_identifier.
14859         (finish_function): Don't add extra code to a clone.
14860         (lang_mark_tree): Mark cloned_function.
14861         * decl2.c (mark_used): Don't bother trying to instantiate things
14862         we synthesized.
14863         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
14864         * method.c (set_mangled_name_for_decl): Don't treat clones as
14865         constructors.
14866         (synthesize_method): Sythesize cloned functions, not the clones.
14867         * optimize.c (inline_data): Update comment on ret_label.
14868         (remap_block): Don't assume DECL_INITIAL exists.
14869         (copy_body_r): Allow ret_label to be NULL.
14870         (maybe_clone_body): Define.
14871         * pt.c (tsubst_decl): Handle clones.
14872         (instantiate_clone): New function.
14873         (instantiate_template): Use it.
14874         (set_mangled_name_for_template_decl): Don't treat clones as
14875         constructors.
14876         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
14877         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
14878         * semantics.c (expand_body): Clone function bodies as necessary.
14879
14880         * optimize.c (remap_decl): Avoid sharing structure for arrays
14881         whose size is only known at run-time.
14882         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
14883
14884         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
14885         to has_in_charge_parm_p.
14886         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
14887         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
14888         (DECL_COPY_CONSTRUCTOR_P): New macro.
14889         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
14890         (build_user_type_conversion_1): Likewise.
14891         (convert_like_real): Likewise.
14892         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
14893         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
14894         (copy_args_p): Likewise.
14895         (grok_ctor_properties): Likewise.
14896         (start_function): Likewise.
14897         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
14898         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
14899         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
14900         * method.c (do_build_copy_constructor): Use
14901         DECL_HAS_IN_CHARGE_PARM_P.
14902         (synthesize_method): Likewise.
14903         * pt.c (instantiate_template): Remove goto.
14904         * tree.c (build_cplus_method_type): Remove mention of obstacks in
14905         comment.
14906
14907         * cp-tre.h (finish_function): Change prototype.
14908         * decl.c (end_cleanup_fn): Adjust caller.
14909         (finish_function): Take only one parameter.
14910         * decl2.c (finish_objects): Adjust caller.
14911         (finish_static_storage_duration_function): Likewise.
14912         * method.c (emit_thunk): Likewise.
14913         * parse.y: Likewise.
14914         * parse.c: Regenerated.
14915         * pt.c (instantiate_decl): Likewise.
14916         * rtti.c (synthesize_tinfo_fn): Likewise.
14917         * semantics.c (expand_body): Likewise.
14918
14919         * cp-tree.h (copy_decl): New function.
14920         * class.c (finish_struct_1): Use it.
14921         * lex.c (copy_decl): Define it.
14922         * pt.c (tsubst_decl): Likewise.
14923         * tree.c (copy_template_template_parm): Likewise.
14924
14925         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
14926         has_nonpublic_assign_ref.
14927         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
14928         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
14929         * class.c (finish_struct_methods): Don't set
14930         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
14931         (interface_only): Don't declare.
14932         (interface_unknown): Likewise.
14933
14934 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14935
14936         * tree.h (HAVE_TEMPLATES): Remove definition.
14937         * lang-options.h (-fthis-is-variable): Remove documentation.
14938
14939 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
14940
14941         * class.c (instantiate_type): Handle object-relative template-id.
14942
14943         * semantics.c (finish_expr_stmt): Call convert_to_void here.
14944         * decl.c (cplus_expand_expr_stmt): Not here.
14945
14946         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
14947         Initialize exprtype earlier.
14948
14949         * parse.y (fn.def1): Check for defining types in return types.
14950
14951         * decl.c (check_tag_decl): Notice extra fundamental types.
14952         Diagnose empty decls in classes, too.
14953
14954         * decl.c (grokdeclarator): Don't override an anonymous name if no
14955         declarator was given.
14956
14957         * cvt.c (convert_to_void): Call resolve_offset_ref.
14958
14959         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
14960
14961         * decl2.c (decl_namespace): Handle getting a type.
14962
14963         * typeck.c (build_c_cast): Re-enable warning for cast between
14964         pointer and integer of different size.
14965
14966 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
14967
14968         * inc/cxxabi.h (__pointer_type_info): Add restrict and
14969         incomplete flags.
14970         (__pointer_type_info::__pointer_catch): New virtual function.
14971         (__pointer_to_member_type_info): Derive from
14972         __pointer_type_info. Adjust.
14973         (__pointer_to_member_type_info::__do_catch): Remove.
14974         (__pointer_to_member_type_info::__is_pointer_p): Declare.
14975         (__pointer_to_member_type_info::__pointer_catch): Declare.
14976         * rtti.c (qualifier_flags): Add restrict flag.
14977         (ptmd_initializer): Reorder members.
14978         (create_tinfo_types): Expand comments. Reorder
14979         ptmd_desc_type_node members.
14980         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
14981         Implement.
14982         (__pointer_type_info::__do_catch): Move specific code into
14983         __pointer_catch. Call it.
14984         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
14985         specific catch checking. Fix void conversion check.
14986         (__pointer_to_member_type_info::__do_catch): Remove.
14987         (__pointer_to_member_type_info::__pointer_catch): Implement.
14988
14989 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14990
14991         * lex.c (init_parse): Remove traces of classof and headof.
14992         * decl2.c (flag_operator_names): Default to 1.
14993         (lang_decode_option): Do not set it for -ansi.
14994
14995 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
14996
14997         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
14998         (DECL_MAIN_VARIANT): Remove.
14999         * decl.c (duplicate_decls): Don't set it.
15000         (start_function): Likewise.
15001         (lang_mark_tree): Don't mark it.
15002         * decl2.c (defer_fn): Don't use it.
15003         * lex.c (retrofit_lang_decl): Don't set it.
15004         * pt.c (tsubst_decl): Likewise.
15005         * ptree.c (print_lang_decl): Don't print it.
15006         * typeck.c (mark_addressable): Don't use it.
15007
15008 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
15009
15010         * vec.cc: Include <new> and <exception>.
15011         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
15012         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
15013         terminate.
15014         (__cxa_vec_delete): Catch dtor exceptions.
15015
15016 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
15017
15018         Prepend __ to implementation defined names.
15019         * inc/typeinfo (type_info): Rename _name to __name.
15020         (type_info::type_info): Rename parameter.
15021         (type_info::operator==, type_info::operator!=,
15022         type_info::before): Likewise.
15023         (type_info::is_pointer_p, type_info::is_function_p,
15024         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
15025         parameters.
15026         * inc/cxxabi.h
15027         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
15028         (__pointer_type_info::__pointer_type_info): Likewise.
15029         (__pointer_type_info::is_pointer_p,
15030         __pointer_type_info::do_catch): Prepend __. Rename parameters.
15031         (__array_type_info::__array_type_info): Rename parameters.
15032         (__function_type_info::__function_type_info): Likewise.
15033         (__function_type_info::is_function_p): Prepend __.
15034         (__enum_type_info::__enum_type_info): Rename parameters.
15035         (__pointer_to_member_type_info::__pointer_to_member_type_info):
15036         Likewise.
15037         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
15038         parameters.
15039         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
15040         (__class_type_info::__class_type_info): Rename parameters.
15041         (__class_type_info::sub_kind): Prepend __. Adjust member names.
15042         (__class_type_info::upcast_result,
15043         __class_type_info::dyncast_result): Prepend __. Move definition
15044         into tinfo.cc.
15045         (__class_type_info::do_upcast, __class_type_info::do_catch,
15046         __class_type_info::find_public_src,
15047         __class_type_info::do_dyncast,
15048         __class_type_info::do_find_public_src): Prepend __. Rename
15049         parameters.
15050         (__si_class_type_info::__si_class_type_info): Rename parameters.
15051         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
15052         __si_class_type_info::do_find_public_src): Prepent __. Rename
15053         parameters.
15054         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
15055         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
15056         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
15057         parameters.
15058         (__dynamic_cast): Rename parameters.
15059         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
15060         type_info::do_catch, type_info::do_upcast): Prepend __.
15061         (contained_p, public_p, virtual_p, contained_public_p,
15062         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
15063         (__class_type_info::do_catch,
15064         __class_type_info::do_upcast): Prepend __. Adjust.
15065         (__class_type_info::__upcast_result,
15066         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
15067         Adjust.
15068         (__class_type_info::find_public_src): Prepend __. Adjust.
15069         (__class_type_info::do_find_public_src,
15070         __si_class_type_info::do_find_public_src,
15071         __vmi_class_type_info::do_find_public_src): Likewise.
15072         (__class_type_info::do_dyncast,
15073         __si_class_type_info::do_dyncast,
15074         __vmi_class_type_info::do_dyncast): Likewise.
15075         (__class_type_info::do_upcast,
15076         __si_class_type_info::do_upcast,
15077         __vmi_class_type_info::do_upcast): Likewise.
15078         (__dynamic_cast): Adjust.
15079         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
15080         (__function_type_info::is_function_p): Likewise.
15081         (__pointer_type_info::do_catch): Likewise. Adjust.
15082         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
15083         (__throw_type_match_rtti_2): Adjust.
15084         (__is_pointer): Adjust.
15085
15086 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
15087
15088         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
15089         (complete_ctor_identifier): New macro.
15090         (special_function_kind): Add sfk_copy_constructor and
15091         sfk_assignment_operator.
15092         (LOOKUP_HAS_IN_CHARGE): Remove.
15093         (cons_up_default_function): Rename to ...
15094         (implicitly_declare_fn): ... this.
15095         * call.c (build_new_method_call): Add in-charge parameters for
15096         constructors here.
15097         * class.c (add_implicitly_declared_members): Change parameter name
15098         from cant_have_assignment to cant_have_const_assignment.
15099         Replace calls to cons_up_default_function to implicitly_declare_fn.
15100         * cvt.c (ocp_convert): Use complete_ctor_identifier.
15101         * decl.c (initialize_predefined_identifiers): Initialize it.
15102         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
15103         complex expression.
15104         * init.c (expand_default_init): Don't calculate the in-charge
15105         parameter here.
15106         (build_new_1): Likewise.
15107         * lex.c (cons_up_default_function): Move to method.c.
15108         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
15109         (implicitly_declare_fn): New function.
15110         * typeck.c (build_static_cast): Use complete_ctor_identifier.
15111         (build_modify_expr): Likewise.
15112         * typeck2.c (build_functional_cast): Likewise.
15113
15114         Under the new ABI, constructors don't return `this'.
15115         * cp-tree.h (warn_reorder): Declare.
15116         (special_function_kind): New enum.
15117         (global_base_init_list): Remove declaration.
15118         (emit_base_init): Don't return a value.
15119         (check_base_init): Don't declare.
15120         (is_aggr_typedef): Likewise.
15121         * decl.c (check_special_function_return_type): New function.
15122         (return_types): Remove.
15123         (grokdeclarator): Use check_special_function_return_type.
15124         (start_function): Don't initialize ctor_label under the new ABI.
15125         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
15126         * init.c (begin_init_stmts): Move to top of file.
15127         (finish_init_stmts): Likewise.
15128         (warn_reorder): Don't declare.
15129         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
15130         value.
15131         (check_base_init): Remove.
15132         (is_aggr_typedef): Likewise.
15133         (build_new_1): Don't use the return value of a constructor.
15134         * semantics.c (setup_vtbl_ptr): Don't use the return value
15135         of emit_base_init.
15136         * typeck.c (check_return_expr): Don't magically convert return
15137         statements into `return this' in constructors under the new ABI.
15138
15139         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
15140         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
15141         (base_ctor_identifier): New macro.
15142         (base_dtor_identifier): Likewise.
15143         (deleting_dtor_identifier): Likewise.
15144         * decl.c: Don't include obstack.h.
15145         (obstack_chunk_alloc): Don't define.
15146         (obstack_chunk_free): Likewise.
15147         (struct predefined_identifier): New type.
15148         (initialize_predefined_identifiers): New function.
15149         (init_decl_processing): Use it.
15150         (debug_temp_inits): Remove.
15151         (start_method): Don't call preserve_data.
15152         (hack_incomplete_structures): Update comment.
15153         * init.c (init_init_processing): Don't initialize
15154         nelts_identifier.
15155         (build_offset_rf): Remove dead code.
15156         (build_delete): Use CLASSTYPE_N_BASECLASSES.
15157         * search.c (init_search_processing): Don't initialize
15158         vptr_identifier.
15159
15160 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15161
15162         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
15163         some sign_compare warnings.
15164
15165 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
15166
15167         Rename abi::__vmi_class_type_info members.
15168         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
15169         base_list, detail_masks members to vmi_flags, vmi_base_count,
15170         vmi_bases and vmi_flags_masks respectively.
15171         (__vmi_class_type_info::vmi_flags_masks): Rename
15172         details_unknown_mask to flags_unknown_mask.
15173         * tinfo.cc (__class_type_info::do_upcast): Adjust.
15174         (__vmi_class_type_info::do_find_public_src): Adjust.
15175         (__vmi_class_type_info::do_dyncast): Adjust.
15176         (__vmi_class_type_info::do_upcast): Adjust.
15177
15178 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
15179
15180         * tinfo.cc (convert_to_base): New function.
15181         (get_vbase_offset): Remove. Move into convert_to_base.
15182         (__vmi_class_type_info::do_find_public_src): Adjust.
15183         (__vmi_class_type_info::do_dyncast): Adjust.
15184         (__vmi_class_type_info::do_upcast): Adjust.
15185
15186 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
15187
15188         * tinfo.cc (operator=): Use __builtin_strcmp.
15189         * tinfo2.cc (before): Likewise.
15190
15191 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
15192
15193         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
15194         (DECL_SAVED_INLINE): Rename to ...
15195         (DECL_DEFERRED_FN): ... this.
15196         (in_function_p): Remove declaration.
15197         (mark_inline_for_output): Rename to ...
15198         (defer_fn): ... this.
15199         * decl.c (finish_function): Adjust call to mark_inline_for_output.
15200         (in_function_p): Remove definition.
15201         * decl2.c (saved_inlines): Rename to ...
15202         (deferred_fns): ... this.
15203         (saved_inlines_used): Rename to ...
15204         (deferred_fns_used): ... this.
15205         (mark_inline_for_output): Rename to ...
15206         (defer_fn): ... this.
15207         (finish_file): Adjust accordingly.
15208         (init_decl2): Likewise.
15209         * lex.c (cons_up_default_function): Likewise.
15210         * pt.c (mark_decl_instantiated): Likewise.
15211         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
15212         circumstances.
15213         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
15214         * semantics.c (expand_body): Defer more functions.
15215
15216 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
15217
15218         * vec.cc: New file.
15219         * Make-lang.in (CXX_LIB2FUNCS): Add it.
15220         (vec.o): Build it.
15221         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
15222         __cxa_vec_delete): Declare.
15223
15224 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
15225
15226         * rtti.c (dfs_class_hint_mark): New static function.
15227         (dfs_class_hint_unmark): New static function.
15228         (class_hint_flags): Use them.
15229
15230 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
15231
15232         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
15233
15234 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
15235
15236         * cp-tree.h (instantiate_decl): Change prototype.
15237         * decl2.c (mark_used): Adjust call.
15238         * optimize.c (inlinable_function_p): Adjust handling of templates.
15239         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
15240         (do_type_instantiation): Likewise.
15241         (instantiate_decl): Defer more templates.
15242         (instantiate_pending_templates): Adjust logic to handle inline
15243         friend functions.
15244
15245         * Makefile.in (GGC_H): New variable.  Use it throughout in place
15246         of ggc.h.
15247
15248         * call.c: Don't include obstack.h.  Include ggc.h.
15249         (obstack_chunk_alloc): Don't define.
15250         (obstack_chunk_free): Likewise.
15251         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
15252         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
15253         (pop_switch): Free it.
15254
15255         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
15256
15257         * dump.c (dequeue_and_dump): Don't try to print the bit_position
15258         if we don't have a DECL_FIELD_OFFSET.
15259
15260 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
15261
15262         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
15263         special_function_p.
15264
15265 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15266
15267         * cfns.gperf (hash, libc_name_p): Prototype.
15268
15269         * rtti.c (build_dynamic_cast_1): Constification.
15270
15271         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
15272
15273         * semantics.c (deferred_type_access_control): Prototype.
15274
15275 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
15276
15277         Correct many new ABI issues regarding vbase and vcall offset
15278         layout.
15279         * cp-tree.h (BINFO_VTABLE): Document.
15280         (struct lang_type): Tweak formatting.
15281         (BINFO_PRIMARY_BINFO): Add to documentation.
15282         (CLASSTYPE_VSIZE): Fix typo in comment.
15283         (CLASSTYPE_VBASECLASSES): Update documentation.
15284         (BINFO_VBASE_MARKED): Remove.
15285         (SET_BINFO_VBASE_MARKED): Likewise.
15286         (CLEAR_BINFO_VBASE_MARKED): Likewise.
15287         (BINFO_FIELDS_MARKED): Remove.
15288         (SET_BINFO_FIELDS_MARKED): Likewise.
15289         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
15290         (enum access_kind): New enumeration.
15291         (num_extra_vtbl_entries): Remove declaration.
15292         (size_extra_vtbl_entries): Likewise.
15293         (get_vtbl_decl_for_binfo): New function.
15294         (dfs_vbase_unmark): Remove declaration.
15295         (mark_primary_bases): Likewise.
15296         * class.c (SAME_FN): Remove.
15297         (struct vcall_offset_data_s): Move definition.
15298         (build_vbase_pointer): Use `build', not `build_binary_op', to
15299         access the vbase pointer under the new ABI.
15300         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
15301         (build_primary_vtable): Likewise.
15302         (dfs_mark_primary_bases): Move here from search.c.
15303         (mark_primary_bases): Likewise.
15304         (determine_primary_bases): Under the new ABI, don't make a base
15305         class a primary base just because we don't yet have any virtual
15306         functions.
15307         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
15308         (num_vfun_entries): Remove.
15309         (dfs_count_virtuals): Likewise.
15310         (num_extra_vtbl_entries): Likewise.
15311         (size_extra_vtbl_entries): Likewise.
15312         (layout_virtual_bases): Iterate in inheritance graph order under
15313         the new ABI.
15314         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
15315         indicate that a vfield is present.
15316         (init_class_processing): Initialize access_public_node, etc., from
15317         ak_public, etc.
15318         (get_vtbl_decl_for_binfo): New function.
15319         (dump_class_hierarchy_r): Likewise.
15320         (dump_class_hierarchy): Use it.
15321         (finish_vtbls): Build the vtbls in inheritance graph order.
15322         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
15323         (initialize_vtable): Use get_vtbl_decl_for_binfo.
15324         (accumulate_vtbl_inits): Add comments explaining why a pre-order
15325         walk is required.
15326         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
15327         where the vptr points, even for primary vtables.
15328         (build_vtbl_initializer): Adjust handling of vbase and vcall
15329         offsets.
15330         (build_vcall_and_vbase_vtable_entries): New function.
15331         (dfs_build_vbase_offset_vtbl_entries): Remove.
15332         (build_vbase_offset_vtbl_entries): Reimplement.
15333         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
15334         were already handled in a primary base class vtable.
15335         (build_vcall_offset_vtbl_entries): Adjust.
15336         (build_rtti_vtbl_entries): Adjust.
15337         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
15338         * init.c (expand_virtual_init): Simplify.
15339         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
15340         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
15341         * search.c (BINFO_ACCESS): New macro.
15342         (SET_BINFO_ACCESS): Likewise.
15343         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
15344         (access_in_type): Likewise.
15345         (dfs_accessible_p): Likewise.
15346         (protected_accessible_p): Likewise.
15347         (lookup_fnfields_1): Adjust documentation.
15348         (dfs_mark_primary_bases): Move to class.c
15349         (mark_primary_bases): Likewise.
15350         (dfs_vbase_unmark): Remove.
15351         (virtual_context): Use BINFO_FOR_VBASE.
15352         (dfs_get_vbase_types): Simplify.
15353         (dfs_build_inheritance_graph_order): New function.
15354         (get_vbase_types): Use it.
15355         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
15356
15357         * tinfo.cc (get_vbase_offset): New function.
15358         (__vmi_class_type_info::do_find_public_src): Use it.
15359         (__vmi_class_type_info::do_dyncast): Likewise.
15360         (__vmi_class_type_info::do_upcast): Likewise.
15361
15362 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
15363
15364         * lang-specs.h: Pass -fno-show-column to the preprocessor.
15365
15366 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
15367
15368         * rtti.c (class_hint_flags): Rename flags.
15369         (class_initializer): Remove flags.
15370         (synthesize_tinfo_var): Combine offset and flags. Add flags
15371         for __vmi_class_type_info.
15372         (create_tinfo_types): Remove flags from __class_type_info and
15373         __si_class_type_info. Merge flags and offset from
15374         base_class_type_info.
15375         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
15376         (__base_class_info::is_virtual_p): Adjust.
15377         (__base_class_info::is_public_p): Adjust.
15378         (__base_class_info::offset): New accessor.
15379         (__class_type_info::details): Remove member.
15380         (__class_type_info::__class_type_info): Lose details.
15381         (__class_type_info::detail_masks): Remove.
15382         (__si_class_type_info::__si_class_type_info): Lose details.
15383         (__vmi_class_type_info::details): New member.
15384         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
15385         (__vmi_class_type_info::detail_masks): New member.
15386         * tinfo.cc (__class_type_info::do_upcast): Initialize result
15387         with unknown_details_mask.
15388         (__vmi_class_type_info::do_find_public_src): Adjust
15389         (__vmi_class_type_info::do_dyncast): Adjust.
15390         (__vmi_class_type_info::do_upcast): Set result details, if
15391         needed. Adjust.
15392         (__dynamic_cast): Temporarily #if out optimization.
15393
15394 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
15395
15396         * rtti.c (get_tinfo_decl): Mark used.
15397         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
15398         mark as dealt with, if we output it.
15399
15400 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
15401
15402         * class.c: Reorganize to put virtual function table initialization
15403         machinery at the end of the file.
15404
15405 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
15406
15407         * class.c (finish_struct): Use bitsize_zero_node.
15408         * pt.c (instantiate_class_template): Likewise.
15409
15410 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
15411
15412         Put RTTI entries at negative offsets in new ABI.
15413         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
15414         vbase offset at index -3, not -1.
15415         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
15416         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
15417         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
15418         (build_rtti_vtbl_entries): New function.
15419         (set_rtti_entry): Remove.
15420         (build_primary_vtable): Don't use it.
15421         (build_secondary_vtable): Likewise.
15422         (start_vtable): Remove.
15423         (first_vfun_index): New function.
15424         (set_vindex): Likewise.
15425         (add_virtual_function): Don't call start_vtable.  Do call
15426         set_vindex.
15427         (set_primary_base): Rename parameter.
15428         (determine_primary_base): Likewise.
15429         (num_vfun_entries): Don't use skip_rtti_stuff.
15430         (num_extra_vtbl_entries): Include RTTI information.
15431         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
15432         (skip_rtti_stuff): Remove.
15433         (dfs_modify_vtables): Don't use it.
15434         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
15435         (layout_nonempty_base_or_field): Update size handling.
15436         (create_vtable_ptr): Tweak.
15437         (layout_class_type): Adjust parameter names.
15438         (finish_struct_1): Simplify.
15439         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
15440         (skip_rtti_stuff): Remove.
15441         (first_vfun_index): New function.
15442         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
15443         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
15444         (marked_vtable_pathp): Declare.
15445         (unmarked_vtable_pathp): Likewise.
15446         * error.c (dump_expr): Use first_vfun_index to calculate vtable
15447         offsets.
15448         * rtti.c (build_headof): Look for RTTI at negative offsets.
15449         (get_tinfo_decl_dynamic): Likewise.
15450         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
15451         here.
15452         (create_pseudo_type_info): Do it here instead.  Adjust so that
15453         vptr points at first virtual function.
15454         * search.c (marked_vtable_pathp): Make it global.
15455         (unmarked_vtable_pathp): Likewise.
15456         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
15457         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
15458         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
15459         (get_pure_virtuals): Likewise.
15460         (expand_upcast_fixups): Likewise.
15461         * tree.c (debug_binfo): Likewise.
15462         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
15463         negative offset.
15464
15465 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15466
15467         * class.c (check_field_decl): Fix typo.
15468         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
15469         (check_methods): Likewise.
15470         (check_field_decls): Likewise.
15471         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
15472         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
15473         Use DECL_RESULT_FLD, not DECL_RESULT.
15474         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
15475         * lex.c (identifier_type): Likewise.
15476         * pt.c (determine_specialization, lookup_template_class): Likewise.
15477         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
15478         (resolve_overloaded_unification, more_specialized): Likewise.
15479         * semantics.c (finish_member_declaration): Likewise.
15480         * typeck.c (build_x_function_call): Likewise.
15481
15482 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
15483
15484         * class.c (layout_empty_base): Handle empty bases with non-byte
15485         alignment.
15486         (build_base_field): Likewise.
15487         (layout_virtual_bases): Likewise.
15488
15489         * class.c (finish_struct_1): Fix typo in this change:
15490
15491         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15492
15493 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
15494
15495         * decl.c (grokdeclarator): Count partial specializations when
15496         keeping track of how many template classes have been seen.
15497
15498         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
15499
15500 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15501
15502         * class.c (build_vbase_pointer_fields): layout_field now place_field.
15503         (get_vfield_offset): Use byte_position.
15504         (set_rtti_entry): Set OFFSET to ssizetype zero.
15505         (get_binfo_offset_as_int): Deleted.
15506         (dfs_record_base_offsets): Use tree_low_cst.
15507         (dfs_search_base_offsets): Likewise.
15508         (layout_nonempty_base_or_field): Reflect changes in RLI format
15509         and call byte_position.
15510         (layout_empty_base): Convert offset to ssizetype.
15511         (build_base_field): use rli_size_unit_so_far.
15512         (dfs_propagate_binfo_offsets): Do computation in proper type.
15513         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
15514         (layout_class_type): Reflect changes in RLI names and fields.
15515         (finish_struct_1): Set DECL_FIELD_OFFSET.
15516         * dump.c (dequeue_and_dump): Call bit_position.
15517         * expr.c (cplus_expand_constant): Use byte_position.
15518         * rtti.c (expand_class_desc): Use bitsize_one_node.
15519         * typeck.c (build_component_addr): Use byte_position and don't
15520         special case for zero offset.
15521
15522 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
15523
15524         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
15525
15526         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
15527         tinfo object.
15528         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
15529         vtable.
15530
15531 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15532
15533         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
15534         DECL_P macros.
15535         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
15536         make_typename_type, check_initializer, cp_finish_decl,
15537         xref_tag): Likewise.
15538         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
15539         decl_namespace, arg_assoc_template_arg, arg_assoc,
15540         validate_nonmember_using_decl, do_class_using_decl): Likewise.
15541         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
15542         args_to_string): Likewise.
15543         * friend.c (is_friend): Likewise.
15544         * lex.c (note_got_semicolon, note_list_got_semicolon,
15545         is_global): Likewise.
15546         * method.c (build_overload_nested_name, build_overload_value,
15547         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
15548         * parse.y (typename_sub, typename_sub1): Likewise.
15549         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
15550         process_partial_specialization, convert_template_argument,
15551         template_args_equal, add_pending_template, lookup_template_class,
15552         for_each_template_parm_r, maybe_fold_nontype_arg,
15553         tsubst, instantiate_template, type_unification_real, unify,
15554         instantiate_pending_templates, set_mangled_name_for_template_decl):
15555         Likewise.
15556         * repo.c (repo_get_id, repo_template_used): Likewise.
15557         * search.c (lookup_field_1): Likewise.
15558         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
15559         * xref.c (classname): Likewise.
15560
15561 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
15562
15563         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
15564         (CANONICAL_BINFO): New macro.
15565         (BINFO_NEW_VTABLE_MARKED): Use it.
15566         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
15567         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
15568         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
15569         not TREE_TYPE.
15570         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15571         (build_secondary_vtable): Likewise.
15572         (dfs_finish_vtbls): Likewise.
15573         (dfs_accumulate_vtbl_inits): Likewise.
15574         (accumulate_vtbl_inits): New function.
15575         (finish_vtbls): Make sure that virtual bases come after
15576         non-virtual bases in the vtable group.
15577         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
15578         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15579         * search.c (struct vbase_info): Move definition.
15580         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15581         (unmarked_new_vtable_p): Likewise.
15582         (dfs_mark_vtable_path): Remove.
15583         (dfs_mark_new_vtable): Remove.
15584         (dfs_unmark_new_vtable): Likewise.
15585         (dfs_clear_search_slot): Likewise.
15586         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
15587         (dfs_clear_vbase_slots): Likewise.
15588         (init_vbase_pointers): LIkewise.
15589
15590 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
15591
15592         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
15593         SIZETYPE to a non-SIZETYPE.
15594
15595 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
15596
15597         * class.c (layout_virtual_bases): Adjust names in conditionally
15598         compiled code.
15599
15600         * class.c (record_base_offsets): New function.
15601         (layout_conflict_p): Likewise.
15602         (layout_nonempty_base_or_field): Use it.
15603         (layout_empty_base): New function.
15604         (build_base_field): Use it.
15605         (build_base_fields): Update comment.
15606         (layout_virtual_bases): Fold in a little code form
15607         layout_basetypes.  Use layout_empty_base.
15608         (layout_basetypes): Remove.
15609         (end_of_class): New function.
15610         (layout_class_type): Use it.  Adjust.
15611
15612         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
15613         (fntype_p): Remove.
15614         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
15615         comment.
15616         (dfs_skip_nonprimary_vbases_markedp): Likewise.
15617         * typeck.c (fntype_p): Remove.
15618
15619         * cp-tree.h (TI_SPEC_INFO): Remove.
15620         (CLASSTYPE_TI_SPEC_INFO): Likewise.
15621         * pt.c (process_partial_specialization): Likewise.
15622
15623         * class.c (build_base_field): Fix thinko in computation of binfo
15624         offsets.
15625
15626         * tree.c (mark_local_for_remap_p): Mark variables declared in
15627         TARGET_EXPRs as well.
15628
15629 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
15630
15631         * typeck.c (require_complete_type, complete_type,
15632         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
15633         build_array_ref, convert_arguments, pointer_diff,
15634         build_x_unary_op, build_unary_op, build_c_cast,
15635         build_modify_expr): Use COMPLETE_TYPE_P etc.
15636         * call.c (is_complete, convert_like_real,
15637         build_new_method_call): Likewise.
15638         * class.c (build_vbase_pointer_fields, check_bases,
15639         build_base_field, finish_struct_1, pushclass): Likewise.
15640         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
15641         * decl.c (maybe_process_template_type_declaration, pushtag,
15642         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
15643         layout_var_decl, check_initializer, cp_finish_decl,
15644         grokdeclarator, require_complete_types_for_parms,
15645         grok_op_properties, xref_tag, xref_basetypes,
15646         check_function_type): Likewise.
15647         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
15648         * friend.c (do_friend): Likewise.
15649         * init.c (build_offset_ref): Likewise.
15650         * parse.y (structsp): Likewise.
15651         * pt.c (maybe_process_partial_specialization,
15652         tsubst_friend_function, instantiate_class_template, tsubst,
15653         do_type_instantiation, instantiate_pending_templates): Likewise.
15654         * repo.c (repo_get_id): Likewise.
15655         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
15656         synthesize_tinfo_var, emit_support_tinfos): Likewise.
15657         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
15658         * semantics.c (begin_class_definition): Likewise.
15659         * tree.c (build_cplus_method_type): Likewise.
15660         * typeck2.c (digest_init, build_functional_cast,
15661         add_exception_specifier): Likewise.
15662         * parse.h, parse.c: Regenerated.
15663
15664 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
15665
15666         * inc/cxxabi.h: New header file. Define new-abi entry points.
15667         (__pointer_type_info::target): Rename member to ...
15668         (__pointer_type_info::type): ... here.
15669         (__base_class_info::type): Rename member to ...
15670         (__base_class_info::base): ... here.
15671         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
15672         * cp-tree.h (CPTI_ABI): New global tree enumeration.
15673         (abi_node): New global tree node.
15674         * decl.c (abi_node): Document.
15675         (init_decl_processing): Initialize abi_node.
15676         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
15677         (get_vmi_pseudo_type_info): Likewise.
15678         (create_tinfo_types): Likewise.
15679         (emit_support_tinfos): Likewise.
15680         * tinfo.h (cxxabi.h): Include for new-abi.
15681         Move rtti class definitions to new header file.
15682         * tinfo.cc (abi): Use the namespace.
15683         (std): Move new abi rtti classes from here ...
15684         (__cxxabiv1): ... to here.
15685         * tinfo2.cc (cxxabi.h): Include for new-abi.
15686         Move rtti class definitions to new header file.
15687         (std): Move new abi rtti classes from here ...
15688         (__cxxabiv1): ... to here.
15689         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
15690         namespace.
15691
15692 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
15693             Jason Merrill  <jason@casey.cygnus.com>
15694
15695         * method.c (build_overload_int): Use host_integerp.
15696
15697 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15698
15699         * init.c (build_offset_ref): Handle the case of a templated member
15700         function.
15701
15702 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15703
15704         * except.c (expand_exception_blocks): Clear catch_clauses_last.
15705
15706 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
15707
15708         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
15709         * class.c (check_bitfield_decl): Turn illegal bitfields into
15710         non-bitfields.
15711         (dfs_propagate_binfo_offsets): Adjust for new size_binop
15712         semantics.
15713         (dfs_offset_for_unshared_vbases): Likewise.
15714         * cvt.c (cp_convert_to_pointer): Convert NULL to a
15715         pointer-to-member correctly under the new ABI.
15716         * expr.c (cplus_expand_constant): Don't use cp_convert when
15717         turning an offset into a pointer-to-member.
15718         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
15719         when dereferencing them under the new ABI.
15720         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
15721         of pointers-to-members under the new ABI.
15722
15723         * class.c (check_bitfield_decl): Remove restriction on really long
15724         bitfields.
15725         (layout_class_type): Implement new ABI handling of bitfields
15726         longer than their types.
15727
15728 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15729
15730         * parse.y (extdefs): Call ggc_collect.
15731         * parse.c: Regenerated.
15732
15733 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
15734
15735         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
15736         (note_name_declared_in_class): Use OVL_CURRENT to get at a
15737         potential overload.
15738
15739 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15740
15741         * class.c (build_vbase_path): Use integer_zerop.
15742         (build_vtable_entry): Use tree_low_cst.
15743         (get_vfield_offset): Use bit_position.
15744         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
15745         Use tree_low_cst.
15746         (check_bitfield_decl): Set DECL_SIZE using convert.
15747         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
15748         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
15749         Use tree_low_cst.
15750         (finish_struct_1): Use bit_position.
15751         (dump_class_hierarchy): Use tree_low_cst.
15752         * cp-tree.h (min_precision): Add declaration.
15753         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
15754         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
15755         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
15756         * expr.c (cplus_expand_constant): Use bit_position.
15757         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
15758         * rtti.c (get_base_offset): Use bit_position.
15759         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
15760         host_integerp, and tree_low_cst.
15761         (pointer_int_sum): Use integer_zerop.
15762         (build_component_addr): Use bit_position.
15763
15764 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
15765
15766         * typeck.c (require_complete_type): Don't assume size_zero_node.
15767         (complete_type_or_else): Likewise.
15768
15769 2000-03-16  Steven Grady <grady@digitaldeck.com>
15770             Jason Merrill  <jason@casey.cygnus.com>
15771
15772         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
15773
15774 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
15775
15776         * decl2.c (grokfield): Bail out if type is error_mark_node.
15777
15778 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
15779
15780         * tinfo2.cc (__ptr_to_member_data): Rename to ...
15781         (__pointer_to_member_data): ... here. Adjust.
15782         * rtti.c (create_tinfo_types): Adjust.
15783
15784 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
15785
15786         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
15787         * decl.c (ref_desc_type_node): Undocument.
15788         * rtti.c (ptr_ref_initializer): Rename to ...
15789         (ptr_initializer): ... here. Adjust comments.
15790         (ptmd_initializer): Fix comment thinko.
15791         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
15792         (create_tinfo_types): Remove ref_desc_type_node init.
15793         * tinfo2.cc (__reference_type_info): Remove.
15794
15795 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
15796
15797         * decl.c (cp_finish_decl): Remove obsolete comment.
15798
15799         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
15800
15801 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
15802
15803         * cp-tree.h: Tweak documentation.
15804         * class.c (build_vbase_pointer_fields): Layout the fields, too.
15805         (avoid_overlap): Remove.
15806         (get_binfo_offset_as_int): New function.
15807         (dfs_serach_base_offsets): Likewise.
15808         (layout_nonempty_base_or_field): Likewise.
15809         (build_base_field): Layout fields here.  Avoid placing two objects
15810         of the same type at the same address, under the new ABI.
15811         (build_base_fields): Adjust accordingly.
15812         (create_vtable_ptr): Return the new field, but don't attach it to
15813         TYPE_FIELDS.
15814         (remove_base_field): Remove.
15815         (remove_base_fields): Remove.
15816         (layout_basetypes): Adjust accordingly.
15817         (layout_class_type): Call layout_field for each field, rather than
15818         just making a wholesale call to layout_type.
15819
15820 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
15821
15822         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
15823
15824 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
15825
15826         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
15827
15828         * except.c (dtor_nothrow): New fn.
15829         (do_pop_exception): Use it.  Take type parm.
15830         (push_eh_cleanup): Take type parm.
15831         (expand_start_catch_block): Pass it.
15832         (build_eh_type_type_ref): Accept null type.
15833
15834 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
15835
15836         * cp-tree.h (revert_static_member_fn): Change prototype.
15837         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
15838         (grok_op_properties): Likewise.
15839         (start_function): Likewise.
15840         (revert_static_member_fn): Simplify.
15841         * pt.c (check_explicit_specialization): Adjust call to
15842         revert_static_member_fn.
15843
15844 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
15845
15846         * cp-tree.h (scope_kind): New type.
15847         (tmpl_spec_kind): Likewise.
15848         (declare_pseudo_global_level): Remove.
15849         (pseudo_global_level_p): Rename to template_parm_scope_p.
15850         (pushlevel): Remove declaration.
15851         (begin_scope): New function.
15852         (finish_scope): Likewise.
15853         (current_tmpl_spec_kind): Likewise.
15854         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
15855         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
15856         Add template_spec_p.
15857         (toplevel_bindings_p): Adjust.
15858         (declare_pseudo_global_level): Remove.
15859         (pseudo_global_level_p): Rename to template_parm_scope_p.
15860         (current_tmpl_spec_kind): New function.
15861         (begin_scope): Likewise.
15862         (finish_scope): Likewise.
15863         (maybe_push_to_top_level): Adjust.
15864         (maybe_process_template_type_declaration): Likewise.
15865         (pushtag): Likewise.
15866         (pushdecl_nonclass_level): Likewise.
15867         (lookup_tag): Likewise.
15868         (grokfndecl): Handle member template specializations.  Share
15869         constructor and non-constructor code.
15870         * decl2.c (check_classfn): Handle member template specializations.
15871         * pt.c (begin_template_parm_list): Use begin_scope.
15872         (begin_specialization): Likewise.
15873         (end_specialization): Likewise.
15874         (check_explicit_specialization): Use current_tmpl_spec_kind.
15875         Handle member template specializations.
15876         (end_template_decl): Use finish_scope.  Remove call to
15877         get_pending_sizes.
15878         (push_template_decl_real): Remove bogus error message.
15879         (tsubst_decl): Fix typo in code contained in comment.
15880         (instantiate_template): Handle member template specializations.
15881         (most_general_template): Likewise.
15882
15883 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
15884
15885         * lex.c (whitespace_cr): Compress consecutive calls to warning().
15886         (do_identifier): Ditto for error().
15887
15888         * pt.c (convert_nontype_argument): Ditto for cp_error().
15889         (convert_template_argument): Ditto for cp_pedwarn().
15890
15891 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
15892
15893         * exception.cc (__check_null_eh_spec): New fn.
15894         * except.c (expand_end_eh_spec): Call it if the spec is throw().
15895
15896 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
15897
15898         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
15899         * except.c (expand_end_eh_spec): Add the return type.
15900         * rtti.c (throw_bad_cast): Add the parmtypes.
15901         (throw_bad_typeid): Likewise.
15902
15903         * semantics.c (expand_stmt): Only leave out rtl for unused
15904         artificials, and set DECL_IGNORED_P on them as well.
15905         * decl.c (wrapup_globals_for_namespace): Likewise.
15906
15907 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
15908
15909         * decl.c (maybe_commonize_var): Skip all artificial decls.
15910         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
15911
15912 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
15913
15914         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
15915         * cp-tree.h: Declare flag_enforce_eh_specs.
15916         * decl.c (store_parm_decls, finish_function): Check it.
15917
15918         C library functions don't throw.
15919         * Makefile.in (cfns.h): New target.
15920         (except.o): Depend on it.
15921         * Make-lang.in (cc1plus): Depend on cfns.gperf.
15922         * cfns.gperf: New file.
15923         * cfns.h: Generated.
15924         * except.c: Include it.
15925         (nothrow_libfn_p): New fn.
15926         * decl.c (grokfndecl): Use it.
15927         * cp-tree.h: Declare it.
15928
15929         * decl.c (push_overloaded_decl_1, auto_function,
15930         define_function): Lose.
15931         (build_library_fn_1): New static fn.
15932         (builtin_function): Use it.
15933         (get_atexit_node): Use build_library_fn_ptr.
15934         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
15935         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
15936         push_void_library_fn, push_throw_library_fn): New fns.
15937         * cp-tree.h: Declare them.
15938         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
15939         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
15940         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
15941         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
15942         * rtti.c (build_runtime_decl): Lose.
15943         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
15944         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
15945         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
15946
15947         * call.c (build_call): Remove result_type parm.
15948         Call mark_used on unused artificial fns.
15949         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
15950
15951 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
15952
15953         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
15954         appropriate.
15955         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
15956         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
15957         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
15958         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
15959         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
15960         expand_generic_desc): Likewise.
15961
15962 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15963
15964         * exception.cc (__cp_pop_exception): Cleanup the original object.
15965
15966 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15967
15968         * decl.c (grok_op_properties): Merge conversion to void warning
15969         with other silly op warnings.
15970
15971 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
15972
15973         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
15974         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
15975
15976 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15977
15978         * decl.c (cp_make_fname_decl): New function.
15979         (wrapup_globals_for_namespace): Don't emit unused static vars.
15980         (init_decl_processing): Remove comment about use of
15981         array_domain_type. Set make_fname_decl.
15982         (cp_finish_decl): Remove __FUNCTION__ nadgering.
15983         * semantics.c (begin_compound_stmt): Remove
15984         current_function_name_declared flagging.
15985         (expand_stmt): Don't emit unused local statics.
15986         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
15987         specially.
15988
15989 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15990
15991         * typeck.c (convert_for_assignment): Don't look at array
15992         initializer.
15993         * call.c (convert_like_real): Likewise.
15994
15995 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
15996
15997         Add initial support for '\uNNNN' specifier.
15998         * lex.c (read_ucs): New fn.
15999         (readescape, skip_white_space): Call it.
16000         (is_extended_char, is_extended_char_1): New fns.
16001         (utf8_extend_token): New fn, #if 0'd out.
16002         (real_yylex): Treat extended chars like letters.
16003
16004         * search.c (note_debug_info_needed): Walk the bases even if we
16005         weren't deferring the type itself.
16006
16007 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16008
16009         * decl2.c (finish_objects): Constify a char*.
16010
16011         * method.c (emit_thunk): Likewise.
16012
16013 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
16014
16015         * typeck.c (dubious_conversion_warnings): Look through
16016         REFERENCE_TYPE.
16017
16018 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16019
16020         * class.c (dfs_modify_vtables): I is now unsigned.
16021         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
16022         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
16023         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
16024         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
16025         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
16026         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
16027         Call integer_all_onesp.
16028         * typeck2.c (process_init_constructor): Use compare_tree_int.
16029
16030         * lang-specs.h (as): Don't call if -syntax-only.
16031
16032 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
16033
16034         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
16035         RTL_EXPR_HAS_NO_SCOPE after all.
16036
16037 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
16038
16039         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
16040         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
16041         RTL_EXPR_HAS_NO_SCOPE.
16042
16043         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
16044         later.
16045
16046         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
16047
16048 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
16049
16050         * call.c (convert_like): Macrofy.
16051         (convert_like_with_context): New macro.
16052         (convert_like_real): Renamed from convert_like.  Add calling
16053         context parameters, for diagnostics. Add recursive flag.  Call
16054         dubious_conversion_warnings for outer conversion.
16055         (build_user_type_conversion): Use convert_like_with_context.
16056         (build_over_call): Likewise. Don't warn about dubious
16057         conversions here. Adjust convert_default_arg calls.
16058         (convert_default_arg): Add context parameters for diagnostics.
16059         Pass through to convert_like_with_context.
16060         * cp-tree.h (convert_default_arg): Add context parameters.
16061         (dubious_conversion_warnings): Prototype new function.
16062         * typeck.c (convert_arguments): Adjust convert_default_arg call.
16063         (dubious_conversion_warnings): New function, broken
16064         out of convert_for_assignment.
16065         (convert_for_assignment): Adjust.
16066
16067 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
16068
16069         * decl2.c (key_method): Break out from...
16070         (import_export_vtable, import_export_class): ...here.
16071
16072         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
16073         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
16074
16075         * search.c (note_debug_info_needed, dfs_debug_mark,
16076         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
16077         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
16078
16079 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
16080
16081         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
16082         typos.
16083
16084 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
16085
16086         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
16087         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
16088         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
16089         (lang_type): Split gets_new into has_new and has_array_new.
16090         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16091         (TYPE_GETS_NEW): Split into ...
16092         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
16093         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
16094         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
16095         (build_op_new_call): Don't declare.
16096         (build_new_1): Likewise.
16097         * call.c (build_op_new_call): Remove.
16098         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
16099         instead of TYPE_NEEDS_DESTRUCTOR.
16100         (finish_struct_bits): Likewise.
16101         (add_implicitly_declared_members): Likewise.
16102         (check_field_decl): Likewise.
16103         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
16104         correctly under the new ABI.
16105         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
16106         instead of TYPE_NEEDS_DESTRUCTOR.
16107         (initialize_local_var): Likewise.
16108         (destroy_local_var): Likewise.
16109         (cp_finish_decl): Likewise.
16110         (register_dtor_fn): Likewise.
16111         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
16112         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
16113         TYPE_VEC_DELETE_TAKES_SIZE here.
16114         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
16115         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
16116         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16117         (finish_destructor_body): Likewise.
16118         (maybe_build_cleanup_1): Likewise.
16119         * decl2.c (do_static_destruction): Likewise.
16120         * init.c (build_new_1): Make it static.
16121         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16122         (expand_cleanup_for_base): Likewise.
16123         (get_cookie_size): New function.
16124         (build_new_1): Handle array-new cookies correctly under the new
16125         ABI.
16126         (build_vec_delete_1): Likewise.
16127         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16128         (build_delete): Likewise.
16129         (build_vec_delete): Handle array-new cookies correctly under the new
16130         ABI.
16131         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16132         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
16133         TYPE_HAS_ARRAY_NEW_OPERATOR.
16134         * ptree.c (print_lang_type): Check them.
16135         * search.c (context_for_name_lookup): Fix typo in comment.
16136         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16137         * tree.c (break_out_cleanups): Likewise.
16138         (build_cplus_array_test_1): Likewise.
16139         (cp_build_qualified_type_real): Likewise.
16140         * typeck.c (complete_type): Likewise.
16141
16142         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
16143         the command-line, not the end.
16144
16145 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
16146
16147         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
16148
16149 2000-03-02  Tom Tromey  <tromey@cygnus.com>
16150
16151         * cp-tree.h (build_java_class_ref): Declare.
16152         * init.c (build_java_class_ref): No longer static.
16153         * except.c (expand_throw): Generate a Java-style `throw' if the
16154         thrown object is a "Java" object.
16155         (initialize_handler_parm): Generate a Java-style lookup of
16156         exception info if the caught object is a "Java" object.
16157         (catch_language, catch_language_init): New globals.
16158         (decl_is_java_type): New function.
16159         (expand_start_catch_block): Don't call push_eh_info() or
16160         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
16161         class reference to build_catch_block.
16162
16163 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16164
16165         * typeck.c (comptypes): Treat sizetype like its language equivalent.
16166
16167 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
16168
16169         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
16170         to merge reference/pointer code and fix incorrect warnings.
16171
16172 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
16173
16174         * search.c (protected_accessible_p): Use context_for_name_lookup.
16175
16176         * init.c (construct_virtual_bases): Fix thinko.
16177         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
16178
16179 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
16180
16181         * decl.c (current_function_decl): Move to toplev.c.
16182
16183 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
16184
16185         * pt.c (fn_type_unification): Unify return type, whenever
16186         provided.
16187         (get_bindings_real): Only pass return type when necessary.
16188         Remove explicit return type check.
16189         * class.c (resolve_address_of_overloaded_function): Pass desired
16190         return type to fn_type_unification.
16191
16192 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16193
16194         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
16195         DECL_FIELD_SIZE.
16196         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
16197         DECL_FIELD_SIZE.
16198         * rtti.c (expand_class_desc): Likewise.
16199         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
16200         (THUNK_VCALL_OFFSET): Likewise.
16201         (THUNK_DELTA): Reflect changes in ../tree.h.
16202
16203 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
16204
16205         * search.c (protected_accessible_p): Also allow the access if
16206         the member is public in DERIVED.  Lose TYPE parm.
16207         (friend_accessible_p): Lose TYPE parm.
16208         (accessible_p): Adjust.
16209
16210 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16211
16212         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
16213         on things that are not sizes; ssize_binop deleted.
16214         Call size_diffop when appropriate.
16215         (dfs_build_vcall_offset_vtbl_entries): Likewise.
16216         (build_primary_vtable, build_secondary_vtable): Likewise.
16217         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
16218         Variable I is HOST_WIDE_INT.
16219         (get_vfield_offset): Pass proper types to size_binop.
16220         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
16221         (finish_struct_1): Likewise.
16222         (skip_rtti_stuff): Arg N is now pointer to signed.
16223         (layout_class_type): Use size_zero_node.
16224         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
16225         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
16226         * decl.c (complete_arry_type): Pass proper types to size_binop.
16227         (xref_basetypes): BINFO_OFFSET is sizetype.
16228         * error.c (dump_expr): Don't use size_binop non-sizes.
16229         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
16230         * init.c (construct_virtual_bases): Fix type error.
16231         (build_vec_delete_1): Pass proper type to size_binop and don't
16232         fold result.
16233         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
16234         * rtti.c (get_base_offset): Pass proper type to size_binop.
16235         * search.c (dfs_find_vbases): Fix type error.
16236         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
16237         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
16238         * tree.c (debug_binfo): Variable N is signed.
16239         Use HOST_WIDE_INT_PRINT_DEC.
16240         * typeck.c (comptypes): sizetype is same as equivalent integer type.
16241         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
16242         size_one_node and size_zero_node.
16243         (c_alignof): Use size_one_node.
16244         (build_component_addr): Pass proper types to size_binop.
16245         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
16246
16247 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
16248
16249         Implement class scope using-declarations for functions.
16250         * class.c (handle_using_decl): Call add_method for used functions.
16251         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
16252         (add_method): Used functions are hidden by local functions.
16253         (check_bases_and_members): Handle using-decls before finalizing
16254         CLASSTYPE_METHOD_VEC.
16255         * call.c (add_function_candidate): Add ctype parm; if nonzero,
16256         override the type of 'this' accordingly.
16257         (add_template_candidate, add_template_candidate_real): Add ctype parm.
16258         (convert_class_to_reference, build_user_type_conversion_1,
16259         build_new_function_call, build_object_call, build_new_op,
16260         build_new_method_call): Pass ctype parm.
16261
16262         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
16263         the baselink.
16264         * call.c (convert_class_to_reference, build_user_type_conversion_1,
16265         build_new_function_call, build_object_call, build_new_op,
16266         build_new_method_call, build_op_delete_call): Don't get basetype_path
16267         from a baselink.
16268         * typeck.c (build_component_ref): Likewise.
16269         * init.c (build_offset_ref): Likewise.
16270         (resolve_offset_ref): Don't call enforce_access.
16271         Call build_scoped_ref.
16272         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
16273         would cause an error or if -pedantic.
16274         * class.c (alter_access): Lose binfo parm.
16275
16276 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
16277
16278         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
16279         types.
16280
16281 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
16282
16283         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
16284         pseudo_type_info creation into the std namespace
16285
16286 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
16287
16288         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
16289         (import_export_class): Remove declaration.
16290         * decl2.c (import_export_class): Make it static.
16291         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
16292         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
16293         EXPR_WITH_FILE_LOCATION.
16294         * lex.c (check_newline): Tweak filename/lineno setting.
16295         * semantics.c (begin_while_stmt): Fix typo in comment.
16296
16297 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16298
16299         * lang-options.h (-fmessage-length=): Add missing option.
16300
16301         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
16302
16303 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
16304
16305         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
16306
16307 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
16308
16309         * optimize.c (expand_call_inline): Emit the return label before
16310         evaluating the return value.
16311
16312 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
16313
16314         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
16315         than duplicating functionality here.
16316         * optimize.c: Include input.h.
16317         (expand_call_inline): Use push_srcloc and pop_srcloc.
16318         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
16319         * parse.c: Regenerated.
16320         * Makefile.in (lex.o): Depend on input.h.
16321         (optimize.o): Likewise.
16322
16323 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
16324
16325         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
16326         function type, rather than ICE.
16327
16328 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
16329
16330         * decl.c (grokdeclarator): Call decl_type_access_control.
16331         * parse.y (parse_end_decl): Don't call decl_type_access_control if
16332         decl is null.
16333
16334 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
16335
16336         * decl.c (decls_match): Remove obsolete static member nadgering.
16337
16338 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16339
16340         * decl.c (grokdeclarator): Change ANSI to ISO.
16341         * lex.c (consume_string, readescape, do_identifier): Likewise.
16342         (parse_float, real_yylex): Likewise.
16343         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
16344         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
16345         new_type_id, maybe_label_decls, simple_stmt,
16346         for.init.statement): Likewise.
16347         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
16348         * semantics.c (finish_named_return_value): Likewise.
16349         * parse.c: Regenerate.
16350
16351 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
16352
16353         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
16354         (CPTI_CLASS_STAR_TYPE): Remove.
16355         (vtable_index_type): Likewise.
16356         (class_star_type_node): Remove.
16357         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
16358         (build_binary_op_nodefault): Remove.
16359         * call.c (build_new_op): Use build_binary_op instead of
16360         build_binary_op_nodefault.
16361         * decl.c (init_decl_processing): Remove class_star_type_node
16362         initialization.  Make delta_type_node ptrdiff_type_node under the
16363         new ABI.  Initialize vtable_index_type.
16364         (build_ptrmemfunc_type): Build different structures for the new
16365         ABI.
16366         (build_enumerator): Use build_binary_op instead of
16367         build_binary_op_nodefault.
16368         * method.c (build_overload_value): Mangle pointers-to-members
16369         appropriately under the new ABI.
16370         * typeck.c (build_array_ref): Use build_binary_op instead of
16371         build_binary_op_nodefault.
16372         (get_member_function_from_ptrfunc): Adjust for the new ABI.
16373         (build_binary_op_nodefault): Rename to ...
16374         (build_binary_op): ... this.  Remove old version.  Adjust for
16375         pointer-to-member comparisons under the new ABI.
16376         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
16377         (build_ptrmemfunc): Adjust for the new ABI.
16378         (expand_ptrmemfunc_cst): Likewise.
16379         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
16380         (pfn_from_ptrmemfunc): Adjust for the new ABI.
16381
16382 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
16383
16384         * call.c (build_object_call): Compress consecutive calls to
16385         cp_error.
16386         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
16387         (build_op_delete_call): Adjust message formatting.
16388
16389         * class.c (check_bases): Compress consecutive calls to
16390         cp_pedwarn.
16391         (finish_struct_anon): Say 'ISO C++'.
16392
16393         * decl.c (start_decl): Same here.
16394         (grok_reference_init): Likewise.
16395         (grokfndecl): Correct message formatting.
16396         (grokfndecl): Improve diagnostic.
16397         (check_static_variable_definition): Likewise. Say 'ISO C++'
16398         (compute_array_index_type): Say 'ISO C++'
16399         (create_array_type_for_decl): Compress consecutive calls to
16400         cp_error.
16401         (grokdeclarator): Say 'ISO C++'
16402         (grok_op_properties): Likewise.
16403
16404         * decl2.c (delete_sanity): Clairify diagnostic.
16405         (check_member_template): Same here.
16406         (grok_function_init): Use consistent terminology.
16407
16408         * expr.c (do_case): Say 'ISO C++'
16409
16410         * friend.c (do_friend): Compress consecutive calls to warning.
16411
16412 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
16413
16414         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
16415         * class.c (build_secondary_vtable): Reorganize.  Don't create a
16416         new vtable under the new ABI.
16417         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
16418         computing the size.
16419         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
16420         the initializing elements.
16421         (initialize_vtable): New function.
16422         (dfs_finish_vtbls): Use it.
16423         (dfs_accumulate_vtbl_inits): New function.
16424         (finish_vtbls): Merge primary and secondary vtables under the new
16425         ABI.
16426         (finish_struct_1): Remove redundant call to layout_vtable_decl.
16427         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
16428         aren't VAR_DECLs.
16429
16430         * class.c (build_vtable): New function, split out from ...
16431         (get_vtable_decl): ... here, and ...
16432         (build_secondary_vtable): ... here.
16433
16434         * pt.c (tsubst_decl): Fix formatting.
16435
16436 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16437
16438         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
16439         (avoid_overlap, build_base_field): Likewise.
16440         (build_base_field, build_base_fields, is_empty_class):
16441         Test DECL_SIZE with integer_zero.
16442         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
16443         * cp-tree.h (struct lang_type): New field size_unit.
16444         (CLASSTYPE_SIZE_UNIT): New macro.
16445         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
16446         (cp_finish_decl): Delete -Wlarger-than processing.
16447         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
16448         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
16449         * tree.c (make_binfo): binfo vector is one entry longer.
16450         (walk_tree): Walk DECL_SIZE_UNIT.
16451
16452 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
16453
16454         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
16455         comment.
16456         (build_vtable_entry): Don't assume all vtable entries are
16457         functions.
16458         (build_vtbl_initializer): Adjust accordingly.
16459         (get_vtable_decl): Fix formatting.
16460
16461 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
16462
16463         * semantics.c (deferred_type_access_control): Walk the entire
16464         type_lookups list.
16465         (save_type_access_control): Rename from
16466         initial_deferred_type_access_control.  Just remember the value.
16467         (decl_type_access_control): New fn.
16468         (begin_function_definition): Use deferred_type_access_control, after
16469         we've started the function.  Set type_lookups to error_mark_node.
16470         * parse.y (frob_specs, fn.def1): Adjust.
16471         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
16472         (parse_end_decl, parse_bitfield0, parse_method): New fns.
16473         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
16474         (after_type_component_declarator0): Likewise.
16475         (after_type_component_declarator): Likewise.
16476         (notype_component_declarator): Likewise.
16477         * cp-tree.h: Adjust.
16478
16479         * decl.c (redeclaration_error_message): Allow redeclaration of
16480         namespace-scope decls.
16481
16482 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
16483
16484         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
16485
16486 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
16487
16488         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
16489         * decl2.c (grokclassfn): Likewise.
16490
16491         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
16492
16493         * decl2.c (lang_decode_option): Don't set default message length
16494         here.
16495         * lex.c (lang_init_options): Set it here.
16496
16497 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
16498
16499         Make DECL_CONTEXT mean the class in which a member function was
16500         declared, even for a virtual function.
16501         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
16502         (DECL_FRIEND_CONTEXT): New macro.
16503         (DECL_REAL_CONTEXT): Remove.
16504         (SET_DECL_FRIEND_CONTEXT): Likewise.
16505         (DECL_VIRTUAL_CONTEXT): Adjust.
16506         (DECL_CLASS_SCOPE_P): Use TYPE_P.
16507         (add_friends): Remove.
16508         (hack_decl_function_context): Likewise.
16509         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
16510         CP_DECL_CONTEXT.
16511         (build_over_call): Fix indentation.  Use DECL_CONTEXT
16512         instead of DECL_CLASS_CONTEXT.
16513         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
16514         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
16515         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16516         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
16517         (build_base_field): Likewise.
16518         (finish_struct_1): Likewise.
16519         (build_self_reference): Likewise.
16520         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
16521         DECL_REAL_CONTEXT.
16522         (pushtag): Use decl_function_context, not
16523         hack_decl_function_context.
16524         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16525         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
16526         (pushdecl): Remove bogus code.
16527         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
16528         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16529         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16530         Use decl_function_context, nothack_decl_function_context.
16531         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
16532         (grokdeclarator): Likewise.  Use decl_function_context, not
16533         hack_decl_function_context.
16534         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
16535         (start_function): Use DECL_FRIEND_CONTEXT, not
16536         DECL_CLASS_CONTEXT.  Use decl_function_context, not
16537         hack_decl_function_context.
16538         (finish_function): Use decl_function_context, not
16539         hack_decl_function_context.
16540         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
16541         DECL_CLASS_CONTEXT.
16542         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
16543         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
16544         (grokfield): Likewise.
16545         (finish_builtin_type): Likewise.
16546         (finish_vtable_vardec): Use decl_function_context, not
16547         hack_decl_function_context.
16548         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16549         (start_static_initialization_or_destruction): Likewise.
16550         (finish_static_initialization_or_destruction): Likewise.
16551         (mark_used): Adjust logic for deciding when to synthesize methods.
16552         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
16553         DECL_REAL_CONTEXT.
16554         * error.c (dump_function_decl): Use DECL_CONTEXT, not
16555         DECL_CLASS_CONTEXT.
16556         * friend.c (is_friend): Likewise.
16557         (add_friends): Remove.
16558         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
16559         * lex.c (begin_definition_of_inclass_inline): Use
16560         decl_function_context, not hack_decl_function_context.
16561         (process_next_inline): Likewise.
16562         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16563         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
16564         DECL_CLASSS_CONTEXT.
16565         (hack_identifier): Likewise.
16566         (synthesize_method):  Use decl_function_context, not
16567         hack_decl_function_context.
16568         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
16569         DECL_REAL_CONTEXT.
16570         (is_member_template): Use decl_function_context, not
16571         hack_decl_function_context.  Use DECL_CONTEXT, not
16572         DECL_CLASS_CONTEXT.
16573         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
16574         DECL_CLASS_CONTEXT.
16575         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
16576         DECL_REAL_CONTEXT.
16577         (push_template_decl_real): Likewise.
16578         (instantiate_class_template): Don't call add_friends.
16579         (tsubst_default_argument): Use DECL_CONTEXT, not
16580         DECL_REAL_CONTEXT.
16581         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
16582         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16583         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
16584         DECL_CLASS_CONTEXT.
16585         * repo.c (repo_inline_used): Likewise.
16586         * search.c (current_scope): Adjust for new _CONTEXT macros.
16587         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
16588         DECL_REAL_CONTEXT.
16589         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16590         (lookup_fnfields_here):Likewise.
16591         (check_final_overrider): Likewise.
16592         (init_vbase_pointers): Likewise.
16593         (virtual_context): Likewise.
16594         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
16595         (expand_body): Use decl_function_context, not
16596         hack_decl_function_context.
16597         * tree.c (hack_decl_function_context): Remove.
16598         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
16599         DECL_CLASS_CONTEXT.
16600         * typeck2.c (error_not_base_type): Likewise.
16601
16602 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
16603
16604         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
16605
16606 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16607
16608         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
16609
16610 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
16611
16612         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
16613
16614 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
16615
16616         * decl2.c (lang_decode_option): Enable automatic line wrapping.
16617
16618 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
16619
16620         * parse.y (frob_specs): Split out...
16621         (parse_decl): From here.
16622         (fn.def2): Call initial_deferred_type_access_control.
16623         (after_type_component_declarator0): Call frob_specs.
16624         (notype_component_declarator0): Likewise.
16625         * search.c (friend_accessible_p): Nested classes are friends of their
16626         enclosing classes.
16627
16628 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
16629
16630         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
16631         used to create an implicit temporary.
16632
16633         * class.c (dfs_modify_vtables): Tweak calculation of functions to
16634         override.
16635
16636 2000-02-08  Nathan Sidwell  <nathan@acm.org>
16637
16638         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
16639         strip array element qualifiers too.
16640
16641 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
16642
16643         * decl.c (store_parm_decls): Don't build cleanups for parameters
16644         while processing_template_decl.
16645
16646 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
16647
16648         * cp-tree.h (struct saved_scope): Add incomplete field.
16649         (namespace_scope_incomplete): New macro.
16650         * decl.c (pushdecl): Use it.
16651         (hack_incomplete_structures): Use it.  See through artificial
16652         binding levels.
16653         (mark_saved_scope): Mark it.
16654
16655         Implement access control for nested types.
16656         * search.c (type_access_control): New fn.
16657         (accessible_p): Now we do perform access control for types.
16658         * semantics.c (deferred_type_access_control): New fn.
16659         (initial_deferred_type_access_control): New fn.
16660         (begin_function_definition): Call it.  Add lookups parm.
16661         * decl.c (struct binding_level): Add this_class field.
16662         (pushlevel_class): Set it.
16663         (mark_binding_level): Mark it.
16664         (lookup_name_real): Use it.  Call type_access_control.
16665         (mark_saved_scope): Mark lookups field.
16666         * cp-tree.h (flagged_type_tree): Add lookups field.
16667         (struct saved_scope): Add lookups field.
16668         (type_lookups): New macro.
16669         * parse.y (declmods): Now <ftype>.
16670         (parse_decl): Add lookups parm.  Call
16671         initial_deferred_type_access_control.
16672         (lang_extdef): Clear type_lookups.
16673         (typed_declspecs, declmods, typespec): Set lookups field.
16674         (initdcl): Call deferred_type_access_control.
16675         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
16676         component_decl_1, named_parm): Adjust.
16677         * friend.c (is_friend): Nested classes are friends of their
16678         enclosing classes.
16679
16680         * class.c (currently_open_derived_class): New fn.
16681         * method.c (hack_identifier): Use it.
16682
16683         * lex.c (do_identifier): Remove obsolete code.
16684
16685         * parse.y (typed_typespecs): Propagate new_type_flag properly.
16686
16687 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
16688
16689         * tinfo.h: Remove apostrophes from C++ comment (xgettext
16690         thinks this file is plain C).
16691
16692 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16693
16694         * Makefile.in (call.o): Depend on $(EXPR_H).
16695
16696         * call.c: Include "expr.h".
16697
16698         * class.c (dump_class_hierarchy): Add prototype.
16699
16700         * search.c (dfs_get_pure_virtuals): Likewise.
16701
16702 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
16703
16704         * parse.y (simple_stmt): Allow :: token in asm parameter list.
16705         * parse.c: Rebuilt.
16706
16707 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
16708
16709         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
16710         Store it in DECL_FCONTEXT.
16711         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
16712
16713 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
16714
16715         * tinfo.h (old abi): #include "tconfig.h".
16716         * tinfo.cc (convert_to_base): Move into old abi section.
16717
16718 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
16719
16720         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
16721         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
16722         (BINFO_PRIMARY_BINFO): New macro.
16723         (BF_DELTA): Rename to ...
16724         (BV_DELTA): ... this.
16725         (BF_VCALL_INDEX): Rename to ...
16726         (BV_VCALL_INDEX): ... this.
16727         (BF_FN): Rename to ...
16728         (BV_FN): ... this.
16729         * class.c (build_vbase_path): Adjust for changes to reverse_path.
16730         (set_rtti_entry): Rename BF_ macros to BV_ variants.
16731         (modify_vtable_entry): Simplify.
16732         (add_virtual_function): Rename BF_ macros to BV_ variants.
16733         (build_vtable_initializer): Likewise.
16734         (get_class_offset_1): Remove.
16735         (dfs_get_class_offset): Likewise.
16736         (get_class_offset): Likewise.
16737         (dfs_find_final_overrider): New function.
16738         (find_final_overrider): Likewise.
16739         (modify_one_vtable): Remove.
16740         (dfs_find_base): New function.
16741         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
16742         find_final_overrider.
16743         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
16744         virtuals.
16745         (dfs_fixup_vtable_deltas): Remove.
16746         (override_one_vtable): Remove.
16747         (merge_overrides): Likewise.
16748         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
16749         unreal chilren of virtual bases.
16750         (finish_struct_1): Don't use merge_overrides.  Don't use
16751         dfs_fixup_vtable_deltas.
16752         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
16753         BINFOs.
16754
16755 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
16756             Jason Merrill  <jason@yorick.cygnus.com>
16757
16758         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
16759
16760 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
16761
16762         * exception.cc (__throw_bad_typeid): Add missing std::.
16763
16764 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16765
16766         * cp-tree.h (make_thunk): PROTO -> PARAMS.
16767
16768 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
16769
16770         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
16771
16772         Runtime support for new-abi rtti.
16773         * inc/typeinfo (type_info::operator!=): Define in class.
16774         (type_info::before, type_info::name, type_info::operator==,
16775         type_info::operator!=): Define new ABI implementations.
16776         (type_info::is_pointer_p, type_info::is_function_p): Declare
16777         new virtual functions.
16778         (type_info::do_catch, type_info::do_upcast): Likewise.
16779
16780         * tinfo.h (__base_class_info): Define new class.
16781         (__class_type_info): Likewise.
16782         (__si_class_type_info): Likewise.
16783         (__vmi_class_type_info): Likewise.
16784         (__dynamic_cast): Prototype.
16785
16786         * tinfo.cc: Conditionalize old and new rtti mechanisms.
16787         (type_info::is_pointer_p): Define new function.
16788         (type_info::is_function_p): Likewise.
16789         (type_info::do_catch): Likewise.
16790         (type_info::do_upcast): Likewise.
16791         (vtable_prefix): New structure for vtable access.
16792         (adjust_pointer): Define new template function.
16793         (contained_p, public_p, virtual_p, contained_public_p,
16794         contained_nonpublic_p, contained_nonvirtual_p): Define new
16795         functions.
16796         (nonvirtual_base_type): New local variable.
16797         (__class_type_info::~__class_type_info): Define.
16798         (__si_class_type_info::~__si_class_type_info): Likewise.
16799         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
16800         (__class_type_info::do_catch): Define new function.
16801         (__class_type_info::do_upcast): Likewise.
16802         (__class_type_info::find_public_src): Likewise.
16803         (__class_type_info::do_find_public_src): Likewise.
16804         (__si_class_type_info::do_find_public_src): Likewise.
16805         (__vmi_class_type_info::do_find_public_src): Likewise.
16806         (__class_type_info::do_dyncast): Likewise.
16807         (__si_class_type_info::do_dyncast): Likewise.
16808         (__vmi_class_type_info::do_dyncast): Likewise.
16809         (__class_type_info::do_upcast): Likewise.
16810         (__si_class_type_info::do_upcast): Likewise.
16811         (__vmi_class_type_info::do_upcast): Likewise.
16812         (__dynamic_cast): Likewise.
16813
16814         * tinfo2.cc (__fundamental_type_info): Define new class.
16815         (__pointer_type_info): Likewise.
16816         (__reference_type_info): Likewise.
16817         (__array_type_info): Likewise.
16818         (__function_type_info): Likewise.
16819         (__enum_type_info): Likewise.
16820         (__ptr_to_member_type_info): Likewise.
16821         (__fundamental_type_info::~__fundamental_type_info): Define.
16822         (__pointer_type_info::~__pointer_type_info): Likewise.
16823         (__reference_type_info::~__reference_type_info): Likewise.
16824         (__array_type_info::~__array_type_info): Likewise.
16825         (__function_type_info::~__function_type_info): Likewise.
16826         (__enum_type_info::~__enum_type_info): Likewise.
16827         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
16828         (__pointer_type_info::do_catch): Define new function.
16829         (__ptr_to_member_type_info::do_catch): Define new function.
16830
16831         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
16832         (__is_pointer): Likewise.
16833
16834         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
16835
16836 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
16837
16838         * cp/class.c (build_vtable): Rename to build_primary_vtable.
16839         (prepare_fresh_vtable): Rename to build_secondary_vtable.
16840         (make_new_vtable): New function.
16841         (modify_vtable_entry): Handle generation of new vtables correctly.
16842         (modify_one_vtable): Remove unused parameter.
16843         (dfs_fixup_vtable_deltas): Likewise.
16844         (override_one_vtable): Use build_secondary_vtable.
16845         (finish_struct_1): Use build_primary_vtable and
16846         build_secondary_vtable.
16847
16848 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
16849
16850         * cp/decl.c: Adjust variable names, comments, help strings.
16851
16852 2000-01-29  Nathan Sidwell  <nathan@acm.org>
16853
16854         * new2.cc (operator delete[]): Use operator delete, don't assume
16855         implementation.
16856
16857 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
16858
16859         * class.c (build_vtbl_initializer): Add argument to
16860         build_vtable_entry call.
16861
16862 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
16863
16864         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
16865         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
16866         (BF_DELTA): New macro.
16867         (BF_VCALL_INDEX): Likewise.
16868         (BF_FN): Likewise.
16869         (THUNK_VCALL_OFFSET): Likewise.
16870         (make_thunk): Change prototype.
16871         * class.c (build_vtable_entry): Integrate
16872         build_vtable_entry_for_fn.  Handle vcall indices.
16873         (build_vtable_entry_for_fn): Remove.
16874         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
16875         BF_VCALL_INDEX, BF_FN.
16876         (modify_vtable_entry): Integrate common code from
16877         modify_one_vtable and dfs_fixup_vtable_deltas.
16878         (add_virtual_function): Set BF_VCALL_INDEX.
16879         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
16880         and BF_FN.
16881         (modify_one_vtable): Simplify.
16882         (dfs_fixup_vtable_deltas): Likewise.
16883         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
16884         * method.c (make_thunk): Handle vcall indices.
16885
16886 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
16887
16888         Compiler side new abi rtti (not enabled).
16889         * cp-tree.h (new_abi_rtti_p): New macro.
16890         (emit_support_tinfos): Prototype new function.
16891         (tinfo_decl_p): Likewise.
16892         (emit_tinfo_decl): Likwise.
16893         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
16894         macros.
16895         (doing_runtime): New local static.
16896         (init_rtti_processing): Add new-abi initializer.
16897         (get_tinfo_decl): Add new-abi logic.
16898         (tinfo_from_decl): Likewise.
16899         (build_dynamic_cast_1): Likewise.
16900         (qualifier_flags): New static function.
16901         (tinfo_base_init): Likewise.
16902         (generic_initializer): Likewise.
16903         (ptr_ref_initializer): Likewise.
16904         (ptmd_initializer): Likewise.
16905         (class_hint_flags): Likewise.
16906         (class_initializer): Likewise.
16907         (synthesize_tinfo_var): Likewise.
16908         (create_real_tinfo_var): Likewise.
16909         (create_pseudo_type_info): Likewise.
16910         (get_vmi_pseudo_type_info): Likewise.
16911         (create_tinfo_types): Likewise.
16912         (emit_support_tinfos): New global function.
16913         (tinfo_decl_p): New global predicate.
16914         (emit_tinfo_decl): New global function.
16915         * class.c (set_rtti_entry): Generalize for old and new rtti.
16916         (build_vtbl_initializer): Likewise.
16917         * decl2.c (finish_file): Likewise.
16918
16919 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
16920
16921         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
16922         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
16923
16924 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
16925
16926         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
16927         for scopes.
16928
16929 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
16930
16931         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
16932
16933 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
16934
16935         * optimize.c (calls_setjmp_r): Supply new argument
16936         to special_function_p.
16937
16938 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16939
16940         * call.c: PROTO -> PARAMS.
16941         * class.c: Likewise.
16942         * cp-tree.h: Likewise.
16943         * cvt.c: Likewise.
16944         * decl.c: Likewise.
16945         * decl.h: Likewise.
16946         * decl2.c: Likewise.
16947         * dump.c: Likewise.
16948         * errfn.c: Likewise.
16949         * error.c: Likewise.
16950         * except.c: Likewise.
16951         * expr.c: Likewise.
16952         * init.c: Likewise.
16953         * input.c: Likewise.
16954         * lex.c: Likewise.
16955         * lex.h: Likewise.
16956         * method.c: Likewise.
16957         * optimize.c: Likewise.
16958         * parse.y: Likewise.
16959         * pt.c: Likewise.
16960         * repo.c: Likewise.
16961         * rtti.c: Likewise.
16962         * search.c: Likewise.
16963         * semantics.c: Likewise.
16964         * spew.c: Likewise.
16965         * tree.c: Likewise.
16966         * typeck.c: Likewise.
16967         * typeck2.c: Likewise.
16968         * xref.c: Likewise.
16969
16970 2000-01-25  Richard Henderson  <rth@cygnus.com>
16971
16972         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
16973
16974 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
16975
16976         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
16977         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
16978         (struct vcall_offset_data_s): New type.
16979         (dfs_vcall_offset_queue_p): New function.
16980         (dfs_build_vcall_offset_vtbl_entries): Likewise.
16981         (build_vcall_offset_vtbl_entries): Likewise.
16982         (layout_vtable_decl): Likewise.
16983         (num_vfun_entries): Likewise.
16984         (num_extra_vtbl_entries): Add the entries for vcall offsets.
16985         (build_vtbl_initializer): Likewise.
16986         (dfs_finish_vtabls): Use layout_vtable_decl.
16987         (modify_one_vtables): Always duplicate vtables under the new ABI.
16988         (finish_struct_1): Use layout_vtable_decl.
16989
16990 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16991
16992         * decl.c (member_function_or_else): Change third arg from a format
16993         specifier to an `enum overload_flags'.  Callers changed.
16994
16995 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
16996
16997         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
16998         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
16999         build_const_cast, get_delta_difference, check_return_expr): Avoid
17000         ANSI string concatenation usage.
17001
17002 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
17003
17004         * class.c (layout_class_type): Put the fields required to make a
17005         class non-empty at the end, not the beginning, of the TYPE_FIELDs
17006         list.
17007
17008 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
17009
17010         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
17011         template.
17012
17013         * decl2.c (mark_used): Do instantiate inlines that have been
17014         explicitly instantiated.
17015
17016 2000-01-24  Richard Henderson  <rth@cygnus.com>
17017
17018         * call.c (build_over_call): Use expand_tree_builtin.
17019         * typeck.c (build_function_call_real): Likewise.
17020         (build_binary_op_nodefault): Handle unordered compares.
17021
17022 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
17023
17024         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
17025         cp_tree_index values.
17026         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
17027         New global node #defines for them.
17028         * rtti.c (call_void_fn): Replace with ...
17029         (build_runtime_decl): ... new static function.
17030         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
17031         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
17032         (build_dynamic_cast_1): Always produce correctly typed result.
17033         Explicitly produce type_info addresses. Use dynamic_cast_node.
17034         * exception.cc (__throw_bad_cast): Return `void *'.
17035         (__throw_bad_typeid): Return `const type_info &'.
17036
17037 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
17038
17039         * cp-tree.h (get_vtable_decl): Prototype new function.
17040         * class.c (get_vtable_decl): New function. Broken out from ...
17041         (build_vtable): ... here. Use it.
17042         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
17043         by get_vtable_decl.
17044
17045 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
17046
17047         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
17048         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
17049         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
17050         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
17051         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
17052         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
17053         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
17054         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
17055         (CPTI_TINFO_VAR_ID): New enumeration.
17056         (__tp_desc_type_node, __access_mode_type_node,
17057         __bltn_desc_type_node, __user_desc_type_node,
17058         __class_desc_type_node, __ptr_desc_type_node,
17059         __attr_desc_type_node, __func_desc_type_node,
17060         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
17061         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
17062         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
17063         enum_desc_type_node, class_desc_type_node,
17064         si_class_desc_type_node, vmi_class_desc_type_node,
17065         ptmd_desc_type_node, base_desc_type_node): New #defines.
17066         (tinfo_fn_id, tinfo_fn_type): Rename to ...
17067         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
17068         (tinfo_var_id): New enumeration.
17069         (DECL_TINFO_FN_P): Augment comment.
17070         * decl.c (cp_global_trees): Adjust documentation.
17071         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
17072         tinfo_decl_type and tinfo_var_id.
17073         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
17074         (build_typeid): Remove unused variable.
17075         (get_tinfo_var): Use tinfo_var_id.
17076         (tinfo_name): New static function.
17077         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
17078         (tinfo_from_decl): Likewise.
17079         (get_base_offset): New static function, broken out of
17080         expand_class_desc.
17081         (expand_si_desc): Use tinfo_name.
17082         (expand_class_desc): Likewise. Lose local static variable.
17083         Use base_desc_type_node. Use get_base_offset.
17084         (expand_ptr_desc): Use tinfo_name.
17085         (expand_attr_desc): Likewise.
17086         (expand_generic_desc): Likewise.
17087
17088         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
17089         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
17090
17091 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
17092
17093         * cp-tree.h (__eprintf): Remove declaration.
17094         * tree.c (__eprintf): Remove definition.
17095
17096 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
17097             Mark Mitchell  <mark@codesourcery.com>
17098
17099         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
17100         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
17101
17102 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
17103
17104         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
17105
17106 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
17107
17108         * cp-tree.h (register_dtor_fn): New function.
17109         * decl.c (destroy_local_static): Rename to ...
17110         (register_dtor_fn): ... this.  Give it external linkage.
17111         (expand_static_init): Use it.
17112         * decl2.c (do_static_initialization): Likewise, if using
17113         __cxa_atexit.
17114         (do_static_destruction): Check that __cxa_atexit is not in use.
17115         (finish_file): Don't call do_static_destruction if using
17116         __cxa_atexit.
17117
17118         * typeck.c (convert_arguments): Restore two-message error
17119         reporting.
17120
17121 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
17122
17123         Remap dynamic cast hint values to be consistent across ABIs.
17124         * search.c (dynamic_cast_base_recurse): Remap generated value.
17125         (get_dynamic_cast_base_type): Adjust documentation.
17126         * tinfo.h (__user_type_info::dyncast): Likewise.
17127         (__user_type_info::find_public_subobj): Remap BOFF meaning.
17128         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
17129         (__class_type_info::do_dyncast): Likewise.
17130         (__class_type_info::do_find_public_subobj): Likewise.
17131         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
17132
17133 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
17134
17135         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
17136
17137         * typeck2.c (incomplete_type_error): Restore previous
17138         cp_error and cp_error_at call sequence.
17139
17140 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
17141
17142         * class.c (dump_class_hierarchy): Make format agree with argument;
17143         cast pointer to unsigned long and print with %lx.
17144
17145 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
17146
17147         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
17148
17149         * typeck.c (composite_pointer_type, common_type,
17150         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
17151         build_function_call_real, convert_arguments,
17152         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
17153         build_unary_op, mark_addressable, build_compound_expr,
17154         build_static_cast, build_reinterpret_cast, build_const_cast,
17155         build_c_cast, build_modify_expr, get_delta_difference,
17156         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
17157         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
17158         into a single one.
17159         * typeck2.c (readonly_error, abstract_virtuals_error,
17160         process_init_constructor, check_for_new_type): Likewise.
17161
17162 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
17163
17164         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
17165         VAR_DECLs.
17166
17167 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
17168
17169         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
17170         (build_x_typeid): Likewise.
17171         (get_tinfo_fn): Likewise.
17172         (get_tinfo_fn_unused): Rename to ...
17173         (get_tinfo_decl): ... here.
17174         * rtti.c (build_headof): Replace logic error with assertion.
17175         (get_tinfo_fn_dynamic): Rename to ...
17176         (get_tinfo_decl_dynamic): ... here. Make static. Use
17177         complete_type_or_else.
17178         (build_x_typeid): Move into ...
17179         (build_typeid): ... here. Adjust call to
17180         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
17181         throw_bad_typeid expression.
17182         (get_tinfo_fn_unused): Rename to ...
17183         (get_tinfo_decl): ... here. Adjust comment.
17184         (get_tinfo_fn): Delete.
17185         (tinfo_from_decl): New static function.
17186         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
17187         (get_typeid): Use complete_type_or_else.
17188         (build_dynamic_cast_1): Adjust calls to
17189         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
17190         * parse.y (primary): Adjust call to build_typeid.
17191         * except.c (build_eh_type_type_ref): Adjust call to
17192         get_tinfo_decl. Mark as used.
17193         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
17194         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
17195         * parse.c: Regenerated.
17196
17197 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
17198
17199         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
17200         calling convention.
17201         (resolves_to_fixed_type_p): Document calling convention.
17202         * rtti.c (build_x_typeid): Initialize NONNULL.
17203
17204         * cp-tree.h (build_shared_int_cst): New function.
17205         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
17206         * class.c (modify_vtable_entry): Likewise.
17207         (add_virtual_function): Split out code to generated shared
17208         INTEGER_CSTs to build_share_int_cst.
17209         (modify_all_vtables): Handle all the overridden functions here.
17210         Add overridden functions from non-primary virtual bases to the
17211         primary vtable.
17212         (finish_struct_1): Adjust call to modify_all_vtables.  Add
17213         overridden functions from non-primary bases to the vtable.
17214         * tree.c (build_shared_int_cst): New function.
17215
17216         * cp-tree.h (scratchalloc): Remove.
17217         (build_scratch_list): Likewise.
17218         * call.c (convert_class_to_reference): Replace build_scratch_list
17219         and build_expr_list with build_tree_list.
17220         (add_candidate): Replace scratchalloc with expralloc.  Note memory
17221         leak.
17222         (build_user_type_conversion_1):  Replace build_scratch_list
17223         and build_expr_list with build_tree_list.
17224         (build_new_op): Likewise.
17225         (build_op_delete_call): Likewise.
17226         (convert_like): Likewise.
17227         * cvt.c (ocp_convert): Likewise.
17228         * decl.c (start_decl): Likewise.
17229         (start_function): Likewise.
17230         (finish_destructor_body): Likewise.
17231         (maybe_build_cleanup_1): Likewise.
17232         * decl2.c (reparse_decl_as_expr): Likewise.
17233         * init.c (perform_member_init): Likewise.
17234         (expand_cleanup_for_base): Likewise.
17235         (build_builtin_delete_call): Likewise.
17236         (build_new_1): Likewise.
17237         (build_delete): Likewise.
17238         * method.c (do_build_assign_ref): Likewise.
17239         * parse.y (already_scoped_stmt): Likewise.
17240         (nontrivial_exprlist): Likewise.
17241         (net_initializer): Likewise.
17242         (initlist): Likewise.
17243         * parse.c: Regenerated.
17244         * rtti.c (build_x_typeid): Likewise.
17245         (build_dynamic_cast_1): Likewise.
17246         * typeck.c (build_x_compound_expr): Likewise.
17247         (build_static_cast): Likewise.
17248         (build_modify_expr): Likewise.
17249
17250         * cp-tree.h (DECL_VINDEX): Add documentation.
17251         * class.c (build_vtable_entry): Likewise.
17252         (start_vtable): Add comment.
17253         (add_virtual_function): Replace pending_hard_virtuals with
17254         overridden_virtuals and pending_virtuals with new_virtuals.
17255         Replace redundant assignments with assertions.
17256         (check_for_override): Add comment.
17257         (check_bases_and_members): Replace pending_hard_virtuals with
17258         overridden_virtuals and pending_virtuals with new_virtuals.
17259         (create_vtbl_ptr): Likewise.
17260         (layout_class_type): Likewise.
17261         (finish_struct_1): Likewise.  Add comments.
17262
17263 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
17264
17265         * class.c (finish_struct_1): Replace redundant code with
17266         assertions.
17267
17268         * cp-tree.h (flag_new_abi): Move.
17269         (flag_use_cxa_atexit): Likewise.
17270         (flag_honor_std): Likewise.
17271         (flag_rtti): Likewise.
17272         (vbase_offsets_in_vtable_p): Define.
17273         (vptrs_present_everywhere_p): Likewise.
17274         (TYPE_CONTAINS_VPTR_P): Likewise.
17275         (dfs_walk_real): Declare.
17276         * class.c (build_vbase_pointer_fields): Check
17277         vbase_offsets_in_vtable_p.
17278         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
17279         BINFO_VPTR_FIELD.
17280         (build_vbase_offset_vtbl_entries): Simplify.
17281         (build_vbase_offset_vtbl_entries): Adjust.
17282         (build_vbase_pointer): Add ability to look up vbase offsets in
17283         vtable.
17284         (start_vtable): New function.
17285         (add_virtual_function): Use it.
17286         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
17287         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
17288         (build_vtbl_initializer): Take the type of the complete object as
17289         input.  Use it to correctly calculate vbase offsets.
17290         (dfs_finish_vtbls): Pass the complete type to
17291         build_vtbl_initializer.
17292         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
17293         (create_vtable_ptr): Create a vtable even if there are no
17294         new virtual functions, under the new ABI.
17295         (finish_struct_1): Likewise.
17296         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
17297         * decl.c (exapnd_static_init): Remove call to
17298         preserve_initializer.
17299         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
17300         vtables.
17301         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
17302         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
17303         (construct_virtual_bases): Don't initialize virtual base pointers
17304         under the new ABI.
17305         (build_aggr_init): Clean up comment.
17306         (expand_aggr_init_1): Likewise.
17307         * rtti.c (expand_class_desc): Store the virtual function table
17308         index where the vbase offset lives in the offset field.
17309         * search.c (dfs_walk_real): Make it global.
17310         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
17311         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
17312
17313         * tinfo.h (USItype): Make it signed under the new ABI.
17314         * tinfo.cc (convert_to_base): New function.  Encapsulate base
17315         conversion logic here.
17316         (__class_type_info::do_upcast): Use it.
17317         (__class_type_info::do_dyncast): Likewise.
17318         (__class_type_info::do_find_public_subobj): Likewise.
17319
17320         * init.c (construct_virtual_bases): Don't look up the addresses of
17321         virtual bases at run-time.
17322
17323         * class.c (build_vbase_pointer): Relocate.
17324         (build_vbase_pointer_fields): Likewise.
17325         (dfs_build_vbase_offset_vtbl_entries): Likewise.
17326         (build_vbase_offset_vtbl_entries): Likewise.
17327
17328         * decl.c (init_decl_processing): Complain if -fnew-abi
17329         -fno-vtable-thunks is used.
17330
17331         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
17332         flag_new_abi.
17333
17334 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
17335
17336         * cp-tree.h (num_extra_vtbl_entries): New function.
17337         (size_extra_vtbl_entries): Likewise.
17338         (dfs_vtable_path_unmark): Likewise.
17339         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
17340         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
17341         * class.c (num_extra_vtbl_entries): New function.
17342         (size_extra_vtbl_entries): Likewise.
17343         (dfs_build_vbase_offset_vtbl_entries): New function.
17344         (build_vbase_offset_vtbl_entries): Likewise.
17345         (build_vtbl_initializer): Use it.
17346         (finish_struct_1): Adjust vtable sizes (using
17347         num_extra_vtbl_entries).
17348         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
17349         THUNK_DECL is non-NULL before expanding it.
17350         * init.c (expand_virtual_init): Adjust the vtable pointer by
17351         size_extra_vtbl_entries before storing it.
17352         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
17353         Handle TREE_LIST parameters here, not in the dfs_* functions.
17354         (dfs_unmarked_real_bases_queue_p): Adjust.
17355         (dfs_marked_real_bases_queue_p): Likewise.
17356         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
17357         (dfs_vtable_path_marked_real_bases_queue_p): New function.
17358         (dfs_vtable_path_unmark): Likewise.
17359
17360 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
17361
17362         * optimize.c (copy_body_r): Clear the operand three of a
17363         TARGET_EXPR when copying it.
17364
17365 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17366
17367         * method.c (build_decl_overload_real): Check whether we are in ::
17368         before returning __builtin_new/delete.
17369
17370 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
17371
17372         * pt.c (tsubst_friend_function): Improve comment.
17373         (instantiate_decl): Avoid crashing when a "nested" function is
17374         instantiated from the top level.
17375
17376         * dump.c (dqeueue_and_dump): Dump
17377         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
17378
17379 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17380
17381         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
17382
17383 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
17384
17385         * g++spec.c (lang_specific_driver): Add -fnew-abi if
17386         ENABLE_NEW_GXX_ABI defined.
17387         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
17388         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
17389         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
17390
17391 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
17392
17393         * decl.c (start_cleanup_fn): Call pushdecl.
17394
17395         * call.c (convert_class_to_reference): Fix typos.
17396         (build_conditional_expr): Handle errors gracefully.
17397         * class.c (push_nested_class): Likewise.
17398         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
17399         (DECL_THIS_EXTERN): Use it.
17400         (DECL_THIS_STATIC): Likewise.
17401         * cvt.c (convert_to_void): Handle errors gracefully.
17402         (build_expr_type_conversion): Likewise.
17403         * decl.c (maybe_push_decl): Likewise.
17404         (start_decl_1): Likewise.
17405         (require_complete_types_for_parms): Likewise.
17406         * parse.y (structsp): Likewise.
17407         (base_class): Likewise.
17408         * parse.c: Regenerated.
17409         * pt.c (finish_member_template_decl): Likewise.
17410         * typeck.c (decay_conversion): Likewise.
17411
17412         * cp-tree.h (dfs_skip_vbases): New function.
17413         (find_vbase_instance): Likewise.
17414         * class.c (determine_primary_base): Allow a nearly empty base to
17415         serve as a primary base class under the new ABI.
17416         (get_class_offset_1): Rename to ...
17417         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
17418         messages here.
17419         (get_class_offset): Use it.  Issue error messages here.
17420         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
17421         find the right copies of virtual bases.
17422         (fixup_vtable_deltas1): Rename to ...
17423         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
17424         bases as primary bases.
17425         (fixup_vtable_deltas): Remove.
17426         (override_one_vtable): Handle virtual bases as primary bases.
17427         (merge_overrides): Likewise.
17428         (finish_struct_1): Likewise.
17429         (dump_class_hierarchy): Dump primary-ness of bases as well.
17430         * search.c (mark_primary_bases): Use a pre-order traversal to
17431         handle primary virtual bases.
17432         (dfs_skip_vbases): New fiunction.
17433         (expand_upcast_fixups): Adjust to handle primary virtual bases.
17434         (fixup_virtual_upcast_offsets): Likewise.
17435         (fixup_all_virtual_upcast_offsets): Likewise.
17436         (dfs_find_vbase_instances): New function.
17437         (find_vbase_instance): Likewise.
17438
17439 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
17440
17441         * lex.c (DIR_SEPARATOR): Delete macro.
17442
17443 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
17444
17445        * decl2.c (lang_decode_option): Handle automatic line wrapping
17446        option.
17447
17448 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
17449
17450         * friend.c (do_friend): Don't resolve scopes when processing
17451         template declarations, even if the qualifying scope doesn't
17452         involve template parameters.
17453
17454 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
17455
17456         * class.c (dfs_modify_vtables_queue_p): Remove.
17457         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
17458         and dfs_marked_real_bases_queue_p instead of
17459         dfs_modify_vtables_queue_p.
17460
17461         * class.c (build_vbase_path): Simplify.
17462         (dfs_propagate_binfo_offsets): New function.
17463         (propagate_binfo_offsets): Use it.
17464         (remove_base_field): Simplify.
17465         (dfs_set_offset_for_vbases): Remove.
17466         (dfs_set_offset_for_shared_vbases): New function.
17467         (dfs_set_offset_for_unshared_vbases): Likewise.
17468         (layout_virtual_bases): Use them.
17469         (layout_basetypes): Don't call propagate_binfo_offsets.
17470         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
17471         for the vbases.
17472
17473         * class.c (build_base_field): New function, split out from ...
17474         (build_base_fields): ... here.  Use it.  Allocate primary bases
17475         first, under the new ABI.
17476         (get_vtable_entry): Remove.
17477         (remove_base_field): New function, split out from ...
17478         (remove_base_fields): ... here.  Adjust since primary bases come
17479         first under the new ABI.
17480
17481         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
17482         (initialize_vtbl_ptrs): New function.
17483         (expand_indirect_vtbls_init): Change prototype.
17484         (convert_pointer_to_vbase): Declare.
17485         * init.c (expand_direct_vtbls_init): Remove.
17486         (dfs_initialize_vtbl_ptrs): New function.
17487         (initialize_vtbl_ptrs): Likewise.
17488         (emit_base_init): Use initialize_vtbl_ptrs.
17489         * search.c (convert_pointer_to_vbase): Make it global.
17490         (expand_indirect_vtbls_init): Remove vtable initialization code.
17491         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
17492
17493         * class.c (dfs_finish_vtbls): New function.
17494         (finish_vtbls): Use it.
17495         (dump_class_hierarchy): New function.
17496
17497         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
17498         (BINFO_VBASE_PRIMARY_P): New macro.
17499         (BINFO_VIRTUALS): Add to documentation.
17500         (SET_BINFO_PRIMARY_MARKED_P): Remove.
17501         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17502         (dfs_mark_primary_bases_queue_p): Likewise.
17503         (dfs_unmarked_real_bases_queue_p): New function.
17504         (dfs_marked_real_bases_queue_p): Likewise.
17505         * search.c (dfs_mark_primary_bases): Adjust.
17506         (mark_primary_bases): Likewise.
17507         (get_shared_vbase_if_not_primary): New function.
17508         (dfs_unmarked_real_bases_queue_p): Likewise.
17509         (dfs_marked_real_bases_queue_p): Likewise.
17510         (dfs_get_pure_virtuals): Simplify.
17511         (get_pure_virtuals): Likewise.
17512
17513 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17514
17515         * lex.c: Include tm_p.h.
17516
17517 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
17518
17519         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
17520
17521 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
17522
17523         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
17524         * pt.c (instantiate_decl): Defer comdat templates that might not be
17525         needed.
17526
17527         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
17528         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
17529         (finish_file): Likewise.
17530
17531         * decl2.c (import_export_class): Undo 12/14 change.
17532
17533         * error.c (dump_decl): operator new, not operatornew.
17534
17535         * class.c (field_decl_cmp): A nontype is "greater" than a type.
17536         * search.c (lookup_field_1): Look for the last field with the
17537         desired name.
17538
17539 2000-01-05  Nathan Sidwell  <nathan@acm.org>
17540
17541         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
17542         FUNCTION_DECL.
17543
17544 2000-01-05  Nathan Sidwell  <nathan@acm.org>
17545
17546         * typeck.c (build_static_cast): Don't strip target qualifiers
17547         when casting from a class.
17548
17549 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17550
17551         * class.c (warn_hidden): Initialize variable `fndecl'.
17552
17553 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
17554
17555         * decl.c (flag_isoc9x): New variable to be able to use code in
17556         c-common.c.  For now always zero.
17557
17558 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
17559
17560         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
17561         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
17562         or unshare_base_binfos for virtual bases here.
17563         * search.c (dfs_get_vbase_types): Do it here.
17564         (get_vbase_types): Adjust.
17565
17566 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
17567
17568         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
17569         (BINFO_PRIMARY_MARKED_P): Use flag 5.
17570         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
17571         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17572         (unmark_primary_bases): Remove declaration.
17573         (unmarkedp): Declare.
17574         (dfs_vbase_unmark): Likewise.
17575         * class.c (determine_primary_base): Return immediately if there
17576         are no base classes.  Call mark_primary_bases here.
17577         (modify_all_direct_vtables): Remove.
17578         (modify_all_indirect_vtables): Remove.
17579         (dfs_modify_vtables_queue_p): New function.
17580         (dfs_modify_vtables): New function.
17581         (modify_all_vtables): Use them.
17582         (build_base_fields): Build FIELD_DECLs for primary virtual base
17583         classes.
17584         (create_vtable_ptr): Don't call determine_primary_base here.
17585         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
17586         (dfs_set_offset_for_vbases): ... this.
17587         (layout_virtual_bases): Use it.
17588         (layout_class_type): Call determine_primary_base here.
17589         * search.c (unmarkedp): Make it global.
17590         (shared_marked_p): Simplify.
17591         (shared_unmarked_p): Likewise.
17592         (dfs_primary_bases_queue_p): Remove.
17593         (dfs_unmark_primary_bases): Likewise.
17594         (unmark_primary_bases): Likewise.
17595         (mark_primary_bases): Simplify.
17596         (get_pure_virtuals): Don't call mark_primary_bases here.
17597         (dfs_vbase_unmark): New function.
17598         (get_vbase_types): Simplify.
17599
17600         * class.c (struct base_info): Remove.
17601         (determine_primary_base): Take has_virtual_p rather than a
17602         base_info as input.  Don't calculate max_has_virtual.
17603         (finish_struct_bits): Remove max_has_virtual argument.
17604         (create_vtable_ptr): Remove max_has_virtual_p argument.
17605         (layout_virtual_bases): Remove max argument.
17606         (layout_basetypes): Likewise.
17607         (layout_class_type): Remove max_has_virtual_p argument.
17608         (finish_struct_1): Remove max_has_virtual.
17609
17610         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
17611         (layout_basetypes): Remove.
17612         * class.c (propagate_binfo_offsets): Moved here from tree.c.
17613         Update to handle primary virtual bases.
17614         (remove_base_fields): New function, split out from
17615         layout_basetypes.
17616         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
17617         (layout_virtual_bases): New function, split out from
17618         layout_basetypes.  Update to handle primary virtual bases.
17619         (layout_basetypes): Moved here from tree.c.  Use
17620         remove_base_fields and layout_virtual_bases.
17621         * search.c (dfs_mark_primary_bases_queue_p): New function.
17622         (mark_primary_bases): Use it.
17623         * tree.c (CEIL): Remove.
17624         (propagate_binfo_offsets): Remove.
17625         (layout_basetypes): Remove.
17626
17627 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
17628
17629         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
17630         (BINFO_PRIMARY_MARKED_P): New macro.
17631         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
17632         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17633         (mark_primary_bases): New function.
17634         (unmark_primary_bases): Likewise.
17635         * search.c (get_abstract_virtuals_1): Remove.
17636         (dfs_mark_primary_bases): New function.
17637         (mark_primary_bases): Likewise.
17638         (dfs_unmark_primary_bases): Likewise.
17639         (unmark_primary_bases): Likewise.
17640         (dfs_get_pure_virtuals): Likewise.
17641
17642 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
17643
17644         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
17645         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
17646         (modify_one_vtable): Adjust.
17647         (fixup_vtable_deltas1): Likewise.
17648         (override_one_vtable): Likewise.
17649         * search.c (get_abstract_virtuals_1): Likewise.
17650         (get_pure_virtuals): Likewise.
17651         (expand_upcast_fixups): Likewise.
17652         * tree.c (debug_binfo): Likewise.
17653
17654         * class.c (build_vtable): Don't return a value.  Don't rebuild
17655         vtables for bases that have already been handled.
17656         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
17657         already been handled.
17658         (modify_one_vtable): Adjust accordingly.
17659         (fixup_vtable_deltas1): Likewise.
17660         (finish_struct_1): Likewise.
17661
17662 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17663
17664         * call.c (build_new_method_call): Also check destructors.