* cpplib.h (CPP_AT_NAME, CPP_OBJC_STRING): New token types.
[official-gcc.git] / gcc / cp / ChangeLog
blob8776631ee270b41528c4340e8e67bd5a5215886a
1 2003-07-04  Zack Weinberg  <zack@codesourcery.com>
3         * parser.c (cp_lexer_read_token): No need to handle string
4         constant concatenation.
6 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8         * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
9         (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
10         ATTRIBUTE_GCC_CXXDIAG.
12 2003-07-03  Mark Mitchell  <mark@codesourcery.com>
14         * call.c (build_addr_func): Handle bound pointers-to-members.
15         (build_method_call): Do not call resolve_offset_ref.
16         (implicit_conversion): Likewise.
17         (resolve_scoped_fn_name): Use finish_non_static_data_member, not
18         resolve_offset_ref.
19         (resolve_args): Do not call resolve_offset_ref.
20         (build_conditional_expr): Likewise.
21         (build_new_method_call): Likewise.
22         * cp-tree.def (OFFSET_REF): Update documentation.
23         (cp_convert_to_pointer): Update handling of conversions from
24         pointers to members to pointers.
25         (ocp_convert): Do not call resolve_offset_ref.
26         (convert_to_void): Likewise.
27         (build_expr_type_conversion): Likewise.
28         (delete_sanity): Likewise.
29         (resolve_offset_ref): Simplify greatly.
30         (build_vec_delete): Do not call resolve_offset_ref.
31         * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
32         if appropriate.
33         (cp_parser_unary_expression): Use
34         cp_parser_simple_cast_expression.
35         (cp_parser_delete_expression): Likewise.
36         (cp_parser_cast_expression): Likewise.
37         (cp_parser_pm_expression): Use cp_parser_binary_op.
38         (cp_parser_simple_cast_expression): New function.
39         * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
40         * semantics.c (finish_increment_expr): Likewise.
41         (finish_typeof): Likewise.
42         * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
43         * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
44         (decay_conversion): Do not call resolve_offset_ref.
45         (finish_class_member_access_expr): Likewise.
46         (convert_arguments): Likewise.
47         (build_x_binary_op): Handle DOTSTAR_EXPR.
48         (condition_conversion): Do not call resolve_offset_ref.
49         (unary_complex_lvalue): Likewise.
50         (build_static_cast): Likewise.
51         (build_reinterpret_cast): Likewise.
52         (build_const_cast): Likewise.
53         (build_c_cast): Likewise.
54         (build_modify_expr): Likewise.
55         (convert_for_assignment): Likewise.
56         (convert_for_initialization): Likewise.
57         * typeck2.c (build_x_arrow): Likewise.
58         (build_m_component_ref): Simplify.
60         * call.c (build_scoped_method_call): Use convert_to_void.
61         (build_method_call): Likewise.
62         * class.c (check_field_decls): Remove dead code.
63         * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
64         * decl2.c (grok_array_decl): Remove dead code.
65         (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
66         as pointer-to-member representation.
67         * init.c (build_offset_ref): Tidy.
68         (build_vec_delete_1): Use convert_to_void.
69         * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
70         as pointer-to-member representation.
72 2003-07-03  Nathan Sidwell  <nathan@codesourcery.com>
74         PR c++/9162
75         * decl.c (grokdeclarator): Return friend decls, not
76         void_type_node.
77         * decl2.c (grokfield): Alter friend decl check.
78         * parser.c (struct cp_parser): Document default_arg chain on
79         unparsed_functions_queue.
80         (cp_parser_save_default_args): New.
81         (cp_parser_init_declarator, cp_parser_function_definition,
82         cp_parser_member_declaration): Call it.
83         (cp_parser_class_specifier): Remove unused variable. Alter
84         processing of unparsed_functions_queue.
86 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
88         * class.c (add_method, check_field_decl): Fix format specifier.
89         * decl.c (duplicate_decls, pushdecl, check_goto,
90         fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
91         start_enum): Likewise.
92         * decl2.c (ambiguous_decl): Likewise.
93         * pt.c (redeclare_class_template): Likewise.
95 2003-07-02  Nathan Sidwell  <nathan@codesourcery.com>
97         PR c++/10219
98         * pt.c (type_unification_real): Don't unify exprs of error type.
99         * tree.c (error_type): Don't die on error_type.
101         PR c++/9779
102         * decl2.c (arg_assoc_class): Don't die on NULL type.
103         * typeck.c (type_unknown_p): Don't die on untyped expressions.
105 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
107         PR c++/6949
108         * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
109         classes.
111 2003-07-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
113         * error.c (locate_error): %P takes an `int', not a `tree'.
115 Wed Jul  2 00:36:48 CEST 2003  Jan Hubicka  <jh@suse.cz>
117         * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
118         (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
119         clear DECL_DEFER_OUTPUT once function is processed; avoid flags
120         massaging.
122         * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
123         (expand_or_defer_fn): Declare.
124         (lower_function): Declare.
125         * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
126         * decl2.c: Include cgraph.h and varpool.h
127         (maybe_emit_vtables):  Make explicit instantations as needed.
128         (mark_member_pointers, lower_function): New functions.
129         (finish_file): Do unit-at-a-time.
130         * method.c (synthesize_method): Use expand_or_defer_fn.
131         * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
132         * parser.c (cp_parser_function_definition_after_decl): Use
133         expand_or_defer_fn.
134         * pt.c (instantiate_decl): Likewise.
135         * semantics.c: Include cgraph.h
136         (expand_or_defer_fn): Break out from ...
137         (expand_body): ... here; deal with unit-at-a-time.
138         * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
139         LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
141 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
143         * call.c (resolve_scoped_fn_name): Return error_mark_node for
144         erroneous cases.
146 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
148         PR c++/11149
149         * call.c (resolve_scoped_fn_name): Check that the qualifying scope
150         is a class type.
152 2003-07-01  Giovanni Bajo  <giovannibajo@libero.it>
154         PR c++/8046
155         * error.c (dump_decl): Handle BIT_NOT_EXPR as
156         pseudo destructor calls.
158 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
160         * cp-tree.h (define_label): Replace filename and lineno
161         arguments with a location_t.
162         * decl.c (pop_label): Adjust define_label call.
163         (define_label): Replace filename and lineno arguments with a
164         location_t.
165         * semantics.c (finish_label): Adjust define_label call.
167 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
169         PR c++/9559
170         * decl2.c (grokfield): Do not build NOP_EXPRs around the
171         error_mark_node.
173 2003-06-30  Neil Booth  <neil@daikokuya.co.uk>
175         * Make-lang.in: Update.
176         * cp-lang.c (c_language): Define.
177         (LANG_HOOKS_INIT_OPTIONS): Use common hook.
178         * cp-tree.h (cxx_init_options): Remove.
179         * lex.c: Don't include diagnostic.h.
180         (cxx_init_options): Remove.
182 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
184         PR c++/4933
185         * error.c (dump_expr): Support correctly the COMPOUND_EXPR
186         tree generated within a template. Use dump_expr to dump an
187         expression sizeof.
189 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
191         * mangle.c (write_expression): Exit gracefully when trying to
192         mangle a CALL_EXPR.
194 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
196         PR c++/10750
197         * parser.c (cp_parser_primary_expression): A VAR_DECL with a
198         (value- or type-) dependent expression as DECL_INITIAL is a
199         valid constant-expression (at parser time).
201 2003-06-30  Giovanni Bajo <giovannibajo@libero.it>
203         PR c++/11106
204         * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
205         USING_DECL, instead of print_tree_identifier.
207 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
209         * cp-tree.h (language_to_string): Adjust declaration.
210         * dump.c (cp_dump_tree): Adjust usage.
211         * error.c (dump_char): Use output_formatted_scalar. Tidy.
212         (parm_to_string): Lose unused parameter.  Tidy.
213         (expr_to_string): Likewise.
214         (code_to_string): Likewise.
215         (language_to_string): Likewise.
216         (op_to_string): Likewise.
217         (assop_to_string): Likewise.
218         (digit_buffer): Remove.
219         (dump_type): Format builtin vector type as __vector__.
221 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
223         * error.c (print_integer): Remove.
224         (dump_type_suffix): Adjust.
225         (dump_expr): Likewise.
227 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
229         * error.c (print_instantiation_partial_context): Take a
230         location_t.
231         (print_instantiation_full_context): Adjust.
232         (print_instantiation_context): Adjust.
234         * cp-tree.h (cp_line_of, cp_file_of): Remove.
235         * error.c (cp_line_of, cp_file_of): Merge into ...
236         (location_of): ... here. Make static, return a location_t.
237         (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
239 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
241         PR c++/10784
242         * call.c (joust): Move warn_conversion check outwards.
244 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
246         * decl.c (build_typename_type)
247         * mangle.c (write_template_template_arg)
248         * parser.c (cp_parser_scope_through_which_access_occurs)
249         * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
250         * repo.c (get_base_filename)
251         * semantics.c (maybe_convert_cond):
252         Mark the definition static, matching the forward declaration.
254 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
256         PR c++/10468
257         * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
259 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
261         PR c++/10796
262         * decl.c (finish_enum): Implement DR377.
264         * decl.c (cp_finish_decl): Don't make variables with reference
265         type readonly while they are being initialized.
267 2003-06-26  Mark Mitchell  <mark@codesourcery.com>
269         PR c++/11332
270         * typeck.c (build_static_cast): Avoid returning expressions with
271         reference type.
273 2003-06-26  Nathan Sidwell  <nathan@codesourcery.com>
275         * call.c (build_op_delete_call): Use strip_array_call. Correct
276         error message to say 'delete' or 'delete[]'.
278 2003-06-26  Giovanni Bajo  <giovannibajo@libero.it>
280         PR c++/8266
281         * pt.c (check_explicit_specialization): When looking up a
282         template function from an identifier outside class-scope, bind
283         it to CP_DECL_CONTEXT.
285 2003-06-25  Mark Mitchell  <mark@codesourcery.com>
287         PR c++/10990
288         * search.c (lookup_base_r): Rely on accessible_p, rather than
289         trying to emulate that logic here.
291         PR c++/10931
292         * call.c (convert_like): Pass issue_conversion_warnings.
293         (convert_like_with_context): Likewise.
294         (convert_like_real): Add issue_conversion_warnings parameter.
295         (perform_direct_initialization_if_possible): New function.
296         * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
297         * typeck.c (check_for_casting_away_constness): New function.
298         (build_static_cast): Rewrite.
300 2003-06-24  Nathan Sidwell  <nathan@codesourcery.com>
302         * call.c (enforce_access): Assert we get a binfo.
303         (build_op_delete_call): Pass a binfo to
304         perform_or_defer_access_check.
305         * class.c (alter_access): Likewise.
306         * decl.c (make_typename_type): Likewise.
307         (make_unbound_class_template): Likewise.
308         * lex.c (do_identifier): Likewise.
309         * method.c (hack_identifier): Likewise.
310         * parser.c (cp_parser_lookup_name): Likewise.
311         * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
312         test.
313         * semantics.c (finish_non_static_data_member): Likewise.
314         (perform_or_defer_access_check): Expect a binfo.
315         * typeck.c (comptypes): Expect types.
317         * mangle.c (find_substitution): Don't pass a non-type to same_type_p
318         * friend.c (make_friend_class): Likewise.
319         * pt.c (check_default_tmpl_args): Likewise.
320         (lookup_template_class): Likewise.
322 Tue Jun 24 15:30:05 CEST 2003  Jan Hubicka  <jh@suse.cz>
324         * method.c (thunk_labelno): Move outside ifdef block to make garbage
325         collector happy.
327 Tue Jun 24 13:52:34 CEST 2003  Jan Hubicka  <jh@suse.cz>
329         * class.c (build_vtable): Make vtables.
330         * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
331         * decl2.c (output_vtable_inherit): Rename to ...
332         (prepare_assemble_variable): ... this one; change interface.
333         (maybe_emit_vtables): Do not call output_vtable_inherit.
334         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
335         * cp-tree.h (prepare_assemble_variable): New.
337 2003-06-23  Andrew Pinski <pinskia@physics.uc.edu>
339         * method.c: add prototype for make_alias_for_thunk.
340         (thunk_labelno, make_alias_for_thunk): only define
341         if ASM_OUTPUT_DEF is defined.
343 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
345         * method.c (thunk_labelno): New variable.
346         (make_alias_for_thunk): New function.
347         (use_thunk): Use it if defined ASM_OUTPUT_DEF.  Put the thunk
348         into the same section as the function it is calling.
349         Include gt-cp-method.h.
350         * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
351         (cp/method.o): Depend on gt-cp-method.h.
352         * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
354 Mon Jun 23 19:41:27 CEST 2003  Jan Hubicka  <jh@suse.cz>
356         * decl.c (register_dtor_fn): Mark cleanup as used.
357         * decl2.c (mark_vtable_entries): Skip nops.
358         * rtti.c (get_tinfo_ptr): Mark tinfo as used.
359         (build_dynamic_cast_1): Likewise.
360         (tinfo_base_init): Likewise.
361         (emit_tinfo_decl): Likewise.
363 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
365         * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
366         to it.
368 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
370         PR c++/10784
371         * call.c (joust): Warn about choosing conversion sequence only if
372         -Wconversion.
374 2003-06-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
376         PR c++/10864
377         * call.c (op_error): Tidy.
378         * error.c (dump_expr): Properly format 'T()' when T is an
379         aggregate type.
381 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
383         PR c++/10915
384         * decl.c (grok_op_properties): Warn possible confusing conversion
385         only if -Wconversion.
387 2003-06-20  Mark Mitchell  <mark@codesourcery.com>
389         PR c++/10749
390         * parser.c (cp_parser_class_head): See through dependent names
391         when parsing a class-head.
393         PR c++/10845
394         * pt.c (try_class_unification): Correct handling of member class
395         templates.
397 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
399         * semantics.c (genrtl_finish_function): Adjust
400         expand_function_end call.
402 2003-06-19  Mark Mitchell  <mark@codesourcery.com>
404         PR c++/10939
405         * pt.c (tsubst_decl): Do not try to substitute into non-dependent
406         functions.
407         (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
409         PR c++/9649
410         * cp-tree.h (pushdecl_class_level): Change prototype.
411         (push_class_level_binding): Likewise.
412         * decl.c (add_binding): Reject duplicate static data members.
413         (pushdecl_class_level): Return a value indicating whether or not
414         the binding was valid.
415         (push_class_level_binding): Likewise.
416         * semantics.c (finish_member_declaration): Don't keep invalid
417         declarations.
419         PR c++/11041
420         * call.c (initialize_reference): Do not use cp_finish_decl to emit
421         temporary variables.
422         * cp-tree.h (static_aggregates): Declare.
423         (pushdecl_top_level_and_finish): Likewise.
424         * decl.c (pushdecl_top_level_1): New function.
425         (pushdecl_top_level): Use it.
426         (pushdecl_top_level_and_finish): New function.
427         (initialize_local_var): Remove redundant code.
428         (cp_finish_decl): Remove support for RESULT_DECLs.  Don't check
429         building_stmt_tree.
430         * decl.h (static_aggregates): Remove.
431         * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
432         * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
433         (tinfo_base_init): Likewise.
435 2003-06-19  Matt Austern  <austern@apple.com>
437         PR c++/11228
438         * init.c (build_zero_init): Assert that number of array elements
439         is an integer constant.
440         (build_default_init) Don't use build_zero_init for arrays with
441         variable number of elements.
443 2003-06-19  Andreas Jaeger  <aj@suse.de>
445         * cp-tree.h: Remove duplicated declarations.
447 2003-06-18  Nathanael Nerode  <neroden@gcc.gnu.org>
449         * pt.c: Convert to ISO C.
450         * semantics.c: Convert to ISO C.
452 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
454         * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
455         at_least_as_qualified_p, more_qualified_p): Return bool.
456         * typeck.c: ANSIFY function definitions.
457         (comp_array_types): Take redeclaration bool parameter.
458         (comptypes): Rearrange STRICT handling.
459         (at_least_as_qualified_p, more_qualified_p,
460         comp_cv_qualification): Cache cv quals.
461         (compparms): Rearrange loop.
463 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
465         * cp-tree.h (COMPARE_RELAXED): Rename to ...
466         (COMPARE_DERIVED): ... here. Adjust comment.
467         (resolve_typename_type_in_current_instantiation): Remove.
468         (cp_tree_equal, comptypes): Return a bool.
469         * cvt.c (convert_to_reference): Adjust comptypes call.
470         * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
471         (resolve_typename_type_in_current_instantiation): Remove.
472         * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
473         IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
474         calls. Refactor code.
475         * typeck.c (comp_array_types): Return bool. Lose callback.
476         parameter. Adjust cp_tree_equal calls.
477         (comptypes): Return bool. Adjust strict handling. Remove relaxed
478         enumeration and java type handling. Deal with typename types here.
479         Adjust recursive and cp_tree_equals calls. Adjust base and derived
480         checking.
481         (comp_target_types): Remove unreachable code. Adjust
482         same_or_base_type_p calls.
483         (ptr_reasonably_similar): Adjust base and derived check.
485         * typeck.c (maybe_warn_about_returning_address_of_local): Remove
486         unused calculation.
487         (check_return_expr): Adjust error messages.
488         * cp-tree.def (SCOPE_REF): Correct comment.
490 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
492         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
493         string again.
495 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
497         * optimize.c (dump_function): Form complete flag name by
498         prefixing 'fdump-' to string returned by dump_flag_name().
500 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
502         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
503         string.
505 2003-06-17  Jason Merrill  <jason@redhat.com>
507         PR c++/10929
508         * decl.c (grokfndecl): Don't mark a function inline for
509         -finline-functions if it isn't defined.
511 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
513         PR c++/10712
514         * class.c (handle_using_decl): Robustify.
516         PR c++/11105
517         * cp-tree.h (DECL_CONV_FN_TYPE): New method.
518         * mangle.c (struct globals): Remove internal_mangling_p.
519         (write_unqualified_name): Use DECL_CONV_FN_TYPE.
520         (write_template_parm): Don't write out the level number.
521         (conv_type_names): New variable.
522         (hash_type): New function.
523         (compare_type): Likewise.
524         (mangle_conv_op_name_for_type): Don't try to mangle conversion
525         operator names.
526         * search.c (lookup_conversion_operator): New function.
527         (lookup_fnfields_1): Use it.
529 2003-06-17  Andreas Jaeger  <aj@suse.de>
531         * except.c: Remove duplicate declaration of push_eh_cleanup.
533         * call.c: Remove extra declaration of inhibit_warnings.
535 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
537         2003-06-16  Jens-Michael Hoffmann  <jensmh@gmx.de>
538         * mangle.c: Convert to ISO C.
540 2003-06-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
542         * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
543         macro.
545 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
547         * tree.c: Convert to ISO C.
549 2003-06-16  Kazu Hirata  <kazu@cs.umass.edu>
551         * cp-tree.h: Follow spelling conventions.
552         * mangle.c: Likewise.
553         * method.c: Likewise.
554         * parser.c: Likewise.
556 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
558         * decl.c (start_function): Adjust init_function_start call.
559         * method.c (use_thunk): Likewise.
560         * semantics.c (genrtl_start_function): Likewise.
562 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
564         * Make-lang.in: Remove c-options.o.
566 2003-06-13  Nathanael Nerode  <neroden@gcc.gnu.org>
568         * lex.c: Convert to ISO C.
570         2003-05-19  Jens-Michael Hoffmann  <jensmh@gmx.de>
571         * init.c: removes use of PARAMS macro.  Use ISO style function
572         declarations.  (Not copyright-significant change.)
574         * rtti.c: Remove PARAMS.
576         * typeck2.c: Convert to ISO C.
578 2003-06-12  Mark Mitchell  <mark@codesourcery.com>
580         PR c++/10635
581         * typeck.c (build_c_cast): Check that the destination type is
582         complete.
584 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
586         PR c++/10432
587         * cp-tree.h (finish_declarator): Remove.
588         * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
589         erroneous declarations.
590         * semantics.c (finish_declarator): Remove.
592 2003-06-11  Roger Sayle  <roger@eyesopen.com>
594         * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
595         global static constructor/destructor if it will be empty, i.e.
596         either doesn't call any ctors/dtors or only calls pure or const
597         ctors/dtors.
599 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
601         * mangle.c (tm_p.h): Include it.
602         * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
604         PR c++/11131
605         * tree.c (cp_cannot_inline_fn): Check for "inline" before
606         instantiation.
608 2003-06-10  Jason Merrill  <jason@redhat.com>
610         PR c++/10968
611         * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
613 2003-06-10  Andrew Pinski  <pinskia@physics.uc.edu>
615         * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
616         (start_cleanup_cnt): New.
618 2003-06-10  Mark Mitchell  <mark@codesourcery.com>
620         PR c++/11131
621         * cp-tree.h (template_for_substitution): Declare.
622         * decl2.c (mark_used): Use it when figuring out whether or not a
623         function is inline.
624         * pt.c (template_for_substitution): Give it external linkage.
625         * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
626         possible.
628 2003-06-09  Zack Weinberg  <zack@codesourcery.com>
630         PR 8861
631         * mangle.c (write_real_cst): New function.  Implement
632         ABI-compliant mangling of floating-point literals when
633         -fabi-version>=2; provide backward compatibility with 3.3 when
634         -fabi-version=1 (with warning).  Clarify commentary.
635         (write_template_arg_literal): Use write_real_cst.
637 2003-06-07  Andreas Jaeger  <aj@suse.de>
639         * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
641 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
643         * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
644         (LANG_HOOKS_HANDLE_OPTION): Override.
645         * cp-tree.h (cxx_init_options): Update.
646         * lex.c (cxx_init_options): Update.
648 Thu Jun  5 18:33:40 CEST 2003  Jan Hubicka  <jh@suse.cz>
650         * Make-lang.in:  Add support for stageprofile and stagefeedback
652 2003-06-04  J"orn Rennecke <joern.rennecke@superh.com>
654         * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
656 2003-06-04  Andreas Jaeger  <aj@suse.de>
658         * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
660 2003-06-03  Jason Merrill  <jason@redhat.com>
662         * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
664         * cp/decl.c (reshape_init): Handle vectors.
666         * testsuite/g++.dg/init/array10.C: New.
668 2003-06-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
670         PR c++/10940
671         * pt.c (check_explicit_specialization): Check for 'static'
672         earlier.
674 2003-05-31  Diego Novillo  <dnovillo@redhat.com>
676         * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
677         the operand of a CONSTRUCTOR node.
679 2003-05-31  Gabriel Dos Reis <gdr@integrable-solutions.net>
681         * decl.c (cp_binding_level::this_entity): Rename from this_class.
682         (cxx_scope_descriptor): New function.
683         (cxx_scope_debug): Likewise.
684         (push_binding_level): Use it.
685         (pop_binding_level): Likewise.
686         (suspend_binding_level): Likewise.
687         (resume_binding_level): Likewise.
688         (pushlevel_class): Adjust use of this_class.
689         (pushtag): Likewise.
690         (lookup_name_real): Likewise.
691         (global_scope_name): New variable.
692         (initialize_predefined_identifiers): Initialize it.
693         (push_namespace): Use it.
694         (make_cxx_scope): New function.
695         (pushlevel): Use it.
696         (pushlevel_class): Likewise.
697         (push_binding_level): Simplify.  Loose the last two arguments.
698         (make_binding_level): Remove.
699         (initial_push__namespace_scope): New function.
700         (push_namespace): Use it.  Simplify.
701         (cxx_init_decl_processing): Likewise.
702         (declare_namespace_level): Remove.
704 2003-05-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
706         PR c++/10956
707         * pt.c (instantiate_decl): Don't use full template arguments if
708         we are dealing with specializations.
710 2003-05-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
712         * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
713         (binding_depth): Unconditionally define.
714         (is_class_level): Likewise.
715         (indent): Likewise.  Take an indenting parameter.
716         (push_binding_level): Remove conditional definittion.
717         (pop_binding_level): Likewise.
718         (suspend_binding_level): Likewise.
719         (resume_binding_level): Likewise.
720         (pushlevel): Likewise.
721         (pushlevel_class): Likewise.
722         (poplevel_class): Likewise.
723         (pop_everything): Likewise.
725 2003-05-27  Gabriel Dos Reis <gdr@integrable-solutions.net>
727         * name-lookup.h (global_scope_p): New macro.
728         * decl.c (pop_binding_level): Use it.  Don't refer directly to
729         global_binding_level.
730         (suspend_binding_level): Likewise.
731         (global_bindings_p): Likewise.
732         (print_other_binding_stack): Likewise.
733         (print_binding_stack): Likewise.
734         (maybe_push_to_top_level): Likewise.
735         (pushdecl_namespace_level): Likewise.
736         (cxx_init_decl_processing): Likewise.
737         (start_decl): Likewise.
738         (cp_finish_decl): Likewise.
739         (start_function): Likewise.
740         (global_binding_level): Remove.
742 2003-05-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
744         * parser.c (cp_parser_explicit_instantiation): Restore old
745         access before template instantiation.
747 2003-05-23  Geoffrey Keating  <geoffk@apple.com>
749         * lang-specs.h: Use -o to specify preprocessor's output file.
750         Make -no-integrated-cpp work when building PCH files.
752 2003-05-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
754         PR c++/10682
755         * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
756         check for implicitly created typedef to an enum.
758 2003-05-21  Jason Merrill  <jason@redhat.com>
760         * init.c (build_vec_delete): Copy the address into a temporary
761         variable before calling build_vec_delete_1.
762         * decl2.c (delete_sanity): Don't call stabilize_reference.
764 2003-05-21  Nathan Sidwell  <nathan@codesourcery.com>
766         * pt.c (register_specialization): Update the decl's location,
767         if necessary.
768         (check_explicit_specialization): Likewise.
770 2003-05-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
772         * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
774 2003-05-21  Danny Smith  <dannysmith@users.sourceforge.net>
776         PR c++/9738
777         * decl.c (duplicate_decls): Re-invoke make_decl_rtl
778         if the old decl had instantiated DECL_RTL.
779         (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
781 2003-05-19  Matt Austern  <austern@apple.com>
783         * lang-options.h: Document -Wno-invalid-offsetof
784         * typeck.c (build_class_member_access_expr): Don't complain about
785         (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
787 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
789         * name-lookup.c (free_binding_entry): fix where the GTY markers are.
790         (binding_entry_make): Make entry->chain NULL after getting an entry.
791         fix the spelling of chain in a comment.
792         (binding_table_free): speed up by having temporary variable.
793         (binding_table_new): set table->chain to be NULL after allocating
794         a table.
795         (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
796         binding->previous to NULL after getting an binding for speed.
798 2003-05-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
800         * cp-tree.h (struct lang_type_class): Replace data member tags
801         with hash-table nested_udts.
802         (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
803         * class.c (unreverse_member_declarations): Don't touch
804         CLASSTYPE_TAGS.
805         (pushclass): Use cxx_remember_type_decls.
806         * decl.c (struct cp_binding_level): Replace data member tags with
807         hash-table type_decls.
808         (pop_binding_level): Handle level->type_decls.
809         (kept_level_p): Adjust.
810         (poplevel): Remove unused local variable.
811         (bt_print_entry): New function.
812         (print_binding_level): Use it.
813         (push_namespace): Build current_binding_level->type_decls.
814         (maybe_process_template_type_declaration): Adjust.
815         (pushtag): Likewise.
816         (clear_anon_tags): Use binding_table_remove_anonymous_types.
817         (gettags): Remove.
818         (cxx_remember_type_decls):  Rename from storetags.  Adjust.
819         (lookup_tag): Use binding_table_find_anon_type.  Tidy.
820         (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
821         (cxx_init_decl_processing): Build global_binding_level->type_decls.
822         (store_parm_decls): Remove pointless code.
823         * name-lookup.c (free_binding_entry): New variable.
824         (ENTRY_INDEX): New macro.
825         (struct binding_table_s): New datatype.
826         (binding_entry_make): New function.
827         (binding_entry_free): Likewise.
828         (binding_table_construct): Likewise.
829         (binding_table_free): Likewise.
830         (binding_table_new): Likewise.
831         (binding_table_expand): Likewise.
832         (binding_table_insert): Likewise.
833         (binding_table_find): Likewise.
834         (binding_table_find_anon_type): Likewise.
835         (binding_table_reverse_maybe_remap): Likewise.
836         (binding_table_remove_anonymous_types): Likewise.
837         (binding_table_foreach): Likewise.
838         * name-lookup.h (binding_table): New type.
839         (binding_entry): Likewise.
840         (bt_foreach_proc): Likewise.
841         (struct binding_entry_s): New datatype.
842         (SCOPE_DEFAULT_HT_SIZE): New macro.
843         (CLASS_SCOPE_HT_SIZE): Likewise.
844         (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
845         (NAMESPACE_STD_HT_SIZE): Likewise.
846         (GLOBAL_SCOPE_HT_SIZE): Likewise.
847         (binding_table_new): Declare.
848         (binding_table_free): Likewise.
849         (binding_table_insert): Likewise.
850         (binding_table_find_anon_type): Likewise.
851         (binding_table_reverse_maybe_remap): Likewise.
852         (binding_table_remove_anonymous_types): Likewise.
853         (binding_table_foreach): Likewise.
854         (binding_table_find): Likewise.
855         (cxx_remember_type_decls): Likewise.
856         * pt.c (bt_instantiate_type_proc): New function.
857         (do_type_instantiation): Use it.
858         * search.c (lookup_field_r): Use binding_table_find.
860 2003-05-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
862         * semantics.c (perform_deferred_access_checks): Don't discard
863         checked access.
865 2003-05-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
867         * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
868         libiberty VA_ macros, always use stdarg.
869         * rtti.c (create_pseudo_type_info): Likewise.
870         * tree.c (build_min_nt, build_min): Likewise.
872 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
874         * ptree.c (cxx_print_type, cxx_print_xnode): Use string
875         concatentation on HOST_WIDE_INT_PRINT_* format specifier to
876         collapse multiple function calls into one.
877         * tree.c (debug_binfo): Likewise.
879 2003-05-15  Jason Merrill  <jason@redhat.com>
881         PR c++/5388
882         * call.c (conditional_conversion): Don't consider implicit
883         conversions if T2 is a base of T1.
884         * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
885         (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
887         * parser.c (cp_parser_primary_expression): Convert a static data
888         member from reference.
890 2003-05-15  Mark Mitchell  <mark@codesourcery.com>
892         * call.c (build_op_delete_call): Avoid creating unnecessary types.
893         * class.c (instantiate_type): Remove tests for tf_no_attributes.
894         * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
895         (COMPARE_NO_ATTRIBUTES): Remove.
896         * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
898         PR c++/8385
899         * semantics.c (finish_typeof): Refine type-dependency check.
901 2003-05-13  Jason Merrill  <jason@redhat.com>
903         * typeck.c (build_modify_expr): Don't always stabilize the lhs and
904         rhs.  Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
906 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
908         * method.c (synthesize_method): Call push/pop_deferring_access_checks.
910 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
912         PR c++/10230, c++/10481
913         * semantics.c (finish_non_static_data_member): Handle when the
914         non-static member is not from a base of the current class type.
916 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
918         PR c++/10552
919         * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
920         template and has dependent context.
922 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
924         * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
926 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
928         PR c++/9252
929         * cp-tree.h (saved_scope): Remove check_access field.
930         (tsubst_flags_t): Remove tf_parsing.
931         * decl.c (maybe_push_to_top_level): Don't initialize
932         scope_chain->check_access.
933         (make_typename_type, make_unbound_class_template): Don't use
934         tf_parsing.
935         (register_dtor_fn): Use push/pop_deferring_access_checks
936         instead of scope_chain->check_access.
937         * method.c (use_thunk): Likewise.
938         * parser.c (cp_parser_explicit_instantiation
939         (cp_parser_constructor_declarator_p): Don't call
940         push/pop_deferring_access_checks here.
941         (cp_parser_template_argument, cp_parser_class_name): Don't use
942         tf_parsing.
943         (yyparse): Check flag_access_control.
944         * pt.c (instantiate_class_template): Call
945         push/pop_deferring_access_checks.
946         * semantics.c (push_deferring_access_checks): Propagate
947         dk_no_check.
948         (perform_or_defer_access_check): Make sure basetype_path is
949         a type before comparison.
950         * call.c (build_op_delete_call, build_over_call): Use
951         perform_or_defer_access_check.
952         * class.c (alter_access): Likewise.
953         * init.c (build_offset_ref): Likewise.
954         * lex.c (do_identifier): Likewise.
955         * method.c (hack_identifier): Likewise.
956         * search.c (lookup_member): Likewise.
957         * semantics.c (finish_non_static_data_member): Likewise.
958         (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
959         instead of flag_access_control.
961 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
963         PR c++/9554
964         * parser.c (cp_parser_class_name): Remove check_access parameter.
965         All caller adjusted.  Update declaration.
966         (cp_parser_lookup_name): Likewise.
967         * semantics.c (push_deferring_access_checks): Change parameter type
968         to enum deferring_kind.  All caller adjusted.
969         (resume_deferring_access_checks): Adjust to use new enum.
970         (stop_deferring_access_checks): Likewise.
971         (perform_or_defer_access_check): Likewise.
972         * cp-tree.h (deferring_kind): New enum.
973         (deferred_access): Adjust field type.
974         (push_deferring_access_checks): Update declaration.
976 2003-05-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
978         PR c++/10555, c++/10576
979         * pt.c (lookup_template_class): Handle class template with
980         multiple levels of parameters when one of the levels contain
981         errors.
983 2003-05-08  Jason Merrill  <jason@redhat.com>
985         * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
986         expression.  Undo some of the recent reorg.
988 2003-05-07  Richard Henderson  <rth@redhat.com>
990         PR c++/10570
991         * cfns.gperf: Comment out POSIX thread cancellation points,
992         plus abort and raise.
993         * cfns.h: Regenerate.
995 2003-05-07  Jason Merrill  <jason@redhat.com>
997         * call.c (build_conditional_expr): Don't assume that the folded
998         expression has result_type.
1000 2003-05-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1002         * typeck.c (build_unary_op): Deal with const qualifier in
1003         invalid pointer-to-member earlier.
1005 2003-05-05  Jason Merrill  <jason@redhat.com>
1007         PR c++/9537
1008         * call.c (conditional_conversion): Build an RVALUE_CONV if
1009         we're just changing the cv-quals.
1010         (build_conditional_expr): Don't call convert to change
1011         cv-quals.
1013 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1015         PR c++/10496
1016         * typeck.c (build_unary_op): Don't output const qualifier when
1017         output invalid pointer-to-member diagnostics.
1019 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1021         * decl.c: Fix typos.
1023 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1025         PR c++/4494
1026         * decl.c (start_function): Use same_type_p to check return type
1027         of main.
1029 2003-05-03  Zack Weinberg  <zack@codesourcery.com>
1031         PR c/10604
1032         * cp/typeck.c (build_x_compound_expr): No need to check
1033         extra_warnings as well as warn_unused_value.
1035 2003-05-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1037         PR c++/9364, c++/10553, c++/10586
1038         * decl.c (make_typename_type): Don't crash on illegal code.
1040 2003-05-03  Nathan Sidwell  <nathan@codesourcery.com>
1042         * class.c (finish_struct): Use location_t and input_location
1043         directly.
1044         * decl.c (make_label_decl): Likewise.
1045         (use_label): Likewise.
1046         * decl2.c (warn_if_unknown_interface): Likewise.
1047         (start_static_initialization_or_destruction): Likewise.
1048         (generate_ctor_or_dtor_function): Likewise.
1049         (finish_file): Likewise.
1050         * error.c (print_instantiation_full_context): Likewise.
1051         * init.c (create_temporary_var): Likewise.
1052         * method.c (synthesize_method): Likewise.
1053         * parser.c (cp_token): Likewise.
1054         (cp_lexer_set_source_position_from_token): Likewise.
1055         (cp_lexer_get_preprocessor_token): Likewise.
1056         (cp_parser_statement): Likewise.
1057         * pt.c (tsubst_friend_function): Likewise.
1058         (instantiate_class_template): Likewise.
1059         (tsubst_decl): Likewise.
1060         (tsubst): Likewise.
1061         (instantiate_decl): Likewise.
1062         * semantics.c (begin_class_definition): Likewise.
1063         (expand_body): Likewise.
1065 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
1067         * class.c (finish_struct): Rename lineno to input_line.
1068         * decl.c (push_binding_level, pop_binding_level,
1069         suspend_binding_level, resume_binding_level, make_label_decl,
1070         use_label, start_function): Likewise.
1071         * decl2.c (warn_if_unknown_interface,
1072         start_static_initialization_or_destruction,
1073         generate_ctor_or_dtor_function, finish_file): Likewise.
1074         * error.c (cp_line_of, print_instantiation_full_context,
1075         print_instantiation_context): Likewise.
1076         * except.c (check_handlers_1, check_handlers): Likewise.
1077         * init.c (create_temporary_var): Likewise.
1078         * method.c (use_thunk, synthesize_method): Likewise.
1079         * parser.c (cp_lexer_set_source_position_from_token,
1080         cp_lexer_get_preprocessor_token): Likewise.
1081         * pt.c (push_tinst_level, pop_tinst_level,
1082         tsubst_friend_function, instantiate_class_template, tsubst_decl,
1083         tsubst, tsubst_expr, instantiate_decl): Likewise.
1084         * semantics.c (genrtl_try_block, finish_label_stmt,
1085         begin_class_definition, expand_body,
1086         genrtl_finish_function): Likewise.
1087         * tree.c (build_min_nt, build_min): Likewise.
1089 2003-05-01  Mark Mitchell  <mark@codesourcery.com>
1091         * decl2.c (comdat_linkage): Don't externalize explicit
1092         instantiations.
1094 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1096         PR c++/10554
1097         * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
1098         is not NULL.
1100 2003-05-01  Steven Bosscher  <steven@gcc.gnu.org>
1102         * cp-tree.h (struct lang_id2): Remove.  Move fields from here...
1103         (struct lang_identifier): ... to here.
1104         (LANG_ID_FIELD): Remove.
1105         (SET_LANG_ID): Remove.
1106         (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
1107         (SET_IDENTIFIER_LABEL_VALUE): Likewise.
1108         (IDENTIFIER_IMPLICIT_DECL): Likewise.
1109         (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
1110         (IDENTIFIER_ERROR_LOCUS): Likewise.
1111         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
1113 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1115         PR c++/8772
1116         * pt.c (convert_template_argument): Correct diagnostic.
1118 2003-04-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1120         PR c++/9432, c++/9528
1121         * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
1123 2003-04-30  Garbiel Dos Reis  <gcc@integrable-solutions.net>
1125         * decl.c (check_previous_goto_1): Adjust prototype.
1126         (check_previous_goto): Adjust use.
1127         (check_switch_goto): Likewise.
1128         (use_label): Adjust.
1129         (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
1130         (struct named_label_use_list): Use location_t datatype.
1132 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
1134         PR c++/10551
1135         * pt.c (mark_decl_instantiated): Defer all explicit instantiations
1136         that have not yet been written out.
1138 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
1140         PR c++/10549
1141         * class.c (layout_class_type): Mark overlong bitfields as having
1142         the maximum size permitted by their type, after layout.
1144         PR c++/10527
1145         * error.c (dump_expr): Correctly handling of NEW_EXPR.4
1147 2003-04-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1149         * call.c (build_operator_new_call): Fix typo.
1150         * lang-options.h: Likewise.
1152 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
1154         PR c++/10515
1155         * cp-tree.h (lookup_field_1): Declare it.
1156         * search.c (lookup_field_1): Make it public.
1157         * decl.c (reshape_init): Handle designated initializers.
1159         * decl.c (maybe_commonize_var): Further tweak support for systems
1160         without weak symbols.
1162 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
1164         * decl.c (maybe_commonize_var): Fix thinko in last patch.
1166 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
1168         PR c++/10506
1169         * method.c (use_thunk): Decrement immediate_size_expand.
1171         PR c++/10503
1172         * cp-tree.h (DECL_VAR_MARKED_P): New macro.
1173         (DECL_MAYBE_TEMPLATE): Remove.
1174         * class.c (fixed_type_or_null): Avoid infinite recursion.
1176         * decl.c (maybe_commonize_var): Make the code match the comments.
1177         * pt.c (instantiate_decl): Move call to import_export_decl.
1179 2003-04-26  Mark Mitchell  <mark@codesourcery.com>
1181         * decl2.c (finish_file): Fix merge botch.
1183 2003-04-25  Mark Mitchell  <mark@codesourcery.com>
1185         * decl2.c (finish_file): Don't call import_export_decl for
1186         functions that are not defined.
1187         (handle_class_head): Robustify.
1188         * pt.c (instantiate_decl): Do not call cp_finish_decl for
1189         variables that are not defined.
1191 2003-04-24  Sylvain Pion  <Sylvain.Pion@mpi-sb.mpg.de>
1193         * call.c (print_z_candidates): Fix off by one error.
1195 2003-04-24  Nathan Sidwell  <nathan@codesourcery.com>
1197         PR c++/10337
1198         * call.c (joust): Don't warn about conversion ops that are exact
1199         or cv-conversions. Rearrange to avoid multiple type comparisons.
1201 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
1203         PR c++/10471
1204         * call.c (build_cxx_call): Robustify.
1206 2003-04-23  Neil Booth  <neil@daikokuya.co.uk>
1208         * Make-lang.in (lex.o): Remove mbchar.h.
1209         * lex.c (MULTIBYTE_CHARS): Lose.
1210         * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
1211         in c-lex.c.
1213 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
1215         PR c++/9847
1216         * cp-tree.h (duplicate_tag_error): Remove.
1217         * class.c (duplicate_tag_error): Remove.
1218         * semantics.c (begin_class_definition): Return immediately for a
1219         duplicate class definition.
1221         PR c++/10451
1222         * decl.c (grokdeclarator): Correct logic for "mutable" errors.
1224 2003-04-22  Mark Mitchell  <mark@codesourcery.com>
1226         PR c++/10446
1227         * search.c (lookup_fnfields_1): Handle empty slots in the method
1228         vector.
1230         PR c++/10428
1231         * decl.c (check_elaborated_type_specifier): New function, split
1232         out from ...
1233         (xref_tag): ... here.  Use the new function in more places.
1235         * rtti.c (throw_bad_typeid): Use build_cxx_call.
1237 2003-04-21  Mark Mitchell  <mark@codesourcery.com>
1239         * call.c (build_over_call): Use build_cxx_call.
1240         (build_cxx_call): New method, split out of build_over_call.
1241         * cp-tree.h (language_function): Add can_throw.
1242         (build_cxx_call): Declare it.
1243         * decl.c (finish_function): If a function does not contain any
1244         calls to functions that can throw an exception, indicate that
1245         fact.
1246         * decl2.c (mark_used): Do not defer the instantiation of
1247         functions, if the current function does not throw.
1248         * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
1249         * pt.c (instantiate_decl): Make sure import_export_decl is called
1250         before emitting things.
1251         * rtti.c (throw_bad_cast): Use build_cxx_call.
1252         (build_dynamic_cast_1): Likewise.
1253         * typeck.c (build_function_call): Likewise.
1255 2003-04-21  Nathan Sidwell  <nathan@codesourcery.com>
1257         PR c++/9881
1258         * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
1259         expressions. Reverts my 2002-08-08 patch.
1261         * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
1262         cheaper early exit.
1264 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
1266         * cp/decl2.c (start_static_storage_duration_function): Take count
1267         arg, don't check if it wraps round.
1268         (generate_ctor_or_dtor_function): Add locus arg, use it.
1269         (generate_ctor_and_dtor_functions_for_priority): Data arg is a
1270         locus.
1271         (finish_file): Set line numbers to past EOF for synthesized
1272         functions.
1274 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
1276         PR c++/10405
1277         * search.c (lookup_field_1): Final scan goes backwards for
1278         types, forwards for non-types.
1280 2003-04-17  Roger Sayle  <roger@eyesopen.com>
1282         PR c/10375
1283         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
1284         "nothrow" function attributes.
1286 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1288         PR c++/10347
1289         * pt.c (type_dependent_expression_p): Handle array new.
1291 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
1293         PR c++/10381
1294         * parser.c (cp_parser_primary_expression): Reorganize logic for
1295         dealing with name lookup failures.
1297 2003-04-15  Jason Merrill  <jason@redhat.com>
1299         * decl2.c (mark_used): Don't instantiate anything if
1300         skip_evaluation.
1302 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
1304         * tree.c (build_cplus_array_type_1): Do not call
1305         uses_template_parms() on a NULL index_type.
1307 2003-04-13  Roger Sayle  <roger@eyesopen.com>
1309         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
1311 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
1313         PR c++/10300
1314         * init.c (build_new_1): Reorganize.
1316 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
1318         * class.c (initialize_array)
1319         * decl.c (reshape_init)
1320         * decl2.c (build_expr_from_tree)
1321         * init.c (build_zero_init)
1322         * pt.c (tsubst_copy, tsubst_copy_and_build)
1323         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
1324         (ptm_initializer, class_initializer, get_pseudo_ti_init)
1325         * semantics.c (finish_compound_literal)
1326         * typeck.c (build_ptrmemfunc1)
1327         * typeck2.c (store_init_value, process_init_constructor)
1328         (build_functional_cast): Use build_constructor.
1330 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
1332         * call.c (print_z_candidates): Use gcc_gettext_width, not
1333         strlen, to determine how much padding to use.
1335 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
1337         * decl.c: Update all calls to shadow_warning.
1339 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
1341         * class.c (layout_class_type): Correct handling for overlong
1342         bit-fields whose width is the same as an integer type.
1344 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
1346         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
1347         * cp-lang.c (cp_tree_size): New function.
1348         (LANG_HOOKS_TREE_SIZE): Override.
1350         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
1351         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
1352         (union lang_tree_node): Remove common and srcloc members.
1353         (build_srcloc_here): Don't prototype.
1354         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
1355         * pt.c (pending_templates): Correct comment.
1356         * tree.c (build_srcloc, build_srcloc_here): Kill.
1358 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
1360         * call.c: Include intl.h.
1361         (print_z_candidate): Always use inform; get rid of errfn
1362         argument. Reorganize so that all the strings get picked up
1363         by xgettext.  Note obligation of caller to pass first argument
1364         through gettext.
1365         (print_z_candidates): Update to match.  Indent second and
1366         successive candidates by strlen() of translated message.
1367         (joust): Restructure ambiguous-conversion pedwarn so that
1368         translators see a complete sentence.  Update calls to
1369         print_z_candidate.
1371         * Make-lang.in (cp/call.o): Update dependencies.
1373 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1375         * decl.c (set_current_binding_level): Delete, revert last change.
1376         (current_binding_level): Modify to allow it as as lvalue.
1378 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1380         * name-lookup.c (find_binding): Pass appropriate pointer type to
1381         POP_TIMEVAR_AND_RETURN.
1383 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1385         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
1386         * cp-tree.h: Don't insist on having GNUC.
1388 2003-04-03  Jason Merrill  <jason@redhat.com>
1390         * cvt.c (ocp_convert): Only abort if we try to convert an object
1391         of TREE_ADDRESSABLE type.
1393         * class.c (build_vtable): Set DECL_ALIGN here.
1394         (get_vtable_decl): Not here.
1395         (layout_vtable_decl): Or here.
1396         (create_vtable_ptr): Or here.
1397         (layout_class_type): Or here.
1398         (check_bitfield_decl): Don't mess with field alignment.
1400 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1402         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
1403         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
1404         * rtti.c (dfs_class_hint_mark): Likewise.
1406         * decl.c (push_local_name, push_class_level_binding,
1407         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
1408         functions returning void.
1409         * decl2.c (add_using_namespace): Likewise.
1411         * decl.c (print_binding_level, print_other_binding_stack,
1412         print_binding_stack): Cast argument of %p specifier to void*.
1413         * ptree.c (cxx_print_decl): Likewise.
1415         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
1416         VAR_FUNCTION_OR_PARM_DECL_CHECK,
1417         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
1418         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
1419         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
1421         * decl.c (set_current_binding_level): New macro.  Use throughout
1422         when setting the current binding level.
1424         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
1425         in enum.
1426         * method.c (mangling_flags): Likewise.
1428         * cp-tree.h (lang_type_header): Add __extension__ and use
1429         CHAR_BITFIELD for members.
1431 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
1433         PR other/9274
1434         * mangle.c: Include gt-cp-mangle.h.
1435         (subst_identifiers): Mark with GTY.
1436         * config-lang.in (gtfiles): Add cp/mangle.c.
1437         * Make-lang.in: (gt-cp-mangle.h): New rule.
1438         (cp/mangle.o): Depends on gt-cp-mangle.h.
1440 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
1442         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
1443         after \$(srcdir)/cp/name-lookup.h.
1444         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
1445         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
1446         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
1447         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
1449 2003-03-31  Jason Merrill  <jason@redhat.com>
1451         PR java/10145
1452         * class.c (check_field_decl): Don't set DECL_ALIGN.
1454 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
1456         PR c++/7647
1457         * decl.c (grokdeclarator): Tidy, slightly.
1458         * search.c (lookup_field_1): Add want_type parameter.
1459         (lookup_field_r): Adjust call to lookup_field_1.
1461 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1463         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
1465 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
1467         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
1468         prototype.
1469         (cxx_scope_find_binding_for_name): Likewise.
1470         * decl.c (find_binding: Move to name-lookup.c.
1471         (binding_for_name): Likewise.
1472         (cxx_scope_find_binding_for_name): Likewise.
1473         (BINDING_LEVEL):  Remove.
1474         (push_binding): Tidy.
1475         (push_class_binding): Likewise.
1476         (pop_binding): Likewise.
1477         (poplevel): Likewise.
1478         (poplevel_class): Likewise.
1479         (set_identifier_type_value_with_scope): Likewise.
1480         (push_overloaded_decl): Likewise.
1481         (lookup_tag): Likewise.
1482         (unqualified_namespace_lookup): Likewise.
1483         (lookup_name_current_level): Likewise.
1484         (maybe_inject_for_scope_var): Likewise.
1485         (namespace_binding): Move to name-lookup.c.
1486         (set_namespace_binding): Likewise.
1487         * decl2.c (lookup_using_namespace): Tidy.
1488         (qualified_lookup_using_namespace): Likewise.
1489         (do_toplevel_using_decl): Likewise.
1490         * name-lookup.c: Include "timevar.h"
1491         * name-lookup.h (cxx_scope):  Declare.
1492         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
1493         member declaration.
1494         (BINDING_SCOPE): Adjust definition.
1495         (BINDING_HAS_LEVEL_P): Remove.
1497 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1499         * name-lookup.c: New file.
1500         * name-lookup.h: Likewise..
1501         * decl.c (push_binding): Adjust use cxx_binding_make.
1502         (free_bindings): Move to name-lookup.c
1503         (pop_binding): Use cxx_binding_free.
1504         (binding_for_name): Tidy.
1505         * cp-tree.h: Include "name-lookup.h"
1506         (cxx_binding_make): Move to name-lookup.h
1507         (cxx_binding_clear): Likewise.
1508         (struct cxx_binding): Likewise.
1509         (LOCAL_BINDING_P): Likewise.
1510         (INHERITED_VALUE_BINDING_P): Likewise.
1511         (BINDING_SCOPE): Likewise.
1512         (BINDING_HAS_LEVEL_P): Likewise.
1513         (BINDING_VALUE): Likewise.
1514         (BINDING_TYPE): Likewise.
1515         * config-lang.in (gtfiles): Add cp/name-lookup.h
1516         * Make-lang.in (cp/name-lookup.o): New rule.
1517         (CXX_OBJS): Add cp/name-lookup.o
1518         (CXX_TREE_H): Add cp/name-lookup.h
1520 2003-03-28  Jason Merrill  <jason@redhat.com>
1522         PR c++/10245
1523         * cvt.c (force_rvalue): New fn.
1524         * call.c (build_conditional_expr): Use it.
1525         * cp-tree.h: Declare it.
1527 2003-03-28  Mike Stump  <mrs@apple.com>
1529         * error.c (dump_expr): Add 0x to printed hex numbers to make
1530         output match source code better.
1532 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
1534         PR c++/10218
1535         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
1536         definitions.
1538         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
1539         non-existant ssdf_decls array.
1540         (finish_file): Call generator_ctor_or_dtor_function when there are
1541         static constructors or destructors and no other static
1542         initializations.
1544 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
1546         PR c++/10047
1547         * decl2.c (finish_file): Don't warn about explicitly instantiated
1548         inline decls.
1550 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
1552         PR c++/10224
1553         * pt.c (lookup_template_class): Only check instantiated args if
1554         they do not contain template parameters.
1556 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
1558         PR c++/10158
1559         * parser.c (cp_parser_function_definition): Set
1560         DECL_INITIALIZED_IN_CLASS for members.
1561         * pt.c (instantiate_decl): Only reduce the template args for
1562         friends that are not defined in class.
1564 2003-03-25  Jason Merrill  <jason@redhat.com>
1566         * call.c (print_z_candidate): Change name of first arg to msgid.
1567         (joust): Add comment for translators.
1569 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
1571         PR c++/9898, PR c++/383, DR 322
1572         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
1573         through reference types on both PARM and ARG.
1575 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
1577         PR c++/10119
1578         * error.c (dump_expr) <BASELINK>: Use dump_expr.
1579         * pt.c (maybe_fold_nontype_args): New function.
1580         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
1581         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
1582         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
1583         maybe_fold_nontype_args.
1585 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
1587         PR c++/10026
1588         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
1590 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
1592         PR c++/7086
1593         * typeck.c (cxx_mark_addressable):  Adjust call to
1594         gen_mem_addressof or put_var_into_stack.
1596 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
1598         PR c++/9978, c++/9708
1599         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
1600         * call.c (add_template_candidate_real): Adjust
1601         instantiate_template call.
1602         * class.c (resolve_address_of_overloaded_function): Likewise.
1603         * decl.c (build_enumerator): Set TREE_CONSTANT.
1604         * pt.c (check_instantiated_args): New.
1605         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
1606         TREE_READONLY.
1607         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
1608         (reduce_template_parm_level): Likewise.
1609         (process_template_parm): Likewise.
1610         (check_explicit_specialization): Adjust instantiate_template call.
1611         (convert_template_argument): Don't check non-type argument here.
1612         (lookup_template_class): Check them here.
1613         (tsubst_friend_function): Adjust instantiate_template call.
1614         (instantiate_template): Add tsubst_flags parameter, use it. Check
1615         instantiated args.
1617 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
1619         * decl.c: Update calls to shadow_warning.
1621 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
1623         PR c++/9898
1624         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
1625         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
1627 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
1629         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
1630         friends.
1631         * cp/pt.c (instantiate_class_template): Fix formatting.
1633 2003-03-14  Matt Austern  <austern@apple.com>
1635         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
1636         (unemitted_tinfo_decl_p): Remove.
1637         (emit_tinfo_decl): Change declaration to remove unused parameter.
1638         * decl2.c (finish_file): Change tinfo emission to loop through
1639         unemitted_tinfo_decls array instead of looping through all decls.
1640         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
1641         unused second parameter.
1642         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
1643         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
1644         (emit_tinfo_decl): remove unused second parameter, add assertion
1645         that decl hasn't already been emitted.
1647 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
1649         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
1650         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
1651         return statements.
1653 2003-03-19  Jason Merrill  <jason@redhat.com>
1655         PR c++/8316, c++/9315, c++/10136
1656         * call.c (print_z_candidate): Split out from...
1657         (print_z_candidiates): ...here.
1658         (joust): Use it.
1660 2003-03-17  Roger Sayle  <roger@eyesopen.com>
1662         PR c++/10031
1663         * decl.c (duplicate_decls): Use the new type when prototyping
1664         anticipated decls, even when the types match.  This defines the
1665         exception list for the built-in function.
1667 2003-03-17  Jason Merrill  <jason@redhat.com>
1669         PR c++/10091
1670         * typeck.c (build_class_member_access_expr): Compare
1671         TYPE_MAIN_VARIANTs.
1673 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
1675         PR c++/9639
1676         * parser.c (cp_parser_declarator_id): Clear parser->scope.
1678 2003-03-16  Jason Merrill  <jason@redhat.com>
1680         PR c++/9993
1681         * decl.c (finish_function): Only allow the NRVO to use variables
1682         declared at function scope.
1684 2003-03-17  Andreas Jaeger  <aj@suse.de>
1686         * Make-lang.in (cp/TAGS): Remove.
1688 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
1690         PR c++/9629
1691         * cp-tree.h (struct language_function): Add in_base_initializer.
1692         (in_base_initializer): define it.
1693         (expand_member_init): Remove INIT param.
1694         * init.c (expand_member_init): Remove INIT param, return the member.
1695         (emit_mem_initializers): Set in_base_initializer.
1696         * class.c (build_base_path): Check in_base_initializer.
1697         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
1698         * pt.c (tsubst_initializer_list): Likewise.
1700 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
1702         * decl.c (binding_for_name): Fix initialization thinko.
1704 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
1706         Compile-time improvement: 2/n.
1707         * cp-tree.h (struct cxx_binding): New datatype;
1708         (struct lang_identifier): Use it.
1709         (LOCAL_BINDING_P): Adjust definition.
1710         (INHERITED_VALUE_BINDING_P): Likewise.
1711         (BINDING_SCOPE): Likewise.
1712         (BINDING_HAS_LEVEL_P): Likewise.
1713         (BINDING_VALUE): Likewise.
1714         (BINDING_TYPE): Likewise.
1715         (IDENTIFIER_VALUE): Likewise.
1716         (struct tree_binding): Remove.
1717         (TS_CP_BINDING): Likewise.
1718         ((union lang_tree_node): Remove field "binding".
1719         (cxx_binding_clear): New macro.
1720         (binding_for_name): Adjust return type.
1721         (qualified_lookup_using_namespace): Adjust prototype.
1722         (lookup_using_namespace): Adjust prototype.
1723         (cxx_scope_find_binding_for_name): Declare.
1724         * cp-tree.def: Remove CPLUS_BINDING definition.
1725         * decl.c (push_binding): Adjust local variable type.
1726         (add_binding): Likewise.
1727         (push_class_binding): Likewise.
1728         (pop_binding): Likewise.
1729         (poplevel): Likewise.
1730         (poplevel_class): Likewise.
1731         (free_bindings):  Adjust type.
1732         (find_binding): Adjust return type, add a third parameter. Remove
1733         non-useful assertion now that we use static typing.
1734         (cxx_scope_find_binding_for_name): New function.
1735         (binding_for_name): Use it.  Adjust local variable type. Simplify.
1736         (namespace_binding):  Simplify.
1737         (set_namespace_binding): Likewise.
1738         (set_identifier_type_value_with_scope): Adjust local variable type.
1739         (lookup_tag): Don't type-abuse of local variable 'old'.
1740         (lookup_namespace_name): Likewise.  Allocate binding on stack.
1741         (select_decl): Adjust prototype.
1742         (unqualified_namespace_lookup):  Allocate binding on stack.
1743         Don't type-abuse of local variable 'val'.
1744         (lookup_name_real): Likewise.
1745         (maybe_inject_for_scope_var): Adjust local variable type.
1746         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
1747         (namespace_binding): Adjust logic, simplify.
1748         (BINDING_LEVEL): Adjust definition.
1749         (push_class_level_binding): Adjust local variable type.
1750         (struct cxx_saved_binding): Adjust field 'binding' type.
1751         * decl2.c (ambiguous_decl): Adjust prototype.
1752         (lookup_using_namespace): Adjust local variable type.
1753         (qualified_lookup_using_namespace): Catch type error and correct
1754         ensueing logic error.
1755         (do_nonmember_using_decl): Adjust local variable type.  Allocate
1756         temporary cxx_binding on stack.
1757         (do_toplevel_using_decl): Adjust local variable type.
1758         * ptree.c (cxx_print_cxx_binding): New function.
1759         (cxx_print_identifier): Use it.
1760         (cxx_print_xnode): Delete CPLUS_BINDING case label.
1762 2003-03-15  Roger Sayle  <roger@eyesopen.com>
1764         * tree.c (count_functions): Fix whitespace.
1766 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
1768         * Make-lang.in: Update.
1770 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1772         PR c++/6440
1773         * pt.c (maybe_process_partial_specialization): Handle
1774         member class template when enclosing class template is
1775         explicit specialized.
1776         (most_general_template): Stop looking when DECL is already
1777         specialized.
1779 2003-03-13  Jason Merrill  <jason@redhat.com>
1781         PR c++/9420
1782         * search.c (lookup_conversions): Call complete_type here.
1783         * call.c (implicit_conversion): Not here.
1785 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
1787         * decl2.c (do_nonmember_using_decl): Correct handling of
1788         simultaneous type/non-type bindings.
1790         * call.c (initialize_reference): Remove bogus assertion.
1791         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
1793 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
1795         PR c++/7050
1796         * expr.c (cxx_expand_expr): Return const0_rtx for throw
1797         expressions.
1799 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
1801         PR c++/9474
1802         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
1803         to merge old and new declarations.
1805 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
1807         * g++.1: Remove.
1808         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
1809         (cp/g++.1): Build it from scratch in the build tree.
1810         (c++.install-man): Depend on it.  Install it from the build tree.
1811         (c++.mostlyclean): Clean it.
1813 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
1815         PR c++/9474
1816         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
1817         to merge old and new declarations.
1819         PR c++/9924
1820         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
1822 2003-03-11  Jason Merrill  <jason@redhat.com>
1824         PR c++/9820
1825         * search.c (lookup_member): Fix handling of functions in a class
1826         being defined.
1828 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
1830         PR c++/8700
1831         * call.c (convert_class_to_reference): Adjust usage of
1832         splice_viable.
1833         (any_viable): Remove.
1834         (splice_viable): Combine with any_viable.
1835         (print_z_candidates): Avoid printing duplicates.
1836         (build_user_type_conversion_1): Adjust usage of splice_viable.
1837         (build_new_function_call): Likewise.
1838         (build_operator_new_call): Likewise.
1839         (build_object_call): Likewise.
1840         (build_conditional_expr): Likewise.
1841         (build_new_op): Likewise.
1842         (build_new_method_call): Likewise.
1843         (joust): Remove spurious comment.
1844         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
1845         * decl2.c (arg_assoc_class): Simplify.
1846         * friend.c (add_friend): Likewise.
1848 2003-03-11  Jason Merrill  <jason@redhat.com>
1850         PR c++/8660
1851         * decl2.c (check_classfn): A member template only matches a
1852         member template.
1854 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
1856         * Make-lang.in (CXX_C_OBJS): Update.
1857         * lang-specs.h: Don't define __GNUG__ here.
1859 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
1861         * call.c (perform_overload_resolution): New function.
1862         (build_new_function_call): Use it.
1863         (build_operator_new_call): Likewise.
1864         (add_candidates): Add explicit_targs and template_only parameters.
1865         (build_new_op): Adjust accordingly.
1866         * cp-tree.h (build_operator_new_call): New function.
1867         (build_function_call_real): Remove.
1868         (build_function_call_maybe): Likewise.
1869         * init.c (build_new_1): Use build_operator_new_call.
1870         * typeck.c (build_function_call_real): Rename to ...
1871         (build_function_call): ... this.
1873 2003-03-10  Devang Patel  <dpatel@apple.com>
1875         PR c++/9394
1876         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
1878 2003-03-10  Jason Merrill  <jason@redhat.com>
1880         PR c++/9798
1881         * decl.c (push_using_directive): Push before recursing.
1883         PR c++/9868, c++/9524
1884         * call.c (resolve_scoped_fn_name): Handle the case of a function
1885         pointer member.
1887         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
1888         argument in the pointer-to-member case.
1890 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
1892         PR c++/9373
1893         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
1894         pointers to member functions.
1896         PR c++/8534
1897         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
1898         in pointer-to-member-function types.
1900 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1902         * expr.c (cplus_expand_constant): Use C90 prototype style.
1903         (cxx_expand_expr): Likewise.
1905 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1907         PR c++/9970
1908         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
1909         functions.
1911 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
1913         * lang-specs.h (c++-header): Change .pch to .gch.
1915 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
1917         * cp-tree.h (cxx_init): Update prototype.
1918         * lex.c (cxx_init): Similarly.
1920 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
1922         PR c++/9823
1923         * cp-tree.h (begin_mem_initializers): Remove.
1924         * parser.c (cp_parser_mem_initializer_list): Inline it here.
1925         Do not call finish_mem_initializers if not in a constructor.
1926         (cp_parser_class_head): Fix typo in error message.
1927         * semantics.c (begin_mem_initializers): Remove.
1928         * testsuite/g++.dg/parser/constructor1.C: New test.
1930         PR c++/9809
1931         * call.c (add_function_candidate): Skip builtin fuctions that have
1932         not yet been declared.
1934         PR c++/9982
1935         * init.c (build_new_1): Correct logic for determining whether or
1936         not to use an array cookie.
1938         PR c++/9524
1939         * parser.c (cp_parser_postfix_expression): Call
1940         finish_non_static_data_member, even when processing_template_decl.
1942         PR c++/9912
1943         * cp-tree.h (is_ancestor): New function.
1944         (handle_class_head): Change prototype.
1945         * decl2.c (is_namespace_ancestor): Rename to ...
1946         (namespace_anecestor): ... this.
1947         (set_decl_namespace): Adjust accordingly.
1948         (handle_class_head): Remove unncessary parameters.
1949         * parser.c (cp_parser_class_head): Check that
1950         nested-name-specifiers are used appropriately.
1952 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
1954         * call.c (reference_binding): Remove REF_IS_VAR parameter.
1955         (implicit_conversion): Adjust call to reference_binding.
1956         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
1957         (initialize_reference): Adjust handling for references bound to
1958         rvalues.
1959         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
1960         prototype.
1961         (real_non_cast_lvalue_p): New method.
1962         * cvt.c (build_up_reference): Adjust use of
1963         make_temporary_var_for_ref_to_temp.
1964         * tree.c (real_non_cast_lvalue_p): New method.
1966 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1968         * except.c (init_exception_processing): Use C90 prototype style.
1969         (cp_protect_cleanup_actions): Likewise.
1970         (prepare_eh_type): Likewise.
1971         (build_eh_type_type): Likewise.
1972         (build_exc_ptr): Likewise.
1973         (do_begin_catch): Likewise.
1974         (dtor_nothrow): Likewise.
1975         (do_end_catch): Likewise.
1976         (push_eh_cleanup): Likewise.
1977         (decl_is_java_type): Likewise.
1978         (choose_personality_routine): Likewise.
1979         (initialize_handler_parm): Likewise.
1980         (expand_start_catch_block): Likewise.
1981         (expand_end_catch_block): Likewise.
1982         (begin_eh_spec_block): Likewise.
1983         (finish_eh_spec_block): Likewise.
1984         (do_allocate_exception): Likewise.
1985         (do_free_exception): Likewise.
1986         (wrap_cleanups_r): Likewise.
1987         (stabilize_throw_expr): Likewise.
1988         (build_throw): Likewise.
1989         (complete_ptr_ref_or_void_ptr_p): Likewise.
1990         (is_admissible_throw_operand): Likewise.
1991         (nothrow_libfn_p): Likewise.
1992         (can_convert_eh): Likewise.
1993         (check_handlers_1): Likewise.
1994         (check_handlers): Likewise.
1996 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
1998         * call.c (merge_conversion_sequences): New function.
1999         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
2000         (convert_class_to_reference): Correct handling of second
2001         standard conversion sequence in a user-defined conversion
2002         sequence.
2003         (build_user_type_conversion_1): Use merge_conversion_sequences.
2004         * cp-tree.def: Add comments for CONV nodes.
2005         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
2007 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2009         * error.c (init_error): Use C90 prototype style.
2010         (dump_scope): Likewise.
2011         (dump_qualifiers): Likewise.
2012         (dump_template_argument): Likewise.
2013         (dump_template_argument_list): Likewise.
2014         (dump_template_parameter): Likewise.
2015         (dump_template_bindings): Likewise.
2016         (dump_type): Likewise.
2017         (dump_typename): Likewise.
2018         (class_key_or_enum): Likewise.
2019         (dump_aggr_type): Likewise.
2020         (dump_type_prefix): Likewise.
2021         (dump_type_suffix): Likewise.
2022         (dump_global_iord): Likewise.
2023         (dump_simple_decl): Likewise.
2024         (dump_decl): Likewise.
2025         (dump_template_decl): Likewise.
2026         (dump_function_decl): Likewise.
2027         (dump_parameters): Likewise.
2028         (dump_exception_spec): Likewise.
2029         (dump_function_name): Likewise.
2030         (dump_template_parms): Likewise.
2031         (dump_char): Likewise.
2032         (dump_expr_list): Likewise.
2033         (dump_expr): Likewise.
2034         (dump_binary_op): Likewise.
2035         (dump_unary_op): Likewise.
2036         (type_as_string): Likewise.
2037         (expr_as_string): Likewise.
2038         (decl_as_string): Likewise.
2039         (context_as_string): Likewise.
2040         (lang_decl_name): Likewise.
2041         (cp_file_of): Likewise.
2042         (cp_line_of): Likewise.
2043         (decl_to_string): Likewise.
2044         (expr_to_string): Likewise.
2045         (fndecl_to_string): Likewise.
2046         (code_to_string): Likewise.
2047         (language_to_string): Likewise.
2048         (parm_to_string): Likewise.
2049         (op_to_string): Likewise.
2050         (type_to_string): Likewise.
2051         (assop_to_string): Likewise.
2052         (args_to_string): Likewise.
2053         (cv_to_string): Likewise.
2054         (cxx_print_error_function): Likewise.
2055         (cp_diagnostic_starter): Likewise.
2056         (cp_diagnostic_finalizer): Likewise.
2057         (cp_print_error_function): Likewise.
2058         (function_category): Likewise.
2059         (print_instantiation_full_context): Likewise.
2060         (print_instantiation_partial_context): Likewise.
2061         (maybe_print_instantiation_context): Likewise.
2062         (print_instantiation_context): Likewise.
2063         (cp_printer): Likewise.
2064         (print_integer): Likewise.
2065         (print_non_consecutive_character): Likewise.
2066         (locate_error): Likewise.
2068 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
2070         PR c++/9965
2071         * call.c (reference_binding): Add ref_is_var parameter.
2072         (implicit_conversion): Adjust call to reference_binding.
2073         (initialize_reference): Likewise.
2075         PR c++/9400
2076         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
2077         PARM_DECLs.
2079         PR c++/9791
2080         * class.c (get_basefndecls): Use lookup_fnfields_1.
2082 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2084         PR c++/9188
2085         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
2086         in error message.
2087         (cp_parser_single_declaration): Likewise.
2089 2003-03-05  Jason Merrill  <jason@redhat.com>
2091         PR c++/9440
2092         * call.c (build_conditional_expr): Use convert rather than an
2093         explicit NOP_EXPR.
2095 2003-03-02  Matt Austern  <austern@apple.com>
2097         * decl.c (cp_binding_level): Add static_decls varray member.
2098         (add_decl_to_level): Add static/inline namespace scope
2099         declarations to static_decls array.
2100         (wrapup_global_for_namespace): Pass static_decls only, instead of
2101         all decls, to wrapup_global_declarations/check_global_declarations.
2102         (push_namespace): Initialize static_decls for ordinary namespaces.
2103         (cxx_init_decl_processing): Initialize static_decls for global
2104         namespace.
2106 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
2108         * class.c (end_of_class): Correct thinko.
2110 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
2112         * config-lang.in: Replace ${libstdcxx_version} by its value.
2114 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
2116         * cp-tree.h (cxx_saved_binding): Declare.
2117         (struct saved_scope): Adjust type of field 'old_binding'.
2118         * decl.c (cxx_saved_binding_make): New macro.
2119         (struct cxx_saved_binding): Define.
2120         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
2121         C++ bindings.
2122         (maybe_push_to_top_level): Adjust local variable type.
2123         (pop_from_top_level): Likewise.
2125 2003-03-04  Tom Tromey  <tromey@redhat.com>
2127         * Make-lang.in (c++.tags): New target.
2129 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
2131         * Make-lang.in: Update.
2133 2003-03-03  Jason Merrill  <jason@redhat.com>
2135         * decl.c (finish_enum): Do set the type in a template. Simplify.
2136         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
2138 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
2140         PR c++/9878
2141         * call.c (convert_class_to_reference): Correct conversion
2142         sequences.
2143         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
2144         (implicit_conversion): Adjust call to reference_binding.
2145         (add_candidate): Change type of candidates parameter.
2146         (add_function_candidate): Likewise.
2147         (add_conv_candidate): Likewise.
2148         (build_builtin_candidate): Likewise.
2149         (add_builtin_candidate): Likewise.
2150         (add_builtin_candidates): Likewise.
2151         (add_template_candidate_real): Likewise.
2152         (add_template_candidate): Likewise.
2153         (add_template_conv_candidate): Likewise.
2154         (build_user_type_conversion_1): Adjust accordingly.
2155         (build_object_call): Likewise.
2156         (build_conditional_expr): Likewise.
2157         (add_candidates): Likewise.
2158         (build_new_op): Likewise.
2159         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
2160         (build_new_method_call): Adjust calls to add_function_candidate.
2161         (make_temporary_var_for_ref_to_temp): New function.
2162         (initialize_reference): Add decl parameter.
2163         * class.c (build_rtti_vtbl_entries): Use build_address and
2164         build_nop.
2165         * cp-tree.h (initialize_reference): Change prototype.
2166         (make_temporary_var_for_ref_to_temp): New function.
2167         (build_type_conversion): Change prototype.
2168         (build_address): New function.
2169         (build_nop): Likewise.
2170         * cvt.c (cp_convert_to_pointer): Adjust call to
2171         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
2172         Use build_nop.
2173         (convert_to_pointer_force): Use build_nop.
2174         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
2175         (convert_to_reference): Adjust call to build_type_conversion.
2176         (ocp_convert): Likewise.
2177         (build_type_conversion): Remove for_sure parameter.
2178         * decl.c (grok_reference_init): Use initialize_reference.
2179         * typeck.c (build_address): New function.
2180         (build_nop): Likewise.
2181         (build_unary_op): Use them.
2182         (build_ptrmemfunc): Tidy slightly.
2183         (convert_for_initialization): Adjust call to
2184         initialize_reference.
2185         * typeck2.c (store_init_value): Remove #if 0'd code.
2187 2003-03-03  Jason Merrill  <jason@redhat.com>
2189         * decl.c (start_function): Clear DECL_NUM_STMTS.
2191         * class.c (get_vtable_decl): Use vtbl_type_node.
2192         (build_primary_vtable): Check for it.
2194 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
2196         * decl.c (check_initializer): Check for vector_opaque_p.
2198 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
2200         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
2201           invoke an external cpp during compilation.
2203 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2205         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
2206         that of warning().
2207         (start_decl): Likewise.
2208         (start_function): Likewise.
2210 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
2212         * Make-lang.in (CXX_C_OBJS): Update.
2214 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
2216         PR c++/9892
2217         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
2218         instantiating it.
2220 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
2222         * parser.c (cp_parser_init_declarator): Revert opaque
2223         vector_opaque_p change.
2224         Do not include target.h.
2226 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
2228         PR c++/9879
2229         * cp-tree.h (build_zero_init): Add parameter.
2230         * decl.c (cp_finish_decl): Adjust call.
2231         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
2232         calls.
2233         (build_default_init): Add nelts parameter.  Adjust calls to
2234         build_zero_init.
2235         (build_new_1): Adjust call to build_default_init.
2236         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
2238 2003-02-26  Devang Patel  <dpatel@apple.com>
2240         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
2241         required.  Postpone enum setting for template decls.
2242         (build_enumerator): Delay copying value node until finish_enum
2243         (). Remove #if 0'ed code.
2244         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
2245         (tsubst_copy): Add check for enum type.
2247 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
2249         PR c++/9683
2250         * decl2.c (prune_vars_needing_no_initialization): Do not throw
2251         away initializations for DECL_EXTERNAL VAR_DECLs.
2252         (finish_file): Adjust accordingly.
2253         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
2255 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
2257         * decl.c (add_binding): Time TV_NAME_LOOKUP.
2258         (push_class_binding): Likewise.
2259         (set_namespace_binding): Likewise.
2261 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
2263         PR c++/9836
2264         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
2265         specializations back to the main template.
2266         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
2267         * pt.c (resolve_typename_type): Likewise.
2269 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
2271         PR c++/9778
2272         * pt.c (tsubst_copy_and_build): For a templated function inside a
2273         scope, process template arguments.
2275 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2277         PR c++/9602
2278         * typeck2.c (abstract_virtuals_error): Don't check when
2279         TYPE is still template parameter dependent.
2281 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
2283         PR c++/5333
2284         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
2285         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
2286         * pt.c (instantiate_class_template): Don't try to instantiate
2287         dependent types.
2288         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
2290 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
2292         PR c++/9749
2293         * decl.c (grokdeclarator): Do not allow parameters with variably
2294         modified types.
2296 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
2298         * search.c (grow_bfs_bases): Remove. Fold into ...
2299         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
2300         in previous patch.
2302 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
2304         PR c++/9729
2305         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
2306         when the G++ 3.2 ABI prevents correct compilation.
2308 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
2310         Change base class access representation. Share virtual base
2311         binfos.
2312         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
2313         call.
2314         * cp/class.c (build_base_path): Likewise.
2315         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
2316         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
2317         (make_new_vtable): Adjust.
2318         (force_canonical_binfo_r): Delete.
2319         (force_canonical_binfo): Delete.
2320         (mark_primary_virtual_base): Delete.
2321         (dfs_unshared_virtual_bases): Delete.
2322         (mark_primary_bases): Adjust.
2323         (maybe_warn_about_overly_private_class): Adjust.
2324         (dfs_base_derived_from): Delete.
2325         (base_derived_from): Follow the inheritance chain.
2326         (struct find_final_overrider_data): Add vpath member.
2327         (dfs_find_final_overrider): Adjust.
2328         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
2329         (find_final_overrider): Adjust.
2330         (update_vtable_entry_for_fn): Adjust.
2331         (modify_all_vtables): Adjust.
2332         (walk_subobject_offsets): Adjust.
2333         (layout_nonempty_base_or_field): Adjust.
2334         (layout_empty_base): Remove last parameter. Adjust.
2335         (build_base_field): Adjust.
2336         (build_base_fields): Adjust.
2337         (propagate_binfo_offsets): Remove last parameter. Adjust.
2338         (dfs_set_offset_for_unshared_vbases): Delete.
2339         (layout_virtual_bases): Adjust.
2340         (finish_struct_1): Adjust.
2341         (init_class_processing): Don't init access nodes.
2342         (dfs_get_primary_binfo): Delete.
2343         (get_primary_binfo): Adjust.
2344         (dump_class_hierarchy_r): Remove most derived arg, add IGO
2345         parameter. Adjust.
2346         (dump_class_hierarchy): Adjust.
2347         (finish_vtbls): Adjust.
2348         (get_original_base): Delete.
2349         (build_vtt_inits): Adjust.
2350         (dfs_build_secondary_vptr_vtt_inits): Adjust.
2351         (dfs_ctor_vtable_bases_queue_p): Adjust.
2352         (build_ctor_vtbl_group): Adjust.
2353         (dfs_accumulate_vtbl_inits): Adjust.
2354         (build_vtbl_initializer): Adjust.
2355         (build_vbase_offset_vtbl_entries): Adjust.
2356         (add_vcall_offset_vtbl_entries_1): Adjust.
2357         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
2358         (access_*_node): Remove.
2359         (CANONICAL_BINFO): Delete.
2360         (BINFO_UNSHARED_MARKED): Remove.
2361         (BINFO_MARKED): Set LANG_FLAG_0 directly.
2362         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
2363         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
2364         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
2365         Delete.
2366         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
2367         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
2368         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
2369         Delete.
2370         (BINFO_DEPENDENT_BASE_P): New.
2371         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
2372         index.
2373         (markedp, unmarkedp): Adjust.
2374         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
2375         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
2376         find_vbase_instance, binfo_for_vbase): Delete.
2377         (copied_binfo, original_binfo): Declare.
2378         (finish_base_specifier): Add virtual_p arg.
2379         (unshare_base_binfos): Delete.
2380         (copy_base_binfos): Declare.
2381         (reverse_path): Delete.
2382         * cp/decl.c (xref_basetypes): Access and virtuality passed
2383         differently. Don't copy direct base binfos here. Call
2384         copy_base_binfos.
2385         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
2386         (initialize_vtbl_ptrs): Adjust.
2387         (expand_member_init): Adjust.
2388         * cp/parser.c (cp_parser_base_specifier): Adjust.
2389         * cp/pt.c (instantiate_class_template): Adjust.
2390         (get_template_base_recursive): Adjust.
2391         * cp/rtti.c (get_pseudo_ti_init): Adjust.
2392         (get_pseudo_ti_desc): Adjust.
2393         * cp/tree.c (unshare_base_binfos): Rename to ...
2394         (copy_base_binfos): ... here, reimplement.
2395         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
2396         (reverse_path): Remove.
2397         * cp/typeck.c (get_delta_difference): Adjust error messages.
2398         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
2399         * cp/search.c (lookup_base_r): Adjust.
2400         (dynamic_cast_base_recurse): Adjust.
2401         (canonical_binfo): Remove.
2402         (dfs_canonical_queue): Remove.
2403         (dfs_assert_unmarked_p): Remove.
2404         (assert_canonical_unmarked): Remove.
2405         (shared_marked_p, shared_unmarked_p): Remove.
2406         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
2407         (dfs_access_in_type): Adjust.
2408         (access_in_type): Adjust.
2409         (dfs_accessible_queue_p): Adjust.
2410         (dfs_accessible_p): Adjust.
2411         (is_subobject_of_p_1, is_subobject_of_p): Remove.
2412         (struct lookup_field_info): Remove from_dep_base_p field.
2413         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
2414         (lookup_field_r): Remove dependent base code.
2415         (lookup_member): Likewise.
2416         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
2417         (dfs_unmarked_real_bases_queue_p): Remove.
2418         (dfs_marked_real_bases_queue_p): Remove.
2419         (dfs_skip_vbases): Remove.
2420         (dfs_get_pure_virtuals): Adjust.
2421         (markedp, unmarkedp): Adjust.
2422         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
2423         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
2424         (dfs_unmark): Adjust.
2425         (dfs_get_vbase_types):Remove.
2426         (dfs_build_inheritance_graph_order): Remove.
2427         (get_vbase_types): Remove
2428         (dfs_find_vbase_instance): Remove.
2429         (find_vbase_instance): Remove.
2430         (dfs_debug_unmarkedp): Adjust.
2431         (dependent_base_p): Remove.
2432         (dfs_push_type_decls): Adjust.
2433         (dfs_push_decls): Adjust.
2434         (dfs_no_overlap_yet): Adjust.
2435         (copied_binfo): New function.
2436         (original_binfo): New function.
2437         (binfo_for_vbase): Remove.
2439 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
2441         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
2442         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
2443         vectors, for speed.
2445 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
2447         PR c++/9704
2448         * class.c (layout_class_type): In the 3.2 ABI, take into account
2449         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
2451 2003-02-18  Matt Austern <austern@apple.com>
2453         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
2454         nothing for C++.
2455         * cp/decl.c (wrapup_globals_for_namespace): Remove special
2456         handling of global namespace.
2458 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
2460         * cp-tree.h (rid_to_yy): Delete.
2461         (C_RID_YYCODE): Delete.
2462         (finish_file): Delete redundant declaration.
2464 2003-02-18  Jason Merrill  <jason@redhat.com>
2466         PR c++/9623
2467         * decl.c (reshape_init): Don't mess with initializer labels.
2469         PR c++/9485
2470         * parser.c (cp_parser_postfix_expression): Set idk properly for
2471         object->scope::member.
2473 2003-02-18  Ben Elliston  <bje@redhat.com>
2475         PR other/7350
2476         * decl.c (duplicate_decls): Fix typo in comment.
2478 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
2480         PR debug/9717
2481         * class.c (build_base_field): Mark fields for base classes with
2482         DECL_IGNORED_P.
2484 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2486         PR c++/9457
2487         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
2488         CONSTRUCTOR_ELTS only once.
2490 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2492         PR c++/9459
2493         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
2494         (dump_type_suffix): Likewise.
2496 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
2498         * search.c: ANSIfy function declarations and definitions.
2499         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
2500         * call.c (build_method_call, resolve_scoped_fn_name,
2501         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
2502         calls.
2503         * class.c (handle_using_decl): Likewise.
2504         * decl.c (make_typename_type, make_unmound_class_template,
2505         start_decl, compute_array_index_type): Likewise.
2506         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
2507         * init.c (expand_member_init, build_member_call): Likewise.
2508         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
2509         resolve_typename_type): Likewise.
2510         * typeck.c (lookup_destructor, finish_class_member_access_exprm
2511         build_prememfunc_access_expr): Likewise.
2513 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
2515         * decl2.c: Include "timevar.h".
2516         (namespace_ancestor): Time name lookup.
2517         (add_using_namespace): Likewise.
2518         (lookup_using_namespace): Likewise.
2519         (qualified_lookup_using_namespace): Likewise.
2520         (decl_namespace): Likewise.
2521         (lookup_arg_dependent): Likewise.
2522         * lex.c (do_identifier): Likewise.
2523         (do_scoped_id): Likewise.
2524         * pt.c (lookup_template_class): Likewise.
2526 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
2528         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
2530 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2532         * decl.c: Include "timevar.h".
2533         (poplevel): Time name lookup.
2534         (find_binding): Likewise.
2535         (push_namespace): Likewise.
2536         (pop_nested_namespace): Likewise.
2537         (store_bindings): Likewise.
2538         (maybe_push_to_top_level): Likewise.
2539         (pop_from_top_level): Likewise.
2540         (push_local_name): Likewise.
2541         (pushtag): Likewise.
2542         (pushdecl): Likewise.
2543         (pushdecl_with_scope): Likewise.
2544         (pushdecl_namespace_level): Likewise.
2545         (pushdecl_top_level): Likewise.
2546         (pushdecl_class_level): Likewise.
2547         (push_class_level_binding): Likewise.
2548         (push_using_decl): Likewise.
2549         (push_using_directive): Likewise.
2550         (push_overloaded_decl): Likewise.
2551         (lookup_label): Likewise.
2552         (define_label): Likewise.
2553         (lookup_tag): Likewise.
2554         (lookup_tag_reverse): Likewise.
2555         (lookup_namespace_name): Likewise.
2556         (select_decl): Likewise.
2557         (unqualified_namespace_lookup): Likewise.
2558         (lookup_name_real): Likewise.
2559         (lookup_name_current_level): Likewise.
2560         (lookup_type_current_level): Likewise.
2561         (maybe_inject_for_scope_var): Likewise.
2562         (xref_tag): Likewise.
2564         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
2566 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
2568         * decl.c (build_enumerator):  Remove unneeded test.
2570 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
2572         * cp-tree.h (struct lang_type_header): Make all fields unsigned
2573         char.
2575 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
2577         PR c++/7129
2578         * call.c (z_candidate): Add args.
2579         (convert_class_to_reference): Set it.
2580         (implicit_conversion): Tidy.
2581         (add_candidate): Add args parameter.
2582         (add_function_candidate): Adjust call to add_candidate.
2583         (add_conv_candidate): Likewise.
2584         (build_builtin_candidate): Likewise.
2585         (build_user_type_conversion_1): Eliminate wasteful tree_cons
2586         usage.
2587         (build_new_function_call): Likewise.
2588         (build_object_call): Likewise.
2589         (add_candidates): New function.
2590         (build_new_op): Use it.
2591         (covert_like_real): Adjust call to build_over_call.
2592         (build_over_call): Remove args parameter.
2593         * operators.def: Add <?= and >?=.
2595 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
2597         * typeck.c (build_indirect_ref): Don't check flag_volatile.
2599 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2601         PR c++/8849
2602         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
2604 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
2606         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
2607         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
2608         (BINFO_LANG_ELTS): New #define.
2609         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
2611 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
2613         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
2615 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
2617         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
2618         for class types.
2619         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
2620         rather than TYPE_LANG_FLAG_0.
2621         (TYPE_BUILT_IN): Remove.
2622         (TYPE_DEPENDENT_P): New macro.
2623         (TYPE_DEPENDENT_P_VALID): Likewise.
2624         (lang_type_class): Add fields_readonly.
2625         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
2626         * pt.c (dependent_type_p_r): New function, split out from ...
2627         (dependent_type_p): ... here.  Memoize results.
2628         * search.c (dependent_base_p): Use dependent_type_p, not
2629         uses_template_parms.
2630         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
2631         for class types.
2633 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
2635         * call.c (build_field_call): Use build_new_op, not build_opfncall.
2636         (prep_operand): New function.
2637         (build_new_op): Use it.  Remove dead code.
2638         * class.c (pushclass): Change "modify" parameter type from int to
2639         bool.
2640         (currently_open_class): Use same_type_p, not pointer equality.
2641         (push_nested_class): Adjust calls to pushclass, remove modify
2642         parameter.
2643         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
2644         (pushclass): Change prototype.
2645         (push_nested_class): Likewise.
2646         (grokoptypename): Remove.
2647         (build_opfncall): Remove.
2648         (value_dependent_expression_p): Declare.
2649         (resolve_typename_type): Likewise.
2650         (resolve_typename_type_in_current_instantiation): Likewise.
2651         (enter_scope_of): Remove.
2652         (tsubst): Remove.
2653         (tsubst_expr): Likewise.
2654         (tsubst_copy): Likewise.
2655         (tsubst_copy_and_build): Likewise.
2656         * decl.c (warn_about_implicit_typename_lookup): Remove.
2657         (finish_case_label): Return error_mark_node for erroneous labels.
2658         (start_decl): Adjust calls to push_nested_class.
2659         (grokfndecl): Call push_scope/pop_scope around call to
2660         duplicate_decls.
2661         (grokdeclarator): Do not call tsubst.
2662         (start_function): Adjust calls to push_nested_class.
2663         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
2664         (check_classfn): Use push_scope/pop_scope around type comparisions.
2665         (grokoptypename): Remove.
2666         (push_sscope): Adjust call to push_nested_class.
2667         * error.c (dump_type): Show cv-qualification of typename types.
2668         * init.c (build_member_call): Use build_new_op, not
2669         build_opfncall.
2670         * method.c (build_opfncall): Remove.
2671         * parser.c (cp_parser): Add allow_non_constant_expression_p and
2672         non_constant_expression_p.
2673         (cp_parser_constant_expression): Adjust prototype.
2674         (cp_parser_resolve_typename_type): Remove.
2675         (cp_parser_non_constant_expression): New function.
2676         (cp_parser_non_constant_id_expression): Likewise.
2677         (cp_parser_new): Set allow_non_constant_expression_p and
2678         non_constant_expression_p.
2679         (cp_parser_primary_expression): Reject `this' and `va_arg' in
2680         constant-expressions.  Note that dependent names aren't really
2681         constant.
2682         (cp_parser_postfix_expression): Reject conversions to non-integral
2683         types in constant-expressions.  Neither are increments or
2684         decrements.
2685         (cp_parser_unary_expression): Reject increments and decrements in
2686         constant-expressions.
2687         (cp_parser_direct_new_declarator): Adjust call to
2688         cp_parser_constant_expression.
2689         (cp_parser_cast_expression): Reject conversions to non-integral
2690         types in constant-expressions.
2691         (cp_parser_assignment_expression): Rejects assignments in
2692         constant-expressions.
2693         (cp_parser_expression): Reject commas in constant-expressions.
2694         (cp_parser_labeled_statement): Adjust call to
2695         cp_parser_constant_expression.
2696         (cp_parser_direct_declarator): Simplify array bounds, even in
2697         templates, when they are non-dependent.  Use
2698         resolve_typename_type, not cp_parser_resolve_typename_type.
2699         (cp_parser_class_head): Use resolve_typename_type, not
2700         cp_parser_resolve_typename_type.
2701         (cp_parser_member_declaration): Adjust call to
2702         cp_parser_constant_expression.
2703         (cp_parser_constant_initializer): Likewise.
2704         (cp_parser_constructor_declarator): Use resolve_typename_type, not
2705         cp_parser_resolve_typename_type.
2706         (cp_parser_late_parsing_default_args): Adjust call to
2707         push_nested_class.
2708         * pt.c (tsubst): Give it internal linkage.
2709         (tsubst_expr): Likewise.
2710         (tsubst_copy): Likewise.
2711         (tsubst_copy_and_build): Likewise.
2712         (push_access_scope_real): Likewise.
2713         (tsubst_friend_class): Likewise.
2714         (instantiate_class_template): Adjust call to pushclass.
2715         (value_dependent_expression_p): Give it external linkage.
2716         Robustify.
2717         (resolve_typename_type): New function.
2718         * semantics.c (finish_call_expr): Use build_new_op, not
2719         build_opfncall.
2720         (begin_constructor_declarator): Remove.
2721         (begin_class_definition): Adjust call to pushclass.
2722         (enter_scope_of): Remove.
2723         * typeck.c (comptypes): Resolve typename types as appropriate.
2724         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
2725         (build_x_compound_expr): Likewise.
2726         (build_modify_expr): Likewise.
2727         (build_x_modify_expr): Likewise.
2728         * typeck2.c (build_x_arrow): Likewise.
2730 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
2732         * pt.c (last_pending_template) Declare GTY().
2734 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2736         PR c++/8591
2737         * parser.c (cp_parser_elaborated_type_specifier): Convert
2738         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
2739         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
2741 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
2743         PR c++/9437
2744         * pt.c (unify): Don't unify '*T' with 'U C::*'.
2746         PR c++/3902
2747         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
2748         inside a declarator.
2750 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
2752         * class.c (update_vtable_entry_for_fn): Add index parameter.
2753         Generate vcall thunk for covariant overriding from a virtual
2754         primary base.
2755         (dfs_modify_vtables): Adjust.
2757 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
2759         PR c++/9403
2760         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
2761         template keyword.
2762         (cp_parser_base_specifier): Look for and consume a
2763         TEMPLATE keyword. Replace switch with array index.
2765         PR c++/795
2766         * semantics.c (finish_non_static_data_member): Remember the
2767         field's type even in a template.
2769         PR c++/9415
2770         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
2771         already scoped.
2773         PR c++/8545
2774         * parser.c (cp_parser_cast_expression): Be more tentative.
2776 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2778         * cp-tree.h (flagged_type_tree_s): Remove.
2779         (check_for_new_type): Likewise.
2780         * typeck2.c (check_for_new_type): Likewise.
2782 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
2784         * dump.c: ANSIfy function declarations and definitions.
2786         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
2788 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
2790         PR c++/9354
2791         * init.c (build_new): Set the type of the new-expression, even
2792         when processing_templte_decl.
2794         PR c++/9216
2795         * parser.c (cp_parser_primary_expression): Improve error message
2796         for templates used in an expression context.
2798         PR c++/8696
2799         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
2800         parse when encountering "typedef".
2802 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
2804         * class.c, parser.c: ANSIfy function definitions and declarations.
2806 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
2808         PR c++/9328
2809         * error.c (dump_decl): For an OVERLOAD, just print the name of the
2810         function; it doesn't make sense to try to print its type.
2811         * semantics.c (finish_typeof): Issue errors about invalid uses.
2813         PR c++/9298
2814         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
2815         function.
2816         (cp_parser_expression_statement): Use it.
2817         (cp_parser_explicit_instantiation): Likewise.
2818         * pt.c (do_decl_instantiation): Improve error handling logic.
2820 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
2822         PR c++/9384
2823         * parser.c (cp_parser_using_declaration): Issue error messages
2824         about name resolution failures here.
2826         PR c++/9388
2827         * class.c (currently_open_derived_class): Use dependent_type_p.
2828         * cp-tree.h (dependent_type_p): New function.
2829         (dependent_template_arg_p): Likewise.
2830         (dependent_template_p): Likewise.
2831         (type_dependent_expression_p): Likewise.
2832         * parser.c (cp_parser_dependent_type_p): Remove.
2833         (cp_parser_value_dependent_type_p): Likewise.
2834         (cp_parser_type_dependent_expression_p): Likewise.
2835         (cp_parser_dependent_template_arg_p): Likewise.
2836         (cp_parser_dependent_template_id_p): Likewise.
2837         (cp_parser_dependent_template_p): Likewise.
2838         (cp_parser_diagnose_invalid_type_name): Replace
2839         cp_parser_dependent_type_p with dependent_type_p, etc.
2840         (cp_parser_primary_expresion): Likewise.
2841         (cp_parser_nested_name_specifier_opt): Likewise.
2842         (cp_parser_postfix_expression): Likewise.
2843         (cp_parser_unary_expression): Likewise.
2844         (cp_parser_template_name): Likewise.
2845         (cp_parser_class_name): Likewise.
2846         (cp_parser_lookup_name): Likewise.
2847         * pt.c (dependent_type_p): New function.
2848         (value_dependent_expression_p): Likewise.
2849         (type_dependent_expression_p): Likewise.
2850         (dependent_template_arg_p): Likewise.
2851         (dependent_template_id_p): Likewise.
2852         (dependent_template_p): Likewise.
2854         PR c++/9285
2855         PR c++/9294
2856         * parser.c (cp_parser_simple_declaration): Return quickly when
2857         encountering errors.
2859 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2861         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
2863 2003-01-17  Jason Merrill  <jason@redhat.com>
2865         PR c++/9167, c++/9358
2866         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
2868 2003-01-17  Jason Merrill  <jason@redhat.com>
2870         PR c++/9342
2871         * call.c (build_conditional_expr): Always do lvalue-rvalue
2872         conversion.
2874 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
2876         PR c++/9294
2877         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
2878         * cp-tree.h (BASELINK_BINFO): Adjust.
2879         (BASELINK_FUNCTIONS): Likewise.
2880         (BASELINK_ACCESS_BINFO): Likewise.
2881         (tree_baselink): New structure.
2882         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
2883         (lang_tree_node): Add baselink.
2884         * decl.c (cp_tree_node_structure): Add BASELINK case.
2885         * search.c (build_baselink): Adjust.
2886         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
2887         test from TREE_LIST case.
2889         PR c++/9272
2890         * parser.c (cp_parser_constructor_declarator_p): Do not assume
2891         that a constructor cannot be declared outside of its own class.
2893         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
2894         be resolved, neither can the qualified name.
2896         * rtti.c (get_pseudo_ti_desc): Fix thinko.
2898 2003-01-16  Jason Merrill  <jason@redhat.com>
2900         PR c++/8564
2901         * init.c (build_vec_init): Re-add maxindex parm.
2902         (perform_member_init, build_aggr_init): Pass it.
2903         (build_new_1): Pass it. Use an incomplete array type for full_type.
2904         * typeck.c (build_modify_expr): Pass it.
2905         * cp-tree.h: Adjust.
2907 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
2909         * cp-tree.h (tsubst_copy_and_build): New declaration.
2910         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
2911         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
2912         (tsubst_copy_and_build): New function.
2914 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
2916         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
2917         (PARTIAL_INSTANTIATION_P): Remove.
2918         (IMPLICIT_TYPENAME_P): Likewise.
2919         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
2920         (build_typename_type): Remove declaration.
2921         (parmlist_is_exprlist): Likewise.
2922         * decl.c (build_typename_type): Make it static, remove third
2923         parameter.
2924         (push_class_binding): Don't do implicit typename stuff.
2925         (make_typename_type): Likewise.
2926         (lookup_name_real): Likewise.
2927         (grokdeclarator): Don't try to convert declarations into
2928         initializations.  Don't do implicit typename stuff.
2929         (parmlist_is_exprlist): Remove.
2930         (xref_basetypes): Simplify.
2931         * decl2.c (grokfield): Don't try to convert declarations into
2932         initializations.
2933         (build_anon_union_vars): Do this while processing templates, too.
2934         (finish_anon_union): Likewise.
2935         * error.c (dump_type): Remove implicit typename handling.
2936         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
2937         (cp_parser_primary_expression): Correct handling of names not
2938         found by unqualified name lookup in templates.
2939         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
2940         of types when possible.
2941         (cp_parser_simple_declaration): Complain intelligently about some
2942         invalid declarations.
2943         (cp_parser_member_declaration): Likewise.
2944         (cp_parser_constructor_declarator_p): Don't check when we're in a
2945         function scope.
2946         * pt.c (instantiate_class_template): Remove
2947         PARTIAL_INSTANTIATION_P gunk.
2948         * search.c (lookup_field_r): Don't build implicit typenames.
2949         (marked_pushdecls_p): Don't enter dependent base types.
2950         (unmarked_pushdecls_p): Likewise.
2951         * semantics.c (begin_class_definition): Remove implicit typename
2952         stuff.
2954 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
2956         PR c++/9212
2957         * parser.c (cp_parser_direct_declarator): If accepting either
2958         abstract or named, the name must be an unqualified-id.
2960 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2962         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
2964 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2966         * decl2.c (check_classfn): Fix uninitialized warning.
2967         (build_anon_union_vars): Likewise.
2968         * pt.c (tsubst_copy): Likewise.
2970 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
2972         Further conform g++'s __vmi_class_type_info to the C++ ABI
2973         specification.
2974         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
2975         the specification.
2976         (class_hint_flags): Likewise.
2978 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2980         * config-lang.in: Add semantics.c to gtfiles.
2981         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
2982         (saved_scope): Likewise.
2983         (type_lookups): Remove.
2984         (deferred_access): New structure.
2985         (type_access_control): Remove.
2986         (save_type_access_control): Likewise.
2987         (reset_type_access_control): Likewise.
2988         (decl_type_access_control): Likewise.
2989         (push_deferring_access_checks): Declare.
2990         (resume_deferring_access_checks): Likewise.
2991         (stop_deferring_access_checks): Likewise.
2992         (pop_deferring_access_checks): Likewise.
2993         (get_deferred_access_checks): Likewise.
2994         (pop_to_parent_deferring_access_checks): Likewise.
2995         (perform_deferred_access_checks): Likewise.
2996         (perform_or_defer_access_check): Likewise.
2997         * decl.c (make_typename_type): Use perform_or_defer_access_check.
2998         (make_unbound_class_template): Likewise.
2999         (grokdeclarator): Don't call decl_type_access_control.
3000         * parser.c (cp_parser_context): Remove deferred_access_checks
3001         and deferring_access_checks_p fields.
3002         (cp_parser_context_new): Adjust.
3003         (cp_parser): Remove access_checks_lists.
3004         (cp_parser_defer_access_check): Remove.
3005         (cp_parser_start_deferring_access_checks): Remove.
3006         (cp_parser_stop_deferring_access_checks): Remove.
3007         (cp_parser_perform_deferred_access_checks): Remove.
3008         (cp_parser_nested_name_specifier_opt): Use new deferred access
3009         functions.
3010         (cp_parser_simple_declaration): Likewise.
3011         (cp_parser_template_id): Likewise.
3012         (cp_parser_function_definition): Likewise.
3013         (cp_parser_class_specifier): Likewise.
3014         (cp_parser_lookup_name): Likewise.
3015         (cp_parser_single_declaration): Likewise.
3016         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
3017         (cp_parser_parse_tentatively): Likewise.
3018         (cp_parser_parse_definitely): Likewise.
3019         (yyparse): Likewise.
3020         (cp_parser_init_declarator): Remove access_checks parameter.
3021         Use new deferred access functions.
3022         (cp_parser_function_definition_from_specifiers_and_declarator):
3023         Likewise.
3024         (cp_parser_class_head): Remove deferring_access_checks_p and
3025         saved_access_checks parameters.  Use new deferred access functions.
3026         (cp_parser_member_specification_opt): Don't call
3027         reset_type_access_control.
3028         * search.c (type_access_control): Remove.
3029         * semantics.c: Include "gt-cp-semantics.h".
3030         (deferred_type_access_control): Remove.
3031         (deferred_access_stack): New variable.
3032         (deferred_access_free_list): Likewise.
3033         (push_deferring_access_checks): New function.
3034         (resume_deferring_access_checks): Likewise.
3035         (stop_deferring_access_checks): Likewise.
3036         (pop_deferring_access_checks): Likewise.
3037         (get_deferred_access_checks): Likewise.
3038         (pop_to_parent_deferring_access_checks): Likewise.
3039         (perform_deferred_access_checks): New function, adapted from
3040         cp_parser_perform_deferred_access_checks.
3041         (perform_or_defer_access_check): New function, adapted from
3042         cp_parser_defer_access_check.
3043         (current_type_lookups): Remove.
3044         (deferred_type_access_control): Likewise.
3045         (decl_type_access_control): Likewise.
3046         (save_type_access_control): Likewise.
3047         (reset_type_access_control): Likewise.
3048         (begin_function_definition): Adjust.
3049         (begin_class_definiton): Likewise.
3051 2003-01-13  Jason Merrill  <jason@redhat.com>
3053         PR c++/8748
3054         * class.c (build_base_path): Take the address before calling save_expr.
3056         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
3057         all the ambiguous conversions are bad.
3059         * class.c (maybe_warn_about_overly_private_class): Don't stop
3060         searching when we find a nonprivate method.
3062         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
3064 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
3066         * cp-tree.h (get_arglist_len_in_bytes): Remove.
3068         PR c++/9264
3069         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
3070         typeame types more robustly.
3072 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
3074         * parser.c:  Fix comment typos.
3076 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
3078         PR c++/9099
3079         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
3080         an object_type which is not a class type.
3082 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
3084         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
3085         (cp_parser_late_parsing_default_args): Likewise.
3087 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
3089         * cfns.gperf: ANSIfy function declarations.
3090         * cfns.h: Regenerate.
3091         * cp-tree.h: ANSIfy function declarations.
3093 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
3095         * cp-tree.h (reparse_absdcl_as_expr): Remove.
3096         (reparse_absdcl_as_casts): Likewise.
3097         (reparse_decl_as_expr): Likewise.
3098         (finish_decl_parsing): Likewise.
3099         * decl2.c (reparse_absdcl_as_expr): Remove.
3100         (reparse_absdcl_as_casts): Likewise.
3101         (repase_decl_as_expr): Likewise.
3102         (finish_decl_parsing): Likewise.
3104         PR c++/9128
3105         PR c++/9153
3106         PR c++/9171
3107         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
3108         function.
3109         (cp_parser_nested_name_specifier_opt): Correct the
3110         check_dependency_p false.
3111         (cp_parser_postfix_expression): Fix formatting.
3112         (cp_parser_decl_specifier_seq): Avoid looking for constructor
3113         declarators when possible.
3114         (cp_parser_template_id): Avoid performing name-lookup when
3115         possible.
3116         (cp_parser_class_head): Do not count specializations when counting
3117         levels of templates.
3118         (cp_parser_constructor_declarator_p): Return immediately if
3119         there's no chance that the tokens form a constructor declarator.
3120         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
3121         expression with reference type.
3122         (get_tinfo_decl_dynamic): Do not return an expression with
3123         reference type.
3124         (build_typeid): Add comment.  Do not return an expression with
3125         reference type.
3126         * typeck.c (build_class_member_access_expr): Improve handling of
3127         conditionals and comma-expressions as objects.
3129 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
3131         * cfns.gperf: ANSIfy function declarations.
3132         * cfns.h: Regenerate.
3133         * cp-tree.h: ANSIfy function declarations.
3134         * parser.c: ANSIfy function declarations & definitions.
3136         * decl.c (bad_specifiers): Fix parameter order error I introduced.
3138 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
3140         Merge from pch-branch:
3142         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
3144         Merge to tag pch-merge-20030102:
3146         * semantics.c (finish_translation_unit): Don't call finish_file.
3147         * parser.c: Don't include ggc.h.
3148         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
3149         read first token here.  Don't allow PCH files after the first
3150         token is read.
3151         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
3152         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
3153         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
3154         (cp_parser_late_parsing_for_member): Don't duplicate call to
3155         cp_lexer_set_source_position_from_token.
3156         (cp_parser_late_parsing_default_args): Likewise.
3157         (yyparse): Call finish_file after clearing the_parser.
3159         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
3161         * Make-lang.in: Remove $(GGC_H) from all dependencies.
3162         (CXX_TREE_H): Add $(GGC_H).
3163         * class.c: Don't include ggc.h.
3164         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
3165         (method_name_cmp): Likewise.
3166         (resort_data): New variable.
3167         (resort_field_decl_cmp): New.
3168         (resort_method_name_cmp): New.
3169         (resort_sorted_fields): New.
3170         (resort_type_method_vec): New.
3171         (finish_struct_methods): Delete cast.
3172         (finish_struct_1): Delete cast.
3173         * cp-tree.h: Include ggc.h.
3174         (struct lang_type_class): Add reorder attribute to field `methods'.
3175         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
3176         (resort_sorted_fields): New prototype.
3177         (resort_type_method_vec): New prototype.
3178         * call.c: Don't include ggc.h.
3179         * decl.c: Likewise.
3180         * decl2.c: Likewise.
3181         * init.c: Likewise.
3182         * lex.c: Likewise.
3183         * method.c: Likewise.
3184         * optimize.c: Likewise.
3185         * parse.y: Likewise.
3186         * pt.c: Likewise.
3187         * repo.c: Likewise.
3188         * search.c: Likewise.
3189         * semantics.c: Likewise.
3190         * spew.c: Likewise.
3191         * tree.c: Likewise.
3193         * lang-specs.h: Remove comment.
3195         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
3197         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
3198         (operator_name_info): Mark to be saved for PCH, specify size.
3199         (assignment_operator_name_info): Likewise.
3201         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
3203         * decl.c (anon_cnt): Mark to be saved for PCH.
3205         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
3207         * lex.c  (init_reswords): Delete now-untrue comment.
3208         Allocate ridpointers using GGC.
3210         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
3212         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
3214         * g++spec.c (lang_specific_driver): Don't include standard
3215         libraries in `added'.
3217         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
3219         * decl2.c (finish_file): Call c_common_write_pch.
3220         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
3222         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
3224         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
3225         files when using g++.
3226         * lang-specs.h: Handle compiling C++ header files.
3228 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
3230         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
3232 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3234         * pt.c (push_access_scope_real): Call push_to_top_level for
3235         function in namespace scope.
3236         (pop_access_scope): Call pop_from_top_level for function in
3237         namespace scope.
3239 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
3241         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
3243 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
3245         * Make-lang.in (c++.install-common, c++.install-man,
3246         c++.uninstall): Prepend $(DESTDIR) to destination paths in
3247         all (un)installation commands.
3248         (c++.install-common): Rewrite $(LN) commands to support
3249         DESTDIR with "ln" as well as with "ln -s".
3251 2003-01-08  Jason Merrill  <jason@redhat.com>
3253         * parser.c (cp_parser_primary_expression): See through explicitly
3254         scoped ALIAS_DECLs, too.
3256 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
3258         * decl.c: Remove some #if 0 code.
3260         * decl.c: ANSIfy function declarations.
3262 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
3264         * parser.c (cp_parser_asm_definition): Correct handling of omitted
3265         operands.
3267 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3269         PR c++/9030
3270         * decl.c (make_typename_type): Check access only when tf_error.
3271         (make_unbound_class_template): Likewise.
3272         * pt.c (saved_access_scope): New variable.
3273         (push_access_scope_real): New function.
3274         (push_access_scope): Likewise.
3275         (pop_access_scope): Likewise.
3276         (tsubst_default_argument): Use them.
3277         (instantiate_template): Likewise.
3278         (regenerate_decl_from_template): Likewise.
3279         (instantiate_decl): Likewise.
3280         (get_mostly_instantiated_function_type): Likewise.
3282 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
3284         * tree.c: Delete bogus #if 0 code.
3286 2003-01-07  Andreas Schwab  <schwab@suse.de>
3288         * class.c (layout_class_type): Don't use
3289         PCC_BITFIELD_TYPE_MATTERS if not defined.
3291 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
3293         PR c++/9165
3294         * decl2.c (build_cleanup): Mark the object as used.
3296         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
3297         (hash_local_specialization): New function.
3298         (register_local_specialization): Revert 2003-01-05 change.
3299         (instantiate_decl): Use hash_local_specialization when creating
3300         the local_specializations table.
3302         * decl2.c (mark_used): Do not synthesize thunks.
3304         * class.c (layout_class_type): Correct handling of unnamed
3305         bitfields wider than their types.
3307         PR c++/9189
3308         * parser.c (cp_parser): Remove default_arg_types.  Update
3309         documentation for unparsed_functions_queues.
3310         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
3311         parameter.
3312         (cp_parser_new): Don't set parser->default_arg_types.
3313         (cp_parser_function_definition): Adjust usage of
3314         unparsed_funtions_queues.
3315         (cp_parser_class_specifier): Don't mess with
3316         parser->default_arg_types.  Handle default argument processing in
3317         a separate phase from function body processing.
3318         (cp_parser_template_declaration_after_export): Adjust usage of
3319         unparsed_functions_queues.
3320         (cp_parser_late_parsing_for_member): Do not handle default
3321         arguments.
3323 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
3325         PR c++/9109
3326         * parser.c (cp_parser_declarator_kind): New enum.
3327         (cp_parser_declarator): Adjust.
3328         (cp_parser_direct_declarator): Adjust. Allow for either named or
3329         abstract declarator. Prefer abstract, if possible. Allow
3330         parenthesized function name.
3331         (cp_parser_condition): Adjust cp_parser_declarator call.
3332         (cp_parser_explicit_instantiation): Likewise.
3333         (cp_parser_init_declarator): Likewise.
3334         (cp_parser_type_id): Likewise.
3335         (cp_parser_function_definition): Likewise.
3336         (cp_parser_member_declaration): Likewise.
3337         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
3338         the tentative parsing.
3339         (cp_parser_exception_declaration): Likewise.
3341 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
3343         * parser.c (cp_parser_template_parameter): Adjust call to
3344         cp_parser_parameter_declaration.
3345         (cp_parser_parameter_declaration_list): Likewise.
3346         (cp_parser_parameter_declaration): Replace
3347         greater_than_is_operator_p with template_parm_p parameter.  Do not
3348         cache tokens for template default arguments.
3350         * pt.c (retrieve_local_specialization): Use htab_find, not
3351         htab_find_with_hash.
3352         (register_local_specialization): Use htab_find_slot, not
3353         htab_find_slot_with_hash.
3354         (instantiate_decl): Pass a hash function to htab_create.
3356 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3358         * parser.c (cp_parser_binary_expression,
3359         cp_parser_multiplicative_expression,
3360         cp_parser_additive_expression, cp_parser_shift_expression,
3361         cp_parser_relational_expression, cp_parser_equality_expression,
3362         cp_parser_and_expression, cp_parser_exclusive_or_expression,
3363         cp_parser_inclusive_or_expression,
3364         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
3365         cp_parser_binary_expression): Const-ify.
3367 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
3369         * method.c (use_thunk): Disable access control while building the
3370         body of the thunk.
3372 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
3374         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
3375         front end.
3377 2003-01-03  Matt Austern  <austern@apple.com>
3379         * cp-tree.h (struct lang_type_class): add field for key method
3380         (cp_global_trees): rename dynamic_classes to keyed_classes
3381         (key_method): add definition
3382         * class.c (finish_struct_1): compute class's key method, and add
3383         the class to keyed_classes list if there is no key method.
3384         * decl.c (finish_function): add class to keyed_classes list if we
3385         see a definition of the class's key method.
3386         * pt.c (instantiate_class_template): add template specialization
3387         of a dynamic class to keyed_classes list.
3388         * decl2.c (key_method): remove
3389         (finish_file): iterate only through keyed_classes list when
3390         deciding whether to emit vtables, remove class from its list after
3391         we do the emission.
3393 2003-01-02  Jason Merrill  <jason@redhat.com>
3395         * call.c (build_conditional_expr): Stabilize lvalues properly.
3396         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
3397         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
3398         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
3400         * call.c (convert_like_real): Call decl_constant_value for an
3401         IDENTITY_CONV even if there are no more conversions.
3403         * cvt.c (build_up_reference): Don't push unnamed temps.
3405         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
3407         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
3408         for a backend struct.
3410         * except.c (wrap_cleanups_r, build_throw): Make
3411         MUST_NOT_THROW_EXPRs void.
3412         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
3414         * init.c (build_vec_delete_1): Pre-evaluate the base address.
3416         * init.c (get_temp_regvar): Simplify logic.
3418         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
3419         our replacement is a decl.
3421         * decl.c (cp_make_fname_decl): Push the decls inside the
3422         outermost scope.
3424 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
3426         PR c++/45, c++/3784
3427         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
3428         the same too.
3430 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
3432         * parser.c (struct cp_parser): Add access_checks_lists field
3433         (cp_parser_simple_declaration): Use.
3434         (cp_parser_init_declarator): Likewise.
3436 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
3438         * parser.c (cp_parser_declaration): Accept the __extension__
3439         keyword before the declaration.
3441         PR c++/2843
3442         * parser.c (cp_parser_parameter_declaration): Allow attributes to
3443         appear after the declarator.
3445         * call.c (build_new_method_call): Fix typo in message format
3446         string.
3448 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
3450         * parser.c (cp_lexer_next_token_is): Declare it inline.
3451         (cp_lexer_set_source_position_from_token): Likewise.
3452         (cp_lexer_debugging_p): Likewise.
3453         (cp_parser_parsing_tentatively): Likewise.
3454         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
3455         to the cp_lexer_peek_token.
3457         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
3458         expression.
3460 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
3462         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
3463         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
3464         cp/repo.c: Fix copyright years.
3466 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
3468         * lex.c: Remove superfluous include of cpplib.h.
3469         (CONSTRAINT): Define without conditions.
3470         (init_cp_pragma): Use c_register_pragma.
3472 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
3474         * .cvsignore: Remove.
3476 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3478         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
3479           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
3480           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
3481           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
3482           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
3483           copyright header.
3484         * lex.h: parse.y is dead, so don't mention it.  Also replace the
3485           copyright header with the default GNU copyright header.
3487 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
3489         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
3490         (lookup_name_namespace_only): Likewise.
3491         (begin_only_namespace_names): Likewise.
3492         (end_only_namespace_names): Likewise.
3493         * decl.c (only_namespace_names): Remove.
3494         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
3495         (lookup_name_real): Do not check only_namespace_names.
3496         (lookup_name_namespace_only): Remove.
3497         (begin_only_namespace_names): Likewise.
3498         (end_only_namespace_names): Likewise.
3499         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
3500         nested-name-specifiers more gracefully.
3501         (cp_parser_class_or_namespace_name): Avoid looking up namespace
3502         names when they cannot possibly appear.
3503         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
3504         (cp_parser_elaborated_type_specifier): Likewise.
3505         (cp_parser_namespace_name): Only look for namespace names.
3506         (cp_parser_lookup_name): Add is_namespace parameter.
3507         (cp_parser_lookup_name_simple): Adjust call to
3508         cp_parser_lookup_name.
3510         * parser.c (cp_parser_dependent_type_p): Fix thinko.
3512 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
3514         * .cvsignore: Update.
3516 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
3518         * class.c (modify_vtable_entry): Remove unused variable.
3519         (get_vcall_index): Always expect a non-thunk.
3520         (update_vtable_entry_for_fn): Combine covariant adjustments, when
3521         overriding a thunk. Pass get_vcall_index a non-thunk.
3523         * decl2.c (finish_file): Mark undefined inlines as extern.
3525 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
3527         * cp-tree.def (RETURN_INIT): Remove.
3528         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
3529         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
3530         (note_level_for_for): Remove.
3531         (note_level_for_try): Likewise.
3532         (note_level_for_catch): Likewise.
3533         (finish_named_return_value): Likewise.
3534         (do_pushlevel): Change prototype.
3535         (pending_lang_change): Remove.
3536         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
3537         sk_for.
3538         (note_level_for_for): Remove.
3539         (note_level_for_try): Likewise.
3540         (note_level_for_catch): Likewise.
3541         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
3542         * parser.c (cp_parser_context_free_list): Make it "deletable".
3543         (cp_parser_template_argument): Remove misleading comment.
3544         * pt.c (tsubst_expr): Remove RETURN_INIT code.
3545         * semantics.c (genrtl_named_return_value): Remove.
3546         (do_pushlevel): Take a scope kind as an argument.
3547         (begin_if_stmt): Adjust.
3548         (begin_while_stmt): Likewise.
3549         (begin_for_stmt): Likewise.
3550         (finish_for_init_stmt): Likewise.
3551         (begin_switch_stmt): Likewise.
3552         (begin_handler): Likewise.
3553         (begin_compound_stmt): Likewise.
3554         (finish_named_return_value): Remove.
3555         (cp_expand_stmt): Remove RETURN_INIT case.
3556         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
3558 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
3560         PR c++/9112
3561         * parser.c (cp_parser_direct_declarator): Handle erroneous
3562         parenthesized declarators correctly.
3564 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3566         * cp-tree.h (pending_lang_change): Declare.
3568 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
3570         * parser.c (cp_parser_context_free_list): New variable.
3571         (cp_parser_context_new): Use it.
3572         (cp_parser_error): Check return code from
3573         cp_parser_simulate_error.
3574         (cp_parser_simulate_error): Return a value.
3575         (cp_parser_id_expression): Optimize common case.
3576         (cp_parser_class_name): Likewise.
3577         (cp_parser_class_specifier): Adjust call to
3578         cp_parser_late_parsing_default_args.
3579         (cp_parser_lookup_name): Optimize common case.
3580         (cp_parser_late_parsing_for_member): Adjust call to
3581         cp_parser_late_parsing_default_args.
3582         (cp_parser_late_parsing_default_args): Add scope parameter.
3583         (cp_parser_require): Avoid creating the error message unless it's
3584         needed.
3585         (cp_parser_parse_definitely): Place free'd contexts on the free
3586         list.
3588         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
3590 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
3592         * parser.c (cp_parser_parameter_declaration_clause): Treat system
3593         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
3595 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
3597         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
3598         GCC, not GNU CC.
3600 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
3602         * parse.y: Remove.
3603         * spew.c: Likewise.
3604         * Make-lang.in (gt-cp-spew.h): Remove.
3605         * cp-tree.h (do_pending_lang_change): Remove.
3606         (do_identifier): Change prototype.
3607         (finish_id_expr): Remove.
3608         * decl.c (lookup_name_real): Remove yylex variable.
3609         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
3610         * lex.c (init_cpp_parse): Remove.
3611         (reduce_cmp): Likewise.
3612         (token_cmp): Likewise.
3613         (yychar): Likewise.
3614         (lastiddecl): Likewise.
3615         (token_count): Likewise.
3616         (reduce_count): Likewise.
3617         (yyhook): Likewise.
3618         (print_parse_statistics): Likewise.
3619         (do_pending_lang_change): Likewise.
3620         (do_identifier): Remove parsing parameter.
3621         * lex.h (lastiddecl): Remove.
3622         (looking_for_typename): Remove.
3623         (looking_for_template): Likewise.
3624         (pending_lang_change): Likewise.
3625         (yylex): Likewise.
3626         * semantics.c (finish_id_expr): Remove.
3628         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
3629         thread" correctly.
3631 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
3633         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
3634         end, not the C front end.
3636 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
3638         * cp-tree.h (THUNK_TARGET): New macro.
3639         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
3640         (finish_thunk): Remove offset parms.
3641         * class.c (find_final_overrider): Look through thunks.
3642         (get_vcall_index): Use THUNK_TARGET.
3643         (update_vtable_entry_for_fn): Look through thunks. Set covariant
3644         fixed offset here. Adjust finish_thunk call.
3645         (build_vtbl_initializer): Adjust finish_thunk calls.
3646         * mangle.c (mangle_call_offset): Remove superfluous if.
3647         (mangle_thunk): Adjust.
3648         * method.c (make_thunk): Adjust.
3649         (finish_thunk): Adjust.
3650         (thunk_adjust): Remove assert.
3651         (use_thunk): Use THUNK_TARGET
3652         * dump1.c (cp_dump_tree): Adjust thunk dumping.
3654         PR c++/9054
3655         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
3656         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
3658 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3660         Remove traditional C constructs 4/n.
3661         * decl2.c (grok_method_quals, warn_if_unknown_interface,
3662         grok_x_components, cp_build_parm_decl, build_artificial_parm,
3663         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
3664         delete_sanity, check_member_template, check_java_method,
3665         check_classfn, finish_static_data_member_decl, grokfield,
3666         grokbitfield, grokoptypename, grok_function_init,
3667         cplus_decl_attributes, constructor_name, defer_fn,
3668         build_anon_union_vars, finish_anon_union, coerce_new_type,
3669         coerce_delete_type, comdat_linkage, maybe_make_one_only,
3670         key_method, import_export_vtable, import_export_class,
3671         output_vtable_inherit, import_export_decl, import_export_tinfo,
3672         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
3673         set_guard, start_objects, finish_objects,
3674         start_static_storage_duration_function,
3675         finish_static_storage_duration_function, get_priority_info,
3676         start_static_initialization_or_destruction,
3677         finish_static_initialization_or_destruction,
3678         do_static_initialization, do_static_destruction,
3679         prune_vars_needing_no_initialization, write_out_vars,
3680         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
3681         add_using_namespace, merge_functions, ambiguous_decl,
3682         lookup_using_namespace, lookup_using_namespace,
3683         qualified_lookup_using_namespace, set_decl_namespace,
3684         decl_namespace, current_decl_namespace, push_decl_namespace,
3685         pop_decl_namespace, push_scope, pop_scope, add_function,
3686         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
3687         lookup_arg_dependent, do_namespace_alias,
3688         validate_nonmember_using_decl, do_nonmember_using_decl,
3689         do_toplevel_using_decl, do_local_using_decl,
3690         do_class_using_decl, do_using_directive, check_default_args,
3691         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
3692         * parser.c (cp_parser_class_head): Use booleanss.
3693         * decl.c (walk_globals, walk_vtables): Likewise.
3694         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
3695         walk_globals): Change return type from 'int' to 'bool'.
3696         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
3697         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
3698         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
3699         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
3700         qualifier_flags, tinfo_base_init, generic_initializer,
3701         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
3702         dfs_class_hint_unmark, class_hint_flags, class_initializer,
3703         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
3704         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
3705         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
3706         * repo.c (repo_compile_flags, repo_template_declared,
3707         repo_template_defined, repo_class_defined, repo_get_id,
3708         repo_template_used, repo_vtable_used, repo_inline_used,
3709         repo_tinfo_used, repo_template_instantiated, extract_string,
3710         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
3711         finish_repo): Likewise.
3712         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
3713         cxx_print_xnode): Likewise..
3714         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
3715         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
3716         * cxxfilt.c (demangle_it, print_demangler_list, usage,
3717         standard_symbol_characters, hp_symbol_characters, main, fatal):
3718         Likewise.
3719         (strip_underscore):  Change type from 'int' to 'bool'.
3720         (main): Use boolean constants.
3722 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3724         Remove traditional C constructs 3/n.
3725         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
3726         build_up_reference, warn_ref_binding, convert_to_reference,
3727         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
3728         convert_to_void, convert, convert_force, build_type_conversion,
3729         build_expr_type_conversion, type_promotes_to,
3730         perform_qualification_conversions): Use C90 prototyping style.
3731         * decl2.c (grok_array_decl): Use boolean constant.
3732         (delete_sanity): Likewise.
3733         * typeck.c (build_unary_op): Likewise.
3734         * semantics.c (finish_switch_cond): Likewise.
3735         * parser.c (cp_parser_direct_new_declarator): Likewise.
3736         * init.c (build_new): Likewise.
3738 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
3740         * Make-lang.in (po-generated): Remove parse.c.
3741         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
3742         ($(srcdir)/cp/parse.h): Remove target.
3743         ($(srcdir)/cp/parse.c): Likewise.
3744         (gt-cp-parse.h): Likewise.
3745         (gt-cp-parser.h): New target.
3746         (c++.distclean): Do not remove parse.output.
3747         (c++.maintainer-clean): Do not remove parse.c or parse.h.
3748         (cp/spew.o): Remove target.
3749         (cp/lex.o): Adjust dependencies.
3750         (cp/pt.o): Likewise.
3751         (cp/parse.o): Likewise.
3752         (cp/TAGS): Do not mention parse.c.
3753         (cp/parser.o): New target.
3754         * NEWS: Mention the new parser.
3755         * call.c (build_scoped_method_call): Simplify.
3756         (build_method_call): Likewise.
3757         (build_new_function_call): Adjust calls to add_function_candidate
3758         and add_template_candidate.
3759         (build_new_op): Improve handling of erroroneous operands.
3760         (convert_default_arg): Remove circular argument processing.
3761         (name_as_c_string): New function.
3762         (build_new_method_call): Use it.
3763         (perform_implicit_conversion): Use error_operand_p.
3764         * class.c (finish_struct_anon): Use constructor_name_p.
3765         (check_field_decls): Likewise.
3766         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
3767         (resolve_address_of_overloaded_function): Likewise.
3768         (instantiate_type): Tweak pointer-to-member handling.
3769         (get_primary_binfo): Remove incorrect assertion.
3770         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
3771         * cp-tree.h (DEFARG_TOKENS): New macro.
3772         (default_arg): New structure.
3773         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
3774         (lang_tree_node): Add default_arg.
3775         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
3776         (type_info_ref_type): New macro.
3777         (saved_scope): Make processing_explicit_instantiation a boolean.
3778         (check_access): New field.
3779         (unparsed_text): Remove.
3780         (language_function): Remove unparsed_inlines.
3781         (error_operand_p): New macro.
3782         (lang_decl): Adjust pending_inline_info.
3783         (DEFARG_POINTER): Remove.
3784         (tag_types): Add typenames.
3785         (lookup_ualified_name): Declare.
3786         (lookup_name_real): Likewise.
3787         (shadow_tag): Adjust prototype.
3788         (get_scope_of_declarator): Declare it.
3789         (process_next_inline): Remove it.
3790         (check_for_missing_semicolon): Likewise.
3791         (maybe_get_template_decl_from_type_decl): Declare it.
3792         (finish_label_stmt): Adjust prototype.
3793         (finish_non_static_data_meber): Declare it.
3794         (finish_pseudo_destructor_call_expr): Rename to ...
3795         (finish_pseudo_destructor_expr): ... this.
3796         (finish_compound_literal): Declare it.
3797         (begin_inline_definitions): Remove it.
3798         (init_spew): Remove.
3799         (peekyylex): Likewise.
3800         (arbitrate_lookup): Likewise.
3801         (frob_opname): Likewise.
3802         (maybe_snarf_defarg): Likewise.
3803         (add_defarg_fn): Likewise.
3804         (do_pending_defargs): Likewise.
3805         (done_pending_defargs): Likewise.
3806         (unprocessed_defarg_fn): Likewise.
3807         (replace_defarg): Likewise.
3808         (end_input): Likewise.
3809         (get_overloaded_fn): Likewise.
3810         * cvt.c (convert_to_reference): Improve error handling.
3811         * decl.c (lookup_name_real): Do not declare it static.
3812         (maybe_push_to_top_level): Set check_access.
3813         (identifier_type_value): Adjust call to lookup_name_real.
3814         (lookup_qualified_name): New method.
3815         (lookup_name_real): Remove special-case parsing code.
3816         (lookup_name-nonclass): Adjust call to lookup_name_real.
3817         (lookup_name_namespace_only): Likewise.
3818         (lookup_name): Likewise.
3819         (check_tag_decl): Return the type declared.
3820         (shadow_tag): Likewise.
3821         (register_dtor_fn): Tweak check_access.
3822         (grokfndecl): Use constructor_name_p.
3823         (get_scope_of_declarator): New function.
3824         (grokdeclarator): Obscure tweaks for slightly different declarator
3825         representations.
3826         (start_method): Return error_mark_node to indicate failure.
3827         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
3828         * decl2.c (constructor_name_full): Simplify.
3829         (constructor_name): Use it.
3830         (build_expr_from_tree): Adjust for changes to do new parser.
3831         (push_scope): Improve robustness.
3832         (validate_nonmember_using_decl): Process declarations, not names.
3833         (do_class_using_decl): Likewise.
3834         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
3835         here.
3836         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
3837         * expr.c (cxx_expand_expr): Handle BASELINKs.
3838         * init.c (member_init_ok_or_else): Issue more errors.
3839         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
3840         * lex.c: Do not include parse.h.
3841         (yypring): Do not declare.
3842         (yylval): Likewise.
3843         (make_reference_declarator): Remove error-generating code.
3844         (rid_to_yy): Remove.
3845         (cxx_init): Do not call init_spew.
3846         (yypring): Remove.
3847         (check_for_missing_semicolon): Remove.
3848         * lex.h (got_scope): Remove.
3849         (got_object): Remove.
3850         * method.c (hack_identifier): Use finish_non_static_data_member.
3851         (implicitly_declare_fn): Adjust use of constructor_name.
3852         * parser.c: New file.
3853         * pt.c (parse.h): Do not include it.
3854         (maybe_get_template_decl_from_template): Do not declare it.
3855         (finish_member_template_decl): Tweak.
3856         (begin_explicit_instantiation): Adjust for
3857         processing_explicit_instantiation being boolean.
3858         (end_explicit_instantiation): Likewise.
3859         (maybe_process_partial_specialization): Tighten specialization
3860         test.
3861         (retrieve_local_specialization): Adjust ue of hash table.
3862         (eq_local_specializations): New function.
3863         (register_local_specialization): Likewise.
3864         (push_template_decl_real): Remove unnecessary test.
3865         (maybe_get_template_decl_from_type_decl): Don't make it static.
3866         (for_each_template_parm_r): Handle TYPEOF_TYPE.
3867         (tsubst_copy): Use retrieive_local_specialization to handle
3868         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
3869         Handle COMPONENT_REFs with pseudo-destructor-expressions.
3870         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
3871         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
3872         (unify): Tweak handling of CONST_DECLs.
3873         (regenerate_decl_from_template): Use push_nested_class.
3874         (template_for_substitution): New funciton.
3875         (instantiate_decl): Use it.  Register parameters as local
3876         specializations.
3877         * rtti.c (init_rtti_processing): Set type_info_ref_type.
3878         (build_typeid): Use it.
3879         (get_typeid): Likeise.
3880         * search.c (accessible_p): Use check_access, not
3881         flag_access_control.
3882         (adjust_result_of_qualified_name_lookup): Pay attention to the
3883         context_class.
3884         * semantics.c (finish_asm_stmt): Adjust error handling.
3885         (finish_label_stmt): Return the statement.
3886         (finish_non_static_data_member): New function.
3887         (finish_class_expr): Handle BASELINKs.
3888         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
3889         (finish_object_call_expr): Simplify handling during templates.
3890         (finish_pseudo_destructor_call_expr): Rename to ...
3891         (finish_pseudo_dtor_expr): ... this.
3892         (finish_compound_literal): New function.
3893         (begin_inline_definitions): Remove.
3894         (finish_sizeof): Remove special template handling.
3895         * spew.c: Do not include parse.h.
3896         * tree.c (get_overloaded_fn): Remove.
3897         * typeck.c (build_class_member_access_expr): Handle
3898         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
3899         (lookup_destructor): New function.
3900         (finish_class_member_access_expr): Use it.
3901         (convert_arguments): Simplify.
3902         (build_unary_op): Handle BASELINKs.
3904 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
3906         PR c++/4803
3907         * decl2.c (mark_used): Defer inline functions.
3908         (finish_file): Merge deferred_fns loops. Check all used
3909         inline functions have a definition.
3910         * method.c (make_thunk): Thunks are not inline.
3912         PR c++/5116, c++/764
3913         * call.c (build_new_op): Make sure template class operands are
3914         instantiated.
3916 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
3918         PR C++/7964
3919         * cp-tree.h (resolve_scoped_fn_name): Prototype.
3920         * call.c (resolve_scoped_fn_name): New function. Deal with
3921         more template expansion. Broken out of ...
3922         * parse.y (parse_finish_call_expr): ... here. Call it.
3923         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
3924         resolve_scoped_fn_name and build_call_from_tree.
3926         PR c++/9053
3927         * decl.c (duplicate_decls): Templates may be disambiguated by
3928         return type.
3930         PR c++/8702
3931         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
3932         conversion operators on failure.
3934 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3936         Remove traditional C constructs 2/n.
3937         * call.c (tourney, build_field_call, equal_functions, joust,
3938         compare_ics, build_over_call, build_java_interface_fn_ref,
3939         convert_like_real, op_error, build_object_call, resolve_args,
3940         build_vfield_ref, check_dtor_name, build_scoped_method_call,
3941         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
3942         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
3943         standard_conversion, reference_related_p,
3944         reference_compatible_p, convert_class_to_reference,
3945         direct_reference_binding, reference_binding,
3946         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
3947         add_template_conv_candidate, any_viable, any_strictly_viable,
3948         build_this, splice_viable, print_z_candidates,
3949         build_user_type_conversion, build_new_function_call,
3950         conditional_conversion, build_conditional_expr, build_new_op,
3951         build_op_delete_call, enforce_access, call_builtin_trap,
3952         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
3953         convert_default_arg, type_passed_as, convert_for_arg_passing,
3954         in_charge_arg_for_name, is_properly_derived_from,
3955         maybe_handle_implicit_object, maybe_handle_ref_bind,
3956         source_type, add_warning, can_convert, can_convert_arg,
3957         perform_implicit_conversion, can_convert_arg_bad,
3958         initialize_reference, add_conv_candidate,
3959         add_template_candidate_real, add_template_candidate): Ansify.
3961 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
3963         PR c++/8572
3964         * cp-tree.h (grokoptypename): Add SCOPE parameter.
3965         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
3966         if in a template scope.
3967         * parse.y (unoperator): Return the scope.
3968         (operator_name): Adjust grokoptypename call.
3970 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3972         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
3973         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
3974         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
3976 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
3978         * ChangeLog: Fix a typo.
3979         * class.c: Fix comment typos.
3980         * cp-tree.h: Likewise.
3982 2002-12-18  Jason Merrill  <jason@redhat.com>
3984         Handle anonymous unions at the tree level.
3985         C++ ABI change: Mangle anonymous unions using the name of their
3986         first named field (by depth-first search).  Should not cause
3987         binary compatibility problems, though, as the compiler previously
3988         didn't emit anything for affected unions.
3989         * cp-tree.def (ALIAS_DECL): New tree code.
3990         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
3991         first field, not the largest.
3992         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
3993         push the decl, and write it out at namespace scope.
3994         * decl.c (lookup_name_real): See through an ALIAS_DECL.
3995         (pushdecl): Add namespace bindings for ALIAS_DECLs.
3996         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
3997         of a decl which doesn't have one.
3998         * typeck.c (build_class_member_access_expr): Don't recurse if
3999         we already have the type we want.
4001 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4003         PR c++/8099
4004         * friend.c (make_friend_class): Allow partial specialization
4005         when declaration is not a template friend.
4007 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4009         PR c++/3663
4010         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
4011         TREE_PROTECTED to created decl nodes.
4013 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
4015         * class.c (build_base_field): Do not set DECL_PACKED on the
4016         FIELD_DECL.
4018 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4020         * cp-tree.h (struct tree_srcloc): Use location_t.
4021         (SOURCE_LOCUS): New.
4022         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
4024 2002-12-17  Jason Merrill  <jason@redhat.com>
4026         * decl.c (finish_function): Also complain about no return in
4027         templates.
4028         * semantics.c (finish_return_stmt): Also call check_return_expr in
4029         templates.
4030         * typeck.c (check_return_expr): In a template, just remember that we
4031         saw a return.
4033 2002-12-16  Jason Merrill  <jason@redhat.com>
4035         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
4036         of the CALL_EXPR.
4038         * semantics.c (do_pushlevel): Call pushlevel after adding the
4039         SCOPE_STMT.
4040         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
4041         * parse.y (function_body): Go back to using compstmt.
4042         * decl.c (pushdecl): Skip another level to get to the parms level.
4044         * call.c (build_new_method_call): Use is_dummy_object to determine
4045         whether or not to evaluate the object parameter to a static member
4046         function.
4048 2002-12-14  Jason Merrill  <jason@redhat.com>
4050         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
4051         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
4052         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
4053         don't bother with an AGGR_INIT_EXPR.
4054         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
4055         just generate a new decl normally.  Take return slot parm.
4056         * cp-tree.h: Adjust prototype.
4058 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4060         PR C++/8031
4061         * cvt.c (convert_to_pointer_force): Don't try comparing against
4062         erronous type.
4064 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
4066         * cp-tree.h: Have the multiple-include guards around
4067         the entire file.
4069 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
4071         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
4072         for SPEW_DEBUG.
4073         (snarf_method): Same.
4074         (snarf_defarg): Same.
4076 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
4078         PR c++/8372
4079         * pt.c (tsubst_copy): Handle destructor names more correctly.
4081 2002-12-10  Matt Austern   <austern@apple.com>
4083         * cp-tree.h: get rid of needs_virtual_reinit bit.
4085 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
4087         * NEWS: Document removal of in-class initialization extension for
4088         static data members of non-arithmetic, non-enumeration type.
4089         * decl.c (check_static_variable_definition): Do not allow that
4090         extension.
4091         * decl2.c (grokfield): Do not call digest_init when processing
4092         templates.
4094 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4096         * error.c (dump_expr): Fix format specifier warning.
4098 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
4100         * class.c (finish_struct_1): Correct comment.
4101         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
4103 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4105         PR C++/8799
4106         * error.c (dump_expr): Don't ever try to dump a non-existent
4107         expression.
4109 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
4111         Implement covariant returns.
4112         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
4113         (struct lang_decl_flags): Add this_thunk_p flag.
4114         Rename vcall_offset to virtual_offset.
4115         (struct lang_decl): Rename delta to fixed_offset.
4116         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
4117         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
4118         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
4119         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
4120         (make_thunk): Add this_adjusting arg.
4121         (finish_thunk): Declare.
4122         (mangle_thunk): Add this_adjusting arg.
4123         * class.c (get_vcall_index): Use base function for lookup.
4124         (update_vtable_entry_for_fn): Generate covariant thunk.
4125         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
4126         (build_vtbl_initializer): Use base function for lookup.
4127         Finish covariant thunk here. Adjust thunk generation.
4128         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
4129         Adjust thunk dumping.
4130         * mangle.c (mangle_call_offset): New function.
4131         (mangle_thunk): Adjust for covariant thunks.
4132         * method.c (make_thunk): Adjust. Do not set name here.
4133         (finish_thunk): New function. Set name here.
4134         (use_thunk): Generate covariant thunks too.
4135         (thunk_adjust): New function.
4136         * search.c (covariant_return_p): Remove. Fold into ...
4137         (check_final_overrider): ... here. Simplify.
4138         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
4140 2002-12-03  Jason Merrill  <jason@redhat.com>
4142         PR c++/8674
4143         * call.c (build_over_call): Check specifically for TARGET_EXPR
4144         when eliding.
4146         PR c++/8461, c++/8625
4147         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
4148         (cp_convert_parm_for_inlining): Remove.
4149         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
4150         Remove.
4151         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
4152         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
4154         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
4155         an ambiguous conversion.
4157 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
4159         PR c++/8688
4160         * decl.c (reshape_init): Handle erroneous initializers.
4162 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
4164         PR c++/8720
4165         * spew.c (remove_last_token): Make sure that last_chunk is set
4166         correctly.
4168         PR c++/8615
4169         * error.c (dump_expr): Handle character constants with
4170         TREE_OVERFLOW set.
4172 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4174         DR 180
4175         * decl.c (grokdeclarator): Require class-key for all friend class.
4176         Output the correct type and context in the error message.
4178 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
4180         PR c++/5919
4181         * pt.c (unify): Use variably_modified_type_p to test validity of
4182         template argument types.
4184         PR c++/8727
4185         * cp-tree.h (lang_type_class): Add typeinfo_var.
4186         (CLASSTYPE_TYPEINFO_VAR): New macro.
4187         * rtti.c (get_tinfo_decl): Use it.
4189         PR c++/8663
4190         * init.c (expand_member_init): Always get the main variant of a
4191         base class.
4193 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
4195         PR c++/8332
4196         PR c++/8493
4197         * decl.c (cxx_init_decl_processing): Use size_type_node, not
4198         c_size_type_node.
4199         * decl2.c (coerce_new_type): Likewise.
4200         * except.c (do_allocate_exception): Likewise.
4202 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
4204         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
4205         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
4206         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
4207         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
4208         typeck2.c: Include coretypes.h and tm.h.
4209         * Make-lang.in: Update dependencies.
4211 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
4213         PR c++/8227
4214         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
4215         (check_initializer): Validate the type of the initialized
4216         variable, even if the initializer is absent.
4217         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
4219         PR c++/8214
4220         * typeck.c (convert_for_assignment): Do not use
4221         decl_constant_value on the operand.
4223         PR c++/8511
4224         * pt.c (instantiate_decl): Handle template friends defined outside
4225         of the class correctly.
4227 2002-11-29  Joe Buck <jbuck@synopsys.com>
4229         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
4230         anonymous structs.
4232 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
4234         * class.c (walk_subobject_offsets): Recur on binfos as well as on
4235         types.
4236         (layout_nonempty_base_or_field): Pass it a binfo when processing a
4237         base class.
4238         (layout_empty_base): Likewise.
4239         (build_base_field): Likewise.
4241 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
4243         * class.c (build_base_field): Make sure we get the canonical base
4244         when descending through primary bases.
4246 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
4248         * decl.c (check_initializer): Don't error on initialisation of
4249         a scalar with a brace-enclosed expression.
4251 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
4253         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
4254         (template_parms_equal): Remove prototype.
4255         * typeck.c (buuld_indirect_ref): Reformat.
4257 2002-11-25  Jason Merrill  <jason@redhat.com>
4259         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
4260         and a DO_STMT.
4262 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
4264         * tree.c (cp_build_qualified_type_real): Correct handling of
4265         array types.
4266         * class.c (walk_subobject_offsets): Fix thinko.
4267         (build_base_field): Record offsets of empty bases in primary
4268         virtual bases.
4269         (layout_class_type): Record offsets of empty bases in fields.
4271         * search.c (is_subobject_of_p_1): Fix thinko.
4272         (lookup_field_queue_p): Likewise.
4274 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
4276         * class.c (layout_class_type): Reuse tail padding when laying out
4277         virtual bases.
4279 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
4281         * rtti.c (qualifier_flags): Fix thinko.
4283 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4285         Remove traditional C constructs 1/n.
4286         * cp-tree.h (init_method, set_mangled_name_for_decl,
4287         build_opfncall, hack_identifier, make_thunk, use_thunk,
4288         synthesize_method, implicitly_declare_fn,
4289         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
4290         maybe_clone_body): Remove use of PARAMS.
4292         * method.c (do_build_assign_ref, do_build_copy_constructor,
4293         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
4294         Likewise.
4295         (synthesize_method): Use 'bool' type and constants instead of
4296         'int'.
4297         (locate_copy): Likewise.
4298         (implicitly_declare_fn): Likewise.
4300         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
4301         Remove old-style declaration.
4302         (maybe_clone_body): Use 'bool' type and constants.
4304 2002-11-21  Glen Nakamura  <glen@imodulo.com>
4306         PR c++/8342
4307         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
4308         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
4309         of the branches of a COND_EXPR.
4311 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
4313         * pt.c (for_each_template_parm): Free allocated memory.
4314         * search.c (is_subobject_of_p_1): New function.
4315         (is_subobject_of_p): Avoid walking virtual bases multiple times.
4317 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
4319         * g++spec.c (lang_specific_spec_functions): New.
4321 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
4323         * ChangeLog: Follow spelling conventions.
4324         * class.c: Likewise.
4325         * decl2.c: Likewise.
4327 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
4329         * search.c (dfs_push_decls): Do not try to reorder elements
4330         3..n of method_vec if method_vec has only two elements.
4331         Reverse order of two tests to avoid accessing unallocated
4332         memory.
4334 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
4336         * class.c (dfs_find_final_overrider): Adjust so that the most
4337         derived object is a binfo, rather than a class type.
4338         (find_final_overrider): Likewise.
4339         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
4340         (add_vcall_offset): Likewise.
4342 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4344         PR c++/8389
4345         * pt.c (instantiate_template): Push class scope for member
4346         functions.
4347         (get_mostly_instantiated_function_type): Likewise.  Don't call
4348         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
4349         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
4350         * mangle.c (write_encoding, write_unqualified_name): Adjust.
4352 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
4354         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
4355         vcall offfsets.  Split out ...
4356         (add_vcall_offset): ... new function.
4358         PR c++/8338
4359         * pt.c (for_each_template_parm): Add htab parameter.
4360         (process_partial_specialization): Adjust call.
4361         (push_template_decl_real): Likewise.
4362         (pair_fn_data): Add visited.
4363         (for_each_template_parm_r): Avoid walking duplicates more than
4364         once.
4365         (uses_template_parms): Adjust call to for_each_template_parm.
4367 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
4369         * class.c (add_implicitly_declared_members): Put implicitly
4370         declared functions at the end of TYPE_METHODs when -fabi-version
4371         is at least 2.
4373 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
4375         * decl2.c (finish_file): Correct spelling.
4377 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
4379         * call.c (build_special_member_call): Do not try to lookup VTTs by
4380         name.
4381         * class.c (vtbl_init_data): Add generate_vcall_entries.
4382         (get_vtable_decl): Do not look up virtual tables by name.
4383         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
4384         (set_primary_base): Do not set CLASSTYPE_RTTI.
4385         (determine_primary_base): Likewise.
4386         (get_matching_virtual): Remove.
4387         (get_vcall_index): New function.
4388         (update_vtable_entry_for_fn): Do not try to use virtual thunks
4389         when they are not required.  Assign vcall indices at this point.
4390         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
4391         Do update dynamic_classes.
4392         (build_vtt): Do not add VTTs to the symbol table.
4393         (build_ctor_vtbl_group): Likewise.
4394         (build_vtbl_initializer): Simplify handling of vcall indices.
4395         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
4396         for the most derived class.
4397         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
4398         the vtable.
4399         * cp-tree.h (dynamic_classes): New macro.
4400         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
4401         (CLASSTYPE_RTTI): Remove.
4402         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
4403         (CLASSTYPE_VCALL_INDICES): New macro.
4404         (CLASSTYPE_VTABLES): Likewise.
4405         (BV_USE_VCALL_INDEX_P): Remove.
4406         (build_vtable_path): Remove.
4407         * decl2.c (finish_vtable_vardecl): Remove.
4408         (key_method): Remove #if 0'd code.
4409         (finish_vtable_vardecl): Rename to ...
4410         (maybe_emit_vtables): ... this.
4411         (finish_file): Use it.
4412         * search.c (look_for_overrides_here): Update comment.
4414 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
4416         PR c/7353 redux
4417         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
4419 2002-10-30  Jason Merrill  <jason@redhat.com>
4421         PR c++/8186
4422         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
4423         * call.c (convert_for_arg_passing): Set it.
4424         * except.c (stabilize_throw_expr): Recurse for such an arg.
4426 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
4428         * cp-tree.h (lang_decl_flags): Remove init_priority.
4429         (lang_decl): Add delta.
4430         (GLOBAL_INIT_PRIORITY): Remove.
4431         (THUNK_DELTA): Revise definition.
4432         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
4433         * dump.c (cp_dump_tree): Don't dump it.
4435 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
4437         PR c++/8160
4438         * typeck2.c (process_init_constructor): Call complete_array_type.
4440         PR c++/8149
4441         * decl.c (make_typename_type): Issue errors about invalid results.
4443 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4445         Core issue 287, PR c++/7639
4446         * cp-tree.h (lang_type_class): Add decl_list field.
4447         (CLASSTYPE_DECL_LIST): New macro.
4448         (maybe_add_class_template_decl_list): Add declaration.
4449         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
4450         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
4451         (maybe_add_class_template_decl_list): New function.
4452         (add_implicitly_declared_members): Use it.
4453         * decl.c (maybe_process_template_type_declaration): Likewise.
4454         (pushtag): Likewise.
4455         * friend.c (add_friend): Likewise.
4456         (make_friend_class): Likewise.
4457         * semantics.c (finish_member_declaration): Likewise.
4458         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
4459         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
4460         to process members and friends in the order of declaration.
4462 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
4464         PR c++/8287
4465         * decl.c (finish_destructor_body): Create the label to jump to
4466         when returning from a destructor here.
4467         (finish_function_body): Rather than here.
4469 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
4471         PR c++/7266
4472         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
4473         SCOPE_REF is not null before dereferencing it.
4475 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
4477         * call.c (build_over_call): Use DECL_CONTEXT, not
4478         DECL_VIRTUAL_CONTEXT.
4479         * class.c (modify_vtable_entry): Don't mess with
4480         DECL_VIRTUAL_CONTEXT.
4481         (set_vindex): Remove.
4482         (set_primary_base): Remove vfuns_p parameter.
4483         (determine_primary_base): Likewise.
4484         (modify_all_vtables): Likewise.
4485         (layout_class_type): Likewise.  Adjust calls to other functions
4486         accordingly.
4487         (finish_struct_1): Adjust calls to modified functions.  Set
4488         DECL_VINDEX here.
4489         * cp-tree.h (lang_type_class): Remove vsize.
4490         (CLASSTYPE_VSIZE): Remove.
4491         (lang_decl): Remove thunks.
4492         (DECL_THUNKS): Adjust.
4493         (DECL_VIRTUAL_CONTEXT): Remove.
4494         (duplicate_decls): Don't copy it.
4495         * pt.c (build_template_decl): Don't set it.
4496         (tsubst_decl): Likewise.
4497         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
4499         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
4500         (build_vtable_entry): Remove.
4501         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
4502         (lang_decl): Add thunks.
4503         (DECL_THUNKS): New macro.
4504         * decl.c (duplicate_decls): Copy it.
4505         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
4506         * semantics.c (emit_associated_thunks): Simplify.
4508 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
4510         PR c++/7228
4511         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
4512         lang_type structure exists before accessing field.
4513         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
4514         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
4515         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
4516         * class.c (check_field_decls): Use new macros.
4517         * typeck2.c (process_init_constructor): Remove redundant check for
4518         existence of lang_type structure.
4520 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
4522         * class.c (end_of_base): New method.
4523         (end_of_class): Use it.  Check indirect virtual bases.
4525         * class.c (check_field_decls): Fix typo.
4527 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
4529         PR c++/8067
4530         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
4531         related variables.
4533         PR c++/7679
4534         * spew.c (next_token): Do not return an endless stream of
4535         END_OF_SAVED_INPUT tokens.
4536         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
4537         the cached token stream.
4538         (snarf_defarg): Likewise.
4540 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
4542         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
4543         variably_modified_type_p.
4544         * cp-tree.h: Remove prototype of variably_modified_type_p.
4545         * tree.c (variably_modified_type_p): Remove; now implemented
4546         in language-independent code.
4548 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
4550         PR c++/6579
4551         * spew.c (snarf_parenthesized_expression): New function.
4552         (snarf_block): Use it.
4554 2002-10-22  Richard Henderson  <rth@redhat.com>
4556         * method.c (use_thunk): Always compute vcall_value; assert that
4557         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
4558         for vcall thunks as well.
4560 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
4562         * class.c (empty_base_at_nonzero_offset_p): New function.
4563         (layout_nonempty_base_or_field): Do not check for conflicts when
4564         laying out a virtual base using the GCC 3.2 ABI.
4565         (build_base_field): Correct checking for presence of empty classes
4566         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
4568         * class.c (include_empty_classes): Use normalize_rli.
4569         (layout_class_type): Likewise.
4571         * decl.c (reshape_init): Tweak handling of character arrays.
4573         PR c++/8218
4574         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
4575         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
4576         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
4577         (check_field_decls): Likewise.
4578         (layout_class_type): Likewise.
4579         (finish_struct_1): Initialize it.
4580         (walk_subobject_offsets): Use it to prune searches.
4582 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
4584         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
4585         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
4586         TARGET_ASM_OUTPUT_MI_THUNK in comments.
4588 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
4590         * decl.c (start_decl): Point users of the old initialized-
4591         typedef extension at __typeof__.
4593 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
4595         * Make-lang.in (method.o): Depend on TARGET_H.
4596         * method.c (target.h): Include it.
4597         (use_thunk): Use target hooks.  Use vcall thunks, if available.
4599 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
4601         * class.c (base_derived_from): Make sure return value is a bool.
4603 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
4605         * class.c (find_final_overrider_data_s): Remove overriding_fn and
4606         overriding_base.
4607         (dfs_base_derived_from): New function.
4608         (base_derived_from): Likewise.
4609         (dfs_find_final_overrider): Use base_derived_from.
4610         (find_final_overrider): Adjust.
4612 2002-10-18  Jason Merrill  <jason@redhat.com>
4614         PR c++/8080
4615         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
4616         with condition decls in a template.
4618 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
4620         * class.c (add_method): Compare template parms too.
4622 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
4624         PR c++/7584
4625         * class.c (handle_using_decl): Allow the declaration used to be
4626         from an ambiguous base.
4628         * pt.c (convert_template_argument): Revert this change:
4629                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
4630                 * pt.c (convert_template_argument): Do not fold non-type
4631                 template rguments when inside a template.
4633         * init.c (expand_default_init): Handle brace-enclosed initializers
4634         correctly.
4636 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
4638         * mangle.c (write_expression): Correct handling of enumeration
4639         constants.
4640         (write_template_arg): Likewise.
4641         * pt.c (convert_template_argument): Do not fold non-type template
4642         arguments when inside a template.
4644         PR c++/7478
4645         * cvt.c (convert_to_reference): Allow references as the incoming
4646         type.
4648 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
4650         PR c++/7524
4651         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
4652         build_qualified_type.
4654 2002-10-15  Richard Henderson  <rth@redhat.com>
4656         * error.c (dump_expr): Use real_to_decimal directly, and with
4657         the new arguments.
4659 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
4661         * decl.c (reshape_init): Fix typo.
4663         * cp-tree.h (operator_name_info_t): Add arity.
4664         * lex.c (init_operators): Initialize it.
4665         * mangle.c (write_conversion_operator_name): New function.
4666         (write_unqualified_name): Use it.
4667         (write_template_args): Accept template arguments as a TREE_LIST.
4668         (write_expression): Adjust handling of qualified names to match
4669         specification.
4671 2002-10-15  Jason Merrill  <jason@redhat.com>
4673         * call.c (call_builtin_trap): New fn.
4674         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
4675         (build_call): Don't set current_function_returns_abnormally outside
4676         a function.
4678 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
4680         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
4681         clear CLASSTYPE_EMPTY_P.
4682         (build_base_field): Likewise.
4683         (build_base_fields): Likewise.
4684         (check_bases_and_members): Likewise.
4685         (create_vtbl_ptr): Likewise.
4686         (layout_class_type): Likewise.  Ensure that empty classes have
4687         size zero when used as base classes in the 3.2 ABI.
4688         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
4689         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
4690         parameter.
4691         (is_empty_class): Correct definition when using post-3.2 ABI.
4692         * cp-tree.h (lang_type_class): Add empty_p.
4693         (CLASSTYPE_EMPTY_P): New macro.
4695 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
4697         * init.c (build_delete): Do not apply save_expr for arrays.
4698         (build_vec_delete): Likewise.
4700 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
4702         * decl.c (layout_var_decl): Call layout_decl even for variables
4703         whose type is an array with unspecified bounds.
4705         PR c++/7176
4706         * lex.c (do_identifier): Add another option for the parsing
4707         parameter.
4708         * parse.y (do_id): Use it.
4710 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4712         PRs C++/6803, C++/7721 and C++/7803
4713         * decl.c (grokdeclarator): Gracefully handle template-name as
4714         decl-specifier.
4716 2002-10-11  Jason Molenda  <jmolenda@apple.com>
4718         * init.c (build_field_list): Provide uses_unions_p with a default
4719         value.
4721 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
4723         PR c++/5661
4724         * cp-tree.h (variably_modified_type_p): New function.
4725         (grokdeclarator) Tighten check for variably modified types as
4726         fields.
4727         * pt.c (convert_template_argument): Do not allow variably modified
4728         types as template arguments.
4729         * tree.c (variably_modified_type_p): New function.
4731         * NEWS: Document removal of "new X = ..." extension.
4732         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
4733         brace-enclosed initializers.
4734         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
4735         (initialize_local_var): Remove declaration.
4736         (expand_static_init): Likewise.
4737         * decl.c (next_initializable_field): New function.
4738         (reshape_init): Likewise.
4739         (check_initializer): Use them.  Build dynamic initializer for
4740         aggregates here too.
4741         (initialize_local_var): Simplify, and incorporate cleanup
4742         insertion code as well.
4743         (destroy_local_var): Remove.
4744         (cp_finish_decl): Tidy.
4745         (expand_static_init): Fold checks for whether or not a variable
4746         needs initialization into this function.  Simplify.
4747         * decl2.c (do_static_initialization): Simplify.
4748         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
4749         be done for us automatically.
4750         (expand_default_init): Handle brace-enclosed initializers
4751         correctly.
4752         (expand_aggr_init_1): Remove RTL-generation code.
4753         (build_vec_init): Remove "new X = ..." support.
4754         * parse.y (new_initializer): Likewise.
4755         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
4756         brace-enclosed initializer.
4757         (create_pseudo_type_info): Likewise.
4758         * typeck2.c (store_init_value): Don't try to handle digest_init
4759         being called more than once.
4760         (digest_init): Tidy handling of brace-enclosed initializers.
4762 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4764         * decl.c (typename_hash): Use htab_hash_pointer.
4766 2002-10-10  Jim Wilson  <wilson@redhat.com>
4768         * decl.c (duplicate_decls): Don't call decl_attributes.
4770 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
4772         PR c/7353
4773         * decl.c (start_decl): Unconditionally issue error for
4774         'typedef foo = bar'.
4775         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
4776         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
4778 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4780         * decl2.c (prune_vtable_vardecl): Delete unused function.
4782 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
4784         PR c++/7754
4785         * decl2.c (finish_anon_union): Do not expand anonymous unions when
4786         procesing template functions.
4787         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
4788         type. Call layout_decl.
4789         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
4791 2002-10-07  Richard Henderson  <rth@redhat.com>
4793         * decl2.c, pt.c: Revert c++/7754 fix.
4795 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4797         PR c++/7804
4798         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
4800 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
4802         PR c++/7931
4803         * pt.c (for_each_template_parm_r): Handle BASELINKs.
4805         PR c++/7754
4806         * decl2.c (finish_anon_union): Do not expand anonymous unions when
4807         procesing template functions.
4808         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
4809         type. Call layout_decl.
4810         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
4812 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
4814         PR c++/8006
4815         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
4816         template parameters.
4817         (globals): Add entity and need_abi_warning.
4818         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
4819         CLASSTYPE_TEMPLATE_INFO.
4820         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
4821         TYPE_TI_TEMPLATE.
4822         (write_prefix): Handle typename types correctly.
4823         (write_template_prefix): Handle template template parameters
4824         correctly.
4825         (start_mangling): Add entity parameter.
4826         (finish_mangling): Warn about names whose mangling will change.
4827         (mangle_decl_string): Adjust.
4828         (mangle_type_string): Likewise.
4829         (mangle_special_for_type): Likewise.
4830         (mangle_ctor_vtbl_for_type): Likewise.
4831         (mangle_thunk): Likewise.
4832         (mangle_guard_variable): Likewise.
4833         (mangle_ref_init_variable): Likewise.
4835 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
4837         PR c++/7188.
4838         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
4839         * cp-tree.h (emit_base_init): Rename to ....
4840         (emit_mem_initializers): ... this.
4841         (expand_member_init): Change prototype.
4842         * init.c (perform_member_init): Compute explicit, rather than
4843         requiring it as a parameter.
4844         (sort_member_init): Rename to ...
4845         (sort_mem_initializers): ... this.  Process bases and data members
4846         together.
4847         (sort_base_init): Remove.
4848         (emit_base_init): Rename to ...
4849         (emit_mem_initializers): ... this.
4850         (expand_aggr_vbase_init_1): Remove.
4851         (construct_virtual_bases): Rename to ...
4852         (construct_virtual_base): ... this.
4853         (expand_member_init): Rework handling of base initializers.
4854         * method.c (do_build_copy_constructor): Use
4855         finish_mem_initializers.
4856         * parse.y (member_init): Adjust calls to expand_member_init.
4857         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
4858         (tsubst_initializer_list): Use expand_member_init.
4859         * semantics.c (finish_mem_intiailizers): Simplify.
4861 2002-10-02  Matt Austern  <austern@apple.com>
4862         * decl.c (walk_vtables_r): Fixed typo that caused result to
4863         never get a nonzero value.
4865 2002-10-02  Roger Sayle  <roger@eyesopen.com>
4867         PR optimization/6627
4868         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
4869         from here, and move it to tree.h.
4870         * decl.c (cxx_init_decl_processing): If storing the vbit
4871         in function pointers, ensure that force_align_functions_log
4872         is atleast one.
4874 2002-10-02  Matt Austern  <austern@apple.com>
4876         * class.c (check_field_decls): Changed warning about const member
4877         variables so that it doesn't get issued for a class aggregate.
4879 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
4881         * decl.c (cp_finish_decl): Make sure array types are laid out,
4882         even if the array bounds are unknown.
4884 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
4886         * class.c (build_vtbl_initializer): Change build_c_cast
4887         to build1.
4889 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
4891         * decl.c (cp_finish_decl): Make sure array types are laid out,
4892         even if the array bounds are unknown.
4894         * decl.c (cp_finish_decl): Correct check for dynamic
4895         initialization of thread-local storage.
4897 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
4899         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
4900         overloaded.
4902 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
4904         * class.c (build_vtbl_initializer): Add cast.
4905         (add_vcall_offset_vtbl_entries_1):
4906         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
4908 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
4910         * class.c (walk_subobject_offsets): Correct the calculation of
4911         offsets for virtual bases.  Correct the counting of array
4912         elements.
4913         (layout_nonempty_base_or_field): Simplify.  Correct the
4914         calculation of offsets to be propagated through the binfo
4915         hierarchy.
4916         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
4917         Add the FIELD_DECL to TYPE_FIELDS.
4918         (build_base_fields): Adjust accordingly.
4919         (layout_virtual_bases): Use build_base_field.
4920         (end_of_class): Return a tree, not an integer.
4921         (warn_about_ambiguous_direct_bases): Rename to ...
4922         (warn_about_ambiguous_bases): ... this.
4923         (include_empty_classes): New function.
4924         (layout_class_type): Create an alternative version of the type to
4925         be used when as a base class type.  Do not call
4926         finish_record_layout until we are done laying out the class.
4927         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
4928         as_base.
4929         (CLASSTYPE_SIZE): Reimplement.
4930         (CLASSTYPE_SIZE_UNIT): Likewise.
4931         (CLASSTYPE_ALIGN): Likweise.
4932         (CLASSTYPE_USER_ALIGN): Likewise.
4933         (CLASSTYPE_AS_BASE): New macro.
4934         (DECL_INITIALIZED_P): Likewise.
4935         (extract_init): Remove prototype.
4936         (build_forced_zero_init): Rename to ...
4937         (build_zero_init): ... this.
4938         (force_store_init_value): Remove.
4939         * decl.c (obscure_complex_init): Remove.
4940         (duplicate_decls): Copy DECL_INITIALIZED_P.
4941         (check_initializer): Do not leave junk in DECL_INITIAL.
4942         (cp_finish_decl): Handle zero-initialization of entities with
4943         static storage duration.
4944         * expr.c (extract_init): Remove.
4945         * init.c (build_forced_zero_init): Remove.
4946         (build_zero_init): New function.
4947         (build_default_init): Use it.
4948         (build_field_list): Skip FIELD_DECLs for base subobjects.
4949         (push_base_cleanups): Likewise.
4950         * method.c (do_build_assign_ref): Likewise.
4951         (synthesize_exception_spec): Likewise.
4952         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
4953         (regenerate_decl_from_template): To not set DECL_INITIAL for a
4954         static data member whose initialization took place in its class.
4955         (instantiate_decl): Do not pass an initializer to cp_finish_decl
4956         in that situation.
4957         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
4958         (dfs_unuse_fields): Likewise.
4959         * tree.c (pod_type_p): Handle error_mark_node.
4960         (zero_init_p): Likewise.
4961         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
4962         subobjects.
4963         * typeck2.c (store_init_value): Remove #if 0'd code.
4964         (force_store_init_value): Remove.
4965         (process_init_constructor): Use build_zero_init.
4967 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
4969         PR c++/7788
4970         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
4972 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
4974         * cp-tree.h: Fix comment typos.
4975         * decl.c: Likewise.
4976         * pt.c: Likewise.
4978 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
4980         * cp/class.c (contains_empty_class_p): New method.
4981         (walk_subobject_offsets): Correct computation of field offset.
4982         (layout_empty_base): Correct placement of emtpy base classes.
4983         (layout_class_type): Warn about ABI changes.
4985 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
4987         * cp/class.c (layout_virtual_bases): Do not round the size of the
4988         type to a multiple of the alignment before laying out virtual bases.
4989         (layout_class_type): Correct handling of bit-fields that are wider
4990         than their type inside unions.  Round the size of the type to a
4991         even number of bytes when computing the size without virtual
4992         bases.
4993         * cp/cp-tree.h (abi_version_at_least): New macro.
4995 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
4997         * ChangeLog: Follow spelling conventions.
4998         * ChangeLog.2: Likewise.
4999         * call.c: Likewise.
5000         * class.c: Likewise.
5001         * cp-tree.h: Likewise.
5002         * cvt.c: Likewise.
5003         * decl.c: Likewise.
5004         * decl2.c: Likewise.
5005         * except.c: Likewise.
5006         * friend.c: Likewise.
5007         * g++spec.c: Likewise.
5008         * init.c: Likewise.
5009         * lex.c: Likewise.
5010         * mangle.c: Likewise.
5011         * method.c: Likewise.
5012         * operators.def: Likewise.
5013         * optimize.c: Likewise.
5014         * pt.c: Likewise.
5015         * rtti.c: Likewise.
5016         * search.c: Likewise.
5017         * semantics.c: Likewise.
5018         * spew.c: Likewise.
5019         * tree.c: Likewise.
5020         * typeck.c: Likewise.
5022 2002-09-18  Devang Patel  <dpatel@apple.com>
5024         * cp/cp-tree.h: New prototype for walk_vtabls().
5025         * cp/decl.c (walk_vtables_r): New function.
5026         (struct cp_binding_level): Add new members, namespaces,
5027         names_size and vtables.
5028         (add_decl_to_level): Add decl in namespaces or vtables
5029         chain, if conditions match.
5030         (walk_vtables): New function.
5031         (walk_namespaces_r): Travers separate namespace chain
5032         for namespace decls.
5033         (wrapup_globals_for_namespace): Use names_size instead
5034         of list_length().
5035         * cp/decl2.c (finish_file): Use walk_vtables() instead of
5036         walk_globals() to walk vtable decls.
5038 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
5040         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
5041         ICE with invalid pointers & references.
5043 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
5045         * Make-lang.in: Remove all references to the demangler.
5046         * cxxfilt.c: Moved to binutils.
5048 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
5050         PR c++/7718
5051         * pt.c (tsubst_decl): Remove assert.
5053         Remove DR 295 implementation.
5054         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
5055         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
5056         about ignoring volatile qualifiers.
5058         * search.c (lookup_member): Correct documentation.
5060 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
5062         * cp-tree.h (union lang_tree_node): Add chain_next option.
5064 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
5066         * parse.y (parse_finish_call_expr): Check lookup_member result.
5068         PR c++/7015
5069         * semantic.c (finish_asm_stmt): Fix operand/output_operands
5070         thinko.
5071         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
5073 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
5075         PR c++/7919
5076         * call.c (build_over_call): Convert this pointer for fns found by
5077         using decls.
5079 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
5081         * ChangeLog: Follow spelling conventions.
5082         * ChangeLog.1: Likewise.
5084 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
5086         PR c++/7768
5087         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
5089 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
5091         * error.c: Fix comment formatting.
5092         * except.c: Likewise.
5093         * expr.c: Likewise.
5094         * friend.c: Likewise.
5095         * g++spec.c: Likewise.
5096         * init.c: Likewise.
5097         * lex.c: Likewise.
5098         * mangle.c: Likewise.
5099         * method.c: Likewise.
5100         * optimize.c: Likewise.
5101         * pt.c: Likewise.
5102         * rtti.c: Likewise.
5103         * search.c: Likewise.
5104         * semantics.c: Likewise.
5105         * spew.c: Likewise.
5106         * tree.c: Likewise.
5107         * typeck.c: Likewise.
5108         * typeck2.c: Likewise.
5110 2002-09-13  Matt Austern  <austern@apple.com>
5112         PR C++/7828
5113         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
5114         * cp/call.c: Change call-by-const-reference mechanism to use
5115         non_cast_lvalue_p when deciding whether the create a temporary.
5116         We need a temporary when passing, e.g. (long) x by const ref.
5118 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
5120         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
5122 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
5124         * decl.c: Fix comment formatting.
5125         * decl2.c: Likewise.
5127 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
5129         * call.c: Fix comment formatting.
5130         * class.c: Likewise.
5131         * cp-lang.c: Likewise.
5132         * cp-tree.h: Likewise.
5133         * cvt.c: Likewise.
5135 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
5137         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
5138         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
5139         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
5140         minor adjustments (use version_string, eliminate yet another
5141         duplicate of xmalloc)
5143 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5145         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
5147 2002-09-05  Jason Merrill  <jason@redhat.com>
5149         * typeck2.c (add_exception_specifier): Only pedwarn for an
5150         incomplete type.
5151         (require_complete_eh_spec_types): New fn.
5152         (cxx_incomplete_type_diagnostic): Also support pedwarning.
5153         * typeck.c (complete_type_or_diagnostic): Likewise.
5154         * call.c (build_call): Call require_complete_eh_spec_types.
5155         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
5156         on an incomplete type.
5158 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
5160         * decl.c (start_cleanup_fn): Clear interface_only before
5161         start_function, restore it afterwards.
5163 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
5165         * cp-tree.h (finish_builtin_type): Remove.
5166         * decl2.c (finish_builtin_type): Move to common code.
5167         * decl.c (build_ptrmemfunc_type): Adjust.
5168         * rtti.c (create_pseudo_type_info): Adjust.
5169         (create_tinfo_types): Adjust.
5171 2002-08-31  Jason Merrill  <jason@redhat.com>
5173         * cp-lang.c (cp_expr_size): Allow initialization from a
5174         CONSTRUCTOR.
5176 2002-08-30  Richard Henderson  <rth@redhat.com>
5178         PR opt/7515
5179         * tree.c: Include target.h.
5180         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
5181         don't bind locally.
5182         * Makefile.in (tree.o): Update.
5184 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
5186         * class.c (layout_virtual_bases): Warn about bugs in G++ that
5187         result in incorrect object layouts.
5188         (layout_class_type): Likewise.
5190 2002-08-24  Matt Austern  <austern@apple.com>
5192         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
5193         are allowable.
5194         (real_lvalue_p): Update caller.
5195         (lvalue_p): Ditto.
5196         (non_cast_lvalue_or_else): New.
5197         * tree.h: Declare it.
5198         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
5200 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
5202         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
5203         and COND_EXPR specially; fix error message output.
5205 2002-08-22  Jason Merrill  <jason@redhat.com>
5207         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
5208         * semantics.c (nullify_returns_r): Likewise.
5210 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5212         Fix PR/7621
5213         * typeck.c (finish_class_member_access_expr): Diagnose cases where
5214         name lookup finds nothing.
5216 2002-08-15  Jason Merrill  <jason@redhat.com>
5218         * semantics.c (finish_then_clause): Remove redundant assignment.
5219         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
5220         extra binding level outside the if/switch statement.
5221         (finish_while_cond, finish_for_cond): Rewrite complex condition
5222         into the loop body.
5224 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
5226         * parse.y (sizeof, alignof, typeof): New non-terminals to
5227         increment skip_evaluation.  Replace terminals with them and
5228         decrement skip_evaluation at the end of rules using them.
5229         * decl2.c (mark_used): Don't assemble_external if
5230         skipping evaluation.
5232 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
5234         Fix PR/7504
5235         * parse.y (parse_finish_call_expr): Handle incomplete
5236         type used to name a scope.
5238 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
5240         PR c++/7598
5241         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
5242         regression caused by my 2002-08-08 patch.
5244 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
5246         * decl.c (pushdecl_class_level): Honor requests to bind names to
5247         OVERLOADs.
5249 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5251         * decl2.c (build_call_from_tree): Fix uninitialized variable.
5252         * parse.y (parse_finish_call_expr): Likewise.
5253         * repo.c (old_args, old_dir, old_main): Const-ify.
5255 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
5257         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
5258         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
5259         * optimize.c (maybe_clone_body): Likewise.
5260         * pt.c (tsubst_enum): Likewise.
5261         (lookup_template_class): Likewise.
5262         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
5264 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
5266         * lang-specs.h: Remove -ansi.
5268 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
5270         * tree.c (maybe_dummy_object): Replace // with /* */
5272 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
5274         * call.c (standard_conversion): Use build_ptrmem_type.
5275         * cp-tree.h (build_ptrmem_type): New function.
5276         (adjust_result_of_qualified_name_lookup): Likewise.
5277         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
5278         static data members.
5279         (build_ptrmem_type): New function.
5280         (grokdeclarator): Do not use build_offset_type when encountering a
5281         qualified name.
5282         * parse.y (parse_finish_call_expr): Use
5283         adjust_result_of_qualified_name_lookup.
5284         * search.c (adjust_result_of_qualified_name_lookup): New function.
5285         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
5286         accessing OFFSET_TYPEs directly.
5288 2002-08-08  Mike Stump  <mrs@apple.com>
5290         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
5291         (type_decays_to): Likewise.
5292         * class.c (find_final_overrider): Likewise.
5293         (maybe_note_name_used_in_class): Likewise.
5294         * decl.c (current_tmpl_spec_kind): Likewise.
5295         (add_binding): Likewise.
5296         (push_class_binding): Likewise.
5297         (duplicate_decls): Likewise.
5298         (layout_var_decl): Likewise.
5299         (grokfndecl): Likewise.
5300         (grokdeclarator): Likewise.
5301         (check_default_argument): Likewise.
5302         * decl2.c (handle_class_head): Likewise.
5303         * error.c (dump_template_decl): Likewise.
5304         * init.c (build_offset_ref): Likewise.
5305         * pt.c (check_specialization_scope): Likewise.
5306         (determine_specialization): Likewise.
5307         (check_explicit_specialization): Likewise.
5308         (maybe_check_template_type): Likewise.
5309         (process_partial_specialization): Likewise.
5310         (check_default_tmpl_args): Likewise.
5311         (push_template_decl_real): Likewise.
5312         (convert_template_argument): Likewise.
5313         (try_class_unification): Likewise.
5314         (get_bindings_real): Likewise.
5315         (do_decl_instantiation): Likewise.
5316         * semantics.c (begin_function_definition): Likewise.
5317         (finish_member_declaration): Likewise.
5318         (check_multiple_declarators): Likewise.
5319         * typeck.c (comp_array_types): Likewise.
5320         (comptypes): Likewise.
5321         (expr_sizeof): Likewise.
5322         (build_binary_op): Likewise.
5323         (dubious_conversion_warnings): Likewise.
5324         (check_return_expr): Likewise.
5326 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
5328         * typeck.c (build_class_member_access_expr): Do not return
5329         error_mark_node when no error has occurred.
5331 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
5333         * typeck.c (build_component_addr): Remove.
5334         (build_unary_op): Just check it's not a bitfield, and then build
5335         an ADDR_EXPR.
5337 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
5339         * class.c (convert_to_base): Correct check for error_mark_node.
5340         (create_vtable_ptr): Remove unused VFUNS_P parm.
5342 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
5344         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
5346 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
5348         Rework build_component_ref.
5349         * call.c (build_vfield_ref): Do not go through build_component_ref.
5350         (build_field_call): Use build_class_member_access_expr.
5351         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
5352         (build_object_call): Likewise.
5353         * class.c (convert_to_base): New function.
5354         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
5355         (instantiate_type): Handle BASELINKs.
5356         * cp-tree.def (BASELINK): New tree code.
5357         * cp-tree.h (BASELINK_P): Reimplement.
5358         (SET_BASELINK_P): Remove.
5359         (BASELINK_BINFO): Reimplement.
5360         (BASELINK_FUNCTIONS): Likewise.
5361         (BASELINK_ACCESS_BINFO): Likewise.
5362         (BASELINK_OPTYPE): Likewise.
5363         (convert_to_base): New function.
5364         (name_p): Likewise.
5365         (build_object_ref): Remove.
5366         (build_component_ref_1): Likewise.
5367         (build_component_ref): Likewise.
5368         (build_x_component_ref): Likewise.
5369         (build_class_member_access_expr): New function.
5370         (finish_class_member_access_expr): Likewise.
5371         (build_ptrmemfunc_access_expr): Likewise.
5372         * decl.c (grokdeclarator): Handle BASELINKs.
5373         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
5374         finish_class_member_access_expr.
5375         (arg_assoc): Handle BASELINKs.
5376         (do_class_using_decl): Likewise.
5377         * error.c (dump_decl): Likewise.
5378         (dump_expr): Use build_ptrmemfunc_access_expr.
5379         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
5380         destructors.
5381         (build_throw): Use BASELINK_FUNCTIONS.
5382         * init.c (perform_member_init): Use
5383         build_class_member_access_expr.
5384         (build_offset_ref): Handle BASELINKs.  Use
5385         build_class_member_access_expr.
5386         * method.c (hack_identifier): Likewise.
5387         * parse.y (do_id): Use BASELINK, not TREE_LIST.
5388         (primary): Remove uses of build_object_ref.
5389         * pt.c (lookup_template_function): Handle BASELINKs.
5390         (resolve_overloaded_unification): Likewise.
5391         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
5392         (lookup_field): Use BASELINK, not TREE_LIST.
5393         (lookup_fnfiels): Likewise.
5394         (setup_class_bindings): Likewise.
5395         * semantics.c (finish_object_call_expr): Do not use
5396         build_method_call when we already know what function is being
5397         called.
5398         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
5399         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
5400         TREE_CHAIN.
5401         (name_p): New function.
5402         * typeck.c (build_object_ref): Remove.
5403         (build_component_ref_1): Likewise.
5404         (build_x_component_ref): Likewise.
5405         (build_class_member_access_expr): New function.
5406         (finish_class_member_access_expr): Likewise.
5407         (build_ptrmemfunc_access_expr): Likewise.
5408         (get_member_function_from_ptrfunc): Use
5409         build_ptrmemfunc_access_expr.
5410         (build_binary_op): Likewise.
5411         (build_unary_op): Likewise.
5412         (build_ptrmemfunc): Likewise.
5413         (pfn_from_ptrmemfunc): Likewise.
5414         * typeck2.c (build_m_component_ref): Adjust comment.
5416 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
5418         * Make-lang.in (CXX_C_OBJS): Update.
5419         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
5420         * cp-tree.h (cxx_decode_option): Remove.
5421         * decl2.c (compare_options, lang_f_options, unsupported_options,
5422         cxx_decode_option): Remove.
5424 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
5426         * typeck.c (build_x_unary_op): Handle pointer-to-member.
5428 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
5430         * class.c: Don't include obstack.h.
5431         (popclass):
5432         * decl2.c: Delete bogus comment.
5433         * error.c: Don't include obstack.h.
5434         * except.c: Likewise.
5435         (dump_type): Correct comment.
5436         * method.c: Don't include obstack.h.
5437         * tree.c: Likewise.
5439 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
5441         Fix PR/2213
5442         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
5443         expressions to pointer-to-data-member of pointer-to-member-functions.
5445 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
5447         * cvt.c (ocp_convert): Delete obsolete code.
5448         * parse.y (permanent_obstack): Delete declaration.
5449         * pt.c (permanent_obstack): Delete declaration.
5450         * repo.c (permanent_obstack): Delete declaration.
5451         (open_repo_file): Use xmalloc instead of permanent_obstack.
5452         (init_repo): Use xstrdup instead of permanent_obstack.
5454 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
5456         * cp-tree.h (VF_DERIVED_VALUE): Remove.
5457         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
5459 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
5461         PR 7470.
5462         C++ ABI change - vfunc ordering.
5463         * class.c (add_virtual_function): Remove.
5464         (dfs_modify_all_vtables): Take list of all declared
5465         virtuals. Assign all that are not in primary base.
5466         (check_for_override): Adjust comments.
5467         (create_vtable_ptr): Take single list of virtuals. Build chain
5468         of declared virtuals here.
5469         (layout_class_type): Take single list of virtuals. Adjust.
5470         (finish_struct_1): Keep virtuals on single list. Adjust.
5472 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
5474         * init.c (build_member_call): Use build_new_method_call, not
5475         build_method_call.
5477 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
5479         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
5481 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
5483         * call.c (build_method_call): Issue a more helpful error message
5484         about ambiguous method names.
5486 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
5488         * tree.c (build_shared_int_cst): Make cache file scope, and
5489         GTY it.
5491 2002-08-02  Jason Merrill  <jason@redhat.com>
5493         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
5494         (cp_expr_size): New fn.
5495         * call.c (build_over_call): Lose empty class hackery.
5496         (convert_arg_to_ellipsis): Promote non-POD warning to error.
5497         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
5499         * semantics.c (expand_body): Do tree optimization in the function
5500         context, too.
5502 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
5504         * cp-tree.h: Move all warning and flag declarations to c-common.h.
5505         * decl.c: Move all warning and flag variables to c-common.c.
5506         * decl2.c: Move all warning and flag variables to c-common.c.
5507         * lex.c (flag_digraphs): Remove.
5508         (warn_traditional): Now in c-common.c.
5510 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
5512         * call.c (build_field_call): Do not look up the field by name.
5513         (build_method_call): Simplify.
5514         (struct z_candidate): Add access_path and conversion_path.  Remove
5515         basetype_path.
5516         (convert_class_to_reference): Adjust use of
5517         add_function_candidate.
5518         (add_candidate): Add conversion_path argument.
5519         (add_function_candidate): Use it.
5520         (add_conv_dndidate): Likewise.
5521         (build_builtin_candidate): Likewise.
5522         (add_template_candidate_real): Add conversion_path argument.
5523         (add_template_conv_candidate): Likewise.
5524         (add_template_candidate): Likewise.
5525         (build_user_type_conversion_1): Use it.
5526         (build_new_function_call): Remove name lookup code.  Adjust use of
5527         add_template_candidate and add_function_candidate.
5528         (build_new_op): Likewise.
5529         (convert_like_real): Use build_special_member_call.
5530         (build_over_call): Use cand->conversion_path.
5531         (build_special_member_call): New method.
5532         (build_new_method_call): Remove name lookup code.
5533         * cp-tree.def (OFFSET_REF): Update documentation.
5534         (TEMPLATE_ID_EXPR): Likewise.
5535         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
5536         (BASELINK_OPTYPE): Likewise.
5537         (build_new_method_call): Adjust prototype.
5538         (build_special_member_call): New method.
5539         (build_baselink): New method.
5540         (build_offset_ref_call_from_tree): Likewise.
5541         (build_call_from_tree): Likewise.
5542         (finish_qualified_call_expr): Remove.
5543         (finish_call_expr): Adjust prototype.
5544         (build_x_function_call): Remove.
5545         * cvt.c (ocp_convert): Use build_special_member_call.
5546         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
5547         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
5548         CALL_EXPR.
5549         (build_offset_ref_call_from_tree): New function.
5550         (build_call_from_tree): Likewise.
5551         * init.c (expand_cleanup): Use build_special_member_call.
5552         (expand_default_init): Likewise.
5553         (build_member_call): Use finish_call_expr.
5554         (build_new_1): Use build_special_member_call.
5555         (push_base_cleanups): Likewise.
5556         * method.c (do_build_assign_ref): Likewise.
5557         * parse.y (template_id): Do not pass a COMPONENT_REF to
5558         lookup_template_function.
5559         (primary): Use parse_finish_call_epxr, not finish_call_expr.
5560         (parse_finish_call_expr): New function.
5561         * pt.c (lookup_template_function): Add assertions.
5562         * search.c (lookup_base): Allow T to be a binfo.
5563         (build_baselink): New function.
5564         (lookup_member): Use it.
5565         * semantics.c (finish_call_expr): Do not do name lookup.
5566         (finish_object_call_expr): Remove #if 0'd code.
5567         (finish_qualified_call_expr): Remove.
5568         * typeck.c (build_x_function_call): Remove.
5569         (build_static_case): Use build_special_member_call.
5570         * typeck2.c (build_functional_cast): Likewise.
5572 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
5574         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
5576 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
5578         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
5580 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
5582         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
5583         documentation.
5585 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
5587         * cp-tree.h: Comment typo fix.
5589 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
5591         * spew.c (space_for_token): Allocate zeroed memory for a new token
5592         chunk.
5594 2002-07-27  Roger Sayle  <roger@eyesopen.com>
5596         * decl.c (builtin_function_1): No need to explicitly mark
5597         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
5599 2002-07-27  Roger Sayle  <roger@eyesopen.com>
5601         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
5603 2002-07-26  Jason Merrill  <jason@redhat.com>
5605         * call.c (build_over_call): Likewise.
5606         (cp_convert_parm_for_inlining): New fn.
5607         (convert_for_arg_passing): New fn.
5608         (convert_default_arg, build_over_call): Use it.
5609         (type_passed_as): New fn.
5610         * pt.c (tsubst_decl): Use it.
5611         * decl2.c (cp_build_parm_decl): New fn.
5612         (build_artificial_parm): Use it.
5613         (start_static_storage_duration_function): Likewise.
5614         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
5615         (grokparms): Don't mess with DECL_ARG_TYPE.
5616         * typeck.c (convert_arguments): Use convert_for_arg_passing.
5617         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
5618         Define.
5619         * cp-tree.h: Declare new fns.
5621 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
5623         * cp-tree.h (flag_operator_names): Remove.
5624         * decl2.c (flag_operator_names): Remove.
5625         (lang_f_options): Remove operator-names.
5626         * lex.c (D_OPNAME): Remove.
5627         (reswords): Remove operator names.
5628         (rid_to_yy): Remove operator names.
5629         (init_reswords): No need to handle D_OPNAME.
5630         * spew.c (read_process_identifier): There are no operator
5631         names.
5633 2002-07-26  Jason Merrill  <jason@redhat.com>
5635         * dump.c (cp_dump_tree): Call c_dump_tree.
5636         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
5638 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
5640         * error.c (print_whitespace): Remove.
5641         * g++spec.c (LIBUNWIND): Move.
5642         * mangle.c (mangled_position, write_signed_number): Remove.
5644 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
5646         * decl2.c (cxx_decode_option): Similarly.
5648 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
5650         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
5651         (cxx_sizeof_or_alignof_type): Take a third argument.
5652         (cxx_sizeof): Adjust definition.
5653         (cxx_alignof): Likewise.
5654         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
5655         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
5656         complaining.
5657         (c_sizeof_nowarn): Remove definition.
5658         (build_unary_op): Use cxx_sizeof_nowarn.
5660 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
5662         * tree.c (cp_build_qualified_type_real): When copying
5663         pointer-to-method types, unshare the record that holds
5664         the cached pointer-to-member-function type.
5666 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
5668         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
5670 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
5672         Fix PR/7363:
5673         * typeck.c (cxx_sizeof_or_alignof_type): New function.
5674         (c_sizeof): Remove definition.
5675         (expr_sizeof): Use cxx_sizeof.
5676         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
5677         * decl.c (finish_destructor_body): Use cxx_sizeof.
5678         * semantics.c (finish_alignof): Likewise.
5679         (finish_alignof): Use cxx_alignof.
5680         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
5681         (cxx_sizeof_or_alignof_type): Declare.
5682         (my_friendly_assert): Move to ../c-common.h.
5684 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
5686         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
5688 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5690         PR c++/7347, c++/7348
5691         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
5692         * decl.c (make_typename_type): Use it.
5693         (make_unbound_class_template): Likewise.
5694         (lookup_name_real): Don't call type_access_control if scope is
5695         template parameter dependent.
5696         * parse.y (template_arg): Call make_unbound_class_template with
5697         tf_parsing set.
5698         (nest_name_specifier): Call make_typename_type with tf_parsing set.
5699         (typename_sub0): Likewise.
5700         (typename_sub1): Likewise.
5701         (instantiate_decl): Push class scope.
5702         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
5703         for both static variable and member function template.
5704         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
5705         and arguments.
5706         * search.c (type_access_control): Do type access for TEMPLATE_DECL
5707         too.
5709 2002-07-20  Roger Sayle  <roger@eyesopen.com>
5711         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
5712         test by using positive_option.  Make whitespace consistent.
5714 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
5716         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
5717         members with 'locus'.  Adjust use throughout.
5718         (struct feed):  Likewise.
5719         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
5720         Adjust use.
5721         (snarf_defarg): Use error(), not error_with_file_and_line().
5723 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
5725         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
5726         cpp_options is included.
5728 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5730         PR c++/2862, c++/2863
5731         * pt.c (determine_specialization): Compare the length of
5732         TYPE_ARG_TYPES.  Tidy.
5734 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5736         PR c++/3797
5737         * decl.c (duplicate_decls): Don't propagate inlining parameters from
5738         olddecl to newdecl when newdecl is a specialization of the
5739         instantiation olddecl.
5741 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5743         PR c++/4802, c++/5387
5744         * decl.c (make_typename_type): Use enforce_access.
5746 2002-07-17  Scott Snyder <snyder@fnal.gov>
5748         PR c++/7320
5749         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
5751 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
5753         * class.c (add_method): Correct handling of conversion operators.
5755 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
5757         PR c++/7224
5758         * class.c (add_method): Simplify.
5760 2002-07-11  Jason Merrill  <jason@redhat.com>
5762         PR c++/7279
5763         * tree.c (cp_copy_res_decl_for_inlining): Also copy
5764         TREE_ADDRESSABLE.
5766 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
5768         * pt.c (template_parm_this_level_p, push_template_decl_real):
5769         Pass depth as int pointer.
5771 2002-07-11  Tim Josling  <tej@melbpc.org.au>
5773         Remove front end hard coding from gengtype.c.
5775         * config-lang.in (gtfiles): Add files needed for this front end.
5777 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
5779         * cp-tree.h (unqualified_name_lookup_error): Declare it.
5780         (begin_function_definition): Adjust prototype.
5781         * lex.c (unqualified_name_lookup_error): New function, split out
5782         from ...
5783         (do_identifier): ... here.
5784         * parse.y (parse_begin_function_definition): New function.
5785         (fn.def1): Use it.
5786         * semantics.c (begin_function_definition): Accept decl-specifiers
5787         and attributes as separate parameters.
5789 2002-07-10  Jason Merrill  <jason@redhat.com>
5791         PR c++/6255
5792         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
5793         modifying the old one.
5795 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
5797         * cp-tree.h (constructor_name_p): Declare it.
5798         (check_template_template_default_arg): Likewise.
5799         * class.c (handle_using_decl): Use constructor_name_p.
5800         * decl.c (grokdeclarator): Likewise.
5801         * decl2.c (constructor_name_p): Define it.
5802         * init.c (build_member_call): Use constructor_name_p.
5803         * parse.y (template_parm): Use check_template_template_default_arg.
5804         * pt.c (check_explicit_specialization): Use constructor_name_p.
5805         * semantics.c (check_template_template_default_arg): New function.
5807 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5809         * pt.c (can_complete_type_without_circularity): Add static to
5810         function definition.
5812 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
5814         * cp-tree.h (have_extern_spec): Declare it
5815         * decl.c (have_extern_spec): Define it.
5816         (start_decl): Eliminate use of used_extern_spec.
5817         (start_function): Likewise.
5818         * parse.y (have_extern_spec): Remove declaration.
5819         (used_extern_spec): Likewise.
5820         (frob_specs): Eliminate use of used_extern_spec.
5821         (.hush_warning): Likewise.
5823 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
5825         * Make-lang.in (cp/parse.o): Depend on decl.h.
5826         * cp-tree.h (do_decl_instantiation): Change prototype.
5827         * parse.y: Include decl.h.
5828         (parse_decl_instantiation): New function.
5829         (explicit_instantiation): Use it.
5830         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
5831         and DECLSPECS.
5833 2002-07-07  Roger Sayle  <roger@eyesopen.com>
5835         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
5836         constructor and destructor tests when passed a TEMPLATE_DECL.
5838 2002-07-05  Jason Merrill  <jason@redhat.com>
5840         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
5841         pointers.
5843         PR optimization/7145
5844         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
5846 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
5848         Repair damage on weak-impared targets caused by my previous patch.
5849         * cp-tree.h (import_export_tinfo): Add parameter.
5850         * decl2.c (import_export_tinfo): Add parameter, post adjust
5851         DECL_COMDAT.
5852         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
5853         import_export_tinfo.
5855 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5857         PR c++/6944
5858         * init.c (build_aggr_init): Remove qualifiers of init before calling
5859         build_vec_init.
5860         (build_vec_init): Flatten multi-dimensional array during cleanup.
5861         (build_vec_delete_1): Abort if the type of each element is array.
5863 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
5865         * pt.c (instantiate_class_template): Fix typo.
5867 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5869         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
5870         by CVS conflict in my last patch.
5872 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5874         PR c++/6716
5875         * pt.c (can_complete_type_without_circularity): New function.
5876         (instantiate_class_template): Use it.
5877         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
5878         message due to incomplete fields.
5880 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
5882         PR c++/7112
5883         * mangle.c (write_expression): Add mangling for sizeof when
5884         applied to a type.
5885         * operators.def: Remove stale comment.
5887 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
5889         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
5890         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
5891         (tinfo_decl_type): Replace with ...
5892         (type_info_ptr_type): ... this.
5893         (import_export_tinfo): Declare.
5894         (tinfo_decl_p): Rename to ...
5895         (unemitted_tinfo_decl_p): ... this.
5896         * decl2.c (import_export_decl): Break out tinfo handling into ...
5897         (import_export_tinfo): ... here. New function.
5898         (finish_file): Adjust.
5899         * rtti.c (TINFO_REAL_NAME): New macro.
5900         (init_rtti_processing): Create the tinfo types.
5901         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
5902         (get_tinfo_decl): Adjust.
5903         (get_tinfo_ptr): New function.
5904         (get_type_id): Use it.
5905         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
5906         (ptr_initializer): Use get_tinfo_ptr.
5907         (ptm_initializer): Likewise.
5908         (synthesize_tinfo_var): Break into ...
5909         (get_pseudo_ti_init): ... this. Just create the initializer.
5910         (get_pseudo_ti_desc): .. and this.
5911         (create_real_tinfo_var): Remove.
5912         (create_pseudo_type_info): Don't create the vtable decl here.
5913         (get_vmi_pseudo_type_info): Remove.
5914         (create_tinfo_types): Adjust.
5915         (tinfo_decl_p): Rename to ...
5916         (unemitted_tinfo_decl_p): ... here. Adjust.
5917         (emit_tinfo_decl): Adjust. Create the initializer.
5919 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
5921         PR c++/6695
5922         * pt.c (tsubst_friend_class): Substitute into the context of the
5923         friend before using it.
5925 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
5927         * cp-tree.h (xref_tag): Change prototype.
5928         (handle_class_head): Likewise.
5929         (build_x_component_ref): Likewise.
5930         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
5931         (xref_tag): Take attributes as a separate parameter.
5932         (xref_tag_from_type): Adjust call to xref_tag.
5933         * decl2.c (build_expr_from_tree): Adjust call to
5934         build_x_component_ref.
5935         (handle_class_head): Take attributes as a separate parameter.
5936         * parse.y (parse_xref_tag): New function.
5937         (parse_handle_class_head): Likewise.
5938         (primary): Use parse_xref_tag.
5939         (class_head_decl): Use parse_handle_class_head.
5940         (class_head_defn): Likewise.
5941         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
5942         (build_dynamic_cast_1): Likewise.
5943         (create_pseudo_type_info): Likewise.
5944         (emit_support_tinfos): Likewise.
5945         * typeck.c (build_object_ref): Adjust call to
5946         build_x_component_ref.
5947         (build_x_component_ref): Remove protect parameter.
5949 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
5951         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
5952         * class.c (handle_using_decl): Likewise.
5953         (instantiate_type): Likewise.
5954         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
5955         (xref_basetypes): Change prototype.
5956         (begin_mem_initializers): New function.
5957         (get_overloaded_fn): Likewise.
5958         * decl.c (xref_basetypes): Simplify.
5959         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
5960         * init.c (build_offset_ref): Likewise.
5961         * parse.y (base_init): Use begin_mem_initializers().
5962         (structsp): Adjust call to xref_basetypes.
5963         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
5964         (instantiate_class_template): Adjust call to xref_basetypes.
5965         * semantics.c (begin_mem_initializers): New function.
5966         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
5967         (really_overlaoded_fn): Likewise.
5968         (get_overloaded_fn): New function.'
5969         (get_first_fn): USe BASELINK_FUNCTIONS.
5971 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
5973         * cp-tree.h (SCALAR_TYPE_P): New macro.
5974         (check_for_out_of_scope_variable): New function.
5975         (at_class_scope_p): Likewise.
5976         (finish_fname): Likewise.
5977         * class.c (finish_struct): Use at_function_scope_p.
5978         * decl.c (check_for_out_of_scope_variable): New function, split
5979         out from do_identifier.
5980         (finish_enum): Use at_function_scope_p.
5981         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
5982         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
5983         (primary): Use at_function_scope_p.
5984         * search.c (at_class_scope_p): New function.
5985         * semantics.c (finish_fname): Likewise.
5986         (check_multiple_declarators): Use at_function_scope_p.
5988 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
5990         * parse.y (parse_scoped_id): New function.
5991         (primary): Use it.
5992         * cp-tree.h (do_scoped_id): Adjust declaration.
5993         * lex.c (do_scoped_id): Remove call to yylex.
5994         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
5995         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
5996         expanding it inline.
5998 2002-06-23  Matt Thomas  <matt@3am-software.com>
6000         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
6001         "#if VMS_TARGET".
6003 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6005         * mangle.c (integer_type_codes): Const-ify.
6007 2002-06-20  Richard Henderson  <rth@redhat.com>
6009         PR c++/6747
6010         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
6011         Call put_var_into_stack.
6013 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6015         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
6016         array size calculation.
6018 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6020         PR c++/6892
6021         * pt.c (tsubst_expr): Handle FILE_STMT.
6023 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6025         PR c++/6723
6026         * pt.c (lookup_template_class): Don't build complete argument of
6027         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
6028         argument.
6030 2002-06-19  Akim Demaille  <akim@epita.fr>
6032         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
6033         decl.h's TYPENAME.
6034         * spew.c, lex.c: Adjust.
6035         * parse.y (explicit_instantiation): Add empty action to override
6036         the default $$ = $1 where it introduces a type clash.
6038 2002-06-14  Jason Merrill  <jason@redhat.com>
6040         * semantics.c (begin_for_stmt): Push the 'for' scope before
6041         adding the FOR_STMT.
6043         C++ ABI changes.
6044         * class.c (build_base_field): Set DECL_PACKED.
6045         (layout_class_type): Don't use tail padding of PODs.
6046         * mangle.c (write_unqualified_name): Fix template conversion op
6047         mangling.
6049 2002-06-16  Richard Henderson  <rth@redhat.com>
6051         PR opt/6793
6052         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
6053         after template instantiation.
6055 2002-06-16  Richard Henderson  <rth@redhat.com>
6057         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
6059 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
6061         * cp-tree.h (compiler_error): Remove declaration.
6062         * lex.c (compiler_error): Remove definition.
6064 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
6066         * g++spec.c (LIBUNWIND): New.
6067         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
6069 2002-06-13  Jessica Han  <jessica@cup.hp.com>
6071         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
6072         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
6073         (build_vbase_offset_vtbl_entries): Likewise.
6074         * rtti.c (build_headof): Likewise.
6075         (get_tinfo_decl_dynamic): Likewise.
6076         (create_pseudo_type_info): Likewise.
6078 2002-06-12  Stan Shebs  <shebs@apple.com>
6080         * mpw-config.in: Remove file, no longer used.
6081         * mpw-make.sed: Ditto.
6083 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
6085         * decl2.c: Update call to cpp_handle_option.
6087 2002-06-07  H.J. Lu  (hjl@gnu.org)
6089         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
6091 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
6093         * error.c (cp_error_at): Fix typo.
6095 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
6097         * error.c (cp_diagnostic_starter): Adjust call.
6098         (maybe_print_instantiation_context): Change prototype to take a
6099         'diagnostic_info *'.
6100         (print_instantiation_full_context): Likewise.
6101         (print_instantiation_partial_context): Likewise.
6102         (cp_diagnostic_starter): Likewise.
6103         (cp_diagnostic_finalizer): Likewise.
6104         (cp_print_error_function): Likewise.
6105         (cp_printer): Take a secondary parameter as a 'text_info *'.
6106         Remove output_state savings.  Adjust calls.
6108 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
6110         * pt.c (inline_parm_levels): Mark for GC.
6112         * mangle.c (start_mangling): Allocate G.substitutions here...
6113         (init_mangle): ... rather than here.
6114         (finish_mangling): Clear the varray pointer when done with it.
6115         * spew.c (yylexstring): Don't use VARRAY_FREE.
6116         * search.c (bfs_walk): Don't use VARRAY_FREE.
6117         * decl2.c (pending_statics): Use gengtype to mark.
6118         (deferred_fns): Likewise.
6119         (ssdf_decls): Likewise.
6120         (init_decl2): Delete.
6121         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
6122         (cxx_init_decl_processing): Don't call init_decl2.
6123         (cxx_pop_function_context): Don't use VARRAY_FREE.
6124         * cp-tree.h (struct saved_scope): No need for special marking
6125         of varrays.
6126         (struct language_function): Likewise.
6127         (local_classes): Use gengtype to mark.
6128         (init_decl2): Delete prototype.
6129         * class.c (init_class_processing): Don't use
6130         ggc_add_tree_varray_root.
6131         (build_vtbl_initializer): Don't use VARRAY_FREE.
6133         * decl.c (typename_compare): Don't use same_type_p.
6135         * decl.c: Include hashtab.h instead of hash.h.
6136         (typename_hash): Update to use htab_h.
6137         (typename_compare): Likewise.
6138         (typename_htab): Use gengtype to mark.
6139         (build_typename_type): Update to use htab_h.
6140         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
6142         * Make-lang.in (gt-cp-tree.h): New rule.
6143         (cp/tree.o): Depend on gt-cp-tree.h.
6144         * config-lang.in (gtfiles): Add cp/tree.c.
6145         * tree.c: Include gt-cp-tree.h.
6146         (list_hash_table): Use gengtype to mark.
6147         (init_tree): Use gengtype to mark trees.
6149         * Make-lang.in (cp/decl.o): Add debug.h dependency.
6150         * call.c (struct z_candidate): Use gengtype.
6151         (USER_CONV_CAND): Use WRAPPER_ZC.
6152         (convert_class_to_reference): Use build_zc_wrapper.
6153         (build_type_conversion_1): Likewise.
6154         (build_over_call): Use WRAPPER_ZC.
6155         (add_warning): Use build_zc_wrapper.
6156         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
6157         * cp-tree.h (struct lang_identifier): Use gengtype.
6158         (struct template_parm_index_s): Likewise.
6159         (struct ptrmem_cst): Likewise.
6160         (struct tree_binding): Likewise.
6161         (struct tree_overload): Likewise.
6162         (struct tree_srcloc): Likewise.
6163         (struct tree_wrapper): Likewise.  Also modify to have a pointer
6164         to struct z_candidate rather than void.
6165         (enum cp_tree_node_structure_enum): New.
6166         (union lang_tree_node): New.
6167         (cxx_mark_tree): Delete prototype.
6168         (cp_tree_node_structure): New prototype.
6169         (build_ptr_wrapper): Delete prototype.
6170         (build_int_wrapper): Delete prototype.
6171         (build_zc_wrapper): New prototype.
6172         * decl.c: Include debug.h
6173         (cxx_mark_tree): Delete.
6174         (cp_tree_node_structure): New.
6175         * tree.c (build_ptr_wrapper): Delete.
6176         (build_int_wrapper): Delete.
6177         (build_zc_wrapper): New.
6179         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
6180         Correct typo.  Patch from k_fukui@highway.ne.jp.
6182         * semantics.c (current_stmt_tree): Update for change to
6183         struct language_function.
6184         (finish_mem_initializers): Likewise.
6185         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
6186         * cp-tree.h (struct language_function): Rename from
6187         cp_language_function.  Change all uses.
6188         (cp_function_chain): Don't need to cast.
6190         * class.c (duplicate_tag_error): Reset discriminator.
6191         (check_bases_and_members): Update for data structure changes.
6192         * cp-tree.h (struct lang_id2): Use gengtype.
6193         (flagged_type_tree): Likewise.
6194         (SET_LANG_ID): Use GGC on struct lang_id2.
6195         (struct cp_language_function): Use gengtype.  Remove field
6196         'x_vcalls_possible_p'.
6197         (current_vcalls_possible_p): Delete.
6198         (struct lang_type_header): New.
6199         (struct lang_type_class): Rename from struct lang_type.  Include
6200         struct lang_type_header.
6201         (struct lang_type_ptrmem): New.
6202         (struct lang_type): New.
6203         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
6204         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
6205         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
6206         (struct lang_decl_flags): Use gengtype.  Add discriminators.
6207         (struct lang_decl): Use gengtype.  Add and use discriminators.
6208         Update the macros that reference moved fields.
6209         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
6210         (SET_DECL_THUNK_P): Set discriminator too.
6211         (clear_inline_text_obstack): Delete prototype.
6212         (finish_inline_definitions): Delete prototype.
6213         (mark_pending_inlines): Delete prototype.
6214         (lang_check_failed): New prototype.
6215         * decl.c (struct named_label_use_list): Use gengtype.
6216         (struct named_label_list): Likewise.
6217         (mark_binding_level): Delete.
6218         (mark_named_label_lists): Delete.
6219         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
6220         (cxx_init_decl_processing): Use generated marker routine.
6221         (begin_destructor_body): Delete dead set to
6222         current_vcalls_possible_p.
6223         (mark_lang_function): Delete.
6224         (mark_cp_function_context): Delete.
6225         (lang_mark_tree): Use generated marker routines.
6226         * decl2.c (start_objects): Set discriminator when setting
6227         GLOBAL_INIT_PRIORITY.
6228         * lex.c (retrofit_lang_decl): Set discriminators.
6229         (copy_lang_type): Update for changes to lang_type structure.
6230         (cp_make_lang_type): Set discriminator.
6231         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
6232         * search.c: Include ggc.h.
6233         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
6234         (finish_inline_definitions): Delete.
6235         * spew.c (struct token): Use gengtype.
6236         (struct token_chunk): New.
6237         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
6238         (struct feed): Use gengtype.
6239         (feed_obstack): Delete.
6240         (feed): Mark as GC root.
6241         (pending_inlines): Mark as GC root.
6242         (pending_inlines_tail): Likewise.
6243         (processing_these_inlines): Likewise.
6244         (token_obstack): Make static.
6245         (first_token): Likewise.
6246         (init_spew): Don't initialize deleted things; use gengtype for roots.
6247         (clear_inline_text_obstack): Delete.
6248         (feed_input): Use GC for struct feed.  Update for changes to
6249         struct unparsed_text.
6250         (mark_pending_inlines): Delete.
6251         (next_token): Rename from add_token.  Change all callers.  Update
6252         for changes to struct unparsed_text.
6253         (space_for_token): New.
6254         (remove_last_token): New.
6255         (alloc_unparsed_text): New.
6256         (snarf_block): Take an unparsed_text.  Update for changes to struct
6257         unparsed_text.
6258         (snarf_method): Update for changes to struct unparsed_text.
6259         (snarf_defarg): Update for changes to struct unparsed_text.
6260         * tree.c (lang_check_failed): New.
6262         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
6263         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
6264         (cp/spew.o): Add dependency on gt-<filename>.h.
6265         (cp/decl2.o): Add dependency on gt-<filename>.h.
6266         (cp/call.o): Add dependency on gt-<filename>.h.
6267         (cp/pt.o): Add dependency on gt-<filename>.h.
6268         (cp/repo.o): Add dependency on gt-<filename>.h.
6269         (cp/parse.o): Add dependency on gt-<filename>.h.
6270         * call.c: Use gengtype for roots.
6271         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
6272         decl2.c parse.y pt.c repo.c spew.c.
6273         * cp-tree.h: Use gengtype for roots.
6274         (struct saved_scope): Use GGC, gengtype.
6275         (cp_parse_init): Delete prototype.
6276         (init_pt): Delete prototype.
6277         * decl.c: Use gengtype for roots.
6278         (mark_saved_scope): Delete.
6279         (cxx_init_decl_processing): Don't call deleted initilisation
6280         routines.
6281         (signed_size_zero_node): Delete, unused.
6282         * decl.h: Use gengtype for roots.
6283         * decl2.c: Use gengtype for roots.
6284         * lex.h: Use gengtype for roots.
6285         * parse.y: Use gengtype for roots.
6286         (cp_parse_init): Delete.
6287         * pt.c: Use gengtype for roots.
6288         (init_pt): Delete.
6289         * repo.c: Use gengtype for roots.
6290         * spew.c: Use gengtype for roots.
6292         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
6293         (cp/decl.o): Add dependency on gtype-cp.h.
6294         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
6295         Include gtype-cp.h.  Allow for filename changes.
6297         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
6298         (cp/decl.o): Add cp/gt-decl.h dependency.
6299         * config-lang.in (gtfiles): New.
6300         * tree.h: Rename struct binding_level to struct cp_binding_level.
6301         * decl.c: Rename struct binding_level to struct cp_binding_level.
6302         Include cp/gt-decl.h.
6303         (struct cp_binding_level): Use gengtype.
6304         (make_binding_level): Use GGC on struct cp_binding_level.
6305         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
6306         (cxx_init_decl_processing): Mark free_binding_level as
6307         deletable.
6309         * decl.c (mark_cp_function_context): Update calling sequence.
6311         * decl.c (start_function): Don't free 'struct
6312         cp_language_function'.
6313         (pop_cp_function_context): Likewise.
6314         (save_function_data): Allocate it using GC.
6315         * semantics.c (genrtl_start_function): Don't free 'struct
6316         cp_language_function'.
6318 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
6320         * lang-specs.h: Use cpp_debug_options.
6322 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
6324         * mangle.c, tree.c: Include real.h.
6325         * Make-lang.in: Update dependency lists.
6327 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
6329         * lex.c: Don't include c-lex.h.
6330         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
6332 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
6334         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
6336 2002-05-22  Richard Henderson  <rth@redhat.com>
6338         * decl.c (obscure_complex_init): Check for VAR_DECL
6339         before using DECL_THREAD_LOCAL.
6341 2002-05-22  Richard Henderson  <rth@redhat.com>
6343         * decl.c (check_tag_decl): Handle RID_THREAD.
6344         (obscure_complex_init): Reject run-time init of tls.
6345         (grokvardecl, grokdeclarator): Handle RID_THREAD.
6346         * lex.c (reswords): Add __thread.
6347         (rid_to_yy): Map RID_THREAD to SCSPEC.
6349 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
6351         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
6352         * cp-tree.h (cxx_post_options): Kill.
6353         * cp-lex.c (cxx_post_options): Kill.
6355 2002-05-21  Richard Henderson  <rth@redhat.com>
6357         * lex.c (rid_to_yy): Add RID_THREAD.
6359 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
6361         * init.c (build_vec_init): Test for trivial copy-assignment when
6362         copy-assigning arrays.
6364 2002-05-20  Andreas Jaeger  <aj@suse.de>
6366         * init.c (build_default_init): Remove unused variable.
6368 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
6370         * call.c (any_strictly_viable): New.
6371         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
6373 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6375         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
6377 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6379         PR c++/186, DR 259
6380         * pt.c (do_decl_instantiation): Don't complain explicit
6381         instantiation after explicit specialization.
6382         (do_type_instantiation): Likewise.
6384 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
6386         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
6387         renamed from...
6388         (complete_type_or_else): ... this.  Redefined as macro.
6389         (cxx_incomplete_type_diagnostic): Declare.
6390         (cxx_incomplete_type_error): Define as macro.
6391         * init.c (build_delete): Warn about incomplete types other than
6392         void, and use the built-in operator delete for them.
6393         * typeck.c (complete_type_or_diagnostic): Renamed from
6394         complete_type_or_else.  Added warn_only argument, passed to...
6395         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
6396         warnings or errors depending on new warn_only argument.  Renamed
6397         from...
6398         (cxx_incomplete_type_error): ... this.  New implementation in
6399         terms of cxx_incomplete_type_diagnostic.
6401 2002-05-18  Jason Merrill  <jason@redhat.com>
6403         PR c++/6611
6404         * decl2.c (import_export_decl): If we clear
6405         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
6407 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6409         PR c++/6620
6410         * pt.c (verify_class_unification): Don't check if PARM is template
6411         parameter dependent.  Simplify.
6412         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
6413         parameter dependent expression.
6415 2002-05-14  Jason Merrill  <jason@redhat.com>
6417         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
6418         Do set DECL_COMDAT.
6419         (synthesize_tinfo_var): Take the public decl.
6420         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
6421         (emit_tinfo_decl): Adjust.  Call import_export_decl.
6422         * decl2.c (import_export_decl): Simplify tinfo decl handling.
6424 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
6426         * cp-tree.h (struct lang_type): Added non_zero_init.
6427         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
6428         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
6429         * class.c (check_field_decls): Test non_zero_init.
6430         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
6431         zero-to-NULL conversions.
6432         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
6433         type that needs zero-initialization without zeros.
6434         (check_initializer_decl): Compute zero-initializer for types
6435         that require a non-trivial one.
6436         * init.c (build_forced_zero_init): New function.
6437         (build_default_init): Use it.
6438         * tree.c (zero_init_p): New function.
6439         * typeck2.c (force_store_init_value): New function.
6440         (process_init_constructor): Create non-trivial zero-initializers
6441         for array members and class fields.
6443 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
6445         * lang-specs.h: Remove redundant -lang-c++.
6447 2002-05-13  Jason Merrill  <jason@redhat.com>
6449         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
6450         (fixed_type_or_null): See through reference vars.
6451         (build_base_path): Vtable contents are constant.
6452         * typeck.c (get_member_function_from_ptrfunc): Likewise.
6454 2002-05-12  Jason Merrill  <jason@redhat.com>
6456         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
6457         structs are safe.
6459 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
6461         * cp-tree.h (flag_ansi): Remove.
6462         * decl2.c (flag_ansi): Remove.
6463         (cxx_decode_option): Set flag_iso and flag_undef.
6465 2002-05-09  Jason Merrill  <jason@redhat.com>
6467         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
6468         Use subtraction rather than a bitmask to get the index.
6469         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
6471         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
6473 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
6475         * Make-lang.in (decl2.o): Update.
6476         * cp-tree.h (warn_multichar): Remove.
6477         * decl2.c: Include c-common.h.
6478         (warn_multichar): Remove.
6480 2002-05-03  Jason Merrill  <jason@redhat.com>
6482         * tree.c (build_cplus_array_type): Only const and volatile get
6483         special handling.
6485         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
6487 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
6489         ABI change, returning simple classes from functions.
6490         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
6491         TYPE_HAS_TRIVIAL_INIT_REF is false or
6492         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
6494 2002-04-30  Jason Merrill  <jason@redhat.com>
6496         PR debug/6436
6497         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
6498         anonymous class with a typedef if there are attributes.
6500 2002-04-29  Paul Eggert  <eggert@twinsun.com>
6502         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
6504 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
6506         PR c++/6477
6507         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
6508         non-NULL first.
6510 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
6512         PR c++/6492
6513         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
6514         enter that scope before name lookup.
6516         PR c++/6486
6517         * method.c (do_build_copy_constructor): Avoid building
6518         cv-qualified reference types.
6520 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
6522         PR c++/5719
6523         * decl.c (grok_op_properties): Assignment ops don't have to return
6524         by value. operator% should.
6526 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
6528         PR c/6343
6529         * decl.c (duplicate_decls): Call merge_weak.
6531 2002-04-26  Richard Henderson  <rth@redhat.com>
6533         * parse.y (malloced_yyss, malloced_yyvs): New.
6534         (yyoverflow): Re-add.  Set them.
6535         (free_parser_stacks): New.
6537 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
6539         PR c++/6497
6540         * method.c (do_build_assign_ref): Pass a derivation to
6541         build_method_call when calling base class assignment operators.
6543 2002-04-26  Richard Henderson  <rth@redhat.com>
6545         * parse.y (yyoverflow): Revert.
6547 2002-04-26  Richard Henderson  <rth@redhat.com>
6549         PR c/3581
6550         * parse.y (string): Remove.  Update all uses to use STRING
6551         instead, and not call combine_strings.
6552         * rtti.c (tinfo_name): Use fix_string_type.
6553         * semantics.c (finish_asm_stmt): Don't call combine_strings.
6554         * spew.c (yylexstring): New.
6555         (read_token): Use it.
6557 2002-04-25  Richard Henderson  <rth@redhat.com>
6559         PR c/2161
6560         * parse.y (yyoverflow): New.
6562 2002-04-25  Jason Merrill  <jason@redhat.com>
6564         PR c++/5607
6565         * search.c (check_final_overrider): No longer static.
6566         * class.c (update_vtable_entry_for_fn): Call it.
6567         * cp-tree.h: Adjust.
6569 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
6571         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
6572         * cp-tree.h (cxx_set_yydebug): Die.
6573         * lex.c (YYDEBUG): Get from c-lex.h.
6574         (cxx_set_yydebug): Remove.
6575         * parse.y: Include c-lex.h.
6576         (YYDEBUG): Get from c-lex.h.
6578 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
6580         PR c++/6438.
6581         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
6582         void.
6584 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
6586         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
6587         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
6588         Redefine.
6589         * cp-tree.h (cp_attribute_table): Rename.
6590         * decl.c (lang_attribute_table): Remove declaration.
6591         (cxx_init_decl_processing): Don't set it.
6592         * tree.c (cp_attribute_table): Rename.
6594 2002-04-24  Jason Merrill  <jason@redhat.com>
6596         PR c++/6331
6597         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
6598         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
6599         The pedwarn for array assignment is now unconditional.
6600         * tree.c (build_cplus_array_type_1): Still process simple array types
6601         normally in templates.
6603         PR c++/6395
6604         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
6605         stuff for comdats.
6607 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
6609         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
6610         node with attributes.
6612 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
6614         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
6615         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
6617 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
6619         PR c++/6256:
6620         * pt.c (tsubst_friend_class): Handle templates with explicit
6621         nested names.
6623         PR c++/6331:
6624         * typeck.c (merge_types): Remember the cv-qualification of pointer
6625         types when merging them.
6627 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
6629         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
6630         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
6631         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
6632         cxx_mark_function_context): New.
6633         * decl.c (push_cp_function_context, pop_cp_function_context,
6634         mark_cp_function_context): Rename for consistency.
6635         (cxx_init_decl_processing): Don't set old hooks.
6637 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
6639         * call.c (convert_type_from_ellipsis): Rename, update.
6640         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
6641         * cp-tree.h (convert_type_from_ellipsis): Rename.
6642         * decl.c (cxx_init_decl_processing): Don't set hook.
6644 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
6646         * call.c (build_new_method_call): Update.
6647         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
6648         * cp-tree.h (cxx_incomplete_type_error): New.
6649         * decl.c (grokdeclarator, grokparms): Update.
6650         * decl2.c (check_classfn): Update.
6651         * pt.c (tsubst): Update.
6652         * typeck.c (complete_type_or_else, expr_sizeof,
6653         decay_conversion): Update.
6654         * typeck2.c (incomplete_type_error): Rename.
6655         (add_exception_specifier): Update.
6657 2002-04-18  Jason Merrill  <jason@redhat.com>
6659         PR c++/5658
6660         * search.c (setup_class_bindings): A class template qualifies as a
6661         type binding.
6663 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
6665         PR c++/6316
6666         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
6667         before expanding.
6669 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
6671         * init.c (begin_init_stmts): Remove commented out code.
6672         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
6673         * semantics.c (begin_gobal_stmt_expr): Adjust call to
6674         expand_start_stmt_expr.
6676 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
6678         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
6679         dso_handle itself, to __cxa_atexit.
6681 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6683         * error.c (cxx_print_error_function): Adjust call to macros.
6685 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
6687         * class.c (layout_virtual_bases): Do all dsize computation on trees.
6689 2002-04-14  Jason Merrill  <jason@redhat.com>
6691         * typeck.c (get_member_function_from_ptrfunc): Don't do
6692         gratuitious division and multiplication on
6693         ptrmemfunc_vbit_in_delta targets.
6695 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
6697         PR c++/5373.
6698         * semantics.c (finish_expr_stmt): Remember the type of the
6699         expression before any conversions are performed.
6701 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
6703         PR c++/5189.
6704         * call.c (add_template_candidate_real): Do not treat member
6705         templates as copy constructors.
6707 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
6709         * decl.c (duplicate_decls): Do not copy the RTL for a variable
6710         declaration if the old variable had an incomplete type and the new
6711         variable does not.
6712         (complete_vars): Do not call layout_decl for completed variables.
6714 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
6716         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
6717         with an explicit one.
6718         (follow_tag_typedef): New.
6719         (lookup_tag): Use it to extract the tag of an explicit typedef.
6720         (xref_tag): Likewise.
6722 2002-04-11  Andrew Haley  <aph@redhat.com>
6724         * typeck.c (type_after_usual_arithmetic_conversions):
6725         If two types have the same variant, return immediately.
6726         When two floating-point operands are the same precision:
6727           convert to float if one of the operands is float;
6728           if neither operand is one of the standard types, return the type
6729           of the first operand.
6731 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
6733         PR c++/5507
6734         * decl.c (make_typename_type): Remove implicit typenameness.
6736 2002-04-09  Jason Merrill  <jason@redhat.com>
6738         PR optimization/6189
6739         * semantics.c (genrtl_start_function): Don't free
6740         DECL_SAVED_FUNCTION_DATA for inline functions.
6742         * init.c (build_member_call): For now, don't convert to
6743         intermediate base if it would cause an error.
6745 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
6747         * parse.y (namespace_qualifier, maybe_identifier,
6748         begin_explicit_instantiation, end_explicit_instantiation,
6749         apparent_template_type, .finish_template_type,
6750         do_id, maybe_init, defarg_again, component_decl_1):
6751         Add ending ';', in accordance with POSIX.
6753 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
6755         PR c++/5571
6756         * class.c (layout_class_type): Remember incomplete static
6757         variables.
6758         (finish_struct_1): Call complete_vars, not
6759         hack_incomplete_structures.
6760         * cp-tree.h (hack_incomplete_structures): Rename to ...
6761         (complete_vars): ... this.
6762         (struct saved_scope): Remove incomplete.
6763         (namespace_scope_incomplete): Remove.
6764         * decl.c (struct binding_level): Remove incomplete.
6765         (incomplete_vars): New variable.
6766         (mark_binding_level): Don't mark incomplete.
6767         (print_binding_level): Don't print it.
6768         (mark_saved_scope): Don't mark incomplete.
6769         (pushdecl): Use maybe_register_incopmlete_var.
6770         (cxx_init_decl_processing): Register incomplete_vars for GC.
6771         (start_decl_1): Clarify error message.
6772         (hack_incomplete_vars): Remove.
6773         (maybe_register_incomplete_var): New function.
6774         (complete_vars): Likewise.
6776 2002-04-06  Jason Merrill  <jason@redhat.com>
6778         PR c++/4934
6779         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
6780         set before checking it.
6782         PR c++/525
6783         * init.c (build_member_call): Use build_scoped_ref.
6784         (resolve_offset_ref): Likewise.
6785         * call.c (build_scoped_method_call): Likewise.
6786         * tree.c (maybe_dummy_object): Kludge around current_class_type being
6787         wrong.
6788         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
6789         * cp-tree.h: Adjust.
6791         * init.c (push_base_cleanups): Just use build_scoped_method_call.
6793         PR c++/6179
6794         * method.c (implicitly_declare_fn): Pass unqualified type to
6795         synthesize_exception_spec.
6797 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
6799         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
6800         * cvt.c: Update comment.
6801         * init.c (expand_cleanup_for_base): Update.
6802         * semantics.c (finish_parenthesized_expr): Update.
6803         * typeck.c (cp_truthvalue_conversion): Update.
6805 2002-04-04  Jason Merrill  <jason@redhat.com>
6807         * semantics.c (finish_eh_cleanup): New fn.
6808         * cp-tree.h: Add prototype.
6809         * init.c (perform_member_init, expand_cleanup_for_base): Use
6810         finish_eh_cleanup.
6811         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
6812         * cp-tree.h: Remove references.
6813         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
6814         * dump.c (cp_dump_tree): Likewise.
6815         * pt.c (tsubst_expr): Likewise.
6816         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
6817         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
6818         * tree.c (cp_statement_code_p): Likewise.
6820         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
6822         PR c++/5636
6823         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
6824         cleanup for nrv.
6826         PR c++/5104
6827         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
6828         specifiers.
6829         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
6831 2002-04-03  Richard Henderson  <rth@redhat.com>
6833         * cp-lang.c (cxx_warn_unused_global_decl): New.
6834         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
6836 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
6838         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
6839         * tree.c (init_tree): Don't set hook.
6841 2002-04-03  Roger Sayle  <roger@eyesopen.com>
6843         PR c++/5998:
6844         * decl.c (duplicate_decls): Don't mess with assembler names when
6845         redeclaring builtin functions as static.
6847 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
6849         * call.c (build_addr_func): Update.
6850         * class.c (resolve_address_of_overloaded_function): Update.
6851         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
6852         * cp-tree.h (cxx_mark_addressable): New.
6853         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
6854         * decl2.c (build_cleanup): Update.
6855         * except.c (build_throw): Update.
6856         * init.c (resolve_offset_ref): Update.
6857         * pt.c (convert_nontype_argument): Update.
6858         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
6859         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
6860         unary_complex_lvalue): Update.
6861         (mark_addressable): Rename.
6863 2002-04-01  Roger Sayle  <roger@eyesopen.com>
6865         PR c++/5998:
6866         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
6867         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
6868         but follow the SET_DECL_RTL idiom used elsewhere in the function.
6870 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
6872         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
6873         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
6874         * decl.c (grokdeclarator): Update.
6875         * mangle.c (write_integer_cst): Update.
6876         * typeck.c (build_binary_op): Update.
6878 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
6880         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
6881         * lex.c (cxx_init): Don't set hook.
6883 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
6885         * Make-lang.in (error.o): Update.
6886         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
6887         * cp-tree.h (struct diagnostic_context): Predeclare.
6888         (cxx_print_error_function): New.
6889         * error.c: Include langhooks-def.h.
6890         (lang_print_error_function): Rename.  Update.
6891         (init_error): Don't set hook.
6893 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
6895         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
6896         Redefine.
6897         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
6898         * decl.c (finish_enum): Similarly.
6899         * error.c (dump_type): Similarly.
6900         * lex.c (cxx_init): Similarly.
6901         * mangle.c (write_builtin_type): Similarly.
6902         * typeck.c (comptypes): Similarly.
6904 2002-03-28  Roger Sayle  <roger@eyesopen.com>
6906         PR c++/5998:
6907         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
6908         in the g++ front-end.
6909         (duplicate_decl): Allow redefinition of anticipated built-ins.
6910         Fix inlining problem by over-writing the old DECL_RTL.
6911         (lookup_namespace_name): Fail to find an identifier in the
6912         specified namespace if its still anticipated.
6913         (builtin_function_1): New function split out from builtin_function
6914         to create a builtin in the current namespace with given context.
6915         (builtin_function): Call builtin_function_1 to define the
6916         appropriate builtins in both the std and global namespaces.
6917         (select_decl): Don't test for anticipated decls here.
6918         (unqualified_namespace_lookup): Instead ignore them whilst
6919         searching through scopes and namespaces.
6920         * decl2.c (do_nonmember_using_decl): If a using declaration
6921         specifies an anticipated built-in function, mark it as no longer
6922         anticipated in that scope.
6923         (ambiguous_decl):  Avoid resolving to an anticipated decl.
6924         * lex.c (do_scoped_id): Fail to find an identifier in the global
6925         namespace if its still anticipated.
6927 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
6929         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
6930         * cp-tree.h (cp_make_lang_type): Rename.
6931         * lex.c (cp_make_lang_type): Rename.
6932         (make_aggr_type): Update.
6933         * tree.c (init_tree): Don't set make_lang_type_fn.
6935 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
6937         PR c++/6073
6938         * class.c (finish_struct_1): Update static field's DECL_MODE even
6939         if its type is a variant of t.
6941 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
6943         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
6944         * cp-tree.h (cxx_insert_default_attributes): New.
6945         * decl.c (insert_default_attributes): Rename.
6947 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
6949         PR c++/4884
6950         * call.c (build_op_delete_call): Allow for the fact the placement
6951         may be a COMPOUND_EXPR.
6953 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
6955         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
6956         * cp-tree.h (init_cplus_expand): Remove.
6957         (cxx_expand_expr): New.
6958         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
6959         fix prototype.
6960         (init_cplus_expand): Remove.
6961         * lex.c (cxx_init): Don't call init_cplus_expand.
6963 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
6965         PR c++/4884.
6966         * init.c (build_new_1): Allow for the fact the result of
6967         build_function_call may be a COMPOUND_EXPR.
6969 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
6971         PR c++/5682
6972         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
6973         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
6974         (dfs_skip_nonprimary_vbases_markedp): Remove.
6975         * search.c (get_shared_vbase_if_not_primary): Remove.
6976         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
6977         (dfs_skip_nonprimary_vbases_markedp): Remove.
6978         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
6979         (dfs_marked_real_bases_queue_p): Likewise.
6981 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
6983         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
6984         * cp-tree.h (cxx_mark_tree): New.
6985         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
6987 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
6989         * cp-tree.h (cxx_maybe_build_cleanup): New.
6990         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
6991         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
6992         * tree.c (build_target_expr): Update.
6993         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
6995 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
6997         * decl2.c (cxx_decode_option): Handle -E.
6998         * lang-specs.h (default_compilers): Preprocess with cc1plus.
6999         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
7001 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
7003         PR c++/6037
7004         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
7006 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7008         * error.c (dump_type): Be careful about implicit typenames.
7010 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7012         PR C++/3656
7013         * semantics.c (finish_base_specifier): Handle erronous base
7014         classes.
7016 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
7018         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
7019         REAL_IS_NOT_DOUBLE.
7021 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
7023         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
7024         an index into the vtable_entry array regardless of
7025         TARGET_PTRMEMFUNC_VBIT_LOCATION.
7027 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
7029         * tree.c (cp_cannot_inline_tree_fn): Same.
7031 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
7033         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
7034         insert_block, getdecls, global_bindings_p): New.
7036 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
7038         PR c++/4361
7039         * mangle.c (struct globals) Add internal_mangling_p member.
7040         (write_template_param): Do internal mangling, if needed.
7041         (mangle_conv_op_name_for_type): Request internal mangling.
7043 2002-03-20  Jason Merrill  <jason@redhat.com>
7045         PR c++/2136
7046         * init.c (build_delete): Check access for a member op delete here.
7047         * decl2.c (delete_sanity): Not here.
7049 2002-03-19  Jason Merrill  <jason@redhat.com>
7051         PR c++/5118
7052         * class.c (get_vfield_name): Use the constructor_name.
7054 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
7056         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
7057         * cp-tree.h (lang_printable_name): Rename.
7058         * error.c (lang_decl_name): Use new hook.
7059         * lex.c (cxx_init): Remove old hook.
7060         * pt.c (tsubst_decl): Use new hook.
7061         * tree.c (lang_printable_name): Rename.
7063 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
7065         PR c++/3882
7066         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
7067         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
7068         only after recording the declaration.
7070 2002-03-18  Jason Merrill  <jason@redhat.com>
7072         PR c++/2039
7073         * init.c (resolve_offset_ref): Hand off to build_component_ref.
7075         PR c++/4222, c++/5995
7076         * call.c (build_over_call): Fix empty class logic.
7078         PR c++/3870
7079         * cp-tree.h (struct saved_scope): Add last_parms field.
7080         * decl.c (maybe_push_to_top_level): Save last_function_parms.
7081         (pop_from_top_level): Restore it.
7083         PR c++/4377
7084         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
7085         NON_LVALUE_EXPRs.
7087         PR c++/4003
7088         * pt.c (tsubst_friend_function): Use decl_namespace_context.
7090         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
7091         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
7092         type with a nontrivial destructor.
7094 2002-03-17  Jason Merrill  <jason@redhat.com>
7096         PR c++/4460
7097         * class.c (build_base_path): Virtual base layout is fixed in
7098         in-charge [cd]tors.
7100 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
7102         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
7103         * parse.y (yyparse): Remove macro.
7105 2002-03-17  Jason Merrill  <jason@redhat.com>
7107         PR c++/5757
7108         * init.c (build_new_1): Pass the right pointer to op delete.
7110 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
7112         PR c++/4361
7113         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
7114         conversion operators go.
7115         (struct lang_decl_flags): Add template_conv_p and unused
7116         bitfields.
7117         (DECL_TEMPLATE_CONV_FN_P): New macro.
7118         * call.c (build_user_type_conversion_1): Don't check second type
7119         conversion of overload set first.
7120         * class.c (add_method): Make sure templated conversion operators
7121         all end up on slot 2.
7122         * lex.c (do_identifier): A conversion operator token might be
7123         satisfied by a templated conversion operator.
7124         * pt.c (check_explicit_specialization): Use
7125         CLASSTYPE_FIRST_CONVERSION_SLOT.
7126         (template_parm_this_level_p): New function.
7127         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
7128         * search.c (lookup_fnfields_1): Template conversions will be on
7129         the first slot.
7130         * typeck.c (build_component_ref): Preserve the type of an
7131         conversion operator name on the overload type.
7132         (build_x_function_call): Retrieve the conversion operator name.
7134 2002-03-15  Richard Henderson  <rth@redhat.com>
7136         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
7138 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
7140         * cp-tree.h (CLEANUP_DECL): Remove.
7141         (CLEANUP_EXPR): Likewise.
7142         * decl.c (destroy_local_var): Simplify.
7143         (maybe_build_cleanup): Tidy.
7144         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
7145         * semantics.c (cp_expand_stmt): Likewise.
7146         * cp/tree.c (cp_statement_code_p): Likewise.
7148 2002-03-15  Jason Merrill  <jason@redhat.com>
7150         PR c++/5857
7151         * decl.c (duplicate_decls): Use merge_types instead of common_type.
7152         * typeck.c (common_type): Just hand off to
7153         type_after_usual_arithmetic_conversions and
7154         composite_pointer_type.
7155         (merge_types): New fn.
7156         (commonparms): Use it instead of common_type.
7157         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
7158         (composite_pointer_type): Also handle attributes.
7159         * cp-tree.h: Declare merge_types.
7161         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
7162         variables.
7163         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
7165 2002-03-14  Richard Henderson  <rth@redhat.com>
7167         * decl.c: Include c-pragma.h.
7168         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
7169         * Make-lang.in: Update dependencies.
7171 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
7173         PR c++/5908
7174         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
7175         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
7177 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
7179         * mangle.c (write_builtin_type): Handle 128-bit integers even if
7180         they are not a standard integer type.
7182 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
7184         * cp-tree.h (init_init_processing): Remove declaration.
7185         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
7186         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
7188 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7190         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
7191         Define.
7192         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
7193         tree_code_length.
7194         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
7195         cplus_tree_code_name): Delete.
7196         (cxx_init): Don't call add_c_tree_codes, instead set
7197         lang_unsafe_for_reeval.  Don't try to copy into the various
7198         tree_code arrays.
7200 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
7202         PR c++/5659
7203         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
7204         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
7205         definitions.
7207 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
7209         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
7210         DR209 is now not a defect.
7211         * cp-tree.h (skip_type_access_control): Remove.
7212         * decl.c (grokdeclarator): Do type access control for friend
7213         declarations.
7214         * semantics.c (decl_type_access_control): Don't reset
7215         current_type_lookups.
7216         (save_type_access_control): Always save the lookups.
7217         (skip_type_access_control): Remove.
7218         (finish_class_definition): Don't change type_lookups.
7220 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
7222         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
7223         It is incorrect.
7224         * typeck.c (build_static_cast): Compare non-qualified types
7225         with pointer to member conversions.
7227 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
7228             Daniel Berlin  <dan@dberlin.org>
7230         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
7231         (cxx_get_alias_set): Use it.
7233 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7235         * cp-tree.h (stabilize_expr): Prototype.
7237 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
7239         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
7240         conditional return void.
7242 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
7244         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
7245         * cp-tree.h (cxx_unsave): New.
7246         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
7247         (init_tree): Update.
7249 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7251         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
7252         explicit sizeof/sizeof.
7253         * decl2.c (cxx_decode_option): Likewise.
7254         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
7256 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
7258         PR c++/775
7259         * decl.c (lookup_tag): Only reject enum/class mismatch, not
7260         class/union mismatch.
7261         * parse.y (check_class_key): New function.
7262         (structsp): Call it.
7264 2002-03-01  Michael Matz  <matz@suse.de>
7266         * typeck.c (cp_pointer_int_sum): Complete inner type which is
7267         used later by size_in_bytes().
7269 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
7271         * cp-tree.h:  Require __GNUC__ to be #defined.
7272         (build_init):  Add missing prototype.
7274 2002-03-01  Jason Merrill  <jason@redhat.com>
7276         * except.c: Don't include decl.h or obstack.h.  Do include
7277         tree-inline.h.
7278         (build_throw): Destroy temporaries from the thrown
7279         expression before calling __cxa_throw.  Construct a thrown
7280         temporary directly into the exception object.
7281         (stabilize_throw_expr): New function.
7282         (wrap_cleanups_r): New function.
7283         * tree.c (stabilize_expr): New function.
7284         * init.c (build_init): New function.
7285         * Make-lang.in (cp/except.o): Adjust .h deps.
7287 2002-02-28  Jason Merrill  <jason@redhat.com>
7289         * search.c (lookup_base_r): Don't clear is_non_public just because
7290         we found a friendly scope.
7292         * decl.c (finish_function): Only warn about missing return
7293         statement with -Wreturn-type.
7295 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
7297         * class.c (build_clone): Update.
7298         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
7299         * cp-tree.h (cxx_dup_lang_specific_decl): New.
7300         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
7301         (copy_decl): Update.
7302         * method.c (make_thunk): Update.
7304 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
7306         * decl2.c: Delete traditional-mode-related code copied from
7307         the C front end but not used, or used only to permit the
7308         compiler to link.
7310 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
7312         PR c++/4093
7313         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
7314         to void.
7316 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
7318         PR other/5746
7319         * semantics.c (finish_switch_cond): Don't call get_unwidened
7320         if error_mark_node.
7322 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
7324         PR c++/2645, DR 295
7325         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
7326         tf_keep_type_decl.
7327         (make_typename_type): Use tsubst_flags_t.
7328         * decl.c (make_typename_type): Adjust. Return non-artificial
7329         TYPE_DECLs, if required.
7330         (grokdeclarator): Simplify CVR qualification handling. Allow bad
7331         qualifiers on typedef types.
7332         * decl2.c (handle_class_head): Adjust make_typename_type call.
7333         * parse.y (nested_name_specifier): Likewise.
7334         (typename_sub0): Likewise.
7335         (typename_sub1): Likewise.
7336         * pt.c (convert_template_argument): Adjust make_typename_type
7337         return value.
7338         (tsubst): Adjust cp_build_qualified_type_real calls.
7339         (check_cv_quals_for_unify): Cope with allowing bad qualifications
7340         on template type parms.
7341         (instantiate_decl): Recheck substitutions to give warnings on bad
7342         qualifications.
7343         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
7345 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
7347         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
7349         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
7350         unless DECL_ALWAYS_INLINE.
7352 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
7354         * typeck.c (cp_pointer_int_sum): Renamed from
7355         pointer_int_sum, call pointer_int_sum.
7357 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
7359         * decl.c (duplicate_decls): Return 0 if issued error about
7360         redeclaration.
7362 2002-02-19  Jason Merrill  <jason@redhat.com>
7364         ABI change: Mangle `void (A::*)() const' as
7365         M1AKFvvE, not MK1AFvvE.
7366         * mangle.c (write_function_type): Write cv-quals for member
7367         function type here.
7368         (write_pointer_to_member_type): Not here.
7370 2002-02-18  Jason Merrill  <jason@redhat.com>
7372         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
7373         (do_decl_instantiation): Likewise.
7375 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
7377         PR c++/5685
7378         * decl.c (duplicate_decls): Make warning unconditional
7379         if duplicate default argument declarations are present.
7381 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
7383         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
7384         shortening.
7386 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
7388         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
7389         remove incorrect comment. Move #if 0'd code to common path. Use
7390         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
7392 2002-02-13  Jason Merrill  <jason@redhat.com>
7394         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
7395         (finish_function): Don't warn if current_function_returns_null.
7397         * typeck2.c (digest_init): Do handle values of vector type.
7399         * typeck2.c (digest_init, process_init_constructor): Treat vectors
7400         like arrays.
7402 2002-02-11  Jason Merrill  <jason@redhat.com>
7404         * parse.y (reserved_declspecs): Don't handle attributes.
7405         (reserved_typespecquals): Handle them here.
7406         * Make-lang.in (parse.c): Adjust expected conflicts.
7408 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
7410         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
7411         instead of compstmt.
7412         (compstmt_or_stmtexpr): Renamed from compstmt.
7413         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
7415 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
7417         Rename instantiate_type_flags to tsubst_flags_t & expand use.
7418         * cp-tree.h (instantiate_type_flags): Rename to ...
7419         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
7420         add tf_warning flag.
7421         (instantiate_type): Adjust prototype.
7422         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
7423         do_type_instantiation, cp_build_qualified_type_real): Likewise.
7424         cp_build_qualified_type: Adjust.
7425         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
7426         tf_*.
7427         * call.c (standard_conversion): Rename itf_* to tf_*.
7428         (reference_binding): Likewise.
7429         (convert_like_real): Likewise.
7430         * cvt.c (cp_convert_to_pointer): Likewise.
7431         (convert_to_reference): Likewise.
7432         * decl.c (lookup_namespace_name): Use tf_* flags.
7433         (make_typename_type): Likewise.
7434         (grokdeclarator): Likewise.
7435         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
7436         (coerce_template_template_parms, convert_template_argument,
7437         coerce_template_parms, maybe_get_template_decl_from_type_decl,
7438         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
7439         instantiate_class_template, tsubst_template_arg_vector,
7440         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
7441         tsubst_decl, tsubst_arg_types, tsubst_function_type,
7442         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
7443         instantiate_template, fn_type_unification,
7444         resolve_overloaded_unification, verify_class_unification,
7445         unify, get_bindings_real, do_type_instantiation,
7446         regenerate_decl_from_template, instantiate_decl,
7447         tsubst_initializer_list, tsubst_enum,
7448         get_mostly_instantiated_function_type,
7449         invalid_nontype_parm_type_p): Likewise.
7450         * tree.c (cp_build_qualified_type_real): Likewise.
7451         * typeck.c (build_binary_op): Rename itf_* to tf_*.
7452         (build_ptrmemfunc): Likewise.
7453         (convert_for_assignment): Likewise.
7455 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
7457         PR c++/109
7458         * decl.c (grokdeclarator): Allow friend declarations from
7459         dependent types.
7460         * decl2.c (handle_class_head): Don't push into template parm contexts.
7461         * pt.c (push_template_decl_real): Template parm contexts are never
7462         being defined.
7464 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
7466         * class.c: Include target.h.
7467         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
7468         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
7469         bit-field layout.
7470         * Make-lang.in: Adjust deps.
7472 2002-02-05  Jason Merrill  <jason@redhat.com>
7474         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
7476 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
7478         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
7479         (finish_switch_cond): Set SWITCH_TYPE.
7481 2002-02-04  Richard Henderson  <rth@redhat.com>
7483         * method.c (use_thunk): Always initialize the block tree.  Reindent.
7484         * semantics.c (expand_body): Emit thunks after function, not before.
7486 2002-02-04  Jason Merrill  <jason@redhat.com>
7488         * decl.c (start_function): Call cplus_decl_attributes immediately
7489         after grokdeclarator.
7491         * decl.c (start_function): Combine DECL_RESULT handling code.
7493 2002-02-03  Jason Merrill  <jason@redhat.com>
7495         * xref.c: Remove.
7496         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
7497         (cp/xref.o): Remove dependencies.
7498         * class.c (finish_struct_1, check_methods): Don't call xref fns.
7499         (finish_struct_1): Likewise.
7500         * friend.c (make_friend_class): Likewise.
7501         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
7502         * spew.c (read_process_identifier): Likewise.
7504 2002-02-01  Jason Merrill  <jason@redhat.com>
7506         PR c++/4872
7507         * decl.c (finish_function): Warn about a non-void function with
7508         no return statement and no abnormal exit.
7509         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
7510         (current_function_returns_abnormally): New macro.
7511         * call.c (build_call): Set it.
7513         * typeck.c (build_component_ref): Always complain about offsetof
7514         constructs on non-PODs.  Only make it an error for members of
7515         virtual bases.
7517         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
7518         (dump_function_decl): Always dump parms.
7520         * decl2.c (finish_static_data_member_decl): Complain about a local
7521         class with a static data member.
7523         PR c++/4286
7524         * search.c (lookup_field_1): Don't xref a static data member
7525         just because we looked it up.
7527 2002-01-31  Jason Merrill  <jason@redhat.com>
7529         * Make-lang.in (parse.c): Handle .output file.
7531         PR c++/3395
7532         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
7533         not TREE_TYPE.
7534         * semantics.c (finish_class_definition): Adjust.
7536         Allow attributes in parms and casts.
7537         * parse.y (named_parm): Don't strip attrs.
7538         (declmods): Remove 'attributes' production.
7539         (nonempty_cv_qualifiers): Accept attributes.
7540         (ATTRIBUTE): Give precedence.
7541         * decl.c (groktypename): Handle attributes.
7542         (grokparms): Likewise.
7544 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
7546         * decl2.c (cxx_decode_option): Pass 0 as last argument to
7547         cpp_handle_option.
7548         * lang-specs.h: Use cpp_unique_options instead of cpp_options
7549         when used together with cc1_options.
7551 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
7553         PR c++/5132
7554         * typeck2.c (digest_init): Make sure non-array core type is
7555         instantiated.
7556         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
7557         constructor, rather than build a new one.
7558         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
7559         PURPOSE of constructor elts.
7561 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
7563         * Make-lang.in (parse.c): Adjust expected number of
7564         shift-reduce conflicts.
7565         (decl.o): Depend on diagnostic.h.
7566         * decl.c: Include diagnostic.h.
7567         (grokdeclarator): Check for null pointer.
7568         (finish_function): Don't abort when
7569         current_binding_level->parm_flag != 1, if errors have
7570         occurred; throw away the statement tree and extra binding
7571         levels, and continue.
7572         * lex.c (note_list_got_semicolon): Check for null pointer.
7573         * method.c (hack_identifier): Just return error_mark_node if
7574         value is error_mark_node.
7575         * parse.y (primary: TYPEID(type_id)): No need to use
7576         TYPE_MAIN_VARIANT here.
7577         (handler_seq): Accept an empty list of catch clauses and
7578         generate a fake handler block to avoid later crashes.
7579         (ansi_raise_identifier): Accept the error token too.
7580         * semantics.c (begin_class_definition,
7581         finish_class_definition): Check for error_mark_node.
7583 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
7585         * typeck2.c (friendly_abort): Delete definition.
7586         * cp-tree.h (friendly_abort): Don't prototype.
7587         (my_friendly_assert): Use fancy_abort.
7589 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
7591         * cp-tree.h (my_friendly_abort): Remove.
7593 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
7595         * spew.c (pending_inlines, pending_inlines_tail,
7596         processing_these_inlines): Make static.
7597         (mark_pending_inlines): Remove static.
7598         (begin_parsing_inclass_inline): If in function, save pi
7599         for GC to cp_function_chain->unparsed_inlines instead.
7600         (process_next_inline): Likewise.
7601         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
7602         (mark_pending_inlines): Add prototype.
7603         * decl.c (spew_debug): Remove unused extern.
7604         (mark_lang_function): Call mark_pending_inlines.
7606 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
7608         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
7609         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
7610         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
7611         Change my_fancy_abort() to abort().
7613 2002-01-23  Jason Merrill  <jason@redhat.com>
7615         PR c++/5453
7616         * class.c (fixed_type_or_null): Fix thinko.
7618         PR c++/3331
7619         * init.c (resolve_offset_ref): Use build_indirect_ref.
7621         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
7623 2002-01-22  Jason Merrill  <jason@redhat.com>
7625         * parse.y (function_body): Suppress the block for the outermost
7626         curly braces.
7627         * decl.c (pushdecl): Don't try to skip it.
7628         (begin_function_body): Keep the block we create, not the next one.
7629         * init.c (emit_base_init): Don't mess with keep_next_level.
7631         * class.c (build_base_path): Tweak formatting.
7633 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
7635         Fix regression introduced with patch for c++/775
7636         * parse.y (class_head_defn): Check for template specializations
7637         with a different class-key.
7639 2002-01-17  Jason Merrill  <jason@redhat.com>
7641         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
7642         (begin_function_body): Call them and keep_next_level.
7643         * init.c (emit_base_init): Call keep_next_level.
7644         * semantics.c (setup_vtbl_ptr): Lose.
7645         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
7646         (vtbls_set_up_p): Lose.
7647         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
7648         * method.c (do_build_copy_constructor): Likewise.
7649         (synthesize_method): Call finish_mem_initializers.
7650         * parse.y (nodecls): Likewise.
7652         * error.c (dump_type_suffix): Print the exception specs before
7653         recursing.
7654         (dump_function_decl): Here, too.
7656         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
7658 2002-01-10  Ira Ruben   <ira@apple.com>
7660         PR c++/907
7661         * decl.c (start_method): Handle attrlist.
7663 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
7665         * decl2.c (max_tinst_depth): Increase default limit to 500.
7667 2002-01-10  Graham Stott  <grahams@redhat.com>
7669         * spew.c (YYCHAR): Uppercase macro parameter and add
7670         parenthesis.
7671         (YYCODE): Likewise.
7672         (NAME): Uppercase macro parameter.
7674 2002-01-09  Graham Stott  <grahams@redhat.com>
7676         * decl.h (grokdeclarator): Wrap long line.
7678         * semantics.c (FINISH_COND): Uppercase macro paramaters and
7679         add parenthesis.
7681 2002-01-08  Graham Stott  <grahams@redhat.com>
7683         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
7684         (PALLOC): Uppercase macro parameter and whitespace.
7685         (SALLOC): Uppercase macro parameter.
7686         (SFREE): Uppercase macros parameter, add parenthese and
7687         whitespace.
7688         (STREQL): Uppercase macro parameter and whitespace.
7689         (STRNEQ): Likewise.
7690         (STRLSS): Likewise.
7691         (STRLEQ): Likewise.
7692         (STRGTR): Likewise.
7693         (STRGEQ): Likewise.
7695         * call.c (convert_like): Add parenthesis and wrap.
7696         (convert_like_with_context): Likewise.
7697         (ICS_RANK): Whitespace.
7698         (NEED_TEMPORARY_P): Remove parenthesis.
7700         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
7701         whitespace.
7702         (VTT_MARKED_BINFO_P): Likewise.
7704         * decl.c (BINDING_LEVEL): Add parenthesis.
7705         (DEF_OPERATOR): Likewise.
7707         * mangle.c (MANGLE_TRACE): Add parenthesis.
7708         (MANGLE_TRACE_TREE): Likewise.
7709         (write_signed_number): Likewise.
7710         (write_unsigned_number): Likewise.
7712         * pt.c (ccat): Uppercase macro parameter.
7713         (cat): Likewise
7715         * search.c (SET_BINFO_ACCESS): Add parenthesis.
7717 2002-01-07  Jason Merrill  <jason@redhat.com>
7719         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
7720         to pedwarn.
7722         PR c++/3536
7723         * method.c (make_thunk): If !flag_weak, give the thunk the
7724         function's linkage.
7725         (use_thunk): Here, too.
7727 2002-01-07  Graham Stott  <grahams@redhat.com>
7729         * error.c: Update copyright date.
7730         (print_scope_operator): Add parenthesis.
7731         (print_left_paren): Likewise.
7732         (print_right_paren): Likewise.
7733         (print_left_bracket): Likewise.
7734         (print_right_bracket): Likewise.
7735         (print_template_argument_list_start): Likewise.
7736         (print_template_argument_list_end): Likewise.
7737         (print_non_consecutive_character): Likewise.
7738         (print_tree_identifier): Likewise.
7739         (print_identifier): Likewise.
7740         (NEXT_CODE): Uppercase macro parameter.
7741         (ident_fndecl): Delete unused.
7742         (GLOBAL_THING): Likewise.
7744 2002-01-06  Graham Stott  <grahams@redhat.com>
7746         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
7747         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
7748         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
7749         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
7750         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
7751         (C_IS_RESERVED_WORD): Uppercase macro parameter.
7752         (C_RID_YYCODE) Likewise.
7753         (ptrmem_cst): Use rtx.
7754         (LOCAL_BINDING_P): Add whitespace.
7755         (INHERITED_VALUE_BINDING_P): Likewise.
7756         (BINDING_SCOPE): Wrap long line.
7757         (BINDING_HAS_LEVEL_P): Remove parenthesis.
7758         (BINDING_VALUE): Wrap long line.
7759         (BINDING_TYPE): Whitespace.
7760         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
7761         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
7762         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
7763         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
7764         (same_type_p): Uppercase macro parameters.
7765         (same_type_ignoring_top_level_qualifiers_p): Likewise.
7766         (OVL_FUNCTION): Wrap long line.
7767         (OVL_CHAIN): Whitespace.
7768         (OVL_CURRENT): Add parenthesis and whitespace.
7769         (OVL_NEXT): Whitespace.
7770         (OVL_USED): Likewise.
7771         (IDENTIFIER_TYPE_VALUE): Likewise.
7772         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
7773         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
7774         (LANG_ID_FIELD): Whitespace.
7775         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
7776         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
7777         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
7778         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
7779         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
7780         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
7781         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
7782         (IDENTIFIER_VIRTUAL_P): Likewise.
7783         (IDENTIFIER_OPNAME_P): Likewise.
7784         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
7785         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
7786         (C_SET_EXP_ORIGINAL_CODE): Likewise.
7787         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
7788         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
7789         (IS_AGGR_TYPE): Uppercase macro parameter.
7790         (CLASS_TYPE_P): Likewise.
7791         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
7792         (IS_AGGR_TYPE_2): Whitespace.
7793         (TAGGED_TYPE_P): Uppercase macro parameter.
7794         (TYPE_BUILT_IN): Whitespace.
7795         (TYPE_FOR_JAVA): Likewise.
7796         (FUNCTION_ARG_CHAIN): Remove parenthesis.
7797         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
7798         (FUNCTION_FIRST_USER_PARAM): Likewise.
7799         (PROMOTES_TO_AGGR_TYPE): Whitespace.
7800         (DERIVED_FROM_P): Add parenthesis and wrap.
7801         (UNIQUELY_DERIVED_FROM_P): Likewise.
7802         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
7803         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
7804         (CLASSTYPE_USE_TEMPLATE): Whitespace.
7805         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
7806         (TYPE_GETS_DELETE): Add parenthesis.
7807         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
7808         (TYPE_HAS_ASSIGN_REF): Likewise,
7809         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
7810         (TYPE_HAS_INIT_REF): Likewise.
7811         (TYPE_HAS_CONST_INIT_REF): Likewise.
7812         (TYPE_BEING_DEFINED): Likewise.
7813         (TYPE_LANG_SPECIFIC): Likewise.
7814         (CLASSTYPE_RTTI): Likewise.
7815         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
7816         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
7817         (TYPE_OVERLOADS_ARROW): Likewise.
7818         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
7819         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
7820         (CLASSTYPE_METHOD_VEC): Likewise.
7821         (CLASSTYPE_MARKED_N): Likewise.
7822         (CLASSTYPE_MARKED): Likewise.
7823         (CLASSTYPE_MARKED2): Likewise.
7824         (CLASSTYPE_MARKED3): Likewise.
7825         (CLASSTYPE_MARKED4): Likewise.
7826         (CLASSTYPE_MARKED5): Likewise.
7827         (CLASSTYPE_MARKED6): Likewise.
7828         (SET_CLASSTYPE_MARKED): Whitespace.
7829         (CLEAR_CLASSTYPE_MARKED): Likewise.
7830         (SET_CLASSTYPE_MARKED2): Likewise.
7831         (CLEAR_CLASSTYPE_MARKED2): Likewise.
7832         (SET_CLASSTYPE_MARKED3): Likewise.
7833         (CLEAR_CLASSTYPE_MARKED3): Likewise.
7834         (SET_CLASSTYPE_MARKED4): Likewise.
7835         (CLEAR_CLASSTYPE_MARKED4): Likewise.
7836         (SET_CLASSTYPE_MARKED5): Likewise.
7837         (CLEAR_CLASSTYPE_MARKED5): Likewise.
7838         (SET_CLASSTYPE_MARKED6): Likewise.
7839         (CLEAR_CLASSTYPE_MARKED6): Likewise.
7840         (CLASSTYPE_TAGS): Likewise.
7841         (CLASSTYPE_VSIZE): Likewise.
7842         (CLASSTYPE_VBASECLASSES): Likewise.
7843         (CANONICAL_BINFO): Add parenthesis.
7844         (CLASSTYPE_SIZE(NODE): Likewise.
7845         (CLASSTYPE_SIZE_UNIT): Likewise.
7846         (CLASSTYPE_ALIGN(NODE): Likewise.
7847         (CLASSTYPE_USER_ALIGN): Likewise.
7848         (TYPE_JAVA_INTERFACE): Likewise.
7849         (CLASSTYPE_PURE_VIRTUALS): Likewise.
7850         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
7851         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
7852         (CLASSTYPE_HAS_MUTABLE): Likewise.
7853         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
7854         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
7855         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
7856         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
7857         (CLASSTYPE_INTERFACE_ONLY): Likewise.
7858         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
7859         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
7860         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
7861         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
7862         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
7863         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
7864         (BINFO_UNSHARED_MARKED): Whitespace.
7865         (BINFO_MARKED): Whitespace and wrap.
7866         (SET_BINFO_MARKED): Likewise.
7867         (CLEAR_BINFO_MARKED): Likewise.
7868         (BINFO_VTABLE_PATH_MARKED): Likewise.
7869         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
7870         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
7871         (BINFO_SUBVTT_INDEX): Remove parenthesis.
7872         (BINFO_VPTR_INDEX): Likewise.
7873         (BINFO_PRIMARY_BASE_OF): Likewise,
7874         (CLASSTYPE_VFIELDS): Whitespace.
7875         (VF_DERIVED_VALUE): Wrap long line.
7876         (NAMESPACE_LEVEL): Whitespace.
7877         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
7878         (DEFARG_POINTER): Whitespace.
7879         (DECL_NEEDED_P): Remove parenthesis.
7880         (DECL_LANGUAGE): Whitespace.
7881         (SET_DECL_LANGUAGE): Add parenthesis.
7882         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
7883         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
7884         (DECL_IN_AGGR_P): Whitespace.
7885         (DECL_FRIEND_P): Likewise.
7886         (DECL_BEFRIENDING_CLASSES): Likewise.
7887         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
7888         (DECL_NONCONVERTING_P): Whitespace.
7889         (DECL_PURE_VIRTUAL_P): Likewise.
7890         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
7891         (DECL_PENDING_INLINE_INFO): Whitespace.
7892         (DECL_SORTED_FIELDS): Likewise.
7893         (DECL_DEFERRED_FN): Likewise.
7894         (DECL_TEMPLATE_INFO): Likewise.
7895         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
7896         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
7897         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
7898         (TMPL_ARGS_LEVEL): Likewise.
7899         (SET_TMPL_ARGS_LEVEL): Likewise.
7900         (INNERMOST_TEMPLATE_PARMS): Whitespace.
7901         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
7902         (INTEGRAL_CODE_P(CODE): Add parenthesis.
7903         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
7904         (TYPE_HAS_CONSTRUCTOR): Whitespace.
7905         (TREE_HAS_CONSTRUCTOR): Likewise.
7906         (TYPE_HAS_DESTRUCTOR): Likewise.
7907         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
7908         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
7909         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
7910         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
7911         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
7912         (TYPE_PTRMEMFUNC_P): Likewise.
7913         (TYPE_PTRMEMFUNC_FLAG): Likewise.
7914         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
7915         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
7916         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
7917         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
7918         (DECL_ACCESS): Whitespace.
7919         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
7920         (DECL_GLOBAL_DTOR_P): Likewise.
7921         (GLOBAL_INIT_PRIORITY): Likewise.
7922         (DECL_TEMPLATE_PARMS): Likewise.
7923         (DECL_TEMPLATE_RESULT): Likewise.
7924         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
7925         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
7926         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
7927         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
7928         (PRIMARY_TEMPLATE_P): Add parenthesis.
7929         (DECL_USE_TEMPLATE): Whitespace.
7930         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
7931         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
7932         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
7933         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
7934         (CALL_DECLARATOR_PARMS): Remove parenthesis.
7935         (CALL_DECLARATOR_QUALS): Likewise.
7936         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
7937         (TEMP_NAME_P): Wrap.
7938         (VFIELD_NAME_P): Likewise.
7939         (B_SET): Uppercase macro parameters and add parenthesis.
7940         (B_CLR): Likewise.
7941         (B_TST): Likewise.
7942         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
7943         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
7944         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
7945         (same_or_base_type_p): Likewise.
7946         (cp_deprecated): Likewise.
7948 2002-01-05  Richard Henderson  <rth@redhat.com>
7950         * semantics.c (expand_body): Revert last change.
7952 2002-01-04  Jason Merrill  <jason@redhat.com>
7954         PR c++/4122
7955         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
7956         lost primary.
7958         * class.c (build_vtbl_initializer): Check for a lost primary
7959         before calculating the vtable entry to throw away.
7961 2002-01-02  Jason Merrill  <jason@redhat.com>
7963         * semantics.c (expand_body): Call outlining_inline_function when
7964         emitting an inline function out of line.
7966 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7968         PR c++/5116, c++/764 reversion
7969         * call.c (build_new_op): Revert the instantiations. They are
7970         incorrect.
7972 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7974         PR c++/5089
7975         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
7977 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7979         PR c++/3716
7980         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
7981         (tsubst, case POINTER_TYPE): Handle pmfs here.
7982         (tsubst, case OFFSET_TYPE): Check it is not an offset to
7983         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
7985 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7987         PR c++/35
7988         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
7989         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
7990         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
7991         PARM_DECL.
7992         (tsubst_template_parms): Break up loop statements.
7993         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
7994         parm PARM_DECLs don't get promoted.
7996 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7998         PR c++/5123
7999         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
8000         (build_x_function_call): Cope with a COMPONENT_REF containing a
8001         TEMPLATE_ID_EXPR.
8003 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
8005         PR c++/5213
8006         * pt.c (convert_template_argument): Be more careful determining
8007         when RECORD_TYPE templates are or are not templates.
8009 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
8011         PR c++/775
8012         * cp-tree.h (handle_class_head): Adjust prototype.
8013         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
8014         parameters. Use for all class heads.
8015         * parse.y (named_class_head_sans_basetype, named_class_head,
8016         named_complex_class_head_sans_basetype,
8017         named_class_head_sans_basetype_defn,
8018         unnamed_class_head): Remove.
8019         (class_head, class_head_apparent_template): Recognize class heads
8020         (class_head_decl, class_head_defn): New reductions. Process class
8021         heads.
8022         (structsp): Adjust class definition and class declaration
8023         reductions.
8024         (maybe_base_class_list): Give diagnostic on empty list.
8026 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
8028         PR c++/4379
8029         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
8030         single non-static member.
8031         (unary_complex_lvalue): If it cannot be a pointer to member, don't
8032         make it so. Check it is not pointer to reference.
8034 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
8036         PR c++/5132
8037         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
8038         are processing a template decl.
8040 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
8042         PR c++/5116, c++/764
8043         * call.c (build_new_op): Make sure template class operands are
8044         instantiated. Simplify arglist construction.
8046 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
8048         * call.c (build_user_type_conversion_1): Use my_friendly_assert
8049         rather than if ... abort.
8050         * cvt.c (convert_to_reference): Likewise.
8051         * semantics.c (setup_vtbl_ptr): Likewise.
8052         * pt.c (lookup_template_class): Comment typo.
8054 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
8056         PR c++/5125
8057         * pt.c (push_template_decl_real): Make sure DECL has
8058         DECL_LANG_SPECIFIC.
8060 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
8062         PR c++/335
8063         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
8064         for non-reference fields.
8065         * typeck.c (require_complete_type): Use resolve_offset_ref).
8067 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
8069         PR c++/196
8070         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
8072 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
8074         PR c++/160
8075         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
8076         up. Don't stabilize_references when initializing a reference.
8078 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8080         * decl2.c (lang_f_options): Const-ify.
8082 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
8084         * config-lang.in (diff_excludes): Remove.
8086 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
8088         PR c++/90
8089         * typeck.c (build_function_call_real): Use original function
8090         expression for errors.
8092 2001-12-18  Jason Merrill  <jason@redhat.com>
8094         PR c++/3242
8095         * class.c (add_method): Do compare 'this' quals when trying to match a
8096         used function.  Don't defer to another used function.
8098 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
8100         * pt.c (instantiate_clone): Remove, fold into ...
8101         (instantiate_template): ... here. Simplify by removing mutual
8102         recursion.
8103         * typeck2.c (build_m_component_ref): Don't cv qualify the function
8104         pointed to by a pointer to function.
8105         * class.c (delete_duplicate_fields_1): Typo.
8107 2001-12-18  Jason Merrill  <jason@redhat.com>
8109         C++ ABI change: destroy value arguments in caller.
8110         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
8111         create an extra binding level for the parameters.
8112         * decl.c (store_parm_decls): Don't do parameter cleanups.
8114 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
8116         * call.c (build_new_method_call): Use '%#V'.
8117         * error.c (cv_to_string): Use V parameter to determine padding.
8119 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
8121         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
8122         spellings in messages.
8124 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
8126         * cp-tree.h: Delete #defines for cp_error, cp_warning,
8127         cp_pedwarn, and cp_compiler_error.
8128         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
8129         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
8130         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
8131         typeck2.c: Change calls to the above macros to use their
8132         language-independent equivalents: error, warning, pedwarn, and
8133         internal_error respectively.
8135 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
8137         * decl2.c (finish_file): Remove back_end_hook.
8139 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
8141         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
8142         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
8143         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
8145 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
8147         * lang-options.h: Use American spelling in messages.
8149 2001-12-13  Jason Merrill  <jason@redhat.com>
8151         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
8153         Use cleanups to run base and member destructors.
8154         * init.c (push_base_cleanups): New function, split out from...
8155         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
8156         * decl.c (finish_destructor_body): Move vbase destruction code to
8157         push_base_cleanups.
8158         (begin_function_body, finish_function_body): New fns.
8159         (finish_function): Move [cd]tor handling and call_poplevel to
8160         finish_function_body.
8161         (pushdecl): Skip the new level.
8162         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
8163         (setup_vtbl_ptr): Call push_base_cleanups.
8164         * method.c (synthesize_method): Call {begin,end}_function_body.
8165         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
8166         * cp-tree.h: Declare new fns.
8167         * parse.y (function_body, .begin_function_body): New nonterminals.
8168         (fndef, pending_inline, function_try_block): Use function_body.
8169         (ctor_initializer_opt, function_try_block): No longer has a value.
8170         (base_init): Remove .set_base_init token.
8171         (.set_base_init, compstmt_or_error): Remove.
8172         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
8174         * optimize.c (maybe_clone_body): Fix parameter updating.
8176 2001-12-12  Jason Merrill  <jason@redhat.com>
8178         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
8179         * semantics.c (genrtl_start_function): Don't pass
8180         parms_have_cleanups or push an extra binding level.
8181         (genrtl_finish_function): Lose cleanup_label cruft.
8183         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
8184         (ctor_label): Remove.
8185         * semantics.c (finish_return_stmt): Lose ctor_label support.
8186         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
8187         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
8188         dtor_label.
8190         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
8191         check for [cd]tors.
8192         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
8194         * decl.c (finish_function): Check VMS_TARGET, not VMS.
8196         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
8197         (end_cleanup_fn): And poplevel.
8199         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
8200         if we're in a template.
8202 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
8204         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
8205         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
8206         THIS_NAME_P): Delete.
8207         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
8208         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
8209         with internal naming scheme.
8210         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
8212 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
8214         * decl.c (grokdeclarator): Deprecated implicit typename use.
8216 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
8218         PR g++/51
8219         * parse.y (frob_specs): Indicate it is a language linkage which
8220         contained the extern.
8221         * decl.c (grokdeclarator): Allow extern language linkage with
8222         other specifiers.
8224 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
8226         PR g++/72
8227         * decl.c (add_binding): Don't reject duplicate typedefs involving
8228         template parameters.
8230 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
8232         * parse.y, semantics.c: Similarly.
8234 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
8236         PR g++/87
8237         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
8238         (copy_args_p): Rename to ...
8239         (copy_fn_p): ... here.
8240         (grok_special_member_properties): New function.
8241         (grok_op_properties): Lose VIRTUALP parameter.
8242         (copy_assignment_arg_p): Remove.
8243         * call.c (build_over_call): Use copy_fn_p.
8244         * decl.c (grokfndecl): Reformat. Adjust call to
8245         grok_op_properties.
8246         (copy_args_p): Rename to ...
8247         (copy_fn_p): ... here. Reject template functions. Check for pass
8248         by value.
8249         (grok_special_member_properties): Remember special functions.
8250         (grok_ctor_properties): Don't remember them here, just check.
8251         (grok_op_properties): Likewise.
8252         (start_method): Call grok_special_member_properties.
8253         * decl2.c (grokfield): Likewise.
8254         (copy_assignment_arg_p): Remove.
8255         (grok_function_init): Don't remember abstract assignment here.
8256         * pt.c (instantiate_class_template): Call
8257         grok_special_member_properties.
8258         (tsubst_decl): Adjust grok_op_properties call.
8260 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
8262         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
8263         RID_TYPES_COMPATIBLE_P.
8265 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8267         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
8268         call to build_aggr_init.
8269         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
8271 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
8273         * parse.y: Replace uses of the string non-terminal with STRING.
8274         Don't perform string concatentaion here.
8275         (string): Remove non-terminal.
8276         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
8278 2001-12-05  Jason Merrill  <jason@redhat.com>
8280         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
8281         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
8282         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
8283         * pt.c (push_tinst_level): No longer static.
8284         * cp-tree.h: Declare them.
8286         * init.c (resolve_offset_ref): Don't check access for the base
8287         conversion to access a FIELD_DECL.
8289         * cp-tree.h (TYPE_REFFN_P): New macro.
8290         * decl.c (bad_specifiers): Check it, too.
8292         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
8293         on the __*_type_info type if we haven't seen a definition.
8295 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
8297         * decl.c: Include c-common.h.
8298         (shadow_warning): Move to c-common.c.
8300 2001-12-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8302         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
8304 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
8306         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
8308 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
8310         PR g++/164
8311         * init.c (sort_base_init): Allow binfos to be directly specified.
8312         * method.c (do_build_copy_constructor): Explicitly convert to the
8313         base instance.
8314         (do_build_assign_ref): Likewise.
8316 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
8318         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
8319         declaration and initialization.
8321 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
8323         * typeck2.c: Remove leading capital from diagnostic messages, as
8324         per GNU coding standards.
8326 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
8328         PR c++/3394
8329         * decl.c (xref_basetypes): Handle attributes between
8330         'class' and name.
8332 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
8334         PR g++/3381
8335         * parse.y (named_complex_class_head_sans_basetype): Add new
8336         reduction.
8337         * Make-lang.in (parse.c): Adjust expected conflict count.
8339 2001-12-03  Jason Merrill  <jason@redhat.com>
8341         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
8342         immediate binfos for our virtual bases.
8344 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
8346         * call.c (build_java_interface_fn_ref): Similarly.
8347         * except.c (is_admissible_throw_operand): Similarly.
8348         * init.c (build_java_class_ref): Similarly.
8349         * xref.c (open_xref_file): Similarly.
8351 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8353         * class.c (finish_struct): Remove trailing periods from messages.
8354         * decl.c (check_tag_decl): Similarly.
8355         * lex.c (cxx_set_yydebug): Similarly.
8356         * typeck2.c (friendly_abort): Similarly.
8358 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
8360         PR c++/3048
8361         * cp-tree.h (ovl_member): Remove.
8362         * decl2.c (merge_functions): Handle extern "C" functions
8363         specially.
8364         * tree.c (ovl_member): Remove.
8366 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
8368         PR c++/4842
8369         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
8370         FUNCTION_DECL, as input.
8371         (mark_overriders): Remove.
8372         (warn_hidden): Rework for the new ABI.
8374 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
8376         PR c++/3471
8377         * call.c (convert_like_real): Do not build additional temporaries
8378         for rvalues of class type.
8380 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
8382         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
8383         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
8384         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
8385         (DERIVED_FROM_P): Likewise.
8386         (enum base_access): Renumber, add ba_quiet bit mask.
8387         (get_binfo): Remove.
8388         (get_base_distance): Remove.
8389         (binfo_value): Remove.
8390         (ACCESSIBLY_DERIVED_FROM_P): Remove.
8391         * call.c (standard_conversion): Use lookup_base.
8392         * class.c (strictly_overrides): Likewise.
8393         (layout_virtual_bases): Likewise.
8394         (warn_about_ambiguous_direct_bases): Likewise.
8395         (is_base_of_enclosing_class): Likewise.
8396         (add_vcall_offset_vtbl_entries_1): Likewise.
8397         * cvt.c (build_up_reference): Adjust comment.
8398         * init.c (build_member_call): Reformat.
8399         * search.c (get_binfo): Remove.
8400         (get_base_distance_recursive): Remove.
8401         (get_base_distance): Remove.
8402         (lookup_base_r): Tweak.
8403         (lookup_base): Add ba_quiet control. Complete the types here.
8404         (covariant_return_p): Use lookup_base.
8405         * tree.c (binfo_value): Remove.
8406         (maybe_dummy_object): Use lookup_base.
8407         * typeck.c (build_static_cast): Use lookup_base.
8408         (get_delta_difference): Likewise.
8409         * typeck2.c (binfo_or_else): Use lookup_base.
8410         (build_scoped_ref): Add back error_mark_check.
8411         (build_m_component_ref): Use lookup_base.
8413 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8415         * Make-lang.in (c++.generated-manpages): New dummy target.
8417 2001-11-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8419         * Make-lang.in (cp-lang.o): Depends on c-common.h.
8420         * cp-lang.c (c-common.h): Include.
8421         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
8422         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
8423         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
8425 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
8427         * decl2.c (c_language): Move to c-common.c.
8428         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
8429         functions.
8430         (cxx_init): Update.
8432 2001-11-26  Jason Merrill  <jason@redhat.com>
8434         * call.c (joust): Remove COND_EXPR hack.
8436 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
8438         * search.c (lookup_base_r): Declare bk in variable declaration
8439         space.
8441 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
8443         PR g++/3145
8444         * class.c (build_vbase_pointer): Remove.
8445         (build_vbase_path): Remove.
8446         (build_base_path): New function.
8447         * cp-tree.h (base_access, base_kind): New enumerations.
8448         (build_base_path): Declare.
8449         (convert_pointer_to_real): Remove.
8450         (convert_pointer_to): Remove.
8451         (lookup_base): Declare.
8452         (convert_pointer_to_vbase): Remove.
8453         * call.c (build_scoped_method_call): Use lookup_base &
8454         build_base_path instead of convert_pointer_to_real,
8455         get_base_distance & get_binfo.
8456         (build_over_call): Likewise.
8457         * cvt.c (cp_convert_to_pointer): Likewise.
8458         (convert_to_pointer_force): Likewise.
8459         (build_up_reference): Likewise.
8460         (convert_pointer_to_real): Remove.
8461         (convert_pointer_to): Remove.
8462         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
8463         instead of convert_pointer_to_vbase & build_vbase_path.
8464         (emit_base_init): Use build_base_path instead of
8465         convert_pointer_to_real.
8466         (expand_virtual_init): Lose unrequired conversions.
8467         (resolve_offset_ref): Use lookup_base and build_base_path
8468         instead of convert_pointer_to.
8469         * rtti.c (build_dynamic_cast_1): Use lookup_base &
8470         build_base_path instead of get_base_distance & build_vbase_path.
8471         * search.c (get_vbase_1): Remove.
8472         (get_vbase): Remove.
8473         (convert_pointer_to_vbase): Remove.
8474         (lookup_base_r): New function.
8475         (lookup_base): New function.
8476         * typeck.c (require_complete_type): Use lookup_base &
8477         build_base_path instead of convert_pointer_to.
8478         (build_component_ref): Likewise.
8479         (build_x_function_call): Likewise.
8480         (get_member_function_from_ptrfunc): Likewise.
8481         (build_component_addr): Likewise.
8482         * typeck2.c (build_scoped_ref): Likewise.
8484 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8486         * cp-tree.h (CP_TYPE_QUALS): Removed.
8487         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
8488         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
8489         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
8490         * dump.c (cp_dump_tree): Use void* dump_info argument to match
8491         lang-hooks prototype.
8492         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
8493         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
8494         CP_TYPE_QUALS changed to cp_type_quals.
8495         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
8496         (CXX_C_OBJS): Remove c-dump.o.
8498 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
8500         PR c++/3637
8501         * pt.c (lookup_template_class): Ensure that all specializations
8502         are registered on the list corresponding to the most general
8503         template.
8505 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
8507         * call.c (non_reference): Add documentation.
8508         (convert_class_to_reference): Do not strip reference types
8509         from conversion operators.
8510         (maybe_handle_ref_bind): Simplify.
8511         (compare_ics): Correct handling of references.
8513 2001-11-19  John Wilkinson <johnw@research.att.com>
8515         * dump.c (dump_op): New function.
8516         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
8517         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
8518         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
8520 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
8522         PR4629
8523         * semantics.c (finish_sizeof): Make sure that expression created
8524         while processing a template do not have a type.
8525         (finish_alignof): Likewise.
8526         * typeck.c (c_sizeof): Likewise.
8527         (expr_sizeof): Likewise.
8529 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
8531         * lex.c (cxx_finish): Call c_common_finish.
8532         (finish_parse): Remove.
8534 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8536         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
8537         when displaying error message about missing array bounds.
8539 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8541         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
8542         CONST_CAST_EXPR.
8543         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
8545 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
8547         * cp-tree.h (print_class_statistics): Restore.
8549 2001-11-15  Jason Merrill  <jason@redhat.com>
8551         * method.c (use_thunk): Don't emit debugging information for thunks.
8553         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
8554         * decl.c (make_typename_type): Handle getting a class template.
8555         * search.c (lookup_field_r): A class template is good enough for
8556         want_type.
8558         * call.c (convert_like_real): Only use cp_convert for the bad part.
8559         (standard_conversion): Also allow bad int->enum.
8560         * typeck.c (ptr_reasonably_similar): Also allow functions to
8561         interconvert.  Pointers to same-size integers are reasonably
8562         similar.
8564         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
8565         give it void type.
8567 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
8569         PR g++/3154
8570         * init.c (sort_base_init): Remove unreachable code.
8571         (expand_member_init): Adjust comment to reflect reality. Simplify
8572         and remove unreachable code.
8574 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
8576         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
8577         (cxx_init): Update prototype.
8578         * decl.c (init_decl_processing): Rename.  Move null node init
8579         to its creation time.
8580         * lex.c (cxx_init_options): Update.
8581         (cxx_init): Combine with old init_parse; also call
8582         cxx_init_decl_processing.
8584 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
8586         * decl.c (check_initializer): Try to complete the type of an
8587         array element before checking whether it's complete.  Don't
8588         complain about arrays with complete element types but an
8589         unknown size.
8590         (cp_finish_decl): Build the hierarchical constructor before
8591         calling maybe_deduce_size_from_array_init.
8593 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
8595         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
8597 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
8599         PR g++/4206
8600         * parse.y (already_scoped_stmt): Remove.
8601         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
8603 2001-11-12  H.J. Lu <hjl@gnu.org>
8605         * cvt.c (ocp_convert): Don't warn the address of a weak
8606         function is always `true'.
8608 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8610         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
8611         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
8612         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
8613         * cp-tree.h (print_class_statistics): Remove.
8614         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
8615         cxx_print_identifier, cxx_set_yydebug): New.
8616         * lex.c (set_yydebug): Rename c_set_yydebug.
8617         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
8618         lang_print_xnode): Rename.
8619         * tree.c (print_lang_statistics): Rename.
8621 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8623         * class.c (dump_array): Fix format specifier warning.
8625 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8627         * cp-lang.c (LANG_HOOKS_NAME): Override.
8628         (struct lang_hooks): Constify.
8629         * lex.c (cxx_init_options): Update.
8630         (lang_identify): Remove.
8631         * parse.y (language_string): Remove.
8633 2001-11-08  Andreas Franck  <afranck@gmx.de>
8635         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
8636         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
8637         suggested by autoconf.
8638         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
8639         (c++.install-common): Use the transformed target alias names.
8641 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8643         * Make-lang.in: Update.
8644         * cp-lang.c: Include langhooks-def.h.
8646 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8648         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
8650 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8652         * lex.c (copy_lang_type): Add static prototype.
8654 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8656         * pt.c (unify): Handle SCOPE_REF.
8658 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
8660         * tree.c (cp_copy_res_decl_for_inlining): Adjust
8661         DECL_ABSTRACT_ORIGIN for the return variable.
8663 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
8665         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
8667 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
8669         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
8670         semantics.c, spew.c: Fix spelling errors.
8672 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8674         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
8676 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
8678         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
8679         pop_everything.
8681 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8683         * cp-lang.c (cxx_get_alias_set): New function.
8684         Point LANG_HOOKS_GET_ALIAS_SET to it.
8686 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8688         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
8689         * cp-tree.h (make_unbound_class_template): Prototype new function.
8690         * decl.c (make_unbound_class_template): New function.
8691         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
8692         * error.c (dump_type): Likewise.
8693         * mangle.c (write_type): Likewise.
8694         * parse.y (template_parm): Likewise.
8695         (template_argument): Use make_unbound_class_template.
8696         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
8697         (tsubst): Likewise.
8698         (tsubst_copy): Likewise.
8699         (unify): Likewise.
8700         * tree.c (walk_tree): Likewise.
8701         * typeck.c (comptypes): Likewise.
8703 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8705         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
8706         extra calls into fewer ones.
8708 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
8710         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
8711         Warn when merging inline with attribute noinline.
8712         (start_decl, start_function): Warn if inline and attribute
8713         noinline appear in the same declaration.
8715 2001-10-16  H.J. Lu <hjl@gnu.org>
8717         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
8718         for tree checking disabled.
8720 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
8722         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
8723         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
8725 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
8727         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
8728         (unify): Only handle MINUS_EXPR specially if the above flag is set
8729         and the subtracted constant is 1.  Clear the flag on recursive calls.
8730         Set it when unifying the maximum value in an INTEGER_TYPE's range.
8732 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
8734         * decl.c (bad_specifiers): Don't allow exception specifications
8735         on any typedefs.
8737 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
8739         * cp/lex.c (init_cp_pragma): Similarly.
8741 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8743         * pt.c (lookup_template_class): Build complete template arguments
8744         for BOUND_TEMPLATE_TEMPLATE_PARM.
8746 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8748         * cp-tree.h (TYPE_BINFO): Update comment.
8749         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
8750         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
8751         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
8752         (copy_type): Prototype new function.
8753         * lex.c (copy_lang_decl): Gather tree node statistics.
8754         (copy_lang_type): New function.
8755         (copy_type): Likewise.
8756         (cp_make_lang_type): Create lang_type for
8757         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
8758         and BOUND_TEMPLATE_TEMPLATE_PARM.
8759         * pt.c (tsubst): Use copy_type instead of copy_node.
8760         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
8762 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8764         * pt.c (determine_specialization): Ignore functions without
8765         DECL_TEMPLATE_INFO.
8767 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
8769         PR g++/4476
8770         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
8772 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
8774         * typeck2.c (store_init_value): Don't re-digest a bracketed
8775         initializer.
8777         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
8778         ANON_AGGR_TYPE_P.
8780 2001-10-11  Richard Henderson  <rth@redhat.com>
8782         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
8783         of an asm statement.
8784         (build_vtbl_ref_1): Split out from build_vtbl_ref.
8785         (build_vfn_ref): Use it to handle vtable descriptors before
8786         calling build_vtable_entry_ref.
8787         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
8789 2001-10-10  Richard Henderson  <rth@redhat.com>
8791         * parse.y (asm_operand): Allow named operands.
8792         * semantics.c (finish_asm_stmt): Tweek for changed location
8793         of the operand constraint.
8795 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
8797         * call.c (standard_conversion): Add bad conversion between
8798         integers and pointers.
8799         (convert_like_real): Don't use convert_for_initialization for bad
8800         conversions; complain here and use cp_convert.
8801         (build_over_call): Don't handle bad conversions specially.
8802         (perform_implicit_conversion): Allow bad conversions.
8803         (can_convert_arg_bad): New fn.
8804         * cp-tree.h: Declare it.
8805         * typeck.c (convert_for_assignment): Use it.
8806         (ptr_reasonably_similar): Any target type is similar to void.
8808 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
8810         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
8811         (cp/cp-lang.o): New rule.
8812         * cp-tree.h: Declare hooks.
8813         * tree.c: Make hooks non-static.
8814         (init_tree): Don't initialize hooks here.
8815         * lex.c: Likewise.  Move definition of lang_hooks to...
8816         * cp-lang.c: ... new file.
8818 2001-10-08  Richard Henderson  <rth@redhat.com>
8820         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
8821         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
8823 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8825         * class.c (build_vtable_entry_ref): Const-ify.
8826         * decl.c (predefined_identifier,
8827         initialize_predefined_identifiers): Likewise.
8828         * init.c (build_new_1): Likewise.
8829         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
8830         Likewise.
8832 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
8834         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
8835         (INSNS_PER_STMT): Likewise.
8836         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
8837         (copy_body, initialize_inlined_parameters): Likewise.
8838         (declare_return_variable, inlinable_function_p): Likewise.
8839         (expand_call_inline, expand_calls_inline): Likewise.
8840         (optimize_inline_calls, clone_body): Likewise.
8841         * tree.c (walk_tree): Moved to ../tree-inline.c.
8842         (walk_tree_without_duplicates): Likewise.
8843         (copy_tree_r, remap_save_expr): Likewise.
8845 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
8847         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
8848         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
8849         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
8850         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
8851         (flag_inline_trees): Moved declaration to ../tree-inline.h.
8852         (walk_tree): Moved declaration to ../tree-inline.h.
8853         (walk_tree_without_duplicates, copy_tree_r): Likewise.
8854         (remap_save_expr): Likewise.
8855         * decl.c: Include tree-inline.h.
8856         (lang_mark_tree): Don't mark inlined_fns.
8857         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
8858         * optimize.c: Include tree-inline.h.
8859         (optimize_inline_calls): Move declaration to ../tree.h, as
8860         non-static.
8861         (remap_decl): Use language-independent constructs and hooks.
8862         (remap_block, copy_body_r, declare_return_variable): Likewise.
8863         (inlinable_function_p): Likewise.  Don't test for
8864         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
8865         no longer language-specific.
8866         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
8867         call of dump_function to...
8868         (optimize_function): Here...
8869         (clone_body): New function, extracted from...
8870         (maybe_clone_body): ... here.  Build decl_map locally and pass
8871         it on to clone_body.
8872         * pt.c, semantics.c: Include tree-inline.h.
8873         * tree.c: Likewise.
8874         (cp_walk_subtrees): New language-specific hook for tree inlining.
8875         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
8876         cp_is_overload_p, cp_auto_var_in_fn_p,
8877         cp_copy_res_decl_for_inlining): Likewise.
8878         (walk_tree): Move language-specific constructs into...
8879         (cp_walk_subtrees): this new function.
8880         (copy_tree_r): Use language-independent constructs and hooks.
8881         (init_tree): Initialize tree inlining hooks.
8882         (remap_save_expr): Adjust prototype so that the declaration
8883         does not require the definition of splay_tree.
8885 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8887         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
8888         to build the declaration instead of the declaration itself.
8890 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
8892         * decl2.c (cxx_decode_option): Add 'else'.
8894         * spew.c (end_input): No longer static.
8895         * cp-tree.h: Declare it.
8896         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
8898 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
8900         * call.c (build_over_call), typeck.c (build_function_call_real):
8901         Pass type attributes to check_function_format rather than name or
8902         assembler name.  Don't require there to be a name or assembler
8903         name to check formats.
8905 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
8907         * decl.c (init_decl_processing): Don't call
8908         init_function_format_info.  Initialize lang_attribute_table
8909         earlier.
8910         (builtin_function): Call decl_attributes.
8911         (insert_default_attributes): New.
8913 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
8915         * decl.c (grokdeclarator): Copy array typedef handling from C
8916         frontend.
8918         * decl.c (grokdeclarator): Copy too-large array handling from C
8919         frontend.
8921 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
8923         * config-lang.in (target_libs): Added target-gperf, so that we
8924         don't try to build it if C++ is disabled.
8926 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
8928         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
8929         (cp/errfn.o): Delete rule.
8930         (cp/error.o): Depend on flags.h.
8931         * errfn.c: Delete file.
8932         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
8933         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
8934         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
8935         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
8936         internal_error respectively.  Make cp_deprecated into a macro.
8937         Don't define cp_printer typedef or declare cp_printers.
8938         * error.c: Include flags.h.
8939         Delete: struct tree_formatting_info, print_function_argument_list,
8940         print_declaration, print_expression, print_function_declaration,
8941         print_function_parameter, print_type_id, print_cv_qualifier_seq,
8942         print_type_specifier_seq, print_simple_type_specifier,
8943         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
8944         print_parameter_declaration_clause, print_exception_specification,
8945         print_nested_name_specifier, and definition of cp_printers.
8946         (locate_error): New function.
8947         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
8948         rewritten in terms of locate_error and diagnostic.c.
8949         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
8950         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
8951         (init_error): Adjust to match.
8953 2001-09-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8955         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
8957 2001-09-21  Richard Henderson  <rth@redhat.com>
8959         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
8960         (build_vtbl_initializer): Likewise.
8961         (build_vfn_ref): New.
8962         * cp-tree.h: Declare it.
8963         * call.c (build_over_call): Use it.
8964         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
8965         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
8967 2001-09-21  J"orn Rennecke <amylaar@redhat.com>
8969         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
8971 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
8973         Table-driven attributes.
8974         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
8975         * decl2.c (cplus_decl_attributes): Only take one attributes
8976         parameter.
8977         * cp-tree.c (cplus_decl_attributes): Update prototype.
8978         * class.c (finish_struct), decl.c (start_decl, start_function),
8979         decl2.c (grokfield), friend.c (do_friend), parse.y
8980         (parse_bitfield): Update calls to cplus_decl_attributes.
8981         * decl.c (grokdeclarator): Take a pointer to a single ordinary
8982         attribute list.
8983         * decl.h (grokdeclarator): Update prototype.
8984         * decl2.c (grokfield): Take a single ordinary attribute list.
8985         * friend.c (do_friend): Likewise.
8986         * decl.c (shadow_tag, groktypename, start_decl,
8987         start_handler_parms, grokdeclarator, grokparms, start_function,
8988         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
8989         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
8990         (process_template_parm, do_decl_instantiation): Pass single
8991         ordinary attribute lists around.
8992         * decl.c (grokdeclarator): Correct handling of nested attributes.
8993         Revert the patch
8994         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
8995                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
8996                 not the left.
8997         .
8998         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
8999         (cp_attribute_table): Declare.
9000         * decl.c (valid_lang_attribute): Don't define.
9001         (lang_attribute_table): Define.
9002         (init_decl_processing): Initialize lang_attribute_table instead of
9003         valid_lang_attribute.
9004         * tree.c (cp_valid_lang_attribute): Remove.
9005         (handle_java_interface_attribute, handle_com_interface_attribute,
9006         handle_init_priority_attribute): New functions.
9007         (cp_attribute_table): New array.
9008         * decl2.c (import_export_class): Don't use
9009         targetm.valid_type_attribute.
9011 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9013         * Make-lang.in (cp/error.o): Depend on real.h
9014         * error.c: #include "real.h"
9016 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9018         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
9019         xmalloc/strcpy/strcat.
9021 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9023         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
9024         Const-ification.
9025         * pt.c (tsubst_decl): Likewise.
9027 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9029         * decl2.c (lang_f_options): Const-ification.
9030         * lex.c (cplus_tree_code_name): Likewise.
9031         * spew.c (yyerror): Likewise.
9033 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
9035         PR c++/3986
9036         * class.c (force_canonical_binfo_r): Check & move an indirect
9037         primary base first.
9038         (force_canonical_binfo): Check that it's not already
9039         canonical.
9040         (mark_primary_virtual_base): Remove BINFO parameter.
9041         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
9043 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
9045         Remove TYPE_NONCOPIED_PARTS.
9046         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
9047         CLASSTYPE_PURE_VIRTUALS.
9048         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
9049         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
9050         (layout_class_type): Don't call fixup_inline_methods here ...
9051         (finish_struct_1): ... call it here.
9053 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
9055         * decl.c (duplicate_decls): Remove code deadling with
9056         DECL_SAVED_INSNS.
9057         * decl2.c (finish_file): Likewise.
9058         * pt.c (instantiate_decl): Likewise.
9059         * semantics.c (expand_body): Don't defer local functions if
9060         they wouldn't be deferred for some other reason.  Don't
9061         generate RTL for functions that will not be emitted.
9062         (genrtl_start_function): Remove code deadling with
9063         DECL_SAVED_INSNS.
9064         (genrtl_finish_function): Likewise.
9066 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
9068         PR c++/4203
9069         * call.c (build_over_call): Do not optimize any empty base
9070         construction.
9072 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9074         * error.c (dump_template_decl): Output template parameters
9075         together with their specifiers.
9076         Output `class' prefix for template template parameter.
9077         (dump_decl): Fix formatting.
9079 2001-08-30  Kurt Garloff  <garloff@suse.de>
9081         * optimize.c (inlinable_function_p): Allow only smaller single
9082         functions. Halve inline limit after reaching recursive limit.
9084 2001-08-30  Joern Rennecke <amylaar@redhat.com>
9085             Jason Merrill  <jason_merrill@redhat.com>
9087         * class.c (build_vtable_entry_ref): Subtract in char*, not
9088         ptrdiff_t.
9090 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
9092         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
9093         (build_cplus_array_type): Use cp_build_qualified_type, not
9094         TYPE_MAIN_VARIANT, to get an unqualified version.
9096         * decl2.c (grok_alignof): Lose.
9097         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
9098         * typeck.c (c_alignof): Lose.
9099         * semantics.c (finish_sizeof, finish_alignof): New.
9100         * parse.y: Use them.
9101         * cp-tree.h: Declare them.
9103 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
9105         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
9106         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
9107         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
9109 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
9111         * typeck2.c (add_exception_specifier): Only require complete type if
9112         not in processing template declaration.
9114 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9116         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
9117         GNU_xref_start_scope and GNU_xref_end_scope.
9119         * tree.c (TYPE_HASH): Moved to ../tree.h.
9121 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
9123         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
9124         on COMPOUND_EXPRs.
9126 2001-08-14  Richard Henderson  <rth@redhat.com>
9128         * class.c, cp-tree.h (build_vfn_ref): Remove.
9129         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
9131 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
9133         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
9134         empty class assignment as having side-effects to avoid
9135         spurious warnings.
9137 2001-08-13  Zack Weinberg  <zackw@panix.com>
9139         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
9140         * except.c: Include libfuncs.h.
9142 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9144         * decl.c (grokdeclarator): Clarify diagnostic message.
9146 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9148         * decl2.c (do_nonmember_using_decl): Replace using directive
9149         with using declaration in the error message.
9151 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9153         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
9154         criterion to avoid rebuilding expression tree instead of
9155         processing_template_decl.
9157 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
9159         Support named return value optimization for inlines, too.
9160         * decl.c (finish_function): Nullify returns here.
9161         * semantics.c (genrtl_start_function): Not here.
9162         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
9163         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
9164         Also nullify the CLEANUP_STMT for the nrv.
9165         * cp-tree.h: Declare it.
9166         * optimize.c (declare_return_variable): Replace the nrv with the
9167         return variable.
9168         * typeck.c (check_return_expr): Be more flexible on alignment check.
9169         Ignore cv-quals when checking for a matching type.
9171 2001-08-09  Richard Henderson  <rth@redhat.com>
9173         * decl2.c (finish_objects): Use target hooks instead of
9174         assemble_constructor and assemble_destructor.
9176 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
9178         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
9180 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
9182         PR c++/3820
9183         Stop using TYPE_NONCOPIED_PARTS.
9184         * call.c (build_over_call): Be careful when copy constructing
9185         or assigning to an empty class.
9186         * class.c (check_bases_and_members): It has a
9187         COMPLEX_ASSIGN_REF if it has a vptr.
9188         (layout_class_type): Don't add empty class padding to
9189         TYPE_NONCOPIED_PARTS.
9190         (finish_struct_1): Don't add the VFIELD either.
9191         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
9192         initialization.
9194 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
9196         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
9198 2001-08-06  Richard Henderson  <rth@redhat.com>
9200         * decl2.c (finish_objects): Pass a symbol_ref and priority to
9201         assemble_{constructor,destructor}.  Remove priority handling.
9203 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9205         Don't allow template-id in using-declaration.
9206         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
9207         (do_class_using_decl): Likewise.
9209 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
9211         * cp/spew.c (read_token): No need to pop buffers.
9213 2001-08-02  Stan Shebs  <shebs@apple.com>
9215         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
9216         (fnaddr_from_vtable_entry): Remove decl.
9217         * method.c (use_thunk): Update comment.
9219 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
9221         * repo.c (get_base_filename): Change return value to const char
9222         pointer.
9224 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
9226         Kill -fhonor-std.
9227         * NEWS: Document.
9228         * cp-tree.h (flag_honor_std): Remove.
9229         (CPTI_FAKE_STD): Remove.
9230         (std_node): Remove comment about it being NULL.
9231         (fake_std_node): Remove.
9232         * decl.c (in_fake_std): Remove.
9233         (walk_namespaces_r): Remove fake_std_node check.
9234         (push_namespace): Remove in_fake_std code.
9235         (pop_namespace): Likewise.
9236         (lookup_name_real): Remove fake_std_node check.
9237         (init_decl_processing): Always create std_node. Always add
9238         std:: things there.
9239         (builtin_function): Always put non '_' fns in std.
9240         * decl2.c (flag_honor_std): Remove.
9241         (lang_f_options): Remove honor-std.
9242         (unsupported_options): Add honor-std.
9243         (set_decl_namespace): Remove fake_std_node check.
9244         (validate_nonmember_using_decl): Likewise.
9245         (do_using_directive): Likewise.
9246         (handle_class_head): Likewise.
9247         * dump.c (cp_dump_tree): Likewise.
9248         * except.c (init_exception_processing): Adjust.
9249         * init.c (build_member_call): Remove fake_std_node check.
9250         (build_offset_ref): Likewise.
9251         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
9252         * rtti.c (init_rtti_processing): Adjust.
9254 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
9256         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
9257         operand while calling cp_tree_equal.
9259 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
9261         The 3.0 ABI no longer has vbase pointer fields.
9262         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
9263         FORMAT_VBASE_NAME): Remove.
9264         * method.c (do_build_copy_constructor): Adjust.
9265         (do_build_assign_ref): Adjust.
9266         * search.c (lookup_field_r): Adjust.
9267         * typeck.c (build_component_ref): Adjust.
9269         The 3.0 ABI always has a vtable pointer at the start of every
9270         polymorphic class.
9271         * rtti.c (build_headof_sub): Remove.
9272         (build_headof): Adjust.
9273         (get_tinfo_decl_dynamic): No need to check flag_rtti
9274         here. Adjust.
9275         (create_real_tinfo_var): Explain why we need a hidden name.
9277 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
9279         PR c++/3631
9280         * class.c (update_vtable_entry_for_fn): The fixed adjustment
9281         of a virtual thunk should be from declaring base.
9283 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
9285         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
9286         the shared virtual base, so preserving inheritance graph order.
9288 2001-07-30  Andreas Jaeger  <aj@suse.de>
9290         * decl2.c: Remove unused var global_temp_name_counter.
9292 2001-07-28  Richard Henderson  <rth@redhat.com>
9294         * method.c (pending_inlines): Remove.
9296 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
9298         * class.c (mark_primary_virtual_base): Don't adjust base
9299         offsets here.
9300         (dfs_unshared_virtual_bases): Adjust them here.
9301         (mark_primary_bases): Explain why we adjust at the end.
9303 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
9305         * class.c (finish_struct_1): When copying the primary base's
9306         VFIELD, make sure we find it is at offset zero.
9308 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9310         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
9311         tsubst_expr for default template arguments.
9313 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
9315         PR c++/3621
9316         * spew.c (yylex): Only copy the token's lineno, if it is
9317         nonzero.
9319 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
9321         PR c++/3624
9322         * call.c (resolve_args): Simplify, call
9323         convert_from_reference.
9324         (build_new_op): Resolve and convert from reference ARG1
9325         earlier. Adjust ARG2 & ARG3 resolve and conversion.
9327 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
9329         * decl.c (last_function_parm_tags): Remove.
9330         (current_function_parm_tags): Remove.
9331         (init_decl_processing): Adjust.
9332         (start_function): Adjust.
9333         (store_parm_decls): Adjust.
9335         PR c++/3152
9336         * decl.c (grokdeclarator): Detect when a function typedef is
9337         declaring a function, and create last_function_parms correctly.
9339 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
9341         * call.c (joust): Only prefer a non-builtin candidate to a builtin
9342         one if they have the same signature.
9344         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
9345         it rather than toplevel_bindings_p.  Give it a mangled name if static.
9346         (convert_to_reference): Adjust.
9347         * decl2.c (get_temp_name): Lose.
9348         * mangle.c (mangle_ref_init_variable): New fn.
9349         (mangle_guard_variable): Strip the ref-init header.
9350         * cp-tree.h: Adjust.
9351         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
9352         initializer.
9353         (grok_reference_init): Always use DECL_INITIAL.
9355 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
9357         PR c++/3416
9358         * call.c (build_conditional_expr): Recheck args after
9359         conversions.
9360         * cp-tree.h (build_conditional_expr): Move to correct file.
9361         * typeck.c (decay_conversion): Diagnose any unknown types
9362         reaching here.
9363         (build_binary_op): Don't do initial decay or default
9364         conversions on overloaded functions.
9365         (build_static_cast): Don't do a decay conversion here.
9367 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
9369         PR c++/3543
9370         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
9371         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
9373 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
9375         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
9376         (create_vtbl_ptr): ... here.
9378 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
9380         * class.c (build_vbase_offset_vbtl_entries): Look for
9381         non-primary base of which we are a sub vtable.
9383 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
9385         * semantics.c (finish_this_expr):  Remove unused code.
9387 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
9389         Simplify rtti, now we've only one ABI.
9390         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
9391         CPTI_TINFO_VAR_ID.
9392         (tinfo_decl_id, tinfo_var_id): Remove.
9393         (get_typeid_1): Remove.
9394         * rtti.c
9395         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
9396         (typeid_ok_p): New function.
9397         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
9398         (get_tinfo_decl): Remove old abi documentation.
9399         (tinfo_from_decl): Remove.
9400         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
9401         (get_typeid_1): Remove.
9402         (get_base_offset): Remove.
9403         (synthesize_tinfo_var): Absorb get_base_offset.
9404         (create_real_tinfo_var): Don't use tinfo_decl_id.
9406 2001-07-23  Graham Stott  <grahams@redhat.com>
9408         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
9409         variable has_two_argument_delete_p.
9411 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
9413         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
9414         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
9415         (CPTI_INDEX_IDENTIFIER): Remove.
9416         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
9417         (delta2_identifier): Remove.
9418         (index_identifier): Remove.
9419         (pfn_or_delta2_identifier): Remove.
9420         (flag_vtable_thunks): Remove.
9421         (VTABLE_DELTA2_NAME): Remove.
9422         (VTABLE_INDEX_NAME): Remove.
9423         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
9424         (vfunc_ptr_type_node): Adjust.
9425         (VTABLE_NAME_PREFIX): Adjust.
9426         (build_vfn_ref): Lose first parameter.
9427         (fixup_all_virtual_upcast_offsets): Remove.
9428         * decl.c (initialize_predefined_identifiers): Remove
9429         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
9430         (init_decl_processing): Remove no-vtable-thunk code.
9431         * decl2.c (flag_vtable_thunks): Remove.
9432         (mark_vtable_entries): Remove no-vtable-thunk code.
9433         * error.c (dump_decl): Remove no-vtable-thunk code.
9434         (dump_expr): Adjust ptr to member function code.
9435         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
9436         code.
9437         * rtti.c (build_headof): Remove no-vtable-thunk code.
9438         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
9439         * search.c (get_base_distance): Remove expand_upcast_fixups case.
9440         (virtual_context) Remove.
9441         (expand_upcast_fixups): Remove.
9442         (fixup_virtual_upcast_offsets): Remove.
9443         (fixup_all_virtual_upcast_offsets): Remove.
9444         * typeck.c (get_member_function_from_ptrfunc): Remove
9445         no-vtable-thunk code.
9446         * call.c (build_over_call): Adjust call to build_vfn_ref.
9447         * class.c (build_vfn_ref): Lose first parameter. Remove
9448         no-vtable-thunk code.
9449         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
9450         (build_vtable_entry): Remove no-vtable-thunk code.
9452 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
9454         Remove old-abi remnants. Remove comments about old abi
9455         behavior. Remove references to 'new-abi' in comments.
9456         * cp-tree.h: Adjust comments.
9457         (vbase_offsets_in_vtable_p): Delete.
9458         (vcall_offsets_in_vtable_p): Delete.
9459         (vptrs_present_everywhere_p): Delete.
9460         (all_overridden_vfuns_in_vtables_p): Delete.
9461         (merge_primary_and_secondary_vtables_p): Delete.
9462         (TYPE_CONTAINS_VPTR_P): Adjust.
9463         (VTT_NAME_PREFIX): Remove.
9464         (CTOR_VTBL_NAME_PREFIX): Remove.
9465         (init_vbase_pointers): Remove.
9466         * class.c: Adjust coments.
9467         (build_vbase_pointer_fields): Delete.
9468         (build_vbase_pointer): Remove old-abi code.
9469         (build_secondary_vtable): Likewise.
9470         (modify_all_vtables): Likewise.
9471         (create_vtable_ptr): Likewise.
9472         (layout_class_type): Likewise.
9473         (finish_struct_1): Likewise.
9474         (finish_vtbls): Likewise.
9475         (dfs_finish_vtbls): Delete.
9476         (build_vbase_offset_vtbl_entries): Remove old-abi code.
9477         * cvt.c: Adjust comments.
9478         * decl.c: Adjust comments.
9479         * decl2.c: Adjust comments.
9480         * init.c: Adjust comments.
9481         (construct_virtual_bases): Remove old-abi code.
9482         * lang-specs.h: Remove -fno-new-abi.
9483         * mangle.c: Adjust comments.
9484         * rtti.c: Adjust comments.
9485         (get_base_offset): Remove old-abi-code.
9486         * search.c: Adjust comments.
9487         (dfs_init_vbase_pointers): Remove.
9488         (dfs_vtable_path_unmark): Remove.
9489         (init_vbase_pointers): Remove.
9490         * semantics.c: Adjust comments.
9491         (emit_associated_thunks): Remove old-abi code.
9492         * typeck.c: Adjust comments.
9494 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
9496         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
9497         params.h.
9499 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
9501         * class.c (finish_struct_anon): Forbid nested classes.
9503 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
9505         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
9506         * optimize.c: Include debug.h.
9507         (maybe_clone_body): Use debug hook.
9508         * semantics.c: Include debug.h.
9509         (expand_body): Use debug hook.
9511 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
9513         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
9515 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
9517         * class.c (type_requires_array_cookie): New function.
9518         (check_methods): Don't try to figure out whether the type needs a
9519         cookie here.
9520         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
9521         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
9522         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
9523         * pt.c (instantiate_class_template): Don't set
9524         TYPE_VEC_DELETE_TAKES_SIZE.
9525         * NEWS: Document ABI changes from GCC 3.0.
9527 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
9528             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
9530         * NEWS (Changes in GCC 3.0): Fix typo.
9532 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9534         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
9535         which attributes are to be attached, and a flags argument.  Update
9536         call to decl_attributes.
9537         (grokfield): Update call to decl_attributes.
9538         * class.c (finish_struct): Update call to cplus_decl_attributes.
9539         * cp-tree.h (cplus_decl_attributes): Update prototype.
9540         * decl.c (start_decl, grokdeclarator, start_function): Update
9541         calls to decl_attributes and cplus_decl_attributes.
9542         * friend.c (do_friend): Update call to cplus_decl_attributes.
9543         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
9545 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
9547         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
9548         for `register' variables with an asm-specification.
9550 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
9552         * semantics.c (finish_asm_stmt): Mark the output operands
9553         to an asm addressable, if necessary.
9555 2001-07-11  Ben Elliston  <bje@redhat.com>
9557         * Revert this change -- there is a subtle bug.
9559         PR c++/80
9560         * decl.c (finish_enum): New "attributes" argument; pass it to
9561         cplus_decl_attributes.  Use a narrower type if the enum is packed.
9562         * cp-tree.h (finish_enum): Adjust prototype.
9563         * parse.y (enum_head): New non-terminal.
9564         (structsp): Use it. Enums now may be preceded or followed by
9565         optional attributes -- pass their chained tree to finish_enum().
9566         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
9568 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
9570         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
9571         variables.
9573 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
9575         * semantics.c (cp_expand_stmt): Fix for null
9576         current_function_return_value.
9578 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
9580         * call.c (build_op_delete_call): Initialize fn.
9581         (convert_like_real): Delete conditional.
9582         (joust): Initialize *w and *l.
9583         * class.c: Add prototype for binfo_ctor_vtable.
9584         (get_primary_binfo): Initialize result.
9585         * init.c (build_java_class_ref): Initialize name.
9587 2001-07-09  Erik Rozendaal  <dlr@acm.org>
9589         * typeck.c (unary_complex_lvalue): Do not duplicate the
9590         argument to modify, pre-, or post-increment when used as an
9591         lvalue and when the argument has side-effects.
9593 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
9595         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
9596         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
9597         cplus_decl_attributes even if attrs is NULL.
9598         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
9600 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
9602         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
9603         calls to decl_attributes.
9605 2001-07-06  Ira Ruben   <ira@apple.com>
9607         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
9608         be DECL_TEMPLATE_RESULT.
9610 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9612         * cp-tree.h (copy_template_template_parm): Rename to ...
9613         (bind_template_template_parm): ... here.
9614         * tree.c (copy_template_template_parm): Rename to ...
9615         (bind_template_template_parm): ... here.  Remove the case when
9616         NEWARGS is NULL_TREE.
9617         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
9618         BOUND_TEMPLATE_TEMPLATE_PARM.
9619         * pt.c (lookup_template_class): Adjust.
9621 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
9623         * cvt.c (convert_lvalue): New fn.
9624         * cp-tree.h: Declare it.
9625         * method.c (do_build_assign_ref): Use it.
9626         (do_build_copy_constructor): Convert parm to base types
9627         before calling base constructors.
9629         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
9630         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
9631         optimize.
9632         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
9634 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
9636         * optimize.c (optimize_inline_calls): New function, broken out
9637         of ...
9638         (optimize_function): ... here. Call it. Don't inline if it is
9639         a thunk.
9640         (dump_function): Print name of dump flag causing this dump.
9641         * semantics.c (expand_body): Move thunk inline check to
9642         optimize_function.
9644 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
9646         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
9647         (comptypes): Use target.comp_type_attributes.
9649 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
9651         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
9653 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9655         * error.c (lang_print_error_function): Add a `diagnostic_context *'
9656         parameter. Tweak.
9658 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
9660         * decl2.c (import_export_class): Update.
9662 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
9664         * error.c (init_error): Adjust settings.
9666 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
9668         * error.c (init_error): Adjust settings.
9670 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
9672         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
9673         return pointers to data members by reference rather than by value.
9675 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
9677         Implement the Named Return Value optimization.
9678         * cp-tree.h (struct cp_language_function): Add x_return_value.
9679         (current_function_return_value): Now a macro.
9680         * decl.c: Don't define it.
9681         (define_label, finish_case_label): Don't clear it.
9682         (init_decl_processing): Don't register it with GC.
9683         * semantics.c (genrtl_finish_function): Don't check it for
9684         no_return_label.  Copy the RTL from the return value to
9685         current_function_return_value and walk, calling...
9686         (nullify_returns_r): ...this new fn.
9687         * typeck.c (check_return_expr): Set current_function_return_value.
9689 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
9691         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
9692         sharing a ctor vtable with.  Merge code for cases 1 and 2.
9693         (binfo_ctor_vtable): New fn.
9694         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
9696 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
9698         * class.c (dfs_find_final_overrider): Fix logic.
9700         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
9701         virtual thunk instead of non-virtual.
9702         (get_matching_virtual): Uncomment.
9704         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
9705         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
9706         PARM, not ARG.
9708 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
9710         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
9711         we've not emerged from the hierarchy of RTTI_BINFO on reaching
9712         a non-virtual base.
9714 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
9716         * NEWS: Update release number.
9718 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
9720         PR c++/3130, c++/3131, c++/3132
9721         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
9722         * class.c (force_canonical_binfo_r): Move
9723         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
9724         virtual bases unless they're primary and what they're primary
9725         too has been moved.
9726         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
9727         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
9728         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
9729         derived binfo.
9730         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
9731         (layout_nonempty_base_or_field): Add most derived type
9732         parameter. Adjust.
9733         (layout_empty_base): Likewise.
9734         (build_base_field): Likewise.
9735         (build_base_fields): Likewise.
9736         (propagate_binfo_offsets): Add most derived type
9737         parameter. Skip non canonical virtual bases too.
9738         (dfs_set_offset_for_unshared_vbases): Don't skip primary
9739         bases. Do skip canonical bases.
9740         (layout_virtual_bases): Adjust.
9741         (layout_class_type): Adjust.
9742         (dfs_get_primary_binfo): Build list of virtual primary base
9743         candidates.
9744         (get_primary_binfo): Check that the shared virtual primary
9745         base candidate was found first.
9746         (accumulate_vtbl_inits): Don't do anything for non-vptr
9747         containing binfos. For case 1 primary virtual bases, keep
9748         checking that we've not emerged from the hierarchy of RTTI_BINFO.
9750 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
9752         PR c++/3089
9753         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
9754         hierarchy looking for primary bases for a ctor
9755         vtable. Recursively call oneself, if we meet our primary via
9756         this route and haven't met it yet via inheritance graph order.
9758 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
9760         * lang-options.h: Emit documentation for -fno-honor-std, not
9761         -fhonor-std.
9763 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
9765         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
9766         Don't clobber delta.
9767         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
9769 2001-06-10  Mark Mitchell <mark@codesourcery.com>
9770             Gabriel Dos Reis  <gdr@codesourcery.com>
9772         * Make-lang.in (cp/call.o): Depend on diagnostic.h
9773         (cp/typeck.o): Depend on diagnostic.h
9774         (cp/typeck2.o): Depend on diagnostic.h
9775         (cp/repo.o): Depend on dignostic.h
9776         * typeck.c: #include diagnostic.h
9777         (convert_for_initialization): Remove extern declaration for
9778         warningcount and errorcount.
9780         * call.c: #include diagnostic.h
9781         (convert_like_real): Remove extern declaration for warnincount and
9782         errorcount.
9784         * repo.c: #include diagnostic.h
9785         * typeck2.c: #include diagnostic.h
9787 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
9789         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
9790         in previous change.
9792 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
9794         PR c++/2929
9795         * friend.c (do_friend): Use push_decl_namespace for classes at
9796         namespace scope.
9798 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
9799             Jason Merrill <jason_merrill@redhat.com>
9801         PR c++/3061
9802         * class.c (build_secondary_vtable): Use assert, rather than an error
9803         message.
9804         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
9805         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
9806         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
9807         Don't set BINFO_VTABLE for a primary virtual base.
9809 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
9811         * decl.c (duplicate_decls): Update source position information
9812         when a template function is defined.
9814 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
9816         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
9818 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
9820         PR c++/2914
9821         * decl.c (pushtag): Don't push into a complete type's scope.
9823 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
9825         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
9826         (struct lang_decl_flags): Lose generate_with_vtable_p.
9827         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
9828         * class.c (copy_virtuals): Adjust.
9829         * decl2.c (mark_vtable_entries): Adjust.
9830         * method.c (make_thunk, build_vtable_entry): Adjust.
9831         * class.c (update_vtable_entry_for_fn): Only look as far as the
9832         first defining class.
9833         (build_vtbl_initializer): Put nothing in the slot for a function only
9834         defined in a lost primary virtual base.
9835         (add_vcall_offset_vtbl_entries_1): Use the same code for
9836         the lost primary case and the normal case.
9837         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
9838         (get_vfield_offset, get_derived_offset): Lose.
9839         (dfs_find_final_overrider): Use look_for_overrides_here.
9840         (get_matching_virtual): New fn.
9841         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
9842         not BV_VCALL_INDEX.
9843         * search.c (look_for_overrides_here): Split out from...
9844         (look_for_overrides_r): Here.
9846         * class.c (find_final_overrider): Return error_mark_node on error.
9848         * decl2.c (key_method): #if 0 accidental change.
9850 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
9852         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
9853         (build_over_call): Likewise.
9854         * decl.c (grokparms): Likewise.
9855         * pt.c (tsubst_decl): Likewise.
9856         * typeck.c (convert_arguments): Likewise.
9858 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
9860         * semantics.c (begin_class_definition): Robustify.
9862         * pt.c (instantiate_decl): Tell the repository code about the
9863         clones, not the cloned functions.
9864         * repo.c (repo_template_used): Explicitly instantiate the cloned
9865         function, not the clones.
9867 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
9869         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
9870         ICS_BAD_FLAG on created conversion.
9871         (compare_ics): Break out rank.
9873 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
9875         * decl.c (xref_tag): Remove extraneous %s on dependent name
9876         lookup warning.
9878 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
9880         * class.c (layout_vtable_decl): Fix off by one error on
9881         build_index_type.
9882         (build_vtt): Likewise.
9883         (build_ctor_vtbl_group): Likewise.
9885 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
9887         * class.c (maybe_indent_hierarchy): New function.
9888         (dump_class_hierarchy_r): Add flags. Dump extra binfo
9889         information, if enabled. Use maybe_indent_hierarchy. Adjust
9890         output format.
9891         (dump_class_hierarchy): Adjust prototype. Adjust output format.
9892         (dump_array, dump_vtable, dump_vtt): New functions.
9893         (finish_struct_1): Adjust hierarchy dumping.
9894         (initialize_vtable): Call dump_vtable.
9895         (build_vtt): Call dump_vtt.
9896         (build_ctor_vtbl_group): Call dump_vtable.
9897         * decl2.c (flag_dump_class_layout): Remove.
9898         (cxx_decode_option): Remove dump translation unit
9899         and dump class hierarchy check. Call dump_switch_p.
9900         (finish_file): Adjust dumping.
9901         (dump.c): Only dump base classes if not TDF_SLIM.
9902         Only dump namespace members if not TDF_SLIM.
9903         * optimize.c (dump_function): New function.
9904         (optimize_function): Call dump_function.
9905         * semantics.c (expand_body): Use dump_enabled_p.
9907 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
9909         PR g++/2936
9910         Part missed from first commit
9911         * decl2.c (finish_anon_union): Copy context.
9913 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
9915         PR g++/2936
9916         * optimize.c (remap_decl): Remap anonymous aggregate members too.
9918 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
9920         PR g++/2823
9921         * semantics.c (expand_body): Don't optimize thunks.
9923 2001-05-25  Sam TH  <sam@uchicago.edu>
9925         * cp-tree.h lex.h: Fix header include guards.
9927 2001-05-25  Mark Mitchell <mark@codesourcery.com>
9929         * decl.c (init_decl_processing): Tweak.
9931 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
9933         * decl.c (duplicate_decls): Tidy.
9934         (init_decl_processing): Always set flag_no_builtin.
9936 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
9938         PR c++/2184
9939         * decl2.c (do_local_using_decl): Push the decls, even in a
9940         template.
9942 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
9944         * optimize.c (initialize_inlined_parameters): Don't set
9945         TREE_READONLY for a VAR_DECL taking the place of an inlined
9946         PARM_DECL.
9948 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
9950         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
9951         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
9952         attribute.
9954 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
9956         * parse.y: Refer to compound literals as such, not as
9957         constructor-expressions.
9959 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
9961         * call.c (build_op_delete_call): Ignore exception-specifications
9962         when looking for matching delete operators.
9963         * init.c (build_new_1): Compute whether or not the allocation
9964         function used is a placement allocation function or not, and
9965         communicate this information to build_op_delete_call.
9967 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
9969         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
9970         (build_vtbl_ref): Adjust.
9971         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
9972         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
9973         Re-add vtable-gc.
9974         (unsupported_options): Correspondingly.
9976         * decl2.c (maybe_make_one_only): Check flag_weak, not
9977         supports_one_only().
9979         * cp-tree.def (START_CATCH_STMT): Lose.
9980         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
9981         * tree.c (cp_statement_code_p): Don't case it.
9982         * semantics.c (cp_expand_stmt): Likewise.
9983         * cp-tree.h (START_CATCH_TYPE): Lose.
9984         (HANDLER_TYPE): New.
9985         * except.c (expand_start_catch_block): Don't start any blocks.
9986         Return the type.
9987         (expand_end_catch_block): Don't end any blocks.
9988         * parse.y (handler): Don't pass anything from finish_handler_parms
9989         to finish_handler.
9990         * pt.c (tsubst_expr): Likewise.
9991         * semantics.c (begin_handler): Call note_level_for_catch here.
9992         (finish_handler_parms): Don't return anything.
9993         (genrtl_catch_block, begin_catch_block): Lose.
9994         (genrtl_handler): Call expand_start_catch here.
9996 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
9998         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
9999         (get_vtable_decl, build_vtt): Not here.
10001 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
10003         PR c++/2781
10004         * optimize.c (update_cloned_parm): Copy addressability and other
10005         flags.
10007 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10009         * pt.c (determine_specialization): Ignore artificial functions.
10011 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
10013         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
10014         (C_RID_CODE): Remove.
10015         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
10016         (init_parse): Don't do it here.
10018 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
10020         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
10021         function declaration to avoid stripping the symbol's attributes.
10023 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
10025         * decl.c (pushdecl): Adjust error string.
10026         (xref_tag): Adjust friend class injection warning. Remove the
10027         inherited name from the class shadowed scope.
10029 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
10031         * except.c (cp_protect_cleanup_actions): New function.
10032         (init_exception_processing): Don't set protect_cleanup_actions
10033         here.  Do set lang_protect_cleanup_actions.
10035 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
10037         * spew.c (read_token): Call yyerror on all unexpected tokens.
10039 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
10041         * init.c (member_init_ok_or_else): Take a tree rather than
10042         string for name.
10043         (expand_member_init): Adjust.
10045 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
10047         * decl.c (duplicate_decls): Suppress warning about duplicate
10048         decls if the first decl is a friend.
10050 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
10052         * except.c (choose_personality_routine): Export.  Add
10053         explanatory comment.  Take an enum languages, not a boolean.
10054         (initialize_handler_parm): Adjust to match.
10055         * cp-tree.h: Prototype choose_personality_routine.
10056         * lex.c (handle_pragma_java_exceptions): New function.
10057         (init_cp_pragma): Register #pragma GCC java_exceptions.
10059 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
10061         * method.c (build_mangled_C99_name): Remove unused prototype.
10063 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
10065         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
10066         * typeck.c (get_member_function_from_ptrfunc,
10067         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
10068         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
10070         Reverted Geoff Keating's 2001-05-03's patch.
10072 2001-05-11  Ira Ruben   <ira@apple.com>
10074         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
10076 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
10078         * cp-tree.h (finish_label_expr, lookup_label): Delete.
10079         * parse.y: Update for '&&'; don't issue warning here.
10080         * semantics.c (finish_label_expr): Delete.
10082 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
10084         * splay-tree.h (splay_tree_max): New function.
10085         (splay_tree_min): Likewise.
10087 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
10089         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
10090         (pfn_vflag_identifier): Define.
10091         Update comment about layout of pointer functions.
10092         (build_ptrmemfunc1): Update prototype.
10093         (expand_ptrmemfunc_cst): Update prototype.
10094         * decl.c (initialize_predefined_identifiers): Initialize
10095         pfn_vflag_identifier.
10096         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
10097         an extra field to the type.
10098         * expr.c (cplus_expand_constant): Pass 'flag' between
10099         expand_ptrmemfunc_cst and build_ptrmemfunc1.
10100         * typeck.c (get_member_function_from_ptrfunc): When
10101         FUNCTION_BOUNDARY < 16, look at additional field to determine
10102         if a pointer-to-member is a real pointer or a vtable offset.
10103         (build_ptrmemfunc1): Add new parameter to contain extra field.
10104         (build_ptrmemfunc): Pass the extra field around.
10105         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
10106         (pfn_from_ptrmemfunc): Ignore the extra field.
10108 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
10110         * cp-tree.h (flag_inline_trees): Update documentation.
10111         * decl.c (init_decl_processing): Adjust handling of
10112         flag_inline_functions and flag_inline_trees to support -O3.
10113         (grokfndecl): Set DECL_INLINE on all functions if that's what
10114         the user requested.
10115         (save_function_data): Clear DECL_INLINE in
10116         current_function_cannot_inline is non-NULL.
10117         * decl2.c (flag_inline_trees): Update documentation.
10119 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
10121         * dump.c (cp_dump_tree, USING_STMT case): New case.
10122         * tree.c (cp_statement_code_p): Add USING_STMT.
10123         * decl2.c (do_using_directive): Add the using directive statement.
10125         * tree.c (walk_tree): Reformat an if block.
10127 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
10129         * decl.c (compute_array_index_type): Don't try to do anything with
10130         the indices when processing a template.
10132 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10134         * call.c: NULL_PTR -> NULL.
10135         * class.c: Likewise.
10136         * cvt.c: Likewise.
10137         * decl.c: Likewise.
10138         * decl2.c: Likewise.
10139         * except.c: Likewise.
10140         * init.c: Likewise.
10141         * rtti.c: Likewise.
10142         * search.c: Likewise.
10143         * tree.c: Likewise.
10144         * typeck.c: Likewise.
10145         * typeck2.c: Likewise.
10147 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
10149         * decl2.c (do_using_directive): Revert previous patch.
10151 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
10153         * cp-tree.def (USING_STMT): New statement node.
10154         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
10155         * decl2.c (do_using_directive): Add USING_STMT to statement
10156         tree. Don't emit errors when processing template decl.
10157         * pt.c (tsubst_expr, USING_STMT case): New case.
10158         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
10160 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
10162         * call.c (build_new_op): Convert args from reference here.
10163         (build_conditional_expr): Don't convert here.
10165 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
10167         * spew.c (last_token_id): New static variable.
10168         (read_token): Set it here.
10169         (yyerror): Use it here.
10171 2001-04-30  Richard Henderson  <rth@redhat.com>
10173         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
10174         * decl.c: Likewise.
10176 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
10178         * gxxint.texi: Remove.
10179         * Make-lang.in: Remove all traces of gxxint.texi.
10181 2001-04-30  Mark P Mitchell  <mark@codesourcery.com>
10183         * decl2.c (start_static_initialization_or_destruction): Correct
10184         logic to handle the -fno-use-cxa-atexit case.
10186 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
10188         * optimize.c (update_cloned_parm): New function.
10189         (maybe_clone_body): Use it.  Update the `this' parameter too.
10191 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
10193         * decl2.c (unsupported_options): Add new-abi.
10194         * lang-options.h: Remove no longer supported options.
10196 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
10198         * except.c (can_convert_eh): Don't check template parms,
10199         typename types etc.
10201 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
10203         * optimize.c (maybe_clone_body): Copy parameter names and locations.
10205 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
10207         * cp-tree.h (adjust_clone_args): Prototype new function.
10208         * class.c (adjust_clone_args): New function.
10209         * decl.c (start_function): Call it for in charge ctors.
10211 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
10213         * method.c (use_thunk): Make sure that thunks really are emitted
10214         when requested.
10216 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
10218         * mangle.c (write_chars): New macro.
10219         (hwint_to_ascii): New function
10220         (write_number): Use it.
10221         (write_integer_cst): Deal with really big numbers.
10223 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
10225         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
10226         the clone.
10228 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
10230         * decl.c (grokdeclarator): Set context of namespace scope
10231         TYPE_DECLS.
10233 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
10235         * cp/optimize.c: Include hashtab.h.
10236         (struct inline_data): Add tree_pruner.
10237         (expand_call_inline, expand_calls_inline): Use it when calling
10238         walk_tree.
10239         (optimize_function): Initialize and free tree_pruner.
10241 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
10243         Lazy __FUNCTION__ generation.
10244         * cp-tree.def (FUNCTION_NAME): Remove.
10245         * cp-tree.h (function_name_declared_p): Remove.
10246         (cp_fname_init): Prototype.
10247         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
10248         don't call declare_function_name. Call start_fname_decls.
10249         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
10250         clobber the line number.
10251         (cp_fname_init): New function.
10252         (start_function): Call start_fname_decls.
10253         (finish_function): Call finish_fname_decls.
10254         * lex.c (reswords): Add slots for __FUNCTION__ et al.
10255         (rid_to_yy): Add mappings for __FUNCTION__ et al.
10256         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
10257         * parse.y (VAR_FUNC_NAME): New token.
10258         (primary): Add VAR_FUNC_NAME.
10259         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
10260         generation.
10261         (tsubst, FUNCTION_NAME case): Remove.
10262         (tsubst_copy, FUNCTION_NAME case): Remove.
10263         (tsubst_expr, DECL_STMT case): Be careful with a
10264         DECL_PRETTY_FUNCTION_P.
10265         (instantiate_decl): Remove function_name_declared_p.
10266         * semantics.c (begin_compound_statement): Don't call
10267         declare_function_name here.
10268         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
10269         (finish_translation_unit): Call finish_fname_decls.
10270         (expand_body): Remove function_name_declared_p.
10271         * typeck2.c (digest_init): Allow any ERROR_MARK.
10273 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
10275         * pt.c (tsubst_decl): Use VOID_TYPE_P.
10276         * semantics.c: Fix some typos.
10278 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
10280         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
10282 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10284         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
10286 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
10288         * except.c (build_throw): Wrap the initialization of the exception
10289         object in a MUST_NOT_THROW_EXPR.
10290         (do_free_exception): #if 0.
10292 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
10294         * cp-tree.h (finish_enum): Change prototype.
10295         * decl.c (finish_enum): Reorganize.
10296         * parse.y (structsp): Adjust calls to finish_enum.
10298 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
10300         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
10301         't' case.
10303 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
10305         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
10306         (layout_empty_base): Return at end flag.
10307         (build_base_field): Likewise.
10308         (build_base_fields): Likewise.
10309         (layout_virtual_bases): Don't add 1 to eoc value.
10310         (end_of_class): Use full size for empty bases.
10311         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
10312         empty bases. Don't add 1 to eoc value. Only add trailing padding
10313         if we're an empty class with no empty bases.
10314         (dump_class_hierarchy): Dump size and alignment.
10316 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
10318         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
10319         ICS_BAD_FLAG.
10321 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
10323         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
10324         is found, look first if name does not match the structure name.
10326 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
10328         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
10329         set.
10330         (SET_DECL_LANGUAGE): New macro.
10331         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
10332         (pushdecl): Likewise.
10333         (build_library_fn_1): Likewise.
10334         (build_cp_library_fn): Likewise.
10335         (grokfndecl): Likewise.
10336         (grokvardecl): Mark `extern "C"' variables as having C linkage.
10337         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
10338         * lex.c (retrofit_lang_decl): Likewise.
10339         * mangle.c (mangle_decl_string): Don't mangle the names of
10340         variables declared with C language linkage.
10341         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
10343 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
10345         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
10346         flag_access_control from uninitialized storage.
10348 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
10350         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
10351         * mangle.c (write_pointer_to_member_type): Fix mangling of
10352         pointers to cv-qualified member function types.
10354         * init.c (build_delete): Create a SAVE_EXPR for the address if
10355         we're going to use it more than once.
10357 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
10359         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
10360         (expand_ptremfunc_cst): Change prototype.
10361         (delta2_from_ptrmemfunc): Remove.
10362         * expr.c (cplus_expand_constant): Adjust call to
10363         expand_ptrmemfunc_cst.
10364         * typeck.c (build_ptrmemfunc1): Simplify.
10365         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
10366         results in a constant.
10367         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
10368         (delta2_from_ptrmemfunc): Remove.
10369         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
10371 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
10373         * cp-tree.h (decl_namespace_list): New macro.
10374         (struct saved_scope): Add decl_ns_list.
10375         * decl.c (mark_saved_scope): Mark it.
10376         * decl2.c: Lose static decl_namespace_list.
10377         (init_decl2): Don't save it.
10379 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10381         * cp-tree.h (warn_return_type, yylex): Delete redundant
10382         declarations.
10384         * decl.c (current_class_depth, global_namespace): Likewise.
10386         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
10388         * repo.c (flag_use_repository): Likewise.
10390 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10392         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
10393         set_block, pushdecl, getdecls, gettags, init_decl_processing,
10394         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
10395         lvalue_or_else, print_lang_statistics, comp_target_types,
10396         unsigned_type, signed_type, signed_or_unsigned_type,
10397         build_function_call, mark_addressable, incomplete_type_error):
10398         Delete redundant declarations.
10400 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
10402         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
10403         (TYPE_ANONYMOUS_P): New macro.
10404         (TAGGED_TYPE_P): New macro.
10405         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
10406         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
10407         * tree.c (no_linkage_helper): Likewise.
10408         * semantics.c (begin_class_definition): Likewise.
10409         * pt.c (convert_template_argument): Likewise.
10410         * lex.c (check_for_missing_semicolon): Likewise.
10412 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
10414         * class.c (dfs_unshared_virtual_bases): New function.
10415         (mark_primary_bases): Call it.
10416         (check_bases): Ignore virtual bases when determining
10417         nearly-emptiness.
10419 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
10421         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
10423 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
10425         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
10426         cloned function to the clone.
10428 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10430         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
10432         * semantics.c: Include expr.h.
10434 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
10436         * method.c (implicitly_declare_fn): Commonize code for copy ctor
10437         and assignment op. Set TREE_USED for parameter.
10439 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
10441         * class.c (find_final_overrider_data): Add `candidates'.
10442         (dfs_find_final_overrider): Don't issue error messages
10443         prematurely.
10444         (find_final_overrider): Issue error messages here.
10445         (build_base_field): Don't warn about amgibuous direct bases here.
10446         (warn_about_ambiguous_direct_bases): New function.
10447         (layout_class_type): Use it.
10449 2001-04-10  Richard Henderson  <rth@redhat.com>
10451         * typeck.c (build_array_ref): Push the array reference inside
10452         COMPOUND_EXPR and COND_EXPR.
10454 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
10456         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
10457         * decl.c (duplicate_decls): Adjust accordingly.
10458         (maybe_commonize_var): Likewise.
10459         (grokfndecl): Likewise.
10460         (start_function): Likewise.
10461         (start_method): Likewise.
10462         * decl2.c (key_method): Likewise.
10463         (import_export_decl): Likewise.
10464         * method.c (implicitly_declare_fn): Likewise.
10465         * optimize.c (maybe_clone_body): Likewise.
10467 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
10469         * lang-specs.h: Add __DEPRECATED.
10471 2001-04-05  J"orn Rennecke <amylaar@redhat.com>
10473         * search.c (get_dynamic_cast_base_type): When building a new
10474         constant, set its type to ssizetype.
10476 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
10478         * optimize.c (expand_call_inline): Only add newly inlined statements
10479         into inlined_stmts.
10481 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
10483         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
10484         (OPERATOR_FORMAT): Likewise.
10485         (OPERATOR_TYPENAME_FORMAT): Likewise.
10486         * operators.def: Remove old name-mangling information.
10487         * decl.c (grok_op_properties): Adjust accordingly.
10488         * lex.c (init_operators): Likewise.
10489         * rtti.c (get_tinfo_decl): Issue error messages about types that
10490         have variable size.
10492 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
10494         * decl2.c (import_export_decl): Don't call import_export_class
10495         when processing an inline member function.
10496         * semantics.c (expand_body): Call import_export_decl before
10497         emitting inline functions.
10499 2001-03-28  Richard Henderson  <rth@redhat.com>
10501         IA-64 ABI Exception Handling:
10502         * cp-tree.def (EH_SPEC_BLOCK): New.
10503         (MUST_NOT_THROW_EXPR): New.
10504         * cp-tree.h: Update changed function declarations.
10505         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
10506         (CPTI_CALL_UNEXPECTED): New.
10507         (struct cp_language_function): Rename x_eh_spec_try_block
10508         to x_eh_spec_block.
10509         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
10510         * decl.c (current_binding_level): If no current function
10511         bindings, revert to scope_chain.
10512         (initialize_predefined_identifiers): Remove __cp_push_exception.
10513         (store_parm_decls): Use begin_eh_spec_block.
10514         (finish_function): Use finish_eh_spec_block.
10515         (mark_lang_function): Update for name changes.
10516         * decl2.c (finish_file): No mark_all_runtime_matches.
10517         * dump.c (cp_dump_tree): Handle new tree codes.
10518         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
10519         * except.c (catch_language_init, catch_language): Remove.
10520         (init_exception_processing): Don't set language code.
10521         Initialize call_unexpected_node, protect_cleanup_actions,
10522         eh_personality_libfunc, lang_eh_runtime_type.
10523         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
10524         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
10525         (prepare_eh_type): Split out type canonicalizations ...
10526         (build_eh_type_type): ... from here.
10527         (build_eh_type_type_ref): Remove.
10528         (mark_all_runtime_matches): Remove.
10529         (build_exc_ptr): New.
10530         (do_begin_catch, do_end_catch): New.
10531         (do_pop_exception): Remove.
10532         (build_terminate_handler): Remove.
10533         (choose_personality_routine): Split out language choice from ...
10534         (initialize_handler_parm): ... here.
10535         Use MUST_NOT_THROW_EXPR.
10536         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
10537         exception object handling.
10538         (expand_start_eh_spec, expand_end_eh_spec): Remove.
10539         (expand_exception_blocks, alloc_eh_object): Remove.
10540         (begin_eh_spec_block, finish_eh_spec_block): New.
10541         (do_allocate_exception, do_free_exception): New.
10542         (expand_throw): Merge into ...
10543         (build_throw): ... here.  Update for abi.
10544         * expr.c (cplus_expand_expr): No expand_internal_throw.
10545         Handle MUST_NOT_THROW_EXPR.
10546         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
10547         * semantics.c (*) Update for except.h name changes.
10548         (genrtl_try_block): No protect_with_terminate.
10549         (genrtl_eh_spec_block): New.
10550         (genrtl_handler): Don't emit the goto here.
10551         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
10552         (genrtl_finish_function): Don't expand_exception_blocks.
10553         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
10555 2001-03-28  Richard Henderson  <rth@redhat.com>
10557         * decl.c (struct named_label_list): Rename eh_region to
10558         in_try_scope, add in_catch_scope.
10559         (struct binding_level): Rename eh_region to is_try_scope,
10560         add is_catch_scope.
10561         (note_level_for_try): Rename from note_level_for_eh.
10562         (note_level_for_catch): New.
10563         (poplevel): Copy both is_try_scope and is_catch_scope to
10564         the named_label_list struct.
10565         (check_previous_goto_1): Don't check for catch block via
10566         DECL_ARTIFICIAL; use in_try_scope instead.
10567         (check_goto): Likewise.
10568         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
10569         * except.c (expand_start_catch_block): Call note_level_for_catch.
10570         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
10572 2001-03-27  Richard Henderson  <rth@redhat.com>
10574         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
10575         exceptions_via_longjmp.
10577 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
10579         * pt.c (check_default_tmpl_args):  Make error messages clearer.
10581 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
10583         * error.c:  Also undefine 'A' macro used for cp_printers definition.
10585 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10587         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
10589 2001-03-26  Mike Yang <yang@research.att.com>
10590             Mark Mitchell  <mark@codesourcery.com>
10592         * dump.c (dump_access): New function.
10593         (cp_dump_tree): Use it.  Dump basetype information for class
10594         types.
10596 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
10598         * Makefile.in (optimize.o): Depend on params.h.
10599         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
10600         (init_decl_processing): Set flag_no_inline when doing
10601         inlining-on-trees.
10602         * optimize.c: Include params.h.
10603         (struct inline_data): Improve documentation of FNS.  Add
10604         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
10605         (INSNS_PER_STMT): New macro.
10606         (remap_block): Use CLONING_P.
10607         (inlinable_function_p): Don't inline big functions.
10608         (expand_call_inline): Keep track of how much inlining we've done.
10609         (optimize_function): Set FIRST_INLINED_FN.
10610         (maybe_clone_body): Set CLONING_P.
10611         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
10612         tree nodes.
10613         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
10614         rest_of_compilation.  Clear DECL_RTL for local variables
10615         afterwards.
10616         (clear_decl_rtl): New function.
10618 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
10620         Implement DR 209
10621         * cp-tree.h (skip_type_access_control,
10622         reset_type_access_control): Prototype.
10623         * decl.c (grokdeclarator): Access of friends is not checked.
10624         * parse.y (component_decl_list): Reset type access control.
10625         * semantics.c (decl_type_access_control): Clear
10626         current_type_lookups.
10627         (save_type_access_control): Don't save if not deferring.
10628         (skip_type_access_control, reset_type_access_control): New
10629         functions.
10630         (begin_class_definition): Do type access control for basetypes.
10631         Start deferred access control.
10632         (finish_class_definition): Resume immediate access control if
10633         this is a local class.
10635 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10637         * class.c (add_method): Use memcpy/memmove, not bcopy.
10639         * decl.c (duplicate_decls): Likewise.
10641 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
10643         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
10644         not `_'.
10646 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
10648         * decl.c (local_names): Define.
10649         (push_local_name): New.
10650         (grok_reference_init): Return init if initializing static reference
10651         variable with non-constant instead of emitting it.
10652         Move expand_static_init call to cp_finish_decl.
10653         (layout_var_decl): Call push_local_name.
10654         (maybe_commonize_var): Allow inlining functions even if they have
10655         static local variables, use comdat_linkage for them if flag_weak.
10656         (check_initializer): Call obscure_complex_init if
10657         grok_reference_init returned nonzero.
10658         (save_function_data): Clear x_local_names.
10659         (pop_cp_function_context): Free x_local_names.
10660         (mark_inlined_fns): Remove.
10661         (mark_lang_function): Mark x_local_names.
10662         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
10663         Mark inlined_fns as tree, remove call to mark_inlined_fns.
10664         * class.c (alter_access): Ensure DECL_ACCESS is never set if
10665         DECL_DISCRIMINATOR_P.
10666         * cp-tree.h (cp_language_function): Add x_local_names.
10667         (lang_decl_flags): Add discriminator into u2.
10668         (lang_decl_inlined_fns): Remove.
10669         (lang_decl): inlined_fns is now a TREE_VEC.
10670         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
10671         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
10672         TREE_VEC, not a custom structure.
10673         (optimize_function): Likewise.
10674         * mangle.c (discriminator_for_local_entity): Discriminate among
10675         VAR_DECL local entities.
10676         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
10677         is not valid.
10679 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
10681         Add support for Java interface method calls.
10682         * cp-tree.h (struct lang_type): Add java_interface flag.
10683         (TYPE_JAVA_INTERFACE): New macro.
10684         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
10685         by setting TYPE_JAVA_INTERFACE.
10686         * call.c (java_iface_lookup_fn): New static.
10687         (build_over_call): If calling a method declared in a
10688         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
10689         expression which resolves the function address.
10690         (build_java_interface_fn_ref): New function.
10692 2001-03-22  Richard Henderson  <rth@redhat.com>
10694         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
10695         * except.c: Don't include it.
10697 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
10698             based on an idea from Joe Buck <jbuck@synopsys.com>
10700         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
10701         New nonterminals.
10702         (data_def, component_decl): Add reductions to bad_decl.
10704 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
10706         * method.c (do_build_assign_ref): Don't use build_modify_expr for
10707         anonymous aggregates, since they don't have assignment operator
10708         method.
10709         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
10710         assignment operators for anonymous structure fields.
10712 2001-03-21  Jason Merrill  <jason@redhat.com>
10714         * pt.c (instantiate_decl): Abort if we see a member constant
10715         instantiation that doesn't already have its initializer.
10716         Downgrade explicit instantiation without definition to pedwarn.
10718         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
10719         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
10720         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
10722         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
10723         (pending_vtables): Remove.
10724         * decl2.c (pending_vtables): Remove.
10725         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
10726         CLASSTYPE_VTABLE_NEEDS_WRITING.
10727         (import_export_class): Likewise.
10728         (init_decl2): Don't mark pending_vtables.
10729         * lex.c (handle_pragma_vtable): Just sorry.
10730         * pt.c (instantiate_class_template): Don't mess with
10731         CLASSTYPE_VTABLE_NEEDS_WRITING.
10732         (mark_class_instantiated): Likewise.
10733         * ptree.c (print_lang_type): Don't print it.
10734         * semantics.c (begin_class_definition): Don't set it.
10736         * pt.c (template_tail): Replace with last_pending_template.
10737         (maybe_templates, maybe_template_tail): Remove.
10738         (add_pending_template): Adjust.
10739         (instantiate_pending_templates): Adjust.
10741         * cp-tree.h (struct saved_scope): Remove lang_stack field.
10742         (current_lang_stack): Remove.
10743         * decl.c (maybe_push_to_top_level): Don't initialize it.
10744         (duplicate_decls): Use current_lang_depth.
10745         (xref_basetypes): Likewise.
10746         * class.c (current_lang_depth): New fn.
10747         (push_lang_context): Use more varray functionality.
10748         (pop_lang_context): Likewise.
10750         * error.c (GLOBAL_THING): Always use '__'.
10752 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
10754         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
10756         * mangle.c (mangle_decl_string): Mangle the names of overloaded
10757         operators, even when they have `extern "C"' linkage.
10759 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
10761         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
10762         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
10763         where it's not necessary.
10764         (add_method): Remove optimization involving comparison of
10765         DECL_ASSEMBLER_NAME.
10766         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
10767         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
10768         where it's not necessary.
10769         (check_methods): Likewise.
10770         (build_clone): Likewise.
10771         (built_vtt): Likewise.
10772         * cp-tree.h (DECL_NEEDED_P): Likewise.
10773         * decl.c (pushtag): Likewise.
10774         (duplicate_decls): Likewise.
10775         (pushdecl): Likewise.
10776         (builtin_function): Likewise.
10777         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
10778         (build_cp_library_fn): Likewise.
10779         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
10780         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
10781         where it's not necessary.
10782         (make_rtl_for_nonlocal_decl): Likewise.
10783         (cp_finish_decl): Likewise.
10784         (grokfndecl): Likewise.
10785         (grokvardecl): Likewise.
10786         (grokdeclarator): Likewise.
10787         (start_function): Likewise.
10788         (cp_missing_return_ok_p): Likewise.
10789         * decl2.c (grokclassfn): Likewise.
10790         (check_classfn): Likewise.
10791         (finish_static_data_member_decl): Likewise.
10792         (grokfield): Likewise.
10793         * error.c (GLOBAL_IORD_P): Remove.
10794         (dump_global_iord): Improve output.
10795         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
10796         * except.c (nothrow_libfn_p): Summarily reject any function not in
10797         namespace-scope.
10798         * init.c (build_java_class_ref): Don't explicitly set
10799         DECL_ASSEMBLER_NAME after calling mangle_decl.
10800         * mangle.c (mangle_decl_string): Handle extern "C" functions.
10801         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
10802         * method.c (set_mangled_name_for_decl): Don't explicitly set
10803         DECL_ASSEMBLER_NAME after calling mangle_decl.
10804         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
10805         IDENTIFIER_GLOBAL_VALUE for the thunk.
10806         * pt.c (set_mangled_name_for_template_decl): Remove.
10807         (check_explicit_specialization): Don't use it.
10808         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
10809         (tsubst_friend_function): Likewise.
10810         (tsubst_decl): Likewise.
10811         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
10812         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
10813         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
10814         where it's not necessary.
10815         (tinfo_base_init): Likewise.
10816         (create_real_tinfo_var): Likewise.
10817         * search.c (looup_field_1): Likewise.
10818         * semantics.c (finish_named_return_value): Likewise.
10819         * tree.c (init_tree): Set lang_set_decl_assembler_name.
10821 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
10823         Correct semantics restrictions checking in throw-expression.
10824         * except.c (is_admissible_throw_operand): New function.
10825         (build_throw): Use it.
10827 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
10829         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
10830         and its ilk.
10832 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
10834         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
10835         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
10836         * decl.c (duplicate_decls): Likewise.
10837         (builtin_function): Likewise.
10838         (build_library_fn): Likewise.
10839         (build_cp_library_fn): Likewise.
10840         (check_initializer): Likewise.
10841         (cp_finish_decl): Likewise.
10842         * decl2.c (grokfield): Likewise.
10843         (grok_function_init): Remove #if 0'd code.
10844         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
10845         * friend.c (do_friend): Likewise.
10846         * init.c (get_temp_regvar): Likewise.
10847         * method.c (make_thunk): Likewise.
10848         * pt.c (tsubst_friend_function): Likewise.
10849         (tsubst_decl): Likewise.
10850         (regenerate_decl_from_template): Likewise.
10851         * semantics.c (genrtl_named_return_value): Likewise.
10852         (expand_body): Likewise.
10853         (genrtl_finish_function): Likewise.
10854         * tree.c (cp_tree_equal): Likewise.
10856 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
10858         * call.c (convert_like_real): Add extra semantics to INNER
10859         parameter. Don't convert to temporary if a user conversion
10860         gives us an lvalue that we're about to bind to a reference.
10861         Set INNER to indicate pending reference binding on recursive
10862         calls.
10864 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
10866         * cp/lex.c: Delete duplicate pending_lang_change.
10868 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
10870         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
10871         Similarly.
10872         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
10873         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
10875 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
10877         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
10879 2001-03-08  Stan Shebs  <shebs@apple.com>
10881         * cp-tree.h (set_identifier_local_value): Remove unused decl.
10883 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
10885         * spew.c: Remove references to CPP_OSTRING.
10887 2001-03-06  Andrew Haley  <aph@redhat.com>
10889         * typeck.c (convert_arguments): Check that we have an fndecl.
10891 2001-03-05  Andrew Haley  <aph@redhat.com>
10893         * typeck.c (convert_arguments): Don't do ellipsis conversion for
10894         __built_in_constant_p.
10896 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
10898         * typeck.c (build_static_cast): Allow enum to enum conversions
10899         as per DR 128.
10901 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
10903         * class.c (check_field_decls): Pointers to member do not a
10904         non-pod struct make, as per DR 148.
10906 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
10908         * call.c (joust): cp_pedwarn when using gnu extension concerning
10909         worst conversion sequences.
10911 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
10913         * decl.c: Replace all uses of 'boolean' with 'bool'.
10915 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
10917         * lang-specs.h: Add zero initializer for cpp_spec field to
10918         all array elements that need one.  Don't put an #ifdef inside
10919         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
10920         use it.
10922 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
10924         Implement using decls inside template functions.
10925         * decl2.c (validate_nonmember_using_decl): Don't special case
10926         fake_std_node in the global namespace. Don't reject early when
10927         processing a template.
10928         (do_local_using_decl): Add to statement tree. Don't do further
10929         processing when building a template.
10930         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
10932 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
10934         * decl2.c (do_nonmember_using_decl): Don't complain if we find
10935         same function. Do complain about ambiguating extern "C"
10936         declarations.
10938 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
10940         Remove floating point and complex type template constant parms.
10941         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
10942         COMPLEX_TYPE extensions.
10943         (invalid_nontype_parm_type_p): Likewise.
10945 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
10947         * except.c (call_eh_info): Revert "match_function"'s type.
10949 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
10951         Fix ctor vtable vcall offsets.
10952         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
10953         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
10954         (get_matching_base): Remove.
10955         (get_original_base): New function.
10956         (build_vtbl_initializer): Initialize vid.rtti_binfo.
10957         Use a virtual thunk for a ctor vtable with an index
10958         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
10959         primary base within a constructor vtable. Only set
10960         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
10961         when primary base has been lost.
10962         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
10964 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
10966         * call.c (joust): Ensure more_specialized()'s argument length
10967         parameter has correct value for constructors.
10969 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
10971         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
10973         * decl.c (mark_inlined_fns): Prototype.
10975 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
10977         * spew.c (yylex): Correct handling of friends.
10979 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
10981         * mangle.c (write_encoding): Pass write_function_type the
10982         FUNCTION_DECL for the function being encoded.
10983         (write_function_type): Pass it along to write_bare_function_type.
10984         (write_bare_function_type): Pass it along to write_method_parms.
10985         (write_method_parms): Don't mangle the compiler-generated
10986         parameters to a constructor or destructor.
10988 2001-02-22  Andreas Jaeger  <aj@suse.de>
10990         * optimize.c: Include toplev.h for
10991         note_deferral_of_defined_inline_function prototype.
10993 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
10995         * cp-tree.h (struct lang_decl_inlined_fns): New.
10996         (struct lang_decls): Add inlined_fns.
10997         (DECL_INLINED_FNS): New macro.
10998         * optimize.c (struct inline_data): Add inlined_fns.
10999         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
11000         (inlinable_function_p): Likewise, fix typo in comment,
11001         function is not inlinable if it already inlined function currently
11002         being optimized.
11003         (expand_call_inline): Add fn to inlined_fns if necessary.
11004         (optimize_function): Initialize inlined_fns.
11005         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
11006         * decl.c (mark_inlined_fns): New function.
11007         (lang_mark_tree): Call it.
11009 2001-02-21  Jason Merrill  <jason@redhat.com>
11011         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
11012         (DECL_UNINLINABLE): Move to middle-end.
11014         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
11015         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
11016         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
11017         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
11018         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
11020         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
11021         second parm of op=.
11023 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
11025         * decl2.c (set_decl_namespace): Allow explicit instantiations in
11026         any namespace.
11028 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11030         * optimize.c (expand_call_inline): Don't walk subtrees of type
11031         nodes.
11033 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
11035         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
11036         for a destructor.
11038 2001-02-18  Jason Merrill  <jason@redhat.com>
11040         Do put the VTT parameter in DECL_ARGUMENTS.
11041         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
11042         (current_vtt_parm): New macro.
11043         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
11044         (DECL_HAS_VTT_PARM_P): New macro.
11045         (DECL_VTT_PARM): Remove.
11046         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
11047         * decl.c (duplicate_decls): Only copy the operator code if
11048         appropriate.
11049         (start_function): Set current_vtt_parm.
11050         (lang_mark_tree): Don't mark vtt_parm.
11051         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
11052         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
11053         * class.c (build_clone): Maybe remove the VTT parm.
11054         * optimize.c (maybe_clone_body): Set up the VTT parm.
11055         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
11056         * call.c (build_over_call): Just allow the VTT arg.
11057         * method.c (make_thunk): Don't set DECL_VTT_PARM.
11058         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
11059         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
11060         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
11061         * error.c (dump_function_decl): Likewise.
11062         * call.c (build_user_type_conversion_1, convert_like_real): Abort
11063         if we try to call a constructor with in-charge or VTT parms.
11064         * method.c (skip_artificial_parms_for): New fn.
11065         * call.c (add_function_candidate, build_over_call): Call it.
11066         * call.c (build_new_method_call): Use current_vtt_parm.
11067         * init.c (expand_virtual_init): Likewise.
11068         * class.c (same_signature_p): No longer static.
11069         * cp-tree.h: Declare it.
11070         * search.c (look_for_overrides_r): Use it.
11072 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
11074         * cp-tree.h (new_abi_rtti_p): Remove.
11075         (name_mangling_version): Likewise.
11076         (flag_do_squangling): Likewise.
11077         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
11078         * decl.c (grokfndecl): Likewise.
11079         * decl2.c (name_mangling_version): Remove.
11080         (flag_do_squangling): Likewise.
11081         (lang_f_options): Remove `squangle'.
11082         (unsupported_options): Add `squangle'.
11083         (cxx_decode_option): Issue a warning about uses of
11084         -fname-mangling-version.
11085         (finish_file): Remove old ABI support.
11086         * pt.c (check_explicit_specialization): Likewise.
11087         (tsubst_decl): Likewise.
11088         * rtti.c (init_rtti_processing): Likewise.
11089         (build_headof): Likewise.
11090         (get_tinfo_decl_dynamic): Likewise.
11091         (tinfo_from_decl): Likewise.
11092         (build_dynamic_cast_1): Likewise.
11093         (synthesize_tinfo_var): Likewise.
11094         * init.c (build_new): Allow enumeration types for the array-bounds
11095         in a direct-new-declarator.
11097         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
11099         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
11100         TREE_PROTECTED from the template being specialized.
11102 2001-02-17  Jason Merrill  <jason@redhat.com>
11104         * decl2.c (build_artificial_parm): Set TREE_READONLY.
11106         * decl.c (bad_specifiers): Allow throw specs on things with
11107         pointer-to-function or -member-function type.
11108         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
11109         a pmf.
11111 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
11113         * call.c (check_dtor_name): Handle template names correctly.
11115 2001-02-16  Jason Merrill  <jason@redhat.com>
11117         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
11118         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
11119         * optimize.c (maybe_clone_body): Don't substitute it.
11120         * call.c (build_new_method_call): Check in_chrg instead.
11121         * init.c (expand_virtual_init): Likewise.
11123 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
11125         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
11126         class-type introduces at least a type-name.
11128 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
11130         * call.c (convert_like_real): Create a temporary for non-lvalue.
11132 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
11134         * cp-tree.h: Fix typos in comments.
11136 2001-02-16  Jason Merrill  <jason@redhat.com>
11138         * optimize.c (remap_block): If we're compiling a clone, pass the
11139         new block to insert_block.
11141 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
11143         * semantics.c (finish_asm_stmt): Robustify.
11145 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
11147         * pt.c (push_template_decl_real): Don't remangle the name of a
11148         class template.
11150 2001-02-15  Jim Meyering  <meyering@lucent.com>
11152         * Make-lang.in (c++.install-common): Depend on installdirs.
11153         (c++.install-info): Likewise.
11154         (c++.install-man): Likewise.
11156 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
11158         * typeck2.c (build_m_component_ref): Robustify.
11160 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
11162         * friend.c (do_friend): Don't take the nested [template] class
11163         into account when deciding whether to warn about the friend
11164         function not referring to a template function.
11166 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
11168         * typeck.c (build_unary_op): Clarify error message.
11170 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
11172         * parse.y (component_constructor_declarator): allow optional
11173         parentheses around constructor class name.
11175 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
11177         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
11178         section.
11179         * init.c (emit_base_init): Remove incorrect comment about
11180         virtual bases.
11181         * method.c (make_thunk): Fix comment alignment.
11183 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
11185         Kill remnants of this is variable.
11186         * cp-tree.h (flag_this_is_variable): Remove.
11187         * decl2.c (flag_this_is_variable): Remove.
11188         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
11189         (build_vbase_path): The path is non-static, even in a cdtor.
11190         (resolves_to_fixed_type_p): Add additional return value.
11191         * search.c (init_vbase_pointers): Adjust.
11192         * tree.c (lvalue_p_1): Adjust.
11193         * typeck.c (mark_addressable): Adjust.
11195 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
11197         * pt.c (unify): Don't check cv quals of array types.
11199 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
11201         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
11202         check whether we already have the type.
11204 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
11206         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
11207         * call.c (build_op_delete_call): Simplify to remove duplicate
11208         code.
11209         * class.c (clone_function_decl): Don't build the deleting variant
11210         of a non-virtual destructor.
11211         * decl.c (finish_destructor_body): Don't call delete if this is a
11212         non-virtual destructor.
11213         * init.c (build_delete): Explicitly call `operator delete' when
11214         deleting an object with a non-virtual destructor.
11216 2001-02-13  Jason Merrill  <jason@redhat.com>
11218         * lang-specs.h: Add more __EXCEPTIONS.
11220 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
11222         * typeck2.c (process_init_constructor): Check
11223         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
11225 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
11227         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
11228         Remove spurious information in comment. Allow further
11229         adjustments of REFERENCE_TYPE args.
11231 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
11233         * errfn.c (cp_deprecated): Tweak diagnostic text.
11234         * parse.y (new_initializer): Deprecate initializer lists
11235         extension.
11237 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
11239         Remove old ABI support.
11241 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
11243         * decl2.c (flag_vtable_thunks): Always set it to 1.
11244         (flag_new_abi): Likewise.
11245         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
11247         * Makefile.in (g++spec.o): Fix typo.
11249 2001-02-09  Jason Merrill  <jason@redhat.com>
11251         * lang-specs.h: Restore definition of __EXCEPTIONS.
11253 2001-02-08  Jason Merrill  <jason@redhat.com>
11255         * search.c (shared_member_p): New function.
11256         (lookup_field_r): Use it.
11257         * cp-tree.h (SHARED_MEMBER_P): Remove.
11259         * method.c (process_overload_item): Handle template-dependent array
11260         bounds.
11261         * pt.c (type_unification_real): If we end up with undeduced nontype
11262         parms, try again.
11264         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
11265         types.
11267         * typeck2.c (friendly_abort): Don't say anything if we have
11268         earlier errors or sorries.
11270         * decl.c (check_tag_decl): Notice attempts to redefine bool and
11271         wchar_t.  Ignore if in_system_header.
11273         * decl.c (maybe_push_cleanup_level): New fn...
11274         (start_decl_1): ...split out from here.
11275         * cvt.c (build_up_reference): Use it.
11276         * cp-tree.h: Declare it.
11278 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
11280         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
11281         spec.
11283 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
11285         * pt.c (lookup_template_class): Make sure it's a primary
11286         template or template_template_parm when called from the parser.
11287         (instantiate_template_class): Add assertion.
11289 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
11291         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
11292         from error_mark_node.
11294 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
11296         Fix specification and implementation bugs in V3 ABI
11297         construction vtables.
11298         * cp-tree.h (flag_dump_class_layout): New flag.
11299         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
11300         (BINFO_LOST_PRIMARY_P): New flag.
11301         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
11302         (BINFO_PRIMARY_MARKED_P): Rename to ...
11303         (BINFO_PRIMARY_P): ... here.
11304         (binfo_via_virtual): New prototype.
11305         * decl2.c (flag_dump_class_layout): New flag.
11306         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
11307         use `=' as a file name separator.
11308         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
11309         bases.
11310         (build_vtbl_address): If this is a virtual primary base, then
11311         get the vtbl of what it is ultimately primary for.
11312         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
11313         for BINFO_PRIMARY_P.
11314         (dfs_skip_nonprimary_vbases_markedp): Likewise.
11315         (get_shared_vbase_if_not_primary): Likewise.
11316         (dfs_get_pure_virtuals): Likewise.
11317         (expand_upcast_fixups): Likewise.
11318         (fixup_virtual_upcast_offsets): Likewise.
11319         (dfs_find_vbase_instance): Likewise.
11320         (find_vbase_instance): Likewise.
11321         (binfo_from_vbase): Adjust comment to reflect reality.
11322         (binfo_via_virtual): New function.
11323         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
11324         for binfo walking during VTT construction.
11325         (dfs_mark_primary_bases): Remove.
11326         (force_canonical_binfo_r): New function.
11327         (force_canonical_binfo): New function.
11328         (mark_primary_virtual_base): New function.
11329         (mark_primary_bases): Walk in inheritance graph order, use
11330         mark_primary_virtual_base.
11331         (determine_primary_base): Use some more intermediate variables.
11332         (dfs_find_final_overrider): Don't check for overriding along a
11333         virtual path.
11334         (dfs_modify_vtables): Walk into primary virtual bases too.
11335         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
11336         (build_base_fields): Likewise.
11337         (dfs_set_offset_for_unshared_vbases): Likewise.
11338         (layout_virtual_bases): Likewise.
11339         (end_of_class): Likewise.
11340         (finish_struct_1): Call dump_class_hierarchy, if requested.
11341         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
11342         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
11343         (dump_class_hierarchy): Add file parameter. Append to file, if
11344         required.
11345         (finish_vtbls): Adjust accumulate_vtbl_inits call.
11346         Use canonical base for virtual bases.
11347         (build_vtt): Add more comments. Adjust build_vtt_inits call.
11348         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
11349         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
11350         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
11351         virtual VTTs.
11352         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
11353         from DATA.  We want virtual primary bases and all bases via virtual.
11354         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
11355         virtual base when not a construction vtable.
11356         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
11357         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
11358         Use canonical bases when processing virtual bases.
11359         (accumulate_vtbl_inits): We're interested in any base via a
11360         virtual path.
11361         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
11362         within a construction vtable, determine what is being overridden.
11363         (build_vtbl_initializer): Add more comments
11364         (add_vcall_offset_vtbl_entries_1): Adjust comment.
11365         (build_rtti_vtbl_entries): Check if the base has lost its
11366         primary.
11368 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
11370         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
11372 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11374         * decl.c (pushdecl): Call abort instead of fatal.
11375         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
11376         * init.c (build_new_1): Likewise.
11377         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
11378         * decl.c (build_typename_type): hash_table_init now returns void.
11379         decl.c (init_decl_processing): Make an error non-fatal.
11381 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
11383         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
11384         Document.
11385         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
11386         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
11387         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
11388         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
11389         * decl.c (maybe_commonize_var): Use the new name-mangling where
11390         appropriate.
11391         * decl2.c (comdat_linkage): Enhance comments.  Make all
11392         compiler-generated things static, if COMDAT is not available.
11393         (get_tinfo_decl): Do not make typeinfo objects that belong in the
11394         library COMDAT.
11395         (tinfo_base_init): Use the correct mangled name for typeinfo
11396         strings, and push them into the global scope.
11397         (typeinfo_in_lib_p): New function.
11398         (synthesize_tinfo_var): Use it.
11399         (create_real_tinfo_var): Likewise.
11401 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
11403         * decl.c (push_class_binding): Use context_for_name_lookup instead
11404         of CP_DECL_CONTEXT.
11405         * search.c (context_for_name_lookup): Remove static.  Check for NULL
11406         context in the loop.
11407         * cp-tree.h (context_for_name_lookup): Add prototype.
11409 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
11411         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
11412         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
11413         Remove.
11414         * call.c (convert_class_to_reference, build_user_type_conversion_1,
11415         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
11417 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
11419         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
11420         of macros used when compiling g++spec.c.
11421         * g++spec.c (lang_specific_driver): Link with the shared
11422         libgcc by default.
11424 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
11426         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
11427         make_reference_declarator, make_call_declarator), method.c
11428         (implicitly_declare_fn), parse.y (namespace_using_decl,
11429         notype_unqualified_id, expr_or_declarator, new_type_id,
11430         after_type_declarator, direct_after_type_declarator,
11431         notype_declarator, complex_notype_declarator,
11432         complex_direct_notype_declarator, qualified_id,
11433         notype_qualified_id, overqualified_id, direct_new_declarator,
11434         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
11435         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
11436         instead of build_parse_node.
11438 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11440         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
11441         (minus_one_node): Moved to top level gcc directory.  Renamed
11442         to integer_minus_one_node.
11444         * init.c (init_init_processing): Don't set minus_one_node.
11445         (build_vec_init): Use integer_minus_one_node.
11447         * rtti.c (get_tinfo_decl_dynamic): Likewise.
11449 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
11451         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
11452         identical and they would be replaced with constant, remove
11453         MODIFY_EXPR from the tree.
11455 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11457         * Make-lang.in: Remove all dependencies on defaults.h.
11458         * call.c: Don't include defaults.h.
11459         * decl.c: Likewise.
11460         * decl2.c: Likewise.
11461         * except.c: Likewise.
11462         * pt.c: Likewise.
11463         * rtti.c: Likewise.
11464         * tree.c: Likewise.
11465         * typeck.c: Likewise.
11467 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
11469         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
11470         operators even in "C" linkage.
11471         * method.c (set_mangled_name_for_decl): Likewise.
11472         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
11473         overloaded operators in "C" linkage.
11475 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
11477         * pt.c (tsubst_decl): Remove IN_DECL parameter.
11478         (tsubst_arg_types): Check parameter is not void.
11479         (tsubst): Adjust tsubst_decl call.
11481 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
11483         * call.c (add_builtin_candidate): Quote std properly, from
11484         previous change.
11486 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11488         * pt.c (check_explicit_specialization): Clone constructors and
11489         destructors.
11491 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
11493         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
11494         indicates anything special about template depth. Make sure we
11495         only count the user visible template classes.
11497 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
11499         * call.c (build_conv): Typo in comment.
11500         (add_builtin_candidate): Add more explanation.
11501         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
11502         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
11503         when we have enumeral types.
11504         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
11505         candidates for relops and eqops.
11506         (joust): Simplify control flow. Allow a non-template user
11507         function to hide a builtin.
11509 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
11511         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
11512         (more_specialized): Add deduction parameter.
11513         * call.c (joust): Adjust more_specialized call.
11514         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
11515         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
11516         (get_bindings_order): Remove.
11517         (get_bindings_real): Add DEDUCE parameter.
11518         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
11519         REFERENCE_TYPE jig for DEDUCE_ORDER.
11520         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
11521         maybe_adjust_types_for_deduction.
11522         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
11523         directly.
11524         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
11525         (check_cv_quals_for_unify): Use new unify qualifier flags.
11526         (unify): Clear new unify qualifier flags.
11527         (get_bindings_real): Add DEDUCE parameter.
11528         (get_bindings): Adjust call to get_bindings_real.
11529         (get_bindings_overload): Likewise.
11530         (most_specialized_instantiation): Adjust call to
11531         more_specialized.
11533 2001-01-19  Jason Merrill  <jason@redhat.com>
11535         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
11537         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
11538         -fnew-abi.
11540 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
11542         * decl2.c (arg_assoc_class): Fix double iteration logic.
11544 2001-01-19  Jason Merrill  <jason@redhat.com>
11546         * init.c (build_delete): Always call convert_force to strip cv-quals.
11548         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
11549         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
11550         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
11552 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
11554         * search.c (get_vbase_1): Count only virtual bases.
11556 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
11558         * class.c (duplicate_tag_error): Robustify flag clearing.
11560 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
11562         * cp-tree.h (lookup_template_class): Add complain parm.
11563         * decl.c (lookup_namespace_name): Adjust call to
11564         lookup_template_class.
11565         (make_typename_type): Likewise.
11566         * semantics.c (finish_template_type): Likewise.
11567         * pt.c (lookup_template_class): Add complain parm. Adjust.
11568         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
11569         (tsubst): Likewise.
11571 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
11573         * pt.c (copy_default_args_to_explicit_spec): Preserve
11574         object's CV quals. Reorganize.
11576 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
11578         * typeck.c (build_modify_expr): Say `initialization' for
11579         INIT_EXPRs.
11580         * init.c (build_default_init): Convert to enumeral type, if
11581         needed.
11583 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
11585         * parse.y (nomods_initdcl0): Properly set things up for
11586         initdcl0_innards.
11588 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
11590         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
11591         (type_unification_real): Set it.
11592         (unify): Use it.
11594 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
11596         * decl.c (finish_destructor_body): Convert to vbase pointer here.
11598 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
11600         * semantics.c (begin_class_definition): Check we're not inside a
11601         template parm list.
11603 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
11605         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
11606         BASELINK_P.
11608 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11610         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
11611         * call.c (build_over_call): Add comment.
11613 2001-01-16 Daniel Berlin <dberlin@redhat.com>
11615         * cvt.c (ocp_convert): Handle vector type conversion
11616         * typeck2.c (digest_init): Handle vector type initializations
11618 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
11620         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
11621           was given.
11623 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
11625         * pt.c (check_nontype_parm): Rename to ...
11626         (invalid_nontype_parm_type_p): ... here.
11627         (process_template_parm): Adjust.
11628         (convert_template_argument): Adjust.
11630 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
11632         * pt.c (check_nontype_parm): New function.
11633         (process_template_parm): Use it.
11634         (convert_template_argument): Use it.
11635         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
11636         member.
11638 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
11640         * tree.c: Add defaults.h
11641         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
11642         * Make-lang.in (cp/tree.o): Add defaults.h.
11644 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
11646         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
11648 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
11650         * g++.1: Change to be ".so man1/gcc.1".
11652 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
11654         * Make-lang.in (c++.info, c++.install-info): Build and install g++
11655         internals info.
11656         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
11657         ($(srcdir)/cp/g++int.info): New target.
11658         * gxxint.texi: Add info directory entry.  Use @@ in email address.
11659         * .cvsignore: Update.
11661 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
11663         * typeck.c (build_c_cast): Do template processing earlier.
11664         Always pedwarn on array casts.
11666 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
11668         * friend.c (make_friend_class): Make sure a templated class is
11669         actually a template.
11671 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
11673         * decl2.c (get_guard): Set linkage from guarded decl.
11675 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
11677         * call.c (convert_default_arg): Check for unprocessed
11678         DEFAULT_ARG.
11679         * cp-tree.h (replace_defarg): Move to spew.c.
11680         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
11681         spew.c, which is where they really are.
11682         (done_pending_defargs): Declare.
11683         (unprocessed_defarg_fn): Declare.
11684         * decl.c (replace_defarg): Move to spew.c
11685         * parse.y (structsp): Call done_pending_defargs.
11686         * spew.c (defarg_fns): Rearrange list structure.
11687         (defarg_fnsdone): New static variable.
11688         (defarg_depfns): New static variable.
11689         (init_spew): Adjust.
11690         (add_defarg_fn): Store the type in TREE_TYPE.
11691         (do_pending_defargs): Detect and deal with ordering constraints
11692         and circularity.
11693         (done_pending_defargs): New function.
11694         (unprocessed_defarg_fn): New function.
11695         (replace_defarg): Moved from decl.c. Robustify. Don't save
11696         if circularity detected.
11698 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
11700         * pt.c (unify): Check array has a domain, before checking
11701         whether it is variable sized.
11703 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
11705         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
11706         parameters with pointers to arrays of unknown bound.
11708 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
11710         * parse.y (template_parm_header, template_spec_header): New
11711         reductions. Split out from ...
11712         (template_header): ... here. Use them.
11713         (template_template_parm): Use template_parm_header.
11714         * semantics.c (finish_template_template_parm): Add assert.
11716 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
11718         * mangle.c (write_builtin_type): Fix thinko.
11720         * pt.c (copy_default_args_to_explicit_spec_1): New function.
11721         (copy_default_args_to_explicit_spec): Likewise.
11722         (check_explicit_specialization): Use it.
11724         * class.c (finish_struct_1):  Remove last argument in call to
11725         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
11726         * decl.c (builtin_function): Likewise.
11727         (build_cp_library_fn): Likewise.
11728         (check_initializer): Likewise.
11729         (make_rtl_for_nonlocal_decl): Likewise.
11730         (cp_finish_decl): Likewise.
11731         (start_function): Likewise.
11732         * decl2.c (finish_anon_union): Likewise.
11733         * friend.c (do_friend): Likewise.
11734         * init.c (build_java_class_ref): Likewise.
11735         * method.c (make_thunk): Likewise.
11736         * pt.c (tsubst_friend_function): Likewise.
11737         * semantics.c (expand_body): Likewise.
11739 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
11741         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
11742         looking at DECL_CLONED_FUNCTION for non-functions.
11744 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
11746         * error.c (dump_template_parameter): Use parm to determine how
11747         to print default value.
11749 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
11751         * class.c (duplicate_tag_error): Clear more flags.
11753 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
11755         * call.c (build_new_method_call): Use binfo_for_vbase.
11757 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
11759         * cp-tree.h (flag_cond_mismatch): Don't declare.
11760         * decl2.c (flag_cond_mismatch): Don't define.
11761         (lang_f_options): Remove cond-mismatch.
11762         (unsupported_options): Add cond-mismatch.
11764 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
11766         * class.c (handle_using_decl): Reject using of constructor name
11767         of sourcing class. Allow injecting of a method with same name as
11768         nested class. Fixup error messages.
11770 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
11772         * decl2.c (lang_decode_option): Handle -Wformat=2.
11774 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
11776         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
11777         initialized_in_class.
11778         (DECL_DEFINED_IN_CLASS_P): Rename to ...
11779         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
11780         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
11781         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
11782         * pt.c (check_default_tmpl_args): Adjust for
11783         DECL_INITIALIZED_IN_CLASS_P.
11784         (instantiate_class_template): Likewise.
11785         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
11787         * class.c (finish_struct): Constify saved_filename.
11789 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
11791         * class.c (duplicate_tag_error): Adjust diagnostic.
11792         (finish_struct): Locally set location to start of struct.
11793         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
11795 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
11797         * decl.c (struct binding_level): Adjust class_shadowed comments
11798         to reflect reality.
11799         (push_class_level_binding): Adjust comments to reflect reality.
11800         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
11801         Don't set TREE_VALUE on the class_shadowed list.
11803 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11805         * decl2.c (acceptable_java_type): Allow references too.
11806         * init.c (build_java_class_ref): When using the new ABI, search
11807         `class$' and have it mangled with `mangle_decl.'
11808         * mangle.c (write_java_integer_type_codes): New function.
11809         (write_builtin_type): Detect and mangle Java integer and real
11810         types.
11812 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
11814         * decl2.c (grokfield): Don't accept `asm' specifiers for
11815         non-static data members.
11817 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11819         * expr.c (cplus_expand_expr): Don't reset `target'.
11821 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
11823         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
11825 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
11827         * parse.y (template_datadef): Check for error_mark_node.
11829 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
11831         * cp-tree.def (DEFAULT_ARG): Make `x' class.
11833 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
11835         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
11836         (record_builtin_type): Make non-static.
11837         (flag_short_double): Don't declare.
11838         (init_decl_processing): Remove the creation of many tree nodes now
11839         in c_common_nodes_and_builtins.
11840         (build_void_list_node): New function.
11841         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
11842         * cp-tree.h (flag_short_wchar): Don't declare.
11844 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
11846         * call.c (build_conv): Don't use build1 for USER_CONV.
11847         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
11849 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
11851         * lex.c (lang_init): Call c_common_lang_init.
11853 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
11855         * search.c (lookup_fnfields_here): Remove.
11856         (look_for_overrides_r): Use lookup_fnfields_1.
11857         Ignore functions from using declarations.
11859 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
11861         Implement exceptions specifiers for implicit member functions.
11862         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
11863         * method.c (synthesize_exception_spec): New function.
11864         (locate_dtor, locate_ctor, locate_copy): New functions.
11865         (implicitly_declare_fn): Generate the exception spec too.
11866         * search.c (check_final_overrider): Check artificial functions
11867         too.
11868         * typeck2.c (merge_exception_specifiers): New function.
11870 2001-01-03  Jason Merrill  <jason@redhat.com>
11872         * init.c (build_default_init): New fn.
11873         (perform_member_init): Split out from here.
11874         (build_new_1): Use it.  Simplify initialization logic.
11875         (build_vec_init): Take an array, rather than a pointer and maxindex.
11876         Speed up simple initializations.  Don't clean up if we're assigning.
11877         * cp-tree.h: Adjust.
11878         * decl2.c (do_static_initialization): Remove TREE_VEC case.
11879         * parse.y (new_initializer): Return void_zero_node for ().
11880         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
11881         * typeck2.c (digest_init): Only complain about user-written
11882         CONSTRUCTORs.
11884 2000-12-22  Mike Stump  <mrs@wrs.com>
11886         * decl2.c: (max_tinst_depth): Increase to 50.
11888 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
11890         * class.c (invalidate_class_lookup_cache): Zero the
11891         previous_class_values.
11892         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
11893         TREE_INT_CST_HIGH.
11894         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
11895         * decl.c (free_bindings): New variable.
11896         (push_binding): Don't create a new binding if we have one on the
11897         free list.
11898         (pop_binding): Put old bindings on the free list.
11899         (init_decl_processing): Use size_int, not build_int_2.
11900         Register free_bindings as a GC root.
11901         (cp_make_fname_decl): Use size_int, not build_int_2.
11902         (push_inline_template_parms_recursive): Likewise.
11903         (end_template_parm_list): Likewise.
11904         (for_each_template_parm): Do not use walk_tree_without_duplicates.
11905         (tsubst_template_parms): Use size_int, not build_int_2.
11906         (tsubst): Likewise.
11907         * rtti.c (get_vmi_pseudo_type_info): Likewise.
11909 2001-01-02  Richard Henderson  <rth@redhat.com>
11911         * parse.y (asm): Set ASM_INPUT_P.
11913 2001-01-02  Jason Merrill  <jason@redhat.com>
11915         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
11916         for v3 ABI.
11918         * typeck.c (cp_truthvalue_conversion): New fn.
11919         * cvt.c (ocp_convert): Use it.
11921         * cp-tree.h: Lose c-common.c decls.
11923         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
11924         * cvt.c (convert_to_void): Use type_unknown_p.
11926         * typeck.c (strip_all_pointer_quals): Also strip quals from
11927         pointer-to-member types.
11929         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
11930         parse.y as C.
11932         * call.c (build_new_method_call): Do evaluate the object parameter
11933         when accessing a static member.
11934         * typeck.c (build_component_ref): Likewise.
11936 2001-01-02  Andreas Jaeger  <aj@suse.de>
11938         * decl.c (cp_missing_noreturn_ok_p): New.
11939         (init_decl_processing): Set lang_missing_noreturn_ok_p.
11941 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
11943         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
11945 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
11947         * class.c (pushclass): Remove #if 0'd code.
11948         * cp-tree.h (overload_template_name): Remove.
11949         * decl.c (store_bindings): Simplify.
11950         (pop_from_top_level): Likewise.
11951         * pt.c (overload_template_name): Remove.
11952         (instantiate_decl): Don't call push_to_top_level if it's not
11953         needed.
11955 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
11957         * pt.c (register_local_specialization): Don't return a value.
11958         (lookup_template_class): Use move-to-front heuristic when looking
11959         up template instantiations.
11960         (instantiate_decl): Only push_to_top_level when we're actually
11961         going to instantiate the template.
11963 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
11965         * search.c (binfo_for_vtable): Return least derived class, not
11966         most.  Handle secondary vtables.
11968 2000-12-22  Jason Merrill  <jason@redhat.com>
11970         * pt.c (more_specialized): Don't optimize len==0.
11971         (fn_type_unification): If we're adding the return type, increase len.
11973         * typeck.c (build_binary_op): Fix pmf comparison logic.
11975         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
11976         DECL_STATIC_FUNCTION_P.
11978         * semantics.c (genrtl_finish_function): Don't try to jump to
11979         return_label unless it exists.
11981         In partial ordering for a call, ignore parms for which we don't have
11982         a real argument.
11983         * call.c (joust): Pass len to more_specialized.
11984         (add_template_candidate_real): Strip 'this', pass len.
11985         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
11986         (get_bindings_order): New fn.  Pass len down.
11987         (get_bindings_real): Strip 'this', pass len.
11988         (fn_type_unification): Likewise.
11989         (type_unification_real): Succeed after checking 'len' args.
11990         (most_specialized_instantiation): Lose explicit_args parm.
11991         * class.c (resolve_address_of_overloaded_function): Strip 'this',
11992         pass len.
11994 2000-12-21  Jason Merrill  <jason@redhat.com>
11996         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
11997         DECL_TEMPLATE_RESULT.
11999         * search.c (lookup_field_r): Call lookup_fnfields_1, not
12000         lookup_fnfields_here.
12002         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
12004         * call.c (build_object_call): Also allow conversions that return
12005         reference to pointer to function.
12006         (add_conv_candidate): Handle totype being ref to ptr to fn.
12007         (build_field_call): Also allow members of type reference to function.
12008         Lose support for calling pointer to METHOD_TYPE fields.
12010         * error.c (dump_expr): Handle *_CAST_EXPR.
12012         * typeck2.c (build_scoped_ref): Always convert to the naming class.
12014         * tree.c (break_out_cleanups): Lose.
12015         * cp-tree.h: Remove prototype.
12016         * typeck.c (build_component_ref): Don't break_out_cleanups.
12017         (build_compound_expr): Likewise.
12018         * semantics.c (finish_expr_stmt): Likewise.
12020 2000-12-20  Richard Henderson  <rth@redhat.com>
12022         * cp-tree.h: Update declarations.
12023         * decl.c (finish_case_label): Return the new stmt node.
12024         * semantics.c (finish_goto_stmt): Likewise.
12025         (finish_expr_stmt, finish_return_stmt): Likewise.
12026         (finish_break_stmt, finish_continue_stmt): Likewise.
12027         (finish_asm_stmt): Likewise.
12028         * parse.y (already_scoped_stmt): Set STMT_LINENO.
12029         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
12030         (simple_if, simple_stmt): Return the new stmt node.
12031         (save_lineno): New.
12033 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
12035         * cp-tree.h: Don't declare warn_long_long.
12037 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12039         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
12040         IS_AGGR_TYPE.
12042 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12044         * pt.c (unify): Handle when both ARG and PARM are
12045         BOUND_TEMPLATE_TEMPLATE_PARM.
12047 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12049         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
12050         DECL_TEMPLATE_PARM_P.
12052 2000-12-15  Jason Merrill  <jason@redhat.com>
12054         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
12056         * init.c (build_new_1): Don't strip quals from type.
12058         * decl.c (pushdecl): Don't check for linkage on a non-decl.
12060         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
12062         * call.c (build_new_function_call): Lose space before paren in
12063         error message.
12064         (build_new_method_call): Likewise.
12066         * typeck2.c (build_m_component_ref): Propagate quals from datum.
12068 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12070         * pt.c (check_explicit_specialization): Propagate default
12071         function arguments to explicit specializations.
12073 2000-12-13  DJ Delorie  <dj@redhat.com>
12075         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
12076         and <? operators.
12078 2000-12-08  Jason Merrill  <jason@redhat.com>
12080         * error.c (dump_function_name): Don't let the user see __comp_ctor.
12082         Clean up copy-initialization in overloading code.
12083         * call.c (build_user_type_conversion_1): Die if we are asked to
12084         convert to the same or a base type.
12085         (implicit_conversion): Avoid doing so.  Lose reference binding code.
12086         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
12087         direct-initialization.  Also do direct-init part of copy-init.
12088         (build_user_type_conversion): Don't provide context to convert_like.
12089         * cvt.c (ocp_convert): build_user_type_conversion will now provide
12090         the constructor call for copy-init.
12092         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
12093         instantiation of a member template.
12094         (do_decl_instantiation): Not here.
12096 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
12098         * class.c (check_field_decls): Don't special case anonymous
12099         fields in error messages.
12100         (note_name_declared_in_class): Use %D on diagnostic.
12102         * tree.c (pod_type_p): Use strip_array_types.
12103         (cp_valid_lang_attribute): Likewise.
12104         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
12105         multiple evaluations.
12106         (cp_has_mutable_p): Use strip_array_types.
12108 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
12110         * cp-tree.h (sufficient_parms_p): Declare new function.
12111         * call.c (sufficient_parms_p): New function, broken out of ...
12112         (add_function_candidate): ... here. Use it.
12113         (add_conv_candidate): Use it.
12114         * decl.c (grok_ctor_properties): Use it.
12116 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
12118         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
12120 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
12122         * decl2.c (lang_decode_option): Handle -Wformat-security.
12124 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12126         * pt.c (verify_class_unification): New function.
12127         (get_class_bindings): Use it.
12128         (try_class_unification): Tidy.
12129         (unify): Handle when argument of a template-id is not
12130         template parameter dependent.
12131         (template_args_equal): Handle when TREE_CODE's do not match.
12133 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
12135         * lang-specs.h (c++): When invoking the stand-alone preprocessor
12136         for -save-temps, pass all relevant -Defines to it, and then don't
12137         pass them to cc1plus.
12139 2000-12-05  Will Cohen  <wcohen@redhat.com>
12141         * decl.c (finish_case_label): Cleared
12142         more_cleanups_ok in surrounding function scopes.
12143         (define_label): Likewise.
12145 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
12147         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
12148         (get_matching_virtual): Remove.
12149         (look_for_overrides): Declare new function.
12150         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
12151         DECL_VINDEX here.
12152         * class.c (check_for_override): Move base class iteration code
12153         to look_for_overrides.
12154         * search.c (next_baselink): Remove.
12155         (get_virtuals_named_this): Remove.
12156         (get_virtual_destructor): Remove.
12157         (tree_has_any_destructors_p): Remove.
12158         (struct gvnt_info): Remove.
12159         (check_final_overrider): Remove `virtual' from error messages.
12160         (get_matching_virtuals): Remove. Move functionality to ...
12161         (look_for_overrides): ... here, and ...
12162         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
12163         to be overriding.
12165 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
12167         * typeck.c (get_delta_difference): If via a virtual base,
12168         return zero.
12169         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
12170         adjustment.
12172 2000-12-04  Richard Henderson  <rth@redhat.com>
12174         * error.c (dump_tree): Use output_add_string not OB_PUTS.
12176 2000-12-04  Jason Merrill  <jason@redhat.com>
12178         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
12179         (write_builtin_type): Pass intSI_type_node and the like through
12180         type_for_mode.
12181         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
12182         Pass intSI_type_node and the like through type_for_mode.
12183         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
12184         * pt.c (tsubst, unify): Likewise.
12185         * tree.c (walk_tree): Likewise.
12186         * error.c (dump_type): Likewise.
12187         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
12189         * Make-lang.in: Tweak top comment for emacs.
12190         (cp/TAGS): Restore.
12192         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
12194         * class.c (clone_function_decl): Robustify.
12196 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
12198         * decl.c (store_bindings): Only search in the non modified
12199         old_bindings for duplicates.
12201 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
12203         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
12204         TYPE_POLYMORPHIC_P.
12206         * typeck.c (build_static_cast): Remove unused variable.
12208 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12210         * pt.c: Fix typo in comment.
12212 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
12214         * decl2.c (warn_format): Remove definition.
12215         (lang_decode_option): Handle -Wformat-nonliteral,
12216         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
12218 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
12220         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
12221         (init_decl_processing): Don't create string_type_node,
12222         const_string_type_node, wint_type_node, intmax_type_node,
12223         uintmax_type_node, default_function_type, ptrdiff_type_node and
12224         unsigned_ptrdiff_type_node.  Adjust position of call to
12225         c_common_nodes_and_builtins.
12226         (identifier_global_value): New function.
12228 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
12230         * call.c (standard_conversion): Reject pointer to member
12231         conversions from ambiguous, inaccessible or virtual bases.
12232         * typeck.c (build_static_cast): Don't check pointers to members
12233         specially.
12235 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
12237         * method.c (do_build_copy_constructor): Preserve cv
12238         qualifications when accessing source object members.
12239         (do_build_assign_ref): Likewise. Remove separate diagnostics for
12240         unnamed fields.
12242 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
12244         * method.c (do_build_assign_ref): Construct appropriately
12245         CV-qualified base reference. Don't allow const casts in base
12246         conversion.
12248 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
12250         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
12251         incomplete return type.
12253 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
12255         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
12256         * semantics.c (finish_base_specifier): Accept a _TYPE not a
12257         _DECL.
12259 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
12261         * spew.c (yyerror): Cope if yylval.ttype is NULL.
12263 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
12265         * decl.c (grokdeclarator): Diagnose undefined template contexts.
12267 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
12269         * decl.c (grokdeclarator): Do type access control on friend
12270         class.
12272 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
12274         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
12275         bison parser ickiness.
12276         * pt.c (tsubst_friend_function): Enter namespace scope when
12277         tsubsting the function name.
12278         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
12280 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
12282         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
12283         * cvt.c (cp_convert_to_pointer): Add force parameter.
12284         Allow conversions via virtual base if forced.
12285         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
12286         (ocp_convert): Likewise.
12287         * search.c (binfo_from_vbase): Return the virtual base's binfo.
12288         * typeck.c (get_delta_difference): Adjust handling of virtual
12289         bases.
12291 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
12293         * tree.c (struct list_hash): Remove.
12294         (list_hash_table): Make it be an htab.
12295         (struct list_proxy): New type.
12296         (list_hash_eq): New function.
12297         (list_hash_pieces): Renamed from ...
12298         (list_hash): ... this.
12299         (list_hash_lookup): Remove.
12300         (list_hash_add): Remove.
12301         (hash_tree_cons): Use the generic hashtable.
12302         (mark_list_hash): Remove.
12303         (init_tree): Create the hashtable.
12305 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
12307         * method.c (build_mangled_C9x_name): Rename to
12308         build_mangled_C99_name.  Change C9X references in comments to
12309         refer to C99.
12311 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
12313         * parse.y (unary_expr): Move VA_ARG from here ...
12314         (primary): ... to here.
12316 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
12318         * semantics.c (finish_id_expr): If type is error_mark, return
12319         error_mark.
12321 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
12323         * pt.c (lookup_template_class): Simplify loop exit constructs.
12324         Cope when there is no partial instantiation of a template
12325         template member.
12327 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
12329         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
12331 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
12333         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
12334         prefix.
12336         * pt.c (do_decl_instantiate): Explicitly clone constructors and
12337         destructors that haven't already been cloned.
12339 2000-11-20  Richard Henderson  <rth@redhat.com>
12341         * parse.y (yyparse_1): Rename the parser entry point.
12343 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
12345         * mangle.c (write_name): Use <unscoped-name> for names directly in
12346         function scope.
12347         (write_unscoped_name): Accept names directly in function scope.
12349 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
12351         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
12352         * parse.y (extdef): Add EXPORT reduction.
12353         * spew.c (yylex): Don't skip export here.
12355 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
12357         * decl.c (init_decl_processing): Correct name of pure virtual
12358         function under the new ABI.
12359         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
12360         (throw_bad_typeid): Likewise for bad typeid function.
12362 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
12364         * decl.c (grokparms): Don't even function types of `void' type,
12365         either.
12366         * mangle.c (write_type): Don't crash when confronted with the
12367         error_mark_node.
12369         * decl.c (grokparms): Don't create parameters of `void' type.
12371 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
12373         * lex.c (mark_impl_file_chain): Delete.
12374         (init_parse): Remove call to ggc_add_string_root.  No need to
12375         ggc_strdup a string constant.  Do not add impl_file_chain to GC
12376         roots.
12377         (handle_pragma_implementation): No need to ggc_strdup main_filename.
12379 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
12381         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
12383 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
12385         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
12386         * decl.c (grokdeclarator): Don't reject void parms here.
12387         (require_complete_types_for_parms): Simplify, use
12388         complete_type_or_else.
12389         (grokparms): Remove bitrot. Remove funcdef parm.
12390         Deal with ellipsis parm lists here.
12391         * semantics.c (finish_parmlist): Don't append void_list_node
12392         here. Set PARMLIST_ELLIPSIS_P.
12394 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
12396         * typeck2.c (incomplete_type_error): Reorganize to avoid
12397         excessive diagnostics.
12399 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
12401         * lex.c (struct impl_files, internal_filename): Constify a char *.
12403 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
12405         * mangle.c (write_special_name_constructor): Don't generate
12406         assembler junk when confronted with an old-style constructor.
12407         (write_special_name_destructor): Likewise.
12408         (mangle_decl_string): Do it here instead.
12410 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
12412         * call.c (op_error): Make error messages clearer.
12414 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
12416         * decl.c (wrapup_globals_for_namespace): Don't mark things
12417         TREE_ASM_WRITTEN when they're not.
12419 2000-11-15  Jason Merrill  <jason@redhat.com>
12421         * typeck2.c (friendly_abort): Uncount the error before handing
12422         off to fancy_abort.
12424 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
12426         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
12428 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
12430         * class.c (build_vtbl_initializer): Fix typo in comment.
12431         * typeck.c (expr_sizeof): Don't crash on errors.
12433 2000-11-14  Jim Wilson  <wilson@redhat.com>
12435         * lang-specs.h: Add %2 after %(cc1_options).
12437 2000-11-14  Richard Henderson  <rth@redhat.com>
12439         * typeck.c (c_sizeof): Be strict about casting result value
12440         back to c_size_type_node.
12441         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
12443 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12445         * typeck.c (build_unary_op): Use boolean_increment from
12446         c-common.c, moving the relevant code there.
12448 2000-11-11  Jason Merrill  <jason@redhat.com>
12450         * typeck.c (mark_addressable): Don't call put_var_into_stack.
12452         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
12453         in inlines.
12455 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12457         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
12458         * lex.c (copy_lang_decl): Likewise.
12460 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
12462         * dump.c (cp_dump_tree): Don't dump function bodies here.
12464         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
12465         (dump.o): Update dependency list.
12466         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
12467         (flag_dump_translation_unit): Likewise.
12468         (CP_TYPE_QUALS): Adjust definition.
12469         (DECL_C_BIT_FIELD): Remove.
12470         (SET_DECL_C_BIT_FIELD): Likewise.
12471         (CLEAR_DECL_C_BIT_FIELD): Likewise.
12472         (add_maybe_template): Likewise.
12473         (strip_array_types): Likewise.
12474         (dump_node_to_file): Likewise.
12475         (cp_dump_tree): New function.
12476         * decl.c (init_decl_processing): Set lang_dump_tree.
12477         * decl2.c (flag_dump_translation_unit): Remove.
12478         * dump.c: Move most of it to ../c-dump.c.
12479         (cp_dump_tree): New function.
12480         * pt.c (add_maybe_template): Remove.
12481         * typeck.c (strip_array_types): Likewise.
12483 2000-11-07  Eric Christopher  <echristo@redhat.com>
12485         * decl.c (init_decl_processing): Change definition of
12486         __wchar_t to wchar_t.  Remove artificial declaration of
12487         wchar_t.
12488         * lex.c: Change instances of __wchar_t to wchar_t.
12490 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
12492         * lex.c (do_identifier): Don't lookup_name for operators.
12493         * parse.y (operator): Save looking_for_typename.
12494         (unoperator): Restore it.
12495         * spew.c (frob_opname): Use nth_token for lookahead.
12497 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
12499         * decl.c (grok_op_properties): Always use coerce_new_type and
12500         coerce_delete_type.
12501         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
12502         exception specification. Tidy up.
12503         (coerce_delete_type): Preserve exception specification. Tidy up.
12505 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
12507         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
12508         (push_binding_level), error.c (cp_tree_printer), pt.c
12509         (process_partial_specialization, tsubst_template_arg_vector),
12510         search.c (lookup_member): Use memset () instead of bzero ().
12512 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
12514         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
12516 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
12518         * Make-lang.in (c++.distdir): Remove.
12520 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
12522         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
12523         declarations from different namespaces to be combined.
12525 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
12527         * decl.c: Include tm_p.h.
12529 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
12531         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
12533 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
12535         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
12536         (build_overload_value), repo.c (open_repo_file), xref.c
12537         (open_xref_file): Use strchr () and strrchr () instead of index ()
12538         and rindex ().
12540 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
12542         * call.c (build_over_call): Call fold on the CALL_EXPR.
12544 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
12546         * error.c (dump_template_decl): Separate template hearders with
12547         space not comma.
12549 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
12551         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
12552         TS_* flags with corresponding TFF_*.  Adjust prototypes of
12553         functions (which used to take a tree_string_flags) to take an int.
12555         * cp-tree.h (enum tree_string_flags): Remove
12556         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
12557         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
12558         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
12559         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
12560         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
12561         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
12562         (type_as_string, decl_as_string, expr_as_string,
12563         context_as_string): Adjust prototype.
12565         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
12566         instead of TS_PLAIN.
12568         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
12569         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
12570         plain `0'.
12572 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
12574         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
12575         (linkage_kind): New enumeration.
12576         (decl_linkage): New function.
12577         * decl2.c (comdat_linkage): Extend comment.
12578         * error.c (dump_function_decl): Print the arguments used to
12579         instantiate a template, even when not printing the type of the
12580         function.
12581         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
12582         not TREE_PUBLIC, to test for external linkage.
12583         * tree.c (decl_linkage): New function.
12585 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
12587         * pt.c (instantiate_decl): Always instantiate static data members
12588         initialized in-class.
12590 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
12592         * Make-lang.in: Move all build rules here from Makefile.in,
12593         adapt to new context.  Wrap all rules that change the current
12594         directory in parentheses.  Expunge all references to $(P).
12595         When one command depends on another and they're run all at
12596         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
12597         all object-file generation rules.  Delete obsolete variables.
12599         * Makefile.in: Delete.
12600         * config-lang.in: Delete outputs= line.
12602 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
12604         * error.c (dump_function_decl): Print no space between
12605         `ptr-operator' the `type-specifier' of the return type.
12606         (dump_type_prefix): Make sure we put space at the appropriate
12607         place.
12609 2000-10-23  Jason Merrill  <jason@redhat.com>
12611         * call.c (equal_functions): Also call decls_match for extern "C" fns.
12613 2000-10-22  Jason Merrill  <jason@redhat.com>
12615         * call.c (build_conditional_expr): Use ocp_convert to force
12616         rvalue conversion.
12618 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
12620         * call.c (standard_conversion): Use RVALUE_CONVs for all
12621         expressions that satisfy lvalue_p, not just those that satisfy
12622         real_lvalue_p.
12624         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
12626         * typeck.c (c_sizeof): Return an expression of `size_t' type,
12627         not one with TYPE_IS_SIZETYPE set.
12628         (dubious_conversion_warnings): Remove special-case code.
12630 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
12632         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
12633         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
12634         (dump_type_prefix): Print vector-of-int as 'int vector'.
12635         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
12636         * tree.c (walk_tree): Handle VECTOR_TYPE.
12638         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
12640 2000-10-21  Jason Merrill  <jason@redhat.com>
12642         * parse.y (operator): Set got_object from got_scope.
12643         Set looking_for_typename.
12644         * decl.c (lookup_name_real): Clear val after setting from_obj.
12645         Reorganize diagnostic.
12647 2000-10-20  Jason Merrill  <jason@redhat.com>
12649         * tree.c (walk_tree): Don't walk into default args.
12651         * error.c (dump_expr): Use host_integerp.
12653 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
12655         * typeck2.c (abstract_virtuals_error): Use "because" instead of
12656         "since" in error message.
12658 2000-10-20  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12660         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
12662 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
12664         * decl.c (revert_static_member_fn): Fixed typo.
12666 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
12668         * class.c (subobject_offset_fn): New type.
12669         (dfs_record_base_offsets): Remove.
12670         (record_base_offsets): Likewise.
12671         (dfs_search_base_offsets): Likewise.
12672         (record_subobject_offset): New function.
12673         (check_subobject_offset): Likewise.
12674         (walk_subobject_offsets): Likewise.
12675         (record_subobject_offsets): Likewise.
12676         (layout_conflict_p): Reimplement.
12677         (layout_nonempty_base_or_field): Correct handling of type
12678         conflicts during layout.
12679         (layout_empty_base): Likewise.
12680         (build_base_field): Adjust to handle new representation of empty
12681         base offset table.
12682         (build_base_fields): Likewise.
12683         (layout_virtual_bases): Likewise.
12684         (splay_tree_compare_integer_csts): New function.
12685         (layout_class_type): Use a splay_tree, rather than a varray, to
12686         represent the offsets of empty bases.
12688         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
12689         * decl.c (select_decl): Don't return declarations that are
12690         DECL_ANTICIPATED.
12692 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
12694         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
12695         (fake_std_node): New macro.
12696         * decl.c (in_std): Rename to ...
12697         (in_fake_std): ... this.
12698         (flag_no_builtin): Remove.
12699         (flag_no_nonansi_builtin): Likewise.
12700         (walk_namespaces_r): Use fake_std_node.
12701         (push_namespace): Use std_identifier.
12702         (pop_namespace): Use in_fake_std.
12703         (lookup_name_real): Use fake_std_node.
12704         (init_decl_processing): When -fhonor-std, create the `std'
12705         namespace.  Don't create a dummy fake_std_node in that case.
12706         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
12707         (builtin_function): Put builtins whose names don't begin
12708         with `_' in the std namespace.
12709         * decl2.c (flag_no_builtin): Remove.
12710         (flag_no_nonansi_builtin): Likewise.
12711         (set_decl_namespace): Use fake_std_node.
12712         (validate_nonmember_using_decl): Likewise.
12713         (do_using_directive): Likewise.
12714         (handle_class_head): Likewise.
12715         * dump.c (dequeue_and_dump): Likewise.
12716         * except.c (init_exception_processing): Use std_identifier.
12717         * init.c (build_member_call): Use fake_std_node.
12718         * rtti.c (init_rtti_processing): Use std_identifier.
12720 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
12722         * cp-tree.h (back_end_hook): Remove declaration.
12723         * decl2.c (back_end_hook): Remove definition.
12725         * dump.c (dequeue_and_dump): Dump TREE_USED.
12727 2000-10-17  Brad Lucier <lucier@math.purdue.edu>
12729         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
12731 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
12733         * decl.c (WINT_TYPE): Define.
12734         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
12735         c_size_type_node, signed_size_type_node and wint_type_node.
12737 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
12739         * decl2.c (warn_missing_format_attribute): New variable.
12740         (lang_decode_option): Decode -Wmissing-format-attribute.
12742 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
12744         * typeck.c (qualify_type): Remove.
12745         (composite_pointer_type): Fix handling of conversions to `cv void*'.
12747 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12749         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
12751 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12753         * Makefile.in (parse.c, parse.h): Create atomically.
12755 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
12757         * class.c (current_obstack): Remove.
12758         * decl.c (ggc_p): Remove.
12759         (start_decl): Don't use decl_tree_cons.
12760         (grokdeclarator): Don't use build_decl_list.
12761         (start_function): Don't use decl_tree_cons.
12762         (finish_function): Don't mess with obstacks.
12763         * decl2.c (grok_x_components): Don't use build_decl_list.
12764         * lex.c (make_call_declarator): Don't call decl_tree_cons.
12765         (implicitly_declare_fn): Don't call build_decl_list.
12766         * parse.y (frob_specs): Don't call build_decl_list or
12767         decl_tree_cons.
12768         (expr_or_declarator_intern): Don't call decl_tree_cons.
12769         (primary): Don't call build_decl_list.
12770         (fcast_or_absdcl): Likewise.
12771         (typed_declspecs): Don't call decl_tree_cons.
12772         (reserved_declspecs): Don't call build_decl_list.
12773         (declmods): Likewise.
12774         (reserved_typespecquals): Likewise.
12775         (aggr): Likewise.
12776         (new_type_id): Likewise.
12777         (cv_qualifiers): Likewise.
12778         (after_type_declarator_intern): Likewise.
12779         (notype_declarator_intern): Likewise.
12780         (absdcl_intern): Likewise.
12781         (named_parm): Likewise.
12782         * pt.c (most_specialized_class): Likewise.
12783         * repo.c (temporary_obstack): Make it a structure, not a pointer.
12784         (init_repo): Initialize it.
12785         * search.c (current_obstack): Remove.
12786         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
12788 2000-10-09  Richard Henderson  <rth@cygnus.com>
12790         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
12791         (c++ language support bits for libgcc): Remove.
12792         (c++.clean): Remove cplib2.txt cleanup.
12793         * config-lang.in (headers, lib2funcs): Remove.
12795         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
12796         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
12797         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
12798         * inc/new.h, inc/typeinfo: Remove files.
12800 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
12802         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
12803         defined.
12804         (init_decl_processing): Initialize intmax_type_node and
12805         uintmax_type_node.
12807 2000-10-06  Richard Henderson  <rth@cygnus.com>
12809         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
12810         (original_result_rtx): Remove.
12811         * decl.c (save_function_data): Don't clear x_result_rtx.
12812         (mark_lang_function): Don't mark it either.
12813         * expr.c (fixup_result_decl): Remove.
12814         * semantics.c (genrtl_named_return_value): Frob the return decl
12815         before calling emit_local_var.
12816         (genrtl_finish_function): Don't call fixup_result_decl.
12817         Always emit the jump to return_label.
12819 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
12821         * pt.c (lookup_template_class): Set current access for enum.
12822         (tsubst_enum): Set file & line for enum decl.
12824         * spew.c (yylex): Remove unused variable.
12826 2000-10-05  Richard Henderson  <rth@cygnus.com>
12828         * semantics.c (genrtl_finish_function): Don't init or check
12829         can_reach_end; remove noreturn and return value checks.
12831 2000-10-05  Tom Tromey  <tromey@cygnus.com>
12833         * init.c (build_java_class_ref): Use `build_static_name' with a
12834         suffix, not a prefix, to build the class object's name.
12836 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
12838         * cp-tree.h (access_kind): Fix comment typo.
12839         * decl2.c (grokfield): Fix diagnostic typo.
12840         * semantics.c (finish_template_type): Fix comment typo.
12841         (finish_qualified_object_call_expr): Likewise.
12843 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
12845         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
12846         tsubsting fails.
12848 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
12850         * spew.c (frob_id): New static function.
12851         (frob_opname): Use it.
12852         (yylex): Use it.
12854 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
12856         * decl.c (lang_mark_false_label_stack): Remove.
12857         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
12859 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
12861         * gxxint.texi: Use @email for formatting email addresses.
12863 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
12865         * error.c: Remove direct obstack manipulation.  Replace with
12866         output_buffer-based formatting.  Adjust calls to removed macros.
12867         (obstack_chunk_alloc, obstack_chunk_free): Remove.
12868         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
12869         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
12871 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
12873         * ir.texi: Move to ../c-tree.texi.
12875 2000-09-20  Jason Merrill  <jason@redhat.com>
12877         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
12879 2000-09-21  Andreas Jaeger  <aj@suse.de>
12881         * errfn.c: Move declaration of cp_printer and cp_printers to ...
12882         * cp-tree.h: ... here.
12884         * error.c: Remove declaration of cp_printer.
12886 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
12888         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
12890 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
12892         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
12893         users.
12895 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
12897         * decl.c (start_function): Robustify.
12899 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12901         * cp-tree.h (check_function_format): Accept a `status' parameter.
12903         * call.c, typeck.c: Updates calls to `check_function_format'.
12905 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
12907         * decl2.c (handle_class_head): Always push some scope even
12908         in the error case.
12910 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
12912         * cp-tree.h (struct cp_language_function): Remove
12913         x_scope_stmt_stack and name_declared.
12914         (current_scope_stmt_stack): Remove.
12915         (function_name_declared_p): New macro.
12916         (struct lang_decl_flags): Use c_lang_decl as a base class.
12917         (context): Remove.
12918         (struct lang_decl): Replace saved_tree with context.
12919         (DECL_FRIEND_CONTEXT): Adjust accordingly.
12920         (SET_DECL_FRIEND_CONTEXT): Likewise.
12921         (DECL_VIRTUAL_CONTEXT): Likewise.
12922         (DECL_SAVED_TREE): Remove.
12923         (C_DECLARED_LABEL_FLAG): Likewise.
12924         (cplus_expand_expr_stmt): Don't declare.
12925         (add_decl_stmt): Likewise.
12926         (add_scope_stmt): Likewise.
12927         * decl.c (mark_stmt_tree): Remove.
12928         (case_compare): Likewise.
12929         (finish_case_label): Use c_add_case_label.
12930         (init_decl_processing): Set more language-specific hooks.
12931         (build_enumerator): Fix typo in comment.
12932         (cplus_expand_expr_stmt): Remove.
12933         (mark_lang_function): Use mark_c_language_function.
12934         (lang_mark_tree): Use c_mark_lang_decl.
12935         * decl2.c: Change order of inclusion.
12936         * except.c: Likewise.
12937         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
12938         back on c_expand_expr.
12939         * friend.c: Include expr.h.
12940         * init.c: Change order of inclusion.
12941         * Makefile.in: Update dependencies.
12942         * lex.h (free_lang_decl_chain): Remove.
12943         * optimize.c (maybe_clone_body): Use function_name_declared_p.
12944         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
12945         it doesn't exist.
12946         (instantiate_decl): Use function_name_declared_p.
12947         * semantics.c (lang_expand_expr_stmt): Remove.
12948         (set_current_function_name_declared): Likewise.
12949         (current_function_name_declared): Likewise.
12950         (begin_compound_stmt): Use function_name_declared_p.
12951         (add_decl_stmt): Remove.
12952         (setup_vtbl_ptr): Use function_name_declared_p.
12953         (add_scope_stmt): Remove.
12954         (current_scope_stmt_stack): New function.
12955         (cp_expand_stmt): Don't handle SCOPE_STMTs.
12956         (expand_body): Use function_name_declared_p.
12957         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
12958         * typeck.c: Change order of includes.
12959         (convert_sequence): Remove.
12961 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
12963         * lex.c (reswords): Add _Complex.
12965 2000-09-14  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12967         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
12969 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
12971         * init.c (begin_init_stmts): Don't use // comments.
12973 2000-09-12  Jason Merrill  <jason@redhat.com>
12975         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
12976         all non-extern arrays.
12978         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
12979         typenames, too.  Downgrade complaint to pedwarn.
12980         (xref_tag): Warn about surprising behavior of 'friend struct T'.
12981         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
12982         'class This::Inherited'.
12984 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
12986         * decl.c (finish_case_label): Given the LABEL_DECL a
12987         DECL_CONTEXT.
12989 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
12991         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
12992         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
12993         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
12994         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
12995         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
12996         New macros.
12997         (sorry_for_unsupported_tree, print_scope_operator,
12998         print_left_paren, print_right_paren, print_left_bracket,
12999         print_right_bracket, print_whitespace): Likewise.
13000         (aggr_variety): Rename to class_key_or_enum.
13001         (print_type): Rename to print_type_id.
13002         (print_type_specifier_seq, print_simple_type_specifier,
13003         print_elaborated_type_specifier,
13004         print_rest_of_abstract_declarator,
13005         print_parameter_declaration_clause, print_exception_specification,
13006         print_nested_name_specifier, print_template_id,
13007         typedef_original_name,  print_template_argument_list_start,
13008         print_template_argument_list_end): New functions.
13010 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
13012         * ir.texi: Add more documentation.
13014 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
13016         * cp-tree.h (struct saved_scope): Remove x_function_parms.
13017         (current_function_parms): Don't define.
13018         (struct cp_language_function): Remove parms_stored.
13019         (current_function_just_assigned_this): Don't define.
13020         (current_function_parms_stored): Likewise.
13021         (static_ctors): Declare.
13022         (static_dtors): Likewise.
13023         (SF_EXPAND): Don't define.
13024         (expand_start_early_try_stmts): Remove declaration.
13025         (store_parm_decls): Likewise.
13026         * decl.c (static_ctors): Don't declare.
13027         (static_dtors): Likewise.
13028         (struct binding_level): Remove this_block.
13029         (poplevel): Remove dead code.
13030         (set_block): Likewise.
13031         (mark_binding_level): Don't mark this_block.
13032         (mark_saved_scope): Don't mark x_function_parms.
13033         (init_decl_processing): Don't add current_function_parms as a GC
13034         root.
13035         (check_function_type): Change prototype.
13036         (start_function): Remove RTL-generation code.
13037         (expand_start_early_try_stmts): Remove.
13038         (store_parm_decls): Give it internal linkage.  Remove
13039         RTL-generation code.
13040         (finish_function): Remove RTL-generation code.
13041         * decl2.c (static_ctors): Fix formatting.
13042         (static_dtors): Likewise.
13043         * method.c (use_thunk): Don't call store_parm_decls.
13044         (synthesize_method): Likewise.
13045         * optimize.c (maybe_clone_body): Likewise.
13046         * parse.y (fn.def2): Likewise.
13047         (.set_base_init): Likewise.
13048         (nodecls): Likewise.
13049         * pt.c (instantiate_decl): Likewise.
13050         * rtti.c (synthesize_tinfo_fn): Likewise.
13051         * semantics.c (genrtl_try_block): Simplify.
13052         (expand_body): Use genrtl_start_function and
13053         genrtl_finish_function.
13054         (genrtl_start_function): New function.
13055         (genrtl_finish_function): Likewise.
13057 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
13059         * error.c (cp_tree_printer, case 'P'): Append break.
13061 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
13063         * cp-tree.h (frob_opname): Declare.
13064         * parse.y (saved_scopes): New static variable.
13065         (cp_parse_init): Adjust.
13066         (do_id): If lastiddecl is NULL, do do_identifier.
13067         (operator): Save scope information.
13068         (unoperator): New reduction. Restore scope information.
13069         (operator_name): Append unoperator. Call frob_opname.
13070         * spew.c (frob_opname): Define.
13072 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
13074         * decl.c, rtti.c: Include defaults.h if not already included.
13075         Don't define the *_TYPE_SIZE macros.
13077 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
13079         * cp-tree.h (push_switch): Change prototype.
13080         (check_cp_case_value): Remove declaration.
13081         (decl_constant_value): Likewise.
13082         * decl.c (struct cp_switch): Add switch_stmt and cases.
13083         (case_compare): New function.
13084         (push_switch): Set switch_stmt.  Initialize cases.
13085         (pop_switch): Clean up cases.
13086         (define_case_label): Rename to ...
13087         (finish_case_label): ... this.  Do semantic analysis for case
13088         labels here.
13089         (start_function): Correct comment.
13090         * decl2.c (check_cp_case_value): Remove.
13091         * expr.c (do_case): Remove.
13092         * pt.c (tsubst_expr): Adjust call to finish_case_label.
13093         * semantics.c (genrtl_do_poplevel): Remove declaration.
13094         (RECHAIN_STMTS): Remove.
13095         (finish_break_stmt): Use build_break_stmt.
13096         (finish_continue_stmt): Use build_continue_stmt.
13097         (finish_switch_cond): Adjust condition here, rater than in
13098         c_expand_start_case.
13099         (finish_case_label): Remove.
13100         * typeck.c (c_expand_return): Remove.
13101         (c_expand_start_case): Likewise.
13103 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
13105         * ir.texi: Document type nodes.
13107 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
13109         * cp-tree.h (init_cp_semantics): Declare.
13110         (genrtl_try_block): Don't declare.
13111         (genrtl_handler): Likewise.
13112         (genrtl_catch_block): Likewise.
13113         (genrtl_ctor_stmt): Likewise.
13114         (genrtl_subobject): Likewise.
13115         (genrtl_do_poplevel): Likewise.
13116         (genrtl_named_return_value): Likewise.
13117         * lex.c (init_parse): Call init_cp_semantics.
13118         * semantics.c (genrtl_try_block): Give it internal linkage.
13119         (genrtl_handler): Likewise.
13120         (genrtl_catch_block): Likewise.
13121         (genrtl_ctor_stmt): Likewise.
13122         (genrtl_subobject): Likewise.
13123         (genrtl_do_poplevel): Likewise.
13124         (genrtl_named_return_value): Likewise.
13125         (lang_expand_stmt): Rename to ...
13126         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
13127         (init_cp_semantics): Define.
13129         * decl.c (initialize_local_var): Remove RTL-generating code.
13130         * semantics.c (genrtl_try_block): Fix formatting.
13132         Move statement-tree facilities from C++ to C front-end.
13133         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
13134         (void_zero_node): Remove.
13135         (stmt_tree): Likewise.
13136         (scope_chain): Adjust.
13137         (language_function): Rename to cp_language_function.
13138         (cp_function_chain): Adjust.
13139         (current_stmt_tree): Remove.
13140         (last_tree): Likewise.
13141         (last_expr_type): Likewise.
13142         (struct lang_decl): Adjust.
13143         (STMT_IS_FULL_EXPR_P): Remove.
13144         (add_tree): Remove.
13145         (begin_stmt_tree): Likewise.
13146         (finish_stmt_tree): Likewise.
13147         (walk_tree_fn): Likewise.
13148         (walk_stmt_tree): Likewise.
13149         * class.c (finish_struct): Replace use of add_tree with add_stmt.
13150         * decl.c (mark_stmt_tree): Adjust type.
13151         (init_decl_processing): Don't build void_zero_node.
13152         (initialize_local_var): Adjust usage of current_stmt_tree.
13153         (finish_enum): Use add_stmt, not add_tree.
13154         (save_function_data): Adjust use of language_function.
13155         (finish_constructor_body): Use add_stmt, not add_tree.
13156         (finish_destructor_body): Likewise.
13157         (push_cp_function_context): Adjust use of language_function.
13158         (pop_cp_function_context): Likewise.
13159         (mark_lang_function): Likewise.
13160         (mark_cp_function_context): Likewise.
13161         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
13162         (build_vec_init): Likewise.
13163         * semantics.c (SET_LAST_STMT): Remove.
13164         (RECHAIN_STMTS): Don't use it.
13165         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
13166         (current_stmt_tree): Define.
13167         (add_tree): Remove.
13168         (finish_goto_stmt): Use add_stmt, not add_tree.
13169         (finish_expr_stmt): Likewise.
13170         (begin_if_stmt): Likewise.
13171         (finish_then_clause): Likewise.
13172         (begin_while_stmt): Likewise.
13173         (begin_do_stmt): Likewise.
13174         (finish_return_stmt): Likewise.
13175         (begin_for_stmt): Likewise.
13176         (finish_break_stmt): Likewise.
13177         (finish_continue_stmt): Likewise.
13178         (begin_switch_stmt): Likewise.
13179         (finish_case_label): Likewise.
13180         (begin_try_block): Likewise.
13181         (begin_function_try_block): Likewise.
13182         (begin_handler): Likewise.
13183         (begin_catch_block): Likewise.
13184         (begin_compound_stmt): Likewise.
13185         (begin_asm_stmt): Likewise.
13186         (finish_asm_stmt): Likewise.
13187         (finish_label_stmt): Likewise.
13188         (add_decl_stmt): Likewise.
13189         (finish_subobject): Likewise.
13190         (finish_decl_cleanup): Likewise.
13191         (finish_named_return_value): Likewise.
13192         (setup_vtbl_ptr): Likewise.
13193         (add_scope_stmt): Likewise.
13194         (finish_stmt_expr): Likewise.
13195         (prune_unused_decls): Remove.
13196         (begin_stmt_tree): Likewise.
13197         (finish_stmt_tree): Likewise.
13198         (prep_stmt): Adjust use of current_stmt_tree.
13199         (lang_expand_stmt): Likewise.
13200         * tree.c (statement_code_p): Remove.
13201         (cp_statement_code_p): New function.
13202         (walk_stmt_tree): Remove.
13203         (init_tree): Set lang_statement_code_p.
13205 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
13207         Integrated preprocessor.
13209         * Make-lang.in, Makefile.in: Remove all references to input.c,
13210         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
13211         * gxx.gperf, hash.h, input.c: Delete.
13212         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
13213         initialized properly.
13215         * class.c (fixup_pending_inline): Take a tree, not a
13216         struct pending_inline *.  All callers changed.
13217         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
13218         RID_PROTECTED entries in ridpointers[] array here.
13219         * decl.c (duplicate_decls): Do not refer to struct
13220         pending_inline.
13221         (record_builtin_type, init_decl_processing): Use RID_MAX not
13222         CP_RID_MAX.
13223         (grokdeclarator): Use C_IS_RESERVED_WORD.
13224         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
13225         cpplib.
13226         (grok_x_components): Do not inspect pending_inlines chain.
13228         * cp-tree.h (struct lang_identifier): Add rid_code entry.
13229         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
13230         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
13231         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
13232         TIME_IDENTIFIER_FILEINFO): Kill.
13233         Update prototypes.
13234         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
13235         single 32-bit word.
13236         * parse.y: Call do_pending_inlines unconditionally.
13237         reinit_parse_for_method is now snarf_method.  fn.defpen is no
13238         longer necessary.  Remove unnecessary <itype> annotation on
13239         SCOPE.  Do not refer to end_of_file or struct pending_inline.
13240         * semantics.c (begin_inline_definitions): Call
13241         do_pending_inlines unconditionally.
13243         * lex.c: Remove all code now shared with C front end.
13244         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
13245         into the get_identifier table.  Rewrite pragma handling to
13246         work with the registry.  Move code to save tokens for later
13247         processing to spew.c.
13249         * spew.c: Rewrite everything in terms of token streams instead
13250         of text.  Move routines here from lex.c / input.c as
13251         appropriate.  GC-mark trees hanging off the pending inlines
13252         chain.
13254 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
13256         * NEWS: Mention that the named return value extension has been
13257         deprecated.
13258         * cp-tree.h (original_result_rtx): Define.
13259         (TREE_REFERENCE_EXPR): Remove.
13260         (DECL_VPARENT): Likewise.
13261         (pushdecl_nonclass_level): Likewise.
13262         (store_return_init): Likewise.
13263         (reinit_lang_specific): Likewise.
13264         (genrtl_named_return_value): Change prototype.
13265         * decl.c (original_result_rtx): Remove.
13266         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
13267         Do not generate RTL for local variables here.
13268         (store_return_init): Remove.
13269         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
13270         store_return_init.
13271         (finish_named_return_value): Adjust accordingly.  Warn that this
13272         extension is deprecated.
13273         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
13275 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
13277         * pt.c (type_unification_real): Replace switch with if.
13278         (unify): Tsubst non-type parms before comparing.
13280 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
13282         * error.c (dump_typename): New function, broken out of ...
13283         (dump_type): ... here. Use it.
13284         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
13286 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
13288         * init.c (build_offset_ref): Deal with namespace scoped
13289         TEMPLATE_ID_EXPRs.
13291 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
13293         * class.c (resolve_address_of_overloaded_function): Add
13294         explanation message.
13295         * decl.c (define_case_label): Reformat explanation.
13296         * decl2.c (finish_static_data_member_decl): Likewise.
13297         (grokfield): Likewise.
13298         * friend.c (do_friend): Likewise.
13300 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
13302         * tree.c (walk_tree): Expose tail recursion.
13303         (walk_stmt_tree): New function.
13304         * cp-tree.h: Prototype walk_stmt_tree.
13305         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
13306         the BLOCKs directly.  If a BLOCK has no variables after
13307         pruning, discard it.
13308         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
13309         restore the line number.
13311 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
13313         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
13314         (pt.o): Remove dependency on HTAB_H.
13315         * cp-tree.h: Include hashtab.h.
13316         (walk_tree): Change prototype.
13317         (walk_tree_without_duplicates): New function.
13318         * decl.c (check_default_argument): Use it.
13319         * optimize.c (remap_decl): Adjust calls to walk_tree.
13320         (copy_body): Likewise.
13321         (expand_calls_inline): Likewise.
13322         (calls_setjmp_p): Use walk_tree_without_duplicates.
13323         * pt.c: Don't include hashtab.h.
13324         (for_each_template_parm): Use walk_tree_without_duplicates.
13325         * semantics.c (finish-stmt_tree): Likewise.
13326         (expand_body): Likewise.
13327         * tree.c (walk_tree): Add additional parameter.
13328         (walk_tree_without_duplicates): New function.
13329         (count_trees): Use it.
13330         (verify_stmt_tree): Adjust call to walk_tree.
13331         (find_tree): Use walk_tree_without_duplicates.
13332         (no_linkage_check): Likewise.
13333         (break_out_target_exprs): Adjust call to walk_tree.
13334         (cp_unsave): Likewise.
13336 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13338         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
13339         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
13340         * cp-tree.h (TYPE_BINFO): Adjust comment.
13341         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
13342         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
13343         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
13344         (TYPE_TEMPLATE_INFO): Likewise.
13345         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
13346         * class.c (push_nested_class): Likewise.
13347         * decl.c (lookup_name_real): Likewise.
13348         (grokdeclarator): Likewise.
13349         (grok_op_properties): Likewise.
13350         (xref_tag): Likewise.
13351         (xref_basetypes): Likewise.
13352         * decl2.c (constructor_name_full): Likewise.
13353         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
13354         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
13355         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
13356         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
13357         (dump_type_suffix): Likewise.
13358         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
13359         instead.
13360         (get_aggr_from_typedef): Likewise.
13361         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
13362         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
13363         (write_template_parm): Likewise.
13364         (write_template_template_parm): Check tree code instead of
13365         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
13366         * method.c (build_overload_nested_name): Add
13367         BOUND_TEMPLATE_TEMPLATE_PARM.
13368         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
13369         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
13370         * pt.c (convert_template_argument): Check tree code instead of
13371         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
13372         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
13373         (for_each_template_parm): Adjust comment.
13374         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
13375         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
13376         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
13377         template_args_equal to compare template template parameter cases.
13378         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
13379         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
13380         instead.
13381         * tree.c (copy_template_template_parm): Decide whether to create
13382         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
13383         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
13384         (copy_tree_r): Likewise.
13385         * typeck.c (comptypes): Likewise.  Check tree code instead of
13386         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
13388 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
13390         * decl.c (finish_function): Move the code for handling functions
13391         marked with the constructor and destructor attributes inside the
13392         expand_p block.
13394 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
13396         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
13398 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
13400         * pt.c (lookup_template_class): Remove abort.
13401         * tree.c (get_type_decl): Allow error_mark_node.
13403 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
13405         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
13406         TEMPLATE_ID_EXPRs.
13408 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
13410         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
13411         new ABI mangling.
13413 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
13415         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
13416         union tag mismatch error reporting.
13418 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
13420         * call.c (build_scoped_method_call): Check it is not a namespace.
13422 2000-08-30  Jason Merrill  <jason@redhat.com>
13424         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
13426         * tree.c (bot_manip): Check TREE_CONSTANT rather than
13427         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
13428         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
13430         * decl.c (start_function): Always call make_function_rtl.
13432 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
13434         * semantics.c (prune_unused_decls): New function.
13435         (finish_stmt_tree): Call it via walk_tree.
13437 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
13439         * class.c (build_secondary_vtable): Constify a char *.
13440         * decl.c (init_decl_processing): Initialize function_id_node,
13441         pretty_function_id_node, and func_id_node.
13442         * input.c (struct input_source): Constify 'str'.
13443         (feed_input): Constify first argument.
13444         * mangle.c (write_identifier): Constify argument.
13445         * pt.c (mangle_class_name_for_template): Constify argument.
13447 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
13449         * typeck.c (mark_addressable): Remove code that pokes around in
13450         RTL.
13452 2000-08-28  Jason Merrill  <jason@redhat.com>
13454         * lex.c (file_name_nondirectory): Move to toplev.c.
13456         * cp-tree.h (LOCAL_CLASS_P): New macro.
13457         * class.c (finish_struct_1): Use it.
13459 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
13461         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
13462         (write_encoding): Pass another argument to write_name.
13463         (write_name): Add ignore_local_scope parameter.  Fix handling of
13464         local names.
13465         (write_nested_name): Use write_unqualified_name.
13466         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
13467         (write_template_prefix): Use write_unqualified_name.
13468         (write_component): Remove.
13469         (write_local_name): Add parameter.  Use direct local entity to
13470         discriminator calculation.
13471         (write_class_enum_type): Pass another argument to write_name.
13472         (write_template_template_arg): Likewise.
13473         (make_guard_variable): Likewise.
13475 2000-08-27  Jason Merrill  <jason@redhat.com>
13477         * decl.c (pushdecl): Matching decls for local externs are found in
13478         the current level.  Propagate linkage information from previous
13479         declarations.
13481 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
13483         * ir.texi (Expressions): Fix typo.
13485 2000-08-25  Greg McGary  <greg@mcgary.org>
13487         * tree.c (init_tree): Use ARRAY_SIZE.
13489 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
13491         * error.c (cp_tree_printer): Rework.
13493 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
13495         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
13496         dyn-string.o.
13497         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
13498         (cp-demangle.o): Remove target.
13499         (dyn-string.o): Likewise.
13501         * decl.c (grokfndecl): Require that `main' return an `int'.
13502         * mangle.c (write_encoding): Don't mangle return types for
13503         conversion functions.
13505 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
13507         * error.c (tree_formatting_info): New data type.
13508         (tree_being_formatted): New macro.
13509         (tree_formatting_flags): Likewise.
13510         (put_whitespace): Likewise.
13511         (print_tree_identifier): Likewise.
13512         (print_identifier): Likewise.
13513         (cp_tree_printer, print_function_argument_list, print_declaration,
13514         print_expression, print_function_declaration,
13515         print_function_parameter, print_type, print_cv_qualifier): New
13516         functions.
13517         (init_error): Initialize lang_printer.
13519 2000-08-24  Jason Merrill  <jason@redhat.com>
13521         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
13522         adjustment necessary.
13524 2000-08-24  Greg McGary  <greg@mcgary.org>
13526         * cp-tree.h (MAIN_NAME_P): Remove macro.
13528 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
13530         * error.c (print_instantiation_context): Don't forget to flush the
13531         buffer.
13533 2000-08-23  Jason Merrill  <jason@redhat.com>
13535         * typeck.c (build_ptrmemfunc): Save the input pmf.
13537         * method.c (process_modifiers): Use same_type_p.
13539 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
13541         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
13542         * mangle.c (write_function_type): Change prototype.
13543         (write_encoding): Don't mangle return types for
13544         constructors or destructors.
13545         (write_type): Adjust call to write_function_type.
13546         * pt.c (instantiate_template): Instantiate alternate entry points
13547         when instantiating the main function.
13549 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
13551         * error.c (cp_print_error_function): Don't use embedded '\n' in
13552         output_printf.
13554 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
13556         * decl.c (init_decl_processing): Remove bogus initialization.
13557         * error.c (lang_print_error_function): Restore here.
13558         (init_error): Initialize print_error_function.
13560 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
13562         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
13564 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
13566         * Makefile.in (error.o): Depends on diagnostic.h
13568         * cp-tree.h (problematic_instantiation_changed,
13569         record_last_problematic_instantiation, current_instantiation,
13570         print_instantiation_context): Declare.
13571         (maybe_print_template_context): Remove.
13573         * decl.c (init_decl_processing): Set print_error_function to NULL.
13574         (lang_print_error_function): Remove, since we're using a new
13575         machinery.
13577         * error.c: #include diagnostic.h
13578         (function_category): New function.
13579         (cp_diagnostic_starter): Likewise.
13580         (cp_diagnostic_finalizer): Likewise.
13581         (cp_print_error_function): Likewise.
13582         (maybe_print_instantiation_context): Likewise.
13583         (print_instantiation_full_context): Likewise.
13584         (print_instantiation_partial_context): Likewise.
13585         (print_instantiation_context): Define.
13586         (init_error): Initialize diagnostic pager and finalizer.
13588         * pt.c (problematic_instantiation_changed): Define.
13589         (record_last_problematic_instantiation): Likewise.
13590         (current_instantiation): Likewise.
13591         (maybe_print_template_context): Remove.
13592         (print_template_context): Likewise.
13593         (current_tinst_level): Make static to reflect Brendan Kehoe's
13594         change of 1995-04-13.
13595         (push_tinst_level): Call print_instantiation_context.
13597 2000-08-21  Nix  <nix@esperi.demon.co.uk>
13599         * lang-specs.h: Do not process -o or run the assembler if
13600         -fsyntax-only.
13602 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
13604         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
13605         variables.
13606         * decl2.c (lang_decode_option): Disable gettext attributes for
13607         -ansi.
13609 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
13611         * lex.c (lang_init_options): Default diagnostic message maximum
13612         length to 80, when line-wrapping.
13614 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
13616         * class.c (build_vtbl_initializer): Clear the entire
13617         vtbl_init_data.  Start keeping track of the functions for which we
13618         have created vcall offsets here.
13619         (dfs_build_vcall_offset_vtbl_entries): Remove.
13620         (build_vcall_offset_vtbl_entries): Reimplement.
13621         (add_vcall_offset_vtbl_entries_r): New function.
13622         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
13623         computing when vcall offsets are necessary.
13625 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
13627         * decl.c (member_function_or_else): Use cp_error ... %T.
13628         (grokdeclarator): Likewise.
13629         (start_method): Likewise.
13630         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
13632 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
13634         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
13635         TYPE_DECLs.
13637 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
13639         * cp-tree.h (PTRMEM_OK_P): New macro.
13640         (itf_ptrmem_ok): New enumeration value.
13641         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
13642         argument. Diagnose implicit pointer to member.
13643         (instantiate_type): Don't diagnose implicit pointer to member
13644         here. Pass itf_ptrmem_ok if ok. Adjust calls to
13645         resolve_address_of_overloaded_function.
13646         * init.c (build_offset_ref): Set PTRMEM_OK_P.
13647         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
13648         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
13649         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
13650         (build_unary_op): Deal with single non-static member in
13651         microsoft-land.
13653 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
13655         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
13657 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
13659         * cp-tree.h (enum_name_string): Remove prototype.
13660         (report_case_error): Remove prototype.
13661         * cp/typeck2.c (enum_name_string): Remove.
13662         (report_case_error): Remove.
13663         * error.c (dump_expr): Deal with enum values directly.
13664         Correctly negate integer constant.
13666 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
13668         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
13669         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
13670         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
13671         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
13672         (__cxa_vec_new): Use __cxa_vec_new2.
13673         (__cxa_vec_delete): Use __cxa_vec_delete2.
13675 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
13677         * vec.cc (__cxa_vec_new): Set "C" linkage.
13678         (__cxa_vec_ctor): Likewise.
13679         (__cxa_vec_cctor): Likewise.
13680         (__cxa_vec_dtor): Likewise.
13681         (__cxa_vec_delete): Likewise.
13682         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
13683         (__cxa_vec_ctor): Likewise.
13684         (__cxa_vec_cctor): Likewise.
13685         (__cxa_vec_dtor): Likewise.
13686         (__cxa_vec_delete): Likewise.
13688 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
13690         * class.c (instantiate_type): Reinstate local variable
13691         deleted in previous change.
13693         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
13694         itf_no_attributes.
13696 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
13698         * cp-tree.h (instantiate_type_flags): New enumeration.
13699         (instantiate_type): Change parameter.
13700         * class.c (instantiate_type): Adjust prototype. Adjust.
13701         * call.c (standard_conversion): Adjust instantiate_type call.
13702         (reference_binding): Likewise.
13703         (build_op_delete_call): Likewise.
13704         (convert_like_real): Likewise.
13705         * cvt.c (cp_convert_to_pointer): Likewise.
13706         (convert_to_reference): Likewise.
13707         * pt.c (convert_nontype_argument): Likewise.
13708         * typeck.c (build_binary_op): Likewise.
13709         (build_ptrmemfunc): Likewise.
13710         (convert_for_assignment): Likewise.
13712 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
13714         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
13715         (current_aggr): Define.
13716         * decl.c (grokdeclarator): Make sure a friend class is an
13717         elaborated type specifier.
13718         * parse.y (current_aggr): Remove static definition.
13719         (cp_parse_init): Adjust.
13720         (structsp): Clear and restore current_aggr.
13721         (component_decl_list): Clear current_aggr.
13723         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
13724         aggregate tag on the typename's context.
13726         * pt.c (tsubst_friend_class): Return error_mark_node, if
13727         parms becomes NULL.
13728         (instantiate_class_template): Ignore error_mark_node friend types.
13730 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
13732         * cvt.c (warn_ref_binding): New static function, broken out of ...
13733         (convert_to_reference): ... here. Use it.
13735 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
13737         * parse.y (template_arg): Add rule for template qualified with
13738         global scope.
13740 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13742         * decl2.c (add_function): Reorganize.
13743         (arg_assoc): Do not consider function template decls.
13745 2000-08-11  Jason Merrill  <jason@redhat.com>
13747         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
13748         looking inside.
13750 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
13752         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
13753         (lookup_nested_tag): Likewise.
13755         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
13756         can be produced.
13758 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
13760         * parse.y (named_complex_class_head_sans_basetype): Remove
13761         always true if.
13763 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
13765         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
13766         explicit TEMPLATE_ID_EXPR args.
13767         (build_expr_from_tree, case CALL_EXPR): Likewise.
13769 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
13771         * decl.c (check_tag_decl): Diagnose typename's which don't
13772         declare anything.
13774 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
13776         * init.c (build_aggr_init): Reject bogus array initializers
13777         early.
13779 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
13781         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
13782         runtime.
13783         * cp/tinfo.cc (__dynamic_cast): Likewise.
13784         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
13786 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
13788         * cvt.c (convert_to_pointer_force): Fix error message when
13789         attempting to cast from ambiguous base.
13791 2000-08-08  Jason Merrill  <jason@redhat.com>
13793         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
13794         (tsubst_template_arg_vector): Likewise.
13796         * decl2.c (build_anon_union_vars): Choose the largest field; don't
13797         assume that one will be as large as the union.
13799 2000-08-07  Kazu Hirata  <kazu@hxi.com>
13801         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
13802         * decl.c (pop_labels): Likewise.
13804 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
13806         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
13807         specifications.
13808         (__pointer_to_member_type_info): Likewise.
13809         (__base_class_info): Likewise.
13810         (__class_type_info): Likewise.
13811         (__si_class_type_info): Likewise.
13812         (__vmi_class_type_info): Likewise.
13813         * tinfo.cc (__si_class_type_info::__do_find_public_src):
13814         Changed member names to match specifications.
13815         (__vmi_class_type_info::__do_find_public_src): Likewise.
13816         (__si_class_type_info::__do_dyncast): Likewise.
13817         (__vmi_class_type_info::__do_dyncast): Likewise.
13818         (__si_class_type_info::__do_upcast): Likewise.
13819         (__vmi_class_type_info::__do_upcast): Likewise.
13820         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
13821         (__pbase_type_info::__pointer_catch): Likewise.
13822         (__pointer_type_info::__pointer_catch): Likewise.
13823         (__pointer_to_member_type_info::__pointer_catch): Likewise.
13825 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
13827         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
13828         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
13829         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
13831 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
13833         * cp-tree.h (add_method): Change prototype.
13834         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
13835         Don't double the size of the method vector in the error case.
13836         (handle_using_decl): Adjust call to add_method.
13837         (add_implicitly_declared_members): Likewise.
13838         (clone_function_decl): Likewise.
13839         * decl2.c (check_classfn): Likewise.
13840         * semantics.c (finish_member_declaration): Likewise.
13842 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
13844         * decl.c (flag_isoc94): New variable.
13846 2000-08-02  Jason Merrill  <jason@redhat.com>
13848         * pt.c (do_type_instantiation): Add complain parm; don't complain
13849         if called recursively.
13850         * cp-tree.h, parse.y: Adjust.
13852 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
13854         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
13855         -Wno-strict-prototypes.
13857         * g++spec.c: Adjust type of second argument to
13858         lang_specific_driver, and update code as necessary.
13860         * cp-tree.h: Don't prototype min_precision here.
13861         (my_friendly_assert): Cast expression to void.
13862         * semantics.c (do_poplevel): Initialize scope_stmts.
13864 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
13866         * cp-tree.h (DECL_NEEDED_P): Tweak.
13868 2000-07-28  Jason Merrill  <jason@redhat.com>
13870         * lang-specs.h: Use %i in rule for .ii files.
13872 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
13874         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
13876 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
13878         Allow indirect primary bases.
13879         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
13880         primary_base.
13881         (CLASSTYPE_VFIELD_PARENT): Remove.
13882         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
13883         (BINFO_PRIMARY_BINFO): Remove.
13884         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
13885         (BINFO_VBASE_PRIMARY_P): Likewise.
13886         (BINFO_PRIMARY_BASE_OF): New macro.
13887         (BINFO_INDIRECT_PRIMARY_P): Likewise.
13888         (get_primary_binfo): New function.
13889         * decl.c (lang_mark_tree): Make lang_type::primary_base.
13890         * class.c (vcall_offset_data_s): Rename to ...
13891         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
13892         and add ctor_vtbl_p.
13893         (get_derived_offset): Use get_primary_binfo.
13894         (dfs_mark_primary_bases): Adjust handling of virtual primary
13895         bases.
13896         (mark_primary_bases): Likewise.
13897         (set_primary_base): Take a binfo, not an integer, as a
13898         representation of the primary base.
13899         (indirect_primary_base_p): Remove.
13900         (determine_primary_base): Adjust for indirect primary bases.
13901         (dfs_find_final_overrider): Fix typo in coment.
13902         (update_vtable_entry_for_fn): Use get_primary_binfo.
13903         (layout_nonempty_base_or_field): Tweak.
13904         (build_base_fields): Adjust for new primary base semantics.
13905         (dfs_propagate_binfo_offsets): Remove.
13906         (propagate_binfo_offsets): Rewrite.
13907         (dfs_set_offset_for_shared_vbases): Remove.
13908         (layout_virtual_bases): Don't use it.
13909         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
13910         ABI.
13911         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
13912         CLASSTYPE_VFIELD_PARENT.
13913         (dfs_get_primary_binfo): New function.
13914         (get_primary_binfo): Likewise.
13915         (dump_class_hierarchy_r): Tweak printing of primary bases.
13916         (build_vtbl_initializer): Fix typo in comments.  Use
13917         vtbl_init_data.
13918         (build_vcall_and_vbase_vtbl_entries): Likewise.
13919         (build_vbaes_offset_vtbl_entries): Likewise.
13920         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
13921         BV_VCALL_INDEX to handle indirect primary bases.
13922         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
13923         (build_rtti_vtbl_entries): Likewise.
13924         * search.c (get_shared_vbase_if_not_primary): Tweak.
13925         (find_vbase_instance): Likewise.
13926         (binfo_for_vtable): Simplify.
13927         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
13928         (make_binfo): Make it have 11 entries.
13930 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
13932         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
13933         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
13934         ascertaining primaryness.
13935         (G): Remove template_args.
13936         (decl_is_template_id): New function.
13937         (write_encoding): Use decl_is_template_id.
13938         (write_name): Likewise.  Handle type_decls.  Get main variant of
13939         type decls.
13940         (write_nested_name): Likewise.
13941         (write_prefix): Likewise.
13942         (write_template_prefix): Likewise.
13943         (write_special_name_constructor): Remove defunct production from
13944         comment.
13945         (write_bare_function_type): Remove comment about absent parameter.
13946         (write_template_template_arg): Add missing grammar production to
13947         comment.
13949 2000-07-27  Jason Merrill  <jason@redhat.com>
13951         * decl.c (duplicate_decls): If common_type produces a non-typedef
13952         type for a typedef, just use the old type.
13954 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
13956         * cp-tree.h (function_depth): Declare.
13957         (verify_stmt_tree): Likewise.
13958         (find_tree): Likewise.
13959         * decl.c (function_depth): Give it external linkage.
13960         * optimize.c (optimize_function): Increment and decrement it.
13961         * tree.c (verify_stmt_tree_r): New function.
13962         (verify_stmt_tree): Likewise.
13963         (find_tree_r): Likewise.
13964         (find_tree): Likewise.
13966 2000-07-27  Jason Merrill  <jason@redhat.com>
13968         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
13969         TYPE_PTRMEMFUNC_P.
13970         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
13972 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
13974         * decl.c (start_cleanup_fn): Mark the function as `inline'.
13975         * decl2.c (get_guard): Call cp_finish_decl, not
13976         rest_of_decl_compilation, for local guards.
13977         * lex.c (do_identifier): Remove unused variable.
13979 2000-07-26      Marc Espie <espie@cvs.openbsd.org>
13981         * parse.y:  Add missing ';'.
13983 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
13985         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
13986         of `extern "C++"'.
13988 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
13990         Kill strict_prototype. Backwards compatibility only for
13991         non NO_IMPLICIT_EXTERN_C systems.
13992         * cp-tree.h (flag_strict_prototype): Remove.
13993         (strict_prototype): Remove.
13994         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
13995         * decl.c (maybe_push_to_top_level): Adjust.
13996         (pop_from_top_level): Adjust.
13997         (decls_match): Only allow sloppy parm matching for ancient
13998         system headers.
13999         (init_decl_processing): Adjust.
14000         (grokdeclarator): Adjust.
14001         * decl2.c (flag_strict_prototype): Remove.
14002         (strict_prototype): Remove.
14003         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
14004         (lang_f_options): Remove "strict-prototype".
14005         (unsupported-options): Add "strict-prototype".
14006         * lex.c (do_identifier): Adjust.
14007         (do_scoped_id): Adjust.
14008         * parse.y (empty_parms): Adjust.
14009         * class.c (push_lang_context): Adjust.
14010         (pop_lang_context): Adjust.
14011         * typeck.c (comp_target_parms): Adjust.
14013 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
14015         * decl.c (poplevel): Deal with anonymous variables at for scope.
14016         (maybe_inject_for_scope_var): Likewise.
14018 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
14020         * decl.c: Remove all signal handling code, now done in toplev.c.
14022 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
14024         * decl.c (make_rtl_for_nonlocal_decl): Rework.
14026         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
14027         correctly.
14029 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
14031         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
14032         Define my_friendly_assert and my_friendly_abort as macros
14033         which may call friendly_abort.  Prototype friendly abort, not
14034         my_friendly_abort or my_friendly_assert.
14035         * decl.c (signal_catch): Report the signal caught in the error
14036         message.  Call fatal directly.
14037         * typeck2.c (ack, my_friendly_assert): Delete.
14038         (my_friendly_abort): Rename to friendly_abort.  Expect file,
14039         line, and function parameters.  Report the abort code, then
14040         call fancy_abort.  Do not mask an abort if errors have
14041         already occurred.
14043 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
14045         * typeck.c (comp_target_parms): Remove obsolete parameter.
14046         (comp_target_types): Adjust.
14048 2000-07-17  Jason Merrill  <jason@redhat.com>
14050         * typeck.c (mark_addressable): Never set TREE_USED.
14051         * call.c (build_call): Don't abort on calls to library functions
14052         that have been declared normally.
14054         * typeck.c (build_binary_op): Fix grammar in warning.
14056         * exception.cc (__eh_free): Fix prototype.
14058         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
14060         * decl.c (pushdecl): Handle seeing an OVERLOAD in
14061         IDENTIFIER_NAMESPACE_VALUE.
14063 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
14065         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
14066         * method.c (use_thunk): Correct handling of vcall offsets.
14068 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
14070         * .cvsignore: parse.h and parse.c have no cp- prefix.
14072 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
14074         * .cvsignore: New file.
14076 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
14078         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
14080 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
14082         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
14083         * parse.c: Remove.
14084         * parse.h: Likewise.
14086 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
14088         * class.c (layout_class_type): Add pointers to virtual bases after
14089         base classes under the old ABI.
14091 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
14093         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
14094         (finish_continue_stmt): Likewise.
14095         (begin_for_stmt): Remove call to note_level_for_for.
14096         (finish_goto_stmt): Change call from build_min_nt
14097         to build_stmt.
14098         (finish_expr_stmt): Likewise.
14099         (begin_if_stmt): Likewise.
14100         (begin_while_stmt): Likewise.
14101         (finish_while_stmt): Likewise.
14102         (finish_return_stmt): Likewise.
14103         (begin_for_stmt): Likewise.
14104         (finish_for_stmt): Likewise.
14105         (finish_break_stmt): Likewise.
14106         (begin_switch_stmt): Likewise.
14107         (finish_case_label): Likewise.
14108         (genrtl_try_block): Likewise.
14109         (begin_try_block): Likewise.
14110         (begin_handler): Likewise.
14111         (begin_compound_stmt): Likewise.
14112         (finish_asm_stmt): Likewise.
14113         (finish_label_stmt): Likewise.
14114         (add_decl_stmt): Likewise.
14115         (finish_subobject): Likewise.
14116         (finish_decl_cleanup): Likewise.
14117         (finish_named_return_value): Likewise.
14118         (setup_vtbl_ptr): Likewise.
14119         (add_scope_stmt): Likewise.
14120         * decl.c (finish_constructor_body): Likewise.
14121         (finish_destructor_body): Likewise.
14122         * optimize.c (copy_body_r): Likewise.
14123         (initialize_inlined_parameters): Likewise.
14124         (declare_return_variable): Likewise.
14125         (expand_call_inline): Likewise.
14127 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
14129         * semantics.c (expand_body): Sync interface information
14130         at the end of function body expansion.
14132 2000-07-09  Jason Merrill  <jason@redhat.com>
14134         * init.c (build_new_1): Bail early if the call to new fails.
14136         * decl.c (compute_array_index_type): Check specifically for
14137         an INTEGER_CST, not just TREE_CONSTANT.
14139         * decl.c (duplicate_decls): Don't call duplicate_decls on
14140         the DECL_TEMPLATE_RESULT.
14141         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
14142         codes.
14144         * error.c (dump_template_bindings): Don't crash if we had an
14145         invalid argument list.
14147         * typeck.c (c_expand_start_case): Do narrowing here.
14148         * semantics.c (finish_switch_cond): Not here.
14150 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
14152         * parse.y (asm_clobbers): Do string concatenation.
14154 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
14156         * decl.c (pushtag): Don't put local classes in template functions
14157         on the local_classes list.
14159 2000-07-04  Scott Snyder  <snyder@fnal.gov>
14161         * decl2.c (get_guard): Add missing return for old ABI local
14162         variable case.
14164 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
14166         * cp-tree.h (char_type_p): New function.
14167         * decl.c (init_decl_processing): Don't initialize
14168         signed_wchar_type_node or unsigned_wchar_type_node.
14169         (complete_array_type): Handle brace-enclosed string-constants.
14170         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
14171         * tree.c (char_type_p): New function.
14172         * typeck2.c (digest_init): Use char_type_p.
14174 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
14176         * pt.c (tsubst): Don't layout type, if it's error_mark.
14178 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
14180         * pt.c (instantiate_pending_templates): Reset template level.
14182 2000-07-05  Jason Merrill  <jason@redhat.com>
14184         * call.c (joust): Don't complain about `operator char *()' beating
14185         `operator const char *() const'.
14187 2000-07-04  scott snyder  <snyder@fnal.gov>
14188             Jason Merrill  <jason@redhat.com>
14190         * repo.c (repo_get_id): Handle the case where a class with virtual
14191         bases has a null TYPE_BINFO_VTABLE.
14193 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
14194             Jason Merrill  <jason@redhat.com>
14196         * parse.y (member_init): Just pass in the type.
14197         * init.c (expand_member_init): Handle getting a type.
14199 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14200             Jason Merrill  <jason@redhat.com>
14202         * decl.c (finish_function): Warn if a function has no return
14203         statement.
14204         Suggested by Andrew Koenig.
14205         * typeck.c (check_return_expr): Do set current_function_returns_value
14206         if we got an error_mark_node.
14208 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
14210         * decl2.c (push_decl_namespace): Push the original namespace.
14212 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
14214         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
14215         * semantics.c (begin_class_definition): Clear it.
14217 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
14219         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
14220         (genrtl_expr_stmt): Likewise.
14221         (genrtl_decl_stmt): Likewise.
14222         (genrtl_if_stmt): Likewise.
14223         (genrtl_while_stmt): Likewise.
14224         (genrtl_do_stmt): Likewise.
14225         (genrtl_return_stmt): Likewise.
14226         (genrtl_for_stmt): Likewise.
14227         (genrtl_break_stmt): Likewise.
14228         (genrtl_continue_stmt): Likewise.
14229         (genrtl_scope_stmt): Likewise.
14230         (genrtl_switch_stmt): Likewise.
14231         (genrtl_case_label): Likewise.
14232         (genrtl_begin_compound_stmt): Likewise.
14233         (genrtl_finish_compound_stmt): Likewise.
14234         (genrtl_compound_stmt): Likewise.
14235         (genrtl_asm_stmt): Likewise.
14237         * init.c (begin_init_stmts): Remove call to
14238         genrtl_begin_compound_stmt.
14239         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
14241         * semantics.c (lang_expand_stmt): Changed call to
14242         genrtl_compound_stmt to ignore return value.
14244 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
14246         * mangle.c (canonicalize_for_substitution): Return the canonical
14247         variant of a type.
14249         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
14250         TYPE_DECL.
14251         * typeck.c (commonparms): Remove obstack manipulations.
14253 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
14255         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
14257         * Makefile.in (OBJS): Added ../c-semantics.o.
14258         (OBJDEPS): Likewise.
14260         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
14261         ../c-common.h.
14262         (struct stmt_tree): Added comment.
14263         (current_function_name_declared): Removed.
14264         (stmts_are_full_exprs_p): Likewise.
14265         (genrtl_do_pushlevel): Likewise.
14266         (genrtl_clear_out_block): Likewise.
14267         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
14268         (DECL_ANON_UNION_ELEMS): Likewise.
14269         (emit_local_var): Likewise.
14270         (make_rtl_for_local_static): Likewise.
14271         (do_case): Likewise.
14272         (expand_stmt): Likewise.
14273         (genrtl_decl_cleanup): Likewise.
14274         (c_expand_asm_operands): Likewise.
14275         (c_expand_return): Likewise.
14276         (c_expand_start_case): Likewise.
14278         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
14279         (emit_local_var): Likewise.
14280         (initialize_local_var): Change reference to
14281         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
14282         Change reference to stmts_are_full_exprs_p to
14283         current_stmt_tree->stmts_are_full_exprs_p.
14284         (push_cp_function_context): Likewise.
14286         * expect.c (expand_throw): Change reference to
14287         stmts_are_full_exprs_p.
14289         * init.c (build_aggr_init): Change reference to
14290         stmts_are_full_exprs_p.
14291         (build_vec_init): Likewise.
14293         * optimize.c (maybe_clone_body): Change reference to
14294         current_function_name_declared to
14295         cp_function_chain->name_declared.
14297         * pt.c (instantiate_decl): Change reference to
14298         current_function_name_declared to
14299         cp_function_chain->name_declared.
14301         * semantics.c (expand_cond): Moved declaration to c-common.h.
14302         (genrtl_do_pushlevel): Moved to c-semantics.c.
14303         (genrtl_clear_out_block): Likewise.
14304         (genrtl_goto_stmt): Likewise.
14305         (genrtl_expr_stmt): Likewise.
14306         (genrtl_decl_stmt): Likewise.
14307         (gerntl_if_stmt): Likewise.
14308         (genrtl_while_stmt): Likewise.
14309         (genrtl_do_stmt): Likewise.
14310         (genrtl_return_stmt): Likewise.
14311         (genrtl_for_stmt): Likewise.
14312         (genrtl_break_stmt): Likewise.
14313         (genrtl_continue_stmt): Likewise.
14314         (genrtl_scope_stmt): Likewise.
14315         (genrtl_switch_stmt): Likewise.
14316         (genrtl_case_label): Likewise.
14317         (genrtl_begin_compound_stmt): Likewise.
14318         (genrtl_finish_compound_stmt): Likewise.
14319         (genrtl_compound_stmt): Likewise.
14320         (genrtl_asm_stmt): Likewise.
14321         (genrtl_decl_cleanup): Likewise.
14322         (expand_cond): Likewise.
14323         (expand_stmt): Renamed to ...
14324         (lang_expand_stmt): ... this.
14325         (lang_expand_expr_stmt): Initialize.
14326         (set_current_function_name_declared): Likewise.
14327         (stmts_are_full_exprs_p): Likewise.
14328         (current_function_name_declared): Likewise.
14329         (anon_aggr_type_p): Likewise.
14330         (do_poplevel): Change reference to
14331         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
14332         Change reference to stmts_are_full_exprs_p to
14333         current_stmt_tree->stmts_are_full_exprs_p.
14334         (add_tree): Likewise.
14335         (finish_expr_stmt): Likewise.
14336         (prep_stmt): Likewise.
14337         (lang_expand_stmt): Likewise.
14338         (begin_compound_stmt): Change reference to
14339         current_function_name_declared to
14340         cp_function_chain->name_declared and call to
14341         current_function_name_declared().
14342         (setup_vtbl_ptr): Likewise.
14343         (genrtl_do_poplevel): Removed.
14345 2000-06-30  Jason Merrill  <jason@redhat.com>
14347         * init.c (init_init_processing): Go back to aligning like
14348         double_type_node for old ABI.
14349         (get_cookie_size): Make cookie larger if we get a type that needs
14350         more alignment.
14351         (build_vec_delete): Call it.
14353         * typeck.c (qualify_type_recursive): New fn.
14354         (composite_pointer_type): Use it.
14355         (build_binary_op): Use composite_pointer_type.
14357 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
14358             Jason Merrill  <jason@redhat.com>
14360         * typeck.c (check_return_expr): Don't complain about returning
14361         NULL from operator new if -fcheck-new.
14362         * cp-tree.h: Declare flag_check_new here.
14363         * init.c: Not here.
14365 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
14367         * mangle.c (find_substitution): Use same_type_p.
14368         (write_encoding): Don't check for substitutions.
14370 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
14372         * parse.y (expr_no_comma_rangle): New non-terminal.
14373         (template_parm): Use it for default parameter case.
14374         (template_arg): Use it.
14375         (expr_no_commas): Remove commented out undefined extensions.
14376         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
14377         * parse.h, parse.c: Rebuilt.
14379 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
14381         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
14382         (finish_asm_stmt): Do it here, instead.
14384         * cp-tree.h (ridpointers): Don't declare.
14385         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
14386         (record_builtin_java_type): Likewise.
14387         (init_decl_processing): Likewise.
14388         * lex.c: Move inclusion of lex.h.
14389         (ridpointers): Don't define.
14390         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
14391         RID_MAX.
14392         * lex.h (enum rid): Rename to ...
14393         (enum cp_rid): ... this.
14394         (ridpointers): Don't declare.
14395         * parse.y: Move inclusion of lex.h.
14396         * parse.c: Regenerated.
14397         * spew.c: Move inclusion of lex.h.
14399         * cp-tree.h (struct language_function): Remove temp_name_counter.
14400         (temp_name_counter): Remove.
14401         (get_temp_name): Change prototype.
14402         (get_guard): New function.
14403         (get_guard_cond): Likewise.
14404         (set_guard): Likewise.
14405         * cvt.c (build_up_reference): Adjust call to get_temp_name.
14406         * decl.c (expand_static_init): Use get_guard and friends to
14407         implement guard variables.
14408         * decl2.c (get_temp_name): Assume that the variables created are
14409         always static.
14410         (get_sentry): Rename to ...
14411         (get_guard): ... this.  Implement new ABI guard variables.
14412         (get_guard_bits): New function.
14413         (get_guard_cond): Likewise.
14414         (set_guard): Likewise.
14415         (start_static_initialization_or_destruction): Use them.
14416         (do_static_initialization): Replace sentry with guard throughout.
14417         (do_static_destruction): Likewise.
14418         * init.c (create_temporary_var): Add comment.
14420 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
14422         * mangle.c (find_substitution): Use same_type_p.
14423         (write_encoding): Don't check for substitutions.
14425 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
14427         * parse.y (expr_no_comma_rangle): New non-terminal.
14428         (template_parm): Use it for default parameter case.
14429         (template_arg): Use it.
14430         (expr_no_commas): Remove commented out undefined extensions.
14431         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
14432         * parse.h, parse.c: Rebuilt.
14434 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
14436         * cp-tree.h (flag_const_strings): Remove.
14437         (warn_parentheses): Likewise.
14438         (warn_format): Likewise.
14439         (common_type): Likewise.
14440         (default_conversion): Likewise.
14441         (build_binary_op): Likewise.
14442         (cp_build_binary_op): New macro.
14443         * call.c (build_new_op): Use cp_build_binary_op instead of
14444         build_binary_op.
14445         * class.c (build_vtable_entry_ref): Likewise.
14446         * decl.c (expand_static_init): Likewise.
14447         (compute_array_index_type): Likewise.
14448         (build_enumerator): Likewise.
14449         * decl2.c (delete_sanity): Likewise.
14450         (start_static_initialization_or_destruction): Likewise.
14451         * error.c (dump_type_suffix): Likewise.
14452         * init.c (resolve_offset_ref): Likewise.
14453         (build_new): Likewise.
14454         (build_new_1): Likewise.
14455         (build_vec_delete_1): Likewise.
14456         (build_vec_init): Likewise.
14457         (build_delete): Likewise.
14458         * rtti.c (synthesize_tinfo_fn): Likewise.
14459         (synthesize_tinfo_var): Likewise.
14460         * search.c (expand_upcast_fixups): Likewise.
14461         (fixup_all_virtual_upcast_offsets): Likewise.
14462         * typeck.c (build_array_ref): Likewise.
14463         (get_member_function_from_ptrfunc): Likewise.
14464         (build_binary_op): Add parameter.
14465         (pointer_int_sum): Use cp_build_binary_op.
14466         (pointer_diff): Likewise.
14467         (build_modify_expr): Likewise.
14468         (get_delta_difference): Likewise.
14469         (build_ptrmemfunc): Likewise.
14471 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
14473         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
14474         * decl.c (create_implicit_typedef): Adjust.
14475         * decl2.c (build_artificial_parm): Adjust.
14476         * method.c (implicitly_declare_fn): Adjust.
14477         * pt.c (push_inline_template_parms_recursive): Adjust.
14478         (process_template_parm): Adjust.
14479         (overloaded_template_name): Adjust.
14480         * semantics.c (finish_template_template_parm): Adjust.
14482 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
14484         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
14485         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
14486         where to emit thunks.
14487         (build_vtt): Adjust call to build_vtt_inits.
14488         (build_vtt_inits): Add parameter to indicate whether or not
14489         sub-VTTs for virtual bases should be included.  Adjust handling of
14490         construction vtables.
14491         (get_matching_base): New function.
14492         (dfs_build_vtt_inits): Rename to ...
14493         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
14494         construction vtables.
14495         (dfs_fixup_binfo_vtbls): Likewise.
14496         (build_ctor_vtbl_groups): Build construction vtables for virtual
14497         bases, too.
14498         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
14499         to build construction vtbls.
14500         (dfs_accumulate_vtbl_inits): Adjust handling of
14501         construction vtables.
14503         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
14504         types correctly.
14506 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
14508         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
14510 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
14512         * search.c (hides): Remove.
14513         (is_subobject_of_p): Add most_derived parameter. Use
14514         CANONICAL_BINFO.
14515         (lookup_field_queue_p): Adjust.
14516         (lookup_field_r): Adjust.
14518 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
14520         * decl2.c (handle_class_head): Bash typedefs to the type's main
14521         decl.
14523 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
14525         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
14526         (begin_global_stmt_expr): ... this.
14527         (genrtl_finish_stmt_expr): Rename to ...
14528         (finish_global_stmt_expr): ... this.
14529         * init.c (begin_init_stmts): Adjust calls.
14530         (finish_init_stmts): Likewise.
14531         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
14532         (begin_global_stmt_expr): ... this.
14533         (genrtl_finish_stmt_expr): Rename to ...
14534         (finish_global_stmt_expr): ... this.
14536 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14538         * search.c (lookup_member): Fix typo in comment.
14540 2000-06-24  Jason Merrill  <jason@redhat.com>
14542         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
14543         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
14545 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14547         * parse.y (complex_direct_notype_declarator): Support global_scope.
14548         * Makefile.in: Adjust conflict count.
14550 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14552         * parse.y (template_arg): Convert TEMPLATE_DECL
14553         that is a template template parameter to
14554         TEMPLATE_TEMPLATE_PARM here.
14556         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
14557         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
14558         (copy_template_template_parm): Adjust prototype.
14559         * decl.c (grokdeclarator): Remove dead code.
14560         * pt.c (process_template_parm): Tidy.
14561         (lookup_template_class): Construct nodes in
14562         copy_template_template_parm.
14563         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
14564         lookup_template_class.  Use TYPE_TI_TEMPLATE.
14565         * tree.c (copy_template_template_parm): Add NEWARGS
14566         parameter.
14567         (mapcar): Adjust call to copy_template_template_parm.
14568         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
14569         * method.c (build_template_template_parm_names): Change error
14570         code to avoid compilation warning.
14572         * gxxint.texi: Document template template parameter
14573         name mangling.
14575 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
14577         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
14578         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
14579         (cp-demangle.o): New rule.
14580         (dyn-string.o): Likewise.
14581         * inc/cxxabi.h (__cxa_demangle): New declaration.
14583 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
14585         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
14586         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
14587         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
14588         a tree, not an int.
14589         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
14590         (make_thunk): Change prototype.
14591         (emit_thunk): Rename to use_thunk.
14592         (mangle_thunk): Change prototype.
14593         * class.c (get_derived_offset): Simplify.
14594         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
14595         BV_GENERATE_THUNK_WITH_VTABLE_P.
14596         (build_primary_vtable): Simplify.
14597         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
14598         (dfs_find_base): Remove.
14599         (update_vtable_entry_for_fn): Correct bug in finding the base
14600         where a virtual function was first declared.  Figure out whether
14601         or not to emit a vcall-thunk with the vtables in which it appears.
14602         Correct logic for deciding whether to use an ordinary thunk, or a
14603         vcall thunk.
14604         (finish_struct_1): Remove unnecssary code.
14605         (build_vtbl_initializer): Use ssize_int for the running counter of
14606         negative indices.
14607         (build_vtbl_initializer): Only use vcall thunks where necessary.
14608         Mark thunks as needing to be emitted with their vtables, or not.
14609         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
14610         indices.  Use size_binop.
14611         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
14612         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
14613         size_binop.
14614         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
14615         (build_vtable_entry): Mark thunks as needing to be emitted with
14616         their vtables, or not.
14617         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
14618         * decl2.c (mark_vtable_entries): Use use_thunk instead of
14619         emit_thunk.
14620         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
14621         information.
14622         * error.c (dump_expr): Use BV_FN.
14623         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
14624         not an int.
14625         * method.c (make_thunk): Likewise.
14626         (emit_thunk): Rename to use_thunk.  Allow callers to decide
14627         whether or not to actually emit the thunk.  Adjust for changes in
14628         representation of vcall offsets.
14629         * search.c (dfs_get_pure_virtuals): Use BV_FN.
14630         * semantics.c (emit_associated_thunks): New function.
14631         (expand_body): Use it.
14632         * ir.texi: Adjust decriptions of thunks.
14634 2000-06-22  Jason Merrill  <jason@redhat.com>
14636         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
14637         (tsubst_friend_function): Copy it here.
14639         * decl.c (grok_op_properties): Fix typo.
14641         * decl2.c (delete_sanity): Clarify warning, avoid failure on
14642         deleting void*.
14644         * pt.c (check_explicit_specialization): Clarify error.
14646         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
14647         an old OVERLOAD when we're declaring a non-function.
14648         (pushdecl, destroy_local_var): Check for error_mark_node.
14649         (warn_extern_redeclared_static): Also bail early if
14650         we're a CONST_DECL.
14651         (push_overloaded_decl): Ignore an old error_mark_node.
14653 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
14655         * call.c (build_x_va_arg): Check if in a template decl.
14656         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
14658 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14660         * class.c (push_lang_context): TYPE_NAME gets you to the Java
14661         types DECLs.
14662         * decl.c (check_goto): Computed gotos assumed OK.
14664 2000-06-20  Jason Merrill  <jason@redhat.com>
14666         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
14667         for which we don't need to look for instantiations.
14669 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
14671         * parse.y (program): Always call finish_translation_unit.
14672         * parse.c, parse.h: Rebuilt.
14674 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
14676         * method.c: Don't include hard-reg-set.h.
14678 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
14680         * rtti.c (get_base_offset): Cope when vbase field is in a base.
14682 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
14684         * call.c (build_conditional_expr): Use VOID_TYPE_P.
14685         * cvt.c (cp_convert_to_pointer): Likewise.
14686         (convert_to_void): Likewise.
14687         * error.c (dump_expr): Likewise.
14688         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
14689         * init.c (build_delete): Likewise.
14690         * method.c (emit_thunk): Likewise.
14691         * optmize.c (declare_return_variable): Likewise.
14692         * rtti.c (get_tinfo_decl_dynamic): Likewise.
14693         (get_typeid): Likewise.
14694         (build_dynamic_cast_1): Likewise.
14695         * typeck.c (composite_pointer_type): Likewise.
14696         (common_type): Likewise.
14697         (build_indirect_ref): Likewise.
14698         (build_binary_op): Likewise.
14699         (build_x_compound_expr): Likewise.
14700         (check_return_expr): Likewise.
14701         * typeck2.c (add_exception_specifier): Likewise.
14703         * mangle.c (write_method_parms): Use direct comparison for end
14704         of parmlist.
14706 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
14708         * cp-tree.h (genrtl_try_block): Declare function.
14709         (genrtl_handler): Likewise.
14710         (genrtl_catch_block): Likewise.
14711         (genrtl_ctor_stmt): Likewise.
14712         (genrtl_subobject): Likewise.
14713         (genrtl_decl_cleanup): Likewise.
14714         (genrtl_do_poplevel): Likewise.
14715         (genrtl_do_pushlevel): Likewise.
14716         (genrtl_clear_out_block): Likewise.
14717         (genrtl_goto_stmt): Likewise.
14718         (genrtl_expr_stmt): Likewise.
14719         (genrtl_decl_stmt): Likewise.
14720         (genrtl_if_stmt): Likewise.
14721         (genrtl_while_stmt): Likewise.
14722         (genrtl_do_stmt): Likewise.
14723         (genrtl_return_stmt): Likewise.
14724         (genrtl_for_stmt): Likewise.
14725         (genrtl_break_stmt): Likewise.
14726         (genrtl_continue_stmt): Likewise.
14727         (genrtl_scope_stmt): Likewise.
14728         (genrtl_switch_stmt): Likewise.
14729         (genrtl_case_label): Likewise.
14730         (genrtl_begin_compound_stmt): Likewise.
14731         (genrtl_finish_compound_stmt): Likewise.
14732         (genrtl_compound_stmt): Likewise.
14733         (genrtl_asm_stmt): Likewise.
14734         (genrtl_named_return_value): Likewise.
14735         (genrtl_begin_stmt_expr): Likewise.
14736         (genrtl_finish_stmt_expr): Likewise.
14737         (finish_for_stmt): Removed first argument.
14738         (finish_switch_stmt): Likewise.
14740         * semantics.c (genrtl_try_block): Define function.
14741         (genrtl_handler): Likewise.
14742         (genrtl_catch_block): Likewise.
14743         (genrtl_ctor_stmt): Likewise.
14744         (genrtl_subobject): Likewise.
14745         (genrtl_decl_cleanup): Likewise.
14746         (genrtl_do_poplevel): Likewise.
14747         (genrtl_do_pushlevel): Likewise.
14748         (genrtl_clear_out_block): Likewise.
14749         (genrtl_goto_stmt): Likewise.
14750         (genrtl_expr_stmt): Likewise.
14751         (genrtl_decl_stmt): Likewise.
14752         (genrtl_if_stmt): Likewise.
14753         (genrtl_while_stmt): Likewise.
14754         (genrtl_do_stmt): Likewise.
14755         (genrtl_return_stmt): Likewise.
14756         (genrtl_for_stmt): Likewise.
14757         (genrtl_break_stmt): Likewise.
14758         (genrtl_continue_stmt): Likewise.
14759         (genrtl_scope_stmt): Likewise.
14760         (genrtl_switch_stmt): Likewise.
14761         (genrtl_case_label): Likewise.
14762         (genrtl_begin_compound_stmt): Likewise.
14763         (genrtl_finish_compound_stmt): Likewise.
14764         (genrtl_compound_stmt): Likewise.
14765         (genrtl_asm_stmt): Likewise.
14766         (genrtl_named_return_value): Likewise.
14767         (genrtl_begin_stmt_expr): Likewise.
14768         (genrtl_finish_stmt_expr): Likewise.
14769         (finish_for_stmt): Removed first argument and generate rtl
14770         specific code.
14771         (finish_switch_stmt): Likewise.
14772         (do_poplevel): Removed generate rtl specific code.
14773         (do_pushlevel): Likewise.
14774         (add_tree): Likewise.
14775         (finish_goto_stmt): Likewise.
14776         (finish_expr_stmt): Likewise.
14777         (begin_if_stmt): Likewise.
14778         (finish_if_stmt_cond): Likewise.
14779         (finish_then_clause): Likewise.
14780         (begin_else_clause): Likewise.
14781         (finish_else_clause): Likewise.
14782         (finish_if_stmt): Likewise.
14783         (clear_out_block): Likewise.
14784         (begin_while_stmt): Likewise.
14785         (finish_while_stmt_cond): Likewise.
14786         (finish_while_stmt): Likewise.
14787         (begin_do_stmt): Likewise.
14788         (finish_do_body): Likewise.
14789         (finish_do_stmt): Likewise.
14790         (finish_return_stmt): Likewise.
14791         (begin_for_stmt): Likewise.
14792         (finish_for_init_stmt): Likewise.
14793         (finish_for_cond): Likewise.
14794         (finish_for_expr): Likewise.
14795         (finish_break_stmt): Likewise.
14796         (finish_continue_stmt): Likewise.
14797         (begin_switch_stmt): Likewise.
14798         (finish_switch_cond): Likewise.
14799         (finish_case_label): Likewise.
14800         (begin_try_block): Likewise.
14801         (begin_function_try_block): Likewise.
14802         (finish_try_block): Likewise.
14803         (finish_cleanup_try_block): Likewise.
14804         (finish_cleanup): Likewise.
14805         (finish_function_try_block): Likewise.
14806         (finish_handler_sequence): Likewise.
14807         (finish_function_handler_sequence): Likewise.
14808         (begin_handler): Likewise.
14809         (finish_handler_parms): Likewise.
14810         (begin_catch_block): Likewise.
14811         (finish_handler): Likewise.
14812         (begin_compound_stmt): Likewise.
14813         (finish_compound_stmt): Likewise.
14814         (finish_asm_stmt): Likewise.
14815         (finish_label_stmt): Likewise.
14816         (finish_label_decl): Likewise.
14817         (finish_subobject): Likewise.
14818         (finish_decl_cleanup): Likewise.
14819         (finish_named_return_value): Likewise.
14820         (begin_stmt_expr): Likewise.
14821         (finish_stmt_expr): Likewise.
14823         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
14824         to call genrtl_expr_stmt when appropriate.
14826         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
14827         begin_compound_expr to call genrtl_begin_stmt_expr and
14828         genrtl_begin_compound_expr when appropriate.
14829         (finish_init_stmts): Changed calls to finish_compound_expr and
14830         finish_stmt_expr to call genrtl_finish_compound_expr and
14831         genrtl_finish_stmt_expr when appropriate.
14832         (expand_default_init): Changed call to finish_expr_stmt to call
14833         genrtl_expr_stmt when appropriate.
14834         (build_vec_init): Likewise.
14836         * parse.y (simple_stmt): Removed first argument from call to
14837         finish_for_stmt. Removed first argument from call to
14838         finish_switch_stmt.
14840         * parse.c: Regenerated.
14842         * pt.c (tsubst_expr): Removed first argument from call to
14843         finish_for_stmt. Removed first argument from call to
14844         finish_switch_stmt.
14846 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
14848         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
14849         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
14851         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
14852         (cplus_tree_code_length[]): Likewise.
14853         (cplus_tree_code_name[]): Likewise.
14854         (init_parse): Added call to add_c_tree_codes. Changed
14855         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
14857 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
14859         * cp-tree.h (finish_mem_initializers): Declare.
14860         (count_trees): Likewise.
14861         * parse.y (base_init): Use finish_mem_initializers.
14862         * semantics.c (finish_mem_initializers): New function.
14864         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
14865         the number of trees.
14866         (n_trees): Remove.
14867         (count_trees): Don't use it.
14869 2000-06-15  Jason Merrill  <jason@redhat.com>
14871         * tree.c (count_trees): New debugging function.
14873         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
14874         * init.c (build_member_call): Pull out the name of a DECL.
14876         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
14877         * semantics.c (expand_body): Push to TV_INTEGRATION here.
14878         * optimize.c (optimize_function): Not here.
14879         * pt.c (instantiate_decl): Push to TV_PARSE.
14881 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
14883         * cp-tree.h (struct language_function): Remove x_base_init_list
14884         and x_member_init_list.
14885         (current_base_init_list): Remove.
14886         (current_member_init_list): Likewise.
14887         (setup_vtbl_ptr): Change prototype.
14888         (emit_base_init): Likewise.
14889         (expand_member_init): Likewise.
14890         (reinit_parse_for_function): Remove.
14891         * decl.c (save_function_data): Don't clear x_base_init_list and
14892         x_member_init_list.
14893         (mark_language_function): Don't mark them.
14894         * init.c (perform_member_init): Tweak comment.
14895         (sort_member_init): Take the list of initializers as an argument.
14896         (sort_base_init): Likewise.
14897         (emit_base_init): Likewise.
14898         (expand_member_init): Return the initializer.  Don't use global
14899         variables.
14900         * lex.c (reinit_parse_for_function): Remove.
14901         * method.c (build_template_parm_names): Correct substitution.
14902         (do_build_copy_constructor): Don't use current_member_init_list
14903         and current_base_init_list.
14904         (synthesize_method): Likewise.
14905         * parse.y (base_init): Split mem-initializers into
14906         base-initializers and field-initializers.
14907         (member_init_list): Build up the list here.
14908         (member_init): Return the initializer.
14909         (fn.depfn): Don't use reinit_parse_for_function.
14910         * parse.c: Regenerated.
14911         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
14912         ERROR_MARK.
14913         (tsubst_expr): Don't use current_member_init_list
14914         and current_base_init_list.
14915         (tsubst_expr_values): Rename to ...
14916         (tsubst_initializer_list): ... this.  Use convert_from_reference.
14917         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
14918         and current_base_init_list.
14919         (begin_function_definition): Don't call reinit_parse_for_function.
14921         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
14923         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
14924         correctly.
14926         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
14928 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
14930         * cp-tree.h (IF_COND): Move to c-common.h.
14931         (THEN_CLAUSE): Likewise.
14932         (ELSE_CLAUSE): Likewise.
14933         (WHILE_COND): Likewise.
14934         (WHILE_BODY): Likewise.
14935         (DO_COND): Likewise.
14936         (DO_BODY): Likewise.
14937         (RETURN_EXPR): Likewise.
14938         (EXPR_STMT_EXPR): Likewise.
14939         (FOR_INIT_STMT): Likewise.
14940         (FOR_COND): Likewise.
14941         (FOR_EXPR): Likewise.
14942         (FOR_BODY): Likewise.
14943         (SWITCH_COND): Likewise.
14944         (SWITCH_BODY): Likewise.
14945         (CASE_LOW): Likewise.
14946         (CASE_HIGH): Likewise.
14947         (GOTO_DESTINATION): Likewise.
14948         (COMPOUND_BODY): Likewise.
14949         (ASM_CV_QUAL): Likewise.
14950         (ASM_STRING): Likewise.
14951         (ASM_OUTPUTS): Likewise.
14952         (ASM_INPUTS): Likewise.
14953         (ASM_CLOBBERS): Likewise.
14954         (DECL_STMT_DECL): Likewise.
14955         (STMT_EXPR_STMT): Likewise.
14956         (LABEL_STMT_LABEL): Likewise.
14957         (SCOPE_BEGIN_P): Likewise.
14958         (SCOPE_END_P): Likewise.
14959         (SCOPE_STMT_BLOCK): Likewise.
14960         (SCOPE_NULLIFIED_P): Likewise.
14961         (SCOPE_NO_CLEANUPS_P): Likewise.
14962         (SCOPE_PARTIAL_P): Likewise.
14963         (ASM_VOLATILE_P): Likewise.
14964         (STMT_LINENO): Likewise.
14965         (STMT_LINENO_FOR_FN_P): Likewise.
14967         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
14968         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
14969         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
14970         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
14971         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
14973         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
14975         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
14976         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
14978         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
14979         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
14980         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
14982 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
14984         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
14985         * class.c (dfs_find_final_overrider): Set it appropriately.
14986         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
14987         avoid unneeded secondary vptrs.
14989 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
14991         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
14992         (check_bitfield_decl, check_field_decl): Likewise.
14993         (build_vtbl_or_vbase_field, build_base_field): Likewise.
14994         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
14995         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
14996         (xfer_tag, finish_enum): Likewise.
14997         * decl2.c (finish_builtin_type): Likewise.
14998         * init.c (init_init_processing): Likewise.
14999         * pt.c (instantiate_class_template): Likewise.
15000         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
15001         * cp-tree.h (struct lang_type): Add user_align member.
15002         (CLASSTYPE_USER_ALIGN): Define.
15004 2000-06-13  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
15006         * Make-lang.in (c++.install-common): Install g++-cross in
15007         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
15008         $(target_alias)-g++ and $(target_alias)-c++.
15010 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
15012         * class.c (vcall_offset_data_s): Add last_init and fns.
15013         (overrides): Rename to same_signature_p.
15014         (dfs_find_final_overrider): Adjust accordingly.
15015         (mark_overriders): Likewise.
15016         (warn_hidden): Likewise.
15017         (build_vtbl_initializer): Reorganize machinery for building things
15018         at negative offsets.
15019         (build_vcall_and_vbase_vtbl_entries): Likewise.
15020         (build_vbase_offset_vtbl_entries): Likewise.
15021         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
15022         offset entries.  Do not create two entries for functions with the
15023         same signature.
15024         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
15025         (build_rtti_vtbl_entries): Reorganize machinery for building things
15026         at negative offsets.
15028         * optimize.c (expand_call_inline): Don't recurse into the code
15029         used to initialize the parameters more than once.
15031 2000-06-11  Mark Mitchell <mark@codesourcery.com>
15033         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
15034         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
15035         (find_substitution): Only use the `Sa' substitution for
15036         std::allocator, not instantiations of it.
15037         (write_template_prefix): Move comment.  Only use a TREE_LIST to
15038         represent substitutions for a member template.
15039         (write_array_type): Mangle array dimensions correctly.
15040         * optimize.c (maybe_clone_body): Copy more information from the
15041         cloned function.
15042         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
15043         on the regenerated declaration.
15045 2000-06-11  Chip Salzenberg  <chip@valinux.com>
15046             Mark Mitchell <mark@codesourcery.com>
15048         * class.c (build_vtable): Clarify comment.
15049         (build_ctor_vtbl_group): Pass the most derived type to
15050         build_vtable.
15052 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15054         * decl2.c (compare_options): Don't needlessly cast away const-ness.
15056 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
15058         * decl.c (add_binding): Handle duplicate declarations of external
15059         variables.
15061 2000-06-09  Chip Salzenberg  <chip@valinux.com>
15062             Mark Mitchell <mark@codesourcery.com>
15064         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
15065         argument.
15066         (write_signed_number): New macro.
15067         (write_unsigned_number): Likewise.
15068         (write_source_name): Use them.
15069         (write_number): Handle signed and unsigned values.
15070         (write_integer_cst): Use tree_int_cst_sgn, and use
15071         write_unsigned_number or write_signed_number as appropriate.
15072         (write_discriminator): Use write_unsigned_number or
15073         write_signed_number as appropriate.
15074         (write_template_arg_literal): Likewise.
15075         (write_array_type): Use tree_low_cst.
15076         (write_template_parm):  Use write_unsigned_number or
15077         write_signed_number as appropriate.
15078         (write_substitution): Adjust call to write_number.
15079         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
15080         (write_expression): Handle non-type template arguments of
15081         reference type correctly.
15082         (mangle_thunk): Use write_signed_number.
15084 2000-06-09  Chip Salzenberg  <chip@valinux.com>
15086         * mangle.c (find_substition): Don't mangle objects with typename
15087         substitutions (e.g. "cin" as "Si").
15089 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
15091         * call.c (add_candidate): Use ggc_alloc_cleared.
15092         * decl.c (lookup_label): Likewise.
15093         * lex.c (retrofit_lang_decl): Likewise.
15095 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
15097         * semantics.c (expand_body): Push to TV_EXPAND.
15098         * optimize.c (optimize_function): Push to TV_INTEGRATION.
15099         * decl.c (start_function): Always call announce_function.
15101         * tinfo2.cc: Just declare abort.
15103 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
15105         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
15106         whenever @ is a symbolic name.
15108 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
15110         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
15112 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
15114         * decl.c (pushdecl): Look up functions by DECL_NAME, not
15115         DECL_ASSEMBLER_NAME.
15117 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
15119         * decl2.c (c_language): Define.
15121 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
15123         * lex.c (lang_init_options): Tweak.
15125         * decl2.c: Remove #inclusion of diagnostic.h
15126         (lang_decode_option): Move diagnostic formatting options to
15127         toplevel.
15129         * lang-options.h: Remove documentation for diagnostic options.
15131         * Makefile.in (lex.o): Depends upon diagnostic.h
15133 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
15135         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
15136         the same DECL_RESULT, it's not a redefinition.
15137         * pt.c (tsubst_decl): Remove code to handle illegal
15138         specializations.
15140 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
15142         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
15144 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
15146         * search.c (maybe_suppress_debug_info): Don't check
15147         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
15149         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
15150         here if extern_p.
15152         Remember instantiation context in deferred instantiations.
15153         * cp-tree.h (struct tinst_level): Remove.
15154         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
15155         * pt.c (current_tinst_level): Now a tree.
15156         (print_template_context, push_tinst_level, pop_tinst_level,
15157         tinst_for_decl): Adjust.
15158         (reopen_tinst_level): New fn.
15159         (init_pt): Register current_tinst_level as a root.
15160         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
15161         of the pending templates list.
15162         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
15163         * lex.c (extract_interface_info): Adjust.
15164         * decl2.c (warn_if_unknown_interface): Adjust.
15166 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
15168         * class.c (indirect_primary_base_p): New function.
15169         (determine_primary_base): Use it.
15171 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
15173         Update new-abi dynamic cast algorithm.
15174         * tinfo.cc (__class_type_info::__dyncast_result): Add
15175         whole_details. Adjust constructor.
15176         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
15177         Avoid unnecessary searching.
15178         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
15180 2000-06-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15182         * decl.c (init_decl_processing): Don't call record_component_aliases.
15183         * tree.c (build_cplus_array_type_1): Likewise.
15185 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
15187         * ir.texi: Correct typo.
15188         * mangle.c (write_expression): Handle non-type template arguments
15189         with reference type.
15190         * method.c (build_overload_value): Likewise.
15191         * pt.c (convert_nontype_argument): Explicitly represent conversion
15192         to a reference with an ADDR_EXPR.
15193         (unify): Always unify arguments in left-to-right order.
15195 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
15196             Mark Mitchell  <mark@codesourcery.com>
15198         * Make-lang.in (CXX_SRCS): Add mangle.c.
15199         * Makefile.in (CXX_OBJS): Add mangle.o.
15200         (mangle.o): New rule.
15202         * class.c (local_classes): New variable.
15203         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
15204         (get_vtt_name): Use mangle_vtt_name for new ABI.
15205         (init_class_processing): Initialize local_classes.
15206         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
15207         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
15208         (std_identifier): New macro.
15209         (DECL_VOLATILE_MEMFUNC_P): New macro.
15210         (DECL_NAMESPACE_STD_P): Likewise.
15211         (local_classes): Declare.
15212         (get_mostly_instantiated_function_type): Declare.
15213         (init_mangle): Declare.
15214         (mangle_decl): Likewise.
15215         (mangle_type_string): Likewise.
15216         (mangle_type): Likewise.
15217         (mangle_typeinfo_for_type): Likewise.
15218         (mangle_typeinfo_string_for_type): Likewise.
15219         (mangle_vtbl_for_type): Likewise.
15220         (mangle_vtt_for_type): Likewise.
15221         (mangle_ctor_vtbl_for_type): Likewise.
15222         (mangle_thunk): Likewise.
15223         (mangle_conv_op_name_for_type): Likewise.
15224         (mangle_guard_variable): Likewise.
15225         * decl.c (pushtag): Keep track of local classes.
15226         (initialize_predefined_identifiers): Initialize std_identifier.
15227         (init_decl_processing): Use std_identifier.
15228         (start_decl): Don't treat instantiations as specializations.
15229         (grokdeclarator): Likewise.
15230         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
15231         name for fully-instantiated templates.
15232         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
15233         destructors with the new ABI.
15234         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
15235         (grokfield): Use mangle_type for new ABI.
15236         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
15237         (get_sentry): Use mangle_guard_variable for new ABI.
15238         (start_static_initialization_or_destruction): Likewise.
15239         * expr.c (extract_aggr_init): Remove.
15240         (extract_scalar_init): Likewise.
15241         (extract_init): Remove #if 0'd code.
15242         * mangle.c: New function.
15243         * method.c (build_mangled_name): Assert not flag_new_abi.
15244         (build_static_name): Likewise.
15245         (build_decl_overload_real): Likewise.
15246         (build_typename_overload): Likewise.
15247         (build_overload_with_type): Likewise.
15248         (build_overload_name): Likewise.
15249         (get_ctor_vtbl_name): Likewise.
15250         (start_squangling): Likewise.
15251         (get_id_2): Likewise.
15252         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
15253         (init_method): Call init_mangle for new ABI.
15254         (make_thunk): Call mangle_thunk for new ABI.
15255         * operators.def: Correct new ABI manglings for the `%' operator.
15256         Add `::' operator.
15257         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
15258         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
15259         (lookup_template_class): Call mangle_decl for new ABI.
15260         (get_mostly_instantiated_function_type): New function.
15261         (set_mangled_name_for_template_decl): Use it.
15262         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
15263         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
15264         conversion op names.
15265         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
15266         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
15267         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
15268         mangle_typeinfo_string_for_type.
15270 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
15272         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
15273         (INNERMOST_TEMPLATE_ARGS): New macro.
15274         (innermost_args): Remove.
15275         (get_innermost_template_args): New function.
15276         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
15277         * error.c (dump_function_decl): Be caution when using
15278         most_general_template.
15279         * method.c (build_template_parm_names):  Use
15280         INNERMOST_TEMPLATE_ARGS.
15281         * pt.c (add_to_template_args): Tidy comment
15282         (get_innermost_template_args): New function.
15283         (check_explicit_specialization): Clear DECL_INITIAL for a new
15284         specialization.
15285         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
15286         Tidy.
15287         (push_template_decl): Always register specializations of the most
15288         general template.
15289         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
15290         (coerce_template_parms): Likewise.
15291         (lookup_template_class): Likewise.
15292         (innermost_args): Remove.
15293         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
15294         (tsubst_decl): Handle tricky specializations.  Use
15295         get_innermost_template_args.
15296         (instantiate_template): Simplify handling of partial
15297         instantiations.
15298         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
15299         (most_general_template): Reimplement, in a more straightforward
15300         manner.
15301         (regenerate_decl_from_template): Tweak formatting.  Use
15302         TMPL_ARGS_DEPTH for clarity.
15303         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
15305         * dump.c (dequeue_and_dump): Dump information about thunks.
15307 2000-06-01  Richard Henderson  <rth@cygnus.com>
15309         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
15311 2000-06-01  Richard Henderson  <rth@cygnus.com>
15313         * decl2.c (unsupported_options): Fix typo, make const.
15314         (lang_decode_option): Fix bsearch argument order.
15316 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
15318         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
15319         on FIELD_DECLs.
15321 2000-05-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15323         * cp-tree.h (c_get_alias_set): Deleted.
15324         * Makefile.in (decl.o): Include ../expr.h.
15325         * decl.c (expr.h): Include.
15326         (init_decl_processing): Call record_component_aliases for arrays.
15327         (grokdeclarator): Likewise.
15328         Set TREE_ADDRESSABLE for fields that aren't bitfields.
15329         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
15331 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
15333         Remove guiding declaration support.
15334         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
15335         (flag_guiding_decls): Remove.
15336         * call.c (build_user_type_conversion_1): Remove support for
15337         guiding decls.
15338         (build_new_function_call): Likewise.
15339         (build_new_op): Likewise.
15340         (build_new_method_call): Likewise.
15341         * decl.c (start_function): Likewise.
15342         * friend.c (is_friend): Likewise.
15343         (do_friend): Likewise.
15344         * decl2.c ((flag_dump_translation_unit): Make it const.
15345         (flag_guiding_decls): Remove.
15346         (unsupported_options): New variable
15347         (compare_options): New function.
15348         (lang_decode_option): Use them.
15350         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
15352         * method.c (mangle_expression): Adjust test for legal expression
15353         operators.
15355         * pt.c (instantiate_decl): Save and restore the local
15356         specializations list.
15358 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
15360         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
15362 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
15364         * call.c (add_template_candidate_real): Handle member template
15365         constructors for classes with virtual bases.
15366         (build_user_type_conversion_1): Use in_charge_arg_for_name.
15367         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
15369         * ir.texi: Update thunk documentation.
15371         * call.c (joust): Fix handling of overloaded builtin operators.
15373 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
15375         * cp-tree.h (DECL_ANTICIPATED): New macro.
15376         Document new use of DECL_LANG_FLAG_7.
15377         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
15378         in the user namespace.
15379         * lex.c (do_identifier): If the identifier's declaration has
15380         DECL_ANTICIPATED on, it has not yet been declared.  But do not
15381         replace it with an ordinary implicit declaration.
15383         * tinfo2.cc: Include stdlib.h.
15385 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
15387         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
15388         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
15389         CLASSTYPE_ALIGN.
15391 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
15393         * decl2.c (lang_decode_option): Use skip_leading_substring instead
15394         of plain strncmp.
15396 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
15398         * operators.def (<?): Duplicated, should have been...
15399         (>?): this.  Fixed.
15401 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
15402             Mark Mitchell  <mark@codesourcery.com>
15404         * cp-tree.h (ansi_opname): Make it a macro.
15405         (ansi_assopname): Likewise.
15406         (struct lang_decl_flags): Add assignment_operator_p.
15407         (struct lang_decl): Add operator_code.
15408         (DECL_VTT_PARM): Adjust.
15409         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
15410         overloaded operator.
15411         (SET_OVERLOADED_OPERATOR_CODE): New macro.
15412         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
15413         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
15414         (opname_tab): Remove.
15415         (assignop_tab): Likewise.
15416         (operator_name_info_t): New type.
15417         (operator_name_info): New variable.
15418         (assignment_operator_name_info): Likewise.
15419         (build_cp_library_fn): Remove declaration.
15420         (push_cp_library_fn): Likewise.
15421         (operator_name_string): Likewise.
15422         (build_decl_overload): Likewise.
15423         * call.c (print_z_candidates): Simplify.
15424         (build_object_call): Adjust usage of ansi_opname.  Use
15425         DECL_OVERLOADED_OPERATOR_P.
15426         (op_error): Adjust operator name lookup.
15427         (build_conditional_expr): Adjust usage of ansi_opname.
15428         (build_new_op): Likewise.
15429         (build_op_delete_call): Likewise.
15430         (build_over_call): Likewise.
15431         (joust): Use DECL_OVERLOADED_OPERATOR_P.
15432         * decl.c (duplicate_decls): Copy operator_code.
15433         (init_decl_processing): Adjust parameters to push_cp_library_fn.
15434         (builtin_function): Adjust parameters to build_library_fn_1.
15435         (build_library_fn_1): Accept an overloaded operator code.
15436         (build_library_fn): Pass ERROR_MARK.
15437         (build_cp_library_fn): Accept an overloaded operator code.
15438         (push_cp_library_fn): Likewise.
15439         (grokfndecl): Tweak.
15440         (grokdeclarator): Simplify code to compute names of overloaded
15441         operators.  Adjust use of ansi_opname.
15442         (ambi_op_p): Work on tree_codes, not identifiers.
15443         (unary_op_p): Likewise.
15444         (grok_op_properties): Likewise.
15445         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
15446         (lang_mark_tree): Don't try to mark the operator_code.
15447         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
15448         * error.c (dump_decl): Remove special handling for operator
15449         names.
15450         (dump_function_name): Likewise.
15451         (dump_expr): Adjust name lookup of operators.
15452         (op_to_string): Simplify.
15453         (assop_to_string): Likewise.
15454         * init.c (build_new_1): Adjust use of ansi_opname.
15455         * lex.c (opname_tab): Remove.
15456         (assignop_tab): Likewise.
15457         (ansi_opname): Likewise.
15458         (ansi_assopname): Likewise.
15459         (operator_name_string): Likewise.
15460         (reinit_lang_specific): Likewise.
15461         (operator_name_info): New variable.
15462         (assignment_operator_name_info): Likewise.
15463         (init_operators): New function.
15464         (init_parse): Use it.
15465         (do_identifier): Adjust use of ansi_opname.
15466         * method.c (mangle_expression): Don't use ansi_opname for
15467         mangling.
15468         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
15469         (build_decl_overload): Remove.
15470         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
15471         (do_build_assign_ref): Adjust use of ansi_opname.
15472         (synthesize_method): Likewise.
15473         (implicitly_declare_fn): Likewise.
15474         * operators.def: New file.
15475         * parse.y (operator): Adjust use of ansi_opname.
15476         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
15477         (set_mangled_name_for_template_decl): Don't play games with
15478         current_namespace.
15479         (special_function_p): Adjust use of ansi_opname.
15480         * typeck.c (check_return_expr): Likewise.
15481         * Make-lang.in (cc1plus): Depend on operators.def.
15482         * Makefile.in (lex.o): Likewise.
15483         (decl.o): Likewise.
15485 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
15487         * Make-lang.in (cplib2.ready): Eradicate.
15489 2000-05-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15491         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
15492         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
15493         (built_min, cp_tree_equal): Likewise.
15495 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
15497         * class.c (layout_nonempty_base_or_field): Replace
15498         `record_layout_info' with `record_layout_info_s'.
15500 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
15502         Fix goto checking.
15503         * cp-tree.h (struct language_function): x_named_labels is now
15504         a struct named_label_list*.
15505         * decl.c (struct named_label_use_list): Renamed from...
15506         (struct named_label_list): ...this.  New struct.
15507         (push_binding_level): Don't set eh_region.
15508         (note_level_for_eh): New fn.
15509         (pop_label): Take label and old value directly.
15510         (pop_labels): Adjust for new named_labels format.
15511         (lookup_label): Likewise.
15512         (poplevel): Note characteristics of a binding level containing a
15513         named label.  Mess with named label lists earlier.
15514         (mark_named_label_lists): New fn.
15515         (mark_lang_function): Call it.
15516         (use_label): New fn, split out from...
15517         (make_label_decl): ...here.  Don't call it.
15518         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
15519         check_previous_gotos): New fns, split out from...
15520         (define_label): ...here.
15521         (check_switch_goto): New fn.
15522         (define_case_label): Call it.
15523         (check_goto): New fn.
15524         * semantics.c (finish_goto_stmt): Call it and use_label.
15525         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
15526         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
15528 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
15530         * class.c (build_vtable_entry_ref): Correct usage of
15531         get_vtbl_decl_for_binfo.
15533         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
15534         * method.c (implicitly_declare_fn): Not here.
15536 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
15538         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
15539         (CPTI_PTMD_DESC_TYPE): ... here.
15540         (ptmd_desc_type_node): Rename to ...
15541         (ptm_desc_type_node): ... here.
15542         * decl.c: Likewise.
15543         * rtti.c (ptmd_initializer): Rename to ...
15544         (ptm_initializer): ... here.
15545         (sythesize_tinfo_var): Adjust. Deal with pointer to member
15546         function.
15547         (create_tinfo_types): Adjust.
15549 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
15551         Finish implementation of VTTs.
15552         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
15553         CPTI_VTT_PARM_IDENTIFIER.
15554         (vtt_parm_identifier): New macro.
15555         (vtt_parm_type): Likewise.
15556         (BINFO_SUBVTT_INDEX): Likewise.
15557         (BINFO_VPTR_INDEX): Likewise.
15558         (struct lang_decl): Add vtt_parm.
15559         (DECL_VTT_PARM): New macro.
15560         (DECL_USE_VTT_PARM): Likewise.
15561         (DECL_NEEDS_VTT_PARM_P): Likewise.
15562         (get_vtt_name): Declare.
15563         (build_artificial_parm): Likewise.
15564         (fixup_all_virtual_upcast_offsets): Likewise.
15565         (expand_indirect_vtbls_init): Remove.
15566         * call.c (build_new_method_call): Pass the vtt to subobject
15567         constructors and destructors.
15568         * class.c (get_vtt_name): Give it external linkage.
15569         (build_clone): Handle the magic VTT parameters for clones.
15570         (clone_function_decl): Fix typo in comment.
15571         (build_vtt): Keep track of the indices in the VTTs where various
15572         entities are stored.
15573         (build_vtt_inits): Likewise.
15574         (dfs_build_vtt_inits): Likewise.
15575         (build_ctor_vtbl_group): Tweak type of construction vtables.
15576         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
15577         primary bases, when building construction vtables.
15578         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
15579         (initialize_predefined_identifiers): Add vtt_parm_identifier.
15580         (init_decl_processing): Initialize vtt_parm_type.
15581         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
15582         (lang_mark_tree): Make vtt_parm.
15583         * decl2.c (build_artificial_parm): New function.
15584         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
15585         (grokclassfn): Use build_artificial_parm.
15586         * init.c (initialize_vtbl_ptrs): Call
15587         fixup_all_virtual_upcast_offsets directly.
15588         (perform_member_init): Use the complete subobject destructor for
15589         member cleanups.
15590         (build_vtbl_address): New function.
15591         (expand_virtual_init): Handle VTTs.
15592         * optimize (maybe_clone_body): Likewise.
15593         * search.c (fixup_all_virtual_upcast_offsets): Give it external
15594         linkage.
15595         (expand_indirect_vtbls_init): Remove.
15596         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
15597         * tree.c (make_binfo): Make them bigger.
15599 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
15601         * inc/cxxabi.h (__pbase_type_info): Define, based on
15602         __pointer_type_info.
15603         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
15604         (__pointer_to_member_type_info): Likewise.
15605         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
15606         (__pointer_to_member_type_info::__is_pointer_p): Remove.
15607         (__pointer_type_info::__do_catch): Rename to ...
15608         (__pbase_type_info::__do_catch): ... here. Adjust.
15609         (__pbase_type_info::__pointer_catch): Implement.
15610         (__pointer_type_info::__pointer_catch): Adjust.
15611         (__pointer_to_member_type_info::__pointer_catch): Adjust.
15613 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
15615         * tinfo.h (__user_type_info::contained_virtual_p): New
15616         predicate.
15617         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
15618         shaped hierarchy.
15619         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
15620         diamond shaped hierarchy. Add early out for mixed diamond and
15621         duplicate shaped hierarchy.
15623 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
15625         * cp-tree.h (build_delete): Change prototype.
15626         (build_vec_delete): Likewise.
15627         * call.c (build_scoped_method_call): Use special_function_kind
15628         values to indicate the kind of destruction to be done.
15629         (build_method_call): Likewise.
15630         * decl.c (finish_destructor_body): Likewise.
15631         (maybe_build_cleanup_1): Likewise.  Rename to ...
15632         (maybe_build_cleanup): ... this.
15633         * decl2.c (delete_sanity): Use special_function_kind
15634         values to indicate the kind of destruction to be done.
15635         (build_cleanup): Likewise.
15636         * init.c (perform_member_init): Likewise.
15637         (build_vec_delete_1): Likewise.
15638         (build_dtor_call): Simplify.
15639         (build_delete): Use special_function_kind
15640         values to indicate the kind of destruction to be done.
15641         (build_vbase_delete): Likewise.
15642         (build_vec_delete): Likewise.
15644         * init.c (sort_member_init): Fix typo in error message generation
15645         code.
15647 2000-05-15  Donald Lindsay  <dlindsay@cygnus.com>
15649         * semantics.c (begin_class_definition): make the packed
15650         attribute be sensitive to the "-fpack-struct" command line flag
15652 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
15654         Update new-abi upcast algorithm.
15655         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
15656         prototype and meaning of return value.
15657         (__si_class_type_info::__do_upcast): Likewise.
15658         (__vmi_class_type_info::__do_upcast): Likewise.
15659         * tinfo.cc (__class_type_info::__upcast_result): Replace
15660         whole2dst with part2dst. Adjust ctor.
15661         (__class_type_info::__do_upcast): Adjust call of worker function.
15662         (__class_type_info::__do_upcast): Adjust.
15663         (__si_class_type_info::__do_upcast): Adjust. Use parent's
15664         __do_upcast.
15665         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
15666         virtual base in diamond hierarchy bug.
15668 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
15670         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
15671         and bitfield to tinfo_fn_p.
15672         (DECL_TINFO_FN_P): Adjust.
15673         (SET_DECL_TINFO_FN_P): Likewise.
15674         (DECL_MUTABLE_P): Likewise.
15675         (DECL_C_BIT_FIELD): Likewise.
15676         (SET_DECL_C_BIT_FIELD): Likewise.
15677         (CLEAR_DECL_C_BIT_FIELD): Likewise.
15678         (DECL_UNINLINABLE): Likewise.
15679         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
15680         (handle_using_decl): Remove assertion.
15681         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
15682         to build FIELD_DECLs.
15683         (build_base_field): Likewise.
15684         (layout_class_type): Likewise.
15685         * decl.c (init_decl_processing): Likewise.
15686         (build_ptrmemfunc_type): Likewise.
15687         (grokdeclarator): Likewise.
15688         * decl2.c (grok_x_components): Likewise.
15689         * except.c (call_eh_info): Likewise.
15690         * init.c (init_init_processing): Likewise.
15691         * rtti.c (expand_class_desc): Likewise.
15692         (create_pseudo_type_info): Likewise.
15693         (get_vmi_pseudo_type_info): Likewise.
15694         (create_tinfo_types): Likewise.
15695         * ptree.c (print_lang_decl): Adjust.
15696         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
15697         before checking DECL_MUTABLE_P.
15699         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
15700         parameters for template functions.
15701         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
15702         destructors as well as constructors.
15704 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
15706         * class.c (build_ctor_vtbl_group): Set inits.
15707         * optimize.c (maybe_clone_body): Set DECL_INLINE and
15708         DECL_THIS_INLINE appropriately for clones.
15710         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
15711         (DECL_CONV_FN_P): Simplify.
15712         (DECL_OPERATOR): Remove.
15713         (language_to_string): Declare.
15714         * decl.c (duplicate_decls): Fix typo in comment.
15715         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
15716         (grok_op_properties): Use DECL_CONV_FN_P instead of
15717         IDENTIFIER_TYPENAME_P.
15718         * dump.c (dequeue_and_dump): Dump the language linkage of
15719         declarations.
15720         * error.c (language_to_string): Give it external linkage.
15721         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
15722         (implicitly_declare_fn): Set DECL_LANGUAGE.
15723         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
15724         IDENTIFIER_TYPENAME_P.
15725         (tsubst_decl): Likewise.
15726         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
15727         * semantics.c (finish_member_declaration): Don't mark members of
15728         classes declared in an extern "C" region as extern "C".
15730 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15732         * decl2.c (qualified_lookup_using_namespace): Look through
15733         namespace aliases.
15735         * decl.c (push_using_decl): Return the old decl on namespace level.
15737 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
15739         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
15740         (VTT_NAME_PREFIX): New macro.
15741         (CTOR_VTBL_NAME_PREFIX): Likewise.
15742         (get_ctor_vtbl_name): New function.
15743         * class.c (get_vtable_name): Simplify.
15744         (get_vtt_name): New function.
15745         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
15746         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
15747         when a virtual base becomes primary.
15748         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
15749         VTTs.
15750         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
15751         additional parameters.
15752         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
15753         (initialize_array): New function.
15754         (build_vtt): Likewise.
15755         (build_vtt_inits): Likewise.
15756         (dfs_build_vtt_inits): Likewise.
15757         (dfs_fixup_binfo_vtbls): Likewise.
15758         (build_ctor_vtbl_group): Likewise.
15759         (initialize_vtable): Use initialize_array.
15760         (accumulate_vtbl_inits): Reimplement to handle construction
15761         vtables.
15762         (dfs_accumulate_vtbl_inits): Likewise.
15763         (bulid_vtbl_initializer): Adjust parameter name.
15764         * method.c (build_typename_overload): Remove #if 0'd code.
15765         (get_ctor_vtbl_name): New function.
15766         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
15767         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
15769         * cp-tree.h (struct lang_type): Remove search_slot.
15770         (CLASSTYPE_SEARCH_SLOT): Remove.
15771         (emit_base_init): Change prototype.
15772         (initialize_vtbl_ptrs): Likewise.
15773         (expand_indirect_vtbls_init): Likewise.
15774         (clear_search_slots): Remove.
15775         * decl.c (lang_mark_tree): Don't mark search_slot.
15776         * init.c (initialize_vtbl_ptrs): Simplify.
15777         (emit_base_init): Likewise.
15778         * search.c (struct vbase_info): Document decl_ptr.
15779         (convert_pointer_to_single_level): Remove.
15780         (dfs_find_vbases): Remove.
15781         (dfs_init_base_pointers): Simplify.
15782         (dfs_clear_vbase_slots): Remove.
15783         (dfs_vtable_path_unmark): New function.
15784         (init_vbase_pointers): Simplify.
15785         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
15786         (expand_indirect_vtbls_init): Simplify.  Don't call
15787         mark_all_temps_used.
15788         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
15789         initialize_vtbl_ptrs.
15791 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
15793         * except.c: Add static prototypes.
15795 2000-05-20  H.J. Lu  <hjl@gnu.org>
15797         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
15799 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
15801         Don't create a separate copy of virtual bases for the
15802         CLASSTYPE_VBASECLASSES list.
15803         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
15804         (BINFO_FOR_VBASE): Remove.
15805         (CANONICAL_BINFO): Adjust.
15806         (binfo_for_vbase): New function.
15807         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
15808         instead of BINFO_FOR_VBASE.
15809         (build_vbase_pointer): Likewise.
15810         (build_secondary_vtable): Likewise.
15811         (dfs_mark_primary_bases): Likewise.
15812         (mark_primary_bases): Likewise.
15813         (layout_nonempty_base_or_field): Likewise.
15814         (dfs_set_offset_for_shared_vbases): Likewise.
15815         (dfs_set_offset_for_unshared_vbases): Likewise.
15816         (layout_virtual_bases): Likewise.  Adjust for changes to the
15817         CLASSTYPE_VBASECLASSES list.
15818         (dump_class_hierarchy_r): Use binfo_for_vbase
15819         instead of BINFO_FOR_VBASE.
15820         (dump_class_hierarchy): Likewise.
15821         (finish_vtbls): Likewise.
15822         (build_vtbl_initializer): Adjust for changes to the
15823         CLASSTYPE_VBASECLASSES list.
15824         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
15825         * decl.c (finish_destructor_body): Adjust for changes to the
15826         CLASSTYPE_VBASECLASSES list.
15827         * init.c (sort_base_init): Use binfo_for_vbase.
15828         (construct_virtual_bases): Adjust for changes to the
15829         CLASSTYPE_VBASECLASSES list.
15830         (expand_member_init): Use binfo_for_vbase.
15831         (build_vbase_delete):  Adjust for changes to the
15832         CLASSTYPE_VBASECLASSES list.
15833         * method.c (do_build_copy_constructor): Likewise.
15834         * rtti.c (get_base_offset): Use binfo_for_vbase.
15835         (expand_class_desc): Remove #if 0'd code.
15836         * search.c (struct vbase_info): Remove vbase_types.
15837         (get_base_distance):  Use binfo_for_vbase.
15838         (lookup_field_queue_p): Use CANONICAL_BINFO.
15839         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
15840         (get_pure_virtuals): Adjust for changes to the
15841         CLASSTYPE_VBASECLASSES list.
15842         (dfs_find_vbases): Use binfo_for_vbase.
15843         (dfs_init_vbase_pointers): Likewise.
15844         (init_vbase_pointers): Don't initialize vi.vbase_types.
15845         (virtual_context): Use binfo_for_vbase.
15846         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
15847         CLASSTYPE_VBASECLASSES list.
15848         (expand_indirect_vtbls_init): Simplify.
15849         (dfs_get_vbase_types): Don't replicate virtual bases.
15850         (find_vbase_instance): Use binfo_for_vbase.
15851         (binfo_for_vbase): New function.
15852         * typeck.c (get_delta_difference): Use binfo_for_vbase.
15854 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
15856         * decl2.c (finish_anon_union): Generalize error messages to handle
15857         anonymous structures.
15858         * init.c (perform_member_init): Remove `name' parameter.
15859         (build_field_list): New function.
15860         (sort_member_init): Handle anonymous union initialization order
15861         correctly.  Check for multiple initializations of the same union.
15862         (emit_base_init): Don't look up fields by name here.
15863         (expand_member_init): Record the result of name lookup for future
15864         reference.
15865         * typeck.c (build_component_ref): Fix formatting.
15867 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
15869         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
15870         * typeck.c (build_x_compound_expr): Replace warn_unused with
15871         warn_unused_value.
15873         * decl2.c (lang_decode_option): Update -Wall unused flags by
15874         calling set_Wunused.
15876 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
15878         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
15879         * init.c (dfs_vtable_path_unmark): Remove.
15880         * search.c (marked_new_vtable_p): Likewise.
15881         (unmarked_new_vtable_p): Likewise.
15882         (dfs_search_slot_nonempty_p): Likewise.
15883         (dfs_mark): Likewise.
15884         (dfs_vtable_path_unmark): Likewise.
15885         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
15886         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
15887         (dfs_init_vbase_pointers): Remove special-case new ABI code.
15888         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
15889         (init_vbase_pointers): Simplify.
15890         (expand_indirect_vtbls_init): Likewise.
15892         * class.c (copy_virtuals): New function.
15893         (build_primary_table): Use it.
15894         (build_secondary_vtable): Likewise.
15895         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
15896         indicate that no vcall offset is required.
15897         (add_virtual_function): Likewise.
15898         (modify_all_vtables): Likewise.
15899         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
15900         (dfs_accumulate_vtbl_inits): Likewise.
15901         (build_vtbl_initializer): Make changes to handle construction
15902         vtables.
15903         (dfs_build_vcall_offset_vtbl_entries): Likewise.
15904         (build_rtti_vtbl_entries): Likewise.
15905         (build_vtable_entries): Handle a NULL vcall_index.
15907 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
15909         * decl2.c (lang_decode_option): Fix thinko.
15911 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
15913         * except.c (check_handlers): New fn.
15914         * cp-tree.h: Declare it.
15915         * semantics.c (finish_handler_sequence): Call it.
15916         (finish_function_handler_sequence): Likewise.
15917         (finish_handler_parms): Set TREE_TYPE on the handler.
15918         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
15919         * search.c (get_base_distance_recursive): If protect>1, ignore
15920         special access.
15921         (get_base_distance): Don't reduce watch_access.
15923 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
15925         * lex.c: #include diagnostic.h.
15926         (lang_init_options): Set default prefixing rules.
15928         * lang-options.h: Add -fdiagnostics-show-location=.
15930         * decl2.c: #include diagnostic.h.
15931         (lang_decode_option): Handle -fdiagnostics-show-location=.
15933 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
15935         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
15936         * vec.cc: Revert my 2000-05-07 change.
15938 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
15940         * class.c (check_field_decls): Complain about non-static data
15941         members with same name as class in class with constructor.
15943 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
15945         * decl.c (grokdeclarator): Allow non-static data members with
15946         same name as class.
15948 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
15950         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
15951         and pending_inline.filename.  Update prototypes.
15952         * decl.c (define_label): Constify filename parameter.
15953         * decl2.c (warn_if_unknown_interface): Constify local char *.
15954         * input.c Constify input_source.filename. Don't declare
15955         input_filename or lineno.  Constify filename parameter to feed_input.
15956         * lex.c (init_parse): Constify parameter and return value.
15957         (cp_pragma_interface, cp_pragma_implementation): Constify
15958         filename argument.
15959         (reinit_parse_for_method, reinit_parse_for_block,
15960         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
15961         Constify local char *.
15962         * pt.c: Don't declare lineno or input_filename.
15963         (print_template_context, tsubst_friend_function, tsubst_decl,
15964         tsubst, instantiate_decl): Constify local char *.
15965         * semantics.c (expand_body): Constify local char *.
15966         * tree.c (build_srcloc): Constify filename parameter.
15967         * typeck.c (c_expand_asm_operands): Constify filename
15968         parameter.
15970 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
15972         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
15973         offsetof expansion.
15975 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
15977         * inc/cxxabi.h:  Fix typos in comment.
15978         (__base_class_info::__offset): Use a static_cast.
15980 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
15982         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
15983         of std::size_t and std::ptrdiff_t respectively.
15984         * tinfo.cc: Likewise.
15985         * vec.cc: Likewise.
15987 2000-05-06  Richard Henderson  <rth@cygnus.com>
15989         * typeck.c (build_c_cast): Don't warn integer->pointer size
15990         mismatch for constants.
15992 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
15994         * rtti.c (ptmd_initializer): Set non-public, if class is
15995         incomplete.
15997         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
15998         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
15999         __cxa_vec_delete): Likewise.
16000         * tinfo.cc (__dynamic_cast): Likewise.
16001         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
16002         __cxa_vec_delete): Likewise.
16004 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
16006         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
16007         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
16008         (lang_decl_flags): Add vcall_offset.
16009         (THUNK_VCALL_OFFSET): Use it.
16010         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
16011         * method.c (make_thunk): Create the lang_decl here, not in
16012         emit_thunk.
16013         (emit_thunk): Make generic thunks into ordinary functions once
16014         they have been fed to expand_body.
16015         * semantics.c (expand_body): Set current_function_is_thunk here.
16017 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16019         * class.c (update_vtable_entry_for_fn): Prototype.
16021         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
16022         and `tmpl'.
16024         * search.c (dfs_build_inheritance_graph_order): Prototype.
16026 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
16028         * cp-tree.h (special_function_kind): Add various kinds of
16029         destructors.
16030         (special_function_p): New function.
16031         * class.c (overrides): Don't let one kind of destructor override
16032         another.
16033         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
16034         whether or not to instantiate a template.
16035         * tree.c (special_function_p): Define.
16037 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
16039         * cp-tree.def (THUNK_DECL): Remove.
16040         * cp-tree.h (DECL_THUNK_P): New macro.
16041         (DECL_NON_THUNK_FUNCTION_P): Likewise.
16042         (DECL_EXTERN_C_FUNCTION_P): Likewise.
16043         (SET_DECL_THUNK_P): Likewise.
16044         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
16045         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
16046         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
16047         * decl.c (decls_match): Use DECL_EXTERN_C_P.
16048         (duplicate_decls): Likewise.
16049         (pushdecl): Likewise.  Adjust thunk handling.
16050         (grokfndecl): Use DECL_EXTERN_C_P.
16051         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
16052         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
16053         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
16054         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
16055         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
16056         DECL_NO_STATIC_CHAIN.
16057         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
16058         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
16059         * search.c (covariant_return_p): Remove THUNK_DECL handling.
16060         * ir.texi: Update.
16062 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
16064         * tree.c (walk_tree): Set lineno.
16066 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
16068         * exception.cc: Update license notice.
16069         * new.cc: Likewise.
16070         * new1.cc: Likewise.
16071         * new2.cc: Likewise.
16072         * tinfo.cc: Likewise.
16073         * tinfo2.cc: Likewise.
16074         * vec.cc: Likewise.
16075         * inc/cxxabi.h: Likewise.
16076         * inc/exception: Likewise.
16077         * inc/new: Likewise.
16078         * inc/new.h: Likewise.
16079         * inc/typeinfo: Likewise.
16081 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
16083         * tree.c (build_target_expr_with_type): If we already have a
16084         TARGET_EXPR, just return it.
16086         * optimize.c (initialize_inlined_parameters): Don't generate an
16087         EXPR_STMT if we can just use DECL_INITIAL.
16088         * decl.c (emit_local_var): Only make the initialization a
16089         full-expression if stmts_are_full_exprs_p.
16091 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
16093         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
16094         macro.
16095         * call.c (standard_conversion): Use it.
16096         (direct_reference_binding): Likewise.
16097         (build_over_call): Likewise.
16098         (is_properly_derived_from): Likewise.
16099         (compare_ics): Likewise.
16100         * class.c (resolves_to_fixed_type_p): Likewise.
16101         * optimize.c (declare_return_variable): Likewise.
16102         * pt.c (is_specialization_of): Likewise.
16103         (unify): Likewise.
16104         * typeck.c (comp_target_parms): Likeiwse.
16105         (build_static_cast): Likewise.
16106         (build_reinterpret_cast): Likewise.
16107         (build_const_cast): Likewise.
16108         (comp_ptr_ttypes_real): Likewise.
16109         (comp_ptr_ttypes_const): Likewise.
16110         * typeck2.c (process_init_constructor): Likewise.
16112 2000-04-30  Scott Snyder <snyder@fnal.gov>
16114         * decl.c (finish_destructor_body): Use the base destructor when
16115         destroying virtual bases.
16117 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
16119         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
16120         STMT_EXPRs.
16121         * optimize.c (struct inline_data): Add target_exprs field.
16122         (declare_return_variable): When a function returns an aggregate,
16123         use the variable declared in the TARGET_EXPR as the remapped
16124         DECL_RESULT.
16125         (expand_call_inline): Update the pending target_exprs stack.
16126         (optimize_function): Initialize the stack.
16128         * decl2.c (finish_file): Fix typo in comment.
16130         * method.c (emit_thunk): Don't try to return a `void' value.
16132         * optimize.c (initialize_inlined_parameters): If the parameter is
16133         addressable, we need to make a new VAR_DECL, even if the
16134         initializer is constant.
16136 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
16138         * decl.c (grok_op_properties): Add an extra check of argtypes.
16140 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
16142         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
16143         variables.
16144         (initialize_inlined_parameters): Try to avoid creating new
16145         VAR_DECLs.
16147 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
16149         * lex.c (my_get_run_time): Remove.
16150         (init_filename_times): Use get_run_time instead of my_get_run_time.
16151         (check_newline): Likewise.
16152         (dump_time_statistics): Likewise.
16153         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
16154         of computing elapsed time explicitly.
16156 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
16158         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
16159         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
16160         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
16161         before calling decl_constant_value.
16162         * class.c (check_bitfield_decl): Likewise.
16163         * cvt.c (ocp_convert): Likewise.
16164         (convert): Likewise.
16165         * decl.c (compute_array_index_type): Likewise.
16166         (build_enumerator): Likewise.
16167         * decl2.c (check_cp_case_value): Likewise.
16168         * pt.c (convert_nontype_argument): Likewise.
16169         (tsubst): Likewise.
16170         * typeck.c (decay_conversion): Likewise.
16171         (build_compound_expr): Likewise.
16172         (build_reinterpret_cast): Likewise.
16173         (build_c_cast): Likewise.
16174         (convert_for_assignment): Likewise.
16176 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
16178         * decl.c (finish_function): Don't play games with DECL_INLINE.
16180 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
16182         * ir.texi: Correct typo.
16184 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16186         * decl.c (grokdeclarator): Reject VLAs as members.
16188 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
16190         * call.c (standard_conversion): Accept conversion between
16191         COMPLEX_TYPEs.
16193         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
16195 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
16197         * decl2.c (finish_file): Remove double setup for accounting
16198         compile time.
16200 2000-04-24  Robert Lipe <robertlipe@usa.net>
16202         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
16204 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
16206         * new.cc (set_new_handler): Needs to be in std::.
16208 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
16210         * cp-tree.h (lang_decl): Remove pretty_function_p.
16211         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
16212         language-specific node.
16213         * decl.c (cp_make_fname_decl): Use build_decl, not
16214         build_lang_decl, to build the variables.
16215         (grokvardecl): Don't call build_lang_decl for local variables in
16216         templates.
16217         (grokdeclarator): Don't call build_lang_decl for local type
16218         declarations in templates.
16219         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
16220         zero'd memory, rather than calling memset.
16221         * pt.c: Include hashtab.h.
16222         (local_specializations): New variable.
16223         (retrieve_local_specialization): Use it.
16224         (register_local_specialization): Likewise.
16225         (tsubst_decl): Don't assume local variables have
16226         DECL_LANG_SPECIFIC.
16227         (instantiate_decl): Set up local_specializations.
16228         * Makefile.in (HTAB_H): New variable.
16230 2000-04-23  Richard Henderson  <rth@cygnus.com>
16232         * typeck.c (c_expand_asm_operands): Restore the original
16233         contents of the output list.
16235 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
16237         * ir.texi:  Document complex number representation.
16239 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
16241         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
16242         (target_incomplete_p): New function.
16243         (tinfo_base_init): Create comdat NTBS name variable.
16244         (ptr_initializer): Add non_public parameter. Calculate it.
16245         (ptmd_initializer): Likewise.
16246         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
16247         (create_real_tinfo_var): Add non_public parameter. Use it.
16248         Push proxy into global namespace.
16249         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
16250         New enumeration.
16251         * inc/typeinfo (type_info::before, type_info::operator==):
16252         Compare __name addresses.
16254         * tinfo2.cc: Remove new-abi builtins comment.
16256 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
16258         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
16260         * call.c (joust): Exit early if we get the same function, too.
16262         * decl2.c (key_method): Return NULL_TREE for template classes.
16263         (import_export_class): Don't need to check for template classes.
16265 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
16267         * lex.c: Remove references to cccp.c.
16269 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
16271         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
16272         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
16273         (DECL_DESTRUCTOR_P): Use destructor_attr.
16274         (DECL_CONST_MEMFUNC_P): Reimplement.
16275         (DECL_VOLATILE_MEMFUNC_P): Remove.
16276         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
16277         (overrides): Use DECL_DESTRUCTOR_P.
16278         (check_for_override): Likewise.
16279         * decl.c (start_function): Likewise.
16280         * decl2.c (grokfclassfn): Likewise.
16281         (check_classfn): Likewise.
16282         (grok_function_init): Likewise.
16284 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
16286         * decl2.c (grokfield): Issue error on illegal data member
16287         declaration.
16289 2000-04-17  Mark P Mitchell  <mark@codesourcery.com>
16291         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
16293 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
16295         * class.c (build_vtable_entry): Don't build thunks for type-info
16296         functions.
16298 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
16300         * decl.c (decls_match): Allow a redeclaration of a builtin to
16301         specify args while the builtin did not.
16303 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
16305         * cp-tree.def (THUNK_DECL): Add to documentation.
16306         * cp-tree.h (flag_huge_objects): Declare.
16307         * class.c (modify_vtable_entry): Tidy.
16308         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
16309         Calculate delta appropriately for the new ABI.
16310         (dfs_modify_vtables): Use it.
16311         (modify_all_vtables): Fix thinko in code to add overriding copies
16312         of functions to primary vtables.
16313         (build_clone): Fix typo in comment.
16314         (clone_function_decl): Correct order of destructors in vtable.
16315         (build_vbase_offset_vtbl_entries): Adjust comment.
16316         (dfs_vcall_offset_queue_p): Remove.
16317         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
16318         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
16319         (build_vtable_entry): Correct check for pure virtual functions.
16320         Don't declare flag_huge_objects.
16321         * decl.c (flag_huge_objects): Remove declaration.
16322         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
16323         Use int_size_in_bytes.
16324         (emit_thunk): Handle vcall offset thunks.
16326 2000-04-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16328         * decl2.c (parse_time, varconst_time): Delete declarations.
16329         (finish_file): Delete LINENO declaration.
16330         START_TIME and THIS_TIME now long.
16332 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
16334         * class.c (build_base_field): Reformat comment.
16336         * inc/cxxabi.h (stddef.h): Comment inclusion.
16337         (__base_class_info::__offset): Comment shift.
16339 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
16341         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
16342         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
16343         (cp_push_exception_identifier): New macro.
16344         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
16345         (DECL_BASE_DESTRUCTOR_P): Likewise.
16346         (DECL_DELETING_DESTRUCTOR_P): Likewise.
16347         (get_vtbl_decl_for_binfo): Fix formatting.
16348         (in_charge_arg_for_name): New macro.
16349         (maybe_build_cleanup_and_delete): Remove declaration.
16350         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
16351         (in_charge_arg_for_name): New function.
16352         (build_new_method_call): Use it.  Handle cloned destructors.
16353         (build_clone): Don't make the base constructor virtual.
16354         Automatically defer generated functions.
16355         (clone_function_decl): Handle destructors, too.
16356         (clone_constructors_and_destructors): Likewise.
16357         (create_vtable_ptr): Don't create a vtable entry for a cloned
16358         function.
16359         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
16360         (initialize_predefined_identifiers): Update appropriately.
16361         (finish_destructor_body): Simplify.
16362         (maybe_build_cleanup_and_delete): Remove.
16363         * except.c (expand_throw): Handle new-ABI destructors.
16364         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
16365         (build_dtor_call): New function.
16366         (build_delete): Use it.  Simplify.
16367         * optimize.c (maybe_clone_body): Handle destructors.
16368         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
16370         * exception.cc (cleanup_fn): New typedef.
16371         (CALL_CLEANUP): New macro.
16372         (cp_eh_info): Use them.
16373         (__cp_push_exception): Likewise.
16374         (__cp_pop_exception): Likewise.
16376 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
16378         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
16379         (complete_dtor_identifier): New macro.
16380         (CLASSTYPE_FIRST_CONVERSION): Remove.
16381         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
16382         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
16383         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
16384         (CLASSTYPE_CONSTRUCTORS): Likewise.
16385         (CLASSTYPE_DESTRUCTORS): Likewise.
16386         (lang_decl): Add cloned_function.
16387         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
16388         (DECL_BASE_CONSTRUCTOR_P): Likewise.
16389         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
16390         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
16391         (DECL_CLONED_FUNCTION_P): Likewise.
16392         (DECL_CLONED_FUNCTION): Likewise.
16393         (clone_function_decl): Declare.
16394         (maybe_clone_body): Likewise.
16395         * call.c (build_user_type_conversion_1): Call complete object
16396         constructors in the new ABI.
16397         (build_new_method_call): Don't add in-charge parameters under the
16398         new ABI.
16399         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
16400         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
16401         CLASSTYPE_DESTRUCTOR_SLOT.
16402         (build_clone): New function.
16403         (clone_function_decl): Likewise.
16404         (clone_constructors_and_destructors): Likewise.
16405         (check_bases_and_members): Use it.
16406         * decl.c (iniitialize_predefined_identifiers): Initialize
16407         complete_dtor_identifier.
16408         (finish_function): Don't add extra code to a clone.
16409         (lang_mark_tree): Mark cloned_function.
16410         * decl2.c (mark_used): Don't bother trying to instantiate things
16411         we synthesized.
16412         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
16413         * method.c (set_mangled_name_for_decl): Don't treat clones as
16414         constructors.
16415         (synthesize_method): Sythesize cloned functions, not the clones.
16416         * optimize.c (inline_data): Update comment on ret_label.
16417         (remap_block): Don't assume DECL_INITIAL exists.
16418         (copy_body_r): Allow ret_label to be NULL.
16419         (maybe_clone_body): Define.
16420         * pt.c (tsubst_decl): Handle clones.
16421         (instantiate_clone): New function.
16422         (instantiate_template): Use it.
16423         (set_mangled_name_for_template_decl): Don't treat clones as
16424         constructors.
16425         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
16426         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
16427         * semantics.c (expand_body): Clone function bodies as necessary.
16429         * optimize.c (remap_decl): Avoid sharing structure for arrays
16430         whose size is only known at run-time.
16431         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
16433         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
16434         to has_in_charge_parm_p.
16435         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
16436         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
16437         (DECL_COPY_CONSTRUCTOR_P): New macro.
16438         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
16439         (build_user_type_conversion_1): Likewise.
16440         (convert_like_real): Likewise.
16441         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
16442         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
16443         (copy_args_p): Likewise.
16444         (grok_ctor_properties): Likewise.
16445         (start_function): Likewise.
16446         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
16447         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
16448         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
16449         * method.c (do_build_copy_constructor): Use
16450         DECL_HAS_IN_CHARGE_PARM_P.
16451         (synthesize_method): Likewise.
16452         * pt.c (instantiate_template): Remove goto.
16453         * tree.c (build_cplus_method_type): Remove mention of obstacks in
16454         comment.
16456         * cp-tre.h (finish_function): Change prototype.
16457         * decl.c (end_cleanup_fn): Adjust caller.
16458         (finish_function): Take only one parameter.
16459         * decl2.c (finish_objects): Adjust caller.
16460         (finish_static_storage_duration_function): Likewise.
16461         * method.c (emit_thunk): Likewise.
16462         * parse.y: Likewise.
16463         * parse.c: Regenerated.
16464         * pt.c (instantiate_decl): Likewise.
16465         * rtti.c (synthesize_tinfo_fn): Likewise.
16466         * semantics.c (expand_body): Likewise.
16468         * cp-tree.h (copy_decl): New function.
16469         * class.c (finish_struct_1): Use it.
16470         * lex.c (copy_decl): Define it.
16471         * pt.c (tsubst_decl): Likewise.
16472         * tree.c (copy_template_template_parm): Likewise.
16474         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
16475         has_nonpublic_assign_ref.
16476         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
16477         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
16478         * class.c (finish_struct_methods): Don't set
16479         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
16480         (interface_only): Don't declare.
16481         (interface_unknown): Likewise.
16483 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16485         * tree.h (HAVE_TEMPLATES): Remove definition.
16486         * lang-options.h (-fthis-is-variable): Remove documentation.
16488 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
16490         * class.c (instantiate_type): Handle object-relative template-id.
16492         * semantics.c (finish_expr_stmt): Call convert_to_void here.
16493         * decl.c (cplus_expand_expr_stmt): Not here.
16495         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
16496         Initialize exprtype earlier.
16498         * parse.y (fn.def1): Check for defining types in return types.
16500         * decl.c (check_tag_decl): Notice extra fundamental types.
16501         Diagnose empty decls in classes, too.
16503         * decl.c (grokdeclarator): Don't override an anonymous name if no
16504         declarator was given.
16506         * cvt.c (convert_to_void): Call resolve_offset_ref.
16508         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
16510         * decl2.c (decl_namespace): Handle getting a type.
16512         * typeck.c (build_c_cast): Re-enable warning for cast between
16513         pointer and integer of different size.
16515 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
16517         * inc/cxxabi.h (__pointer_type_info): Add restrict and
16518         incomplete flags.
16519         (__pointer_type_info::__pointer_catch): New virtual function.
16520         (__pointer_to_member_type_info): Derive from
16521         __pointer_type_info. Adjust.
16522         (__pointer_to_member_type_info::__do_catch): Remove.
16523         (__pointer_to_member_type_info::__is_pointer_p): Declare.
16524         (__pointer_to_member_type_info::__pointer_catch): Declare.
16525         * rtti.c (qualifier_flags): Add restrict flag.
16526         (ptmd_initializer): Reorder members.
16527         (create_tinfo_types): Expand comments. Reorder
16528         ptmd_desc_type_node members.
16529         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
16530         Implement.
16531         (__pointer_type_info::__do_catch): Move specific code into
16532         __pointer_catch. Call it.
16533         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
16534         specific catch checking. Fix void conversion check.
16535         (__pointer_to_member_type_info::__do_catch): Remove.
16536         (__pointer_to_member_type_info::__pointer_catch): Implement.
16538 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16540         * lex.c (init_parse): Remove traces of classof and headof.
16541         * decl2.c (flag_operator_names): Default to 1.
16542         (lang_decode_option): Do not set it for -ansi.
16544 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
16546         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
16547         (DECL_MAIN_VARIANT): Remove.
16548         * decl.c (duplicate_decls): Don't set it.
16549         (start_function): Likewise.
16550         (lang_mark_tree): Don't mark it.
16551         * decl2.c (defer_fn): Don't use it.
16552         * lex.c (retrofit_lang_decl): Don't set it.
16553         * pt.c (tsubst_decl): Likewise.
16554         * ptree.c (print_lang_decl): Don't print it.
16555         * typeck.c (mark_addressable): Don't use it.
16557 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
16559         * vec.cc: Include <new> and <exception>.
16560         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
16561         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
16562         terminate.
16563         (__cxa_vec_delete): Catch dtor exceptions.
16565 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
16567         Prepend __ to implementation defined names.
16568         * inc/typeinfo (type_info): Rename _name to __name.
16569         (type_info::type_info): Rename parameter.
16570         (type_info::operator==, type_info::operator!=,
16571         type_info::before): Likewise.
16572         (type_info::is_pointer_p, type_info::is_function_p,
16573         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
16574         parameters.
16575         * inc/cxxabi.h
16576         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
16577         (__pointer_type_info::__pointer_type_info): Likewise.
16578         (__pointer_type_info::is_pointer_p,
16579         __pointer_type_info::do_catch): Prepend __. Rename parameters.
16580         (__array_type_info::__array_type_info): Rename parameters.
16581         (__function_type_info::__function_type_info): Likewise.
16582         (__function_type_info::is_function_p): Prepend __.
16583         (__enum_type_info::__enum_type_info): Rename parameters.
16584         (__pointer_to_member_type_info::__pointer_to_member_type_info):
16585         Likewise.
16586         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
16587         parameters.
16588         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
16589         (__class_type_info::__class_type_info): Rename parameters.
16590         (__class_type_info::sub_kind): Prepend __. Adjust member names.
16591         (__class_type_info::upcast_result,
16592         __class_type_info::dyncast_result): Prepend __. Move definition
16593         into tinfo.cc.
16594         (__class_type_info::do_upcast, __class_type_info::do_catch,
16595         __class_type_info::find_public_src,
16596         __class_type_info::do_dyncast,
16597         __class_type_info::do_find_public_src): Prepend __. Rename
16598         parameters.
16599         (__si_class_type_info::__si_class_type_info): Rename parameters.
16600         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
16601         __si_class_type_info::do_find_public_src): Prepent __. Rename
16602         parameters.
16603         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
16604         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
16605         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
16606         parameters.
16607         (__dynamic_cast): Rename parameters.
16608         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
16609         type_info::do_catch, type_info::do_upcast): Prepend __.
16610         (contained_p, public_p, virtual_p, contained_public_p,
16611         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
16612         (__class_type_info::do_catch,
16613         __class_type_info::do_upcast): Prepend __. Adjust.
16614         (__class_type_info::__upcast_result,
16615         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
16616         Adjust.
16617         (__class_type_info::find_public_src): Prepend __. Adjust.
16618         (__class_type_info::do_find_public_src,
16619         __si_class_type_info::do_find_public_src,
16620         __vmi_class_type_info::do_find_public_src): Likewise.
16621         (__class_type_info::do_dyncast,
16622         __si_class_type_info::do_dyncast,
16623         __vmi_class_type_info::do_dyncast): Likewise.
16624         (__class_type_info::do_upcast,
16625         __si_class_type_info::do_upcast,
16626         __vmi_class_type_info::do_upcast): Likewise.
16627         (__dynamic_cast): Adjust.
16628         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
16629         (__function_type_info::is_function_p): Likewise.
16630         (__pointer_type_info::do_catch): Likewise. Adjust.
16631         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
16632         (__throw_type_match_rtti_2): Adjust.
16633         (__is_pointer): Adjust.
16635 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
16637         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
16638         (complete_ctor_identifier): New macro.
16639         (special_function_kind): Add sfk_copy_constructor and
16640         sfk_assignment_operator.
16641         (LOOKUP_HAS_IN_CHARGE): Remove.
16642         (cons_up_default_function): Rename to ...
16643         (implicitly_declare_fn): ... this.
16644         * call.c (build_new_method_call): Add in-charge parameters for
16645         constructors here.
16646         * class.c (add_implicitly_declared_members): Change parameter name
16647         from cant_have_assignment to cant_have_const_assignment.
16648         Replace calls to cons_up_default_function to implicitly_declare_fn.
16649         * cvt.c (ocp_convert): Use complete_ctor_identifier.
16650         * decl.c (initialize_predefined_identifiers): Initialize it.
16651         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
16652         complex expression.
16653         * init.c (expand_default_init): Don't calculate the in-charge
16654         parameter here.
16655         (build_new_1): Likewise.
16656         * lex.c (cons_up_default_function): Move to method.c.
16657         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
16658         (implicitly_declare_fn): New function.
16659         * typeck.c (build_static_cast): Use complete_ctor_identifier.
16660         (build_modify_expr): Likewise.
16661         * typeck2.c (build_functional_cast): Likewise.
16663         Under the new ABI, constructors don't return `this'.
16664         * cp-tree.h (warn_reorder): Declare.
16665         (special_function_kind): New enum.
16666         (global_base_init_list): Remove declaration.
16667         (emit_base_init): Don't return a value.
16668         (check_base_init): Don't declare.
16669         (is_aggr_typedef): Likewise.
16670         * decl.c (check_special_function_return_type): New function.
16671         (return_types): Remove.
16672         (grokdeclarator): Use check_special_function_return_type.
16673         (start_function): Don't initialize ctor_label under the new ABI.
16674         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
16675         * init.c (begin_init_stmts): Move to top of file.
16676         (finish_init_stmts): Likewise.
16677         (warn_reorder): Don't declare.
16678         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
16679         value.
16680         (check_base_init): Remove.
16681         (is_aggr_typedef): Likewise.
16682         (build_new_1): Don't use the return value of a constructor.
16683         * semantics.c (setup_vtbl_ptr): Don't use the return value
16684         of emit_base_init.
16685         * typeck.c (check_return_expr): Don't magically convert return
16686         statements into `return this' in constructors under the new ABI.
16688         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
16689         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
16690         (base_ctor_identifier): New macro.
16691         (base_dtor_identifier): Likewise.
16692         (deleting_dtor_identifier): Likewise.
16693         * decl.c: Don't include obstack.h.
16694         (obstack_chunk_alloc): Don't define.
16695         (obstack_chunk_free): Likewise.
16696         (struct predefined_identifier): New type.
16697         (initialize_predefined_identifiers): New function.
16698         (init_decl_processing): Use it.
16699         (debug_temp_inits): Remove.
16700         (start_method): Don't call preserve_data.
16701         (hack_incomplete_structures): Update comment.
16702         * init.c (init_init_processing): Don't initialize
16703         nelts_identifier.
16704         (build_offset_rf): Remove dead code.
16705         (build_delete): Use CLASSTYPE_N_BASECLASSES.
16706         * search.c (init_search_processing): Don't initialize
16707         vptr_identifier.
16709 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16711         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
16712         some sign_compare warnings.
16714 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
16716         Rename abi::__vmi_class_type_info members.
16717         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
16718         base_list, detail_masks members to vmi_flags, vmi_base_count,
16719         vmi_bases and vmi_flags_masks respectively.
16720         (__vmi_class_type_info::vmi_flags_masks): Rename
16721         details_unknown_mask to flags_unknown_mask.
16722         * tinfo.cc (__class_type_info::do_upcast): Adjust.
16723         (__vmi_class_type_info::do_find_public_src): Adjust.
16724         (__vmi_class_type_info::do_dyncast): Adjust.
16725         (__vmi_class_type_info::do_upcast): Adjust.
16727 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
16729         * tinfo.cc (convert_to_base): New function.
16730         (get_vbase_offset): Remove. Move into convert_to_base.
16731         (__vmi_class_type_info::do_find_public_src): Adjust.
16732         (__vmi_class_type_info::do_dyncast): Adjust.
16733         (__vmi_class_type_info::do_upcast): Adjust.
16735 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
16737         * tinfo.cc (operator=): Use __builtin_strcmp.
16738         * tinfo2.cc (before): Likewise.
16740 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
16742         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
16743         (DECL_SAVED_INLINE): Rename to ...
16744         (DECL_DEFERRED_FN): ... this.
16745         (in_function_p): Remove declaration.
16746         (mark_inline_for_output): Rename to ...
16747         (defer_fn): ... this.
16748         * decl.c (finish_function): Adjust call to mark_inline_for_output.
16749         (in_function_p): Remove definition.
16750         * decl2.c (saved_inlines): Rename to ...
16751         (deferred_fns): ... this.
16752         (saved_inlines_used): Rename to ...
16753         (deferred_fns_used): ... this.
16754         (mark_inline_for_output): Rename to ...
16755         (defer_fn): ... this.
16756         (finish_file): Adjust accordingly.
16757         (init_decl2): Likewise.
16758         * lex.c (cons_up_default_function): Likewise.
16759         * pt.c (mark_decl_instantiated): Likewise.
16760         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
16761         circumstances.
16762         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
16763         * semantics.c (expand_body): Defer more functions.
16765 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
16767         * vec.cc: New file.
16768         * Make-lang.in (CXX_LIB2FUNCS): Add it.
16769         (vec.o): Build it.
16770         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
16771         __cxa_vec_delete): Declare.
16773 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
16775         * rtti.c (dfs_class_hint_mark): New static function.
16776         (dfs_class_hint_unmark): New static function.
16777         (class_hint_flags): Use them.
16779 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
16781         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
16783 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
16785         * cp-tree.h (instantiate_decl): Change prototype.
16786         * decl2.c (mark_used): Adjust call.
16787         * optimize.c (inlinable_function_p): Adjust handling of templates.
16788         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
16789         (do_type_instantiation): Likewise.
16790         (instantiate_decl): Defer more templates.
16791         (instantiate_pending_templates): Adjust logic to handle inline
16792         friend functions.
16794         * Makefile.in (GGC_H): New variable.  Use it throughout in place
16795         of ggc.h.
16797         * call.c: Don't include obstack.h.  Include ggc.h.
16798         (obstack_chunk_alloc): Don't define.
16799         (obstack_chunk_free): Likewise.
16800         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
16801         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
16802         (pop_switch): Free it.
16804         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
16806         * dump.c (dequeue_and_dump): Don't try to print the bit_position
16807         if we don't have a DECL_FIELD_OFFSET.
16809 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
16811         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
16812         special_function_p.
16814 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16816         * cfns.gperf (hash, libc_name_p): Prototype.
16818         * rtti.c (build_dynamic_cast_1): Constification.
16820         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
16822         * semantics.c (deferred_type_access_control): Prototype.
16824 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
16826         Correct many new ABI issues regarding vbase and vcall offset
16827         layout.
16828         * cp-tree.h (BINFO_VTABLE): Document.
16829         (struct lang_type): Tweak formatting.
16830         (BINFO_PRIMARY_BINFO): Add to documentation.
16831         (CLASSTYPE_VSIZE): Fix typo in comment.
16832         (CLASSTYPE_VBASECLASSES): Update documentation.
16833         (BINFO_VBASE_MARKED): Remove.
16834         (SET_BINFO_VBASE_MARKED): Likewise.
16835         (CLEAR_BINFO_VBASE_MARKED): Likewise.
16836         (BINFO_FIELDS_MARKED): Remove.
16837         (SET_BINFO_FIELDS_MARKED): Likewise.
16838         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
16839         (enum access_kind): New enumeration.
16840         (num_extra_vtbl_entries): Remove declaration.
16841         (size_extra_vtbl_entries): Likewise.
16842         (get_vtbl_decl_for_binfo): New function.
16843         (dfs_vbase_unmark): Remove declaration.
16844         (mark_primary_bases): Likewise.
16845         * class.c (SAME_FN): Remove.
16846         (struct vcall_offset_data_s): Move definition.
16847         (build_vbase_pointer): Use `build', not `build_binary_op', to
16848         access the vbase pointer under the new ABI.
16849         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
16850         (build_primary_vtable): Likewise.
16851         (dfs_mark_primary_bases): Move here from search.c.
16852         (mark_primary_bases): Likewise.
16853         (determine_primary_bases): Under the new ABI, don't make a base
16854         class a primary base just because we don't yet have any virtual
16855         functions.
16856         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
16857         (num_vfun_entries): Remove.
16858         (dfs_count_virtuals): Likewise.
16859         (num_extra_vtbl_entries): Likewise.
16860         (size_extra_vtbl_entries): Likewise.
16861         (layout_virtual_bases): Iterate in inheritance graph order under
16862         the new ABI.
16863         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
16864         indicate that a vfield is present.
16865         (init_class_processing): Initialize access_public_node, etc., from
16866         ak_public, etc.
16867         (get_vtbl_decl_for_binfo): New function.
16868         (dump_class_hierarchy_r): Likewise.
16869         (dump_class_hierarchy): Use it.
16870         (finish_vtbls): Build the vtbls in inheritance graph order.
16871         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
16872         (initialize_vtable): Use get_vtbl_decl_for_binfo.
16873         (accumulate_vtbl_inits): Add comments explaining why a pre-order
16874         walk is required.
16875         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
16876         where the vptr points, even for primary vtables.
16877         (build_vtbl_initializer): Adjust handling of vbase and vcall
16878         offsets.
16879         (build_vcall_and_vbase_vtable_entries): New function.
16880         (dfs_build_vbase_offset_vtbl_entries): Remove.
16881         (build_vbase_offset_vtbl_entries): Reimplement.
16882         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
16883         were already handled in a primary base class vtable.
16884         (build_vcall_offset_vtbl_entries): Adjust.
16885         (build_rtti_vtbl_entries): Adjust.
16886         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
16887         * init.c (expand_virtual_init): Simplify.
16888         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
16889         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
16890         * search.c (BINFO_ACCESS): New macro.
16891         (SET_BINFO_ACCESS): Likewise.
16892         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
16893         (access_in_type): Likewise.
16894         (dfs_accessible_p): Likewise.
16895         (protected_accessible_p): Likewise.
16896         (lookup_fnfields_1): Adjust documentation.
16897         (dfs_mark_primary_bases): Move to class.c
16898         (mark_primary_bases): Likewise.
16899         (dfs_vbase_unmark): Remove.
16900         (virtual_context): Use BINFO_FOR_VBASE.
16901         (dfs_get_vbase_types): Simplify.
16902         (dfs_build_inheritance_graph_order): New function.
16903         (get_vbase_types): Use it.
16904         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
16906         * tinfo.cc (get_vbase_offset): New function.
16907         (__vmi_class_type_info::do_find_public_src): Use it.
16908         (__vmi_class_type_info::do_dyncast): Likewise.
16909         (__vmi_class_type_info::do_upcast): Likewise.
16911 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
16913         * lang-specs.h: Pass -fno-show-column to the preprocessor.
16915 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
16917         * rtti.c (class_hint_flags): Rename flags.
16918         (class_initializer): Remove flags.
16919         (synthesize_tinfo_var): Combine offset and flags. Add flags
16920         for __vmi_class_type_info.
16921         (create_tinfo_types): Remove flags from __class_type_info and
16922         __si_class_type_info. Merge flags and offset from
16923         base_class_type_info.
16924         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
16925         (__base_class_info::is_virtual_p): Adjust.
16926         (__base_class_info::is_public_p): Adjust.
16927         (__base_class_info::offset): New accessor.
16928         (__class_type_info::details): Remove member.
16929         (__class_type_info::__class_type_info): Lose details.
16930         (__class_type_info::detail_masks): Remove.
16931         (__si_class_type_info::__si_class_type_info): Lose details.
16932         (__vmi_class_type_info::details): New member.
16933         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
16934         (__vmi_class_type_info::detail_masks): New member.
16935         * tinfo.cc (__class_type_info::do_upcast): Initialize result
16936         with unknown_details_mask.
16937         (__vmi_class_type_info::do_find_public_src): Adjust
16938         (__vmi_class_type_info::do_dyncast): Adjust.
16939         (__vmi_class_type_info::do_upcast): Set result details, if
16940         needed. Adjust.
16941         (__dynamic_cast): Temporarily #if out optimization.
16943 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
16945         * rtti.c (get_tinfo_decl): Mark used.
16946         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
16947         mark as dealt with, if we output it.
16949 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
16951         * class.c: Reorganize to put virtual function table initialization
16952         machinery at the end of the file.
16954 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
16956         * class.c (finish_struct): Use bitsize_zero_node.
16957         * pt.c (instantiate_class_template): Likewise.
16959 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
16961         Put RTTI entries at negative offsets in new ABI.
16962         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
16963         vbase offset at index -3, not -1.
16964         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
16965         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
16966         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
16967         (build_rtti_vtbl_entries): New function.
16968         (set_rtti_entry): Remove.
16969         (build_primary_vtable): Don't use it.
16970         (build_secondary_vtable): Likewise.
16971         (start_vtable): Remove.
16972         (first_vfun_index): New function.
16973         (set_vindex): Likewise.
16974         (add_virtual_function): Don't call start_vtable.  Do call
16975         set_vindex.
16976         (set_primary_base): Rename parameter.
16977         (determine_primary_base): Likewise.
16978         (num_vfun_entries): Don't use skip_rtti_stuff.
16979         (num_extra_vtbl_entries): Include RTTI information.
16980         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
16981         (skip_rtti_stuff): Remove.
16982         (dfs_modify_vtables): Don't use it.
16983         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
16984         (layout_nonempty_base_or_field): Update size handling.
16985         (create_vtable_ptr): Tweak.
16986         (layout_class_type): Adjust parameter names.
16987         (finish_struct_1): Simplify.
16988         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
16989         (skip_rtti_stuff): Remove.
16990         (first_vfun_index): New function.
16991         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
16992         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
16993         (marked_vtable_pathp): Declare.
16994         (unmarked_vtable_pathp): Likewise.
16995         * error.c (dump_expr): Use first_vfun_index to calculate vtable
16996         offsets.
16997         * rtti.c (build_headof): Look for RTTI at negative offsets.
16998         (get_tinfo_decl_dynamic): Likewise.
16999         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
17000         here.
17001         (create_pseudo_type_info): Do it here instead.  Adjust so that
17002         vptr points at first virtual function.
17003         * search.c (marked_vtable_pathp): Make it global.
17004         (unmarked_vtable_pathp): Likewise.
17005         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
17006         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
17007         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
17008         (get_pure_virtuals): Likewise.
17009         (expand_upcast_fixups): Likewise.
17010         * tree.c (debug_binfo): Likewise.
17011         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
17012         negative offset.
17014 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17016         * class.c (check_field_decl): Fix typo.
17017         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
17018         (check_methods): Likewise.
17019         (check_field_decls): Likewise.
17020         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
17021         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
17022         Use DECL_RESULT_FLD, not DECL_RESULT.
17023         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
17024         * lex.c (identifier_type): Likewise.
17025         * pt.c (determine_specialization, lookup_template_class): Likewise.
17026         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
17027         (resolve_overloaded_unification, more_specialized): Likewise.
17028         * semantics.c (finish_member_declaration): Likewise.
17029         * typeck.c (build_x_function_call): Likewise.
17031 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
17033         * class.c (layout_empty_base): Handle empty bases with non-byte
17034         alignment.
17035         (build_base_field): Likewise.
17036         (layout_virtual_bases): Likewise.
17038         * class.c (finish_struct_1): Fix typo in this change:
17040         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17042 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
17044         * decl.c (grokdeclarator): Count partial specializations when
17045         keeping track of how many template classes have been seen.
17047         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
17049 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17051         * class.c (build_vbase_pointer_fields): layout_field now place_field.
17052         (get_vfield_offset): Use byte_position.
17053         (set_rtti_entry): Set OFFSET to ssizetype zero.
17054         (get_binfo_offset_as_int): Deleted.
17055         (dfs_record_base_offsets): Use tree_low_cst.
17056         (dfs_search_base_offsets): Likewise.
17057         (layout_nonempty_base_or_field): Reflect changes in RLI format
17058         and call byte_position.
17059         (layout_empty_base): Convert offset to ssizetype.
17060         (build_base_field): use rli_size_unit_so_far.
17061         (dfs_propagate_binfo_offsets): Do computation in proper type.
17062         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
17063         (layout_class_type): Reflect changes in RLI names and fields.
17064         (finish_struct_1): Set DECL_FIELD_OFFSET.
17065         * dump.c (dequeue_and_dump): Call bit_position.
17066         * expr.c (cplus_expand_constant): Use byte_position.
17067         * rtti.c (expand_class_desc): Use bitsize_one_node.
17068         * typeck.c (build_component_addr): Use byte_position and don't
17069         special case for zero offset.
17071 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
17073         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
17075         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
17076         tinfo object.
17077         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
17078         vtable.
17080 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
17082         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
17083         DECL_P macros.
17084         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
17085         make_typename_type, check_initializer, cp_finish_decl,
17086         xref_tag): Likewise.
17087         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
17088         decl_namespace, arg_assoc_template_arg, arg_assoc,
17089         validate_nonmember_using_decl, do_class_using_decl): Likewise.
17090         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
17091         args_to_string): Likewise.
17092         * friend.c (is_friend): Likewise.
17093         * lex.c (note_got_semicolon, note_list_got_semicolon,
17094         is_global): Likewise.
17095         * method.c (build_overload_nested_name, build_overload_value,
17096         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
17097         * parse.y (typename_sub, typename_sub1): Likewise.
17098         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
17099         process_partial_specialization, convert_template_argument,
17100         template_args_equal, add_pending_template, lookup_template_class,
17101         for_each_template_parm_r, maybe_fold_nontype_arg,
17102         tsubst, instantiate_template, type_unification_real, unify,
17103         instantiate_pending_templates, set_mangled_name_for_template_decl):
17104         Likewise.
17105         * repo.c (repo_get_id, repo_template_used): Likewise.
17106         * search.c (lookup_field_1): Likewise.
17107         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
17108         * xref.c (classname): Likewise.
17110 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
17112         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
17113         (CANONICAL_BINFO): New macro.
17114         (BINFO_NEW_VTABLE_MARKED): Use it.
17115         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
17116         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
17117         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
17118         not TREE_TYPE.
17119         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
17120         (build_secondary_vtable): Likewise.
17121         (dfs_finish_vtbls): Likewise.
17122         (dfs_accumulate_vtbl_inits): Likewise.
17123         (accumulate_vtbl_inits): New function.
17124         (finish_vtbls): Make sure that virtual bases come after
17125         non-virtual bases in the vtable group.
17126         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
17127         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
17128         * search.c (struct vbase_info): Move definition.
17129         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
17130         (unmarked_new_vtable_p): Likewise.
17131         (dfs_mark_vtable_path): Remove.
17132         (dfs_mark_new_vtable): Remove.
17133         (dfs_unmark_new_vtable): Likewise.
17134         (dfs_clear_search_slot): Likewise.
17135         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
17136         (dfs_clear_vbase_slots): Likewise.
17137         (init_vbase_pointers): LIkewise.
17139 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
17141         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
17142         SIZETYPE to a non-SIZETYPE.
17144 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
17146         * class.c (layout_virtual_bases): Adjust names in conditionally
17147         compiled code.
17149         * class.c (record_base_offsets): New function.
17150         (layout_conflict_p): Likewise.
17151         (layout_nonempty_base_or_field): Use it.
17152         (layout_empty_base): New function.
17153         (build_base_field): Use it.
17154         (build_base_fields): Update comment.
17155         (layout_virtual_bases): Fold in a little code form
17156         layout_basetypes.  Use layout_empty_base.
17157         (layout_basetypes): Remove.
17158         (end_of_class): New function.
17159         (layout_class_type): Use it.  Adjust.
17161         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
17162         (fntype_p): Remove.
17163         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
17164         comment.
17165         (dfs_skip_nonprimary_vbases_markedp): Likewise.
17166         * typeck.c (fntype_p): Remove.
17168         * cp-tree.h (TI_SPEC_INFO): Remove.
17169         (CLASSTYPE_TI_SPEC_INFO): Likewise.
17170         * pt.c (process_partial_specialization): Likewise.
17172         * class.c (build_base_field): Fix thinko in computation of binfo
17173         offsets.
17175         * tree.c (mark_local_for_remap_p): Mark variables declared in
17176         TARGET_EXPRs as well.
17178 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
17180         * typeck.c (require_complete_type, complete_type,
17181         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
17182         build_array_ref, convert_arguments, pointer_diff,
17183         build_x_unary_op, build_unary_op, build_c_cast,
17184         build_modify_expr): Use COMPLETE_TYPE_P etc.
17185         * call.c (is_complete, convert_like_real,
17186         build_new_method_call): Likewise.
17187         * class.c (build_vbase_pointer_fields, check_bases,
17188         build_base_field, finish_struct_1, pushclass): Likewise.
17189         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
17190         * decl.c (maybe_process_template_type_declaration, pushtag,
17191         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
17192         layout_var_decl, check_initializer, cp_finish_decl,
17193         grokdeclarator, require_complete_types_for_parms,
17194         grok_op_properties, xref_tag, xref_basetypes,
17195         check_function_type): Likewise.
17196         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
17197         * friend.c (do_friend): Likewise.
17198         * init.c (build_offset_ref): Likewise.
17199         * parse.y (structsp): Likewise.
17200         * pt.c (maybe_process_partial_specialization,
17201         tsubst_friend_function, instantiate_class_template, tsubst,
17202         do_type_instantiation, instantiate_pending_templates): Likewise.
17203         * repo.c (repo_get_id): Likewise.
17204         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
17205         synthesize_tinfo_var, emit_support_tinfos): Likewise.
17206         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
17207         * semantics.c (begin_class_definition): Likewise.
17208         * tree.c (build_cplus_method_type): Likewise.
17209         * typeck2.c (digest_init, build_functional_cast,
17210         add_exception_specifier): Likewise.
17211         * parse.h, parse.c: Regenerated.
17213 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
17215         * inc/cxxabi.h: New header file. Define new-abi entry points.
17216         (__pointer_type_info::target): Rename member to ...
17217         (__pointer_type_info::type): ... here.
17218         (__base_class_info::type): Rename member to ...
17219         (__base_class_info::base): ... here.
17220         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
17221         * cp-tree.h (CPTI_ABI): New global tree enumeration.
17222         (abi_node): New global tree node.
17223         * decl.c (abi_node): Document.
17224         (init_decl_processing): Initialize abi_node.
17225         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
17226         (get_vmi_pseudo_type_info): Likewise.
17227         (create_tinfo_types): Likewise.
17228         (emit_support_tinfos): Likewise.
17229         * tinfo.h (cxxabi.h): Include for new-abi.
17230         Move rtti class definitions to new header file.
17231         * tinfo.cc (abi): Use the namespace.
17232         (std): Move new abi rtti classes from here ...
17233         (__cxxabiv1): ... to here.
17234         * tinfo2.cc (cxxabi.h): Include for new-abi.
17235         Move rtti class definitions to new header file.
17236         (std): Move new abi rtti classes from here ...
17237         (__cxxabiv1): ... to here.
17238         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
17239         namespace.
17241 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
17242             Jason Merrill  <jason@casey.cygnus.com>
17244         * method.c (build_overload_int): Use host_integerp.
17246 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
17248         * init.c (build_offset_ref): Handle the case of a templated member
17249         function.
17251 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17253         * except.c (expand_exception_blocks): Clear catch_clauses_last.
17255 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
17257         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
17258         * class.c (check_bitfield_decl): Turn illegal bitfields into
17259         non-bitfields.
17260         (dfs_propagate_binfo_offsets): Adjust for new size_binop
17261         semantics.
17262         (dfs_offset_for_unshared_vbases): Likewise.
17263         * cvt.c (cp_convert_to_pointer): Convert NULL to a
17264         pointer-to-member correctly under the new ABI.
17265         * expr.c (cplus_expand_constant): Don't use cp_convert when
17266         turning an offset into a pointer-to-member.
17267         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
17268         when dereferencing them under the new ABI.
17269         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
17270         of pointers-to-members under the new ABI.
17272         * class.c (check_bitfield_decl): Remove restriction on really long
17273         bitfields.
17274         (layout_class_type): Implement new ABI handling of bitfields
17275         longer than their types.
17277 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17279         * parse.y (extdefs): Call ggc_collect.
17280         * parse.c: Regenerated.
17282 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
17284         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
17285         (note_name_declared_in_class): Use OVL_CURRENT to get at a
17286         potential overload.
17288 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17290         * class.c (build_vbase_path): Use integer_zerop.
17291         (build_vtable_entry): Use tree_low_cst.
17292         (get_vfield_offset): Use bit_position.
17293         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
17294         Use tree_low_cst.
17295         (check_bitfield_decl): Set DECL_SIZE using convert.
17296         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
17297         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
17298         Use tree_low_cst.
17299         (finish_struct_1): Use bit_position.
17300         (dump_class_hierarchy): Use tree_low_cst.
17301         * cp-tree.h (min_precision): Add declaration.
17302         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
17303         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
17304         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
17305         * expr.c (cplus_expand_constant): Use bit_position.
17306         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
17307         * rtti.c (get_base_offset): Use bit_position.
17308         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
17309         host_integerp, and tree_low_cst.
17310         (pointer_int_sum): Use integer_zerop.
17311         (build_component_addr): Use bit_position.
17313 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
17315         * typeck.c (require_complete_type): Don't assume size_zero_node.
17316         (complete_type_or_else): Likewise.
17318 2000-03-16  Steven Grady <grady@digitaldeck.com>
17319             Jason Merrill  <jason@casey.cygnus.com>
17321         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
17323 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
17325         * decl2.c (grokfield): Bail out if type is error_mark_node.
17327 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
17329         * tinfo2.cc (__ptr_to_member_data): Rename to ...
17330         (__pointer_to_member_data): ... here. Adjust.
17331         * rtti.c (create_tinfo_types): Adjust.
17333 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
17335         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
17336         * decl.c (ref_desc_type_node): Undocument.
17337         * rtti.c (ptr_ref_initializer): Rename to ...
17338         (ptr_initializer): ... here. Adjust comments.
17339         (ptmd_initializer): Fix comment thinko.
17340         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
17341         (create_tinfo_types): Remove ref_desc_type_node init.
17342         * tinfo2.cc (__reference_type_info): Remove.
17344 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
17346         * decl.c (cp_finish_decl): Remove obsolete comment.
17348         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
17350 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
17352         * cp-tree.h: Tweak documentation.
17353         * class.c (build_vbase_pointer_fields): Layout the fields, too.
17354         (avoid_overlap): Remove.
17355         (get_binfo_offset_as_int): New function.
17356         (dfs_serach_base_offsets): Likewise.
17357         (layout_nonempty_base_or_field): Likewise.
17358         (build_base_field): Layout fields here.  Avoid placing two objects
17359         of the same type at the same address, under the new ABI.
17360         (build_base_fields): Adjust accordingly.
17361         (create_vtable_ptr): Return the new field, but don't attach it to
17362         TYPE_FIELDS.
17363         (remove_base_field): Remove.
17364         (remove_base_fields): Remove.
17365         (layout_basetypes): Adjust accordingly.
17366         (layout_class_type): Call layout_field for each field, rather than
17367         just making a wholesale call to layout_type.
17369 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
17371         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
17373 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
17375         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
17377         * except.c (dtor_nothrow): New fn.
17378         (do_pop_exception): Use it.  Take type parm.
17379         (push_eh_cleanup): Take type parm.
17380         (expand_start_catch_block): Pass it.
17381         (build_eh_type_type_ref): Accept null type.
17383 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
17385         * cp-tree.h (revert_static_member_fn): Change prototype.
17386         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
17387         (grok_op_properties): Likewise.
17388         (start_function): Likewise.
17389         (revert_static_member_fn): Simplify.
17390         * pt.c (check_explicit_specialization): Adjust call to
17391         revert_static_member_fn.
17393 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
17395         * cp-tree.h (scope_kind): New type.
17396         (tmpl_spec_kind): Likewise.
17397         (declare_pseudo_global_level): Remove.
17398         (pseudo_global_level_p): Rename to template_parm_scope_p.
17399         (pushlevel): Remove declaration.
17400         (begin_scope): New function.
17401         (finish_scope): Likewise.
17402         (current_tmpl_spec_kind): Likewise.
17403         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
17404         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
17405         Add template_spec_p.
17406         (toplevel_bindings_p): Adjust.
17407         (declare_pseudo_global_level): Remove.
17408         (pseudo_global_level_p): Rename to template_parm_scope_p.
17409         (current_tmpl_spec_kind): New function.
17410         (begin_scope): Likewise.
17411         (finish_scope): Likewise.
17412         (maybe_push_to_top_level): Adjust.
17413         (maybe_process_template_type_declaration): Likewise.
17414         (pushtag): Likewise.
17415         (pushdecl_nonclass_level): Likewise.
17416         (lookup_tag): Likewise.
17417         (grokfndecl): Handle member template specializations.  Share
17418         constructor and non-constructor code.
17419         * decl2.c (check_classfn): Handle member template specializations.
17420         * pt.c (begin_template_parm_list): Use begin_scope.
17421         (begin_specialization): Likewise.
17422         (end_specialization): Likewise.
17423         (check_explicit_specialization): Use current_tmpl_spec_kind.
17424         Handle member template specializations.
17425         (end_template_decl): Use finish_scope.  Remove call to
17426         get_pending_sizes.
17427         (push_template_decl_real): Remove bogus error message.
17428         (tsubst_decl): Fix typo in code contained in comment.
17429         (instantiate_template): Handle member template specializations.
17430         (most_general_template): Likewise.
17432 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
17434         * lex.c (whitespace_cr): Compress consecutive calls to warning().
17435         (do_identifier): Ditto for error().
17437         * pt.c (convert_nontype_argument): Ditto for cp_error().
17438         (convert_template_argument): Ditto for cp_pedwarn().
17440 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
17442         * exception.cc (__check_null_eh_spec): New fn.
17443         * except.c (expand_end_eh_spec): Call it if the spec is throw().
17445 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
17447         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
17448         * except.c (expand_end_eh_spec): Add the return type.
17449         * rtti.c (throw_bad_cast): Add the parmtypes.
17450         (throw_bad_typeid): Likewise.
17452         * semantics.c (expand_stmt): Only leave out rtl for unused
17453         artificials, and set DECL_IGNORED_P on them as well.
17454         * decl.c (wrapup_globals_for_namespace): Likewise.
17456 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
17458         * decl.c (maybe_commonize_var): Skip all artificial decls.
17459         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
17461 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
17463         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
17464         * cp-tree.h: Declare flag_enforce_eh_specs.
17465         * decl.c (store_parm_decls, finish_function): Check it.
17467         C library functions don't throw.
17468         * Makefile.in (cfns.h): New target.
17469         (except.o): Depend on it.
17470         * Make-lang.in (cc1plus): Depend on cfns.gperf.
17471         * cfns.gperf: New file.
17472         * cfns.h: Generated.
17473         * except.c: Include it.
17474         (nothrow_libfn_p): New fn.
17475         * decl.c (grokfndecl): Use it.
17476         * cp-tree.h: Declare it.
17478         * decl.c (push_overloaded_decl_1, auto_function,
17479         define_function): Lose.
17480         (build_library_fn_1): New static fn.
17481         (builtin_function): Use it.
17482         (get_atexit_node): Use build_library_fn_ptr.
17483         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
17484         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
17485         push_void_library_fn, push_throw_library_fn): New fns.
17486         * cp-tree.h: Declare them.
17487         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
17488         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
17489         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
17490         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
17491         * rtti.c (build_runtime_decl): Lose.
17492         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
17493         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
17494         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
17496         * call.c (build_call): Remove result_type parm.
17497         Call mark_used on unused artificial fns.
17498         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
17500 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
17502         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
17503         appropriate.
17504         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
17505         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
17506         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
17507         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
17508         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
17509         expand_generic_desc): Likewise.
17511 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
17513         * exception.cc (__cp_pop_exception): Cleanup the original object.
17515 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
17517         * decl.c (grok_op_properties): Merge conversion to void warning
17518         with other silly op warnings.
17520 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
17522         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
17523         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
17525 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
17527         * decl.c (cp_make_fname_decl): New function.
17528         (wrapup_globals_for_namespace): Don't emit unused static vars.
17529         (init_decl_processing): Remove comment about use of
17530         array_domain_type. Set make_fname_decl.
17531         (cp_finish_decl): Remove __FUNCTION__ nadgering.
17532         * semantics.c (begin_compound_stmt): Remove
17533         current_function_name_declared flagging.
17534         (expand_stmt): Don't emit unused local statics.
17535         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
17536         specially.
17538 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
17540         * typeck.c (convert_for_assignment): Don't look at array
17541         initializer.
17542         * call.c (convert_like_real): Likewise.
17544 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
17546         Add initial support for '\uNNNN' specifier.
17547         * lex.c (read_ucs): New fn.
17548         (readescape, skip_white_space): Call it.
17549         (is_extended_char, is_extended_char_1): New fns.
17550         (utf8_extend_token): New fn, #if 0'd out.
17551         (real_yylex): Treat extended chars like letters.
17553         * search.c (note_debug_info_needed): Walk the bases even if we
17554         weren't deferring the type itself.
17556 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17558         * decl2.c (finish_objects): Constify a char*.
17560         * method.c (emit_thunk): Likewise.
17562 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
17564         * typeck.c (dubious_conversion_warnings): Look through
17565         REFERENCE_TYPE.
17567 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17569         * class.c (dfs_modify_vtables): I is now unsigned.
17570         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
17571         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
17572         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
17573         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
17574         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
17575         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
17576         Call integer_all_onesp.
17577         * typeck2.c (process_init_constructor): Use compare_tree_int.
17579         * lang-specs.h (as): Don't call if -syntax-only.
17581 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
17583         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
17584         RTL_EXPR_HAS_NO_SCOPE after all.
17586 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
17588         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
17589         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
17590         RTL_EXPR_HAS_NO_SCOPE.
17592         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
17593         later.
17595         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
17597 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
17599         * call.c (convert_like): Macrofy.
17600         (convert_like_with_context): New macro.
17601         (convert_like_real): Renamed from convert_like.  Add calling
17602         context parameters, for diagnostics. Add recursive flag.  Call
17603         dubious_conversion_warnings for outer conversion.
17604         (build_user_type_conversion): Use convert_like_with_context.
17605         (build_over_call): Likewise. Don't warn about dubious
17606         conversions here. Adjust convert_default_arg calls.
17607         (convert_default_arg): Add context parameters for diagnostics.
17608         Pass through to convert_like_with_context.
17609         * cp-tree.h (convert_default_arg): Add context parameters.
17610         (dubious_conversion_warnings): Prototype new function.
17611         * typeck.c (convert_arguments): Adjust convert_default_arg call.
17612         (dubious_conversion_warnings): New function, broken
17613         out of convert_for_assignment.
17614         (convert_for_assignment): Adjust.
17616 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
17618         * decl2.c (key_method): Break out from...
17619         (import_export_vtable, import_export_class): ...here.
17621         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
17622         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
17624         * search.c (note_debug_info_needed, dfs_debug_mark,
17625         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
17626         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
17628 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
17630         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
17631         typos.
17633 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
17635         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
17636         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
17637         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
17638         (lang_type): Split gets_new into has_new and has_array_new.
17639         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
17640         (TYPE_GETS_NEW): Split into ...
17641         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
17642         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
17643         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
17644         (build_op_new_call): Don't declare.
17645         (build_new_1): Likewise.
17646         * call.c (build_op_new_call): Remove.
17647         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
17648         instead of TYPE_NEEDS_DESTRUCTOR.
17649         (finish_struct_bits): Likewise.
17650         (add_implicitly_declared_members): Likewise.
17651         (check_field_decl): Likewise.
17652         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
17653         correctly under the new ABI.
17654         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
17655         instead of TYPE_NEEDS_DESTRUCTOR.
17656         (initialize_local_var): Likewise.
17657         (destroy_local_var): Likewise.
17658         (cp_finish_decl): Likewise.
17659         (register_dtor_fn): Likewise.
17660         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
17661         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
17662         TYPE_VEC_DELETE_TAKES_SIZE here.
17663         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
17664         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
17665         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
17666         (finish_destructor_body): Likewise.
17667         (maybe_build_cleanup_1): Likewise.
17668         * decl2.c (do_static_destruction): Likewise.
17669         * init.c (build_new_1): Make it static.
17670         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
17671         (expand_cleanup_for_base): Likewise.
17672         (get_cookie_size): New function.
17673         (build_new_1): Handle array-new cookies correctly under the new
17674         ABI.
17675         (build_vec_delete_1): Likewise.
17676         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
17677         (build_delete): Likewise.
17678         (build_vec_delete): Handle array-new cookies correctly under the new
17679         ABI.
17680         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
17681         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
17682         TYPE_HAS_ARRAY_NEW_OPERATOR.
17683         * ptree.c (print_lang_type): Check them.
17684         * search.c (context_for_name_lookup): Fix typo in comment.
17685         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
17686         * tree.c (break_out_cleanups): Likewise.
17687         (build_cplus_array_test_1): Likewise.
17688         (cp_build_qualified_type_real): Likewise.
17689         * typeck.c (complete_type): Likewise.
17691         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
17692         the command-line, not the end.
17694 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
17696         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
17698 2000-03-02  Tom Tromey  <tromey@cygnus.com>
17700         * cp-tree.h (build_java_class_ref): Declare.
17701         * init.c (build_java_class_ref): No longer static.
17702         * except.c (expand_throw): Generate a Java-style `throw' if the
17703         thrown object is a "Java" object.
17704         (initialize_handler_parm): Generate a Java-style lookup of
17705         exception info if the caught object is a "Java" object.
17706         (catch_language, catch_language_init): New globals.
17707         (decl_is_java_type): New function.
17708         (expand_start_catch_block): Don't call push_eh_info() or
17709         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
17710         class reference to build_catch_block.
17712 2000-03-02  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17714         * typeck.c (comptypes): Treat sizetype like its language equivalent.
17716 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
17718         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
17719         to merge reference/pointer code and fix incorrect warnings.
17721 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
17723         * search.c (protected_accessible_p): Use context_for_name_lookup.
17725         * init.c (construct_virtual_bases): Fix thinko.
17726         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
17728 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
17730         * decl.c (current_function_decl): Move to toplev.c.
17732 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
17734         * pt.c (fn_type_unification): Unify return type, whenever
17735         provided.
17736         (get_bindings_real): Only pass return type when necessary.
17737         Remove explicit return type check.
17738         * class.c (resolve_address_of_overloaded_function): Pass desired
17739         return type to fn_type_unification.
17741 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17743         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
17744         DECL_FIELD_SIZE.
17745         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
17746         DECL_FIELD_SIZE.
17747         * rtti.c (expand_class_desc): Likewise.
17748         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
17749         (THUNK_VCALL_OFFSET): Likewise.
17750         (THUNK_DELTA): Reflect changes in ../tree.h.
17752 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
17754         * search.c (protected_accessible_p): Also allow the access if
17755         the member is public in DERIVED.  Lose TYPE parm.
17756         (friend_accessible_p): Lose TYPE parm.
17757         (accessible_p): Adjust.
17759 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17761         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
17762         on things that are not sizes; ssize_binop deleted.
17763         Call size_diffop when appropriate.
17764         (dfs_build_vcall_offset_vtbl_entries): Likewise.
17765         (build_primary_vtable, build_secondary_vtable): Likewise.
17766         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
17767         Variable I is HOST_WIDE_INT.
17768         (get_vfield_offset): Pass proper types to size_binop.
17769         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
17770         (finish_struct_1): Likewise.
17771         (skip_rtti_stuff): Arg N is now pointer to signed.
17772         (layout_class_type): Use size_zero_node.
17773         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
17774         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
17775         * decl.c (complete_arry_type): Pass proper types to size_binop.
17776         (xref_basetypes): BINFO_OFFSET is sizetype.
17777         * error.c (dump_expr): Don't use size_binop non-sizes.
17778         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
17779         * init.c (construct_virtual_bases): Fix type error.
17780         (build_vec_delete_1): Pass proper type to size_binop and don't
17781         fold result.
17782         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
17783         * rtti.c (get_base_offset): Pass proper type to size_binop.
17784         * search.c (dfs_find_vbases): Fix type error.
17785         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
17786         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
17787         * tree.c (debug_binfo): Variable N is signed.
17788         Use HOST_WIDE_INT_PRINT_DEC.
17789         * typeck.c (comptypes): sizetype is same as equivalent integer type.
17790         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
17791         size_one_node and size_zero_node.
17792         (c_alignof): Use size_one_node.
17793         (build_component_addr): Pass proper types to size_binop.
17794         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
17796 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
17798         Implement class scope using-declarations for functions.
17799         * class.c (handle_using_decl): Call add_method for used functions.
17800         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
17801         (add_method): Used functions are hidden by local functions.
17802         (check_bases_and_members): Handle using-decls before finalizing
17803         CLASSTYPE_METHOD_VEC.
17804         * call.c (add_function_candidate): Add ctype parm; if nonzero,
17805         override the type of 'this' accordingly.
17806         (add_template_candidate, add_template_candidate_real): Add ctype parm.
17807         (convert_class_to_reference, build_user_type_conversion_1,
17808         build_new_function_call, build_object_call, build_new_op,
17809         build_new_method_call): Pass ctype parm.
17811         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
17812         the baselink.
17813         * call.c (convert_class_to_reference, build_user_type_conversion_1,
17814         build_new_function_call, build_object_call, build_new_op,
17815         build_new_method_call, build_op_delete_call): Don't get basetype_path
17816         from a baselink.
17817         * typeck.c (build_component_ref): Likewise.
17818         * init.c (build_offset_ref): Likewise.
17819         (resolve_offset_ref): Don't call enforce_access.
17820         Call build_scoped_ref.
17821         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
17822         would cause an error or if -pedantic.
17823         * class.c (alter_access): Lose binfo parm.
17825 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
17827         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
17828         types.
17830 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
17832         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
17833         pseudo_type_info creation into the std namespace
17835 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
17837         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
17838         (import_export_class): Remove declaration.
17839         * decl2.c (import_export_class): Make it static.
17840         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
17841         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
17842         EXPR_WITH_FILE_LOCATION.
17843         * lex.c (check_newline): Tweak filename/lineno setting.
17844         * semantics.c (begin_while_stmt): Fix typo in comment.
17846 2000-02-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17848         * lang-options.h (-fmessage-length=): Add missing option.
17850         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
17852 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
17854         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
17856 2000-02-25  Jim Wilson  <wilson@cygnus.com>
17858         * optimize.c (expand_call_inline): Emit the return label before
17859         evaluating the return value.
17861 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
17863         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
17864         than duplicating functionality here.
17865         * optimize.c: Include input.h.
17866         (expand_call_inline): Use push_srcloc and pop_srcloc.
17867         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
17868         * parse.c: Regenerated.
17869         * Makefile.in (lex.o): Depend on input.h.
17870         (optimize.o): Likewise.
17872 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
17874         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
17875         function type, rather than ICE.
17877 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
17879         * decl.c (grokdeclarator): Call decl_type_access_control.
17880         * parse.y (parse_end_decl): Don't call decl_type_access_control if
17881         decl is null.
17883 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
17885         * decl.c (decls_match): Remove obsolete static member nadgering.
17887 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17889         * decl.c (grokdeclarator): Change ANSI to ISO.
17890         * lex.c (consume_string, readescape, do_identifier): Likewise.
17891         (parse_float, real_yylex): Likewise.
17892         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
17893         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
17894         new_type_id, maybe_label_decls, simple_stmt,
17895         for.init.statement): Likewise.
17896         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
17897         * semantics.c (finish_named_return_value): Likewise.
17898         * parse.c: Regenerate.
17900 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
17902         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
17903         (CPTI_CLASS_STAR_TYPE): Remove.
17904         (vtable_index_type): Likewise.
17905         (class_star_type_node): Remove.
17906         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
17907         (build_binary_op_nodefault): Remove.
17908         * call.c (build_new_op): Use build_binary_op instead of
17909         build_binary_op_nodefault.
17910         * decl.c (init_decl_processing): Remove class_star_type_node
17911         initialization.  Make delta_type_node ptrdiff_type_node under the
17912         new ABI.  Initialize vtable_index_type.
17913         (build_ptrmemfunc_type): Build different structures for the new
17914         ABI.
17915         (build_enumerator): Use build_binary_op instead of
17916         build_binary_op_nodefault.
17917         * method.c (build_overload_value): Mangle pointers-to-members
17918         appropriately under the new ABI.
17919         * typeck.c (build_array_ref): Use build_binary_op instead of
17920         build_binary_op_nodefault.
17921         (get_member_function_from_ptrfunc): Adjust for the new ABI.
17922         (build_binary_op_nodefault): Rename to ...
17923         (build_binary_op): ... this.  Remove old version.  Adjust for
17924         pointer-to-member comparisons under the new ABI.
17925         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
17926         (build_ptrmemfunc): Adjust for the new ABI.
17927         (expand_ptrmemfunc_cst): Likewise.
17928         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
17929         (pfn_from_ptrmemfunc): Adjust for the new ABI.
17931 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
17933         * call.c (build_object_call): Compress consecutive calls to
17934         cp_error.
17935         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
17936         (build_op_delete_call): Adjust message formatting.
17938         * class.c (check_bases): Compress consecutive calls to
17939         cp_pedwarn.
17940         (finish_struct_anon): Say 'ISO C++'.
17942         * decl.c (start_decl): Same here.
17943         (grok_reference_init): Likewise.
17944         (grokfndecl): Correct message formatting.
17945         (grokfndecl): Improve diagnostic.
17946         (check_static_variable_definition): Likewise. Say 'ISO C++'
17947         (compute_array_index_type): Say 'ISO C++'
17948         (create_array_type_for_decl): Compress consecutive calls to
17949         cp_error.
17950         (grokdeclarator): Say 'ISO C++'
17951         (grok_op_properties): Likewise.
17953         * decl2.c (delete_sanity): Clairify diagnostic.
17954         (check_member_template): Same here.
17955         (grok_function_init): Use consistent terminology.
17957         * expr.c (do_case): Say 'ISO C++'
17959         * friend.c (do_friend): Compress consecutive calls to warning.
17961 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
17963         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
17964         * class.c (build_secondary_vtable): Reorganize.  Don't create a
17965         new vtable under the new ABI.
17966         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
17967         computing the size.
17968         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
17969         the initializing elements.
17970         (initialize_vtable): New function.
17971         (dfs_finish_vtbls): Use it.
17972         (dfs_accumulate_vtbl_inits): New function.
17973         (finish_vtbls): Merge primary and secondary vtables under the new
17974         ABI.
17975         (finish_struct_1): Remove redundant call to layout_vtable_decl.
17976         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
17977         aren't VAR_DECLs.
17979         * class.c (build_vtable): New function, split out from ...
17980         (get_vtable_decl): ... here, and ...
17981         (build_secondary_vtable): ... here.
17983         * pt.c (tsubst_decl): Fix formatting.
17985 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17987         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
17988         (avoid_overlap, build_base_field): Likewise.
17989         (build_base_field, build_base_fields, is_empty_class):
17990         Test DECL_SIZE with integer_zero.
17991         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
17992         * cp-tree.h (struct lang_type): New field size_unit.
17993         (CLASSTYPE_SIZE_UNIT): New macro.
17994         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
17995         (cp_finish_decl): Delete -Wlarger-than processing.
17996         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
17997         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
17998         * tree.c (make_binfo): binfo vector is one entry longer.
17999         (walk_tree): Walk DECL_SIZE_UNIT.
18001 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
18003         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
18004         comment.
18005         (build_vtable_entry): Don't assume all vtable entries are
18006         functions.
18007         (build_vtbl_initializer): Adjust accordingly.
18008         (get_vtable_decl): Fix formatting.
18010 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
18012         * semantics.c (deferred_type_access_control): Walk the entire
18013         type_lookups list.
18014         (save_type_access_control): Rename from
18015         initial_deferred_type_access_control.  Just remember the value.
18016         (decl_type_access_control): New fn.
18017         (begin_function_definition): Use deferred_type_access_control, after
18018         we've started the function.  Set type_lookups to error_mark_node.
18019         * parse.y (frob_specs, fn.def1): Adjust.
18020         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
18021         (parse_end_decl, parse_bitfield0, parse_method): New fns.
18022         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
18023         (after_type_component_declarator0): Likewise.
18024         (after_type_component_declarator): Likewise.
18025         (notype_component_declarator): Likewise.
18026         * cp-tree.h: Adjust.
18028         * decl.c (redeclaration_error_message): Allow redeclaration of
18029         namespace-scope decls.
18031 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
18033         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
18035 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
18037         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
18038         * decl2.c (grokclassfn): Likewise.
18040         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
18042         * decl2.c (lang_decode_option): Don't set default message length
18043         here.
18044         * lex.c (lang_init_options): Set it here.
18046 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
18048         Make DECL_CONTEXT mean the class in which a member function was
18049         declared, even for a virtual function.
18050         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
18051         (DECL_FRIEND_CONTEXT): New macro.
18052         (DECL_REAL_CONTEXT): Remove.
18053         (SET_DECL_FRIEND_CONTEXT): Likewise.
18054         (DECL_VIRTUAL_CONTEXT): Adjust.
18055         (DECL_CLASS_SCOPE_P): Use TYPE_P.
18056         (add_friends): Remove.
18057         (hack_decl_function_context): Likewise.
18058         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
18059         CP_DECL_CONTEXT.
18060         (build_over_call): Fix indentation.  Use DECL_CONTEXT
18061         instead of DECL_CLASS_CONTEXT.
18062         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
18063         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
18064         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
18065         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
18066         (build_base_field): Likewise.
18067         (finish_struct_1): Likewise.
18068         (build_self_reference): Likewise.
18069         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
18070         DECL_REAL_CONTEXT.
18071         (pushtag): Use decl_function_context, not
18072         hack_decl_function_context.
18073         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
18074         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
18075         (pushdecl): Remove bogus code.
18076         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
18077         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
18078         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
18079         Use decl_function_context, nothack_decl_function_context.
18080         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
18081         (grokdeclarator): Likewise.  Use decl_function_context, not
18082         hack_decl_function_context.
18083         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
18084         (start_function): Use DECL_FRIEND_CONTEXT, not
18085         DECL_CLASS_CONTEXT.  Use decl_function_context, not
18086         hack_decl_function_context.
18087         (finish_function): Use decl_function_context, not
18088         hack_decl_function_context.
18089         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
18090         DECL_CLASS_CONTEXT.
18091         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
18092         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
18093         (grokfield): Likewise.
18094         (finish_builtin_type): Likewise.
18095         (finish_vtable_vardec): Use decl_function_context, not
18096         hack_decl_function_context.
18097         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
18098         (start_static_initialization_or_destruction): Likewise.
18099         (finish_static_initialization_or_destruction): Likewise.
18100         (mark_used): Adjust logic for deciding when to synthesize methods.
18101         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
18102         DECL_REAL_CONTEXT.
18103         * error.c (dump_function_decl): Use DECL_CONTEXT, not
18104         DECL_CLASS_CONTEXT.
18105         * friend.c (is_friend): Likewise.
18106         (add_friends): Remove.
18107         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
18108         * lex.c (begin_definition_of_inclass_inline): Use
18109         decl_function_context, not hack_decl_function_context.
18110         (process_next_inline): Likewise.
18111         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
18112         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
18113         DECL_CLASSS_CONTEXT.
18114         (hack_identifier): Likewise.
18115         (synthesize_method):  Use decl_function_context, not
18116         hack_decl_function_context.
18117         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
18118         DECL_REAL_CONTEXT.
18119         (is_member_template): Use decl_function_context, not
18120         hack_decl_function_context.  Use DECL_CONTEXT, not
18121         DECL_CLASS_CONTEXT.
18122         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
18123         DECL_CLASS_CONTEXT.
18124         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
18125         DECL_REAL_CONTEXT.
18126         (push_template_decl_real): Likewise.
18127         (instantiate_class_template): Don't call add_friends.
18128         (tsubst_default_argument): Use DECL_CONTEXT, not
18129         DECL_REAL_CONTEXT.
18130         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
18131         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
18132         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
18133         DECL_CLASS_CONTEXT.
18134         * repo.c (repo_inline_used): Likewise.
18135         * search.c (current_scope): Adjust for new _CONTEXT macros.
18136         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
18137         DECL_REAL_CONTEXT.
18138         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
18139         (lookup_fnfields_here):Likewise.
18140         (check_final_overrider): Likewise.
18141         (init_vbase_pointers): Likewise.
18142         (virtual_context): Likewise.
18143         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
18144         (expand_body): Use decl_function_context, not
18145         hack_decl_function_context.
18146         * tree.c (hack_decl_function_context): Remove.
18147         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
18148         DECL_CLASS_CONTEXT.
18149         * typeck2.c (error_not_base_type): Likewise.
18151 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
18153         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
18155 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18157         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
18159 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
18161         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
18163 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
18165         * decl2.c (lang_decode_option): Enable automatic line wrapping.
18167 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
18169         * parse.y (frob_specs): Split out...
18170         (parse_decl): From here.
18171         (fn.def2): Call initial_deferred_type_access_control.
18172         (after_type_component_declarator0): Call frob_specs.
18173         (notype_component_declarator0): Likewise.
18174         * search.c (friend_accessible_p): Nested classes are friends of their
18175         enclosing classes.
18177 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
18179         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
18180         used to create an implicit temporary.
18182         * class.c (dfs_modify_vtables): Tweak calculation of functions to
18183         override.
18185 2000-02-08  Nathan Sidwell  <nathan@acm.org>
18187         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
18188         strip array element qualifiers too.
18190 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
18192         * decl.c (store_parm_decls): Don't build cleanups for parameters
18193         while processing_template_decl.
18195 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
18197         * cp-tree.h (struct saved_scope): Add incomplete field.
18198         (namespace_scope_incomplete): New macro.
18199         * decl.c (pushdecl): Use it.
18200         (hack_incomplete_structures): Use it.  See through artificial
18201         binding levels.
18202         (mark_saved_scope): Mark it.
18204         Implement access control for nested types.
18205         * search.c (type_access_control): New fn.
18206         (accessible_p): Now we do perform access control for types.
18207         * semantics.c (deferred_type_access_control): New fn.
18208         (initial_deferred_type_access_control): New fn.
18209         (begin_function_definition): Call it.  Add lookups parm.
18210         * decl.c (struct binding_level): Add this_class field.
18211         (pushlevel_class): Set it.
18212         (mark_binding_level): Mark it.
18213         (lookup_name_real): Use it.  Call type_access_control.
18214         (mark_saved_scope): Mark lookups field.
18215         * cp-tree.h (flagged_type_tree): Add lookups field.
18216         (struct saved_scope): Add lookups field.
18217         (type_lookups): New macro.
18218         * parse.y (declmods): Now <ftype>.
18219         (parse_decl): Add lookups parm.  Call
18220         initial_deferred_type_access_control.
18221         (lang_extdef): Clear type_lookups.
18222         (typed_declspecs, declmods, typespec): Set lookups field.
18223         (initdcl): Call deferred_type_access_control.
18224         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
18225         component_decl_1, named_parm): Adjust.
18226         * friend.c (is_friend): Nested classes are friends of their
18227         enclosing classes.
18229         * class.c (currently_open_derived_class): New fn.
18230         * method.c (hack_identifier): Use it.
18232         * lex.c (do_identifier): Remove obsolete code.
18234         * parse.y (typed_typespecs): Propagate new_type_flag properly.
18236 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
18238         * tinfo.h: Remove apostrophes from C++ comment (xgettext
18239         thinks this file is plain C).
18241 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18243         * Makefile.in (call.o): Depend on $(EXPR_H).
18245         * call.c: Include "expr.h".
18247         * class.c (dump_class_hierarchy): Add prototype.
18249         * search.c (dfs_get_pure_virtuals): Likewise.
18251 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
18253         * parse.y (simple_stmt): Allow :: token in asm parameter list.
18254         * parse.c: Rebuilt.
18256 2000-01-31  Jim Wilson  <wilson@cygnus.com>
18258         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
18259         Store it in DECL_FCONTEXT.
18260         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
18262 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
18264         * tinfo.h (old abi): #include "tconfig.h".
18265         * tinfo.cc (convert_to_base): Move into old abi section.
18267 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
18269         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
18270         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
18271         (BINFO_PRIMARY_BINFO): New macro.
18272         (BF_DELTA): Rename to ...
18273         (BV_DELTA): ... this.
18274         (BF_VCALL_INDEX): Rename to ...
18275         (BV_VCALL_INDEX): ... this.
18276         (BF_FN): Rename to ...
18277         (BV_FN): ... this.
18278         * class.c (build_vbase_path): Adjust for changes to reverse_path.
18279         (set_rtti_entry): Rename BF_ macros to BV_ variants.
18280         (modify_vtable_entry): Simplify.
18281         (add_virtual_function): Rename BF_ macros to BV_ variants.
18282         (build_vtable_initializer): Likewise.
18283         (get_class_offset_1): Remove.
18284         (dfs_get_class_offset): Likewise.
18285         (get_class_offset): Likewise.
18286         (dfs_find_final_overrider): New function.
18287         (find_final_overrider): Likewise.
18288         (modify_one_vtable): Remove.
18289         (dfs_find_base): New function.
18290         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
18291         find_final_overrider.
18292         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
18293         virtuals.
18294         (dfs_fixup_vtable_deltas): Remove.
18295         (override_one_vtable): Remove.
18296         (merge_overrides): Likewise.
18297         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
18298         unreal chilren of virtual bases.
18299         (finish_struct_1): Don't use merge_overrides.  Don't use
18300         dfs_fixup_vtable_deltas.
18301         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
18302         BINFOs.
18304 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
18305             Jason Merrill  <jason@yorick.cygnus.com>
18307         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
18309 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
18311         * exception.cc (__throw_bad_typeid): Add missing std::.
18313 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18315         * cp-tree.h (make_thunk): PROTO -> PARAMS.
18317 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
18319         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
18321         Runtime support for new-abi rtti.
18322         * inc/typeinfo (type_info::operator!=): Define in class.
18323         (type_info::before, type_info::name, type_info::operator==,
18324         type_info::operator!=): Define new ABI implementations.
18325         (type_info::is_pointer_p, type_info::is_function_p): Declare
18326         new virtual functions.
18327         (type_info::do_catch, type_info::do_upcast): Likewise.
18329         * tinfo.h (__base_class_info): Define new class.
18330         (__class_type_info): Likewise.
18331         (__si_class_type_info): Likewise.
18332         (__vmi_class_type_info): Likewise.
18333         (__dynamic_cast): Prototype.
18335         * tinfo.cc: Conditionalize old and new rtti mechanisms.
18336         (type_info::is_pointer_p): Define new function.
18337         (type_info::is_function_p): Likewise.
18338         (type_info::do_catch): Likewise.
18339         (type_info::do_upcast): Likewise.
18340         (vtable_prefix): New structure for vtable access.
18341         (adjust_pointer): Define new template function.
18342         (contained_p, public_p, virtual_p, contained_public_p,
18343         contained_nonpublic_p, contained_nonvirtual_p): Define new
18344         functions.
18345         (nonvirtual_base_type): New local variable.
18346         (__class_type_info::~__class_type_info): Define.
18347         (__si_class_type_info::~__si_class_type_info): Likewise.
18348         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
18349         (__class_type_info::do_catch): Define new function.
18350         (__class_type_info::do_upcast): Likewise.
18351         (__class_type_info::find_public_src): Likewise.
18352         (__class_type_info::do_find_public_src): Likewise.
18353         (__si_class_type_info::do_find_public_src): Likewise.
18354         (__vmi_class_type_info::do_find_public_src): Likewise.
18355         (__class_type_info::do_dyncast): Likewise.
18356         (__si_class_type_info::do_dyncast): Likewise.
18357         (__vmi_class_type_info::do_dyncast): Likewise.
18358         (__class_type_info::do_upcast): Likewise.
18359         (__si_class_type_info::do_upcast): Likewise.
18360         (__vmi_class_type_info::do_upcast): Likewise.
18361         (__dynamic_cast): Likewise.
18363         * tinfo2.cc (__fundamental_type_info): Define new class.
18364         (__pointer_type_info): Likewise.
18365         (__reference_type_info): Likewise.
18366         (__array_type_info): Likewise.
18367         (__function_type_info): Likewise.
18368         (__enum_type_info): Likewise.
18369         (__ptr_to_member_type_info): Likewise.
18370         (__fundamental_type_info::~__fundamental_type_info): Define.
18371         (__pointer_type_info::~__pointer_type_info): Likewise.
18372         (__reference_type_info::~__reference_type_info): Likewise.
18373         (__array_type_info::~__array_type_info): Likewise.
18374         (__function_type_info::~__function_type_info): Likewise.
18375         (__enum_type_info::~__enum_type_info): Likewise.
18376         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
18377         (__pointer_type_info::do_catch): Define new function.
18378         (__ptr_to_member_type_info::do_catch): Define new function.
18380         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
18381         (__is_pointer): Likewise.
18383         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
18385 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
18387         * cp/class.c (build_vtable): Rename to build_primary_vtable.
18388         (prepare_fresh_vtable): Rename to build_secondary_vtable.
18389         (make_new_vtable): New function.
18390         (modify_vtable_entry): Handle generation of new vtables correctly.
18391         (modify_one_vtable): Remove unused parameter.
18392         (dfs_fixup_vtable_deltas): Likewise.
18393         (override_one_vtable): Use build_secondary_vtable.
18394         (finish_struct_1): Use build_primary_vtable and
18395         build_secondary_vtable.
18397 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
18399         * cp/decl.c: Adjust variable names, comments, help strings.
18401 2000-01-29  Nathan Sidwell  <nathan@acm.org>
18403         * new2.cc (operator delete[]): Use operator delete, don't assume
18404         implementation.
18406 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
18408         * class.c (build_vtbl_initializer): Add argument to
18409         build_vtable_entry call.
18411 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
18413         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
18414         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
18415         (BF_DELTA): New macro.
18416         (BF_VCALL_INDEX): Likewise.
18417         (BF_FN): Likewise.
18418         (THUNK_VCALL_OFFSET): Likewise.
18419         (make_thunk): Change prototype.
18420         * class.c (build_vtable_entry): Integrate
18421         build_vtable_entry_for_fn.  Handle vcall indices.
18422         (build_vtable_entry_for_fn): Remove.
18423         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
18424         BF_VCALL_INDEX, BF_FN.
18425         (modify_vtable_entry): Integrate common code from
18426         modify_one_vtable and dfs_fixup_vtable_deltas.
18427         (add_virtual_function): Set BF_VCALL_INDEX.
18428         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
18429         and BF_FN.
18430         (modify_one_vtable): Simplify.
18431         (dfs_fixup_vtable_deltas): Likewise.
18432         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
18433         * method.c (make_thunk): Handle vcall indices.
18435 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
18437         Compiler side new abi rtti (not enabled).
18438         * cp-tree.h (new_abi_rtti_p): New macro.
18439         (emit_support_tinfos): Prototype new function.
18440         (tinfo_decl_p): Likewise.
18441         (emit_tinfo_decl): Likwise.
18442         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
18443         macros.
18444         (doing_runtime): New local static.
18445         (init_rtti_processing): Add new-abi initializer.
18446         (get_tinfo_decl): Add new-abi logic.
18447         (tinfo_from_decl): Likewise.
18448         (build_dynamic_cast_1): Likewise.
18449         (qualifier_flags): New static function.
18450         (tinfo_base_init): Likewise.
18451         (generic_initializer): Likewise.
18452         (ptr_ref_initializer): Likewise.
18453         (ptmd_initializer): Likewise.
18454         (class_hint_flags): Likewise.
18455         (class_initializer): Likewise.
18456         (synthesize_tinfo_var): Likewise.
18457         (create_real_tinfo_var): Likewise.
18458         (create_pseudo_type_info): Likewise.
18459         (get_vmi_pseudo_type_info): Likewise.
18460         (create_tinfo_types): Likewise.
18461         (emit_support_tinfos): New global function.
18462         (tinfo_decl_p): New global predicate.
18463         (emit_tinfo_decl): New global function.
18464         * class.c (set_rtti_entry): Generalize for old and new rtti.
18465         (build_vtbl_initializer): Likewise.
18466         * decl2.c (finish_file): Likewise.
18468 2000-01-27  Jim Wilson  <wilson@cygnus.com>
18470         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
18471         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
18473 2000-01-27  Mike Stump  <mrs@wrs.com>
18475         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
18476         for scopes.
18478 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
18480         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
18482 2000-01-26  J"orn Rennecke <amylaar@cygnus.co.uk>
18484         * optimize.c (calls_setjmp_r): Supply new argument
18485         to special_function_p.
18487 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18489         * call.c: PROTO -> PARAMS.
18490         * class.c: Likewise.
18491         * cp-tree.h: Likewise.
18492         * cvt.c: Likewise.
18493         * decl.c: Likewise.
18494         * decl.h: Likewise.
18495         * decl2.c: Likewise.
18496         * dump.c: Likewise.
18497         * errfn.c: Likewise.
18498         * error.c: Likewise.
18499         * except.c: Likewise.
18500         * expr.c: Likewise.
18501         * init.c: Likewise.
18502         * input.c: Likewise.
18503         * lex.c: Likewise.
18504         * lex.h: Likewise.
18505         * method.c: Likewise.
18506         * optimize.c: Likewise.
18507         * parse.y: Likewise.
18508         * pt.c: Likewise.
18509         * repo.c: Likewise.
18510         * rtti.c: Likewise.
18511         * search.c: Likewise.
18512         * semantics.c: Likewise.
18513         * spew.c: Likewise.
18514         * tree.c: Likewise.
18515         * typeck.c: Likewise.
18516         * typeck2.c: Likewise.
18517         * xref.c: Likewise.
18519 2000-01-25  Richard Henderson  <rth@cygnus.com>
18521         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
18523 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
18525         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
18526         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
18527         (struct vcall_offset_data_s): New type.
18528         (dfs_vcall_offset_queue_p): New function.
18529         (dfs_build_vcall_offset_vtbl_entries): Likewise.
18530         (build_vcall_offset_vtbl_entries): Likewise.
18531         (layout_vtable_decl): Likewise.
18532         (num_vfun_entries): Likewise.
18533         (num_extra_vtbl_entries): Add the entries for vcall offsets.
18534         (build_vtbl_initializer): Likewise.
18535         (dfs_finish_vtabls): Use layout_vtable_decl.
18536         (modify_one_vtables): Always duplicate vtables under the new ABI.
18537         (finish_struct_1): Use layout_vtable_decl.
18539 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18541         * decl.c (member_function_or_else): Change third arg from a format
18542         specifier to an `enum overload_flags'.  Callers changed.
18544 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
18546         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
18547         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
18548         build_const_cast, get_delta_difference, check_return_expr): Avoid
18549         ANSI string concatenation usage.
18551 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
18553         * class.c (layout_class_type): Put the fields required to make a
18554         class non-empty at the end, not the beginning, of the TYPE_FIELDs
18555         list.
18557 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
18559         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
18560         template.
18562         * decl2.c (mark_used): Do instantiate inlines that have been
18563         explicitly instantiated.
18565 2000-01-24  Richard Henderson  <rth@cygnus.com>
18567         * call.c (build_over_call): Use expand_tree_builtin.
18568         * typeck.c (build_function_call_real): Likewise.
18569         (build_binary_op_nodefault): Handle unordered compares.
18571 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
18573         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
18574         cp_tree_index values.
18575         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
18576         New global node #defines for them.
18577         * rtti.c (call_void_fn): Replace with ...
18578         (build_runtime_decl): ... new static function.
18579         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
18580         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
18581         (build_dynamic_cast_1): Always produce correctly typed result.
18582         Explicitly produce type_info addresses. Use dynamic_cast_node.
18583         * exception.cc (__throw_bad_cast): Return `void *'.
18584         (__throw_bad_typeid): Return `const type_info &'.
18586 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
18588         * cp-tree.h (get_vtable_decl): Prototype new function.
18589         * class.c (get_vtable_decl): New function. Broken out from ...
18590         (build_vtable): ... here. Use it.
18591         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
18592         by get_vtable_decl.
18594 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
18596         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
18597         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
18598         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
18599         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
18600         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
18601         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
18602         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
18603         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
18604         (CPTI_TINFO_VAR_ID): New enumeration.
18605         (__tp_desc_type_node, __access_mode_type_node,
18606         __bltn_desc_type_node, __user_desc_type_node,
18607         __class_desc_type_node, __ptr_desc_type_node,
18608         __attr_desc_type_node, __func_desc_type_node,
18609         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
18610         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
18611         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
18612         enum_desc_type_node, class_desc_type_node,
18613         si_class_desc_type_node, vmi_class_desc_type_node,
18614         ptmd_desc_type_node, base_desc_type_node): New #defines.
18615         (tinfo_fn_id, tinfo_fn_type): Rename to ...
18616         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
18617         (tinfo_var_id): New enumeration.
18618         (DECL_TINFO_FN_P): Augment comment.
18619         * decl.c (cp_global_trees): Adjust documentation.
18620         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
18621         tinfo_decl_type and tinfo_var_id.
18622         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
18623         (build_typeid): Remove unused variable.
18624         (get_tinfo_var): Use tinfo_var_id.
18625         (tinfo_name): New static function.
18626         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
18627         (tinfo_from_decl): Likewise.
18628         (get_base_offset): New static function, broken out of
18629         expand_class_desc.
18630         (expand_si_desc): Use tinfo_name.
18631         (expand_class_desc): Likewise. Lose local static variable.
18632         Use base_desc_type_node. Use get_base_offset.
18633         (expand_ptr_desc): Use tinfo_name.
18634         (expand_attr_desc): Likewise.
18635         (expand_generic_desc): Likewise.
18637         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
18638         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
18640 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
18642         * cp-tree.h (__eprintf): Remove declaration.
18643         * tree.c (__eprintf): Remove definition.
18645 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
18646             Mark Mitchell  <mark@codesourcery.com>
18648         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
18649         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
18651 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
18653         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
18655 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
18657         * cp-tree.h (register_dtor_fn): New function.
18658         * decl.c (destroy_local_static): Rename to ...
18659         (register_dtor_fn): ... this.  Give it external linkage.
18660         (expand_static_init): Use it.
18661         * decl2.c (do_static_initialization): Likewise, if using
18662         __cxa_atexit.
18663         (do_static_destruction): Check that __cxa_atexit is not in use.
18664         (finish_file): Don't call do_static_destruction if using
18665         __cxa_atexit.
18667         * typeck.c (convert_arguments): Restore two-message error
18668         reporting.
18670 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
18672         Remap dynamic cast hint values to be consistent across ABIs.
18673         * search.c (dynamic_cast_base_recurse): Remap generated value.
18674         (get_dynamic_cast_base_type): Adjust documentation.
18675         * tinfo.h (__user_type_info::dyncast): Likewise.
18676         (__user_type_info::find_public_subobj): Remap BOFF meaning.
18677         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
18678         (__class_type_info::do_dyncast): Likewise.
18679         (__class_type_info::do_find_public_subobj): Likewise.
18680         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
18682 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
18684         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
18686         * typeck2.c (incomplete_type_error): Restore previous
18687         cp_error and cp_error_at call sequence.
18689 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
18691         * class.c (dump_class_hierarchy): Make format agree with argument;
18692         cast pointer to unsigned long and print with %lx.
18694 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
18696         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
18698         * typeck.c (composite_pointer_type, common_type,
18699         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
18700         build_function_call_real, convert_arguments,
18701         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
18702         build_unary_op, mark_addressable, build_compound_expr,
18703         build_static_cast, build_reinterpret_cast, build_const_cast,
18704         build_c_cast, build_modify_expr, get_delta_difference,
18705         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
18706         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
18707         into a single one.
18708         * typeck2.c (readonly_error, abstract_virtuals_error,
18709         process_init_constructor, check_for_new_type): Likewise.
18711 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
18713         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
18714         VAR_DECLs.
18716 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
18718         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
18719         (build_x_typeid): Likewise.
18720         (get_tinfo_fn): Likewise.
18721         (get_tinfo_fn_unused): Rename to ...
18722         (get_tinfo_decl): ... here.
18723         * rtti.c (build_headof): Replace logic error with assertion.
18724         (get_tinfo_fn_dynamic): Rename to ...
18725         (get_tinfo_decl_dynamic): ... here. Make static. Use
18726         complete_type_or_else.
18727         (build_x_typeid): Move into ...
18728         (build_typeid): ... here. Adjust call to
18729         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
18730         throw_bad_typeid expression.
18731         (get_tinfo_fn_unused): Rename to ...
18732         (get_tinfo_decl): ... here. Adjust comment.
18733         (get_tinfo_fn): Delete.
18734         (tinfo_from_decl): New static function.
18735         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
18736         (get_typeid): Use complete_type_or_else.
18737         (build_dynamic_cast_1): Adjust calls to
18738         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
18739         * parse.y (primary): Adjust call to build_typeid.
18740         * except.c (build_eh_type_type_ref): Adjust call to
18741         get_tinfo_decl. Mark as used.
18742         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
18743         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
18744         * parse.c: Regenerated.
18746 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
18748         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
18749         calling convention.
18750         (resolves_to_fixed_type_p): Document calling convention.
18751         * rtti.c (build_x_typeid): Initialize NONNULL.
18753         * cp-tree.h (build_shared_int_cst): New function.
18754         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
18755         * class.c (modify_vtable_entry): Likewise.
18756         (add_virtual_function): Split out code to generated shared
18757         INTEGER_CSTs to build_share_int_cst.
18758         (modify_all_vtables): Handle all the overridden functions here.
18759         Add overridden functions from non-primary virtual bases to the
18760         primary vtable.
18761         (finish_struct_1): Adjust call to modify_all_vtables.  Add
18762         overridden functions from non-primary bases to the vtable.
18763         * tree.c (build_shared_int_cst): New function.
18765         * cp-tree.h (scratchalloc): Remove.
18766         (build_scratch_list): Likewise.
18767         * call.c (convert_class_to_reference): Replace build_scratch_list
18768         and build_expr_list with build_tree_list.
18769         (add_candidate): Replace scratchalloc with expralloc.  Note memory
18770         leak.
18771         (build_user_type_conversion_1):  Replace build_scratch_list
18772         and build_expr_list with build_tree_list.
18773         (build_new_op): Likewise.
18774         (build_op_delete_call): Likewise.
18775         (convert_like): Likewise.
18776         * cvt.c (ocp_convert): Likewise.
18777         * decl.c (start_decl): Likewise.
18778         (start_function): Likewise.
18779         (finish_destructor_body): Likewise.
18780         (maybe_build_cleanup_1): Likewise.
18781         * decl2.c (reparse_decl_as_expr): Likewise.
18782         * init.c (perform_member_init): Likewise.
18783         (expand_cleanup_for_base): Likewise.
18784         (build_builtin_delete_call): Likewise.
18785         (build_new_1): Likewise.
18786         (build_delete): Likewise.
18787         * method.c (do_build_assign_ref): Likewise.
18788         * parse.y (already_scoped_stmt): Likewise.
18789         (nontrivial_exprlist): Likewise.
18790         (net_initializer): Likewise.
18791         (initlist): Likewise.
18792         * parse.c: Regenerated.
18793         * rtti.c (build_x_typeid): Likewise.
18794         (build_dynamic_cast_1): Likewise.
18795         * typeck.c (build_x_compound_expr): Likewise.
18796         (build_static_cast): Likewise.
18797         (build_modify_expr): Likewise.
18799         * cp-tree.h (DECL_VINDEX): Add documentation.
18800         * class.c (build_vtable_entry): Likewise.
18801         (start_vtable): Add comment.
18802         (add_virtual_function): Replace pending_hard_virtuals with
18803         overridden_virtuals and pending_virtuals with new_virtuals.
18804         Replace redundant assignments with assertions.
18805         (check_for_override): Add comment.
18806         (check_bases_and_members): Replace pending_hard_virtuals with
18807         overridden_virtuals and pending_virtuals with new_virtuals.
18808         (create_vtbl_ptr): Likewise.
18809         (layout_class_type): Likewise.
18810         (finish_struct_1): Likewise.  Add comments.
18812 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
18814         * class.c (finish_struct_1): Replace redundant code with
18815         assertions.
18817         * cp-tree.h (flag_new_abi): Move.
18818         (flag_use_cxa_atexit): Likewise.
18819         (flag_honor_std): Likewise.
18820         (flag_rtti): Likewise.
18821         (vbase_offsets_in_vtable_p): Define.
18822         (vptrs_present_everywhere_p): Likewise.
18823         (TYPE_CONTAINS_VPTR_P): Likewise.
18824         (dfs_walk_real): Declare.
18825         * class.c (build_vbase_pointer_fields): Check
18826         vbase_offsets_in_vtable_p.
18827         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
18828         BINFO_VPTR_FIELD.
18829         (build_vbase_offset_vtbl_entries): Simplify.
18830         (build_vbase_offset_vtbl_entries): Adjust.
18831         (build_vbase_pointer): Add ability to look up vbase offsets in
18832         vtable.
18833         (start_vtable): New function.
18834         (add_virtual_function): Use it.
18835         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
18836         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
18837         (build_vtbl_initializer): Take the type of the complete object as
18838         input.  Use it to correctly calculate vbase offsets.
18839         (dfs_finish_vtbls): Pass the complete type to
18840         build_vtbl_initializer.
18841         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
18842         (create_vtable_ptr): Create a vtable even if there are no
18843         new virtual functions, under the new ABI.
18844         (finish_struct_1): Likewise.
18845         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
18846         * decl.c (exapnd_static_init): Remove call to
18847         preserve_initializer.
18848         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
18849         vtables.
18850         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
18851         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
18852         (construct_virtual_bases): Don't initialize virtual base pointers
18853         under the new ABI.
18854         (build_aggr_init): Clean up comment.
18855         (expand_aggr_init_1): Likewise.
18856         * rtti.c (expand_class_desc): Store the virtual function table
18857         index where the vbase offset lives in the offset field.
18858         * search.c (dfs_walk_real): Make it global.
18859         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
18860         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
18862         * tinfo.h (USItype): Make it signed under the new ABI.
18863         * tinfo.cc (convert_to_base): New function.  Encapsulate base
18864         conversion logic here.
18865         (__class_type_info::do_upcast): Use it.
18866         (__class_type_info::do_dyncast): Likewise.
18867         (__class_type_info::do_find_public_subobj): Likewise.
18869         * init.c (construct_virtual_bases): Don't look up the addresses of
18870         virtual bases at run-time.
18872         * class.c (build_vbase_pointer): Relocate.
18873         (build_vbase_pointer_fields): Likewise.
18874         (dfs_build_vbase_offset_vtbl_entries): Likewise.
18875         (build_vbase_offset_vtbl_entries): Likewise.
18877         * decl.c (init_decl_processing): Complain if -fnew-abi
18878         -fno-vtable-thunks is used.
18880         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
18881         flag_new_abi.
18883 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
18885         * cp-tree.h (num_extra_vtbl_entries): New function.
18886         (size_extra_vtbl_entries): Likewise.
18887         (dfs_vtable_path_unmark): Likewise.
18888         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
18889         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
18890         * class.c (num_extra_vtbl_entries): New function.
18891         (size_extra_vtbl_entries): Likewise.
18892         (dfs_build_vbase_offset_vtbl_entries): New function.
18893         (build_vbase_offset_vtbl_entries): Likewise.
18894         (build_vtbl_initializer): Use it.
18895         (finish_struct_1): Adjust vtable sizes (using
18896         num_extra_vtbl_entries).
18897         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
18898         THUNK_DECL is non-NULL before expanding it.
18899         * init.c (expand_virtual_init): Adjust the vtable pointer by
18900         size_extra_vtbl_entries before storing it.
18901         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
18902         Handle TREE_LIST parameters here, not in the dfs_* functions.
18903         (dfs_unmarked_real_bases_queue_p): Adjust.
18904         (dfs_marked_real_bases_queue_p): Likewise.
18905         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
18906         (dfs_vtable_path_marked_real_bases_queue_p): New function.
18907         (dfs_vtable_path_unmark): Likewise.
18909 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
18911         * optimize.c (copy_body_r): Clear the operand three of a
18912         TARGET_EXPR when copying it.
18914 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18916         * method.c (build_decl_overload_real): Check whether we are in ::
18917         before returning __builtin_new/delete.
18919 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
18921         * pt.c (tsubst_friend_function): Improve comment.
18922         (instantiate_decl): Avoid crashing when a "nested" function is
18923         instantiated from the top level.
18925         * dump.c (dqeueue_and_dump): Dump
18926         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
18928 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18930         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
18932 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
18934         * g++spec.c (lang_specific_driver): Add -fnew-abi if
18935         ENABLE_NEW_GXX_ABI defined.
18936         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
18937         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
18938         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
18940 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
18942         * decl.c (start_cleanup_fn): Call pushdecl.
18944         * call.c (convert_class_to_reference): Fix typos.
18945         (build_conditional_expr): Handle errors gracefully.
18946         * class.c (push_nested_class): Likewise.
18947         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
18948         (DECL_THIS_EXTERN): Use it.
18949         (DECL_THIS_STATIC): Likewise.
18950         * cvt.c (convert_to_void): Handle errors gracefully.
18951         (build_expr_type_conversion): Likewise.
18952         * decl.c (maybe_push_decl): Likewise.
18953         (start_decl_1): Likewise.
18954         (require_complete_types_for_parms): Likewise.
18955         * parse.y (structsp): Likewise.
18956         (base_class): Likewise.
18957         * parse.c: Regenerated.
18958         * pt.c (finish_member_template_decl): Likewise.
18959         * typeck.c (decay_conversion): Likewise.
18961         * cp-tree.h (dfs_skip_vbases): New function.
18962         (find_vbase_instance): Likewise.
18963         * class.c (determine_primary_base): Allow a nearly empty base to
18964         serve as a primary base class under the new ABI.
18965         (get_class_offset_1): Rename to ...
18966         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
18967         messages here.
18968         (get_class_offset): Use it.  Issue error messages here.
18969         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
18970         find the right copies of virtual bases.
18971         (fixup_vtable_deltas1): Rename to ...
18972         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
18973         bases as primary bases.
18974         (fixup_vtable_deltas): Remove.
18975         (override_one_vtable): Handle virtual bases as primary bases.
18976         (merge_overrides): Likewise.
18977         (finish_struct_1): Likewise.
18978         (dump_class_hierarchy): Dump primary-ness of bases as well.
18979         * search.c (mark_primary_bases): Use a pre-order traversal to
18980         handle primary virtual bases.
18981         (dfs_skip_vbases): New fiunction.
18982         (expand_upcast_fixups): Adjust to handle primary virtual bases.
18983         (fixup_virtual_upcast_offsets): Likewise.
18984         (fixup_all_virtual_upcast_offsets): Likewise.
18985         (dfs_find_vbase_instances): New function.
18986         (find_vbase_instance): Likewise.
18988 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
18990         * lex.c (DIR_SEPARATOR): Delete macro.
18992 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
18994        * decl2.c (lang_decode_option): Handle automatic line wrapping
18995        option.
18997 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
18999         * friend.c (do_friend): Don't resolve scopes when processing
19000         template declarations, even if the qualifying scope doesn't
19001         involve template parameters.
19003 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
19005         * class.c (dfs_modify_vtables_queue_p): Remove.
19006         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
19007         and dfs_marked_real_bases_queue_p instead of
19008         dfs_modify_vtables_queue_p.
19010         * class.c (build_vbase_path): Simplify.
19011         (dfs_propagate_binfo_offsets): New function.
19012         (propagate_binfo_offsets): Use it.
19013         (remove_base_field): Simplify.
19014         (dfs_set_offset_for_vbases): Remove.
19015         (dfs_set_offset_for_shared_vbases): New function.
19016         (dfs_set_offset_for_unshared_vbases): Likewise.
19017         (layout_virtual_bases): Use them.
19018         (layout_basetypes): Don't call propagate_binfo_offsets.
19019         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
19020         for the vbases.
19022         * class.c (build_base_field): New function, split out from ...
19023         (build_base_fields): ... here.  Use it.  Allocate primary bases
19024         first, under the new ABI.
19025         (get_vtable_entry): Remove.
19026         (remove_base_field): New function, split out from ...
19027         (remove_base_fields): ... here.  Adjust since primary bases come
19028         first under the new ABI.
19030         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
19031         (initialize_vtbl_ptrs): New function.
19032         (expand_indirect_vtbls_init): Change prototype.
19033         (convert_pointer_to_vbase): Declare.
19034         * init.c (expand_direct_vtbls_init): Remove.
19035         (dfs_initialize_vtbl_ptrs): New function.
19036         (initialize_vtbl_ptrs): Likewise.
19037         (emit_base_init): Use initialize_vtbl_ptrs.
19038         * search.c (convert_pointer_to_vbase): Make it global.
19039         (expand_indirect_vtbls_init): Remove vtable initialization code.
19040         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
19042         * class.c (dfs_finish_vtbls): New function.
19043         (finish_vtbls): Use it.
19044         (dump_class_hierarchy): New function.
19046         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
19047         (BINFO_VBASE_PRIMARY_P): New macro.
19048         (BINFO_VIRTUALS): Add to documentation.
19049         (SET_BINFO_PRIMARY_MARKED_P): Remove.
19050         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
19051         (dfs_mark_primary_bases_queue_p): Likewise.
19052         (dfs_unmarked_real_bases_queue_p): New function.
19053         (dfs_marked_real_bases_queue_p): Likewise.
19054         * search.c (dfs_mark_primary_bases): Adjust.
19055         (mark_primary_bases): Likewise.
19056         (get_shared_vbase_if_not_primary): New function.
19057         (dfs_unmarked_real_bases_queue_p): Likewise.
19058         (dfs_marked_real_bases_queue_p): Likewise.
19059         (dfs_get_pure_virtuals): Simplify.
19060         (get_pure_virtuals): Likewise.
19062 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19064         * lex.c: Include tm_p.h.
19066 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
19068         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
19070 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
19072         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
19073         * pt.c (instantiate_decl): Defer comdat templates that might not be
19074         needed.
19076         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
19077         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
19078         (finish_file): Likewise.
19080         * decl2.c (import_export_class): Undo 12/14 change.
19082         * error.c (dump_decl): operator new, not operatornew.
19084         * class.c (field_decl_cmp): A nontype is "greater" than a type.
19085         * search.c (lookup_field_1): Look for the last field with the
19086         desired name.
19088 2000-01-05  Nathan Sidwell  <nathan@acm.org>
19090         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
19091         FUNCTION_DECL.
19093 2000-01-05  Nathan Sidwell  <nathan@acm.org>
19095         * typeck.c (build_static_cast): Don't strip target qualifiers
19096         when casting from a class.
19098 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19100         * class.c (warn_hidden): Initialize variable `fndecl'.
19102 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
19104         * decl.c (flag_isoc9x): New variable to be able to use code in
19105         c-common.c.  For now always zero.
19107 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
19109         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
19110         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
19111         or unshare_base_binfos for virtual bases here.
19112         * search.c (dfs_get_vbase_types): Do it here.
19113         (get_vbase_types): Adjust.
19115 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
19117         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
19118         (BINFO_PRIMARY_MARKED_P): Use flag 5.
19119         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
19120         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
19121         (unmark_primary_bases): Remove declaration.
19122         (unmarkedp): Declare.
19123         (dfs_vbase_unmark): Likewise.
19124         * class.c (determine_primary_base): Return immediately if there
19125         are no base classes.  Call mark_primary_bases here.
19126         (modify_all_direct_vtables): Remove.
19127         (modify_all_indirect_vtables): Remove.
19128         (dfs_modify_vtables_queue_p): New function.
19129         (dfs_modify_vtables): New function.
19130         (modify_all_vtables): Use them.
19131         (build_base_fields): Build FIELD_DECLs for primary virtual base
19132         classes.
19133         (create_vtable_ptr): Don't call determine_primary_base here.
19134         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
19135         (dfs_set_offset_for_vbases): ... this.
19136         (layout_virtual_bases): Use it.
19137         (layout_class_type): Call determine_primary_base here.
19138         * search.c (unmarkedp): Make it global.
19139         (shared_marked_p): Simplify.
19140         (shared_unmarked_p): Likewise.
19141         (dfs_primary_bases_queue_p): Remove.
19142         (dfs_unmark_primary_bases): Likewise.
19143         (unmark_primary_bases): Likewise.
19144         (mark_primary_bases): Simplify.
19145         (get_pure_virtuals): Don't call mark_primary_bases here.
19146         (dfs_vbase_unmark): New function.
19147         (get_vbase_types): Simplify.
19149         * class.c (struct base_info): Remove.
19150         (determine_primary_base): Take has_virtual_p rather than a
19151         base_info as input.  Don't calculate max_has_virtual.
19152         (finish_struct_bits): Remove max_has_virtual argument.
19153         (create_vtable_ptr): Remove max_has_virtual_p argument.
19154         (layout_virtual_bases): Remove max argument.
19155         (layout_basetypes): Likewise.
19156         (layout_class_type): Remove max_has_virtual_p argument.
19157         (finish_struct_1): Remove max_has_virtual.
19159         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
19160         (layout_basetypes): Remove.
19161         * class.c (propagate_binfo_offsets): Moved here from tree.c.
19162         Update to handle primary virtual bases.
19163         (remove_base_fields): New function, split out from
19164         layout_basetypes.
19165         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
19166         (layout_virtual_bases): New function, split out from
19167         layout_basetypes.  Update to handle primary virtual bases.
19168         (layout_basetypes): Moved here from tree.c.  Use
19169         remove_base_fields and layout_virtual_bases.
19170         * search.c (dfs_mark_primary_bases_queue_p): New function.
19171         (mark_primary_bases): Use it.
19172         * tree.c (CEIL): Remove.
19173         (propagate_binfo_offsets): Remove.
19174         (layout_basetypes): Remove.
19176 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
19178         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
19179         (BINFO_PRIMARY_MARKED_P): New macro.
19180         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
19181         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
19182         (mark_primary_bases): New function.
19183         (unmark_primary_bases): Likewise.
19184         * search.c (get_abstract_virtuals_1): Remove.
19185         (dfs_mark_primary_bases): New function.
19186         (mark_primary_bases): Likewise.
19187         (dfs_unmark_primary_bases): Likewise.
19188         (unmark_primary_bases): Likewise.
19189         (dfs_get_pure_virtuals): Likewise.
19191 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
19193         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
19194         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
19195         (modify_one_vtable): Adjust.
19196         (fixup_vtable_deltas1): Likewise.
19197         (override_one_vtable): Likewise.
19198         * search.c (get_abstract_virtuals_1): Likewise.
19199         (get_pure_virtuals): Likewise.
19200         (expand_upcast_fixups): Likewise.
19201         * tree.c (debug_binfo): Likewise.
19203         * class.c (build_vtable): Don't return a value.  Don't rebuild
19204         vtables for bases that have already been handled.
19205         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
19206         already been handled.
19207         (modify_one_vtable): Adjust accordingly.
19208         (fixup_vtable_deltas1): Likewise.
19209         (finish_struct_1): Likewise.
19211 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19213         * call.c (build_new_method_call): Also check destructors.