OSDN Git Service

9b0eaf1b39ce1b749bf9058a21a8e977efb029aa
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
2
3         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
4         friends.
5         * cp/pt.c (instantiate_class_template): Fix formatting.
6
7 2003-03-14  Matt Austern  <austern@apple.com>
8
9         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
10         (unemitted_tinfo_decl_p): Remove.
11         (emit_tinfo_decl): Change declaration to remove unused parameter.
12         * decl2.c (finish_file): Change tinfo emission to loop through
13         unemitted_tinfo_decls array instead of looping through all decls.
14         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
15         unused second parameter.
16         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
17         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
18         (emit_tinfo_decl): remove unused second parameter, add assertion
19         that decl hasn't already been emitted.  
20         
21 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
22
23         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
24         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
25         return statements.
26
27 2003-03-19  Jason Merrill  <jason@redhat.com>
28
29         PR c++/8316, c++/9315, c++/10136
30         * call.c (print_z_candidate): Split out from...
31         (print_z_candidiates): ...here.
32         (joust): Use it.
33
34 2003-03-17  Roger Sayle  <roger@eyesopen.com>
35
36         PR c++/10031
37         * decl.c (duplicate_decls): Use the new type when prototyping
38         anticipated decls, even when the types match.  This defines the
39         exception list for the built-in function.
40
41 2003-03-17  Jason Merrill  <jason@redhat.com>
42
43         PR c++/10091
44         * typeck.c (build_class_member_access_expr): Compare 
45         TYPE_MAIN_VARIANTs.
46
47 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
48
49         PR c++/9639
50         * parser.c (cp_parser_declarator_id): Clear parser->scope.
51
52 2003-03-16  Jason Merrill  <jason@redhat.com>
53
54         PR c++/9993
55         * decl.c (finish_function): Only allow the NRVO to use variables
56         declared at function scope.
57
58 2003-03-17  Andreas Jaeger  <aj@suse.de>
59
60         * Make-lang.in (cp/TAGS): Remove.
61
62 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
63
64         PR c++/9629
65         * cp-tree.h (struct language_function): Add in_base_initializer.
66         (in_base_initializer): define it.
67         (expand_member_init): Remove INIT param.
68         * init.c (expand_member_init): Remove INIT param, return the member.
69         (emit_mem_initializers): Set in_base_initializer.
70         * class.c (build_base_path): Check in_base_initializer.
71         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
72         * pt.c (tsubst_initializer_list): Likewise.
73
74 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
75
76         * decl.c (binding_for_name): Fix initialization thinko.
77
78 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
79
80         Compile-time improvement: 2/n.
81         * cp-tree.h (struct cxx_binding): New datatype;
82         (struct lang_identifier): Use it.
83         (LOCAL_BINDING_P): Adjust definition.
84         (INHERITED_VALUE_BINDING_P): Likewise.
85         (BINDING_SCOPE): Likewise.
86         (BINDING_HAS_LEVEL_P): Likewise.
87         (BINDING_VALUE): Likewise.
88         (BINDING_TYPE): Likewise.
89         (IDENTIFIER_VALUE): Likewise.
90         (struct tree_binding): Remove.
91         (TS_CP_BINDING): Likewise.
92         ((union lang_tree_node): Remove field "binding".
93         (cxx_binding_clear): New macro.
94         (binding_for_name): Adjust return type.
95         (qualified_lookup_using_namespace): Adjust prototype.
96         (lookup_using_namespace): Adjust prototype.
97         (cxx_scope_find_binding_for_name): Declare.
98         * cp-tree.def: Remove CPLUS_BINDING definition.
99         * decl.c (push_binding): Adjust local variable type.
100         (add_binding): Likewise.
101         (push_class_binding): Likewise.
102         (pop_binding): Likewise.
103         (poplevel): Likewise.
104         (poplevel_class): Likewise.
105         (free_bindings):  Adjust type.
106         (find_binding): Adjust return type, add a third parameter. Remove
107         non-useful assertion now that we use static typing.
108         (cxx_scope_find_binding_for_name): New function.
109         (binding_for_name): Use it.  Adjust local variable type. Simplify.
110         (namespace_binding):  Simplify.
111         (set_namespace_binding): Likewise.
112         (set_identifier_type_value_with_scope): Adjust local variable type.
113         (lookup_tag): Don't type-abuse of local variable 'old'.
114         (lookup_namespace_name): Likewise.  Allocate binding on stack.
115         (select_decl): Adjust prototype.
116         (unqualified_namespace_lookup):  Allocate binding on stack.
117         Don't type-abuse of local variable 'val'.
118         (lookup_name_real): Likewise.
119         (maybe_inject_for_scope_var): Adjust local variable type.
120         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
121         (namespace_binding): Adjust logic, simplify.
122         (BINDING_LEVEL): Adjust definition.
123         (push_class_level_binding): Adjust local variable type.
124         (struct cxx_saved_binding): Adjust field 'binding' type.
125         * decl2.c (ambiguous_decl): Adjust prototype.
126         (lookup_using_namespace): Adjust local variable type.
127         (qualified_lookup_using_namespace): Catch type error and correct
128         ensueing logic error.
129         (do_nonmember_using_decl): Adjust local variable type.  Allocate
130         temporary cxx_binding on stack.
131         (do_toplevel_using_decl): Adjust local variable type.
132         * ptree.c (cxx_print_cxx_binding): New function.
133         (cxx_print_identifier): Use it.
134         (cxx_print_xnode): Delete CPLUS_BINDING case label.
135
136 2003-03-15  Roger Sayle  <roger@eyesopen.com>
137
138         * tree.c (count_functions): Fix whitespace.
139
140 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
141
142         * Make-lang.in: Update.
143
144 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
145
146         PR c++/6440
147         * pt.c (maybe_process_partial_specialization): Handle
148         member class template when enclosing class template is
149         explicit specialized.
150         (most_general_template): Stop looking when DECL is already
151         specialized.
152
153 2003-03-13  Jason Merrill  <jason@redhat.com>
154
155         PR c++/9420
156         * search.c (lookup_conversions): Call complete_type here.
157         * call.c (implicit_conversion): Not here.
158
159 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
160
161         * decl2.c (do_nonmember_using_decl): Correct handling of
162         simultaneous type/non-type bindings.
163
164         * call.c (initialize_reference): Remove bogus assertion.
165         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
166
167 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
168
169         PR c++/7050
170         * expr.c (cxx_expand_expr): Return const0_rtx for throw
171         expressions.
172
173 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
174
175         PR c++/9474
176         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
177         to merge old and new declarations.
178
179 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
180
181         * g++.1: Remove.
182         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
183         (cp/g++.1): Build it from scratch in the build tree.
184         (c++.install-man): Depend on it.  Install it from the build tree.
185         (c++.mostlyclean): Clean it.
186
187 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
188
189         PR c++/9474
190         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
191         to merge old and new declarations.
192
193         PR c++/9924
194         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
195
196 2003-03-11  Jason Merrill  <jason@redhat.com>
197
198         PR c++/9820
199         * search.c (lookup_member): Fix handling of functions in a class
200         being defined.
201
202 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
203
204         PR c++/8700
205         * call.c (convert_class_to_reference): Adjust usage of
206         splice_viable.
207         (any_viable): Remove.
208         (splice_viable): Combine with any_viable.
209         (print_z_candidates): Avoid printing duplicates.
210         (build_user_type_conversion_1): Adjust usage of splice_viable.
211         (build_new_function_call): Likewise.
212         (build_operator_new_call): Likewise.
213         (build_object_call): Likewise.
214         (build_conditional_expr): Likewise.
215         (build_new_op): Likewise.
216         (build_new_method_call): Likewise.
217         (joust): Remove spurious comment.
218         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
219         * decl2.c (arg_assoc_class): Simplify.
220         * friend.c (add_friend): Likewise.
221
222 2003-03-11  Jason Merrill  <jason@redhat.com>
223
224         PR c++/8660
225         * decl2.c (check_classfn): A member template only matches a
226         member template.
227
228 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
229
230         * Make-lang.in (CXX_C_OBJS): Update.
231         * lang-specs.h: Don't define __GNUG__ here.
232
233 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
234
235         * call.c (perform_overload_resolution): New function.
236         (build_new_function_call): Use it.
237         (build_operator_new_call): Likewise.
238         (add_candidates): Add explicit_targs and template_only parameters.
239         (build_new_op): Adjust accordingly.
240         * cp-tree.h (build_operator_new_call): New function.
241         (build_function_call_real): Remove.
242         (build_function_call_maybe): Likewise.
243         * init.c (build_new_1): Use build_operator_new_call.
244         * typeck.c (build_function_call_real): Rename to ...
245         (build_function_call): ... this.
246
247 2003-03-10  Devang Patel  <dpatel@apple.com>
248
249         PR c++/9394
250         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
251
252 2003-03-10  Jason Merrill  <jason@redhat.com>
253
254         PR c++/9798
255         * decl.c (push_using_directive): Push before recursing.
256
257         PR c++/9868, c++/9524
258         * call.c (resolve_scoped_fn_name): Handle the case of a function
259         pointer member.
260
261         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
262         argument in the pointer-to-member case.
263
264 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
265
266         PR c++/9373
267         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
268         pointers to member functions.
269
270         PR c++/8534
271         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
272         in pointer-to-member-function types.
273
274 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
275
276         * expr.c (cplus_expand_constant): Use C90 prototype style.
277         (cxx_expand_expr): Likewise.
278
279 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
280
281         PR c++/9970
282         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
283         functions.
284
285 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
286
287         * lang-specs.h (c++-header): Change .pch to .gch.
288
289 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
290
291         * cp-tree.h (cxx_init): Update prototype.
292         * lex.c (cxx_init): Similarly.
293
294 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
295
296         PR c++/9823
297         * cp-tree.h (begin_mem_initializers): Remove.
298         * parser.c (cp_parser_mem_initializer_list): Inline it here.
299         Do not call finish_mem_initializers if not in a constructor.
300         (cp_parser_class_head): Fix typo in error message.
301         * semantics.c (begin_mem_initializers): Remove.
302         * testsuite/g++.dg/parser/constructor1.C: New test.
303
304         PR c++/9809
305         * call.c (add_function_candidate): Skip builtin fuctions that have
306         not yet been declared.
307
308         PR c++/9982
309         * init.c (build_new_1): Correct logic for determining whether or
310         not to use an array cookie.
311
312         PR c++/9524
313         * parser.c (cp_parser_postfix_expression): Call
314         finish_non_static_data_member, even when processing_template_decl.
315
316         PR c++/9912
317         * cp-tree.h (is_ancestor): New function.
318         (handle_class_head): Change prototype.
319         * decl2.c (is_namespace_ancestor): Rename to ...
320         (namespace_anecestor): ... this.
321         (set_decl_namespace): Adjust accordingly.
322         (handle_class_head): Remove unncessary parameters.
323         * parser.c (cp_parser_class_head): Check that
324         nested-name-specifiers are used appropriately.
325
326 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
327
328         * call.c (reference_binding): Remove REF_IS_VAR parameter.
329         (implicit_conversion): Adjust call to reference_binding.
330         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
331         (initialize_reference): Adjust handling for references bound to
332         rvalues.
333         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
334         prototype.
335         (real_non_cast_lvalue_p): New method.
336         * cvt.c (build_up_reference): Adjust use of
337         make_temporary_var_for_ref_to_temp.
338         * tree.c (real_non_cast_lvalue_p): New method.
339
340 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
341
342         * except.c (init_exception_processing): Use C90 prototype style.
343         (cp_protect_cleanup_actions): Likewise.
344         (prepare_eh_type): Likewise.
345         (build_eh_type_type): Likewise.
346         (build_exc_ptr): Likewise.
347         (do_begin_catch): Likewise.
348         (dtor_nothrow): Likewise.
349         (do_end_catch): Likewise.
350         (push_eh_cleanup): Likewise.
351         (decl_is_java_type): Likewise.
352         (choose_personality_routine): Likewise.
353         (initialize_handler_parm): Likewise.
354         (expand_start_catch_block): Likewise.
355         (expand_end_catch_block): Likewise.
356         (begin_eh_spec_block): Likewise.
357         (finish_eh_spec_block): Likewise.
358         (do_allocate_exception): Likewise.
359         (do_free_exception): Likewise.
360         (wrap_cleanups_r): Likewise.
361         (stabilize_throw_expr): Likewise.
362         (build_throw): Likewise.
363         (complete_ptr_ref_or_void_ptr_p): Likewise.
364         (is_admissible_throw_operand): Likewise.
365         (nothrow_libfn_p): Likewise.
366         (can_convert_eh): Likewise.
367         (check_handlers_1): Likewise.
368         (check_handlers): Likewise.
369
370 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
371
372         * call.c (merge_conversion_sequences): New function.
373         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
374         (convert_class_to_reference): Correct handling of second
375         standard conversion sequence in a user-defined conversion
376         sequence.
377         (build_user_type_conversion_1): Use merge_conversion_sequences.
378         * cp-tree.def: Add comments for CONV nodes.
379         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
380
381 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
382
383         * error.c (init_error): Use C90 prototype style.
384         (dump_scope): Likewise.
385         (dump_qualifiers): Likewise.
386         (dump_template_argument): Likewise.
387         (dump_template_argument_list): Likewise.
388         (dump_template_parameter): Likewise.
389         (dump_template_bindings): Likewise.
390         (dump_type): Likewise.
391         (dump_typename): Likewise.
392         (class_key_or_enum): Likewise.
393         (dump_aggr_type): Likewise.
394         (dump_type_prefix): Likewise.
395         (dump_type_suffix): Likewise.
396         (dump_global_iord): Likewise.
397         (dump_simple_decl): Likewise.
398         (dump_decl): Likewise.
399         (dump_template_decl): Likewise.
400         (dump_function_decl): Likewise.
401         (dump_parameters): Likewise.
402         (dump_exception_spec): Likewise.
403         (dump_function_name): Likewise.
404         (dump_template_parms): Likewise.
405         (dump_char): Likewise.
406         (dump_expr_list): Likewise.
407         (dump_expr): Likewise.
408         (dump_binary_op): Likewise.
409         (dump_unary_op): Likewise.
410         (type_as_string): Likewise.
411         (expr_as_string): Likewise.
412         (decl_as_string): Likewise.
413         (context_as_string): Likewise.
414         (lang_decl_name): Likewise.
415         (cp_file_of): Likewise.
416         (cp_line_of): Likewise.
417         (decl_to_string): Likewise.
418         (expr_to_string): Likewise.
419         (fndecl_to_string): Likewise.
420         (code_to_string): Likewise.
421         (language_to_string): Likewise.
422         (parm_to_string): Likewise.
423         (op_to_string): Likewise.
424         (type_to_string): Likewise.
425         (assop_to_string): Likewise.
426         (args_to_string): Likewise.
427         (cv_to_string): Likewise.
428         (cxx_print_error_function): Likewise.
429         (cp_diagnostic_starter): Likewise.
430         (cp_diagnostic_finalizer): Likewise.
431         (cp_print_error_function): Likewise.
432         (function_category): Likewise.
433         (print_instantiation_full_context): Likewise.
434         (print_instantiation_partial_context): Likewise.
435         (maybe_print_instantiation_context): Likewise.
436         (print_instantiation_context): Likewise.
437         (cp_printer): Likewise.
438         (print_integer): Likewise.
439         (print_non_consecutive_character): Likewise.
440         (locate_error): Likewise.
441
442 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
443
444         PR c++/9965
445         * call.c (reference_binding): Add ref_is_var parameter.
446         (implicit_conversion): Adjust call to reference_binding.
447         (initialize_reference): Likewise.
448
449         PR c++/9400
450         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
451         PARM_DECLs.
452
453         PR c++/9791
454         * class.c (get_basefndecls): Use lookup_fnfields_1.
455
456 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
457
458         PR c++/9188
459         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
460         in error message.
461         (cp_parser_single_declaration): Likewise.
462
463 2003-03-05  Jason Merrill  <jason@redhat.com>
464
465         PR c++/9440
466         * call.c (build_conditional_expr): Use convert rather than an
467         explicit NOP_EXPR.
468
469 2003-03-02  Matt Austern  <austern@apple.com>
470
471         * decl.c (cp_binding_level): Add static_decls varray member.
472         (add_decl_to_level): Add static/inline namespace scope
473         declarations to static_decls array.
474         (wrapup_global_for_namespace): Pass static_decls only, instead of
475         all decls, to wrapup_global_declarations/check_global_declarations.
476         (push_namespace): Initialize static_decls for ordinary namespaces.
477         (cxx_init_decl_processing): Initialize static_decls for global
478         namespace.
479
480 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
481
482         * class.c (end_of_class): Correct thinko.
483
484 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
485
486         * config-lang.in: Replace ${libstdcxx_version} by its value.
487
488 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
489
490         * cp-tree.h (cxx_saved_binding): Declare.
491         (struct saved_scope): Adjust type of field 'old_binding'.
492         * decl.c (cxx_saved_binding_make): New macro.
493         (struct cxx_saved_binding): Define.
494         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
495         C++ bindings.
496         (maybe_push_to_top_level): Adjust local variable type.
497         (pop_from_top_level): Likewise.
498
499 2003-03-04  Tom Tromey  <tromey@redhat.com>
500
501         * Make-lang.in (c++.tags): New target.
502
503 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
504
505         * Make-lang.in: Update.
506
507 2003-03-03  Jason Merrill  <jason@redhat.com>
508
509         * decl.c (finish_enum): Do set the type in a template. Simplify.
510         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
511
512 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
513
514         PR c++/9878
515         * call.c (convert_class_to_reference): Correct conversion
516         sequences.
517         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
518         (implicit_conversion): Adjust call to reference_binding.
519         (add_candidate): Change type of candidates parameter.
520         (add_function_candidate): Likewise.
521         (add_conv_candidate): Likewise.
522         (build_builtin_candidate): Likewise.
523         (add_builtin_candidate): Likewise.
524         (add_builtin_candidates): Likewise.
525         (add_template_candidate_real): Likewise.
526         (add_template_candidate): Likewise.
527         (add_template_conv_candidate): Likewise.
528         (build_user_type_conversion_1): Adjust accordingly.
529         (build_object_call): Likewise.
530         (build_conditional_expr): Likewise.
531         (add_candidates): Likewise.
532         (build_new_op): Likewise.
533         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
534         (build_new_method_call): Adjust calls to add_function_candidate.
535         (make_temporary_var_for_ref_to_temp): New function.
536         (initialize_reference): Add decl parameter.
537         * class.c (build_rtti_vtbl_entries): Use build_address and
538         build_nop.
539         * cp-tree.h (initialize_reference): Change prototype.
540         (make_temporary_var_for_ref_to_temp): New function.
541         (build_type_conversion): Change prototype.
542         (build_address): New function.
543         (build_nop): Likewise.
544         * cvt.c (cp_convert_to_pointer): Adjust call to
545         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
546         Use build_nop.
547         (convert_to_pointer_force): Use build_nop.
548         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
549         (convert_to_reference): Adjust call to build_type_conversion.
550         (ocp_convert): Likewise.
551         (build_type_conversion): Remove for_sure parameter.
552         * decl.c (grok_reference_init): Use initialize_reference.
553         * typeck.c (build_address): New function.
554         (build_nop): Likewise.
555         (build_unary_op): Use them.
556         (build_ptrmemfunc): Tidy slightly.
557         (convert_for_initialization): Adjust call to
558         initialize_reference.
559         * typeck2.c (store_init_value): Remove #if 0'd code.
560
561 2003-03-03  Jason Merrill  <jason@redhat.com>
562
563         * decl.c (start_function): Clear DECL_NUM_STMTS.
564
565         * class.c (get_vtable_decl): Use vtbl_type_node.
566         (build_primary_vtable): Check for it.
567
568 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
569
570         * decl.c (check_initializer): Check for vector_opaque_p.
571
572 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
573
574         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
575           invoke an external cpp during compilation.
576
577 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
578
579         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
580         that of warning().
581         (start_decl): Likewise.
582         (start_function): Likewise.
583
584 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
585
586         * Make-lang.in (CXX_C_OBJS): Update.
587
588 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
589
590         PR c++/9892
591         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
592         instantiating it.
593
594 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
595
596         * parser.c (cp_parser_init_declarator): Revert opaque
597         vector_opaque_p change.
598         Do not include target.h.
599
600 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
601
602         PR c++/9879
603         * cp-tree.h (build_zero_init): Add parameter.
604         * decl.c (cp_finish_decl): Adjust call.
605         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
606         calls.
607         (build_default_init): Add nelts parameter.  Adjust calls to
608         build_zero_init.
609         (build_new_1): Adjust call to build_default_init.
610         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
611
612 2003-02-26  Devang Patel  <dpatel@apple.com>
613
614         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if required.
615         Postpone enum setting for template decls.
616         (build_enumerator): Delay copying value node until finish_enum (). Remove
617         #if 0'ed code.
618         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
619         (tsubst_copy): Add check for enum type.
620
621 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
622
623         PR c++/9683
624         * decl2.c (prune_vars_needing_no_initialization): Do not throw
625         away initializations for DECL_EXTERNAL VAR_DECLs.
626         (finish_file): Adjust accordingly.
627         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
628
629 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
630
631         * decl.c (add_binding): Time TV_NAME_LOOKUP.
632         (push_class_binding): Likewise.
633         (set_namespace_binding): Likewise.
634
635 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
636
637         PR c++/9836
638         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
639         specializations back to the main template.
640         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
641         * pt.c (resolve_typename_type): Likewise.
642
643 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
644
645         PR c++/9778
646         * pt.c (tsubst_copy_and_build): For a templated function inside a
647         scope, process template arguments.
648
649 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
650
651         PR c++/9602
652         * typeck2.c (abstract_virtuals_error): Don't check when
653         TYPE is still template parameter dependent.
654
655 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
656
657         PR c++/5333
658         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
659         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
660         * pt.c (instantiate_class_template): Don't try to instantiate
661         dependent types.
662         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
663
664 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
665
666         PR c++/9749
667         * decl.c (grokdeclarator): Do not allow parameters with variably
668         modified types.
669
670 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
671
672         * search.c (grow_bfs_bases): Remove. Fold into ...
673         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
674         in previous patch.
675
676 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
677
678         PR c++/9729
679         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
680         when the G++ 3.2 ABI prevents correct compilation.
681
682 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
683
684         Change base class access representation. Share virtual base
685         binfos.
686         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
687         call.
688         * cp/class.c (build_base_path): Likewise.
689         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
690         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
691         (make_new_vtable): Adjust.
692         (force_canonical_binfo_r): Delete.
693         (force_canonical_binfo): Delete.
694         (mark_primary_virtual_base): Delete.
695         (dfs_unshared_virtual_bases): Delete.
696         (mark_primary_bases): Adjust.
697         (maybe_warn_about_overly_private_class): Adjust.
698         (dfs_base_derived_from): Delete.
699         (base_derived_from): Follow the inheritance chain.
700         (struct find_final_overrider_data): Add vpath member.
701         (dfs_find_final_overrider): Adjust.
702         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
703         (find_final_overrider): Adjust.
704         (update_vtable_entry_for_fn): Adjust.
705         (modify_all_vtables): Adjust.
706         (walk_subobject_offsets): Adjust.
707         (layout_nonempty_base_or_field): Adjust.
708         (layout_empty_base): Remove last parameter. Adjust.
709         (build_base_field): Adjust.
710         (build_base_fields): Adjust.
711         (propagate_binfo_offsets): Remove last parameter. Adjust.
712         (dfs_set_offset_for_unshared_vbases): Delete.
713         (layout_virtual_bases): Adjust.
714         (finish_struct_1): Adjust.
715         (init_class_processing): Don't init access nodes.
716         (dfs_get_primary_binfo): Delete.
717         (get_primary_binfo): Adjust.
718         (dump_class_hierarchy_r): Remove most derived arg, add IGO
719         parameter. Adjust.
720         (dump_class_hierarchy): Adjust.
721         (finish_vtbls): Adjust.
722         (get_original_base): Delete.
723         (build_vtt_inits): Adjust.
724         (dfs_build_secondary_vptr_vtt_inits): Adjust.
725         (dfs_ctor_vtable_bases_queue_p): Adjust.
726         (build_ctor_vtbl_group): Adjust.
727         (dfs_accumulate_vtbl_inits): Adjust.
728         (build_vtbl_initializer): Adjust.
729         (build_vbase_offset_vtbl_entries): Adjust.
730         (add_vcall_offset_vtbl_entries_1): Adjust.
731         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
732         (access_*_node): Remove.
733         (CANONICAL_BINFO): Delete.
734         (BINFO_UNSHARED_MARKED): Remove.
735         (BINFO_MARKED): Set LANG_FLAG_0 directly.
736         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
737         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
738         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
739         Delete.
740         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
741         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
742         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
743         Delete.
744         (BINFO_DEPENDENT_BASE_P): New.
745         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
746         index.
747         (markedp, unmarkedp): Adjust.
748         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
749         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
750         find_vbase_instance, binfo_for_vbase): Delete.
751         (copied_binfo, original_binfo): Declare.
752         (finish_base_specifier): Add virtual_p arg.
753         (unshare_base_binfos): Delete.
754         (copy_base_binfos): Declare.
755         (reverse_path): Delete.
756         * cp/decl.c (xref_basetypes): Access and virtuality passed
757         differently. Don't copy direct base binfos here. Call
758         copy_base_binfos.
759         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
760         (initialize_vtbl_ptrs): Adjust.
761         (expand_member_init): Adjust.
762         * cp/parser.c (cp_parser_base_specifier): Adjust.
763         * cp/pt.c (instantiate_class_template): Adjust.
764         (get_template_base_recursive): Adjust.
765         * cp/rtti.c (get_pseudo_ti_init): Adjust.
766         (get_pseudo_ti_desc): Adjust.
767         * cp/tree.c (unshare_base_binfos): Rename to ...
768         (copy_base_binfos): ... here, reimplement.
769         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
770         (reverse_path): Remove.
771         * cp/typeck.c (get_delta_difference): Adjust error messages.
772         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
773         * cp/search.c (lookup_base_r): Adjust.
774         (dynamic_cast_base_recurse): Adjust.
775         (canonical_binfo): Remove.
776         (dfs_canonical_queue): Remove.
777         (dfs_assert_unmarked_p): Remove.
778         (assert_canonical_unmarked): Remove.
779         (shared_marked_p, shared_unmarked_p): Remove.
780         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
781         (dfs_access_in_type): Adjust.
782         (access_in_type): Adjust.
783         (dfs_accessible_queue_p): Adjust.
784         (dfs_accessible_p): Adjust.
785         (is_subobject_of_p_1, is_subobject_of_p): Remove.
786         (struct lookup_field_info): Remove from_dep_base_p field.
787         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
788         (lookup_field_r): Remove dependent base code.
789         (lookup_member): Likewise.
790         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
791         (dfs_unmarked_real_bases_queue_p): Remove.
792         (dfs_marked_real_bases_queue_p): Remove.
793         (dfs_skip_vbases): Remove.
794         (dfs_get_pure_virtuals): Adjust.
795         (markedp, unmarkedp): Adjust.
796         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
797         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
798         (dfs_unmark): Adjust.
799         (dfs_get_vbase_types):Remove.
800         (dfs_build_inheritance_graph_order): Remove.
801         (get_vbase_types): Remove
802         (dfs_find_vbase_instance): Remove.
803         (find_vbase_instance): Remove.
804         (dfs_debug_unmarkedp): Adjust.
805         (dependent_base_p): Remove.
806         (dfs_push_type_decls): Adjust.
807         (dfs_push_decls): Adjust.
808         (dfs_no_overlap_yet): Adjust.
809         (copied_binfo): New function.
810         (original_binfo): New function.
811         (binfo_for_vbase): Remove.
812
813 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
814
815         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
816         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
817         vectors, for speed.
818
819 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
820
821         PR c++/9704
822         * class.c (layout_class_type): In the 3.2 ABI, take into account
823         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
824
825 2003-02-18  Matt Austern <austern@apple.com>
826
827         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
828         nothing for C++.
829         * cp/decl.c (wrapup_globals_for_namespace): Remove special
830         handling of global namespace.
831
832 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
833
834         * cp-tree.h (rid_to_yy): Delete.
835         (C_RID_YYCODE): Delete.
836         (finish_file): Delete redundant declaration.
837
838 2003-02-18  Jason Merrill  <jason@redhat.com>
839
840         PR c++/9623
841         * decl.c (reshape_init): Don't mess with initializer labels.
842
843         PR c++/9485
844         * parser.c (cp_parser_postfix_expression): Set idk properly for
845         object->scope::member.
846
847 2003-02-18  Ben Elliston  <bje@redhat.com>
848
849         PR other/7350
850         * decl.c (duplicate_decls): Fix typo in comment.
851
852 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
853
854         PR debug/9717
855         * class.c (build_base_field): Mark fields for base classes with
856         DECL_IGNORED_P.
857
858 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
859
860         PR c++/9457
861         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
862         CONSTRUCTOR_ELTS only once.
863
864 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
865
866         PR c++/9459
867         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
868         (dump_type_suffix): Likewise.
869
870 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
871
872         * search.c: ANSIfy function declarations and definitions.
873         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
874         * call.c (build_method_call, resolve_scoped_fn_name,
875         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
876         calls.
877         * class.c (handle_using_decl): Likewise.
878         * decl.c (make_typename_type, make_unmound_class_template,
879         start_decl, compute_array_index_type): Likewise.
880         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
881         * init.c (expand_member_init, build_member_call): Likewise.
882         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
883         resolve_typename_type): Likewise.
884         * typeck.c (lookup_destructor, finish_class_member_access_exprm
885         build_prememfunc_access_expr): Likewise.
886
887 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
888
889         * decl2.c: Include "timevar.h".
890         (namespace_ancestor): Time name lookup.
891         (add_using_namespace): Likewise.
892         (lookup_using_namespace): Likewise.
893         (qualified_lookup_using_namespace): Likewise.
894         (decl_namespace): Likewise.
895         (lookup_arg_dependent): Likewise.
896         * lex.c (do_identifier): Likewise.
897         (do_scoped_id): Likewise.
898         * pt.c (lookup_template_class): Likewise.
899
900 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
901
902         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
903
904 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
905
906         * decl.c: Include "timevar.h".
907         (poplevel): Time name lookup.
908         (find_binding): Likewise.
909         (push_namespace): Likewise.
910         (pop_nested_namespace): Likewise.
911         (store_bindings): Likewise.
912         (maybe_push_to_top_level): Likewise.
913         (pop_from_top_level): Likewise.
914         (push_local_name): Likewise.
915         (pushtag): Likewise.
916         (pushdecl): Likewise.
917         (pushdecl_with_scope): Likewise.
918         (pushdecl_namespace_level): Likewise.
919         (pushdecl_top_level): Likewise.
920         (pushdecl_class_level): Likewise.
921         (push_class_level_binding): Likewise.
922         (push_using_decl): Likewise.
923         (push_using_directive): Likewise.
924         (push_overloaded_decl): Likewise.
925         (lookup_label): Likewise.
926         (define_label): Likewise.
927         (lookup_tag): Likewise.
928         (lookup_tag_reverse): Likewise.
929         (lookup_namespace_name): Likewise.
930         (select_decl): Likewise.
931         (unqualified_namespace_lookup): Likewise.
932         (lookup_name_real): Likewise.
933         (lookup_name_current_level): Likewise.
934         (lookup_type_current_level): Likewise.
935         (maybe_inject_for_scope_var): Likewise.
936         (xref_tag): Likewise.
937
938         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
939
940 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
941
942         * decl.c (build_enumerator):  Remove unneeded test.
943
944 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
945
946         * cp-tree.h (struct lang_type_header): Make all fields unsigned
947         char.
948
949 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
950
951         PR c++/7129
952         * call.c (z_candidate): Add args.
953         (convert_class_to_reference): Set it.
954         (implicit_conversion): Tidy.
955         (add_candidate): Add args parameter.
956         (add_function_candidate): Adjust call to add_candidate.
957         (add_conv_candidate): Likewise.
958         (build_builtin_candidate): Likewise.
959         (build_user_type_conversion_1): Eliminate wasteful tree_cons
960         usage.
961         (build_new_function_call): Likewise.
962         (build_object_call): Likewise.
963         (add_candidates): New function.
964         (build_new_op): Use it.
965         (covert_like_real): Adjust call to build_over_call.
966         (build_over_call): Remove args parameter.
967         * operators.def: Add <?= and >?=.
968
969 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
970
971         * typeck.c (build_indirect_ref): Don't check flag_volatile.
972
973 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
974
975         PR c++/8849
976         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
977
978 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
979
980         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
981         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
982         (BINFO_LANG_ELTS): New #define.
983         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
984
985 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
986
987         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
988
989 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
990
991         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
992         for class types.
993         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
994         rather than TYPE_LANG_FLAG_0.
995         (TYPE_BUILT_IN): Remove.
996         (TYPE_DEPENDENT_P): New macro.
997         (TYPE_DEPENDENT_P_VALID): Likewise.
998         (lang_type_class): Add fields_readonly.
999         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
1000         * pt.c (dependent_type_p_r): New function, split out from ...
1001         (dependent_type_p): ... here.  Memoize results.
1002         * search.c (dependent_base_p): Use dependent_type_p, not
1003         uses_template_parms.
1004         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
1005         for class types.
1006
1007 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
1008
1009         * call.c (build_field_call): Use build_new_op, not build_opfncall.
1010         (prep_operand): New function.
1011         (build_new_op): Use it.  Remove dead code.
1012         * class.c (pushclass): Change "modify" parameter type from int to
1013         bool.
1014         (currently_open_class): Use same_type_p, not pointer equality.
1015         (push_nested_class): Adjust calls to pushclass, remove modify
1016         parameter.
1017         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
1018         (pushclass): Change prototype.
1019         (push_nested_class): Likewise.
1020         (grokoptypename): Remove.
1021         (build_opfncall): Remove.
1022         (value_dependent_expression_p): Declare.
1023         (resolve_typename_type): Likewise.
1024         (resolve_typename_type_in_current_instantiation): Likewise.
1025         (enter_scope_of): Remove.
1026         (tsubst): Remove.
1027         (tsubst_expr): Likewise.
1028         (tsubst_copy): Likewise.
1029         (tsubst_copy_and_build): Likewise.
1030         * decl.c (warn_about_implicit_typename_lookup): Remove.
1031         (finish_case_label): Return error_mark_node for erroneous labels.
1032         (start_decl): Adjust calls to push_nested_class.
1033         (grokfndecl): Call push_scope/pop_scope around call to
1034         duplicate_decls.
1035         (grokdeclarator): Do not call tsubst.
1036         (start_function): Adjust calls to push_nested_class.
1037         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
1038         (check_classfn): Use push_scope/pop_scope around type comparisions.
1039         (grokoptypename): Remove.
1040         (push_sscope): Adjust call to push_nested_class.
1041         * error.c (dump_type): Show cv-qualification of typename types.
1042         * init.c (build_member_call): Use build_new_op, not
1043         build_opfncall.
1044         * method.c (build_opfncall): Remove.
1045         * parser.c (cp_parser): Add allow_non_constant_expression_p and
1046         non_constant_expression_p.
1047         (cp_parser_constant_expression): Adjust prototype.
1048         (cp_parser_resolve_typename_type): Remove.
1049         (cp_parser_non_constant_expression): New function.
1050         (cp_parser_non_constant_id_expression): Likewise.
1051         (cp_parser_new): Set allow_non_constant_expression_p and
1052         non_constant_expression_p.
1053         (cp_parser_primary_expression): Reject `this' and `va_arg' in
1054         constant-expressions.  Note that dependent names aren't really
1055         constant.
1056         (cp_parser_postfix_expression): Reject conversions to non-integral
1057         types in constant-expressions.  Neither are increments or
1058         decrements.
1059         (cp_parser_unary_expression): Reject increments and decrements in
1060         constant-expressions.
1061         (cp_parser_direct_new_declarator): Adjust call to
1062         cp_parser_constant_expression.
1063         (cp_parser_cast_expression): Reject conversions to non-integral
1064         types in constant-expressions.
1065         (cp_parser_assignment_expression): Rejects assignments in
1066         constant-expressions.
1067         (cp_parser_expression): Reject commas in constant-expressions.
1068         (cp_parser_labeled_statement): Adjust call to
1069         cp_parser_constant_expression.
1070         (cp_parser_direct_declarator): Simplify array bounds, even in
1071         templates, when they are non-dependent.  Use
1072         resolve_typename_type, not cp_parser_resolve_typename_type.
1073         (cp_parser_class_head): Use resolve_typename_type, not
1074         cp_parser_resolve_typename_type.
1075         (cp_parser_member_declaration): Adjust call to
1076         cp_parser_constant_expression.
1077         (cp_parser_constant_initializer): Likewise.
1078         (cp_parser_constructor_declarator): Use resolve_typename_type, not
1079         cp_parser_resolve_typename_type.
1080         (cp_parser_late_parsing_default_args): Adjust call to
1081         push_nested_class.
1082         * pt.c (tsubst): Give it internal linkage.
1083         (tsubst_expr): Likewise.
1084         (tsubst_copy): Likewise.
1085         (tsubst_copy_and_build): Likewise.
1086         (push_access_scope_real): Likewise.
1087         (tsubst_friend_class): Likewise.
1088         (instantiate_class_template): Adjust call to pushclass.
1089         (value_dependent_expression_p): Give it external linkage.
1090         Robustify.
1091         (resolve_typename_type): New function.
1092         * semantics.c (finish_call_expr): Use build_new_op, not
1093         build_opfncall.
1094         (begin_constructor_declarator): Remove.
1095         (begin_class_definition): Adjust call to pushclass.
1096         (enter_scope_of): Remove.
1097         * typeck.c (comptypes): Resolve typename types as appropriate.
1098         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
1099         (build_x_compound_expr): Likewise.
1100         (build_modify_expr): Likewise.
1101         (build_x_modify_expr): Likewise.
1102         * typeck2.c (build_x_arrow): Likewise.
1103
1104 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
1105
1106         * pt.c (last_pending_template) Declare GTY().
1107
1108 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1109
1110         PR c++/8591
1111         * parser.c (cp_parser_elaborated_type_specifier): Convert
1112         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
1113         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
1114
1115 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
1116
1117         PR c++/9437
1118         * pt.c (unify): Don't unify '*T' with 'U C::*'.
1119
1120         PR c++/3902
1121         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
1122         inside a declarator.
1123
1124 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
1125
1126         * class.c (update_vtable_entry_for_fn): Add index parameter.
1127         Generate vcall thunk for covariant overriding from a virtual
1128         primary base.
1129         (dfs_modify_vtables): Adjust.
1130
1131 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
1132
1133         PR c++/9403
1134         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
1135         template keyword.
1136         (cp_parser_base_specifier): Look for and consume a
1137         TEMPLATE keyword. Replace switch with array index.
1138
1139         PR c++/795
1140         * semantics.c (finish_non_static_data_member): Remember the
1141         field's type even in a template.
1142
1143         PR c++/9415
1144         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
1145         already scoped.
1146
1147         PR c++/8545
1148         * parser.c (cp_parser_cast_expression): Be more tentative.
1149
1150 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1151
1152         * cp-tree.h (flagged_type_tree_s): Remove.
1153         (check_for_new_type): Likewise.
1154         * typeck2.c (check_for_new_type): Likewise.
1155
1156 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
1157
1158         * dump.c: ANSIfy function declarations and definitions.
1159
1160         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
1161
1162 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1163
1164         PR c++/9354
1165         * init.c (build_new): Set the type of the new-expression, even
1166         when processing_templte_decl.
1167
1168         PR c++/9216
1169         * parser.c (cp_parser_primary_expression): Improve error message
1170         for templates used in an expression context.
1171
1172         PR c++/8696
1173         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
1174         parse when encountering "typedef".
1175
1176 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
1177
1178         * class.c, parser.c: ANSIfy function definitions and declarations.
1179
1180 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1181
1182         PR c++/9328
1183         * error.c (dump_decl): For an OVERLOAD, just print the name of the
1184         function; it doesn't make sense to try to print its type.
1185         * semantics.c (finish_typeof): Issue errors about invalid uses.
1186
1187         PR c++/9298
1188         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
1189         function.
1190         (cp_parser_expression_statement): Use it.
1191         (cp_parser_explicit_instantiation): Likewise.
1192         * pt.c (do_decl_instantiation): Improve error handling logic.
1193
1194 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1195
1196         PR c++/9384
1197         * parser.c (cp_parser_using_declaration): Issue error messages
1198         about name resolution failures here.
1199
1200         PR c++/9388
1201         * class.c (currently_open_derived_class): Use dependent_type_p.
1202         * cp-tree.h (dependent_type_p): New function.
1203         (dependent_template_arg_p): Likewise.
1204         (dependent_template_p): Likewise.
1205         (type_dependent_expression_p): Likewise.
1206         * parser.c (cp_parser_dependent_type_p): Remove.
1207         (cp_parser_value_dependent_type_p): Likewise.
1208         (cp_parser_type_dependent_expression_p): Likewise.
1209         (cp_parser_dependent_template_arg_p): Likewise.
1210         (cp_parser_dependent_template_id_p): Likewise.
1211         (cp_parser_dependent_template_p): Likewise.
1212         (cp_parser_diagnose_invalid_type_name): Replace
1213         cp_parser_dependent_type_p with dependent_type_p, etc.
1214         (cp_parser_primary_expresion): Likewise.
1215         (cp_parser_nested_name_specifier_opt): Likewise.
1216         (cp_parser_postfix_expression): Likewise.
1217         (cp_parser_unary_expression): Likewise.
1218         (cp_parser_template_name): Likewise.
1219         (cp_parser_class_name): Likewise.
1220         (cp_parser_lookup_name): Likewise.
1221         * pt.c (dependent_type_p): New function.
1222         (value_dependent_expression_p): Likewise.
1223         (type_dependent_expression_p): Likewise.
1224         (dependent_template_arg_p): Likewise.
1225         (dependent_template_id_p): Likewise.
1226         (dependent_template_p): Likewise.
1227
1228         PR c++/9285
1229         PR c++/9294
1230         * parser.c (cp_parser_simple_declaration): Return quickly when
1231         encountering errors.
1232
1233 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1234
1235         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
1236
1237 2003-01-17  Jason Merrill  <jason@redhat.com>
1238
1239         PR c++/9167, c++/9358
1240         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
1241
1242 2003-01-17  Jason Merrill  <jason@redhat.com>
1243
1244         PR c++/9342
1245         * call.c (build_conditional_expr): Always do lvalue-rvalue
1246         conversion.
1247
1248 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
1249
1250         PR c++/9294
1251         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
1252         * cp-tree.h (BASELINK_BINFO): Adjust.
1253         (BASELINK_FUNCTIONS): Likewise.
1254         (BASELINK_ACCESS_BINFO): Likewise.
1255         (tree_baselink): New structure.
1256         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
1257         (lang_tree_node): Add baselink.
1258         * decl.c (cp_tree_node_structure): Add BASELINK case.
1259         * search.c (build_baselink): Adjust.
1260         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
1261         test from TREE_LIST case.
1262
1263         PR c++/9272
1264         * parser.c (cp_parser_constructor_declarator_p): Do not assume
1265         that a constructor cannot be declared outside of its own class.
1266
1267         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
1268         be resolved, neither can the qualified name.
1269
1270         * rtti.c (get_pseudo_ti_desc): Fix thinko.
1271
1272 2003-01-16  Jason Merrill  <jason@redhat.com>
1273
1274         PR c++/8564
1275         * init.c (build_vec_init): Re-add maxindex parm.
1276         (perform_member_init, build_aggr_init): Pass it.
1277         (build_new_1): Pass it. Use an incomplete array type for full_type.
1278         * typeck.c (build_modify_expr): Pass it.
1279         * cp-tree.h: Adjust.
1280
1281 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
1282
1283         * cp-tree.h (tsubst_copy_and_build): New declaration.
1284         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
1285         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
1286         (tsubst_copy_and_build): New function.
1287
1288 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
1289
1290         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
1291         (PARTIAL_INSTANTIATION_P): Remove.
1292         (IMPLICIT_TYPENAME_P): Likewise.
1293         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
1294         (build_typename_type): Remove declaration.
1295         (parmlist_is_exprlist): Likewise.
1296         * decl.c (build_typename_type): Make it static, remove third
1297         parameter.
1298         (push_class_binding): Don't do implicit typename stuff.
1299         (make_typename_type): Likewise.
1300         (lookup_name_real): Likewise.
1301         (grokdeclarator): Don't try to convert declarations into
1302         initializations.  Don't do implicit typename stuff.
1303         (parmlist_is_exprlist): Remove.
1304         (xref_basetypes): Simplify.
1305         * decl2.c (grokfield): Don't try to convert declarations into
1306         initializations.
1307         (build_anon_union_vars): Do this while processing templates, too.
1308         (finish_anon_union): Likewise.
1309         * error.c (dump_type): Remove implicit typename handling.
1310         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
1311         (cp_parser_primary_expression): Correct handling of names not
1312         found by unqualified name lookup in templates.
1313         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
1314         of types when possible.
1315         (cp_parser_simple_declaration): Complain intelligently about some
1316         invalid declarations.
1317         (cp_parser_member_declaration): Likewise.
1318         (cp_parser_constructor_declarator_p): Don't check when we're in a
1319         function scope.
1320         * pt.c (instantiate_class_template): Remove
1321         PARTIAL_INSTANTIATION_P gunk.
1322         * search.c (lookup_field_r): Don't build implicit typenames.
1323         (marked_pushdecls_p): Don't enter dependent base types.
1324         (unmarked_pushdecls_p): Likewise.
1325         * semantics.c (begin_class_definition): Remove implicit typename
1326         stuff.
1327
1328 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
1329
1330         PR c++/9212
1331         * parser.c (cp_parser_direct_declarator): If accepting either
1332         abstract or named, the name must be an unqualified-id.
1333
1334 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1335
1336         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
1337
1338 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1339
1340         * decl2.c (check_classfn): Fix uninitialized warning.
1341         (build_anon_union_vars): Likewise.
1342         * pt.c (tsubst_copy): Likewise.
1343
1344 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
1345
1346         Further conform g++'s __vmi_class_type_info to the C++ ABI
1347         specification.
1348         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
1349         the specification.
1350         (class_hint_flags): Likewise.
1351
1352 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1353
1354         * config-lang.in: Add semantics.c to gtfiles.
1355         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
1356         (saved_scope): Likewise.
1357         (type_lookups): Remove.
1358         (deferred_access): New structure.
1359         (type_access_control): Remove.
1360         (save_type_access_control): Likewise.
1361         (reset_type_access_control): Likewise.
1362         (decl_type_access_control): Likewise.
1363         (push_deferring_access_checks): Declare.
1364         (resume_deferring_access_checks): Likewise.
1365         (stop_deferring_access_checks): Likewise.
1366         (pop_deferring_access_checks): Likewise.
1367         (get_deferred_access_checks): Likewise.
1368         (pop_to_parent_deferring_access_checks): Likewise.
1369         (perform_deferred_access_checks): Likewise.
1370         (perform_or_defer_access_check): Likewise.
1371         * decl.c (make_typename_type): Use perform_or_defer_access_check.
1372         (make_unbound_class_template): Likewise.
1373         (grokdeclarator): Don't call decl_type_access_control.
1374         * parser.c (cp_parser_context): Remove deferred_access_checks
1375         and deferring_access_checks_p fields.
1376         (cp_parser_context_new): Adjust.
1377         (cp_parser): Remove access_checks_lists.
1378         (cp_parser_defer_access_check): Remove.
1379         (cp_parser_start_deferring_access_checks): Remove.
1380         (cp_parser_stop_deferring_access_checks): Remove.
1381         (cp_parser_perform_deferred_access_checks): Remove.
1382         (cp_parser_nested_name_specifier_opt): Use new deferred access
1383         functions.
1384         (cp_parser_simple_declaration): Likewise.
1385         (cp_parser_template_id): Likewise.
1386         (cp_parser_function_definition): Likewise.
1387         (cp_parser_class_specifier): Likewise.
1388         (cp_parser_lookup_name): Likewise.
1389         (cp_parser_single_declaration): Likewise.
1390         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
1391         (cp_parser_parse_tentatively): Likewise.
1392         (cp_parser_parse_definitely): Likewise.
1393         (yyparse): Likewise.
1394         (cp_parser_init_declarator): Remove access_checks parameter.
1395         Use new deferred access functions.
1396         (cp_parser_function_definition_from_specifiers_and_declarator):
1397         Likewise.
1398         (cp_parser_class_head): Remove deferring_access_checks_p and
1399         saved_access_checks parameters.  Use new deferred access functions.
1400         (cp_parser_member_specification_opt): Don't call
1401         reset_type_access_control.
1402         * search.c (type_access_control): Remove.
1403         * semantics.c: Include "gt-cp-semantics.h".
1404         (deferred_type_access_control): Remove.
1405         (deferred_access_stack): New variable.
1406         (deferred_access_free_list): Likewise.
1407         (push_deferring_access_checks): New function.
1408         (resume_deferring_access_checks): Likewise.
1409         (stop_deferring_access_checks): Likewise.
1410         (pop_deferring_access_checks): Likewise.
1411         (get_deferred_access_checks): Likewise.
1412         (pop_to_parent_deferring_access_checks): Likewise.
1413         (perform_deferred_access_checks): New function, adapted from
1414         cp_parser_perform_deferred_access_checks.
1415         (perform_or_defer_access_check): New function, adapted from
1416         cp_parser_defer_access_check.
1417         (current_type_lookups): Remove.
1418         (deferred_type_access_control): Likewise.
1419         (decl_type_access_control): Likewise.
1420         (save_type_access_control): Likewise.
1421         (reset_type_access_control): Likewise.
1422         (begin_function_definition): Adjust.
1423         (begin_class_definiton): Likewise.
1424
1425 2003-01-13  Jason Merrill  <jason@redhat.com>
1426
1427         PR c++/8748
1428         * class.c (build_base_path): Take the address before calling save_expr.
1429
1430         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
1431         all the ambiguous conversions are bad.
1432
1433         * class.c (maybe_warn_about_overly_private_class): Don't stop
1434         searching when we find a nonprivate method.
1435
1436         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
1437
1438 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
1439
1440         * cp-tree.h (get_arglist_len_in_bytes): Remove.
1441
1442         PR c++/9264
1443         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
1444         typeame types more robustly.
1445
1446 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
1447
1448         * parser.c:  Fix comment typos.
1449
1450 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
1451
1452         PR c++/9099
1453         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
1454         an object_type which is not a class type.
1455
1456 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
1457
1458         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
1459         (cp_parser_late_parsing_default_args): Likewise.
1460
1461 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
1462
1463         * cfns.gperf: ANSIfy function declarations.
1464         * cfns.h: Regenerate.
1465         * cp-tree.h: ANSIfy function declarations.
1466
1467 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
1468
1469         * cp-tree.h (reparse_absdcl_as_expr): Remove.
1470         (reparse_absdcl_as_casts): Likewise.
1471         (reparse_decl_as_expr): Likewise.
1472         (finish_decl_parsing): Likewise.
1473         * decl2.c (reparse_absdcl_as_expr): Remove.
1474         (reparse_absdcl_as_casts): Likewise.
1475         (repase_decl_as_expr): Likewise.
1476         (finish_decl_parsing): Likewise.
1477
1478         PR c++/9128
1479         PR c++/9153
1480         PR c++/9171
1481         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
1482         function.
1483         (cp_parser_nested_name_specifier_opt): Correct the
1484         check_dependency_p false.
1485         (cp_parser_postfix_expression): Fix formatting.
1486         (cp_parser_decl_specifier_seq): Avoid looking for constructor
1487         declarators when possible.
1488         (cp_parser_template_id): Avoid performing name-lookup when
1489         possible.
1490         (cp_parser_class_head): Do not count specializations when counting
1491         levels of templates.
1492         (cp_parser_constructor_declarator_p): Return immediately if
1493         there's no chance that the tokens form a constructor declarator.
1494         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
1495         expression with reference type.
1496         (get_tinfo_decl_dynamic): Do not return an expression with
1497         reference type.
1498         (build_typeid): Add comment.  Do not return an expression with
1499         reference type.
1500         * typeck.c (build_class_member_access_expr): Improve handling of
1501         conditionals and comma-expressions as objects.
1502
1503 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
1504
1505         * cfns.gperf: ANSIfy function declarations.
1506         * cfns.h: Regenerate.
1507         * cp-tree.h: ANSIfy function declarations.
1508         * parser.c: ANSIfy function declarations & definitions.
1509
1510         * decl.c (bad_specifiers): Fix parameter order error I introduced.
1511
1512 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
1513
1514         Merge from pch-branch:
1515
1516         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
1517
1518         Merge to tag pch-merge-20030102:
1519
1520         * semantics.c (finish_translation_unit): Don't call finish_file.
1521         * parser.c: Don't include ggc.h.
1522         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
1523         read first token here.  Don't allow PCH files after the first
1524         token is read.
1525         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
1526         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
1527         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
1528         (cp_parser_late_parsing_for_member): Don't duplicate call to
1529         cp_lexer_set_source_position_from_token.
1530         (cp_parser_late_parsing_default_args): Likewise.
1531         (yyparse): Call finish_file after clearing the_parser.
1532
1533         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
1534
1535         * Make-lang.in: Remove $(GGC_H) from all dependencies.
1536         (CXX_TREE_H): Add $(GGC_H).
1537         * class.c: Don't include ggc.h.
1538         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
1539         (method_name_cmp): Likewise.
1540         (resort_data): New variable.
1541         (resort_field_decl_cmp): New.
1542         (resort_method_name_cmp): New.
1543         (resort_sorted_fields): New.
1544         (resort_type_method_vec): New.
1545         (finish_struct_methods): Delete cast.
1546         (finish_struct_1): Delete cast.
1547         * cp-tree.h: Include ggc.h.
1548         (struct lang_type_class): Add reorder attribute to field `methods'.
1549         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
1550         (resort_sorted_fields): New prototype.
1551         (resort_type_method_vec): New prototype.
1552         * call.c: Don't include ggc.h.
1553         * decl.c: Likewise.
1554         * decl2.c: Likewise.
1555         * init.c: Likewise.
1556         * lex.c: Likewise.
1557         * method.c: Likewise.
1558         * optimize.c: Likewise.
1559         * parse.y: Likewise.
1560         * pt.c: Likewise.
1561         * repo.c: Likewise.
1562         * search.c: Likewise.
1563         * semantics.c: Likewise.
1564         * spew.c: Likewise.
1565         * tree.c: Likewise.
1566
1567         * lang-specs.h: Remove comment.
1568
1569         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
1570
1571         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
1572         (operator_name_info): Mark to be saved for PCH, specify size.
1573         (assignment_operator_name_info): Likewise.
1574
1575         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
1576
1577         * decl.c (anon_cnt): Mark to be saved for PCH.
1578
1579         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
1580
1581         * lex.c  (init_reswords): Delete now-untrue comment.
1582         Allocate ridpointers using GGC.
1583
1584         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
1585
1586         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
1587
1588         * g++spec.c (lang_specific_driver): Don't include standard
1589         libraries in `added'.
1590
1591         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
1592
1593         * decl2.c (finish_file): Call c_common_write_pch.
1594         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
1595
1596         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
1597
1598         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
1599         files when using g++.
1600         * lang-specs.h: Handle compiling C++ header files.
1601
1602 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
1603
1604         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
1605
1606 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1607
1608         * pt.c (push_access_scope_real): Call push_to_top_level for
1609         function in namespace scope.
1610         (pop_access_scope): Call pop_from_top_level for function in
1611         namespace scope.
1612
1613 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
1614
1615         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
1616
1617 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
1618
1619         * Make-lang.in (c++.install-common, c++.install-man,
1620         c++.uninstall): Prepend $(DESTDIR) to destination paths in
1621         all (un)installation commands.
1622         (c++.install-common): Rewrite $(LN) commands to support
1623         DESTDIR with "ln" as well as with "ln -s".
1624
1625 2003-01-08  Jason Merrill  <jason@redhat.com>
1626
1627         * parser.c (cp_parser_primary_expression): See through explicitly
1628         scoped ALIAS_DECLs, too.
1629
1630 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
1631
1632         * decl.c: Remove some #if 0 code.
1633
1634         * decl.c: ANSIfy function declarations.
1635
1636 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
1637
1638         * parser.c (cp_parser_asm_definition): Correct handling of omitted
1639         operands.
1640
1641 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1642
1643         PR c++/9030
1644         * decl.c (make_typename_type): Check access only when tf_error.
1645         (make_unbound_class_template): Likewise.
1646         * pt.c (saved_access_scope): New variable.
1647         (push_access_scope_real): New function.
1648         (push_access_scope): Likewise.
1649         (pop_access_scope): Likewise.
1650         (tsubst_default_argument): Use them.
1651         (instantiate_template): Likewise.
1652         (regenerate_decl_from_template): Likewise.
1653         (instantiate_decl): Likewise.
1654         (get_mostly_instantiated_function_type): Likewise.
1655
1656 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
1657
1658         * tree.c: Delete bogus #if 0 code.
1659
1660 2003-01-07  Andreas Schwab  <schwab@suse.de>
1661
1662         * class.c (layout_class_type): Don't use
1663         PCC_BITFIELD_TYPE_MATTERS if not defined.
1664
1665 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
1666
1667         PR c++/9165
1668         * decl2.c (build_cleanup): Mark the object as used.
1669
1670         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
1671         (hash_local_specialization): New function.
1672         (register_local_specialization): Revert 2003-01-05 change.
1673         (instantiate_decl): Use hash_local_specialization when creating
1674         the local_specializations table.
1675
1676         * decl2.c (mark_used): Do not synthesize thunks.
1677
1678         * class.c (layout_class_type): Correct handling of unnamed
1679         bitfields wider than their types.
1680
1681         PR c++/9189
1682         * parser.c (cp_parser): Remove default_arg_types.  Update
1683         documentation for unparsed_functions_queues.
1684         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
1685         parameter.
1686         (cp_parser_new): Don't set parser->default_arg_types.
1687         (cp_parser_function_definition): Adjust usage of
1688         unparsed_funtions_queues.
1689         (cp_parser_class_specifier): Don't mess with
1690         parser->default_arg_types.  Handle default argument processing in
1691         a separate phase from function body processing.
1692         (cp_parser_template_declaration_after_export): Adjust usage of
1693         unparsed_functions_queues.
1694         (cp_parser_late_parsing_for_member): Do not handle default
1695         arguments.
1696
1697 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
1698
1699         PR c++/9109
1700         * parser.c (cp_parser_declarator_kind): New enum.
1701         (cp_parser_declarator): Adjust.
1702         (cp_parser_direct_declarator): Adjust. Allow for either named or
1703         abstract declarator. Prefer abstract, if possible. Allow
1704         parenthesized function name.
1705         (cp_parser_condition): Adjust cp_parser_declarator call.
1706         (cp_parser_explicit_instantiation): Likewise.
1707         (cp_parser_init_declarator): Likewise.
1708         (cp_parser_type_id): Likewise.
1709         (cp_parser_function_definition): Likewise.
1710         (cp_parser_member_declaration): Likewise.
1711         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
1712         the tentative parsing.
1713         (cp_parser_exception_declaration): Likewise.
1714
1715 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
1716
1717         * parser.c (cp_parser_template_parameter): Adjust call to
1718         cp_parser_parameter_declaration.
1719         (cp_parser_parameter_declaration_list): Likewise.
1720         (cp_parser_parameter_declaration): Replace
1721         greater_than_is_operator_p with template_parm_p parameter.  Do not
1722         cache tokens for template default arguments.
1723
1724         * pt.c (retrieve_local_specialization): Use htab_find, not
1725         htab_find_with_hash.
1726         (register_local_specialization): Use htab_find_slot, not
1727         htab_find_slot_with_hash.
1728         (instantiate_decl): Pass a hash function to htab_create.
1729
1730 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1731
1732         * parser.c (cp_parser_binary_expression,
1733         cp_parser_multiplicative_expression,
1734         cp_parser_additive_expression, cp_parser_shift_expression,
1735         cp_parser_relational_expression, cp_parser_equality_expression,
1736         cp_parser_and_expression, cp_parser_exclusive_or_expression,
1737         cp_parser_inclusive_or_expression,
1738         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
1739         cp_parser_binary_expression): Const-ify.
1740
1741 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
1742
1743         * method.c (use_thunk): Disable access control while building the
1744         body of the thunk.
1745
1746 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
1747
1748         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
1749         front end.
1750
1751 2003-01-03  Matt Austern  <austern@apple.com>
1752
1753         * cp-tree.h (struct lang_type_class): add field for key method
1754         (cp_global_trees): rename dynamic_classes to keyed_classes
1755         (key_method): add definition
1756         * class.c (finish_struct_1): compute class's key method, and add
1757         the class to keyed_classes list if there is no key method.
1758         * decl.c (finish_function): add class to keyed_classes list if we
1759         see a definition of the class's key method.
1760         * pt.c (instantiate_class_template): add template specialization
1761         of a dynamic class to keyed_classes list.
1762         * decl2.c (key_method): remove
1763         (finish_file): iterate only through keyed_classes list when
1764         deciding whether to emit vtables, remove class from its list after
1765         we do the emission.
1766
1767 2003-01-02  Jason Merrill  <jason@redhat.com>
1768
1769         * call.c (build_conditional_expr): Stabilize lvalues properly.
1770         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
1771         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
1772         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
1773
1774         * call.c (convert_like_real): Call decl_constant_value for an
1775         IDENTITY_CONV even if there are no more conversions.
1776
1777         * cvt.c (build_up_reference): Don't push unnamed temps.
1778
1779         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
1780
1781         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
1782         for a backend struct.
1783
1784         * except.c (wrap_cleanups_r, build_throw): Make
1785         MUST_NOT_THROW_EXPRs void.
1786         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
1787
1788         * init.c (build_vec_delete_1): Pre-evaluate the base address.
1789
1790         * init.c (get_temp_regvar): Simplify logic.
1791
1792         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
1793         our replacement is a decl.
1794
1795         * decl.c (cp_make_fname_decl): Push the decls inside the
1796         outermost scope.
1797
1798 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
1799
1800         PR c++/45, c++/3784
1801         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
1802         the same too.
1803
1804 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
1805
1806         * parser.c (struct cp_parser): Add access_checks_lists field
1807         (cp_parser_simple_declaration): Use.
1808         (cp_parser_init_declarator): Likewise.
1809
1810 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
1811
1812         * parser.c (cp_parser_declaration): Accept the __extension__
1813         keyword before the declaration.
1814
1815         PR c++/2843
1816         * parser.c (cp_parser_parameter_declaration): Allow attributes to
1817         appear after the declarator.
1818
1819         * call.c (build_new_method_call): Fix typo in message format
1820         string.
1821
1822 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
1823
1824         * parser.c (cp_lexer_next_token_is): Declare it inline.
1825         (cp_lexer_set_source_position_from_token): Likewise.
1826         (cp_lexer_debugging_p): Likewise.
1827         (cp_parser_parsing_tentatively): Likewise.
1828         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
1829         to the cp_lexer_peek_token.
1830
1831         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
1832         expression.
1833
1834 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
1835
1836         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
1837         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
1838         cp/repo.c: Fix copyright years.
1839
1840 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
1841
1842         * lex.c: Remove superfluous include of cpplib.h.
1843         (CONSTRAINT): Define without conditions.
1844         (init_cp_pragma): Use c_register_pragma.
1845
1846 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
1847
1848         * .cvsignore: Remove.
1849
1850 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
1851
1852         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
1853           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
1854           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
1855           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
1856           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
1857           copyright header.
1858         * lex.h: parse.y is dead, so don't mention it.  Also replace the
1859           copyright header with the default GNU copyright header.
1860
1861 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
1862
1863         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
1864         (lookup_name_namespace_only): Likewise.
1865         (begin_only_namespace_names): Likewise.
1866         (end_only_namespace_names): Likewise.
1867         * decl.c (only_namespace_names): Remove.
1868         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
1869         (lookup_name_real): Do not check only_namespace_names.
1870         (lookup_name_namespace_only): Remove.
1871         (begin_only_namespace_names): Likewise.
1872         (end_only_namespace_names): Likewise.
1873         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
1874         nested-name-specifiers more gracefully.
1875         (cp_parser_class_or_namespace_name): Avoid looking up namespace
1876         names when they cannot possibly appear.
1877         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
1878         (cp_parser_elaborated_type_specifier): Likewise.
1879         (cp_parser_namespace_name): Only look for namespace names.
1880         (cp_parser_lookup_name): Add is_namespace parameter.
1881         (cp_parser_lookup_name_simple): Adjust call to
1882         cp_parser_lookup_name.
1883
1884         * parser.c (cp_parser_dependent_type_p): Fix thinko.
1885
1886 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
1887
1888         * .cvsignore: Update.
1889
1890 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
1891
1892         * class.c (modify_vtable_entry): Remove unused variable.
1893         (get_vcall_index): Always expect a non-thunk.
1894         (update_vtable_entry_for_fn): Combine covariant adjustments, when
1895         overriding a thunk. Pass get_vcall_index a non-thunk.
1896
1897         * decl2.c (finish_file): Mark undefined inlines as extern.
1898
1899 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
1900
1901         * cp-tree.def (RETURN_INIT): Remove.
1902         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
1903         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
1904         (note_level_for_for): Remove.
1905         (note_level_for_try): Likewise.
1906         (note_level_for_catch): Likewise.
1907         (finish_named_return_value): Likewise.
1908         (do_pushlevel): Change prototype.
1909         (pending_lang_change): Remove.
1910         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
1911         sk_for.
1912         (note_level_for_for): Remove.
1913         (note_level_for_try): Likewise.
1914         (note_level_for_catch): Likewise.
1915         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
1916         * parser.c (cp_parser_context_free_list): Make it "deletable".
1917         (cp_parser_template_argument): Remove misleading comment.
1918         * pt.c (tsubst_expr): Remove RETURN_INIT code.
1919         * semantics.c (genrtl_named_return_value): Remove.
1920         (do_pushlevel): Take a scope kind as an argument.
1921         (begin_if_stmt): Adjust.
1922         (begin_while_stmt): Likewise.
1923         (begin_for_stmt): Likewise.
1924         (finish_for_init_stmt): Likewise.
1925         (begin_switch_stmt): Likewise.
1926         (begin_handler): Likewise.
1927         (begin_compound_stmt): Likewise.
1928         (finish_named_return_value): Remove.
1929         (cp_expand_stmt): Remove RETURN_INIT case.
1930         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
1931
1932 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
1933
1934         PR c++/9112
1935         * parser.c (cp_parser_direct_declarator): Handle erroneous
1936         parenthesized declarators correctly.
1937
1938 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1939
1940         * cp-tree.h (pending_lang_change): Declare.
1941
1942 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
1943
1944         * parser.c (cp_parser_context_free_list): New variable.
1945         (cp_parser_context_new): Use it.
1946         (cp_parser_error): Check return code from
1947         cp_parser_simulate_error.
1948         (cp_parser_simulate_error): Return a value.
1949         (cp_parser_id_expression): Optimize common case.
1950         (cp_parser_class_name): Likewise.
1951         (cp_parser_class_specifier): Adjust call to
1952         cp_parser_late_parsing_default_args.
1953         (cp_parser_lookup_name): Optimize common case.
1954         (cp_parser_late_parsing_for_member): Adjust call to
1955         cp_parser_late_parsing_default_args.
1956         (cp_parser_late_parsing_default_args): Add scope parameter.
1957         (cp_parser_require): Avoid creating the error message unless it's
1958         needed.
1959         (cp_parser_parse_definitely): Place free'd contexts on the free
1960         list.
1961
1962         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
1963
1964 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
1965
1966         * parser.c (cp_parser_parameter_declaration_clause): Treat system
1967         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
1968
1969 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
1970
1971         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
1972         GCC, not GNU CC.
1973
1974 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
1975
1976         * parse.y: Remove.
1977         * spew.c: Likewise.
1978         * Make-lang.in (gt-cp-spew.h): Remove.
1979         * cp-tree.h (do_pending_lang_change): Remove.
1980         (do_identifier): Change prototype.
1981         (finish_id_expr): Remove.
1982         * decl.c (lookup_name_real): Remove yylex variable.
1983         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
1984         * lex.c (init_cpp_parse): Remove.
1985         (reduce_cmp): Likewise.
1986         (token_cmp): Likewise.
1987         (yychar): Likewise.
1988         (lastiddecl): Likewise.
1989         (token_count): Likewise.
1990         (reduce_count): Likewise.
1991         (yyhook): Likewise.
1992         (print_parse_statistics): Likewise.
1993         (do_pending_lang_change): Likewise.
1994         (do_identifier): Remove parsing parameter.
1995         * lex.h (lastiddecl): Remove.
1996         (looking_for_typename): Remove.
1997         (looking_for_template): Likewise.
1998         (pending_lang_change): Likewise.
1999         (yylex): Likewise.
2000         * semantics.c (finish_id_expr): Remove.
2001
2002         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
2003         thread" correctly.
2004
2005 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
2006
2007         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
2008         end, not the C front end.
2009
2010 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
2011
2012         * cp-tree.h (THUNK_TARGET): New macro.
2013         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
2014         (finish_thunk): Remove offset parms.
2015         * class.c (find_final_overrider): Look through thunks.
2016         (get_vcall_index): Use THUNK_TARGET.
2017         (update_vtable_entry_for_fn): Look through thunks. Set covariant
2018         fixed offset here. Adjust finish_thunk call.
2019         (build_vtbl_initializer): Adjust finish_thunk calls.
2020         * mangle.c (mangle_call_offset): Remove superfluous if.
2021         (mangle_thunk): Adjust.
2022         * method.c (make_thunk): Adjust.
2023         (finish_thunk): Adjust.
2024         (thunk_adjust): Remove assert.
2025         (use_thunk): Use THUNK_TARGET
2026         * dump1.c (cp_dump_tree): Adjust thunk dumping.
2027
2028         PR c++/9054
2029         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
2030         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
2031
2032 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2033
2034         Remove traditional C constructs 4/n.
2035         * decl2.c (grok_method_quals, warn_if_unknown_interface,
2036         grok_x_components, cp_build_parm_decl, build_artificial_parm,
2037         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
2038         delete_sanity, check_member_template, check_java_method,
2039         check_classfn, finish_static_data_member_decl, grokfield,
2040         grokbitfield, grokoptypename, grok_function_init,
2041         cplus_decl_attributes, constructor_name, defer_fn,
2042         build_anon_union_vars, finish_anon_union, coerce_new_type,
2043         coerce_delete_type, comdat_linkage, maybe_make_one_only,
2044         key_method, import_export_vtable, import_export_class,
2045         output_vtable_inherit, import_export_decl, import_export_tinfo,
2046         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
2047         set_guard, start_objects, finish_objects,
2048         start_static_storage_duration_function,
2049         finish_static_storage_duration_function, get_priority_info,
2050         start_static_initialization_or_destruction,
2051         finish_static_initialization_or_destruction,
2052         do_static_initialization, do_static_destruction,
2053         prune_vars_needing_no_initialization, write_out_vars,
2054         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
2055         add_using_namespace, merge_functions, ambiguous_decl,
2056         lookup_using_namespace, lookup_using_namespace,
2057         qualified_lookup_using_namespace, set_decl_namespace,
2058         decl_namespace, current_decl_namespace, push_decl_namespace,
2059         pop_decl_namespace, push_scope, pop_scope, add_function,
2060         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
2061         lookup_arg_dependent, do_namespace_alias,
2062         validate_nonmember_using_decl, do_nonmember_using_decl,
2063         do_toplevel_using_decl, do_local_using_decl,
2064         do_class_using_decl, do_using_directive, check_default_args,
2065         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
2066         * parser.c (cp_parser_class_head): Use booleanss.
2067         * decl.c (walk_globals, walk_vtables): Likewise.
2068         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
2069         walk_globals): Change return type from 'int' to 'bool'.
2070         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
2071         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
2072         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
2073         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
2074         qualifier_flags, tinfo_base_init, generic_initializer,
2075         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
2076         dfs_class_hint_unmark, class_hint_flags, class_initializer,
2077         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
2078         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
2079         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
2080         * repo.c (repo_compile_flags, repo_template_declared,
2081         repo_template_defined, repo_class_defined, repo_get_id,
2082         repo_template_used, repo_vtable_used, repo_inline_used,
2083         repo_tinfo_used, repo_template_instantiated, extract_string,
2084         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
2085         finish_repo): Likewise.
2086         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
2087         cxx_print_xnode): Likewise..
2088         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
2089         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
2090         * cxxfilt.c (demangle_it, print_demangler_list, usage,
2091         standard_symbol_characters, hp_symbol_characters, main, fatal):
2092         Likewise.
2093         (strip_underscore):  Change type from 'int' to 'bool'.
2094         (main): Use boolean constants.
2095
2096 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2097
2098         Remove traditional C constructs 3/n.
2099         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2100         build_up_reference, warn_ref_binding, convert_to_reference,
2101         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
2102         convert_to_void, convert, convert_force, build_type_conversion,
2103         build_expr_type_conversion, type_promotes_to,
2104         perform_qualification_conversions): Use C90 prototyping style.
2105         * decl2.c (grok_array_decl): Use boolean constant.
2106         (delete_sanity): Likewise.
2107         * typeck.c (build_unary_op): Likewise.
2108         * semantics.c (finish_switch_cond): Likewise.
2109         * parser.c (cp_parser_direct_new_declarator): Likewise.
2110         * init.c (build_new): Likewise.
2111
2112 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
2113
2114         * Make-lang.in (po-generated): Remove parse.c.
2115         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
2116         ($(srcdir)/cp/parse.h): Remove target.
2117         ($(srcdir)/cp/parse.c): Likewise.
2118         (gt-cp-parse.h): Likewise.
2119         (gt-cp-parser.h): New target.
2120         (c++.distclean): Do not remove parse.output.
2121         (c++.maintainer-clean): Do not remove parse.c or parse.h.
2122         (cp/spew.o): Remove target.
2123         (cp/lex.o): Adjust dependencies.
2124         (cp/pt.o): Likewise.
2125         (cp/parse.o): Likewise.
2126         (cp/TAGS): Do not mention parse.c.
2127         (cp/parser.o): New target.
2128         * NEWS: Mention the new parser.
2129         * call.c (build_scoped_method_call): Simplify.
2130         (build_method_call): Likewise.
2131         (build_new_function_call): Adjust calls to add_function_candidate
2132         and add_template_candidate.
2133         (build_new_op): Improve handling of erroroneous operands.
2134         (convert_default_arg): Remove circular argument processing.
2135         (name_as_c_string): New function.
2136         (build_new_method_call): Use it.
2137         (perform_implicit_conversion): Use error_operand_p.
2138         * class.c (finish_struct_anon): Use constructor_name_p.
2139         (check_field_decls): Likewise.
2140         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
2141         (resolve_address_of_overloaded_function): Likewise.
2142         (instantiate_type): Tweak pointer-to-member handling.
2143         (get_primary_binfo): Remove incorrect assertion.
2144         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
2145         * cp-tree.h (DEFARG_TOKENS): New macro.
2146         (default_arg): New structure.
2147         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
2148         (lang_tree_node): Add default_arg.
2149         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
2150         (type_info_ref_type): New macro.
2151         (saved_scope): Make processing_explicit_instantiation a boolean.
2152         (check_access): New field.
2153         (unparsed_text): Remove.
2154         (language_function): Remove unparsed_inlines.
2155         (error_operand_p): New macro.
2156         (lang_decl): Adjust pending_inline_info.
2157         (DEFARG_POINTER): Remove.
2158         (tag_types): Add typenames.
2159         (lookup_ualified_name): Declare.
2160         (lookup_name_real): Likewise.
2161         (shadow_tag): Adjust prototype.
2162         (get_scope_of_declarator): Declare it.
2163         (process_next_inline): Remove it.
2164         (check_for_missing_semicolon): Likewise.
2165         (maybe_get_template_decl_from_type_decl): Declare it.
2166         (finish_label_stmt): Adjust prototype.
2167         (finish_non_static_data_meber): Declare it.
2168         (finish_pseudo_destructor_call_expr): Rename to ...
2169         (finish_pseudo_destructor_expr): ... this.
2170         (finish_compound_literal): Declare it.
2171         (begin_inline_definitions): Remove it.
2172         (init_spew): Remove.
2173         (peekyylex): Likewise.
2174         (arbitrate_lookup): Likewise.
2175         (frob_opname): Likewise.
2176         (maybe_snarf_defarg): Likewise.
2177         (add_defarg_fn): Likewise.
2178         (do_pending_defargs): Likewise.
2179         (done_pending_defargs): Likewise.
2180         (unprocessed_defarg_fn): Likewise.
2181         (replace_defarg): Likewise.
2182         (end_input): Likewise.
2183         (get_overloaded_fn): Likewise.
2184         * cvt.c (convert_to_reference): Improve error handling.
2185         * decl.c (lookup_name_real): Do not declare it static.
2186         (maybe_push_to_top_level): Set check_access.
2187         (identifier_type_value): Adjust call to lookup_name_real.
2188         (lookup_qualified_name): New method.
2189         (lookup_name_real): Remove special-case parsing code.
2190         (lookup_name-nonclass): Adjust call to lookup_name_real.
2191         (lookup_name_namespace_only): Likewise.
2192         (lookup_name): Likewise.
2193         (check_tag_decl): Return the type declared.
2194         (shadow_tag): Likewise.
2195         (register_dtor_fn): Tweak check_access.
2196         (grokfndecl): Use constructor_name_p.
2197         (get_scope_of_declarator): New function.
2198         (grokdeclarator): Obscure tweaks for slightly different declarator
2199         representations.
2200         (start_method): Return error_mark_node to indicate failure.
2201         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
2202         * decl2.c (constructor_name_full): Simplify.
2203         (constructor_name): Use it.
2204         (build_expr_from_tree): Adjust for changes to do new parser.
2205         (push_scope): Improve robustness.
2206         (validate_nonmember_using_decl): Process declarations, not names.
2207         (do_class_using_decl): Likewise.
2208         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
2209         here.
2210         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
2211         * expr.c (cxx_expand_expr): Handle BASELINKs.
2212         * init.c (member_init_ok_or_else): Issue more errors.
2213         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
2214         * lex.c: Do not include parse.h.
2215         (yypring): Do not declare.
2216         (yylval): Likewise.
2217         (make_reference_declarator): Remove error-generating code.
2218         (rid_to_yy): Remove.
2219         (cxx_init): Do not call init_spew.
2220         (yypring): Remove.
2221         (check_for_missing_semicolon): Remove.
2222         * lex.h (got_scope): Remove.
2223         (got_object): Remove.
2224         * method.c (hack_identifier): Use finish_non_static_data_member.
2225         (implicitly_declare_fn): Adjust use of constructor_name.
2226         * parser.c: New file.
2227         * pt.c (parse.h): Do not include it.
2228         (maybe_get_template_decl_from_template): Do not declare it.
2229         (finish_member_template_decl): Tweak.
2230         (begin_explicit_instantiation): Adjust for
2231         processing_explicit_instantiation being boolean.
2232         (end_explicit_instantiation): Likewise.
2233         (maybe_process_partial_specialization): Tighten specialization
2234         test.
2235         (retrieve_local_specialization): Adjust ue of hash table.
2236         (eq_local_specializations): New function.
2237         (register_local_specialization): Likewise.
2238         (push_template_decl_real): Remove unnecessary test.
2239         (maybe_get_template_decl_from_type_decl): Don't make it static.
2240         (for_each_template_parm_r): Handle TYPEOF_TYPE.
2241         (tsubst_copy): Use retrieive_local_specialization to handle
2242         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
2243         Handle COMPONENT_REFs with pseudo-destructor-expressions.
2244         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
2245         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
2246         (unify): Tweak handling of CONST_DECLs.
2247         (regenerate_decl_from_template): Use push_nested_class.
2248         (template_for_substitution): New funciton.
2249         (instantiate_decl): Use it.  Register parameters as local
2250         specializations.
2251         * rtti.c (init_rtti_processing): Set type_info_ref_type.
2252         (build_typeid): Use it.
2253         (get_typeid): Likeise.
2254         * search.c (accessible_p): Use check_access, not
2255         flag_access_control.
2256         (adjust_result_of_qualified_name_lookup): Pay attention to the
2257         context_class.
2258         * semantics.c (finish_asm_stmt): Adjust error handling.
2259         (finish_label_stmt): Return the statement.
2260         (finish_non_static_data_member): New function.
2261         (finish_class_expr): Handle BASELINKs.
2262         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
2263         (finish_object_call_expr): Simplify handling during templates.
2264         (finish_pseudo_destructor_call_expr): Rename to ...
2265         (finish_pseudo_dtor_expr): ... this.
2266         (finish_compound_literal): New function.
2267         (begin_inline_definitions): Remove.
2268         (finish_sizeof): Remove special template handling.
2269         * spew.c: Do not include parse.h.
2270         * tree.c (get_overloaded_fn): Remove.
2271         * typeck.c (build_class_member_access_expr): Handle
2272         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
2273         (lookup_destructor): New function.
2274         (finish_class_member_access_expr): Use it.
2275         (convert_arguments): Simplify.
2276         (build_unary_op): Handle BASELINKs.
2277
2278 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
2279
2280         PR c++/4803
2281         * decl2.c (mark_used): Defer inline functions.
2282         (finish_file): Merge deferred_fns loops. Check all used
2283         inline functions have a definition.
2284         * method.c (make_thunk): Thunks are not inline.
2285
2286         PR c++/5116, c++/764
2287         * call.c (build_new_op): Make sure template class operands are
2288         instantiated.
2289
2290 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
2291
2292         PR C++/7964
2293         * cp-tree.h (resolve_scoped_fn_name): Prototype.
2294         * call.c (resolve_scoped_fn_name): New function. Deal with
2295         more template expansion. Broken out of ...
2296         * parse.y (parse_finish_call_expr): ... here. Call it.
2297         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
2298         resolve_scoped_fn_name and build_call_from_tree.
2299
2300         PR c++/9053
2301         * decl.c (duplicate_decls): Templates may be disambiguated by
2302         return type.
2303
2304         PR c++/8702
2305         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
2306         conversion operators on failure.
2307
2308 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2309
2310         Remove traditional C constructs 2/n.
2311         * call.c (tourney, build_field_call, equal_functions, joust,
2312         compare_ics, build_over_call, build_java_interface_fn_ref,
2313         convert_like_real, op_error, build_object_call, resolve_args,
2314         build_vfield_ref, check_dtor_name, build_scoped_method_call,
2315         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
2316         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
2317         standard_conversion, reference_related_p,
2318         reference_compatible_p, convert_class_to_reference,
2319         direct_reference_binding, reference_binding,
2320         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
2321         add_template_conv_candidate, any_viable, any_strictly_viable,
2322         build_this, splice_viable, print_z_candidates,
2323         build_user_type_conversion, build_new_function_call,
2324         conditional_conversion, build_conditional_expr, build_new_op,
2325         build_op_delete_call, enforce_access, call_builtin_trap,
2326         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
2327         convert_default_arg, type_passed_as, convert_for_arg_passing,
2328         in_charge_arg_for_name, is_properly_derived_from,
2329         maybe_handle_implicit_object, maybe_handle_ref_bind,
2330         source_type, add_warning, can_convert, can_convert_arg,
2331         perform_implicit_conversion, can_convert_arg_bad,
2332         initialize_reference, add_conv_candidate,
2333         add_template_candidate_real, add_template_candidate): Ansify.
2334
2335 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
2336
2337         PR c++/8572
2338         * cp-tree.h (grokoptypename): Add SCOPE parameter.
2339         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
2340         if in a template scope.
2341         * parse.y (unoperator): Return the scope.
2342         (operator_name): Adjust grokoptypename call.
2343
2344 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2345
2346         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
2347         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
2348         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
2349
2350 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
2351
2352         * ChangeLog: Fix a typo.
2353         * class.c: Fix comment typos.
2354         * cp-tree.h: Likewise.
2355
2356 2002-12-18  Jason Merrill  <jason@redhat.com>
2357
2358         Handle anonymous unions at the tree level.
2359         C++ ABI change: Mangle anonymous unions using the name of their
2360         first named field (by depth-first search).  Should not cause
2361         binary compatibility problems, though, as the compiler previously
2362         didn't emit anything for affected unions.
2363         * cp-tree.def (ALIAS_DECL): New tree code.
2364         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
2365         first field, not the largest.
2366         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
2367         push the decl, and write it out at namespace scope.
2368         * decl.c (lookup_name_real): See through an ALIAS_DECL.
2369         (pushdecl): Add namespace bindings for ALIAS_DECLs.
2370         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
2371         of a decl which doesn't have one.
2372         * typeck.c (build_class_member_access_expr): Don't recurse if
2373         we already have the type we want.
2374
2375 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2376
2377         PR c++/8099
2378         * friend.c (make_friend_class): Allow partial specialization
2379         when declaration is not a template friend.
2380
2381 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2382
2383         PR c++/3663
2384         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
2385         TREE_PROTECTED to created decl nodes.
2386
2387 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
2388
2389         * class.c (build_base_field): Do not set DECL_PACKED on the
2390         FIELD_DECL.
2391
2392 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2393
2394         * cp-tree.h (struct tree_srcloc): Use location_t.
2395         (SOURCE_LOCUS): New.
2396         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
2397
2398 2002-12-17  Jason Merrill  <jason@redhat.com>
2399
2400         * decl.c (finish_function): Also complain about no return in
2401         templates.
2402         * semantics.c (finish_return_stmt): Also call check_return_expr in
2403         templates.
2404         * typeck.c (check_return_expr): In a template, just remember that we
2405         saw a return.
2406
2407 2002-12-16  Jason Merrill  <jason@redhat.com>
2408
2409         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
2410         of the CALL_EXPR.
2411
2412         * semantics.c (do_pushlevel): Call pushlevel after adding the
2413         SCOPE_STMT.
2414         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
2415         * parse.y (function_body): Go back to using compstmt.
2416         * decl.c (pushdecl): Skip another level to get to the parms level.
2417
2418         * call.c (build_new_method_call): Use is_dummy_object to determine
2419         whether or not to evaluate the object parameter to a static member
2420         function.
2421
2422 2002-12-14  Jason Merrill  <jason@redhat.com>
2423
2424         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
2425         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
2426         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
2427         don't bother with an AGGR_INIT_EXPR.
2428         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
2429         just generate a new decl normally.  Take return slot parm.
2430         * cp-tree.h: Adjust prototype.
2431
2432 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2433
2434         PR C++/8031
2435         * cvt.c (convert_to_pointer_force): Don't try comparing against
2436         erronous type.
2437
2438 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
2439
2440         * cp-tree.h: Have the multiple-include guards around
2441         the entire file.
2442
2443 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
2444
2445         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
2446         for SPEW_DEBUG.
2447         (snarf_method): Same.
2448         (snarf_defarg): Same.
2449
2450 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
2451
2452         PR c++/8372
2453         * pt.c (tsubst_copy): Handle destructor names more correctly.
2454
2455 2002-12-10  Matt Austern   <austern@apple.com>
2456
2457         * cp-tree.h: get rid of needs_virtual_reinit bit.
2458
2459 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
2460
2461         * NEWS: Document removal of in-class initialization extension for
2462         static data members of non-arithmetic, non-enumeration type.
2463         * decl.c (check_static_variable_definition): Do not allow that
2464         extension.
2465         * decl2.c (grokfield): Do not call digest_init when processing
2466         templates.
2467
2468 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2469
2470         * error.c (dump_expr): Fix format specifier warning.
2471
2472 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
2473
2474         * class.c (finish_struct_1): Correct comment.
2475         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
2476
2477 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2478
2479         PR C++/8799
2480         * error.c (dump_expr): Don't ever try to dump a non-existent
2481         expression.
2482
2483 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
2484
2485         Implement covariant returns.
2486         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
2487         (struct lang_decl_flags): Add this_thunk_p flag.
2488         Rename vcall_offset to virtual_offset.
2489         (struct lang_decl): Rename delta to fixed_offset.
2490         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
2491         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
2492         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
2493         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
2494         (make_thunk): Add this_adjusting arg.
2495         (finish_thunk): Declare.
2496         (mangle_thunk): Add this_adjusting arg.
2497         * class.c (get_vcall_index): Use base function for lookup.
2498         (update_vtable_entry_for_fn): Generate covariant thunk.
2499         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
2500         (build_vtbl_initializer): Use base function for lookup.
2501         Finish covariant thunk here. Adjust thunk generation.
2502         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
2503         Adjust thunk dumping.
2504         * mangle.c (mangle_call_offset): New function.
2505         (mangle_thunk): Adjust for covariant thunks.
2506         * method.c (make_thunk): Adjust. Do not set name here.
2507         (finish_thunk): New function. Set name here.
2508         (use_thunk): Generate covariant thunks too.
2509         (thunk_adjust): New function.
2510         * search.c (covariant_return_p): Remove. Fold into ...
2511         (check_final_overrider): ... here. Simplify.
2512         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
2513
2514 2002-12-03  Jason Merrill  <jason@redhat.com>
2515
2516         PR c++/8674
2517         * call.c (build_over_call): Check specifically for TARGET_EXPR
2518         when eliding.
2519
2520         PR c++/8461, c++/8625
2521         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
2522         (cp_convert_parm_for_inlining): Remove.
2523         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
2524         Remove.
2525         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
2526         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
2527
2528         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
2529         an ambiguous conversion.
2530
2531 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
2532
2533         PR c++/8688
2534         * decl.c (reshape_init): Handle erroneous initializers.
2535
2536 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
2537
2538         PR c++/8720
2539         * spew.c (remove_last_token): Make sure that last_chunk is set
2540         correctly.
2541
2542         PR c++/8615
2543         * error.c (dump_expr): Handle character constants with
2544         TREE_OVERFLOW set.
2545
2546 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2547
2548         DR 180
2549         * decl.c (grokdeclarator): Require class-key for all friend class.
2550         Output the correct type and context in the error message.
2551
2552 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
2553
2554         PR c++/5919
2555         * pt.c (unify): Use variably_modified_type_p to test validity of
2556         template argument types.
2557
2558         PR c++/8727
2559         * cp-tree.h (lang_type_class): Add typeinfo_var.
2560         (CLASSTYPE_TYPEINFO_VAR): New macro.
2561         * rtti.c (get_tinfo_decl): Use it.
2562
2563         PR c++/8663
2564         * init.c (expand_member_init): Always get the main variant of a
2565         base class.
2566
2567 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
2568
2569         PR c++/8332
2570         PR c++/8493
2571         * decl.c (cxx_init_decl_processing): Use size_type_node, not
2572         c_size_type_node.
2573         * decl2.c (coerce_new_type): Likewise.
2574         * except.c (do_allocate_exception): Likewise.
2575
2576 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
2577
2578         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
2579         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
2580         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
2581         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
2582         typeck2.c: Include coretypes.h and tm.h.
2583         * Make-lang.in: Update dependencies.
2584
2585 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
2586
2587         PR c++/8227
2588         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
2589         (check_initializer): Validate the type of the initialized
2590         variable, even if the initializer is absent.
2591         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
2592
2593         PR c++/8214
2594         * typeck.c (convert_for_assignment): Do not use
2595         decl_constant_value on the operand.
2596
2597         PR c++/8511
2598         * pt.c (instantiate_decl): Handle template friends defined outside
2599         of the class correctly.
2600
2601 2002-11-29  Joe Buck <jbuck@synopsys.com>
2602
2603         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
2604         anonymous structs.
2605
2606 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
2607
2608         * class.c (walk_subobject_offsets): Recur on binfos as well as on
2609         types.
2610         (layout_nonempty_base_or_field): Pass it a binfo when processing a
2611         base class.
2612         (layout_empty_base): Likewise.
2613         (build_base_field): Likewise.
2614
2615 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
2616
2617         * class.c (build_base_field): Make sure we get the canonical base
2618         when descending through primary bases.
2619
2620 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
2621
2622         * decl.c (check_initializer): Don't error on initialisation of
2623         a scalar with a brace-enclosed expression.
2624
2625 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
2626
2627         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
2628         (template_parms_equal): Remove prototype.
2629         * typeck.c (buuld_indirect_ref): Reformat.
2630
2631 2002-11-25  Jason Merrill  <jason@redhat.com>
2632
2633         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
2634         and a DO_STMT.
2635
2636 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
2637
2638         * tree.c (cp_build_qualified_type_real): Correct handling of
2639         array types.
2640         * class.c (walk_subobject_offsets): Fix thinko.
2641         (build_base_field): Record offsets of empty bases in primary
2642         virtual bases.
2643         (layout_class_type): Record offsets of empty bases in fields.
2644
2645         * search.c (is_subobject_of_p_1): Fix thinko.
2646         (lookup_field_queue_p): Likewise.
2647
2648 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
2649
2650         * class.c (layout_class_type): Reuse tail padding when laying out
2651         virtual bases.
2652
2653 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
2654
2655         * rtti.c (qualifier_flags): Fix thinko.
2656
2657 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2658
2659         Remove traditional C constructs 1/n.
2660         * cp-tree.h (init_method, set_mangled_name_for_decl,
2661         build_opfncall, hack_identifier, make_thunk, use_thunk,
2662         synthesize_method, implicitly_declare_fn,
2663         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
2664         maybe_clone_body): Remove use of PARAMS.
2665
2666         * method.c (do_build_assign_ref, do_build_copy_constructor,
2667         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
2668         Likewise.
2669         (synthesize_method): Use 'bool' type and constants instead of
2670         'int'.
2671         (locate_copy): Likewise.
2672         (implicitly_declare_fn): Likewise.
2673
2674         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
2675         Remove old-style declaration.
2676         (maybe_clone_body): Use 'bool' type and constants.
2677
2678 2002-11-21  Glen Nakamura  <glen@imodulo.com>
2679
2680         PR c++/8342
2681         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
2682         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
2683         of the branches of a COND_EXPR.
2684
2685 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
2686
2687         * pt.c (for_each_template_parm): Free allocated memory.
2688         * search.c (is_subobject_of_p_1): New function.
2689         (is_subobject_of_p): Avoid walking virtual bases multiple times.
2690
2691 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
2692
2693         * g++spec.c (lang_specific_spec_functions): New.
2694
2695 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
2696
2697         * ChangeLog: Follow spelling conventions.
2698         * class.c: Likewise.
2699         * decl2.c: Likewise.
2700
2701 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
2702
2703         * search.c (dfs_push_decls): Do not try to reorder elements
2704         3..n of method_vec if method_vec has only two elements.
2705         Reverse order of two tests to avoid accessing unallocated
2706         memory.
2707
2708 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
2709
2710         * class.c (dfs_find_final_overrider): Adjust so that the most
2711         derived object is a binfo, rather than a class type.
2712         (find_final_overrider): Likewise.
2713         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
2714         (add_vcall_offset): Likewise.
2715
2716 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2717
2718         PR c++/8389
2719         * pt.c (instantiate_template): Push class scope for member
2720         functions.
2721         (get_mostly_instantiated_function_type): Likewise.  Don't call
2722         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
2723         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
2724         * mangle.c (write_encoding, write_unqualified_name): Adjust.
2725
2726 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
2727
2728         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
2729         vcall offfsets.  Split out ...
2730         (add_vcall_offset): ... new function.
2731
2732         PR c++/8338
2733         * pt.c (for_each_template_parm): Add htab parameter.
2734         (process_partial_specialization): Adjust call.
2735         (push_template_decl_real): Likewise.
2736         (pair_fn_data): Add visited.
2737         (for_each_template_parm_r): Avoid walking duplicates more than
2738         once.
2739         (uses_template_parms): Adjust call to for_each_template_parm.
2740
2741 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
2742
2743         * class.c (add_implicitly_declared_members): Put implicitly
2744         declared functions at the end of TYPE_METHODs when -fabi-version
2745         is at least 2.
2746
2747 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
2748
2749         * decl2.c (finish_file): Correct spelling.
2750
2751 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
2752
2753         * call.c (build_special_member_call): Do not try to lookup VTTs by
2754         name.
2755         * class.c (vtbl_init_data): Add generate_vcall_entries.
2756         (get_vtable_decl): Do not look up virtual tables by name.
2757         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
2758         (set_primary_base): Do not set CLASSTYPE_RTTI.
2759         (determine_primary_base): Likewise.
2760         (get_matching_virtual): Remove.
2761         (get_vcall_index): New function.
2762         (update_vtable_entry_for_fn): Do not try to use virtual thunks
2763         when they are not required.  Assign vcall indices at this point.
2764         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
2765         Do update dynamic_classes.
2766         (build_vtt): Do not add VTTs to the symbol table.
2767         (build_ctor_vtbl_group): Likewise.
2768         (build_vtbl_initializer): Simplify handling of vcall indices.
2769         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
2770         for the most derived class.
2771         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
2772         the vtable.
2773         * cp-tree.h (dynamic_classes): New macro.
2774         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
2775         (CLASSTYPE_RTTI): Remove.
2776         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
2777         (CLASSTYPE_VCALL_INDICES): New macro.
2778         (CLASSTYPE_VTABLES): Likewise.
2779         (BV_USE_VCALL_INDEX_P): Remove.
2780         (build_vtable_path): Remove.
2781         * decl2.c (finish_vtable_vardecl): Remove.
2782         (key_method): Remove #if 0'd code.
2783         (finish_vtable_vardecl): Rename to ...
2784         (maybe_emit_vtables): ... this.
2785         (finish_file): Use it.
2786         * search.c (look_for_overrides_here): Update comment.
2787
2788 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
2789
2790         PR c/7353 redux
2791         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
2792
2793 2002-10-30  Jason Merrill  <jason@redhat.com>
2794
2795         PR c++/8186
2796         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
2797         * call.c (convert_for_arg_passing): Set it.
2798         * except.c (stabilize_throw_expr): Recurse for such an arg.
2799
2800 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
2801
2802         * cp-tree.h (lang_decl_flags): Remove init_priority.
2803         (lang_decl): Add delta.
2804         (GLOBAL_INIT_PRIORITY): Remove.
2805         (THUNK_DELTA): Revise definition.
2806         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
2807         * dump.c (cp_dump_tree): Don't dump it.
2808
2809 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
2810
2811         PR c++/8160
2812         * typeck2.c (process_init_constructor): Call complete_array_type.
2813
2814         PR c++/8149
2815         * decl.c (make_typename_type): Issue errors about invalid results.
2816
2817 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2818
2819         Core issue 287, PR c++/7639
2820         * cp-tree.h (lang_type_class): Add decl_list field.
2821         (CLASSTYPE_DECL_LIST): New macro.
2822         (maybe_add_class_template_decl_list): Add declaration.
2823         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
2824         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
2825         (maybe_add_class_template_decl_list): New function.
2826         (add_implicitly_declared_members): Use it.
2827         * decl.c (maybe_process_template_type_declaration): Likewise.
2828         (pushtag): Likewise.
2829         * friend.c (add_friend): Likewise.
2830         (make_friend_class): Likewise.
2831         * semantics.c (finish_member_declaration): Likewise.
2832         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
2833         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
2834         to process members and friends in the order of declaration.
2835
2836 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
2837
2838         PR c++/8287
2839         * decl.c (finish_destructor_body): Create the label to jump to
2840         when returning from a destructor here.
2841         (finish_function_body): Rather than here.
2842
2843 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
2844
2845         PR c++/7266
2846         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
2847         SCOPE_REF is not null before dereferencing it.
2848
2849 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
2850
2851         * call.c (build_over_call): Use DECL_CONTEXT, not
2852         DECL_VIRTUAL_CONTEXT.
2853         * class.c (modify_vtable_entry): Don't mess with
2854         DECL_VIRTUAL_CONTEXT.
2855         (set_vindex): Remove.
2856         (set_primary_base): Remove vfuns_p parameter.
2857         (determine_primary_base): Likewise.
2858         (modify_all_vtables): Likewise.
2859         (layout_class_type): Likewise.  Adjust calls to other functions
2860         accordingly.
2861         (finish_struct_1): Adjust calls to modified functions.  Set
2862         DECL_VINDEX here.
2863         * cp-tree.h (lang_type_class): Remove vsize.
2864         (CLASSTYPE_VSIZE): Remove.
2865         (lang_decl): Remove thunks.
2866         (DECL_THUNKS): Adjust.
2867         (DECL_VIRTUAL_CONTEXT): Remove.
2868         (duplicate_decls): Don't copy it.
2869         * pt.c (build_template_decl): Don't set it.
2870         (tsubst_decl): Likewise.
2871         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
2872
2873         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
2874         (build_vtable_entry): Remove.
2875         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
2876         (lang_decl): Add thunks.
2877         (DECL_THUNKS): New macro.
2878         * decl.c (duplicate_decls): Copy it.
2879         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
2880         * semantics.c (emit_associated_thunks): Simplify.
2881
2882 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
2883
2884         PR c++/7228
2885         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
2886         lang_type structure exists before accessing field.
2887         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
2888         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
2889         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
2890         * class.c (check_field_decls): Use new macros.
2891         * typeck2.c (process_init_constructor): Remove redundant check for
2892         existence of lang_type structure.
2893
2894 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
2895
2896         * class.c (end_of_base): New method.
2897         (end_of_class): Use it.  Check indirect virtual bases.
2898
2899         * class.c (check_field_decls): Fix typo.
2900
2901 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
2902
2903         PR c++/8067
2904         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
2905         related variables.
2906
2907         PR c++/7679
2908         * spew.c (next_token): Do not return an endless stream of
2909         END_OF_SAVED_INPUT tokens.
2910         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
2911         the cached token stream.
2912         (snarf_defarg): Likewise.
2913
2914 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
2915
2916         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
2917         variably_modified_type_p.
2918         * cp-tree.h: Remove prototype of variably_modified_type_p.
2919         * tree.c (variably_modified_type_p): Remove; now implemented
2920         in language-independent code.
2921
2922 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
2923
2924         PR c++/6579
2925         * spew.c (snarf_parenthesized_expression): New function.
2926         (snarf_block): Use it.
2927
2928 2002-10-22  Richard Henderson  <rth@redhat.com>
2929
2930         * method.c (use_thunk): Always compute vcall_value; assert that
2931         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
2932         for vcall thunks as well.
2933
2934 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
2935
2936         * class.c (empty_base_at_nonzero_offset_p): New function.
2937         (layout_nonempty_base_or_field): Do not check for conflicts when
2938         laying out a virtual base using the GCC 3.2 ABI.
2939         (build_base_field): Correct checking for presence of empty classes
2940         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
2941
2942         * class.c (include_empty_classes): Use normalize_rli.
2943         (layout_class_type): Likewise.
2944
2945         * decl.c (reshape_init): Tweak handling of character arrays.
2946
2947         PR c++/8218
2948         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
2949         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
2950         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
2951         (check_field_decls): Likewise.
2952         (layout_class_type): Likewise.
2953         (finish_struct_1): Initialize it.
2954         (walk_subobject_offsets): Use it to prune searches.
2955
2956 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
2957
2958         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
2959         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
2960         TARGET_ASM_OUTPUT_MI_THUNK in comments.
2961
2962 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
2963
2964         * decl.c (start_decl): Point users of the old initialized-
2965         typedef extension at __typeof__.
2966
2967 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
2968
2969         * Make-lang.in (method.o): Depend on TARGET_H.
2970         * method.c (target.h): Include it.
2971         (use_thunk): Use target hooks.  Use vcall thunks, if available.
2972
2973 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
2974
2975         * class.c (base_derived_from): Make sure return value is a bool.
2976
2977 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
2978
2979         * class.c (find_final_overrider_data_s): Remove overriding_fn and
2980         overriding_base.
2981         (dfs_base_derived_from): New function.
2982         (base_derived_from): Likewise.
2983         (dfs_find_final_overrider): Use base_derived_from.
2984         (find_final_overrider): Adjust.
2985
2986 2002-10-18  Jason Merrill  <jason@redhat.com>
2987
2988         PR c++/8080
2989         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
2990         with condition decls in a template.
2991
2992 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
2993
2994         * class.c (add_method): Compare template parms too.
2995
2996 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
2997
2998         PR c++/7584
2999         * class.c (handle_using_decl): Allow the declaration used to be
3000         from an ambiguous base.
3001
3002         * pt.c (convert_template_argument): Revert this change:
3003                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3004                 * pt.c (convert_template_argument): Do not fold non-type
3005                 template rguments when inside a template.
3006
3007         * init.c (expand_default_init): Handle brace-enclosed initializers
3008         correctly.
3009
3010 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3011
3012         * mangle.c (write_expression): Correct handling of enumeration
3013         constants.
3014         (write_template_arg): Likewise.
3015         * pt.c (convert_template_argument): Do not fold non-type template
3016         arguments when inside a template.
3017
3018         PR c++/7478
3019         * cvt.c (convert_to_reference): Allow references as the incoming
3020         type.
3021
3022 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3023
3024         PR c++/7524
3025         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
3026         build_qualified_type.
3027
3028 2002-10-15  Richard Henderson  <rth@redhat.com>
3029
3030         * error.c (dump_expr): Use real_to_decimal directly, and with
3031         the new arguments.
3032
3033 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
3034
3035         * decl.c (reshape_init): Fix typo.
3036
3037         * cp-tree.h (operator_name_info_t): Add arity.
3038         * lex.c (init_operators): Initialize it.
3039         * mangle.c (write_conversion_operator_name): New function.
3040         (write_unqualified_name): Use it.
3041         (write_template_args): Accept template arguments as a TREE_LIST.
3042         (write_expression): Adjust handling of qualified names to match
3043         specification.
3044
3045 2002-10-15  Jason Merrill  <jason@redhat.com>
3046
3047         * call.c (call_builtin_trap): New fn.
3048         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
3049         (build_call): Don't set current_function_returns_abnormally outside
3050         a function.
3051
3052 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
3053
3054         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
3055         clear CLASSTYPE_EMPTY_P.
3056         (build_base_field): Likewise.
3057         (build_base_fields): Likewise.
3058         (check_bases_and_members): Likewise.
3059         (create_vtbl_ptr): Likewise.
3060         (layout_class_type): Likewise.  Ensure that empty classes have
3061         size zero when used as base classes in the 3.2 ABI.
3062         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
3063         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
3064         parameter.
3065         (is_empty_class): Correct definition when using post-3.2 ABI.
3066         * cp-tree.h (lang_type_class): Add empty_p.
3067         (CLASSTYPE_EMPTY_P): New macro.
3068
3069 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
3070
3071         * init.c (build_delete): Do not apply save_expr for arrays.
3072         (build_vec_delete): Likewise.
3073
3074 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
3075
3076         * decl.c (layout_var_decl): Call layout_decl even for variables
3077         whose type is an array with unspecified bounds.
3078
3079         PR c++/7176
3080         * lex.c (do_identifier): Add another option for the parsing
3081         parameter.
3082         * parse.y (do_id): Use it.
3083
3084 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3085
3086         PRs C++/6803, C++/7721 and C++/7803
3087         * decl.c (grokdeclarator): Gracefully handle template-name as
3088         decl-specifier.
3089
3090 2002-10-11  Jason Molenda  <jmolenda@apple.com>
3091
3092         * init.c (build_field_list): Provide uses_unions_p with a default
3093         value.
3094
3095 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
3096
3097         PR c++/5661
3098         * cp-tree.h (variably_modified_type_p): New function.
3099         (grokdeclarator) Tighten check for variably modified types as
3100         fields.
3101         * pt.c (convert_template_argument): Do not allow variably modified
3102         types as template arguments.
3103         * tree.c (variably_modified_type_p): New function.
3104
3105         * NEWS: Document removal of "new X = ..." extension.
3106         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
3107         brace-enclosed initializers.
3108         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
3109         (initialize_local_var): Remove declaration.
3110         (expand_static_init): Likewise.
3111         * decl.c (next_initializable_field): New function.
3112         (reshape_init): Likewise.
3113         (check_initializer): Use them.  Build dynamic initializer for
3114         aggregates here too.
3115         (initialize_local_var): Simplify, and incorporate cleanup
3116         insertion code as well.
3117         (destroy_local_var): Remove.
3118         (cp_finish_decl): Tidy.
3119         (expand_static_init): Fold checks for whether or not a variable
3120         needs initialization into this function.  Simplify.
3121         * decl2.c (do_static_initialization): Simplify.
3122         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
3123         be done for us automatically.
3124         (expand_default_init): Handle brace-enclosed initializers
3125         correctly.
3126         (expand_aggr_init_1): Remove RTL-generation code.
3127         (build_vec_init): Remove "new X = ..." support.
3128         * parse.y (new_initializer): Likewise.
3129         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
3130         brace-enclosed initializer.
3131         (create_pseudo_type_info): Likewise.
3132         * typeck2.c (store_init_value): Don't try to handle digest_init
3133         being called more than once.
3134         (digest_init): Tidy handling of brace-enclosed initializers.
3135
3136 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3137
3138         * decl.c (typename_hash): Use htab_hash_pointer.
3139
3140 2002-10-10  Jim Wilson  <wilson@redhat.com>
3141
3142         * decl.c (duplicate_decls): Don't call decl_attributes.
3143
3144 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
3145
3146         PR c/7353
3147         * decl.c (start_decl): Unconditionally issue error for
3148         'typedef foo = bar'.
3149         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
3150         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
3151
3152 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3153
3154         * decl2.c (prune_vtable_vardecl): Delete unused function.
3155
3156 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3157
3158         PR c++/7754
3159         * decl2.c (finish_anon_union): Do not expand anonymous unions when
3160         procesing template functions.
3161         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
3162         type. Call layout_decl.
3163         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
3164
3165 2002-10-07  Richard Henderson  <rth@redhat.com>
3166
3167         * decl2.c, pt.c: Revert c++/7754 fix.
3168
3169 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3170
3171         PR c++/7804
3172         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
3173
3174 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3175
3176         PR c++/7931
3177         * pt.c (for_each_template_parm_r): Handle BASELINKs.
3178
3179         PR c++/7754
3180         * decl2.c (finish_anon_union): Do not expand anonymous unions when
3181         procesing template functions.
3182         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
3183         type. Call layout_decl.
3184         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
3185
3186 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3187
3188         PR c++/8006
3189         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
3190         template parameters.
3191         (globals): Add entity and need_abi_warning.
3192         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
3193         CLASSTYPE_TEMPLATE_INFO.
3194         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
3195         TYPE_TI_TEMPLATE.
3196         (write_prefix): Handle typename types correctly.
3197         (write_template_prefix): Handle template template parameters
3198         correctly.
3199         (start_mangling): Add entity parameter.
3200         (finish_mangling): Warn about names whose mangling will change.
3201         (mangle_decl_string): Adjust.
3202         (mangle_type_string): Likewise.
3203         (mangle_special_for_type): Likewise.
3204         (mangle_ctor_vtbl_for_type): Likewise.
3205         (mangle_thunk): Likewise.
3206         (mangle_guard_variable): Likewise.
3207         (mangle_ref_init_variable): Likewise.
3208
3209 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
3210
3211         PR c++/7188.
3212         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
3213         * cp-tree.h (emit_base_init): Rename to ....
3214         (emit_mem_initializers): ... this.
3215         (expand_member_init): Change prototype.
3216         * init.c (perform_member_init): Compute explicit, rather than
3217         requiring it as a parameter.
3218         (sort_member_init): Rename to ...
3219         (sort_mem_initializers): ... this.  Process bases and data members
3220         together.
3221         (sort_base_init): Remove.
3222         (emit_base_init): Rename to ...
3223         (emit_mem_initializers): ... this.
3224         (expand_aggr_vbase_init_1): Remove.
3225         (construct_virtual_bases): Rename to ...
3226         (construct_virtual_base): ... this.
3227         (expand_member_init): Rework handling of base initializers.
3228         * method.c (do_build_copy_constructor): Use
3229         finish_mem_initializers.
3230         * parse.y (member_init): Adjust calls to expand_member_init.
3231         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
3232         (tsubst_initializer_list): Use expand_member_init.
3233         * semantics.c (finish_mem_intiailizers): Simplify.
3234
3235 2002-10-02  Matt Austern  <austern@apple.com>
3236         * decl.c (walk_vtables_r): Fixed typo that caused result to
3237         never get a nonzero value.
3238
3239 2002-10-02  Roger Sayle  <roger@eyesopen.com>
3240
3241         PR optimization/6627
3242         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
3243         from here, and move it to tree.h.
3244         * decl.c (cxx_init_decl_processing): If storing the vbit
3245         in function pointers, ensure that force_align_functions_log
3246         is atleast one.
3247
3248 2002-10-02  Matt Austern  <austern@apple.com>
3249
3250         * class.c (check_field_decls): Changed warning about const member
3251         variables so that it doesn't get issued for a class aggregate.
3252
3253 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
3254
3255         * decl.c (cp_finish_decl): Make sure array types are laid out,
3256         even if the array bounds are unknown.
3257
3258 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
3259
3260         * class.c (build_vtbl_initializer): Change build_c_cast
3261         to build1.
3262
3263 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
3264
3265         * decl.c (cp_finish_decl): Make sure array types are laid out,
3266         even if the array bounds are unknown.
3267
3268         * decl.c (cp_finish_decl): Correct check for dynamic
3269         initialization of thread-local storage.
3270
3271 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
3272
3273         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
3274         overloaded.
3275
3276 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
3277
3278         * class.c (build_vtbl_initializer): Add cast.
3279         (add_vcall_offset_vtbl_entries_1):
3280         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
3281
3282 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
3283
3284         * class.c (walk_subobject_offsets): Correct the calculation of
3285         offsets for virtual bases.  Correct the counting of array
3286         elements.
3287         (layout_nonempty_base_or_field): Simplify.  Correct the
3288         calculation of offsets to be propagated through the binfo
3289         hierarchy.
3290         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
3291         Add the FIELD_DECL to TYPE_FIELDS.
3292         (build_base_fields): Adjust accordingly.
3293         (layout_virtual_bases): Use build_base_field.
3294         (end_of_class): Return a tree, not an integer.
3295         (warn_about_ambiguous_direct_bases): Rename to ...
3296         (warn_about_ambiguous_bases): ... this.
3297         (include_empty_classes): New function.
3298         (layout_class_type): Create an alternative version of the type to
3299         be used when as a base class type.  Do not call
3300         finish_record_layout until we are done laying out the class.
3301         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
3302         as_base.
3303         (CLASSTYPE_SIZE): Reimplement.
3304         (CLASSTYPE_SIZE_UNIT): Likewise.
3305         (CLASSTYPE_ALIGN): Likweise.
3306         (CLASSTYPE_USER_ALIGN): Likewise.
3307         (CLASSTYPE_AS_BASE): New macro.
3308         (DECL_INITIALIZED_P): Likewise.
3309         (extract_init): Remove prototype.
3310         (build_forced_zero_init): Rename to ...
3311         (build_zero_init): ... this.
3312         (force_store_init_value): Remove.
3313         * decl.c (obscure_complex_init): Remove.
3314         (duplicate_decls): Copy DECL_INITIALIZED_P.
3315         (check_initializer): Do not leave junk in DECL_INITIAL.
3316         (cp_finish_decl): Handle zero-initialization of entities with
3317         static storage duration.
3318         * expr.c (extract_init): Remove.
3319         * init.c (build_forced_zero_init): Remove.
3320         (build_zero_init): New function.
3321         (build_default_init): Use it.
3322         (build_field_list): Skip FIELD_DECLs for base subobjects.
3323         (push_base_cleanups): Likewise.
3324         * method.c (do_build_assign_ref): Likewise.
3325         (synthesize_exception_spec): Likewise.
3326         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
3327         (regenerate_decl_from_template): To not set DECL_INITIAL for a
3328         static data member whose initialization took place in its class.
3329         (instantiate_decl): Do not pass an initializer to cp_finish_decl
3330         in that situation.
3331         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
3332         (dfs_unuse_fields): Likewise.
3333         * tree.c (pod_type_p): Handle error_mark_node.
3334         (zero_init_p): Likewise.
3335         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
3336         subobjects.
3337         * typeck2.c (store_init_value): Remove #if 0'd code.
3338         (force_store_init_value): Remove.
3339         (process_init_constructor): Use build_zero_init.
3340
3341 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
3342
3343         PR c++/7788
3344         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
3345
3346 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
3347
3348         * cp-tree.h: Fix comment typos.
3349         * decl.c: Likewise.
3350         * pt.c: Likewise.
3351
3352 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
3353
3354         * cp/class.c (contains_empty_class_p): New method.
3355         (walk_subobject_offsets): Correct computation of field offset.
3356         (layout_empty_base): Correct placement of emtpy base classes.
3357         (layout_class_type): Warn about ABI changes.
3358
3359 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
3360
3361         * cp/class.c (layout_virtual_bases): Do not round the size of the
3362         type to a multiple of the alignment before laying out virtual bases.
3363         (layout_class_type): Correct handling of bit-fields that are wider
3364         than their type inside unions.  Round the size of the type to a
3365         even number of bytes when computing the size without virtual
3366         bases.
3367         * cp/cp-tree.h (abi_version_at_least): New macro.
3368
3369 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
3370
3371         * ChangeLog: Follow spelling conventions.
3372         * ChangeLog.2: Likewise.
3373         * call.c: Likewise.
3374         * class.c: Likewise.
3375         * cp-tree.h: Likewise.
3376         * cvt.c: Likewise.
3377         * decl.c: Likewise.
3378         * decl2.c: Likewise.
3379         * except.c: Likewise.
3380         * friend.c: Likewise.
3381         * g++spec.c: Likewise.
3382         * init.c: Likewise.
3383         * lex.c: Likewise.
3384         * mangle.c: Likewise.
3385         * method.c: Likewise.
3386         * operators.def: Likewise.
3387         * optimize.c: Likewise.
3388         * pt.c: Likewise.
3389         * rtti.c: Likewise.
3390         * search.c: Likewise.
3391         * semantics.c: Likewise.
3392         * spew.c: Likewise.
3393         * tree.c: Likewise.
3394         * typeck.c: Likewise.
3395
3396 2002-09-18  Devang Patel  <dpatel@apple.com>
3397
3398         * cp/cp-tree.h: New prototype for walk_vtabls().
3399         * cp/decl.c (walk_vtables_r): New function.
3400         (struct cp_binding_level): Add new members, namespaces,
3401         names_size and vtables.
3402         (add_decl_to_level): Add decl in namespaces or vtables
3403         chain, if conditions match.
3404         (walk_vtables): New function.
3405         (walk_namespaces_r): Travers separate namespace chain
3406         for namespace decls.
3407         (wrapup_globals_for_namespace): Use names_size instead
3408         of list_length().
3409         * cp/decl2.c (finish_file): Use walk_vtables() instead of
3410         walk_globals() to walk vtable decls.
3411
3412 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
3413
3414         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
3415         ICE with invalid pointers & references.
3416
3417 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
3418
3419         * Make-lang.in: Remove all references to the demangler.
3420         * cxxfilt.c: Moved to binutils.
3421
3422 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3423
3424         PR c++/7718
3425         * pt.c (tsubst_decl): Remove assert.
3426
3427         Remove DR 295 implementation.
3428         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
3429         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
3430         about ignoring volatile qualifiers.
3431
3432         * search.c (lookup_member): Correct documentation.
3433
3434 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
3435
3436         * cp-tree.h (union lang_tree_node): Add chain_next option.
3437
3438 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3439
3440         * parse.y (parse_finish_call_expr): Check lookup_member result.
3441
3442         PR c++/7015
3443         * semantic.c (finish_asm_stmt): Fix operand/output_operands
3444         thinko.
3445         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
3446
3447 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
3448
3449         PR c++/7919
3450         * call.c (build_over_call): Convert this pointer for fns found by
3451         using decls.
3452
3453 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
3454
3455         * ChangeLog: Follow spelling conventions.
3456         * ChangeLog.1: Likewise.
3457
3458 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
3459
3460         PR c++/7768
3461         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
3462
3463 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
3464
3465         * error.c: Fix comment formatting.
3466         * except.c: Likewise.
3467         * expr.c: Likewise.
3468         * friend.c: Likewise.
3469         * g++spec.c: Likewise.
3470         * init.c: Likewise.
3471         * lex.c: Likewise.
3472         * mangle.c: Likewise.
3473         * method.c: Likewise.
3474         * optimize.c: Likewise.
3475         * pt.c: Likewise.
3476         * rtti.c: Likewise.
3477         * search.c: Likewise.
3478         * semantics.c: Likewise.
3479         * spew.c: Likewise.
3480         * tree.c: Likewise.
3481         * typeck.c: Likewise.
3482         * typeck2.c: Likewise.
3483
3484 2002-09-13  Matt Austern  <austern@apple.com>
3485
3486         PR C++/7828
3487         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
3488         * cp/call.c: Change call-by-const-reference mechanism to use
3489         non_cast_lvalue_p when deciding whether the create a temporary.
3490         We need a temporary when passing, e.g. (long) x by const ref.
3491
3492 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
3493
3494         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
3495
3496 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
3497
3498         * decl.c: Fix comment formatting.
3499         * decl2.c: Likewise.
3500
3501 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
3502
3503         * call.c: Fix comment formatting.
3504         * class.c: Likewise.
3505         * cp-lang.c: Likewise.
3506         * cp-tree.h: Likewise.
3507         * cvt.c: Likewise.
3508
3509 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
3510
3511         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
3512         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
3513         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
3514         minor adjustments (use version_string, eliminate yet another
3515         duplicate of xmalloc)
3516
3517 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3518
3519         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
3520
3521 2002-09-05  Jason Merrill  <jason@redhat.com>
3522
3523         * typeck2.c (add_exception_specifier): Only pedwarn for an
3524         incomplete type.
3525         (require_complete_eh_spec_types): New fn.
3526         (cxx_incomplete_type_diagnostic): Also support pedwarning.
3527         * typeck.c (complete_type_or_diagnostic): Likewise.
3528         * call.c (build_call): Call require_complete_eh_spec_types.
3529         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
3530         on an incomplete type.
3531
3532 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
3533
3534         * decl.c (start_cleanup_fn): Clear interface_only before
3535         start_function, restore it afterwards.
3536
3537 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
3538
3539         * cp-tree.h (finish_builtin_type): Remove.
3540         * decl2.c (finish_builtin_type): Move to common code.
3541         * decl.c (build_ptrmemfunc_type): Adjust.
3542         * rtti.c (create_pseudo_type_info): Adjust.
3543         (create_tinfo_types): Adjust.
3544
3545 2002-08-31  Jason Merrill  <jason@redhat.com>
3546
3547         * cp-lang.c (cp_expr_size): Allow initialization from a
3548         CONSTRUCTOR.
3549
3550 2002-08-30  Richard Henderson  <rth@redhat.com>
3551
3552         PR opt/7515
3553         * tree.c: Include target.h.
3554         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
3555         don't bind locally.
3556         * Makefile.in (tree.o): Update.
3557
3558 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
3559
3560         * class.c (layout_virtual_bases): Warn about bugs in G++ that
3561         result in incorrect object layouts.
3562         (layout_class_type): Likewise.
3563
3564 2002-08-24  Matt Austern  <austern@apple.com>
3565
3566         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
3567         are allowable.
3568         (real_lvalue_p): Update caller.
3569         (lvalue_p): Ditto.
3570         (non_cast_lvalue_or_else): New.
3571         * tree.h: Declare it.
3572         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
3573
3574 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
3575
3576         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
3577         and COND_EXPR specially; fix error message output.
3578
3579 2002-08-22  Jason Merrill  <jason@redhat.com>
3580
3581         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
3582         * semantics.c (nullify_returns_r): Likewise.
3583
3584 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3585
3586         Fix PR/7621
3587         * typeck.c (finish_class_member_access_expr): Diagnose cases where
3588         name lookup finds nothing.
3589
3590 2002-08-15  Jason Merrill  <jason@redhat.com>
3591
3592         * semantics.c (finish_then_clause): Remove redundant assignment.
3593         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
3594         extra binding level outside the if/switch statement.
3595         (finish_while_cond, finish_for_cond): Rewrite complex condition
3596         into the loop body.
3597
3598 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
3599
3600         * parse.y (sizeof, alignof, typeof): New non-terminals to
3601         increment skip_evaluation.  Replace terminals with them and
3602         decrement skip_evaluation at the end of rules using them.
3603         * decl2.c (mark_used): Don't assemble_external if
3604         skipping evaluation.
3605
3606 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
3607
3608         Fix PR/7504
3609         * parse.y (parse_finish_call_expr): Handle incomplete
3610         type used to name a scope.
3611
3612 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
3613
3614         PR c++/7598
3615         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
3616         regression caused by my 2002-08-08 patch.
3617
3618 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
3619
3620         * decl.c (pushdecl_class_level): Honor requests to bind names to
3621         OVERLOADs.
3622
3623 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3624
3625         * decl2.c (build_call_from_tree): Fix uninitialized variable.
3626         * parse.y (parse_finish_call_expr): Likewise.
3627         * repo.c (old_args, old_dir, old_main): Const-ify.
3628
3629 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
3630
3631         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
3632         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
3633         * optimize.c (maybe_clone_body): Likewise.
3634         * pt.c (tsubst_enum): Likewise.
3635         (lookup_template_class): Likewise.
3636         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
3637
3638 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
3639
3640         * lang-specs.h: Remove -ansi.
3641
3642 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
3643
3644         * tree.c (maybe_dummy_object): Replace // with /* */
3645
3646 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
3647
3648         * call.c (standard_conversion): Use build_ptrmem_type.
3649         * cp-tree.h (build_ptrmem_type): New function.
3650         (adjust_result_of_qualified_name_lookup): Likewise.
3651         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
3652         static data members.
3653         (build_ptrmem_type): New function.
3654         (grokdeclarator): Do not use build_offset_type when encountering a
3655         qualified name.
3656         * parse.y (parse_finish_call_expr): Use
3657         adjust_result_of_qualified_name_lookup.
3658         * search.c (adjust_result_of_qualified_name_lookup): New function.
3659         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
3660         accessing OFFSET_TYPEs directly.
3661
3662 2002-08-08  Mike Stump  <mrs@apple.com>
3663
3664         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
3665         (type_decays_to): Likewise.
3666         * class.c (find_final_overrider): Likewise.
3667         (maybe_note_name_used_in_class): Likewise.
3668         * decl.c (current_tmpl_spec_kind): Likewise.
3669         (add_binding): Likewise.
3670         (push_class_binding): Likewise.
3671         (duplicate_decls): Likewise.
3672         (layout_var_decl): Likewise.
3673         (grokfndecl): Likewise.
3674         (grokdeclarator): Likewise.
3675         (check_default_argument): Likewise.
3676         * decl2.c (handle_class_head): Likewise.
3677         * error.c (dump_template_decl): Likewise.
3678         * init.c (build_offset_ref): Likewise.
3679         * pt.c (check_specialization_scope): Likewise.
3680         (determine_specialization): Likewise.
3681         (check_explicit_specialization): Likewise.
3682         (maybe_check_template_type): Likewise.
3683         (process_partial_specialization): Likewise.
3684         (check_default_tmpl_args): Likewise.
3685         (push_template_decl_real): Likewise.
3686         (convert_template_argument): Likewise.
3687         (try_class_unification): Likewise.
3688         (get_bindings_real): Likewise.
3689         (do_decl_instantiation): Likewise.
3690         * semantics.c (begin_function_definition): Likewise.
3691         (finish_member_declaration): Likewise.
3692         (check_multiple_declarators): Likewise.
3693         * typeck.c (comp_array_types): Likewise.
3694         (comptypes): Likewise.
3695         (expr_sizeof): Likewise.
3696         (build_binary_op): Likewise.
3697         (dubious_conversion_warnings): Likewise.
3698         (check_return_expr): Likewise.
3699
3700 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
3701
3702         * typeck.c (build_class_member_access_expr): Do not return
3703         error_mark_node when no error has occurred.
3704
3705 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3706
3707         * typeck.c (build_component_addr): Remove.
3708         (build_unary_op): Just check it's not a bitfield, and then build
3709         an ADDR_EXPR.
3710
3711 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3712
3713         * class.c (convert_to_base): Correct check for error_mark_node.
3714         (create_vtable_ptr): Remove unused VFUNS_P parm.
3715
3716 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3717
3718         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
3719
3720 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
3721
3722         Rework build_component_ref.
3723         * call.c (build_vfield_ref): Do not go through build_component_ref.
3724         (build_field_call): Use build_class_member_access_expr.
3725         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
3726         (build_object_call): Likewise.
3727         * class.c (convert_to_base): New function.
3728         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
3729         (instantiate_type): Handle BASELINKs.
3730         * cp-tree.def (BASELINK): New tree code.
3731         * cp-tree.h (BASELINK_P): Reimplement.
3732         (SET_BASELINK_P): Remove.
3733         (BASELINK_BINFO): Reimplement.
3734         (BASELINK_FUNCTIONS): Likewise.
3735         (BASELINK_ACCESS_BINFO): Likewise.
3736         (BASELINK_OPTYPE): Likewise.
3737         (convert_to_base): New function.
3738         (name_p): Likewise.
3739         (build_object_ref): Remove.
3740         (build_component_ref_1): Likewise.
3741         (build_component_ref): Likewise.
3742         (build_x_component_ref): Likewise.
3743         (build_class_member_access_expr): New function.
3744         (finish_class_member_access_expr): Likewise.
3745         (build_ptrmemfunc_access_expr): Likewise.
3746         * decl.c (grokdeclarator): Handle BASELINKs.
3747         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
3748         finish_class_member_access_expr.
3749         (arg_assoc): Handle BASELINKs.
3750         (do_class_using_decl): Likewise.
3751         * error.c (dump_decl): Likewise.
3752         (dump_expr): Use build_ptrmemfunc_access_expr.
3753         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
3754         destructors.
3755         (build_throw): Use BASELINK_FUNCTIONS.
3756         * init.c (perform_member_init): Use
3757         build_class_member_access_expr.
3758         (build_offset_ref): Handle BASELINKs.  Use
3759         build_class_member_access_expr.
3760         * method.c (hack_identifier): Likewise.
3761         * parse.y (do_id): Use BASELINK, not TREE_LIST.
3762         (primary): Remove uses of build_object_ref.
3763         * pt.c (lookup_template_function): Handle BASELINKs.
3764         (resolve_overloaded_unification): Likewise.
3765         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
3766         (lookup_field): Use BASELINK, not TREE_LIST.
3767         (lookup_fnfiels): Likewise.
3768         (setup_class_bindings): Likewise.
3769         * semantics.c (finish_object_call_expr): Do not use
3770         build_method_call when we already know what function is being
3771         called.
3772         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
3773         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
3774         TREE_CHAIN.
3775         (name_p): New function.
3776         * typeck.c (build_object_ref): Remove.
3777         (build_component_ref_1): Likewise.
3778         (build_x_component_ref): Likewise.
3779         (build_class_member_access_expr): New function.
3780         (finish_class_member_access_expr): Likewise.
3781         (build_ptrmemfunc_access_expr): Likewise.
3782         (get_member_function_from_ptrfunc): Use
3783         build_ptrmemfunc_access_expr.
3784         (build_binary_op): Likewise.
3785         (build_unary_op): Likewise.
3786         (build_ptrmemfunc): Likewise.
3787         (pfn_from_ptrmemfunc): Likewise.
3788         * typeck2.c (build_m_component_ref): Adjust comment.
3789
3790 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
3791
3792         * Make-lang.in (CXX_C_OBJS): Update.
3793         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
3794         * cp-tree.h (cxx_decode_option): Remove.
3795         * decl2.c (compare_options, lang_f_options, unsupported_options,
3796         cxx_decode_option): Remove.
3797
3798 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
3799
3800         * typeck.c (build_x_unary_op): Handle pointer-to-member.
3801
3802 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
3803
3804         * class.c: Don't include obstack.h.
3805         (popclass):
3806         * decl2.c: Delete bogus comment.
3807         * error.c: Don't include obstack.h.
3808         * except.c: Likewise.
3809         (dump_type): Correct comment.
3810         * method.c: Don't include obstack.h.
3811         * tree.c: Likewise.
3812
3813 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
3814
3815         Fix PR/2213
3816         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
3817         expressions to pointer-to-data-member of pointer-to-member-functions.
3818
3819 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
3820
3821         * cvt.c (ocp_convert): Delete obsolete code.
3822         * parse.y (permanent_obstack): Delete declaration.
3823         * pt.c (permanent_obstack): Delete declaration.
3824         * repo.c (permanent_obstack): Delete declaration.
3825         (open_repo_file): Use xmalloc instead of permanent_obstack.
3826         (init_repo): Use xstrdup instead of permanent_obstack.
3827
3828 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
3829
3830         * cp-tree.h (VF_DERIVED_VALUE): Remove.
3831         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
3832
3833 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
3834
3835         PR 7470.
3836         C++ ABI change - vfunc ordering.
3837         * class.c (add_virtual_function): Remove.
3838         (dfs_modify_all_vtables): Take list of all declared
3839         virtuals. Assign all that are not in primary base.
3840         (check_for_override): Adjust comments.
3841         (create_vtable_ptr): Take single list of virtuals. Build chain
3842         of declared virtuals here.
3843         (layout_class_type): Take single list of virtuals. Adjust.
3844         (finish_struct_1): Keep virtuals on single list. Adjust.
3845
3846 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
3847
3848         * init.c (build_member_call): Use build_new_method_call, not
3849         build_method_call.
3850
3851 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
3852
3853         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
3854
3855 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
3856
3857         * call.c (build_method_call): Issue a more helpful error message
3858         about ambiguous method names.
3859
3860 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
3861
3862         * tree.c (build_shared_int_cst): Make cache file scope, and
3863         GTY it.
3864
3865 2002-08-02  Jason Merrill  <jason@redhat.com>
3866
3867         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
3868         (cp_expr_size): New fn.
3869         * call.c (build_over_call): Lose empty class hackery.
3870         (convert_arg_to_ellipsis): Promote non-POD warning to error.
3871         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
3872
3873         * semantics.c (expand_body): Do tree optimization in the function
3874         context, too.
3875
3876 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
3877
3878         * cp-tree.h: Move all warning and flag declarations to c-common.h.
3879         * decl.c: Move all warning and flag variables to c-common.c.
3880         * decl2.c: Move all warning and flag variables to c-common.c.
3881         * lex.c (flag_digraphs): Remove.
3882         (warn_traditional): Now in c-common.c.
3883
3884 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
3885
3886         * call.c (build_field_call): Do not look up the field by name.
3887         (build_method_call): Simplify.
3888         (struct z_candidate): Add access_path and conversion_path.  Remove
3889         basetype_path.
3890         (convert_class_to_reference): Adjust use of
3891         add_function_candidate.
3892         (add_candidate): Add conversion_path argument.
3893         (add_function_candidate): Use it.
3894         (add_conv_dndidate): Likewise.
3895         (build_builtin_candidate): Likewise.
3896         (add_template_candidate_real): Add conversion_path argument.
3897         (add_template_conv_candidate): Likewise.
3898         (add_template_candidate): Likewise.
3899         (build_user_type_conversion_1): Use it.
3900         (build_new_function_call): Remove name lookup code.  Adjust use of
3901         add_template_candidate and add_function_candidate.
3902         (build_new_op): Likewise.
3903         (convert_like_real): Use build_special_member_call.
3904         (build_over_call): Use cand->conversion_path.
3905         (build_special_member_call): New method.
3906         (build_new_method_call): Remove name lookup code.
3907         * cp-tree.def (OFFSET_REF): Update documentation.
3908         (TEMPLATE_ID_EXPR): Likewise.
3909         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
3910         (BASELINK_OPTYPE): Likewise.
3911         (build_new_method_call): Adjust prototype.
3912         (build_special_member_call): New method.
3913         (build_baselink): New method.
3914         (build_offset_ref_call_from_tree): Likewise.
3915         (build_call_from_tree): Likewise.
3916         (finish_qualified_call_expr): Remove.
3917         (finish_call_expr): Adjust prototype.
3918         (build_x_function_call): Remove.
3919         * cvt.c (ocp_convert): Use build_special_member_call.
3920         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
3921         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
3922         CALL_EXPR.
3923         (build_offset_ref_call_from_tree): New function.
3924         (build_call_from_tree): Likewise.
3925         * init.c (expand_cleanup): Use build_special_member_call.
3926         (expand_default_init): Likewise.
3927         (build_member_call): Use finish_call_expr.
3928         (build_new_1): Use build_special_member_call.
3929         (push_base_cleanups): Likewise.
3930         * method.c (do_build_assign_ref): Likewise.
3931         * parse.y (template_id): Do not pass a COMPONENT_REF to
3932         lookup_template_function.
3933         (primary): Use parse_finish_call_epxr, not finish_call_expr.
3934         (parse_finish_call_expr): New function.
3935         * pt.c (lookup_template_function): Add assertions.
3936         * search.c (lookup_base): Allow T to be a binfo.
3937         (build_baselink): New function.
3938         (lookup_member): Use it.
3939         * semantics.c (finish_call_expr): Do not do name lookup.
3940         (finish_object_call_expr): Remove #if 0'd code.
3941         (finish_qualified_call_expr): Remove.
3942         * typeck.c (build_x_function_call): Remove.
3943         (build_static_case): Use build_special_member_call.
3944         * typeck2.c (build_functional_cast): Likewise.
3945
3946 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
3947
3948         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
3949
3950 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
3951
3952         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
3953
3954 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
3955
3956         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
3957         documentation.
3958
3959 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
3960
3961         * cp-tree.h: Comment typo fix.
3962
3963 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
3964
3965         * spew.c (space_for_token): Allocate zeroed memory for a new token
3966         chunk.
3967
3968 2002-07-27  Roger Sayle  <roger@eyesopen.com>
3969
3970         * decl.c (builtin_function_1): No need to explicitly mark
3971         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
3972
3973 2002-07-27  Roger Sayle  <roger@eyesopen.com>
3974
3975         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
3976
3977 2002-07-26  Jason Merrill  <jason@redhat.com>
3978
3979         * call.c (build_over_call): Likewise.
3980         (cp_convert_parm_for_inlining): New fn.
3981         (convert_for_arg_passing): New fn.
3982         (convert_default_arg, build_over_call): Use it.
3983         (type_passed_as): New fn.
3984         * pt.c (tsubst_decl): Use it.
3985         * decl2.c (cp_build_parm_decl): New fn.
3986         (build_artificial_parm): Use it.
3987         (start_static_storage_duration_function): Likewise.
3988         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
3989         (grokparms): Don't mess with DECL_ARG_TYPE.
3990         * typeck.c (convert_arguments): Use convert_for_arg_passing.
3991         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
3992         Define.
3993         * cp-tree.h: Declare new fns.
3994
3995 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
3996
3997         * cp-tree.h (flag_operator_names): Remove.
3998         * decl2.c (flag_operator_names): Remove.
3999         (lang_f_options): Remove operator-names.
4000         * lex.c (D_OPNAME): Remove.
4001         (reswords): Remove operator names.
4002         (rid_to_yy): Remove operator names.
4003         (init_reswords): No need to handle D_OPNAME.
4004         * spew.c (read_process_identifier): There are no operator
4005         names.
4006
4007 2002-07-26  Jason Merrill  <jason@redhat.com>
4008
4009         * dump.c (cp_dump_tree): Call c_dump_tree.
4010         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
4011
4012 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
4013
4014         * error.c (print_whitespace): Remove.
4015         * g++spec.c (LIBUNWIND): Move.
4016         * mangle.c (mangled_position, write_signed_number): Remove.
4017
4018 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
4019
4020         * decl2.c (cxx_decode_option): Similarly.
4021
4022 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
4023
4024         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
4025         (cxx_sizeof_or_alignof_type): Take a third argument.
4026         (cxx_sizeof): Adjust definition.
4027         (cxx_alignof): Likewise.
4028         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
4029         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
4030         complaining.
4031         (c_sizeof_nowarn): Remove definition.
4032         (build_unary_op): Use cxx_sizeof_nowarn.
4033
4034 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
4035
4036         * tree.c (cp_build_qualified_type_real): When copying
4037         pointer-to-method types, unshare the record that holds
4038         the cached pointer-to-member-function type.
4039
4040 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
4041
4042         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
4043
4044 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
4045
4046         Fix PR/7363:
4047         * typeck.c (cxx_sizeof_or_alignof_type): New function.
4048         (c_sizeof): Remove definition.
4049         (expr_sizeof): Use cxx_sizeof.
4050         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
4051         * decl.c (finish_destructor_body): Use cxx_sizeof.
4052         * semantics.c (finish_alignof): Likewise.
4053         (finish_alignof): Use cxx_alignof.
4054         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
4055         (cxx_sizeof_or_alignof_type): Declare.
4056         (my_friendly_assert): Move to ../c-common.h.
4057
4058 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
4059
4060         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
4061
4062 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4063
4064         PR c++/7347, c++/7348
4065         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
4066         * decl.c (make_typename_type): Use it.
4067         (make_unbound_class_template): Likewise.
4068         (lookup_name_real): Don't call type_access_control if scope is
4069         template parameter dependent.
4070         * parse.y (template_arg): Call make_unbound_class_template with
4071         tf_parsing set.
4072         (nest_name_specifier): Call make_typename_type with tf_parsing set.
4073         (typename_sub0): Likewise.
4074         (typename_sub1): Likewise.
4075         (instantiate_decl): Push class scope.
4076         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
4077         for both static variable and member function template.
4078         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
4079         and arguments.
4080         * search.c (type_access_control): Do type access for TEMPLATE_DECL
4081         too.
4082
4083 2002-07-20  Roger Sayle  <roger@eyesopen.com>
4084
4085         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
4086         test by using positive_option.  Make whitespace consistent.
4087
4088 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
4089
4090         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
4091         members with 'locus'.  Adjust use throughout.
4092         (struct feed):  Likewise.
4093         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
4094         Adjust use.
4095         (snarf_defarg): Use error(), not error_with_file_and_line().
4096
4097 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
4098
4099         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
4100         cpp_options is included.
4101
4102 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4103
4104         PR c++/2862, c++/2863
4105         * pt.c (determine_specialization): Compare the length of
4106         TYPE_ARG_TYPES.  Tidy.
4107
4108 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4109
4110         PR c++/3797
4111         * decl.c (duplicate_decls): Don't propagate inlining parameters from
4112         olddecl to newdecl when newdecl is a specialization of the
4113         instantiation olddecl.
4114
4115 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4116
4117         PR c++/4802, c++/5387
4118         * decl.c (make_typename_type): Use enforce_access.
4119
4120 2002-07-17  Scott Snyder <snyder@fnal.gov>
4121
4122         PR c++/7320
4123         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
4124
4125 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
4126
4127         * class.c (add_method): Correct handling of conversion operators.
4128
4129 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
4130
4131         PR c++/7224
4132         * class.c (add_method): Simplify.
4133
4134 2002-07-11  Jason Merrill  <jason@redhat.com>
4135
4136         PR c++/7279
4137         * tree.c (cp_copy_res_decl_for_inlining): Also copy
4138         TREE_ADDRESSABLE.
4139
4140 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
4141
4142         * pt.c (template_parm_this_level_p, push_template_decl_real):
4143         Pass depth as int pointer.
4144
4145 2002-07-11  Tim Josling  <tej@melbpc.org.au>
4146
4147         Remove front end hard coding from gengtype.c.
4148
4149         * config-lang.in (gtfiles): Add files needed for this front end.
4150
4151 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
4152
4153         * cp-tree.h (unqualified_name_lookup_error): Declare it.
4154         (begin_function_definition): Adjust prototype.
4155         * lex.c (unqualified_name_lookup_error): New function, split out
4156         from ...
4157         (do_identifier): ... here.
4158         * parse.y (parse_begin_function_definition): New function.
4159         (fn.def1): Use it.
4160         * semantics.c (begin_function_definition): Accept decl-specifiers
4161         and attributes as separate parameters.
4162
4163 2002-07-10  Jason Merrill  <jason@redhat.com>
4164
4165         PR c++/6255
4166         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
4167         modifying the old one.
4168
4169 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
4170
4171         * cp-tree.h (constructor_name_p): Declare it.
4172         (check_template_template_default_arg): Likewise.
4173         * class.c (handle_using_decl): Use constructor_name_p.
4174         * decl.c (grokdeclarator): Likewise.
4175         * decl2.c (constructor_name_p): Define it.
4176         * init.c (build_member_call): Use constructor_name_p.
4177         * parse.y (template_parm): Use check_template_template_default_arg.
4178         * pt.c (check_explicit_specialization): Use constructor_name_p.
4179         * semantics.c (check_template_template_default_arg): New function.
4180
4181 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4182
4183         * pt.c (can_complete_type_without_circularity): Add static to
4184         function definition.
4185
4186 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
4187
4188         * cp-tree.h (have_extern_spec): Declare it
4189         * decl.c (have_extern_spec): Define it.
4190         (start_decl): Eliminate use of used_extern_spec.
4191         (start_function): Likewise.
4192         * parse.y (have_extern_spec): Remove declaration.
4193         (used_extern_spec): Likewise.
4194         (frob_specs): Eliminate use of used_extern_spec.
4195         (.hush_warning): Likewise.
4196
4197 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
4198
4199         * Make-lang.in (cp/parse.o): Depend on decl.h.
4200         * cp-tree.h (do_decl_instantiation): Change prototype.
4201         * parse.y: Include decl.h.
4202         (parse_decl_instantiation): New function.
4203         (explicit_instantiation): Use it.
4204         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
4205         and DECLSPECS.
4206
4207 2002-07-07  Roger Sayle  <roger@eyesopen.com>
4208
4209         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
4210         constructor and destructor tests when passed a TEMPLATE_DECL.
4211
4212 2002-07-05  Jason Merrill  <jason@redhat.com>
4213
4214         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
4215         pointers.
4216
4217         PR optimization/7145
4218         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
4219
4220 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
4221
4222         Repair damage on weak-impared targets caused by my previous patch.
4223         * cp-tree.h (import_export_tinfo): Add parameter.
4224         * decl2.c (import_export_tinfo): Add parameter, post adjust
4225         DECL_COMDAT.
4226         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
4227         import_export_tinfo.
4228
4229 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4230
4231         PR c++/6944
4232         * init.c (build_aggr_init): Remove qualifiers of init before calling
4233         build_vec_init.
4234         (build_vec_init): Flatten multi-dimensional array during cleanup.
4235         (build_vec_delete_1): Abort if the type of each element is array.
4236
4237 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
4238
4239         * pt.c (instantiate_class_template): Fix typo.
4240
4241 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4242
4243         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
4244         by CVS conflict in my last patch.
4245
4246 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4247
4248         PR c++/6716
4249         * pt.c (can_complete_type_without_circularity): New function.
4250         (instantiate_class_template): Use it.
4251         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
4252         message due to incomplete fields.
4253
4254 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
4255
4256         PR c++/7112
4257         * mangle.c (write_expression): Add mangling for sizeof when
4258         applied to a type.
4259         * operators.def: Remove stale comment.
4260
4261 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
4262
4263         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
4264         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
4265         (tinfo_decl_type): Replace with ...
4266         (type_info_ptr_type): ... this.
4267         (import_export_tinfo): Declare.
4268         (tinfo_decl_p): Rename to ...
4269         (unemitted_tinfo_decl_p): ... this.
4270         * decl2.c (import_export_decl): Break out tinfo handling into ...
4271         (import_export_tinfo): ... here. New function.
4272         (finish_file): Adjust.
4273         * rtti.c (TINFO_REAL_NAME): New macro.
4274         (init_rtti_processing): Create the tinfo types.
4275         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
4276         (get_tinfo_decl): Adjust.
4277         (get_tinfo_ptr): New function.
4278         (get_type_id): Use it.
4279         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
4280         (ptr_initializer): Use get_tinfo_ptr.
4281         (ptm_initializer): Likewise.
4282         (synthesize_tinfo_var): Break into ...
4283         (get_pseudo_ti_init): ... this. Just create the initializer.
4284         (get_pseudo_ti_desc): .. and this.
4285         (create_real_tinfo_var): Remove.
4286         (create_pseudo_type_info): Don't create the vtable decl here.
4287         (get_vmi_pseudo_type_info): Remove.
4288         (create_tinfo_types): Adjust.
4289         (tinfo_decl_p): Rename to ...
4290         (unemitted_tinfo_decl_p): ... here. Adjust.
4291         (emit_tinfo_decl): Adjust. Create the initializer.
4292
4293 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
4294
4295         PR c++/6695
4296         * pt.c (tsubst_friend_class): Substitute into the context of the
4297         friend before using it.
4298
4299 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
4300
4301         * cp-tree.h (xref_tag): Change prototype.
4302         (handle_class_head): Likewise.
4303         (build_x_component_ref): Likewise.
4304         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
4305         (xref_tag): Take attributes as a separate parameter.
4306         (xref_tag_from_type): Adjust call to xref_tag.
4307         * decl2.c (build_expr_from_tree): Adjust call to
4308         build_x_component_ref.
4309         (handle_class_head): Take attributes as a separate parameter.
4310         * parse.y (parse_xref_tag): New function.
4311         (parse_handle_class_head): Likewise.
4312         (primary): Use parse_xref_tag.
4313         (class_head_decl): Use parse_handle_class_head.
4314         (class_head_defn): Likewise.
4315         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
4316         (build_dynamic_cast_1): Likewise.
4317         (create_pseudo_type_info): Likewise.
4318         (emit_support_tinfos): Likewise.
4319         * typeck.c (build_object_ref): Adjust call to
4320         build_x_component_ref.
4321         (build_x_component_ref): Remove protect parameter.
4322
4323 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
4324
4325         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
4326         * class.c (handle_using_decl): Likewise.
4327         (instantiate_type): Likewise.
4328         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
4329         (xref_basetypes): Change prototype.
4330         (begin_mem_initializers): New function.
4331         (get_overloaded_fn): Likewise.
4332         * decl.c (xref_basetypes): Simplify.
4333         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
4334         * init.c (build_offset_ref): Likewise.
4335         * parse.y (base_init): Use begin_mem_initializers().
4336         (structsp): Adjust call to xref_basetypes.
4337         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
4338         (instantiate_class_template): Adjust call to xref_basetypes.
4339         * semantics.c (begin_mem_initializers): New function.
4340         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
4341         (really_overlaoded_fn): Likewise.
4342         (get_overloaded_fn): New function.'
4343         (get_first_fn): USe BASELINK_FUNCTIONS.
4344
4345 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
4346
4347         * cp-tree.h (SCALAR_TYPE_P): New macro.
4348         (check_for_out_of_scope_variable): New function.
4349         (at_class_scope_p): Likewise.
4350         (finish_fname): Likewise.
4351         * class.c (finish_struct): Use at_function_scope_p.
4352         * decl.c (check_for_out_of_scope_variable): New function, split
4353         out from do_identifier.
4354         (finish_enum): Use at_function_scope_p.
4355         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
4356         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
4357         (primary): Use at_function_scope_p.
4358         * search.c (at_class_scope_p): New function.
4359         * semantics.c (finish_fname): Likewise.
4360         (check_multiple_declarators): Use at_function_scope_p.
4361
4362 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
4363
4364         * parse.y (parse_scoped_id): New function.
4365         (primary): Use it.
4366         * cp-tree.h (do_scoped_id): Adjust declaration.
4367         * lex.c (do_scoped_id): Remove call to yylex.
4368         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
4369         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
4370         expanding it inline.
4371
4372 2002-06-23  Matt Thomas  <matt@3am-software.com>
4373
4374         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
4375         "#if VMS_TARGET".
4376
4377 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4378
4379         * mangle.c (integer_type_codes): Const-ify.
4380
4381 2002-06-20  Richard Henderson  <rth@redhat.com>
4382
4383         PR c++/6747
4384         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
4385         Call put_var_into_stack.
4386
4387 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4388
4389         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
4390         array size calculation.
4391
4392 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4393
4394         PR c++/6892
4395         * pt.c (tsubst_expr): Handle FILE_STMT.
4396
4397 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4398
4399         PR c++/6723
4400         * pt.c (lookup_template_class): Don't build complete argument of
4401         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
4402         argument.
4403
4404 2002-06-19  Akim Demaille  <akim@epita.fr>
4405
4406         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
4407         decl.h's TYPENAME.
4408         * spew.c, lex.c: Adjust.
4409         * parse.y (explicit_instantiation): Add empty action to override
4410         the default $$ = $1 where it introduces a type clash.
4411
4412 2002-06-14  Jason Merrill  <jason@redhat.com>
4413
4414         * semantics.c (begin_for_stmt): Push the 'for' scope before
4415         adding the FOR_STMT.
4416
4417         C++ ABI changes.
4418         * class.c (build_base_field): Set DECL_PACKED.
4419         (layout_class_type): Don't use tail padding of PODs.
4420         * mangle.c (write_unqualified_name): Fix template conversion op
4421         mangling.
4422
4423 2002-06-16  Richard Henderson  <rth@redhat.com>
4424
4425         PR opt/6793
4426         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
4427         after template instantiation.
4428
4429 2002-06-16  Richard Henderson  <rth@redhat.com>
4430
4431         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
4432
4433 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
4434
4435         * cp-tree.h (compiler_error): Remove declaration.
4436         * lex.c (compiler_error): Remove definition.
4437
4438 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
4439
4440         * g++spec.c (LIBUNWIND): New.
4441         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
4442
4443 2002-06-13  Jessica Han  <jessica@cup.hp.com>
4444
4445         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
4446         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
4447         (build_vbase_offset_vtbl_entries): Likewise.
4448         * rtti.c (build_headof): Likewise.
4449         (get_tinfo_decl_dynamic): Likewise.
4450         (create_pseudo_type_info): Likewise.
4451
4452 2002-06-12  Stan Shebs  <shebs@apple.com>
4453
4454         * mpw-config.in: Remove file, no longer used.
4455         * mpw-make.sed: Ditto.
4456
4457 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
4458
4459         * decl2.c: Update call to cpp_handle_option.
4460
4461 2002-06-07  H.J. Lu  (hjl@gnu.org)
4462
4463         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
4464
4465 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
4466
4467         * error.c (cp_error_at): Fix typo.
4468
4469 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
4470
4471         * error.c (cp_diagnostic_starter): Adjust call.
4472         (maybe_print_instantiation_context): Change prototype to take a
4473         'diagnostic_info *'.
4474         (print_instantiation_full_context): Likewise.
4475         (print_instantiation_partial_context): Likewise.
4476         (cp_diagnostic_starter): Likewise.
4477         (cp_diagnostic_finalizer): Likewise.
4478         (cp_print_error_function): Likewise.
4479         (cp_printer): Take a secondary parameter as a 'text_info *'.
4480         Remove output_state savings.  Adjust calls.
4481
4482 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
4483
4484         * pt.c (inline_parm_levels): Mark for GC.
4485
4486         * mangle.c (start_mangling): Allocate G.substitutions here...
4487         (init_mangle): ... rather than here.
4488         (finish_mangling): Clear the varray pointer when done with it.
4489         * spew.c (yylexstring): Don't use VARRAY_FREE.
4490         * search.c (bfs_walk): Don't use VARRAY_FREE.
4491         * decl2.c (pending_statics): Use gengtype to mark.
4492         (deferred_fns): Likewise.
4493         (ssdf_decls): Likewise.
4494         (init_decl2): Delete.
4495         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
4496         (cxx_init_decl_processing): Don't call init_decl2.
4497         (cxx_pop_function_context): Don't use VARRAY_FREE.
4498         * cp-tree.h (struct saved_scope): No need for special marking
4499         of varrays.
4500         (struct language_function): Likewise.
4501         (local_classes): Use gengtype to mark.
4502         (init_decl2): Delete prototype.
4503         * class.c (init_class_processing): Don't use
4504         ggc_add_tree_varray_root.
4505         (build_vtbl_initializer): Don't use VARRAY_FREE.
4506
4507         * decl.c (typename_compare): Don't use same_type_p.
4508
4509         * decl.c: Include hashtab.h instead of hash.h.
4510         (typename_hash): Update to use htab_h.
4511         (typename_compare): Likewise.
4512         (typename_htab): Use gengtype to mark.
4513         (build_typename_type): Update to use htab_h.
4514         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
4515
4516         * Make-lang.in (gt-cp-tree.h): New rule.
4517         (cp/tree.o): Depend on gt-cp-tree.h.
4518         * config-lang.in (gtfiles): Add cp/tree.c.
4519         * tree.c: Include gt-cp-tree.h.
4520         (list_hash_table): Use gengtype to mark.
4521         (init_tree): Use gengtype to mark trees.
4522
4523         * Make-lang.in (cp/decl.o): Add debug.h dependency.
4524         * call.c (struct z_candidate): Use gengtype.
4525         (USER_CONV_CAND): Use WRAPPER_ZC.
4526         (convert_class_to_reference): Use build_zc_wrapper.
4527         (build_type_conversion_1): Likewise.
4528         (build_over_call): Use WRAPPER_ZC.
4529         (add_warning): Use build_zc_wrapper.
4530         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
4531         * cp-tree.h (struct lang_identifier): Use gengtype.
4532         (struct template_parm_index_s): Likewise.
4533         (struct ptrmem_cst): Likewise.
4534         (struct tree_binding): Likewise.
4535         (struct tree_overload): Likewise.
4536         (struct tree_srcloc): Likewise.
4537         (struct tree_wrapper): Likewise.  Also modify to have a pointer
4538         to struct z_candidate rather than void.
4539         (enum cp_tree_node_structure_enum): New.
4540         (union lang_tree_node): New.
4541         (cxx_mark_tree): Delete prototype.
4542         (cp_tree_node_structure): New prototype.
4543         (build_ptr_wrapper): Delete prototype.
4544         (build_int_wrapper): Delete prototype.
4545         (build_zc_wrapper): New prototype.
4546         * decl.c: Include debug.h
4547         (cxx_mark_tree): Delete.
4548         (cp_tree_node_structure): New.
4549         * tree.c (build_ptr_wrapper): Delete.
4550         (build_int_wrapper): Delete.
4551         (build_zc_wrapper): New.
4552
4553         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
4554         Correct typo.  Patch from k_fukui@highway.ne.jp.
4555
4556         * semantics.c (current_stmt_tree): Update for change to
4557         struct language_function.
4558         (finish_mem_initializers): Likewise.
4559         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
4560         * cp-tree.h (struct language_function): Rename from
4561         cp_language_function.  Change all uses.
4562         (cp_function_chain): Don't need to cast.
4563
4564         * class.c (duplicate_tag_error): Reset discriminator.
4565         (check_bases_and_members): Update for data structure changes.
4566         * cp-tree.h (struct lang_id2): Use gengtype.
4567         (flagged_type_tree): Likewise.
4568         (SET_LANG_ID): Use GGC on struct lang_id2.
4569         (struct cp_language_function): Use gengtype.  Remove field
4570         'x_vcalls_possible_p'.
4571         (current_vcalls_possible_p): Delete.
4572         (struct lang_type_header): New.
4573         (struct lang_type_class): Rename from struct lang_type.  Include
4574         struct lang_type_header.
4575         (struct lang_type_ptrmem): New.
4576         (struct lang_type): New.
4577         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
4578         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
4579         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
4580         (struct lang_decl_flags): Use gengtype.  Add discriminators.
4581         (struct lang_decl): Use gengtype.  Add and use discriminators.
4582         Update the macros that reference moved fields.
4583         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
4584         (SET_DECL_THUNK_P): Set discriminator too.
4585         (clear_inline_text_obstack): Delete prototype.
4586         (finish_inline_definitions): Delete prototype.
4587         (mark_pending_inlines): Delete prototype.
4588         (lang_check_failed): New prototype.
4589         * decl.c (struct named_label_use_list): Use gengtype.
4590         (struct named_label_list): Likewise.
4591         (mark_binding_level): Delete.
4592         (mark_named_label_lists): Delete.
4593         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
4594         (cxx_init_decl_processing): Use generated marker routine.
4595         (begin_destructor_body): Delete dead set to
4596         current_vcalls_possible_p.
4597         (mark_lang_function): Delete.
4598         (mark_cp_function_context): Delete.
4599         (lang_mark_tree): Use generated marker routines.
4600         * decl2.c (start_objects): Set discriminator when setting
4601         GLOBAL_INIT_PRIORITY.
4602         * lex.c (retrofit_lang_decl): Set discriminators.
4603         (copy_lang_type): Update for changes to lang_type structure.
4604         (cp_make_lang_type): Set discriminator.
4605         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
4606         * search.c: Include ggc.h.
4607         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
4608         (finish_inline_definitions): Delete.
4609         * spew.c (struct token): Use gengtype.
4610         (struct token_chunk): New.
4611         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
4612         (struct feed): Use gengtype.
4613         (feed_obstack): Delete.
4614         (feed): Mark as GC root.
4615         (pending_inlines): Mark as GC root.
4616         (pending_inlines_tail): Likewise.
4617         (processing_these_inlines): Likewise.
4618         (token_obstack): Make static.
4619         (first_token): Likewise.
4620         (init_spew): Don't initialize deleted things; use gengtype for roots.
4621         (clear_inline_text_obstack): Delete.
4622         (feed_input): Use GC for struct feed.  Update for changes to
4623         struct unparsed_text.
4624         (mark_pending_inlines): Delete.
4625         (next_token): Rename from add_token.  Change all callers.  Update
4626         for changes to struct unparsed_text.
4627         (space_for_token): New.
4628         (remove_last_token): New.
4629         (alloc_unparsed_text): New.
4630         (snarf_block): Take an unparsed_text.  Update for changes to struct
4631         unparsed_text.
4632         (snarf_method): Update for changes to struct unparsed_text.
4633         (snarf_defarg): Update for changes to struct unparsed_text.
4634         * tree.c (lang_check_failed): New.
4635
4636         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
4637         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
4638         (cp/spew.o): Add dependency on gt-<filename>.h.
4639         (cp/decl2.o): Add dependency on gt-<filename>.h.
4640         (cp/call.o): Add dependency on gt-<filename>.h.
4641         (cp/pt.o): Add dependency on gt-<filename>.h.
4642         (cp/repo.o): Add dependency on gt-<filename>.h.
4643         (cp/parse.o): Add dependency on gt-<filename>.h.
4644         * call.c: Use gengtype for roots.
4645         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
4646         decl2.c parse.y pt.c repo.c spew.c.
4647         * cp-tree.h: Use gengtype for roots.
4648         (struct saved_scope): Use GGC, gengtype.
4649         (cp_parse_init): Delete prototype.
4650         (init_pt): Delete prototype.
4651         * decl.c: Use gengtype for roots.
4652         (mark_saved_scope): Delete.
4653         (cxx_init_decl_processing): Don't call deleted initilisation
4654         routines.
4655         (signed_size_zero_node): Delete, unused.
4656         * decl.h: Use gengtype for roots.
4657         * decl2.c: Use gengtype for roots.
4658         * lex.h: Use gengtype for roots.
4659         * parse.y: Use gengtype for roots.
4660         (cp_parse_init): Delete.
4661         * pt.c: Use gengtype for roots.
4662         (init_pt): Delete.
4663         * repo.c: Use gengtype for roots.
4664         * spew.c: Use gengtype for roots.
4665
4666         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
4667         (cp/decl.o): Add dependency on gtype-cp.h.
4668         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
4669         Include gtype-cp.h.  Allow for filename changes.
4670
4671         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
4672         (cp/decl.o): Add cp/gt-decl.h dependency.
4673         * config-lang.in (gtfiles): New.
4674         * tree.h: Rename struct binding_level to struct cp_binding_level.
4675         * decl.c: Rename struct binding_level to struct cp_binding_level.
4676         Include cp/gt-decl.h.
4677         (struct cp_binding_level): Use gengtype.
4678         (make_binding_level): Use GGC on struct cp_binding_level.
4679         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
4680         (cxx_init_decl_processing): Mark free_binding_level as
4681         deletable.
4682
4683         * decl.c (mark_cp_function_context): Update calling sequence.
4684
4685         * decl.c (start_function): Don't free 'struct
4686         cp_language_function'.
4687         (pop_cp_function_context): Likewise.
4688         (save_function_data): Allocate it using GC.
4689         * semantics.c (genrtl_start_function): Don't free 'struct
4690         cp_language_function'.
4691
4692 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
4693
4694         * lang-specs.h: Use cpp_debug_options.
4695
4696 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
4697
4698         * mangle.c, tree.c: Include real.h.
4699         * Make-lang.in: Update dependency lists.
4700
4701 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
4702
4703         * lex.c: Don't include c-lex.h.
4704         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
4705
4706 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
4707
4708         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
4709
4710 2002-05-22  Richard Henderson  <rth@redhat.com>
4711
4712         * decl.c (obscure_complex_init): Check for VAR_DECL
4713         before using DECL_THREAD_LOCAL.
4714
4715 2002-05-22  Richard Henderson  <rth@redhat.com>
4716
4717         * decl.c (check_tag_decl): Handle RID_THREAD.
4718         (obscure_complex_init): Reject run-time init of tls.
4719         (grokvardecl, grokdeclarator): Handle RID_THREAD.
4720         * lex.c (reswords): Add __thread.
4721         (rid_to_yy): Map RID_THREAD to SCSPEC.
4722
4723 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
4724
4725         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
4726         * cp-tree.h (cxx_post_options): Kill.
4727         * cp-lex.c (cxx_post_options): Kill.
4728
4729 2002-05-21  Richard Henderson  <rth@redhat.com>
4730
4731         * lex.c (rid_to_yy): Add RID_THREAD.
4732
4733 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
4734
4735         * init.c (build_vec_init): Test for trivial copy-assignment when
4736         copy-assigning arrays.
4737
4738 2002-05-20  Andreas Jaeger  <aj@suse.de>
4739
4740         * init.c (build_default_init): Remove unused variable.
4741
4742 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
4743
4744         * call.c (any_strictly_viable): New.
4745         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
4746
4747 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4748
4749         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
4750
4751 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4752
4753         PR c++/186, DR 259
4754         * pt.c (do_decl_instantiation): Don't complain explicit
4755         instantiation after explicit specialization.
4756         (do_type_instantiation): Likewise.
4757
4758 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
4759
4760         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
4761         renamed from...
4762         (complete_type_or_else): ... this.  Redefined as macro.
4763         (cxx_incomplete_type_diagnostic): Declare.
4764         (cxx_incomplete_type_error): Define as macro.
4765         * init.c (build_delete): Warn about incomplete types other than
4766         void, and use the built-in operator delete for them.
4767         * typeck.c (complete_type_or_diagnostic): Renamed from
4768         complete_type_or_else.  Added warn_only argument, passed to...
4769         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
4770         warnings or errors depending on new warn_only argument.  Renamed
4771         from...
4772         (cxx_incomplete_type_error): ... this.  New implementation in
4773         terms of cxx_incomplete_type_diagnostic.
4774
4775 2002-05-18  Jason Merrill  <jason@redhat.com>
4776
4777         PR c++/6611
4778         * decl2.c (import_export_decl): If we clear
4779         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
4780
4781 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4782
4783         PR c++/6620
4784         * pt.c (verify_class_unification): Don't check if PARM is template
4785         parameter dependent.  Simplify.
4786         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
4787         parameter dependent expression.
4788
4789 2002-05-14  Jason Merrill  <jason@redhat.com>
4790
4791         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
4792         Do set DECL_COMDAT.
4793         (synthesize_tinfo_var): Take the public decl.
4794         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
4795         (emit_tinfo_decl): Adjust.  Call import_export_decl.
4796         * decl2.c (import_export_decl): Simplify tinfo decl handling.
4797
4798 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
4799
4800         * cp-tree.h (struct lang_type): Added non_zero_init.
4801         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
4802         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
4803         * class.c (check_field_decls): Test non_zero_init.
4804         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
4805         zero-to-NULL conversions.
4806         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
4807         type that needs zero-initialization without zeros.
4808         (check_initializer_decl): Compute zero-initializer for types
4809         that require a non-trivial one.
4810         * init.c (build_forced_zero_init): New function.
4811         (build_default_init): Use it.
4812         * tree.c (zero_init_p): New function.
4813         * typeck2.c (force_store_init_value): New function.
4814         (process_init_constructor): Create non-trivial zero-initializers
4815         for array members and class fields.
4816
4817 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
4818
4819         * lang-specs.h: Remove redundant -lang-c++.
4820
4821 2002-05-13  Jason Merrill  <jason@redhat.com>
4822
4823         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
4824         (fixed_type_or_null): See through reference vars.
4825         (build_base_path): Vtable contents are constant.
4826         * typeck.c (get_member_function_from_ptrfunc): Likewise.
4827
4828 2002-05-12  Jason Merrill  <jason@redhat.com>
4829
4830         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
4831         structs are safe.
4832
4833 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
4834
4835         * cp-tree.h (flag_ansi): Remove.
4836         * decl2.c (flag_ansi): Remove.
4837         (cxx_decode_option): Set flag_iso and flag_undef.
4838
4839 2002-05-09  Jason Merrill  <jason@redhat.com>
4840
4841         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
4842         Use subtraction rather than a bitmask to get the index.
4843         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
4844
4845         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
4846
4847 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
4848
4849         * Make-lang.in (decl2.o): Update.
4850         * cp-tree.h (warn_multichar): Remove.
4851         * decl2.c: Include c-common.h.
4852         (warn_multichar): Remove.
4853
4854 2002-05-03  Jason Merrill  <jason@redhat.com>
4855
4856         * tree.c (build_cplus_array_type): Only const and volatile get
4857         special handling.
4858
4859         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
4860
4861 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
4862
4863         ABI change, returning simple classes from functions.
4864         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
4865         TYPE_HAS_TRIVIAL_INIT_REF is false or
4866         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
4867
4868 2002-04-30  Jason Merrill  <jason@redhat.com>
4869
4870         PR debug/6436
4871         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
4872         anonymous class with a typedef if there are attributes.
4873
4874 2002-04-29  Paul Eggert  <eggert@twinsun.com>
4875
4876         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
4877
4878 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
4879
4880         PR c++/6477
4881         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
4882         non-NULL first.
4883
4884 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
4885
4886         PR c++/6492
4887         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
4888         enter that scope before name lookup.
4889
4890         PR c++/6486
4891         * method.c (do_build_copy_constructor): Avoid building
4892         cv-qualified reference types.
4893
4894 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
4895
4896         PR c++/5719
4897         * decl.c (grok_op_properties): Assignment ops don't have to return
4898         by value. operator% should.
4899
4900 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
4901
4902         PR c/6343
4903         * decl.c (duplicate_decls): Call merge_weak.
4904
4905 2002-04-26  Richard Henderson  <rth@redhat.com>
4906
4907         * parse.y (malloced_yyss, malloced_yyvs): New.
4908         (yyoverflow): Re-add.  Set them.
4909         (free_parser_stacks): New.
4910
4911 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
4912
4913         PR c++/6497
4914         * method.c (do_build_assign_ref): Pass a derivation to
4915         build_method_call when calling base class assignment operators.
4916
4917 2002-04-26  Richard Henderson  <rth@redhat.com>
4918
4919         * parse.y (yyoverflow): Revert.
4920
4921 2002-04-26  Richard Henderson  <rth@redhat.com>
4922
4923         PR c/3581
4924         * parse.y (string): Remove.  Update all uses to use STRING
4925         instead, and not call combine_strings.
4926         * rtti.c (tinfo_name): Use fix_string_type.
4927         * semantics.c (finish_asm_stmt): Don't call combine_strings.
4928         * spew.c (yylexstring): New.
4929         (read_token): Use it.
4930
4931 2002-04-25  Richard Henderson  <rth@redhat.com>
4932
4933         PR c/2161
4934         * parse.y (yyoverflow): New.
4935
4936 2002-04-25  Jason Merrill  <jason@redhat.com>
4937
4938         PR c++/5607
4939         * search.c (check_final_overrider): No longer static.
4940         * class.c (update_vtable_entry_for_fn): Call it.
4941         * cp-tree.h: Adjust.
4942
4943 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
4944
4945         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
4946         * cp-tree.h (cxx_set_yydebug): Die.
4947         * lex.c (YYDEBUG): Get from c-lex.h.
4948         (cxx_set_yydebug): Remove.
4949         * parse.y: Include c-lex.h.
4950         (YYDEBUG): Get from c-lex.h.
4951
4952 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
4953
4954         PR c++/6438.
4955         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
4956         void.
4957
4958 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
4959
4960         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
4961         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
4962         Redefine.
4963         * cp-tree.h (cp_attribute_table): Rename.
4964         * decl.c (lang_attribute_table): Remove declaration.
4965         (cxx_init_decl_processing): Don't set it.
4966         * tree.c (cp_attribute_table): Rename.
4967
4968 2002-04-24  Jason Merrill  <jason@redhat.com>
4969
4970         PR c++/6331
4971         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
4972         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
4973         The pedwarn for array assignment is now unconditional.
4974         * tree.c (build_cplus_array_type_1): Still process simple array types
4975         normally in templates.
4976
4977         PR c++/6395
4978         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
4979         stuff for comdats.
4980
4981 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
4982
4983         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
4984         node with attributes.
4985
4986 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
4987
4988         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
4989         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
4990
4991 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
4992
4993         PR c++/6256:
4994         * pt.c (tsubst_friend_class): Handle templates with explicit
4995         nested names.
4996
4997         PR c++/6331:
4998         * typeck.c (merge_types): Remember the cv-qualification of pointer
4999         types when merging them.
5000
5001 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
5002
5003         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
5004         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
5005         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
5006         cxx_mark_function_context): New.
5007         * decl.c (push_cp_function_context, pop_cp_function_context,
5008         mark_cp_function_context): Rename for consistency.
5009         (cxx_init_decl_processing): Don't set old hooks.
5010
5011 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
5012
5013         * call.c (convert_type_from_ellipsis): Rename, update.
5014         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
5015         * cp-tree.h (convert_type_from_ellipsis): Rename.
5016         * decl.c (cxx_init_decl_processing): Don't set hook.
5017
5018 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
5019
5020         * call.c (build_new_method_call): Update.
5021         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
5022         * cp-tree.h (cxx_incomplete_type_error): New.
5023         * decl.c (grokdeclarator, grokparms): Update.
5024         * decl2.c (check_classfn): Update.
5025         * pt.c (tsubst): Update.
5026         * typeck.c (complete_type_or_else, expr_sizeof,
5027         decay_conversion): Update.
5028         * typeck2.c (incomplete_type_error): Rename.
5029         (add_exception_specifier): Update.
5030
5031 2002-04-18  Jason Merrill  <jason@redhat.com>
5032
5033         PR c++/5658
5034         * search.c (setup_class_bindings): A class template qualifies as a
5035         type binding.
5036
5037 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
5038
5039         PR c++/6316
5040         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
5041         before expanding.
5042
5043 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
5044
5045         * init.c (begin_init_stmts): Remove commented out code.
5046         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
5047         * semantics.c (begin_gobal_stmt_expr): Adjust call to
5048         expand_start_stmt_expr.
5049
5050 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
5051
5052         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
5053         dso_handle itself, to __cxa_atexit.
5054
5055 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5056
5057         * error.c (cxx_print_error_function): Adjust call to macros.
5058
5059 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
5060
5061         * class.c (layout_virtual_bases): Do all dsize computation on trees.
5062
5063 2002-04-14  Jason Merrill  <jason@redhat.com>
5064
5065         * typeck.c (get_member_function_from_ptrfunc): Don't do
5066         gratuitious division and multiplication on
5067         ptrmemfunc_vbit_in_delta targets.
5068
5069 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5070
5071         PR c++/5373.
5072         * semantics.c (finish_expr_stmt): Remember the type of the
5073         expression before any conversions are performed.
5074
5075 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5076
5077         PR c++/5189.
5078         * call.c (add_template_candidate_real): Do not treat member
5079         templates as copy constructors.
5080
5081 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5082
5083         * decl.c (duplicate_decls): Do not copy the RTL for a variable
5084         declaration if the old variable had an incomplete type and the new
5085         variable does not.
5086         (complete_vars): Do not call layout_decl for completed variables.
5087
5088 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
5089
5090         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
5091         with an explicit one.
5092         (follow_tag_typedef): New.
5093         (lookup_tag): Use it to extract the tag of an explicit typedef.
5094         (xref_tag): Likewise.
5095
5096 2002-04-11  Andrew Haley  <aph@redhat.com>
5097
5098         * typeck.c (type_after_usual_arithmetic_conversions):
5099         If two types have the same variant, return immediately.
5100         When two floating-point operands are the same precision:
5101           convert to float if one of the operands is float;
5102           if neither operand is one of the standard types, return the type
5103           of the first operand.
5104
5105 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
5106
5107         PR c++/5507
5108         * decl.c (make_typename_type): Remove implicit typenameness.
5109
5110 2002-04-09  Jason Merrill  <jason@redhat.com>
5111
5112         PR optimization/6189
5113         * semantics.c (genrtl_start_function): Don't free
5114         DECL_SAVED_FUNCTION_DATA for inline functions.
5115
5116         * init.c (build_member_call): For now, don't convert to
5117         intermediate base if it would cause an error.
5118
5119 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
5120
5121         * parse.y (namespace_qualifier, maybe_identifier,
5122         begin_explicit_instantiation, end_explicit_instantiation,
5123         apparent_template_type, .finish_template_type,
5124         do_id, maybe_init, defarg_again, component_decl_1):
5125         Add ending ';', in accordance with POSIX.
5126
5127 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
5128
5129         PR c++/5571
5130         * class.c (layout_class_type): Remember incomplete static
5131         variables.
5132         (finish_struct_1): Call complete_vars, not
5133         hack_incomplete_structures.
5134         * cp-tree.h (hack_incomplete_structures): Rename to ...
5135         (complete_vars): ... this.
5136         (struct saved_scope): Remove incomplete.
5137         (namespace_scope_incomplete): Remove.
5138         * decl.c (struct binding_level): Remove incomplete.
5139         (incomplete_vars): New variable.
5140         (mark_binding_level): Don't mark incomplete.
5141         (print_binding_level): Don't print it.
5142         (mark_saved_scope): Don't mark incomplete.
5143         (pushdecl): Use maybe_register_incopmlete_var.
5144         (cxx_init_decl_processing): Register incomplete_vars for GC.
5145         (start_decl_1): Clarify error message.
5146         (hack_incomplete_vars): Remove.
5147         (maybe_register_incomplete_var): New function.
5148         (complete_vars): Likewise.
5149
5150 2002-04-06  Jason Merrill  <jason@redhat.com>
5151
5152         PR c++/4934
5153         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
5154         set before checking it.
5155
5156         PR c++/525
5157         * init.c (build_member_call): Use build_scoped_ref.
5158         (resolve_offset_ref): Likewise.
5159         * call.c (build_scoped_method_call): Likewise.
5160         * tree.c (maybe_dummy_object): Kludge around current_class_type being
5161         wrong.
5162         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
5163         * cp-tree.h: Adjust.
5164
5165         * init.c (push_base_cleanups): Just use build_scoped_method_call.
5166
5167         PR c++/6179
5168         * method.c (implicitly_declare_fn): Pass unqualified type to
5169         synthesize_exception_spec.
5170
5171 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
5172
5173         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
5174         * cvt.c: Update comment.
5175         * init.c (expand_cleanup_for_base): Update.
5176         * semantics.c (finish_parenthesized_expr): Update.
5177         * typeck.c (cp_truthvalue_conversion): Update.
5178
5179 2002-04-04  Jason Merrill  <jason@redhat.com>
5180
5181         * semantics.c (finish_eh_cleanup): New fn.
5182         * cp-tree.h: Add prototype.
5183         * init.c (perform_member_init, expand_cleanup_for_base): Use
5184         finish_eh_cleanup.
5185         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
5186         * cp-tree.h: Remove references.
5187         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
5188         * dump.c (cp_dump_tree): Likewise.
5189         * pt.c (tsubst_expr): Likewise.
5190         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
5191         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
5192         * tree.c (cp_statement_code_p): Likewise.
5193
5194         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
5195
5196         PR c++/5636
5197         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
5198         cleanup for nrv.
5199
5200         PR c++/5104
5201         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
5202         specifiers.
5203         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
5204
5205 2002-04-03  Richard Henderson  <rth@redhat.com>
5206
5207         * cp-lang.c (cxx_warn_unused_global_decl): New.
5208         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
5209
5210 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
5211
5212         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
5213         * tree.c (init_tree): Don't set hook.
5214
5215 2002-04-03  Roger Sayle  <roger@eyesopen.com>
5216
5217         PR c++/5998:
5218         * decl.c (duplicate_decls): Don't mess with assembler names when
5219         redeclaring builtin functions as static.
5220
5221 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5222
5223         * call.c (build_addr_func): Update.
5224         * class.c (resolve_address_of_overloaded_function): Update.
5225         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
5226         * cp-tree.h (cxx_mark_addressable): New.
5227         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
5228         * decl2.c (build_cleanup): Update.
5229         * except.c (build_throw): Update.
5230         * init.c (resolve_offset_ref): Update.
5231         * pt.c (convert_nontype_argument): Update.
5232         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
5233         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
5234         unary_complex_lvalue): Update.
5235         (mark_addressable): Rename.
5236
5237 2002-04-01  Roger Sayle  <roger@eyesopen.com>
5238
5239         PR c++/5998:
5240         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
5241         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
5242         but follow the SET_DECL_RTL idiom used elsewhere in the function.
5243
5244 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5245
5246         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
5247         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
5248         * decl.c (grokdeclarator): Update.
5249         * mangle.c (write_integer_cst): Update.
5250         * typeck.c (build_binary_op): Update.
5251
5252 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
5253
5254         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
5255         * lex.c (cxx_init): Don't set hook.
5256
5257 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
5258
5259         * Make-lang.in (error.o): Update.
5260         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
5261         * cp-tree.h (struct diagnostic_context): Predeclare.
5262         (cxx_print_error_function): New.
5263         * error.c: Include langhooks-def.h.
5264         (lang_print_error_function): Rename.  Update.
5265         (init_error): Don't set hook.
5266
5267 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
5268
5269         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
5270         Redefine.
5271         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
5272         * decl.c (finish_enum): Similarly.
5273         * error.c (dump_type): Similarly.
5274         * lex.c (cxx_init): Similarly.
5275         * mangle.c (write_builtin_type): Similarly.
5276         * typeck.c (comptypes): Similarly.
5277
5278 2002-03-28  Roger Sayle  <roger@eyesopen.com>
5279
5280         PR c++/5998:
5281         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
5282         in the g++ front-end.
5283         (duplicate_decl): Allow redefinition of anticipated built-ins.
5284         Fix inlining problem by over-writing the old DECL_RTL.
5285         (lookup_namespace_name): Fail to find an identifier in the
5286         specified namespace if its still anticipated.
5287         (builtin_function_1): New function split out from builtin_function
5288         to create a builtin in the current namespace with given context.
5289         (builtin_function): Call builtin_function_1 to define the
5290         appropriate builtins in both the std and global namespaces.
5291         (select_decl): Don't test for anticipated decls here.
5292         (unqualified_namespace_lookup): Instead ignore them whilst
5293         searching through scopes and namespaces.
5294         * decl2.c (do_nonmember_using_decl): If a using declaration
5295         specifies an anticipated built-in function, mark it as no longer
5296         anticipated in that scope.
5297         (ambiguous_decl):  Avoid resolving to an anticipated decl.
5298         * lex.c (do_scoped_id): Fail to find an identifier in the global
5299         namespace if its still anticipated.
5300
5301 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
5302
5303         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
5304         * cp-tree.h (cp_make_lang_type): Rename.
5305         * lex.c (cp_make_lang_type): Rename.
5306         (make_aggr_type): Update.
5307         * tree.c (init_tree): Don't set make_lang_type_fn.
5308
5309 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
5310
5311         PR c++/6073
5312         * class.c (finish_struct_1): Update static field's DECL_MODE even
5313         if its type is a variant of t.
5314
5315 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
5316
5317         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
5318         * cp-tree.h (cxx_insert_default_attributes): New.
5319         * decl.c (insert_default_attributes): Rename.
5320
5321 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
5322
5323         PR c++/4884
5324         * call.c (build_op_delete_call): Allow for the fact the placement
5325         may be a COMPOUND_EXPR.
5326
5327 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
5328
5329         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
5330         * cp-tree.h (init_cplus_expand): Remove.
5331         (cxx_expand_expr): New.
5332         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
5333         fix prototype.
5334         (init_cplus_expand): Remove.
5335         * lex.c (cxx_init): Don't call init_cplus_expand.
5336
5337 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
5338
5339         PR c++/4884.
5340         * init.c (build_new_1): Allow for the fact the result of
5341         build_function_call may be a COMPOUND_EXPR.
5342
5343 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
5344
5345         PR c++/5682
5346         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
5347         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
5348         (dfs_skip_nonprimary_vbases_markedp): Remove.
5349         * search.c (get_shared_vbase_if_not_primary): Remove.
5350         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
5351         (dfs_skip_nonprimary_vbases_markedp): Remove.
5352         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
5353         (dfs_marked_real_bases_queue_p): Likewise.
5354
5355 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
5356
5357         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
5358         * cp-tree.h (cxx_mark_tree): New.
5359         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
5360
5361 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5362
5363         * cp-tree.h (cxx_maybe_build_cleanup): New.
5364         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
5365         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
5366         * tree.c (build_target_expr): Update.
5367         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
5368
5369 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
5370
5371         * decl2.c (cxx_decode_option): Handle -E.
5372         * lang-specs.h (default_compilers): Preprocess with cc1plus.
5373         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
5374
5375 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
5376
5377         PR c++/6037
5378         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
5379
5380 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5381
5382         * error.c (dump_type): Be careful about implicit typenames.
5383
5384 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5385
5386         PR C++/3656
5387         * semantics.c (finish_base_specifier): Handle erronous base
5388         classes.
5389
5390 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
5391
5392         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
5393         REAL_IS_NOT_DOUBLE.
5394
5395 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
5396
5397         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
5398         an index into the vtable_entry array regardless of
5399         TARGET_PTRMEMFUNC_VBIT_LOCATION.
5400
5401 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
5402
5403         * tree.c (cp_cannot_inline_tree_fn): Same.
5404
5405 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
5406
5407         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
5408         insert_block, getdecls, global_bindings_p): New.
5409
5410 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
5411
5412         PR c++/4361
5413         * mangle.c (struct globals) Add internal_mangling_p member.
5414         (write_template_param): Do internal mangling, if needed.
5415         (mangle_conv_op_name_for_type): Request internal mangling.
5416
5417 2002-03-20  Jason Merrill  <jason@redhat.com>
5418
5419         PR c++/2136
5420         * init.c (build_delete): Check access for a member op delete here.
5421         * decl2.c (delete_sanity): Not here.
5422
5423 2002-03-19  Jason Merrill  <jason@redhat.com>
5424
5425         PR c++/5118
5426         * class.c (get_vfield_name): Use the constructor_name.
5427
5428 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
5429
5430         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
5431         * cp-tree.h (lang_printable_name): Rename.
5432         * error.c (lang_decl_name): Use new hook.
5433         * lex.c (cxx_init): Remove old hook.
5434         * pt.c (tsubst_decl): Use new hook.
5435         * tree.c (lang_printable_name): Rename.
5436
5437 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
5438
5439         PR c++/3882
5440         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
5441         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
5442         only after recording the declaration.
5443
5444 2002-03-18  Jason Merrill  <jason@redhat.com>
5445
5446         PR c++/2039
5447         * init.c (resolve_offset_ref): Hand off to build_component_ref.
5448
5449         PR c++/4222, c++/5995
5450         * call.c (build_over_call): Fix empty class logic.
5451
5452         PR c++/3870
5453         * cp-tree.h (struct saved_scope): Add last_parms field.
5454         * decl.c (maybe_push_to_top_level): Save last_function_parms.
5455         (pop_from_top_level): Restore it.
5456
5457         PR c++/4377
5458         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
5459         NON_LVALUE_EXPRs.
5460
5461         PR c++/4003
5462         * pt.c (tsubst_friend_function): Use decl_namespace_context.
5463
5464         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
5465         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
5466         type with a nontrivial destructor.
5467
5468 2002-03-17  Jason Merrill  <jason@redhat.com>
5469
5470         PR c++/4460
5471         * class.c (build_base_path): Virtual base layout is fixed in
5472         in-charge [cd]tors.
5473
5474 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
5475
5476         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
5477         * parse.y (yyparse): Remove macro.
5478
5479 2002-03-17  Jason Merrill  <jason@redhat.com>
5480
5481         PR c++/5757
5482         * init.c (build_new_1): Pass the right pointer to op delete.
5483
5484 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
5485
5486         PR c++/4361
5487         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
5488         conversion operators go.
5489         (struct lang_decl_flags): Add template_conv_p and unused
5490         bitfields.
5491         (DECL_TEMPLATE_CONV_FN_P): New macro.
5492         * call.c (build_user_type_conversion_1): Don't check second type
5493         conversion of overload set first.
5494         * class.c (add_method): Make sure templated conversion operators
5495         all end up on slot 2.
5496         * lex.c (do_identifier): A conversion operator token might be
5497         satisfied by a templated conversion operator.
5498         * pt.c (check_explicit_specialization): Use
5499         CLASSTYPE_FIRST_CONVERSION_SLOT.
5500         (template_parm_this_level_p): New function.
5501         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
5502         * search.c (lookup_fnfields_1): Template conversions will be on
5503         the first slot.
5504         * typeck.c (build_component_ref): Preserve the type of an
5505         conversion operator name on the overload type.
5506         (build_x_function_call): Retrieve the conversion operator name.
5507
5508 2002-03-15  Richard Henderson  <rth@redhat.com>
5509
5510         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
5511
5512 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
5513
5514         * cp-tree.h (CLEANUP_DECL): Remove.
5515         (CLEANUP_EXPR): Likewise.
5516         * decl.c (destroy_local_var): Simplify.
5517         (maybe_build_cleanup): Tidy.
5518         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
5519         * semantics.c (cp_expand_stmt): Likewise.
5520         * cp/tree.c (cp_statement_code_p): Likewise.
5521
5522 2002-03-15  Jason Merrill  <jason@redhat.com>
5523
5524         PR c++/5857
5525         * decl.c (duplicate_decls): Use merge_types instead of common_type.
5526         * typeck.c (common_type): Just hand off to
5527         type_after_usual_arithmetic_conversions and
5528         composite_pointer_type.
5529         (merge_types): New fn.
5530         (commonparms): Use it instead of common_type.
5531         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
5532         (composite_pointer_type): Also handle attributes.
5533         * cp-tree.h: Declare merge_types.
5534
5535         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
5536         variables.
5537         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
5538
5539 2002-03-14  Richard Henderson  <rth@redhat.com>
5540
5541         * decl.c: Include c-pragma.h.
5542         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
5543         * Make-lang.in: Update dependencies.
5544
5545 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
5546
5547         PR c++/5908
5548         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
5549         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
5550
5551 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
5552
5553         * mangle.c (write_builtin_type): Handle 128-bit integers even if
5554         they are not a standard integer type.
5555
5556 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
5557
5558         * cp-tree.h (init_init_processing): Remove declaration.
5559         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
5560         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
5561
5562 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5563
5564         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
5565         Define.
5566         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
5567         tree_code_length.
5568         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
5569         cplus_tree_code_name): Delete.
5570         (cxx_init): Don't call add_c_tree_codes, instead set
5571         lang_unsafe_for_reeval.  Don't try to copy into the various
5572         tree_code arrays.
5573
5574 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
5575
5576         PR c++/5659
5577         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
5578         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
5579         definitions.
5580
5581 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
5582
5583         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
5584         DR209 is now not a defect.
5585         * cp-tree.h (skip_type_access_control): Remove.
5586         * decl.c (grokdeclarator): Do type access control for friend
5587         declarations.
5588         * semantics.c (decl_type_access_control): Don't reset
5589         current_type_lookups.
5590         (save_type_access_control): Always save the lookups.
5591         (skip_type_access_control): Remove.
5592         (finish_class_definition): Don't change type_lookups.
5593
5594 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
5595
5596         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
5597         It is incorrect.
5598         * typeck.c (build_static_cast): Compare non-qualified types
5599         with pointer to member conversions.
5600
5601 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
5602             Daniel Berlin  <dan@dberlin.org>
5603
5604         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
5605         (cxx_get_alias_set): Use it.
5606
5607 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5608
5609         * cp-tree.h (stabilize_expr): Prototype.
5610
5611 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5612
5613         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
5614         conditional return void.
5615
5616 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
5617
5618         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
5619         * cp-tree.h (cxx_unsave): New.
5620         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
5621         (init_tree): Update.
5622
5623 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5624
5625         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
5626         explicit sizeof/sizeof.
5627         * decl2.c (cxx_decode_option): Likewise.
5628         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
5629
5630 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
5631
5632         PR c++/775
5633         * decl.c (lookup_tag): Only reject enum/class mismatch, not
5634         class/union mismatch.
5635         * parse.y (check_class_key): New function.
5636         (structsp): Call it.
5637
5638 2002-03-01  Michael Matz  <matz@suse.de>
5639
5640         * typeck.c (cp_pointer_int_sum): Complete inner type which is
5641         used later by size_in_bytes().
5642
5643 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
5644
5645         * cp-tree.h:  Require __GNUC__ to be #defined.
5646         (build_init):  Add missing prototype.
5647
5648 2002-03-01  Jason Merrill  <jason@redhat.com>
5649
5650         * except.c: Don't include decl.h or obstack.h.  Do include
5651         tree-inline.h.
5652         (build_throw): Destroy temporaries from the thrown
5653         expression before calling __cxa_throw.  Construct a thrown
5654         temporary directly into the exception object.
5655         (stabilize_throw_expr): New function.
5656         (wrap_cleanups_r): New function.
5657         * tree.c (stabilize_expr): New function.
5658         * init.c (build_init): New function.
5659         * Make-lang.in (cp/except.o): Adjust .h deps.
5660
5661 2002-02-28  Jason Merrill  <jason@redhat.com>
5662
5663         * search.c (lookup_base_r): Don't clear is_non_public just because
5664         we found a friendly scope.
5665
5666         * decl.c (finish_function): Only warn about missing return
5667         statement with -Wreturn-type.
5668
5669 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
5670
5671         * class.c (build_clone): Update.
5672         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
5673         * cp-tree.h (cxx_dup_lang_specific_decl): New.
5674         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
5675         (copy_decl): Update.
5676         * method.c (make_thunk): Update.
5677
5678 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
5679
5680         * decl2.c: Delete traditional-mode-related code copied from
5681         the C front end but not used, or used only to permit the
5682         compiler to link.
5683
5684 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
5685
5686         PR c++/4093
5687         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
5688         to void.
5689
5690 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
5691
5692         PR other/5746
5693         * semantics.c (finish_switch_cond): Don't call get_unwidened
5694         if error_mark_node.
5695
5696 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
5697
5698         PR c++/2645, DR 295
5699         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
5700         tf_keep_type_decl.
5701         (make_typename_type): Use tsubst_flags_t.
5702         * decl.c (make_typename_type): Adjust. Return non-artificial
5703         TYPE_DECLs, if required.
5704         (grokdeclarator): Simplify CVR qualification handling. Allow bad
5705         qualifiers on typedef types.
5706         * decl2.c (handle_class_head): Adjust make_typename_type call.
5707         * parse.y (nested_name_specifier): Likewise.
5708         (typename_sub0): Likewise.
5709         (typename_sub1): Likewise.
5710         * pt.c (convert_template_argument): Adjust make_typename_type
5711         return value.
5712         (tsubst): Adjust cp_build_qualified_type_real calls.
5713         (check_cv_quals_for_unify): Cope with allowing bad qualifications
5714         on template type parms.
5715         (instantiate_decl): Recheck substitutions to give warnings on bad
5716         qualifications.
5717         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
5718
5719 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
5720
5721         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
5722
5723         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
5724         unless DECL_ALWAYS_INLINE.
5725
5726 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
5727
5728         * typeck.c (cp_pointer_int_sum): Renamed from
5729         pointer_int_sum, call pointer_int_sum.
5730
5731 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
5732
5733         * decl.c (duplicate_decls): Return 0 if issued error about
5734         redeclaration.
5735
5736 2002-02-19  Jason Merrill  <jason@redhat.com>
5737
5738         ABI change: Mangle `void (A::*)() const' as
5739         M1AKFvvE, not MK1AFvvE.
5740         * mangle.c (write_function_type): Write cv-quals for member
5741         function type here.
5742         (write_pointer_to_member_type): Not here.
5743
5744 2002-02-18  Jason Merrill  <jason@redhat.com>
5745
5746         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
5747         (do_decl_instantiation): Likewise.
5748
5749 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5750
5751         PR c++/5685
5752         * decl.c (duplicate_decls): Make warning unconditional
5753         if duplicate default argument declarations are present.
5754
5755 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
5756
5757         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
5758         shortening.
5759
5760 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
5761
5762         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
5763         remove incorrect comment. Move #if 0'd code to common path. Use
5764         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
5765
5766 2002-02-13  Jason Merrill  <jason@redhat.com>
5767
5768         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
5769         (finish_function): Don't warn if current_function_returns_null.
5770
5771         * typeck2.c (digest_init): Do handle values of vector type.
5772
5773         * typeck2.c (digest_init, process_init_constructor): Treat vectors
5774         like arrays.
5775
5776 2002-02-11  Jason Merrill  <jason@redhat.com>
5777
5778         * parse.y (reserved_declspecs): Don't handle attributes.
5779         (reserved_typespecquals): Handle them here.
5780         * Make-lang.in (parse.c): Adjust expected conflicts.
5781
5782 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
5783
5784         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
5785         instead of compstmt.
5786         (compstmt_or_stmtexpr): Renamed from compstmt.
5787         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
5788
5789 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
5790
5791         Rename instantiate_type_flags to tsubst_flags_t & expand use.
5792         * cp-tree.h (instantiate_type_flags): Rename to ...
5793         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
5794         add tf_warning flag.
5795         (instantiate_type): Adjust prototype.
5796         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
5797         do_type_instantiation, cp_build_qualified_type_real): Likewise.
5798         cp_build_qualified_type: Adjust.
5799         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
5800         tf_*.
5801         * call.c (standard_conversion): Rename itf_* to tf_*.
5802         (reference_binding): Likewise.
5803         (convert_like_real): Likewise.
5804         * cvt.c (cp_convert_to_pointer): Likewise.
5805         (convert_to_reference): Likewise.
5806         * decl.c (lookup_namespace_name): Use tf_* flags.
5807         (make_typename_type): Likewise.
5808         (grokdeclarator): Likewise.
5809         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
5810         (coerce_template_template_parms, convert_template_argument,
5811         coerce_template_parms, maybe_get_template_decl_from_type_decl,
5812         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
5813         instantiate_class_template, tsubst_template_arg_vector,
5814         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
5815         tsubst_decl, tsubst_arg_types, tsubst_function_type,
5816         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
5817         instantiate_template, fn_type_unification,
5818         resolve_overloaded_unification, verify_class_unification,
5819         unify, get_bindings_real, do_type_instantiation,
5820         regenerate_decl_from_template, instantiate_decl,
5821         tsubst_initializer_list, tsubst_enum,
5822         get_mostly_instantiated_function_type,
5823         invalid_nontype_parm_type_p): Likewise.
5824         * tree.c (cp_build_qualified_type_real): Likewise.
5825         * typeck.c (build_binary_op): Rename itf_* to tf_*.
5826         (build_ptrmemfunc): Likewise.
5827         (convert_for_assignment): Likewise.
5828
5829 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
5830
5831         PR c++/109
5832         * decl.c (grokdeclarator): Allow friend declarations from
5833         dependent types.
5834         * decl2.c (handle_class_head): Don't push into template parm contexts.
5835         * pt.c (push_template_decl_real): Template parm contexts are never
5836         being defined.
5837
5838 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
5839
5840         * class.c: Include target.h.
5841         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
5842         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
5843         bit-field layout.
5844         * Make-lang.in: Adjust deps.
5845
5846 2002-02-05  Jason Merrill  <jason@redhat.com>
5847
5848         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
5849
5850 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
5851
5852         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
5853         (finish_switch_cond): Set SWITCH_TYPE.
5854
5855 2002-02-04  Richard Henderson  <rth@redhat.com>
5856
5857         * method.c (use_thunk): Always initialize the block tree.  Reindent.
5858         * semantics.c (expand_body): Emit thunks after function, not before.
5859
5860 2002-02-04  Jason Merrill  <jason@redhat.com>
5861
5862         * decl.c (start_function): Call cplus_decl_attributes immediately
5863         after grokdeclarator.
5864
5865         * decl.c (start_function): Combine DECL_RESULT handling code.
5866
5867 2002-02-03  Jason Merrill  <jason@redhat.com>
5868
5869         * xref.c: Remove.
5870         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
5871         (cp/xref.o): Remove dependencies.
5872         * class.c (finish_struct_1, check_methods): Don't call xref fns.
5873         (finish_struct_1): Likewise.
5874         * friend.c (make_friend_class): Likewise.
5875         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
5876         * spew.c (read_process_identifier): Likewise.
5877
5878 2002-02-01  Jason Merrill  <jason@redhat.com>
5879
5880         PR c++/4872
5881         * decl.c (finish_function): Warn about a non-void function with
5882         no return statement and no abnormal exit.
5883         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
5884         (current_function_returns_abnormally): New macro.
5885         * call.c (build_call): Set it.
5886
5887         * typeck.c (build_component_ref): Always complain about offsetof
5888         constructs on non-PODs.  Only make it an error for members of
5889         virtual bases.
5890
5891         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
5892         (dump_function_decl): Always dump parms.
5893
5894         * decl2.c (finish_static_data_member_decl): Complain about a local
5895         class with a static data member.
5896
5897         PR c++/4286
5898         * search.c (lookup_field_1): Don't xref a static data member
5899         just because we looked it up.
5900
5901 2002-01-31  Jason Merrill  <jason@redhat.com>
5902
5903         * Make-lang.in (parse.c): Handle .output file.
5904
5905         PR c++/3395
5906         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
5907         not TREE_TYPE.
5908         * semantics.c (finish_class_definition): Adjust.
5909
5910         Allow attributes in parms and casts.
5911         * parse.y (named_parm): Don't strip attrs.
5912         (declmods): Remove 'attributes' production.
5913         (nonempty_cv_qualifiers): Accept attributes.
5914         (ATTRIBUTE): Give precedence.
5915         * decl.c (groktypename): Handle attributes.
5916         (grokparms): Likewise.
5917
5918 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
5919
5920         * decl2.c (cxx_decode_option): Pass 0 as last argument to
5921         cpp_handle_option.
5922         * lang-specs.h: Use cpp_unique_options instead of cpp_options
5923         when used together with cc1_options.
5924
5925 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
5926
5927         PR c++/5132
5928         * typeck2.c (digest_init): Make sure non-array core type is
5929         instantiated.
5930         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
5931         constructor, rather than build a new one.
5932         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
5933         PURPOSE of constructor elts.
5934
5935 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
5936
5937         * Make-lang.in (parse.c): Adjust expected number of
5938         shift-reduce conflicts.
5939         (decl.o): Depend on diagnostic.h.
5940         * decl.c: Include diagnostic.h.
5941         (grokdeclarator): Check for null pointer.
5942         (finish_function): Don't abort when
5943         current_binding_level->parm_flag != 1, if errors have
5944         occurred; throw away the statement tree and extra binding
5945         levels, and continue.
5946         * lex.c (note_list_got_semicolon): Check for null pointer.
5947         * method.c (hack_identifier): Just return error_mark_node if
5948         value is error_mark_node.
5949         * parse.y (primary: TYPEID(type_id)): No need to use
5950         TYPE_MAIN_VARIANT here.
5951         (handler_seq): Accept an empty list of catch clauses and
5952         generate a fake handler block to avoid later crashes.
5953         (ansi_raise_identifier): Accept the error token too.
5954         * semantics.c (begin_class_definition,
5955         finish_class_definition): Check for error_mark_node.
5956
5957 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
5958
5959         * typeck2.c (friendly_abort): Delete definition.
5960         * cp-tree.h (friendly_abort): Don't prototype.
5961         (my_friendly_assert): Use fancy_abort.
5962
5963 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5964
5965         * cp-tree.h (my_friendly_abort): Remove.
5966
5967 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
5968
5969         * spew.c (pending_inlines, pending_inlines_tail,
5970         processing_these_inlines): Make static.
5971         (mark_pending_inlines): Remove static.
5972         (begin_parsing_inclass_inline): If in function, save pi
5973         for GC to cp_function_chain->unparsed_inlines instead.
5974         (process_next_inline): Likewise.
5975         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
5976         (mark_pending_inlines): Add prototype.
5977         * decl.c (spew_debug): Remove unused extern.
5978         (mark_lang_function): Call mark_pending_inlines.
5979
5980 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5981
5982         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
5983         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
5984         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
5985         Change my_fancy_abort() to abort().
5986
5987 2002-01-23  Jason Merrill  <jason@redhat.com>
5988
5989         PR c++/5453
5990         * class.c (fixed_type_or_null): Fix thinko.
5991
5992         PR c++/3331
5993         * init.c (resolve_offset_ref): Use build_indirect_ref.
5994
5995         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
5996
5997 2002-01-22  Jason Merrill  <jason@redhat.com>
5998
5999         * parse.y (function_body): Suppress the block for the outermost
6000         curly braces.
6001         * decl.c (pushdecl): Don't try to skip it.
6002         (begin_function_body): Keep the block we create, not the next one.
6003         * init.c (emit_base_init): Don't mess with keep_next_level.
6004
6005         * class.c (build_base_path): Tweak formatting.
6006
6007 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
6008
6009         Fix regression introduced with patch for c++/775
6010         * parse.y (class_head_defn): Check for template specializations
6011         with a different class-key.
6012
6013 2002-01-17  Jason Merrill  <jason@redhat.com>
6014
6015         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
6016         (begin_function_body): Call them and keep_next_level.
6017         * init.c (emit_base_init): Call keep_next_level.
6018         * semantics.c (setup_vtbl_ptr): Lose.
6019         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
6020         (vtbls_set_up_p): Lose.
6021         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
6022         * method.c (do_build_copy_constructor): Likewise.
6023         (synthesize_method): Call finish_mem_initializers.
6024         * parse.y (nodecls): Likewise.
6025
6026         * error.c (dump_type_suffix): Print the exception specs before
6027         recursing.
6028         (dump_function_decl): Here, too.
6029
6030         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
6031
6032 2002-01-10  Ira Ruben   <ira@apple.com>
6033
6034         PR c++/907
6035         * decl.c (start_method): Handle attrlist.
6036
6037 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
6038
6039         * decl2.c (max_tinst_depth): Increase default limit to 500.
6040
6041 2002-01-10  Graham Stott  <grahams@redhat.com>
6042
6043         * spew.c (YYCHAR): Uppercase macro parameter and add
6044         parenthesis.
6045         (YYCODE): Likewise.
6046         (NAME): Uppercase macro parameter.
6047
6048 2002-01-09  Graham Stott  <grahams@redhat.com>
6049
6050         * decl.h (grokdeclarator): Wrap long line.
6051
6052         * semantics.c (FINISH_COND): Uppercase macro paramaters and
6053         add parenthesis.
6054
6055 2002-01-08  Graham Stott  <grahams@redhat.com>
6056
6057         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
6058         (PALLOC): Uppercase macro parameter and whitespace.
6059         (SALLOC): Uppercase macro parameter.
6060         (SFREE): Uppercase macros parameter, add parenthese and
6061         whitespace.
6062         (STREQL): Uppercase macro parameter and whitespace.
6063         (STRNEQ): Likewise.
6064         (STRLSS): Likewise.
6065         (STRLEQ): Likewise.
6066         (STRGTR): Likewise.
6067         (STRGEQ): Likewise.
6068
6069         * call.c (convert_like): Add parenthesis and wrap.
6070         (convert_like_with_context): Likewise.
6071         (ICS_RANK): Whitespace.
6072         (NEED_TEMPORARY_P): Remove parenthesis.
6073
6074         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
6075         whitespace.
6076         (VTT_MARKED_BINFO_P): Likewise.
6077
6078         * decl.c (BINDING_LEVEL): Add parenthesis.
6079         (DEF_OPERATOR): Likewise.
6080
6081         * mangle.c (MANGLE_TRACE): Add parenthesis.
6082         (MANGLE_TRACE_TREE): Likewise.
6083         (write_signed_number): Likewise.
6084         (write_unsigned_number): Likewise.
6085
6086         * pt.c (ccat): Uppercase macro parameter.
6087         (cat): Likewise
6088
6089         * search.c (SET_BINFO_ACCESS): Add parenthesis.
6090
6091 2002-01-07  Jason Merrill  <jason@redhat.com>
6092
6093         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
6094         to pedwarn.
6095
6096         PR c++/3536
6097         * method.c (make_thunk): If !flag_weak, give the thunk the
6098         function's linkage.
6099         (use_thunk): Here, too.
6100
6101 2002-01-07  Graham Stott  <grahams@redhat.com>
6102
6103         * error.c: Update copyright date.
6104         (print_scope_operator): Add parenthesis.
6105         (print_left_paren): Likewise.
6106         (print_right_paren): Likewise.
6107         (print_left_bracket): Likewise.
6108         (print_right_bracket): Likewise.
6109         (print_template_argument_list_start): Likewise.
6110         (print_template_argument_list_end): Likewise.
6111         (print_non_consecutive_character): Likewise.
6112         (print_tree_identifier): Likewise.
6113         (print_identifier): Likewise.
6114         (NEXT_CODE): Uppercase macro parameter.
6115         (ident_fndecl): Delete unused.
6116         (GLOBAL_THING): Likewise.
6117
6118 2002-01-06  Graham Stott  <grahams@redhat.com>
6119
6120         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
6121         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
6122         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
6123         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
6124         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
6125         (C_IS_RESERVED_WORD): Uppercase macro parameter.
6126         (C_RID_YYCODE) Likewise.
6127         (ptrmem_cst): Use rtx.
6128         (LOCAL_BINDING_P): Add whitespace.
6129         (INHERITED_VALUE_BINDING_P): Likewise.
6130         (BINDING_SCOPE): Wrap long line.
6131         (BINDING_HAS_LEVEL_P): Remove parenthesis.
6132         (BINDING_VALUE): Wrap long line.
6133         (BINDING_TYPE): Whitespace.
6134         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
6135         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
6136         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
6137         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
6138         (same_type_p): Uppercase macro parameters.
6139         (same_type_ignoring_top_level_qualifiers_p): Likewise.
6140         (OVL_FUNCTION): Wrap long line.
6141         (OVL_CHAIN): Whitespace.
6142         (OVL_CURRENT): Add parenthesis and whitespace.
6143         (OVL_NEXT): Whitespace.
6144         (OVL_USED): Likewise.
6145         (IDENTIFIER_TYPE_VALUE): Likewise.
6146         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
6147         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
6148         (LANG_ID_FIELD): Whitespace.
6149         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
6150         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
6151         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
6152         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
6153         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
6154         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
6155         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
6156         (IDENTIFIER_VIRTUAL_P): Likewise.
6157         (IDENTIFIER_OPNAME_P): Likewise.
6158         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
6159         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
6160         (C_SET_EXP_ORIGINAL_CODE): Likewise.
6161         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
6162         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
6163         (IS_AGGR_TYPE): Uppercase macro parameter.
6164         (CLASS_TYPE_P): Likewise.
6165         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
6166         (IS_AGGR_TYPE_2): Whitespace.
6167         (TAGGED_TYPE_P): Uppercase macro parameter.
6168         (TYPE_BUILT_IN): Whitespace.
6169         (TYPE_FOR_JAVA): Likewise.
6170         (FUNCTION_ARG_CHAIN): Remove parenthesis.
6171         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
6172         (FUNCTION_FIRST_USER_PARAM): Likewise.
6173         (PROMOTES_TO_AGGR_TYPE): Whitespace.
6174         (DERIVED_FROM_P): Add parenthesis and wrap.
6175         (UNIQUELY_DERIVED_FROM_P): Likewise.
6176         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
6177         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
6178         (CLASSTYPE_USE_TEMPLATE): Whitespace.
6179         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
6180         (TYPE_GETS_DELETE): Add parenthesis.
6181         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
6182         (TYPE_HAS_ASSIGN_REF): Likewise,
6183         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
6184         (TYPE_HAS_INIT_REF): Likewise.
6185         (TYPE_HAS_CONST_INIT_REF): Likewise.
6186         (TYPE_BEING_DEFINED): Likewise.
6187         (TYPE_LANG_SPECIFIC): Likewise.
6188         (CLASSTYPE_RTTI): Likewise.
6189         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
6190         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
6191         (TYPE_OVERLOADS_ARROW): Likewise.
6192         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
6193         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
6194         (CLASSTYPE_METHOD_VEC): Likewise.
6195         (CLASSTYPE_MARKED_N): Likewise.
6196         (CLASSTYPE_MARKED): Likewise.
6197         (CLASSTYPE_MARKED2): Likewise.
6198         (CLASSTYPE_MARKED3): Likewise.
6199         (CLASSTYPE_MARKED4): Likewise.
6200         (CLASSTYPE_MARKED5): Likewise.
6201         (CLASSTYPE_MARKED6): Likewise.
6202         (SET_CLASSTYPE_MARKED): Whitespace.
6203         (CLEAR_CLASSTYPE_MARKED): Likewise.
6204         (SET_CLASSTYPE_MARKED2): Likewise.
6205         (CLEAR_CLASSTYPE_MARKED2): Likewise.
6206         (SET_CLASSTYPE_MARKED3): Likewise.
6207         (CLEAR_CLASSTYPE_MARKED3): Likewise.
6208         (SET_CLASSTYPE_MARKED4): Likewise.
6209         (CLEAR_CLASSTYPE_MARKED4): Likewise.
6210         (SET_CLASSTYPE_MARKED5): Likewise.
6211         (CLEAR_CLASSTYPE_MARKED5): Likewise.
6212         (SET_CLASSTYPE_MARKED6): Likewise.
6213         (CLEAR_CLASSTYPE_MARKED6): Likewise.
6214         (CLASSTYPE_TAGS): Likewise.
6215         (CLASSTYPE_VSIZE): Likewise.
6216         (CLASSTYPE_VBASECLASSES): Likewise.
6217         (CANONICAL_BINFO): Add parenthesis.
6218         (CLASSTYPE_SIZE(NODE): Likewise.
6219         (CLASSTYPE_SIZE_UNIT): Likewise.
6220         (CLASSTYPE_ALIGN(NODE): Likewise.
6221         (CLASSTYPE_USER_ALIGN): Likewise.
6222         (TYPE_JAVA_INTERFACE): Likewise.
6223         (CLASSTYPE_PURE_VIRTUALS): Likewise.
6224         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
6225         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
6226         (CLASSTYPE_HAS_MUTABLE): Likewise.
6227         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
6228         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
6229         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
6230         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
6231         (CLASSTYPE_INTERFACE_ONLY): Likewise.
6232         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
6233         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
6234         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
6235         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
6236         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
6237         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
6238         (BINFO_UNSHARED_MARKED): Whitespace.
6239         (BINFO_MARKED): Whitespace and wrap.
6240         (SET_BINFO_MARKED): Likewise.
6241         (CLEAR_BINFO_MARKED): Likewise.
6242         (BINFO_VTABLE_PATH_MARKED): Likewise.
6243         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
6244         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
6245         (BINFO_SUBVTT_INDEX): Remove parenthesis.
6246         (BINFO_VPTR_INDEX): Likewise.
6247         (BINFO_PRIMARY_BASE_OF): Likewise,
6248         (CLASSTYPE_VFIELDS): Whitespace.
6249         (VF_DERIVED_VALUE): Wrap long line.
6250         (NAMESPACE_LEVEL): Whitespace.
6251         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
6252         (DEFARG_POINTER): Whitespace.
6253         (DECL_NEEDED_P): Remove parenthesis.
6254         (DECL_LANGUAGE): Whitespace.
6255         (SET_DECL_LANGUAGE): Add parenthesis.
6256         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
6257         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
6258         (DECL_IN_AGGR_P): Whitespace.
6259         (DECL_FRIEND_P): Likewise.
6260         (DECL_BEFRIENDING_CLASSES): Likewise.
6261         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
6262         (DECL_NONCONVERTING_P): Whitespace.
6263         (DECL_PURE_VIRTUAL_P): Likewise.
6264         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
6265         (DECL_PENDING_INLINE_INFO): Whitespace.
6266         (DECL_SORTED_FIELDS): Likewise.
6267         (DECL_DEFERRED_FN): Likewise.
6268         (DECL_TEMPLATE_INFO): Likewise.
6269         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
6270         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
6271         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
6272         (TMPL_ARGS_LEVEL): Likewise.
6273         (SET_TMPL_ARGS_LEVEL): Likewise.
6274         (INNERMOST_TEMPLATE_PARMS): Whitespace.
6275         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
6276         (INTEGRAL_CODE_P(CODE): Add parenthesis.
6277         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
6278         (TYPE_HAS_CONSTRUCTOR): Whitespace.
6279         (TREE_HAS_CONSTRUCTOR): Likewise.
6280         (TYPE_HAS_DESTRUCTOR): Likewise.
6281         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
6282         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
6283         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
6284         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
6285         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
6286         (TYPE_PTRMEMFUNC_P): Likewise.
6287         (TYPE_PTRMEMFUNC_FLAG): Likewise.
6288         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
6289         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
6290         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
6291         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
6292         (DECL_ACCESS): Whitespace.
6293         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
6294         (DECL_GLOBAL_DTOR_P): Likewise.
6295         (GLOBAL_INIT_PRIORITY): Likewise.
6296         (DECL_TEMPLATE_PARMS): Likewise.
6297         (DECL_TEMPLATE_RESULT): Likewise.
6298         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
6299         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
6300         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
6301         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
6302         (PRIMARY_TEMPLATE_P): Add parenthesis.
6303         (DECL_USE_TEMPLATE): Whitespace.
6304         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
6305         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
6306         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
6307         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
6308         (CALL_DECLARATOR_PARMS): Remove parenthesis.
6309         (CALL_DECLARATOR_QUALS): Likewise.
6310         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
6311         (TEMP_NAME_P): Wrap.
6312         (VFIELD_NAME_P): Likewise.
6313         (B_SET): Uppercase macro parameters and add parenthesis.
6314         (B_CLR): Likewise.
6315         (B_TST): Likewise.
6316         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
6317         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
6318         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
6319         (same_or_base_type_p): Likewise.
6320         (cp_deprecated): Likewise.
6321
6322 2002-01-05  Richard Henderson  <rth@redhat.com>
6323
6324         * semantics.c (expand_body): Revert last change.
6325
6326 2002-01-04  Jason Merrill  <jason@redhat.com>
6327
6328         PR c++/4122
6329         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
6330         lost primary.
6331
6332         * class.c (build_vtbl_initializer): Check for a lost primary
6333         before calculating the vtable entry to throw away.
6334
6335 2002-01-02  Jason Merrill  <jason@redhat.com>
6336
6337         * semantics.c (expand_body): Call outlining_inline_function when
6338         emitting an inline function out of line.
6339
6340 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6341
6342         PR c++/5116, c++/764 reversion
6343         * call.c (build_new_op): Revert the instantiations. They are
6344         incorrect.
6345
6346 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6347
6348         PR c++/5089
6349         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
6350
6351 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6352
6353         PR c++/3716
6354         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
6355         (tsubst, case POINTER_TYPE): Handle pmfs here.
6356         (tsubst, case OFFSET_TYPE): Check it is not an offset to
6357         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
6358
6359 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6360
6361         PR c++/35
6362         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
6363         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
6364         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
6365         PARM_DECL.
6366         (tsubst_template_parms): Break up loop statements.
6367         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
6368         parm PARM_DECLs don't get promoted.
6369
6370 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6371
6372         PR c++/5123
6373         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
6374         (build_x_function_call): Cope with a COMPONENT_REF containing a
6375         TEMPLATE_ID_EXPR.
6376
6377 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6378
6379         PR c++/5213
6380         * pt.c (convert_template_argument): Be more careful determining
6381         when RECORD_TYPE templates are or are not templates.
6382
6383 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6384
6385         PR c++/775
6386         * cp-tree.h (handle_class_head): Adjust prototype.
6387         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
6388         parameters. Use for all class heads.
6389         * parse.y (named_class_head_sans_basetype, named_class_head,
6390         named_complex_class_head_sans_basetype,
6391         named_class_head_sans_basetype_defn,
6392         unnamed_class_head): Remove.
6393         (class_head, class_head_apparent_template): Recognize class heads
6394         (class_head_decl, class_head_defn): New reductions. Process class
6395         heads.
6396         (structsp): Adjust class definition and class declaration
6397         reductions.
6398         (maybe_base_class_list): Give diagnostic on empty list.
6399
6400 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6401
6402         PR c++/4379
6403         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
6404         single non-static member.
6405         (unary_complex_lvalue): If it cannot be a pointer to member, don't
6406         make it so. Check it is not pointer to reference.
6407
6408 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6409
6410         PR c++/5132
6411         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
6412         are processing a template decl.
6413
6414 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6415
6416         PR c++/5116, c++/764
6417         * call.c (build_new_op): Make sure template class operands are
6418         instantiated. Simplify arglist construction.
6419
6420 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6421
6422         * call.c (build_user_type_conversion_1): Use my_friendly_assert
6423         rather than if ... abort.
6424         * cvt.c (convert_to_reference): Likewise.
6425         * semantics.c (setup_vtbl_ptr): Likewise.
6426         * pt.c (lookup_template_class): Comment typo.
6427
6428 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6429
6430         PR c++/5125
6431         * pt.c (push_template_decl_real): Make sure DECL has
6432         DECL_LANG_SPECIFIC.
6433
6434 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6435
6436         PR c++/335
6437         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
6438         for non-reference fields.
6439         * typeck.c (require_complete_type): Use resolve_offset_ref).
6440
6441 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
6442
6443         PR c++/196
6444         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
6445
6446 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
6447
6448         PR c++/160
6449         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
6450         up. Don't stabilize_references when initializing a reference.
6451
6452 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6453
6454         * decl2.c (lang_f_options): Const-ify.
6455
6456 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
6457
6458         * config-lang.in (diff_excludes): Remove.
6459
6460 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
6461
6462         PR c++/90
6463         * typeck.c (build_function_call_real): Use original function
6464         expression for errors.
6465
6466 2001-12-18  Jason Merrill  <jason@redhat.com>
6467
6468         PR c++/3242
6469         * class.c (add_method): Do compare 'this' quals when trying to match a
6470         used function.  Don't defer to another used function.
6471
6472 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
6473
6474         * pt.c (instantiate_clone): Remove, fold into ...
6475         (instantiate_template): ... here. Simplify by removing mutual
6476         recursion.
6477         * typeck2.c (build_m_component_ref): Don't cv qualify the function
6478         pointed to by a pointer to function.
6479         * class.c (delete_duplicate_fields_1): Typo.
6480
6481 2001-12-18  Jason Merrill  <jason@redhat.com>
6482
6483         C++ ABI change: destroy value arguments in caller.
6484         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
6485         create an extra binding level for the parameters.
6486         * decl.c (store_parm_decls): Don't do parameter cleanups.
6487
6488 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
6489
6490         * call.c (build_new_method_call): Use '%#V'.
6491         * error.c (cv_to_string): Use V parameter to determine padding.
6492
6493 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
6494
6495         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
6496         spellings in messages.
6497
6498 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
6499
6500         * cp-tree.h: Delete #defines for cp_error, cp_warning,
6501         cp_pedwarn, and cp_compiler_error.
6502         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
6503         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
6504         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
6505         typeck2.c: Change calls to the above macros to use their
6506         language-independent equivalents: error, warning, pedwarn, and
6507         internal_error respectively.
6508
6509 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
6510
6511         * decl2.c (finish_file): Remove back_end_hook.
6512
6513 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
6514
6515         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
6516         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
6517         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
6518
6519 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
6520
6521         * lang-options.h: Use American spelling in messages.
6522
6523 2001-12-13  Jason Merrill  <jason@redhat.com>
6524
6525         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
6526
6527         Use cleanups to run base and member destructors.
6528         * init.c (push_base_cleanups): New function, split out from...
6529         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
6530         * decl.c (finish_destructor_body): Move vbase destruction code to
6531         push_base_cleanups.
6532         (begin_function_body, finish_function_body): New fns.
6533         (finish_function): Move [cd]tor handling and call_poplevel to
6534         finish_function_body.
6535         (pushdecl): Skip the new level.
6536         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
6537         (setup_vtbl_ptr): Call push_base_cleanups.
6538         * method.c (synthesize_method): Call {begin,end}_function_body.
6539         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
6540         * cp-tree.h: Declare new fns.
6541         * parse.y (function_body, .begin_function_body): New nonterminals.
6542         (fndef, pending_inline, function_try_block): Use function_body.
6543         (ctor_initializer_opt, function_try_block): No longer has a value.
6544         (base_init): Remove .set_base_init token.
6545         (.set_base_init, compstmt_or_error): Remove.
6546         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
6547
6548         * optimize.c (maybe_clone_body): Fix parameter updating.
6549
6550 2001-12-12  Jason Merrill  <jason@redhat.com>
6551
6552         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
6553         * semantics.c (genrtl_start_function): Don't pass
6554         parms_have_cleanups or push an extra binding level.
6555         (genrtl_finish_function): Lose cleanup_label cruft.
6556
6557         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
6558         (ctor_label): Remove.
6559         * semantics.c (finish_return_stmt): Lose ctor_label support.
6560         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
6561         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
6562         dtor_label.
6563
6564         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
6565         check for [cd]tors.
6566         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
6567
6568         * decl.c (finish_function): Check VMS_TARGET, not VMS.
6569
6570         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
6571         (end_cleanup_fn): And poplevel.
6572
6573         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
6574         if we're in a template.
6575
6576 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
6577
6578         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
6579         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
6580         THIS_NAME_P): Delete.
6581         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
6582         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
6583         with internal naming scheme.
6584         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
6585
6586 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
6587
6588         * decl.c (grokdeclarator): Deprecated implicit typename use.
6589
6590 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
6591
6592         PR g++/51
6593         * parse.y (frob_specs): Indicate it is a language linkage which
6594         contained the extern.
6595         * decl.c (grokdeclarator): Allow extern language linkage with
6596         other specifiers.
6597
6598 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
6599
6600         PR g++/72
6601         * decl.c (add_binding): Don't reject duplicate typedefs involving
6602         template parameters.
6603
6604 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
6605
6606         * parse.y, semantics.c: Similarly.
6607
6608 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
6609
6610         PR g++/87
6611         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
6612         (copy_args_p): Rename to ...
6613         (copy_fn_p): ... here.
6614         (grok_special_member_properties): New function.
6615         (grok_op_properties): Lose VIRTUALP parameter.
6616         (copy_assignment_arg_p): Remove.
6617         * call.c (build_over_call): Use copy_fn_p.
6618         * decl.c (grokfndecl): Reformat. Adjust call to
6619         grok_op_properties.
6620         (copy_args_p): Rename to ...
6621         (copy_fn_p): ... here. Reject template functions. Check for pass
6622         by value.
6623         (grok_special_member_properties): Remember special functions.
6624         (grok_ctor_properties): Don't remember them here, just check.
6625         (grok_op_properties): Likewise.
6626         (start_method): Call grok_special_member_properties.
6627         * decl2.c (grokfield): Likewise.
6628         (copy_assignment_arg_p): Remove.
6629         (grok_function_init): Don't remember abstract assignment here.
6630         * pt.c (instantiate_class_template): Call
6631         grok_special_member_properties.
6632         (tsubst_decl): Adjust grok_op_properties call.
6633
6634 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
6635
6636         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
6637         RID_TYPES_COMPATIBLE_P.
6638
6639 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6640
6641         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
6642         call to build_aggr_init.
6643         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
6644
6645 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
6646
6647         * parse.y: Replace uses of the string non-terminal with STRING.
6648         Don't perform string concatentaion here.
6649         (string): Remove non-terminal.
6650         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
6651
6652 2001-12-05  Jason Merrill  <jason@redhat.com>
6653
6654         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
6655         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
6656         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
6657         * pt.c (push_tinst_level): No longer static.
6658         * cp-tree.h: Declare them.
6659
6660         * init.c (resolve_offset_ref): Don't check access for the base
6661         conversion to access a FIELD_DECL.
6662
6663         * cp-tree.h (TYPE_REFFN_P): New macro.
6664         * decl.c (bad_specifiers): Check it, too.
6665
6666         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
6667         on the __*_type_info type if we haven't seen a definition.
6668
6669 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
6670
6671         * decl.c: Include c-common.h.
6672         (shadow_warning): Move to c-common.c.
6673
6674 Wed Dec  5 17:00:49 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6675
6676         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
6677
6678 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
6679
6680         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
6681
6682 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
6683
6684         PR g++/164
6685         * init.c (sort_base_init): Allow binfos to be directly specified.
6686         * method.c (do_build_copy_constructor): Explicitly convert to the
6687         base instance.
6688         (do_build_assign_ref): Likewise.
6689
6690 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
6691
6692         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
6693         declaration and initialization.
6694
6695 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
6696
6697         * typeck2.c: Remove leading capital from diagnostic messages, as
6698         per GNU coding standards.
6699
6700 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
6701
6702         PR c++/3394
6703         * decl.c (xref_basetypes): Handle attributes between
6704         'class' and name.
6705
6706 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
6707
6708         PR g++/3381
6709         * parse.y (named_complex_class_head_sans_basetype): Add new
6710         reduction.
6711         * Make-lang.in (parse.c): Adjust expected conflict count.
6712
6713 2001-12-03  Jason Merrill  <jason@redhat.com>
6714
6715         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
6716         immediate binfos for our virtual bases.
6717
6718 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
6719
6720         * call.c (build_java_interface_fn_ref): Similarly.
6721         * except.c (is_admissible_throw_operand): Similarly.
6722         * init.c (build_java_class_ref): Similarly.
6723         * xref.c (open_xref_file): Similarly.
6724
6725 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
6726
6727         * class.c (finish_struct): Remove trailing periods from messages.
6728         * decl.c (check_tag_decl): Similarly.
6729         * lex.c (cxx_set_yydebug): Similarly.
6730         * typeck2.c (friendly_abort): Similarly.
6731
6732 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
6733
6734         PR c++/3048
6735         * cp-tree.h (ovl_member): Remove.
6736         * decl2.c (merge_functions): Handle extern "C" functions
6737         specially.
6738         * tree.c (ovl_member): Remove.
6739
6740 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
6741
6742         PR c++/4842
6743         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
6744         FUNCTION_DECL, as input.
6745         (mark_overriders): Remove.
6746         (warn_hidden): Rework for the new ABI.
6747
6748 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
6749
6750         PR c++/3471
6751         * call.c (convert_like_real): Do not build additional temporaries
6752         for rvalues of class type.
6753
6754 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
6755
6756         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
6757         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
6758         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
6759         (DERIVED_FROM_P): Likewise.
6760         (enum base_access): Renumber, add ba_quiet bit mask.
6761         (get_binfo): Remove.
6762         (get_base_distance): Remove.
6763         (binfo_value): Remove.
6764         (ACCESSIBLY_DERIVED_FROM_P): Remove.
6765         * call.c (standard_conversion): Use lookup_base.
6766         * class.c (strictly_overrides): Likewise.
6767         (layout_virtual_bases): Likewise.
6768         (warn_about_ambiguous_direct_bases): Likewise.
6769         (is_base_of_enclosing_class): Likewise.
6770         (add_vcall_offset_vtbl_entries_1): Likewise.
6771         * cvt.c (build_up_reference): Adjust comment.
6772         * init.c (build_member_call): Reformat.
6773         * search.c (get_binfo): Remove.
6774         (get_base_distance_recursive): Remove.
6775         (get_base_distance): Remove.
6776         (lookup_base_r): Tweak.
6777         (lookup_base): Add ba_quiet control. Complete the types here.
6778         (covariant_return_p): Use lookup_base.
6779         * tree.c (binfo_value): Remove.
6780         (maybe_dummy_object): Use lookup_base.
6781         * typeck.c (build_static_cast): Use lookup_base.
6782         (get_delta_difference): Likewise.
6783         * typeck2.c (binfo_or_else): Use lookup_base.
6784         (build_scoped_ref): Add back error_mark_check.
6785         (build_m_component_ref): Use lookup_base.
6786
6787 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
6788
6789         * Make-lang.in (c++.generated-manpages): New dummy target.
6790
6791 Tue Nov 27 09:03:47 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6792
6793         * Make-lang.in (cp-lang.o): Depends on c-common.h.
6794         * cp-lang.c (c-common.h): Include.
6795         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
6796         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
6797         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
6798
6799 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
6800
6801         * decl2.c (c_language): Move to c-common.c.
6802         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
6803         functions.
6804         (cxx_init): Update.
6805
6806 2001-11-26  Jason Merrill  <jason@redhat.com>
6807
6808         * call.c (joust): Remove COND_EXPR hack.
6809
6810 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
6811
6812         * search.c (lookup_base_r): Declare bk in variable declaration
6813         space.
6814
6815 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
6816
6817         PR g++/3145
6818         * class.c (build_vbase_pointer): Remove.
6819         (build_vbase_path): Remove.
6820         (build_base_path): New function.
6821         * cp-tree.h (base_access, base_kind): New enumerations.
6822         (build_base_path): Declare.
6823         (convert_pointer_to_real): Remove.
6824         (convert_pointer_to): Remove.
6825         (lookup_base): Declare.
6826         (convert_pointer_to_vbase): Remove.
6827         * call.c (build_scoped_method_call): Use lookup_base &
6828         build_base_path instead of convert_pointer_to_real,
6829         get_base_distance & get_binfo.
6830         (build_over_call): Likewise.
6831         * cvt.c (cp_convert_to_pointer): Likewise.
6832         (convert_to_pointer_force): Likewise.
6833         (build_up_reference): Likewise.
6834         (convert_pointer_to_real): Remove.
6835         (convert_pointer_to): Remove.
6836         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
6837         instead of convert_pointer_to_vbase & build_vbase_path.
6838         (emit_base_init): Use build_base_path instead of
6839         convert_pointer_to_real.
6840         (expand_virtual_init): Lose unrequired conversions.
6841         (resolve_offset_ref): Use lookup_base and build_base_path
6842         instead of convert_pointer_to.
6843         * rtti.c (build_dynamic_cast_1): Use lookup_base &
6844         build_base_path instead of get_base_distance & build_vbase_path.
6845         * search.c (get_vbase_1): Remove.
6846         (get_vbase): Remove.
6847         (convert_pointer_to_vbase): Remove.
6848         (lookup_base_r): New function.
6849         (lookup_base): New function.
6850         * typeck.c (require_complete_type): Use lookup_base &
6851         build_base_path instead of convert_pointer_to.
6852         (build_component_ref): Likewise.
6853         (build_x_function_call): Likewise.
6854         (get_member_function_from_ptrfunc): Likewise.
6855         (build_component_addr): Likewise.
6856         * typeck2.c (build_scoped_ref): Likewise.
6857
6858 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6859
6860         * cp-tree.h (CP_TYPE_QUALS): Removed.
6861         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
6862         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
6863         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
6864         * dump.c (cp_dump_tree): Use void* dump_info argument to match
6865         lang-hooks prototype.
6866         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
6867         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
6868         CP_TYPE_QUALS changed to cp_type_quals.
6869         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
6870         (CXX_C_OBJS): Remove c-dump.o.
6871
6872 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
6873
6874         PR c++/3637
6875         * pt.c (lookup_template_class): Ensure that all specializations
6876         are registered on the list corresponding to the most general
6877         template.
6878
6879 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
6880
6881         * call.c (non_reference): Add documentation.
6882         (convert_class_to_reference): Do not strip reference types
6883         from conversion operators.
6884         (maybe_handle_ref_bind): Simplify.
6885         (compare_ics): Correct handling of references.
6886
6887 2001-11-19  John Wilkinson <johnw@research.att.com>
6888
6889         * dump.c (dump_op): New function.
6890         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
6891         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
6892         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
6893
6894 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
6895
6896         PR4629
6897         * semantics.c (finish_sizeof): Make sure that expression created
6898         while processing a template do not have a type.
6899         (finish_alignof): Likewise.
6900         * typeck.c (c_sizeof): Likewise.
6901         (expr_sizeof): Likewise.
6902
6903 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
6904
6905         * lex.c (cxx_finish): Call c_common_finish.
6906         (finish_parse): Remove.
6907
6908 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6909
6910         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
6911         when displaying error message about missing array bounds.
6912
6913 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6914
6915         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
6916         CONST_CAST_EXPR.
6917         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
6918
6919 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
6920
6921         * cp-tree.h (print_class_statistics): Restore.
6922
6923 2001-11-15  Jason Merrill  <jason@redhat.com>
6924
6925         * method.c (use_thunk): Don't emit debugging information for thunks.
6926
6927         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
6928         * decl.c (make_typename_type): Handle getting a class template.
6929         * search.c (lookup_field_r): A class template is good enough for
6930         want_type.
6931
6932         * call.c (convert_like_real): Only use cp_convert for the bad part.
6933         (standard_conversion): Also allow bad int->enum.
6934         * typeck.c (ptr_reasonably_similar): Also allow functions to
6935         interconvert.  Pointers to same-size integers are reasonably
6936         similar.
6937
6938         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
6939         give it void type.
6940
6941 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
6942
6943         PR g++/3154
6944         * init.c (sort_base_init): Remove unreachable code.
6945         (expand_member_init): Adjust comment to reflect reality. Simplify
6946         and remove unreachable code.
6947
6948 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
6949
6950         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
6951         (cxx_init): Update prototype.
6952         * decl.c (init_decl_processing): Rename.  Move null node init
6953         to its creation time.
6954         * lex.c (cxx_init_options): Update.
6955         (cxx_init): Combine with old init_parse; also call
6956         cxx_init_decl_processing.
6957
6958 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
6959
6960         * decl.c (check_initializer): Try to complete the type of an
6961         array element before checking whether it's complete.  Don't
6962         complain about arrays with complete element types but an
6963         unknown size.
6964         (cp_finish_decl): Build the hierarchical constructor before
6965         calling maybe_deduce_size_from_array_init.
6966
6967 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
6968
6969         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
6970
6971 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
6972
6973         PR g++/4206
6974         * parse.y (already_scoped_stmt): Remove.
6975         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
6976
6977 2001-11-12  H.J. Lu <hjl@gnu.org>
6978
6979         * cvt.c (ocp_convert): Don't warn the address of a weak
6980         function is always `true'.
6981
6982 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
6983
6984         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
6985         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
6986         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
6987         * cp-tree.h (print_class_statistics): Remove.
6988         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
6989         cxx_print_identifier, cxx_set_yydebug): New.
6990         * lex.c (set_yydebug): Rename c_set_yydebug.
6991         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
6992         lang_print_xnode): Rename.
6993         * tree.c (print_lang_statistics): Rename.
6994
6995 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6996
6997         * class.c (dump_array): Fix format specifier warning.
6998
6999 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
7000
7001         * cp-lang.c (LANG_HOOKS_NAME): Override.
7002         (struct lang_hooks): Constify.
7003         * lex.c (cxx_init_options): Update.
7004         (lang_identify): Remove.
7005         * parse.y (language_string): Remove.
7006
7007 2001-11-08  Andreas Franck  <afranck@gmx.de>
7008
7009         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
7010         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
7011         suggested by autoconf.
7012         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
7013         (c++.install-common): Use the transformed target alias names.
7014
7015 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7016
7017         * Make-lang.in: Update.
7018         * cp-lang.c: Include langhooks-def.h.
7019
7020 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7021
7022         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
7023
7024 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7025
7026         * lex.c (copy_lang_type): Add static prototype.
7027
7028 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7029
7030         * pt.c (unify): Handle SCOPE_REF.
7031
7032 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
7033
7034         * tree.c (cp_copy_res_decl_for_inlining): Adjust
7035         DECL_ABSTRACT_ORIGIN for the return variable.
7036
7037 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
7038
7039         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
7040
7041 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
7042
7043         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
7044         semantics.c, spew.c: Fix spelling errors.
7045
7046 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7047
7048         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
7049
7050 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
7051
7052         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
7053         pop_everything.
7054
7055 Tue Oct 23 14:00:20 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7056
7057         * cp-lang.c (cxx_get_alias_set): New function.
7058         Point LANG_HOOKS_GET_ALIAS_SET to it.
7059
7060 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7061
7062         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
7063         * cp-tree.h (make_unbound_class_template): Prototype new function.
7064         * decl.c (make_unbound_class_template): New function.
7065         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
7066         * error.c (dump_type): Likewise.
7067         * mangle.c (write_type): Likewise.
7068         * parse.y (template_parm): Likewise.
7069         (template_argument): Use make_unbound_class_template.
7070         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
7071         (tsubst): Likewise.
7072         (tsubst_copy): Likewise.
7073         (unify): Likewise.
7074         * tree.c (walk_tree): Likewise.
7075         * typeck.c (comptypes): Likewise.
7076
7077 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7078
7079         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
7080         extra calls into fewer ones.
7081
7082 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
7083
7084         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
7085         Warn when merging inline with attribute noinline.
7086         (start_decl, start_function): Warn if inline and attribute
7087         noinline appear in the same declaration.
7088
7089 2001-10-16  H.J. Lu <hjl@gnu.org>
7090
7091         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
7092         for tree checking disabled.
7093
7094 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
7095
7096         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
7097         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
7098
7099 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
7100
7101         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
7102         (unify): Only handle MINUS_EXPR specially if the above flag is set
7103         and the subtracted constant is 1.  Clear the flag on recursive calls.
7104         Set it when unifying the maximum value in an INTEGER_TYPE's range.
7105
7106 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
7107
7108         * decl.c (bad_specifiers): Don't allow exception specifications
7109         on any typedefs.
7110
7111 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
7112
7113         * cp/lex.c (init_cp_pragma): Similarly.
7114
7115 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7116
7117         * pt.c (lookup_template_class): Build complete template arguments
7118         for BOUND_TEMPLATE_TEMPLATE_PARM.
7119
7120 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7121
7122         * cp-tree.h (TYPE_BINFO): Update comment.
7123         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
7124         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
7125         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
7126         (copy_type): Prototype new function.
7127         * lex.c (copy_lang_decl): Gather tree node statistics.
7128         (copy_lang_type): New function.
7129         (copy_type): Likewise.
7130         (cp_make_lang_type): Create lang_type for
7131         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
7132         and BOUND_TEMPLATE_TEMPLATE_PARM.
7133         * pt.c (tsubst): Use copy_type instead of copy_node.
7134         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
7135
7136 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7137
7138         * pt.c (determine_specialization): Ignore functions without
7139         DECL_TEMPLATE_INFO.
7140
7141 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
7142
7143         PR g++/4476
7144         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
7145
7146 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
7147
7148         * typeck2.c (store_init_value): Don't re-digest a bracketed
7149         initializer.
7150
7151         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
7152         ANON_AGGR_TYPE_P.
7153
7154 2001-10-11  Richard Henderson  <rth@redhat.com>
7155
7156         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
7157         of an asm statement.
7158         (build_vtbl_ref_1): Split out from build_vtbl_ref.
7159         (build_vfn_ref): Use it to handle vtable descriptors before
7160         calling build_vtable_entry_ref.
7161         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
7162
7163 2001-10-10  Richard Henderson  <rth@redhat.com>
7164
7165         * parse.y (asm_operand): Allow named operands.
7166         * semantics.c (finish_asm_stmt): Tweek for changed location
7167         of the operand constraint.
7168
7169 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
7170
7171         * call.c (standard_conversion): Add bad conversion between
7172         integers and pointers.
7173         (convert_like_real): Don't use convert_for_initialization for bad
7174         conversions; complain here and use cp_convert.
7175         (build_over_call): Don't handle bad conversions specially.
7176         (perform_implicit_conversion): Allow bad conversions.
7177         (can_convert_arg_bad): New fn.
7178         * cp-tree.h: Declare it.
7179         * typeck.c (convert_for_assignment): Use it.
7180         (ptr_reasonably_similar): Any target type is similar to void.
7181
7182 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
7183
7184         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
7185         (cp/cp-lang.o): New rule.
7186         * cp-tree.h: Declare hooks.
7187         * tree.c: Make hooks non-static.
7188         (init_tree): Don't initialize hooks here.
7189         * lex.c: Likewise.  Move definition of lang_hooks to...
7190         * cp-lang.c: ... new file.
7191
7192 2001-10-08  Richard Henderson  <rth@redhat.com>
7193
7194         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
7195         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
7196
7197 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7198
7199         * class.c (build_vtable_entry_ref): Const-ify.
7200         * decl.c (predefined_identifier,
7201         initialize_predefined_identifiers): Likewise.
7202         * init.c (build_new_1): Likewise.
7203         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
7204         Likewise.
7205
7206 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
7207
7208         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
7209         (INSNS_PER_STMT): Likewise.
7210         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
7211         (copy_body, initialize_inlined_parameters): Likewise.
7212         (declare_return_variable, inlinable_function_p): Likewise.
7213         (expand_call_inline, expand_calls_inline): Likewise.
7214         (optimize_inline_calls, clone_body): Likewise.
7215         * tree.c (walk_tree): Moved to ../tree-inline.c.
7216         (walk_tree_without_duplicates): Likewise.
7217         (copy_tree_r, remap_save_expr): Likewise.
7218
7219 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
7220
7221         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
7222         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
7223         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
7224         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
7225         (flag_inline_trees): Moved declaration to ../tree-inline.h.
7226         (walk_tree): Moved declaration to ../tree-inline.h.
7227         (walk_tree_without_duplicates, copy_tree_r): Likewise.
7228         (remap_save_expr): Likewise.
7229         * decl.c: Include tree-inline.h.
7230         (lang_mark_tree): Don't mark inlined_fns.
7231         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
7232         * optimize.c: Include tree-inline.h.
7233         (optimize_inline_calls): Move declaration to ../tree.h, as
7234         non-static.
7235         (remap_decl): Use language-independent constructs and hooks.
7236         (remap_block, copy_body_r, declare_return_variable): Likewise.
7237         (inlinable_function_p): Likewise.  Don't test for
7238         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
7239         no longer language-specific.
7240         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
7241         call of dump_function to...
7242         (optimize_function): Here...
7243         (clone_body): New function, extracted from...
7244         (maybe_clone_body): ... here.  Build decl_map locally and pass
7245         it on to clone_body.
7246         * pt.c, semantics.c: Include tree-inline.h.
7247         * tree.c: Likewise.
7248         (cp_walk_subtrees): New language-specific hook for tree inlining.
7249         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
7250         cp_is_overload_p, cp_auto_var_in_fn_p,
7251         cp_copy_res_decl_for_inlining): Likewise.
7252         (walk_tree): Move language-specific constructs into...
7253         (cp_walk_subtrees): this new function.
7254         (copy_tree_r): Use language-independent constructs and hooks.
7255         (init_tree): Initialize tree inlining hooks.
7256         (remap_save_expr): Adjust prototype so that the declaration
7257         does not require the definition of splay_tree.
7258
7259 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7260
7261         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
7262         to build the declaration instead of the declaration itself.
7263
7264 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
7265
7266         * decl2.c (cxx_decode_option): Add 'else'.
7267
7268         * spew.c (end_input): No longer static.
7269         * cp-tree.h: Declare it.
7270         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
7271
7272 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
7273
7274         * call.c (build_over_call), typeck.c (build_function_call_real):
7275         Pass type attributes to check_function_format rather than name or
7276         assembler name.  Don't require there to be a name or assembler
7277         name to check formats.
7278
7279 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
7280
7281         * decl.c (init_decl_processing): Don't call
7282         init_function_format_info.  Initialize lang_attribute_table
7283         earlier.
7284         (builtin_function): Call decl_attributes.
7285         (insert_default_attributes): New.
7286
7287 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
7288
7289         * decl.c (grokdeclarator): Copy array typedef handling from C
7290         frontend.
7291
7292         * decl.c (grokdeclarator): Copy too-large array handling from C
7293         frontend.
7294
7295 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
7296
7297         * config-lang.in (target_libs): Added target-gperf, so that we
7298         don't try to build it if C++ is disabled.
7299
7300 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
7301
7302         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
7303         (cp/errfn.o): Delete rule.
7304         (cp/error.o): Depend on flags.h.
7305         * errfn.c: Delete file.
7306         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
7307         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
7308         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
7309         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
7310         internal_error respectively.  Make cp_deprecated into a macro.
7311         Don't define cp_printer typedef or declare cp_printers.
7312         * error.c: Include flags.h.
7313         Delete: struct tree_formatting_info, print_function_argument_list,
7314         print_declaration, print_expression, print_function_declaration,
7315         print_function_parameter, print_type_id, print_cv_qualifier_seq,
7316         print_type_specifier_seq, print_simple_type_specifier,
7317         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
7318         print_parameter_declaration_clause, print_exception_specification,
7319         print_nested_name_specifier, and definition of cp_printers.
7320         (locate_error): New function.
7321         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
7322         rewritten in terms of locate_error and diagnostic.c.
7323         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
7324         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
7325         (init_error): Adjust to match.
7326
7327 Sat Sep 22 09:15:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7328
7329         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
7330
7331 2001-09-21  Richard Henderson  <rth@redhat.com>
7332
7333         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
7334         (build_vtbl_initializer): Likewise.
7335         (build_vfn_ref): New.
7336         * cp-tree.h: Declare it.
7337         * call.c (build_over_call): Use it.
7338         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
7339         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
7340
7341 Fri Sep 21 08:16:19 2001  J"orn Rennecke <amylaar@redhat.com>
7342
7343         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
7344
7345 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
7346
7347         Table-driven attributes.
7348         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
7349         * decl2.c (cplus_decl_attributes): Only take one attributes
7350         parameter.
7351         * cp-tree.c (cplus_decl_attributes): Update prototype.
7352         * class.c (finish_struct), decl.c (start_decl, start_function),
7353         decl2.c (grokfield), friend.c (do_friend), parse.y
7354         (parse_bitfield): Update calls to cplus_decl_attributes.
7355         * decl.c (grokdeclarator): Take a pointer to a single ordinary
7356         attribute list.
7357         * decl.h (grokdeclarator): Update prototype.
7358         * decl2.c (grokfield): Take a single ordinary attribute list.
7359         * friend.c (do_friend): Likewise.
7360         * decl.c (shadow_tag, groktypename, start_decl,
7361         start_handler_parms, grokdeclarator, grokparms, start_function,
7362         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
7363         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
7364         (process_template_parm, do_decl_instantiation): Pass single
7365         ordinary attribute lists around.
7366         * decl.c (grokdeclarator): Correct handling of nested attributes.
7367         Revert the patch
7368         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
7369                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
7370                 not the left.
7371         .
7372         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
7373         (cp_attribute_table): Declare.
7374         * decl.c (valid_lang_attribute): Don't define.
7375         (lang_attribute_table): Define.
7376         (init_decl_processing): Initialize lang_attribute_table instead of
7377         valid_lang_attribute.
7378         * tree.c (cp_valid_lang_attribute): Remove.
7379         (handle_java_interface_attribute, handle_com_interface_attribute,
7380         handle_init_priority_attribute): New functions.
7381         (cp_attribute_table): New array.
7382         * decl2.c (import_export_class): Don't use
7383         targetm.valid_type_attribute.
7384
7385 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7386
7387         * Make-lang.in (cp/error.o): Depend on real.h
7388         * error.c: #include "real.h"
7389
7390 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7391
7392         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
7393         xmalloc/strcpy/strcat.
7394
7395 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7396
7397         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
7398         Const-ification.
7399         * pt.c (tsubst_decl): Likewise.
7400
7401 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7402
7403         * decl2.c (lang_f_options): Const-ification.
7404         * lex.c (cplus_tree_code_name): Likewise.
7405         * spew.c (yyerror): Likewise.
7406
7407 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
7408
7409         PR c++/3986
7410         * class.c (force_canonical_binfo_r): Check & move an indirect
7411         primary base first.
7412         (force_canonical_binfo): Check that it's not already
7413         canonical.
7414         (mark_primary_virtual_base): Remove BINFO parameter.
7415         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
7416
7417 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
7418
7419         Remove TYPE_NONCOPIED_PARTS.
7420         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
7421         CLASSTYPE_PURE_VIRTUALS.
7422         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
7423         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
7424         (layout_class_type): Don't call fixup_inline_methods here ...
7425         (finish_struct_1): ... call it here.
7426
7427 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
7428
7429         * decl.c (duplicate_decls): Remove code deadling with
7430         DECL_SAVED_INSNS.
7431         * decl2.c (finish_file): Likewise.
7432         * pt.c (instantiate_decl): Likewise.
7433         * semantics.c (expand_body): Don't defer local functions if
7434         they wouldn't be deferred for some other reason.  Don't
7435         generate RTL for functions that will not be emitted.
7436         (genrtl_start_function): Remove code deadling with
7437         DECL_SAVED_INSNS.
7438         (genrtl_finish_function): Likewise.
7439
7440 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
7441
7442         PR c++/4203
7443         * call.c (build_over_call): Do not optimize any empty base
7444         construction.
7445
7446 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7447
7448         * error.c (dump_template_decl): Output template parameters
7449         together with their specifiers.
7450         Output `class' prefix for template template parameter.
7451         (dump_decl): Fix formatting.
7452
7453 2001-08-30  Kurt Garloff  <garloff@suse.de>
7454
7455         * optimize.c (inlinable_function_p): Allow only smaller single
7456         functions. Halve inline limit after reaching recursive limit.
7457
7458 2001-08-30  Joern Rennecke <amylaar@redhat.com>
7459             Jason Merrill  <jason_merrill@redhat.com>
7460
7461         * class.c (build_vtable_entry_ref): Subtract in char*, not
7462         ptrdiff_t.
7463
7464 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
7465
7466         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
7467         (build_cplus_array_type): Use cp_build_qualified_type, not
7468         TYPE_MAIN_VARIANT, to get an unqualified version.
7469
7470         * decl2.c (grok_alignof): Lose.
7471         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
7472         * typeck.c (c_alignof): Lose.
7473         * semantics.c (finish_sizeof, finish_alignof): New.
7474         * parse.y: Use them.
7475         * cp-tree.h: Declare them.
7476
7477 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
7478
7479         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
7480         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
7481         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
7482
7483 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
7484
7485         * typeck2.c (add_exception_specifier): Only require complete type if
7486         not in processing template declaration.
7487
7488 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7489
7490         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
7491         GNU_xref_start_scope and GNU_xref_end_scope.
7492
7493         * tree.c (TYPE_HASH): Moved to ../tree.h.
7494
7495 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
7496
7497         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
7498         on COMPOUND_EXPRs.
7499
7500 2001-08-14  Richard Henderson  <rth@redhat.com>
7501
7502         * class.c, cp-tree.h (build_vfn_ref): Remove.
7503         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
7504
7505 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
7506
7507         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
7508         empty class assignment as having side-effects to avoid
7509         spurious warnings.
7510
7511 2001-08-13  Zack Weinberg  <zackw@panix.com>
7512
7513         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
7514         * except.c: Include libfuncs.h.
7515
7516 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7517
7518         * decl.c (grokdeclarator): Clarify diagnostic message.
7519
7520 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7521
7522         * decl2.c (do_nonmember_using_decl): Replace using directive
7523         with using declaration in the error message.
7524
7525 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7526
7527         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
7528         criterion to avoid rebuilding expression tree instead of
7529         processing_template_decl.
7530
7531 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
7532
7533         Support named return value optimization for inlines, too.
7534         * decl.c (finish_function): Nullify returns here.
7535         * semantics.c (genrtl_start_function): Not here.
7536         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
7537         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
7538         Also nullify the CLEANUP_STMT for the nrv.
7539         * cp-tree.h: Declare it.
7540         * optimize.c (declare_return_variable): Replace the nrv with the
7541         return variable.
7542         * typeck.c (check_return_expr): Be more flexible on alignment check.
7543         Ignore cv-quals when checking for a matching type.
7544
7545 2001-08-09  Richard Henderson  <rth@redhat.com>
7546
7547         * decl2.c (finish_objects): Use target hooks instead of
7548         assemble_constructor and assemble_destructor.
7549
7550 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7551
7552         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
7553
7554 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
7555
7556         PR c++/3820
7557         Stop using TYPE_NONCOPIED_PARTS.
7558         * call.c (build_over_call): Be careful when copy constructing
7559         or assigning to an empty class.
7560         * class.c (check_bases_and_members): It has a
7561         COMPLEX_ASSIGN_REF if it has a vptr.
7562         (layout_class_type): Don't add empty class padding to
7563         TYPE_NONCOPIED_PARTS.
7564         (finish_struct_1): Don't add the VFIELD either.
7565         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
7566         initialization.
7567
7568 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
7569
7570         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
7571
7572 2001-08-06  Richard Henderson  <rth@redhat.com>
7573
7574         * decl2.c (finish_objects): Pass a symbol_ref and priority to
7575         assemble_{constructor,destructor}.  Remove priority handling.
7576
7577 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7578
7579         Don't allow template-id in using-declaration.
7580         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
7581         (do_class_using_decl): Likewise.
7582
7583 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7584
7585         * cp/spew.c (read_token): No need to pop buffers.
7586
7587 2001-08-02  Stan Shebs  <shebs@apple.com>
7588
7589         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
7590         (fnaddr_from_vtable_entry): Remove decl.
7591         * method.c (use_thunk): Update comment.
7592
7593 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
7594
7595         * repo.c (get_base_filename): Change return value to const char
7596         pointer.
7597
7598 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
7599
7600         Kill -fhonor-std.
7601         * NEWS: Document.
7602         * cp-tree.h (flag_honor_std): Remove.
7603         (CPTI_FAKE_STD): Remove.
7604         (std_node): Remove comment about it being NULL.
7605         (fake_std_node): Remove.
7606         * decl.c (in_fake_std): Remove.
7607         (walk_namespaces_r): Remove fake_std_node check.
7608         (push_namespace): Remove in_fake_std code.
7609         (pop_namespace): Likewise.
7610         (lookup_name_real): Remove fake_std_node check.
7611         (init_decl_processing): Always create std_node. Always add
7612         std:: things there.
7613         (builtin_function): Always put non '_' fns in std.
7614         * decl2.c (flag_honor_std): Remove.
7615         (lang_f_options): Remove honor-std.
7616         (unsupported_options): Add honor-std.
7617         (set_decl_namespace): Remove fake_std_node check.
7618         (validate_nonmember_using_decl): Likewise.
7619         (do_using_directive): Likewise.
7620         (handle_class_head): Likewise.
7621         * dump.c (cp_dump_tree): Likewise.
7622         * except.c (init_exception_processing): Adjust.
7623         * init.c (build_member_call): Remove fake_std_node check.
7624         (build_offset_ref): Likewise.
7625         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
7626         * rtti.c (init_rtti_processing): Adjust.
7627
7628 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
7629
7630         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
7631         operand while calling cp_tree_equal.
7632
7633 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
7634
7635         The 3.0 ABI no longer has vbase pointer fields.
7636         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
7637         FORMAT_VBASE_NAME): Remove.
7638         * method.c (do_build_copy_constructor): Adjust.
7639         (do_build_assign_ref): Adjust.
7640         * search.c (lookup_field_r): Adjust.
7641         * typeck.c (build_component_ref): Adjust.
7642
7643         The 3.0 ABI always has a vtable pointer at the start of every
7644         polymorphic class.
7645         * rtti.c (build_headof_sub): Remove.
7646         (build_headof): Adjust.
7647         (get_tinfo_decl_dynamic): No need to check flag_rtti
7648         here. Adjust.
7649         (create_real_tinfo_var): Explain why we need a hidden name.
7650
7651 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
7652
7653         PR c++/3631
7654         * class.c (update_vtable_entry_for_fn): The fixed adjustment
7655         of a virtual thunk should be from declaring base.
7656
7657 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
7658
7659         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
7660         the shared virtual base, so preserving inheritance graph order.
7661
7662 2001-07-30  Andreas Jaeger  <aj@suse.de>
7663
7664         * decl2.c: Remove unused var global_temp_name_counter.
7665
7666 2001-07-28  Richard Henderson  <rth@redhat.com>
7667
7668         * method.c (pending_inlines): Remove.
7669
7670 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
7671
7672         * class.c (mark_primary_virtual_base): Don't adjust base
7673         offsets here.
7674         (dfs_unshared_virtual_bases): Adjust them here.
7675         (mark_primary_bases): Explain why we adjust at the end.
7676
7677 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
7678
7679         * class.c (finish_struct_1): When copying the primary base's
7680         VFIELD, make sure we find it is at offset zero.
7681
7682 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7683
7684         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
7685         tsubst_expr for default template arguments.
7686
7687 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
7688
7689         PR c++/3621
7690         * spew.c (yylex): Only copy the token's lineno, if it is
7691         nonzero.
7692
7693 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
7694
7695         PR c++/3624
7696         * call.c (resolve_args): Simplify, call
7697         convert_from_reference.
7698         (build_new_op): Resolve and convert from reference ARG1
7699         earlier. Adjust ARG2 & ARG3 resolve and conversion.
7700
7701 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
7702
7703         * decl.c (last_function_parm_tags): Remove.
7704         (current_function_parm_tags): Remove.
7705         (init_decl_processing): Adjust.
7706         (start_function): Adjust.
7707         (store_parm_decls): Adjust.
7708
7709         PR c++/3152
7710         * decl.c (grokdeclarator): Detect when a function typedef is
7711         declaring a function, and create last_function_parms correctly.
7712
7713 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
7714
7715         * call.c (joust): Only prefer a non-builtin candidate to a builtin
7716         one if they have the same signature.
7717
7718         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
7719         it rather than toplevel_bindings_p.  Give it a mangled name if static.
7720         (convert_to_reference): Adjust.
7721         * decl2.c (get_temp_name): Lose.
7722         * mangle.c (mangle_ref_init_variable): New fn.
7723         (mangle_guard_variable): Strip the ref-init header.
7724         * cp-tree.h: Adjust.
7725         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
7726         initializer.
7727         (grok_reference_init): Always use DECL_INITIAL.
7728
7729 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7730
7731         PR c++/3416
7732         * call.c (build_conditional_expr): Recheck args after
7733         conversions.
7734         * cp-tree.h (build_conditional_expr): Move to correct file.
7735         * typeck.c (decay_conversion): Diagnose any unknown types
7736         reaching here.
7737         (build_binary_op): Don't do initial decay or default
7738         conversions on overloaded functions.
7739         (build_static_cast): Don't do a decay conversion here.
7740
7741 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7742
7743         PR c++/3543
7744         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
7745         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
7746
7747 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7748
7749         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
7750         (create_vtbl_ptr): ... here.
7751
7752 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7753
7754         * class.c (build_vbase_offset_vbtl_entries): Look for
7755         non-primary base of which we are a sub vtable.
7756
7757 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
7758
7759         * semantics.c (finish_this_expr):  Remove unused code.
7760
7761 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
7762
7763         Simplify rtti, now we've only one ABI.
7764         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
7765         CPTI_TINFO_VAR_ID.
7766         (tinfo_decl_id, tinfo_var_id): Remove.
7767         (get_typeid_1): Remove.
7768         * rtti.c
7769         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
7770         (typeid_ok_p): New function.
7771         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
7772         (get_tinfo_decl): Remove old abi documentation.
7773         (tinfo_from_decl): Remove.
7774         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
7775         (get_typeid_1): Remove.
7776         (get_base_offset): Remove.
7777         (synthesize_tinfo_var): Absorb get_base_offset.
7778         (create_real_tinfo_var): Don't use tinfo_decl_id.
7779
7780 2001-07-23  Graham Stott  <grahams@redhat.com>
7781
7782         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
7783         variable has_two_argument_delete_p.
7784
7785 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
7786
7787         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
7788         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
7789         (CPTI_INDEX_IDENTIFIER): Remove.
7790         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
7791         (delta2_identifier): Remove.
7792         (index_identifier): Remove.
7793         (pfn_or_delta2_identifier): Remove.
7794         (flag_vtable_thunks): Remove.
7795         (VTABLE_DELTA2_NAME): Remove.
7796         (VTABLE_INDEX_NAME): Remove.
7797         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
7798         (vfunc_ptr_type_node): Adjust.
7799         (VTABLE_NAME_PREFIX): Adjust.
7800         (build_vfn_ref): Lose first parameter.
7801         (fixup_all_virtual_upcast_offsets): Remove.
7802         * decl.c (initialize_predefined_identifiers): Remove
7803         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
7804         (init_decl_processing): Remove no-vtable-thunk code.
7805         * decl2.c (flag_vtable_thunks): Remove.
7806         (mark_vtable_entries): Remove no-vtable-thunk code.
7807         * error.c (dump_decl): Remove no-vtable-thunk code.
7808         (dump_expr): Adjust ptr to member function code.
7809         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
7810         code.
7811         * rtti.c (build_headof): Remove no-vtable-thunk code.
7812         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
7813         * search.c (get_base_distance): Remove expand_upcast_fixups case.
7814         (virtual_context) Remove.
7815         (expand_upcast_fixups): Remove.
7816         (fixup_virtual_upcast_offsets): Remove.
7817         (fixup_all_virtual_upcast_offsets): Remove.
7818         * typeck.c (get_member_function_from_ptrfunc): Remove
7819         no-vtable-thunk code.
7820         * call.c (build_over_call): Adjust call to build_vfn_ref.
7821         * class.c (build_vfn_ref): Lose first parameter. Remove
7822         no-vtable-thunk code.
7823         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
7824         (build_vtable_entry): Remove no-vtable-thunk code.
7825
7826 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
7827
7828         Remove old-abi remnants. Remove comments about old abi
7829         behavior. Remove references to 'new-abi' in comments.
7830         * cp-tree.h: Adjust comments.
7831         (vbase_offsets_in_vtable_p): Delete.
7832         (vcall_offsets_in_vtable_p): Delete.
7833         (vptrs_present_everywhere_p): Delete.
7834         (all_overridden_vfuns_in_vtables_p): Delete.
7835         (merge_primary_and_secondary_vtables_p): Delete.
7836         (TYPE_CONTAINS_VPTR_P): Adjust.
7837         (VTT_NAME_PREFIX): Remove.
7838         (CTOR_VTBL_NAME_PREFIX): Remove.
7839         (init_vbase_pointers): Remove.
7840         * class.c: Adjust coments.
7841         (build_vbase_pointer_fields): Delete.
7842         (build_vbase_pointer): Remove old-abi code.
7843         (build_secondary_vtable): Likewise.
7844         (modify_all_vtables): Likewise.
7845         (create_vtable_ptr): Likewise.
7846         (layout_class_type): Likewise.
7847         (finish_struct_1): Likewise.
7848         (finish_vtbls): Likewise.
7849         (dfs_finish_vtbls): Delete.
7850         (build_vbase_offset_vtbl_entries): Remove old-abi code.
7851         * cvt.c: Adjust comments.
7852         * decl.c: Adjust comments.
7853         * decl2.c: Adjust comments.
7854         * init.c: Adjust comments.
7855         (construct_virtual_bases): Remove old-abi code.
7856         * lang-specs.h: Remove -fno-new-abi.
7857         * mangle.c: Adjust comments.
7858         * rtti.c: Adjust comments.
7859         (get_base_offset): Remove old-abi-code.
7860         * search.c: Adjust comments.
7861         (dfs_init_vbase_pointers): Remove.
7862         (dfs_vtable_path_unmark): Remove.
7863         (init_vbase_pointers): Remove.
7864         * semantics.c: Adjust comments.
7865         (emit_associated_thunks): Remove old-abi code.
7866         * typeck.c: Adjust comments.
7867
7868 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
7869
7870         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
7871         params.h.
7872
7873 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
7874
7875         * class.c (finish_struct_anon): Forbid nested classes.
7876
7877 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
7878
7879         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
7880         * optimize.c: Include debug.h.
7881         (maybe_clone_body): Use debug hook.
7882         * semantics.c: Include debug.h.
7883         (expand_body): Use debug hook.
7884
7885 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
7886
7887         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
7888
7889 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
7890
7891         * class.c (type_requires_array_cookie): New function.
7892         (check_methods): Don't try to figure out whether the type needs a
7893         cookie here.
7894         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
7895         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
7896         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
7897         * pt.c (instantiate_class_template): Don't set
7898         TYPE_VEC_DELETE_TAKES_SIZE.
7899         * NEWS: Document ABI changes from GCC 3.0.
7900
7901 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
7902             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
7903
7904         * NEWS (Changes in GCC 3.0): Fix typo.
7905
7906 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
7907
7908         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
7909         which attributes are to be attached, and a flags argument.  Update
7910         call to decl_attributes.
7911         (grokfield): Update call to decl_attributes.
7912         * class.c (finish_struct): Update call to cplus_decl_attributes.
7913         * cp-tree.h (cplus_decl_attributes): Update prototype.
7914         * decl.c (start_decl, grokdeclarator, start_function): Update
7915         calls to decl_attributes and cplus_decl_attributes.
7916         * friend.c (do_friend): Update call to cplus_decl_attributes.
7917         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
7918
7919 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
7920
7921         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
7922         for `register' variables with an asm-specification.
7923
7924 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
7925
7926         * semantics.c (finish_asm_stmt): Mark the output operands
7927         to an asm addressable, if necessary.
7928
7929 2001-07-11  Ben Elliston  <bje@redhat.com>
7930
7931         * Revert this change -- there is a subtle bug.
7932
7933         PR c++/80
7934         * decl.c (finish_enum): New "attributes" argument; pass it to
7935         cplus_decl_attributes.  Use a narrower type if the enum is packed.
7936         * cp-tree.h (finish_enum): Adjust prototype.
7937         * parse.y (enum_head): New non-terminal.
7938         (structsp): Use it. Enums now may be preceded or followed by
7939         optional attributes -- pass their chained tree to finish_enum().
7940         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
7941
7942 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
7943
7944         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
7945         variables.
7946
7947 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
7948
7949         * semantics.c (cp_expand_stmt): Fix for null
7950         current_function_return_value.
7951
7952 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
7953
7954         * call.c (build_op_delete_call): Initialize fn.
7955         (convert_like_real): Delete conditional.
7956         (joust): Initialize *w and *l.
7957         * class.c: Add prototype for binfo_ctor_vtable.
7958         (get_primary_binfo): Initialize result.
7959         * init.c (build_java_class_ref): Initialize name.
7960
7961 2001-07-09  Erik Rozendaal  <dlr@acm.org>
7962
7963         * typeck.c (unary_complex_lvalue): Do not duplicate the
7964         argument to modify, pre-, or post-increment when used as an
7965         lvalue and when the argument has side-effects.
7966
7967 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
7968
7969         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
7970         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
7971         cplus_decl_attributes even if attrs is NULL.
7972         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
7973
7974 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
7975
7976         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
7977         calls to decl_attributes.
7978
7979 2001-07-06  Ira Ruben   <ira@apple.com>
7980
7981         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
7982         be DECL_TEMPLATE_RESULT.
7983
7984 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7985
7986         * cp-tree.h (copy_template_template_parm): Rename to ...
7987         (bind_template_template_parm): ... here.
7988         * tree.c (copy_template_template_parm): Rename to ...
7989         (bind_template_template_parm): ... here.  Remove the case when
7990         NEWARGS is NULL_TREE.
7991         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
7992         BOUND_TEMPLATE_TEMPLATE_PARM.
7993         * pt.c (lookup_template_class): Adjust.
7994
7995 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
7996
7997         * cvt.c (convert_lvalue): New fn.
7998         * cp-tree.h: Declare it.
7999         * method.c (do_build_assign_ref): Use it.
8000         (do_build_copy_constructor): Convert parm to base types
8001         before calling base constructors.
8002
8003         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
8004         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
8005         optimize.
8006         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
8007
8008 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
8009
8010         * optimize.c (optimize_inline_calls): New function, broken out
8011         of ...
8012         (optimize_function): ... here. Call it. Don't inline if it is
8013         a thunk.
8014         (dump_function): Print name of dump flag causing this dump.
8015         * semantics.c (expand_body): Move thunk inline check to
8016         optimize_function.
8017
8018 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8019
8020         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
8021         (comptypes): Use target.comp_type_attributes.
8022
8023 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
8024
8025         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
8026
8027 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8028
8029         * error.c (lang_print_error_function): Add a `diagnostic_context *'
8030         parameter. Tweak.
8031
8032 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8033
8034         * decl2.c (import_export_class): Update.
8035
8036 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
8037
8038         * error.c (init_error): Adjust settings.
8039
8040 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
8041
8042         * error.c (init_error): Adjust settings.
8043
8044 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
8045
8046         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
8047         return pointers to data members by reference rather than by value.
8048
8049 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
8050
8051         Implement the Named Return Value optimization.
8052         * cp-tree.h (struct cp_language_function): Add x_return_value.
8053         (current_function_return_value): Now a macro.
8054         * decl.c: Don't define it.
8055         (define_label, finish_case_label): Don't clear it.
8056         (init_decl_processing): Don't register it with GC.
8057         * semantics.c (genrtl_finish_function): Don't check it for
8058         no_return_label.  Copy the RTL from the return value to
8059         current_function_return_value and walk, calling...
8060         (nullify_returns_r): ...this new fn.
8061         * typeck.c (check_return_expr): Set current_function_return_value.
8062
8063 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
8064
8065         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
8066         sharing a ctor vtable with.  Merge code for cases 1 and 2.
8067         (binfo_ctor_vtable): New fn.
8068         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
8069
8070 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
8071
8072         * class.c (dfs_find_final_overrider): Fix logic.
8073
8074         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
8075         virtual thunk instead of non-virtual.
8076         (get_matching_virtual): Uncomment.
8077
8078         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
8079         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
8080         PARM, not ARG.
8081
8082 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
8083
8084         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
8085         we've not emerged from the hierarchy of RTTI_BINFO on reaching
8086         a non-virtual base.
8087
8088 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
8089
8090         * NEWS: Update release number.
8091
8092 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
8093
8094         PR c++/3130, c++/3131, c++/3132
8095         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
8096         * class.c (force_canonical_binfo_r): Move
8097         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
8098         virtual bases unless they're primary and what they're primary
8099         too has been moved.
8100         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
8101         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
8102         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
8103         derived binfo.
8104         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
8105         (layout_nonempty_base_or_field): Add most derived type
8106         parameter. Adjust.
8107         (layout_empty_base): Likewise.
8108         (build_base_field): Likewise.
8109         (build_base_fields): Likewise.
8110         (propagate_binfo_offsets): Add most derived type
8111         parameter. Skip non canonical virtual bases too.
8112         (dfs_set_offset_for_unshared_vbases): Don't skip primary
8113         bases. Do skip canonical bases.
8114         (layout_virtual_bases): Adjust.
8115         (layout_class_type): Adjust.
8116         (dfs_get_primary_binfo): Build list of virtual primary base
8117         candidates.
8118         (get_primary_binfo): Check that the shared virtual primary
8119         base candidate was found first.
8120         (accumulate_vtbl_inits): Don't do anything for non-vptr
8121         containing binfos. For case 1 primary virtual bases, keep
8122         checking that we've not emerged from the hierarchy of RTTI_BINFO.
8123
8124 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
8125
8126         PR c++/3089
8127         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
8128         hierarchy looking for primary bases for a ctor
8129         vtable. Recursively call oneself, if we meet our primary via
8130         this route and haven't met it yet via inheritance graph order.
8131
8132 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
8133
8134         * lang-options.h: Emit documentation for -fno-honor-std, not
8135         -fhonor-std.
8136
8137 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
8138
8139         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
8140         Don't clobber delta.
8141         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
8142
8143 2001-06-10  Mark Mitchell <mark@codesourcery.com>
8144             Gabriel Dos Reis  <gdr@codesourcery.com>
8145
8146         * Make-lang.in (cp/call.o): Depend on diagnostic.h
8147         (cp/typeck.o): Depend on diagnostic.h
8148         (cp/typeck2.o): Depend on diagnostic.h
8149         (cp/repo.o): Depend on dignostic.h
8150         * typeck.c: #include diagnostic.h
8151         (convert_for_initialization): Remove extern declaration for
8152         warningcount and errorcount.
8153
8154         * call.c: #include diagnostic.h
8155         (convert_like_real): Remove extern declaration for warnincount and
8156         errorcount.
8157
8158         * repo.c: #include diagnostic.h
8159         * typeck2.c: #include diagnostic.h
8160
8161 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8162
8163         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
8164         in previous change.
8165
8166 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8167
8168         PR c++/2929
8169         * friend.c (do_friend): Use push_decl_namespace for classes at
8170         namespace scope.
8171
8172 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8173             Jason Merrill <jason_merrill@redhat.com>
8174
8175         PR c++/3061
8176         * class.c (build_secondary_vtable): Use assert, rather than an error
8177         message.
8178         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
8179         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
8180         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
8181         Don't set BINFO_VTABLE for a primary virtual base.
8182
8183 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
8184
8185         * decl.c (duplicate_decls): Update source position information
8186         when a template function is defined.
8187
8188 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
8189
8190         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
8191
8192 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
8193
8194         PR c++/2914
8195         * decl.c (pushtag): Don't push into a complete type's scope.
8196
8197 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
8198
8199         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
8200         (struct lang_decl_flags): Lose generate_with_vtable_p.
8201         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
8202         * class.c (copy_virtuals): Adjust.
8203         * decl2.c (mark_vtable_entries): Adjust.
8204         * method.c (make_thunk, build_vtable_entry): Adjust.
8205         * class.c (update_vtable_entry_for_fn): Only look as far as the
8206         first defining class.
8207         (build_vtbl_initializer): Put nothing in the slot for a function only
8208         defined in a lost primary virtual base.
8209         (add_vcall_offset_vtbl_entries_1): Use the same code for
8210         the lost primary case and the normal case.
8211         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
8212         (get_vfield_offset, get_derived_offset): Lose.
8213         (dfs_find_final_overrider): Use look_for_overrides_here.
8214         (get_matching_virtual): New fn.
8215         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
8216         not BV_VCALL_INDEX.
8217         * search.c (look_for_overrides_here): Split out from...
8218         (look_for_overrides_r): Here.
8219
8220         * class.c (find_final_overrider): Return error_mark_node on error.
8221
8222         * decl2.c (key_method): #if 0 accidental change.
8223
8224 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8225
8226         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
8227         (build_over_call): Likewise.
8228         * decl.c (grokparms): Likewise.
8229         * pt.c (tsubst_decl): Likewise.
8230         * typeck.c (convert_arguments): Likewise.
8231
8232 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
8233
8234         * semantics.c (begin_class_definition): Robustify.
8235
8236         * pt.c (instantiate_decl): Tell the repository code about the
8237         clones, not the cloned functions.
8238         * repo.c (repo_template_used): Explicitly instantiate the cloned
8239         function, not the clones.
8240
8241 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8242
8243         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
8244         ICS_BAD_FLAG on created conversion.
8245         (compare_ics): Break out rank.
8246
8247 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8248
8249         * decl.c (xref_tag): Remove extraneous %s on dependent name
8250         lookup warning.
8251
8252 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8253
8254         * class.c (layout_vtable_decl): Fix off by one error on
8255         build_index_type.
8256         (build_vtt): Likewise.
8257         (build_ctor_vtbl_group): Likewise.
8258
8259 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8260
8261         * class.c (maybe_indent_hierarchy): New function.
8262         (dump_class_hierarchy_r): Add flags. Dump extra binfo
8263         information, if enabled. Use maybe_indent_hierarchy. Adjust
8264         output format.
8265         (dump_class_hierarchy): Adjust prototype. Adjust output format.
8266         (dump_array, dump_vtable, dump_vtt): New functions.
8267         (finish_struct_1): Adjust hierarchy dumping.
8268         (initialize_vtable): Call dump_vtable.
8269         (build_vtt): Call dump_vtt.
8270         (build_ctor_vtbl_group): Call dump_vtable.
8271         * decl2.c (flag_dump_class_layout): Remove.
8272         (cxx_decode_option): Remove dump translation unit
8273         and dump class hierarchy check. Call dump_switch_p.
8274         (finish_file): Adjust dumping.
8275         (dump.c): Only dump base classes if not TDF_SLIM.
8276         Only dump namespace members if not TDF_SLIM.
8277         * optimize.c (dump_function): New function.
8278         (optimize_function): Call dump_function.
8279         * semantics.c (expand_body): Use dump_enabled_p.
8280
8281 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
8282
8283         PR g++/2936
8284         Part missed from first commit
8285         * decl2.c (finish_anon_union): Copy context.
8286
8287 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
8288
8289         PR g++/2936
8290         * optimize.c (remap_decl): Remap anonymous aggregate members too.
8291
8292 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
8293
8294         PR g++/2823
8295         * semantics.c (expand_body): Don't optimize thunks.
8296
8297 2001-05-25  Sam TH  <sam@uchicago.edu>
8298
8299         * cp-tree.h lex.h: Fix header include guards.
8300
8301 2001-05-25  Mark Mitchell <mark@codesourcery.com>
8302
8303         * decl.c (init_decl_processing): Tweak.
8304
8305 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
8306
8307         * decl.c (duplicate_decls): Tidy.
8308         (init_decl_processing): Always set flag_no_builtin.
8309
8310 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
8311
8312         PR c++/2184
8313         * decl2.c (do_local_using_decl): Push the decls, even in a
8314         template.
8315
8316 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
8317
8318         * optimize.c (initialize_inlined_parameters): Don't set
8319         TREE_READONLY for a VAR_DECL taking the place of an inlined
8320         PARM_DECL.
8321
8322 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
8323
8324         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
8325         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
8326         attribute.
8327
8328 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
8329
8330         * parse.y: Refer to compound literals as such, not as
8331         constructor-expressions.
8332
8333 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
8334
8335         * call.c (build_op_delete_call): Ignore exception-specifications
8336         when looking for matching delete operators.
8337         * init.c (build_new_1): Compute whether or not the allocation
8338         function used is a placement allocation function or not, and
8339         communicate this information to build_op_delete_call.
8340
8341 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
8342
8343         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
8344         (build_vtbl_ref): Adjust.
8345         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
8346         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
8347         Re-add vtable-gc.
8348         (unsupported_options): Correspondingly.
8349
8350         * decl2.c (maybe_make_one_only): Check flag_weak, not
8351         supports_one_only().
8352
8353         * cp-tree.def (START_CATCH_STMT): Lose.
8354         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
8355         * tree.c (cp_statement_code_p): Don't case it.
8356         * semantics.c (cp_expand_stmt): Likewise.
8357         * cp-tree.h (START_CATCH_TYPE): Lose.
8358         (HANDLER_TYPE): New.
8359         * except.c (expand_start_catch_block): Don't start any blocks.
8360         Return the type.
8361         (expand_end_catch_block): Don't end any blocks.
8362         * parse.y (handler): Don't pass anything from finish_handler_parms
8363         to finish_handler.
8364         * pt.c (tsubst_expr): Likewise.
8365         * semantics.c (begin_handler): Call note_level_for_catch here.
8366         (finish_handler_parms): Don't return anything.
8367         (genrtl_catch_block, begin_catch_block): Lose.
8368         (genrtl_handler): Call expand_start_catch here.
8369
8370 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
8371
8372         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
8373         (get_vtable_decl, build_vtt): Not here.
8374
8375 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
8376
8377         PR c++/2781
8378         * optimize.c (update_cloned_parm): Copy addressability and other
8379         flags.
8380
8381 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8382
8383         * pt.c (determine_specialization): Ignore artificial functions.
8384
8385 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
8386
8387         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
8388         (C_RID_CODE): Remove.
8389         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
8390         (init_parse): Don't do it here.
8391
8392 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
8393
8394         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
8395         function declaration to avoid stripping the symbol's attributes.
8396
8397 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
8398
8399         * decl.c (pushdecl): Adjust error string.
8400         (xref_tag): Adjust friend class injection warning. Remove the
8401         inherited name from the class shadowed scope.
8402
8403 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
8404
8405         * except.c (cp_protect_cleanup_actions): New function.
8406         (init_exception_processing): Don't set protect_cleanup_actions
8407         here.  Do set lang_protect_cleanup_actions.
8408
8409 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
8410
8411         * spew.c (read_token): Call yyerror on all unexpected tokens.
8412
8413 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
8414
8415         * init.c (member_init_ok_or_else): Take a tree rather than
8416         string for name.
8417         (expand_member_init): Adjust.
8418
8419 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
8420
8421         * decl.c (duplicate_decls): Suppress warning about duplicate
8422         decls if the first decl is a friend.
8423
8424 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
8425
8426         * except.c (choose_personality_routine): Export.  Add
8427         explanatory comment.  Take an enum languages, not a boolean.
8428         (initialize_handler_parm): Adjust to match.
8429         * cp-tree.h: Prototype choose_personality_routine.
8430         * lex.c (handle_pragma_java_exceptions): New function.
8431         (init_cp_pragma): Register #pragma GCC java_exceptions.
8432
8433 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8434
8435         * method.c (build_mangled_C99_name): Remove unused prototype.
8436
8437 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
8438
8439         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
8440         * typeck.c (get_member_function_from_ptrfunc,
8441         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
8442         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
8443
8444         Reverted Geoff Keating's 2001-05-03's patch.
8445
8446 2001-05-11  Ira Ruben   <ira@apple.com>
8447
8448         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
8449
8450 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
8451
8452         * cp-tree.h (finish_label_expr, lookup_label): Delete.
8453         * parse.y: Update for '&&'; don't issue warning here.
8454         * semantics.c (finish_label_expr): Delete.
8455
8456 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
8457
8458         * splay-tree.h (splay_tree_max): New function.
8459         (splay_tree_min): Likewise.
8460
8461 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
8462
8463         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
8464         (pfn_vflag_identifier): Define.
8465         Update comment about layout of pointer functions.
8466         (build_ptrmemfunc1): Update prototype.
8467         (expand_ptrmemfunc_cst): Update prototype.
8468         * decl.c (initialize_predefined_identifiers): Initialize
8469         pfn_vflag_identifier.
8470         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
8471         an extra field to the type.
8472         * expr.c (cplus_expand_constant): Pass 'flag' between
8473         expand_ptrmemfunc_cst and build_ptrmemfunc1.
8474         * typeck.c (get_member_function_from_ptrfunc): When
8475         FUNCTION_BOUNDARY < 16, look at additional field to determine
8476         if a pointer-to-member is a real pointer or a vtable offset.
8477         (build_ptrmemfunc1): Add new parameter to contain extra field.
8478         (build_ptrmemfunc): Pass the extra field around.
8479         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
8480         (pfn_from_ptrmemfunc): Ignore the extra field.
8481
8482 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
8483
8484         * cp-tree.h (flag_inline_trees): Update documentation.
8485         * decl.c (init_decl_processing): Adjust handling of
8486         flag_inline_functions and flag_inline_trees to support -O3.
8487         (grokfndecl): Set DECL_INLINE on all functions if that's what
8488         the user requested.
8489         (save_function_data): Clear DECL_INLINE in
8490         current_function_cannot_inline is non-NULL.
8491         * decl2.c (flag_inline_trees): Update documentation.
8492
8493 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
8494
8495         * dump.c (cp_dump_tree, USING_STMT case): New case.
8496         * tree.c (cp_statement_code_p): Add USING_STMT.
8497         * decl2.c (do_using_directive): Add the using directive statement.
8498
8499         * tree.c (walk_tree): Reformat an if block.
8500
8501 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
8502
8503         * decl.c (compute_array_index_type): Don't try to do anything with
8504         the indices when processing a template.
8505
8506 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8507
8508         * call.c: NULL_PTR -> NULL.
8509         * class.c: Likewise.
8510         * cvt.c: Likewise.
8511         * decl.c: Likewise.
8512         * decl2.c: Likewise.
8513         * except.c: Likewise.
8514         * init.c: Likewise.
8515         * rtti.c: Likewise.
8516         * search.c: Likewise.
8517         * tree.c: Likewise.
8518         * typeck.c: Likewise.
8519         * typeck2.c: Likewise.
8520
8521 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
8522
8523         * decl2.c (do_using_directive): Revert previous patch.
8524
8525 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8526
8527         * cp-tree.def (USING_STMT): New statement node.
8528         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
8529         * decl2.c (do_using_directive): Add USING_STMT to statement
8530         tree. Don't emit errors when processing template decl.
8531         * pt.c (tsubst_expr, USING_STMT case): New case.
8532         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
8533
8534 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8535
8536         * call.c (build_new_op): Convert args from reference here.
8537         (build_conditional_expr): Don't convert here.
8538
8539 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8540
8541         * spew.c (last_token_id): New static variable.
8542         (read_token): Set it here.
8543         (yyerror): Use it here.
8544
8545 2001-04-30  Richard Henderson  <rth@redhat.com>
8546
8547         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
8548         * decl.c: Likewise.
8549
8550 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
8551
8552         * gxxint.texi: Remove.
8553         * Make-lang.in: Remove all traces of gxxint.texi.
8554
8555 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
8556
8557         * decl2.c (start_static_initialization_or_destruction): Correct
8558         logic to handle the -fno-use-cxa-atexit case.
8559
8560 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
8561
8562         * optimize.c (update_cloned_parm): New function.
8563         (maybe_clone_body): Use it.  Update the `this' parameter too.
8564
8565 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8566
8567         * decl2.c (unsupported_options): Add new-abi.
8568         * lang-options.h: Remove no longer supported options.
8569
8570 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
8571
8572         * except.c (can_convert_eh): Don't check template parms,
8573         typename types etc.
8574
8575 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
8576
8577         * optimize.c (maybe_clone_body): Copy parameter names and locations.
8578
8579 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
8580
8581         * cp-tree.h (adjust_clone_args): Prototype new function.
8582         * class.c (adjust_clone_args): New function.
8583         * decl.c (start_function): Call it for in charge ctors.
8584
8585 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
8586
8587         * method.c (use_thunk): Make sure that thunks really are emitted
8588         when requested.
8589
8590 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
8591
8592         * mangle.c (write_chars): New macro.
8593         (hwint_to_ascii): New function
8594         (write_number): Use it.
8595         (write_integer_cst): Deal with really big numbers.
8596
8597 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
8598
8599         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
8600         the clone.
8601
8602 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
8603
8604         * decl.c (grokdeclarator): Set context of namespace scope
8605         TYPE_DECLS.
8606
8607 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
8608
8609         * cp/optimize.c: Include hashtab.h.
8610         (struct inline_data): Add tree_pruner.
8611         (expand_call_inline, expand_calls_inline): Use it when calling
8612         walk_tree.
8613         (optimize_function): Initialize and free tree_pruner.
8614
8615 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
8616
8617         Lazy __FUNCTION__ generation.
8618         * cp-tree.def (FUNCTION_NAME): Remove.
8619         * cp-tree.h (function_name_declared_p): Remove.
8620         (cp_fname_init): Prototype.
8621         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
8622         don't call declare_function_name. Call start_fname_decls.
8623         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
8624         clobber the line number.
8625         (cp_fname_init): New function.
8626         (start_function): Call start_fname_decls.
8627         (finish_function): Call finish_fname_decls.
8628         * lex.c (reswords): Add slots for __FUNCTION__ et al.
8629         (rid_to_yy): Add mappings for __FUNCTION__ et al.
8630         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
8631         * parse.y (VAR_FUNC_NAME): New token.
8632         (primary): Add VAR_FUNC_NAME.
8633         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
8634         generation.
8635         (tsubst, FUNCTION_NAME case): Remove.
8636         (tsubst_copy, FUNCTION_NAME case): Remove.
8637         (tsubst_expr, DECL_STMT case): Be careful with a
8638         DECL_PRETTY_FUNCTION_P.
8639         (instantiate_decl): Remove function_name_declared_p.
8640         * semantics.c (begin_compound_statement): Don't call
8641         declare_function_name here.
8642         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
8643         (finish_translation_unit): Call finish_fname_decls.
8644         (expand_body): Remove function_name_declared_p.
8645         * typeck2.c (digest_init): Allow any ERROR_MARK.
8646
8647 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
8648
8649         * pt.c (tsubst_decl): Use VOID_TYPE_P.
8650         * semantics.c: Fix some typos.
8651
8652 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
8653
8654         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
8655
8656 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8657
8658         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
8659
8660 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
8661
8662         * except.c (build_throw): Wrap the initialization of the exception
8663         object in a MUST_NOT_THROW_EXPR.
8664         (do_free_exception): #if 0.
8665
8666 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
8667
8668         * cp-tree.h (finish_enum): Change prototype.
8669         * decl.c (finish_enum): Reorganize.
8670         * parse.y (structsp): Adjust calls to finish_enum.
8671
8672 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
8673
8674         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
8675         't' case.
8676
8677 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
8678
8679         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
8680         (layout_empty_base): Return at end flag.
8681         (build_base_field): Likewise.
8682         (build_base_fields): Likewise.
8683         (layout_virtual_bases): Don't add 1 to eoc value.
8684         (end_of_class): Use full size for empty bases.
8685         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
8686         empty bases. Don't add 1 to eoc value. Only add trailing padding
8687         if we're an empty class with no empty bases.
8688         (dump_class_hierarchy): Dump size and alignment.
8689
8690 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
8691
8692         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
8693         ICS_BAD_FLAG.
8694
8695 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
8696
8697         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
8698         is found, look first if name does not match the structure name.
8699
8700 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
8701
8702         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
8703         set.
8704         (SET_DECL_LANGUAGE): New macro.
8705         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
8706         (pushdecl): Likewise.
8707         (build_library_fn_1): Likewise.
8708         (build_cp_library_fn): Likewise.
8709         (grokfndecl): Likewise.
8710         (grokvardecl): Mark `extern "C"' variables as having C linkage.
8711         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
8712         * lex.c (retrofit_lang_decl): Likewise.
8713         * mangle.c (mangle_decl_string): Don't mangle the names of
8714         variables declared with C language linkage.
8715         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
8716
8717 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8718
8719         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
8720         flag_access_control from uninitialized storage.
8721
8722 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
8723
8724         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
8725         * mangle.c (write_pointer_to_member_type): Fix mangling of
8726         pointers to cv-qualified member function types.
8727
8728         * init.c (build_delete): Create a SAVE_EXPR for the address if
8729         we're going to use it more than once.
8730
8731 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
8732
8733         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
8734         (expand_ptremfunc_cst): Change prototype.
8735         (delta2_from_ptrmemfunc): Remove.
8736         * expr.c (cplus_expand_constant): Adjust call to
8737         expand_ptrmemfunc_cst.
8738         * typeck.c (build_ptrmemfunc1): Simplify.
8739         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
8740         results in a constant.
8741         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
8742         (delta2_from_ptrmemfunc): Remove.
8743         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
8744
8745 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
8746
8747         * cp-tree.h (decl_namespace_list): New macro.
8748         (struct saved_scope): Add decl_ns_list.
8749         * decl.c (mark_saved_scope): Mark it.
8750         * decl2.c: Lose static decl_namespace_list.
8751         (init_decl2): Don't save it.
8752
8753 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8754
8755         * cp-tree.h (warn_return_type, yylex): Delete redundant
8756         declarations.
8757
8758         * decl.c (current_class_depth, global_namespace): Likewise.
8759
8760         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
8761
8762         * repo.c (flag_use_repository): Likewise.
8763
8764 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8765
8766         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
8767         set_block, pushdecl, getdecls, gettags, init_decl_processing,
8768         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
8769         lvalue_or_else, print_lang_statistics, comp_target_types,
8770         unsigned_type, signed_type, signed_or_unsigned_type,
8771         build_function_call, mark_addressable, incomplete_type_error):
8772         Delete redundant declarations.
8773
8774 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
8775
8776         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
8777         (TYPE_ANONYMOUS_P): New macro.
8778         (TAGGED_TYPE_P): New macro.
8779         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
8780         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
8781         * tree.c (no_linkage_helper): Likewise.
8782         * semantics.c (begin_class_definition): Likewise.
8783         * pt.c (convert_template_argument): Likewise.
8784         * lex.c (check_for_missing_semicolon): Likewise.
8785
8786 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
8787
8788         * class.c (dfs_unshared_virtual_bases): New function.
8789         (mark_primary_bases): Call it.
8790         (check_bases): Ignore virtual bases when determining
8791         nearly-emptiness.
8792
8793 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
8794
8795         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
8796
8797 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
8798
8799         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
8800         cloned function to the clone.
8801
8802 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8803
8804         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
8805
8806         * semantics.c: Include expr.h.
8807
8808 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
8809
8810         * method.c (implicitly_declare_fn): Commonize code for copy ctor
8811         and assignment op. Set TREE_USED for parameter.
8812
8813 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
8814
8815         * class.c (find_final_overrider_data): Add `candidates'.
8816         (dfs_find_final_overrider): Don't issue error messages
8817         prematurely.
8818         (find_final_overrider): Issue error messages here.
8819         (build_base_field): Don't warn about amgibuous direct bases here.
8820         (warn_about_ambiguous_direct_bases): New function.
8821         (layout_class_type): Use it.
8822
8823 2001-04-10  Richard Henderson  <rth@redhat.com>
8824
8825         * typeck.c (build_array_ref): Push the array reference inside
8826         COMPOUND_EXPR and COND_EXPR.
8827
8828 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
8829
8830         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
8831         * decl.c (duplicate_decls): Adjust accordingly.
8832         (maybe_commonize_var): Likewise.
8833         (grokfndecl): Likewise.
8834         (start_function): Likewise.
8835         (start_method): Likewise.
8836         * decl2.c (key_method): Likewise.
8837         (import_export_decl): Likewise.
8838         * method.c (implicitly_declare_fn): Likewise.
8839         * optimize.c (maybe_clone_body): Likewise.
8840
8841 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
8842
8843         * lang-specs.h: Add __DEPRECATED.
8844
8845 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
8846
8847         * search.c (get_dynamic_cast_base_type): When building a new
8848         constant, set its type to ssizetype.
8849
8850 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
8851
8852         * optimize.c (expand_call_inline): Only add newly inlined statements
8853         into inlined_stmts.
8854
8855 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
8856
8857         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
8858         (OPERATOR_FORMAT): Likewise.
8859         (OPERATOR_TYPENAME_FORMAT): Likewise.
8860         * operators.def: Remove old name-mangling information.
8861         * decl.c (grok_op_properties): Adjust accordingly.
8862         * lex.c (init_operators): Likewise.
8863         * rtti.c (get_tinfo_decl): Issue error messages about types that
8864         have variable size.
8865
8866 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
8867
8868         * decl2.c (import_export_decl): Don't call import_export_class
8869         when processing an inline member function.
8870         * semantics.c (expand_body): Call import_export_decl before
8871         emitting inline functions.
8872
8873 2001-03-28  Richard Henderson  <rth@redhat.com>
8874
8875         IA-64 ABI Exception Handling:
8876         * cp-tree.def (EH_SPEC_BLOCK): New.
8877         (MUST_NOT_THROW_EXPR): New.
8878         * cp-tree.h: Update changed function declarations.
8879         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
8880         (CPTI_CALL_UNEXPECTED): New.
8881         (struct cp_language_function): Rename x_eh_spec_try_block
8882         to x_eh_spec_block.
8883         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
8884         * decl.c (current_binding_level): If no current function
8885         bindings, revert to scope_chain.
8886         (initialize_predefined_identifiers): Remove __cp_push_exception.
8887         (store_parm_decls): Use begin_eh_spec_block.
8888         (finish_function): Use finish_eh_spec_block.
8889         (mark_lang_function): Update for name changes.
8890         * decl2.c (finish_file): No mark_all_runtime_matches.
8891         * dump.c (cp_dump_tree): Handle new tree codes.
8892         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
8893         * except.c (catch_language_init, catch_language): Remove.
8894         (init_exception_processing): Don't set language code.
8895         Initialize call_unexpected_node, protect_cleanup_actions,
8896         eh_personality_libfunc, lang_eh_runtime_type.
8897         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
8898         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
8899         (prepare_eh_type): Split out type canonicalizations ...
8900         (build_eh_type_type): ... from here.
8901         (build_eh_type_type_ref): Remove.
8902         (mark_all_runtime_matches): Remove.
8903         (build_exc_ptr): New.
8904         (do_begin_catch, do_end_catch): New.
8905         (do_pop_exception): Remove.
8906         (build_terminate_handler): Remove.
8907         (choose_personality_routine): Split out language choice from ...
8908         (initialize_handler_parm): ... here.
8909         Use MUST_NOT_THROW_EXPR.
8910         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
8911         exception object handling.
8912         (expand_start_eh_spec, expand_end_eh_spec): Remove.
8913         (expand_exception_blocks, alloc_eh_object): Remove.
8914         (begin_eh_spec_block, finish_eh_spec_block): New.
8915         (do_allocate_exception, do_free_exception): New.
8916         (expand_throw): Merge into ...
8917         (build_throw): ... here.  Update for abi.
8918         * expr.c (cplus_expand_expr): No expand_internal_throw.
8919         Handle MUST_NOT_THROW_EXPR.
8920         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
8921         * semantics.c (*) Update for except.h name changes.
8922         (genrtl_try_block): No protect_with_terminate.
8923         (genrtl_eh_spec_block): New.
8924         (genrtl_handler): Don't emit the goto here.
8925         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
8926         (genrtl_finish_function): Don't expand_exception_blocks.
8927         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
8928
8929 2001-03-28  Richard Henderson  <rth@redhat.com>
8930
8931         * decl.c (struct named_label_list): Rename eh_region to
8932         in_try_scope, add in_catch_scope.
8933         (struct binding_level): Rename eh_region to is_try_scope,
8934         add is_catch_scope.
8935         (note_level_for_try): Rename from note_level_for_eh.
8936         (note_level_for_catch): New.
8937         (poplevel): Copy both is_try_scope and is_catch_scope to
8938         the named_label_list struct.
8939         (check_previous_goto_1): Don't check for catch block via
8940         DECL_ARTIFICIAL; use in_try_scope instead.
8941         (check_goto): Likewise.
8942         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
8943         * except.c (expand_start_catch_block): Call note_level_for_catch.
8944         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
8945
8946 2001-03-27  Richard Henderson  <rth@redhat.com>
8947
8948         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
8949         exceptions_via_longjmp.
8950
8951 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
8952
8953         * pt.c (check_default_tmpl_args):  Make error messages clearer.
8954
8955 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
8956
8957         * error.c:  Also undefine 'A' macro used for cp_printers definition.
8958
8959 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8960
8961         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
8962
8963 2001-03-26  Mike Yang <yang@research.att.com>
8964             Mark Mitchell  <mark@codesourcery.com>
8965
8966         * dump.c (dump_access): New function.
8967         (cp_dump_tree): Use it.  Dump basetype information for class
8968         types.
8969
8970 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
8971
8972         * Makefile.in (optimize.o): Depend on params.h.
8973         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
8974         (init_decl_processing): Set flag_no_inline when doing
8975         inlining-on-trees.
8976         * optimize.c: Include params.h.
8977         (struct inline_data): Improve documentation of FNS.  Add
8978         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
8979         (INSNS_PER_STMT): New macro.
8980         (remap_block): Use CLONING_P.
8981         (inlinable_function_p): Don't inline big functions.
8982         (expand_call_inline): Keep track of how much inlining we've done.
8983         (optimize_function): Set FIRST_INLINED_FN.
8984         (maybe_clone_body): Set CLONING_P.
8985         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
8986         tree nodes.
8987         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
8988         rest_of_compilation.  Clear DECL_RTL for local variables
8989         afterwards.
8990         (clear_decl_rtl): New function.
8991
8992 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
8993
8994         Implement DR 209
8995         * cp-tree.h (skip_type_access_control,
8996         reset_type_access_control): Prototype.
8997         * decl.c (grokdeclarator): Access of friends is not checked.
8998         * parse.y (component_decl_list): Reset type access control.
8999         * semantics.c (decl_type_access_control): Clear
9000         current_type_lookups.
9001         (save_type_access_control): Don't save if not deferring.
9002         (skip_type_access_control, reset_type_access_control): New
9003         functions.
9004         (begin_class_definition): Do type access control for basetypes.
9005         Start deferred access control.
9006         (finish_class_definition): Resume immediate access control if
9007         this is a local class.
9008
9009 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9010
9011         * class.c (add_method): Use memcpy/memmove, not bcopy.
9012
9013         * decl.c (duplicate_decls): Likewise.
9014
9015 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
9016
9017         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
9018         not `_'.
9019
9020 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
9021
9022         * decl.c (local_names): Define.
9023         (push_local_name): New.
9024         (grok_reference_init): Return init if initializing static reference
9025         variable with non-constant instead of emitting it.
9026         Move expand_static_init call to cp_finish_decl.
9027         (layout_var_decl): Call push_local_name.
9028         (maybe_commonize_var): Allow inlining functions even if they have
9029         static local variables, use comdat_linkage for them if flag_weak.
9030         (check_initializer): Call obscure_complex_init if
9031         grok_reference_init returned nonzero.
9032         (save_function_data): Clear x_local_names.
9033         (pop_cp_function_context): Free x_local_names.
9034         (mark_inlined_fns): Remove.
9035         (mark_lang_function): Mark x_local_names.
9036         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
9037         Mark inlined_fns as tree, remove call to mark_inlined_fns.
9038         * class.c (alter_access): Ensure DECL_ACCESS is never set if
9039         DECL_DISCRIMINATOR_P.
9040         * cp-tree.h (cp_language_function): Add x_local_names.
9041         (lang_decl_flags): Add discriminator into u2.
9042         (lang_decl_inlined_fns): Remove.
9043         (lang_decl): inlined_fns is now a TREE_VEC.
9044         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
9045         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
9046         TREE_VEC, not a custom structure.
9047         (optimize_function): Likewise.
9048         * mangle.c (discriminator_for_local_entity): Discriminate among
9049         VAR_DECL local entities.
9050         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
9051         is not valid.
9052
9053 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
9054
9055         Add support for Java interface method calls.
9056         * cp-tree.h (struct lang_type): Add java_interface flag.
9057         (TYPE_JAVA_INTERFACE): New macro.
9058         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
9059         by setting TYPE_JAVA_INTERFACE.
9060         * call.c (java_iface_lookup_fn): New static.
9061         (build_over_call): If calling a method declared in a
9062         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
9063         expression which resolves the function address.
9064         (build_java_interface_fn_ref): New function.
9065
9066 2001-03-22  Richard Henderson  <rth@redhat.com>
9067
9068         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
9069         * except.c: Don't include it.
9070
9071 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
9072             based on an idea from Joe Buck <jbuck@synopsys.com>
9073
9074         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
9075         New nonterminals.
9076         (data_def, component_decl): Add reductions to bad_decl.
9077
9078 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
9079
9080         * method.c (do_build_assign_ref): Don't use build_modify_expr for
9081         anonymous aggregates, since they don't have assignment operator
9082         method.
9083         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
9084         assignment operators for anonymous structure fields.
9085
9086 2001-03-21  Jason Merrill  <jason@redhat.com>
9087
9088         * pt.c (instantiate_decl): Abort if we see a member constant
9089         instantiation that doesn't already have its initializer.
9090         Downgrade explicit instantiation without definition to pedwarn.
9091
9092         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
9093         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
9094         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
9095
9096         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
9097         (pending_vtables): Remove.
9098         * decl2.c (pending_vtables): Remove.
9099         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
9100         CLASSTYPE_VTABLE_NEEDS_WRITING.
9101         (import_export_class): Likewise.
9102         (init_decl2): Don't mark pending_vtables.
9103         * lex.c (handle_pragma_vtable): Just sorry.
9104         * pt.c (instantiate_class_template): Don't mess with
9105         CLASSTYPE_VTABLE_NEEDS_WRITING.
9106         (mark_class_instantiated): Likewise.
9107         * ptree.c (print_lang_type): Don't print it.
9108         * semantics.c (begin_class_definition): Don't set it.
9109
9110         * pt.c (template_tail): Replace with last_pending_template.
9111         (maybe_templates, maybe_template_tail): Remove.
9112         (add_pending_template): Adjust.
9113         (instantiate_pending_templates): Adjust.
9114
9115         * cp-tree.h (struct saved_scope): Remove lang_stack field.
9116         (current_lang_stack): Remove.
9117         * decl.c (maybe_push_to_top_level): Don't initialize it.
9118         (duplicate_decls): Use current_lang_depth.
9119         (xref_basetypes): Likewise.
9120         * class.c (current_lang_depth): New fn.
9121         (push_lang_context): Use more varray functionality.
9122         (pop_lang_context): Likewise.
9123
9124         * error.c (GLOBAL_THING): Always use '__'.
9125
9126 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
9127
9128         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
9129
9130         * mangle.c (mangle_decl_string): Mangle the names of overloaded
9131         operators, even when they have `extern "C"' linkage.
9132
9133 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
9134
9135         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
9136         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9137         where it's not necessary.
9138         (add_method): Remove optimization involving comparison of
9139         DECL_ASSEMBLER_NAME.
9140         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
9141         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9142         where it's not necessary.
9143         (check_methods): Likewise.
9144         (build_clone): Likewise.
9145         (built_vtt): Likewise.
9146         * cp-tree.h (DECL_NEEDED_P): Likewise.
9147         * decl.c (pushtag): Likewise.
9148         (duplicate_decls): Likewise.
9149         (pushdecl): Likewise.
9150         (builtin_function): Likewise.
9151         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
9152         (build_cp_library_fn): Likewise.
9153         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
9154         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9155         where it's not necessary.
9156         (make_rtl_for_nonlocal_decl): Likewise.
9157         (cp_finish_decl): Likewise.
9158         (grokfndecl): Likewise.
9159         (grokvardecl): Likewise.
9160         (grokdeclarator): Likewise.
9161         (start_function): Likewise.
9162         (cp_missing_return_ok_p): Likewise.
9163         * decl2.c (grokclassfn): Likewise.
9164         (check_classfn): Likewise.
9165         (finish_static_data_member_decl): Likewise.
9166         (grokfield): Likewise.
9167         * error.c (GLOBAL_IORD_P): Remove.
9168         (dump_global_iord): Improve output.
9169         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
9170         * except.c (nothrow_libfn_p): Summarily reject any function not in
9171         namespace-scope.
9172         * init.c (build_java_class_ref): Don't explicitly set
9173         DECL_ASSEMBLER_NAME after calling mangle_decl.
9174         * mangle.c (mangle_decl_string): Handle extern "C" functions.
9175         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
9176         * method.c (set_mangled_name_for_decl): Don't explicitly set
9177         DECL_ASSEMBLER_NAME after calling mangle_decl.
9178         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
9179         IDENTIFIER_GLOBAL_VALUE for the thunk.
9180         * pt.c (set_mangled_name_for_template_decl): Remove.
9181         (check_explicit_specialization): Don't use it.
9182         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
9183         (tsubst_friend_function): Likewise.
9184         (tsubst_decl): Likewise.
9185         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
9186         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
9187         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9188         where it's not necessary.
9189         (tinfo_base_init): Likewise.
9190         (create_real_tinfo_var): Likewise.
9191         * search.c (looup_field_1): Likewise.
9192         * semantics.c (finish_named_return_value): Likewise.
9193         * tree.c (init_tree): Set lang_set_decl_assembler_name.
9194
9195 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
9196
9197         Correct semantics restrictions checking in throw-expression.
9198         * except.c (is_admissible_throw_operand): New function.
9199         (build_throw): Use it.
9200
9201 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
9202
9203         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
9204         and its ilk.
9205
9206 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
9207
9208         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9209         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
9210         * decl.c (duplicate_decls): Likewise.
9211         (builtin_function): Likewise.
9212         (build_library_fn): Likewise.
9213         (build_cp_library_fn): Likewise.
9214         (check_initializer): Likewise.
9215         (cp_finish_decl): Likewise.
9216         * decl2.c (grokfield): Likewise.
9217         (grok_function_init): Remove #if 0'd code.
9218         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9219         * friend.c (do_friend): Likewise.
9220         * init.c (get_temp_regvar): Likewise.
9221         * method.c (make_thunk): Likewise.
9222         * pt.c (tsubst_friend_function): Likewise.
9223         (tsubst_decl): Likewise.
9224         (regenerate_decl_from_template): Likewise.
9225         * semantics.c (genrtl_named_return_value): Likewise.
9226         (expand_body): Likewise.
9227         (genrtl_finish_function): Likewise.
9228         * tree.c (cp_tree_equal): Likewise.
9229
9230 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
9231
9232         * call.c (convert_like_real): Add extra semantics to INNER
9233         parameter. Don't convert to temporary if a user conversion
9234         gives us an lvalue that we're about to bind to a reference.
9235         Set INNER to indicate pending reference binding on recursive
9236         calls.
9237
9238 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
9239
9240         * cp/lex.c: Delete duplicate pending_lang_change.
9241
9242 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
9243
9244         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
9245         Similarly.
9246         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
9247         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
9248
9249 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
9250
9251         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
9252
9253 2001-03-08  Stan Shebs  <shebs@apple.com>
9254
9255         * cp-tree.h (set_identifier_local_value): Remove unused decl.
9256
9257 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
9258
9259         * spew.c: Remove references to CPP_OSTRING.
9260
9261 2001-03-06  Andrew Haley  <aph@redhat.com>
9262
9263         * typeck.c (convert_arguments): Check that we have an fndecl.
9264
9265 2001-03-05  Andrew Haley  <aph@redhat.com>
9266
9267         * typeck.c (convert_arguments): Don't do ellipsis conversion for
9268         __built_in_constant_p.
9269
9270 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9271
9272         * typeck.c (build_static_cast): Allow enum to enum conversions
9273         as per DR 128.
9274
9275 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9276
9277         * class.c (check_field_decls): Pointers to member do not a
9278         non-pod struct make, as per DR 148.
9279
9280 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9281
9282         * call.c (joust): cp_pedwarn when using gnu extension concerning
9283         worst conversion sequences.
9284
9285 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9286
9287         * decl.c: Replace all uses of 'boolean' with 'bool'.
9288
9289 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9290
9291         * lang-specs.h: Add zero initializer for cpp_spec field to
9292         all array elements that need one.  Don't put an #ifdef inside
9293         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
9294         use it.
9295
9296 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
9297
9298         Implement using decls inside template functions.
9299         * decl2.c (validate_nonmember_using_decl): Don't special case
9300         fake_std_node in the global namespace. Don't reject early when
9301         processing a template.
9302         (do_local_using_decl): Add to statement tree. Don't do further
9303         processing when building a template.
9304         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
9305
9306 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
9307
9308         * decl2.c (do_nonmember_using_decl): Don't complain if we find
9309         same function. Do complain about ambiguating extern "C"
9310         declarations.
9311
9312 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
9313
9314         Remove floating point and complex type template constant parms.
9315         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
9316         COMPLEX_TYPE extensions.
9317         (invalid_nontype_parm_type_p): Likewise.
9318
9319 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
9320
9321         * except.c (call_eh_info): Revert "match_function"'s type.
9322
9323 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
9324
9325         Fix ctor vtable vcall offsets.
9326         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
9327         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
9328         (get_matching_base): Remove.
9329         (get_original_base): New function.
9330         (build_vtbl_initializer): Initialize vid.rtti_binfo.
9331         Use a virtual thunk for a ctor vtable with an index
9332         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
9333         primary base within a constructor vtable. Only set
9334         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
9335         when primary base has been lost.
9336         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
9337
9338 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
9339
9340         * call.c (joust): Ensure more_specialized()'s argument length
9341         parameter has correct value for constructors.
9342
9343 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
9344
9345         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
9346
9347         * decl.c (mark_inlined_fns): Prototype.
9348
9349 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
9350
9351         * spew.c (yylex): Correct handling of friends.
9352
9353 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
9354
9355         * mangle.c (write_encoding): Pass write_function_type the
9356         FUNCTION_DECL for the function being encoded.
9357         (write_function_type): Pass it along to write_bare_function_type.
9358         (write_bare_function_type): Pass it along to write_method_parms.
9359         (write_method_parms): Don't mangle the compiler-generated
9360         parameters to a constructor or destructor.
9361
9362 2001-02-22  Andreas Jaeger  <aj@suse.de>
9363
9364         * optimize.c: Include toplev.h for
9365         note_deferral_of_defined_inline_function prototype.
9366
9367 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
9368
9369         * cp-tree.h (struct lang_decl_inlined_fns): New.
9370         (struct lang_decls): Add inlined_fns.
9371         (DECL_INLINED_FNS): New macro.
9372         * optimize.c (struct inline_data): Add inlined_fns.
9373         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
9374         (inlinable_function_p): Likewise, fix typo in comment,
9375         function is not inlinable if it already inlined function currently
9376         being optimized.
9377         (expand_call_inline): Add fn to inlined_fns if necessary.
9378         (optimize_function): Initialize inlined_fns.
9379         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
9380         * decl.c (mark_inlined_fns): New function.
9381         (lang_mark_tree): Call it.
9382
9383 2001-02-21  Jason Merrill  <jason@redhat.com>
9384
9385         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
9386         (DECL_UNINLINABLE): Move to middle-end.
9387
9388         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
9389         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
9390         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
9391         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
9392         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
9393
9394         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
9395         second parm of op=.
9396
9397 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
9398
9399         * decl2.c (set_decl_namespace): Allow explicit instantiations in
9400         any namespace.
9401
9402 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9403
9404         * optimize.c (expand_call_inline): Don't walk subtrees of type
9405         nodes.
9406
9407 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
9408
9409         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
9410         for a destructor.
9411
9412 2001-02-18  Jason Merrill  <jason@redhat.com>
9413
9414         Do put the VTT parameter in DECL_ARGUMENTS.
9415         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
9416         (current_vtt_parm): New macro.
9417         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
9418         (DECL_HAS_VTT_PARM_P): New macro.
9419         (DECL_VTT_PARM): Remove.
9420         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
9421         * decl.c (duplicate_decls): Only copy the operator code if
9422         appropriate.
9423         (start_function): Set current_vtt_parm.
9424         (lang_mark_tree): Don't mark vtt_parm.
9425         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
9426         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
9427         * class.c (build_clone): Maybe remove the VTT parm.
9428         * optimize.c (maybe_clone_body): Set up the VTT parm.
9429         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
9430         * call.c (build_over_call): Just allow the VTT arg.
9431         * method.c (make_thunk): Don't set DECL_VTT_PARM.
9432         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
9433         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
9434         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
9435         * error.c (dump_function_decl): Likewise.
9436         * call.c (build_user_type_conversion_1, convert_like_real): Abort
9437         if we try to call a constructor with in-charge or VTT parms.
9438         * method.c (skip_artificial_parms_for): New fn.
9439         * call.c (add_function_candidate, build_over_call): Call it.
9440         * call.c (build_new_method_call): Use current_vtt_parm.
9441         * init.c (expand_virtual_init): Likewise.
9442         * class.c (same_signature_p): No longer static.
9443         * cp-tree.h: Declare it.
9444         * search.c (look_for_overrides_r): Use it.
9445
9446 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
9447
9448         * cp-tree.h (new_abi_rtti_p): Remove.
9449         (name_mangling_version): Likewise.
9450         (flag_do_squangling): Likewise.
9451         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
9452         * decl.c (grokfndecl): Likewise.
9453         * decl2.c (name_mangling_version): Remove.
9454         (flag_do_squangling): Likewise.
9455         (lang_f_options): Remove `squangle'.
9456         (unsupported_options): Add `squangle'.
9457         (cxx_decode_option): Issue a warning about uses of
9458         -fname-mangling-version.
9459         (finish_file): Remove old ABI support.
9460         * pt.c (check_explicit_specialization): Likewise.
9461         (tsubst_decl): Likewise.
9462         * rtti.c (init_rtti_processing): Likewise.
9463         (build_headof): Likewise.
9464         (get_tinfo_decl_dynamic): Likewise.
9465         (tinfo_from_decl): Likewise.
9466         (build_dynamic_cast_1): Likewise.
9467         (synthesize_tinfo_var): Likewise.
9468         * init.c (build_new): Allow enumeration types for the array-bounds
9469         in a direct-new-declarator.
9470
9471         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
9472
9473         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
9474         TREE_PROTECTED from the template being specialized.
9475
9476 2001-02-17  Jason Merrill  <jason@redhat.com>
9477
9478         * decl2.c (build_artificial_parm): Set TREE_READONLY.
9479
9480         * decl.c (bad_specifiers): Allow throw specs on things with
9481         pointer-to-function or -member-function type.
9482         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
9483         a pmf.
9484
9485 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
9486
9487         * call.c (check_dtor_name): Handle template names correctly.
9488
9489 2001-02-16  Jason Merrill  <jason@redhat.com>
9490
9491         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
9492         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
9493         * optimize.c (maybe_clone_body): Don't substitute it.
9494         * call.c (build_new_method_call): Check in_chrg instead.
9495         * init.c (expand_virtual_init): Likewise.
9496
9497 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
9498
9499         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
9500         class-type introduces at least a type-name.
9501
9502 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
9503
9504         * call.c (convert_like_real): Create a temporary for non-lvalue.
9505
9506 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
9507
9508         * cp-tree.h: Fix typos in comments.
9509
9510 2001-02-16  Jason Merrill  <jason@redhat.com>
9511
9512         * optimize.c (remap_block): If we're compiling a clone, pass the
9513         new block to insert_block.
9514
9515 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
9516
9517         * semantics.c (finish_asm_stmt): Robustify.
9518
9519 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
9520
9521         * pt.c (push_template_decl_real): Don't remangle the name of a
9522         class template.
9523
9524 2001-02-15  Jim Meyering  <meyering@lucent.com>
9525
9526         * Make-lang.in (c++.install-common): Depend on installdirs.
9527         (c++.install-info): Likewise.
9528         (c++.install-man): Likewise.
9529
9530 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
9531
9532         * typeck2.c (build_m_component_ref): Robustify.
9533
9534 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
9535
9536         * friend.c (do_friend): Don't take the nested [template] class
9537         into account when deciding whether to warn about the friend
9538         function not referring to a template function.
9539
9540 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
9541
9542         * typeck.c (build_unary_op): Clarify error message.
9543
9544 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
9545
9546         * parse.y (component_constructor_declarator): allow optional
9547         parentheses around constructor class name.
9548
9549 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9550
9551         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
9552         section.
9553         * init.c (emit_base_init): Remove incorrect comment about
9554         virtual bases.
9555         * method.c (make_thunk): Fix comment alignment.
9556
9557 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9558
9559         Kill remnants of this is variable.
9560         * cp-tree.h (flag_this_is_variable): Remove.
9561         * decl2.c (flag_this_is_variable): Remove.
9562         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
9563         (build_vbase_path): The path is non-static, even in a cdtor.
9564         (resolves_to_fixed_type_p): Add additional return value.
9565         * search.c (init_vbase_pointers): Adjust.
9566         * tree.c (lvalue_p_1): Adjust.
9567         * typeck.c (mark_addressable): Adjust.
9568
9569 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9570
9571         * pt.c (unify): Don't check cv quals of array types.
9572
9573 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9574
9575         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
9576         check whether we already have the type.
9577
9578 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
9579
9580         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
9581         * call.c (build_op_delete_call): Simplify to remove duplicate
9582         code.
9583         * class.c (clone_function_decl): Don't build the deleting variant
9584         of a non-virtual destructor.
9585         * decl.c (finish_destructor_body): Don't call delete if this is a
9586         non-virtual destructor.
9587         * init.c (build_delete): Explicitly call `operator delete' when
9588         deleting an object with a non-virtual destructor.
9589
9590 2001-02-13  Jason Merrill  <jason@redhat.com>
9591
9592         * lang-specs.h: Add more __EXCEPTIONS.
9593
9594 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
9595
9596         * typeck2.c (process_init_constructor): Check
9597         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
9598
9599 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
9600
9601         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
9602         Remove spurious information in comment. Allow further
9603         adjustments of REFERENCE_TYPE args.
9604
9605 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
9606
9607         * errfn.c (cp_deprecated): Tweak diagnostic text.
9608         * parse.y (new_initializer): Deprecate initializer lists
9609         extension.
9610
9611 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
9612
9613         Remove old ABI support.
9614
9615 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
9616
9617         * decl2.c (flag_vtable_thunks): Always set it to 1.
9618         (flag_new_abi): Likewise.
9619         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
9620
9621         * Makefile.in (g++spec.o): Fix typo.
9622
9623 2001-02-09  Jason Merrill  <jason@redhat.com>
9624
9625         * lang-specs.h: Restore definition of __EXCEPTIONS.
9626
9627 2001-02-08  Jason Merrill  <jason@redhat.com>
9628
9629         * search.c (shared_member_p): New function.
9630         (lookup_field_r): Use it.
9631         * cp-tree.h (SHARED_MEMBER_P): Remove.
9632
9633         * method.c (process_overload_item): Handle template-dependent array
9634         bounds.
9635         * pt.c (type_unification_real): If we end up with undeduced nontype
9636         parms, try again.
9637
9638         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
9639         types.
9640
9641         * typeck2.c (friendly_abort): Don't say anything if we have
9642         earlier errors or sorries.
9643
9644         * decl.c (check_tag_decl): Notice attempts to redefine bool and
9645         wchar_t.  Ignore if in_system_header.
9646
9647         * decl.c (maybe_push_cleanup_level): New fn...
9648         (start_decl_1): ...split out from here.
9649         * cvt.c (build_up_reference): Use it.
9650         * cp-tree.h: Declare it.
9651
9652 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
9653
9654         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
9655         spec.
9656
9657 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
9658
9659         * pt.c (lookup_template_class): Make sure it's a primary
9660         template or template_template_parm when called from the parser.
9661         (instantiate_template_class): Add assertion.
9662
9663 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
9664
9665         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
9666         from error_mark_node.
9667
9668 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
9669
9670         Fix specification and implementation bugs in V3 ABI
9671         construction vtables.
9672         * cp-tree.h (flag_dump_class_layout): New flag.
9673         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
9674         (BINFO_LOST_PRIMARY_P): New flag.
9675         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
9676         (BINFO_PRIMARY_MARKED_P): Rename to ...
9677         (BINFO_PRIMARY_P): ... here.
9678         (binfo_via_virtual): New prototype.
9679         * decl2.c (flag_dump_class_layout): New flag.
9680         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
9681         use `=' as a file name separator.
9682         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
9683         bases.
9684         (build_vtbl_address): If this is a virtual primary base, then
9685         get the vtbl of what it is ultimately primary for.
9686         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
9687         for BINFO_PRIMARY_P.
9688         (dfs_skip_nonprimary_vbases_markedp): Likewise.
9689         (get_shared_vbase_if_not_primary): Likewise.
9690         (dfs_get_pure_virtuals): Likewise.
9691         (expand_upcast_fixups): Likewise.
9692         (fixup_virtual_upcast_offsets): Likewise.
9693         (dfs_find_vbase_instance): Likewise.
9694         (find_vbase_instance): Likewise.
9695         (binfo_from_vbase): Adjust comment to reflect reality.
9696         (binfo_via_virtual): New function.
9697         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
9698         for binfo walking during VTT construction.
9699         (dfs_mark_primary_bases): Remove.
9700         (force_canonical_binfo_r): New function.
9701         (force_canonical_binfo): New function.
9702         (mark_primary_virtual_base): New function.
9703         (mark_primary_bases): Walk in inheritance graph order, use
9704         mark_primary_virtual_base.
9705         (determine_primary_base): Use some more intermediate variables.
9706         (dfs_find_final_overrider): Don't check for overriding along a
9707         virtual path.
9708         (dfs_modify_vtables): Walk into primary virtual bases too.
9709         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
9710         (build_base_fields): Likewise.
9711         (dfs_set_offset_for_unshared_vbases): Likewise.
9712         (layout_virtual_bases): Likewise.
9713         (end_of_class): Likewise.
9714         (finish_struct_1): Call dump_class_hierarchy, if requested.
9715         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
9716         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
9717         (dump_class_hierarchy): Add file parameter. Append to file, if
9718         required.
9719         (finish_vtbls): Adjust accumulate_vtbl_inits call.
9720         Use canonical base for virtual bases.
9721         (build_vtt): Add more comments. Adjust build_vtt_inits call.
9722         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
9723         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
9724         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
9725         virtual VTTs.
9726         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
9727         from DATA.  We want virtual primary bases and all bases via virtual.
9728         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
9729         virtual base when not a construction vtable.
9730         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
9731         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
9732         Use canonical bases when processing virtual bases.
9733         (accumulate_vtbl_inits): We're interested in any base via a
9734         virtual path.
9735         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
9736         within a construction vtable, determine what is being overridden.
9737         (build_vtbl_initializer): Add more comments
9738         (add_vcall_offset_vtbl_entries_1): Adjust comment.
9739         (build_rtti_vtbl_entries): Check if the base has lost its
9740         primary.
9741
9742 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
9743
9744         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
9745
9746 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9747
9748         * decl.c (pushdecl): Call abort instead of fatal.
9749         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
9750         * init.c (build_new_1): Likewise.
9751         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
9752         * decl.c (build_typename_type): hash_table_init now returns void.
9753         decl.c (init_decl_processing): Make an error non-fatal.
9754
9755 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
9756
9757         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
9758         Document.
9759         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
9760         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
9761         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
9762         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
9763         * decl.c (maybe_commonize_var): Use the new name-mangling where
9764         appropriate.
9765         * decl2.c (comdat_linkage): Enhance comments.  Make all
9766         compiler-generated things static, if COMDAT is not available.
9767         (get_tinfo_decl): Do not make typeinfo objects that belong in the
9768         library COMDAT.
9769         (tinfo_base_init): Use the correct mangled name for typeinfo
9770         strings, and push them into the global scope.
9771         (typeinfo_in_lib_p): New function.
9772         (synthesize_tinfo_var): Use it.
9773         (create_real_tinfo_var): Likewise.
9774
9775 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
9776
9777         * decl.c (push_class_binding): Use context_for_name_lookup instead
9778         of CP_DECL_CONTEXT.
9779         * search.c (context_for_name_lookup): Remove static.  Check for NULL
9780         context in the loop.
9781         * cp-tree.h (context_for_name_lookup): Add prototype.
9782
9783 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
9784
9785         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
9786         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
9787         Remove.
9788         * call.c (convert_class_to_reference, build_user_type_conversion_1,
9789         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
9790
9791 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
9792
9793         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
9794         of macros used when compiling g++spec.c.
9795         * g++spec.c (lang_specific_driver): Link with the shared
9796         libgcc by default.
9797
9798 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
9799
9800         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
9801         make_reference_declarator, make_call_declarator), method.c
9802         (implicitly_declare_fn), parse.y (namespace_using_decl,
9803         notype_unqualified_id, expr_or_declarator, new_type_id,
9804         after_type_declarator, direct_after_type_declarator,
9805         notype_declarator, complex_notype_declarator,
9806         complex_direct_notype_declarator, qualified_id,
9807         notype_qualified_id, overqualified_id, direct_new_declarator,
9808         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
9809         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
9810         instead of build_parse_node.
9811
9812 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9813
9814         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
9815         (minus_one_node): Moved to top level gcc directory.  Renamed
9816         to integer_minus_one_node.
9817
9818         * init.c (init_init_processing): Don't set minus_one_node.
9819         (build_vec_init): Use integer_minus_one_node.
9820
9821         * rtti.c (get_tinfo_decl_dynamic): Likewise.
9822
9823 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
9824
9825         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
9826         identical and they would be replaced with constant, remove
9827         MODIFY_EXPR from the tree.
9828
9829 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9830
9831         * Make-lang.in: Remove all dependencies on defaults.h.
9832         * call.c: Don't include defaults.h.
9833         * decl.c: Likewise.
9834         * decl2.c: Likewise.
9835         * except.c: Likewise.
9836         * pt.c: Likewise.
9837         * rtti.c: Likewise.
9838         * tree.c: Likewise.
9839         * typeck.c: Likewise.
9840
9841 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
9842
9843         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
9844         operators even in "C" linkage.
9845         * method.c (set_mangled_name_for_decl): Likewise.
9846         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
9847         overloaded operators in "C" linkage.
9848
9849 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
9850
9851         * pt.c (tsubst_decl): Remove IN_DECL parameter.
9852         (tsubst_arg_types): Check parameter is not void.
9853         (tsubst): Adjust tsubst_decl call.
9854
9855 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
9856
9857         * call.c (add_builtin_candidate): Quote std properly, from
9858         previous change.
9859
9860 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9861
9862         * pt.c (check_explicit_specialization): Clone constructors and
9863         destructors.
9864
9865 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
9866
9867         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
9868         indicates anything special about template depth. Make sure we
9869         only count the user visible template classes.
9870
9871 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
9872
9873         * call.c (build_conv): Typo in comment.
9874         (add_builtin_candidate): Add more explanation.
9875         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
9876         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
9877         when we have enumeral types.
9878         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
9879         candidates for relops and eqops.
9880         (joust): Simplify control flow. Allow a non-template user
9881         function to hide a builtin.
9882
9883 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
9884
9885         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
9886         (more_specialized): Add deduction parameter.
9887         * call.c (joust): Adjust more_specialized call.
9888         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
9889         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
9890         (get_bindings_order): Remove.
9891         (get_bindings_real): Add DEDUCE parameter.
9892         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
9893         REFERENCE_TYPE jig for DEDUCE_ORDER.
9894         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
9895         maybe_adjust_types_for_deduction.
9896         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
9897         directly.
9898         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
9899         (check_cv_quals_for_unify): Use new unify qualifier flags.
9900         (unify): Clear new unify qualifier flags.
9901         (get_bindings_real): Add DEDUCE parameter.
9902         (get_bindings): Adjust call to get_bindings_real.
9903         (get_bindings_overload): Likewise.
9904         (most_specialized_instantiation): Adjust call to
9905         more_specialized.
9906
9907 2001-01-19  Jason Merrill  <jason@redhat.com>
9908
9909         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
9910
9911         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
9912         -fnew-abi.
9913
9914 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
9915
9916         * decl2.c (arg_assoc_class): Fix double iteration logic.
9917
9918 2001-01-19  Jason Merrill  <jason@redhat.com>
9919
9920         * init.c (build_delete): Always call convert_force to strip cv-quals.
9921
9922         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
9923         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
9924         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
9925
9926 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9927
9928         * search.c (get_vbase_1): Count only virtual bases.
9929
9930 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9931
9932         * class.c (duplicate_tag_error): Robustify flag clearing.
9933
9934 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9935
9936         * cp-tree.h (lookup_template_class): Add complain parm.
9937         * decl.c (lookup_namespace_name): Adjust call to
9938         lookup_template_class.
9939         (make_typename_type): Likewise.
9940         * semantics.c (finish_template_type): Likewise.
9941         * pt.c (lookup_template_class): Add complain parm. Adjust.
9942         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
9943         (tsubst): Likewise.
9944
9945 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9946
9947         * pt.c (copy_default_args_to_explicit_spec): Preserve
9948         object's CV quals. Reorganize.
9949
9950 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9951
9952         * typeck.c (build_modify_expr): Say `initialization' for
9953         INIT_EXPRs.
9954         * init.c (build_default_init): Convert to enumeral type, if
9955         needed.
9956
9957 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
9958
9959         * parse.y (nomods_initdcl0): Properly set things up for
9960         initdcl0_innards.
9961
9962 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9963
9964         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
9965         (type_unification_real): Set it.
9966         (unify): Use it.
9967
9968 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9969
9970         * decl.c (finish_destructor_body): Convert to vbase pointer here.
9971
9972 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9973
9974         * semantics.c (begin_class_definition): Check we're not inside a
9975         template parm list.
9976
9977 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9978
9979         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
9980         BASELINK_P.
9981
9982 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9983
9984         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
9985         * call.c (build_over_call): Add comment.
9986
9987 2001-01-16 Daniel Berlin <dberlin@redhat.com>
9988
9989         * cvt.c (ocp_convert): Handle vector type conversion
9990         * typeck2.c (digest_init): Handle vector type initializations
9991
9992 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
9993
9994         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
9995           was given.
9996
9997 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
9998
9999         * pt.c (check_nontype_parm): Rename to ...
10000         (invalid_nontype_parm_type_p): ... here.
10001         (process_template_parm): Adjust.
10002         (convert_template_argument): Adjust.
10003
10004 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
10005
10006         * pt.c (check_nontype_parm): New function.
10007         (process_template_parm): Use it.
10008         (convert_template_argument): Use it.
10009         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
10010         member.
10011
10012 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
10013
10014         * tree.c: Add defaults.h
10015         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
10016         * Make-lang.in (cp/tree.o): Add defaults.h.
10017
10018 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10019
10020         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
10021
10022 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10023
10024         * g++.1: Change to be ".so man1/gcc.1".
10025
10026 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10027
10028         * Make-lang.in (c++.info, c++.install-info): Build and install g++
10029         internals info.
10030         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
10031         ($(srcdir)/cp/g++int.info): New target.
10032         * gxxint.texi: Add info directory entry.  Use @@ in email address.
10033         * .cvsignore: Update.
10034
10035 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
10036
10037         * typeck.c (build_c_cast): Do template processing earlier.
10038         Always pedwarn on array casts.
10039
10040 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
10041
10042         * friend.c (make_friend_class): Make sure a templated class is
10043         actually a template.
10044
10045 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10046
10047         * decl2.c (get_guard): Set linkage from guarded decl.
10048
10049 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10050
10051         * call.c (convert_default_arg): Check for unprocessed
10052         DEFAULT_ARG.
10053         * cp-tree.h (replace_defarg): Move to spew.c.
10054         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
10055         spew.c, which is where they really are.
10056         (done_pending_defargs): Declare.
10057         (unprocessed_defarg_fn): Declare.
10058         * decl.c (replace_defarg): Move to spew.c
10059         * parse.y (structsp): Call done_pending_defargs.
10060         * spew.c (defarg_fns): Rearrange list structure.
10061         (defarg_fnsdone): New static variable.
10062         (defarg_depfns): New static variable.
10063         (init_spew): Adjust.
10064         (add_defarg_fn): Store the type in TREE_TYPE.
10065         (do_pending_defargs): Detect and deal with ordering constraints
10066         and circularity.
10067         (done_pending_defargs): New function.
10068         (unprocessed_defarg_fn): New function.
10069         (replace_defarg): Moved from decl.c. Robustify. Don't save
10070         if circularity detected.
10071
10072 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10073
10074         * pt.c (unify): Check array has a domain, before checking
10075         whether it is variable sized.
10076
10077 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10078
10079         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
10080         parameters with pointers to arrays of unknown bound.
10081
10082 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10083
10084         * parse.y (template_parm_header, template_spec_header): New
10085         reductions. Split out from ...
10086         (template_header): ... here. Use them.
10087         (template_template_parm): Use template_parm_header.
10088         * semantics.c (finish_template_template_parm): Add assert.
10089
10090 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10091
10092         * mangle.c (write_builtin_type): Fix thinko.
10093
10094         * pt.c (copy_default_args_to_explicit_spec_1): New function.
10095         (copy_default_args_to_explicit_spec): Likewise.
10096         (check_explicit_specialization): Use it.
10097
10098         * class.c (finish_struct_1):  Remove last argument in call to
10099         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
10100         * decl.c (builtin_function): Likewise.
10101         (build_cp_library_fn): Likewise.
10102         (check_initializer): Likewise.
10103         (make_rtl_for_nonlocal_decl): Likewise.
10104         (cp_finish_decl): Likewise.
10105         (start_function): Likewise.
10106         * decl2.c (finish_anon_union): Likewise.
10107         * friend.c (do_friend): Likewise.
10108         * init.c (build_java_class_ref): Likewise.
10109         * method.c (make_thunk): Likewise.
10110         * pt.c (tsubst_friend_function): Likewise.
10111         * semantics.c (expand_body): Likewise.
10112
10113 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10114
10115         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
10116         looking at DECL_CLONED_FUNCTION for non-functions.
10117
10118 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10119
10120         * error.c (dump_template_parameter): Use parm to determine how
10121         to print default value.
10122
10123 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10124
10125         * class.c (duplicate_tag_error): Clear more flags.
10126
10127 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10128
10129         * call.c (build_new_method_call): Use binfo_for_vbase.
10130
10131 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
10132
10133         * cp-tree.h (flag_cond_mismatch): Don't declare.
10134         * decl2.c (flag_cond_mismatch): Don't define.
10135         (lang_f_options): Remove cond-mismatch.
10136         (unsupported_options): Add cond-mismatch.
10137
10138 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
10139
10140         * class.c (handle_using_decl): Reject using of constructor name
10141         of sourcing class. Allow injecting of a method with same name as
10142         nested class. Fixup error messages.
10143
10144 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
10145
10146         * decl2.c (lang_decode_option): Handle -Wformat=2.
10147
10148 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10149
10150         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
10151         initialized_in_class.
10152         (DECL_DEFINED_IN_CLASS_P): Rename to ...
10153         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
10154         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
10155         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
10156         * pt.c (check_default_tmpl_args): Adjust for
10157         DECL_INITIALIZED_IN_CLASS_P.
10158         (instantiate_class_template): Likewise.
10159         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
10160
10161         * class.c (finish_struct): Constify saved_filename.
10162
10163 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10164
10165         * class.c (duplicate_tag_error): Adjust diagnostic.
10166         (finish_struct): Locally set location to start of struct.
10167         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
10168
10169 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10170
10171         * decl.c (struct binding_level): Adjust class_shadowed comments
10172         to reflect reality.
10173         (push_class_level_binding): Adjust comments to reflect reality.
10174         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
10175         Don't set TREE_VALUE on the class_shadowed list.
10176
10177 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10178
10179         * decl2.c (acceptable_java_type): Allow references too.
10180         * init.c (build_java_class_ref): When using the new ABI, search
10181         `class$' and have it mangled with `mangle_decl.'
10182         * mangle.c (write_java_integer_type_codes): New function.
10183         (write_builtin_type): Detect and mangle Java integer and real
10184         types.
10185
10186 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
10187
10188         * decl2.c (grokfield): Don't accept `asm' specifiers for
10189         non-static data members.
10190
10191 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10192
10193         * expr.c (cplus_expand_expr): Don't reset `target'.
10194
10195 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
10196
10197         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
10198
10199 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
10200
10201         * parse.y (template_datadef): Check for error_mark_node.
10202
10203 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
10204
10205         * cp-tree.def (DEFAULT_ARG): Make `x' class.
10206
10207 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
10208
10209         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
10210         (record_builtin_type): Make non-static.
10211         (flag_short_double): Don't declare.
10212         (init_decl_processing): Remove the creation of many tree nodes now
10213         in c_common_nodes_and_builtins.
10214         (build_void_list_node): New function.
10215         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
10216         * cp-tree.h (flag_short_wchar): Don't declare.
10217
10218 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
10219
10220         * call.c (build_conv): Don't use build1 for USER_CONV.
10221         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
10222
10223 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
10224
10225         * lex.c (lang_init): Call c_common_lang_init.
10226
10227 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
10228
10229         * search.c (lookup_fnfields_here): Remove.
10230         (look_for_overrides_r): Use lookup_fnfields_1.
10231         Ignore functions from using declarations.
10232
10233 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
10234
10235         Implement exceptions specifiers for implicit member functions.
10236         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
10237         * method.c (synthesize_exception_spec): New function.
10238         (locate_dtor, locate_ctor, locate_copy): New functions.
10239         (implicitly_declare_fn): Generate the exception spec too.
10240         * search.c (check_final_overrider): Check artificial functions
10241         too.
10242         * typeck2.c (merge_exception_specifiers): New function.
10243
10244 2001-01-03  Jason Merrill  <jason@redhat.com>
10245
10246         * init.c (build_default_init): New fn.
10247         (perform_member_init): Split out from here.
10248         (build_new_1): Use it.  Simplify initialization logic.
10249         (build_vec_init): Take an array, rather than a pointer and maxindex.
10250         Speed up simple initializations.  Don't clean up if we're assigning.
10251         * cp-tree.h: Adjust.
10252         * decl2.c (do_static_initialization): Remove TREE_VEC case.
10253         * parse.y (new_initializer): Return void_zero_node for ().
10254         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
10255         * typeck2.c (digest_init): Only complain about user-written
10256         CONSTRUCTORs.
10257
10258 2000-12-22  Mike Stump  <mrs@wrs.com>
10259
10260         * decl2.c: (max_tinst_depth): Increase to 50.
10261
10262 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
10263
10264         * class.c (invalidate_class_lookup_cache): Zero the
10265         previous_class_values.
10266         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
10267         TREE_INT_CST_HIGH.
10268         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
10269         * decl.c (free_bindings): New variable.
10270         (push_binding): Don't create a new binding if we have one on the
10271         free list.
10272         (pop_binding): Put old bindings on the free list.
10273         (init_decl_processing): Use size_int, not build_int_2.
10274         Register free_bindings as a GC root.
10275         (cp_make_fname_decl): Use size_int, not build_int_2.
10276         (push_inline_template_parms_recursive): Likewise.
10277         (end_template_parm_list): Likewise.
10278         (for_each_template_parm): Do not use walk_tree_without_duplicates.
10279         (tsubst_template_parms): Use size_int, not build_int_2.
10280         (tsubst): Likewise.
10281         * rtti.c (get_vmi_pseudo_type_info): Likewise.
10282
10283 2001-01-02  Richard Henderson  <rth@redhat.com>
10284
10285         * parse.y (asm): Set ASM_INPUT_P.
10286
10287 2001-01-02  Jason Merrill  <jason@redhat.com>
10288
10289         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
10290         for v3 ABI.
10291
10292         * typeck.c (cp_truthvalue_conversion): New fn.
10293         * cvt.c (ocp_convert): Use it.
10294
10295         * cp-tree.h: Lose c-common.c decls.
10296
10297         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
10298         * cvt.c (convert_to_void): Use type_unknown_p.
10299
10300         * typeck.c (strip_all_pointer_quals): Also strip quals from
10301         pointer-to-member types.
10302
10303         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
10304         parse.y as C.
10305
10306         * call.c (build_new_method_call): Do evaluate the object parameter
10307         when accessing a static member.
10308         * typeck.c (build_component_ref): Likewise.
10309
10310 2001-01-02  Andreas Jaeger  <aj@suse.de>
10311
10312         * decl.c (cp_missing_noreturn_ok_p): New.
10313         (init_decl_processing): Set lang_missing_noreturn_ok_p.
10314
10315 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
10316
10317         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
10318
10319 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
10320
10321         * class.c (pushclass): Remove #if 0'd code.
10322         * cp-tree.h (overload_template_name): Remove.
10323         * decl.c (store_bindings): Simplify.
10324         (pop_from_top_level): Likewise.
10325         * pt.c (overload_template_name): Remove.
10326         (instantiate_decl): Don't call push_to_top_level if it's not
10327         needed.
10328
10329 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
10330
10331         * pt.c (register_local_specialization): Don't return a value.
10332         (lookup_template_class): Use move-to-front heuristic when looking
10333         up template instantiations.
10334         (instantiate_decl): Only push_to_top_level when we're actually
10335         going to instantiate the template.
10336
10337 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
10338
10339         * search.c (binfo_for_vtable): Return least derived class, not
10340         most.  Handle secondary vtables.
10341
10342 2000-12-22  Jason Merrill  <jason@redhat.com>
10343
10344         * pt.c (more_specialized): Don't optimize len==0.
10345         (fn_type_unification): If we're adding the return type, increase len.
10346
10347         * typeck.c (build_binary_op): Fix pmf comparison logic.
10348
10349         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
10350         DECL_STATIC_FUNCTION_P.
10351
10352         * semantics.c (genrtl_finish_function): Don't try to jump to
10353         return_label unless it exists.
10354
10355         In partial ordering for a call, ignore parms for which we don't have
10356         a real argument.
10357         * call.c (joust): Pass len to more_specialized.
10358         (add_template_candidate_real): Strip 'this', pass len.
10359         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
10360         (get_bindings_order): New fn.  Pass len down.
10361         (get_bindings_real): Strip 'this', pass len.
10362         (fn_type_unification): Likewise.
10363         (type_unification_real): Succeed after checking 'len' args.
10364         (most_specialized_instantiation): Lose explicit_args parm.
10365         * class.c (resolve_address_of_overloaded_function): Strip 'this',
10366         pass len.
10367
10368 2000-12-21  Jason Merrill  <jason@redhat.com>
10369
10370         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
10371         DECL_TEMPLATE_RESULT.
10372
10373         * search.c (lookup_field_r): Call lookup_fnfields_1, not
10374         lookup_fnfields_here.
10375
10376         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
10377
10378         * call.c (build_object_call): Also allow conversions that return
10379         reference to pointer to function.
10380         (add_conv_candidate): Handle totype being ref to ptr to fn.
10381         (build_field_call): Also allow members of type reference to function.
10382         Lose support for calling pointer to METHOD_TYPE fields.
10383
10384         * error.c (dump_expr): Handle *_CAST_EXPR.
10385
10386         * typeck2.c (build_scoped_ref): Always convert to the naming class.
10387
10388         * tree.c (break_out_cleanups): Lose.
10389         * cp-tree.h: Remove prototype.
10390         * typeck.c (build_component_ref): Don't break_out_cleanups.
10391         (build_compound_expr): Likewise.
10392         * semantics.c (finish_expr_stmt): Likewise.
10393
10394 2000-12-20  Richard Henderson  <rth@redhat.com>
10395
10396         * cp-tree.h: Update declarations.
10397         * decl.c (finish_case_label): Return the new stmt node.
10398         * semantics.c (finish_goto_stmt): Likewise.
10399         (finish_expr_stmt, finish_return_stmt): Likewise.
10400         (finish_break_stmt, finish_continue_stmt): Likewise.
10401         (finish_asm_stmt): Likewise.
10402         * parse.y (already_scoped_stmt): Set STMT_LINENO.
10403         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
10404         (simple_if, simple_stmt): Return the new stmt node.
10405         (save_lineno): New.
10406
10407 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
10408
10409         * cp-tree.h: Don't declare warn_long_long.
10410
10411 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10412
10413         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
10414         IS_AGGR_TYPE.
10415
10416 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10417
10418         * pt.c (unify): Handle when both ARG and PARM are
10419         BOUND_TEMPLATE_TEMPLATE_PARM.
10420
10421 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10422
10423         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
10424         DECL_TEMPLATE_PARM_P.
10425
10426 2000-12-15  Jason Merrill  <jason@redhat.com>
10427
10428         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
10429
10430         * init.c (build_new_1): Don't strip quals from type.
10431
10432         * decl.c (pushdecl): Don't check for linkage on a non-decl.
10433
10434         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
10435
10436         * call.c (build_new_function_call): Lose space before paren in
10437         error message.
10438         (build_new_method_call): Likewise.
10439
10440         * typeck2.c (build_m_component_ref): Propagate quals from datum.
10441
10442 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10443
10444         * pt.c (check_explicit_specialization): Propagate default
10445         function arguments to explicit specializations.
10446
10447 2000-12-13  DJ Delorie  <dj@redhat.com>
10448
10449         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
10450         and <? operators.
10451
10452 2000-12-08  Jason Merrill  <jason@redhat.com>
10453
10454         * error.c (dump_function_name): Don't let the user see __comp_ctor.
10455
10456         Clean up copy-initialization in overloading code.
10457         * call.c (build_user_type_conversion_1): Die if we are asked to
10458         convert to the same or a base type.
10459         (implicit_conversion): Avoid doing so.  Lose reference binding code.
10460         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
10461         direct-initialization.  Also do direct-init part of copy-init.
10462         (build_user_type_conversion): Don't provide context to convert_like.
10463         * cvt.c (ocp_convert): build_user_type_conversion will now provide
10464         the constructor call for copy-init.
10465
10466         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
10467         instantiation of a member template.
10468         (do_decl_instantiation): Not here.
10469
10470 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
10471
10472         * class.c (check_field_decls): Don't special case anonymous
10473         fields in error messages.
10474         (note_name_declared_in_class): Use %D on diagnostic.
10475
10476         * tree.c (pod_type_p): Use strip_array_types.
10477         (cp_valid_lang_attribute): Likewise.
10478         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
10479         multiple evaluations.
10480         (cp_has_mutable_p): Use strip_array_types.
10481
10482 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
10483
10484         * cp-tree.h (sufficient_parms_p): Declare new function.
10485         * call.c (sufficient_parms_p): New function, broken out of ...
10486         (add_function_candidate): ... here. Use it.
10487         (add_conv_candidate): Use it.
10488         * decl.c (grok_ctor_properties): Use it.
10489
10490 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
10491
10492         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
10493
10494 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10495
10496         * decl2.c (lang_decode_option): Handle -Wformat-security.
10497
10498 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10499
10500         * pt.c (verify_class_unification): New function.
10501         (get_class_bindings): Use it.
10502         (try_class_unification): Tidy.
10503         (unify): Handle when argument of a template-id is not
10504         template parameter dependent.
10505         (template_args_equal): Handle when TREE_CODE's do not match.
10506
10507 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
10508
10509         * lang-specs.h (c++): When invoking the stand-alone preprocessor
10510         for -save-temps, pass all relevant -Defines to it, and then don't
10511         pass them to cc1plus.
10512
10513 2000-12-05  Will Cohen  <wcohen@redhat.com>
10514
10515         * decl.c (finish_case_label): Cleared
10516         more_cleanups_ok in surrounding function scopes.
10517         (define_label): Likewise.
10518
10519 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
10520
10521         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
10522         (get_matching_virtual): Remove.
10523         (look_for_overrides): Declare new function.
10524         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
10525         DECL_VINDEX here.
10526         * class.c (check_for_override): Move base class iteration code
10527         to look_for_overrides.
10528         * search.c (next_baselink): Remove.
10529         (get_virtuals_named_this): Remove.
10530         (get_virtual_destructor): Remove.
10531         (tree_has_any_destructors_p): Remove.
10532         (struct gvnt_info): Remove.
10533         (check_final_overrider): Remove `virtual' from error messages.
10534         (get_matching_virtuals): Remove. Move functionality to ...
10535         (look_for_overrides): ... here, and ...
10536         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
10537         to be overriding.
10538
10539 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
10540
10541         * typeck.c (get_delta_difference): If via a virtual base,
10542         return zero.
10543         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
10544         adjustment.
10545
10546 2000-12-04  Richard Henderson  <rth@redhat.com>
10547
10548         * error.c (dump_tree): Use output_add_string not OB_PUTS.
10549
10550 2000-12-04  Jason Merrill  <jason@redhat.com>
10551
10552         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
10553         (write_builtin_type): Pass intSI_type_node and the like through
10554         type_for_mode.
10555         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
10556         Pass intSI_type_node and the like through type_for_mode.
10557         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
10558         * pt.c (tsubst, unify): Likewise.
10559         * tree.c (walk_tree): Likewise.
10560         * error.c (dump_type): Likewise.
10561         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
10562
10563         * Make-lang.in: Tweak top comment for emacs.
10564         (cp/TAGS): Restore.
10565
10566         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
10567
10568         * class.c (clone_function_decl): Robustify.
10569
10570 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
10571
10572         * decl.c (store_bindings): Only search in the non modified
10573         old_bindings for duplicates.
10574
10575 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
10576
10577         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
10578         TYPE_POLYMORPHIC_P.
10579
10580         * typeck.c (build_static_cast): Remove unused variable.
10581
10582 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10583
10584         * pt.c: Fix typo in comment.
10585
10586 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
10587
10588         * decl2.c (warn_format): Remove definition.
10589         (lang_decode_option): Handle -Wformat-nonliteral,
10590         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
10591
10592 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
10593
10594         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
10595         (init_decl_processing): Don't create string_type_node,
10596         const_string_type_node, wint_type_node, intmax_type_node,
10597         uintmax_type_node, default_function_type, ptrdiff_type_node and
10598         unsigned_ptrdiff_type_node.  Adjust position of call to
10599         c_common_nodes_and_builtins.
10600         (identifier_global_value): New function.
10601
10602 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
10603
10604         * call.c (standard_conversion): Reject pointer to member
10605         conversions from ambiguous, inaccessible or virtual bases.
10606         * typeck.c (build_static_cast): Don't check pointers to members
10607         specially.
10608
10609 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
10610
10611         * method.c (do_build_copy_constructor): Preserve cv
10612         qualifications when accessing source object members.
10613         (do_build_assign_ref): Likewise. Remove separate diagnostics for
10614         unnamed fields.
10615
10616 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
10617
10618         * method.c (do_build_assign_ref): Construct appropriately
10619         CV-qualified base reference. Don't allow const casts in base
10620         conversion.
10621
10622 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
10623
10624         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
10625         incomplete return type.
10626
10627 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10628
10629         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
10630         * semantics.c (finish_base_specifier): Accept a _TYPE not a
10631         _DECL.
10632
10633 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10634
10635         * spew.c (yyerror): Cope if yylval.ttype is NULL.
10636
10637 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10638
10639         * decl.c (grokdeclarator): Diagnose undefined template contexts.
10640
10641 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10642
10643         * decl.c (grokdeclarator): Do type access control on friend
10644         class.
10645
10646 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
10647
10648         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
10649         bison parser ickiness.
10650         * pt.c (tsubst_friend_function): Enter namespace scope when
10651         tsubsting the function name.
10652         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
10653
10654 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
10655
10656         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
10657         * cvt.c (cp_convert_to_pointer): Add force parameter.
10658         Allow conversions via virtual base if forced.
10659         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
10660         (ocp_convert): Likewise.
10661         * search.c (binfo_from_vbase): Return the virtual base's binfo.
10662         * typeck.c (get_delta_difference): Adjust handling of virtual
10663         bases.
10664
10665 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
10666
10667         * tree.c (struct list_hash): Remove.
10668         (list_hash_table): Make it be an htab.
10669         (struct list_proxy): New type.
10670         (list_hash_eq): New function.
10671         (list_hash_pieces): Renamed from ...
10672         (list_hash): ... this.
10673         (list_hash_lookup): Remove.
10674         (list_hash_add): Remove.
10675         (hash_tree_cons): Use the generic hashtable.
10676         (mark_list_hash): Remove.
10677         (init_tree): Create the hashtable.
10678
10679 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
10680
10681         * method.c (build_mangled_C9x_name): Rename to
10682         build_mangled_C99_name.  Change C9X references in comments to
10683         refer to C99.
10684
10685 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
10686
10687         * parse.y (unary_expr): Move VA_ARG from here ...
10688         (primary): ... to here.
10689
10690 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
10691
10692         * semantics.c (finish_id_expr): If type is error_mark, return
10693         error_mark.
10694
10695 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
10696
10697         * pt.c (lookup_template_class): Simplify loop exit constructs.
10698         Cope when there is no partial instantiation of a template
10699         template member.
10700
10701 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
10702
10703         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
10704
10705 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
10706
10707         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
10708         prefix.
10709
10710         * pt.c (do_decl_instantiate): Explicitly clone constructors and
10711         destructors that haven't already been cloned.
10712
10713 2000-11-20  Richard Henderson  <rth@redhat.com>
10714
10715         * parse.y (yyparse_1): Rename the parser entry point.
10716
10717 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
10718
10719         * mangle.c (write_name): Use <unscoped-name> for names directly in
10720         function scope.
10721         (write_unscoped_name): Accept names directly in function scope.
10722
10723 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
10724
10725         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
10726         * parse.y (extdef): Add EXPORT reduction.
10727         * spew.c (yylex): Don't skip export here.
10728
10729 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
10730
10731         * decl.c (init_decl_processing): Correct name of pure virtual
10732         function under the new ABI.
10733         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
10734         (throw_bad_typeid): Likewise for bad typeid function.
10735
10736 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
10737
10738         * decl.c (grokparms): Don't even function types of `void' type,
10739         either.
10740         * mangle.c (write_type): Don't crash when confronted with the
10741         error_mark_node.
10742
10743         * decl.c (grokparms): Don't create parameters of `void' type.
10744
10745 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
10746
10747         * lex.c (mark_impl_file_chain): Delete.
10748         (init_parse): Remove call to ggc_add_string_root.  No need to
10749         ggc_strdup a string constant.  Do not add impl_file_chain to GC
10750         roots.
10751         (handle_pragma_implementation): No need to ggc_strdup main_filename.
10752
10753 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
10754
10755         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
10756
10757 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
10758
10759         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
10760         * decl.c (grokdeclarator): Don't reject void parms here.
10761         (require_complete_types_for_parms): Simplify, use
10762         complete_type_or_else.
10763         (grokparms): Remove bitrot. Remove funcdef parm.
10764         Deal with ellipsis parm lists here.
10765         * semantics.c (finish_parmlist): Don't append void_list_node
10766         here. Set PARMLIST_ELLIPSIS_P.
10767
10768 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
10769
10770         * typeck2.c (incomplete_type_error): Reorganize to avoid
10771         excessive diagnostics.
10772
10773 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
10774
10775         * lex.c (struct impl_files, internal_filename): Constify a char *.
10776
10777 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
10778
10779         * mangle.c (write_special_name_constructor): Don't generate
10780         assembler junk when confronted with an old-style constructor.
10781         (write_special_name_destructor): Likewise.
10782         (mangle_decl_string): Do it here instead.
10783
10784 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
10785
10786         * call.c (op_error): Make error messages clearer.
10787
10788 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
10789
10790         * decl.c (wrapup_globals_for_namespace): Don't mark things
10791         TREE_ASM_WRITTEN when they're not.
10792
10793 2000-11-15  Jason Merrill  <jason@redhat.com>
10794
10795         * typeck2.c (friendly_abort): Uncount the error before handing
10796         off to fancy_abort.
10797
10798 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
10799
10800         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
10801
10802 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
10803
10804         * class.c (build_vtbl_initializer): Fix typo in comment.
10805         * typeck.c (expr_sizeof): Don't crash on errors.
10806
10807 2000-11-14  Jim Wilson  <wilson@redhat.com>
10808
10809         * lang-specs.h: Add %2 after %(cc1_options).
10810
10811 2000-11-14  Richard Henderson  <rth@redhat.com>
10812
10813         * typeck.c (c_sizeof): Be strict about casting result value
10814         back to c_size_type_node.
10815         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
10816
10817 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10818
10819         * typeck.c (build_unary_op): Use boolean_increment from
10820         c-common.c, moving the relevant code there.
10821
10822 2000-11-11  Jason Merrill  <jason@redhat.com>
10823
10824         * typeck.c (mark_addressable): Don't call put_var_into_stack.
10825
10826         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
10827         in inlines.
10828
10829 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10830
10831         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
10832         * lex.c (copy_lang_decl): Likewise.
10833
10834 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
10835
10836         * dump.c (cp_dump_tree): Don't dump function bodies here.
10837
10838         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
10839         (dump.o): Update dependency list.
10840         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
10841         (flag_dump_translation_unit): Likewise.
10842         (CP_TYPE_QUALS): Adjust definition.
10843         (DECL_C_BIT_FIELD): Remove.
10844         (SET_DECL_C_BIT_FIELD): Likewise.
10845         (CLEAR_DECL_C_BIT_FIELD): Likewise.
10846         (add_maybe_template): Likewise.
10847         (strip_array_types): Likewise.
10848         (dump_node_to_file): Likewise.
10849         (cp_dump_tree): New function.
10850         * decl.c (init_decl_processing): Set lang_dump_tree.
10851         * decl2.c (flag_dump_translation_unit): Remove.
10852         * dump.c: Move most of it to ../c-dump.c.
10853         (cp_dump_tree): New function.
10854         * pt.c (add_maybe_template): Remove.
10855         * typeck.c (strip_array_types): Likewise.
10856
10857 2000-11-07  Eric Christopher  <echristo@redhat.com>
10858
10859         * decl.c (init_decl_processing): Change definition of
10860         __wchar_t to wchar_t.  Remove artificial declaration of
10861         wchar_t.
10862         * lex.c: Change instances of __wchar_t to wchar_t.
10863
10864 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
10865
10866         * lex.c (do_identifier): Don't lookup_name for operators.
10867         * parse.y (operator): Save looking_for_typename.
10868         (unoperator): Restore it.
10869         * spew.c (frob_opname): Use nth_token for lookahead.
10870
10871 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
10872
10873         * decl.c (grok_op_properties): Always use coerce_new_type and
10874         coerce_delete_type.
10875         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
10876         exception specification. Tidy up.
10877         (coerce_delete_type): Preserve exception specification. Tidy up.
10878
10879 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10880
10881         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
10882         (push_binding_level), error.c (cp_tree_printer), pt.c
10883         (process_partial_specialization, tsubst_template_arg_vector),
10884         search.c (lookup_member): Use memset () instead of bzero ().
10885
10886 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
10887
10888         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
10889
10890 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
10891
10892         * Make-lang.in (c++.distdir): Remove.
10893
10894 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
10895
10896         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
10897         declarations from different namespaces to be combined.
10898
10899 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
10900
10901         * decl.c: Include tm_p.h.
10902
10903 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
10904
10905         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
10906
10907 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
10908
10909         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
10910         (build_overload_value), repo.c (open_repo_file), xref.c
10911         (open_xref_file): Use strchr () and strrchr () instead of index ()
10912         and rindex ().
10913
10914 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
10915
10916         * call.c (build_over_call): Call fold on the CALL_EXPR.
10917
10918 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
10919
10920         * error.c (dump_template_decl): Separate template hearders with
10921         space not comma.
10922
10923 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
10924
10925         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
10926         TS_* flags with corresponding TFF_*.  Adjust prototypes of
10927         functions (which used to take a tree_string_flags) to take an int.
10928
10929         * cp-tree.h (enum tree_string_flags): Remove
10930         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
10931         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
10932         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
10933         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
10934         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
10935         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
10936         (type_as_string, decl_as_string, expr_as_string,
10937         context_as_string): Adjust prototype.
10938
10939         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
10940         instead of TS_PLAIN.
10941
10942         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
10943         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
10944         plain `0'.
10945
10946 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
10947
10948         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
10949         (linkage_kind): New enumeration.
10950         (decl_linkage): New function.
10951         * decl2.c (comdat_linkage): Extend comment.
10952         * error.c (dump_function_decl): Print the arguments used to
10953         instantiate a template, even when not printing the type of the
10954         function.
10955         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
10956         not TREE_PUBLIC, to test for external linkage.
10957         * tree.c (decl_linkage): New function.
10958
10959 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
10960
10961         * pt.c (instantiate_decl): Always instantiate static data members
10962         initialized in-class.
10963
10964 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
10965
10966         * Make-lang.in: Move all build rules here from Makefile.in,
10967         adapt to new context.  Wrap all rules that change the current
10968         directory in parentheses.  Expunge all references to $(P).
10969         When one command depends on another and they're run all at
10970         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
10971         all object-file generation rules.  Delete obsolete variables.
10972
10973         * Makefile.in: Delete.
10974         * config-lang.in: Delete outputs= line.
10975
10976 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
10977
10978         * error.c (dump_function_decl): Print no space between
10979         `ptr-operator' the `type-specifier' of the return type.
10980         (dump_type_prefix): Make sure we put space at the appropriate
10981         place.
10982
10983 2000-10-23  Jason Merrill  <jason@redhat.com>
10984
10985         * call.c (equal_functions): Also call decls_match for extern "C" fns.
10986
10987 2000-10-22  Jason Merrill  <jason@redhat.com>
10988
10989         * call.c (build_conditional_expr): Use ocp_convert to force
10990         rvalue conversion.
10991
10992 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
10993
10994         * call.c (standard_conversion): Use RVALUE_CONVs for all
10995         expressions that satisfy lvalue_p, not just those that satisfy
10996         real_lvalue_p.
10997
10998         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
10999
11000         * typeck.c (c_sizeof): Return an expression of `size_t' type,
11001         not one with TYPE_IS_SIZETYPE set.
11002         (dubious_conversion_warnings): Remove special-case code.
11003
11004 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
11005
11006         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
11007         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
11008         (dump_type_prefix): Print vector-of-int as 'int vector'.
11009         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
11010         * tree.c (walk_tree): Handle VECTOR_TYPE.
11011
11012         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
11013
11014 2000-10-21  Jason Merrill  <jason@redhat.com>
11015
11016         * parse.y (operator): Set got_object from got_scope.
11017         Set looking_for_typename.
11018         * decl.c (lookup_name_real): Clear val after setting from_obj.
11019         Reorganize diagnostic.
11020
11021 2000-10-20  Jason Merrill  <jason@redhat.com>
11022
11023         * tree.c (walk_tree): Don't walk into default args.
11024
11025         * error.c (dump_expr): Use host_integerp.
11026
11027 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
11028
11029         * typeck2.c (abstract_virtuals_error): Use "because" instead of
11030         "since" in error message.
11031
11032 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11033
11034         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
11035
11036 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
11037
11038         * decl.c (revert_static_member_fn): Fixed typo.
11039
11040 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
11041
11042         * class.c (subobject_offset_fn): New type.
11043         (dfs_record_base_offsets): Remove.
11044         (record_base_offsets): Likewise.
11045         (dfs_search_base_offsets): Likewise.
11046         (record_subobject_offset): New function.
11047         (check_subobject_offset): Likewise.
11048         (walk_subobject_offsets): Likewise.
11049         (record_subobject_offsets): Likewise.
11050         (layout_conflict_p): Reimplement.
11051         (layout_nonempty_base_or_field): Correct handling of type
11052         conflicts during layout.
11053         (layout_empty_base): Likewise.
11054         (build_base_field): Adjust to handle new representation of empty
11055         base offset table.
11056         (build_base_fields): Likewise.
11057         (layout_virtual_bases): Likewise.
11058         (splay_tree_compare_integer_csts): New function.
11059         (layout_class_type): Use a splay_tree, rather than a varray, to
11060         represent the offsets of empty bases.
11061
11062         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
11063         * decl.c (select_decl): Don't return declarations that are
11064         DECL_ANTICIPATED.
11065
11066 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
11067
11068         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
11069         (fake_std_node): New macro.
11070         * decl.c (in_std): Rename to ...
11071         (in_fake_std): ... this.
11072         (flag_no_builtin): Remove.
11073         (flag_no_nonansi_builtin): Likewise.
11074         (walk_namespaces_r): Use fake_std_node.
11075         (push_namespace): Use std_identifier.
11076         (pop_namespace): Use in_fake_std.
11077         (lookup_name_real): Use fake_std_node.
11078         (init_decl_processing): When -fhonor-std, create the `std'
11079         namespace.  Don't create a dummy fake_std_node in that case.
11080         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
11081         (builtin_function): Put builtins whose names don't begin
11082         with `_' in the std namespace.
11083         * decl2.c (flag_no_builtin): Remove.
11084         (flag_no_nonansi_builtin): Likewise.
11085         (set_decl_namespace): Use fake_std_node.
11086         (validate_nonmember_using_decl): Likewise.
11087         (do_using_directive): Likewise.
11088         (handle_class_head): Likewise.
11089         * dump.c (dequeue_and_dump): Likewise.
11090         * except.c (init_exception_processing): Use std_identifier.
11091         * init.c (build_member_call): Use fake_std_node.
11092         * rtti.c (init_rtti_processing): Use std_identifier.
11093
11094 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
11095
11096         * cp-tree.h (back_end_hook): Remove declaration.
11097         * decl2.c (back_end_hook): Remove definition.
11098
11099         * dump.c (dequeue_and_dump): Dump TREE_USED.
11100
11101 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
11102
11103         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
11104
11105 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
11106
11107         * decl.c (WINT_TYPE): Define.
11108         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
11109         c_size_type_node, signed_size_type_node and wint_type_node.
11110
11111 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
11112
11113         * decl2.c (warn_missing_format_attribute): New variable.
11114         (lang_decode_option): Decode -Wmissing-format-attribute.
11115
11116 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
11117
11118         * typeck.c (qualify_type): Remove.
11119         (composite_pointer_type): Fix handling of conversions to `cv void*'.
11120
11121 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11122
11123         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
11124
11125 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11126
11127         * Makefile.in (parse.c, parse.h): Create atomically.
11128
11129 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
11130
11131         * class.c (current_obstack): Remove.
11132         * decl.c (ggc_p): Remove.
11133         (start_decl): Don't use decl_tree_cons.
11134         (grokdeclarator): Don't use build_decl_list.
11135         (start_function): Don't use decl_tree_cons.
11136         (finish_function): Don't mess with obstacks.
11137         * decl2.c (grok_x_components): Don't use build_decl_list.
11138         * lex.c (make_call_declarator): Don't call decl_tree_cons.
11139         (implicitly_declare_fn): Don't call build_decl_list.
11140         * parse.y (frob_specs): Don't call build_decl_list or
11141         decl_tree_cons.
11142         (expr_or_declarator_intern): Don't call decl_tree_cons.
11143         (primary): Don't call build_decl_list.
11144         (fcast_or_absdcl): Likewise.
11145         (typed_declspecs): Don't call decl_tree_cons.
11146         (reserved_declspecs): Don't call build_decl_list.
11147         (declmods): Likewise.
11148         (reserved_typespecquals): Likewise.
11149         (aggr): Likewise.
11150         (new_type_id): Likewise.
11151         (cv_qualifiers): Likewise.
11152         (after_type_declarator_intern): Likewise.
11153         (notype_declarator_intern): Likewise.
11154         (absdcl_intern): Likewise.
11155         (named_parm): Likewise.
11156         * pt.c (most_specialized_class): Likewise.
11157         * repo.c (temporary_obstack): Make it a structure, not a pointer.
11158         (init_repo): Initialize it.
11159         * search.c (current_obstack): Remove.
11160         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
11161
11162 2000-10-09  Richard Henderson  <rth@cygnus.com>
11163
11164         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
11165         (c++ language support bits for libgcc): Remove.
11166         (c++.clean): Remove cplib2.txt cleanup.
11167         * config-lang.in (headers, lib2funcs): Remove.
11168
11169         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
11170         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
11171         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
11172         * inc/new.h, inc/typeinfo: Remove files.
11173
11174 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
11175
11176         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
11177         defined.
11178         (init_decl_processing): Initialize intmax_type_node and
11179         uintmax_type_node.
11180
11181 2000-10-06  Richard Henderson  <rth@cygnus.com>
11182
11183         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
11184         (original_result_rtx): Remove.
11185         * decl.c (save_function_data): Don't clear x_result_rtx.
11186         (mark_lang_function): Don't mark it either.
11187         * expr.c (fixup_result_decl): Remove.
11188         * semantics.c (genrtl_named_return_value): Frob the return decl
11189         before calling emit_local_var.
11190         (genrtl_finish_function): Don't call fixup_result_decl.
11191         Always emit the jump to return_label.
11192
11193 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
11194
11195         * pt.c (lookup_template_class): Set current access for enum.
11196         (tsubst_enum): Set file & line for enum decl.
11197
11198         * spew.c (yylex): Remove unused variable.
11199
11200 2000-10-05  Richard Henderson  <rth@cygnus.com>
11201
11202         * semantics.c (genrtl_finish_function): Don't init or check
11203         can_reach_end; remove noreturn and return value checks.
11204
11205 2000-10-05  Tom Tromey  <tromey@cygnus.com>
11206
11207         * init.c (build_java_class_ref): Use `build_static_name' with a
11208         suffix, not a prefix, to build the class object's name.
11209
11210 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11211
11212         * cp-tree.h (access_kind): Fix comment typo.
11213         * decl2.c (grokfield): Fix diagnostic typo.
11214         * semantics.c (finish_template_type): Fix comment typo.
11215         (finish_qualified_object_call_expr): Likewise.
11216
11217 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11218
11219         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
11220         tsubsting fails.
11221
11222 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11223
11224         * spew.c (frob_id): New static function.
11225         (frob_opname): Use it.
11226         (yylex): Use it.
11227
11228 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
11229
11230         * decl.c (lang_mark_false_label_stack): Remove.
11231         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
11232
11233 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
11234
11235         * gxxint.texi: Use @email for formatting email addresses.
11236
11237 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
11238
11239         * error.c: Remove direct obstack manipulation.  Replace with
11240         output_buffer-based formatting.  Adjust calls to removed macros.
11241         (obstack_chunk_alloc, obstack_chunk_free): Remove.
11242         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
11243         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
11244
11245 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
11246
11247         * ir.texi: Move to ../c-tree.texi.
11248
11249 2000-09-20  Jason Merrill  <jason@redhat.com>
11250
11251         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
11252
11253 2000-09-21  Andreas Jaeger  <aj@suse.de>
11254
11255         * errfn.c: Move declaration of cp_printer and cp_printers to ...
11256         * cp-tree.h: ... here.
11257
11258         * error.c: Remove declaration of cp_printer.
11259
11260 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
11261
11262         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
11263
11264 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
11265
11266         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
11267         users.
11268
11269 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
11270
11271         * decl.c (start_function): Robustify.
11272
11273 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11274
11275         * cp-tree.h (check_function_format): Accept a `status' parameter.
11276
11277         * call.c, typeck.c: Updates calls to `check_function_format'.
11278
11279 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
11280
11281         * decl2.c (handle_class_head): Always push some scope even
11282         in the error case.
11283
11284 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
11285
11286         * cp-tree.h (struct cp_language_function): Remove
11287         x_scope_stmt_stack and name_declared.
11288         (current_scope_stmt_stack): Remove.
11289         (function_name_declared_p): New macro.
11290         (struct lang_decl_flags): Use c_lang_decl as a base class.
11291         (context): Remove.
11292         (struct lang_decl): Replace saved_tree with context.
11293         (DECL_FRIEND_CONTEXT): Adjust accordingly.
11294         (SET_DECL_FRIEND_CONTEXT): Likewise.
11295         (DECL_VIRTUAL_CONTEXT): Likewise.
11296         (DECL_SAVED_TREE): Remove.
11297         (C_DECLARED_LABEL_FLAG): Likewise.
11298         (cplus_expand_expr_stmt): Don't declare.
11299         (add_decl_stmt): Likewise.
11300         (add_scope_stmt): Likewise.
11301         * decl.c (mark_stmt_tree): Remove.
11302         (case_compare): Likewise.
11303         (finish_case_label): Use c_add_case_label.
11304         (init_decl_processing): Set more language-specific hooks.
11305         (build_enumerator): Fix typo in comment.
11306         (cplus_expand_expr_stmt): Remove.
11307         (mark_lang_function): Use mark_c_language_function.
11308         (lang_mark_tree): Use c_mark_lang_decl.
11309         * decl2.c: Change order of inclusion.
11310         * except.c: Likewise.
11311         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
11312         back on c_expand_expr.
11313         * friend.c: Include expr.h.
11314         * init.c: Change order of inclusion.
11315         * Makefile.in: Update dependencies.
11316         * lex.h (free_lang_decl_chain): Remove.
11317         * optimize.c (maybe_clone_body): Use function_name_declared_p.
11318         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
11319         it doesn't exist.
11320         (instantiate_decl): Use function_name_declared_p.
11321         * semantics.c (lang_expand_expr_stmt): Remove.
11322         (set_current_function_name_declared): Likewise.
11323         (current_function_name_declared): Likewise.
11324         (begin_compound_stmt): Use function_name_declared_p.
11325         (add_decl_stmt): Remove.
11326         (setup_vtbl_ptr): Use function_name_declared_p.
11327         (add_scope_stmt): Remove.
11328         (current_scope_stmt_stack): New function.
11329         (cp_expand_stmt): Don't handle SCOPE_STMTs.
11330         (expand_body): Use function_name_declared_p.
11331         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
11332         * typeck.c: Change order of includes.
11333         (convert_sequence): Remove.
11334
11335 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
11336
11337         * lex.c (reswords): Add _Complex.
11338
11339 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11340
11341         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
11342
11343 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
11344
11345         * init.c (begin_init_stmts): Don't use // comments.
11346
11347 2000-09-12  Jason Merrill  <jason@redhat.com>
11348
11349         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
11350         all non-extern arrays.
11351
11352         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
11353         typenames, too.  Downgrade complaint to pedwarn.
11354         (xref_tag): Warn about surprising behavior of 'friend struct T'.
11355         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
11356         'class This::Inherited'.
11357
11358 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
11359
11360         * decl.c (finish_case_label): Given the LABEL_DECL a
11361         DECL_CONTEXT.
11362
11363 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
11364
11365         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
11366         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
11367         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
11368         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
11369         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
11370         New macros.
11371         (sorry_for_unsupported_tree, print_scope_operator,
11372         print_left_paren, print_right_paren, print_left_bracket,
11373         print_right_bracket, print_whitespace): Likewise.
11374         (aggr_variety): Rename to class_key_or_enum.
11375         (print_type): Rename to print_type_id.
11376         (print_type_specifier_seq, print_simple_type_specifier,
11377         print_elaborated_type_specifier,
11378         print_rest_of_abstract_declarator,
11379         print_parameter_declaration_clause, print_exception_specification,
11380         print_nested_name_specifier, print_template_id,
11381         typedef_original_name,  print_template_argument_list_start,
11382         print_template_argument_list_end): New functions.
11383
11384 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
11385
11386         * ir.texi: Add more documentation.
11387
11388 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
11389
11390         * cp-tree.h (struct saved_scope): Remove x_function_parms.
11391         (current_function_parms): Don't define.
11392         (struct cp_language_function): Remove parms_stored.
11393         (current_function_just_assigned_this): Don't define.
11394         (current_function_parms_stored): Likewise.
11395         (static_ctors): Declare.
11396         (static_dtors): Likewise.
11397         (SF_EXPAND): Don't define.
11398         (expand_start_early_try_stmts): Remove declaration.
11399         (store_parm_decls): Likewise.
11400         * decl.c (static_ctors): Don't declare.
11401         (static_dtors): Likewise.
11402         (struct binding_level): Remove this_block.
11403         (poplevel): Remove dead code.
11404         (set_block): Likewise.
11405         (mark_binding_level): Don't mark this_block.
11406         (mark_saved_scope): Don't mark x_function_parms.
11407         (init_decl_processing): Don't add current_function_parms as a GC
11408         root.
11409         (check_function_type): Change prototype.
11410         (start_function): Remove RTL-generation code.
11411         (expand_start_early_try_stmts): Remove.
11412         (store_parm_decls): Give it internal linkage.  Remove
11413         RTL-generation code.
11414         (finish_function): Remove RTL-generation code.
11415         * decl2.c (static_ctors): Fix formatting.
11416         (static_dtors): Likewise.
11417         * method.c (use_thunk): Don't call store_parm_decls.
11418         (synthesize_method): Likewise.
11419         * optimize.c (maybe_clone_body): Likewise.
11420         * parse.y (fn.def2): Likewise.
11421         (.set_base_init): Likewise.
11422         (nodecls): Likewise.
11423         * pt.c (instantiate_decl): Likewise.
11424         * rtti.c (synthesize_tinfo_fn): Likewise.
11425         * semantics.c (genrtl_try_block): Simplify.
11426         (expand_body): Use genrtl_start_function and
11427         genrtl_finish_function.
11428         (genrtl_start_function): New function.
11429         (genrtl_finish_function): Likewise.
11430
11431 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
11432
11433         * error.c (cp_tree_printer, case 'P'): Append break.
11434
11435 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
11436
11437         * cp-tree.h (frob_opname): Declare.
11438         * parse.y (saved_scopes): New static variable.
11439         (cp_parse_init): Adjust.
11440         (do_id): If lastiddecl is NULL, do do_identifier.
11441         (operator): Save scope information.
11442         (unoperator): New reduction. Restore scope information.
11443         (operator_name): Append unoperator. Call frob_opname.
11444         * spew.c (frob_opname): Define.
11445
11446 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
11447
11448         * decl.c, rtti.c: Include defaults.h if not already included.
11449         Don't define the *_TYPE_SIZE macros.
11450
11451 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
11452
11453         * cp-tree.h (push_switch): Change prototype.
11454         (check_cp_case_value): Remove declaration.
11455         (decl_constant_value): Likewise.
11456         * decl.c (struct cp_switch): Add switch_stmt and cases.
11457         (case_compare): New function.
11458         (push_switch): Set switch_stmt.  Initialize cases.
11459         (pop_switch): Clean up cases.
11460         (define_case_label): Rename to ...
11461         (finish_case_label): ... this.  Do semantic analysis for case
11462         labels here.
11463         (start_function): Correct comment.
11464         * decl2.c (check_cp_case_value): Remove.
11465         * expr.c (do_case): Remove.
11466         * pt.c (tsubst_expr): Adjust call to finish_case_label.
11467         * semantics.c (genrtl_do_poplevel): Remove declaration.
11468         (RECHAIN_STMTS): Remove.
11469         (finish_break_stmt): Use build_break_stmt.
11470         (finish_continue_stmt): Use build_continue_stmt.
11471         (finish_switch_cond): Adjust condition here, rater than in
11472         c_expand_start_case.
11473         (finish_case_label): Remove.
11474         * typeck.c (c_expand_return): Remove.
11475         (c_expand_start_case): Likewise.
11476
11477 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
11478
11479         * ir.texi: Document type nodes.
11480
11481 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
11482
11483         * cp-tree.h (init_cp_semantics): Declare.
11484         (genrtl_try_block): Don't declare.
11485         (genrtl_handler): Likewise.
11486         (genrtl_catch_block): Likewise.
11487         (genrtl_ctor_stmt): Likewise.
11488         (genrtl_subobject): Likewise.
11489         (genrtl_do_poplevel): Likewise.
11490         (genrtl_named_return_value): Likewise.
11491         * lex.c (init_parse): Call init_cp_semantics.
11492         * semantics.c (genrtl_try_block): Give it internal linkage.
11493         (genrtl_handler): Likewise.
11494         (genrtl_catch_block): Likewise.
11495         (genrtl_ctor_stmt): Likewise.
11496         (genrtl_subobject): Likewise.
11497         (genrtl_do_poplevel): Likewise.
11498         (genrtl_named_return_value): Likewise.
11499         (lang_expand_stmt): Rename to ...
11500         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
11501         (init_cp_semantics): Define.
11502
11503         * decl.c (initialize_local_var): Remove RTL-generating code.
11504         * semantics.c (genrtl_try_block): Fix formatting.
11505
11506         Move statement-tree facilities from C++ to C front-end.
11507         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
11508         (void_zero_node): Remove.
11509         (stmt_tree): Likewise.
11510         (scope_chain): Adjust.
11511         (language_function): Rename to cp_language_function.
11512         (cp_function_chain): Adjust.
11513         (current_stmt_tree): Remove.
11514         (last_tree): Likewise.
11515         (last_expr_type): Likewise.
11516         (struct lang_decl): Adjust.
11517         (STMT_IS_FULL_EXPR_P): Remove.
11518         (add_tree): Remove.
11519         (begin_stmt_tree): Likewise.
11520         (finish_stmt_tree): Likewise.
11521         (walk_tree_fn): Likewise.
11522         (walk_stmt_tree): Likewise.
11523         * class.c (finish_struct): Replace use of add_tree with add_stmt.
11524         * decl.c (mark_stmt_tree): Adjust type.
11525         (init_decl_processing): Don't build void_zero_node.
11526         (initialize_local_var): Adjust usage of current_stmt_tree.
11527         (finish_enum): Use add_stmt, not add_tree.
11528         (save_function_data): Adjust use of language_function.
11529         (finish_constructor_body): Use add_stmt, not add_tree.
11530         (finish_destructor_body): Likewise.
11531         (push_cp_function_context): Adjust use of language_function.
11532         (pop_cp_function_context): Likewise.
11533         (mark_lang_function): Likewise.
11534         (mark_cp_function_context): Likewise.
11535         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
11536         (build_vec_init): Likewise.
11537         * semantics.c (SET_LAST_STMT): Remove.
11538         (RECHAIN_STMTS): Don't use it.
11539         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
11540         (current_stmt_tree): Define.
11541         (add_tree): Remove.
11542         (finish_goto_stmt): Use add_stmt, not add_tree.
11543         (finish_expr_stmt): Likewise.
11544         (begin_if_stmt): Likewise.
11545         (finish_then_clause): Likewise.
11546         (begin_while_stmt): Likewise.
11547         (begin_do_stmt): Likewise.
11548         (finish_return_stmt): Likewise.
11549         (begin_for_stmt): Likewise.
11550         (finish_break_stmt): Likewise.
11551         (finish_continue_stmt): Likewise.
11552         (begin_switch_stmt): Likewise.
11553         (finish_case_label): Likewise.
11554         (begin_try_block): Likewise.
11555         (begin_function_try_block): Likewise.
11556         (begin_handler): Likewise.
11557         (begin_catch_block): Likewise.
11558         (begin_compound_stmt): Likewise.
11559         (begin_asm_stmt): Likewise.
11560         (finish_asm_stmt): Likewise.
11561         (finish_label_stmt): Likewise.
11562         (add_decl_stmt): Likewise.
11563         (finish_subobject): Likewise.
11564         (finish_decl_cleanup): Likewise.
11565         (finish_named_return_value): Likewise.
11566         (setup_vtbl_ptr): Likewise.
11567         (add_scope_stmt): Likewise.
11568         (finish_stmt_expr): Likewise.
11569         (prune_unused_decls): Remove.
11570         (begin_stmt_tree): Likewise.
11571         (finish_stmt_tree): Likewise.
11572         (prep_stmt): Adjust use of current_stmt_tree.
11573         (lang_expand_stmt): Likewise.
11574         * tree.c (statement_code_p): Remove.
11575         (cp_statement_code_p): New function.
11576         (walk_stmt_tree): Remove.
11577         (init_tree): Set lang_statement_code_p.
11578
11579 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
11580
11581         Integrated preprocessor.
11582
11583         * Make-lang.in, Makefile.in: Remove all references to input.c,
11584         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
11585         * gxx.gperf, hash.h, input.c: Delete.
11586         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
11587         initialized properly.
11588
11589         * class.c (fixup_pending_inline): Take a tree, not a
11590         struct pending_inline *.  All callers changed.
11591         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
11592         RID_PROTECTED entries in ridpointers[] array here.
11593         * decl.c (duplicate_decls): Do not refer to struct
11594         pending_inline.
11595         (record_builtin_type, init_decl_processing): Use RID_MAX not
11596         CP_RID_MAX.
11597         (grokdeclarator): Use C_IS_RESERVED_WORD.
11598         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
11599         cpplib.
11600         (grok_x_components): Do not inspect pending_inlines chain.
11601
11602         * cp-tree.h (struct lang_identifier): Add rid_code entry.
11603         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
11604         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
11605         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
11606         TIME_IDENTIFIER_FILEINFO): Kill.
11607         Update prototypes.
11608         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
11609         single 32-bit word.
11610         * parse.y: Call do_pending_inlines unconditionally.
11611         reinit_parse_for_method is now snarf_method.  fn.defpen is no
11612         longer necessary.  Remove unnecessary <itype> annotation on
11613         SCOPE.  Do not refer to end_of_file or struct pending_inline.
11614         * semantics.c (begin_inline_definitions): Call
11615         do_pending_inlines unconditionally.
11616
11617         * lex.c: Remove all code now shared with C front end.
11618         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
11619         into the get_identifier table.  Rewrite pragma handling to
11620         work with the registry.  Move code to save tokens for later
11621         processing to spew.c.
11622
11623         * spew.c: Rewrite everything in terms of token streams instead
11624         of text.  Move routines here from lex.c / input.c as
11625         appropriate.  GC-mark trees hanging off the pending inlines
11626         chain.
11627
11628 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
11629
11630         * NEWS: Mention that the named return value extension has been
11631         deprecated.
11632         * cp-tree.h (original_result_rtx): Define.
11633         (TREE_REFERENCE_EXPR): Remove.
11634         (DECL_VPARENT): Likewise.
11635         (pushdecl_nonclass_level): Likewise.
11636         (store_return_init): Likewise.
11637         (reinit_lang_specific): Likewise.
11638         (genrtl_named_return_value): Change prototype.
11639         * decl.c (original_result_rtx): Remove.
11640         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
11641         Do not generate RTL for local variables here.
11642         (store_return_init): Remove.
11643         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
11644         store_return_init.
11645         (finish_named_return_value): Adjust accordingly.  Warn that this
11646         extension is deprecated.
11647         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
11648
11649 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11650
11651         * pt.c (type_unification_real): Replace switch with if.
11652         (unify): Tsubst non-type parms before comparing.
11653
11654 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11655
11656         * error.c (dump_typename): New function, broken out of ...
11657         (dump_type): ... here. Use it.
11658         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
11659
11660 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11661
11662         * init.c (build_offset_ref): Deal with namespace scoped
11663         TEMPLATE_ID_EXPRs.
11664
11665 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11666
11667         * class.c (resolve_address_of_overloaded_function): Add
11668         explanation message.
11669         * decl.c (define_case_label): Reformat explanation.
11670         * decl2.c (finish_static_data_member_decl): Likewise.
11671         (grokfield): Likewise.
11672         * friend.c (do_friend): Likewise.
11673
11674 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
11675
11676         * tree.c (walk_tree): Expose tail recursion.
11677         (walk_stmt_tree): New function.
11678         * cp-tree.h: Prototype walk_stmt_tree.
11679         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
11680         the BLOCKs directly.  If a BLOCK has no variables after
11681         pruning, discard it.
11682         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
11683         restore the line number.
11684
11685 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
11686
11687         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
11688         (pt.o): Remove dependency on HTAB_H.
11689         * cp-tree.h: Include hashtab.h.
11690         (walk_tree): Change prototype.
11691         (walk_tree_without_duplicates): New function.
11692         * decl.c (check_default_argument): Use it.
11693         * optimize.c (remap_decl): Adjust calls to walk_tree.
11694         (copy_body): Likewise.
11695         (expand_calls_inline): Likewise.
11696         (calls_setjmp_p): Use walk_tree_without_duplicates.
11697         * pt.c: Don't include hashtab.h.
11698         (for_each_template_parm): Use walk_tree_without_duplicates.
11699         * semantics.c (finish-stmt_tree): Likewise.
11700         (expand_body): Likewise.
11701         * tree.c (walk_tree): Add additional parameter.
11702         (walk_tree_without_duplicates): New function.
11703         (count_trees): Use it.
11704         (verify_stmt_tree): Adjust call to walk_tree.
11705         (find_tree): Use walk_tree_without_duplicates.
11706         (no_linkage_check): Likewise.
11707         (break_out_target_exprs): Adjust call to walk_tree.
11708         (cp_unsave): Likewise.
11709
11710 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11711
11712         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
11713         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
11714         * cp-tree.h (TYPE_BINFO): Adjust comment.
11715         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
11716         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
11717         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
11718         (TYPE_TEMPLATE_INFO): Likewise.
11719         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
11720         * class.c (push_nested_class): Likewise.
11721         * decl.c (lookup_name_real): Likewise.
11722         (grokdeclarator): Likewise.
11723         (grok_op_properties): Likewise.
11724         (xref_tag): Likewise.
11725         (xref_basetypes): Likewise.
11726         * decl2.c (constructor_name_full): Likewise.
11727         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
11728         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
11729         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
11730         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11731         (dump_type_suffix): Likewise.
11732         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
11733         instead.
11734         (get_aggr_from_typedef): Likewise.
11735         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
11736         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11737         (write_template_parm): Likewise.
11738         (write_template_template_parm): Check tree code instead of
11739         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11740         * method.c (build_overload_nested_name): Add
11741         BOUND_TEMPLATE_TEMPLATE_PARM.
11742         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
11743         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11744         * pt.c (convert_template_argument): Check tree code instead of
11745         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11746         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
11747         (for_each_template_parm): Adjust comment.
11748         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
11749         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11750         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
11751         template_args_equal to compare template template parameter cases.
11752         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11753         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
11754         instead.
11755         * tree.c (copy_template_template_parm): Decide whether to create
11756         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
11757         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11758         (copy_tree_r): Likewise.
11759         * typeck.c (comptypes): Likewise.  Check tree code instead of
11760         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11761
11762 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
11763
11764         * decl.c (finish_function): Move the code for handling functions
11765         marked with the constructor and destructor attributes inside the
11766         expand_p block.
11767
11768 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
11769
11770         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
11771
11772 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
11773
11774         * pt.c (lookup_template_class): Remove abort.
11775         * tree.c (get_type_decl): Allow error_mark_node.
11776
11777 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
11778
11779         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
11780         TEMPLATE_ID_EXPRs.
11781
11782 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
11783
11784         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
11785         new ABI mangling.
11786
11787 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
11788
11789         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
11790         union tag mismatch error reporting.
11791
11792 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
11793
11794         * call.c (build_scoped_method_call): Check it is not a namespace.
11795
11796 2000-08-30  Jason Merrill  <jason@redhat.com>
11797
11798         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
11799
11800         * tree.c (bot_manip): Check TREE_CONSTANT rather than
11801         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
11802         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
11803
11804         * decl.c (start_function): Always call make_function_rtl.
11805
11806 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
11807
11808         * semantics.c (prune_unused_decls): New function.
11809         (finish_stmt_tree): Call it via walk_tree.
11810
11811 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
11812
11813         * class.c (build_secondary_vtable): Constify a char *.
11814         * decl.c (init_decl_processing): Initialize function_id_node,
11815         pretty_function_id_node, and func_id_node.
11816         * input.c (struct input_source): Constify 'str'.
11817         (feed_input): Constify first argument.
11818         * mangle.c (write_identifier): Constify argument.
11819         * pt.c (mangle_class_name_for_template): Constify argument.
11820
11821 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
11822
11823         * typeck.c (mark_addressable): Remove code that pokes around in
11824         RTL.
11825
11826 2000-08-28  Jason Merrill  <jason@redhat.com>
11827
11828         * lex.c (file_name_nondirectory): Move to toplev.c.
11829
11830         * cp-tree.h (LOCAL_CLASS_P): New macro.
11831         * class.c (finish_struct_1): Use it.
11832
11833 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
11834
11835         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
11836         (write_encoding): Pass another argument to write_name.
11837         (write_name): Add ignore_local_scope parameter.  Fix handling of
11838         local names.
11839         (write_nested_name): Use write_unqualified_name.
11840         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
11841         (write_template_prefix): Use write_unqualified_name.
11842         (write_component): Remove.
11843         (write_local_name): Add parameter.  Use direct local entity to
11844         discriminator calculation.
11845         (write_class_enum_type): Pass another argument to write_name.
11846         (write_template_template_arg): Likewise.
11847         (make_guard_variable): Likewise.
11848
11849 2000-08-27  Jason Merrill  <jason@redhat.com>
11850
11851         * decl.c (pushdecl): Matching decls for local externs are found in
11852         the current level.  Propagate linkage information from previous
11853         declarations.
11854
11855 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
11856
11857         * ir.texi (Expressions): Fix typo.
11858
11859 2000-08-25  Greg McGary  <greg@mcgary.org>
11860
11861         * tree.c (init_tree): Use ARRAY_SIZE.
11862
11863 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
11864
11865         * error.c (cp_tree_printer): Rework.
11866
11867 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
11868
11869         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
11870         dyn-string.o.
11871         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
11872         (cp-demangle.o): Remove target.
11873         (dyn-string.o): Likewise.
11874
11875         * decl.c (grokfndecl): Require that `main' return an `int'.
11876         * mangle.c (write_encoding): Don't mangle return types for
11877         conversion functions.
11878
11879 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
11880
11881         * error.c (tree_formatting_info): New data type.
11882         (tree_being_formatted): New macro.
11883         (tree_formatting_flags): Likewise.
11884         (put_whitespace): Likewise.
11885         (print_tree_identifier): Likewise.
11886         (print_identifier): Likewise.
11887         (cp_tree_printer, print_function_argument_list, print_declaration,
11888         print_expression, print_function_declaration,
11889         print_function_parameter, print_type, print_cv_qualifier): New
11890         functions.
11891         (init_error): Initialize lang_printer.
11892
11893 2000-08-24  Jason Merrill  <jason@redhat.com>
11894
11895         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
11896         adjustment necessary.
11897
11898 2000-08-24  Greg McGary  <greg@mcgary.org>
11899
11900         * cp-tree.h (MAIN_NAME_P): Remove macro.
11901
11902 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
11903
11904         * error.c (print_instantiation_context): Don't forget to flush the
11905         buffer.
11906
11907 2000-08-23  Jason Merrill  <jason@redhat.com>
11908
11909         * typeck.c (build_ptrmemfunc): Save the input pmf.
11910
11911         * method.c (process_modifiers): Use same_type_p.
11912
11913 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
11914
11915         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
11916         * mangle.c (write_function_type): Change prototype.
11917         (write_encoding): Don't mangle return types for
11918         constructors or destructors.
11919         (write_type): Adjust call to write_function_type.
11920         * pt.c (instantiate_template): Instantiate alternate entry points
11921         when instantiating the main function.
11922
11923 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
11924
11925         * error.c (cp_print_error_function): Don't use embedded '\n' in
11926         output_printf.
11927
11928 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
11929
11930         * decl.c (init_decl_processing): Remove bogus initialization.
11931         * error.c (lang_print_error_function): Restore here.
11932         (init_error): Initialize print_error_function.
11933
11934 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
11935
11936         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
11937
11938 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
11939
11940         * Makefile.in (error.o): Depends on diagnostic.h
11941
11942         * cp-tree.h (problematic_instantiation_changed,
11943         record_last_problematic_instantiation, current_instantiation,
11944         print_instantiation_context): Declare.
11945         (maybe_print_template_context): Remove.
11946
11947         * decl.c (init_decl_processing): Set print_error_function to NULL.
11948         (lang_print_error_function): Remove, since we're using a new
11949         machinery.
11950
11951         * error.c: #include diagnostic.h
11952         (function_category): New function.
11953         (cp_diagnostic_starter): Likewise.
11954         (cp_diagnostic_finalizer): Likewise.
11955         (cp_print_error_function): Likewise.
11956         (maybe_print_instantiation_context): Likewise.
11957         (print_instantiation_full_context): Likewise.
11958         (print_instantiation_partial_context): Likewise.
11959         (print_instantiation_context): Define.
11960         (init_error): Initialize diagnostic pager and finalizer.
11961
11962         * pt.c (problematic_instantiation_changed): Define.
11963         (record_last_problematic_instantiation): Likewise.
11964         (current_instantiation): Likewise.
11965         (maybe_print_template_context): Remove.
11966         (print_template_context): Likewise.
11967         (current_tinst_level): Make static to reflect Brendan Kehoe's
11968         change of 1995-04-13.
11969         (push_tinst_level): Call print_instantiation_context.
11970
11971 2000-08-21  Nix  <nix@esperi.demon.co.uk>
11972
11973         * lang-specs.h: Do not process -o or run the assembler if
11974         -fsyntax-only.
11975
11976 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
11977
11978         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
11979         variables.
11980         * decl2.c (lang_decode_option): Disable gettext attributes for
11981         -ansi.
11982
11983 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
11984
11985         * lex.c (lang_init_options): Default diagnostic message maximum
11986         length to 80, when line-wrapping.
11987
11988 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
11989
11990         * class.c (build_vtbl_initializer): Clear the entire
11991         vtbl_init_data.  Start keeping track of the functions for which we
11992         have created vcall offsets here.
11993         (dfs_build_vcall_offset_vtbl_entries): Remove.
11994         (build_vcall_offset_vtbl_entries): Reimplement.
11995         (add_vcall_offset_vtbl_entries_r): New function.
11996         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
11997         computing when vcall offsets are necessary.
11998
11999 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12000
12001         * decl.c (member_function_or_else): Use cp_error ... %T.
12002         (grokdeclarator): Likewise.
12003         (start_method): Likewise.
12004         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
12005
12006 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12007
12008         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
12009         TYPE_DECLs.
12010
12011 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12012
12013         * cp-tree.h (PTRMEM_OK_P): New macro.
12014         (itf_ptrmem_ok): New enumeration value.
12015         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
12016         argument. Diagnose implicit pointer to member.
12017         (instantiate_type): Don't diagnose implicit pointer to member
12018         here. Pass itf_ptrmem_ok if ok. Adjust calls to
12019         resolve_address_of_overloaded_function.
12020         * init.c (build_offset_ref): Set PTRMEM_OK_P.
12021         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
12022         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
12023         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
12024         (build_unary_op): Deal with single non-static member in
12025         microsoft-land.
12026
12027 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12028
12029         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
12030
12031 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12032
12033         * cp-tree.h (enum_name_string): Remove prototype.
12034         (report_case_error): Remove prototype.
12035         * cp/typeck2.c (enum_name_string): Remove.
12036         (report_case_error): Remove.
12037         * error.c (dump_expr): Deal with enum values directly.
12038         Correctly negate integer constant.
12039
12040 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12041
12042         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
12043         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
12044         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
12045         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
12046         (__cxa_vec_new): Use __cxa_vec_new2.
12047         (__cxa_vec_delete): Use __cxa_vec_delete2.
12048
12049 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12050
12051         * vec.cc (__cxa_vec_new): Set "C" linkage.
12052         (__cxa_vec_ctor): Likewise.
12053         (__cxa_vec_cctor): Likewise.
12054         (__cxa_vec_dtor): Likewise.
12055         (__cxa_vec_delete): Likewise.
12056         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
12057         (__cxa_vec_ctor): Likewise.
12058         (__cxa_vec_cctor): Likewise.
12059         (__cxa_vec_dtor): Likewise.
12060         (__cxa_vec_delete): Likewise.
12061
12062 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12063
12064         * class.c (instantiate_type): Reinstate local variable
12065         deleted in previous change.
12066
12067         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
12068         itf_no_attributes.
12069
12070 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12071
12072         * cp-tree.h (instantiate_type_flags): New enumeration.
12073         (instantiate_type): Change parameter.
12074         * class.c (instantiate_type): Adjust prototype. Adjust.
12075         * call.c (standard_conversion): Adjust instantiate_type call.
12076         (reference_binding): Likewise.
12077         (build_op_delete_call): Likewise.
12078         (convert_like_real): Likewise.
12079         * cvt.c (cp_convert_to_pointer): Likewise.
12080         (convert_to_reference): Likewise.
12081         * pt.c (convert_nontype_argument): Likewise.
12082         * typeck.c (build_binary_op): Likewise.
12083         (build_ptrmemfunc): Likewise.
12084         (convert_for_assignment): Likewise.
12085
12086 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12087
12088         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
12089         (current_aggr): Define.
12090         * decl.c (grokdeclarator): Make sure a friend class is an
12091         elaborated type specifier.
12092         * parse.y (current_aggr): Remove static definition.
12093         (cp_parse_init): Adjust.
12094         (structsp): Clear and restore current_aggr.
12095         (component_decl_list): Clear current_aggr.
12096
12097         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
12098         aggregate tag on the typename's context.
12099
12100         * pt.c (tsubst_friend_class): Return error_mark_node, if
12101         parms becomes NULL.
12102         (instantiate_class_template): Ignore error_mark_node friend types.
12103
12104 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
12105
12106         * cvt.c (warn_ref_binding): New static function, broken out of ...
12107         (convert_to_reference): ... here. Use it.
12108
12109 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
12110
12111         * parse.y (template_arg): Add rule for template qualified with
12112         global scope.
12113
12114 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12115
12116         * decl2.c (add_function): Reorganize.
12117         (arg_assoc): Do not consider function template decls.
12118
12119 2000-08-11  Jason Merrill  <jason@redhat.com>
12120
12121         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
12122         looking inside.
12123
12124 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12125
12126         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
12127         (lookup_nested_tag): Likewise.
12128
12129         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
12130         can be produced.
12131
12132 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12133
12134         * parse.y (named_complex_class_head_sans_basetype): Remove
12135         always true if.
12136
12137 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12138
12139         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
12140         explicit TEMPLATE_ID_EXPR args.
12141         (build_expr_from_tree, case CALL_EXPR): Likewise.
12142
12143 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12144
12145         * decl.c (check_tag_decl): Diagnose typename's which don't
12146         declare anything.
12147
12148 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
12149
12150         * init.c (build_aggr_init): Reject bogus array initializers
12151         early.
12152
12153 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
12154
12155         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
12156         runtime.
12157         * cp/tinfo.cc (__dynamic_cast): Likewise.
12158         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
12159
12160 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
12161
12162         * cvt.c (convert_to_pointer_force): Fix error message when
12163         attempting to cast from ambiguous base.
12164
12165 2000-08-08  Jason Merrill  <jason@redhat.com>
12166
12167         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
12168         (tsubst_template_arg_vector): Likewise.
12169
12170         * decl2.c (build_anon_union_vars): Choose the largest field; don't
12171         assume that one will be as large as the union.
12172
12173 2000-08-07  Kazu Hirata  <kazu@hxi.com>
12174
12175         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
12176         * decl.c (pop_labels): Likewise.
12177
12178 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
12179
12180         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
12181         specifications.
12182         (__pointer_to_member_type_info): Likewise.
12183         (__base_class_info): Likewise.
12184         (__class_type_info): Likewise.
12185         (__si_class_type_info): Likewise.
12186         (__vmi_class_type_info): Likewise.
12187         * tinfo.cc (__si_class_type_info::__do_find_public_src):
12188         Changed member names to match specifications.
12189         (__vmi_class_type_info::__do_find_public_src): Likewise.
12190         (__si_class_type_info::__do_dyncast): Likewise.
12191         (__vmi_class_type_info::__do_dyncast): Likewise.
12192         (__si_class_type_info::__do_upcast): Likewise.
12193         (__vmi_class_type_info::__do_upcast): Likewise.
12194         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
12195         (__pbase_type_info::__pointer_catch): Likewise.
12196         (__pointer_type_info::__pointer_catch): Likewise.
12197         (__pointer_to_member_type_info::__pointer_catch): Likewise.
12198
12199 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
12200
12201         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
12202         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
12203         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
12204
12205 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
12206
12207         * cp-tree.h (add_method): Change prototype.
12208         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
12209         Don't double the size of the method vector in the error case.
12210         (handle_using_decl): Adjust call to add_method.
12211         (add_implicitly_declared_members): Likewise.
12212         (clone_function_decl): Likewise.
12213         * decl2.c (check_classfn): Likewise.
12214         * semantics.c (finish_member_declaration): Likewise.
12215
12216 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
12217
12218         * decl.c (flag_isoc94): New variable.
12219
12220 2000-08-02  Jason Merrill  <jason@redhat.com>
12221
12222         * pt.c (do_type_instantiation): Add complain parm; don't complain
12223         if called recursively.
12224         * cp-tree.h, parse.y: Adjust.
12225
12226 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
12227
12228         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
12229         -Wno-strict-prototypes.
12230
12231         * g++spec.c: Adjust type of second argument to
12232         lang_specific_driver, and update code as necessary.
12233
12234         * cp-tree.h: Don't prototype min_precision here.
12235         (my_friendly_assert): Cast expression to void.
12236         * semantics.c (do_poplevel): Initialize scope_stmts.
12237
12238 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
12239
12240         * cp-tree.h (DECL_NEEDED_P): Tweak.
12241
12242 2000-07-28  Jason Merrill  <jason@redhat.com>
12243
12244         * lang-specs.h: Use %i in rule for .ii files.
12245
12246 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
12247
12248         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
12249
12250 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
12251
12252         Allow indirect primary bases.
12253         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
12254         primary_base.
12255         (CLASSTYPE_VFIELD_PARENT): Remove.
12256         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
12257         (BINFO_PRIMARY_BINFO): Remove.
12258         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
12259         (BINFO_VBASE_PRIMARY_P): Likewise.
12260         (BINFO_PRIMARY_BASE_OF): New macro.
12261         (BINFO_INDIRECT_PRIMARY_P): Likewise.
12262         (get_primary_binfo): New function.
12263         * decl.c (lang_mark_tree): Make lang_type::primary_base.
12264         * class.c (vcall_offset_data_s): Rename to ...
12265         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
12266         and add ctor_vtbl_p.
12267         (get_derived_offset): Use get_primary_binfo.
12268         (dfs_mark_primary_bases): Adjust handling of virtual primary
12269         bases.
12270         (mark_primary_bases): Likewise.
12271         (set_primary_base): Take a binfo, not an integer, as a
12272         representation of the primary base.
12273         (indirect_primary_base_p): Remove.
12274         (determine_primary_base): Adjust for indirect primary bases.
12275         (dfs_find_final_overrider): Fix typo in coment.
12276         (update_vtable_entry_for_fn): Use get_primary_binfo.
12277         (layout_nonempty_base_or_field): Tweak.
12278         (build_base_fields): Adjust for new primary base semantics.
12279         (dfs_propagate_binfo_offsets): Remove.
12280         (propagate_binfo_offsets): Rewrite.
12281         (dfs_set_offset_for_shared_vbases): Remove.
12282         (layout_virtual_bases): Don't use it.
12283         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
12284         ABI.
12285         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
12286         CLASSTYPE_VFIELD_PARENT.
12287         (dfs_get_primary_binfo): New function.
12288         (get_primary_binfo): Likewise.
12289         (dump_class_hierarchy_r): Tweak printing of primary bases.
12290         (build_vtbl_initializer): Fix typo in comments.  Use
12291         vtbl_init_data.
12292         (build_vcall_and_vbase_vtbl_entries): Likewise.
12293         (build_vbaes_offset_vtbl_entries): Likewise.
12294         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
12295         BV_VCALL_INDEX to handle indirect primary bases.
12296         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
12297         (build_rtti_vtbl_entries): Likewise.
12298         * search.c (get_shared_vbase_if_not_primary): Tweak.
12299         (find_vbase_instance): Likewise.
12300         (binfo_for_vtable): Simplify.
12301         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
12302         (make_binfo): Make it have 11 entries.
12303
12304 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
12305
12306         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
12307         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
12308         ascertaining primaryness.
12309         (G): Remove template_args.
12310         (decl_is_template_id): New function.
12311         (write_encoding): Use decl_is_template_id.
12312         (write_name): Likewise.  Handle type_decls.  Get main variant of
12313         type decls.
12314         (write_nested_name): Likewise.
12315         (write_prefix): Likewise.
12316         (write_template_prefix): Likewise.
12317         (write_special_name_constructor): Remove defunct production from
12318         comment.
12319         (write_bare_function_type): Remove comment about absent parameter.
12320         (write_template_template_arg): Add missing grammar production to
12321         comment.
12322
12323 2000-07-27  Jason Merrill  <jason@redhat.com>
12324
12325         * decl.c (duplicate_decls): If common_type produces a non-typedef
12326         type for a typedef, just use the old type.
12327
12328 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
12329
12330         * cp-tree.h (function_depth): Declare.
12331         (verify_stmt_tree): Likewise.
12332         (find_tree): Likewise.
12333         * decl.c (function_depth): Give it external linkage.
12334         * optimize.c (optimize_function): Increment and decrement it.
12335         * tree.c (verify_stmt_tree_r): New function.
12336         (verify_stmt_tree): Likewise.
12337         (find_tree_r): Likewise.
12338         (find_tree): Likewise.
12339
12340 2000-07-27  Jason Merrill  <jason@redhat.com>
12341
12342         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
12343         TYPE_PTRMEMFUNC_P.
12344         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
12345
12346 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
12347
12348         * decl.c (start_cleanup_fn): Mark the function as `inline'.
12349         * decl2.c (get_guard): Call cp_finish_decl, not
12350         rest_of_decl_compilation, for local guards.
12351         * lex.c (do_identifier): Remove unused variable.
12352
12353 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
12354
12355         * parse.y:  Add missing ';'.
12356
12357 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
12358
12359         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
12360         of `extern "C++"'.
12361
12362 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12363
12364         Kill strict_prototype. Backwards compatibility only for
12365         non NO_IMPLICIT_EXTERN_C systems.
12366         * cp-tree.h (flag_strict_prototype): Remove.
12367         (strict_prototype): Remove.
12368         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
12369         * decl.c (maybe_push_to_top_level): Adjust.
12370         (pop_from_top_level): Adjust.
12371         (decls_match): Only allow sloppy parm matching for ancient
12372         system headers.
12373         (init_decl_processing): Adjust.
12374         (grokdeclarator): Adjust.
12375         * decl2.c (flag_strict_prototype): Remove.
12376         (strict_prototype): Remove.
12377         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
12378         (lang_f_options): Remove "strict-prototype".
12379         (unsupported-options): Add "strict-prototype".
12380         * lex.c (do_identifier): Adjust.
12381         (do_scoped_id): Adjust.
12382         * parse.y (empty_parms): Adjust.
12383         * class.c (push_lang_context): Adjust.
12384         (pop_lang_context): Adjust.
12385         * typeck.c (comp_target_parms): Adjust.
12386
12387 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12388
12389         * decl.c (poplevel): Deal with anonymous variables at for scope.
12390         (maybe_inject_for_scope_var): Likewise.
12391
12392 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
12393
12394         * decl.c: Remove all signal handling code, now done in toplev.c.
12395
12396 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
12397
12398         * decl.c (make_rtl_for_nonlocal_decl): Rework.
12399
12400         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
12401         correctly.
12402
12403 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
12404
12405         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
12406         Define my_friendly_assert and my_friendly_abort as macros
12407         which may call friendly_abort.  Prototype friendly abort, not
12408         my_friendly_abort or my_friendly_assert.
12409         * decl.c (signal_catch): Report the signal caught in the error
12410         message.  Call fatal directly.
12411         * typeck2.c (ack, my_friendly_assert): Delete.
12412         (my_friendly_abort): Rename to friendly_abort.  Expect file,
12413         line, and function parameters.  Report the abort code, then
12414         call fancy_abort.  Do not mask an abort if errors have
12415         already occurred.
12416
12417 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
12418
12419         * typeck.c (comp_target_parms): Remove obsolete parameter.
12420         (comp_target_types): Adjust.
12421
12422 2000-07-17  Jason Merrill  <jason@redhat.com>
12423
12424         * typeck.c (mark_addressable): Never set TREE_USED.
12425         * call.c (build_call): Don't abort on calls to library functions
12426         that have been declared normally.
12427
12428         * typeck.c (build_binary_op): Fix grammar in warning.
12429
12430         * exception.cc (__eh_free): Fix prototype.
12431
12432         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
12433
12434         * decl.c (pushdecl): Handle seeing an OVERLOAD in
12435         IDENTIFIER_NAMESPACE_VALUE.
12436
12437 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
12438
12439         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
12440         * method.c (use_thunk): Correct handling of vcall offsets.
12441
12442 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
12443
12444         * .cvsignore: parse.h and parse.c have no cp- prefix.
12445
12446 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
12447
12448         * .cvsignore: New file.
12449
12450 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
12451
12452         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
12453
12454 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
12455
12456         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
12457         * parse.c: Remove.
12458         * parse.h: Likewise.
12459
12460 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
12461
12462         * class.c (layout_class_type): Add pointers to virtual bases after
12463         base classes under the old ABI.
12464
12465 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
12466
12467         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
12468         (finish_continue_stmt): Likewise.
12469         (begin_for_stmt): Remove call to note_level_for_for.
12470         (finish_goto_stmt): Change call from build_min_nt
12471         to build_stmt.
12472         (finish_expr_stmt): Likewise.
12473         (begin_if_stmt): Likewise.
12474         (begin_while_stmt): Likewise.
12475         (finish_while_stmt): Likewise.
12476         (finish_return_stmt): Likewise.
12477         (begin_for_stmt): Likewise.
12478         (finish_for_stmt): Likewise.
12479         (finish_break_stmt): Likewise.
12480         (begin_switch_stmt): Likewise.
12481         (finish_case_label): Likewise.
12482         (genrtl_try_block): Likewise.
12483         (begin_try_block): Likewise.
12484         (begin_handler): Likewise.
12485         (begin_compound_stmt): Likewise.
12486         (finish_asm_stmt): Likewise.
12487         (finish_label_stmt): Likewise.
12488         (add_decl_stmt): Likewise.
12489         (finish_subobject): Likewise.
12490         (finish_decl_cleanup): Likewise.
12491         (finish_named_return_value): Likewise.
12492         (setup_vtbl_ptr): Likewise.
12493         (add_scope_stmt): Likewise.
12494         * decl.c (finish_constructor_body): Likewise.
12495         (finish_destructor_body): Likewise.
12496         * optimize.c (copy_body_r): Likewise.
12497         (initialize_inlined_parameters): Likewise.
12498         (declare_return_variable): Likewise.
12499         (expand_call_inline): Likewise.
12500
12501 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
12502
12503         * semantics.c (expand_body): Sync interface information
12504         at the end of function body expansion.
12505
12506 2000-07-09  Jason Merrill  <jason@redhat.com>
12507
12508         * init.c (build_new_1): Bail early if the call to new fails.
12509
12510         * decl.c (compute_array_index_type): Check specifically for
12511         an INTEGER_CST, not just TREE_CONSTANT.
12512
12513         * decl.c (duplicate_decls): Don't call duplicate_decls on
12514         the DECL_TEMPLATE_RESULT.
12515         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
12516         codes.
12517
12518         * error.c (dump_template_bindings): Don't crash if we had an
12519         invalid argument list.
12520
12521         * typeck.c (c_expand_start_case): Do narrowing here.
12522         * semantics.c (finish_switch_cond): Not here.
12523
12524 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
12525
12526         * parse.y (asm_clobbers): Do string concatenation.
12527
12528 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
12529
12530         * decl.c (pushtag): Don't put local classes in template functions
12531         on the local_classes list.
12532
12533 2000-07-04  Scott Snyder  <snyder@fnal.gov>
12534
12535         * decl2.c (get_guard): Add missing return for old ABI local
12536         variable case.
12537
12538 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
12539
12540         * cp-tree.h (char_type_p): New function.
12541         * decl.c (init_decl_processing): Don't initialize
12542         signed_wchar_type_node or unsigned_wchar_type_node.
12543         (complete_array_type): Handle brace-enclosed string-constants.
12544         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
12545         * tree.c (char_type_p): New function.
12546         * typeck2.c (digest_init): Use char_type_p.
12547
12548 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
12549
12550         * pt.c (tsubst): Don't layout type, if it's error_mark.
12551
12552 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
12553
12554         * pt.c (instantiate_pending_templates): Reset template level.
12555
12556 2000-07-05  Jason Merrill  <jason@redhat.com>
12557
12558         * call.c (joust): Don't complain about `operator char *()' beating
12559         `operator const char *() const'.
12560
12561 2000-07-04  scott snyder  <snyder@fnal.gov>
12562             Jason Merrill  <jason@redhat.com>
12563
12564         * repo.c (repo_get_id): Handle the case where a class with virtual
12565         bases has a null TYPE_BINFO_VTABLE.
12566
12567 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
12568             Jason Merrill  <jason@redhat.com>
12569
12570         * parse.y (member_init): Just pass in the type.
12571         * init.c (expand_member_init): Handle getting a type.
12572
12573 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12574             Jason Merrill  <jason@redhat.com>
12575
12576         * decl.c (finish_function): Warn if a function has no return
12577         statement.
12578         Suggested by Andrew Koenig.
12579         * typeck.c (check_return_expr): Do set current_function_returns_value
12580         if we got an error_mark_node.
12581
12582 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
12583
12584         * decl2.c (push_decl_namespace): Push the original namespace.
12585
12586 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
12587
12588         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
12589         * semantics.c (begin_class_definition): Clear it.
12590
12591 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
12592
12593         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
12594         (genrtl_expr_stmt): Likewise.
12595         (genrtl_decl_stmt): Likewise.
12596         (genrtl_if_stmt): Likewise.
12597         (genrtl_while_stmt): Likewise.
12598         (genrtl_do_stmt): Likewise.
12599         (genrtl_return_stmt): Likewise.
12600         (genrtl_for_stmt): Likewise.
12601         (genrtl_break_stmt): Likewise.
12602         (genrtl_continue_stmt): Likewise.
12603         (genrtl_scope_stmt): Likewise.
12604         (genrtl_switch_stmt): Likewise.
12605         (genrtl_case_label): Likewise.
12606         (genrtl_begin_compound_stmt): Likewise.
12607         (genrtl_finish_compound_stmt): Likewise.
12608         (genrtl_compound_stmt): Likewise.
12609         (genrtl_asm_stmt): Likewise.
12610
12611         * init.c (begin_init_stmts): Remove call to
12612         genrtl_begin_compound_stmt.
12613         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
12614
12615         * semantics.c (lang_expand_stmt): Changed call to
12616         genrtl_compound_stmt to ignore return value.
12617
12618 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
12619
12620         * mangle.c (canonicalize_for_substitution): Return the canonical
12621         variant of a type.
12622
12623         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
12624         TYPE_DECL.
12625         * typeck.c (commonparms): Remove obstack manipulations.
12626
12627 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
12628
12629         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
12630
12631         * Makefile.in (OBJS): Added ../c-semantics.o.
12632         (OBJDEPS): Likewise.
12633
12634         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
12635         ../c-common.h.
12636         (struct stmt_tree): Added comment.
12637         (current_function_name_declared): Removed.
12638         (stmts_are_full_exprs_p): Likewise.
12639         (genrtl_do_pushlevel): Likewise.
12640         (genrtl_clear_out_block): Likewise.
12641         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
12642         (DECL_ANON_UNION_ELEMS): Likewise.
12643         (emit_local_var): Likewise.
12644         (make_rtl_for_local_static): Likewise.
12645         (do_case): Likewise.
12646         (expand_stmt): Likewise.
12647         (genrtl_decl_cleanup): Likewise.
12648         (c_expand_asm_operands): Likewise.
12649         (c_expand_return): Likewise.
12650         (c_expand_start_case): Likewise.
12651
12652         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
12653         (emit_local_var): Likewise.
12654         (initialize_local_var): Change reference to
12655         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
12656         Change reference to stmts_are_full_exprs_p to
12657         current_stmt_tree->stmts_are_full_exprs_p.
12658         (push_cp_function_context): Likewise.
12659
12660         * expect.c (expand_throw): Change reference to
12661         stmts_are_full_exprs_p.
12662
12663         * init.c (build_aggr_init): Change reference to
12664         stmts_are_full_exprs_p.
12665         (build_vec_init): Likewise.
12666
12667         * optimize.c (maybe_clone_body): Change reference to
12668         current_function_name_declared to
12669         cp_function_chain->name_declared.
12670
12671         * pt.c (instantiate_decl): Change reference to
12672         current_function_name_declared to
12673         cp_function_chain->name_declared.
12674
12675         * semantics.c (expand_cond): Moved declaration to c-common.h.
12676         (genrtl_do_pushlevel): Moved to c-semantics.c.
12677         (genrtl_clear_out_block): Likewise.
12678         (genrtl_goto_stmt): Likewise.
12679         (genrtl_expr_stmt): Likewise.
12680         (genrtl_decl_stmt): Likewise.
12681         (gerntl_if_stmt): Likewise.
12682         (genrtl_while_stmt): Likewise.
12683         (genrtl_do_stmt): Likewise.
12684         (genrtl_return_stmt): Likewise.
12685         (genrtl_for_stmt): Likewise.
12686         (genrtl_break_stmt): Likewise.
12687         (genrtl_continue_stmt): Likewise.
12688         (genrtl_scope_stmt): Likewise.
12689         (genrtl_switch_stmt): Likewise.
12690         (genrtl_case_label): Likewise.
12691         (genrtl_begin_compound_stmt): Likewise.
12692         (genrtl_finish_compound_stmt): Likewise.
12693         (genrtl_compound_stmt): Likewise.
12694         (genrtl_asm_stmt): Likewise.
12695         (genrtl_decl_cleanup): Likewise.
12696         (expand_cond): Likewise.
12697         (expand_stmt): Renamed to ...
12698         (lang_expand_stmt): ... this.
12699         (lang_expand_expr_stmt): Initialize.
12700         (set_current_function_name_declared): Likewise.
12701         (stmts_are_full_exprs_p): Likewise.
12702         (current_function_name_declared): Likewise.
12703         (anon_aggr_type_p): Likewise.
12704         (do_poplevel): Change reference to
12705         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
12706         Change reference to stmts_are_full_exprs_p to
12707         current_stmt_tree->stmts_are_full_exprs_p.
12708         (add_tree): Likewise.
12709         (finish_expr_stmt): Likewise.
12710         (prep_stmt): Likewise.
12711         (lang_expand_stmt): Likewise.
12712         (begin_compound_stmt): Change reference to
12713         current_function_name_declared to
12714         cp_function_chain->name_declared and call to
12715         current_function_name_declared().
12716         (setup_vtbl_ptr): Likewise.
12717         (genrtl_do_poplevel): Removed.
12718
12719 2000-06-30  Jason Merrill  <jason@redhat.com>
12720
12721         * init.c (init_init_processing): Go back to aligning like
12722         double_type_node for old ABI.
12723         (get_cookie_size): Make cookie larger if we get a type that needs
12724         more alignment.
12725         (build_vec_delete): Call it.
12726
12727         * typeck.c (qualify_type_recursive): New fn.
12728         (composite_pointer_type): Use it.
12729         (build_binary_op): Use composite_pointer_type.
12730
12731 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
12732             Jason Merrill  <jason@redhat.com>
12733
12734         * typeck.c (check_return_expr): Don't complain about returning
12735         NULL from operator new if -fcheck-new.
12736         * cp-tree.h: Declare flag_check_new here.
12737         * init.c: Not here.
12738
12739 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
12740
12741         * mangle.c (find_substitution): Use same_type_p.
12742         (write_encoding): Don't check for substitutions.
12743
12744 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
12745
12746         * parse.y (expr_no_comma_rangle): New non-terminal.
12747         (template_parm): Use it for default parameter case.
12748         (template_arg): Use it.
12749         (expr_no_commas): Remove commented out undefined extensions.
12750         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
12751         * parse.h, parse.c: Rebuilt.
12752
12753 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
12754
12755         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
12756         (finish_asm_stmt): Do it here, instead.
12757
12758         * cp-tree.h (ridpointers): Don't declare.
12759         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
12760         (record_builtin_java_type): Likewise.
12761         (init_decl_processing): Likewise.
12762         * lex.c: Move inclusion of lex.h.
12763         (ridpointers): Don't define.
12764         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
12765         RID_MAX.
12766         * lex.h (enum rid): Rename to ...
12767         (enum cp_rid): ... this.
12768         (ridpointers): Don't declare.
12769         * parse.y: Move inclusion of lex.h.
12770         * parse.c: Regenerated.
12771         * spew.c: Move inclusion of lex.h.
12772
12773         * cp-tree.h (struct language_function): Remove temp_name_counter.
12774         (temp_name_counter): Remove.
12775         (get_temp_name): Change prototype.
12776         (get_guard): New function.
12777         (get_guard_cond): Likewise.
12778         (set_guard): Likewise.
12779         * cvt.c (build_up_reference): Adjust call to get_temp_name.
12780         * decl.c (expand_static_init): Use get_guard and friends to
12781         implement guard variables.
12782         * decl2.c (get_temp_name): Assume that the variables created are
12783         always static.
12784         (get_sentry): Rename to ...
12785         (get_guard): ... this.  Implement new ABI guard variables.
12786         (get_guard_bits): New function.
12787         (get_guard_cond): Likewise.
12788         (set_guard): Likewise.
12789         (start_static_initialization_or_destruction): Use them.
12790         (do_static_initialization): Replace sentry with guard throughout.
12791         (do_static_destruction): Likewise.
12792         * init.c (create_temporary_var): Add comment.
12793
12794 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
12795
12796         * mangle.c (find_substitution): Use same_type_p.
12797         (write_encoding): Don't check for substitutions.
12798
12799 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
12800
12801         * parse.y (expr_no_comma_rangle): New non-terminal.
12802         (template_parm): Use it for default parameter case.
12803         (template_arg): Use it.
12804         (expr_no_commas): Remove commented out undefined extensions.
12805         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
12806         * parse.h, parse.c: Rebuilt.
12807
12808 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
12809
12810         * cp-tree.h (flag_const_strings): Remove.
12811         (warn_parentheses): Likewise.
12812         (warn_format): Likewise.
12813         (common_type): Likewise.
12814         (default_conversion): Likewise.
12815         (build_binary_op): Likewise.
12816         (cp_build_binary_op): New macro.
12817         * call.c (build_new_op): Use cp_build_binary_op instead of
12818         build_binary_op.
12819         * class.c (build_vtable_entry_ref): Likewise.
12820         * decl.c (expand_static_init): Likewise.
12821         (compute_array_index_type): Likewise.
12822         (build_enumerator): Likewise.
12823         * decl2.c (delete_sanity): Likewise.
12824         (start_static_initialization_or_destruction): Likewise.
12825         * error.c (dump_type_suffix): Likewise.
12826         * init.c (resolve_offset_ref): Likewise.
12827         (build_new): Likewise.
12828         (build_new_1): Likewise.
12829         (build_vec_delete_1): Likewise.
12830         (build_vec_init): Likewise.
12831         (build_delete): Likewise.
12832         * rtti.c (synthesize_tinfo_fn): Likewise.
12833         (synthesize_tinfo_var): Likewise.
12834         * search.c (expand_upcast_fixups): Likewise.
12835         (fixup_all_virtual_upcast_offsets): Likewise.
12836         * typeck.c (build_array_ref): Likewise.
12837         (get_member_function_from_ptrfunc): Likewise.
12838         (build_binary_op): Add parameter.
12839         (pointer_int_sum): Use cp_build_binary_op.
12840         (pointer_diff): Likewise.
12841         (build_modify_expr): Likewise.
12842         (get_delta_difference): Likewise.
12843         (build_ptrmemfunc): Likewise.
12844
12845 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
12846
12847         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
12848         * decl.c (create_implicit_typedef): Adjust.
12849         * decl2.c (build_artificial_parm): Adjust.
12850         * method.c (implicitly_declare_fn): Adjust.
12851         * pt.c (push_inline_template_parms_recursive): Adjust.
12852         (process_template_parm): Adjust.
12853         (overloaded_template_name): Adjust.
12854         * semantics.c (finish_template_template_parm): Adjust.
12855
12856 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
12857
12858         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
12859         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
12860         where to emit thunks.
12861         (build_vtt): Adjust call to build_vtt_inits.
12862         (build_vtt_inits): Add parameter to indicate whether or not
12863         sub-VTTs for virtual bases should be included.  Adjust handling of
12864         construction vtables.
12865         (get_matching_base): New function.
12866         (dfs_build_vtt_inits): Rename to ...
12867         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
12868         construction vtables.
12869         (dfs_fixup_binfo_vtbls): Likewise.
12870         (build_ctor_vtbl_groups): Build construction vtables for virtual
12871         bases, too.
12872         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
12873         to build construction vtbls.
12874         (dfs_accumulate_vtbl_inits): Adjust handling of
12875         construction vtables.
12876
12877         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
12878         types correctly.
12879
12880 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
12881
12882         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
12883
12884 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
12885
12886         * search.c (hides): Remove.
12887         (is_subobject_of_p): Add most_derived parameter. Use
12888         CANONICAL_BINFO.
12889         (lookup_field_queue_p): Adjust.
12890         (lookup_field_r): Adjust.
12891
12892 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
12893
12894         * decl2.c (handle_class_head): Bash typedefs to the type's main
12895         decl.
12896
12897 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
12898
12899         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
12900         (begin_global_stmt_expr): ... this.
12901         (genrtl_finish_stmt_expr): Rename to ...
12902         (finish_global_stmt_expr): ... this.
12903         * init.c (begin_init_stmts): Adjust calls.
12904         (finish_init_stmts): Likewise.
12905         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
12906         (begin_global_stmt_expr): ... this.
12907         (genrtl_finish_stmt_expr): Rename to ...
12908         (finish_global_stmt_expr): ... this.
12909
12910 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12911
12912         * search.c (lookup_member): Fix typo in comment.
12913
12914 2000-06-24  Jason Merrill  <jason@redhat.com>
12915
12916         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
12917         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
12918
12919 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12920
12921         * parse.y (complex_direct_notype_declarator): Support global_scope.
12922         * Makefile.in: Adjust conflict count.
12923
12924 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
12925
12926         * parse.y (template_arg): Convert TEMPLATE_DECL
12927         that is a template template parameter to
12928         TEMPLATE_TEMPLATE_PARM here.
12929
12930         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
12931         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
12932         (copy_template_template_parm): Adjust prototype.
12933         * decl.c (grokdeclarator): Remove dead code.
12934         * pt.c (process_template_parm): Tidy.
12935         (lookup_template_class): Construct nodes in
12936         copy_template_template_parm.
12937         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
12938         lookup_template_class.  Use TYPE_TI_TEMPLATE.
12939         * tree.c (copy_template_template_parm): Add NEWARGS
12940         parameter.
12941         (mapcar): Adjust call to copy_template_template_parm.
12942         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
12943         * method.c (build_template_template_parm_names): Change error
12944         code to avoid compilation warning.
12945
12946         * gxxint.texi: Document template template parameter
12947         name mangling.
12948
12949 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
12950
12951         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
12952         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
12953         (cp-demangle.o): New rule.
12954         (dyn-string.o): Likewise.
12955         * inc/cxxabi.h (__cxa_demangle): New declaration.
12956
12957 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
12958
12959         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
12960         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
12961         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
12962         a tree, not an int.
12963         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
12964         (make_thunk): Change prototype.
12965         (emit_thunk): Rename to use_thunk.
12966         (mangle_thunk): Change prototype.
12967         * class.c (get_derived_offset): Simplify.
12968         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
12969         BV_GENERATE_THUNK_WITH_VTABLE_P.
12970         (build_primary_vtable): Simplify.
12971         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
12972         (dfs_find_base): Remove.
12973         (update_vtable_entry_for_fn): Correct bug in finding the base
12974         where a virtual function was first declared.  Figure out whether
12975         or not to emit a vcall-thunk with the vtables in which it appears.
12976         Correct logic for deciding whether to use an ordinary thunk, or a
12977         vcall thunk.
12978         (finish_struct_1): Remove unnecssary code.
12979         (build_vtbl_initializer): Use ssize_int for the running counter of
12980         negative indices.
12981         (build_vtbl_initializer): Only use vcall thunks where necessary.
12982         Mark thunks as needing to be emitted with their vtables, or not.
12983         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
12984         indices.  Use size_binop.
12985         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
12986         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
12987         size_binop.
12988         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
12989         (build_vtable_entry): Mark thunks as needing to be emitted with
12990         their vtables, or not.
12991         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
12992         * decl2.c (mark_vtable_entries): Use use_thunk instead of
12993         emit_thunk.
12994         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
12995         information.
12996         * error.c (dump_expr): Use BV_FN.
12997         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
12998         not an int.
12999         * method.c (make_thunk): Likewise.
13000         (emit_thunk): Rename to use_thunk.  Allow callers to decide
13001         whether or not to actually emit the thunk.  Adjust for changes in
13002         representation of vcall offsets.
13003         * search.c (dfs_get_pure_virtuals): Use BV_FN.
13004         * semantics.c (emit_associated_thunks): New function.
13005         (expand_body): Use it.
13006         * ir.texi: Adjust decriptions of thunks.
13007
13008 2000-06-22  Jason Merrill  <jason@redhat.com>
13009
13010         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
13011         (tsubst_friend_function): Copy it here.
13012
13013         * decl.c (grok_op_properties): Fix typo.
13014
13015         * decl2.c (delete_sanity): Clarify warning, avoid failure on
13016         deleting void*.
13017
13018         * pt.c (check_explicit_specialization): Clarify error.
13019
13020         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
13021         an old OVERLOAD when we're declaring a non-function.
13022         (pushdecl, destroy_local_var): Check for error_mark_node.
13023         (warn_extern_redeclared_static): Also bail early if
13024         we're a CONST_DECL.
13025         (push_overloaded_decl): Ignore an old error_mark_node.
13026
13027 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
13028
13029         * call.c (build_x_va_arg): Check if in a template decl.
13030         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
13031
13032 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13033
13034         * class.c (push_lang_context): TYPE_NAME gets you to the Java
13035         types DECLs.
13036         * decl.c (check_goto): Computed gotos assumed OK.
13037
13038 2000-06-20  Jason Merrill  <jason@redhat.com>
13039
13040         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
13041         for which we don't need to look for instantiations.
13042
13043 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
13044
13045         * parse.y (program): Always call finish_translation_unit.
13046         * parse.c, parse.h: Rebuilt.
13047
13048 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
13049
13050         * method.c: Don't include hard-reg-set.h.
13051
13052 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
13053
13054         * rtti.c (get_base_offset): Cope when vbase field is in a base.
13055
13056 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
13057
13058         * call.c (build_conditional_expr): Use VOID_TYPE_P.
13059         * cvt.c (cp_convert_to_pointer): Likewise.
13060         (convert_to_void): Likewise.
13061         * error.c (dump_expr): Likewise.
13062         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
13063         * init.c (build_delete): Likewise.
13064         * method.c (emit_thunk): Likewise.
13065         * optmize.c (declare_return_variable): Likewise.
13066         * rtti.c (get_tinfo_decl_dynamic): Likewise.
13067         (get_typeid): Likewise.
13068         (build_dynamic_cast_1): Likewise.
13069         * typeck.c (composite_pointer_type): Likewise.
13070         (common_type): Likewise.
13071         (build_indirect_ref): Likewise.
13072         (build_binary_op): Likewise.
13073         (build_x_compound_expr): Likewise.
13074         (check_return_expr): Likewise.
13075         * typeck2.c (add_exception_specifier): Likewise.
13076
13077         * mangle.c (write_method_parms): Use direct comparison for end
13078         of parmlist.
13079
13080 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
13081
13082         * cp-tree.h (genrtl_try_block): Declare function.
13083         (genrtl_handler): Likewise.
13084         (genrtl_catch_block): Likewise.
13085         (genrtl_ctor_stmt): Likewise.
13086         (genrtl_subobject): Likewise.
13087         (genrtl_decl_cleanup): Likewise.
13088         (genrtl_do_poplevel): Likewise.
13089         (genrtl_do_pushlevel): Likewise.
13090         (genrtl_clear_out_block): Likewise.
13091         (genrtl_goto_stmt): Likewise.
13092         (genrtl_expr_stmt): Likewise.
13093         (genrtl_decl_stmt): Likewise.
13094         (genrtl_if_stmt): Likewise.
13095         (genrtl_while_stmt): Likewise.
13096         (genrtl_do_stmt): Likewise.
13097         (genrtl_return_stmt): Likewise.
13098         (genrtl_for_stmt): Likewise.
13099         (genrtl_break_stmt): Likewise.
13100         (genrtl_continue_stmt): Likewise.
13101         (genrtl_scope_stmt): Likewise.
13102         (genrtl_switch_stmt): Likewise.
13103         (genrtl_case_label): Likewise.
13104         (genrtl_begin_compound_stmt): Likewise.
13105         (genrtl_finish_compound_stmt): Likewise.
13106         (genrtl_compound_stmt): Likewise.
13107         (genrtl_asm_stmt): Likewise.
13108         (genrtl_named_return_value): Likewise.
13109         (genrtl_begin_stmt_expr): Likewise.
13110         (genrtl_finish_stmt_expr): Likewise.
13111         (finish_for_stmt): Removed first argument.
13112         (finish_switch_stmt): Likewise.
13113
13114         * semantics.c (genrtl_try_block): Define function.
13115         (genrtl_handler): Likewise.
13116         (genrtl_catch_block): Likewise.
13117         (genrtl_ctor_stmt): Likewise.
13118         (genrtl_subobject): Likewise.
13119         (genrtl_decl_cleanup): Likewise.
13120         (genrtl_do_poplevel): Likewise.
13121         (genrtl_do_pushlevel): Likewise.
13122         (genrtl_clear_out_block): Likewise.
13123         (genrtl_goto_stmt): Likewise.
13124         (genrtl_expr_stmt): Likewise.
13125         (genrtl_decl_stmt): Likewise.
13126         (genrtl_if_stmt): Likewise.
13127         (genrtl_while_stmt): Likewise.
13128         (genrtl_do_stmt): Likewise.
13129         (genrtl_return_stmt): Likewise.
13130         (genrtl_for_stmt): Likewise.
13131         (genrtl_break_stmt): Likewise.
13132         (genrtl_continue_stmt): Likewise.
13133         (genrtl_scope_stmt): Likewise.
13134         (genrtl_switch_stmt): Likewise.
13135         (genrtl_case_label): Likewise.
13136         (genrtl_begin_compound_stmt): Likewise.
13137         (genrtl_finish_compound_stmt): Likewise.
13138         (genrtl_compound_stmt): Likewise.
13139         (genrtl_asm_stmt): Likewise.
13140         (genrtl_named_return_value): Likewise.
13141         (genrtl_begin_stmt_expr): Likewise.
13142         (genrtl_finish_stmt_expr): Likewise.
13143         (finish_for_stmt): Removed first argument and generate rtl
13144         specific code.
13145         (finish_switch_stmt): Likewise.
13146         (do_poplevel): Removed generate rtl specific code.
13147         (do_pushlevel): Likewise.
13148         (add_tree): Likewise.
13149         (finish_goto_stmt): Likewise.
13150         (finish_expr_stmt): Likewise.
13151         (begin_if_stmt): Likewise.
13152         (finish_if_stmt_cond): Likewise.
13153         (finish_then_clause): Likewise.
13154         (begin_else_clause): Likewise.
13155         (finish_else_clause): Likewise.
13156         (finish_if_stmt): Likewise.
13157         (clear_out_block): Likewise.
13158         (begin_while_stmt): Likewise.
13159         (finish_while_stmt_cond): Likewise.
13160         (finish_while_stmt): Likewise.
13161         (begin_do_stmt): Likewise.
13162         (finish_do_body): Likewise.
13163         (finish_do_stmt): Likewise.
13164         (finish_return_stmt): Likewise.
13165         (begin_for_stmt): Likewise.
13166         (finish_for_init_stmt): Likewise.
13167         (finish_for_cond): Likewise.
13168         (finish_for_expr): Likewise.
13169         (finish_break_stmt): Likewise.
13170         (finish_continue_stmt): Likewise.
13171         (begin_switch_stmt): Likewise.
13172         (finish_switch_cond): Likewise.
13173         (finish_case_label): Likewise.
13174         (begin_try_block): Likewise.
13175         (begin_function_try_block): Likewise.
13176         (finish_try_block): Likewise.
13177         (finish_cleanup_try_block): Likewise.
13178         (finish_cleanup): Likewise.
13179         (finish_function_try_block): Likewise.
13180         (finish_handler_sequence): Likewise.
13181         (finish_function_handler_sequence): Likewise.
13182         (begin_handler): Likewise.
13183         (finish_handler_parms): Likewise.
13184         (begin_catch_block): Likewise.
13185         (finish_handler): Likewise.
13186         (begin_compound_stmt): Likewise.
13187         (finish_compound_stmt): Likewise.
13188         (finish_asm_stmt): Likewise.
13189         (finish_label_stmt): Likewise.
13190         (finish_label_decl): Likewise.
13191         (finish_subobject): Likewise.
13192         (finish_decl_cleanup): Likewise.
13193         (finish_named_return_value): Likewise.
13194         (begin_stmt_expr): Likewise.
13195         (finish_stmt_expr): Likewise.
13196
13197         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
13198         to call genrtl_expr_stmt when appropriate.
13199
13200         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
13201         begin_compound_expr to call genrtl_begin_stmt_expr and
13202         genrtl_begin_compound_expr when appropriate.
13203         (finish_init_stmts): Changed calls to finish_compound_expr and
13204         finish_stmt_expr to call genrtl_finish_compound_expr and
13205         genrtl_finish_stmt_expr when appropriate.
13206         (expand_default_init): Changed call to finish_expr_stmt to call
13207         genrtl_expr_stmt when appropriate.
13208         (build_vec_init): Likewise.
13209
13210         * parse.y (simple_stmt): Removed first argument from call to
13211         finish_for_stmt. Removed first argument from call to
13212         finish_switch_stmt.
13213
13214         * parse.c: Regenerated.
13215
13216         * pt.c (tsubst_expr): Removed first argument from call to
13217         finish_for_stmt. Removed first argument from call to
13218         finish_switch_stmt.
13219
13220 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
13221
13222         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
13223         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
13224
13225         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
13226         (cplus_tree_code_length[]): Likewise.
13227         (cplus_tree_code_name[]): Likewise.
13228         (init_parse): Added call to add_c_tree_codes. Changed
13229         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
13230
13231 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
13232
13233         * cp-tree.h (finish_mem_initializers): Declare.
13234         (count_trees): Likewise.
13235         * parse.y (base_init): Use finish_mem_initializers.
13236         * semantics.c (finish_mem_initializers): New function.
13237
13238         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
13239         the number of trees.
13240         (n_trees): Remove.
13241         (count_trees): Don't use it.
13242
13243 2000-06-15  Jason Merrill  <jason@redhat.com>
13244
13245         * tree.c (count_trees): New debugging function.
13246
13247         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
13248         * init.c (build_member_call): Pull out the name of a DECL.
13249
13250         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
13251         * semantics.c (expand_body): Push to TV_INTEGRATION here.
13252         * optimize.c (optimize_function): Not here.
13253         * pt.c (instantiate_decl): Push to TV_PARSE.
13254
13255 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
13256
13257         * cp-tree.h (struct language_function): Remove x_base_init_list
13258         and x_member_init_list.
13259         (current_base_init_list): Remove.
13260         (current_member_init_list): Likewise.
13261         (setup_vtbl_ptr): Change prototype.
13262         (emit_base_init): Likewise.
13263         (expand_member_init): Likewise.
13264         (reinit_parse_for_function): Remove.
13265         * decl.c (save_function_data): Don't clear x_base_init_list and
13266         x_member_init_list.
13267         (mark_language_function): Don't mark them.
13268         * init.c (perform_member_init): Tweak comment.
13269         (sort_member_init): Take the list of initializers as an argument.
13270         (sort_base_init): Likewise.
13271         (emit_base_init): Likewise.
13272         (expand_member_init): Return the initializer.  Don't use global
13273         variables.
13274         * lex.c (reinit_parse_for_function): Remove.
13275         * method.c (build_template_parm_names): Correct substitution.
13276         (do_build_copy_constructor): Don't use current_member_init_list
13277         and current_base_init_list.
13278         (synthesize_method): Likewise.
13279         * parse.y (base_init): Split mem-initializers into
13280         base-initializers and field-initializers.
13281         (member_init_list): Build up the list here.
13282         (member_init): Return the initializer.
13283         (fn.depfn): Don't use reinit_parse_for_function.
13284         * parse.c: Regenerated.
13285         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
13286         ERROR_MARK.
13287         (tsubst_expr): Don't use current_member_init_list
13288         and current_base_init_list.
13289         (tsubst_expr_values): Rename to ...
13290         (tsubst_initializer_list): ... this.  Use convert_from_reference.
13291         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
13292         and current_base_init_list.
13293         (begin_function_definition): Don't call reinit_parse_for_function.
13294
13295         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
13296
13297         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
13298         correctly.
13299
13300         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
13301
13302 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
13303
13304         * cp-tree.h (IF_COND): Move to c-common.h.
13305         (THEN_CLAUSE): Likewise.
13306         (ELSE_CLAUSE): Likewise.
13307         (WHILE_COND): Likewise.
13308         (WHILE_BODY): Likewise.
13309         (DO_COND): Likewise.
13310         (DO_BODY): Likewise.
13311         (RETURN_EXPR): Likewise.
13312         (EXPR_STMT_EXPR): Likewise.
13313         (FOR_INIT_STMT): Likewise.
13314         (FOR_COND): Likewise.
13315         (FOR_EXPR): Likewise.
13316         (FOR_BODY): Likewise.
13317         (SWITCH_COND): Likewise.
13318         (SWITCH_BODY): Likewise.
13319         (CASE_LOW): Likewise.
13320         (CASE_HIGH): Likewise.
13321         (GOTO_DESTINATION): Likewise.
13322         (COMPOUND_BODY): Likewise.
13323         (ASM_CV_QUAL): Likewise.
13324         (ASM_STRING): Likewise.
13325         (ASM_OUTPUTS): Likewise.
13326         (ASM_INPUTS): Likewise.
13327         (ASM_CLOBBERS): Likewise.
13328         (DECL_STMT_DECL): Likewise.
13329         (STMT_EXPR_STMT): Likewise.
13330         (LABEL_STMT_LABEL): Likewise.
13331         (SCOPE_BEGIN_P): Likewise.
13332         (SCOPE_END_P): Likewise.
13333         (SCOPE_STMT_BLOCK): Likewise.
13334         (SCOPE_NULLIFIED_P): Likewise.
13335         (SCOPE_NO_CLEANUPS_P): Likewise.
13336         (SCOPE_PARTIAL_P): Likewise.
13337         (ASM_VOLATILE_P): Likewise.
13338         (STMT_LINENO): Likewise.
13339         (STMT_LINENO_FOR_FN_P): Likewise.
13340
13341         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
13342         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
13343         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
13344         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
13345         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
13346
13347         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
13348
13349         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
13350         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
13351
13352         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
13353         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
13354         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
13355
13356 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
13357
13358         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
13359         * class.c (dfs_find_final_overrider): Set it appropriately.
13360         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
13361         avoid unneeded secondary vptrs.
13362
13363 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
13364
13365         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
13366         (check_bitfield_decl, check_field_decl): Likewise.
13367         (build_vtbl_or_vbase_field, build_base_field): Likewise.
13368         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
13369         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
13370         (xfer_tag, finish_enum): Likewise.
13371         * decl2.c (finish_builtin_type): Likewise.
13372         * init.c (init_init_processing): Likewise.
13373         * pt.c (instantiate_class_template): Likewise.
13374         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
13375         * cp-tree.h (struct lang_type): Add user_align member.
13376         (CLASSTYPE_USER_ALIGN): Define.
13377
13378 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
13379
13380         * Make-lang.in (c++.install-common): Install g++-cross in
13381         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
13382         $(target_alias)-g++ and $(target_alias)-c++.
13383
13384 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
13385
13386         * class.c (vcall_offset_data_s): Add last_init and fns.
13387         (overrides): Rename to same_signature_p.
13388         (dfs_find_final_overrider): Adjust accordingly.
13389         (mark_overriders): Likewise.
13390         (warn_hidden): Likewise.
13391         (build_vtbl_initializer): Reorganize machinery for building things
13392         at negative offsets.
13393         (build_vcall_and_vbase_vtbl_entries): Likewise.
13394         (build_vbase_offset_vtbl_entries): Likewise.
13395         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
13396         offset entries.  Do not create two entries for functions with the
13397         same signature.
13398         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
13399         (build_rtti_vtbl_entries): Reorganize machinery for building things
13400         at negative offsets.
13401
13402         * optimize.c (expand_call_inline): Don't recurse into the code
13403         used to initialize the parameters more than once.
13404
13405 2000-06-11  Mark Mitchell <mark@codesourcery.com>
13406
13407         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
13408         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
13409         (find_substitution): Only use the `Sa' substitution for
13410         std::allocator, not instantiations of it.
13411         (write_template_prefix): Move comment.  Only use a TREE_LIST to
13412         represent substitutions for a member template.
13413         (write_array_type): Mangle array dimensions correctly.
13414         * optimize.c (maybe_clone_body): Copy more information from the
13415         cloned function.
13416         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
13417         on the regenerated declaration.
13418
13419 2000-06-11  Chip Salzenberg  <chip@valinux.com>
13420             Mark Mitchell <mark@codesourcery.com>
13421
13422         * class.c (build_vtable): Clarify comment.
13423         (build_ctor_vtbl_group): Pass the most derived type to
13424         build_vtable.
13425
13426 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13427
13428         * decl2.c (compare_options): Don't needlessly cast away const-ness.
13429
13430 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
13431
13432         * decl.c (add_binding): Handle duplicate declarations of external
13433         variables.
13434
13435 2000-06-09  Chip Salzenberg  <chip@valinux.com>
13436             Mark Mitchell <mark@codesourcery.com>
13437
13438         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
13439         argument.
13440         (write_signed_number): New macro.
13441         (write_unsigned_number): Likewise.
13442         (write_source_name): Use them.
13443         (write_number): Handle signed and unsigned values.
13444         (write_integer_cst): Use tree_int_cst_sgn, and use
13445         write_unsigned_number or write_signed_number as appropriate.
13446         (write_discriminator): Use write_unsigned_number or
13447         write_signed_number as appropriate.
13448         (write_template_arg_literal): Likewise.
13449         (write_array_type): Use tree_low_cst.
13450         (write_template_parm):  Use write_unsigned_number or
13451         write_signed_number as appropriate.
13452         (write_substitution): Adjust call to write_number.
13453         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
13454         (write_expression): Handle non-type template arguments of
13455         reference type correctly.
13456         (mangle_thunk): Use write_signed_number.
13457
13458 2000-06-09  Chip Salzenberg  <chip@valinux.com>
13459
13460         * mangle.c (find_substition): Don't mangle objects with typename
13461         substitutions (e.g. "cin" as "Si").
13462
13463 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
13464
13465         * call.c (add_candidate): Use ggc_alloc_cleared.
13466         * decl.c (lookup_label): Likewise.
13467         * lex.c (retrofit_lang_decl): Likewise.
13468
13469 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
13470
13471         * semantics.c (expand_body): Push to TV_EXPAND.
13472         * optimize.c (optimize_function): Push to TV_INTEGRATION.
13473         * decl.c (start_function): Always call announce_function.
13474
13475         * tinfo2.cc: Just declare abort.
13476
13477 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
13478
13479         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
13480         whenever @ is a symbolic name.
13481
13482 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
13483
13484         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
13485
13486 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
13487
13488         * decl.c (pushdecl): Look up functions by DECL_NAME, not
13489         DECL_ASSEMBLER_NAME.
13490
13491 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
13492
13493         * decl2.c (c_language): Define.
13494
13495 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
13496
13497         * lex.c (lang_init_options): Tweak.
13498
13499         * decl2.c: Remove #inclusion of diagnostic.h
13500         (lang_decode_option): Move diagnostic formatting options to
13501         toplevel.
13502
13503         * lang-options.h: Remove documentation for diagnostic options.
13504
13505         * Makefile.in (lex.o): Depends upon diagnostic.h
13506
13507 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
13508
13509         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
13510         the same DECL_RESULT, it's not a redefinition.
13511         * pt.c (tsubst_decl): Remove code to handle illegal
13512         specializations.
13513
13514 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
13515
13516         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
13517
13518 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
13519
13520         * search.c (maybe_suppress_debug_info): Don't check
13521         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
13522
13523         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
13524         here if extern_p.
13525
13526         Remember instantiation context in deferred instantiations.
13527         * cp-tree.h (struct tinst_level): Remove.
13528         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
13529         * pt.c (current_tinst_level): Now a tree.
13530         (print_template_context, push_tinst_level, pop_tinst_level,
13531         tinst_for_decl): Adjust.
13532         (reopen_tinst_level): New fn.
13533         (init_pt): Register current_tinst_level as a root.
13534         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
13535         of the pending templates list.
13536         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
13537         * lex.c (extract_interface_info): Adjust.
13538         * decl2.c (warn_if_unknown_interface): Adjust.
13539
13540 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
13541
13542         * class.c (indirect_primary_base_p): New function.
13543         (determine_primary_base): Use it.
13544
13545 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
13546
13547         Update new-abi dynamic cast algorithm.
13548         * tinfo.cc (__class_type_info::__dyncast_result): Add
13549         whole_details. Adjust constructor.
13550         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
13551         Avoid unnecessary searching.
13552         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
13553
13554 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13555
13556         * decl.c (init_decl_processing): Don't call record_component_aliases.
13557         * tree.c (build_cplus_array_type_1): Likewise.
13558
13559 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
13560
13561         * ir.texi: Correct typo.
13562         * mangle.c (write_expression): Handle non-type template arguments
13563         with reference type.
13564         * method.c (build_overload_value): Likewise.
13565         * pt.c (convert_nontype_argument): Explicitly represent conversion
13566         to a reference with an ADDR_EXPR.
13567         (unify): Always unify arguments in left-to-right order.
13568
13569 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
13570             Mark Mitchell  <mark@codesourcery.com>
13571
13572         * Make-lang.in (CXX_SRCS): Add mangle.c.
13573         * Makefile.in (CXX_OBJS): Add mangle.o.
13574         (mangle.o): New rule.
13575
13576         * class.c (local_classes): New variable.
13577         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
13578         (get_vtt_name): Use mangle_vtt_name for new ABI.
13579         (init_class_processing): Initialize local_classes.
13580         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
13581         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
13582         (std_identifier): New macro.
13583         (DECL_VOLATILE_MEMFUNC_P): New macro.
13584         (DECL_NAMESPACE_STD_P): Likewise.
13585         (local_classes): Declare.
13586         (get_mostly_instantiated_function_type): Declare.
13587         (init_mangle): Declare.
13588         (mangle_decl): Likewise.
13589         (mangle_type_string): Likewise.
13590         (mangle_type): Likewise.
13591         (mangle_typeinfo_for_type): Likewise.
13592         (mangle_typeinfo_string_for_type): Likewise.
13593         (mangle_vtbl_for_type): Likewise.
13594         (mangle_vtt_for_type): Likewise.
13595         (mangle_ctor_vtbl_for_type): Likewise.
13596         (mangle_thunk): Likewise.
13597         (mangle_conv_op_name_for_type): Likewise.
13598         (mangle_guard_variable): Likewise.
13599         * decl.c (pushtag): Keep track of local classes.
13600         (initialize_predefined_identifiers): Initialize std_identifier.
13601         (init_decl_processing): Use std_identifier.
13602         (start_decl): Don't treat instantiations as specializations.
13603         (grokdeclarator): Likewise.
13604         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
13605         name for fully-instantiated templates.
13606         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
13607         destructors with the new ABI.
13608         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
13609         (grokfield): Use mangle_type for new ABI.
13610         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
13611         (get_sentry): Use mangle_guard_variable for new ABI.
13612         (start_static_initialization_or_destruction): Likewise.
13613         * expr.c (extract_aggr_init): Remove.
13614         (extract_scalar_init): Likewise.
13615         (extract_init): Remove #if 0'd code.
13616         * mangle.c: New function.
13617         * method.c (build_mangled_name): Assert not flag_new_abi.
13618         (build_static_name): Likewise.
13619         (build_decl_overload_real): Likewise.
13620         (build_typename_overload): Likewise.
13621         (build_overload_with_type): Likewise.
13622         (build_overload_name): Likewise.
13623         (get_ctor_vtbl_name): Likewise.
13624         (start_squangling): Likewise.
13625         (get_id_2): Likewise.
13626         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
13627         (init_method): Call init_mangle for new ABI.
13628         (make_thunk): Call mangle_thunk for new ABI.
13629         * operators.def: Correct new ABI manglings for the `%' operator.
13630         Add `::' operator.
13631         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
13632         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
13633         (lookup_template_class): Call mangle_decl for new ABI.
13634         (get_mostly_instantiated_function_type): New function.
13635         (set_mangled_name_for_template_decl): Use it.
13636         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
13637         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
13638         conversion op names.
13639         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
13640         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
13641         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
13642         mangle_typeinfo_string_for_type.
13643
13644 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
13645
13646         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
13647         (INNERMOST_TEMPLATE_ARGS): New macro.
13648         (innermost_args): Remove.
13649         (get_innermost_template_args): New function.
13650         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
13651         * error.c (dump_function_decl): Be caution when using
13652         most_general_template.
13653         * method.c (build_template_parm_names):  Use
13654         INNERMOST_TEMPLATE_ARGS.
13655         * pt.c (add_to_template_args): Tidy comment
13656         (get_innermost_template_args): New function.
13657         (check_explicit_specialization): Clear DECL_INITIAL for a new
13658         specialization.
13659         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
13660         Tidy.
13661         (push_template_decl): Always register specializations of the most
13662         general template.
13663         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
13664         (coerce_template_parms): Likewise.
13665         (lookup_template_class): Likewise.
13666         (innermost_args): Remove.
13667         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
13668         (tsubst_decl): Handle tricky specializations.  Use
13669         get_innermost_template_args.
13670         (instantiate_template): Simplify handling of partial
13671         instantiations.
13672         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
13673         (most_general_template): Reimplement, in a more straightforward
13674         manner.
13675         (regenerate_decl_from_template): Tweak formatting.  Use
13676         TMPL_ARGS_DEPTH for clarity.
13677         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
13678
13679         * dump.c (dequeue_and_dump): Dump information about thunks.
13680
13681 2000-06-01  Richard Henderson  <rth@cygnus.com>
13682
13683         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
13684
13685 2000-06-01  Richard Henderson  <rth@cygnus.com>
13686
13687         * decl2.c (unsupported_options): Fix typo, make const.
13688         (lang_decode_option): Fix bsearch argument order.
13689
13690 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
13691
13692         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
13693         on FIELD_DECLs.
13694
13695 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13696
13697         * cp-tree.h (c_get_alias_set): Deleted.
13698         * Makefile.in (decl.o): Include ../expr.h.
13699         * decl.c (expr.h): Include.
13700         (init_decl_processing): Call record_component_aliases for arrays.
13701         (grokdeclarator): Likewise.
13702         Set TREE_ADDRESSABLE for fields that aren't bitfields.
13703         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
13704
13705 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
13706
13707         Remove guiding declaration support.
13708         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
13709         (flag_guiding_decls): Remove.
13710         * call.c (build_user_type_conversion_1): Remove support for
13711         guiding decls.
13712         (build_new_function_call): Likewise.
13713         (build_new_op): Likewise.
13714         (build_new_method_call): Likewise.
13715         * decl.c (start_function): Likewise.
13716         * friend.c (is_friend): Likewise.
13717         (do_friend): Likewise.
13718         * decl2.c ((flag_dump_translation_unit): Make it const.
13719         (flag_guiding_decls): Remove.
13720         (unsupported_options): New variable
13721         (compare_options): New function.
13722         (lang_decode_option): Use them.
13723
13724         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
13725
13726         * method.c (mangle_expression): Adjust test for legal expression
13727         operators.
13728
13729         * pt.c (instantiate_decl): Save and restore the local
13730         specializations list.
13731
13732 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
13733
13734         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
13735
13736 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
13737
13738         * call.c (add_template_candidate_real): Handle member template
13739         constructors for classes with virtual bases.
13740         (build_user_type_conversion_1): Use in_charge_arg_for_name.
13741         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
13742
13743         * ir.texi: Update thunk documentation.
13744
13745         * call.c (joust): Fix handling of overloaded builtin operators.
13746
13747 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
13748
13749         * cp-tree.h (DECL_ANTICIPATED): New macro.
13750         Document new use of DECL_LANG_FLAG_7.
13751         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
13752         in the user namespace.
13753         * lex.c (do_identifier): If the identifier's declaration has
13754         DECL_ANTICIPATED on, it has not yet been declared.  But do not
13755         replace it with an ordinary implicit declaration.
13756
13757         * tinfo2.cc: Include stdlib.h.
13758
13759 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
13760
13761         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
13762         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
13763         CLASSTYPE_ALIGN.
13764
13765 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
13766
13767         * decl2.c (lang_decode_option): Use skip_leading_substring instead
13768         of plain strncmp.
13769
13770 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
13771
13772         * operators.def (<?): Duplicated, should have been...
13773         (>?): this.  Fixed.
13774
13775 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
13776             Mark Mitchell  <mark@codesourcery.com>
13777
13778         * cp-tree.h (ansi_opname): Make it a macro.
13779         (ansi_assopname): Likewise.
13780         (struct lang_decl_flags): Add assignment_operator_p.
13781         (struct lang_decl): Add operator_code.
13782         (DECL_VTT_PARM): Adjust.
13783         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
13784         overloaded operator.
13785         (SET_OVERLOADED_OPERATOR_CODE): New macro.
13786         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
13787         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
13788         (opname_tab): Remove.
13789         (assignop_tab): Likewise.
13790         (operator_name_info_t): New type.
13791         (operator_name_info): New variable.
13792         (assignment_operator_name_info): Likewise.
13793         (build_cp_library_fn): Remove declaration.
13794         (push_cp_library_fn): Likewise.
13795         (operator_name_string): Likewise.
13796         (build_decl_overload): Likewise.
13797         * call.c (print_z_candidates): Simplify.
13798         (build_object_call): Adjust usage of ansi_opname.  Use
13799         DECL_OVERLOADED_OPERATOR_P.
13800         (op_error): Adjust operator name lookup.
13801         (build_conditional_expr): Adjust usage of ansi_opname.
13802         (build_new_op): Likewise.
13803         (build_op_delete_call): Likewise.
13804         (build_over_call): Likewise.
13805         (joust): Use DECL_OVERLOADED_OPERATOR_P.
13806         * decl.c (duplicate_decls): Copy operator_code.
13807         (init_decl_processing): Adjust parameters to push_cp_library_fn.
13808         (builtin_function): Adjust parameters to build_library_fn_1.
13809         (build_library_fn_1): Accept an overloaded operator code.
13810         (build_library_fn): Pass ERROR_MARK.
13811         (build_cp_library_fn): Accept an overloaded operator code.
13812         (push_cp_library_fn): Likewise.
13813         (grokfndecl): Tweak.
13814         (grokdeclarator): Simplify code to compute names of overloaded
13815         operators.  Adjust use of ansi_opname.
13816         (ambi_op_p): Work on tree_codes, not identifiers.
13817         (unary_op_p): Likewise.
13818         (grok_op_properties): Likewise.
13819         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
13820         (lang_mark_tree): Don't try to mark the operator_code.
13821         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
13822         * error.c (dump_decl): Remove special handling for operator
13823         names.
13824         (dump_function_name): Likewise.
13825         (dump_expr): Adjust name lookup of operators.
13826         (op_to_string): Simplify.
13827         (assop_to_string): Likewise.
13828         * init.c (build_new_1): Adjust use of ansi_opname.
13829         * lex.c (opname_tab): Remove.
13830         (assignop_tab): Likewise.
13831         (ansi_opname): Likewise.
13832         (ansi_assopname): Likewise.
13833         (operator_name_string): Likewise.
13834         (reinit_lang_specific): Likewise.
13835         (operator_name_info): New variable.
13836         (assignment_operator_name_info): Likewise.
13837         (init_operators): New function.
13838         (init_parse): Use it.
13839         (do_identifier): Adjust use of ansi_opname.
13840         * method.c (mangle_expression): Don't use ansi_opname for
13841         mangling.
13842         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
13843         (build_decl_overload): Remove.
13844         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
13845         (do_build_assign_ref): Adjust use of ansi_opname.
13846         (synthesize_method): Likewise.
13847         (implicitly_declare_fn): Likewise.
13848         * operators.def: New file.
13849         * parse.y (operator): Adjust use of ansi_opname.
13850         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
13851         (set_mangled_name_for_template_decl): Don't play games with
13852         current_namespace.
13853         (special_function_p): Adjust use of ansi_opname.
13854         * typeck.c (check_return_expr): Likewise.
13855         * Make-lang.in (cc1plus): Depend on operators.def.
13856         * Makefile.in (lex.o): Likewise.
13857         (decl.o): Likewise.
13858
13859 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
13860
13861         * Make-lang.in (cplib2.ready): Eradicate.
13862
13863 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13864
13865         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
13866         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
13867         (built_min, cp_tree_equal): Likewise.
13868
13869 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
13870
13871         * class.c (layout_nonempty_base_or_field): Replace
13872         `record_layout_info' with `record_layout_info_s'.
13873
13874 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
13875
13876         Fix goto checking.
13877         * cp-tree.h (struct language_function): x_named_labels is now
13878         a struct named_label_list*.
13879         * decl.c (struct named_label_use_list): Renamed from...
13880         (struct named_label_list): ...this.  New struct.
13881         (push_binding_level): Don't set eh_region.
13882         (note_level_for_eh): New fn.
13883         (pop_label): Take label and old value directly.
13884         (pop_labels): Adjust for new named_labels format.
13885         (lookup_label): Likewise.
13886         (poplevel): Note characteristics of a binding level containing a
13887         named label.  Mess with named label lists earlier.
13888         (mark_named_label_lists): New fn.
13889         (mark_lang_function): Call it.
13890         (use_label): New fn, split out from...
13891         (make_label_decl): ...here.  Don't call it.
13892         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
13893         check_previous_gotos): New fns, split out from...
13894         (define_label): ...here.
13895         (check_switch_goto): New fn.
13896         (define_case_label): Call it.
13897         (check_goto): New fn.
13898         * semantics.c (finish_goto_stmt): Call it and use_label.
13899         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
13900         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
13901
13902 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
13903
13904         * class.c (build_vtable_entry_ref): Correct usage of
13905         get_vtbl_decl_for_binfo.
13906
13907         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
13908         * method.c (implicitly_declare_fn): Not here.
13909
13910 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
13911
13912         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
13913         (CPTI_PTMD_DESC_TYPE): ... here.
13914         (ptmd_desc_type_node): Rename to ...
13915         (ptm_desc_type_node): ... here.
13916         * decl.c: Likewise.
13917         * rtti.c (ptmd_initializer): Rename to ...
13918         (ptm_initializer): ... here.
13919         (sythesize_tinfo_var): Adjust. Deal with pointer to member
13920         function.
13921         (create_tinfo_types): Adjust.
13922
13923 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
13924
13925         Finish implementation of VTTs.
13926         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
13927         CPTI_VTT_PARM_IDENTIFIER.
13928         (vtt_parm_identifier): New macro.
13929         (vtt_parm_type): Likewise.
13930         (BINFO_SUBVTT_INDEX): Likewise.
13931         (BINFO_VPTR_INDEX): Likewise.
13932         (struct lang_decl): Add vtt_parm.
13933         (DECL_VTT_PARM): New macro.
13934         (DECL_USE_VTT_PARM): Likewise.
13935         (DECL_NEEDS_VTT_PARM_P): Likewise.
13936         (get_vtt_name): Declare.
13937         (build_artificial_parm): Likewise.
13938         (fixup_all_virtual_upcast_offsets): Likewise.
13939         (expand_indirect_vtbls_init): Remove.
13940         * call.c (build_new_method_call): Pass the vtt to subobject
13941         constructors and destructors.
13942         * class.c (get_vtt_name): Give it external linkage.
13943         (build_clone): Handle the magic VTT parameters for clones.
13944         (clone_function_decl): Fix typo in comment.
13945         (build_vtt): Keep track of the indices in the VTTs where various
13946         entities are stored.
13947         (build_vtt_inits): Likewise.
13948         (dfs_build_vtt_inits): Likewise.
13949         (build_ctor_vtbl_group): Tweak type of construction vtables.
13950         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
13951         primary bases, when building construction vtables.
13952         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
13953         (initialize_predefined_identifiers): Add vtt_parm_identifier.
13954         (init_decl_processing): Initialize vtt_parm_type.
13955         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
13956         (lang_mark_tree): Make vtt_parm.
13957         * decl2.c (build_artificial_parm): New function.
13958         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
13959         (grokclassfn): Use build_artificial_parm.
13960         * init.c (initialize_vtbl_ptrs): Call
13961         fixup_all_virtual_upcast_offsets directly.
13962         (perform_member_init): Use the complete subobject destructor for
13963         member cleanups.
13964         (build_vtbl_address): New function.
13965         (expand_virtual_init): Handle VTTs.
13966         * optimize (maybe_clone_body): Likewise.
13967         * search.c (fixup_all_virtual_upcast_offsets): Give it external
13968         linkage.
13969         (expand_indirect_vtbls_init): Remove.
13970         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
13971         * tree.c (make_binfo): Make them bigger.
13972
13973 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
13974
13975         * inc/cxxabi.h (__pbase_type_info): Define, based on
13976         __pointer_type_info.
13977         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
13978         (__pointer_to_member_type_info): Likewise.
13979         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
13980         (__pointer_to_member_type_info::__is_pointer_p): Remove.
13981         (__pointer_type_info::__do_catch): Rename to ...
13982         (__pbase_type_info::__do_catch): ... here. Adjust.
13983         (__pbase_type_info::__pointer_catch): Implement.
13984         (__pointer_type_info::__pointer_catch): Adjust.
13985         (__pointer_to_member_type_info::__pointer_catch): Adjust.
13986
13987 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
13988
13989         * tinfo.h (__user_type_info::contained_virtual_p): New
13990         predicate.
13991         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
13992         shaped hierarchy.
13993         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
13994         diamond shaped hierarchy. Add early out for mixed diamond and
13995         duplicate shaped hierarchy.
13996
13997 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
13998
13999         * cp-tree.h (build_delete): Change prototype.
14000         (build_vec_delete): Likewise.
14001         * call.c (build_scoped_method_call): Use special_function_kind
14002         values to indicate the kind of destruction to be done.
14003         (build_method_call): Likewise.
14004         * decl.c (finish_destructor_body): Likewise.
14005         (maybe_build_cleanup_1): Likewise.  Rename to ...
14006         (maybe_build_cleanup): ... this.
14007         * decl2.c (delete_sanity): Use special_function_kind
14008         values to indicate the kind of destruction to be done.
14009         (build_cleanup): Likewise.
14010         * init.c (perform_member_init): Likewise.
14011         (build_vec_delete_1): Likewise.
14012         (build_dtor_call): Simplify.
14013         (build_delete): Use special_function_kind
14014         values to indicate the kind of destruction to be done.
14015         (build_vbase_delete): Likewise.
14016         (build_vec_delete): Likewise.
14017
14018         * init.c (sort_member_init): Fix typo in error message generation
14019         code.
14020
14021 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
14022
14023         * semantics.c (begin_class_definition): make the packed
14024         attribute be sensitive to the "-fpack-struct" command line flag
14025
14026 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
14027
14028         Update new-abi upcast algorithm.
14029         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
14030         prototype and meaning of return value.
14031         (__si_class_type_info::__do_upcast): Likewise.
14032         (__vmi_class_type_info::__do_upcast): Likewise.
14033         * tinfo.cc (__class_type_info::__upcast_result): Replace
14034         whole2dst with part2dst. Adjust ctor.
14035         (__class_type_info::__do_upcast): Adjust call of worker function.
14036         (__class_type_info::__do_upcast): Adjust.
14037         (__si_class_type_info::__do_upcast): Adjust. Use parent's
14038         __do_upcast.
14039         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
14040         virtual base in diamond hierarchy bug.
14041
14042 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
14043
14044         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
14045         and bitfield to tinfo_fn_p.
14046         (DECL_TINFO_FN_P): Adjust.
14047         (SET_DECL_TINFO_FN_P): Likewise.
14048         (DECL_MUTABLE_P): Likewise.
14049         (DECL_C_BIT_FIELD): Likewise.
14050         (SET_DECL_C_BIT_FIELD): Likewise.
14051         (CLEAR_DECL_C_BIT_FIELD): Likewise.
14052         (DECL_UNINLINABLE): Likewise.
14053         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
14054         (handle_using_decl): Remove assertion.
14055         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
14056         to build FIELD_DECLs.
14057         (build_base_field): Likewise.
14058         (layout_class_type): Likewise.
14059         * decl.c (init_decl_processing): Likewise.
14060         (build_ptrmemfunc_type): Likewise.
14061         (grokdeclarator): Likewise.
14062         * decl2.c (grok_x_components): Likewise.
14063         * except.c (call_eh_info): Likewise.
14064         * init.c (init_init_processing): Likewise.
14065         * rtti.c (expand_class_desc): Likewise.
14066         (create_pseudo_type_info): Likewise.
14067         (get_vmi_pseudo_type_info): Likewise.
14068         (create_tinfo_types): Likewise.
14069         * ptree.c (print_lang_decl): Adjust.
14070         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
14071         before checking DECL_MUTABLE_P.
14072
14073         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
14074         parameters for template functions.
14075         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
14076         destructors as well as constructors.
14077
14078 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
14079
14080         * class.c (build_ctor_vtbl_group): Set inits.
14081         * optimize.c (maybe_clone_body): Set DECL_INLINE and
14082         DECL_THIS_INLINE appropriately for clones.
14083
14084         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
14085         (DECL_CONV_FN_P): Simplify.
14086         (DECL_OPERATOR): Remove.
14087         (language_to_string): Declare.
14088         * decl.c (duplicate_decls): Fix typo in comment.
14089         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
14090         (grok_op_properties): Use DECL_CONV_FN_P instead of
14091         IDENTIFIER_TYPENAME_P.
14092         * dump.c (dequeue_and_dump): Dump the language linkage of
14093         declarations.
14094         * error.c (language_to_string): Give it external linkage.
14095         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
14096         (implicitly_declare_fn): Set DECL_LANGUAGE.
14097         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
14098         IDENTIFIER_TYPENAME_P.
14099         (tsubst_decl): Likewise.
14100         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
14101         * semantics.c (finish_member_declaration): Don't mark members of
14102         classes declared in an extern "C" region as extern "C".
14103
14104 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14105
14106         * decl2.c (qualified_lookup_using_namespace): Look through
14107         namespace aliases.
14108
14109         * decl.c (push_using_decl): Return the old decl on namespace level.
14110
14111 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
14112
14113         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
14114         (VTT_NAME_PREFIX): New macro.
14115         (CTOR_VTBL_NAME_PREFIX): Likewise.
14116         (get_ctor_vtbl_name): New function.
14117         * class.c (get_vtable_name): Simplify.
14118         (get_vtt_name): New function.
14119         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
14120         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
14121         when a virtual base becomes primary.
14122         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
14123         VTTs.
14124         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
14125         additional parameters.
14126         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
14127         (initialize_array): New function.
14128         (build_vtt): Likewise.
14129         (build_vtt_inits): Likewise.
14130         (dfs_build_vtt_inits): Likewise.
14131         (dfs_fixup_binfo_vtbls): Likewise.
14132         (build_ctor_vtbl_group): Likewise.
14133         (initialize_vtable): Use initialize_array.
14134         (accumulate_vtbl_inits): Reimplement to handle construction
14135         vtables.
14136         (dfs_accumulate_vtbl_inits): Likewise.
14137         (bulid_vtbl_initializer): Adjust parameter name.
14138         * method.c (build_typename_overload): Remove #if 0'd code.
14139         (get_ctor_vtbl_name): New function.
14140         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
14141         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
14142
14143         * cp-tree.h (struct lang_type): Remove search_slot.
14144         (CLASSTYPE_SEARCH_SLOT): Remove.
14145         (emit_base_init): Change prototype.
14146         (initialize_vtbl_ptrs): Likewise.
14147         (expand_indirect_vtbls_init): Likewise.
14148         (clear_search_slots): Remove.
14149         * decl.c (lang_mark_tree): Don't mark search_slot.
14150         * init.c (initialize_vtbl_ptrs): Simplify.
14151         (emit_base_init): Likewise.
14152         * search.c (struct vbase_info): Document decl_ptr.
14153         (convert_pointer_to_single_level): Remove.
14154         (dfs_find_vbases): Remove.
14155         (dfs_init_base_pointers): Simplify.
14156         (dfs_clear_vbase_slots): Remove.
14157         (dfs_vtable_path_unmark): New function.
14158         (init_vbase_pointers): Simplify.
14159         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
14160         (expand_indirect_vtbls_init): Simplify.  Don't call
14161         mark_all_temps_used.
14162         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
14163         initialize_vtbl_ptrs.
14164
14165 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
14166
14167         * except.c: Add static prototypes.
14168
14169 2000-05-20  H.J. Lu  <hjl@gnu.org>
14170
14171         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
14172
14173 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
14174
14175         Don't create a separate copy of virtual bases for the
14176         CLASSTYPE_VBASECLASSES list.
14177         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
14178         (BINFO_FOR_VBASE): Remove.
14179         (CANONICAL_BINFO): Adjust.
14180         (binfo_for_vbase): New function.
14181         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
14182         instead of BINFO_FOR_VBASE.
14183         (build_vbase_pointer): Likewise.
14184         (build_secondary_vtable): Likewise.
14185         (dfs_mark_primary_bases): Likewise.
14186         (mark_primary_bases): Likewise.
14187         (layout_nonempty_base_or_field): Likewise.
14188         (dfs_set_offset_for_shared_vbases): Likewise.
14189         (dfs_set_offset_for_unshared_vbases): Likewise.
14190         (layout_virtual_bases): Likewise.  Adjust for changes to the
14191         CLASSTYPE_VBASECLASSES list.
14192         (dump_class_hierarchy_r): Use binfo_for_vbase
14193         instead of BINFO_FOR_VBASE.
14194         (dump_class_hierarchy): Likewise.
14195         (finish_vtbls): Likewise.
14196         (build_vtbl_initializer): Adjust for changes to the
14197         CLASSTYPE_VBASECLASSES list.
14198         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
14199         * decl.c (finish_destructor_body): Adjust for changes to the
14200         CLASSTYPE_VBASECLASSES list.
14201         * init.c (sort_base_init): Use binfo_for_vbase.
14202         (construct_virtual_bases): Adjust for changes to the
14203         CLASSTYPE_VBASECLASSES list.
14204         (expand_member_init): Use binfo_for_vbase.
14205         (build_vbase_delete):  Adjust for changes to the
14206         CLASSTYPE_VBASECLASSES list.
14207         * method.c (do_build_copy_constructor): Likewise.
14208         * rtti.c (get_base_offset): Use binfo_for_vbase.
14209         (expand_class_desc): Remove #if 0'd code.
14210         * search.c (struct vbase_info): Remove vbase_types.
14211         (get_base_distance):  Use binfo_for_vbase.
14212         (lookup_field_queue_p): Use CANONICAL_BINFO.
14213         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
14214         (get_pure_virtuals): Adjust for changes to the
14215         CLASSTYPE_VBASECLASSES list.
14216         (dfs_find_vbases): Use binfo_for_vbase.
14217         (dfs_init_vbase_pointers): Likewise.
14218         (init_vbase_pointers): Don't initialize vi.vbase_types.
14219         (virtual_context): Use binfo_for_vbase.
14220         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
14221         CLASSTYPE_VBASECLASSES list.
14222         (expand_indirect_vtbls_init): Simplify.
14223         (dfs_get_vbase_types): Don't replicate virtual bases.
14224         (find_vbase_instance): Use binfo_for_vbase.
14225         (binfo_for_vbase): New function.
14226         * typeck.c (get_delta_difference): Use binfo_for_vbase.
14227
14228 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
14229
14230         * decl2.c (finish_anon_union): Generalize error messages to handle
14231         anonymous structures.
14232         * init.c (perform_member_init): Remove `name' parameter.
14233         (build_field_list): New function.
14234         (sort_member_init): Handle anonymous union initialization order
14235         correctly.  Check for multiple initializations of the same union.
14236         (emit_base_init): Don't look up fields by name here.
14237         (expand_member_init): Record the result of name lookup for future
14238         reference.
14239         * typeck.c (build_component_ref): Fix formatting.
14240
14241 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
14242
14243         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
14244         * typeck.c (build_x_compound_expr): Replace warn_unused with
14245         warn_unused_value.
14246
14247         * decl2.c (lang_decode_option): Update -Wall unused flags by
14248         calling set_Wunused.
14249
14250 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
14251
14252         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
14253         * init.c (dfs_vtable_path_unmark): Remove.
14254         * search.c (marked_new_vtable_p): Likewise.
14255         (unmarked_new_vtable_p): Likewise.
14256         (dfs_search_slot_nonempty_p): Likewise.
14257         (dfs_mark): Likewise.
14258         (dfs_vtable_path_unmark): Likewise.
14259         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
14260         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
14261         (dfs_init_vbase_pointers): Remove special-case new ABI code.
14262         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
14263         (init_vbase_pointers): Simplify.
14264         (expand_indirect_vtbls_init): Likewise.
14265
14266         * class.c (copy_virtuals): New function.
14267         (build_primary_table): Use it.
14268         (build_secondary_vtable): Likewise.
14269         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
14270         indicate that no vcall offset is required.
14271         (add_virtual_function): Likewise.
14272         (modify_all_vtables): Likewise.
14273         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
14274         (dfs_accumulate_vtbl_inits): Likewise.
14275         (build_vtbl_initializer): Make changes to handle construction
14276         vtables.
14277         (dfs_build_vcall_offset_vtbl_entries): Likewise.
14278         (build_rtti_vtbl_entries): Likewise.
14279         (build_vtable_entries): Handle a NULL vcall_index.
14280
14281 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
14282
14283         * decl2.c (lang_decode_option): Fix thinko.
14284
14285 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
14286
14287         * except.c (check_handlers): New fn.
14288         * cp-tree.h: Declare it.
14289         * semantics.c (finish_handler_sequence): Call it.
14290         (finish_function_handler_sequence): Likewise.
14291         (finish_handler_parms): Set TREE_TYPE on the handler.
14292         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
14293         * search.c (get_base_distance_recursive): If protect>1, ignore
14294         special access.
14295         (get_base_distance): Don't reduce watch_access.
14296
14297 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
14298
14299         * lex.c: #include diagnostic.h.
14300         (lang_init_options): Set default prefixing rules.
14301
14302         * lang-options.h: Add -fdiagnostics-show-location=.
14303
14304         * decl2.c: #include diagnostic.h.
14305         (lang_decode_option): Handle -fdiagnostics-show-location=.
14306
14307 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
14308
14309         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
14310         * vec.cc: Revert my 2000-05-07 change.
14311
14312 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
14313
14314         * class.c (check_field_decls): Complain about non-static data
14315         members with same name as class in class with constructor.
14316
14317 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
14318
14319         * decl.c (grokdeclarator): Allow non-static data members with
14320         same name as class.
14321
14322 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
14323
14324         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
14325         and pending_inline.filename.  Update prototypes.
14326         * decl.c (define_label): Constify filename parameter.
14327         * decl2.c (warn_if_unknown_interface): Constify local char *.
14328         * input.c Constify input_source.filename. Don't declare
14329         input_filename or lineno.  Constify filename parameter to feed_input.
14330         * lex.c (init_parse): Constify parameter and return value.
14331         (cp_pragma_interface, cp_pragma_implementation): Constify
14332         filename argument.
14333         (reinit_parse_for_method, reinit_parse_for_block,
14334         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
14335         Constify local char *.
14336         * pt.c: Don't declare lineno or input_filename.
14337         (print_template_context, tsubst_friend_function, tsubst_decl,
14338         tsubst, instantiate_decl): Constify local char *.
14339         * semantics.c (expand_body): Constify local char *.
14340         * tree.c (build_srcloc): Constify filename parameter.
14341         * typeck.c (c_expand_asm_operands): Constify filename
14342         parameter.
14343
14344 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
14345
14346         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
14347         offsetof expansion.
14348
14349 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
14350
14351         * inc/cxxabi.h:  Fix typos in comment.
14352         (__base_class_info::__offset): Use a static_cast.
14353
14354 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
14355
14356         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
14357         of std::size_t and std::ptrdiff_t respectively.
14358         * tinfo.cc: Likewise.
14359         * vec.cc: Likewise.
14360
14361 2000-05-06  Richard Henderson  <rth@cygnus.com>
14362
14363         * typeck.c (build_c_cast): Don't warn integer->pointer size
14364         mismatch for constants.
14365
14366 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
14367
14368         * rtti.c (ptmd_initializer): Set non-public, if class is
14369         incomplete.
14370
14371         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
14372         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14373         __cxa_vec_delete): Likewise.
14374         * tinfo.cc (__dynamic_cast): Likewise.
14375         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14376         __cxa_vec_delete): Likewise.
14377
14378 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
14379
14380         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
14381         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
14382         (lang_decl_flags): Add vcall_offset.
14383         (THUNK_VCALL_OFFSET): Use it.
14384         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
14385         * method.c (make_thunk): Create the lang_decl here, not in
14386         emit_thunk.
14387         (emit_thunk): Make generic thunks into ordinary functions once
14388         they have been fed to expand_body.
14389         * semantics.c (expand_body): Set current_function_is_thunk here.
14390
14391 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14392
14393         * class.c (update_vtable_entry_for_fn): Prototype.
14394
14395         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
14396         and `tmpl'.
14397
14398         * search.c (dfs_build_inheritance_graph_order): Prototype.
14399
14400 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
14401
14402         * cp-tree.h (special_function_kind): Add various kinds of
14403         destructors.
14404         (special_function_p): New function.
14405         * class.c (overrides): Don't let one kind of destructor override
14406         another.
14407         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
14408         whether or not to instantiate a template.
14409         * tree.c (special_function_p): Define.
14410
14411 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
14412
14413         * cp-tree.def (THUNK_DECL): Remove.
14414         * cp-tree.h (DECL_THUNK_P): New macro.
14415         (DECL_NON_THUNK_FUNCTION_P): Likewise.
14416         (DECL_EXTERN_C_FUNCTION_P): Likewise.
14417         (SET_DECL_THUNK_P): Likewise.
14418         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
14419         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
14420         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
14421         * decl.c (decls_match): Use DECL_EXTERN_C_P.
14422         (duplicate_decls): Likewise.
14423         (pushdecl): Likewise.  Adjust thunk handling.
14424         (grokfndecl): Use DECL_EXTERN_C_P.
14425         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
14426         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
14427         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
14428         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
14429         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
14430         DECL_NO_STATIC_CHAIN.
14431         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
14432         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
14433         * search.c (covariant_return_p): Remove THUNK_DECL handling.
14434         * ir.texi: Update.
14435
14436 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
14437
14438         * tree.c (walk_tree): Set lineno.
14439
14440 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
14441
14442         * exception.cc: Update license notice.
14443         * new.cc: Likewise.
14444         * new1.cc: Likewise.
14445         * new2.cc: Likewise.
14446         * tinfo.cc: Likewise.
14447         * tinfo2.cc: Likewise.
14448         * vec.cc: Likewise.
14449         * inc/cxxabi.h: Likewise.
14450         * inc/exception: Likewise.
14451         * inc/new: Likewise.
14452         * inc/new.h: Likewise.
14453         * inc/typeinfo: Likewise.
14454
14455 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
14456
14457         * tree.c (build_target_expr_with_type): If we already have a
14458         TARGET_EXPR, just return it.
14459
14460         * optimize.c (initialize_inlined_parameters): Don't generate an
14461         EXPR_STMT if we can just use DECL_INITIAL.
14462         * decl.c (emit_local_var): Only make the initialization a
14463         full-expression if stmts_are_full_exprs_p.
14464
14465 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
14466
14467         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
14468         macro.
14469         * call.c (standard_conversion): Use it.
14470         (direct_reference_binding): Likewise.
14471         (build_over_call): Likewise.
14472         (is_properly_derived_from): Likewise.
14473         (compare_ics): Likewise.
14474         * class.c (resolves_to_fixed_type_p): Likewise.
14475         * optimize.c (declare_return_variable): Likewise.
14476         * pt.c (is_specialization_of): Likewise.
14477         (unify): Likewise.
14478         * typeck.c (comp_target_parms): Likeiwse.
14479         (build_static_cast): Likewise.
14480         (build_reinterpret_cast): Likewise.
14481         (build_const_cast): Likewise.
14482         (comp_ptr_ttypes_real): Likewise.
14483         (comp_ptr_ttypes_const): Likewise.
14484         * typeck2.c (process_init_constructor): Likewise.
14485
14486 2000-04-30  Scott Snyder <snyder@fnal.gov>
14487
14488         * decl.c (finish_destructor_body): Use the base destructor when
14489         destroying virtual bases.
14490
14491 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
14492
14493         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
14494         STMT_EXPRs.
14495         * optimize.c (struct inline_data): Add target_exprs field.
14496         (declare_return_variable): When a function returns an aggregate,
14497         use the variable declared in the TARGET_EXPR as the remapped
14498         DECL_RESULT.
14499         (expand_call_inline): Update the pending target_exprs stack.
14500         (optimize_function): Initialize the stack.
14501
14502         * decl2.c (finish_file): Fix typo in comment.
14503
14504         * method.c (emit_thunk): Don't try to return a `void' value.
14505
14506         * optimize.c (initialize_inlined_parameters): If the parameter is
14507         addressable, we need to make a new VAR_DECL, even if the
14508         initializer is constant.
14509
14510 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
14511
14512         * decl.c (grok_op_properties): Add an extra check of argtypes.
14513
14514 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
14515
14516         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
14517         variables.
14518         (initialize_inlined_parameters): Try to avoid creating new
14519         VAR_DECLs.
14520
14521 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
14522
14523         * lex.c (my_get_run_time): Remove.
14524         (init_filename_times): Use get_run_time instead of my_get_run_time.
14525         (check_newline): Likewise.
14526         (dump_time_statistics): Likewise.
14527         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
14528         of computing elapsed time explicitly.
14529
14530 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
14531
14532         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
14533         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
14534         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
14535         before calling decl_constant_value.
14536         * class.c (check_bitfield_decl): Likewise.
14537         * cvt.c (ocp_convert): Likewise.
14538         (convert): Likewise.
14539         * decl.c (compute_array_index_type): Likewise.
14540         (build_enumerator): Likewise.
14541         * decl2.c (check_cp_case_value): Likewise.
14542         * pt.c (convert_nontype_argument): Likewise.
14543         (tsubst): Likewise.
14544         * typeck.c (decay_conversion): Likewise.
14545         (build_compound_expr): Likewise.
14546         (build_reinterpret_cast): Likewise.
14547         (build_c_cast): Likewise.
14548         (convert_for_assignment): Likewise.
14549
14550 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
14551
14552         * decl.c (finish_function): Don't play games with DECL_INLINE.
14553
14554 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
14555
14556         * ir.texi: Correct typo.
14557
14558 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14559
14560         * decl.c (grokdeclarator): Reject VLAs as members.
14561
14562 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
14563
14564         * call.c (standard_conversion): Accept conversion between
14565         COMPLEX_TYPEs.
14566
14567         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
14568
14569 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
14570
14571         * decl2.c (finish_file): Remove double setup for accounting
14572         compile time.
14573
14574 2000-04-24  Robert Lipe <robertlipe@usa.net>
14575
14576         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
14577
14578 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
14579
14580         * new.cc (set_new_handler): Needs to be in std::.
14581
14582 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
14583
14584         * cp-tree.h (lang_decl): Remove pretty_function_p.
14585         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
14586         language-specific node.
14587         * decl.c (cp_make_fname_decl): Use build_decl, not
14588         build_lang_decl, to build the variables.
14589         (grokvardecl): Don't call build_lang_decl for local variables in
14590         templates.
14591         (grokdeclarator): Don't call build_lang_decl for local type
14592         declarations in templates.
14593         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
14594         zero'd memory, rather than calling memset.
14595         * pt.c: Include hashtab.h.
14596         (local_specializations): New variable.
14597         (retrieve_local_specialization): Use it.
14598         (register_local_specialization): Likewise.
14599         (tsubst_decl): Don't assume local variables have
14600         DECL_LANG_SPECIFIC.
14601         (instantiate_decl): Set up local_specializations.
14602         * Makefile.in (HTAB_H): New variable.
14603
14604 2000-04-23  Richard Henderson  <rth@cygnus.com>
14605
14606         * typeck.c (c_expand_asm_operands): Restore the original
14607         contents of the output list.
14608
14609 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
14610
14611         * ir.texi:  Document complex number representation.
14612
14613 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
14614
14615         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
14616         (target_incomplete_p): New function.
14617         (tinfo_base_init): Create comdat NTBS name variable.
14618         (ptr_initializer): Add non_public parameter. Calculate it.
14619         (ptmd_initializer): Likewise.
14620         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
14621         (create_real_tinfo_var): Add non_public parameter. Use it.
14622         Push proxy into global namespace.
14623         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
14624         New enumeration.
14625         * inc/typeinfo (type_info::before, type_info::operator==):
14626         Compare __name addresses.
14627
14628         * tinfo2.cc: Remove new-abi builtins comment.
14629
14630 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
14631
14632         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
14633
14634         * call.c (joust): Exit early if we get the same function, too.
14635
14636         * decl2.c (key_method): Return NULL_TREE for template classes.
14637         (import_export_class): Don't need to check for template classes.
14638
14639 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
14640
14641         * lex.c: Remove references to cccp.c.
14642
14643 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
14644
14645         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
14646         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
14647         (DECL_DESTRUCTOR_P): Use destructor_attr.
14648         (DECL_CONST_MEMFUNC_P): Reimplement.
14649         (DECL_VOLATILE_MEMFUNC_P): Remove.
14650         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
14651         (overrides): Use DECL_DESTRUCTOR_P.
14652         (check_for_override): Likewise.
14653         * decl.c (start_function): Likewise.
14654         * decl2.c (grokfclassfn): Likewise.
14655         (check_classfn): Likewise.
14656         (grok_function_init): Likewise.
14657
14658 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
14659
14660         * decl2.c (grokfield): Issue error on illegal data member
14661         declaration.
14662
14663 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
14664
14665         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
14666
14667 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
14668
14669         * class.c (build_vtable_entry): Don't build thunks for type-info
14670         functions.
14671
14672 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
14673
14674         * decl.c (decls_match): Allow a redeclaration of a builtin to
14675         specify args while the builtin did not.
14676
14677 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
14678
14679         * cp-tree.def (THUNK_DECL): Add to documentation.
14680         * cp-tree.h (flag_huge_objects): Declare.
14681         * class.c (modify_vtable_entry): Tidy.
14682         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
14683         Calculate delta appropriately for the new ABI.
14684         (dfs_modify_vtables): Use it.
14685         (modify_all_vtables): Fix thinko in code to add overriding copies
14686         of functions to primary vtables.
14687         (build_clone): Fix typo in comment.
14688         (clone_function_decl): Correct order of destructors in vtable.
14689         (build_vbase_offset_vtbl_entries): Adjust comment.
14690         (dfs_vcall_offset_queue_p): Remove.
14691         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
14692         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
14693         (build_vtable_entry): Correct check for pure virtual functions.
14694         Don't declare flag_huge_objects.
14695         * decl.c (flag_huge_objects): Remove declaration.
14696         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
14697         Use int_size_in_bytes.
14698         (emit_thunk): Handle vcall offset thunks.
14699
14700 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14701
14702         * decl2.c (parse_time, varconst_time): Delete declarations.
14703         (finish_file): Delete LINENO declaration.
14704         START_TIME and THIS_TIME now long.
14705
14706 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
14707
14708         * class.c (build_base_field): Reformat comment.
14709
14710         * inc/cxxabi.h (stddef.h): Comment inclusion.
14711         (__base_class_info::__offset): Comment shift.
14712
14713 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
14714
14715         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
14716         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
14717         (cp_push_exception_identifier): New macro.
14718         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
14719         (DECL_BASE_DESTRUCTOR_P): Likewise.
14720         (DECL_DELETING_DESTRUCTOR_P): Likewise.
14721         (get_vtbl_decl_for_binfo): Fix formatting.
14722         (in_charge_arg_for_name): New macro.
14723         (maybe_build_cleanup_and_delete): Remove declaration.
14724         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
14725         (in_charge_arg_for_name): New function.
14726         (build_new_method_call): Use it.  Handle cloned destructors.
14727         (build_clone): Don't make the base constructor virtual.
14728         Automatically defer generated functions.
14729         (clone_function_decl): Handle destructors, too.
14730         (clone_constructors_and_destructors): Likewise.
14731         (create_vtable_ptr): Don't create a vtable entry for a cloned
14732         function.
14733         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
14734         (initialize_predefined_identifiers): Update appropriately.
14735         (finish_destructor_body): Simplify.
14736         (maybe_build_cleanup_and_delete): Remove.
14737         * except.c (expand_throw): Handle new-ABI destructors.
14738         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
14739         (build_dtor_call): New function.
14740         (build_delete): Use it.  Simplify.
14741         * optimize.c (maybe_clone_body): Handle destructors.
14742         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
14743
14744         * exception.cc (cleanup_fn): New typedef.
14745         (CALL_CLEANUP): New macro.
14746         (cp_eh_info): Use them.
14747         (__cp_push_exception): Likewise.
14748         (__cp_pop_exception): Likewise.
14749
14750 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
14751
14752         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
14753         (complete_dtor_identifier): New macro.
14754         (CLASSTYPE_FIRST_CONVERSION): Remove.
14755         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
14756         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
14757         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
14758         (CLASSTYPE_CONSTRUCTORS): Likewise.
14759         (CLASSTYPE_DESTRUCTORS): Likewise.
14760         (lang_decl): Add cloned_function.
14761         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
14762         (DECL_BASE_CONSTRUCTOR_P): Likewise.
14763         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
14764         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
14765         (DECL_CLONED_FUNCTION_P): Likewise.
14766         (DECL_CLONED_FUNCTION): Likewise.
14767         (clone_function_decl): Declare.
14768         (maybe_clone_body): Likewise.
14769         * call.c (build_user_type_conversion_1): Call complete object
14770         constructors in the new ABI.
14771         (build_new_method_call): Don't add in-charge parameters under the
14772         new ABI.
14773         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
14774         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
14775         CLASSTYPE_DESTRUCTOR_SLOT.
14776         (build_clone): New function.
14777         (clone_function_decl): Likewise.
14778         (clone_constructors_and_destructors): Likewise.
14779         (check_bases_and_members): Use it.
14780         * decl.c (iniitialize_predefined_identifiers): Initialize
14781         complete_dtor_identifier.
14782         (finish_function): Don't add extra code to a clone.
14783         (lang_mark_tree): Mark cloned_function.
14784         * decl2.c (mark_used): Don't bother trying to instantiate things
14785         we synthesized.
14786         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
14787         * method.c (set_mangled_name_for_decl): Don't treat clones as
14788         constructors.
14789         (synthesize_method): Sythesize cloned functions, not the clones.
14790         * optimize.c (inline_data): Update comment on ret_label.
14791         (remap_block): Don't assume DECL_INITIAL exists.
14792         (copy_body_r): Allow ret_label to be NULL.
14793         (maybe_clone_body): Define.
14794         * pt.c (tsubst_decl): Handle clones.
14795         (instantiate_clone): New function.
14796         (instantiate_template): Use it.
14797         (set_mangled_name_for_template_decl): Don't treat clones as
14798         constructors.
14799         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
14800         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
14801         * semantics.c (expand_body): Clone function bodies as necessary.
14802
14803         * optimize.c (remap_decl): Avoid sharing structure for arrays
14804         whose size is only known at run-time.
14805         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
14806
14807         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
14808         to has_in_charge_parm_p.
14809         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
14810         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
14811         (DECL_COPY_CONSTRUCTOR_P): New macro.
14812         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
14813         (build_user_type_conversion_1): Likewise.
14814         (convert_like_real): Likewise.
14815         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
14816         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
14817         (copy_args_p): Likewise.
14818         (grok_ctor_properties): Likewise.
14819         (start_function): Likewise.
14820         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
14821         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
14822         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
14823         * method.c (do_build_copy_constructor): Use
14824         DECL_HAS_IN_CHARGE_PARM_P.
14825         (synthesize_method): Likewise.
14826         * pt.c (instantiate_template): Remove goto.
14827         * tree.c (build_cplus_method_type): Remove mention of obstacks in
14828         comment.
14829
14830         * cp-tre.h (finish_function): Change prototype.
14831         * decl.c (end_cleanup_fn): Adjust caller.
14832         (finish_function): Take only one parameter.
14833         * decl2.c (finish_objects): Adjust caller.
14834         (finish_static_storage_duration_function): Likewise.
14835         * method.c (emit_thunk): Likewise.
14836         * parse.y: Likewise.
14837         * parse.c: Regenerated.
14838         * pt.c (instantiate_decl): Likewise.
14839         * rtti.c (synthesize_tinfo_fn): Likewise.
14840         * semantics.c (expand_body): Likewise.
14841
14842         * cp-tree.h (copy_decl): New function.
14843         * class.c (finish_struct_1): Use it.
14844         * lex.c (copy_decl): Define it.
14845         * pt.c (tsubst_decl): Likewise.
14846         * tree.c (copy_template_template_parm): Likewise.
14847
14848         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
14849         has_nonpublic_assign_ref.
14850         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
14851         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
14852         * class.c (finish_struct_methods): Don't set
14853         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
14854         (interface_only): Don't declare.
14855         (interface_unknown): Likewise.
14856
14857 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14858
14859         * tree.h (HAVE_TEMPLATES): Remove definition.
14860         * lang-options.h (-fthis-is-variable): Remove documentation.
14861
14862 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
14863
14864         * class.c (instantiate_type): Handle object-relative template-id.
14865
14866         * semantics.c (finish_expr_stmt): Call convert_to_void here.
14867         * decl.c (cplus_expand_expr_stmt): Not here.
14868
14869         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
14870         Initialize exprtype earlier.
14871
14872         * parse.y (fn.def1): Check for defining types in return types.
14873
14874         * decl.c (check_tag_decl): Notice extra fundamental types.
14875         Diagnose empty decls in classes, too.
14876
14877         * decl.c (grokdeclarator): Don't override an anonymous name if no
14878         declarator was given.
14879
14880         * cvt.c (convert_to_void): Call resolve_offset_ref.
14881
14882         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
14883
14884         * decl2.c (decl_namespace): Handle getting a type.
14885
14886         * typeck.c (build_c_cast): Re-enable warning for cast between
14887         pointer and integer of different size.
14888
14889 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
14890
14891         * inc/cxxabi.h (__pointer_type_info): Add restrict and
14892         incomplete flags.
14893         (__pointer_type_info::__pointer_catch): New virtual function.
14894         (__pointer_to_member_type_info): Derive from
14895         __pointer_type_info. Adjust.
14896         (__pointer_to_member_type_info::__do_catch): Remove.
14897         (__pointer_to_member_type_info::__is_pointer_p): Declare.
14898         (__pointer_to_member_type_info::__pointer_catch): Declare.
14899         * rtti.c (qualifier_flags): Add restrict flag.
14900         (ptmd_initializer): Reorder members.
14901         (create_tinfo_types): Expand comments. Reorder
14902         ptmd_desc_type_node members.
14903         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
14904         Implement.
14905         (__pointer_type_info::__do_catch): Move specific code into
14906         __pointer_catch. Call it.
14907         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
14908         specific catch checking. Fix void conversion check.
14909         (__pointer_to_member_type_info::__do_catch): Remove.
14910         (__pointer_to_member_type_info::__pointer_catch): Implement.
14911
14912 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14913
14914         * lex.c (init_parse): Remove traces of classof and headof.
14915         * decl2.c (flag_operator_names): Default to 1.
14916         (lang_decode_option): Do not set it for -ansi.
14917
14918 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
14919
14920         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
14921         (DECL_MAIN_VARIANT): Remove.
14922         * decl.c (duplicate_decls): Don't set it.
14923         (start_function): Likewise.
14924         (lang_mark_tree): Don't mark it.
14925         * decl2.c (defer_fn): Don't use it.
14926         * lex.c (retrofit_lang_decl): Don't set it.
14927         * pt.c (tsubst_decl): Likewise.
14928         * ptree.c (print_lang_decl): Don't print it.
14929         * typeck.c (mark_addressable): Don't use it.
14930
14931 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
14932
14933         * vec.cc: Include <new> and <exception>.
14934         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
14935         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
14936         terminate.
14937         (__cxa_vec_delete): Catch dtor exceptions.
14938
14939 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
14940
14941         Prepend __ to implementation defined names.
14942         * inc/typeinfo (type_info): Rename _name to __name.
14943         (type_info::type_info): Rename parameter.
14944         (type_info::operator==, type_info::operator!=,
14945         type_info::before): Likewise.
14946         (type_info::is_pointer_p, type_info::is_function_p,
14947         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
14948         parameters.
14949         * inc/cxxabi.h
14950         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
14951         (__pointer_type_info::__pointer_type_info): Likewise.
14952         (__pointer_type_info::is_pointer_p,
14953         __pointer_type_info::do_catch): Prepend __. Rename parameters.
14954         (__array_type_info::__array_type_info): Rename parameters.
14955         (__function_type_info::__function_type_info): Likewise.
14956         (__function_type_info::is_function_p): Prepend __.
14957         (__enum_type_info::__enum_type_info): Rename parameters.
14958         (__pointer_to_member_type_info::__pointer_to_member_type_info):
14959         Likewise.
14960         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
14961         parameters.
14962         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
14963         (__class_type_info::__class_type_info): Rename parameters.
14964         (__class_type_info::sub_kind): Prepend __. Adjust member names.
14965         (__class_type_info::upcast_result,
14966         __class_type_info::dyncast_result): Prepend __. Move definition
14967         into tinfo.cc.
14968         (__class_type_info::do_upcast, __class_type_info::do_catch,
14969         __class_type_info::find_public_src,
14970         __class_type_info::do_dyncast,
14971         __class_type_info::do_find_public_src): Prepend __. Rename
14972         parameters.
14973         (__si_class_type_info::__si_class_type_info): Rename parameters.
14974         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
14975         __si_class_type_info::do_find_public_src): Prepent __. Rename
14976         parameters.
14977         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
14978         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
14979         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
14980         parameters.
14981         (__dynamic_cast): Rename parameters.
14982         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
14983         type_info::do_catch, type_info::do_upcast): Prepend __.
14984         (contained_p, public_p, virtual_p, contained_public_p,
14985         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
14986         (__class_type_info::do_catch,
14987         __class_type_info::do_upcast): Prepend __. Adjust.
14988         (__class_type_info::__upcast_result,
14989         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
14990         Adjust.
14991         (__class_type_info::find_public_src): Prepend __. Adjust.
14992         (__class_type_info::do_find_public_src,
14993         __si_class_type_info::do_find_public_src,
14994         __vmi_class_type_info::do_find_public_src): Likewise.
14995         (__class_type_info::do_dyncast,
14996         __si_class_type_info::do_dyncast,
14997         __vmi_class_type_info::do_dyncast): Likewise.
14998         (__class_type_info::do_upcast,
14999         __si_class_type_info::do_upcast,
15000         __vmi_class_type_info::do_upcast): Likewise.
15001         (__dynamic_cast): Adjust.
15002         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
15003         (__function_type_info::is_function_p): Likewise.
15004         (__pointer_type_info::do_catch): Likewise. Adjust.
15005         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
15006         (__throw_type_match_rtti_2): Adjust.
15007         (__is_pointer): Adjust.
15008
15009 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
15010
15011         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
15012         (complete_ctor_identifier): New macro.
15013         (special_function_kind): Add sfk_copy_constructor and
15014         sfk_assignment_operator.
15015         (LOOKUP_HAS_IN_CHARGE): Remove.
15016         (cons_up_default_function): Rename to ...
15017         (implicitly_declare_fn): ... this.
15018         * call.c (build_new_method_call): Add in-charge parameters for
15019         constructors here.
15020         * class.c (add_implicitly_declared_members): Change parameter name
15021         from cant_have_assignment to cant_have_const_assignment.
15022         Replace calls to cons_up_default_function to implicitly_declare_fn.
15023         * cvt.c (ocp_convert): Use complete_ctor_identifier.
15024         * decl.c (initialize_predefined_identifiers): Initialize it.
15025         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
15026         complex expression.
15027         * init.c (expand_default_init): Don't calculate the in-charge
15028         parameter here.
15029         (build_new_1): Likewise.
15030         * lex.c (cons_up_default_function): Move to method.c.
15031         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
15032         (implicitly_declare_fn): New function.
15033         * typeck.c (build_static_cast): Use complete_ctor_identifier.
15034         (build_modify_expr): Likewise.
15035         * typeck2.c (build_functional_cast): Likewise.
15036
15037         Under the new ABI, constructors don't return `this'.
15038         * cp-tree.h (warn_reorder): Declare.
15039         (special_function_kind): New enum.
15040         (global_base_init_list): Remove declaration.
15041         (emit_base_init): Don't return a value.
15042         (check_base_init): Don't declare.
15043         (is_aggr_typedef): Likewise.
15044         * decl.c (check_special_function_return_type): New function.
15045         (return_types): Remove.
15046         (grokdeclarator): Use check_special_function_return_type.
15047         (start_function): Don't initialize ctor_label under the new ABI.
15048         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
15049         * init.c (begin_init_stmts): Move to top of file.
15050         (finish_init_stmts): Likewise.
15051         (warn_reorder): Don't declare.
15052         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
15053         value.
15054         (check_base_init): Remove.
15055         (is_aggr_typedef): Likewise.
15056         (build_new_1): Don't use the return value of a constructor.
15057         * semantics.c (setup_vtbl_ptr): Don't use the return value
15058         of emit_base_init.
15059         * typeck.c (check_return_expr): Don't magically convert return
15060         statements into `return this' in constructors under the new ABI.
15061
15062         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
15063         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
15064         (base_ctor_identifier): New macro.
15065         (base_dtor_identifier): Likewise.
15066         (deleting_dtor_identifier): Likewise.
15067         * decl.c: Don't include obstack.h.
15068         (obstack_chunk_alloc): Don't define.
15069         (obstack_chunk_free): Likewise.
15070         (struct predefined_identifier): New type.
15071         (initialize_predefined_identifiers): New function.
15072         (init_decl_processing): Use it.
15073         (debug_temp_inits): Remove.
15074         (start_method): Don't call preserve_data.
15075         (hack_incomplete_structures): Update comment.
15076         * init.c (init_init_processing): Don't initialize
15077         nelts_identifier.
15078         (build_offset_rf): Remove dead code.
15079         (build_delete): Use CLASSTYPE_N_BASECLASSES.
15080         * search.c (init_search_processing): Don't initialize
15081         vptr_identifier.
15082
15083 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15084
15085         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
15086         some sign_compare warnings.
15087
15088 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
15089
15090         Rename abi::__vmi_class_type_info members.
15091         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
15092         base_list, detail_masks members to vmi_flags, vmi_base_count,
15093         vmi_bases and vmi_flags_masks respectively.
15094         (__vmi_class_type_info::vmi_flags_masks): Rename
15095         details_unknown_mask to flags_unknown_mask.
15096         * tinfo.cc (__class_type_info::do_upcast): Adjust.
15097         (__vmi_class_type_info::do_find_public_src): Adjust.
15098         (__vmi_class_type_info::do_dyncast): Adjust.
15099         (__vmi_class_type_info::do_upcast): Adjust.
15100
15101 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
15102
15103         * tinfo.cc (convert_to_base): New function.
15104         (get_vbase_offset): Remove. Move into convert_to_base.
15105         (__vmi_class_type_info::do_find_public_src): Adjust.
15106         (__vmi_class_type_info::do_dyncast): Adjust.
15107         (__vmi_class_type_info::do_upcast): Adjust.
15108
15109 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
15110
15111         * tinfo.cc (operator=): Use __builtin_strcmp.
15112         * tinfo2.cc (before): Likewise.
15113
15114 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
15115
15116         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
15117         (DECL_SAVED_INLINE): Rename to ...
15118         (DECL_DEFERRED_FN): ... this.
15119         (in_function_p): Remove declaration.
15120         (mark_inline_for_output): Rename to ...
15121         (defer_fn): ... this.
15122         * decl.c (finish_function): Adjust call to mark_inline_for_output.
15123         (in_function_p): Remove definition.
15124         * decl2.c (saved_inlines): Rename to ...
15125         (deferred_fns): ... this.
15126         (saved_inlines_used): Rename to ...
15127         (deferred_fns_used): ... this.
15128         (mark_inline_for_output): Rename to ...
15129         (defer_fn): ... this.
15130         (finish_file): Adjust accordingly.
15131         (init_decl2): Likewise.
15132         * lex.c (cons_up_default_function): Likewise.
15133         * pt.c (mark_decl_instantiated): Likewise.
15134         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
15135         circumstances.
15136         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
15137         * semantics.c (expand_body): Defer more functions.
15138
15139 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
15140
15141         * vec.cc: New file.
15142         * Make-lang.in (CXX_LIB2FUNCS): Add it.
15143         (vec.o): Build it.
15144         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
15145         __cxa_vec_delete): Declare.
15146
15147 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
15148
15149         * rtti.c (dfs_class_hint_mark): New static function.
15150         (dfs_class_hint_unmark): New static function.
15151         (class_hint_flags): Use them.
15152
15153 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
15154
15155         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
15156
15157 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
15158
15159         * cp-tree.h (instantiate_decl): Change prototype.
15160         * decl2.c (mark_used): Adjust call.
15161         * optimize.c (inlinable_function_p): Adjust handling of templates.
15162         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
15163         (do_type_instantiation): Likewise.
15164         (instantiate_decl): Defer more templates.
15165         (instantiate_pending_templates): Adjust logic to handle inline
15166         friend functions.
15167
15168         * Makefile.in (GGC_H): New variable.  Use it throughout in place
15169         of ggc.h.
15170
15171         * call.c: Don't include obstack.h.  Include ggc.h.
15172         (obstack_chunk_alloc): Don't define.
15173         (obstack_chunk_free): Likewise.
15174         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
15175         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
15176         (pop_switch): Free it.
15177
15178         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
15179
15180         * dump.c (dequeue_and_dump): Don't try to print the bit_position
15181         if we don't have a DECL_FIELD_OFFSET.
15182
15183 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
15184
15185         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
15186         special_function_p.
15187
15188 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15189
15190         * cfns.gperf (hash, libc_name_p): Prototype.
15191
15192         * rtti.c (build_dynamic_cast_1): Constification.
15193
15194         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
15195
15196         * semantics.c (deferred_type_access_control): Prototype.
15197
15198 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
15199
15200         Correct many new ABI issues regarding vbase and vcall offset
15201         layout.
15202         * cp-tree.h (BINFO_VTABLE): Document.
15203         (struct lang_type): Tweak formatting.
15204         (BINFO_PRIMARY_BINFO): Add to documentation.
15205         (CLASSTYPE_VSIZE): Fix typo in comment.
15206         (CLASSTYPE_VBASECLASSES): Update documentation.
15207         (BINFO_VBASE_MARKED): Remove.
15208         (SET_BINFO_VBASE_MARKED): Likewise.
15209         (CLEAR_BINFO_VBASE_MARKED): Likewise.
15210         (BINFO_FIELDS_MARKED): Remove.
15211         (SET_BINFO_FIELDS_MARKED): Likewise.
15212         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
15213         (enum access_kind): New enumeration.
15214         (num_extra_vtbl_entries): Remove declaration.
15215         (size_extra_vtbl_entries): Likewise.
15216         (get_vtbl_decl_for_binfo): New function.
15217         (dfs_vbase_unmark): Remove declaration.
15218         (mark_primary_bases): Likewise.
15219         * class.c (SAME_FN): Remove.
15220         (struct vcall_offset_data_s): Move definition.
15221         (build_vbase_pointer): Use `build', not `build_binary_op', to
15222         access the vbase pointer under the new ABI.
15223         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
15224         (build_primary_vtable): Likewise.
15225         (dfs_mark_primary_bases): Move here from search.c.
15226         (mark_primary_bases): Likewise.
15227         (determine_primary_bases): Under the new ABI, don't make a base
15228         class a primary base just because we don't yet have any virtual
15229         functions.
15230         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
15231         (num_vfun_entries): Remove.
15232         (dfs_count_virtuals): Likewise.
15233         (num_extra_vtbl_entries): Likewise.
15234         (size_extra_vtbl_entries): Likewise.
15235         (layout_virtual_bases): Iterate in inheritance graph order under
15236         the new ABI.
15237         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
15238         indicate that a vfield is present.
15239         (init_class_processing): Initialize access_public_node, etc., from
15240         ak_public, etc.
15241         (get_vtbl_decl_for_binfo): New function.
15242         (dump_class_hierarchy_r): Likewise.
15243         (dump_class_hierarchy): Use it.
15244         (finish_vtbls): Build the vtbls in inheritance graph order.
15245         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
15246         (initialize_vtable): Use get_vtbl_decl_for_binfo.
15247         (accumulate_vtbl_inits): Add comments explaining why a pre-order
15248         walk is required.
15249         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
15250         where the vptr points, even for primary vtables.
15251         (build_vtbl_initializer): Adjust handling of vbase and vcall
15252         offsets.
15253         (build_vcall_and_vbase_vtable_entries): New function.
15254         (dfs_build_vbase_offset_vtbl_entries): Remove.
15255         (build_vbase_offset_vtbl_entries): Reimplement.
15256         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
15257         were already handled in a primary base class vtable.
15258         (build_vcall_offset_vtbl_entries): Adjust.
15259         (build_rtti_vtbl_entries): Adjust.
15260         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
15261         * init.c (expand_virtual_init): Simplify.
15262         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
15263         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
15264         * search.c (BINFO_ACCESS): New macro.
15265         (SET_BINFO_ACCESS): Likewise.
15266         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
15267         (access_in_type): Likewise.
15268         (dfs_accessible_p): Likewise.
15269         (protected_accessible_p): Likewise.
15270         (lookup_fnfields_1): Adjust documentation.
15271         (dfs_mark_primary_bases): Move to class.c
15272         (mark_primary_bases): Likewise.
15273         (dfs_vbase_unmark): Remove.
15274         (virtual_context): Use BINFO_FOR_VBASE.
15275         (dfs_get_vbase_types): Simplify.
15276         (dfs_build_inheritance_graph_order): New function.
15277         (get_vbase_types): Use it.
15278         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
15279
15280         * tinfo.cc (get_vbase_offset): New function.
15281         (__vmi_class_type_info::do_find_public_src): Use it.
15282         (__vmi_class_type_info::do_dyncast): Likewise.
15283         (__vmi_class_type_info::do_upcast): Likewise.
15284
15285 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
15286
15287         * lang-specs.h: Pass -fno-show-column to the preprocessor.
15288
15289 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
15290
15291         * rtti.c (class_hint_flags): Rename flags.
15292         (class_initializer): Remove flags.
15293         (synthesize_tinfo_var): Combine offset and flags. Add flags
15294         for __vmi_class_type_info.
15295         (create_tinfo_types): Remove flags from __class_type_info and
15296         __si_class_type_info. Merge flags and offset from
15297         base_class_type_info.
15298         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
15299         (__base_class_info::is_virtual_p): Adjust.
15300         (__base_class_info::is_public_p): Adjust.
15301         (__base_class_info::offset): New accessor.
15302         (__class_type_info::details): Remove member.
15303         (__class_type_info::__class_type_info): Lose details.
15304         (__class_type_info::detail_masks): Remove.
15305         (__si_class_type_info::__si_class_type_info): Lose details.
15306         (__vmi_class_type_info::details): New member.
15307         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
15308         (__vmi_class_type_info::detail_masks): New member.
15309         * tinfo.cc (__class_type_info::do_upcast): Initialize result
15310         with unknown_details_mask.
15311         (__vmi_class_type_info::do_find_public_src): Adjust
15312         (__vmi_class_type_info::do_dyncast): Adjust.
15313         (__vmi_class_type_info::do_upcast): Set result details, if
15314         needed. Adjust.
15315         (__dynamic_cast): Temporarily #if out optimization.
15316
15317 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
15318
15319         * rtti.c (get_tinfo_decl): Mark used.
15320         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
15321         mark as dealt with, if we output it.
15322
15323 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
15324
15325         * class.c: Reorganize to put virtual function table initialization
15326         machinery at the end of the file.
15327
15328 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
15329
15330         * class.c (finish_struct): Use bitsize_zero_node.
15331         * pt.c (instantiate_class_template): Likewise.
15332
15333 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
15334
15335         Put RTTI entries at negative offsets in new ABI.
15336         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
15337         vbase offset at index -3, not -1.
15338         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
15339         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
15340         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
15341         (build_rtti_vtbl_entries): New function.
15342         (set_rtti_entry): Remove.
15343         (build_primary_vtable): Don't use it.
15344         (build_secondary_vtable): Likewise.
15345         (start_vtable): Remove.
15346         (first_vfun_index): New function.
15347         (set_vindex): Likewise.
15348         (add_virtual_function): Don't call start_vtable.  Do call
15349         set_vindex.
15350         (set_primary_base): Rename parameter.
15351         (determine_primary_base): Likewise.
15352         (num_vfun_entries): Don't use skip_rtti_stuff.
15353         (num_extra_vtbl_entries): Include RTTI information.
15354         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
15355         (skip_rtti_stuff): Remove.
15356         (dfs_modify_vtables): Don't use it.
15357         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
15358         (layout_nonempty_base_or_field): Update size handling.
15359         (create_vtable_ptr): Tweak.
15360         (layout_class_type): Adjust parameter names.
15361         (finish_struct_1): Simplify.
15362         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
15363         (skip_rtti_stuff): Remove.
15364         (first_vfun_index): New function.
15365         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
15366         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
15367         (marked_vtable_pathp): Declare.
15368         (unmarked_vtable_pathp): Likewise.
15369         * error.c (dump_expr): Use first_vfun_index to calculate vtable
15370         offsets.
15371         * rtti.c (build_headof): Look for RTTI at negative offsets.
15372         (get_tinfo_decl_dynamic): Likewise.
15373         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
15374         here.
15375         (create_pseudo_type_info): Do it here instead.  Adjust so that
15376         vptr points at first virtual function.
15377         * search.c (marked_vtable_pathp): Make it global.
15378         (unmarked_vtable_pathp): Likewise.
15379         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
15380         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
15381         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
15382         (get_pure_virtuals): Likewise.
15383         (expand_upcast_fixups): Likewise.
15384         * tree.c (debug_binfo): Likewise.
15385         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
15386         negative offset.
15387
15388 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15389
15390         * class.c (check_field_decl): Fix typo.
15391         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
15392         (check_methods): Likewise.
15393         (check_field_decls): Likewise.
15394         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
15395         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
15396         Use DECL_RESULT_FLD, not DECL_RESULT.
15397         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
15398         * lex.c (identifier_type): Likewise.
15399         * pt.c (determine_specialization, lookup_template_class): Likewise.
15400         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
15401         (resolve_overloaded_unification, more_specialized): Likewise.
15402         * semantics.c (finish_member_declaration): Likewise.
15403         * typeck.c (build_x_function_call): Likewise.
15404
15405 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
15406
15407         * class.c (layout_empty_base): Handle empty bases with non-byte
15408         alignment.
15409         (build_base_field): Likewise.
15410         (layout_virtual_bases): Likewise.
15411
15412         * class.c (finish_struct_1): Fix typo in this change:
15413
15414         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15415
15416 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
15417
15418         * decl.c (grokdeclarator): Count partial specializations when
15419         keeping track of how many template classes have been seen.
15420
15421         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
15422
15423 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15424
15425         * class.c (build_vbase_pointer_fields): layout_field now place_field.
15426         (get_vfield_offset): Use byte_position.
15427         (set_rtti_entry): Set OFFSET to ssizetype zero.
15428         (get_binfo_offset_as_int): Deleted.
15429         (dfs_record_base_offsets): Use tree_low_cst.
15430         (dfs_search_base_offsets): Likewise.
15431         (layout_nonempty_base_or_field): Reflect changes in RLI format
15432         and call byte_position.
15433         (layout_empty_base): Convert offset to ssizetype.
15434         (build_base_field): use rli_size_unit_so_far.
15435         (dfs_propagate_binfo_offsets): Do computation in proper type.
15436         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
15437         (layout_class_type): Reflect changes in RLI names and fields.
15438         (finish_struct_1): Set DECL_FIELD_OFFSET.
15439         * dump.c (dequeue_and_dump): Call bit_position.
15440         * expr.c (cplus_expand_constant): Use byte_position.
15441         * rtti.c (expand_class_desc): Use bitsize_one_node.
15442         * typeck.c (build_component_addr): Use byte_position and don't
15443         special case for zero offset.
15444
15445 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
15446
15447         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
15448
15449         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
15450         tinfo object.
15451         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
15452         vtable.
15453
15454 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15455
15456         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
15457         DECL_P macros.
15458         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
15459         make_typename_type, check_initializer, cp_finish_decl,
15460         xref_tag): Likewise.
15461         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
15462         decl_namespace, arg_assoc_template_arg, arg_assoc,
15463         validate_nonmember_using_decl, do_class_using_decl): Likewise.
15464         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
15465         args_to_string): Likewise.
15466         * friend.c (is_friend): Likewise.
15467         * lex.c (note_got_semicolon, note_list_got_semicolon,
15468         is_global): Likewise.
15469         * method.c (build_overload_nested_name, build_overload_value,
15470         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
15471         * parse.y (typename_sub, typename_sub1): Likewise.
15472         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
15473         process_partial_specialization, convert_template_argument,
15474         template_args_equal, add_pending_template, lookup_template_class,
15475         for_each_template_parm_r, maybe_fold_nontype_arg,
15476         tsubst, instantiate_template, type_unification_real, unify,
15477         instantiate_pending_templates, set_mangled_name_for_template_decl):
15478         Likewise.
15479         * repo.c (repo_get_id, repo_template_used): Likewise.
15480         * search.c (lookup_field_1): Likewise.
15481         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
15482         * xref.c (classname): Likewise.
15483
15484 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
15485
15486         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
15487         (CANONICAL_BINFO): New macro.
15488         (BINFO_NEW_VTABLE_MARKED): Use it.
15489         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
15490         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
15491         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
15492         not TREE_TYPE.
15493         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15494         (build_secondary_vtable): Likewise.
15495         (dfs_finish_vtbls): Likewise.
15496         (dfs_accumulate_vtbl_inits): Likewise.
15497         (accumulate_vtbl_inits): New function.
15498         (finish_vtbls): Make sure that virtual bases come after
15499         non-virtual bases in the vtable group.
15500         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
15501         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15502         * search.c (struct vbase_info): Move definition.
15503         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15504         (unmarked_new_vtable_p): Likewise.
15505         (dfs_mark_vtable_path): Remove.
15506         (dfs_mark_new_vtable): Remove.
15507         (dfs_unmark_new_vtable): Likewise.
15508         (dfs_clear_search_slot): Likewise.
15509         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
15510         (dfs_clear_vbase_slots): Likewise.
15511         (init_vbase_pointers): LIkewise.
15512
15513 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
15514
15515         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
15516         SIZETYPE to a non-SIZETYPE.
15517
15518 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
15519
15520         * class.c (layout_virtual_bases): Adjust names in conditionally
15521         compiled code.
15522
15523         * class.c (record_base_offsets): New function.
15524         (layout_conflict_p): Likewise.
15525         (layout_nonempty_base_or_field): Use it.
15526         (layout_empty_base): New function.
15527         (build_base_field): Use it.
15528         (build_base_fields): Update comment.
15529         (layout_virtual_bases): Fold in a little code form
15530         layout_basetypes.  Use layout_empty_base.
15531         (layout_basetypes): Remove.
15532         (end_of_class): New function.
15533         (layout_class_type): Use it.  Adjust.
15534
15535         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
15536         (fntype_p): Remove.
15537         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
15538         comment.
15539         (dfs_skip_nonprimary_vbases_markedp): Likewise.
15540         * typeck.c (fntype_p): Remove.
15541
15542         * cp-tree.h (TI_SPEC_INFO): Remove.
15543         (CLASSTYPE_TI_SPEC_INFO): Likewise.
15544         * pt.c (process_partial_specialization): Likewise.
15545
15546         * class.c (build_base_field): Fix thinko in computation of binfo
15547         offsets.
15548
15549         * tree.c (mark_local_for_remap_p): Mark variables declared in
15550         TARGET_EXPRs as well.
15551
15552 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
15553
15554         * typeck.c (require_complete_type, complete_type,
15555         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
15556         build_array_ref, convert_arguments, pointer_diff,
15557         build_x_unary_op, build_unary_op, build_c_cast,
15558         build_modify_expr): Use COMPLETE_TYPE_P etc.
15559         * call.c (is_complete, convert_like_real,
15560         build_new_method_call): Likewise.
15561         * class.c (build_vbase_pointer_fields, check_bases,
15562         build_base_field, finish_struct_1, pushclass): Likewise.
15563         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
15564         * decl.c (maybe_process_template_type_declaration, pushtag,
15565         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
15566         layout_var_decl, check_initializer, cp_finish_decl,
15567         grokdeclarator, require_complete_types_for_parms,
15568         grok_op_properties, xref_tag, xref_basetypes,
15569         check_function_type): Likewise.
15570         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
15571         * friend.c (do_friend): Likewise.
15572         * init.c (build_offset_ref): Likewise.
15573         * parse.y (structsp): Likewise.
15574         * pt.c (maybe_process_partial_specialization,
15575         tsubst_friend_function, instantiate_class_template, tsubst,
15576         do_type_instantiation, instantiate_pending_templates): Likewise.
15577         * repo.c (repo_get_id): Likewise.
15578         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
15579         synthesize_tinfo_var, emit_support_tinfos): Likewise.
15580         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
15581         * semantics.c (begin_class_definition): Likewise.
15582         * tree.c (build_cplus_method_type): Likewise.
15583         * typeck2.c (digest_init, build_functional_cast,
15584         add_exception_specifier): Likewise.
15585         * parse.h, parse.c: Regenerated.
15586
15587 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
15588
15589         * inc/cxxabi.h: New header file. Define new-abi entry points.
15590         (__pointer_type_info::target): Rename member to ...
15591         (__pointer_type_info::type): ... here.
15592         (__base_class_info::type): Rename member to ...
15593         (__base_class_info::base): ... here.
15594         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
15595         * cp-tree.h (CPTI_ABI): New global tree enumeration.
15596         (abi_node): New global tree node.
15597         * decl.c (abi_node): Document.
15598         (init_decl_processing): Initialize abi_node.
15599         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
15600         (get_vmi_pseudo_type_info): Likewise.
15601         (create_tinfo_types): Likewise.
15602         (emit_support_tinfos): Likewise.
15603         * tinfo.h (cxxabi.h): Include for new-abi.
15604         Move rtti class definitions to new header file.
15605         * tinfo.cc (abi): Use the namespace.
15606         (std): Move new abi rtti classes from here ...
15607         (__cxxabiv1): ... to here.
15608         * tinfo2.cc (cxxabi.h): Include for new-abi.
15609         Move rtti class definitions to new header file.
15610         (std): Move new abi rtti classes from here ...
15611         (__cxxabiv1): ... to here.
15612         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
15613         namespace.
15614
15615 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
15616             Jason Merrill  <jason@casey.cygnus.com>
15617
15618         * method.c (build_overload_int): Use host_integerp.
15619
15620 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15621
15622         * init.c (build_offset_ref): Handle the case of a templated member
15623         function.
15624
15625 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15626
15627         * except.c (expand_exception_blocks): Clear catch_clauses_last.
15628
15629 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
15630
15631         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
15632         * class.c (check_bitfield_decl): Turn illegal bitfields into
15633         non-bitfields.
15634         (dfs_propagate_binfo_offsets): Adjust for new size_binop
15635         semantics.
15636         (dfs_offset_for_unshared_vbases): Likewise.
15637         * cvt.c (cp_convert_to_pointer): Convert NULL to a
15638         pointer-to-member correctly under the new ABI.
15639         * expr.c (cplus_expand_constant): Don't use cp_convert when
15640         turning an offset into a pointer-to-member.
15641         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
15642         when dereferencing them under the new ABI.
15643         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
15644         of pointers-to-members under the new ABI.
15645
15646         * class.c (check_bitfield_decl): Remove restriction on really long
15647         bitfields.
15648         (layout_class_type): Implement new ABI handling of bitfields
15649         longer than their types.
15650
15651 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15652
15653         * parse.y (extdefs): Call ggc_collect.
15654         * parse.c: Regenerated.
15655
15656 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
15657
15658         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
15659         (note_name_declared_in_class): Use OVL_CURRENT to get at a
15660         potential overload.
15661
15662 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15663
15664         * class.c (build_vbase_path): Use integer_zerop.
15665         (build_vtable_entry): Use tree_low_cst.
15666         (get_vfield_offset): Use bit_position.
15667         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
15668         Use tree_low_cst.
15669         (check_bitfield_decl): Set DECL_SIZE using convert.
15670         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
15671         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
15672         Use tree_low_cst.
15673         (finish_struct_1): Use bit_position.
15674         (dump_class_hierarchy): Use tree_low_cst.
15675         * cp-tree.h (min_precision): Add declaration.
15676         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
15677         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
15678         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
15679         * expr.c (cplus_expand_constant): Use bit_position.
15680         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
15681         * rtti.c (get_base_offset): Use bit_position.
15682         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
15683         host_integerp, and tree_low_cst.
15684         (pointer_int_sum): Use integer_zerop.
15685         (build_component_addr): Use bit_position.
15686
15687 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
15688
15689         * typeck.c (require_complete_type): Don't assume size_zero_node.
15690         (complete_type_or_else): Likewise.
15691
15692 2000-03-16  Steven Grady <grady@digitaldeck.com>
15693             Jason Merrill  <jason@casey.cygnus.com>
15694
15695         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
15696
15697 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
15698
15699         * decl2.c (grokfield): Bail out if type is error_mark_node.
15700
15701 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
15702
15703         * tinfo2.cc (__ptr_to_member_data): Rename to ...
15704         (__pointer_to_member_data): ... here. Adjust.
15705         * rtti.c (create_tinfo_types): Adjust.
15706
15707 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
15708
15709         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
15710         * decl.c (ref_desc_type_node): Undocument.
15711         * rtti.c (ptr_ref_initializer): Rename to ...
15712         (ptr_initializer): ... here. Adjust comments.
15713         (ptmd_initializer): Fix comment thinko.
15714         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
15715         (create_tinfo_types): Remove ref_desc_type_node init.
15716         * tinfo2.cc (__reference_type_info): Remove.
15717
15718 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
15719
15720         * decl.c (cp_finish_decl): Remove obsolete comment.
15721
15722         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
15723
15724 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
15725
15726         * cp-tree.h: Tweak documentation.
15727         * class.c (build_vbase_pointer_fields): Layout the fields, too.
15728         (avoid_overlap): Remove.
15729         (get_binfo_offset_as_int): New function.
15730         (dfs_serach_base_offsets): Likewise.
15731         (layout_nonempty_base_or_field): Likewise.
15732         (build_base_field): Layout fields here.  Avoid placing two objects
15733         of the same type at the same address, under the new ABI.
15734         (build_base_fields): Adjust accordingly.
15735         (create_vtable_ptr): Return the new field, but don't attach it to
15736         TYPE_FIELDS.
15737         (remove_base_field): Remove.
15738         (remove_base_fields): Remove.
15739         (layout_basetypes): Adjust accordingly.
15740         (layout_class_type): Call layout_field for each field, rather than
15741         just making a wholesale call to layout_type.
15742
15743 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
15744
15745         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
15746
15747 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
15748
15749         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
15750
15751         * except.c (dtor_nothrow): New fn.
15752         (do_pop_exception): Use it.  Take type parm.
15753         (push_eh_cleanup): Take type parm.
15754         (expand_start_catch_block): Pass it.
15755         (build_eh_type_type_ref): Accept null type.
15756
15757 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
15758
15759         * cp-tree.h (revert_static_member_fn): Change prototype.
15760         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
15761         (grok_op_properties): Likewise.
15762         (start_function): Likewise.
15763         (revert_static_member_fn): Simplify.
15764         * pt.c (check_explicit_specialization): Adjust call to
15765         revert_static_member_fn.
15766
15767 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
15768
15769         * cp-tree.h (scope_kind): New type.
15770         (tmpl_spec_kind): Likewise.
15771         (declare_pseudo_global_level): Remove.
15772         (pseudo_global_level_p): Rename to template_parm_scope_p.
15773         (pushlevel): Remove declaration.
15774         (begin_scope): New function.
15775         (finish_scope): Likewise.
15776         (current_tmpl_spec_kind): Likewise.
15777         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
15778         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
15779         Add template_spec_p.
15780         (toplevel_bindings_p): Adjust.
15781         (declare_pseudo_global_level): Remove.
15782         (pseudo_global_level_p): Rename to template_parm_scope_p.
15783         (current_tmpl_spec_kind): New function.
15784         (begin_scope): Likewise.
15785         (finish_scope): Likewise.
15786         (maybe_push_to_top_level): Adjust.
15787         (maybe_process_template_type_declaration): Likewise.
15788         (pushtag): Likewise.
15789         (pushdecl_nonclass_level): Likewise.
15790         (lookup_tag): Likewise.
15791         (grokfndecl): Handle member template specializations.  Share
15792         constructor and non-constructor code.
15793         * decl2.c (check_classfn): Handle member template specializations.
15794         * pt.c (begin_template_parm_list): Use begin_scope.
15795         (begin_specialization): Likewise.
15796         (end_specialization): Likewise.
15797         (check_explicit_specialization): Use current_tmpl_spec_kind.
15798         Handle member template specializations.
15799         (end_template_decl): Use finish_scope.  Remove call to
15800         get_pending_sizes.
15801         (push_template_decl_real): Remove bogus error message.
15802         (tsubst_decl): Fix typo in code contained in comment.
15803         (instantiate_template): Handle member template specializations.
15804         (most_general_template): Likewise.
15805
15806 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
15807
15808         * lex.c (whitespace_cr): Compress consecutive calls to warning().
15809         (do_identifier): Ditto for error().
15810
15811         * pt.c (convert_nontype_argument): Ditto for cp_error().
15812         (convert_template_argument): Ditto for cp_pedwarn().
15813
15814 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
15815
15816         * exception.cc (__check_null_eh_spec): New fn.
15817         * except.c (expand_end_eh_spec): Call it if the spec is throw().
15818
15819 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
15820
15821         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
15822         * except.c (expand_end_eh_spec): Add the return type.
15823         * rtti.c (throw_bad_cast): Add the parmtypes.
15824         (throw_bad_typeid): Likewise.
15825
15826         * semantics.c (expand_stmt): Only leave out rtl for unused
15827         artificials, and set DECL_IGNORED_P on them as well.
15828         * decl.c (wrapup_globals_for_namespace): Likewise.
15829
15830 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
15831
15832         * decl.c (maybe_commonize_var): Skip all artificial decls.
15833         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
15834
15835 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
15836
15837         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
15838         * cp-tree.h: Declare flag_enforce_eh_specs.
15839         * decl.c (store_parm_decls, finish_function): Check it.
15840
15841         C library functions don't throw.
15842         * Makefile.in (cfns.h): New target.
15843         (except.o): Depend on it.
15844         * Make-lang.in (cc1plus): Depend on cfns.gperf.
15845         * cfns.gperf: New file.
15846         * cfns.h: Generated.
15847         * except.c: Include it.
15848         (nothrow_libfn_p): New fn.
15849         * decl.c (grokfndecl): Use it.
15850         * cp-tree.h: Declare it.
15851
15852         * decl.c (push_overloaded_decl_1, auto_function,
15853         define_function): Lose.
15854         (build_library_fn_1): New static fn.
15855         (builtin_function): Use it.
15856         (get_atexit_node): Use build_library_fn_ptr.
15857         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
15858         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
15859         push_void_library_fn, push_throw_library_fn): New fns.
15860         * cp-tree.h: Declare them.
15861         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
15862         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
15863         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
15864         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
15865         * rtti.c (build_runtime_decl): Lose.
15866         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
15867         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
15868         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
15869
15870         * call.c (build_call): Remove result_type parm.
15871         Call mark_used on unused artificial fns.
15872         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
15873
15874 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
15875
15876         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
15877         appropriate.
15878         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
15879         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
15880         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
15881         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
15882         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
15883         expand_generic_desc): Likewise.
15884
15885 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15886
15887         * exception.cc (__cp_pop_exception): Cleanup the original object.
15888
15889 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15890
15891         * decl.c (grok_op_properties): Merge conversion to void warning
15892         with other silly op warnings.
15893
15894 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
15895
15896         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
15897         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
15898
15899 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15900
15901         * decl.c (cp_make_fname_decl): New function.
15902         (wrapup_globals_for_namespace): Don't emit unused static vars.
15903         (init_decl_processing): Remove comment about use of
15904         array_domain_type. Set make_fname_decl.
15905         (cp_finish_decl): Remove __FUNCTION__ nadgering.
15906         * semantics.c (begin_compound_stmt): Remove
15907         current_function_name_declared flagging.
15908         (expand_stmt): Don't emit unused local statics.
15909         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
15910         specially.
15911
15912 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15913
15914         * typeck.c (convert_for_assignment): Don't look at array
15915         initializer.
15916         * call.c (convert_like_real): Likewise.
15917
15918 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
15919
15920         Add initial support for '\uNNNN' specifier.
15921         * lex.c (read_ucs): New fn.
15922         (readescape, skip_white_space): Call it.
15923         (is_extended_char, is_extended_char_1): New fns.
15924         (utf8_extend_token): New fn, #if 0'd out.
15925         (real_yylex): Treat extended chars like letters.
15926
15927         * search.c (note_debug_info_needed): Walk the bases even if we
15928         weren't deferring the type itself.
15929
15930 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15931
15932         * decl2.c (finish_objects): Constify a char*.
15933
15934         * method.c (emit_thunk): Likewise.
15935
15936 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
15937
15938         * typeck.c (dubious_conversion_warnings): Look through
15939         REFERENCE_TYPE.
15940
15941 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15942
15943         * class.c (dfs_modify_vtables): I is now unsigned.
15944         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
15945         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
15946         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
15947         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
15948         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
15949         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
15950         Call integer_all_onesp.
15951         * typeck2.c (process_init_constructor): Use compare_tree_int.
15952
15953         * lang-specs.h (as): Don't call if -syntax-only.
15954
15955 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
15956
15957         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
15958         RTL_EXPR_HAS_NO_SCOPE after all.
15959
15960 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
15961
15962         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
15963         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
15964         RTL_EXPR_HAS_NO_SCOPE.
15965
15966         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
15967         later.
15968
15969         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
15970
15971 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
15972
15973         * call.c (convert_like): Macrofy.
15974         (convert_like_with_context): New macro.
15975         (convert_like_real): Renamed from convert_like.  Add calling
15976         context parameters, for diagnostics. Add recursive flag.  Call
15977         dubious_conversion_warnings for outer conversion.
15978         (build_user_type_conversion): Use convert_like_with_context.
15979         (build_over_call): Likewise. Don't warn about dubious
15980         conversions here. Adjust convert_default_arg calls.
15981         (convert_default_arg): Add context parameters for diagnostics.
15982         Pass through to convert_like_with_context.
15983         * cp-tree.h (convert_default_arg): Add context parameters.
15984         (dubious_conversion_warnings): Prototype new function.
15985         * typeck.c (convert_arguments): Adjust convert_default_arg call.
15986         (dubious_conversion_warnings): New function, broken
15987         out of convert_for_assignment.
15988         (convert_for_assignment): Adjust.
15989
15990 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
15991
15992         * decl2.c (key_method): Break out from...
15993         (import_export_vtable, import_export_class): ...here.
15994
15995         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
15996         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
15997
15998         * search.c (note_debug_info_needed, dfs_debug_mark,
15999         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
16000         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
16001
16002 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
16003
16004         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
16005         typos.
16006
16007 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
16008
16009         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
16010         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
16011         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
16012         (lang_type): Split gets_new into has_new and has_array_new.
16013         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16014         (TYPE_GETS_NEW): Split into ...
16015         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
16016         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
16017         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
16018         (build_op_new_call): Don't declare.
16019         (build_new_1): Likewise.
16020         * call.c (build_op_new_call): Remove.
16021         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
16022         instead of TYPE_NEEDS_DESTRUCTOR.
16023         (finish_struct_bits): Likewise.
16024         (add_implicitly_declared_members): Likewise.
16025         (check_field_decl): Likewise.
16026         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
16027         correctly under the new ABI.
16028         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
16029         instead of TYPE_NEEDS_DESTRUCTOR.
16030         (initialize_local_var): Likewise.
16031         (destroy_local_var): Likewise.
16032         (cp_finish_decl): Likewise.
16033         (register_dtor_fn): Likewise.
16034         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
16035         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
16036         TYPE_VEC_DELETE_TAKES_SIZE here.
16037         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
16038         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
16039         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16040         (finish_destructor_body): Likewise.
16041         (maybe_build_cleanup_1): Likewise.
16042         * decl2.c (do_static_destruction): Likewise.
16043         * init.c (build_new_1): Make it static.
16044         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16045         (expand_cleanup_for_base): Likewise.
16046         (get_cookie_size): New function.
16047         (build_new_1): Handle array-new cookies correctly under the new
16048         ABI.
16049         (build_vec_delete_1): Likewise.
16050         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16051         (build_delete): Likewise.
16052         (build_vec_delete): Handle array-new cookies correctly under the new
16053         ABI.
16054         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16055         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
16056         TYPE_HAS_ARRAY_NEW_OPERATOR.
16057         * ptree.c (print_lang_type): Check them.
16058         * search.c (context_for_name_lookup): Fix typo in comment.
16059         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16060         * tree.c (break_out_cleanups): Likewise.
16061         (build_cplus_array_test_1): Likewise.
16062         (cp_build_qualified_type_real): Likewise.
16063         * typeck.c (complete_type): Likewise.
16064
16065         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
16066         the command-line, not the end.
16067
16068 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
16069
16070         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
16071
16072 2000-03-02  Tom Tromey  <tromey@cygnus.com>
16073
16074         * cp-tree.h (build_java_class_ref): Declare.
16075         * init.c (build_java_class_ref): No longer static.
16076         * except.c (expand_throw): Generate a Java-style `throw' if the
16077         thrown object is a "Java" object.
16078         (initialize_handler_parm): Generate a Java-style lookup of
16079         exception info if the caught object is a "Java" object.
16080         (catch_language, catch_language_init): New globals.
16081         (decl_is_java_type): New function.
16082         (expand_start_catch_block): Don't call push_eh_info() or
16083         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
16084         class reference to build_catch_block.
16085
16086 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16087
16088         * typeck.c (comptypes): Treat sizetype like its language equivalent.
16089
16090 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
16091
16092         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
16093         to merge reference/pointer code and fix incorrect warnings.
16094
16095 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
16096
16097         * search.c (protected_accessible_p): Use context_for_name_lookup.
16098
16099         * init.c (construct_virtual_bases): Fix thinko.
16100         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
16101
16102 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
16103
16104         * decl.c (current_function_decl): Move to toplev.c.
16105
16106 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
16107
16108         * pt.c (fn_type_unification): Unify return type, whenever
16109         provided.
16110         (get_bindings_real): Only pass return type when necessary.
16111         Remove explicit return type check.
16112         * class.c (resolve_address_of_overloaded_function): Pass desired
16113         return type to fn_type_unification.
16114
16115 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16116
16117         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
16118         DECL_FIELD_SIZE.
16119         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
16120         DECL_FIELD_SIZE.
16121         * rtti.c (expand_class_desc): Likewise.
16122         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
16123         (THUNK_VCALL_OFFSET): Likewise.
16124         (THUNK_DELTA): Reflect changes in ../tree.h.
16125
16126 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
16127
16128         * search.c (protected_accessible_p): Also allow the access if
16129         the member is public in DERIVED.  Lose TYPE parm.
16130         (friend_accessible_p): Lose TYPE parm.
16131         (accessible_p): Adjust.
16132
16133 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16134
16135         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
16136         on things that are not sizes; ssize_binop deleted.
16137         Call size_diffop when appropriate.
16138         (dfs_build_vcall_offset_vtbl_entries): Likewise.
16139         (build_primary_vtable, build_secondary_vtable): Likewise.
16140         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
16141         Variable I is HOST_WIDE_INT.
16142         (get_vfield_offset): Pass proper types to size_binop.
16143         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
16144         (finish_struct_1): Likewise.
16145         (skip_rtti_stuff): Arg N is now pointer to signed.
16146         (layout_class_type): Use size_zero_node.
16147         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
16148         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
16149         * decl.c (complete_arry_type): Pass proper types to size_binop.
16150         (xref_basetypes): BINFO_OFFSET is sizetype.
16151         * error.c (dump_expr): Don't use size_binop non-sizes.
16152         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
16153         * init.c (construct_virtual_bases): Fix type error.
16154         (build_vec_delete_1): Pass proper type to size_binop and don't
16155         fold result.
16156         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
16157         * rtti.c (get_base_offset): Pass proper type to size_binop.
16158         * search.c (dfs_find_vbases): Fix type error.
16159         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
16160         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
16161         * tree.c (debug_binfo): Variable N is signed.
16162         Use HOST_WIDE_INT_PRINT_DEC.
16163         * typeck.c (comptypes): sizetype is same as equivalent integer type.
16164         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
16165         size_one_node and size_zero_node.
16166         (c_alignof): Use size_one_node.
16167         (build_component_addr): Pass proper types to size_binop.
16168         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
16169
16170 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
16171
16172         Implement class scope using-declarations for functions.
16173         * class.c (handle_using_decl): Call add_method for used functions.
16174         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
16175         (add_method): Used functions are hidden by local functions.
16176         (check_bases_and_members): Handle using-decls before finalizing
16177         CLASSTYPE_METHOD_VEC.
16178         * call.c (add_function_candidate): Add ctype parm; if nonzero,
16179         override the type of 'this' accordingly.
16180         (add_template_candidate, add_template_candidate_real): Add ctype parm.
16181         (convert_class_to_reference, build_user_type_conversion_1,
16182         build_new_function_call, build_object_call, build_new_op,
16183         build_new_method_call): Pass ctype parm.
16184
16185         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
16186         the baselink.
16187         * call.c (convert_class_to_reference, build_user_type_conversion_1,
16188         build_new_function_call, build_object_call, build_new_op,
16189         build_new_method_call, build_op_delete_call): Don't get basetype_path
16190         from a baselink.
16191         * typeck.c (build_component_ref): Likewise.
16192         * init.c (build_offset_ref): Likewise.
16193         (resolve_offset_ref): Don't call enforce_access.
16194         Call build_scoped_ref.
16195         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
16196         would cause an error or if -pedantic.
16197         * class.c (alter_access): Lose binfo parm.
16198
16199 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
16200
16201         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
16202         types.
16203
16204 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
16205
16206         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
16207         pseudo_type_info creation into the std namespace
16208
16209 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
16210
16211         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
16212         (import_export_class): Remove declaration.
16213         * decl2.c (import_export_class): Make it static.
16214         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
16215         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
16216         EXPR_WITH_FILE_LOCATION.
16217         * lex.c (check_newline): Tweak filename/lineno setting.
16218         * semantics.c (begin_while_stmt): Fix typo in comment.
16219
16220 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16221
16222         * lang-options.h (-fmessage-length=): Add missing option.
16223
16224         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
16225
16226 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
16227
16228         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
16229
16230 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
16231
16232         * optimize.c (expand_call_inline): Emit the return label before
16233         evaluating the return value.
16234
16235 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
16236
16237         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
16238         than duplicating functionality here.
16239         * optimize.c: Include input.h.
16240         (expand_call_inline): Use push_srcloc and pop_srcloc.
16241         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
16242         * parse.c: Regenerated.
16243         * Makefile.in (lex.o): Depend on input.h.
16244         (optimize.o): Likewise.
16245
16246 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
16247
16248         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
16249         function type, rather than ICE.
16250
16251 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
16252
16253         * decl.c (grokdeclarator): Call decl_type_access_control.
16254         * parse.y (parse_end_decl): Don't call decl_type_access_control if
16255         decl is null.
16256
16257 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
16258
16259         * decl.c (decls_match): Remove obsolete static member nadgering.
16260
16261 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16262
16263         * decl.c (grokdeclarator): Change ANSI to ISO.
16264         * lex.c (consume_string, readescape, do_identifier): Likewise.
16265         (parse_float, real_yylex): Likewise.
16266         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
16267         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
16268         new_type_id, maybe_label_decls, simple_stmt,
16269         for.init.statement): Likewise.
16270         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
16271         * semantics.c (finish_named_return_value): Likewise.
16272         * parse.c: Regenerate.
16273
16274 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
16275
16276         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
16277         (CPTI_CLASS_STAR_TYPE): Remove.
16278         (vtable_index_type): Likewise.
16279         (class_star_type_node): Remove.
16280         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
16281         (build_binary_op_nodefault): Remove.
16282         * call.c (build_new_op): Use build_binary_op instead of
16283         build_binary_op_nodefault.
16284         * decl.c (init_decl_processing): Remove class_star_type_node
16285         initialization.  Make delta_type_node ptrdiff_type_node under the
16286         new ABI.  Initialize vtable_index_type.
16287         (build_ptrmemfunc_type): Build different structures for the new
16288         ABI.
16289         (build_enumerator): Use build_binary_op instead of
16290         build_binary_op_nodefault.
16291         * method.c (build_overload_value): Mangle pointers-to-members
16292         appropriately under the new ABI.
16293         * typeck.c (build_array_ref): Use build_binary_op instead of
16294         build_binary_op_nodefault.
16295         (get_member_function_from_ptrfunc): Adjust for the new ABI.
16296         (build_binary_op_nodefault): Rename to ...
16297         (build_binary_op): ... this.  Remove old version.  Adjust for
16298         pointer-to-member comparisons under the new ABI.
16299         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
16300         (build_ptrmemfunc): Adjust for the new ABI.
16301         (expand_ptrmemfunc_cst): Likewise.
16302         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
16303         (pfn_from_ptrmemfunc): Adjust for the new ABI.
16304
16305 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
16306
16307         * call.c (build_object_call): Compress consecutive calls to
16308         cp_error.
16309         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
16310         (build_op_delete_call): Adjust message formatting.
16311
16312         * class.c (check_bases): Compress consecutive calls to
16313         cp_pedwarn.
16314         (finish_struct_anon): Say 'ISO C++'.
16315
16316         * decl.c (start_decl): Same here.
16317         (grok_reference_init): Likewise.
16318         (grokfndecl): Correct message formatting.
16319         (grokfndecl): Improve diagnostic.
16320         (check_static_variable_definition): Likewise. Say 'ISO C++'
16321         (compute_array_index_type): Say 'ISO C++'
16322         (create_array_type_for_decl): Compress consecutive calls to
16323         cp_error.
16324         (grokdeclarator): Say 'ISO C++'
16325         (grok_op_properties): Likewise.
16326
16327         * decl2.c (delete_sanity): Clairify diagnostic.
16328         (check_member_template): Same here.
16329         (grok_function_init): Use consistent terminology.
16330
16331         * expr.c (do_case): Say 'ISO C++'
16332
16333         * friend.c (do_friend): Compress consecutive calls to warning.
16334
16335 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
16336
16337         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
16338         * class.c (build_secondary_vtable): Reorganize.  Don't create a
16339         new vtable under the new ABI.
16340         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
16341         computing the size.
16342         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
16343         the initializing elements.
16344         (initialize_vtable): New function.
16345         (dfs_finish_vtbls): Use it.
16346         (dfs_accumulate_vtbl_inits): New function.
16347         (finish_vtbls): Merge primary and secondary vtables under the new
16348         ABI.
16349         (finish_struct_1): Remove redundant call to layout_vtable_decl.
16350         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
16351         aren't VAR_DECLs.
16352
16353         * class.c (build_vtable): New function, split out from ...
16354         (get_vtable_decl): ... here, and ...
16355         (build_secondary_vtable): ... here.
16356
16357         * pt.c (tsubst_decl): Fix formatting.
16358
16359 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16360
16361         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
16362         (avoid_overlap, build_base_field): Likewise.
16363         (build_base_field, build_base_fields, is_empty_class):
16364         Test DECL_SIZE with integer_zero.
16365         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
16366         * cp-tree.h (struct lang_type): New field size_unit.
16367         (CLASSTYPE_SIZE_UNIT): New macro.
16368         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
16369         (cp_finish_decl): Delete -Wlarger-than processing.
16370         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
16371         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
16372         * tree.c (make_binfo): binfo vector is one entry longer.
16373         (walk_tree): Walk DECL_SIZE_UNIT.
16374
16375 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
16376
16377         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
16378         comment.
16379         (build_vtable_entry): Don't assume all vtable entries are
16380         functions.
16381         (build_vtbl_initializer): Adjust accordingly.
16382         (get_vtable_decl): Fix formatting.
16383
16384 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
16385
16386         * semantics.c (deferred_type_access_control): Walk the entire
16387         type_lookups list.
16388         (save_type_access_control): Rename from
16389         initial_deferred_type_access_control.  Just remember the value.
16390         (decl_type_access_control): New fn.
16391         (begin_function_definition): Use deferred_type_access_control, after
16392         we've started the function.  Set type_lookups to error_mark_node.
16393         * parse.y (frob_specs, fn.def1): Adjust.
16394         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
16395         (parse_end_decl, parse_bitfield0, parse_method): New fns.
16396         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
16397         (after_type_component_declarator0): Likewise.
16398         (after_type_component_declarator): Likewise.
16399         (notype_component_declarator): Likewise.
16400         * cp-tree.h: Adjust.
16401
16402         * decl.c (redeclaration_error_message): Allow redeclaration of
16403         namespace-scope decls.
16404
16405 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
16406
16407         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
16408
16409 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
16410
16411         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
16412         * decl2.c (grokclassfn): Likewise.
16413
16414         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
16415
16416         * decl2.c (lang_decode_option): Don't set default message length
16417         here.
16418         * lex.c (lang_init_options): Set it here.
16419
16420 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
16421
16422         Make DECL_CONTEXT mean the class in which a member function was
16423         declared, even for a virtual function.
16424         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
16425         (DECL_FRIEND_CONTEXT): New macro.
16426         (DECL_REAL_CONTEXT): Remove.
16427         (SET_DECL_FRIEND_CONTEXT): Likewise.
16428         (DECL_VIRTUAL_CONTEXT): Adjust.
16429         (DECL_CLASS_SCOPE_P): Use TYPE_P.
16430         (add_friends): Remove.
16431         (hack_decl_function_context): Likewise.
16432         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
16433         CP_DECL_CONTEXT.
16434         (build_over_call): Fix indentation.  Use DECL_CONTEXT
16435         instead of DECL_CLASS_CONTEXT.
16436         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
16437         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
16438         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16439         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
16440         (build_base_field): Likewise.
16441         (finish_struct_1): Likewise.
16442         (build_self_reference): Likewise.
16443         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
16444         DECL_REAL_CONTEXT.
16445         (pushtag): Use decl_function_context, not
16446         hack_decl_function_context.
16447         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16448         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
16449         (pushdecl): Remove bogus code.
16450         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
16451         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16452         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16453         Use decl_function_context, nothack_decl_function_context.
16454         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
16455         (grokdeclarator): Likewise.  Use decl_function_context, not
16456         hack_decl_function_context.
16457         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
16458         (start_function): Use DECL_FRIEND_CONTEXT, not
16459         DECL_CLASS_CONTEXT.  Use decl_function_context, not
16460         hack_decl_function_context.
16461         (finish_function): Use decl_function_context, not
16462         hack_decl_function_context.
16463         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
16464         DECL_CLASS_CONTEXT.
16465         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
16466         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
16467         (grokfield): Likewise.
16468         (finish_builtin_type): Likewise.
16469         (finish_vtable_vardec): Use decl_function_context, not
16470         hack_decl_function_context.
16471         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16472         (start_static_initialization_or_destruction): Likewise.
16473         (finish_static_initialization_or_destruction): Likewise.
16474         (mark_used): Adjust logic for deciding when to synthesize methods.
16475         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
16476         DECL_REAL_CONTEXT.
16477         * error.c (dump_function_decl): Use DECL_CONTEXT, not
16478         DECL_CLASS_CONTEXT.
16479         * friend.c (is_friend): Likewise.
16480         (add_friends): Remove.
16481         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
16482         * lex.c (begin_definition_of_inclass_inline): Use
16483         decl_function_context, not hack_decl_function_context.
16484         (process_next_inline): Likewise.
16485         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16486         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
16487         DECL_CLASSS_CONTEXT.
16488         (hack_identifier): Likewise.
16489         (synthesize_method):  Use decl_function_context, not
16490         hack_decl_function_context.
16491         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
16492         DECL_REAL_CONTEXT.
16493         (is_member_template): Use decl_function_context, not
16494         hack_decl_function_context.  Use DECL_CONTEXT, not
16495         DECL_CLASS_CONTEXT.
16496         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
16497         DECL_CLASS_CONTEXT.
16498         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
16499         DECL_REAL_CONTEXT.
16500         (push_template_decl_real): Likewise.
16501         (instantiate_class_template): Don't call add_friends.
16502         (tsubst_default_argument): Use DECL_CONTEXT, not
16503         DECL_REAL_CONTEXT.
16504         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
16505         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16506         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
16507         DECL_CLASS_CONTEXT.
16508         * repo.c (repo_inline_used): Likewise.
16509         * search.c (current_scope): Adjust for new _CONTEXT macros.
16510         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
16511         DECL_REAL_CONTEXT.
16512         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16513         (lookup_fnfields_here):Likewise.
16514         (check_final_overrider): Likewise.
16515         (init_vbase_pointers): Likewise.
16516         (virtual_context): Likewise.
16517         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
16518         (expand_body): Use decl_function_context, not
16519         hack_decl_function_context.
16520         * tree.c (hack_decl_function_context): Remove.
16521         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
16522         DECL_CLASS_CONTEXT.
16523         * typeck2.c (error_not_base_type): Likewise.
16524
16525 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
16526
16527         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
16528
16529 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16530
16531         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
16532
16533 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
16534
16535         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
16536
16537 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
16538
16539         * decl2.c (lang_decode_option): Enable automatic line wrapping.
16540
16541 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
16542
16543         * parse.y (frob_specs): Split out...
16544         (parse_decl): From here.
16545         (fn.def2): Call initial_deferred_type_access_control.
16546         (after_type_component_declarator0): Call frob_specs.
16547         (notype_component_declarator0): Likewise.
16548         * search.c (friend_accessible_p): Nested classes are friends of their
16549         enclosing classes.
16550
16551 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
16552
16553         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
16554         used to create an implicit temporary.
16555
16556         * class.c (dfs_modify_vtables): Tweak calculation of functions to
16557         override.
16558
16559 2000-02-08  Nathan Sidwell  <nathan@acm.org>
16560
16561         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
16562         strip array element qualifiers too.
16563
16564 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
16565
16566         * decl.c (store_parm_decls): Don't build cleanups for parameters
16567         while processing_template_decl.
16568
16569 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
16570
16571         * cp-tree.h (struct saved_scope): Add incomplete field.
16572         (namespace_scope_incomplete): New macro.
16573         * decl.c (pushdecl): Use it.
16574         (hack_incomplete_structures): Use it.  See through artificial
16575         binding levels.
16576         (mark_saved_scope): Mark it.
16577
16578         Implement access control for nested types.
16579         * search.c (type_access_control): New fn.
16580         (accessible_p): Now we do perform access control for types.
16581         * semantics.c (deferred_type_access_control): New fn.
16582         (initial_deferred_type_access_control): New fn.
16583         (begin_function_definition): Call it.  Add lookups parm.
16584         * decl.c (struct binding_level): Add this_class field.
16585         (pushlevel_class): Set it.
16586         (mark_binding_level): Mark it.
16587         (lookup_name_real): Use it.  Call type_access_control.
16588         (mark_saved_scope): Mark lookups field.
16589         * cp-tree.h (flagged_type_tree): Add lookups field.
16590         (struct saved_scope): Add lookups field.
16591         (type_lookups): New macro.
16592         * parse.y (declmods): Now <ftype>.
16593         (parse_decl): Add lookups parm.  Call
16594         initial_deferred_type_access_control.
16595         (lang_extdef): Clear type_lookups.
16596         (typed_declspecs, declmods, typespec): Set lookups field.
16597         (initdcl): Call deferred_type_access_control.
16598         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
16599         component_decl_1, named_parm): Adjust.
16600         * friend.c (is_friend): Nested classes are friends of their
16601         enclosing classes.
16602
16603         * class.c (currently_open_derived_class): New fn.
16604         * method.c (hack_identifier): Use it.
16605
16606         * lex.c (do_identifier): Remove obsolete code.
16607
16608         * parse.y (typed_typespecs): Propagate new_type_flag properly.
16609
16610 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
16611
16612         * tinfo.h: Remove apostrophes from C++ comment (xgettext
16613         thinks this file is plain C).
16614
16615 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16616
16617         * Makefile.in (call.o): Depend on $(EXPR_H).
16618
16619         * call.c: Include "expr.h".
16620
16621         * class.c (dump_class_hierarchy): Add prototype.
16622
16623         * search.c (dfs_get_pure_virtuals): Likewise.
16624
16625 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
16626
16627         * parse.y (simple_stmt): Allow :: token in asm parameter list.
16628         * parse.c: Rebuilt.
16629
16630 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
16631
16632         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
16633         Store it in DECL_FCONTEXT.
16634         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
16635
16636 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
16637
16638         * tinfo.h (old abi): #include "tconfig.h".
16639         * tinfo.cc (convert_to_base): Move into old abi section.
16640
16641 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
16642
16643         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
16644         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
16645         (BINFO_PRIMARY_BINFO): New macro.
16646         (BF_DELTA): Rename to ...
16647         (BV_DELTA): ... this.
16648         (BF_VCALL_INDEX): Rename to ...
16649         (BV_VCALL_INDEX): ... this.
16650         (BF_FN): Rename to ...
16651         (BV_FN): ... this.
16652         * class.c (build_vbase_path): Adjust for changes to reverse_path.
16653         (set_rtti_entry): Rename BF_ macros to BV_ variants.
16654         (modify_vtable_entry): Simplify.
16655         (add_virtual_function): Rename BF_ macros to BV_ variants.
16656         (build_vtable_initializer): Likewise.
16657         (get_class_offset_1): Remove.
16658         (dfs_get_class_offset): Likewise.
16659         (get_class_offset): Likewise.
16660         (dfs_find_final_overrider): New function.
16661         (find_final_overrider): Likewise.
16662         (modify_one_vtable): Remove.
16663         (dfs_find_base): New function.
16664         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
16665         find_final_overrider.
16666         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
16667         virtuals.
16668         (dfs_fixup_vtable_deltas): Remove.
16669         (override_one_vtable): Remove.
16670         (merge_overrides): Likewise.
16671         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
16672         unreal chilren of virtual bases.
16673         (finish_struct_1): Don't use merge_overrides.  Don't use
16674         dfs_fixup_vtable_deltas.
16675         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
16676         BINFOs.
16677
16678 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
16679             Jason Merrill  <jason@yorick.cygnus.com>
16680
16681         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
16682
16683 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
16684
16685         * exception.cc (__throw_bad_typeid): Add missing std::.
16686
16687 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16688
16689         * cp-tree.h (make_thunk): PROTO -> PARAMS.
16690
16691 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
16692
16693         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
16694
16695         Runtime support for new-abi rtti.
16696         * inc/typeinfo (type_info::operator!=): Define in class.
16697         (type_info::before, type_info::name, type_info::operator==,
16698         type_info::operator!=): Define new ABI implementations.
16699         (type_info::is_pointer_p, type_info::is_function_p): Declare
16700         new virtual functions.
16701         (type_info::do_catch, type_info::do_upcast): Likewise.
16702
16703         * tinfo.h (__base_class_info): Define new class.
16704         (__class_type_info): Likewise.
16705         (__si_class_type_info): Likewise.
16706         (__vmi_class_type_info): Likewise.
16707         (__dynamic_cast): Prototype.
16708
16709         * tinfo.cc: Conditionalize old and new rtti mechanisms.
16710         (type_info::is_pointer_p): Define new function.
16711         (type_info::is_function_p): Likewise.
16712         (type_info::do_catch): Likewise.
16713         (type_info::do_upcast): Likewise.
16714         (vtable_prefix): New structure for vtable access.
16715         (adjust_pointer): Define new template function.
16716         (contained_p, public_p, virtual_p, contained_public_p,
16717         contained_nonpublic_p, contained_nonvirtual_p): Define new
16718         functions.
16719         (nonvirtual_base_type): New local variable.
16720         (__class_type_info::~__class_type_info): Define.
16721         (__si_class_type_info::~__si_class_type_info): Likewise.
16722         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
16723         (__class_type_info::do_catch): Define new function.
16724         (__class_type_info::do_upcast): Likewise.
16725         (__class_type_info::find_public_src): Likewise.
16726         (__class_type_info::do_find_public_src): Likewise.
16727         (__si_class_type_info::do_find_public_src): Likewise.
16728         (__vmi_class_type_info::do_find_public_src): Likewise.
16729         (__class_type_info::do_dyncast): Likewise.
16730         (__si_class_type_info::do_dyncast): Likewise.
16731         (__vmi_class_type_info::do_dyncast): Likewise.
16732         (__class_type_info::do_upcast): Likewise.
16733         (__si_class_type_info::do_upcast): Likewise.
16734         (__vmi_class_type_info::do_upcast): Likewise.
16735         (__dynamic_cast): Likewise.
16736
16737         * tinfo2.cc (__fundamental_type_info): Define new class.
16738         (__pointer_type_info): Likewise.
16739         (__reference_type_info): Likewise.
16740         (__array_type_info): Likewise.
16741         (__function_type_info): Likewise.
16742         (__enum_type_info): Likewise.
16743         (__ptr_to_member_type_info): Likewise.
16744         (__fundamental_type_info::~__fundamental_type_info): Define.
16745         (__pointer_type_info::~__pointer_type_info): Likewise.
16746         (__reference_type_info::~__reference_type_info): Likewise.
16747         (__array_type_info::~__array_type_info): Likewise.
16748         (__function_type_info::~__function_type_info): Likewise.
16749         (__enum_type_info::~__enum_type_info): Likewise.
16750         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
16751         (__pointer_type_info::do_catch): Define new function.
16752         (__ptr_to_member_type_info::do_catch): Define new function.
16753
16754         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
16755         (__is_pointer): Likewise.
16756
16757         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
16758
16759 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
16760
16761         * cp/class.c (build_vtable): Rename to build_primary_vtable.
16762         (prepare_fresh_vtable): Rename to build_secondary_vtable.
16763         (make_new_vtable): New function.
16764         (modify_vtable_entry): Handle generation of new vtables correctly.
16765         (modify_one_vtable): Remove unused parameter.
16766         (dfs_fixup_vtable_deltas): Likewise.
16767         (override_one_vtable): Use build_secondary_vtable.
16768         (finish_struct_1): Use build_primary_vtable and
16769         build_secondary_vtable.
16770
16771 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
16772
16773         * cp/decl.c: Adjust variable names, comments, help strings.
16774
16775 2000-01-29  Nathan Sidwell  <nathan@acm.org>
16776
16777         * new2.cc (operator delete[]): Use operator delete, don't assume
16778         implementation.
16779
16780 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
16781
16782         * class.c (build_vtbl_initializer): Add argument to
16783         build_vtable_entry call.
16784
16785 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
16786
16787         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
16788         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
16789         (BF_DELTA): New macro.
16790         (BF_VCALL_INDEX): Likewise.
16791         (BF_FN): Likewise.
16792         (THUNK_VCALL_OFFSET): Likewise.
16793         (make_thunk): Change prototype.
16794         * class.c (build_vtable_entry): Integrate
16795         build_vtable_entry_for_fn.  Handle vcall indices.
16796         (build_vtable_entry_for_fn): Remove.
16797         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
16798         BF_VCALL_INDEX, BF_FN.
16799         (modify_vtable_entry): Integrate common code from
16800         modify_one_vtable and dfs_fixup_vtable_deltas.
16801         (add_virtual_function): Set BF_VCALL_INDEX.
16802         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
16803         and BF_FN.
16804         (modify_one_vtable): Simplify.
16805         (dfs_fixup_vtable_deltas): Likewise.
16806         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
16807         * method.c (make_thunk): Handle vcall indices.
16808
16809 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
16810
16811         Compiler side new abi rtti (not enabled).
16812         * cp-tree.h (new_abi_rtti_p): New macro.
16813         (emit_support_tinfos): Prototype new function.
16814         (tinfo_decl_p): Likewise.
16815         (emit_tinfo_decl): Likwise.
16816         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
16817         macros.
16818         (doing_runtime): New local static.
16819         (init_rtti_processing): Add new-abi initializer.
16820         (get_tinfo_decl): Add new-abi logic.
16821         (tinfo_from_decl): Likewise.
16822         (build_dynamic_cast_1): Likewise.
16823         (qualifier_flags): New static function.
16824         (tinfo_base_init): Likewise.
16825         (generic_initializer): Likewise.
16826         (ptr_ref_initializer): Likewise.
16827         (ptmd_initializer): Likewise.
16828         (class_hint_flags): Likewise.
16829         (class_initializer): Likewise.
16830         (synthesize_tinfo_var): Likewise.
16831         (create_real_tinfo_var): Likewise.
16832         (create_pseudo_type_info): Likewise.
16833         (get_vmi_pseudo_type_info): Likewise.
16834         (create_tinfo_types): Likewise.
16835         (emit_support_tinfos): New global function.
16836         (tinfo_decl_p): New global predicate.
16837         (emit_tinfo_decl): New global function.
16838         * class.c (set_rtti_entry): Generalize for old and new rtti.
16839         (build_vtbl_initializer): Likewise.
16840         * decl2.c (finish_file): Likewise.
16841
16842 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
16843
16844         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
16845         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
16846
16847 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
16848
16849         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
16850         for scopes.
16851
16852 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
16853
16854         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
16855
16856 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
16857
16858         * optimize.c (calls_setjmp_r): Supply new argument
16859         to special_function_p.
16860
16861 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16862
16863         * call.c: PROTO -> PARAMS.
16864         * class.c: Likewise.
16865         * cp-tree.h: Likewise.
16866         * cvt.c: Likewise.
16867         * decl.c: Likewise.
16868         * decl.h: Likewise.
16869         * decl2.c: Likewise.
16870         * dump.c: Likewise.
16871         * errfn.c: Likewise.
16872         * error.c: Likewise.
16873         * except.c: Likewise.
16874         * expr.c: Likewise.
16875         * init.c: Likewise.
16876         * input.c: Likewise.
16877         * lex.c: Likewise.
16878         * lex.h: Likewise.
16879         * method.c: Likewise.
16880         * optimize.c: Likewise.
16881         * parse.y: Likewise.
16882         * pt.c: Likewise.
16883         * repo.c: Likewise.
16884         * rtti.c: Likewise.
16885         * search.c: Likewise.
16886         * semantics.c: Likewise.
16887         * spew.c: Likewise.
16888         * tree.c: Likewise.
16889         * typeck.c: Likewise.
16890         * typeck2.c: Likewise.
16891         * xref.c: Likewise.
16892
16893 2000-01-25  Richard Henderson  <rth@cygnus.com>
16894
16895         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
16896
16897 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
16898
16899         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
16900         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
16901         (struct vcall_offset_data_s): New type.
16902         (dfs_vcall_offset_queue_p): New function.
16903         (dfs_build_vcall_offset_vtbl_entries): Likewise.
16904         (build_vcall_offset_vtbl_entries): Likewise.
16905         (layout_vtable_decl): Likewise.
16906         (num_vfun_entries): Likewise.
16907         (num_extra_vtbl_entries): Add the entries for vcall offsets.
16908         (build_vtbl_initializer): Likewise.
16909         (dfs_finish_vtabls): Use layout_vtable_decl.
16910         (modify_one_vtables): Always duplicate vtables under the new ABI.
16911         (finish_struct_1): Use layout_vtable_decl.
16912
16913 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16914
16915         * decl.c (member_function_or_else): Change third arg from a format
16916         specifier to an `enum overload_flags'.  Callers changed.
16917
16918 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
16919
16920         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
16921         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
16922         build_const_cast, get_delta_difference, check_return_expr): Avoid
16923         ANSI string concatenation usage.
16924
16925 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
16926
16927         * class.c (layout_class_type): Put the fields required to make a
16928         class non-empty at the end, not the beginning, of the TYPE_FIELDs
16929         list.
16930
16931 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
16932
16933         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
16934         template.
16935
16936         * decl2.c (mark_used): Do instantiate inlines that have been
16937         explicitly instantiated.
16938
16939 2000-01-24  Richard Henderson  <rth@cygnus.com>
16940
16941         * call.c (build_over_call): Use expand_tree_builtin.
16942         * typeck.c (build_function_call_real): Likewise.
16943         (build_binary_op_nodefault): Handle unordered compares.
16944
16945 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
16946
16947         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
16948         cp_tree_index values.
16949         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
16950         New global node #defines for them.
16951         * rtti.c (call_void_fn): Replace with ...
16952         (build_runtime_decl): ... new static function.
16953         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
16954         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
16955         (build_dynamic_cast_1): Always produce correctly typed result.
16956         Explicitly produce type_info addresses. Use dynamic_cast_node.
16957         * exception.cc (__throw_bad_cast): Return `void *'.
16958         (__throw_bad_typeid): Return `const type_info &'.
16959
16960 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
16961
16962         * cp-tree.h (get_vtable_decl): Prototype new function.
16963         * class.c (get_vtable_decl): New function. Broken out from ...
16964         (build_vtable): ... here. Use it.
16965         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
16966         by get_vtable_decl.
16967
16968 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
16969
16970         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
16971         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
16972         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
16973         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
16974         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
16975         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
16976         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
16977         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
16978         (CPTI_TINFO_VAR_ID): New enumeration.
16979         (__tp_desc_type_node, __access_mode_type_node,
16980         __bltn_desc_type_node, __user_desc_type_node,
16981         __class_desc_type_node, __ptr_desc_type_node,
16982         __attr_desc_type_node, __func_desc_type_node,
16983         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
16984         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
16985         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
16986         enum_desc_type_node, class_desc_type_node,
16987         si_class_desc_type_node, vmi_class_desc_type_node,
16988         ptmd_desc_type_node, base_desc_type_node): New #defines.
16989         (tinfo_fn_id, tinfo_fn_type): Rename to ...
16990         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
16991         (tinfo_var_id): New enumeration.
16992         (DECL_TINFO_FN_P): Augment comment.
16993         * decl.c (cp_global_trees): Adjust documentation.
16994         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
16995         tinfo_decl_type and tinfo_var_id.
16996         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
16997         (build_typeid): Remove unused variable.
16998         (get_tinfo_var): Use tinfo_var_id.
16999         (tinfo_name): New static function.
17000         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
17001         (tinfo_from_decl): Likewise.
17002         (get_base_offset): New static function, broken out of
17003         expand_class_desc.
17004         (expand_si_desc): Use tinfo_name.
17005         (expand_class_desc): Likewise. Lose local static variable.
17006         Use base_desc_type_node. Use get_base_offset.
17007         (expand_ptr_desc): Use tinfo_name.
17008         (expand_attr_desc): Likewise.
17009         (expand_generic_desc): Likewise.
17010
17011         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
17012         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
17013
17014 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
17015
17016         * cp-tree.h (__eprintf): Remove declaration.
17017         * tree.c (__eprintf): Remove definition.
17018
17019 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
17020             Mark Mitchell  <mark@codesourcery.com>
17021
17022         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
17023         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
17024
17025 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
17026
17027         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
17028
17029 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
17030
17031         * cp-tree.h (register_dtor_fn): New function.
17032         * decl.c (destroy_local_static): Rename to ...
17033         (register_dtor_fn): ... this.  Give it external linkage.
17034         (expand_static_init): Use it.
17035         * decl2.c (do_static_initialization): Likewise, if using
17036         __cxa_atexit.
17037         (do_static_destruction): Check that __cxa_atexit is not in use.
17038         (finish_file): Don't call do_static_destruction if using
17039         __cxa_atexit.
17040
17041         * typeck.c (convert_arguments): Restore two-message error
17042         reporting.
17043
17044 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
17045
17046         Remap dynamic cast hint values to be consistent across ABIs.
17047         * search.c (dynamic_cast_base_recurse): Remap generated value.
17048         (get_dynamic_cast_base_type): Adjust documentation.
17049         * tinfo.h (__user_type_info::dyncast): Likewise.
17050         (__user_type_info::find_public_subobj): Remap BOFF meaning.
17051         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
17052         (__class_type_info::do_dyncast): Likewise.
17053         (__class_type_info::do_find_public_subobj): Likewise.
17054         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
17055
17056 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
17057
17058         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
17059
17060         * typeck2.c (incomplete_type_error): Restore previous
17061         cp_error and cp_error_at call sequence.
17062
17063 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
17064
17065         * class.c (dump_class_hierarchy): Make format agree with argument;
17066         cast pointer to unsigned long and print with %lx.
17067
17068 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
17069
17070         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
17071
17072         * typeck.c (composite_pointer_type, common_type,
17073         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
17074         build_function_call_real, convert_arguments,
17075         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
17076         build_unary_op, mark_addressable, build_compound_expr,
17077         build_static_cast, build_reinterpret_cast, build_const_cast,
17078         build_c_cast, build_modify_expr, get_delta_difference,
17079         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
17080         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
17081         into a single one.
17082         * typeck2.c (readonly_error, abstract_virtuals_error,
17083         process_init_constructor, check_for_new_type): Likewise.
17084
17085 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
17086
17087         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
17088         VAR_DECLs.
17089
17090 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
17091
17092         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
17093         (build_x_typeid): Likewise.
17094         (get_tinfo_fn): Likewise.
17095         (get_tinfo_fn_unused): Rename to ...
17096         (get_tinfo_decl): ... here.
17097         * rtti.c (build_headof): Replace logic error with assertion.
17098         (get_tinfo_fn_dynamic): Rename to ...
17099         (get_tinfo_decl_dynamic): ... here. Make static. Use
17100         complete_type_or_else.
17101         (build_x_typeid): Move into ...
17102         (build_typeid): ... here. Adjust call to
17103         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
17104         throw_bad_typeid expression.
17105         (get_tinfo_fn_unused): Rename to ...
17106         (get_tinfo_decl): ... here. Adjust comment.
17107         (get_tinfo_fn): Delete.
17108         (tinfo_from_decl): New static function.
17109         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
17110         (get_typeid): Use complete_type_or_else.
17111         (build_dynamic_cast_1): Adjust calls to
17112         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
17113         * parse.y (primary): Adjust call to build_typeid.
17114         * except.c (build_eh_type_type_ref): Adjust call to
17115         get_tinfo_decl. Mark as used.
17116         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
17117         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
17118         * parse.c: Regenerated.
17119
17120 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
17121
17122         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
17123         calling convention.
17124         (resolves_to_fixed_type_p): Document calling convention.
17125         * rtti.c (build_x_typeid): Initialize NONNULL.
17126
17127         * cp-tree.h (build_shared_int_cst): New function.
17128         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
17129         * class.c (modify_vtable_entry): Likewise.
17130         (add_virtual_function): Split out code to generated shared
17131         INTEGER_CSTs to build_share_int_cst.
17132         (modify_all_vtables): Handle all the overridden functions here.
17133         Add overridden functions from non-primary virtual bases to the
17134         primary vtable.
17135         (finish_struct_1): Adjust call to modify_all_vtables.  Add
17136         overridden functions from non-primary bases to the vtable.
17137         * tree.c (build_shared_int_cst): New function.
17138
17139         * cp-tree.h (scratchalloc): Remove.
17140         (build_scratch_list): Likewise.
17141         * call.c (convert_class_to_reference): Replace build_scratch_list
17142         and build_expr_list with build_tree_list.
17143         (add_candidate): Replace scratchalloc with expralloc.  Note memory
17144         leak.
17145         (build_user_type_conversion_1):  Replace build_scratch_list
17146         and build_expr_list with build_tree_list.
17147         (build_new_op): Likewise.
17148         (build_op_delete_call): Likewise.
17149         (convert_like): Likewise.
17150         * cvt.c (ocp_convert): Likewise.
17151         * decl.c (start_decl): Likewise.
17152         (start_function): Likewise.
17153         (finish_destructor_body): Likewise.
17154         (maybe_build_cleanup_1): Likewise.
17155         * decl2.c (reparse_decl_as_expr): Likewise.
17156         * init.c (perform_member_init): Likewise.
17157         (expand_cleanup_for_base): Likewise.
17158         (build_builtin_delete_call): Likewise.
17159         (build_new_1): Likewise.
17160         (build_delete): Likewise.
17161         * method.c (do_build_assign_ref): Likewise.
17162         * parse.y (already_scoped_stmt): Likewise.
17163         (nontrivial_exprlist): Likewise.
17164         (net_initializer): Likewise.
17165         (initlist): Likewise.
17166         * parse.c: Regenerated.
17167         * rtti.c (build_x_typeid): Likewise.
17168         (build_dynamic_cast_1): Likewise.
17169         * typeck.c (build_x_compound_expr): Likewise.
17170         (build_static_cast): Likewise.
17171         (build_modify_expr): Likewise.
17172
17173         * cp-tree.h (DECL_VINDEX): Add documentation.
17174         * class.c (build_vtable_entry): Likewise.
17175         (start_vtable): Add comment.
17176         (add_virtual_function): Replace pending_hard_virtuals with
17177         overridden_virtuals and pending_virtuals with new_virtuals.
17178         Replace redundant assignments with assertions.
17179         (check_for_override): Add comment.
17180         (check_bases_and_members): Replace pending_hard_virtuals with
17181         overridden_virtuals and pending_virtuals with new_virtuals.
17182         (create_vtbl_ptr): Likewise.
17183         (layout_class_type): Likewise.
17184         (finish_struct_1): Likewise.  Add comments.
17185
17186 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
17187
17188         * class.c (finish_struct_1): Replace redundant code with
17189         assertions.
17190
17191         * cp-tree.h (flag_new_abi): Move.
17192         (flag_use_cxa_atexit): Likewise.
17193         (flag_honor_std): Likewise.
17194         (flag_rtti): Likewise.
17195         (vbase_offsets_in_vtable_p): Define.
17196         (vptrs_present_everywhere_p): Likewise.
17197         (TYPE_CONTAINS_VPTR_P): Likewise.
17198         (dfs_walk_real): Declare.
17199         * class.c (build_vbase_pointer_fields): Check
17200         vbase_offsets_in_vtable_p.
17201         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
17202         BINFO_VPTR_FIELD.
17203         (build_vbase_offset_vtbl_entries): Simplify.
17204         (build_vbase_offset_vtbl_entries): Adjust.
17205         (build_vbase_pointer): Add ability to look up vbase offsets in
17206         vtable.
17207         (start_vtable): New function.
17208         (add_virtual_function): Use it.
17209         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
17210         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
17211         (build_vtbl_initializer): Take the type of the complete object as
17212         input.  Use it to correctly calculate vbase offsets.
17213         (dfs_finish_vtbls): Pass the complete type to
17214         build_vtbl_initializer.
17215         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
17216         (create_vtable_ptr): Create a vtable even if there are no
17217         new virtual functions, under the new ABI.
17218         (finish_struct_1): Likewise.
17219         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
17220         * decl.c (exapnd_static_init): Remove call to
17221         preserve_initializer.
17222         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
17223         vtables.
17224         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
17225         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
17226         (construct_virtual_bases): Don't initialize virtual base pointers
17227         under the new ABI.
17228         (build_aggr_init): Clean up comment.
17229         (expand_aggr_init_1): Likewise.
17230         * rtti.c (expand_class_desc): Store the virtual function table
17231         index where the vbase offset lives in the offset field.
17232         * search.c (dfs_walk_real): Make it global.
17233         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
17234         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
17235
17236         * tinfo.h (USItype): Make it signed under the new ABI.
17237         * tinfo.cc (convert_to_base): New function.  Encapsulate base
17238         conversion logic here.
17239         (__class_type_info::do_upcast): Use it.
17240         (__class_type_info::do_dyncast): Likewise.
17241         (__class_type_info::do_find_public_subobj): Likewise.
17242
17243         * init.c (construct_virtual_bases): Don't look up the addresses of
17244         virtual bases at run-time.
17245
17246         * class.c (build_vbase_pointer): Relocate.
17247         (build_vbase_pointer_fields): Likewise.
17248         (dfs_build_vbase_offset_vtbl_entries): Likewise.
17249         (build_vbase_offset_vtbl_entries): Likewise.
17250
17251         * decl.c (init_decl_processing): Complain if -fnew-abi
17252         -fno-vtable-thunks is used.
17253
17254         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
17255         flag_new_abi.
17256
17257 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
17258
17259         * cp-tree.h (num_extra_vtbl_entries): New function.
17260         (size_extra_vtbl_entries): Likewise.
17261         (dfs_vtable_path_unmark): Likewise.
17262         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
17263         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
17264         * class.c (num_extra_vtbl_entries): New function.
17265         (size_extra_vtbl_entries): Likewise.
17266         (dfs_build_vbase_offset_vtbl_entries): New function.
17267         (build_vbase_offset_vtbl_entries): Likewise.
17268         (build_vtbl_initializer): Use it.
17269         (finish_struct_1): Adjust vtable sizes (using
17270         num_extra_vtbl_entries).
17271         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
17272         THUNK_DECL is non-NULL before expanding it.
17273         * init.c (expand_virtual_init): Adjust the vtable pointer by
17274         size_extra_vtbl_entries before storing it.
17275         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
17276         Handle TREE_LIST parameters here, not in the dfs_* functions.
17277         (dfs_unmarked_real_bases_queue_p): Adjust.
17278         (dfs_marked_real_bases_queue_p): Likewise.
17279         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
17280         (dfs_vtable_path_marked_real_bases_queue_p): New function.
17281         (dfs_vtable_path_unmark): Likewise.
17282
17283 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
17284
17285         * optimize.c (copy_body_r): Clear the operand three of a
17286         TARGET_EXPR when copying it.
17287
17288 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17289
17290         * method.c (build_decl_overload_real): Check whether we are in ::
17291         before returning __builtin_new/delete.
17292
17293 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
17294
17295         * pt.c (tsubst_friend_function): Improve comment.
17296         (instantiate_decl): Avoid crashing when a "nested" function is
17297         instantiated from the top level.
17298
17299         * dump.c (dqeueue_and_dump): Dump
17300         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
17301
17302 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17303
17304         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
17305
17306 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
17307
17308         * g++spec.c (lang_specific_driver): Add -fnew-abi if
17309         ENABLE_NEW_GXX_ABI defined.
17310         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
17311         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
17312         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
17313
17314 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
17315
17316         * decl.c (start_cleanup_fn): Call pushdecl.
17317
17318         * call.c (convert_class_to_reference): Fix typos.
17319         (build_conditional_expr): Handle errors gracefully.
17320         * class.c (push_nested_class): Likewise.
17321         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
17322         (DECL_THIS_EXTERN): Use it.
17323         (DECL_THIS_STATIC): Likewise.
17324         * cvt.c (convert_to_void): Handle errors gracefully.
17325         (build_expr_type_conversion): Likewise.
17326         * decl.c (maybe_push_decl): Likewise.
17327         (start_decl_1): Likewise.
17328         (require_complete_types_for_parms): Likewise.
17329         * parse.y (structsp): Likewise.
17330         (base_class): Likewise.
17331         * parse.c: Regenerated.
17332         * pt.c (finish_member_template_decl): Likewise.
17333         * typeck.c (decay_conversion): Likewise.
17334
17335         * cp-tree.h (dfs_skip_vbases): New function.
17336         (find_vbase_instance): Likewise.
17337         * class.c (determine_primary_base): Allow a nearly empty base to
17338         serve as a primary base class under the new ABI.
17339         (get_class_offset_1): Rename to ...
17340         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
17341         messages here.
17342         (get_class_offset): Use it.  Issue error messages here.
17343         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
17344         find the right copies of virtual bases.
17345         (fixup_vtable_deltas1): Rename to ...
17346         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
17347         bases as primary bases.
17348         (fixup_vtable_deltas): Remove.
17349         (override_one_vtable): Handle virtual bases as primary bases.
17350         (merge_overrides): Likewise.
17351         (finish_struct_1): Likewise.
17352         (dump_class_hierarchy): Dump primary-ness of bases as well.
17353         * search.c (mark_primary_bases): Use a pre-order traversal to
17354         handle primary virtual bases.
17355         (dfs_skip_vbases): New fiunction.
17356         (expand_upcast_fixups): Adjust to handle primary virtual bases.
17357         (fixup_virtual_upcast_offsets): Likewise.
17358         (fixup_all_virtual_upcast_offsets): Likewise.
17359         (dfs_find_vbase_instances): New function.
17360         (find_vbase_instance): Likewise.
17361
17362 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
17363
17364         * lex.c (DIR_SEPARATOR): Delete macro.
17365
17366 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
17367
17368        * decl2.c (lang_decode_option): Handle automatic line wrapping
17369        option.
17370
17371 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
17372
17373         * friend.c (do_friend): Don't resolve scopes when processing
17374         template declarations, even if the qualifying scope doesn't
17375         involve template parameters.
17376
17377 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
17378
17379         * class.c (dfs_modify_vtables_queue_p): Remove.
17380         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
17381         and dfs_marked_real_bases_queue_p instead of
17382         dfs_modify_vtables_queue_p.
17383
17384         * class.c (build_vbase_path): Simplify.
17385         (dfs_propagate_binfo_offsets): New function.
17386         (propagate_binfo_offsets): Use it.
17387         (remove_base_field): Simplify.
17388         (dfs_set_offset_for_vbases): Remove.
17389         (dfs_set_offset_for_shared_vbases): New function.
17390         (dfs_set_offset_for_unshared_vbases): Likewise.
17391         (layout_virtual_bases): Use them.
17392         (layout_basetypes): Don't call propagate_binfo_offsets.
17393         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
17394         for the vbases.
17395
17396         * class.c (build_base_field): New function, split out from ...
17397         (build_base_fields): ... here.  Use it.  Allocate primary bases
17398         first, under the new ABI.
17399         (get_vtable_entry): Remove.
17400         (remove_base_field): New function, split out from ...
17401         (remove_base_fields): ... here.  Adjust since primary bases come
17402         first under the new ABI.
17403
17404         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
17405         (initialize_vtbl_ptrs): New function.
17406         (expand_indirect_vtbls_init): Change prototype.
17407         (convert_pointer_to_vbase): Declare.
17408         * init.c (expand_direct_vtbls_init): Remove.
17409         (dfs_initialize_vtbl_ptrs): New function.
17410         (initialize_vtbl_ptrs): Likewise.
17411         (emit_base_init): Use initialize_vtbl_ptrs.
17412         * search.c (convert_pointer_to_vbase): Make it global.
17413         (expand_indirect_vtbls_init): Remove vtable initialization code.
17414         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
17415
17416         * class.c (dfs_finish_vtbls): New function.
17417         (finish_vtbls): Use it.
17418         (dump_class_hierarchy): New function.
17419
17420         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
17421         (BINFO_VBASE_PRIMARY_P): New macro.
17422         (BINFO_VIRTUALS): Add to documentation.
17423         (SET_BINFO_PRIMARY_MARKED_P): Remove.
17424         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17425         (dfs_mark_primary_bases_queue_p): Likewise.
17426         (dfs_unmarked_real_bases_queue_p): New function.
17427         (dfs_marked_real_bases_queue_p): Likewise.
17428         * search.c (dfs_mark_primary_bases): Adjust.
17429         (mark_primary_bases): Likewise.
17430         (get_shared_vbase_if_not_primary): New function.
17431         (dfs_unmarked_real_bases_queue_p): Likewise.
17432         (dfs_marked_real_bases_queue_p): Likewise.
17433         (dfs_get_pure_virtuals): Simplify.
17434         (get_pure_virtuals): Likewise.
17435
17436 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17437
17438         * lex.c: Include tm_p.h.
17439
17440 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
17441
17442         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
17443
17444 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
17445
17446         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
17447         * pt.c (instantiate_decl): Defer comdat templates that might not be
17448         needed.
17449
17450         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
17451         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
17452         (finish_file): Likewise.
17453
17454         * decl2.c (import_export_class): Undo 12/14 change.
17455
17456         * error.c (dump_decl): operator new, not operatornew.
17457
17458         * class.c (field_decl_cmp): A nontype is "greater" than a type.
17459         * search.c (lookup_field_1): Look for the last field with the
17460         desired name.
17461
17462 2000-01-05  Nathan Sidwell  <nathan@acm.org>
17463
17464         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
17465         FUNCTION_DECL.
17466
17467 2000-01-05  Nathan Sidwell  <nathan@acm.org>
17468
17469         * typeck.c (build_static_cast): Don't strip target qualifiers
17470         when casting from a class.
17471
17472 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17473
17474         * class.c (warn_hidden): Initialize variable `fndecl'.
17475
17476 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
17477
17478         * decl.c (flag_isoc9x): New variable to be able to use code in
17479         c-common.c.  For now always zero.
17480
17481 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
17482
17483         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
17484         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
17485         or unshare_base_binfos for virtual bases here.
17486         * search.c (dfs_get_vbase_types): Do it here.
17487         (get_vbase_types): Adjust.
17488
17489 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
17490
17491         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
17492         (BINFO_PRIMARY_MARKED_P): Use flag 5.
17493         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
17494         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17495         (unmark_primary_bases): Remove declaration.
17496         (unmarkedp): Declare.
17497         (dfs_vbase_unmark): Likewise.
17498         * class.c (determine_primary_base): Return immediately if there
17499         are no base classes.  Call mark_primary_bases here.
17500         (modify_all_direct_vtables): Remove.
17501         (modify_all_indirect_vtables): Remove.
17502         (dfs_modify_vtables_queue_p): New function.
17503         (dfs_modify_vtables): New function.
17504         (modify_all_vtables): Use them.
17505         (build_base_fields): Build FIELD_DECLs for primary virtual base
17506         classes.
17507         (create_vtable_ptr): Don't call determine_primary_base here.
17508         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
17509         (dfs_set_offset_for_vbases): ... this.
17510         (layout_virtual_bases): Use it.
17511         (layout_class_type): Call determine_primary_base here.
17512         * search.c (unmarkedp): Make it global.
17513         (shared_marked_p): Simplify.
17514         (shared_unmarked_p): Likewise.
17515         (dfs_primary_bases_queue_p): Remove.
17516         (dfs_unmark_primary_bases): Likewise.
17517         (unmark_primary_bases): Likewise.
17518         (mark_primary_bases): Simplify.
17519         (get_pure_virtuals): Don't call mark_primary_bases here.
17520         (dfs_vbase_unmark): New function.
17521         (get_vbase_types): Simplify.
17522
17523         * class.c (struct base_info): Remove.
17524         (determine_primary_base): Take has_virtual_p rather than a
17525         base_info as input.  Don't calculate max_has_virtual.
17526         (finish_struct_bits): Remove max_has_virtual argument.
17527         (create_vtable_ptr): Remove max_has_virtual_p argument.
17528         (layout_virtual_bases): Remove max argument.
17529         (layout_basetypes): Likewise.
17530         (layout_class_type): Remove max_has_virtual_p argument.
17531         (finish_struct_1): Remove max_has_virtual.
17532
17533         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
17534         (layout_basetypes): Remove.
17535         * class.c (propagate_binfo_offsets): Moved here from tree.c.
17536         Update to handle primary virtual bases.
17537         (remove_base_fields): New function, split out from
17538         layout_basetypes.
17539         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
17540         (layout_virtual_bases): New function, split out from
17541         layout_basetypes.  Update to handle primary virtual bases.
17542         (layout_basetypes): Moved here from tree.c.  Use
17543         remove_base_fields and layout_virtual_bases.
17544         * search.c (dfs_mark_primary_bases_queue_p): New function.
17545         (mark_primary_bases): Use it.
17546         * tree.c (CEIL): Remove.
17547         (propagate_binfo_offsets): Remove.
17548         (layout_basetypes): Remove.
17549
17550 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
17551
17552         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
17553         (BINFO_PRIMARY_MARKED_P): New macro.
17554         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
17555         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17556         (mark_primary_bases): New function.
17557         (unmark_primary_bases): Likewise.
17558         * search.c (get_abstract_virtuals_1): Remove.
17559         (dfs_mark_primary_bases): New function.
17560         (mark_primary_bases): Likewise.
17561         (dfs_unmark_primary_bases): Likewise.
17562         (unmark_primary_bases): Likewise.
17563         (dfs_get_pure_virtuals): Likewise.
17564
17565 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
17566
17567         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
17568         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
17569         (modify_one_vtable): Adjust.
17570         (fixup_vtable_deltas1): Likewise.
17571         (override_one_vtable): Likewise.
17572         * search.c (get_abstract_virtuals_1): Likewise.
17573         (get_pure_virtuals): Likewise.
17574         (expand_upcast_fixups): Likewise.
17575         * tree.c (debug_binfo): Likewise.
17576
17577         * class.c (build_vtable): Don't return a value.  Don't rebuild
17578         vtables for bases that have already been handled.
17579         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
17580         already been handled.
17581         (modify_one_vtable): Adjust accordingly.
17582         (fixup_vtable_deltas1): Likewise.
17583         (finish_struct_1): Likewise.
17584
17585 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17586
17587         * call.c (build_new_method_call): Also check destructors.