OSDN Git Service

2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
2
3         * class.c, parser.c: ANSIfy function definitions and declarations.
4
5 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
6
7         PR c++/9328
8         * error.c (dump_decl): For an OVERLOAD, just print the name of the
9         function; it doesn't make sense to try to print its type.
10         * semantics.c (finish_typeof): Issue errors about invalid uses.
11
12         PR c++/9298
13         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
14         function.
15         (cp_parser_expression_statement): Use it.
16         (cp_parser_explicit_instantiation): Likewise.
17         * pt.c (do_decl_instantiation): Improve error handling logic.
18         
19 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
20
21         PR c++/9384
22         * parser.c (cp_parser_using_declaration): Issue error messages
23         about name resolution failures here.
24
25         PR c++/9388
26         * class.c (currently_open_derived_class): Use dependent_type_p.
27         * cp-tree.h (dependent_type_p): New function.
28         (dependent_template_arg_p): Likewise.
29         (dependent_template_p): Likewise.
30         (type_dependent_expression_p): Likewise.
31         * parser.c (cp_parser_dependent_type_p): Remove.
32         (cp_parser_value_dependent_type_p): Likewise.
33         (cp_parser_type_dependent_expression_p): Likewise.
34         (cp_parser_dependent_template_arg_p): Likewise.
35         (cp_parser_dependent_template_id_p): Likewise.
36         (cp_parser_dependent_template_p): Likewise.
37         (cp_parser_diagnose_invalid_type_name): Replace
38         cp_parser_dependent_type_p with dependent_type_p, etc.
39         (cp_parser_primary_expresion): Likewise.
40         (cp_parser_nested_name_specifier_opt): Likewise.
41         (cp_parser_postfix_expression): Likewise.
42         (cp_parser_unary_expression): Likewise.
43         (cp_parser_template_name): Likewise.
44         (cp_parser_class_name): Likewise.
45         (cp_parser_lookup_name): Likewise.
46         * pt.c (dependent_type_p): New function.
47         (value_dependent_expression_p): Likewise.
48         (type_dependent_expression_p): Likewise.
49         (dependent_template_arg_p): Likewise.
50         (dependent_template_id_p): Likewise.
51         (dependent_template_p): Likewise.
52         
53         PR c++/9285
54         PR c++/9294
55         * parser.c (cp_parser_simple_declaration): Return quickly when
56         encountering errors.
57
58 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
59
60         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
61
62 2003-01-17  Jason Merrill  <jason@redhat.com>
63
64         PR c++/9167, c++/9358
65         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
66
67 2003-01-17  Jason Merrill  <jason@redhat.com>
68
69         PR c++/9342
70         * call.c (build_conditional_expr): Always do lvalue-rvalue
71         conversion.
72
73 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
74
75         PR c++/9294
76         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
77         * cp-tree.h (BASELINK_BINFO): Adjust.
78         (BASELINK_FUNCTIONS): Likewise.
79         (BASELINK_ACCESS_BINFO): Likewise.
80         (tree_baselink): New structure.
81         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
82         (lang_tree_node): Add baselink.
83         * decl.c (cp_tree_node_structure): Add BASELINK case.
84         * search.c (build_baselink): Adjust.
85         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
86         test from TREE_LIST case.
87
88         PR c++/9272
89         * parser.c (cp_parser_constructor_declarator_p): Do not assume
90         that a constructor cannot be declared outside of its own class.
91         
92         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
93         be resolved, neither can the qualified name.
94
95         * rtti.c (get_pseudo_ti_desc): Fix thinko.
96
97 2003-01-16  Jason Merrill  <jason@redhat.com>
98
99         PR c++/8564
100         * init.c (build_vec_init): Re-add maxindex parm.
101         (perform_member_init, build_aggr_init): Pass it.
102         (build_new_1): Pass it. Use an incomplete array type for full_type.
103         * typeck.c (build_modify_expr): Pass it.
104         * cp-tree.h: Adjust.
105
106 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
107
108         * cp-tree.h (tsubst_copy_and_build): New declaration.
109         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
110         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
111         (tsubst_copy_and_build): New function.
112
113 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
114
115         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
116         (PARTIAL_INSTANTIATION_P): Remove.
117         (IMPLICIT_TYPENAME_P): Likewise.
118         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
119         (build_typename_type): Remove declaration.
120         (parmlist_is_exprlist): Likewise.
121         * decl.c (build_typename_type): Make it static, remove third
122         parameter.
123         (push_class_binding): Don't do implicit typename stuff.
124         (make_typename_type): Likewise.
125         (lookup_name_real): Likewise.
126         (grokdeclarator): Don't try to convert declarations into
127         initializations.  Don't do implicit typename stuff.
128         (parmlist_is_exprlist): Remove.
129         (xref_basetypes): Simplify.
130         * decl2.c (grokfield): Don't try to convert declarations into
131         initializations.
132         (build_anon_union_vars): Do this while processing templates, too.
133         (finish_anon_union): Likewise.
134         * error.c (dump_type): Remove implicit typename handling.
135         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
136         (cp_parser_primary_expression): Correct handling of names not
137         found by unqualified name lookup in templates.
138         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
139         of types when possible.
140         (cp_parser_simple_declaration): Complain intelligently about some
141         invalid declarations.
142         (cp_parser_member_declaration): Likewise.
143         (cp_parser_constructor_declarator_p): Don't check when we're in a
144         function scope.
145         * pt.c (instantiate_class_template): Remove
146         PARTIAL_INSTANTIATION_P gunk.
147         * search.c (lookup_field_r): Don't build implicit typenames.
148         (marked_pushdecls_p): Don't enter dependent base types.
149         (unmarked_pushdecls_p): Likewise.
150         * semantics.c (begin_class_definition): Remove implicit typename
151         stuff.
152
153 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
154
155         PR c++/9212
156         * parser.c (cp_parser_direct_declarator): If accepting either
157         abstract or named, the name must be an unqualified-id.
158
159 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
160
161         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
162
163 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
164
165         * decl2.c (check_classfn): Fix uninitialized warning.
166         (build_anon_union_vars): Likewise.
167         * pt.c (tsubst_copy): Likewise.
168
169 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
170
171         Further conform g++'s __vmi_class_type_info to the C++ ABI
172         specification.
173         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
174         the specification.
175         (class_hint_flags): Likewise.
176
177 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
178
179         * config-lang.in: Add semantics.c to gtfiles.
180         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
181         (saved_scope): Likewise.
182         (type_lookups): Remove.
183         (deferred_access): New structure.
184         (type_access_control): Remove.
185         (save_type_access_control): Likewise.
186         (reset_type_access_control): Likewise.
187         (decl_type_access_control): Likewise.
188         (push_deferring_access_checks): Declare.
189         (resume_deferring_access_checks): Likewise.
190         (stop_deferring_access_checks): Likewise.
191         (pop_deferring_access_checks): Likewise.
192         (get_deferred_access_checks): Likewise.
193         (pop_to_parent_deferring_access_checks): Likewise.
194         (perform_deferred_access_checks): Likewise.
195         (perform_or_defer_access_check): Likewise.
196         * decl.c (make_typename_type): Use perform_or_defer_access_check.
197         (make_unbound_class_template): Likewise.
198         (grokdeclarator): Don't call decl_type_access_control.
199         * parser.c (cp_parser_context): Remove deferred_access_checks
200         and deferring_access_checks_p fields.
201         (cp_parser_context_new): Adjust.
202         (cp_parser): Remove access_checks_lists.
203         (cp_parser_defer_access_check): Remove.
204         (cp_parser_start_deferring_access_checks): Remove.
205         (cp_parser_stop_deferring_access_checks): Remove.
206         (cp_parser_perform_deferred_access_checks): Remove.
207         (cp_parser_nested_name_specifier_opt): Use new deferred access
208         functions.
209         (cp_parser_simple_declaration): Likewise.
210         (cp_parser_template_id): Likewise.
211         (cp_parser_function_definition): Likewise.
212         (cp_parser_class_specifier): Likewise.
213         (cp_parser_lookup_name): Likewise.
214         (cp_parser_single_declaration): Likewise.
215         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
216         (cp_parser_parse_tentatively): Likewise.
217         (cp_parser_parse_definitely): Likewise.
218         (yyparse): Likewise.
219         (cp_parser_init_declarator): Remove access_checks parameter.
220         Use new deferred access functions.
221         (cp_parser_function_definition_from_specifiers_and_declarator):
222         Likewise.
223         (cp_parser_class_head): Remove deferring_access_checks_p and
224         saved_access_checks parameters.  Use new deferred access functions.
225         (cp_parser_member_specification_opt): Don't call
226         reset_type_access_control.
227         * search.c (type_access_control): Remove.
228         * semantics.c: Include "gt-cp-semantics.h".
229         (deferred_type_access_control): Remove.
230         (deferred_access_stack): New variable.
231         (deferred_access_free_list): Likewise.
232         (push_deferring_access_checks): New function.
233         (resume_deferring_access_checks): Likewise.
234         (stop_deferring_access_checks): Likewise.
235         (pop_deferring_access_checks): Likewise.
236         (get_deferred_access_checks): Likewise.
237         (pop_to_parent_deferring_access_checks): Likewise.
238         (perform_deferred_access_checks): New function, adapted from
239         cp_parser_perform_deferred_access_checks.
240         (perform_or_defer_access_check): New function, adapted from
241         cp_parser_defer_access_check.
242         (current_type_lookups): Remove.
243         (deferred_type_access_control): Likewise.
244         (decl_type_access_control): Likewise.
245         (save_type_access_control): Likewise.
246         (reset_type_access_control): Likewise.
247         (begin_function_definition): Adjust.
248         (begin_class_definiton): Likewise.
249
250 2003-01-13  Jason Merrill  <jason@redhat.com>
251
252         PR c++/8748
253         * class.c (build_base_path): Take the address before calling save_expr.
254
255         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
256         all the ambiguous conversions are bad.
257
258         * class.c (maybe_warn_about_overly_private_class): Don't stop
259         searching when we find a nonprivate method.
260
261         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
262
263 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
264
265         * cp-tree.h (get_arglist_len_in_bytes): Remove.
266
267         PR c++/9264
268         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
269         typeame types more robustly.
270
271 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
272
273         * parser.c:  Fix comment typos.
274
275 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
276
277         PR c++/9099
278         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
279         an object_type which is not a class type.
280
281 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
282
283         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
284         (cp_parser_late_parsing_default_args): Likewise.
285
286 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
287
288         * cfns.gperf: ANSIfy function declarations.
289         * cfns.h: Regenerate.
290         * cp-tree.h: ANSIfy function declarations.
291
292 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
293
294         * cp-tree.h (reparse_absdcl_as_expr): Remove.
295         (reparse_absdcl_as_casts): Likewise.
296         (reparse_decl_as_expr): Likewise.
297         (finish_decl_parsing): Likewise.
298         * decl2.c (reparse_absdcl_as_expr): Remove.
299         (reparse_absdcl_as_casts): Likewise.
300         (repase_decl_as_expr): Likewise.
301         (finish_decl_parsing): Likewise.
302
303         PR c++/9128
304         PR c++/9153
305         PR c++/9171
306         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
307         function.
308         (cp_parser_nested_name_specifier_opt): Correct the
309         check_dependency_p false.
310         (cp_parser_postfix_expression): Fix formatting.
311         (cp_parser_decl_specifier_seq): Avoid looking for constructor
312         declarators when possible.
313         (cp_parser_template_id): Avoid performing name-lookup when
314         possible.
315         (cp_parser_class_head): Do not count specializations when counting
316         levels of templates.
317         (cp_parser_constructor_declarator_p): Return immediately if
318         there's no chance that the tokens form a constructor declarator.
319         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
320         expression with reference type.
321         (get_tinfo_decl_dynamic): Do not return an expression with
322         reference type.
323         (build_typeid): Add comment.  Do not return an expression with
324         reference type.
325         * typeck.c (build_class_member_access_expr): Improve handling of
326         conditionals and comma-expressions as objects.
327
328 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
329
330         * cfns.gperf: ANSIfy function declarations.
331         * cfns.h: Regenerate.
332         * cp-tree.h: ANSIfy function declarations.
333         * parser.c: ANSIfy function declarations & definitions.
334
335         * decl.c (bad_specifiers): Fix parameter order error I introduced.
336
337 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
338
339         Merge from pch-branch:
340
341         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
342
343         Merge to tag pch-merge-20030102:
344         
345         * semantics.c (finish_translation_unit): Don't call finish_file.
346         * parser.c: Don't include ggc.h.
347         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
348         read first token here.  Don't allow PCH files after the first
349         token is read.
350         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
351         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
352         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
353         (cp_parser_late_parsing_for_member): Don't duplicate call to
354         cp_lexer_set_source_position_from_token.
355         (cp_parser_late_parsing_default_args): Likewise.
356         (yyparse): Call finish_file after clearing the_parser.
357
358         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
359
360         * Make-lang.in: Remove $(GGC_H) from all dependencies.
361         (CXX_TREE_H): Add $(GGC_H).
362         * class.c: Don't include ggc.h. 
363         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
364         (method_name_cmp): Likewise.
365         (resort_data): New variable.
366         (resort_field_decl_cmp): New.
367         (resort_method_name_cmp): New.
368         (resort_sorted_fields): New.
369         (resort_type_method_vec): New.
370         (finish_struct_methods): Delete cast.
371         (finish_struct_1): Delete cast.
372         * cp-tree.h: Include ggc.h.
373         (struct lang_type_class): Add reorder attribute to field `methods'.
374         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
375         (resort_sorted_fields): New prototype.
376         (resort_type_method_vec): New prototype.
377         * call.c: Don't include ggc.h.
378         * decl.c: Likewise.
379         * decl2.c: Likewise.
380         * init.c: Likewise.
381         * lex.c: Likewise.
382         * method.c: Likewise.
383         * optimize.c: Likewise.
384         * parse.y: Likewise.
385         * pt.c: Likewise.
386         * repo.c: Likewise.
387         * search.c: Likewise.
388         * semantics.c: Likewise.
389         * spew.c: Likewise.
390         * tree.c: Likewise.
391
392         * lang-specs.h: Remove comment.
393
394         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
395
396         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
397         (operator_name_info): Mark to be saved for PCH, specify size.
398         (assignment_operator_name_info): Likewise.
399
400         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
401
402         * decl.c (anon_cnt): Mark to be saved for PCH.
403
404         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
405
406         * lex.c  (init_reswords): Delete now-untrue comment.
407         Allocate ridpointers using GGC.
408
409         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
410
411         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
412
413         * g++spec.c (lang_specific_driver): Don't include standard
414         libraries in `added'.
415
416         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
417
418         * decl2.c (finish_file): Call c_common_write_pch.
419         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
420
421         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
422
423         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
424         files when using g++.
425         * lang-specs.h: Handle compiling C++ header files.
426
427 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
428
429         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
430
431 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
432
433         * pt.c (push_access_scope_real): Call push_to_top_level for
434         function in namespace scope.
435         (pop_access_scope): Call pop_from_top_level for function in
436         namespace scope.
437
438 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
439
440         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
441
442 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
443
444         * Make-lang.in (c++.install-common, c++.install-man,
445         c++.uninstall): Prepend $(DESTDIR) to destination paths in
446         all (un)installation commands.
447         (c++.install-common): Rewrite $(LN) commands to support
448         DESTDIR with "ln" as well as with "ln -s".
449
450 2003-01-08  Jason Merrill  <jason@redhat.com>
451
452         * parser.c (cp_parser_primary_expression): See through explicitly
453         scoped ALIAS_DECLs, too.
454
455 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
456
457         * decl.c: Remove some #if 0 code.
458
459         * decl.c: ANSIfy function declarations.
460
461 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
462
463         * parser.c (cp_parser_asm_definition): Correct handling of omitted
464         operands.
465
466 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
467
468         PR c++/9030
469         * decl.c (make_typename_type): Check access only when tf_error.
470         (make_unbound_class_template): Likewise.
471         * pt.c (saved_access_scope): New variable.
472         (push_access_scope_real): New function.
473         (push_access_scope): Likewise.
474         (pop_access_scope): Likewise.
475         (tsubst_default_argument): Use them.
476         (instantiate_template): Likewise.
477         (regenerate_decl_from_template): Likewise.
478         (instantiate_decl): Likewise.
479         (get_mostly_instantiated_function_type): Likewise.
480
481 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
482
483         * tree.c: Delete bogus #if 0 code.
484
485 2003-01-07  Andreas Schwab  <schwab@suse.de>
486
487         * class.c (layout_class_type): Don't use
488         PCC_BITFIELD_TYPE_MATTERS if not defined.
489
490 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
491
492         PR c++/9165
493         * decl2.c (build_cleanup): Mark the object as used.
494
495         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
496         (hash_local_specialization): New function.
497         (register_local_specialization): Revert 2003-01-05 change.
498         (instantiate_decl): Use hash_local_specialization when creating
499         the local_specializations table.
500         
501         * decl2.c (mark_used): Do not synthesize thunks.
502
503         * class.c (layout_class_type): Correct handling of unnamed
504         bitfields wider than their types.
505
506         PR c++/9189
507         * parser.c (cp_parser): Remove default_arg_types.  Update
508         documentation for unparsed_functions_queues.
509         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
510         parameter.
511         (cp_parser_new): Don't set parser->default_arg_types.
512         (cp_parser_function_definition): Adjust usage of
513         unparsed_funtions_queues.
514         (cp_parser_class_specifier): Don't mess with
515         parser->default_arg_types.  Handle default argument processing in
516         a separate phase from function body processing.
517         (cp_parser_template_declaration_after_export): Adjust usage of
518         unparsed_functions_queues.
519         (cp_parser_late_parsing_for_member): Do not handle default
520         arguments.
521
522 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
523
524         PR c++/9109
525         * parser.c (cp_parser_declarator_kind): New enum.
526         (cp_parser_declarator): Adjust.
527         (cp_parser_direct_declarator): Adjust. Allow for either named or
528         abstract declarator. Prefer abstract, if possible. Allow
529         parenthesized function name.
530         (cp_parser_condition): Adjust cp_parser_declarator call.
531         (cp_parser_explicit_instantiation): Likewise.
532         (cp_parser_init_declarator): Likewise.
533         (cp_parser_type_id): Likewise.
534         (cp_parser_function_definition): Likewise.
535         (cp_parser_member_declaration): Likewise.
536         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
537         the tentative parsing.
538         (cp_parser_exception_declaration): Likewise.
539
540 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
541
542         * parser.c (cp_parser_template_parameter): Adjust call to
543         cp_parser_parameter_declaration.
544         (cp_parser_parameter_declaration_list): Likewise.
545         (cp_parser_parameter_declaration): Replace
546         greater_than_is_operator_p with template_parm_p parameter.  Do not
547         cache tokens for template default arguments.
548
549         * pt.c (retrieve_local_specialization): Use htab_find, not
550         htab_find_with_hash.
551         (register_local_specialization): Use htab_find_slot, not
552         htab_find_slot_with_hash.
553         (instantiate_decl): Pass a hash function to htab_create.
554         
555 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
556
557         * parser.c (cp_parser_binary_expression,
558         cp_parser_multiplicative_expression,
559         cp_parser_additive_expression, cp_parser_shift_expression,
560         cp_parser_relational_expression, cp_parser_equality_expression,
561         cp_parser_and_expression, cp_parser_exclusive_or_expression,
562         cp_parser_inclusive_or_expression,
563         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
564         cp_parser_binary_expression): Const-ify.
565
566 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
567
568         * method.c (use_thunk): Disable access control while building the
569         body of the thunk.
570
571 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
572
573         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C 
574         front end.
575
576 2003-01-03  Matt Austern  <austern@apple.com>
577
578         * cp-tree.h (struct lang_type_class): add field for key method
579         (cp_global_trees): rename dynamic_classes to keyed_classes
580         (key_method): add definition
581         * class.c (finish_struct_1): compute class's key method, and add
582         the class to keyed_classes list if there is no key method.
583         * decl.c (finish_function): add class to keyed_classes list if we
584         see a definition of the class's key method.
585         * pt.c (instantiate_class_template): add template specialization
586         of a dynamic class to keyed_classes list.
587         * decl2.c (key_method): remove
588         (finish_file): iterate only through keyed_classes list when
589         deciding whether to emit vtables, remove class from its list after
590         we do the emission.
591         
592 2003-01-02  Jason Merrill  <jason@redhat.com>
593
594         * call.c (build_conditional_expr): Stabilize lvalues properly.
595         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
596         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
597         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
598
599         * call.c (convert_like_real): Call decl_constant_value for an
600         IDENTITY_CONV even if there are no more conversions.
601
602         * cvt.c (build_up_reference): Don't push unnamed temps.
603
604         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
605
606         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
607         for a backend struct.
608
609         * except.c (wrap_cleanups_r, build_throw): Make
610         MUST_NOT_THROW_EXPRs void.
611         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
612
613         * init.c (build_vec_delete_1): Pre-evaluate the base address.
614
615         * init.c (get_temp_regvar): Simplify logic.
616
617         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
618         our replacement is a decl.
619
620         * decl.c (cp_make_fname_decl): Push the decls inside the
621         outermost scope.
622
623 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
624
625         PR c++/45, c++/3784
626         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
627         the same too.
628
629 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
630
631         * parser.c (struct cp_parser): Add access_checks_lists field
632         (cp_parser_simple_declaration): Use.
633         (cp_parser_init_declarator): Likewise. 
634
635 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
636
637         * parser.c (cp_parser_declaration): Accept the __extension__
638         keyword before the declaration.
639
640         PR c++/2843
641         * parser.c (cp_parser_parameter_declaration): Allow attributes to
642         appear after the declarator.
643
644         * call.c (build_new_method_call): Fix typo in message format
645         string.
646
647 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
648
649         * parser.c (cp_lexer_next_token_is): Declare it inline.
650         (cp_lexer_set_source_position_from_token): Likewise.
651         (cp_lexer_debugging_p): Likewise.
652         (cp_parser_parsing_tentatively): Likewise.
653         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
654         to the cp_lexer_peek_token.
655
656         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
657         expression.
658
659 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
660
661         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
662         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
663         cp/repo.c: Fix copyright years.
664
665 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
666
667         * lex.c: Remove superfluous include of cpplib.h.
668         (CONSTRAINT): Define without conditions.
669         (init_cp_pragma): Use c_register_pragma.
670
671 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
672
673         * .cvsignore: Remove.
674
675 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
676
677         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
678           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
679           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
680           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
681           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
682           copyright header.
683         * lex.h: parse.y is dead, so don't mention it.  Also replace the
684           copyright header with the default GNU copyright header.
685
686 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
687
688         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
689         (lookup_name_namespace_only): Likewise.
690         (begin_only_namespace_names): Likewise.
691         (end_only_namespace_names): Likewise.
692         * decl.c (only_namespace_names): Remove.
693         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
694         (lookup_name_real): Do not check only_namespace_names.
695         (lookup_name_namespace_only): Remove.
696         (begin_only_namespace_names): Likewise.
697         (end_only_namespace_names): Likewise.
698         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
699         nested-name-specifiers more gracefully.
700         (cp_parser_class_or_namespace_name): Avoid looking up namespace
701         names when they cannot possibly appear.
702         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
703         (cp_parser_elaborated_type_specifier): Likewise.
704         (cp_parser_namespace_name): Only look for namespace names.
705         (cp_parser_lookup_name): Add is_namespace parameter.
706         (cp_parser_lookup_name_simple): Adjust call to
707         cp_parser_lookup_name.
708
709         * parser.c (cp_parser_dependent_type_p): Fix thinko.
710
711 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
712
713         * .cvsignore: Update.
714
715 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
716
717         * class.c (modify_vtable_entry): Remove unused variable.
718         (get_vcall_index): Always expect a non-thunk.
719         (update_vtable_entry_for_fn): Combine covariant adjustments, when
720         overriding a thunk. Pass get_vcall_index a non-thunk.
721
722         * decl2.c (finish_file): Mark undefined inlines as extern.
723
724 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
725
726         * cp-tree.def (RETURN_INIT): Remove.
727         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
728         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
729         (note_level_for_for): Remove.
730         (note_level_for_try): Likewise.
731         (note_level_for_catch): Likewise.
732         (finish_named_return_value): Likewise.
733         (do_pushlevel): Change prototype.
734         (pending_lang_change): Remove.
735         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
736         sk_for.
737         (note_level_for_for): Remove.
738         (note_level_for_try): Likewise.
739         (note_level_for_catch): Likewise.
740         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
741         * parser.c (cp_parser_context_free_list): Make it "deletable".
742         (cp_parser_template_argument): Remove misleading comment.
743         * pt.c (tsubst_expr): Remove RETURN_INIT code.
744         * semantics.c (genrtl_named_return_value): Remove.
745         (do_pushlevel): Take a scope kind as an argument.
746         (begin_if_stmt): Adjust.
747         (begin_while_stmt): Likewise.
748         (begin_for_stmt): Likewise.
749         (finish_for_init_stmt): Likewise.
750         (begin_switch_stmt): Likewise.
751         (begin_handler): Likewise.
752         (begin_compound_stmt): Likewise.
753         (finish_named_return_value): Remove.
754         (cp_expand_stmt): Remove RETURN_INIT case.
755         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
756
757 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
758
759         PR c++/9112
760         * parser.c (cp_parser_direct_declarator): Handle erroneous
761         parenthesized declarators correctly.
762
763 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
764
765         * cp-tree.h (pending_lang_change): Declare.
766
767 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
768
769         * parser.c (cp_parser_context_free_list): New variable.
770         (cp_parser_context_new): Use it.
771         (cp_parser_error): Check return code from
772         cp_parser_simulate_error.
773         (cp_parser_simulate_error): Return a value.
774         (cp_parser_id_expression): Optimize common case.
775         (cp_parser_class_name): Likewise.
776         (cp_parser_class_specifier): Adjust call to
777         cp_parser_late_parsing_default_args.
778         (cp_parser_lookup_name): Optimize common case.
779         (cp_parser_late_parsing_for_member): Adjust call to
780         cp_parser_late_parsing_default_args.
781         (cp_parser_late_parsing_default_args): Add scope parameter.
782         (cp_parser_require): Avoid creating the error message unless it's
783         needed.
784         (cp_parser_parse_definitely): Place free'd contexts on the free
785         list.
786
787         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
788
789 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
790
791         * parser.c (cp_parser_parameter_declaration_clause): Treat system
792         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
793
794 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
795
796         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
797         GCC, not GNU CC.
798
799 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
800
801         * parse.y: Remove.
802         * spew.c: Likewise.
803         * Make-lang.in (gt-cp-spew.h): Remove.
804         * cp-tree.h (do_pending_lang_change): Remove.
805         (do_identifier): Change prototype.
806         (finish_id_expr): Remove.
807         * decl.c (lookup_name_real): Remove yylex variable.
808         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
809         * lex.c (init_cpp_parse): Remove.
810         (reduce_cmp): Likewise.
811         (token_cmp): Likewise.
812         (yychar): Likewise.
813         (lastiddecl): Likewise.
814         (token_count): Likewise.
815         (reduce_count): Likewise.
816         (yyhook): Likewise.
817         (print_parse_statistics): Likewise.
818         (do_pending_lang_change): Likewise.
819         (do_identifier): Remove parsing parameter.
820         * lex.h (lastiddecl): Remove.
821         (looking_for_typename): Remove.
822         (looking_for_template): Likewise.
823         (pending_lang_change): Likewise.
824         (yylex): Likewise.
825         * semantics.c (finish_id_expr): Remove.
826
827         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
828         thread" correctly.
829
830 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
831
832         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
833         end, not the C front end.
834
835 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
836
837         * cp-tree.h (THUNK_TARGET): New macro.
838         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
839         (finish_thunk): Remove offset parms.
840         * class.c (find_final_overrider): Look through thunks.
841         (get_vcall_index): Use THUNK_TARGET.
842         (update_vtable_entry_for_fn): Look through thunks. Set covariant
843         fixed offset here. Adjust finish_thunk call.
844         (build_vtbl_initializer): Adjust finish_thunk calls.
845         * mangle.c (mangle_call_offset): Remove superfluous if.
846         (mangle_thunk): Adjust.
847         * method.c (make_thunk): Adjust.
848         (finish_thunk): Adjust.
849         (thunk_adjust): Remove assert.
850         (use_thunk): Use THUNK_TARGET
851         * dump1.c (cp_dump_tree): Adjust thunk dumping.
852
853         PR c++/9054
854         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
855         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
856
857 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
858
859         Remove traditional C constructs 4/n.
860         * decl2.c (grok_method_quals, warn_if_unknown_interface,
861         grok_x_components, cp_build_parm_decl, build_artificial_parm,
862         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
863         delete_sanity, check_member_template, check_java_method,
864         check_classfn, finish_static_data_member_decl, grokfield,
865         grokbitfield, grokoptypename, grok_function_init,
866         cplus_decl_attributes, constructor_name, defer_fn,
867         build_anon_union_vars, finish_anon_union, coerce_new_type,
868         coerce_delete_type, comdat_linkage, maybe_make_one_only,
869         key_method, import_export_vtable, import_export_class,
870         output_vtable_inherit, import_export_decl, import_export_tinfo,
871         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
872         set_guard, start_objects, finish_objects,
873         start_static_storage_duration_function,
874         finish_static_storage_duration_function, get_priority_info,
875         start_static_initialization_or_destruction,
876         finish_static_initialization_or_destruction,
877         do_static_initialization, do_static_destruction,
878         prune_vars_needing_no_initialization, write_out_vars,
879         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
880         add_using_namespace, merge_functions, ambiguous_decl,
881         lookup_using_namespace, lookup_using_namespace,
882         qualified_lookup_using_namespace, set_decl_namespace,
883         decl_namespace, current_decl_namespace, push_decl_namespace,
884         pop_decl_namespace, push_scope, pop_scope, add_function,
885         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
886         lookup_arg_dependent, do_namespace_alias,
887         validate_nonmember_using_decl, do_nonmember_using_decl,
888         do_toplevel_using_decl, do_local_using_decl,
889         do_class_using_decl, do_using_directive, check_default_args,
890         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
891         * parser.c (cp_parser_class_head): Use booleanss.
892         * decl.c (walk_globals, walk_vtables): Likewise.
893         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
894         walk_globals): Change return type from 'int' to 'bool'.
895         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
896         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
897         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
898         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
899         qualifier_flags, tinfo_base_init, generic_initializer,
900         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
901         dfs_class_hint_unmark, class_hint_flags, class_initializer,
902         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
903         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
904         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
905         * repo.c (repo_compile_flags, repo_template_declared,
906         repo_template_defined, repo_class_defined, repo_get_id,
907         repo_template_used, repo_vtable_used, repo_inline_used,
908         repo_tinfo_used, repo_template_instantiated, extract_string,
909         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
910         finish_repo): Likewise.
911         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
912         cxx_print_xnode): Likewise..
913         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
914         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
915         * cxxfilt.c (demangle_it, print_demangler_list, usage,
916         standard_symbol_characters, hp_symbol_characters, main, fatal):
917         Likewise.
918         (strip_underscore):  Change type from 'int' to 'bool'.
919         (main): Use boolean constants.
920
921 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
922
923         Remove traditional C constructs 3/n.
924         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
925         build_up_reference, warn_ref_binding, convert_to_reference,
926         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
927         convert_to_void, convert, convert_force, build_type_conversion,
928         build_expr_type_conversion, type_promotes_to,
929         perform_qualification_conversions): Use C90 prototyping style.
930         * decl2.c (grok_array_decl): Use boolean constant.
931         (delete_sanity): Likewise.
932         * typeck.c (build_unary_op): Likewise.
933         * semantics.c (finish_switch_cond): Likewise.
934         * parser.c (cp_parser_direct_new_declarator): Likewise.
935         * init.c (build_new): Likewise.
936
937 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
938
939         * Make-lang.in (po-generated): Remove parse.c.
940         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
941         ($(srcdir)/cp/parse.h): Remove target.
942         ($(srcdir)/cp/parse.c): Likewise.
943         (gt-cp-parse.h): Likewise.
944         (gt-cp-parser.h): New target.
945         (c++.distclean): Do not remove parse.output.
946         (c++.maintainer-clean): Do not remove parse.c or parse.h.
947         (cp/spew.o): Remove target.
948         (cp/lex.o): Adjust dependencies.
949         (cp/pt.o): Likewise.
950         (cp/parse.o): Likewise.
951         (cp/TAGS): Do not mention parse.c.
952         (cp/parser.o): New target.
953         * NEWS: Mention the new parser.
954         * call.c (build_scoped_method_call): Simplify.
955         (build_method_call): Likewise.
956         (build_new_function_call): Adjust calls to add_function_candidate
957         and add_template_candidate.
958         (build_new_op): Improve handling of erroroneous operands.
959         (convert_default_arg): Remove circular argument processing.
960         (name_as_c_string): New function.
961         (build_new_method_call): Use it.
962         (perform_implicit_conversion): Use error_operand_p.
963         * class.c (finish_struct_anon): Use constructor_name_p.
964         (check_field_decls): Likewise.
965         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
966         (resolve_address_of_overloaded_function): Likewise.
967         (instantiate_type): Tweak pointer-to-member handling.
968         (get_primary_binfo): Remove incorrect assertion.
969         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
970         * cp-tree.h (DEFARG_TOKENS): New macro.
971         (default_arg): New structure.
972         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
973         (lang_tree_node): Add default_arg.
974         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
975         (type_info_ref_type): New macro.
976         (saved_scope): Make processing_explicit_instantiation a boolean.
977         (check_access): New field.
978         (unparsed_text): Remove.
979         (language_function): Remove unparsed_inlines.
980         (error_operand_p): New macro.
981         (lang_decl): Adjust pending_inline_info.
982         (DEFARG_POINTER): Remove.
983         (tag_types): Add typenames.
984         (lookup_ualified_name): Declare.
985         (lookup_name_real): Likewise.
986         (shadow_tag): Adjust prototype.
987         (get_scope_of_declarator): Declare it.
988         (process_next_inline): Remove it.
989         (check_for_missing_semicolon): Likewise.
990         (maybe_get_template_decl_from_type_decl): Declare it.
991         (finish_label_stmt): Adjust prototype.
992         (finish_non_static_data_meber): Declare it.
993         (finish_pseudo_destructor_call_expr): Rename to ...
994         (finish_pseudo_destructor_expr): ... this.
995         (finish_compound_literal): Declare it.
996         (begin_inline_definitions): Remove it.
997         (init_spew): Remove.
998         (peekyylex): Likewise.
999         (arbitrate_lookup): Likewise.
1000         (frob_opname): Likewise.
1001         (maybe_snarf_defarg): Likewise.
1002         (add_defarg_fn): Likewise.
1003         (do_pending_defargs): Likewise.
1004         (done_pending_defargs): Likewise.
1005         (unprocessed_defarg_fn): Likewise.
1006         (replace_defarg): Likewise.
1007         (end_input): Likewise.
1008         (get_overloaded_fn): Likewise.
1009         * cvt.c (convert_to_reference): Improve error handling.
1010         * decl.c (lookup_name_real): Do not declare it static.
1011         (maybe_push_to_top_level): Set check_access.
1012         (identifier_type_value): Adjust call to lookup_name_real.
1013         (lookup_qualified_name): New method.
1014         (lookup_name_real): Remove special-case parsing code.
1015         (lookup_name-nonclass): Adjust call to lookup_name_real.
1016         (lookup_name_namespace_only): Likewise.
1017         (lookup_name): Likewise.
1018         (check_tag_decl): Return the type declared.
1019         (shadow_tag): Likewise.
1020         (register_dtor_fn): Tweak check_access.
1021         (grokfndecl): Use constructor_name_p.
1022         (get_scope_of_declarator): New function.
1023         (grokdeclarator): Obscure tweaks for slightly different declarator
1024         representations.
1025         (start_method): Return error_mark_node to indicate failure.
1026         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
1027         * decl2.c (constructor_name_full): Simplify.
1028         (constructor_name): Use it.
1029         (build_expr_from_tree): Adjust for changes to do new parser.
1030         (push_scope): Improve robustness.
1031         (validate_nonmember_using_decl): Process declarations, not names.
1032         (do_class_using_decl): Likewise.
1033         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
1034         here.
1035         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
1036         * expr.c (cxx_expand_expr): Handle BASELINKs.
1037         * init.c (member_init_ok_or_else): Issue more errors.
1038         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
1039         * lex.c: Do not include parse.h.
1040         (yypring): Do not declare.
1041         (yylval): Likewise.
1042         (make_reference_declarator): Remove error-generating code.
1043         (rid_to_yy): Remove.
1044         (cxx_init): Do not call init_spew.
1045         (yypring): Remove.
1046         (check_for_missing_semicolon): Remove.
1047         * lex.h (got_scope): Remove.
1048         (got_object): Remove.
1049         * method.c (hack_identifier): Use finish_non_static_data_member.
1050         (implicitly_declare_fn): Adjust use of constructor_name.
1051         * parser.c: New file.
1052         * pt.c (parse.h): Do not include it.
1053         (maybe_get_template_decl_from_template): Do not declare it.
1054         (finish_member_template_decl): Tweak.
1055         (begin_explicit_instantiation): Adjust for
1056         processing_explicit_instantiation being boolean.
1057         (end_explicit_instantiation): Likewise.
1058         (maybe_process_partial_specialization): Tighten specialization
1059         test.
1060         (retrieve_local_specialization): Adjust ue of hash table.
1061         (eq_local_specializations): New function.
1062         (register_local_specialization): Likewise.
1063         (push_template_decl_real): Remove unnecessary test.
1064         (maybe_get_template_decl_from_type_decl): Don't make it static.
1065         (for_each_template_parm_r): Handle TYPEOF_TYPE.
1066         (tsubst_copy): Use retrieive_local_specialization to handle
1067         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
1068         Handle COMPONENT_REFs with pseudo-destructor-expressions.
1069         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
1070         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
1071         (unify): Tweak handling of CONST_DECLs.
1072         (regenerate_decl_from_template): Use push_nested_class.
1073         (template_for_substitution): New funciton.
1074         (instantiate_decl): Use it.  Register parameters as local
1075         specializations.
1076         * rtti.c (init_rtti_processing): Set type_info_ref_type.
1077         (build_typeid): Use it.
1078         (get_typeid): Likeise.
1079         * search.c (accessible_p): Use check_access, not
1080         flag_access_control.
1081         (adjust_result_of_qualified_name_lookup): Pay attention to the
1082         context_class.
1083         * semantics.c (finish_asm_stmt): Adjust error handling.
1084         (finish_label_stmt): Return the statement.
1085         (finish_non_static_data_member): New function.
1086         (finish_class_expr): Handle BASELINKs.
1087         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
1088         (finish_object_call_expr): Simplify handling during templates.
1089         (finish_pseudo_destructor_call_expr): Rename to ...
1090         (finish_pseudo_dtor_expr): ... this.
1091         (finish_compound_literal): New function.
1092         (begin_inline_definitions): Remove.
1093         (finish_sizeof): Remove special template handling.
1094         * spew.c: Do not include parse.h.
1095         * tree.c (get_overloaded_fn): Remove.
1096         * typeck.c (build_class_member_access_expr): Handle
1097         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
1098         (lookup_destructor): New function.
1099         (finish_class_member_access_expr): Use it.
1100         (convert_arguments): Simplify.
1101         (build_unary_op): Handle BASELINKs.
1102
1103 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
1104
1105         PR c++/4803
1106         * decl2.c (mark_used): Defer inline functions.
1107         (finish_file): Merge deferred_fns loops. Check all used
1108         inline functions have a definition.
1109         * method.c (make_thunk): Thunks are not inline.
1110
1111         PR c++/5116, c++/764
1112         * call.c (build_new_op): Make sure template class operands are
1113         instantiated.
1114
1115 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
1116
1117         PR C++/7964
1118         * cp-tree.h (resolve_scoped_fn_name): Prototype.
1119         * call.c (resolve_scoped_fn_name): New function. Deal with
1120         more template expansion. Broken out of ...
1121         * parse.y (parse_finish_call_expr): ... here. Call it.
1122         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
1123         resolve_scoped_fn_name and build_call_from_tree.
1124
1125         PR c++/9053
1126         * decl.c (duplicate_decls): Templates may be disambiguated by
1127         return type.
1128
1129         PR c++/8702
1130         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
1131         conversion operators on failure.
1132
1133 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1134
1135         Remove traditional C constructs 2/n.
1136         * call.c (tourney, build_field_call, equal_functions, joust,
1137         compare_ics, build_over_call, build_java_interface_fn_ref,
1138         convert_like_real, op_error, build_object_call, resolve_args,
1139         build_vfield_ref, check_dtor_name, build_scoped_method_call,
1140         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
1141         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
1142         standard_conversion, reference_related_p,
1143         reference_compatible_p, convert_class_to_reference,
1144         direct_reference_binding, reference_binding,
1145         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
1146         add_template_conv_candidate, any_viable, any_strictly_viable,
1147         build_this, splice_viable, print_z_candidates,
1148         build_user_type_conversion, build_new_function_call,
1149         conditional_conversion, build_conditional_expr, build_new_op,
1150         build_op_delete_call, enforce_access, call_builtin_trap,
1151         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
1152         convert_default_arg, type_passed_as, convert_for_arg_passing,
1153         in_charge_arg_for_name, is_properly_derived_from,
1154         maybe_handle_implicit_object, maybe_handle_ref_bind,
1155         source_type, add_warning, can_convert, can_convert_arg,
1156         perform_implicit_conversion, can_convert_arg_bad,
1157         initialize_reference, add_conv_candidate,
1158         add_template_candidate_real, add_template_candidate): Ansify.
1159
1160 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
1161
1162         PR c++/8572
1163         * cp-tree.h (grokoptypename): Add SCOPE parameter.
1164         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
1165         if in a template scope.
1166         * parse.y (unoperator): Return the scope.
1167         (operator_name): Adjust grokoptypename call.
1168
1169 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1170
1171         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
1172         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
1173         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
1174
1175 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
1176
1177         * ChangeLog: Fix a typo.
1178         * class.c: Fix comment typos.
1179         * cp-tree.h: Likewise.
1180
1181 2002-12-18  Jason Merrill  <jason@redhat.com>
1182
1183         Handle anonymous unions at the tree level.
1184         C++ ABI change: Mangle anonymous unions using the name of their
1185         first named field (by depth-first search).  Should not cause
1186         binary compatibility problems, though, as the compiler previously
1187         didn't emit anything for affected unions.
1188         * cp-tree.def (ALIAS_DECL): New tree code.
1189         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
1190         first field, not the largest.
1191         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
1192         push the decl, and write it out at namespace scope.
1193         * decl.c (lookup_name_real): See through an ALIAS_DECL.
1194         (pushdecl): Add namespace bindings for ALIAS_DECLs.
1195         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
1196         of a decl which doesn't have one.
1197         * typeck.c (build_class_member_access_expr): Don't recurse if
1198         we already have the type we want.
1199
1200 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1201
1202         PR c++/8099
1203         * friend.c (make_friend_class): Allow partial specialization
1204         when declaration is not a template friend.
1205
1206 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1207
1208         PR c++/3663
1209         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
1210         TREE_PROTECTED to created decl nodes.
1211
1212 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
1213
1214         * class.c (build_base_field): Do not set DECL_PACKED on the
1215         FIELD_DECL.
1216
1217 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1218
1219         * cp-tree.h (struct tree_srcloc): Use location_t.
1220         (SOURCE_LOCUS): New.
1221         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
1222
1223 2002-12-17  Jason Merrill  <jason@redhat.com>
1224
1225         * decl.c (finish_function): Also complain about no return in
1226         templates.
1227         * semantics.c (finish_return_stmt): Also call check_return_expr in
1228         templates.
1229         * typeck.c (check_return_expr): In a template, just remember that we
1230         saw a return.
1231
1232 2002-12-16  Jason Merrill  <jason@redhat.com>
1233
1234         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
1235         of the CALL_EXPR.
1236
1237         * semantics.c (do_pushlevel): Call pushlevel after adding the
1238         SCOPE_STMT.
1239         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
1240         * parse.y (function_body): Go back to using compstmt.
1241         * decl.c (pushdecl): Skip another level to get to the parms level.
1242
1243         * call.c (build_new_method_call): Use is_dummy_object to determine
1244         whether or not to evaluate the object parameter to a static member
1245         function.
1246
1247 2002-12-14  Jason Merrill  <jason@redhat.com>
1248
1249         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
1250         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
1251         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
1252         don't bother with an AGGR_INIT_EXPR.
1253         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
1254         just generate a new decl normally.  Take return slot parm.
1255         * cp-tree.h: Adjust prototype.
1256
1257 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1258
1259         PR C++/8031
1260         * cvt.c (convert_to_pointer_force): Don't try comparing against
1261         erronous type.
1262
1263 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
1264
1265         * cp-tree.h: Have the multiple-include guards around
1266         the entire file.
1267
1268 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
1269
1270         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
1271         for SPEW_DEBUG.
1272         (snarf_method): Same.
1273         (snarf_defarg): Same.
1274
1275 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
1276
1277         PR c++/8372
1278         * pt.c (tsubst_copy): Handle destructor names more correctly.
1279
1280 2002-12-10  Matt Austern   <austern@apple.com>
1281
1282         * cp-tree.h: get rid of needs_virtual_reinit bit.
1283
1284 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
1285
1286         * NEWS: Document removal of in-class initialization extension for
1287         static data members of non-arithmetic, non-enumeration type.
1288         * decl.c (check_static_variable_definition): Do not allow that
1289         extension.
1290         * decl2.c (grokfield): Do not call digest_init when processing
1291         templates.
1292
1293 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1294
1295         * error.c (dump_expr): Fix format specifier warning.
1296
1297 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
1298
1299         * class.c (finish_struct_1): Correct comment.
1300         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
1301
1302 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1303
1304         PR C++/8799
1305         * error.c (dump_expr): Don't ever try to dump a non-existent
1306         expression.
1307
1308 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
1309
1310         Implement covariant returns.
1311         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
1312         (struct lang_decl_flags): Add this_thunk_p flag.
1313         Rename vcall_offset to virtual_offset.
1314         (struct lang_decl): Rename delta to fixed_offset.
1315         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
1316         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
1317         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
1318         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
1319         (make_thunk): Add this_adjusting arg.
1320         (finish_thunk): Declare.
1321         (mangle_thunk): Add this_adjusting arg.
1322         * class.c (get_vcall_index): Use base function for lookup.
1323         (update_vtable_entry_for_fn): Generate covariant thunk.
1324         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
1325         (build_vtbl_initializer): Use base function for lookup.
1326         Finish covariant thunk here. Adjust thunk generation.
1327         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
1328         Adjust thunk dumping.
1329         * mangle.c (mangle_call_offset): New function.
1330         (mangle_thunk): Adjust for covariant thunks.
1331         * method.c (make_thunk): Adjust. Do not set name here.
1332         (finish_thunk): New function. Set name here.
1333         (use_thunk): Generate covariant thunks too.
1334         (thunk_adjust): New function.
1335         * search.c (covariant_return_p): Remove. Fold into ...
1336         (check_final_overrider): ... here. Simplify.
1337         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
1338
1339 2002-12-03  Jason Merrill  <jason@redhat.com>
1340
1341         PR c++/8674
1342         * call.c (build_over_call): Check specifically for TARGET_EXPR
1343         when eliding.
1344
1345         PR c++/8461, c++/8625
1346         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
1347         (cp_convert_parm_for_inlining): Remove.
1348         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
1349         Remove.
1350         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
1351         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
1352
1353         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
1354         an ambiguous conversion.
1355
1356 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
1357
1358         PR c++/8688
1359         * decl.c (reshape_init): Handle erroneous initializers.
1360
1361 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
1362
1363         PR c++/8720
1364         * spew.c (remove_last_token): Make sure that last_chunk is set
1365         correctly.
1366
1367         PR c++/8615
1368         * error.c (dump_expr): Handle character constants with
1369         TREE_OVERFLOW set.
1370
1371 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1372
1373         DR 180
1374         * decl.c (grokdeclarator): Require class-key for all friend class.
1375         Output the correct type and context in the error message.
1376
1377 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
1378
1379         PR c++/5919
1380         * pt.c (unify): Use variably_modified_type_p to test validity of
1381         template argument types.
1382
1383         PR c++/8727
1384         * cp-tree.h (lang_type_class): Add typeinfo_var.
1385         (CLASSTYPE_TYPEINFO_VAR): New macro.
1386         * rtti.c (get_tinfo_decl): Use it.
1387
1388         PR c++/8663
1389         * init.c (expand_member_init): Always get the main variant of a
1390         base class.
1391
1392 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
1393
1394         PR c++/8332
1395         PR c++/8493
1396         * decl.c (cxx_init_decl_processing): Use size_type_node, not
1397         c_size_type_node.
1398         * decl2.c (coerce_new_type): Likewise.
1399         * except.c (do_allocate_exception): Likewise.
1400
1401 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
1402
1403         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
1404         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
1405         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
1406         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
1407         typeck2.c: Include coretypes.h and tm.h.
1408         * Make-lang.in: Update dependencies.
1409
1410 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
1411
1412         PR c++/8227
1413         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
1414         (check_initializer): Validate the type of the initialized
1415         variable, even if the initializer is absent.
1416         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
1417
1418         PR c++/8214
1419         * typeck.c (convert_for_assignment): Do not use
1420         decl_constant_value on the operand.
1421
1422         PR c++/8511
1423         * pt.c (instantiate_decl): Handle template friends defined outside
1424         of the class correctly.
1425
1426 2002-11-29  Joe Buck <jbuck@synopsys.com>
1427
1428         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
1429         anonymous structs.
1430
1431 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
1432
1433         * class.c (walk_subobject_offsets): Recur on binfos as well as on
1434         types.
1435         (layout_nonempty_base_or_field): Pass it a binfo when processing a
1436         base class.
1437         (layout_empty_base): Likewise.
1438         (build_base_field): Likewise.
1439
1440 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
1441
1442         * class.c (build_base_field): Make sure we get the canonical base
1443         when descending through primary bases.
1444
1445 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
1446
1447         * decl.c (check_initializer): Don't error on initialisation of
1448         a scalar with a brace-enclosed expression.
1449
1450 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
1451
1452         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
1453         (template_parms_equal): Remove prototype.
1454         * typeck.c (buuld_indirect_ref): Reformat.
1455
1456 2002-11-25  Jason Merrill  <jason@redhat.com>
1457
1458         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
1459         and a DO_STMT.
1460
1461 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
1462
1463         * tree.c (cp_build_qualified_type_real): Correct handling of
1464         array types.
1465         * class.c (walk_subobject_offsets): Fix thinko.
1466         (build_base_field): Record offsets of empty bases in primary
1467         virtual bases.
1468         (layout_class_type): Record offsets of empty bases in fields.
1469
1470         * search.c (is_subobject_of_p_1): Fix thinko.
1471         (lookup_field_queue_p): Likewise.
1472
1473 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
1474
1475         * class.c (layout_class_type): Reuse tail padding when laying out
1476         virtual bases.
1477
1478 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
1479
1480         * rtti.c (qualifier_flags): Fix thinko.
1481
1482 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1483
1484         Remove traditional C constructs 1/n.
1485         * cp-tree.h (init_method, set_mangled_name_for_decl,
1486         build_opfncall, hack_identifier, make_thunk, use_thunk,
1487         synthesize_method, implicitly_declare_fn,
1488         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
1489         maybe_clone_body): Remove use of PARAMS.
1490
1491         * method.c (do_build_assign_ref, do_build_copy_constructor,
1492         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
1493         Likewise.
1494         (synthesize_method): Use 'bool' type and constants instead of
1495         'int'.
1496         (locate_copy): Likewise.
1497         (implicitly_declare_fn): Likewise.
1498
1499         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
1500         Remove old-style declaration.
1501         (maybe_clone_body): Use 'bool' type and constants.
1502
1503 2002-11-21  Glen Nakamura  <glen@imodulo.com>
1504
1505         PR c++/8342
1506         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
1507         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
1508         of the branches of a COND_EXPR.
1509
1510 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
1511
1512         * pt.c (for_each_template_parm): Free allocated memory.
1513         * search.c (is_subobject_of_p_1): New function.
1514         (is_subobject_of_p): Avoid walking virtual bases multiple times.
1515
1516 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
1517
1518         * g++spec.c (lang_specific_spec_functions): New.
1519
1520 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
1521
1522         * ChangeLog: Follow spelling conventions.
1523         * class.c: Likewise.
1524         * decl2.c: Likewise.
1525
1526 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
1527
1528         * search.c (dfs_push_decls): Do not try to reorder elements
1529         3..n of method_vec if method_vec has only two elements.
1530         Reverse order of two tests to avoid accessing unallocated
1531         memory.
1532
1533 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
1534
1535         * class.c (dfs_find_final_overrider): Adjust so that the most
1536         derived object is a binfo, rather than a class type.
1537         (find_final_overrider): Likewise.
1538         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
1539         (add_vcall_offset): Likewise.
1540
1541 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1542
1543         PR c++/8389
1544         * pt.c (instantiate_template): Push class scope for member
1545         functions.
1546         (get_mostly_instantiated_function_type): Likewise.  Don't call
1547         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
1548         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
1549         * mangle.c (write_encoding, write_unqualified_name): Adjust.
1550
1551 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
1552
1553         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
1554         vcall offfsets.  Split out ...
1555         (add_vcall_offset): ... new function.
1556
1557         PR c++/8338
1558         * pt.c (for_each_template_parm): Add htab parameter.
1559         (process_partial_specialization): Adjust call.
1560         (push_template_decl_real): Likewise.
1561         (pair_fn_data): Add visited.
1562         (for_each_template_parm_r): Avoid walking duplicates more than
1563         once.
1564         (uses_template_parms): Adjust call to for_each_template_parm.
1565
1566 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
1567
1568         * class.c (add_implicitly_declared_members): Put implicitly
1569         declared functions at the end of TYPE_METHODs when -fabi-version
1570         is at least 2.
1571
1572 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
1573
1574         * decl2.c (finish_file): Correct spelling.
1575
1576 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
1577
1578         * call.c (build_special_member_call): Do not try to lookup VTTs by
1579         name.
1580         * class.c (vtbl_init_data): Add generate_vcall_entries.
1581         (get_vtable_decl): Do not look up virtual tables by name.
1582         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
1583         (set_primary_base): Do not set CLASSTYPE_RTTI.
1584         (determine_primary_base): Likewise.
1585         (get_matching_virtual): Remove.
1586         (get_vcall_index): New function.
1587         (update_vtable_entry_for_fn): Do not try to use virtual thunks
1588         when they are not required.  Assign vcall indices at this point.
1589         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
1590         Do update dynamic_classes.
1591         (build_vtt): Do not add VTTs to the symbol table.
1592         (build_ctor_vtbl_group): Likewise.
1593         (build_vtbl_initializer): Simplify handling of vcall indices.
1594         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
1595         for the most derived class.
1596         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
1597         the vtable.
1598         * cp-tree.h (dynamic_classes): New macro.
1599         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
1600         (CLASSTYPE_RTTI): Remove.
1601         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
1602         (CLASSTYPE_VCALL_INDICES): New macro.
1603         (CLASSTYPE_VTABLES): Likewise.
1604         (BV_USE_VCALL_INDEX_P): Remove.
1605         (build_vtable_path): Remove.
1606         * decl2.c (finish_vtable_vardecl): Remove.
1607         (key_method): Remove #if 0'd code.
1608         (finish_vtable_vardecl): Rename to ...
1609         (maybe_emit_vtables): ... this.
1610         (finish_file): Use it.
1611         * search.c (look_for_overrides_here): Update comment.
1612
1613 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
1614
1615         PR c/7353 redux
1616         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
1617
1618 2002-10-30  Jason Merrill  <jason@redhat.com>
1619
1620         PR c++/8186
1621         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
1622         * call.c (convert_for_arg_passing): Set it.
1623         * except.c (stabilize_throw_expr): Recurse for such an arg.
1624
1625 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
1626
1627         * cp-tree.h (lang_decl_flags): Remove init_priority.
1628         (lang_decl): Add delta.
1629         (GLOBAL_INIT_PRIORITY): Remove.
1630         (THUNK_DELTA): Revise definition.
1631         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
1632         * dump.c (cp_dump_tree): Don't dump it.
1633
1634 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
1635
1636         PR c++/8160
1637         * typeck2.c (process_init_constructor): Call complete_array_type.
1638
1639         PR c++/8149
1640         * decl.c (make_typename_type): Issue errors about invalid results.
1641
1642 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1643
1644         Core issue 287, PR c++/7639
1645         * cp-tree.h (lang_type_class): Add decl_list field.
1646         (CLASSTYPE_DECL_LIST): New macro.
1647         (maybe_add_class_template_decl_list): Add declaration.
1648         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
1649         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
1650         (maybe_add_class_template_decl_list): New function.
1651         (add_implicitly_declared_members): Use it.
1652         * decl.c (maybe_process_template_type_declaration): Likewise.
1653         (pushtag): Likewise.
1654         * friend.c (add_friend): Likewise.
1655         (make_friend_class): Likewise.
1656         * semantics.c (finish_member_declaration): Likewise.
1657         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
1658         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
1659         to process members and friends in the order of declaration.
1660
1661 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
1662
1663         PR c++/8287
1664         * decl.c (finish_destructor_body): Create the label to jump to
1665         when returning from a destructor here.
1666         (finish_function_body): Rather than here.
1667
1668 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
1669
1670         PR c++/7266
1671         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
1672         SCOPE_REF is not null before dereferencing it.
1673
1674 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
1675
1676         * call.c (build_over_call): Use DECL_CONTEXT, not
1677         DECL_VIRTUAL_CONTEXT.
1678         * class.c (modify_vtable_entry): Don't mess with
1679         DECL_VIRTUAL_CONTEXT.
1680         (set_vindex): Remove.
1681         (set_primary_base): Remove vfuns_p parameter.
1682         (determine_primary_base): Likewise.
1683         (modify_all_vtables): Likewise.
1684         (layout_class_type): Likewise.  Adjust calls to other functions
1685         accordingly.
1686         (finish_struct_1): Adjust calls to modified functions.  Set
1687         DECL_VINDEX here.
1688         * cp-tree.h (lang_type_class): Remove vsize.
1689         (CLASSTYPE_VSIZE): Remove.
1690         (lang_decl): Remove thunks.
1691         (DECL_THUNKS): Adjust.
1692         (DECL_VIRTUAL_CONTEXT): Remove.
1693         (duplicate_decls): Don't copy it.
1694         * pt.c (build_template_decl): Don't set it.
1695         (tsubst_decl): Likewise.
1696         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
1697
1698         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
1699         (build_vtable_entry): Remove.
1700         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
1701         (lang_decl): Add thunks.
1702         (DECL_THUNKS): New macro.
1703         * decl.c (duplicate_decls): Copy it.
1704         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
1705         * semantics.c (emit_associated_thunks): Simplify.
1706
1707 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
1708
1709         PR c++/7228
1710         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
1711         lang_type structure exists before accessing field.
1712         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
1713         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
1714         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
1715         * class.c (check_field_decls): Use new macros.
1716         * typeck2.c (process_init_constructor): Remove redundant check for
1717         existence of lang_type structure.
1718
1719 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
1720
1721         * class.c (end_of_base): New method.
1722         (end_of_class): Use it.  Check indirect virtual bases.
1723
1724         * class.c (check_field_decls): Fix typo.
1725
1726 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
1727
1728         PR c++/8067
1729         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
1730         related variables.
1731
1732         PR c++/7679
1733         * spew.c (next_token): Do not return an endless stream of
1734         END_OF_SAVED_INPUT tokens.
1735         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
1736         the cached token stream.
1737         (snarf_defarg): Likewise.
1738
1739 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
1740
1741         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
1742         variably_modified_type_p.
1743         * cp-tree.h: Remove prototype of variably_modified_type_p.
1744         * tree.c (variably_modified_type_p): Remove; now implemented
1745         in language-independent code.
1746
1747 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
1748
1749         PR c++/6579
1750         * spew.c (snarf_parenthesized_expression): New function.
1751         (snarf_block): Use it.
1752
1753 2002-10-22  Richard Henderson  <rth@redhat.com>
1754
1755         * method.c (use_thunk): Always compute vcall_value; assert that
1756         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
1757         for vcall thunks as well.
1758
1759 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
1760
1761         * class.c (empty_base_at_nonzero_offset_p): New function.
1762         (layout_nonempty_base_or_field): Do not check for conflicts when
1763         laying out a virtual base using the GCC 3.2 ABI.
1764         (build_base_field): Correct checking for presence of empty classes
1765         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
1766
1767         * class.c (include_empty_classes): Use normalize_rli.
1768         (layout_class_type): Likewise.
1769
1770         * decl.c (reshape_init): Tweak handling of character arrays.
1771
1772         PR c++/8218
1773         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
1774         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
1775         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
1776         (check_field_decls): Likewise.
1777         (layout_class_type): Likewise.
1778         (finish_struct_1): Initialize it.
1779         (walk_subobject_offsets): Use it to prune searches.
1780
1781 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
1782
1783         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
1784         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
1785         TARGET_ASM_OUTPUT_MI_THUNK in comments.
1786
1787 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
1788
1789         * decl.c (start_decl): Point users of the old initialized-
1790         typedef extension at __typeof__.
1791
1792 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
1793
1794         * Make-lang.in (method.o): Depend on TARGET_H.
1795         * method.c (target.h): Include it.
1796         (use_thunk): Use target hooks.  Use vcall thunks, if available.
1797
1798 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
1799
1800         * class.c (base_derived_from): Make sure return value is a bool.
1801
1802 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
1803
1804         * class.c (find_final_overrider_data_s): Remove overriding_fn and
1805         overriding_base.
1806         (dfs_base_derived_from): New function.
1807         (base_derived_from): Likewise.
1808         (dfs_find_final_overrider): Use base_derived_from.
1809         (find_final_overrider): Adjust.
1810
1811 2002-10-18  Jason Merrill  <jason@redhat.com>
1812
1813         PR c++/8080
1814         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
1815         with condition decls in a template.
1816
1817 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
1818
1819         * class.c (add_method): Compare template parms too.
1820
1821 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
1822
1823         PR c++/7584
1824         * class.c (handle_using_decl): Allow the declaration used to be
1825         from an ambiguous base.
1826
1827         * pt.c (convert_template_argument): Revert this change:
1828                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
1829                 * pt.c (convert_template_argument): Do not fold non-type
1830                 template rguments when inside a template.
1831
1832         * init.c (expand_default_init): Handle brace-enclosed initializers
1833         correctly.
1834
1835 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
1836
1837         * mangle.c (write_expression): Correct handling of enumeration
1838         constants.
1839         (write_template_arg): Likewise.
1840         * pt.c (convert_template_argument): Do not fold non-type template
1841         arguments when inside a template.
1842
1843         PR c++/7478
1844         * cvt.c (convert_to_reference): Allow references as the incoming
1845         type.
1846
1847 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
1848
1849         PR c++/7524
1850         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
1851         build_qualified_type.
1852
1853 2002-10-15  Richard Henderson  <rth@redhat.com>
1854
1855         * error.c (dump_expr): Use real_to_decimal directly, and with
1856         the new arguments.
1857
1858 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
1859
1860         * decl.c (reshape_init): Fix typo.
1861
1862         * cp-tree.h (operator_name_info_t): Add arity.
1863         * lex.c (init_operators): Initialize it.
1864         * mangle.c (write_conversion_operator_name): New function.
1865         (write_unqualified_name): Use it.
1866         (write_template_args): Accept template arguments as a TREE_LIST.
1867         (write_expression): Adjust handling of qualified names to match
1868         specification.
1869
1870 2002-10-15  Jason Merrill  <jason@redhat.com>
1871
1872         * call.c (call_builtin_trap): New fn.
1873         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
1874         (build_call): Don't set current_function_returns_abnormally outside
1875         a function.
1876
1877 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
1878
1879         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
1880         clear CLASSTYPE_EMPTY_P.
1881         (build_base_field): Likewise.
1882         (build_base_fields): Likewise.
1883         (check_bases_and_members): Likewise.
1884         (create_vtbl_ptr): Likewise.
1885         (layout_class_type): Likewise.  Ensure that empty classes have
1886         size zero when used as base classes in the 3.2 ABI.
1887         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
1888         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
1889         parameter.
1890         (is_empty_class): Correct definition when using post-3.2 ABI.
1891         * cp-tree.h (lang_type_class): Add empty_p.
1892         (CLASSTYPE_EMPTY_P): New macro.
1893
1894 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
1895
1896         * init.c (build_delete): Do not apply save_expr for arrays.
1897         (build_vec_delete): Likewise.
1898
1899 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
1900
1901         * decl.c (layout_var_decl): Call layout_decl even for variables
1902         whose type is an array with unspecified bounds.
1903
1904         PR c++/7176
1905         * lex.c (do_identifier): Add another option for the parsing
1906         parameter.
1907         * parse.y (do_id): Use it.
1908
1909 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1910
1911         PRs C++/6803, C++/7721 and C++/7803
1912         * decl.c (grokdeclarator): Gracefully handle template-name as
1913         decl-specifier.
1914
1915 2002-10-11  Jason Molenda  <jmolenda@apple.com>
1916
1917         * init.c (build_field_list): Provide uses_unions_p with a default
1918         value.
1919
1920 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
1921
1922         PR c++/5661
1923         * cp-tree.h (variably_modified_type_p): New function.
1924         (grokdeclarator) Tighten check for variably modified types as
1925         fields.
1926         * pt.c (convert_template_argument): Do not allow variably modified
1927         types as template arguments.
1928         * tree.c (variably_modified_type_p): New function.
1929
1930         * NEWS: Document removal of "new X = ..." extension.
1931         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
1932         brace-enclosed initializers.
1933         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
1934         (initialize_local_var): Remove declaration.
1935         (expand_static_init): Likewise.
1936         * decl.c (next_initializable_field): New function.
1937         (reshape_init): Likewise.
1938         (check_initializer): Use them.  Build dynamic initializer for
1939         aggregates here too.
1940         (initialize_local_var): Simplify, and incorporate cleanup
1941         insertion code as well.
1942         (destroy_local_var): Remove.
1943         (cp_finish_decl): Tidy.
1944         (expand_static_init): Fold checks for whether or not a variable
1945         needs initialization into this function.  Simplify.
1946         * decl2.c (do_static_initialization): Simplify.
1947         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
1948         be done for us automatically.
1949         (expand_default_init): Handle brace-enclosed initializers
1950         correctly.
1951         (expand_aggr_init_1): Remove RTL-generation code.
1952         (build_vec_init): Remove "new X = ..." support.
1953         * parse.y (new_initializer): Likewise.
1954         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
1955         brace-enclosed initializer.
1956         (create_pseudo_type_info): Likewise.
1957         * typeck2.c (store_init_value): Don't try to handle digest_init
1958         being called more than once.
1959         (digest_init): Tidy handling of brace-enclosed initializers.
1960
1961 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1962
1963         * decl.c (typename_hash): Use htab_hash_pointer.
1964
1965 2002-10-10  Jim Wilson  <wilson@redhat.com>
1966
1967         * decl.c (duplicate_decls): Don't call decl_attributes.
1968
1969 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
1970
1971         PR c/7353
1972         * decl.c (start_decl): Unconditionally issue error for
1973         'typedef foo = bar'.
1974         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
1975         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
1976
1977 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1978
1979         * decl2.c (prune_vtable_vardecl): Delete unused function.
1980
1981 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
1982
1983         PR c++/7754
1984         * decl2.c (finish_anon_union): Do not expand anonymous unions when
1985         procesing template functions.
1986         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
1987         type. Call layout_decl.
1988         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
1989
1990 2002-10-07  Richard Henderson  <rth@redhat.com>
1991
1992         * decl2.c, pt.c: Revert c++/7754 fix.
1993
1994 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1995
1996         PR c++/7804
1997         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
1998
1999 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
2000
2001         PR c++/7931
2002         * pt.c (for_each_template_parm_r): Handle BASELINKs.
2003
2004         PR c++/7754
2005         * decl2.c (finish_anon_union): Do not expand anonymous unions when
2006         procesing template functions.
2007         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
2008         type. Call layout_decl.
2009         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
2010
2011 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
2012
2013         PR c++/8006
2014         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
2015         template parameters.
2016         (globals): Add entity and need_abi_warning.
2017         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
2018         CLASSTYPE_TEMPLATE_INFO.
2019         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
2020         TYPE_TI_TEMPLATE.
2021         (write_prefix): Handle typename types correctly.
2022         (write_template_prefix): Handle template template parameters
2023         correctly.
2024         (start_mangling): Add entity parameter.
2025         (finish_mangling): Warn about names whose mangling will change.
2026         (mangle_decl_string): Adjust.
2027         (mangle_type_string): Likewise.
2028         (mangle_special_for_type): Likewise.
2029         (mangle_ctor_vtbl_for_type): Likewise.
2030         (mangle_thunk): Likewise.
2031         (mangle_guard_variable): Likewise.
2032         (mangle_ref_init_variable): Likewise.
2033
2034 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
2035
2036         PR c++/7188.
2037         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
2038         * cp-tree.h (emit_base_init): Rename to ....
2039         (emit_mem_initializers): ... this.
2040         (expand_member_init): Change prototype.
2041         * init.c (perform_member_init): Compute explicit, rather than
2042         requiring it as a parameter.
2043         (sort_member_init): Rename to ...
2044         (sort_mem_initializers): ... this.  Process bases and data members
2045         together.
2046         (sort_base_init): Remove.
2047         (emit_base_init): Rename to ...
2048         (emit_mem_initializers): ... this.
2049         (expand_aggr_vbase_init_1): Remove.
2050         (construct_virtual_bases): Rename to ...
2051         (construct_virtual_base): ... this.
2052         (expand_member_init): Rework handling of base initializers.
2053         * method.c (do_build_copy_constructor): Use
2054         finish_mem_initializers.
2055         * parse.y (member_init): Adjust calls to expand_member_init.
2056         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
2057         (tsubst_initializer_list): Use expand_member_init.
2058         * semantics.c (finish_mem_intiailizers): Simplify.
2059
2060 2002-10-02  Matt Austern  <austern@apple.com>
2061         * decl.c (walk_vtables_r): Fixed typo that caused result to
2062         never get a nonzero value.
2063
2064 2002-10-02  Roger Sayle  <roger@eyesopen.com>
2065
2066         PR optimization/6627
2067         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
2068         from here, and move it to tree.h.
2069         * decl.c (cxx_init_decl_processing): If storing the vbit
2070         in function pointers, ensure that force_align_functions_log
2071         is atleast one.
2072
2073 2002-10-02  Matt Austern  <austern@apple.com>
2074
2075         * class.c (check_field_decls): Changed warning about const member
2076         variables so that it doesn't get issued for a class aggregate.
2077
2078 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
2079
2080         * decl.c (cp_finish_decl): Make sure array types are laid out,
2081         even if the array bounds are unknown.
2082
2083 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
2084
2085         * class.c (build_vtbl_initializer): Change build_c_cast
2086         to build1.
2087
2088 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
2089
2090         * decl.c (cp_finish_decl): Make sure array types are laid out,
2091         even if the array bounds are unknown.
2092
2093         * decl.c (cp_finish_decl): Correct check for dynamic
2094         initialization of thread-local storage.
2095
2096 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
2097
2098         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
2099         overloaded.
2100
2101 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
2102
2103         * class.c (build_vtbl_initializer): Add cast.
2104         (add_vcall_offset_vtbl_entries_1):
2105         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
2106
2107 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
2108
2109         * class.c (walk_subobject_offsets): Correct the calculation of
2110         offsets for virtual bases.  Correct the counting of array
2111         elements.
2112         (layout_nonempty_base_or_field): Simplify.  Correct the
2113         calculation of offsets to be propagated through the binfo
2114         hierarchy.
2115         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
2116         Add the FIELD_DECL to TYPE_FIELDS.
2117         (build_base_fields): Adjust accordingly.
2118         (layout_virtual_bases): Use build_base_field.
2119         (end_of_class): Return a tree, not an integer.
2120         (warn_about_ambiguous_direct_bases): Rename to ...
2121         (warn_about_ambiguous_bases): ... this.
2122         (include_empty_classes): New function.
2123         (layout_class_type): Create an alternative version of the type to
2124         be used when as a base class type.  Do not call
2125         finish_record_layout until we are done laying out the class.
2126         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
2127         as_base.
2128         (CLASSTYPE_SIZE): Reimplement.
2129         (CLASSTYPE_SIZE_UNIT): Likewise.
2130         (CLASSTYPE_ALIGN): Likweise.
2131         (CLASSTYPE_USER_ALIGN): Likewise.
2132         (CLASSTYPE_AS_BASE): New macro.
2133         (DECL_INITIALIZED_P): Likewise.
2134         (extract_init): Remove prototype.
2135         (build_forced_zero_init): Rename to ...
2136         (build_zero_init): ... this.
2137         (force_store_init_value): Remove.
2138         * decl.c (obscure_complex_init): Remove.
2139         (duplicate_decls): Copy DECL_INITIALIZED_P.
2140         (check_initializer): Do not leave junk in DECL_INITIAL.
2141         (cp_finish_decl): Handle zero-initialization of entities with
2142         static storage duration.
2143         * expr.c (extract_init): Remove.
2144         * init.c (build_forced_zero_init): Remove.
2145         (build_zero_init): New function.
2146         (build_default_init): Use it.
2147         (build_field_list): Skip FIELD_DECLs for base subobjects.
2148         (push_base_cleanups): Likewise.
2149         * method.c (do_build_assign_ref): Likewise.
2150         (synthesize_exception_spec): Likewise.
2151         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
2152         (regenerate_decl_from_template): To not set DECL_INITIAL for a
2153         static data member whose initialization took place in its class.
2154         (instantiate_decl): Do not pass an initializer to cp_finish_decl
2155         in that situation.
2156         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
2157         (dfs_unuse_fields): Likewise.
2158         * tree.c (pod_type_p): Handle error_mark_node.
2159         (zero_init_p): Likewise.
2160         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
2161         subobjects.
2162         * typeck2.c (store_init_value): Remove #if 0'd code.
2163         (force_store_init_value): Remove.
2164         (process_init_constructor): Use build_zero_init.
2165
2166 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
2167
2168         PR c++/7788
2169         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
2170
2171 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
2172
2173         * cp-tree.h: Fix comment typos.
2174         * decl.c: Likewise.
2175         * pt.c: Likewise.
2176
2177 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
2178
2179         * cp/class.c (contains_empty_class_p): New method.
2180         (walk_subobject_offsets): Correct computation of field offset.
2181         (layout_empty_base): Correct placement of emtpy base classes.
2182         (layout_class_type): Warn about ABI changes.
2183
2184 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
2185
2186         * cp/class.c (layout_virtual_bases): Do not round the size of the
2187         type to a multiple of the alignment before laying out virtual bases.
2188         (layout_class_type): Correct handling of bit-fields that are wider
2189         than their type inside unions.  Round the size of the type to a
2190         even number of bytes when computing the size without virtual
2191         bases.
2192         * cp/cp-tree.h (abi_version_at_least): New macro.
2193
2194 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
2195
2196         * ChangeLog: Follow spelling conventions.
2197         * ChangeLog.2: Likewise.
2198         * call.c: Likewise.
2199         * class.c: Likewise.
2200         * cp-tree.h: Likewise.
2201         * cvt.c: Likewise.
2202         * decl.c: Likewise.
2203         * decl2.c: Likewise.
2204         * except.c: Likewise.
2205         * friend.c: Likewise.
2206         * g++spec.c: Likewise.
2207         * init.c: Likewise.
2208         * lex.c: Likewise.
2209         * mangle.c: Likewise.
2210         * method.c: Likewise.
2211         * operators.def: Likewise.
2212         * optimize.c: Likewise.
2213         * pt.c: Likewise.
2214         * rtti.c: Likewise.
2215         * search.c: Likewise.
2216         * semantics.c: Likewise.
2217         * spew.c: Likewise.
2218         * tree.c: Likewise.
2219         * typeck.c: Likewise.
2220
2221 2002-09-18  Devang Patel  <dpatel@apple.com>
2222
2223         * cp/cp-tree.h: New prototype for walk_vtabls().
2224         * cp/decl.c (walk_vtables_r): New function.
2225         (struct cp_binding_level): Add new members, namespaces,
2226         names_size and vtables.
2227         (add_decl_to_level): Add decl in namespaces or vtables
2228         chain, if conditions match.
2229         (walk_vtables): New function.
2230         (walk_namespaces_r): Travers separate namespace chain
2231         for namespace decls.
2232         (wrapup_globals_for_namespace): Use names_size instead
2233         of list_length().
2234         * cp/decl2.c (finish_file): Use walk_vtables() instead of
2235         walk_globals() to walk vtable decls.
2236
2237 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
2238
2239         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
2240         ICE with invalid pointers & references.
2241
2242 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
2243
2244         * Make-lang.in: Remove all references to the demangler.
2245         * cxxfilt.c: Moved to binutils.
2246
2247 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
2248
2249         PR c++/7718
2250         * pt.c (tsubst_decl): Remove assert.
2251
2252         Remove DR 295 implementation.
2253         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
2254         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
2255         about ignoring volatile qualifiers.
2256
2257         * search.c (lookup_member): Correct documentation.
2258
2259 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
2260
2261         * cp-tree.h (union lang_tree_node): Add chain_next option.
2262
2263 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
2264
2265         * parse.y (parse_finish_call_expr): Check lookup_member result.
2266
2267         PR c++/7015
2268         * semantic.c (finish_asm_stmt): Fix operand/output_operands
2269         thinko.
2270         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
2271
2272 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
2273
2274         PR c++/7919
2275         * call.c (build_over_call): Convert this pointer for fns found by
2276         using decls.
2277
2278 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
2279
2280         * ChangeLog: Follow spelling conventions.
2281         * ChangeLog.1: Likewise.
2282
2283 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
2284
2285         PR c++/7768
2286         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
2287
2288 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
2289
2290         * error.c: Fix comment formatting.
2291         * except.c: Likewise.
2292         * expr.c: Likewise.
2293         * friend.c: Likewise.
2294         * g++spec.c: Likewise.
2295         * init.c: Likewise.
2296         * lex.c: Likewise.
2297         * mangle.c: Likewise.
2298         * method.c: Likewise.
2299         * optimize.c: Likewise.
2300         * pt.c: Likewise.
2301         * rtti.c: Likewise.
2302         * search.c: Likewise.
2303         * semantics.c: Likewise.
2304         * spew.c: Likewise.
2305         * tree.c: Likewise.
2306         * typeck.c: Likewise.
2307         * typeck2.c: Likewise.
2308
2309 2002-09-13  Matt Austern  <austern@apple.com>
2310
2311         PR C++/7828
2312         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
2313         * cp/call.c: Change call-by-const-reference mechanism to use
2314         non_cast_lvalue_p when deciding whether the create a temporary.
2315         We need a temporary when passing, e.g. (long) x by const ref.
2316
2317 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
2318
2319         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
2320
2321 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
2322
2323         * decl.c: Fix comment formatting.
2324         * decl2.c: Likewise.
2325
2326 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
2327
2328         * call.c: Fix comment formatting.
2329         * class.c: Likewise.
2330         * cp-lang.c: Likewise.
2331         * cp-tree.h: Likewise.
2332         * cvt.c: Likewise.
2333
2334 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
2335
2336         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
2337         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
2338         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
2339         minor adjustments (use version_string, eliminate yet another
2340         duplicate of xmalloc)
2341
2342 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2343
2344         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
2345
2346 2002-09-05  Jason Merrill  <jason@redhat.com>
2347
2348         * typeck2.c (add_exception_specifier): Only pedwarn for an
2349         incomplete type.
2350         (require_complete_eh_spec_types): New fn.
2351         (cxx_incomplete_type_diagnostic): Also support pedwarning.
2352         * typeck.c (complete_type_or_diagnostic): Likewise.
2353         * call.c (build_call): Call require_complete_eh_spec_types.
2354         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
2355         on an incomplete type.
2356
2357 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
2358
2359         * decl.c (start_cleanup_fn): Clear interface_only before
2360         start_function, restore it afterwards.
2361
2362 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
2363
2364         * cp-tree.h (finish_builtin_type): Remove.
2365         * decl2.c (finish_builtin_type): Move to common code.
2366         * decl.c (build_ptrmemfunc_type): Adjust.
2367         * rtti.c (create_pseudo_type_info): Adjust.
2368         (create_tinfo_types): Adjust.
2369
2370 2002-08-31  Jason Merrill  <jason@redhat.com>
2371
2372         * cp-lang.c (cp_expr_size): Allow initialization from a
2373         CONSTRUCTOR.
2374
2375 2002-08-30  Richard Henderson  <rth@redhat.com>
2376
2377         PR opt/7515
2378         * tree.c: Include target.h.
2379         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
2380         don't bind locally.
2381         * Makefile.in (tree.o): Update.
2382
2383 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
2384
2385         * class.c (layout_virtual_bases): Warn about bugs in G++ that
2386         result in incorrect object layouts.
2387         (layout_class_type): Likewise.
2388
2389 2002-08-24  Matt Austern  <austern@apple.com>
2390
2391         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
2392         are allowable.
2393         (real_lvalue_p): Update caller.
2394         (lvalue_p): Ditto.
2395         (non_cast_lvalue_or_else): New.
2396         * tree.h: Declare it.
2397         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
2398
2399 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
2400
2401         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
2402         and COND_EXPR specially; fix error message output.
2403
2404 2002-08-22  Jason Merrill  <jason@redhat.com>
2405
2406         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
2407         * semantics.c (nullify_returns_r): Likewise.
2408
2409 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2410
2411         Fix PR/7621
2412         * typeck.c (finish_class_member_access_expr): Diagnose cases where
2413         name lookup finds nothing.
2414
2415 2002-08-15  Jason Merrill  <jason@redhat.com>
2416
2417         * semantics.c (finish_then_clause): Remove redundant assignment.
2418         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
2419         extra binding level outside the if/switch statement.
2420         (finish_while_cond, finish_for_cond): Rewrite complex condition
2421         into the loop body.
2422
2423 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
2424
2425         * parse.y (sizeof, alignof, typeof): New non-terminals to
2426         increment skip_evaluation.  Replace terminals with them and
2427         decrement skip_evaluation at the end of rules using them.
2428         * decl2.c (mark_used): Don't assemble_external if
2429         skipping evaluation.
2430
2431 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
2432
2433         Fix PR/7504
2434         * parse.y (parse_finish_call_expr): Handle incomplete
2435         type used to name a scope.
2436
2437 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
2438
2439         PR c++/7598
2440         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
2441         regression caused by my 2002-08-08 patch.
2442
2443 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
2444
2445         * decl.c (pushdecl_class_level): Honor requests to bind names to
2446         OVERLOADs.
2447
2448 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2449
2450         * decl2.c (build_call_from_tree): Fix uninitialized variable.
2451         * parse.y (parse_finish_call_expr): Likewise.
2452         * repo.c (old_args, old_dir, old_main): Const-ify.
2453
2454 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
2455
2456         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
2457         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
2458         * optimize.c (maybe_clone_body): Likewise.
2459         * pt.c (tsubst_enum): Likewise.
2460         (lookup_template_class): Likewise.
2461         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
2462
2463 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
2464
2465         * lang-specs.h: Remove -ansi.
2466
2467 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
2468
2469         * tree.c (maybe_dummy_object): Replace // with /* */
2470
2471 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
2472
2473         * call.c (standard_conversion): Use build_ptrmem_type.
2474         * cp-tree.h (build_ptrmem_type): New function.
2475         (adjust_result_of_qualified_name_lookup): Likewise.
2476         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
2477         static data members.
2478         (build_ptrmem_type): New function.
2479         (grokdeclarator): Do not use build_offset_type when encountering a
2480         qualified name.
2481         * parse.y (parse_finish_call_expr): Use
2482         adjust_result_of_qualified_name_lookup.
2483         * search.c (adjust_result_of_qualified_name_lookup): New function.
2484         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
2485         accessing OFFSET_TYPEs directly.
2486
2487 2002-08-08  Mike Stump  <mrs@apple.com>
2488
2489         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
2490         (type_decays_to): Likewise.
2491         * class.c (find_final_overrider): Likewise.
2492         (maybe_note_name_used_in_class): Likewise.
2493         * decl.c (current_tmpl_spec_kind): Likewise.
2494         (add_binding): Likewise.
2495         (push_class_binding): Likewise.
2496         (duplicate_decls): Likewise.
2497         (layout_var_decl): Likewise.
2498         (grokfndecl): Likewise.
2499         (grokdeclarator): Likewise.
2500         (check_default_argument): Likewise.
2501         * decl2.c (handle_class_head): Likewise.
2502         * error.c (dump_template_decl): Likewise.
2503         * init.c (build_offset_ref): Likewise.
2504         * pt.c (check_specialization_scope): Likewise.
2505         (determine_specialization): Likewise.
2506         (check_explicit_specialization): Likewise.
2507         (maybe_check_template_type): Likewise.
2508         (process_partial_specialization): Likewise.
2509         (check_default_tmpl_args): Likewise.
2510         (push_template_decl_real): Likewise.
2511         (convert_template_argument): Likewise.
2512         (try_class_unification): Likewise.
2513         (get_bindings_real): Likewise.
2514         (do_decl_instantiation): Likewise.
2515         * semantics.c (begin_function_definition): Likewise.
2516         (finish_member_declaration): Likewise.
2517         (check_multiple_declarators): Likewise.
2518         * typeck.c (comp_array_types): Likewise.
2519         (comptypes): Likewise.
2520         (expr_sizeof): Likewise.
2521         (build_binary_op): Likewise.
2522         (dubious_conversion_warnings): Likewise.
2523         (check_return_expr): Likewise.
2524
2525 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
2526
2527         * typeck.c (build_class_member_access_expr): Do not return
2528         error_mark_node when no error has occurred.
2529
2530 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2531
2532         * typeck.c (build_component_addr): Remove.
2533         (build_unary_op): Just check it's not a bitfield, and then build
2534         an ADDR_EXPR.
2535
2536 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2537
2538         * class.c (convert_to_base): Correct check for error_mark_node.
2539         (create_vtable_ptr): Remove unused VFUNS_P parm.
2540
2541 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2542
2543         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
2544
2545 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
2546
2547         Rework build_component_ref.
2548         * call.c (build_vfield_ref): Do not go through build_component_ref.
2549         (build_field_call): Use build_class_member_access_expr.
2550         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
2551         (build_object_call): Likewise.
2552         * class.c (convert_to_base): New function.
2553         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
2554         (instantiate_type): Handle BASELINKs.
2555         * cp-tree.def (BASELINK): New tree code.
2556         * cp-tree.h (BASELINK_P): Reimplement.
2557         (SET_BASELINK_P): Remove.
2558         (BASELINK_BINFO): Reimplement.
2559         (BASELINK_FUNCTIONS): Likewise.
2560         (BASELINK_ACCESS_BINFO): Likewise.
2561         (BASELINK_OPTYPE): Likewise.
2562         (convert_to_base): New function.
2563         (name_p): Likewise.
2564         (build_object_ref): Remove.
2565         (build_component_ref_1): Likewise.
2566         (build_component_ref): Likewise.
2567         (build_x_component_ref): Likewise.
2568         (build_class_member_access_expr): New function.
2569         (finish_class_member_access_expr): Likewise.
2570         (build_ptrmemfunc_access_expr): Likewise.
2571         * decl.c (grokdeclarator): Handle BASELINKs.
2572         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
2573         finish_class_member_access_expr.
2574         (arg_assoc): Handle BASELINKs.
2575         (do_class_using_decl): Likewise.
2576         * error.c (dump_decl): Likewise.
2577         (dump_expr): Use build_ptrmemfunc_access_expr.
2578         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
2579         destructors.
2580         (build_throw): Use BASELINK_FUNCTIONS.
2581         * init.c (perform_member_init): Use
2582         build_class_member_access_expr.
2583         (build_offset_ref): Handle BASELINKs.  Use
2584         build_class_member_access_expr.
2585         * method.c (hack_identifier): Likewise.
2586         * parse.y (do_id): Use BASELINK, not TREE_LIST.
2587         (primary): Remove uses of build_object_ref.
2588         * pt.c (lookup_template_function): Handle BASELINKs.
2589         (resolve_overloaded_unification): Likewise.
2590         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
2591         (lookup_field): Use BASELINK, not TREE_LIST.
2592         (lookup_fnfiels): Likewise.
2593         (setup_class_bindings): Likewise.
2594         * semantics.c (finish_object_call_expr): Do not use
2595         build_method_call when we already know what function is being
2596         called.
2597         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
2598         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
2599         TREE_CHAIN.
2600         (name_p): New function.
2601         * typeck.c (build_object_ref): Remove.
2602         (build_component_ref_1): Likewise.
2603         (build_x_component_ref): Likewise.
2604         (build_class_member_access_expr): New function.
2605         (finish_class_member_access_expr): Likewise.
2606         (build_ptrmemfunc_access_expr): Likewise.
2607         (get_member_function_from_ptrfunc): Use
2608         build_ptrmemfunc_access_expr.
2609         (build_binary_op): Likewise.
2610         (build_unary_op): Likewise.
2611         (build_ptrmemfunc): Likewise.
2612         (pfn_from_ptrmemfunc): Likewise.
2613         * typeck2.c (build_m_component_ref): Adjust comment.
2614
2615 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
2616
2617         * Make-lang.in (CXX_C_OBJS): Update.
2618         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
2619         * cp-tree.h (cxx_decode_option): Remove.
2620         * decl2.c (compare_options, lang_f_options, unsupported_options,
2621         cxx_decode_option): Remove.
2622
2623 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
2624
2625         * typeck.c (build_x_unary_op): Handle pointer-to-member.
2626
2627 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
2628
2629         * class.c: Don't include obstack.h.
2630         (popclass):
2631         * decl2.c: Delete bogus comment.
2632         * error.c: Don't include obstack.h.
2633         * except.c: Likewise.
2634         (dump_type): Correct comment.
2635         * method.c: Don't include obstack.h.
2636         * tree.c: Likewise.
2637
2638 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
2639
2640         Fix PR/2213
2641         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
2642         expressions to pointer-to-data-member of pointer-to-member-functions.
2643
2644 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
2645
2646         * cvt.c (ocp_convert): Delete obsolete code.
2647         * parse.y (permanent_obstack): Delete declaration.
2648         * pt.c (permanent_obstack): Delete declaration.
2649         * repo.c (permanent_obstack): Delete declaration.
2650         (open_repo_file): Use xmalloc instead of permanent_obstack.
2651         (init_repo): Use xstrdup instead of permanent_obstack.
2652
2653 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
2654
2655         * cp-tree.h (VF_DERIVED_VALUE): Remove.
2656         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
2657
2658 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
2659
2660         PR 7470.
2661         C++ ABI change - vfunc ordering.
2662         * class.c (add_virtual_function): Remove.
2663         (dfs_modify_all_vtables): Take list of all declared
2664         virtuals. Assign all that are not in primary base.
2665         (check_for_override): Adjust comments.
2666         (create_vtable_ptr): Take single list of virtuals. Build chain
2667         of declared virtuals here.
2668         (layout_class_type): Take single list of virtuals. Adjust.
2669         (finish_struct_1): Keep virtuals on single list. Adjust.
2670
2671 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
2672
2673         * init.c (build_member_call): Use build_new_method_call, not
2674         build_method_call.
2675
2676 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
2677
2678         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
2679
2680 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
2681
2682         * call.c (build_method_call): Issue a more helpful error message
2683         about ambiguous method names.
2684
2685 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
2686
2687         * tree.c (build_shared_int_cst): Make cache file scope, and
2688         GTY it.
2689
2690 2002-08-02  Jason Merrill  <jason@redhat.com>
2691
2692         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
2693         (cp_expr_size): New fn.
2694         * call.c (build_over_call): Lose empty class hackery.
2695         (convert_arg_to_ellipsis): Promote non-POD warning to error.
2696         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
2697
2698         * semantics.c (expand_body): Do tree optimization in the function
2699         context, too.
2700
2701 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
2702
2703         * cp-tree.h: Move all warning and flag declarations to c-common.h.
2704         * decl.c: Move all warning and flag variables to c-common.c.
2705         * decl2.c: Move all warning and flag variables to c-common.c.
2706         * lex.c (flag_digraphs): Remove.
2707         (warn_traditional): Now in c-common.c.
2708
2709 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
2710
2711         * call.c (build_field_call): Do not look up the field by name.
2712         (build_method_call): Simplify.
2713         (struct z_candidate): Add access_path and conversion_path.  Remove
2714         basetype_path.
2715         (convert_class_to_reference): Adjust use of
2716         add_function_candidate.
2717         (add_candidate): Add conversion_path argument.
2718         (add_function_candidate): Use it.
2719         (add_conv_dndidate): Likewise.
2720         (build_builtin_candidate): Likewise.
2721         (add_template_candidate_real): Add conversion_path argument.
2722         (add_template_conv_candidate): Likewise.
2723         (add_template_candidate): Likewise.
2724         (build_user_type_conversion_1): Use it.
2725         (build_new_function_call): Remove name lookup code.  Adjust use of
2726         add_template_candidate and add_function_candidate.
2727         (build_new_op): Likewise.
2728         (convert_like_real): Use build_special_member_call.
2729         (build_over_call): Use cand->conversion_path.
2730         (build_special_member_call): New method.
2731         (build_new_method_call): Remove name lookup code.
2732         * cp-tree.def (OFFSET_REF): Update documentation.
2733         (TEMPLATE_ID_EXPR): Likewise.
2734         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
2735         (BASELINK_OPTYPE): Likewise.
2736         (build_new_method_call): Adjust prototype.
2737         (build_special_member_call): New method.
2738         (build_baselink): New method.
2739         (build_offset_ref_call_from_tree): Likewise.
2740         (build_call_from_tree): Likewise.
2741         (finish_qualified_call_expr): Remove.
2742         (finish_call_expr): Adjust prototype.
2743         (build_x_function_call): Remove.
2744         * cvt.c (ocp_convert): Use build_special_member_call.
2745         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
2746         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
2747         CALL_EXPR.
2748         (build_offset_ref_call_from_tree): New function.
2749         (build_call_from_tree): Likewise.
2750         * init.c (expand_cleanup): Use build_special_member_call.
2751         (expand_default_init): Likewise.
2752         (build_member_call): Use finish_call_expr.
2753         (build_new_1): Use build_special_member_call.
2754         (push_base_cleanups): Likewise.
2755         * method.c (do_build_assign_ref): Likewise.
2756         * parse.y (template_id): Do not pass a COMPONENT_REF to
2757         lookup_template_function.
2758         (primary): Use parse_finish_call_epxr, not finish_call_expr.
2759         (parse_finish_call_expr): New function.
2760         * pt.c (lookup_template_function): Add assertions.
2761         * search.c (lookup_base): Allow T to be a binfo.
2762         (build_baselink): New function.
2763         (lookup_member): Use it.
2764         * semantics.c (finish_call_expr): Do not do name lookup.
2765         (finish_object_call_expr): Remove #if 0'd code.
2766         (finish_qualified_call_expr): Remove.
2767         * typeck.c (build_x_function_call): Remove.
2768         (build_static_case): Use build_special_member_call.
2769         * typeck2.c (build_functional_cast): Likewise.
2770
2771 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
2772
2773         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
2774
2775 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
2776
2777         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
2778
2779 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
2780
2781         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
2782         documentation.
2783
2784 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
2785
2786         * cp-tree.h: Comment typo fix.
2787
2788 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
2789
2790         * spew.c (space_for_token): Allocate zeroed memory for a new token
2791         chunk.
2792
2793 2002-07-27  Roger Sayle  <roger@eyesopen.com>
2794
2795         * decl.c (builtin_function_1): No need to explicitly mark
2796         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
2797
2798 2002-07-27  Roger Sayle  <roger@eyesopen.com>
2799
2800         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
2801
2802 2002-07-26  Jason Merrill  <jason@redhat.com>
2803
2804         * call.c (build_over_call): Likewise.
2805         (cp_convert_parm_for_inlining): New fn.
2806         (convert_for_arg_passing): New fn.
2807         (convert_default_arg, build_over_call): Use it.
2808         (type_passed_as): New fn.
2809         * pt.c (tsubst_decl): Use it.
2810         * decl2.c (cp_build_parm_decl): New fn.
2811         (build_artificial_parm): Use it.
2812         (start_static_storage_duration_function): Likewise.
2813         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
2814         (grokparms): Don't mess with DECL_ARG_TYPE.
2815         * typeck.c (convert_arguments): Use convert_for_arg_passing.
2816         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
2817         Define.
2818         * cp-tree.h: Declare new fns.
2819
2820 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
2821
2822         * cp-tree.h (flag_operator_names): Remove.
2823         * decl2.c (flag_operator_names): Remove.
2824         (lang_f_options): Remove operator-names.
2825         * lex.c (D_OPNAME): Remove.
2826         (reswords): Remove operator names.
2827         (rid_to_yy): Remove operator names.
2828         (init_reswords): No need to handle D_OPNAME.
2829         * spew.c (read_process_identifier): There are no operator
2830         names.
2831
2832 2002-07-26  Jason Merrill  <jason@redhat.com>
2833
2834         * dump.c (cp_dump_tree): Call c_dump_tree.
2835         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
2836
2837 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
2838
2839         * error.c (print_whitespace): Remove.
2840         * g++spec.c (LIBUNWIND): Move.
2841         * mangle.c (mangled_position, write_signed_number): Remove.
2842
2843 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
2844
2845         * decl2.c (cxx_decode_option): Similarly.
2846
2847 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
2848
2849         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
2850         (cxx_sizeof_or_alignof_type): Take a third argument.
2851         (cxx_sizeof): Adjust definition.
2852         (cxx_alignof): Likewise.
2853         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
2854         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
2855         complaining.
2856         (c_sizeof_nowarn): Remove definition.
2857         (build_unary_op): Use cxx_sizeof_nowarn.
2858
2859 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
2860
2861         * tree.c (cp_build_qualified_type_real): When copying
2862         pointer-to-method types, unshare the record that holds
2863         the cached pointer-to-member-function type.
2864
2865 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
2866
2867         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
2868
2869 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
2870
2871         Fix PR/7363:
2872         * typeck.c (cxx_sizeof_or_alignof_type): New function.
2873         (c_sizeof): Remove definition.
2874         (expr_sizeof): Use cxx_sizeof.
2875         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
2876         * decl.c (finish_destructor_body): Use cxx_sizeof.
2877         * semantics.c (finish_alignof): Likewise.
2878         (finish_alignof): Use cxx_alignof.
2879         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
2880         (cxx_sizeof_or_alignof_type): Declare.
2881         (my_friendly_assert): Move to ../c-common.h.
2882
2883 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
2884
2885         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
2886
2887 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2888
2889         PR c++/7347, c++/7348
2890         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
2891         * decl.c (make_typename_type): Use it.
2892         (make_unbound_class_template): Likewise.
2893         (lookup_name_real): Don't call type_access_control if scope is
2894         template parameter dependent.
2895         * parse.y (template_arg): Call make_unbound_class_template with
2896         tf_parsing set.
2897         (nest_name_specifier): Call make_typename_type with tf_parsing set.
2898         (typename_sub0): Likewise.
2899         (typename_sub1): Likewise.
2900         (instantiate_decl): Push class scope.
2901         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
2902         for both static variable and member function template.
2903         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
2904         and arguments.
2905         * search.c (type_access_control): Do type access for TEMPLATE_DECL
2906         too.
2907
2908 2002-07-20  Roger Sayle  <roger@eyesopen.com>
2909
2910         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
2911         test by using positive_option.  Make whitespace consistent.
2912
2913 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
2914
2915         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
2916         members with 'locus'.  Adjust use throughout.
2917         (struct feed):  Likewise.
2918         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
2919         Adjust use.
2920         (snarf_defarg): Use error(), not error_with_file_and_line().
2921
2922 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
2923
2924         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
2925         cpp_options is included.
2926
2927 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2928
2929         PR c++/2862, c++/2863
2930         * pt.c (determine_specialization): Compare the length of
2931         TYPE_ARG_TYPES.  Tidy.
2932
2933 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2934
2935         PR c++/3797
2936         * decl.c (duplicate_decls): Don't propagate inlining parameters from
2937         olddecl to newdecl when newdecl is a specialization of the
2938         instantiation olddecl.
2939
2940 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2941
2942         PR c++/4802, c++/5387
2943         * decl.c (make_typename_type): Use enforce_access.
2944
2945 2002-07-17  Scott Snyder <snyder@fnal.gov>
2946
2947         PR c++/7320
2948         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
2949
2950 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
2951
2952         * class.c (add_method): Correct handling of conversion operators.
2953
2954 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
2955
2956         PR c++/7224
2957         * class.c (add_method): Simplify.
2958
2959 2002-07-11  Jason Merrill  <jason@redhat.com>
2960
2961         PR c++/7279
2962         * tree.c (cp_copy_res_decl_for_inlining): Also copy
2963         TREE_ADDRESSABLE.
2964
2965 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
2966
2967         * pt.c (template_parm_this_level_p, push_template_decl_real):
2968         Pass depth as int pointer.
2969
2970 2002-07-11  Tim Josling  <tej@melbpc.org.au>
2971
2972         Remove front end hard coding from gengtype.c.
2973
2974         * config-lang.in (gtfiles): Add files needed for this front end.
2975
2976 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
2977
2978         * cp-tree.h (unqualified_name_lookup_error): Declare it.
2979         (begin_function_definition): Adjust prototype.
2980         * lex.c (unqualified_name_lookup_error): New function, split out
2981         from ...
2982         (do_identifier): ... here.
2983         * parse.y (parse_begin_function_definition): New function.
2984         (fn.def1): Use it.
2985         * semantics.c (begin_function_definition): Accept decl-specifiers
2986         and attributes as separate parameters.
2987
2988 2002-07-10  Jason Merrill  <jason@redhat.com>
2989
2990         PR c++/6255
2991         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
2992         modifying the old one.
2993
2994 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
2995
2996         * cp-tree.h (constructor_name_p): Declare it.
2997         (check_template_template_default_arg): Likewise.
2998         * class.c (handle_using_decl): Use constructor_name_p.
2999         * decl.c (grokdeclarator): Likewise.
3000         * decl2.c (constructor_name_p): Define it.
3001         * init.c (build_member_call): Use constructor_name_p.
3002         * parse.y (template_parm): Use check_template_template_default_arg.
3003         * pt.c (check_explicit_specialization): Use constructor_name_p.
3004         * semantics.c (check_template_template_default_arg): New function.
3005
3006 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3007
3008         * pt.c (can_complete_type_without_circularity): Add static to
3009         function definition.
3010
3011 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
3012
3013         * cp-tree.h (have_extern_spec): Declare it
3014         * decl.c (have_extern_spec): Define it.
3015         (start_decl): Eliminate use of used_extern_spec.
3016         (start_function): Likewise.
3017         * parse.y (have_extern_spec): Remove declaration.
3018         (used_extern_spec): Likewise.
3019         (frob_specs): Eliminate use of used_extern_spec.
3020         (.hush_warning): Likewise.
3021
3022 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
3023
3024         * Make-lang.in (cp/parse.o): Depend on decl.h.
3025         * cp-tree.h (do_decl_instantiation): Change prototype.
3026         * parse.y: Include decl.h.
3027         (parse_decl_instantiation): New function.
3028         (explicit_instantiation): Use it.
3029         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
3030         and DECLSPECS.
3031
3032 2002-07-07  Roger Sayle  <roger@eyesopen.com>
3033
3034         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
3035         constructor and destructor tests when passed a TEMPLATE_DECL.
3036
3037 2002-07-05  Jason Merrill  <jason@redhat.com>
3038
3039         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
3040         pointers.
3041
3042         PR optimization/7145
3043         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
3044
3045 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
3046
3047         Repair damage on weak-impared targets caused by my previous patch.
3048         * cp-tree.h (import_export_tinfo): Add parameter.
3049         * decl2.c (import_export_tinfo): Add parameter, post adjust
3050         DECL_COMDAT.
3051         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
3052         import_export_tinfo.
3053
3054 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3055
3056         PR c++/6944
3057         * init.c (build_aggr_init): Remove qualifiers of init before calling
3058         build_vec_init.
3059         (build_vec_init): Flatten multi-dimensional array during cleanup.
3060         (build_vec_delete_1): Abort if the type of each element is array.
3061
3062 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
3063
3064         * pt.c (instantiate_class_template): Fix typo.
3065
3066 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3067
3068         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
3069         by CVS conflict in my last patch.
3070
3071 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3072
3073         PR c++/6716
3074         * pt.c (can_complete_type_without_circularity): New function.
3075         (instantiate_class_template): Use it.
3076         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
3077         message due to incomplete fields.
3078
3079 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
3080
3081         PR c++/7112
3082         * mangle.c (write_expression): Add mangling for sizeof when
3083         applied to a type.
3084         * operators.def: Remove stale comment.
3085
3086 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
3087
3088         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
3089         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
3090         (tinfo_decl_type): Replace with ...
3091         (type_info_ptr_type): ... this.
3092         (import_export_tinfo): Declare.
3093         (tinfo_decl_p): Rename to ...
3094         (unemitted_tinfo_decl_p): ... this.
3095         * decl2.c (import_export_decl): Break out tinfo handling into ...
3096         (import_export_tinfo): ... here. New function.
3097         (finish_file): Adjust.
3098         * rtti.c (TINFO_REAL_NAME): New macro.
3099         (init_rtti_processing): Create the tinfo types.
3100         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
3101         (get_tinfo_decl): Adjust.
3102         (get_tinfo_ptr): New function.
3103         (get_type_id): Use it.
3104         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
3105         (ptr_initializer): Use get_tinfo_ptr.
3106         (ptm_initializer): Likewise.
3107         (synthesize_tinfo_var): Break into ...
3108         (get_pseudo_ti_init): ... this. Just create the initializer.
3109         (get_pseudo_ti_desc): .. and this.
3110         (create_real_tinfo_var): Remove.
3111         (create_pseudo_type_info): Don't create the vtable decl here.
3112         (get_vmi_pseudo_type_info): Remove.
3113         (create_tinfo_types): Adjust.
3114         (tinfo_decl_p): Rename to ...
3115         (unemitted_tinfo_decl_p): ... here. Adjust.
3116         (emit_tinfo_decl): Adjust. Create the initializer.
3117
3118 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
3119
3120         PR c++/6695
3121         * pt.c (tsubst_friend_class): Substitute into the context of the
3122         friend before using it.
3123
3124 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
3125
3126         * cp-tree.h (xref_tag): Change prototype.
3127         (handle_class_head): Likewise.
3128         (build_x_component_ref): Likewise.
3129         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
3130         (xref_tag): Take attributes as a separate parameter.
3131         (xref_tag_from_type): Adjust call to xref_tag.
3132         * decl2.c (build_expr_from_tree): Adjust call to
3133         build_x_component_ref.
3134         (handle_class_head): Take attributes as a separate parameter.
3135         * parse.y (parse_xref_tag): New function.
3136         (parse_handle_class_head): Likewise.
3137         (primary): Use parse_xref_tag.
3138         (class_head_decl): Use parse_handle_class_head.
3139         (class_head_defn): Likewise.
3140         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
3141         (build_dynamic_cast_1): Likewise.
3142         (create_pseudo_type_info): Likewise.
3143         (emit_support_tinfos): Likewise.
3144         * typeck.c (build_object_ref): Adjust call to
3145         build_x_component_ref.
3146         (build_x_component_ref): Remove protect parameter.
3147
3148 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
3149
3150         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
3151         * class.c (handle_using_decl): Likewise.
3152         (instantiate_type): Likewise.
3153         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
3154         (xref_basetypes): Change prototype.
3155         (begin_mem_initializers): New function.
3156         (get_overloaded_fn): Likewise.
3157         * decl.c (xref_basetypes): Simplify.
3158         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
3159         * init.c (build_offset_ref): Likewise.
3160         * parse.y (base_init): Use begin_mem_initializers().
3161         (structsp): Adjust call to xref_basetypes.
3162         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
3163         (instantiate_class_template): Adjust call to xref_basetypes.
3164         * semantics.c (begin_mem_initializers): New function.
3165         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
3166         (really_overlaoded_fn): Likewise.
3167         (get_overloaded_fn): New function.'
3168         (get_first_fn): USe BASELINK_FUNCTIONS.
3169
3170 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
3171
3172         * cp-tree.h (SCALAR_TYPE_P): New macro.
3173         (check_for_out_of_scope_variable): New function.
3174         (at_class_scope_p): Likewise.
3175         (finish_fname): Likewise.
3176         * class.c (finish_struct): Use at_function_scope_p.
3177         * decl.c (check_for_out_of_scope_variable): New function, split
3178         out from do_identifier.
3179         (finish_enum): Use at_function_scope_p.
3180         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
3181         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
3182         (primary): Use at_function_scope_p.
3183         * search.c (at_class_scope_p): New function.
3184         * semantics.c (finish_fname): Likewise.
3185         (check_multiple_declarators): Use at_function_scope_p.
3186
3187 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
3188
3189         * parse.y (parse_scoped_id): New function.
3190         (primary): Use it.
3191         * cp-tree.h (do_scoped_id): Adjust declaration.
3192         * lex.c (do_scoped_id): Remove call to yylex.
3193         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
3194         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
3195         expanding it inline.
3196
3197 2002-06-23  Matt Thomas  <matt@3am-software.com>
3198
3199         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
3200         "#if VMS_TARGET".
3201
3202 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3203
3204         * mangle.c (integer_type_codes): Const-ify.
3205
3206 2002-06-20  Richard Henderson  <rth@redhat.com>
3207
3208         PR c++/6747
3209         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
3210         Call put_var_into_stack.
3211
3212 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3213
3214         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
3215         array size calculation.
3216
3217 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3218
3219         PR c++/6892
3220         * pt.c (tsubst_expr): Handle FILE_STMT.
3221
3222 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3223
3224         PR c++/6723
3225         * pt.c (lookup_template_class): Don't build complete argument of
3226         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
3227         argument.
3228
3229 2002-06-19  Akim Demaille  <akim@epita.fr>
3230
3231         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
3232         decl.h's TYPENAME.
3233         * spew.c, lex.c: Adjust.
3234         * parse.y (explicit_instantiation): Add empty action to override
3235         the default $$ = $1 where it introduces a type clash.
3236
3237 2002-06-14  Jason Merrill  <jason@redhat.com>
3238
3239         * semantics.c (begin_for_stmt): Push the 'for' scope before
3240         adding the FOR_STMT.
3241
3242         C++ ABI changes.
3243         * class.c (build_base_field): Set DECL_PACKED.
3244         (layout_class_type): Don't use tail padding of PODs.
3245         * mangle.c (write_unqualified_name): Fix template conversion op
3246         mangling.
3247
3248 2002-06-16  Richard Henderson  <rth@redhat.com>
3249
3250         PR opt/6793
3251         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
3252         after template instantiation.
3253
3254 2002-06-16  Richard Henderson  <rth@redhat.com>
3255
3256         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
3257
3258 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
3259
3260         * cp-tree.h (compiler_error): Remove declaration.
3261         * lex.c (compiler_error): Remove definition.
3262
3263 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
3264
3265         * g++spec.c (LIBUNWIND): New.
3266         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
3267
3268 2002-06-13  Jessica Han  <jessica@cup.hp.com>
3269
3270         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
3271         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
3272         (build_vbase_offset_vtbl_entries): Likewise.
3273         * rtti.c (build_headof): Likewise.
3274         (get_tinfo_decl_dynamic): Likewise.
3275         (create_pseudo_type_info): Likewise.
3276
3277 2002-06-12  Stan Shebs  <shebs@apple.com>
3278
3279         * mpw-config.in: Remove file, no longer used.
3280         * mpw-make.sed: Ditto.
3281
3282 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
3283
3284         * decl2.c: Update call to cpp_handle_option.
3285
3286 2002-06-07  H.J. Lu  (hjl@gnu.org)
3287
3288         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
3289
3290 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
3291
3292         * error.c (cp_error_at): Fix typo.
3293
3294 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
3295
3296         * error.c (cp_diagnostic_starter): Adjust call.
3297         (maybe_print_instantiation_context): Change prototype to take a
3298         'diagnostic_info *'.
3299         (print_instantiation_full_context): Likewise.
3300         (print_instantiation_partial_context): Likewise.
3301         (cp_diagnostic_starter): Likewise.
3302         (cp_diagnostic_finalizer): Likewise.
3303         (cp_print_error_function): Likewise.
3304         (cp_printer): Take a secondary parameter as a 'text_info *'.
3305         Remove output_state savings.  Adjust calls.
3306
3307 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
3308
3309         * pt.c (inline_parm_levels): Mark for GC.
3310
3311         * mangle.c (start_mangling): Allocate G.substitutions here...
3312         (init_mangle): ... rather than here.
3313         (finish_mangling): Clear the varray pointer when done with it.
3314         * spew.c (yylexstring): Don't use VARRAY_FREE.
3315         * search.c (bfs_walk): Don't use VARRAY_FREE.
3316         * decl2.c (pending_statics): Use gengtype to mark.
3317         (deferred_fns): Likewise.
3318         (ssdf_decls): Likewise.
3319         (init_decl2): Delete.
3320         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
3321         (cxx_init_decl_processing): Don't call init_decl2.
3322         (cxx_pop_function_context): Don't use VARRAY_FREE.
3323         * cp-tree.h (struct saved_scope): No need for special marking
3324         of varrays.
3325         (struct language_function): Likewise.
3326         (local_classes): Use gengtype to mark.
3327         (init_decl2): Delete prototype.
3328         * class.c (init_class_processing): Don't use
3329         ggc_add_tree_varray_root.
3330         (build_vtbl_initializer): Don't use VARRAY_FREE.
3331
3332         * decl.c (typename_compare): Don't use same_type_p.
3333
3334         * decl.c: Include hashtab.h instead of hash.h.
3335         (typename_hash): Update to use htab_h.
3336         (typename_compare): Likewise.
3337         (typename_htab): Use gengtype to mark.
3338         (build_typename_type): Update to use htab_h.
3339         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
3340
3341         * Make-lang.in (gt-cp-tree.h): New rule.
3342         (cp/tree.o): Depend on gt-cp-tree.h.
3343         * config-lang.in (gtfiles): Add cp/tree.c.
3344         * tree.c: Include gt-cp-tree.h.
3345         (list_hash_table): Use gengtype to mark.
3346         (init_tree): Use gengtype to mark trees.
3347
3348         * Make-lang.in (cp/decl.o): Add debug.h dependency.
3349         * call.c (struct z_candidate): Use gengtype.
3350         (USER_CONV_CAND): Use WRAPPER_ZC.
3351         (convert_class_to_reference): Use build_zc_wrapper.
3352         (build_type_conversion_1): Likewise.
3353         (build_over_call): Use WRAPPER_ZC.
3354         (add_warning): Use build_zc_wrapper.
3355         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
3356         * cp-tree.h (struct lang_identifier): Use gengtype.
3357         (struct template_parm_index_s): Likewise.
3358         (struct ptrmem_cst): Likewise.
3359         (struct tree_binding): Likewise.
3360         (struct tree_overload): Likewise.
3361         (struct tree_srcloc): Likewise.
3362         (struct tree_wrapper): Likewise.  Also modify to have a pointer
3363         to struct z_candidate rather than void.
3364         (enum cp_tree_node_structure_enum): New.
3365         (union lang_tree_node): New.
3366         (cxx_mark_tree): Delete prototype.
3367         (cp_tree_node_structure): New prototype.
3368         (build_ptr_wrapper): Delete prototype.
3369         (build_int_wrapper): Delete prototype.
3370         (build_zc_wrapper): New prototype.
3371         * decl.c: Include debug.h
3372         (cxx_mark_tree): Delete.
3373         (cp_tree_node_structure): New.
3374         * tree.c (build_ptr_wrapper): Delete.
3375         (build_int_wrapper): Delete.
3376         (build_zc_wrapper): New.
3377
3378         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
3379         Correct typo.  Patch from k_fukui@highway.ne.jp.
3380
3381         * semantics.c (current_stmt_tree): Update for change to
3382         struct language_function.
3383         (finish_mem_initializers): Likewise.
3384         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
3385         * cp-tree.h (struct language_function): Rename from
3386         cp_language_function.  Change all uses.
3387         (cp_function_chain): Don't need to cast.
3388
3389         * class.c (duplicate_tag_error): Reset discriminator.
3390         (check_bases_and_members): Update for data structure changes.
3391         * cp-tree.h (struct lang_id2): Use gengtype.
3392         (flagged_type_tree): Likewise.
3393         (SET_LANG_ID): Use GGC on struct lang_id2.
3394         (struct cp_language_function): Use gengtype.  Remove field
3395         'x_vcalls_possible_p'.
3396         (current_vcalls_possible_p): Delete.
3397         (struct lang_type_header): New.
3398         (struct lang_type_class): Rename from struct lang_type.  Include
3399         struct lang_type_header.
3400         (struct lang_type_ptrmem): New.
3401         (struct lang_type): New.
3402         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
3403         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
3404         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
3405         (struct lang_decl_flags): Use gengtype.  Add discriminators.
3406         (struct lang_decl): Use gengtype.  Add and use discriminators.
3407         Update the macros that reference moved fields.
3408         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
3409         (SET_DECL_THUNK_P): Set discriminator too.
3410         (clear_inline_text_obstack): Delete prototype.
3411         (finish_inline_definitions): Delete prototype.
3412         (mark_pending_inlines): Delete prototype.
3413         (lang_check_failed): New prototype.
3414         * decl.c (struct named_label_use_list): Use gengtype.
3415         (struct named_label_list): Likewise.
3416         (mark_binding_level): Delete.
3417         (mark_named_label_lists): Delete.
3418         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
3419         (cxx_init_decl_processing): Use generated marker routine.
3420         (begin_destructor_body): Delete dead set to
3421         current_vcalls_possible_p.
3422         (mark_lang_function): Delete.
3423         (mark_cp_function_context): Delete.
3424         (lang_mark_tree): Use generated marker routines.
3425         * decl2.c (start_objects): Set discriminator when setting
3426         GLOBAL_INIT_PRIORITY.
3427         * lex.c (retrofit_lang_decl): Set discriminators.
3428         (copy_lang_type): Update for changes to lang_type structure.
3429         (cp_make_lang_type): Set discriminator.
3430         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
3431         * search.c: Include ggc.h.
3432         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
3433         (finish_inline_definitions): Delete.
3434         * spew.c (struct token): Use gengtype.
3435         (struct token_chunk): New.
3436         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
3437         (struct feed): Use gengtype.
3438         (feed_obstack): Delete.
3439         (feed): Mark as GC root.
3440         (pending_inlines): Mark as GC root.
3441         (pending_inlines_tail): Likewise.
3442         (processing_these_inlines): Likewise.
3443         (token_obstack): Make static.
3444         (first_token): Likewise.
3445         (init_spew): Don't initialize deleted things; use gengtype for roots.
3446         (clear_inline_text_obstack): Delete.
3447         (feed_input): Use GC for struct feed.  Update for changes to
3448         struct unparsed_text.
3449         (mark_pending_inlines): Delete.
3450         (next_token): Rename from add_token.  Change all callers.  Update
3451         for changes to struct unparsed_text.
3452         (space_for_token): New.
3453         (remove_last_token): New.
3454         (alloc_unparsed_text): New.
3455         (snarf_block): Take an unparsed_text.  Update for changes to struct
3456         unparsed_text.
3457         (snarf_method): Update for changes to struct unparsed_text.
3458         (snarf_defarg): Update for changes to struct unparsed_text.
3459         * tree.c (lang_check_failed): New.
3460
3461         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
3462         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
3463         (cp/spew.o): Add dependency on gt-<filename>.h.
3464         (cp/decl2.o): Add dependency on gt-<filename>.h.
3465         (cp/call.o): Add dependency on gt-<filename>.h.
3466         (cp/pt.o): Add dependency on gt-<filename>.h.
3467         (cp/repo.o): Add dependency on gt-<filename>.h.
3468         (cp/parse.o): Add dependency on gt-<filename>.h.
3469         * call.c: Use gengtype for roots.
3470         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
3471         decl2.c parse.y pt.c repo.c spew.c.
3472         * cp-tree.h: Use gengtype for roots.
3473         (struct saved_scope): Use GGC, gengtype.
3474         (cp_parse_init): Delete prototype.
3475         (init_pt): Delete prototype.
3476         * decl.c: Use gengtype for roots.
3477         (mark_saved_scope): Delete.
3478         (cxx_init_decl_processing): Don't call deleted initilisation
3479         routines.
3480         (signed_size_zero_node): Delete, unused.
3481         * decl.h: Use gengtype for roots.
3482         * decl2.c: Use gengtype for roots.
3483         * lex.h: Use gengtype for roots.
3484         * parse.y: Use gengtype for roots.
3485         (cp_parse_init): Delete.
3486         * pt.c: Use gengtype for roots.
3487         (init_pt): Delete.
3488         * repo.c: Use gengtype for roots.
3489         * spew.c: Use gengtype for roots.
3490
3491         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
3492         (cp/decl.o): Add dependency on gtype-cp.h.
3493         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
3494         Include gtype-cp.h.  Allow for filename changes.
3495
3496         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
3497         (cp/decl.o): Add cp/gt-decl.h dependency.
3498         * config-lang.in (gtfiles): New.
3499         * tree.h: Rename struct binding_level to struct cp_binding_level.
3500         * decl.c: Rename struct binding_level to struct cp_binding_level.
3501         Include cp/gt-decl.h.
3502         (struct cp_binding_level): Use gengtype.
3503         (make_binding_level): Use GGC on struct cp_binding_level.
3504         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
3505         (cxx_init_decl_processing): Mark free_binding_level as
3506         deletable.
3507
3508         * decl.c (mark_cp_function_context): Update calling sequence.
3509
3510         * decl.c (start_function): Don't free 'struct
3511         cp_language_function'.
3512         (pop_cp_function_context): Likewise.
3513         (save_function_data): Allocate it using GC.
3514         * semantics.c (genrtl_start_function): Don't free 'struct
3515         cp_language_function'.
3516
3517 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
3518
3519         * lang-specs.h: Use cpp_debug_options.
3520
3521 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
3522
3523         * mangle.c, tree.c: Include real.h.
3524         * Make-lang.in: Update dependency lists.
3525
3526 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3527
3528         * lex.c: Don't include c-lex.h.
3529         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
3530
3531 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
3532
3533         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
3534
3535 2002-05-22  Richard Henderson  <rth@redhat.com>
3536
3537         * decl.c (obscure_complex_init): Check for VAR_DECL
3538         before using DECL_THREAD_LOCAL.
3539
3540 2002-05-22  Richard Henderson  <rth@redhat.com>
3541
3542         * decl.c (check_tag_decl): Handle RID_THREAD.
3543         (obscure_complex_init): Reject run-time init of tls.
3544         (grokvardecl, grokdeclarator): Handle RID_THREAD.
3545         * lex.c (reswords): Add __thread.
3546         (rid_to_yy): Map RID_THREAD to SCSPEC.
3547
3548 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
3549
3550         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
3551         * cp-tree.h (cxx_post_options): Kill.
3552         * cp-lex.c (cxx_post_options): Kill.
3553
3554 2002-05-21  Richard Henderson  <rth@redhat.com>
3555
3556         * lex.c (rid_to_yy): Add RID_THREAD.
3557
3558 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
3559
3560         * init.c (build_vec_init): Test for trivial copy-assignment when
3561         copy-assigning arrays.
3562
3563 2002-05-20  Andreas Jaeger  <aj@suse.de>
3564
3565         * init.c (build_default_init): Remove unused variable.
3566
3567 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
3568
3569         * call.c (any_strictly_viable): New.
3570         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
3571
3572 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3573
3574         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
3575
3576 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3577
3578         PR c++/186, DR 259
3579         * pt.c (do_decl_instantiation): Don't complain explicit
3580         instantiation after explicit specialization.
3581         (do_type_instantiation): Likewise.
3582
3583 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
3584
3585         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
3586         renamed from...
3587         (complete_type_or_else): ... this.  Redefined as macro.
3588         (cxx_incomplete_type_diagnostic): Declare.
3589         (cxx_incomplete_type_error): Define as macro.
3590         * init.c (build_delete): Warn about incomplete types other than
3591         void, and use the built-in operator delete for them.
3592         * typeck.c (complete_type_or_diagnostic): Renamed from
3593         complete_type_or_else.  Added warn_only argument, passed to...
3594         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
3595         warnings or errors depending on new warn_only argument.  Renamed
3596         from...
3597         (cxx_incomplete_type_error): ... this.  New implementation in
3598         terms of cxx_incomplete_type_diagnostic.
3599
3600 2002-05-18  Jason Merrill  <jason@redhat.com>
3601
3602         PR c++/6611
3603         * decl2.c (import_export_decl): If we clear
3604         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
3605
3606 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3607
3608         PR c++/6620
3609         * pt.c (verify_class_unification): Don't check if PARM is template
3610         parameter dependent.  Simplify.
3611         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
3612         parameter dependent expression.
3613
3614 2002-05-14  Jason Merrill  <jason@redhat.com>
3615
3616         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
3617         Do set DECL_COMDAT.
3618         (synthesize_tinfo_var): Take the public decl.
3619         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
3620         (emit_tinfo_decl): Adjust.  Call import_export_decl.
3621         * decl2.c (import_export_decl): Simplify tinfo decl handling.
3622
3623 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
3624
3625         * cp-tree.h (struct lang_type): Added non_zero_init.
3626         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
3627         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
3628         * class.c (check_field_decls): Test non_zero_init.
3629         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
3630         zero-to-NULL conversions.
3631         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
3632         type that needs zero-initialization without zeros.
3633         (check_initializer_decl): Compute zero-initializer for types
3634         that require a non-trivial one.
3635         * init.c (build_forced_zero_init): New function.
3636         (build_default_init): Use it.
3637         * tree.c (zero_init_p): New function.
3638         * typeck2.c (force_store_init_value): New function.
3639         (process_init_constructor): Create non-trivial zero-initializers
3640         for array members and class fields.
3641
3642 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
3643
3644         * lang-specs.h: Remove redundant -lang-c++.
3645
3646 2002-05-13  Jason Merrill  <jason@redhat.com>
3647
3648         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
3649         (fixed_type_or_null): See through reference vars.
3650         (build_base_path): Vtable contents are constant.
3651         * typeck.c (get_member_function_from_ptrfunc): Likewise.
3652
3653 2002-05-12  Jason Merrill  <jason@redhat.com>
3654
3655         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
3656         structs are safe.
3657
3658 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
3659
3660         * cp-tree.h (flag_ansi): Remove.
3661         * decl2.c (flag_ansi): Remove.
3662         (cxx_decode_option): Set flag_iso and flag_undef.
3663
3664 2002-05-09  Jason Merrill  <jason@redhat.com>
3665
3666         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
3667         Use subtraction rather than a bitmask to get the index.
3668         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
3669
3670         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
3671
3672 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
3673
3674         * Make-lang.in (decl2.o): Update.
3675         * cp-tree.h (warn_multichar): Remove.
3676         * decl2.c: Include c-common.h.
3677         (warn_multichar): Remove.
3678
3679 2002-05-03  Jason Merrill  <jason@redhat.com>
3680
3681         * tree.c (build_cplus_array_type): Only const and volatile get
3682         special handling.
3683
3684         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
3685
3686 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
3687
3688         ABI change, returning simple classes from functions.
3689         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
3690         TYPE_HAS_TRIVIAL_INIT_REF is false or
3691         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
3692
3693 2002-04-30  Jason Merrill  <jason@redhat.com>
3694
3695         PR debug/6436
3696         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
3697         anonymous class with a typedef if there are attributes.
3698
3699 2002-04-29  Paul Eggert  <eggert@twinsun.com>
3700
3701         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
3702
3703 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
3704
3705         PR c++/6477
3706         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
3707         non-NULL first.
3708
3709 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
3710
3711         PR c++/6492
3712         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
3713         enter that scope before name lookup.
3714
3715         PR c++/6486
3716         * method.c (do_build_copy_constructor): Avoid building
3717         cv-qualified reference types.
3718
3719 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
3720
3721         PR c++/5719
3722         * decl.c (grok_op_properties): Assignment ops don't have to return
3723         by value. operator% should.
3724
3725 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
3726
3727         PR c/6343
3728         * decl.c (duplicate_decls): Call merge_weak.
3729
3730 2002-04-26  Richard Henderson  <rth@redhat.com>
3731
3732         * parse.y (malloced_yyss, malloced_yyvs): New.
3733         (yyoverflow): Re-add.  Set them.
3734         (free_parser_stacks): New.
3735
3736 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
3737
3738         PR c++/6497
3739         * method.c (do_build_assign_ref): Pass a derivation to
3740         build_method_call when calling base class assignment operators.
3741
3742 2002-04-26  Richard Henderson  <rth@redhat.com>
3743
3744         * parse.y (yyoverflow): Revert.
3745
3746 2002-04-26  Richard Henderson  <rth@redhat.com>
3747
3748         PR c/3581
3749         * parse.y (string): Remove.  Update all uses to use STRING
3750         instead, and not call combine_strings.
3751         * rtti.c (tinfo_name): Use fix_string_type.
3752         * semantics.c (finish_asm_stmt): Don't call combine_strings.
3753         * spew.c (yylexstring): New.
3754         (read_token): Use it.
3755
3756 2002-04-25  Richard Henderson  <rth@redhat.com>
3757
3758         PR c/2161
3759         * parse.y (yyoverflow): New.
3760
3761 2002-04-25  Jason Merrill  <jason@redhat.com>
3762
3763         PR c++/5607
3764         * search.c (check_final_overrider): No longer static.
3765         * class.c (update_vtable_entry_for_fn): Call it.
3766         * cp-tree.h: Adjust.
3767
3768 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3769
3770         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
3771         * cp-tree.h (cxx_set_yydebug): Die.
3772         * lex.c (YYDEBUG): Get from c-lex.h.
3773         (cxx_set_yydebug): Remove.
3774         * parse.y: Include c-lex.h.
3775         (YYDEBUG): Get from c-lex.h.
3776
3777 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
3778
3779         PR c++/6438.
3780         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
3781         void.
3782
3783 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
3784
3785         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
3786         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
3787         Redefine.
3788         * cp-tree.h (cp_attribute_table): Rename.
3789         * decl.c (lang_attribute_table): Remove declaration.
3790         (cxx_init_decl_processing): Don't set it.
3791         * tree.c (cp_attribute_table): Rename.
3792
3793 2002-04-24  Jason Merrill  <jason@redhat.com>
3794
3795         PR c++/6331
3796         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
3797         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
3798         The pedwarn for array assignment is now unconditional.
3799         * tree.c (build_cplus_array_type_1): Still process simple array types
3800         normally in templates.
3801
3802         PR c++/6395
3803         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
3804         stuff for comdats.
3805
3806 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
3807
3808         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
3809         node with attributes.
3810
3811 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
3812
3813         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
3814         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
3815
3816 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
3817
3818         PR c++/6256:
3819         * pt.c (tsubst_friend_class): Handle templates with explicit
3820         nested names.
3821
3822         PR c++/6331:
3823         * typeck.c (merge_types): Remember the cv-qualification of pointer
3824         types when merging them.
3825
3826 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
3827
3828         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
3829         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
3830         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
3831         cxx_mark_function_context): New.
3832         * decl.c (push_cp_function_context, pop_cp_function_context,
3833         mark_cp_function_context): Rename for consistency.
3834         (cxx_init_decl_processing): Don't set old hooks.
3835
3836 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
3837
3838         * call.c (convert_type_from_ellipsis): Rename, update.
3839         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
3840         * cp-tree.h (convert_type_from_ellipsis): Rename.
3841         * decl.c (cxx_init_decl_processing): Don't set hook.
3842
3843 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
3844
3845         * call.c (build_new_method_call): Update.
3846         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
3847         * cp-tree.h (cxx_incomplete_type_error): New.
3848         * decl.c (grokdeclarator, grokparms): Update.
3849         * decl2.c (check_classfn): Update.
3850         * pt.c (tsubst): Update.
3851         * typeck.c (complete_type_or_else, expr_sizeof,
3852         decay_conversion): Update.
3853         * typeck2.c (incomplete_type_error): Rename.
3854         (add_exception_specifier): Update.
3855
3856 2002-04-18  Jason Merrill  <jason@redhat.com>
3857
3858         PR c++/5658
3859         * search.c (setup_class_bindings): A class template qualifies as a
3860         type binding.
3861
3862 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
3863
3864         PR c++/6316
3865         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
3866         before expanding.
3867
3868 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
3869
3870         * init.c (begin_init_stmts): Remove commented out code.
3871         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
3872         * semantics.c (begin_gobal_stmt_expr): Adjust call to
3873         expand_start_stmt_expr.
3874
3875 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
3876
3877         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
3878         dso_handle itself, to __cxa_atexit.
3879
3880 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
3881
3882         * error.c (cxx_print_error_function): Adjust call to macros.
3883
3884 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
3885
3886         * class.c (layout_virtual_bases): Do all dsize computation on trees.
3887
3888 2002-04-14  Jason Merrill  <jason@redhat.com>
3889
3890         * typeck.c (get_member_function_from_ptrfunc): Don't do
3891         gratuitious division and multiplication on
3892         ptrmemfunc_vbit_in_delta targets.
3893
3894 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
3895
3896         PR c++/5373.
3897         * semantics.c (finish_expr_stmt): Remember the type of the
3898         expression before any conversions are performed.
3899
3900 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
3901
3902         PR c++/5189.
3903         * call.c (add_template_candidate_real): Do not treat member
3904         templates as copy constructors.
3905
3906 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
3907
3908         * decl.c (duplicate_decls): Do not copy the RTL for a variable
3909         declaration if the old variable had an incomplete type and the new
3910         variable does not.
3911         (complete_vars): Do not call layout_decl for completed variables.
3912
3913 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
3914
3915         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
3916         with an explicit one.
3917         (follow_tag_typedef): New.
3918         (lookup_tag): Use it to extract the tag of an explicit typedef.
3919         (xref_tag): Likewise.
3920
3921 2002-04-11  Andrew Haley  <aph@redhat.com>
3922
3923         * typeck.c (type_after_usual_arithmetic_conversions):
3924         If two types have the same variant, return immediately.
3925         When two floating-point operands are the same precision:
3926           convert to float if one of the operands is float;
3927           if neither operand is one of the standard types, return the type
3928           of the first operand.
3929
3930 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
3931
3932         PR c++/5507
3933         * decl.c (make_typename_type): Remove implicit typenameness.
3934
3935 2002-04-09  Jason Merrill  <jason@redhat.com>
3936
3937         PR optimization/6189
3938         * semantics.c (genrtl_start_function): Don't free
3939         DECL_SAVED_FUNCTION_DATA for inline functions.
3940
3941         * init.c (build_member_call): For now, don't convert to
3942         intermediate base if it would cause an error.
3943
3944 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
3945
3946         * parse.y (namespace_qualifier, maybe_identifier,
3947         begin_explicit_instantiation, end_explicit_instantiation,
3948         apparent_template_type, .finish_template_type,
3949         do_id, maybe_init, defarg_again, component_decl_1):
3950         Add ending ';', in accordance with POSIX.
3951
3952 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
3953
3954         PR c++/5571
3955         * class.c (layout_class_type): Remember incomplete static
3956         variables.
3957         (finish_struct_1): Call complete_vars, not
3958         hack_incomplete_structures.
3959         * cp-tree.h (hack_incomplete_structures): Rename to ...
3960         (complete_vars): ... this.
3961         (struct saved_scope): Remove incomplete.
3962         (namespace_scope_incomplete): Remove.
3963         * decl.c (struct binding_level): Remove incomplete.
3964         (incomplete_vars): New variable.
3965         (mark_binding_level): Don't mark incomplete.
3966         (print_binding_level): Don't print it.
3967         (mark_saved_scope): Don't mark incomplete.
3968         (pushdecl): Use maybe_register_incopmlete_var.
3969         (cxx_init_decl_processing): Register incomplete_vars for GC.
3970         (start_decl_1): Clarify error message.
3971         (hack_incomplete_vars): Remove.
3972         (maybe_register_incomplete_var): New function.
3973         (complete_vars): Likewise.
3974
3975 2002-04-06  Jason Merrill  <jason@redhat.com>
3976
3977         PR c++/4934
3978         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
3979         set before checking it.
3980
3981         PR c++/525
3982         * init.c (build_member_call): Use build_scoped_ref.
3983         (resolve_offset_ref): Likewise.
3984         * call.c (build_scoped_method_call): Likewise.
3985         * tree.c (maybe_dummy_object): Kludge around current_class_type being
3986         wrong.
3987         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
3988         * cp-tree.h: Adjust.
3989
3990         * init.c (push_base_cleanups): Just use build_scoped_method_call.
3991
3992         PR c++/6179
3993         * method.c (implicitly_declare_fn): Pass unqualified type to
3994         synthesize_exception_spec.
3995
3996 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
3997
3998         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
3999         * cvt.c: Update comment.
4000         * init.c (expand_cleanup_for_base): Update.
4001         * semantics.c (finish_parenthesized_expr): Update.
4002         * typeck.c (cp_truthvalue_conversion): Update.
4003
4004 2002-04-04  Jason Merrill  <jason@redhat.com>
4005
4006         * semantics.c (finish_eh_cleanup): New fn.
4007         * cp-tree.h: Add prototype.
4008         * init.c (perform_member_init, expand_cleanup_for_base): Use
4009         finish_eh_cleanup.
4010         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
4011         * cp-tree.h: Remove references.
4012         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
4013         * dump.c (cp_dump_tree): Likewise.
4014         * pt.c (tsubst_expr): Likewise.
4015         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
4016         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
4017         * tree.c (cp_statement_code_p): Likewise.
4018
4019         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
4020
4021         PR c++/5636
4022         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
4023         cleanup for nrv.
4024
4025         PR c++/5104
4026         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
4027         specifiers.
4028         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
4029
4030 2002-04-03  Richard Henderson  <rth@redhat.com>
4031
4032         * cp-lang.c (cxx_warn_unused_global_decl): New.
4033         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
4034
4035 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
4036
4037         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
4038         * tree.c (init_tree): Don't set hook.
4039
4040 2002-04-03  Roger Sayle  <roger@eyesopen.com>
4041
4042         PR c++/5998:
4043         * decl.c (duplicate_decls): Don't mess with assembler names when
4044         redeclaring builtin functions as static.
4045
4046 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
4047
4048         * call.c (build_addr_func): Update.
4049         * class.c (resolve_address_of_overloaded_function): Update.
4050         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
4051         * cp-tree.h (cxx_mark_addressable): New.
4052         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
4053         * decl2.c (build_cleanup): Update.
4054         * except.c (build_throw): Update.
4055         * init.c (resolve_offset_ref): Update.
4056         * pt.c (convert_nontype_argument): Update.
4057         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
4058         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
4059         unary_complex_lvalue): Update.
4060         (mark_addressable): Rename.
4061
4062 2002-04-01  Roger Sayle  <roger@eyesopen.com>
4063
4064         PR c++/5998:
4065         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
4066         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
4067         but follow the SET_DECL_RTL idiom used elsewhere in the function.
4068
4069 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
4070
4071         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
4072         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
4073         * decl.c (grokdeclarator): Update.
4074         * mangle.c (write_integer_cst): Update.
4075         * typeck.c (build_binary_op): Update.
4076
4077 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
4078
4079         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
4080         * lex.c (cxx_init): Don't set hook.
4081
4082 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
4083
4084         * Make-lang.in (error.o): Update.
4085         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
4086         * cp-tree.h (struct diagnostic_context): Predeclare.
4087         (cxx_print_error_function): New.
4088         * error.c: Include langhooks-def.h.
4089         (lang_print_error_function): Rename.  Update.
4090         (init_error): Don't set hook.
4091
4092 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
4093
4094         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
4095         Redefine.
4096         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
4097         * decl.c (finish_enum): Similarly.
4098         * error.c (dump_type): Similarly.
4099         * lex.c (cxx_init): Similarly.
4100         * mangle.c (write_builtin_type): Similarly.
4101         * typeck.c (comptypes): Similarly.
4102
4103 2002-03-28  Roger Sayle  <roger@eyesopen.com>
4104
4105         PR c++/5998:
4106         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
4107         in the g++ front-end.
4108         (duplicate_decl): Allow redefinition of anticipated built-ins.
4109         Fix inlining problem by over-writing the old DECL_RTL.
4110         (lookup_namespace_name): Fail to find an identifier in the
4111         specified namespace if its still anticipated.
4112         (builtin_function_1): New function split out from builtin_function
4113         to create a builtin in the current namespace with given context.
4114         (builtin_function): Call builtin_function_1 to define the
4115         appropriate builtins in both the std and global namespaces.
4116         (select_decl): Don't test for anticipated decls here.
4117         (unqualified_namespace_lookup): Instead ignore them whilst
4118         searching through scopes and namespaces.
4119         * decl2.c (do_nonmember_using_decl): If a using declaration
4120         specifies an anticipated built-in function, mark it as no longer
4121         anticipated in that scope.
4122         (ambiguous_decl):  Avoid resolving to an anticipated decl.
4123         * lex.c (do_scoped_id): Fail to find an identifier in the global
4124         namespace if its still anticipated.
4125
4126 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
4127
4128         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
4129         * cp-tree.h (cp_make_lang_type): Rename.
4130         * lex.c (cp_make_lang_type): Rename.
4131         (make_aggr_type): Update.
4132         * tree.c (init_tree): Don't set make_lang_type_fn.
4133
4134 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
4135
4136         PR c++/6073
4137         * class.c (finish_struct_1): Update static field's DECL_MODE even
4138         if its type is a variant of t.
4139
4140 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
4141
4142         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
4143         * cp-tree.h (cxx_insert_default_attributes): New.
4144         * decl.c (insert_default_attributes): Rename.
4145
4146 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
4147
4148         PR c++/4884
4149         * call.c (build_op_delete_call): Allow for the fact the placement
4150         may be a COMPOUND_EXPR.
4151
4152 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
4153
4154         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
4155         * cp-tree.h (init_cplus_expand): Remove.
4156         (cxx_expand_expr): New.
4157         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
4158         fix prototype.
4159         (init_cplus_expand): Remove.
4160         * lex.c (cxx_init): Don't call init_cplus_expand.
4161
4162 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
4163
4164         PR c++/4884.
4165         * init.c (build_new_1): Allow for the fact the result of
4166         build_function_call may be a COMPOUND_EXPR.
4167
4168 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
4169
4170         PR c++/5682
4171         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
4172         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
4173         (dfs_skip_nonprimary_vbases_markedp): Remove.
4174         * search.c (get_shared_vbase_if_not_primary): Remove.
4175         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
4176         (dfs_skip_nonprimary_vbases_markedp): Remove.
4177         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
4178         (dfs_marked_real_bases_queue_p): Likewise.
4179
4180 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
4181
4182         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
4183         * cp-tree.h (cxx_mark_tree): New.
4184         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
4185
4186 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
4187
4188         * cp-tree.h (cxx_maybe_build_cleanup): New.
4189         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
4190         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
4191         * tree.c (build_target_expr): Update.
4192         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
4193
4194 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
4195
4196         * decl2.c (cxx_decode_option): Handle -E.
4197         * lang-specs.h (default_compilers): Preprocess with cc1plus.
4198         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
4199
4200 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
4201
4202         PR c++/6037
4203         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
4204
4205 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
4206
4207         * error.c (dump_type): Be careful about implicit typenames.
4208
4209 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
4210
4211         PR C++/3656
4212         * semantics.c (finish_base_specifier): Handle erronous base
4213         classes.
4214
4215 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
4216
4217         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
4218         REAL_IS_NOT_DOUBLE.
4219
4220 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
4221
4222         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
4223         an index into the vtable_entry array regardless of
4224         TARGET_PTRMEMFUNC_VBIT_LOCATION.
4225
4226 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
4227
4228         * tree.c (cp_cannot_inline_tree_fn): Same.
4229
4230 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
4231
4232         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
4233         insert_block, getdecls, global_bindings_p): New.
4234
4235 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
4236
4237         PR c++/4361
4238         * mangle.c (struct globals) Add internal_mangling_p member.
4239         (write_template_param): Do internal mangling, if needed.
4240         (mangle_conv_op_name_for_type): Request internal mangling.
4241
4242 2002-03-20  Jason Merrill  <jason@redhat.com>
4243
4244         PR c++/2136
4245         * init.c (build_delete): Check access for a member op delete here.
4246         * decl2.c (delete_sanity): Not here.
4247
4248 2002-03-19  Jason Merrill  <jason@redhat.com>
4249
4250         PR c++/5118
4251         * class.c (get_vfield_name): Use the constructor_name.
4252
4253 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
4254
4255         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
4256         * cp-tree.h (lang_printable_name): Rename.
4257         * error.c (lang_decl_name): Use new hook.
4258         * lex.c (cxx_init): Remove old hook.
4259         * pt.c (tsubst_decl): Use new hook.
4260         * tree.c (lang_printable_name): Rename.
4261
4262 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
4263
4264         PR c++/3882
4265         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
4266         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
4267         only after recording the declaration.
4268
4269 2002-03-18  Jason Merrill  <jason@redhat.com>
4270
4271         PR c++/2039
4272         * init.c (resolve_offset_ref): Hand off to build_component_ref.
4273
4274         PR c++/4222, c++/5995
4275         * call.c (build_over_call): Fix empty class logic.
4276
4277         PR c++/3870
4278         * cp-tree.h (struct saved_scope): Add last_parms field.
4279         * decl.c (maybe_push_to_top_level): Save last_function_parms.
4280         (pop_from_top_level): Restore it.
4281
4282         PR c++/4377
4283         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
4284         NON_LVALUE_EXPRs.
4285
4286         PR c++/4003
4287         * pt.c (tsubst_friend_function): Use decl_namespace_context.
4288
4289         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
4290         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
4291         type with a nontrivial destructor.
4292
4293 2002-03-17  Jason Merrill  <jason@redhat.com>
4294
4295         PR c++/4460
4296         * class.c (build_base_path): Virtual base layout is fixed in
4297         in-charge [cd]tors.
4298
4299 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
4300
4301         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
4302         * parse.y (yyparse): Remove macro.
4303
4304 2002-03-17  Jason Merrill  <jason@redhat.com>
4305
4306         PR c++/5757
4307         * init.c (build_new_1): Pass the right pointer to op delete.
4308
4309 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
4310
4311         PR c++/4361
4312         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
4313         conversion operators go.
4314         (struct lang_decl_flags): Add template_conv_p and unused
4315         bitfields.
4316         (DECL_TEMPLATE_CONV_FN_P): New macro.
4317         * call.c (build_user_type_conversion_1): Don't check second type
4318         conversion of overload set first.
4319         * class.c (add_method): Make sure templated conversion operators
4320         all end up on slot 2.
4321         * lex.c (do_identifier): A conversion operator token might be
4322         satisfied by a templated conversion operator.
4323         * pt.c (check_explicit_specialization): Use
4324         CLASSTYPE_FIRST_CONVERSION_SLOT.
4325         (template_parm_this_level_p): New function.
4326         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
4327         * search.c (lookup_fnfields_1): Template conversions will be on
4328         the first slot.
4329         * typeck.c (build_component_ref): Preserve the type of an
4330         conversion operator name on the overload type.
4331         (build_x_function_call): Retrieve the conversion operator name.
4332
4333 2002-03-15  Richard Henderson  <rth@redhat.com>
4334
4335         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
4336
4337 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
4338
4339         * cp-tree.h (CLEANUP_DECL): Remove.
4340         (CLEANUP_EXPR): Likewise.
4341         * decl.c (destroy_local_var): Simplify.
4342         (maybe_build_cleanup): Tidy.
4343         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
4344         * semantics.c (cp_expand_stmt): Likewise.
4345         * cp/tree.c (cp_statement_code_p): Likewise.
4346
4347 2002-03-15  Jason Merrill  <jason@redhat.com>
4348
4349         PR c++/5857
4350         * decl.c (duplicate_decls): Use merge_types instead of common_type.
4351         * typeck.c (common_type): Just hand off to
4352         type_after_usual_arithmetic_conversions and
4353         composite_pointer_type.
4354         (merge_types): New fn.
4355         (commonparms): Use it instead of common_type.
4356         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
4357         (composite_pointer_type): Also handle attributes.
4358         * cp-tree.h: Declare merge_types.
4359
4360         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
4361         variables.
4362         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
4363
4364 2002-03-14  Richard Henderson  <rth@redhat.com>
4365
4366         * decl.c: Include c-pragma.h.
4367         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
4368         * Make-lang.in: Update dependencies.
4369
4370 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
4371
4372         PR c++/5908
4373         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
4374         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
4375
4376 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
4377
4378         * mangle.c (write_builtin_type): Handle 128-bit integers even if
4379         they are not a standard integer type.
4380
4381 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
4382
4383         * cp-tree.h (init_init_processing): Remove declaration.
4384         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
4385         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
4386
4387 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4388
4389         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
4390         Define.
4391         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
4392         tree_code_length.
4393         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
4394         cplus_tree_code_name): Delete.
4395         (cxx_init): Don't call add_c_tree_codes, instead set
4396         lang_unsafe_for_reeval.  Don't try to copy into the various
4397         tree_code arrays.
4398
4399 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
4400
4401         PR c++/5659
4402         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
4403         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
4404         definitions.
4405
4406 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
4407
4408         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
4409         DR209 is now not a defect.
4410         * cp-tree.h (skip_type_access_control): Remove.
4411         * decl.c (grokdeclarator): Do type access control for friend
4412         declarations.
4413         * semantics.c (decl_type_access_control): Don't reset
4414         current_type_lookups.
4415         (save_type_access_control): Always save the lookups.
4416         (skip_type_access_control): Remove.
4417         (finish_class_definition): Don't change type_lookups.
4418
4419 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
4420
4421         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
4422         It is incorrect.
4423         * typeck.c (build_static_cast): Compare non-qualified types
4424         with pointer to member conversions.
4425
4426 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
4427             Daniel Berlin  <dan@dberlin.org>
4428
4429         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
4430         (cxx_get_alias_set): Use it.
4431
4432 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4433
4434         * cp-tree.h (stabilize_expr): Prototype.
4435
4436 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4437
4438         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
4439         conditional return void.
4440
4441 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
4442
4443         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
4444         * cp-tree.h (cxx_unsave): New.
4445         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
4446         (init_tree): Update.
4447
4448 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4449
4450         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
4451         explicit sizeof/sizeof.
4452         * decl2.c (cxx_decode_option): Likewise.
4453         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
4454
4455 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
4456
4457         PR c++/775
4458         * decl.c (lookup_tag): Only reject enum/class mismatch, not
4459         class/union mismatch.
4460         * parse.y (check_class_key): New function.
4461         (structsp): Call it.
4462
4463 2002-03-01  Michael Matz  <matz@suse.de>
4464
4465         * typeck.c (cp_pointer_int_sum): Complete inner type which is
4466         used later by size_in_bytes().
4467
4468 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
4469
4470         * cp-tree.h:  Require __GNUC__ to be #defined.
4471         (build_init):  Add missing prototype.
4472
4473 2002-03-01  Jason Merrill  <jason@redhat.com>
4474
4475         * except.c: Don't include decl.h or obstack.h.  Do include
4476         tree-inline.h.
4477         (build_throw): Destroy temporaries from the thrown
4478         expression before calling __cxa_throw.  Construct a thrown
4479         temporary directly into the exception object.
4480         (stabilize_throw_expr): New function.
4481         (wrap_cleanups_r): New function.
4482         * tree.c (stabilize_expr): New function.
4483         * init.c (build_init): New function.
4484         * Make-lang.in (cp/except.o): Adjust .h deps.
4485
4486 2002-02-28  Jason Merrill  <jason@redhat.com>
4487
4488         * search.c (lookup_base_r): Don't clear is_non_public just because
4489         we found a friendly scope.
4490
4491         * decl.c (finish_function): Only warn about missing return
4492         statement with -Wreturn-type.
4493
4494 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
4495
4496         * class.c (build_clone): Update.
4497         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
4498         * cp-tree.h (cxx_dup_lang_specific_decl): New.
4499         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
4500         (copy_decl): Update.
4501         * method.c (make_thunk): Update.
4502
4503 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
4504
4505         * decl2.c: Delete traditional-mode-related code copied from
4506         the C front end but not used, or used only to permit the
4507         compiler to link.
4508
4509 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
4510
4511         PR c++/4093
4512         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
4513         to void.
4514
4515 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
4516
4517         PR other/5746
4518         * semantics.c (finish_switch_cond): Don't call get_unwidened
4519         if error_mark_node.
4520
4521 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
4522
4523         PR c++/2645, DR 295
4524         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
4525         tf_keep_type_decl.
4526         (make_typename_type): Use tsubst_flags_t.
4527         * decl.c (make_typename_type): Adjust. Return non-artificial
4528         TYPE_DECLs, if required.
4529         (grokdeclarator): Simplify CVR qualification handling. Allow bad
4530         qualifiers on typedef types.
4531         * decl2.c (handle_class_head): Adjust make_typename_type call.
4532         * parse.y (nested_name_specifier): Likewise.
4533         (typename_sub0): Likewise.
4534         (typename_sub1): Likewise.
4535         * pt.c (convert_template_argument): Adjust make_typename_type
4536         return value.
4537         (tsubst): Adjust cp_build_qualified_type_real calls.
4538         (check_cv_quals_for_unify): Cope with allowing bad qualifications
4539         on template type parms.
4540         (instantiate_decl): Recheck substitutions to give warnings on bad
4541         qualifications.
4542         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
4543
4544 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
4545
4546         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
4547
4548         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
4549         unless DECL_ALWAYS_INLINE.
4550
4551 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
4552
4553         * typeck.c (cp_pointer_int_sum): Renamed from
4554         pointer_int_sum, call pointer_int_sum.
4555
4556 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
4557
4558         * decl.c (duplicate_decls): Return 0 if issued error about
4559         redeclaration.
4560
4561 2002-02-19  Jason Merrill  <jason@redhat.com>
4562
4563         ABI change: Mangle `void (A::*)() const' as
4564         M1AKFvvE, not MK1AFvvE.
4565         * mangle.c (write_function_type): Write cv-quals for member
4566         function type here.
4567         (write_pointer_to_member_type): Not here.
4568
4569 2002-02-18  Jason Merrill  <jason@redhat.com>
4570
4571         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
4572         (do_decl_instantiation): Likewise.
4573
4574 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4575
4576         PR c++/5685
4577         * decl.c (duplicate_decls): Make warning unconditional
4578         if duplicate default argument declarations are present.
4579
4580 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
4581
4582         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
4583         shortening.
4584
4585 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
4586
4587         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
4588         remove incorrect comment. Move #if 0'd code to common path. Use
4589         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
4590
4591 2002-02-13  Jason Merrill  <jason@redhat.com>
4592
4593         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
4594         (finish_function): Don't warn if current_function_returns_null.
4595
4596         * typeck2.c (digest_init): Do handle values of vector type.
4597
4598         * typeck2.c (digest_init, process_init_constructor): Treat vectors
4599         like arrays.
4600
4601 2002-02-11  Jason Merrill  <jason@redhat.com>
4602
4603         * parse.y (reserved_declspecs): Don't handle attributes.
4604         (reserved_typespecquals): Handle them here.
4605         * Make-lang.in (parse.c): Adjust expected conflicts.
4606
4607 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
4608
4609         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
4610         instead of compstmt.
4611         (compstmt_or_stmtexpr): Renamed from compstmt.
4612         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
4613
4614 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
4615
4616         Rename instantiate_type_flags to tsubst_flags_t & expand use.
4617         * cp-tree.h (instantiate_type_flags): Rename to ...
4618         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
4619         add tf_warning flag.
4620         (instantiate_type): Adjust prototype.
4621         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
4622         do_type_instantiation, cp_build_qualified_type_real): Likewise.
4623         cp_build_qualified_type: Adjust.
4624         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
4625         tf_*.
4626         * call.c (standard_conversion): Rename itf_* to tf_*.
4627         (reference_binding): Likewise.
4628         (convert_like_real): Likewise.
4629         * cvt.c (cp_convert_to_pointer): Likewise.
4630         (convert_to_reference): Likewise.
4631         * decl.c (lookup_namespace_name): Use tf_* flags.
4632         (make_typename_type): Likewise.
4633         (grokdeclarator): Likewise.
4634         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
4635         (coerce_template_template_parms, convert_template_argument,
4636         coerce_template_parms, maybe_get_template_decl_from_type_decl,
4637         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
4638         instantiate_class_template, tsubst_template_arg_vector,
4639         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
4640         tsubst_decl, tsubst_arg_types, tsubst_function_type,
4641         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
4642         instantiate_template, fn_type_unification,
4643         resolve_overloaded_unification, verify_class_unification,
4644         unify, get_bindings_real, do_type_instantiation,
4645         regenerate_decl_from_template, instantiate_decl,
4646         tsubst_initializer_list, tsubst_enum,
4647         get_mostly_instantiated_function_type,
4648         invalid_nontype_parm_type_p): Likewise.
4649         * tree.c (cp_build_qualified_type_real): Likewise.
4650         * typeck.c (build_binary_op): Rename itf_* to tf_*.
4651         (build_ptrmemfunc): Likewise.
4652         (convert_for_assignment): Likewise.
4653
4654 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
4655
4656         PR c++/109
4657         * decl.c (grokdeclarator): Allow friend declarations from
4658         dependent types.
4659         * decl2.c (handle_class_head): Don't push into template parm contexts.
4660         * pt.c (push_template_decl_real): Template parm contexts are never
4661         being defined.
4662
4663 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
4664
4665         * class.c: Include target.h.
4666         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
4667         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
4668         bit-field layout.
4669         * Make-lang.in: Adjust deps.
4670
4671 2002-02-05  Jason Merrill  <jason@redhat.com>
4672
4673         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
4674
4675 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
4676
4677         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
4678         (finish_switch_cond): Set SWITCH_TYPE.
4679
4680 2002-02-04  Richard Henderson  <rth@redhat.com>
4681
4682         * method.c (use_thunk): Always initialize the block tree.  Reindent.
4683         * semantics.c (expand_body): Emit thunks after function, not before.
4684
4685 2002-02-04  Jason Merrill  <jason@redhat.com>
4686
4687         * decl.c (start_function): Call cplus_decl_attributes immediately
4688         after grokdeclarator.
4689
4690         * decl.c (start_function): Combine DECL_RESULT handling code.
4691
4692 2002-02-03  Jason Merrill  <jason@redhat.com>
4693
4694         * xref.c: Remove.
4695         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
4696         (cp/xref.o): Remove dependencies.
4697         * class.c (finish_struct_1, check_methods): Don't call xref fns.
4698         (finish_struct_1): Likewise.
4699         * friend.c (make_friend_class): Likewise.
4700         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
4701         * spew.c (read_process_identifier): Likewise.
4702
4703 2002-02-01  Jason Merrill  <jason@redhat.com>
4704
4705         PR c++/4872
4706         * decl.c (finish_function): Warn about a non-void function with
4707         no return statement and no abnormal exit.
4708         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
4709         (current_function_returns_abnormally): New macro.
4710         * call.c (build_call): Set it.
4711
4712         * typeck.c (build_component_ref): Always complain about offsetof
4713         constructs on non-PODs.  Only make it an error for members of
4714         virtual bases.
4715
4716         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
4717         (dump_function_decl): Always dump parms.
4718
4719         * decl2.c (finish_static_data_member_decl): Complain about a local
4720         class with a static data member.
4721
4722         PR c++/4286
4723         * search.c (lookup_field_1): Don't xref a static data member
4724         just because we looked it up.
4725
4726 2002-01-31  Jason Merrill  <jason@redhat.com>
4727
4728         * Make-lang.in (parse.c): Handle .output file.
4729
4730         PR c++/3395
4731         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
4732         not TREE_TYPE.
4733         * semantics.c (finish_class_definition): Adjust.
4734
4735         Allow attributes in parms and casts.
4736         * parse.y (named_parm): Don't strip attrs.
4737         (declmods): Remove 'attributes' production.
4738         (nonempty_cv_qualifiers): Accept attributes.
4739         (ATTRIBUTE): Give precedence.
4740         * decl.c (groktypename): Handle attributes.
4741         (grokparms): Likewise.
4742
4743 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
4744
4745         * decl2.c (cxx_decode_option): Pass 0 as last argument to
4746         cpp_handle_option.
4747         * lang-specs.h: Use cpp_unique_options instead of cpp_options
4748         when used together with cc1_options.
4749
4750 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
4751
4752         PR c++/5132
4753         * typeck2.c (digest_init): Make sure non-array core type is
4754         instantiated.
4755         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
4756         constructor, rather than build a new one.
4757         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
4758         PURPOSE of constructor elts.
4759
4760 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
4761
4762         * Make-lang.in (parse.c): Adjust expected number of
4763         shift-reduce conflicts.
4764         (decl.o): Depend on diagnostic.h.
4765         * decl.c: Include diagnostic.h.
4766         (grokdeclarator): Check for null pointer.
4767         (finish_function): Don't abort when
4768         current_binding_level->parm_flag != 1, if errors have
4769         occurred; throw away the statement tree and extra binding
4770         levels, and continue.
4771         * lex.c (note_list_got_semicolon): Check for null pointer.
4772         * method.c (hack_identifier): Just return error_mark_node if
4773         value is error_mark_node.
4774         * parse.y (primary: TYPEID(type_id)): No need to use
4775         TYPE_MAIN_VARIANT here.
4776         (handler_seq): Accept an empty list of catch clauses and
4777         generate a fake handler block to avoid later crashes.
4778         (ansi_raise_identifier): Accept the error token too.
4779         * semantics.c (begin_class_definition,
4780         finish_class_definition): Check for error_mark_node.
4781
4782 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
4783
4784         * typeck2.c (friendly_abort): Delete definition.
4785         * cp-tree.h (friendly_abort): Don't prototype.
4786         (my_friendly_assert): Use fancy_abort.
4787
4788 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4789
4790         * cp-tree.h (my_friendly_abort): Remove.
4791
4792 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
4793
4794         * spew.c (pending_inlines, pending_inlines_tail,
4795         processing_these_inlines): Make static.
4796         (mark_pending_inlines): Remove static.
4797         (begin_parsing_inclass_inline): If in function, save pi
4798         for GC to cp_function_chain->unparsed_inlines instead.
4799         (process_next_inline): Likewise.
4800         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
4801         (mark_pending_inlines): Add prototype.
4802         * decl.c (spew_debug): Remove unused extern.
4803         (mark_lang_function): Call mark_pending_inlines.
4804
4805 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4806
4807         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
4808         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
4809         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
4810         Change my_fancy_abort() to abort().
4811
4812 2002-01-23  Jason Merrill  <jason@redhat.com>
4813
4814         PR c++/5453
4815         * class.c (fixed_type_or_null): Fix thinko.
4816
4817         PR c++/3331
4818         * init.c (resolve_offset_ref): Use build_indirect_ref.
4819
4820         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
4821
4822 2002-01-22  Jason Merrill  <jason@redhat.com>
4823
4824         * parse.y (function_body): Suppress the block for the outermost
4825         curly braces.
4826         * decl.c (pushdecl): Don't try to skip it.
4827         (begin_function_body): Keep the block we create, not the next one.
4828         * init.c (emit_base_init): Don't mess with keep_next_level.
4829
4830         * class.c (build_base_path): Tweak formatting.
4831
4832 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
4833
4834         Fix regression introduced with patch for c++/775
4835         * parse.y (class_head_defn): Check for template specializations
4836         with a different class-key.
4837
4838 2002-01-17  Jason Merrill  <jason@redhat.com>
4839
4840         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
4841         (begin_function_body): Call them and keep_next_level.
4842         * init.c (emit_base_init): Call keep_next_level.
4843         * semantics.c (setup_vtbl_ptr): Lose.
4844         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
4845         (vtbls_set_up_p): Lose.
4846         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
4847         * method.c (do_build_copy_constructor): Likewise.
4848         (synthesize_method): Call finish_mem_initializers.
4849         * parse.y (nodecls): Likewise.
4850
4851         * error.c (dump_type_suffix): Print the exception specs before
4852         recursing.
4853         (dump_function_decl): Here, too.
4854
4855         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
4856
4857 2002-01-10  Ira Ruben   <ira@apple.com>
4858
4859         PR c++/907
4860         * decl.c (start_method): Handle attrlist.
4861
4862 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
4863
4864         * decl2.c (max_tinst_depth): Increase default limit to 500.
4865
4866 2002-01-10  Graham Stott  <grahams@redhat.com>
4867
4868         * spew.c (YYCHAR): Uppercase macro parameter and add
4869         parenthesis.
4870         (YYCODE): Likewise.
4871         (NAME): Uppercase macro parameter.
4872
4873 2002-01-09  Graham Stott  <grahams@redhat.com>
4874
4875         * decl.h (grokdeclarator): Wrap long line.
4876
4877         * semantics.c (FINISH_COND): Uppercase macro paramaters and
4878         add parenthesis.
4879
4880 2002-01-08  Graham Stott  <grahams@redhat.com>
4881
4882         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
4883         (PALLOC): Uppercase macro parameter and whitespace.
4884         (SALLOC): Uppercase macro parameter.
4885         (SFREE): Uppercase macros parameter, add parenthese and
4886         whitespace.
4887         (STREQL): Uppercase macro parameter and whitespace.
4888         (STRNEQ): Likewise.
4889         (STRLSS): Likewise.
4890         (STRLEQ): Likewise.
4891         (STRGTR): Likewise.
4892         (STRGEQ): Likewise.
4893
4894         * call.c (convert_like): Add parenthesis and wrap.
4895         (convert_like_with_context): Likewise.
4896         (ICS_RANK): Whitespace.
4897         (NEED_TEMPORARY_P): Remove parenthesis.
4898
4899         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
4900         whitespace.
4901         (VTT_MARKED_BINFO_P): Likewise.
4902
4903         * decl.c (BINDING_LEVEL): Add parenthesis.
4904         (DEF_OPERATOR): Likewise.
4905
4906         * mangle.c (MANGLE_TRACE): Add parenthesis.
4907         (MANGLE_TRACE_TREE): Likewise.
4908         (write_signed_number): Likewise.
4909         (write_unsigned_number): Likewise.
4910
4911         * pt.c (ccat): Uppercase macro parameter.
4912         (cat): Likewise
4913
4914         * search.c (SET_BINFO_ACCESS): Add parenthesis.
4915
4916 2002-01-07  Jason Merrill  <jason@redhat.com>
4917
4918         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
4919         to pedwarn.
4920
4921         PR c++/3536
4922         * method.c (make_thunk): If !flag_weak, give the thunk the
4923         function's linkage.
4924         (use_thunk): Here, too.
4925
4926 2002-01-07  Graham Stott  <grahams@redhat.com>
4927
4928         * error.c: Update copyright date.
4929         (print_scope_operator): Add parenthesis.
4930         (print_left_paren): Likewise.
4931         (print_right_paren): Likewise.
4932         (print_left_bracket): Likewise.
4933         (print_right_bracket): Likewise.
4934         (print_template_argument_list_start): Likewise.
4935         (print_template_argument_list_end): Likewise.
4936         (print_non_consecutive_character): Likewise.
4937         (print_tree_identifier): Likewise.
4938         (print_identifier): Likewise.
4939         (NEXT_CODE): Uppercase macro parameter.
4940         (ident_fndecl): Delete unused.
4941         (GLOBAL_THING): Likewise.
4942
4943 2002-01-06  Graham Stott  <grahams@redhat.com>
4944
4945         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
4946         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
4947         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
4948         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
4949         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
4950         (C_IS_RESERVED_WORD): Uppercase macro parameter.
4951         (C_RID_YYCODE) Likewise.
4952         (ptrmem_cst): Use rtx.
4953         (LOCAL_BINDING_P): Add whitespace.
4954         (INHERITED_VALUE_BINDING_P): Likewise.
4955         (BINDING_SCOPE): Wrap long line.
4956         (BINDING_HAS_LEVEL_P): Remove parenthesis.
4957         (BINDING_VALUE): Wrap long line.
4958         (BINDING_TYPE): Whitespace.
4959         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
4960         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
4961         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
4962         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
4963         (same_type_p): Uppercase macro parameters.
4964         (same_type_ignoring_top_level_qualifiers_p): Likewise.
4965         (OVL_FUNCTION): Wrap long line.
4966         (OVL_CHAIN): Whitespace.
4967         (OVL_CURRENT): Add parenthesis and whitespace.
4968         (OVL_NEXT): Whitespace.
4969         (OVL_USED): Likewise.
4970         (IDENTIFIER_TYPE_VALUE): Likewise.
4971         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
4972         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
4973         (LANG_ID_FIELD): Whitespace.
4974         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
4975         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
4976         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
4977         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
4978         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
4979         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
4980         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
4981         (IDENTIFIER_VIRTUAL_P): Likewise.
4982         (IDENTIFIER_OPNAME_P): Likewise.
4983         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
4984         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
4985         (C_SET_EXP_ORIGINAL_CODE): Likewise.
4986         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
4987         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
4988         (IS_AGGR_TYPE): Uppercase macro parameter.
4989         (CLASS_TYPE_P): Likewise.
4990         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
4991         (IS_AGGR_TYPE_2): Whitespace.
4992         (TAGGED_TYPE_P): Uppercase macro parameter.
4993         (TYPE_BUILT_IN): Whitespace.
4994         (TYPE_FOR_JAVA): Likewise.
4995         (FUNCTION_ARG_CHAIN): Remove parenthesis.
4996         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
4997         (FUNCTION_FIRST_USER_PARAM): Likewise.
4998         (PROMOTES_TO_AGGR_TYPE): Whitespace.
4999         (DERIVED_FROM_P): Add parenthesis and wrap.
5000         (UNIQUELY_DERIVED_FROM_P): Likewise.
5001         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
5002         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
5003         (CLASSTYPE_USE_TEMPLATE): Whitespace.
5004         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
5005         (TYPE_GETS_DELETE): Add parenthesis.
5006         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
5007         (TYPE_HAS_ASSIGN_REF): Likewise,
5008         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
5009         (TYPE_HAS_INIT_REF): Likewise.
5010         (TYPE_HAS_CONST_INIT_REF): Likewise.
5011         (TYPE_BEING_DEFINED): Likewise.
5012         (TYPE_LANG_SPECIFIC): Likewise.
5013         (CLASSTYPE_RTTI): Likewise.
5014         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
5015         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
5016         (TYPE_OVERLOADS_ARROW): Likewise.
5017         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
5018         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
5019         (CLASSTYPE_METHOD_VEC): Likewise.
5020         (CLASSTYPE_MARKED_N): Likewise.
5021         (CLASSTYPE_MARKED): Likewise.
5022         (CLASSTYPE_MARKED2): Likewise.
5023         (CLASSTYPE_MARKED3): Likewise.
5024         (CLASSTYPE_MARKED4): Likewise.
5025         (CLASSTYPE_MARKED5): Likewise.
5026         (CLASSTYPE_MARKED6): Likewise.
5027         (SET_CLASSTYPE_MARKED): Whitespace.
5028         (CLEAR_CLASSTYPE_MARKED): Likewise.
5029         (SET_CLASSTYPE_MARKED2): Likewise.
5030         (CLEAR_CLASSTYPE_MARKED2): Likewise.
5031         (SET_CLASSTYPE_MARKED3): Likewise.
5032         (CLEAR_CLASSTYPE_MARKED3): Likewise.
5033         (SET_CLASSTYPE_MARKED4): Likewise.
5034         (CLEAR_CLASSTYPE_MARKED4): Likewise.
5035         (SET_CLASSTYPE_MARKED5): Likewise.
5036         (CLEAR_CLASSTYPE_MARKED5): Likewise.
5037         (SET_CLASSTYPE_MARKED6): Likewise.
5038         (CLEAR_CLASSTYPE_MARKED6): Likewise.
5039         (CLASSTYPE_TAGS): Likewise.
5040         (CLASSTYPE_VSIZE): Likewise.
5041         (CLASSTYPE_VBASECLASSES): Likewise.
5042         (CANONICAL_BINFO): Add parenthesis.
5043         (CLASSTYPE_SIZE(NODE): Likewise.
5044         (CLASSTYPE_SIZE_UNIT): Likewise.
5045         (CLASSTYPE_ALIGN(NODE): Likewise.
5046         (CLASSTYPE_USER_ALIGN): Likewise.
5047         (TYPE_JAVA_INTERFACE): Likewise.
5048         (CLASSTYPE_PURE_VIRTUALS): Likewise.
5049         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
5050         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
5051         (CLASSTYPE_HAS_MUTABLE): Likewise.
5052         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
5053         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
5054         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
5055         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
5056         (CLASSTYPE_INTERFACE_ONLY): Likewise.
5057         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
5058         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
5059         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
5060         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
5061         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
5062         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
5063         (BINFO_UNSHARED_MARKED): Whitespace.
5064         (BINFO_MARKED): Whitespace and wrap.
5065         (SET_BINFO_MARKED): Likewise.
5066         (CLEAR_BINFO_MARKED): Likewise.
5067         (BINFO_VTABLE_PATH_MARKED): Likewise.
5068         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
5069         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
5070         (BINFO_SUBVTT_INDEX): Remove parenthesis.
5071         (BINFO_VPTR_INDEX): Likewise.
5072         (BINFO_PRIMARY_BASE_OF): Likewise,
5073         (CLASSTYPE_VFIELDS): Whitespace.
5074         (VF_DERIVED_VALUE): Wrap long line.
5075         (NAMESPACE_LEVEL): Whitespace.
5076         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
5077         (DEFARG_POINTER): Whitespace.
5078         (DECL_NEEDED_P): Remove parenthesis.
5079         (DECL_LANGUAGE): Whitespace.
5080         (SET_DECL_LANGUAGE): Add parenthesis.
5081         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
5082         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
5083         (DECL_IN_AGGR_P): Whitespace.
5084         (DECL_FRIEND_P): Likewise.
5085         (DECL_BEFRIENDING_CLASSES): Likewise.
5086         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
5087         (DECL_NONCONVERTING_P): Whitespace.
5088         (DECL_PURE_VIRTUAL_P): Likewise.
5089         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
5090         (DECL_PENDING_INLINE_INFO): Whitespace.
5091         (DECL_SORTED_FIELDS): Likewise.
5092         (DECL_DEFERRED_FN): Likewise.
5093         (DECL_TEMPLATE_INFO): Likewise.
5094         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
5095         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
5096         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
5097         (TMPL_ARGS_LEVEL): Likewise.
5098         (SET_TMPL_ARGS_LEVEL): Likewise.
5099         (INNERMOST_TEMPLATE_PARMS): Whitespace.
5100         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
5101         (INTEGRAL_CODE_P(CODE): Add parenthesis.
5102         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
5103         (TYPE_HAS_CONSTRUCTOR): Whitespace.
5104         (TREE_HAS_CONSTRUCTOR): Likewise.
5105         (TYPE_HAS_DESTRUCTOR): Likewise.
5106         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
5107         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
5108         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
5109         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
5110         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
5111         (TYPE_PTRMEMFUNC_P): Likewise.
5112         (TYPE_PTRMEMFUNC_FLAG): Likewise.
5113         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
5114         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
5115         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
5116         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
5117         (DECL_ACCESS): Whitespace.
5118         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
5119         (DECL_GLOBAL_DTOR_P): Likewise.
5120         (GLOBAL_INIT_PRIORITY): Likewise.
5121         (DECL_TEMPLATE_PARMS): Likewise.
5122         (DECL_TEMPLATE_RESULT): Likewise.
5123         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
5124         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
5125         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
5126         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
5127         (PRIMARY_TEMPLATE_P): Add parenthesis.
5128         (DECL_USE_TEMPLATE): Whitespace.
5129         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
5130         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
5131         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
5132         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
5133         (CALL_DECLARATOR_PARMS): Remove parenthesis.
5134         (CALL_DECLARATOR_QUALS): Likewise.
5135         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
5136         (TEMP_NAME_P): Wrap.
5137         (VFIELD_NAME_P): Likewise.
5138         (B_SET): Uppercase macro parameters and add parenthesis.
5139         (B_CLR): Likewise.
5140         (B_TST): Likewise.
5141         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
5142         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
5143         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
5144         (same_or_base_type_p): Likewise.
5145         (cp_deprecated): Likewise.
5146
5147 2002-01-05  Richard Henderson  <rth@redhat.com>
5148
5149         * semantics.c (expand_body): Revert last change.
5150
5151 2002-01-04  Jason Merrill  <jason@redhat.com>
5152
5153         PR c++/4122
5154         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
5155         lost primary.
5156
5157         * class.c (build_vtbl_initializer): Check for a lost primary
5158         before calculating the vtable entry to throw away.
5159
5160 2002-01-02  Jason Merrill  <jason@redhat.com>
5161
5162         * semantics.c (expand_body): Call outlining_inline_function when
5163         emitting an inline function out of line.
5164
5165 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5166
5167         PR c++/5116, c++/764 reversion
5168         * call.c (build_new_op): Revert the instantiations. They are
5169         incorrect.
5170
5171 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5172
5173         PR c++/5089
5174         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
5175
5176 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5177
5178         PR c++/3716
5179         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
5180         (tsubst, case POINTER_TYPE): Handle pmfs here.
5181         (tsubst, case OFFSET_TYPE): Check it is not an offset to
5182         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
5183
5184 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5185
5186         PR c++/35
5187         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
5188         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
5189         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
5190         PARM_DECL.
5191         (tsubst_template_parms): Break up loop statements.
5192         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
5193         parm PARM_DECLs don't get promoted.
5194
5195 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5196
5197         PR c++/5123
5198         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
5199         (build_x_function_call): Cope with a COMPONENT_REF containing a
5200         TEMPLATE_ID_EXPR.
5201
5202 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5203
5204         PR c++/5213
5205         * pt.c (convert_template_argument): Be more careful determining
5206         when RECORD_TYPE templates are or are not templates.
5207
5208 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5209
5210         PR c++/775
5211         * cp-tree.h (handle_class_head): Adjust prototype.
5212         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
5213         parameters. Use for all class heads.
5214         * parse.y (named_class_head_sans_basetype, named_class_head,
5215         named_complex_class_head_sans_basetype,
5216         named_class_head_sans_basetype_defn,
5217         unnamed_class_head): Remove.
5218         (class_head, class_head_apparent_template): Recognize class heads
5219         (class_head_decl, class_head_defn): New reductions. Process class
5220         heads.
5221         (structsp): Adjust class definition and class declaration
5222         reductions.
5223         (maybe_base_class_list): Give diagnostic on empty list.
5224
5225 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5226
5227         PR c++/4379
5228         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
5229         single non-static member.
5230         (unary_complex_lvalue): If it cannot be a pointer to member, don't
5231         make it so. Check it is not pointer to reference.
5232
5233 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5234
5235         PR c++/5132
5236         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
5237         are processing a template decl.
5238
5239 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5240
5241         PR c++/5116, c++/764
5242         * call.c (build_new_op): Make sure template class operands are
5243         instantiated. Simplify arglist construction.
5244
5245 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
5246
5247         * call.c (build_user_type_conversion_1): Use my_friendly_assert
5248         rather than if ... abort.
5249         * cvt.c (convert_to_reference): Likewise.
5250         * semantics.c (setup_vtbl_ptr): Likewise.
5251         * pt.c (lookup_template_class): Comment typo.
5252
5253 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
5254
5255         PR c++/5125
5256         * pt.c (push_template_decl_real): Make sure DECL has
5257         DECL_LANG_SPECIFIC.
5258
5259 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
5260
5261         PR c++/335
5262         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
5263         for non-reference fields.
5264         * typeck.c (require_complete_type): Use resolve_offset_ref).
5265
5266 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
5267
5268         PR c++/196
5269         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
5270
5271 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
5272
5273         PR c++/160
5274         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
5275         up. Don't stabilize_references when initializing a reference.
5276
5277 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5278
5279         * decl2.c (lang_f_options): Const-ify.
5280
5281 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
5282
5283         * config-lang.in (diff_excludes): Remove.
5284
5285 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
5286
5287         PR c++/90
5288         * typeck.c (build_function_call_real): Use original function
5289         expression for errors.
5290
5291 2001-12-18  Jason Merrill  <jason@redhat.com>
5292
5293         PR c++/3242
5294         * class.c (add_method): Do compare 'this' quals when trying to match a
5295         used function.  Don't defer to another used function.
5296
5297 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
5298
5299         * pt.c (instantiate_clone): Remove, fold into ...
5300         (instantiate_template): ... here. Simplify by removing mutual
5301         recursion.
5302         * typeck2.c (build_m_component_ref): Don't cv qualify the function
5303         pointed to by a pointer to function.
5304         * class.c (delete_duplicate_fields_1): Typo.
5305
5306 2001-12-18  Jason Merrill  <jason@redhat.com>
5307
5308         C++ ABI change: destroy value arguments in caller.
5309         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
5310         create an extra binding level for the parameters.
5311         * decl.c (store_parm_decls): Don't do parameter cleanups.
5312
5313 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
5314
5315         * call.c (build_new_method_call): Use '%#V'.
5316         * error.c (cv_to_string): Use V parameter to determine padding.
5317
5318 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
5319
5320         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
5321         spellings in messages.
5322
5323 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
5324
5325         * cp-tree.h: Delete #defines for cp_error, cp_warning,
5326         cp_pedwarn, and cp_compiler_error.
5327         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
5328         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
5329         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
5330         typeck2.c: Change calls to the above macros to use their
5331         language-independent equivalents: error, warning, pedwarn, and
5332         internal_error respectively.
5333
5334 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
5335
5336         * decl2.c (finish_file): Remove back_end_hook.
5337
5338 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
5339
5340         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
5341         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
5342         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
5343
5344 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
5345
5346         * lang-options.h: Use American spelling in messages.
5347
5348 2001-12-13  Jason Merrill  <jason@redhat.com>
5349
5350         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
5351
5352         Use cleanups to run base and member destructors.
5353         * init.c (push_base_cleanups): New function, split out from...
5354         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
5355         * decl.c (finish_destructor_body): Move vbase destruction code to
5356         push_base_cleanups.
5357         (begin_function_body, finish_function_body): New fns.
5358         (finish_function): Move [cd]tor handling and call_poplevel to
5359         finish_function_body.
5360         (pushdecl): Skip the new level.
5361         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
5362         (setup_vtbl_ptr): Call push_base_cleanups.
5363         * method.c (synthesize_method): Call {begin,end}_function_body.
5364         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
5365         * cp-tree.h: Declare new fns.
5366         * parse.y (function_body, .begin_function_body): New nonterminals.
5367         (fndef, pending_inline, function_try_block): Use function_body.
5368         (ctor_initializer_opt, function_try_block): No longer has a value.
5369         (base_init): Remove .set_base_init token.
5370         (.set_base_init, compstmt_or_error): Remove.
5371         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
5372
5373         * optimize.c (maybe_clone_body): Fix parameter updating.
5374
5375 2001-12-12  Jason Merrill  <jason@redhat.com>
5376
5377         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
5378         * semantics.c (genrtl_start_function): Don't pass
5379         parms_have_cleanups or push an extra binding level.
5380         (genrtl_finish_function): Lose cleanup_label cruft.
5381
5382         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
5383         (ctor_label): Remove.
5384         * semantics.c (finish_return_stmt): Lose ctor_label support.
5385         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
5386         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
5387         dtor_label.
5388
5389         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
5390         check for [cd]tors.
5391         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
5392
5393         * decl.c (finish_function): Check VMS_TARGET, not VMS.
5394
5395         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
5396         (end_cleanup_fn): And poplevel.
5397
5398         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
5399         if we're in a template.
5400
5401 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
5402
5403         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
5404         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
5405         THIS_NAME_P): Delete.
5406         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
5407         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
5408         with internal naming scheme.
5409         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
5410
5411 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
5412
5413         * decl.c (grokdeclarator): Deprecated implicit typename use.
5414
5415 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
5416
5417         PR g++/51
5418         * parse.y (frob_specs): Indicate it is a language linkage which
5419         contained the extern.
5420         * decl.c (grokdeclarator): Allow extern language linkage with
5421         other specifiers.
5422
5423 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
5424
5425         PR g++/72
5426         * decl.c (add_binding): Don't reject duplicate typedefs involving
5427         template parameters.
5428
5429 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
5430
5431         * parse.y, semantics.c: Similarly.
5432
5433 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
5434
5435         PR g++/87
5436         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
5437         (copy_args_p): Rename to ...
5438         (copy_fn_p): ... here.
5439         (grok_special_member_properties): New function.
5440         (grok_op_properties): Lose VIRTUALP parameter.
5441         (copy_assignment_arg_p): Remove.
5442         * call.c (build_over_call): Use copy_fn_p.
5443         * decl.c (grokfndecl): Reformat. Adjust call to
5444         grok_op_properties.
5445         (copy_args_p): Rename to ...
5446         (copy_fn_p): ... here. Reject template functions. Check for pass
5447         by value.
5448         (grok_special_member_properties): Remember special functions.
5449         (grok_ctor_properties): Don't remember them here, just check.
5450         (grok_op_properties): Likewise.
5451         (start_method): Call grok_special_member_properties.
5452         * decl2.c (grokfield): Likewise.
5453         (copy_assignment_arg_p): Remove.
5454         (grok_function_init): Don't remember abstract assignment here.
5455         * pt.c (instantiate_class_template): Call
5456         grok_special_member_properties.
5457         (tsubst_decl): Adjust grok_op_properties call.
5458
5459 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
5460
5461         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
5462         RID_TYPES_COMPATIBLE_P.
5463
5464 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5465
5466         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
5467         call to build_aggr_init.
5468         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
5469
5470 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
5471
5472         * parse.y: Replace uses of the string non-terminal with STRING.
5473         Don't perform string concatentaion here.
5474         (string): Remove non-terminal.
5475         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
5476
5477 2001-12-05  Jason Merrill  <jason@redhat.com>
5478
5479         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
5480         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
5481         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
5482         * pt.c (push_tinst_level): No longer static.
5483         * cp-tree.h: Declare them.
5484
5485         * init.c (resolve_offset_ref): Don't check access for the base
5486         conversion to access a FIELD_DECL.
5487
5488         * cp-tree.h (TYPE_REFFN_P): New macro.
5489         * decl.c (bad_specifiers): Check it, too.
5490
5491         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
5492         on the __*_type_info type if we haven't seen a definition.
5493
5494 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
5495
5496         * decl.c: Include c-common.h.
5497         (shadow_warning): Move to c-common.c.
5498
5499 Wed Dec  5 17:00:49 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5500
5501         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
5502
5503 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
5504
5505         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
5506
5507 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
5508
5509         PR g++/164
5510         * init.c (sort_base_init): Allow binfos to be directly specified.
5511         * method.c (do_build_copy_constructor): Explicitly convert to the
5512         base instance.
5513         (do_build_assign_ref): Likewise.
5514
5515 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
5516
5517         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
5518         declaration and initialization.
5519
5520 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
5521
5522         * typeck2.c: Remove leading capital from diagnostic messages, as
5523         per GNU coding standards.
5524
5525 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
5526
5527         PR c++/3394
5528         * decl.c (xref_basetypes): Handle attributes between
5529         'class' and name.
5530
5531 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
5532
5533         PR g++/3381
5534         * parse.y (named_complex_class_head_sans_basetype): Add new
5535         reduction.
5536         * Make-lang.in (parse.c): Adjust expected conflict count.
5537
5538 2001-12-03  Jason Merrill  <jason@redhat.com>
5539
5540         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
5541         immediate binfos for our virtual bases.
5542
5543 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
5544
5545         * call.c (build_java_interface_fn_ref): Similarly.
5546         * except.c (is_admissible_throw_operand): Similarly.
5547         * init.c (build_java_class_ref): Similarly.
5548         * xref.c (open_xref_file): Similarly.
5549
5550 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5551
5552         * class.c (finish_struct): Remove trailing periods from messages.
5553         * decl.c (check_tag_decl): Similarly.
5554         * lex.c (cxx_set_yydebug): Similarly.
5555         * typeck2.c (friendly_abort): Similarly.
5556
5557 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
5558
5559         PR c++/3048
5560         * cp-tree.h (ovl_member): Remove.
5561         * decl2.c (merge_functions): Handle extern "C" functions
5562         specially.
5563         * tree.c (ovl_member): Remove.
5564
5565 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
5566
5567         PR c++/4842
5568         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
5569         FUNCTION_DECL, as input.
5570         (mark_overriders): Remove.
5571         (warn_hidden): Rework for the new ABI.
5572
5573 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
5574
5575         PR c++/3471
5576         * call.c (convert_like_real): Do not build additional temporaries
5577         for rvalues of class type.
5578
5579 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
5580
5581         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
5582         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
5583         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
5584         (DERIVED_FROM_P): Likewise.
5585         (enum base_access): Renumber, add ba_quiet bit mask.
5586         (get_binfo): Remove.
5587         (get_base_distance): Remove.
5588         (binfo_value): Remove.
5589         (ACCESSIBLY_DERIVED_FROM_P): Remove.
5590         * call.c (standard_conversion): Use lookup_base.
5591         * class.c (strictly_overrides): Likewise.
5592         (layout_virtual_bases): Likewise.
5593         (warn_about_ambiguous_direct_bases): Likewise.
5594         (is_base_of_enclosing_class): Likewise.
5595         (add_vcall_offset_vtbl_entries_1): Likewise.
5596         * cvt.c (build_up_reference): Adjust comment.
5597         * init.c (build_member_call): Reformat.
5598         * search.c (get_binfo): Remove.
5599         (get_base_distance_recursive): Remove.
5600         (get_base_distance): Remove.
5601         (lookup_base_r): Tweak.
5602         (lookup_base): Add ba_quiet control. Complete the types here.
5603         (covariant_return_p): Use lookup_base.
5604         * tree.c (binfo_value): Remove.
5605         (maybe_dummy_object): Use lookup_base.
5606         * typeck.c (build_static_cast): Use lookup_base.
5607         (get_delta_difference): Likewise.
5608         * typeck2.c (binfo_or_else): Use lookup_base.
5609         (build_scoped_ref): Add back error_mark_check.
5610         (build_m_component_ref): Use lookup_base.
5611
5612 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
5613
5614         * Make-lang.in (c++.generated-manpages): New dummy target.
5615
5616 Tue Nov 27 09:03:47 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5617
5618         * Make-lang.in (cp-lang.o): Depends on c-common.h.
5619         * cp-lang.c (c-common.h): Include.
5620         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
5621         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
5622         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
5623
5624 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
5625
5626         * decl2.c (c_language): Move to c-common.c.
5627         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
5628         functions.
5629         (cxx_init): Update.
5630
5631 2001-11-26  Jason Merrill  <jason@redhat.com>
5632
5633         * call.c (joust): Remove COND_EXPR hack.
5634
5635 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
5636
5637         * search.c (lookup_base_r): Declare bk in variable declaration
5638         space.
5639
5640 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
5641
5642         PR g++/3145
5643         * class.c (build_vbase_pointer): Remove.
5644         (build_vbase_path): Remove.
5645         (build_base_path): New function.
5646         * cp-tree.h (base_access, base_kind): New enumerations.
5647         (build_base_path): Declare.
5648         (convert_pointer_to_real): Remove.
5649         (convert_pointer_to): Remove.
5650         (lookup_base): Declare.
5651         (convert_pointer_to_vbase): Remove.
5652         * call.c (build_scoped_method_call): Use lookup_base &
5653         build_base_path instead of convert_pointer_to_real,
5654         get_base_distance & get_binfo.
5655         (build_over_call): Likewise.
5656         * cvt.c (cp_convert_to_pointer): Likewise.
5657         (convert_to_pointer_force): Likewise.
5658         (build_up_reference): Likewise.
5659         (convert_pointer_to_real): Remove.
5660         (convert_pointer_to): Remove.
5661         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
5662         instead of convert_pointer_to_vbase & build_vbase_path.
5663         (emit_base_init): Use build_base_path instead of
5664         convert_pointer_to_real.
5665         (expand_virtual_init): Lose unrequired conversions.
5666         (resolve_offset_ref): Use lookup_base and build_base_path
5667         instead of convert_pointer_to.
5668         * rtti.c (build_dynamic_cast_1): Use lookup_base &
5669         build_base_path instead of get_base_distance & build_vbase_path.
5670         * search.c (get_vbase_1): Remove.
5671         (get_vbase): Remove.
5672         (convert_pointer_to_vbase): Remove.
5673         (lookup_base_r): New function.
5674         (lookup_base): New function.
5675         * typeck.c (require_complete_type): Use lookup_base &
5676         build_base_path instead of convert_pointer_to.
5677         (build_component_ref): Likewise.
5678         (build_x_function_call): Likewise.
5679         (get_member_function_from_ptrfunc): Likewise.
5680         (build_component_addr): Likewise.
5681         * typeck2.c (build_scoped_ref): Likewise.
5682
5683 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5684
5685         * cp-tree.h (CP_TYPE_QUALS): Removed.
5686         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
5687         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
5688         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
5689         * dump.c (cp_dump_tree): Use void* dump_info argument to match
5690         lang-hooks prototype.
5691         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
5692         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
5693         CP_TYPE_QUALS changed to cp_type_quals.
5694         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
5695         (CXX_C_OBJS): Remove c-dump.o.
5696
5697 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
5698
5699         PR c++/3637
5700         * pt.c (lookup_template_class): Ensure that all specializations
5701         are registered on the list corresponding to the most general
5702         template.
5703
5704 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
5705
5706         * call.c (non_reference): Add documentation.
5707         (convert_class_to_reference): Do not strip reference types
5708         from conversion operators.
5709         (maybe_handle_ref_bind): Simplify.
5710         (compare_ics): Correct handling of references.
5711
5712 2001-11-19  John Wilkinson <johnw@research.att.com>
5713
5714         * dump.c (dump_op): New function.
5715         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
5716         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
5717         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
5718
5719 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
5720
5721         PR4629
5722         * semantics.c (finish_sizeof): Make sure that expression created
5723         while processing a template do not have a type.
5724         (finish_alignof): Likewise.
5725         * typeck.c (c_sizeof): Likewise.
5726         (expr_sizeof): Likewise.
5727
5728 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
5729
5730         * lex.c (cxx_finish): Call c_common_finish.
5731         (finish_parse): Remove.
5732
5733 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5734
5735         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
5736         when displaying error message about missing array bounds.
5737
5738 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5739
5740         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
5741         CONST_CAST_EXPR.
5742         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
5743
5744 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
5745
5746         * cp-tree.h (print_class_statistics): Restore.
5747
5748 2001-11-15  Jason Merrill  <jason@redhat.com>
5749
5750         * method.c (use_thunk): Don't emit debugging information for thunks.
5751
5752         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
5753         * decl.c (make_typename_type): Handle getting a class template.
5754         * search.c (lookup_field_r): A class template is good enough for
5755         want_type.
5756
5757         * call.c (convert_like_real): Only use cp_convert for the bad part.
5758         (standard_conversion): Also allow bad int->enum.
5759         * typeck.c (ptr_reasonably_similar): Also allow functions to
5760         interconvert.  Pointers to same-size integers are reasonably
5761         similar.
5762
5763         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
5764         give it void type.
5765
5766 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
5767
5768         PR g++/3154
5769         * init.c (sort_base_init): Remove unreachable code.
5770         (expand_member_init): Adjust comment to reflect reality. Simplify
5771         and remove unreachable code.
5772
5773 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
5774
5775         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
5776         (cxx_init): Update prototype.
5777         * decl.c (init_decl_processing): Rename.  Move null node init
5778         to its creation time.
5779         * lex.c (cxx_init_options): Update.
5780         (cxx_init): Combine with old init_parse; also call
5781         cxx_init_decl_processing.
5782
5783 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
5784
5785         * decl.c (check_initializer): Try to complete the type of an
5786         array element before checking whether it's complete.  Don't
5787         complain about arrays with complete element types but an
5788         unknown size.
5789         (cp_finish_decl): Build the hierarchical constructor before
5790         calling maybe_deduce_size_from_array_init.
5791
5792 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
5793
5794         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
5795
5796 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
5797
5798         PR g++/4206
5799         * parse.y (already_scoped_stmt): Remove.
5800         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
5801
5802 2001-11-12  H.J. Lu <hjl@gnu.org>
5803
5804         * cvt.c (ocp_convert): Don't warn the address of a weak
5805         function is always `true'.
5806
5807 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
5808
5809         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
5810         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
5811         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
5812         * cp-tree.h (print_class_statistics): Remove.
5813         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
5814         cxx_print_identifier, cxx_set_yydebug): New.
5815         * lex.c (set_yydebug): Rename c_set_yydebug.
5816         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
5817         lang_print_xnode): Rename.
5818         * tree.c (print_lang_statistics): Rename.
5819
5820 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5821
5822         * class.c (dump_array): Fix format specifier warning.
5823
5824 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
5825
5826         * cp-lang.c (LANG_HOOKS_NAME): Override.
5827         (struct lang_hooks): Constify.
5828         * lex.c (cxx_init_options): Update.
5829         (lang_identify): Remove.
5830         * parse.y (language_string): Remove.
5831
5832 2001-11-08  Andreas Franck  <afranck@gmx.de>
5833
5834         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
5835         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
5836         suggested by autoconf.
5837         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
5838         (c++.install-common): Use the transformed target alias names.
5839
5840 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
5841
5842         * Make-lang.in: Update.
5843         * cp-lang.c: Include langhooks-def.h.
5844
5845 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5846
5847         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
5848
5849 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5850
5851         * lex.c (copy_lang_type): Add static prototype.
5852
5853 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5854
5855         * pt.c (unify): Handle SCOPE_REF.
5856
5857 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
5858
5859         * tree.c (cp_copy_res_decl_for_inlining): Adjust
5860         DECL_ABSTRACT_ORIGIN for the return variable.
5861
5862 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
5863
5864         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
5865
5866 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
5867
5868         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
5869         semantics.c, spew.c: Fix spelling errors.
5870
5871 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5872
5873         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
5874
5875 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
5876
5877         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
5878         pop_everything.
5879
5880 Tue Oct 23 14:00:20 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5881
5882         * cp-lang.c (cxx_get_alias_set): New function.
5883         Point LANG_HOOKS_GET_ALIAS_SET to it.
5884
5885 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5886
5887         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
5888         * cp-tree.h (make_unbound_class_template): Prototype new function.
5889         * decl.c (make_unbound_class_template): New function.
5890         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
5891         * error.c (dump_type): Likewise.
5892         * mangle.c (write_type): Likewise.
5893         * parse.y (template_parm): Likewise.
5894         (template_argument): Use make_unbound_class_template.
5895         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
5896         (tsubst): Likewise.
5897         (tsubst_copy): Likewise.
5898         (unify): Likewise.
5899         * tree.c (walk_tree): Likewise.
5900         * typeck.c (comptypes): Likewise.
5901
5902 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5903
5904         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
5905         extra calls into fewer ones.
5906
5907 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
5908
5909         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
5910         Warn when merging inline with attribute noinline.
5911         (start_decl, start_function): Warn if inline and attribute
5912         noinline appear in the same declaration.
5913
5914 2001-10-16  H.J. Lu <hjl@gnu.org>
5915
5916         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
5917         for tree checking disabled.
5918
5919 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
5920
5921         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
5922         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
5923
5924 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
5925
5926         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
5927         (unify): Only handle MINUS_EXPR specially if the above flag is set
5928         and the subtracted constant is 1.  Clear the flag on recursive calls.
5929         Set it when unifying the maximum value in an INTEGER_TYPE's range.
5930
5931 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
5932
5933         * decl.c (bad_specifiers): Don't allow exception specifications
5934         on any typedefs.
5935
5936 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
5937
5938         * cp/lex.c (init_cp_pragma): Similarly.
5939
5940 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5941
5942         * pt.c (lookup_template_class): Build complete template arguments
5943         for BOUND_TEMPLATE_TEMPLATE_PARM.
5944
5945 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5946
5947         * cp-tree.h (TYPE_BINFO): Update comment.
5948         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
5949         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
5950         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
5951         (copy_type): Prototype new function.
5952         * lex.c (copy_lang_decl): Gather tree node statistics.
5953         (copy_lang_type): New function.
5954         (copy_type): Likewise.
5955         (cp_make_lang_type): Create lang_type for
5956         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
5957         and BOUND_TEMPLATE_TEMPLATE_PARM.
5958         * pt.c (tsubst): Use copy_type instead of copy_node.
5959         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
5960
5961 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5962
5963         * pt.c (determine_specialization): Ignore functions without
5964         DECL_TEMPLATE_INFO.
5965
5966 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
5967
5968         PR g++/4476
5969         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
5970
5971 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
5972
5973         * typeck2.c (store_init_value): Don't re-digest a bracketed
5974         initializer.
5975
5976         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
5977         ANON_AGGR_TYPE_P.
5978
5979 2001-10-11  Richard Henderson  <rth@redhat.com>
5980
5981         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
5982         of an asm statement.
5983         (build_vtbl_ref_1): Split out from build_vtbl_ref.
5984         (build_vfn_ref): Use it to handle vtable descriptors before
5985         calling build_vtable_entry_ref.
5986         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
5987
5988 2001-10-10  Richard Henderson  <rth@redhat.com>
5989
5990         * parse.y (asm_operand): Allow named operands.
5991         * semantics.c (finish_asm_stmt): Tweek for changed location
5992         of the operand constraint.
5993
5994 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
5995
5996         * call.c (standard_conversion): Add bad conversion between
5997         integers and pointers.
5998         (convert_like_real): Don't use convert_for_initialization for bad
5999         conversions; complain here and use cp_convert.
6000         (build_over_call): Don't handle bad conversions specially.
6001         (perform_implicit_conversion): Allow bad conversions.
6002         (can_convert_arg_bad): New fn.
6003         * cp-tree.h: Declare it.
6004         * typeck.c (convert_for_assignment): Use it.
6005         (ptr_reasonably_similar): Any target type is similar to void.
6006
6007 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
6008
6009         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
6010         (cp/cp-lang.o): New rule.
6011         * cp-tree.h: Declare hooks.
6012         * tree.c: Make hooks non-static.
6013         (init_tree): Don't initialize hooks here.
6014         * lex.c: Likewise.  Move definition of lang_hooks to...
6015         * cp-lang.c: ... new file.
6016
6017 2001-10-08  Richard Henderson  <rth@redhat.com>
6018
6019         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
6020         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
6021
6022 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6023
6024         * class.c (build_vtable_entry_ref): Const-ify.
6025         * decl.c (predefined_identifier,
6026         initialize_predefined_identifiers): Likewise.
6027         * init.c (build_new_1): Likewise.
6028         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
6029         Likewise.
6030
6031 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
6032
6033         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
6034         (INSNS_PER_STMT): Likewise.
6035         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
6036         (copy_body, initialize_inlined_parameters): Likewise.
6037         (declare_return_variable, inlinable_function_p): Likewise.
6038         (expand_call_inline, expand_calls_inline): Likewise.
6039         (optimize_inline_calls, clone_body): Likewise.
6040         * tree.c (walk_tree): Moved to ../tree-inline.c.
6041         (walk_tree_without_duplicates): Likewise.
6042         (copy_tree_r, remap_save_expr): Likewise.
6043
6044 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
6045
6046         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
6047         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
6048         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
6049         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
6050         (flag_inline_trees): Moved declaration to ../tree-inline.h.
6051         (walk_tree): Moved declaration to ../tree-inline.h.
6052         (walk_tree_without_duplicates, copy_tree_r): Likewise.
6053         (remap_save_expr): Likewise.
6054         * decl.c: Include tree-inline.h.
6055         (lang_mark_tree): Don't mark inlined_fns.
6056         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
6057         * optimize.c: Include tree-inline.h.
6058         (optimize_inline_calls): Move declaration to ../tree.h, as
6059         non-static.
6060         (remap_decl): Use language-independent constructs and hooks.
6061         (remap_block, copy_body_r, declare_return_variable): Likewise.
6062         (inlinable_function_p): Likewise.  Don't test for
6063         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
6064         no longer language-specific.
6065         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
6066         call of dump_function to...
6067         (optimize_function): Here...
6068         (clone_body): New function, extracted from...
6069         (maybe_clone_body): ... here.  Build decl_map locally and pass
6070         it on to clone_body.
6071         * pt.c, semantics.c: Include tree-inline.h.
6072         * tree.c: Likewise.
6073         (cp_walk_subtrees): New language-specific hook for tree inlining.
6074         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
6075         cp_is_overload_p, cp_auto_var_in_fn_p,
6076         cp_copy_res_decl_for_inlining): Likewise.
6077         (walk_tree): Move language-specific constructs into...
6078         (cp_walk_subtrees): this new function.
6079         (copy_tree_r): Use language-independent constructs and hooks.
6080         (init_tree): Initialize tree inlining hooks.
6081         (remap_save_expr): Adjust prototype so that the declaration
6082         does not require the definition of splay_tree.
6083
6084 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6085
6086         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
6087         to build the declaration instead of the declaration itself.
6088
6089 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
6090
6091         * decl2.c (cxx_decode_option): Add 'else'.
6092
6093         * spew.c (end_input): No longer static.
6094         * cp-tree.h: Declare it.
6095         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
6096
6097 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
6098
6099         * call.c (build_over_call), typeck.c (build_function_call_real):
6100         Pass type attributes to check_function_format rather than name or
6101         assembler name.  Don't require there to be a name or assembler
6102         name to check formats.
6103
6104 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
6105
6106         * decl.c (init_decl_processing): Don't call
6107         init_function_format_info.  Initialize lang_attribute_table
6108         earlier.
6109         (builtin_function): Call decl_attributes.
6110         (insert_default_attributes): New.
6111
6112 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
6113
6114         * decl.c (grokdeclarator): Copy array typedef handling from C
6115         frontend.
6116
6117         * decl.c (grokdeclarator): Copy too-large array handling from C
6118         frontend.
6119
6120 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
6121
6122         * config-lang.in (target_libs): Added target-gperf, so that we
6123         don't try to build it if C++ is disabled.
6124
6125 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
6126
6127         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
6128         (cp/errfn.o): Delete rule.
6129         (cp/error.o): Depend on flags.h.
6130         * errfn.c: Delete file.
6131         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
6132         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
6133         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
6134         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
6135         internal_error respectively.  Make cp_deprecated into a macro.
6136         Don't define cp_printer typedef or declare cp_printers.
6137         * error.c: Include flags.h.
6138         Delete: struct tree_formatting_info, print_function_argument_list,
6139         print_declaration, print_expression, print_function_declaration,
6140         print_function_parameter, print_type_id, print_cv_qualifier_seq,
6141         print_type_specifier_seq, print_simple_type_specifier,
6142         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
6143         print_parameter_declaration_clause, print_exception_specification,
6144         print_nested_name_specifier, and definition of cp_printers.
6145         (locate_error): New function.
6146         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
6147         rewritten in terms of locate_error and diagnostic.c.
6148         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
6149         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
6150         (init_error): Adjust to match.
6151
6152 Sat Sep 22 09:15:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6153
6154         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
6155
6156 2001-09-21  Richard Henderson  <rth@redhat.com>
6157
6158         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
6159         (build_vtbl_initializer): Likewise.
6160         (build_vfn_ref): New.
6161         * cp-tree.h: Declare it.
6162         * call.c (build_over_call): Use it.
6163         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
6164         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
6165
6166 Fri Sep 21 08:16:19 2001  J"orn Rennecke <amylaar@redhat.com>
6167
6168         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
6169
6170 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
6171
6172         Table-driven attributes.
6173         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
6174         * decl2.c (cplus_decl_attributes): Only take one attributes
6175         parameter.
6176         * cp-tree.c (cplus_decl_attributes): Update prototype.
6177         * class.c (finish_struct), decl.c (start_decl, start_function),
6178         decl2.c (grokfield), friend.c (do_friend), parse.y
6179         (parse_bitfield): Update calls to cplus_decl_attributes.
6180         * decl.c (grokdeclarator): Take a pointer to a single ordinary
6181         attribute list.
6182         * decl.h (grokdeclarator): Update prototype.
6183         * decl2.c (grokfield): Take a single ordinary attribute list.
6184         * friend.c (do_friend): Likewise.
6185         * decl.c (shadow_tag, groktypename, start_decl,
6186         start_handler_parms, grokdeclarator, grokparms, start_function,
6187         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
6188         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
6189         (process_template_parm, do_decl_instantiation): Pass single
6190         ordinary attribute lists around.
6191         * decl.c (grokdeclarator): Correct handling of nested attributes.
6192         Revert the patch
6193         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
6194                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
6195                 not the left.
6196         .
6197         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
6198         (cp_attribute_table): Declare.
6199         * decl.c (valid_lang_attribute): Don't define.
6200         (lang_attribute_table): Define.
6201         (init_decl_processing): Initialize lang_attribute_table instead of
6202         valid_lang_attribute.
6203         * tree.c (cp_valid_lang_attribute): Remove.
6204         (handle_java_interface_attribute, handle_com_interface_attribute,
6205         handle_init_priority_attribute): New functions.
6206         (cp_attribute_table): New array.
6207         * decl2.c (import_export_class): Don't use
6208         targetm.valid_type_attribute.
6209
6210 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6211
6212         * Make-lang.in (cp/error.o): Depend on real.h
6213         * error.c: #include "real.h"
6214
6215 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6216
6217         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
6218         xmalloc/strcpy/strcat.
6219
6220 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6221
6222         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
6223         Const-ification.
6224         * pt.c (tsubst_decl): Likewise.
6225
6226 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6227
6228         * decl2.c (lang_f_options): Const-ification.
6229         * lex.c (cplus_tree_code_name): Likewise.
6230         * spew.c (yyerror): Likewise.
6231
6232 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6233
6234         PR c++/3986
6235         * class.c (force_canonical_binfo_r): Check & move an indirect
6236         primary base first.
6237         (force_canonical_binfo): Check that it's not already
6238         canonical.
6239         (mark_primary_virtual_base): Remove BINFO parameter.
6240         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
6241
6242 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6243
6244         Remove TYPE_NONCOPIED_PARTS.
6245         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
6246         CLASSTYPE_PURE_VIRTUALS.
6247         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
6248         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
6249         (layout_class_type): Don't call fixup_inline_methods here ...
6250         (finish_struct_1): ... call it here.
6251
6252 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
6253
6254         * decl.c (duplicate_decls): Remove code deadling with
6255         DECL_SAVED_INSNS.
6256         * decl2.c (finish_file): Likewise.
6257         * pt.c (instantiate_decl): Likewise.
6258         * semantics.c (expand_body): Don't defer local functions if
6259         they wouldn't be deferred for some other reason.  Don't
6260         generate RTL for functions that will not be emitted.
6261         (genrtl_start_function): Remove code deadling with
6262         DECL_SAVED_INSNS.
6263         (genrtl_finish_function): Likewise.
6264
6265 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
6266
6267         PR c++/4203
6268         * call.c (build_over_call): Do not optimize any empty base
6269         construction.
6270
6271 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6272
6273         * error.c (dump_template_decl): Output template parameters
6274         together with their specifiers.
6275         Output `class' prefix for template template parameter.
6276         (dump_decl): Fix formatting.
6277
6278 2001-08-30  Kurt Garloff  <garloff@suse.de>
6279
6280         * optimize.c (inlinable_function_p): Allow only smaller single
6281         functions. Halve inline limit after reaching recursive limit.
6282
6283 2001-08-30  Joern Rennecke <amylaar@redhat.com>
6284             Jason Merrill  <jason_merrill@redhat.com>
6285
6286         * class.c (build_vtable_entry_ref): Subtract in char*, not
6287         ptrdiff_t.
6288
6289 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
6290
6291         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
6292         (build_cplus_array_type): Use cp_build_qualified_type, not
6293         TYPE_MAIN_VARIANT, to get an unqualified version.
6294
6295         * decl2.c (grok_alignof): Lose.
6296         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
6297         * typeck.c (c_alignof): Lose.
6298         * semantics.c (finish_sizeof, finish_alignof): New.
6299         * parse.y: Use them.
6300         * cp-tree.h: Declare them.
6301
6302 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
6303
6304         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
6305         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
6306         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
6307
6308 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
6309
6310         * typeck2.c (add_exception_specifier): Only require complete type if
6311         not in processing template declaration.
6312
6313 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6314
6315         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
6316         GNU_xref_start_scope and GNU_xref_end_scope.
6317
6318         * tree.c (TYPE_HASH): Moved to ../tree.h.
6319
6320 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
6321
6322         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
6323         on COMPOUND_EXPRs.
6324
6325 2001-08-14  Richard Henderson  <rth@redhat.com>
6326
6327         * class.c, cp-tree.h (build_vfn_ref): Remove.
6328         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
6329
6330 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
6331
6332         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
6333         empty class assignment as having side-effects to avoid
6334         spurious warnings.
6335
6336 2001-08-13  Zack Weinberg  <zackw@panix.com>
6337
6338         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
6339         * except.c: Include libfuncs.h.
6340
6341 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6342
6343         * decl.c (grokdeclarator): Clarify diagnostic message.
6344
6345 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6346
6347         * decl2.c (do_nonmember_using_decl): Replace using directive
6348         with using declaration in the error message.
6349
6350 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6351
6352         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
6353         criterion to avoid rebuilding expression tree instead of
6354         processing_template_decl.
6355
6356 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
6357
6358         Support named return value optimization for inlines, too.
6359         * decl.c (finish_function): Nullify returns here.
6360         * semantics.c (genrtl_start_function): Not here.
6361         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
6362         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
6363         Also nullify the CLEANUP_STMT for the nrv.
6364         * cp-tree.h: Declare it.
6365         * optimize.c (declare_return_variable): Replace the nrv with the
6366         return variable.
6367         * typeck.c (check_return_expr): Be more flexible on alignment check.
6368         Ignore cv-quals when checking for a matching type.
6369
6370 2001-08-09  Richard Henderson  <rth@redhat.com>
6371
6372         * decl2.c (finish_objects): Use target hooks instead of
6373         assemble_constructor and assemble_destructor.
6374
6375 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6376
6377         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
6378
6379 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
6380
6381         PR c++/3820
6382         Stop using TYPE_NONCOPIED_PARTS.
6383         * call.c (build_over_call): Be careful when copy constructing
6384         or assigning to an empty class.
6385         * class.c (check_bases_and_members): It has a
6386         COMPLEX_ASSIGN_REF if it has a vptr.
6387         (layout_class_type): Don't add empty class padding to
6388         TYPE_NONCOPIED_PARTS.
6389         (finish_struct_1): Don't add the VFIELD either.
6390         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
6391         initialization.
6392
6393 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
6394
6395         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
6396
6397 2001-08-06  Richard Henderson  <rth@redhat.com>
6398
6399         * decl2.c (finish_objects): Pass a symbol_ref and priority to
6400         assemble_{constructor,destructor}.  Remove priority handling.
6401
6402 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6403
6404         Don't allow template-id in using-declaration.
6405         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
6406         (do_class_using_decl): Likewise.
6407
6408 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6409
6410         * cp/spew.c (read_token): No need to pop buffers.
6411
6412 2001-08-02  Stan Shebs  <shebs@apple.com>
6413
6414         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
6415         (fnaddr_from_vtable_entry): Remove decl.
6416         * method.c (use_thunk): Update comment.
6417
6418 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
6419
6420         * repo.c (get_base_filename): Change return value to const char
6421         pointer.
6422
6423 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
6424
6425         Kill -fhonor-std.
6426         * NEWS: Document.
6427         * cp-tree.h (flag_honor_std): Remove.
6428         (CPTI_FAKE_STD): Remove.
6429         (std_node): Remove comment about it being NULL.
6430         (fake_std_node): Remove.
6431         * decl.c (in_fake_std): Remove.
6432         (walk_namespaces_r): Remove fake_std_node check.
6433         (push_namespace): Remove in_fake_std code.
6434         (pop_namespace): Likewise.
6435         (lookup_name_real): Remove fake_std_node check.
6436         (init_decl_processing): Always create std_node. Always add
6437         std:: things there.
6438         (builtin_function): Always put non '_' fns in std.
6439         * decl2.c (flag_honor_std): Remove.
6440         (lang_f_options): Remove honor-std.
6441         (unsupported_options): Add honor-std.
6442         (set_decl_namespace): Remove fake_std_node check.
6443         (validate_nonmember_using_decl): Likewise.
6444         (do_using_directive): Likewise.
6445         (handle_class_head): Likewise.
6446         * dump.c (cp_dump_tree): Likewise.
6447         * except.c (init_exception_processing): Adjust.
6448         * init.c (build_member_call): Remove fake_std_node check.
6449         (build_offset_ref): Likewise.
6450         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
6451         * rtti.c (init_rtti_processing): Adjust.
6452
6453 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
6454
6455         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
6456         operand while calling cp_tree_equal.
6457
6458 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
6459
6460         The 3.0 ABI no longer has vbase pointer fields.
6461         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
6462         FORMAT_VBASE_NAME): Remove.
6463         * method.c (do_build_copy_constructor): Adjust.
6464         (do_build_assign_ref): Adjust.
6465         * search.c (lookup_field_r): Adjust.
6466         * typeck.c (build_component_ref): Adjust.
6467
6468         The 3.0 ABI always has a vtable pointer at the start of every
6469         polymorphic class.
6470         * rtti.c (build_headof_sub): Remove.
6471         (build_headof): Adjust.
6472         (get_tinfo_decl_dynamic): No need to check flag_rtti
6473         here. Adjust.
6474         (create_real_tinfo_var): Explain why we need a hidden name.
6475
6476 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
6477
6478         PR c++/3631
6479         * class.c (update_vtable_entry_for_fn): The fixed adjustment
6480         of a virtual thunk should be from declaring base.
6481
6482 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
6483
6484         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
6485         the shared virtual base, so preserving inheritance graph order.
6486
6487 2001-07-30  Andreas Jaeger  <aj@suse.de>
6488
6489         * decl2.c: Remove unused var global_temp_name_counter.
6490
6491 2001-07-28  Richard Henderson  <rth@redhat.com>
6492
6493         * method.c (pending_inlines): Remove.
6494
6495 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
6496
6497         * class.c (mark_primary_virtual_base): Don't adjust base
6498         offsets here.
6499         (dfs_unshared_virtual_bases): Adjust them here.
6500         (mark_primary_bases): Explain why we adjust at the end.
6501
6502 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
6503
6504         * class.c (finish_struct_1): When copying the primary base's
6505         VFIELD, make sure we find it is at offset zero.
6506
6507 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6508
6509         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
6510         tsubst_expr for default template arguments.
6511
6512 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
6513
6514         PR c++/3621
6515         * spew.c (yylex): Only copy the token's lineno, if it is
6516         nonzero.
6517
6518 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
6519
6520         PR c++/3624
6521         * call.c (resolve_args): Simplify, call
6522         convert_from_reference.
6523         (build_new_op): Resolve and convert from reference ARG1
6524         earlier. Adjust ARG2 & ARG3 resolve and conversion.
6525
6526 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
6527
6528         * decl.c (last_function_parm_tags): Remove.
6529         (current_function_parm_tags): Remove.
6530         (init_decl_processing): Adjust.
6531         (start_function): Adjust.
6532         (store_parm_decls): Adjust.
6533
6534         PR c++/3152
6535         * decl.c (grokdeclarator): Detect when a function typedef is
6536         declaring a function, and create last_function_parms correctly.
6537
6538 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
6539
6540         * call.c (joust): Only prefer a non-builtin candidate to a builtin
6541         one if they have the same signature.
6542
6543         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
6544         it rather than toplevel_bindings_p.  Give it a mangled name if static.
6545         (convert_to_reference): Adjust.
6546         * decl2.c (get_temp_name): Lose.
6547         * mangle.c (mangle_ref_init_variable): New fn.
6548         (mangle_guard_variable): Strip the ref-init header.
6549         * cp-tree.h: Adjust.
6550         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
6551         initializer.
6552         (grok_reference_init): Always use DECL_INITIAL.
6553
6554 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6555
6556         PR c++/3416
6557         * call.c (build_conditional_expr): Recheck args after
6558         conversions.
6559         * cp-tree.h (build_conditional_expr): Move to correct file.
6560         * typeck.c (decay_conversion): Diagnose any unknown types
6561         reaching here.
6562         (build_binary_op): Don't do initial decay or default
6563         conversions on overloaded functions.
6564         (build_static_cast): Don't do a decay conversion here.
6565
6566 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6567
6568         PR c++/3543
6569         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
6570         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
6571
6572 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6573
6574         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
6575         (create_vtbl_ptr): ... here.
6576
6577 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6578
6579         * class.c (build_vbase_offset_vbtl_entries): Look for
6580         non-primary base of which we are a sub vtable.
6581
6582 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
6583
6584         * semantics.c (finish_this_expr):  Remove unused code.
6585
6586 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
6587
6588         Simplify rtti, now we've only one ABI.
6589         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
6590         CPTI_TINFO_VAR_ID.
6591         (tinfo_decl_id, tinfo_var_id): Remove.
6592         (get_typeid_1): Remove.
6593         * rtti.c
6594         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
6595         (typeid_ok_p): New function.
6596         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
6597         (get_tinfo_decl): Remove old abi documentation.
6598         (tinfo_from_decl): Remove.
6599         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
6600         (get_typeid_1): Remove.
6601         (get_base_offset): Remove.
6602         (synthesize_tinfo_var): Absorb get_base_offset.
6603         (create_real_tinfo_var): Don't use tinfo_decl_id.
6604
6605 2001-07-23  Graham Stott  <grahams@redhat.com>
6606
6607         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
6608         variable has_two_argument_delete_p.
6609
6610 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
6611
6612         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
6613         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
6614         (CPTI_INDEX_IDENTIFIER): Remove.
6615         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
6616         (delta2_identifier): Remove.
6617         (index_identifier): Remove.
6618         (pfn_or_delta2_identifier): Remove.
6619         (flag_vtable_thunks): Remove.
6620         (VTABLE_DELTA2_NAME): Remove.
6621         (VTABLE_INDEX_NAME): Remove.
6622         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
6623         (vfunc_ptr_type_node): Adjust.
6624         (VTABLE_NAME_PREFIX): Adjust.
6625         (build_vfn_ref): Lose first parameter.
6626         (fixup_all_virtual_upcast_offsets): Remove.
6627         * decl.c (initialize_predefined_identifiers): Remove
6628         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
6629         (init_decl_processing): Remove no-vtable-thunk code.
6630         * decl2.c (flag_vtable_thunks): Remove.
6631         (mark_vtable_entries): Remove no-vtable-thunk code.
6632         * error.c (dump_decl): Remove no-vtable-thunk code.
6633         (dump_expr): Adjust ptr to member function code.
6634         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
6635         code.
6636         * rtti.c (build_headof): Remove no-vtable-thunk code.
6637         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
6638         * search.c (get_base_distance): Remove expand_upcast_fixups case.
6639         (virtual_context) Remove.
6640         (expand_upcast_fixups): Remove.
6641         (fixup_virtual_upcast_offsets): Remove.
6642         (fixup_all_virtual_upcast_offsets): Remove.
6643         * typeck.c (get_member_function_from_ptrfunc): Remove
6644         no-vtable-thunk code.
6645         * call.c (build_over_call): Adjust call to build_vfn_ref.
6646         * class.c (build_vfn_ref): Lose first parameter. Remove
6647         no-vtable-thunk code.
6648         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
6649         (build_vtable_entry): Remove no-vtable-thunk code.
6650
6651 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
6652
6653         Remove old-abi remnants. Remove comments about old abi
6654         behavior. Remove references to 'new-abi' in comments.
6655         * cp-tree.h: Adjust comments.
6656         (vbase_offsets_in_vtable_p): Delete.
6657         (vcall_offsets_in_vtable_p): Delete.
6658         (vptrs_present_everywhere_p): Delete.
6659         (all_overridden_vfuns_in_vtables_p): Delete.
6660         (merge_primary_and_secondary_vtables_p): Delete.
6661         (TYPE_CONTAINS_VPTR_P): Adjust.
6662         (VTT_NAME_PREFIX): Remove.
6663         (CTOR_VTBL_NAME_PREFIX): Remove.
6664         (init_vbase_pointers): Remove.
6665         * class.c: Adjust coments.
6666         (build_vbase_pointer_fields): Delete.
6667         (build_vbase_pointer): Remove old-abi code.
6668         (build_secondary_vtable): Likewise.
6669         (modify_all_vtables): Likewise.
6670         (create_vtable_ptr): Likewise.
6671         (layout_class_type): Likewise.
6672         (finish_struct_1): Likewise.
6673         (finish_vtbls): Likewise.
6674         (dfs_finish_vtbls): Delete.
6675         (build_vbase_offset_vtbl_entries): Remove old-abi code.
6676         * cvt.c: Adjust comments.
6677         * decl.c: Adjust comments.
6678         * decl2.c: Adjust comments.
6679         * init.c: Adjust comments.
6680         (construct_virtual_bases): Remove old-abi code.
6681         * lang-specs.h: Remove -fno-new-abi.
6682         * mangle.c: Adjust comments.
6683         * rtti.c: Adjust comments.
6684         (get_base_offset): Remove old-abi-code.
6685         * search.c: Adjust comments.
6686         (dfs_init_vbase_pointers): Remove.
6687         (dfs_vtable_path_unmark): Remove.
6688         (init_vbase_pointers): Remove.
6689         * semantics.c: Adjust comments.
6690         (emit_associated_thunks): Remove old-abi code.
6691         * typeck.c: Adjust comments.
6692
6693 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
6694
6695         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
6696         params.h.
6697
6698 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
6699
6700         * class.c (finish_struct_anon): Forbid nested classes.
6701
6702 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
6703
6704         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
6705         * optimize.c: Include debug.h.
6706         (maybe_clone_body): Use debug hook.
6707         * semantics.c: Include debug.h.
6708         (expand_body): Use debug hook.
6709
6710 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
6711
6712         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
6713
6714 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
6715
6716         * class.c (type_requires_array_cookie): New function.
6717         (check_methods): Don't try to figure out whether the type needs a
6718         cookie here.
6719         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
6720         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
6721         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
6722         * pt.c (instantiate_class_template): Don't set
6723         TYPE_VEC_DELETE_TAKES_SIZE.
6724         * NEWS: Document ABI changes from GCC 3.0.
6725
6726 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
6727             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
6728
6729         * NEWS (Changes in GCC 3.0): Fix typo.
6730
6731 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
6732
6733         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
6734         which attributes are to be attached, and a flags argument.  Update
6735         call to decl_attributes.
6736         (grokfield): Update call to decl_attributes.
6737         * class.c (finish_struct): Update call to cplus_decl_attributes.
6738         * cp-tree.h (cplus_decl_attributes): Update prototype.
6739         * decl.c (start_decl, grokdeclarator, start_function): Update
6740         calls to decl_attributes and cplus_decl_attributes.
6741         * friend.c (do_friend): Update call to cplus_decl_attributes.
6742         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
6743
6744 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
6745
6746         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
6747         for `register' variables with an asm-specification.
6748
6749 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
6750
6751         * semantics.c (finish_asm_stmt): Mark the output operands
6752         to an asm addressable, if necessary.
6753
6754 2001-07-11  Ben Elliston  <bje@redhat.com>
6755
6756         * Revert this change -- there is a subtle bug.
6757
6758         PR c++/80
6759         * decl.c (finish_enum): New "attributes" argument; pass it to
6760         cplus_decl_attributes.  Use a narrower type if the enum is packed.
6761         * cp-tree.h (finish_enum): Adjust prototype.
6762         * parse.y (enum_head): New non-terminal.
6763         (structsp): Use it. Enums now may be preceded or followed by
6764         optional attributes -- pass their chained tree to finish_enum().
6765         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
6766
6767 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
6768
6769         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
6770         variables.
6771
6772 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
6773
6774         * semantics.c (cp_expand_stmt): Fix for null
6775         current_function_return_value.
6776
6777 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
6778
6779         * call.c (build_op_delete_call): Initialize fn.
6780         (convert_like_real): Delete conditional.
6781         (joust): Initialize *w and *l.
6782         * class.c: Add prototype for binfo_ctor_vtable.
6783         (get_primary_binfo): Initialize result.
6784         * init.c (build_java_class_ref): Initialize name.
6785
6786 2001-07-09  Erik Rozendaal  <dlr@acm.org>
6787
6788         * typeck.c (unary_complex_lvalue): Do not duplicate the
6789         argument to modify, pre-, or post-increment when used as an
6790         lvalue and when the argument has side-effects.
6791
6792 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
6793
6794         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
6795         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
6796         cplus_decl_attributes even if attrs is NULL.
6797         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
6798
6799 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
6800
6801         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
6802         calls to decl_attributes.
6803
6804 2001-07-06  Ira Ruben   <ira@apple.com>
6805
6806         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
6807         be DECL_TEMPLATE_RESULT.
6808
6809 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6810
6811         * cp-tree.h (copy_template_template_parm): Rename to ...
6812         (bind_template_template_parm): ... here.
6813         * tree.c (copy_template_template_parm): Rename to ...
6814         (bind_template_template_parm): ... here.  Remove the case when
6815         NEWARGS is NULL_TREE.
6816         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
6817         BOUND_TEMPLATE_TEMPLATE_PARM.
6818         * pt.c (lookup_template_class): Adjust.
6819
6820 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
6821
6822         * cvt.c (convert_lvalue): New fn.
6823         * cp-tree.h: Declare it.
6824         * method.c (do_build_assign_ref): Use it.
6825         (do_build_copy_constructor): Convert parm to base types
6826         before calling base constructors.
6827
6828         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
6829         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
6830         optimize.
6831         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
6832
6833 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
6834
6835         * optimize.c (optimize_inline_calls): New function, broken out
6836         of ...
6837         (optimize_function): ... here. Call it. Don't inline if it is
6838         a thunk.
6839         (dump_function): Print name of dump flag causing this dump.
6840         * semantics.c (expand_body): Move thunk inline check to
6841         optimize_function.
6842
6843 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
6844
6845         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
6846         (comptypes): Use target.comp_type_attributes.
6847
6848 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
6849
6850         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
6851
6852 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6853
6854         * error.c (lang_print_error_function): Add a `diagnostic_context *'
6855         parameter. Tweak.
6856
6857 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6858
6859         * decl2.c (import_export_class): Update.
6860
6861 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
6862
6863         * error.c (init_error): Adjust settings.
6864
6865 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
6866
6867         * error.c (init_error): Adjust settings.
6868
6869 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
6870
6871         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
6872         return pointers to data members by reference rather than by value.
6873
6874 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
6875
6876         Implement the Named Return Value optimization.
6877         * cp-tree.h (struct cp_language_function): Add x_return_value.
6878         (current_function_return_value): Now a macro.
6879         * decl.c: Don't define it.
6880         (define_label, finish_case_label): Don't clear it.
6881         (init_decl_processing): Don't register it with GC.
6882         * semantics.c (genrtl_finish_function): Don't check it for
6883         no_return_label.  Copy the RTL from the return value to
6884         current_function_return_value and walk, calling...
6885         (nullify_returns_r): ...this new fn.
6886         * typeck.c (check_return_expr): Set current_function_return_value.
6887
6888 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
6889
6890         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
6891         sharing a ctor vtable with.  Merge code for cases 1 and 2.
6892         (binfo_ctor_vtable): New fn.
6893         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
6894
6895 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
6896
6897         * class.c (dfs_find_final_overrider): Fix logic.
6898
6899         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
6900         virtual thunk instead of non-virtual.
6901         (get_matching_virtual): Uncomment.
6902
6903         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
6904         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
6905         PARM, not ARG.
6906
6907 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
6908
6909         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
6910         we've not emerged from the hierarchy of RTTI_BINFO on reaching
6911         a non-virtual base.
6912
6913 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
6914
6915         * NEWS: Update release number.
6916
6917 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
6918
6919         PR c++/3130, c++/3131, c++/3132
6920         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
6921         * class.c (force_canonical_binfo_r): Move
6922         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
6923         virtual bases unless they're primary and what they're primary
6924         too has been moved.
6925         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
6926         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
6927         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
6928         derived binfo.
6929         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
6930         (layout_nonempty_base_or_field): Add most derived type
6931         parameter. Adjust.
6932         (layout_empty_base): Likewise.
6933         (build_base_field): Likewise.
6934         (build_base_fields): Likewise.
6935         (propagate_binfo_offsets): Add most derived type
6936         parameter. Skip non canonical virtual bases too.
6937         (dfs_set_offset_for_unshared_vbases): Don't skip primary
6938         bases. Do skip canonical bases.
6939         (layout_virtual_bases): Adjust.
6940         (layout_class_type): Adjust.
6941         (dfs_get_primary_binfo): Build list of virtual primary base
6942         candidates.
6943         (get_primary_binfo): Check that the shared virtual primary
6944         base candidate was found first.
6945         (accumulate_vtbl_inits): Don't do anything for non-vptr
6946         containing binfos. For case 1 primary virtual bases, keep
6947         checking that we've not emerged from the hierarchy of RTTI_BINFO.
6948
6949 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
6950
6951         PR c++/3089
6952         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
6953         hierarchy looking for primary bases for a ctor
6954         vtable. Recursively call oneself, if we meet our primary via
6955         this route and haven't met it yet via inheritance graph order.
6956
6957 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
6958
6959         * lang-options.h: Emit documentation for -fno-honor-std, not
6960         -fhonor-std.
6961
6962 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
6963
6964         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
6965         Don't clobber delta.
6966         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
6967
6968 2001-06-10  Mark Mitchell <mark@codesourcery.com>
6969             Gabriel Dos Reis  <gdr@codesourcery.com>
6970
6971         * Make-lang.in (cp/call.o): Depend on diagnostic.h
6972         (cp/typeck.o): Depend on diagnostic.h
6973         (cp/typeck2.o): Depend on diagnostic.h
6974         (cp/repo.o): Depend on dignostic.h
6975         * typeck.c: #include diagnostic.h
6976         (convert_for_initialization): Remove extern declaration for
6977         warningcount and errorcount.
6978
6979         * call.c: #include diagnostic.h
6980         (convert_like_real): Remove extern declaration for warnincount and
6981         errorcount.
6982
6983         * repo.c: #include diagnostic.h
6984         * typeck2.c: #include diagnostic.h
6985
6986 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
6987
6988         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
6989         in previous change.
6990
6991 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
6992
6993         PR c++/2929
6994         * friend.c (do_friend): Use push_decl_namespace for classes at
6995         namespace scope.
6996
6997 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
6998             Jason Merrill <jason_merrill@redhat.com>
6999
7000         PR c++/3061
7001         * class.c (build_secondary_vtable): Use assert, rather than an error
7002         message.
7003         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
7004         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
7005         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
7006         Don't set BINFO_VTABLE for a primary virtual base.
7007
7008 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
7009
7010         * decl.c (duplicate_decls): Update source position information
7011         when a template function is defined.
7012
7013 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
7014
7015         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
7016
7017 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
7018
7019         PR c++/2914
7020         * decl.c (pushtag): Don't push into a complete type's scope.
7021
7022 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
7023
7024         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
7025         (struct lang_decl_flags): Lose generate_with_vtable_p.
7026         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
7027         * class.c (copy_virtuals): Adjust.
7028         * decl2.c (mark_vtable_entries): Adjust.
7029         * method.c (make_thunk, build_vtable_entry): Adjust.
7030         * class.c (update_vtable_entry_for_fn): Only look as far as the
7031         first defining class.
7032         (build_vtbl_initializer): Put nothing in the slot for a function only
7033         defined in a lost primary virtual base.
7034         (add_vcall_offset_vtbl_entries_1): Use the same code for
7035         the lost primary case and the normal case.
7036         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
7037         (get_vfield_offset, get_derived_offset): Lose.
7038         (dfs_find_final_overrider): Use look_for_overrides_here.
7039         (get_matching_virtual): New fn.
7040         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
7041         not BV_VCALL_INDEX.
7042         * search.c (look_for_overrides_here): Split out from...
7043         (look_for_overrides_r): Here.
7044
7045         * class.c (find_final_overrider): Return error_mark_node on error.
7046
7047         * decl2.c (key_method): #if 0 accidental change.
7048
7049 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7050
7051         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
7052         (build_over_call): Likewise.
7053         * decl.c (grokparms): Likewise.
7054         * pt.c (tsubst_decl): Likewise.
7055         * typeck.c (convert_arguments): Likewise.
7056
7057 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
7058
7059         * semantics.c (begin_class_definition): Robustify.
7060
7061         * pt.c (instantiate_decl): Tell the repository code about the
7062         clones, not the cloned functions.
7063         * repo.c (repo_template_used): Explicitly instantiate the cloned
7064         function, not the clones.
7065
7066 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7067
7068         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
7069         ICS_BAD_FLAG on created conversion.
7070         (compare_ics): Break out rank.
7071
7072 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7073
7074         * decl.c (xref_tag): Remove extraneous %s on dependent name
7075         lookup warning.
7076
7077 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7078
7079         * class.c (layout_vtable_decl): Fix off by one error on
7080         build_index_type.
7081         (build_vtt): Likewise.
7082         (build_ctor_vtbl_group): Likewise.
7083
7084 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7085
7086         * class.c (maybe_indent_hierarchy): New function.
7087         (dump_class_hierarchy_r): Add flags. Dump extra binfo
7088         information, if enabled. Use maybe_indent_hierarchy. Adjust
7089         output format.
7090         (dump_class_hierarchy): Adjust prototype. Adjust output format.
7091         (dump_array, dump_vtable, dump_vtt): New functions.
7092         (finish_struct_1): Adjust hierarchy dumping.
7093         (initialize_vtable): Call dump_vtable.
7094         (build_vtt): Call dump_vtt.
7095         (build_ctor_vtbl_group): Call dump_vtable.
7096         * decl2.c (flag_dump_class_layout): Remove.
7097         (cxx_decode_option): Remove dump translation unit
7098         and dump class hierarchy check. Call dump_switch_p.
7099         (finish_file): Adjust dumping.
7100         (dump.c): Only dump base classes if not TDF_SLIM.
7101         Only dump namespace members if not TDF_SLIM.
7102         * optimize.c (dump_function): New function.
7103         (optimize_function): Call dump_function.
7104         * semantics.c (expand_body): Use dump_enabled_p.
7105
7106 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
7107
7108         PR g++/2936
7109         Part missed from first commit
7110         * decl2.c (finish_anon_union): Copy context.
7111
7112 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
7113
7114         PR g++/2936
7115         * optimize.c (remap_decl): Remap anonymous aggregate members too.
7116
7117 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
7118
7119         PR g++/2823
7120         * semantics.c (expand_body): Don't optimize thunks.
7121
7122 2001-05-25  Sam TH  <sam@uchicago.edu>
7123
7124         * cp-tree.h lex.h: Fix header include guards.
7125
7126 2001-05-25  Mark Mitchell <mark@codesourcery.com>
7127
7128         * decl.c (init_decl_processing): Tweak.
7129
7130 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
7131
7132         * decl.c (duplicate_decls): Tidy.
7133         (init_decl_processing): Always set flag_no_builtin.
7134
7135 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
7136
7137         PR c++/2184
7138         * decl2.c (do_local_using_decl): Push the decls, even in a
7139         template.
7140
7141 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
7142
7143         * optimize.c (initialize_inlined_parameters): Don't set
7144         TREE_READONLY for a VAR_DECL taking the place of an inlined
7145         PARM_DECL.
7146
7147 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
7148
7149         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
7150         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
7151         attribute.
7152
7153 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
7154
7155         * parse.y: Refer to compound literals as such, not as
7156         constructor-expressions.
7157
7158 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
7159
7160         * call.c (build_op_delete_call): Ignore exception-specifications
7161         when looking for matching delete operators.
7162         * init.c (build_new_1): Compute whether or not the allocation
7163         function used is a placement allocation function or not, and
7164         communicate this information to build_op_delete_call.
7165
7166 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
7167
7168         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
7169         (build_vtbl_ref): Adjust.
7170         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
7171         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
7172         Re-add vtable-gc.
7173         (unsupported_options): Correspondingly.
7174
7175         * decl2.c (maybe_make_one_only): Check flag_weak, not
7176         supports_one_only().
7177
7178         * cp-tree.def (START_CATCH_STMT): Lose.
7179         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
7180         * tree.c (cp_statement_code_p): Don't case it.
7181         * semantics.c (cp_expand_stmt): Likewise.
7182         * cp-tree.h (START_CATCH_TYPE): Lose.
7183         (HANDLER_TYPE): New.
7184         * except.c (expand_start_catch_block): Don't start any blocks.
7185         Return the type.
7186         (expand_end_catch_block): Don't end any blocks.
7187         * parse.y (handler): Don't pass anything from finish_handler_parms
7188         to finish_handler.
7189         * pt.c (tsubst_expr): Likewise.
7190         * semantics.c (begin_handler): Call note_level_for_catch here.
7191         (finish_handler_parms): Don't return anything.
7192         (genrtl_catch_block, begin_catch_block): Lose.
7193         (genrtl_handler): Call expand_start_catch here.
7194
7195 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
7196
7197         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
7198         (get_vtable_decl, build_vtt): Not here.
7199
7200 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
7201
7202         PR c++/2781
7203         * optimize.c (update_cloned_parm): Copy addressability and other
7204         flags.
7205
7206 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7207
7208         * pt.c (determine_specialization): Ignore artificial functions.
7209
7210 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
7211
7212         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
7213         (C_RID_CODE): Remove.
7214         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
7215         (init_parse): Don't do it here.
7216
7217 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
7218
7219         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
7220         function declaration to avoid stripping the symbol's attributes.
7221
7222 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
7223
7224         * decl.c (pushdecl): Adjust error string.
7225         (xref_tag): Adjust friend class injection warning. Remove the
7226         inherited name from the class shadowed scope.
7227
7228 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
7229
7230         * except.c (cp_protect_cleanup_actions): New function.
7231         (init_exception_processing): Don't set protect_cleanup_actions
7232         here.  Do set lang_protect_cleanup_actions.
7233
7234 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
7235
7236         * spew.c (read_token): Call yyerror on all unexpected tokens.
7237
7238 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
7239
7240         * init.c (member_init_ok_or_else): Take a tree rather than
7241         string for name.
7242         (expand_member_init): Adjust.
7243
7244 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
7245
7246         * decl.c (duplicate_decls): Suppress warning about duplicate
7247         decls if the first decl is a friend.
7248
7249 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
7250
7251         * except.c (choose_personality_routine): Export.  Add
7252         explanatory comment.  Take an enum languages, not a boolean.
7253         (initialize_handler_parm): Adjust to match.
7254         * cp-tree.h: Prototype choose_personality_routine.
7255         * lex.c (handle_pragma_java_exceptions): New function.
7256         (init_cp_pragma): Register #pragma GCC java_exceptions.
7257
7258 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7259
7260         * method.c (build_mangled_C99_name): Remove unused prototype.
7261
7262 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
7263
7264         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
7265         * typeck.c (get_member_function_from_ptrfunc,
7266         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
7267         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
7268
7269         Reverted Geoff Keating's 2001-05-03's patch.
7270
7271 2001-05-11  Ira Ruben   <ira@apple.com>
7272
7273         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
7274
7275 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
7276
7277         * cp-tree.h (finish_label_expr, lookup_label): Delete.
7278         * parse.y: Update for '&&'; don't issue warning here.
7279         * semantics.c (finish_label_expr): Delete.
7280
7281 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
7282
7283         * splay-tree.h (splay_tree_max): New function.
7284         (splay_tree_min): Likewise.
7285
7286 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
7287
7288         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
7289         (pfn_vflag_identifier): Define.
7290         Update comment about layout of pointer functions.
7291         (build_ptrmemfunc1): Update prototype.
7292         (expand_ptrmemfunc_cst): Update prototype.
7293         * decl.c (initialize_predefined_identifiers): Initialize
7294         pfn_vflag_identifier.
7295         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
7296         an extra field to the type.
7297         * expr.c (cplus_expand_constant): Pass 'flag' between
7298         expand_ptrmemfunc_cst and build_ptrmemfunc1.
7299         * typeck.c (get_member_function_from_ptrfunc): When
7300         FUNCTION_BOUNDARY < 16, look at additional field to determine
7301         if a pointer-to-member is a real pointer or a vtable offset.
7302         (build_ptrmemfunc1): Add new parameter to contain extra field.
7303         (build_ptrmemfunc): Pass the extra field around.
7304         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
7305         (pfn_from_ptrmemfunc): Ignore the extra field.
7306
7307 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
7308
7309         * cp-tree.h (flag_inline_trees): Update documentation.
7310         * decl.c (init_decl_processing): Adjust handling of
7311         flag_inline_functions and flag_inline_trees to support -O3.
7312         (grokfndecl): Set DECL_INLINE on all functions if that's what
7313         the user requested.
7314         (save_function_data): Clear DECL_INLINE in
7315         current_function_cannot_inline is non-NULL.
7316         * decl2.c (flag_inline_trees): Update documentation.
7317
7318 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
7319
7320         * dump.c (cp_dump_tree, USING_STMT case): New case.
7321         * tree.c (cp_statement_code_p): Add USING_STMT.
7322         * decl2.c (do_using_directive): Add the using directive statement.
7323
7324         * tree.c (walk_tree): Reformat an if block.
7325
7326 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
7327
7328         * decl.c (compute_array_index_type): Don't try to do anything with
7329         the indices when processing a template.
7330
7331 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7332
7333         * call.c: NULL_PTR -> NULL.
7334         * class.c: Likewise.
7335         * cvt.c: Likewise.
7336         * decl.c: Likewise.
7337         * decl2.c: Likewise.
7338         * except.c: Likewise.
7339         * init.c: Likewise.
7340         * rtti.c: Likewise.
7341         * search.c: Likewise.
7342         * tree.c: Likewise.
7343         * typeck.c: Likewise.
7344         * typeck2.c: Likewise.
7345
7346 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
7347
7348         * decl2.c (do_using_directive): Revert previous patch.
7349
7350 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
7351
7352         * cp-tree.def (USING_STMT): New statement node.
7353         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
7354         * decl2.c (do_using_directive): Add USING_STMT to statement
7355         tree. Don't emit errors when processing template decl.
7356         * pt.c (tsubst_expr, USING_STMT case): New case.
7357         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
7358
7359 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
7360
7361         * call.c (build_new_op): Convert args from reference here.
7362         (build_conditional_expr): Don't convert here.
7363
7364 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
7365
7366         * spew.c (last_token_id): New static variable.
7367         (read_token): Set it here.
7368         (yyerror): Use it here.
7369
7370 2001-04-30  Richard Henderson  <rth@redhat.com>
7371
7372         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
7373         * decl.c: Likewise.
7374
7375 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
7376
7377         * gxxint.texi: Remove.
7378         * Make-lang.in: Remove all traces of gxxint.texi.
7379
7380 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
7381
7382         * decl2.c (start_static_initialization_or_destruction): Correct
7383         logic to handle the -fno-use-cxa-atexit case.
7384
7385 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
7386
7387         * optimize.c (update_cloned_parm): New function.
7388         (maybe_clone_body): Use it.  Update the `this' parameter too.
7389
7390 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
7391
7392         * decl2.c (unsupported_options): Add new-abi.
7393         * lang-options.h: Remove no longer supported options.
7394
7395 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
7396
7397         * except.c (can_convert_eh): Don't check template parms,
7398         typename types etc.
7399
7400 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
7401
7402         * optimize.c (maybe_clone_body): Copy parameter names and locations.
7403
7404 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
7405
7406         * cp-tree.h (adjust_clone_args): Prototype new function.
7407         * class.c (adjust_clone_args): New function.
7408         * decl.c (start_function): Call it for in charge ctors.
7409
7410 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
7411
7412         * method.c (use_thunk): Make sure that thunks really are emitted
7413         when requested.
7414
7415 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
7416
7417         * mangle.c (write_chars): New macro.
7418         (hwint_to_ascii): New function
7419         (write_number): Use it.
7420         (write_integer_cst): Deal with really big numbers.
7421
7422 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
7423
7424         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
7425         the clone.
7426
7427 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
7428
7429         * decl.c (grokdeclarator): Set context of namespace scope
7430         TYPE_DECLS.
7431
7432 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
7433
7434         * cp/optimize.c: Include hashtab.h.
7435         (struct inline_data): Add tree_pruner.
7436         (expand_call_inline, expand_calls_inline): Use it when calling
7437         walk_tree.
7438         (optimize_function): Initialize and free tree_pruner.
7439
7440 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
7441
7442         Lazy __FUNCTION__ generation.
7443         * cp-tree.def (FUNCTION_NAME): Remove.
7444         * cp-tree.h (function_name_declared_p): Remove.
7445         (cp_fname_init): Prototype.
7446         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
7447         don't call declare_function_name. Call start_fname_decls.
7448         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
7449         clobber the line number.
7450         (cp_fname_init): New function.
7451         (start_function): Call start_fname_decls.
7452         (finish_function): Call finish_fname_decls.
7453         * lex.c (reswords): Add slots for __FUNCTION__ et al.
7454         (rid_to_yy): Add mappings for __FUNCTION__ et al.
7455         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
7456         * parse.y (VAR_FUNC_NAME): New token.
7457         (primary): Add VAR_FUNC_NAME.
7458         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
7459         generation.
7460         (tsubst, FUNCTION_NAME case): Remove.
7461         (tsubst_copy, FUNCTION_NAME case): Remove.
7462         (tsubst_expr, DECL_STMT case): Be careful with a
7463         DECL_PRETTY_FUNCTION_P.
7464         (instantiate_decl): Remove function_name_declared_p.
7465         * semantics.c (begin_compound_statement): Don't call
7466         declare_function_name here.
7467         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
7468         (finish_translation_unit): Call finish_fname_decls.
7469         (expand_body): Remove function_name_declared_p.
7470         * typeck2.c (digest_init): Allow any ERROR_MARK.
7471
7472 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
7473
7474         * pt.c (tsubst_decl): Use VOID_TYPE_P.
7475         * semantics.c: Fix some typos.
7476
7477 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
7478
7479         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
7480
7481 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7482
7483         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
7484
7485 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
7486
7487         * except.c (build_throw): Wrap the initialization of the exception
7488         object in a MUST_NOT_THROW_EXPR.
7489         (do_free_exception): #if 0.
7490
7491 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
7492
7493         * cp-tree.h (finish_enum): Change prototype.
7494         * decl.c (finish_enum): Reorganize.
7495         * parse.y (structsp): Adjust calls to finish_enum.
7496
7497 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
7498
7499         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
7500         't' case.
7501
7502 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
7503
7504         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
7505         (layout_empty_base): Return at end flag.
7506         (build_base_field): Likewise.
7507         (build_base_fields): Likewise.
7508         (layout_virtual_bases): Don't add 1 to eoc value.
7509         (end_of_class): Use full size for empty bases.
7510         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
7511         empty bases. Don't add 1 to eoc value. Only add trailing padding
7512         if we're an empty class with no empty bases.
7513         (dump_class_hierarchy): Dump size and alignment.
7514
7515 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
7516
7517         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
7518         ICS_BAD_FLAG.
7519
7520 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
7521
7522         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
7523         is found, look first if name does not match the structure name.
7524
7525 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
7526
7527         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
7528         set.
7529         (SET_DECL_LANGUAGE): New macro.
7530         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
7531         (pushdecl): Likewise.
7532         (build_library_fn_1): Likewise.
7533         (build_cp_library_fn): Likewise.
7534         (grokfndecl): Likewise.
7535         (grokvardecl): Mark `extern "C"' variables as having C linkage.
7536         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
7537         * lex.c (retrofit_lang_decl): Likewise.
7538         * mangle.c (mangle_decl_string): Don't mangle the names of
7539         variables declared with C language linkage.
7540         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
7541
7542 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7543
7544         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
7545         flag_access_control from uninitialized storage.
7546
7547 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
7548
7549         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
7550         * mangle.c (write_pointer_to_member_type): Fix mangling of
7551         pointers to cv-qualified member function types.
7552
7553         * init.c (build_delete): Create a SAVE_EXPR for the address if
7554         we're going to use it more than once.
7555
7556 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
7557
7558         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
7559         (expand_ptremfunc_cst): Change prototype.
7560         (delta2_from_ptrmemfunc): Remove.
7561         * expr.c (cplus_expand_constant): Adjust call to
7562         expand_ptrmemfunc_cst.
7563         * typeck.c (build_ptrmemfunc1): Simplify.
7564         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
7565         results in a constant.
7566         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
7567         (delta2_from_ptrmemfunc): Remove.
7568         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
7569
7570 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
7571
7572         * cp-tree.h (decl_namespace_list): New macro.
7573         (struct saved_scope): Add decl_ns_list.
7574         * decl.c (mark_saved_scope): Mark it.
7575         * decl2.c: Lose static decl_namespace_list.
7576         (init_decl2): Don't save it.
7577
7578 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7579
7580         * cp-tree.h (warn_return_type, yylex): Delete redundant
7581         declarations.
7582
7583         * decl.c (current_class_depth, global_namespace): Likewise.
7584
7585         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
7586
7587         * repo.c (flag_use_repository): Likewise.
7588
7589 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7590
7591         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
7592         set_block, pushdecl, getdecls, gettags, init_decl_processing,
7593         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
7594         lvalue_or_else, print_lang_statistics, comp_target_types,
7595         unsigned_type, signed_type, signed_or_unsigned_type,
7596         build_function_call, mark_addressable, incomplete_type_error):
7597         Delete redundant declarations.
7598
7599 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
7600
7601         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
7602         (TYPE_ANONYMOUS_P): New macro.
7603         (TAGGED_TYPE_P): New macro.
7604         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
7605         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
7606         * tree.c (no_linkage_helper): Likewise.
7607         * semantics.c (begin_class_definition): Likewise.
7608         * pt.c (convert_template_argument): Likewise.
7609         * lex.c (check_for_missing_semicolon): Likewise.
7610
7611 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
7612
7613         * class.c (dfs_unshared_virtual_bases): New function.
7614         (mark_primary_bases): Call it.
7615         (check_bases): Ignore virtual bases when determining
7616         nearly-emptiness.
7617
7618 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
7619
7620         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
7621
7622 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
7623
7624         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
7625         cloned function to the clone.
7626
7627 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7628
7629         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
7630
7631         * semantics.c: Include expr.h.
7632
7633 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
7634
7635         * method.c (implicitly_declare_fn): Commonize code for copy ctor
7636         and assignment op. Set TREE_USED for parameter.
7637
7638 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
7639
7640         * class.c (find_final_overrider_data): Add `candidates'.
7641         (dfs_find_final_overrider): Don't issue error messages
7642         prematurely.
7643         (find_final_overrider): Issue error messages here.
7644         (build_base_field): Don't warn about amgibuous direct bases here.
7645         (warn_about_ambiguous_direct_bases): New function.
7646         (layout_class_type): Use it.
7647
7648 2001-04-10  Richard Henderson  <rth@redhat.com>
7649
7650         * typeck.c (build_array_ref): Push the array reference inside
7651         COMPOUND_EXPR and COND_EXPR.
7652
7653 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
7654
7655         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
7656         * decl.c (duplicate_decls): Adjust accordingly.
7657         (maybe_commonize_var): Likewise.
7658         (grokfndecl): Likewise.
7659         (start_function): Likewise.
7660         (start_method): Likewise.
7661         * decl2.c (key_method): Likewise.
7662         (import_export_decl): Likewise.
7663         * method.c (implicitly_declare_fn): Likewise.
7664         * optimize.c (maybe_clone_body): Likewise.
7665
7666 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
7667
7668         * lang-specs.h: Add __DEPRECATED.
7669
7670 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
7671
7672         * search.c (get_dynamic_cast_base_type): When building a new
7673         constant, set its type to ssizetype.
7674
7675 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
7676
7677         * optimize.c (expand_call_inline): Only add newly inlined statements
7678         into inlined_stmts.
7679
7680 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
7681
7682         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
7683         (OPERATOR_FORMAT): Likewise.
7684         (OPERATOR_TYPENAME_FORMAT): Likewise.
7685         * operators.def: Remove old name-mangling information.
7686         * decl.c (grok_op_properties): Adjust accordingly.
7687         * lex.c (init_operators): Likewise.
7688         * rtti.c (get_tinfo_decl): Issue error messages about types that
7689         have variable size.
7690
7691 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
7692
7693         * decl2.c (import_export_decl): Don't call import_export_class
7694         when processing an inline member function.
7695         * semantics.c (expand_body): Call import_export_decl before
7696         emitting inline functions.
7697
7698 2001-03-28  Richard Henderson  <rth@redhat.com>
7699
7700         IA-64 ABI Exception Handling:
7701         * cp-tree.def (EH_SPEC_BLOCK): New.
7702         (MUST_NOT_THROW_EXPR): New.
7703         * cp-tree.h: Update changed function declarations.
7704         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
7705         (CPTI_CALL_UNEXPECTED): New.
7706         (struct cp_language_function): Rename x_eh_spec_try_block
7707         to x_eh_spec_block.
7708         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
7709         * decl.c (current_binding_level): If no current function
7710         bindings, revert to scope_chain.
7711         (initialize_predefined_identifiers): Remove __cp_push_exception.
7712         (store_parm_decls): Use begin_eh_spec_block.
7713         (finish_function): Use finish_eh_spec_block.
7714         (mark_lang_function): Update for name changes.
7715         * decl2.c (finish_file): No mark_all_runtime_matches.
7716         * dump.c (cp_dump_tree): Handle new tree codes.
7717         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
7718         * except.c (catch_language_init, catch_language): Remove.
7719         (init_exception_processing): Don't set language code.
7720         Initialize call_unexpected_node, protect_cleanup_actions,
7721         eh_personality_libfunc, lang_eh_runtime_type.
7722         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
7723         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
7724         (prepare_eh_type): Split out type canonicalizations ...
7725         (build_eh_type_type): ... from here.
7726         (build_eh_type_type_ref): Remove.
7727         (mark_all_runtime_matches): Remove.
7728         (build_exc_ptr): New.
7729         (do_begin_catch, do_end_catch): New.
7730         (do_pop_exception): Remove.
7731         (build_terminate_handler): Remove.
7732         (choose_personality_routine): Split out language choice from ...
7733         (initialize_handler_parm): ... here.
7734         Use MUST_NOT_THROW_EXPR.
7735         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
7736         exception object handling.
7737         (expand_start_eh_spec, expand_end_eh_spec): Remove.
7738         (expand_exception_blocks, alloc_eh_object): Remove.
7739         (begin_eh_spec_block, finish_eh_spec_block): New.
7740         (do_allocate_exception, do_free_exception): New.
7741         (expand_throw): Merge into ...
7742         (build_throw): ... here.  Update for abi.
7743         * expr.c (cplus_expand_expr): No expand_internal_throw.
7744         Handle MUST_NOT_THROW_EXPR.
7745         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
7746         * semantics.c (*) Update for except.h name changes.
7747         (genrtl_try_block): No protect_with_terminate.
7748         (genrtl_eh_spec_block): New.
7749         (genrtl_handler): Don't emit the goto here.
7750         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
7751         (genrtl_finish_function): Don't expand_exception_blocks.
7752         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
7753
7754 2001-03-28  Richard Henderson  <rth@redhat.com>
7755
7756         * decl.c (struct named_label_list): Rename eh_region to
7757         in_try_scope, add in_catch_scope.
7758         (struct binding_level): Rename eh_region to is_try_scope,
7759         add is_catch_scope.
7760         (note_level_for_try): Rename from note_level_for_eh.
7761         (note_level_for_catch): New.
7762         (poplevel): Copy both is_try_scope and is_catch_scope to
7763         the named_label_list struct.
7764         (check_previous_goto_1): Don't check for catch block via
7765         DECL_ARTIFICIAL; use in_try_scope instead.
7766         (check_goto): Likewise.
7767         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
7768         * except.c (expand_start_catch_block): Call note_level_for_catch.
7769         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
7770
7771 2001-03-27  Richard Henderson  <rth@redhat.com>
7772
7773         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
7774         exceptions_via_longjmp.
7775
7776 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
7777
7778         * pt.c (check_default_tmpl_args):  Make error messages clearer.
7779
7780 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
7781
7782         * error.c:  Also undefine 'A' macro used for cp_printers definition.
7783
7784 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7785
7786         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
7787
7788 2001-03-26  Mike Yang <yang@research.att.com>
7789             Mark Mitchell  <mark@codesourcery.com>
7790
7791         * dump.c (dump_access): New function.
7792         (cp_dump_tree): Use it.  Dump basetype information for class
7793         types.
7794
7795 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
7796
7797         * Makefile.in (optimize.o): Depend on params.h.
7798         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
7799         (init_decl_processing): Set flag_no_inline when doing
7800         inlining-on-trees.
7801         * optimize.c: Include params.h.
7802         (struct inline_data): Improve documentation of FNS.  Add
7803         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
7804         (INSNS_PER_STMT): New macro.
7805         (remap_block): Use CLONING_P.
7806         (inlinable_function_p): Don't inline big functions.
7807         (expand_call_inline): Keep track of how much inlining we've done.
7808         (optimize_function): Set FIRST_INLINED_FN.
7809         (maybe_clone_body): Set CLONING_P.
7810         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
7811         tree nodes.
7812         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
7813         rest_of_compilation.  Clear DECL_RTL for local variables
7814         afterwards.
7815         (clear_decl_rtl): New function.
7816
7817 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
7818
7819         Implement DR 209
7820         * cp-tree.h (skip_type_access_control,
7821         reset_type_access_control): Prototype.
7822         * decl.c (grokdeclarator): Access of friends is not checked.
7823         * parse.y (component_decl_list): Reset type access control.
7824         * semantics.c (decl_type_access_control): Clear
7825         current_type_lookups.
7826         (save_type_access_control): Don't save if not deferring.
7827         (skip_type_access_control, reset_type_access_control): New
7828         functions.
7829         (begin_class_definition): Do type access control for basetypes.
7830         Start deferred access control.
7831         (finish_class_definition): Resume immediate access control if
7832         this is a local class.
7833
7834 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7835
7836         * class.c (add_method): Use memcpy/memmove, not bcopy.
7837
7838         * decl.c (duplicate_decls): Likewise.
7839
7840 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
7841
7842         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
7843         not `_'.
7844
7845 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
7846
7847         * decl.c (local_names): Define.
7848         (push_local_name): New.
7849         (grok_reference_init): Return init if initializing static reference
7850         variable with non-constant instead of emitting it.
7851         Move expand_static_init call to cp_finish_decl.
7852         (layout_var_decl): Call push_local_name.
7853         (maybe_commonize_var): Allow inlining functions even if they have
7854         static local variables, use comdat_linkage for them if flag_weak.
7855         (check_initializer): Call obscure_complex_init if
7856         grok_reference_init returned nonzero.
7857         (save_function_data): Clear x_local_names.
7858         (pop_cp_function_context): Free x_local_names.
7859         (mark_inlined_fns): Remove.
7860         (mark_lang_function): Mark x_local_names.
7861         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
7862         Mark inlined_fns as tree, remove call to mark_inlined_fns.
7863         * class.c (alter_access): Ensure DECL_ACCESS is never set if
7864         DECL_DISCRIMINATOR_P.
7865         * cp-tree.h (cp_language_function): Add x_local_names.
7866         (lang_decl_flags): Add discriminator into u2.
7867         (lang_decl_inlined_fns): Remove.
7868         (lang_decl): inlined_fns is now a TREE_VEC.
7869         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
7870         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
7871         TREE_VEC, not a custom structure.
7872         (optimize_function): Likewise.
7873         * mangle.c (discriminator_for_local_entity): Discriminate among
7874         VAR_DECL local entities.
7875         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
7876         is not valid.
7877
7878 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
7879
7880         Add support for Java interface method calls.
7881         * cp-tree.h (struct lang_type): Add java_interface flag.
7882         (TYPE_JAVA_INTERFACE): New macro.
7883         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
7884         by setting TYPE_JAVA_INTERFACE.
7885         * call.c (java_iface_lookup_fn): New static.
7886         (build_over_call): If calling a method declared in a
7887         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
7888         expression which resolves the function address.
7889         (build_java_interface_fn_ref): New function.
7890
7891 2001-03-22  Richard Henderson  <rth@redhat.com>
7892
7893         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
7894         * except.c: Don't include it.
7895
7896 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
7897             based on an idea from Joe Buck <jbuck@synopsys.com>
7898
7899         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
7900         New nonterminals.
7901         (data_def, component_decl): Add reductions to bad_decl.
7902
7903 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
7904
7905         * method.c (do_build_assign_ref): Don't use build_modify_expr for
7906         anonymous aggregates, since they don't have assignment operator
7907         method.
7908         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
7909         assignment operators for anonymous structure fields.
7910
7911 2001-03-21  Jason Merrill  <jason@redhat.com>
7912
7913         * pt.c (instantiate_decl): Abort if we see a member constant
7914         instantiation that doesn't already have its initializer.
7915         Downgrade explicit instantiation without definition to pedwarn.
7916
7917         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
7918         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
7919         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
7920
7921         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
7922         (pending_vtables): Remove.
7923         * decl2.c (pending_vtables): Remove.
7924         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
7925         CLASSTYPE_VTABLE_NEEDS_WRITING.
7926         (import_export_class): Likewise.
7927         (init_decl2): Don't mark pending_vtables.
7928         * lex.c (handle_pragma_vtable): Just sorry.
7929         * pt.c (instantiate_class_template): Don't mess with
7930         CLASSTYPE_VTABLE_NEEDS_WRITING.
7931         (mark_class_instantiated): Likewise.
7932         * ptree.c (print_lang_type): Don't print it.
7933         * semantics.c (begin_class_definition): Don't set it.
7934
7935         * pt.c (template_tail): Replace with last_pending_template.
7936         (maybe_templates, maybe_template_tail): Remove.
7937         (add_pending_template): Adjust.
7938         (instantiate_pending_templates): Adjust.
7939
7940         * cp-tree.h (struct saved_scope): Remove lang_stack field.
7941         (current_lang_stack): Remove.
7942         * decl.c (maybe_push_to_top_level): Don't initialize it.
7943         (duplicate_decls): Use current_lang_depth.
7944         (xref_basetypes): Likewise.
7945         * class.c (current_lang_depth): New fn.
7946         (push_lang_context): Use more varray functionality.
7947         (pop_lang_context): Likewise.
7948
7949         * error.c (GLOBAL_THING): Always use '__'.
7950
7951 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
7952
7953         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
7954
7955         * mangle.c (mangle_decl_string): Mangle the names of overloaded
7956         operators, even when they have `extern "C"' linkage.
7957
7958 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
7959
7960         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
7961         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
7962         where it's not necessary.
7963         (add_method): Remove optimization involving comparison of
7964         DECL_ASSEMBLER_NAME.
7965         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
7966         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
7967         where it's not necessary.
7968         (check_methods): Likewise.
7969         (build_clone): Likewise.
7970         (built_vtt): Likewise.
7971         * cp-tree.h (DECL_NEEDED_P): Likewise.
7972         * decl.c (pushtag): Likewise.
7973         (duplicate_decls): Likewise.
7974         (pushdecl): Likewise.
7975         (builtin_function): Likewise.
7976         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
7977         (build_cp_library_fn): Likewise.
7978         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
7979         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
7980         where it's not necessary.
7981         (make_rtl_for_nonlocal_decl): Likewise.
7982         (cp_finish_decl): Likewise.
7983         (grokfndecl): Likewise.
7984         (grokvardecl): Likewise.
7985         (grokdeclarator): Likewise.
7986         (start_function): Likewise.
7987         (cp_missing_return_ok_p): Likewise.
7988         * decl2.c (grokclassfn): Likewise.
7989         (check_classfn): Likewise.
7990         (finish_static_data_member_decl): Likewise.
7991         (grokfield): Likewise.
7992         * error.c (GLOBAL_IORD_P): Remove.
7993         (dump_global_iord): Improve output.
7994         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
7995         * except.c (nothrow_libfn_p): Summarily reject any function not in
7996         namespace-scope.
7997         * init.c (build_java_class_ref): Don't explicitly set
7998         DECL_ASSEMBLER_NAME after calling mangle_decl.
7999         * mangle.c (mangle_decl_string): Handle extern "C" functions.
8000         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
8001         * method.c (set_mangled_name_for_decl): Don't explicitly set
8002         DECL_ASSEMBLER_NAME after calling mangle_decl.
8003         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
8004         IDENTIFIER_GLOBAL_VALUE for the thunk.
8005         * pt.c (set_mangled_name_for_template_decl): Remove.
8006         (check_explicit_specialization): Don't use it.
8007         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
8008         (tsubst_friend_function): Likewise.
8009         (tsubst_decl): Likewise.
8010         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
8011         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
8012         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
8013         where it's not necessary.
8014         (tinfo_base_init): Likewise.
8015         (create_real_tinfo_var): Likewise.
8016         * search.c (looup_field_1): Likewise.
8017         * semantics.c (finish_named_return_value): Likewise.
8018         * tree.c (init_tree): Set lang_set_decl_assembler_name.
8019
8020 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
8021
8022         Correct semantics restrictions checking in throw-expression.
8023         * except.c (is_admissible_throw_operand): New function.
8024         (build_throw): Use it.
8025
8026 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
8027
8028         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
8029         and its ilk.
8030
8031 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
8032
8033         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
8034         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
8035         * decl.c (duplicate_decls): Likewise.
8036         (builtin_function): Likewise.
8037         (build_library_fn): Likewise.
8038         (build_cp_library_fn): Likewise.
8039         (check_initializer): Likewise.
8040         (cp_finish_decl): Likewise.
8041         * decl2.c (grokfield): Likewise.
8042         (grok_function_init): Remove #if 0'd code.
8043         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
8044         * friend.c (do_friend): Likewise.
8045         * init.c (get_temp_regvar): Likewise.
8046         * method.c (make_thunk): Likewise.
8047         * pt.c (tsubst_friend_function): Likewise.
8048         (tsubst_decl): Likewise.
8049         (regenerate_decl_from_template): Likewise.
8050         * semantics.c (genrtl_named_return_value): Likewise.
8051         (expand_body): Likewise.
8052         (genrtl_finish_function): Likewise.
8053         * tree.c (cp_tree_equal): Likewise.
8054
8055 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
8056
8057         * call.c (convert_like_real): Add extra semantics to INNER
8058         parameter. Don't convert to temporary if a user conversion
8059         gives us an lvalue that we're about to bind to a reference.
8060         Set INNER to indicate pending reference binding on recursive
8061         calls.
8062
8063 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
8064
8065         * cp/lex.c: Delete duplicate pending_lang_change.
8066
8067 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
8068
8069         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
8070         Similarly.
8071         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
8072         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
8073
8074 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
8075
8076         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
8077
8078 2001-03-08  Stan Shebs  <shebs@apple.com>
8079
8080         * cp-tree.h (set_identifier_local_value): Remove unused decl.
8081
8082 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
8083
8084         * spew.c: Remove references to CPP_OSTRING.
8085
8086 2001-03-06  Andrew Haley  <aph@redhat.com>
8087
8088         * typeck.c (convert_arguments): Check that we have an fndecl.
8089
8090 2001-03-05  Andrew Haley  <aph@redhat.com>
8091
8092         * typeck.c (convert_arguments): Don't do ellipsis conversion for
8093         __built_in_constant_p.
8094
8095 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
8096
8097         * typeck.c (build_static_cast): Allow enum to enum conversions
8098         as per DR 128.
8099
8100 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
8101
8102         * class.c (check_field_decls): Pointers to member do not a
8103         non-pod struct make, as per DR 148.
8104
8105 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
8106
8107         * call.c (joust): cp_pedwarn when using gnu extension concerning
8108         worst conversion sequences.
8109
8110 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
8111
8112         * decl.c: Replace all uses of 'boolean' with 'bool'.
8113
8114 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
8115
8116         * lang-specs.h: Add zero initializer for cpp_spec field to
8117         all array elements that need one.  Don't put an #ifdef inside
8118         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
8119         use it.
8120
8121 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
8122
8123         Implement using decls inside template functions.
8124         * decl2.c (validate_nonmember_using_decl): Don't special case
8125         fake_std_node in the global namespace. Don't reject early when
8126         processing a template.
8127         (do_local_using_decl): Add to statement tree. Don't do further
8128         processing when building a template.
8129         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
8130
8131 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
8132
8133         * decl2.c (do_nonmember_using_decl): Don't complain if we find
8134         same function. Do complain about ambiguating extern "C"
8135         declarations.
8136
8137 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
8138
8139         Remove floating point and complex type template constant parms.
8140         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
8141         COMPLEX_TYPE extensions.
8142         (invalid_nontype_parm_type_p): Likewise.
8143
8144 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
8145
8146         * except.c (call_eh_info): Revert "match_function"'s type.
8147
8148 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
8149
8150         Fix ctor vtable vcall offsets.
8151         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
8152         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
8153         (get_matching_base): Remove.
8154         (get_original_base): New function.
8155         (build_vtbl_initializer): Initialize vid.rtti_binfo.
8156         Use a virtual thunk for a ctor vtable with an index
8157         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
8158         primary base within a constructor vtable. Only set
8159         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
8160         when primary base has been lost.
8161         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
8162
8163 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
8164
8165         * call.c (joust): Ensure more_specialized()'s argument length
8166         parameter has correct value for constructors.
8167
8168 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
8169
8170         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
8171
8172         * decl.c (mark_inlined_fns): Prototype.
8173
8174 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
8175
8176         * spew.c (yylex): Correct handling of friends.
8177
8178 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
8179
8180         * mangle.c (write_encoding): Pass write_function_type the
8181         FUNCTION_DECL for the function being encoded.
8182         (write_function_type): Pass it along to write_bare_function_type.
8183         (write_bare_function_type): Pass it along to write_method_parms.
8184         (write_method_parms): Don't mangle the compiler-generated
8185         parameters to a constructor or destructor.
8186
8187 2001-02-22  Andreas Jaeger  <aj@suse.de>
8188
8189         * optimize.c: Include toplev.h for
8190         note_deferral_of_defined_inline_function prototype.
8191
8192 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
8193
8194         * cp-tree.h (struct lang_decl_inlined_fns): New.
8195         (struct lang_decls): Add inlined_fns.
8196         (DECL_INLINED_FNS): New macro.
8197         * optimize.c (struct inline_data): Add inlined_fns.
8198         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
8199         (inlinable_function_p): Likewise, fix typo in comment,
8200         function is not inlinable if it already inlined function currently
8201         being optimized.
8202         (expand_call_inline): Add fn to inlined_fns if necessary.
8203         (optimize_function): Initialize inlined_fns.
8204         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
8205         * decl.c (mark_inlined_fns): New function.
8206         (lang_mark_tree): Call it.
8207
8208 2001-02-21  Jason Merrill  <jason@redhat.com>
8209
8210         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
8211         (DECL_UNINLINABLE): Move to middle-end.
8212
8213         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
8214         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
8215         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
8216         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
8217         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
8218
8219         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
8220         second parm of op=.
8221
8222 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
8223
8224         * decl2.c (set_decl_namespace): Allow explicit instantiations in
8225         any namespace.
8226
8227 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8228
8229         * optimize.c (expand_call_inline): Don't walk subtrees of type
8230         nodes.
8231
8232 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
8233
8234         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
8235         for a destructor.
8236
8237 2001-02-18  Jason Merrill  <jason@redhat.com>
8238
8239         Do put the VTT parameter in DECL_ARGUMENTS.
8240         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
8241         (current_vtt_parm): New macro.
8242         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
8243         (DECL_HAS_VTT_PARM_P): New macro.
8244         (DECL_VTT_PARM): Remove.
8245         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
8246         * decl.c (duplicate_decls): Only copy the operator code if
8247         appropriate.
8248         (start_function): Set current_vtt_parm.
8249         (lang_mark_tree): Don't mark vtt_parm.
8250         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
8251         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
8252         * class.c (build_clone): Maybe remove the VTT parm.
8253         * optimize.c (maybe_clone_body): Set up the VTT parm.
8254         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
8255         * call.c (build_over_call): Just allow the VTT arg.
8256         * method.c (make_thunk): Don't set DECL_VTT_PARM.
8257         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
8258         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
8259         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
8260         * error.c (dump_function_decl): Likewise.
8261         * call.c (build_user_type_conversion_1, convert_like_real): Abort
8262         if we try to call a constructor with in-charge or VTT parms.
8263         * method.c (skip_artificial_parms_for): New fn.
8264         * call.c (add_function_candidate, build_over_call): Call it.
8265         * call.c (build_new_method_call): Use current_vtt_parm.
8266         * init.c (expand_virtual_init): Likewise.
8267         * class.c (same_signature_p): No longer static.
8268         * cp-tree.h: Declare it.
8269         * search.c (look_for_overrides_r): Use it.
8270
8271 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
8272
8273         * cp-tree.h (new_abi_rtti_p): Remove.
8274         (name_mangling_version): Likewise.
8275         (flag_do_squangling): Likewise.
8276         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
8277         * decl.c (grokfndecl): Likewise.
8278         * decl2.c (name_mangling_version): Remove.
8279         (flag_do_squangling): Likewise.
8280         (lang_f_options): Remove `squangle'.
8281         (unsupported_options): Add `squangle'.
8282         (cxx_decode_option): Issue a warning about uses of
8283         -fname-mangling-version.
8284         (finish_file): Remove old ABI support.
8285         * pt.c (check_explicit_specialization): Likewise.
8286         (tsubst_decl): Likewise.
8287         * rtti.c (init_rtti_processing): Likewise.
8288         (build_headof): Likewise.
8289         (get_tinfo_decl_dynamic): Likewise.
8290         (tinfo_from_decl): Likewise.
8291         (build_dynamic_cast_1): Likewise.
8292         (synthesize_tinfo_var): Likewise.
8293         * init.c (build_new): Allow enumeration types for the array-bounds
8294         in a direct-new-declarator.
8295
8296         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
8297
8298         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
8299         TREE_PROTECTED from the template being specialized.
8300
8301 2001-02-17  Jason Merrill  <jason@redhat.com>
8302
8303         * decl2.c (build_artificial_parm): Set TREE_READONLY.
8304
8305         * decl.c (bad_specifiers): Allow throw specs on things with
8306         pointer-to-function or -member-function type.
8307         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
8308         a pmf.
8309
8310 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
8311
8312         * call.c (check_dtor_name): Handle template names correctly.
8313
8314 2001-02-16  Jason Merrill  <jason@redhat.com>
8315
8316         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
8317         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
8318         * optimize.c (maybe_clone_body): Don't substitute it.
8319         * call.c (build_new_method_call): Check in_chrg instead.
8320         * init.c (expand_virtual_init): Likewise.
8321
8322 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
8323
8324         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
8325         class-type introduces at least a type-name.
8326
8327 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
8328
8329         * call.c (convert_like_real): Create a temporary for non-lvalue.
8330
8331 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
8332
8333         * cp-tree.h: Fix typos in comments.
8334
8335 2001-02-16  Jason Merrill  <jason@redhat.com>
8336
8337         * optimize.c (remap_block): If we're compiling a clone, pass the
8338         new block to insert_block.
8339
8340 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
8341
8342         * semantics.c (finish_asm_stmt): Robustify.
8343
8344 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
8345
8346         * pt.c (push_template_decl_real): Don't remangle the name of a
8347         class template.
8348
8349 2001-02-15  Jim Meyering  <meyering@lucent.com>
8350
8351         * Make-lang.in (c++.install-common): Depend on installdirs.
8352         (c++.install-info): Likewise.
8353         (c++.install-man): Likewise.
8354
8355 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
8356
8357         * typeck2.c (build_m_component_ref): Robustify.
8358
8359 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
8360
8361         * friend.c (do_friend): Don't take the nested [template] class
8362         into account when deciding whether to warn about the friend
8363         function not referring to a template function.
8364
8365 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
8366
8367         * typeck.c (build_unary_op): Clarify error message.
8368
8369 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
8370
8371         * parse.y (component_constructor_declarator): allow optional
8372         parentheses around constructor class name.
8373
8374 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
8375
8376         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
8377         section.
8378         * init.c (emit_base_init): Remove incorrect comment about
8379         virtual bases.
8380         * method.c (make_thunk): Fix comment alignment.
8381
8382 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
8383
8384         Kill remnants of this is variable.
8385         * cp-tree.h (flag_this_is_variable): Remove.
8386         * decl2.c (flag_this_is_variable): Remove.
8387         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
8388         (build_vbase_path): The path is non-static, even in a cdtor.
8389         (resolves_to_fixed_type_p): Add additional return value.
8390         * search.c (init_vbase_pointers): Adjust.
8391         * tree.c (lvalue_p_1): Adjust.
8392         * typeck.c (mark_addressable): Adjust.
8393
8394 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
8395
8396         * pt.c (unify): Don't check cv quals of array types.
8397
8398 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
8399
8400         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
8401         check whether we already have the type.
8402
8403 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
8404
8405         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
8406         * call.c (build_op_delete_call): Simplify to remove duplicate
8407         code.
8408         * class.c (clone_function_decl): Don't build the deleting variant
8409         of a non-virtual destructor.
8410         * decl.c (finish_destructor_body): Don't call delete if this is a
8411         non-virtual destructor.
8412         * init.c (build_delete): Explicitly call `operator delete' when
8413         deleting an object with a non-virtual destructor.
8414
8415 2001-02-13  Jason Merrill  <jason@redhat.com>
8416
8417         * lang-specs.h: Add more __EXCEPTIONS.
8418
8419 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
8420
8421         * typeck2.c (process_init_constructor): Check
8422         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
8423
8424 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
8425
8426         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
8427         Remove spurious information in comment. Allow further
8428         adjustments of REFERENCE_TYPE args.
8429
8430 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
8431
8432         * errfn.c (cp_deprecated): Tweak diagnostic text.
8433         * parse.y (new_initializer): Deprecate initializer lists
8434         extension.
8435
8436 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
8437
8438         Remove old ABI support.
8439
8440 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
8441
8442         * decl2.c (flag_vtable_thunks): Always set it to 1.
8443         (flag_new_abi): Likewise.
8444         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
8445
8446         * Makefile.in (g++spec.o): Fix typo.
8447
8448 2001-02-09  Jason Merrill  <jason@redhat.com>
8449
8450         * lang-specs.h: Restore definition of __EXCEPTIONS.
8451
8452 2001-02-08  Jason Merrill  <jason@redhat.com>
8453
8454         * search.c (shared_member_p): New function.
8455         (lookup_field_r): Use it.
8456         * cp-tree.h (SHARED_MEMBER_P): Remove.
8457
8458         * method.c (process_overload_item): Handle template-dependent array
8459         bounds.
8460         * pt.c (type_unification_real): If we end up with undeduced nontype
8461         parms, try again.
8462
8463         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
8464         types.
8465
8466         * typeck2.c (friendly_abort): Don't say anything if we have
8467         earlier errors or sorries.
8468
8469         * decl.c (check_tag_decl): Notice attempts to redefine bool and
8470         wchar_t.  Ignore if in_system_header.
8471
8472         * decl.c (maybe_push_cleanup_level): New fn...
8473         (start_decl_1): ...split out from here.
8474         * cvt.c (build_up_reference): Use it.
8475         * cp-tree.h: Declare it.
8476
8477 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
8478
8479         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
8480         spec.
8481
8482 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
8483
8484         * pt.c (lookup_template_class): Make sure it's a primary
8485         template or template_template_parm when called from the parser.
8486         (instantiate_template_class): Add assertion.
8487
8488 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
8489
8490         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
8491         from error_mark_node.
8492
8493 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
8494
8495         Fix specification and implementation bugs in V3 ABI
8496         construction vtables.
8497         * cp-tree.h (flag_dump_class_layout): New flag.
8498         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
8499         (BINFO_LOST_PRIMARY_P): New flag.
8500         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
8501         (BINFO_PRIMARY_MARKED_P): Rename to ...
8502         (BINFO_PRIMARY_P): ... here.
8503         (binfo_via_virtual): New prototype.
8504         * decl2.c (flag_dump_class_layout): New flag.
8505         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
8506         use `=' as a file name separator.
8507         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
8508         bases.
8509         (build_vtbl_address): If this is a virtual primary base, then
8510         get the vtbl of what it is ultimately primary for.
8511         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
8512         for BINFO_PRIMARY_P.
8513         (dfs_skip_nonprimary_vbases_markedp): Likewise.
8514         (get_shared_vbase_if_not_primary): Likewise.
8515         (dfs_get_pure_virtuals): Likewise.
8516         (expand_upcast_fixups): Likewise.
8517         (fixup_virtual_upcast_offsets): Likewise.
8518         (dfs_find_vbase_instance): Likewise.
8519         (find_vbase_instance): Likewise.
8520         (binfo_from_vbase): Adjust comment to reflect reality.
8521         (binfo_via_virtual): New function.
8522         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
8523         for binfo walking during VTT construction.
8524         (dfs_mark_primary_bases): Remove.
8525         (force_canonical_binfo_r): New function.
8526         (force_canonical_binfo): New function.
8527         (mark_primary_virtual_base): New function.
8528         (mark_primary_bases): Walk in inheritance graph order, use
8529         mark_primary_virtual_base.
8530         (determine_primary_base): Use some more intermediate variables.
8531         (dfs_find_final_overrider): Don't check for overriding along a
8532         virtual path.
8533         (dfs_modify_vtables): Walk into primary virtual bases too.
8534         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
8535         (build_base_fields): Likewise.
8536         (dfs_set_offset_for_unshared_vbases): Likewise.
8537         (layout_virtual_bases): Likewise.
8538         (end_of_class): Likewise.
8539         (finish_struct_1): Call dump_class_hierarchy, if requested.
8540         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
8541         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
8542         (dump_class_hierarchy): Add file parameter. Append to file, if
8543         required.
8544         (finish_vtbls): Adjust accumulate_vtbl_inits call.
8545         Use canonical base for virtual bases.
8546         (build_vtt): Add more comments. Adjust build_vtt_inits call.
8547         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
8548         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
8549         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
8550         virtual VTTs.
8551         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
8552         from DATA.  We want virtual primary bases and all bases via virtual.
8553         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
8554         virtual base when not a construction vtable.
8555         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
8556         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
8557         Use canonical bases when processing virtual bases.
8558         (accumulate_vtbl_inits): We're interested in any base via a
8559         virtual path.
8560         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
8561         within a construction vtable, determine what is being overridden.
8562         (build_vtbl_initializer): Add more comments
8563         (add_vcall_offset_vtbl_entries_1): Adjust comment.
8564         (build_rtti_vtbl_entries): Check if the base has lost its
8565         primary.
8566
8567 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
8568
8569         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
8570
8571 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8572
8573         * decl.c (pushdecl): Call abort instead of fatal.
8574         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
8575         * init.c (build_new_1): Likewise.
8576         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
8577         * decl.c (build_typename_type): hash_table_init now returns void.
8578         decl.c (init_decl_processing): Make an error non-fatal.
8579
8580 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
8581
8582         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
8583         Document.
8584         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
8585         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
8586         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
8587         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
8588         * decl.c (maybe_commonize_var): Use the new name-mangling where
8589         appropriate.
8590         * decl2.c (comdat_linkage): Enhance comments.  Make all
8591         compiler-generated things static, if COMDAT is not available.
8592         (get_tinfo_decl): Do not make typeinfo objects that belong in the
8593         library COMDAT.
8594         (tinfo_base_init): Use the correct mangled name for typeinfo
8595         strings, and push them into the global scope.
8596         (typeinfo_in_lib_p): New function.
8597         (synthesize_tinfo_var): Use it.
8598         (create_real_tinfo_var): Likewise.
8599
8600 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
8601
8602         * decl.c (push_class_binding): Use context_for_name_lookup instead
8603         of CP_DECL_CONTEXT.
8604         * search.c (context_for_name_lookup): Remove static.  Check for NULL
8605         context in the loop.
8606         * cp-tree.h (context_for_name_lookup): Add prototype.
8607
8608 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
8609
8610         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
8611         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
8612         Remove.
8613         * call.c (convert_class_to_reference, build_user_type_conversion_1,
8614         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
8615
8616 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
8617
8618         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
8619         of macros used when compiling g++spec.c.
8620         * g++spec.c (lang_specific_driver): Link with the shared
8621         libgcc by default.
8622
8623 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8624
8625         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
8626         make_reference_declarator, make_call_declarator), method.c
8627         (implicitly_declare_fn), parse.y (namespace_using_decl,
8628         notype_unqualified_id, expr_or_declarator, new_type_id,
8629         after_type_declarator, direct_after_type_declarator,
8630         notype_declarator, complex_notype_declarator,
8631         complex_direct_notype_declarator, qualified_id,
8632         notype_qualified_id, overqualified_id, direct_new_declarator,
8633         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
8634         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
8635         instead of build_parse_node.
8636
8637 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8638
8639         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
8640         (minus_one_node): Moved to top level gcc directory.  Renamed
8641         to integer_minus_one_node.
8642
8643         * init.c (init_init_processing): Don't set minus_one_node.
8644         (build_vec_init): Use integer_minus_one_node.
8645
8646         * rtti.c (get_tinfo_decl_dynamic): Likewise.
8647
8648 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
8649
8650         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
8651         identical and they would be replaced with constant, remove
8652         MODIFY_EXPR from the tree.
8653
8654 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8655
8656         * Make-lang.in: Remove all dependencies on defaults.h.
8657         * call.c: Don't include defaults.h.
8658         * decl.c: Likewise.
8659         * decl2.c: Likewise.
8660         * except.c: Likewise.
8661         * pt.c: Likewise.
8662         * rtti.c: Likewise.
8663         * tree.c: Likewise.
8664         * typeck.c: Likewise.
8665
8666 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
8667
8668         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
8669         operators even in "C" linkage.
8670         * method.c (set_mangled_name_for_decl): Likewise.
8671         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
8672         overloaded operators in "C" linkage.
8673
8674 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
8675
8676         * pt.c (tsubst_decl): Remove IN_DECL parameter.
8677         (tsubst_arg_types): Check parameter is not void.
8678         (tsubst): Adjust tsubst_decl call.
8679
8680 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
8681
8682         * call.c (add_builtin_candidate): Quote std properly, from
8683         previous change.
8684
8685 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8686
8687         * pt.c (check_explicit_specialization): Clone constructors and
8688         destructors.
8689
8690 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
8691
8692         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
8693         indicates anything special about template depth. Make sure we
8694         only count the user visible template classes.
8695
8696 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
8697
8698         * call.c (build_conv): Typo in comment.
8699         (add_builtin_candidate): Add more explanation.
8700         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
8701         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
8702         when we have enumeral types.
8703         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
8704         candidates for relops and eqops.
8705         (joust): Simplify control flow. Allow a non-template user
8706         function to hide a builtin.
8707
8708 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
8709
8710         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
8711         (more_specialized): Add deduction parameter.
8712         * call.c (joust): Adjust more_specialized call.
8713         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
8714         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
8715         (get_bindings_order): Remove.
8716         (get_bindings_real): Add DEDUCE parameter.
8717         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
8718         REFERENCE_TYPE jig for DEDUCE_ORDER.
8719         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
8720         maybe_adjust_types_for_deduction.
8721         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
8722         directly.
8723         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
8724         (check_cv_quals_for_unify): Use new unify qualifier flags.
8725         (unify): Clear new unify qualifier flags.
8726         (get_bindings_real): Add DEDUCE parameter.
8727         (get_bindings): Adjust call to get_bindings_real.
8728         (get_bindings_overload): Likewise.
8729         (most_specialized_instantiation): Adjust call to
8730         more_specialized.
8731
8732 2001-01-19  Jason Merrill  <jason@redhat.com>
8733
8734         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
8735
8736         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
8737         -fnew-abi.
8738
8739 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
8740
8741         * decl2.c (arg_assoc_class): Fix double iteration logic.
8742
8743 2001-01-19  Jason Merrill  <jason@redhat.com>
8744
8745         * init.c (build_delete): Always call convert_force to strip cv-quals.
8746
8747         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
8748         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
8749         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
8750
8751 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8752
8753         * search.c (get_vbase_1): Count only virtual bases.
8754
8755 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8756
8757         * class.c (duplicate_tag_error): Robustify flag clearing.
8758
8759 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8760
8761         * cp-tree.h (lookup_template_class): Add complain parm.
8762         * decl.c (lookup_namespace_name): Adjust call to
8763         lookup_template_class.
8764         (make_typename_type): Likewise.
8765         * semantics.c (finish_template_type): Likewise.
8766         * pt.c (lookup_template_class): Add complain parm. Adjust.
8767         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
8768         (tsubst): Likewise.
8769
8770 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8771
8772         * pt.c (copy_default_args_to_explicit_spec): Preserve
8773         object's CV quals. Reorganize.
8774
8775 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8776
8777         * typeck.c (build_modify_expr): Say `initialization' for
8778         INIT_EXPRs.
8779         * init.c (build_default_init): Convert to enumeral type, if
8780         needed.
8781
8782 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
8783
8784         * parse.y (nomods_initdcl0): Properly set things up for
8785         initdcl0_innards.
8786
8787 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8788
8789         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
8790         (type_unification_real): Set it.
8791         (unify): Use it.
8792
8793 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8794
8795         * decl.c (finish_destructor_body): Convert to vbase pointer here.
8796
8797 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8798
8799         * semantics.c (begin_class_definition): Check we're not inside a
8800         template parm list.
8801
8802 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8803
8804         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
8805         BASELINK_P.
8806
8807 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8808
8809         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
8810         * call.c (build_over_call): Add comment.
8811
8812 2001-01-16 Daniel Berlin <dberlin@redhat.com>
8813
8814         * cvt.c (ocp_convert): Handle vector type conversion
8815         * typeck2.c (digest_init): Handle vector type initializations
8816
8817 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
8818
8819         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
8820           was given.
8821
8822 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
8823
8824         * pt.c (check_nontype_parm): Rename to ...
8825         (invalid_nontype_parm_type_p): ... here.
8826         (process_template_parm): Adjust.
8827         (convert_template_argument): Adjust.
8828
8829 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
8830
8831         * pt.c (check_nontype_parm): New function.
8832         (process_template_parm): Use it.
8833         (convert_template_argument): Use it.
8834         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
8835         member.
8836
8837 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
8838
8839         * tree.c: Add defaults.h
8840         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
8841         * Make-lang.in (cp/tree.o): Add defaults.h.
8842
8843 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8844
8845         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
8846
8847 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8848
8849         * g++.1: Change to be ".so man1/gcc.1".
8850
8851 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8852
8853         * Make-lang.in (c++.info, c++.install-info): Build and install g++
8854         internals info.
8855         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
8856         ($(srcdir)/cp/g++int.info): New target.
8857         * gxxint.texi: Add info directory entry.  Use @@ in email address.
8858         * .cvsignore: Update.
8859
8860 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
8861
8862         * typeck.c (build_c_cast): Do template processing earlier.
8863         Always pedwarn on array casts.
8864
8865 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
8866
8867         * friend.c (make_friend_class): Make sure a templated class is
8868         actually a template.
8869
8870 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8871
8872         * decl2.c (get_guard): Set linkage from guarded decl.
8873
8874 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8875
8876         * call.c (convert_default_arg): Check for unprocessed
8877         DEFAULT_ARG.
8878         * cp-tree.h (replace_defarg): Move to spew.c.
8879         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
8880         spew.c, which is where they really are.
8881         (done_pending_defargs): Declare.
8882         (unprocessed_defarg_fn): Declare.
8883         * decl.c (replace_defarg): Move to spew.c
8884         * parse.y (structsp): Call done_pending_defargs.
8885         * spew.c (defarg_fns): Rearrange list structure.
8886         (defarg_fnsdone): New static variable.
8887         (defarg_depfns): New static variable.
8888         (init_spew): Adjust.
8889         (add_defarg_fn): Store the type in TREE_TYPE.
8890         (do_pending_defargs): Detect and deal with ordering constraints
8891         and circularity.
8892         (done_pending_defargs): New function.
8893         (unprocessed_defarg_fn): New function.
8894         (replace_defarg): Moved from decl.c. Robustify. Don't save
8895         if circularity detected.
8896
8897 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8898
8899         * pt.c (unify): Check array has a domain, before checking
8900         whether it is variable sized.
8901
8902 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8903
8904         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
8905         parameters with pointers to arrays of unknown bound.
8906
8907 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8908
8909         * parse.y (template_parm_header, template_spec_header): New
8910         reductions. Split out from ...
8911         (template_header): ... here. Use them.
8912         (template_template_parm): Use template_parm_header.
8913         * semantics.c (finish_template_template_parm): Add assert.
8914
8915 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
8916
8917         * mangle.c (write_builtin_type): Fix thinko.
8918
8919         * pt.c (copy_default_args_to_explicit_spec_1): New function.
8920         (copy_default_args_to_explicit_spec): Likewise.
8921         (check_explicit_specialization): Use it.
8922
8923         * class.c (finish_struct_1):  Remove last argument in call to
8924         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
8925         * decl.c (builtin_function): Likewise.
8926         (build_cp_library_fn): Likewise.
8927         (check_initializer): Likewise.
8928         (make_rtl_for_nonlocal_decl): Likewise.
8929         (cp_finish_decl): Likewise.
8930         (start_function): Likewise.
8931         * decl2.c (finish_anon_union): Likewise.
8932         * friend.c (do_friend): Likewise.
8933         * init.c (build_java_class_ref): Likewise.
8934         * method.c (make_thunk): Likewise.
8935         * pt.c (tsubst_friend_function): Likewise.
8936         * semantics.c (expand_body): Likewise.
8937
8938 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
8939
8940         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
8941         looking at DECL_CLONED_FUNCTION for non-functions.
8942
8943 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
8944
8945         * error.c (dump_template_parameter): Use parm to determine how
8946         to print default value.
8947
8948 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
8949
8950         * class.c (duplicate_tag_error): Clear more flags.
8951
8952 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
8953
8954         * call.c (build_new_method_call): Use binfo_for_vbase.
8955
8956 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
8957
8958         * cp-tree.h (flag_cond_mismatch): Don't declare.
8959         * decl2.c (flag_cond_mismatch): Don't define.
8960         (lang_f_options): Remove cond-mismatch.
8961         (unsupported_options): Add cond-mismatch.
8962
8963 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
8964
8965         * class.c (handle_using_decl): Reject using of constructor name
8966         of sourcing class. Allow injecting of a method with same name as
8967         nested class. Fixup error messages.
8968
8969 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
8970
8971         * decl2.c (lang_decode_option): Handle -Wformat=2.
8972
8973 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
8974
8975         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
8976         initialized_in_class.
8977         (DECL_DEFINED_IN_CLASS_P): Rename to ...
8978         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
8979         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
8980         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
8981         * pt.c (check_default_tmpl_args): Adjust for
8982         DECL_INITIALIZED_IN_CLASS_P.
8983         (instantiate_class_template): Likewise.
8984         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
8985
8986         * class.c (finish_struct): Constify saved_filename.
8987
8988 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
8989
8990         * class.c (duplicate_tag_error): Adjust diagnostic.
8991         (finish_struct): Locally set location to start of struct.
8992         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
8993
8994 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
8995
8996         * decl.c (struct binding_level): Adjust class_shadowed comments
8997         to reflect reality.
8998         (push_class_level_binding): Adjust comments to reflect reality.
8999         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
9000         Don't set TREE_VALUE on the class_shadowed list.
9001
9002 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9003
9004         * decl2.c (acceptable_java_type): Allow references too.
9005         * init.c (build_java_class_ref): When using the new ABI, search
9006         `class$' and have it mangled with `mangle_decl.'
9007         * mangle.c (write_java_integer_type_codes): New function.
9008         (write_builtin_type): Detect and mangle Java integer and real
9009         types.
9010
9011 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
9012
9013         * decl2.c (grokfield): Don't accept `asm' specifiers for
9014         non-static data members.
9015
9016 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9017
9018         * expr.c (cplus_expand_expr): Don't reset `target'.
9019
9020 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
9021
9022         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
9023
9024 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
9025
9026         * parse.y (template_datadef): Check for error_mark_node.
9027
9028 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
9029
9030         * cp-tree.def (DEFAULT_ARG): Make `x' class.
9031
9032 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
9033
9034         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
9035         (record_builtin_type): Make non-static.
9036         (flag_short_double): Don't declare.
9037         (init_decl_processing): Remove the creation of many tree nodes now
9038         in c_common_nodes_and_builtins.
9039         (build_void_list_node): New function.
9040         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
9041         * cp-tree.h (flag_short_wchar): Don't declare.
9042
9043 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
9044
9045         * call.c (build_conv): Don't use build1 for USER_CONV.
9046         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
9047
9048 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
9049
9050         * lex.c (lang_init): Call c_common_lang_init.
9051
9052 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
9053
9054         * search.c (lookup_fnfields_here): Remove.
9055         (look_for_overrides_r): Use lookup_fnfields_1.
9056         Ignore functions from using declarations.
9057
9058 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
9059
9060         Implement exceptions specifiers for implicit member functions.
9061         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
9062         * method.c (synthesize_exception_spec): New function.
9063         (locate_dtor, locate_ctor, locate_copy): New functions.
9064         (implicitly_declare_fn): Generate the exception spec too.
9065         * search.c (check_final_overrider): Check artificial functions
9066         too.
9067         * typeck2.c (merge_exception_specifiers): New function.
9068
9069 2001-01-03  Jason Merrill  <jason@redhat.com>
9070
9071         * init.c (build_default_init): New fn.
9072         (perform_member_init): Split out from here.
9073         (build_new_1): Use it.  Simplify initialization logic.
9074         (build_vec_init): Take an array, rather than a pointer and maxindex.
9075         Speed up simple initializations.  Don't clean up if we're assigning.
9076         * cp-tree.h: Adjust.
9077         * decl2.c (do_static_initialization): Remove TREE_VEC case.
9078         * parse.y (new_initializer): Return void_zero_node for ().
9079         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
9080         * typeck2.c (digest_init): Only complain about user-written
9081         CONSTRUCTORs.
9082
9083 2000-12-22  Mike Stump  <mrs@wrs.com>
9084
9085         * decl2.c: (max_tinst_depth): Increase to 50.
9086
9087 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
9088
9089         * class.c (invalidate_class_lookup_cache): Zero the
9090         previous_class_values.
9091         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
9092         TREE_INT_CST_HIGH.
9093         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
9094         * decl.c (free_bindings): New variable.
9095         (push_binding): Don't create a new binding if we have one on the
9096         free list.
9097         (pop_binding): Put old bindings on the free list.
9098         (init_decl_processing): Use size_int, not build_int_2.
9099         Register free_bindings as a GC root.
9100         (cp_make_fname_decl): Use size_int, not build_int_2.
9101         (push_inline_template_parms_recursive): Likewise.
9102         (end_template_parm_list): Likewise.
9103         (for_each_template_parm): Do not use walk_tree_without_duplicates.
9104         (tsubst_template_parms): Use size_int, not build_int_2.
9105         (tsubst): Likewise.
9106         * rtti.c (get_vmi_pseudo_type_info): Likewise.
9107
9108 2001-01-02  Richard Henderson  <rth@redhat.com>
9109
9110         * parse.y (asm): Set ASM_INPUT_P.
9111
9112 2001-01-02  Jason Merrill  <jason@redhat.com>
9113
9114         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
9115         for v3 ABI.
9116
9117         * typeck.c (cp_truthvalue_conversion): New fn.
9118         * cvt.c (ocp_convert): Use it.
9119
9120         * cp-tree.h: Lose c-common.c decls.
9121
9122         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
9123         * cvt.c (convert_to_void): Use type_unknown_p.
9124
9125         * typeck.c (strip_all_pointer_quals): Also strip quals from
9126         pointer-to-member types.
9127
9128         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
9129         parse.y as C.
9130
9131         * call.c (build_new_method_call): Do evaluate the object parameter
9132         when accessing a static member.
9133         * typeck.c (build_component_ref): Likewise.
9134
9135 2001-01-02  Andreas Jaeger  <aj@suse.de>
9136
9137         * decl.c (cp_missing_noreturn_ok_p): New.
9138         (init_decl_processing): Set lang_missing_noreturn_ok_p.
9139
9140 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
9141
9142         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
9143
9144 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
9145
9146         * class.c (pushclass): Remove #if 0'd code.
9147         * cp-tree.h (overload_template_name): Remove.
9148         * decl.c (store_bindings): Simplify.
9149         (pop_from_top_level): Likewise.
9150         * pt.c (overload_template_name): Remove.
9151         (instantiate_decl): Don't call push_to_top_level if it's not
9152         needed.
9153
9154 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
9155
9156         * pt.c (register_local_specialization): Don't return a value.
9157         (lookup_template_class): Use move-to-front heuristic when looking
9158         up template instantiations.
9159         (instantiate_decl): Only push_to_top_level when we're actually
9160         going to instantiate the template.
9161
9162 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
9163
9164         * search.c (binfo_for_vtable): Return least derived class, not
9165         most.  Handle secondary vtables.
9166
9167 2000-12-22  Jason Merrill  <jason@redhat.com>
9168
9169         * pt.c (more_specialized): Don't optimize len==0.
9170         (fn_type_unification): If we're adding the return type, increase len.
9171
9172         * typeck.c (build_binary_op): Fix pmf comparison logic.
9173
9174         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
9175         DECL_STATIC_FUNCTION_P.
9176
9177         * semantics.c (genrtl_finish_function): Don't try to jump to
9178         return_label unless it exists.
9179
9180         In partial ordering for a call, ignore parms for which we don't have
9181         a real argument.
9182         * call.c (joust): Pass len to more_specialized.
9183         (add_template_candidate_real): Strip 'this', pass len.
9184         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
9185         (get_bindings_order): New fn.  Pass len down.
9186         (get_bindings_real): Strip 'this', pass len.
9187         (fn_type_unification): Likewise.
9188         (type_unification_real): Succeed after checking 'len' args.
9189         (most_specialized_instantiation): Lose explicit_args parm.
9190         * class.c (resolve_address_of_overloaded_function): Strip 'this',
9191         pass len.
9192
9193 2000-12-21  Jason Merrill  <jason@redhat.com>
9194
9195         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
9196         DECL_TEMPLATE_RESULT.
9197
9198         * search.c (lookup_field_r): Call lookup_fnfields_1, not
9199         lookup_fnfields_here.
9200
9201         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
9202
9203         * call.c (build_object_call): Also allow conversions that return
9204         reference to pointer to function.
9205         (add_conv_candidate): Handle totype being ref to ptr to fn.
9206         (build_field_call): Also allow members of type reference to function.
9207         Lose support for calling pointer to METHOD_TYPE fields.
9208
9209         * error.c (dump_expr): Handle *_CAST_EXPR.
9210
9211         * typeck2.c (build_scoped_ref): Always convert to the naming class.
9212
9213         * tree.c (break_out_cleanups): Lose.
9214         * cp-tree.h: Remove prototype.
9215         * typeck.c (build_component_ref): Don't break_out_cleanups.
9216         (build_compound_expr): Likewise.
9217         * semantics.c (finish_expr_stmt): Likewise.
9218
9219 2000-12-20  Richard Henderson  <rth@redhat.com>
9220
9221         * cp-tree.h: Update declarations.
9222         * decl.c (finish_case_label): Return the new stmt node.
9223         * semantics.c (finish_goto_stmt): Likewise.
9224         (finish_expr_stmt, finish_return_stmt): Likewise.
9225         (finish_break_stmt, finish_continue_stmt): Likewise.
9226         (finish_asm_stmt): Likewise.
9227         * parse.y (already_scoped_stmt): Set STMT_LINENO.
9228         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
9229         (simple_if, simple_stmt): Return the new stmt node.
9230         (save_lineno): New.
9231
9232 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
9233
9234         * cp-tree.h: Don't declare warn_long_long.
9235
9236 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9237
9238         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
9239         IS_AGGR_TYPE.
9240
9241 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9242
9243         * pt.c (unify): Handle when both ARG and PARM are
9244         BOUND_TEMPLATE_TEMPLATE_PARM.
9245
9246 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9247
9248         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
9249         DECL_TEMPLATE_PARM_P.
9250
9251 2000-12-15  Jason Merrill  <jason@redhat.com>
9252
9253         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
9254
9255         * init.c (build_new_1): Don't strip quals from type.
9256
9257         * decl.c (pushdecl): Don't check for linkage on a non-decl.
9258
9259         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
9260
9261         * call.c (build_new_function_call): Lose space before paren in
9262         error message.
9263         (build_new_method_call): Likewise.
9264
9265         * typeck2.c (build_m_component_ref): Propagate quals from datum.
9266
9267 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9268
9269         * pt.c (check_explicit_specialization): Propagate default
9270         function arguments to explicit specializations.
9271
9272 2000-12-13  DJ Delorie  <dj@redhat.com>
9273
9274         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
9275         and <? operators.
9276
9277 2000-12-08  Jason Merrill  <jason@redhat.com>
9278
9279         * error.c (dump_function_name): Don't let the user see __comp_ctor.
9280
9281         Clean up copy-initialization in overloading code.
9282         * call.c (build_user_type_conversion_1): Die if we are asked to
9283         convert to the same or a base type.
9284         (implicit_conversion): Avoid doing so.  Lose reference binding code.
9285         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
9286         direct-initialization.  Also do direct-init part of copy-init.
9287         (build_user_type_conversion): Don't provide context to convert_like.
9288         * cvt.c (ocp_convert): build_user_type_conversion will now provide
9289         the constructor call for copy-init.
9290
9291         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
9292         instantiation of a member template.
9293         (do_decl_instantiation): Not here.
9294
9295 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
9296
9297         * class.c (check_field_decls): Don't special case anonymous
9298         fields in error messages.
9299         (note_name_declared_in_class): Use %D on diagnostic.
9300
9301         * tree.c (pod_type_p): Use strip_array_types.
9302         (cp_valid_lang_attribute): Likewise.
9303         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
9304         multiple evaluations.
9305         (cp_has_mutable_p): Use strip_array_types.
9306
9307 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
9308
9309         * cp-tree.h (sufficient_parms_p): Declare new function.
9310         * call.c (sufficient_parms_p): New function, broken out of ...
9311         (add_function_candidate): ... here. Use it.
9312         (add_conv_candidate): Use it.
9313         * decl.c (grok_ctor_properties): Use it.
9314
9315 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
9316
9317         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
9318
9319 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
9320
9321         * decl2.c (lang_decode_option): Handle -Wformat-security.
9322
9323 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9324
9325         * pt.c (verify_class_unification): New function.
9326         (get_class_bindings): Use it.
9327         (try_class_unification): Tidy.
9328         (unify): Handle when argument of a template-id is not
9329         template parameter dependent.
9330         (template_args_equal): Handle when TREE_CODE's do not match.
9331
9332 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
9333
9334         * lang-specs.h (c++): When invoking the stand-alone preprocessor
9335         for -save-temps, pass all relevant -Defines to it, and then don't
9336         pass them to cc1plus.
9337
9338 2000-12-05  Will Cohen  <wcohen@redhat.com>
9339
9340         * decl.c (finish_case_label): Cleared
9341         more_cleanups_ok in surrounding function scopes.
9342         (define_label): Likewise.
9343
9344 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
9345
9346         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
9347         (get_matching_virtual): Remove.
9348         (look_for_overrides): Declare new function.
9349         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
9350         DECL_VINDEX here.
9351         * class.c (check_for_override): Move base class iteration code
9352         to look_for_overrides.
9353         * search.c (next_baselink): Remove.
9354         (get_virtuals_named_this): Remove.
9355         (get_virtual_destructor): Remove.
9356         (tree_has_any_destructors_p): Remove.
9357         (struct gvnt_info): Remove.
9358         (check_final_overrider): Remove `virtual' from error messages.
9359         (get_matching_virtuals): Remove. Move functionality to ...
9360         (look_for_overrides): ... here, and ...
9361         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
9362         to be overriding.
9363
9364 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
9365
9366         * typeck.c (get_delta_difference): If via a virtual base,
9367         return zero.
9368         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
9369         adjustment.
9370
9371 2000-12-04  Richard Henderson  <rth@redhat.com>
9372
9373         * error.c (dump_tree): Use output_add_string not OB_PUTS.
9374
9375 2000-12-04  Jason Merrill  <jason@redhat.com>
9376
9377         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
9378         (write_builtin_type): Pass intSI_type_node and the like through
9379         type_for_mode.
9380         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
9381         Pass intSI_type_node and the like through type_for_mode.
9382         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
9383         * pt.c (tsubst, unify): Likewise.
9384         * tree.c (walk_tree): Likewise.
9385         * error.c (dump_type): Likewise.
9386         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
9387
9388         * Make-lang.in: Tweak top comment for emacs.
9389         (cp/TAGS): Restore.
9390
9391         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
9392
9393         * class.c (clone_function_decl): Robustify.
9394
9395 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
9396
9397         * decl.c (store_bindings): Only search in the non modified
9398         old_bindings for duplicates.
9399
9400 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
9401
9402         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
9403         TYPE_POLYMORPHIC_P.
9404
9405         * typeck.c (build_static_cast): Remove unused variable.
9406
9407 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9408
9409         * pt.c: Fix typo in comment.
9410
9411 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
9412
9413         * decl2.c (warn_format): Remove definition.
9414         (lang_decode_option): Handle -Wformat-nonliteral,
9415         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
9416
9417 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
9418
9419         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
9420         (init_decl_processing): Don't create string_type_node,
9421         const_string_type_node, wint_type_node, intmax_type_node,
9422         uintmax_type_node, default_function_type, ptrdiff_type_node and
9423         unsigned_ptrdiff_type_node.  Adjust position of call to
9424         c_common_nodes_and_builtins.
9425         (identifier_global_value): New function.
9426
9427 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
9428
9429         * call.c (standard_conversion): Reject pointer to member
9430         conversions from ambiguous, inaccessible or virtual bases.
9431         * typeck.c (build_static_cast): Don't check pointers to members
9432         specially.
9433
9434 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
9435
9436         * method.c (do_build_copy_constructor): Preserve cv
9437         qualifications when accessing source object members.
9438         (do_build_assign_ref): Likewise. Remove separate diagnostics for
9439         unnamed fields.
9440
9441 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
9442
9443         * method.c (do_build_assign_ref): Construct appropriately
9444         CV-qualified base reference. Don't allow const casts in base
9445         conversion.
9446
9447 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
9448
9449         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
9450         incomplete return type.
9451
9452 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9453
9454         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
9455         * semantics.c (finish_base_specifier): Accept a _TYPE not a
9456         _DECL.
9457
9458 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9459
9460         * spew.c (yyerror): Cope if yylval.ttype is NULL.
9461
9462 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9463
9464         * decl.c (grokdeclarator): Diagnose undefined template contexts.
9465
9466 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9467
9468         * decl.c (grokdeclarator): Do type access control on friend
9469         class.
9470
9471 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
9472
9473         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
9474         bison parser ickiness.
9475         * pt.c (tsubst_friend_function): Enter namespace scope when
9476         tsubsting the function name.
9477         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
9478
9479 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
9480
9481         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
9482         * cvt.c (cp_convert_to_pointer): Add force parameter.
9483         Allow conversions via virtual base if forced.
9484         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
9485         (ocp_convert): Likewise.
9486         * search.c (binfo_from_vbase): Return the virtual base's binfo.
9487         * typeck.c (get_delta_difference): Adjust handling of virtual
9488         bases.
9489
9490 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
9491
9492         * tree.c (struct list_hash): Remove.
9493         (list_hash_table): Make it be an htab.
9494         (struct list_proxy): New type.
9495         (list_hash_eq): New function.
9496         (list_hash_pieces): Renamed from ...
9497         (list_hash): ... this.
9498         (list_hash_lookup): Remove.
9499         (list_hash_add): Remove.
9500         (hash_tree_cons): Use the generic hashtable.
9501         (mark_list_hash): Remove.
9502         (init_tree): Create the hashtable.
9503
9504 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
9505
9506         * method.c (build_mangled_C9x_name): Rename to
9507         build_mangled_C99_name.  Change C9X references in comments to
9508         refer to C99.
9509
9510 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
9511
9512         * parse.y (unary_expr): Move VA_ARG from here ...
9513         (primary): ... to here.
9514
9515 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
9516
9517         * semantics.c (finish_id_expr): If type is error_mark, return
9518         error_mark.
9519
9520 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
9521
9522         * pt.c (lookup_template_class): Simplify loop exit constructs.
9523         Cope when there is no partial instantiation of a template
9524         template member.
9525
9526 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
9527
9528         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
9529
9530 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
9531
9532         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
9533         prefix.
9534
9535         * pt.c (do_decl_instantiate): Explicitly clone constructors and
9536         destructors that haven't already been cloned.
9537
9538 2000-11-20  Richard Henderson  <rth@redhat.com>
9539
9540         * parse.y (yyparse_1): Rename the parser entry point.
9541
9542 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
9543
9544         * mangle.c (write_name): Use <unscoped-name> for names directly in
9545         function scope.
9546         (write_unscoped_name): Accept names directly in function scope.
9547
9548 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
9549
9550         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
9551         * parse.y (extdef): Add EXPORT reduction.
9552         * spew.c (yylex): Don't skip export here.
9553
9554 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
9555
9556         * decl.c (init_decl_processing): Correct name of pure virtual
9557         function under the new ABI.
9558         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
9559         (throw_bad_typeid): Likewise for bad typeid function.
9560
9561 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
9562
9563         * decl.c (grokparms): Don't even function types of `void' type,
9564         either.
9565         * mangle.c (write_type): Don't crash when confronted with the
9566         error_mark_node.
9567
9568         * decl.c (grokparms): Don't create parameters of `void' type.
9569
9570 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
9571
9572         * lex.c (mark_impl_file_chain): Delete.
9573         (init_parse): Remove call to ggc_add_string_root.  No need to
9574         ggc_strdup a string constant.  Do not add impl_file_chain to GC
9575         roots.
9576         (handle_pragma_implementation): No need to ggc_strdup main_filename.
9577
9578 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9579
9580         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
9581
9582 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9583
9584         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
9585         * decl.c (grokdeclarator): Don't reject void parms here.
9586         (require_complete_types_for_parms): Simplify, use
9587         complete_type_or_else.
9588         (grokparms): Remove bitrot. Remove funcdef parm.
9589         Deal with ellipsis parm lists here.
9590         * semantics.c (finish_parmlist): Don't append void_list_node
9591         here. Set PARMLIST_ELLIPSIS_P.
9592
9593 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9594
9595         * typeck2.c (incomplete_type_error): Reorganize to avoid
9596         excessive diagnostics.
9597
9598 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
9599
9600         * lex.c (struct impl_files, internal_filename): Constify a char *.
9601
9602 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
9603
9604         * mangle.c (write_special_name_constructor): Don't generate
9605         assembler junk when confronted with an old-style constructor.
9606         (write_special_name_destructor): Likewise.
9607         (mangle_decl_string): Do it here instead.
9608
9609 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
9610
9611         * call.c (op_error): Make error messages clearer.
9612
9613 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
9614
9615         * decl.c (wrapup_globals_for_namespace): Don't mark things
9616         TREE_ASM_WRITTEN when they're not.
9617
9618 2000-11-15  Jason Merrill  <jason@redhat.com>
9619
9620         * typeck2.c (friendly_abort): Uncount the error before handing
9621         off to fancy_abort.
9622
9623 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
9624
9625         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
9626
9627 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
9628
9629         * class.c (build_vtbl_initializer): Fix typo in comment.
9630         * typeck.c (expr_sizeof): Don't crash on errors.
9631
9632 2000-11-14  Jim Wilson  <wilson@redhat.com>
9633
9634         * lang-specs.h: Add %2 after %(cc1_options).
9635
9636 2000-11-14  Richard Henderson  <rth@redhat.com>
9637
9638         * typeck.c (c_sizeof): Be strict about casting result value
9639         back to c_size_type_node.
9640         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
9641
9642 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9643
9644         * typeck.c (build_unary_op): Use boolean_increment from
9645         c-common.c, moving the relevant code there.
9646
9647 2000-11-11  Jason Merrill  <jason@redhat.com>
9648
9649         * typeck.c (mark_addressable): Don't call put_var_into_stack.
9650
9651         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
9652         in inlines.
9653
9654 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9655
9656         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
9657         * lex.c (copy_lang_decl): Likewise.
9658
9659 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
9660
9661         * dump.c (cp_dump_tree): Don't dump function bodies here.
9662
9663         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
9664         (dump.o): Update dependency list.
9665         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
9666         (flag_dump_translation_unit): Likewise.
9667         (CP_TYPE_QUALS): Adjust definition.
9668         (DECL_C_BIT_FIELD): Remove.
9669         (SET_DECL_C_BIT_FIELD): Likewise.
9670         (CLEAR_DECL_C_BIT_FIELD): Likewise.
9671         (add_maybe_template): Likewise.
9672         (strip_array_types): Likewise.
9673         (dump_node_to_file): Likewise.
9674         (cp_dump_tree): New function.
9675         * decl.c (init_decl_processing): Set lang_dump_tree.
9676         * decl2.c (flag_dump_translation_unit): Remove.
9677         * dump.c: Move most of it to ../c-dump.c.
9678         (cp_dump_tree): New function.
9679         * pt.c (add_maybe_template): Remove.
9680         * typeck.c (strip_array_types): Likewise.
9681
9682 2000-11-07  Eric Christopher  <echristo@redhat.com>
9683
9684         * decl.c (init_decl_processing): Change definition of
9685         __wchar_t to wchar_t.  Remove artificial declaration of
9686         wchar_t.
9687         * lex.c: Change instances of __wchar_t to wchar_t.
9688
9689 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
9690
9691         * lex.c (do_identifier): Don't lookup_name for operators.
9692         * parse.y (operator): Save looking_for_typename.
9693         (unoperator): Restore it.
9694         * spew.c (frob_opname): Use nth_token for lookahead.
9695
9696 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
9697
9698         * decl.c (grok_op_properties): Always use coerce_new_type and
9699         coerce_delete_type.
9700         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
9701         exception specification. Tidy up.
9702         (coerce_delete_type): Preserve exception specification. Tidy up.
9703
9704 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
9705
9706         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
9707         (push_binding_level), error.c (cp_tree_printer), pt.c
9708         (process_partial_specialization, tsubst_template_arg_vector),
9709         search.c (lookup_member): Use memset () instead of bzero ().
9710
9711 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
9712
9713         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
9714
9715 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
9716
9717         * Make-lang.in (c++.distdir): Remove.
9718
9719 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
9720
9721         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
9722         declarations from different namespaces to be combined.
9723
9724 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
9725
9726         * decl.c: Include tm_p.h.
9727
9728 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
9729
9730         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
9731
9732 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
9733
9734         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
9735         (build_overload_value), repo.c (open_repo_file), xref.c
9736         (open_xref_file): Use strchr () and strrchr () instead of index ()
9737         and rindex ().
9738
9739 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
9740
9741         * call.c (build_over_call): Call fold on the CALL_EXPR.
9742
9743 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
9744
9745         * error.c (dump_template_decl): Separate template hearders with
9746         space not comma.
9747
9748 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
9749
9750         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
9751         TS_* flags with corresponding TFF_*.  Adjust prototypes of
9752         functions (which used to take a tree_string_flags) to take an int.
9753
9754         * cp-tree.h (enum tree_string_flags): Remove
9755         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
9756         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
9757         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
9758         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
9759         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
9760         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
9761         (type_as_string, decl_as_string, expr_as_string,
9762         context_as_string): Adjust prototype.
9763
9764         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
9765         instead of TS_PLAIN.
9766
9767         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
9768         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
9769         plain `0'.
9770
9771 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
9772
9773         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
9774         (linkage_kind): New enumeration.
9775         (decl_linkage): New function.
9776         * decl2.c (comdat_linkage): Extend comment.
9777         * error.c (dump_function_decl): Print the arguments used to
9778         instantiate a template, even when not printing the type of the
9779         function.
9780         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
9781         not TREE_PUBLIC, to test for external linkage.
9782         * tree.c (decl_linkage): New function.
9783
9784 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
9785
9786         * pt.c (instantiate_decl): Always instantiate static data members
9787         initialized in-class.
9788
9789 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
9790
9791         * Make-lang.in: Move all build rules here from Makefile.in,
9792         adapt to new context.  Wrap all rules that change the current
9793         directory in parentheses.  Expunge all references to $(P).
9794         When one command depends on another and they're run all at
9795         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
9796         all object-file generation rules.  Delete obsolete variables.
9797
9798         * Makefile.in: Delete.
9799         * config-lang.in: Delete outputs= line.
9800
9801 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
9802
9803         * error.c (dump_function_decl): Print no space between
9804         `ptr-operator' the `type-specifier' of the return type.
9805         (dump_type_prefix): Make sure we put space at the appropriate
9806         place.
9807
9808 2000-10-23  Jason Merrill  <jason@redhat.com>
9809
9810         * call.c (equal_functions): Also call decls_match for extern "C" fns.
9811
9812 2000-10-22  Jason Merrill  <jason@redhat.com>
9813
9814         * call.c (build_conditional_expr): Use ocp_convert to force
9815         rvalue conversion.
9816
9817 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
9818
9819         * call.c (standard_conversion): Use RVALUE_CONVs for all
9820         expressions that satisfy lvalue_p, not just those that satisfy
9821         real_lvalue_p.
9822
9823         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
9824
9825         * typeck.c (c_sizeof): Return an expression of `size_t' type,
9826         not one with TYPE_IS_SIZETYPE set.
9827         (dubious_conversion_warnings): Remove special-case code.
9828
9829 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
9830
9831         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
9832         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
9833         (dump_type_prefix): Print vector-of-int as 'int vector'.
9834         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
9835         * tree.c (walk_tree): Handle VECTOR_TYPE.
9836
9837         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
9838
9839 2000-10-21  Jason Merrill  <jason@redhat.com>
9840
9841         * parse.y (operator): Set got_object from got_scope.
9842         Set looking_for_typename.
9843         * decl.c (lookup_name_real): Clear val after setting from_obj.
9844         Reorganize diagnostic.
9845
9846 2000-10-20  Jason Merrill  <jason@redhat.com>
9847
9848         * tree.c (walk_tree): Don't walk into default args.
9849
9850         * error.c (dump_expr): Use host_integerp.
9851
9852 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
9853
9854         * typeck2.c (abstract_virtuals_error): Use "because" instead of
9855         "since" in error message.
9856
9857 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9858
9859         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
9860
9861 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
9862
9863         * decl.c (revert_static_member_fn): Fixed typo.
9864
9865 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
9866
9867         * class.c (subobject_offset_fn): New type.
9868         (dfs_record_base_offsets): Remove.
9869         (record_base_offsets): Likewise.
9870         (dfs_search_base_offsets): Likewise.
9871         (record_subobject_offset): New function.
9872         (check_subobject_offset): Likewise.
9873         (walk_subobject_offsets): Likewise.
9874         (record_subobject_offsets): Likewise.
9875         (layout_conflict_p): Reimplement.
9876         (layout_nonempty_base_or_field): Correct handling of type
9877         conflicts during layout.
9878         (layout_empty_base): Likewise.
9879         (build_base_field): Adjust to handle new representation of empty
9880         base offset table.
9881         (build_base_fields): Likewise.
9882         (layout_virtual_bases): Likewise.
9883         (splay_tree_compare_integer_csts): New function.
9884         (layout_class_type): Use a splay_tree, rather than a varray, to
9885         represent the offsets of empty bases.
9886
9887         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
9888         * decl.c (select_decl): Don't return declarations that are
9889         DECL_ANTICIPATED.
9890
9891 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
9892
9893         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
9894         (fake_std_node): New macro.
9895         * decl.c (in_std): Rename to ...
9896         (in_fake_std): ... this.
9897         (flag_no_builtin): Remove.
9898         (flag_no_nonansi_builtin): Likewise.
9899         (walk_namespaces_r): Use fake_std_node.
9900         (push_namespace): Use std_identifier.
9901         (pop_namespace): Use in_fake_std.
9902         (lookup_name_real): Use fake_std_node.
9903         (init_decl_processing): When -fhonor-std, create the `std'
9904         namespace.  Don't create a dummy fake_std_node in that case.
9905         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
9906         (builtin_function): Put builtins whose names don't begin
9907         with `_' in the std namespace.
9908         * decl2.c (flag_no_builtin): Remove.
9909         (flag_no_nonansi_builtin): Likewise.
9910         (set_decl_namespace): Use fake_std_node.
9911         (validate_nonmember_using_decl): Likewise.
9912         (do_using_directive): Likewise.
9913         (handle_class_head): Likewise.
9914         * dump.c (dequeue_and_dump): Likewise.
9915         * except.c (init_exception_processing): Use std_identifier.
9916         * init.c (build_member_call): Use fake_std_node.
9917         * rtti.c (init_rtti_processing): Use std_identifier.
9918
9919 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
9920
9921         * cp-tree.h (back_end_hook): Remove declaration.
9922         * decl2.c (back_end_hook): Remove definition.
9923
9924         * dump.c (dequeue_and_dump): Dump TREE_USED.
9925
9926 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
9927
9928         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
9929
9930 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
9931
9932         * decl.c (WINT_TYPE): Define.
9933         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
9934         c_size_type_node, signed_size_type_node and wint_type_node.
9935
9936 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
9937
9938         * decl2.c (warn_missing_format_attribute): New variable.
9939         (lang_decode_option): Decode -Wmissing-format-attribute.
9940
9941 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
9942
9943         * typeck.c (qualify_type): Remove.
9944         (composite_pointer_type): Fix handling of conversions to `cv void*'.
9945
9946 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9947
9948         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
9949
9950 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9951
9952         * Makefile.in (parse.c, parse.h): Create atomically.
9953
9954 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
9955
9956         * class.c (current_obstack): Remove.
9957         * decl.c (ggc_p): Remove.
9958         (start_decl): Don't use decl_tree_cons.
9959         (grokdeclarator): Don't use build_decl_list.
9960         (start_function): Don't use decl_tree_cons.
9961         (finish_function): Don't mess with obstacks.
9962         * decl2.c (grok_x_components): Don't use build_decl_list.
9963         * lex.c (make_call_declarator): Don't call decl_tree_cons.
9964         (implicitly_declare_fn): Don't call build_decl_list.
9965         * parse.y (frob_specs): Don't call build_decl_list or
9966         decl_tree_cons.
9967         (expr_or_declarator_intern): Don't call decl_tree_cons.
9968         (primary): Don't call build_decl_list.
9969         (fcast_or_absdcl): Likewise.
9970         (typed_declspecs): Don't call decl_tree_cons.
9971         (reserved_declspecs): Don't call build_decl_list.
9972         (declmods): Likewise.
9973         (reserved_typespecquals): Likewise.
9974         (aggr): Likewise.
9975         (new_type_id): Likewise.
9976         (cv_qualifiers): Likewise.
9977         (after_type_declarator_intern): Likewise.
9978         (notype_declarator_intern): Likewise.
9979         (absdcl_intern): Likewise.
9980         (named_parm): Likewise.
9981         * pt.c (most_specialized_class): Likewise.
9982         * repo.c (temporary_obstack): Make it a structure, not a pointer.
9983         (init_repo): Initialize it.
9984         * search.c (current_obstack): Remove.
9985         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
9986
9987 2000-10-09  Richard Henderson  <rth@cygnus.com>
9988
9989         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
9990         (c++ language support bits for libgcc): Remove.
9991         (c++.clean): Remove cplib2.txt cleanup.
9992         * config-lang.in (headers, lib2funcs): Remove.
9993
9994         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
9995         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
9996         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
9997         * inc/new.h, inc/typeinfo: Remove files.
9998
9999 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
10000
10001         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
10002         defined.
10003         (init_decl_processing): Initialize intmax_type_node and
10004         uintmax_type_node.
10005
10006 2000-10-06  Richard Henderson  <rth@cygnus.com>
10007
10008         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
10009         (original_result_rtx): Remove.
10010         * decl.c (save_function_data): Don't clear x_result_rtx.
10011         (mark_lang_function): Don't mark it either.
10012         * expr.c (fixup_result_decl): Remove.
10013         * semantics.c (genrtl_named_return_value): Frob the return decl
10014         before calling emit_local_var.
10015         (genrtl_finish_function): Don't call fixup_result_decl.
10016         Always emit the jump to return_label.
10017
10018 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
10019
10020         * pt.c (lookup_template_class): Set current access for enum.
10021         (tsubst_enum): Set file & line for enum decl.
10022
10023         * spew.c (yylex): Remove unused variable.
10024
10025 2000-10-05  Richard Henderson  <rth@cygnus.com>
10026
10027         * semantics.c (genrtl_finish_function): Don't init or check
10028         can_reach_end; remove noreturn and return value checks.
10029
10030 2000-10-05  Tom Tromey  <tromey@cygnus.com>
10031
10032         * init.c (build_java_class_ref): Use `build_static_name' with a
10033         suffix, not a prefix, to build the class object's name.
10034
10035 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
10036
10037         * cp-tree.h (access_kind): Fix comment typo.
10038         * decl2.c (grokfield): Fix diagnostic typo.
10039         * semantics.c (finish_template_type): Fix comment typo.
10040         (finish_qualified_object_call_expr): Likewise.
10041
10042 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
10043
10044         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
10045         tsubsting fails.
10046
10047 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
10048
10049         * spew.c (frob_id): New static function.
10050         (frob_opname): Use it.
10051         (yylex): Use it.
10052
10053 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
10054
10055         * decl.c (lang_mark_false_label_stack): Remove.
10056         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
10057
10058 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
10059
10060         * gxxint.texi: Use @email for formatting email addresses.
10061
10062 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
10063
10064         * error.c: Remove direct obstack manipulation.  Replace with
10065         output_buffer-based formatting.  Adjust calls to removed macros.
10066         (obstack_chunk_alloc, obstack_chunk_free): Remove.
10067         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
10068         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
10069
10070 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
10071
10072         * ir.texi: Move to ../c-tree.texi.
10073
10074 2000-09-20  Jason Merrill  <jason@redhat.com>
10075
10076         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
10077
10078 2000-09-21  Andreas Jaeger  <aj@suse.de>
10079
10080         * errfn.c: Move declaration of cp_printer and cp_printers to ...
10081         * cp-tree.h: ... here.
10082
10083         * error.c: Remove declaration of cp_printer.
10084
10085 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
10086
10087         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
10088
10089 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
10090
10091         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
10092         users.
10093
10094 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
10095
10096         * decl.c (start_function): Robustify.
10097
10098 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10099
10100         * cp-tree.h (check_function_format): Accept a `status' parameter.
10101
10102         * call.c, typeck.c: Updates calls to `check_function_format'.
10103
10104 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
10105
10106         * decl2.c (handle_class_head): Always push some scope even
10107         in the error case.
10108
10109 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
10110
10111         * cp-tree.h (struct cp_language_function): Remove
10112         x_scope_stmt_stack and name_declared.
10113         (current_scope_stmt_stack): Remove.
10114         (function_name_declared_p): New macro.
10115         (struct lang_decl_flags): Use c_lang_decl as a base class.
10116         (context): Remove.
10117         (struct lang_decl): Replace saved_tree with context.
10118         (DECL_FRIEND_CONTEXT): Adjust accordingly.
10119         (SET_DECL_FRIEND_CONTEXT): Likewise.
10120         (DECL_VIRTUAL_CONTEXT): Likewise.
10121         (DECL_SAVED_TREE): Remove.
10122         (C_DECLARED_LABEL_FLAG): Likewise.
10123         (cplus_expand_expr_stmt): Don't declare.
10124         (add_decl_stmt): Likewise.
10125         (add_scope_stmt): Likewise.
10126         * decl.c (mark_stmt_tree): Remove.
10127         (case_compare): Likewise.
10128         (finish_case_label): Use c_add_case_label.
10129         (init_decl_processing): Set more language-specific hooks.
10130         (build_enumerator): Fix typo in comment.
10131         (cplus_expand_expr_stmt): Remove.
10132         (mark_lang_function): Use mark_c_language_function.
10133         (lang_mark_tree): Use c_mark_lang_decl.
10134         * decl2.c: Change order of inclusion.
10135         * except.c: Likewise.
10136         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
10137         back on c_expand_expr.
10138         * friend.c: Include expr.h.
10139         * init.c: Change order of inclusion.
10140         * Makefile.in: Update dependencies.
10141         * lex.h (free_lang_decl_chain): Remove.
10142         * optimize.c (maybe_clone_body): Use function_name_declared_p.
10143         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
10144         it doesn't exist.
10145         (instantiate_decl): Use function_name_declared_p.
10146         * semantics.c (lang_expand_expr_stmt): Remove.
10147         (set_current_function_name_declared): Likewise.
10148         (current_function_name_declared): Likewise.
10149         (begin_compound_stmt): Use function_name_declared_p.
10150         (add_decl_stmt): Remove.
10151         (setup_vtbl_ptr): Use function_name_declared_p.
10152         (add_scope_stmt): Remove.
10153         (current_scope_stmt_stack): New function.
10154         (cp_expand_stmt): Don't handle SCOPE_STMTs.
10155         (expand_body): Use function_name_declared_p.
10156         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
10157         * typeck.c: Change order of includes.
10158         (convert_sequence): Remove.
10159
10160 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
10161
10162         * lex.c (reswords): Add _Complex.
10163
10164 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10165
10166         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
10167
10168 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
10169
10170         * init.c (begin_init_stmts): Don't use // comments.
10171
10172 2000-09-12  Jason Merrill  <jason@redhat.com>
10173
10174         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
10175         all non-extern arrays.
10176
10177         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
10178         typenames, too.  Downgrade complaint to pedwarn.
10179         (xref_tag): Warn about surprising behavior of 'friend struct T'.
10180         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
10181         'class This::Inherited'.
10182
10183 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
10184
10185         * decl.c (finish_case_label): Given the LABEL_DECL a
10186         DECL_CONTEXT.
10187
10188 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
10189
10190         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
10191         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
10192         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
10193         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
10194         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
10195         New macros.
10196         (sorry_for_unsupported_tree, print_scope_operator,
10197         print_left_paren, print_right_paren, print_left_bracket,
10198         print_right_bracket, print_whitespace): Likewise.
10199         (aggr_variety): Rename to class_key_or_enum.
10200         (print_type): Rename to print_type_id.
10201         (print_type_specifier_seq, print_simple_type_specifier,
10202         print_elaborated_type_specifier,
10203         print_rest_of_abstract_declarator,
10204         print_parameter_declaration_clause, print_exception_specification,
10205         print_nested_name_specifier, print_template_id,
10206         typedef_original_name,  print_template_argument_list_start,
10207         print_template_argument_list_end): New functions.
10208
10209 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
10210
10211         * ir.texi: Add more documentation.
10212
10213 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
10214
10215         * cp-tree.h (struct saved_scope): Remove x_function_parms.
10216         (current_function_parms): Don't define.
10217         (struct cp_language_function): Remove parms_stored.
10218         (current_function_just_assigned_this): Don't define.
10219         (current_function_parms_stored): Likewise.
10220         (static_ctors): Declare.
10221         (static_dtors): Likewise.
10222         (SF_EXPAND): Don't define.
10223         (expand_start_early_try_stmts): Remove declaration.
10224         (store_parm_decls): Likewise.
10225         * decl.c (static_ctors): Don't declare.
10226         (static_dtors): Likewise.
10227         (struct binding_level): Remove this_block.
10228         (poplevel): Remove dead code.
10229         (set_block): Likewise.
10230         (mark_binding_level): Don't mark this_block.
10231         (mark_saved_scope): Don't mark x_function_parms.
10232         (init_decl_processing): Don't add current_function_parms as a GC
10233         root.
10234         (check_function_type): Change prototype.
10235         (start_function): Remove RTL-generation code.
10236         (expand_start_early_try_stmts): Remove.
10237         (store_parm_decls): Give it internal linkage.  Remove
10238         RTL-generation code.
10239         (finish_function): Remove RTL-generation code.
10240         * decl2.c (static_ctors): Fix formatting.
10241         (static_dtors): Likewise.
10242         * method.c (use_thunk): Don't call store_parm_decls.
10243         (synthesize_method): Likewise.
10244         * optimize.c (maybe_clone_body): Likewise.
10245         * parse.y (fn.def2): Likewise.
10246         (.set_base_init): Likewise.
10247         (nodecls): Likewise.
10248         * pt.c (instantiate_decl): Likewise.
10249         * rtti.c (synthesize_tinfo_fn): Likewise.
10250         * semantics.c (genrtl_try_block): Simplify.
10251         (expand_body): Use genrtl_start_function and
10252         genrtl_finish_function.
10253         (genrtl_start_function): New function.
10254         (genrtl_finish_function): Likewise.
10255
10256 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
10257
10258         * error.c (cp_tree_printer, case 'P'): Append break.
10259
10260 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
10261
10262         * cp-tree.h (frob_opname): Declare.
10263         * parse.y (saved_scopes): New static variable.
10264         (cp_parse_init): Adjust.
10265         (do_id): If lastiddecl is NULL, do do_identifier.
10266         (operator): Save scope information.
10267         (unoperator): New reduction. Restore scope information.
10268         (operator_name): Append unoperator. Call frob_opname.
10269         * spew.c (frob_opname): Define.
10270
10271 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
10272
10273         * decl.c, rtti.c: Include defaults.h if not already included.
10274         Don't define the *_TYPE_SIZE macros.
10275
10276 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
10277
10278         * cp-tree.h (push_switch): Change prototype.
10279         (check_cp_case_value): Remove declaration.
10280         (decl_constant_value): Likewise.
10281         * decl.c (struct cp_switch): Add switch_stmt and cases.
10282         (case_compare): New function.
10283         (push_switch): Set switch_stmt.  Initialize cases.
10284         (pop_switch): Clean up cases.
10285         (define_case_label): Rename to ...
10286         (finish_case_label): ... this.  Do semantic analysis for case
10287         labels here.
10288         (start_function): Correct comment.
10289         * decl2.c (check_cp_case_value): Remove.
10290         * expr.c (do_case): Remove.
10291         * pt.c (tsubst_expr): Adjust call to finish_case_label.
10292         * semantics.c (genrtl_do_poplevel): Remove declaration.
10293         (RECHAIN_STMTS): Remove.
10294         (finish_break_stmt): Use build_break_stmt.
10295         (finish_continue_stmt): Use build_continue_stmt.
10296         (finish_switch_cond): Adjust condition here, rater than in
10297         c_expand_start_case.
10298         (finish_case_label): Remove.
10299         * typeck.c (c_expand_return): Remove.
10300         (c_expand_start_case): Likewise.
10301
10302 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
10303
10304         * ir.texi: Document type nodes.
10305
10306 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
10307
10308         * cp-tree.h (init_cp_semantics): Declare.
10309         (genrtl_try_block): Don't declare.
10310         (genrtl_handler): Likewise.
10311         (genrtl_catch_block): Likewise.
10312         (genrtl_ctor_stmt): Likewise.
10313         (genrtl_subobject): Likewise.
10314         (genrtl_do_poplevel): Likewise.
10315         (genrtl_named_return_value): Likewise.
10316         * lex.c (init_parse): Call init_cp_semantics.
10317         * semantics.c (genrtl_try_block): Give it internal linkage.
10318         (genrtl_handler): Likewise.
10319         (genrtl_catch_block): Likewise.
10320         (genrtl_ctor_stmt): Likewise.
10321         (genrtl_subobject): Likewise.
10322         (genrtl_do_poplevel): Likewise.
10323         (genrtl_named_return_value): Likewise.
10324         (lang_expand_stmt): Rename to ...
10325         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
10326         (init_cp_semantics): Define.
10327
10328         * decl.c (initialize_local_var): Remove RTL-generating code.
10329         * semantics.c (genrtl_try_block): Fix formatting.
10330
10331         Move statement-tree facilities from C++ to C front-end.
10332         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
10333         (void_zero_node): Remove.
10334         (stmt_tree): Likewise.
10335         (scope_chain): Adjust.
10336         (language_function): Rename to cp_language_function.
10337         (cp_function_chain): Adjust.
10338         (current_stmt_tree): Remove.
10339         (last_tree): Likewise.
10340         (last_expr_type): Likewise.
10341         (struct lang_decl): Adjust.
10342         (STMT_IS_FULL_EXPR_P): Remove.
10343         (add_tree): Remove.
10344         (begin_stmt_tree): Likewise.
10345         (finish_stmt_tree): Likewise.
10346         (walk_tree_fn): Likewise.
10347         (walk_stmt_tree): Likewise.
10348         * class.c (finish_struct): Replace use of add_tree with add_stmt.
10349         * decl.c (mark_stmt_tree): Adjust type.
10350         (init_decl_processing): Don't build void_zero_node.
10351         (initialize_local_var): Adjust usage of current_stmt_tree.
10352         (finish_enum): Use add_stmt, not add_tree.
10353         (save_function_data): Adjust use of language_function.
10354         (finish_constructor_body): Use add_stmt, not add_tree.
10355         (finish_destructor_body): Likewise.
10356         (push_cp_function_context): Adjust use of language_function.
10357         (pop_cp_function_context): Likewise.
10358         (mark_lang_function): Likewise.
10359         (mark_cp_function_context): Likewise.
10360         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
10361         (build_vec_init): Likewise.
10362         * semantics.c (SET_LAST_STMT): Remove.
10363         (RECHAIN_STMTS): Don't use it.
10364         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
10365         (current_stmt_tree): Define.
10366         (add_tree): Remove.
10367         (finish_goto_stmt): Use add_stmt, not add_tree.
10368         (finish_expr_stmt): Likewise.
10369         (begin_if_stmt): Likewise.
10370         (finish_then_clause): Likewise.
10371         (begin_while_stmt): Likewise.
10372         (begin_do_stmt): Likewise.
10373         (finish_return_stmt): Likewise.
10374         (begin_for_stmt): Likewise.
10375         (finish_break_stmt): Likewise.
10376         (finish_continue_stmt): Likewise.
10377         (begin_switch_stmt): Likewise.
10378         (finish_case_label): Likewise.
10379         (begin_try_block): Likewise.
10380         (begin_function_try_block): Likewise.
10381         (begin_handler): Likewise.
10382         (begin_catch_block): Likewise.
10383         (begin_compound_stmt): Likewise.
10384         (begin_asm_stmt): Likewise.
10385         (finish_asm_stmt): Likewise.
10386         (finish_label_stmt): Likewise.
10387         (add_decl_stmt): Likewise.
10388         (finish_subobject): Likewise.
10389         (finish_decl_cleanup): Likewise.
10390         (finish_named_return_value): Likewise.
10391         (setup_vtbl_ptr): Likewise.
10392         (add_scope_stmt): Likewise.
10393         (finish_stmt_expr): Likewise.
10394         (prune_unused_decls): Remove.
10395         (begin_stmt_tree): Likewise.
10396         (finish_stmt_tree): Likewise.
10397         (prep_stmt): Adjust use of current_stmt_tree.
10398         (lang_expand_stmt): Likewise.
10399         * tree.c (statement_code_p): Remove.
10400         (cp_statement_code_p): New function.
10401         (walk_stmt_tree): Remove.
10402         (init_tree): Set lang_statement_code_p.
10403
10404 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
10405
10406         Integrated preprocessor.
10407
10408         * Make-lang.in, Makefile.in: Remove all references to input.c,
10409         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
10410         * gxx.gperf, hash.h, input.c: Delete.
10411         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
10412         initialized properly.
10413
10414         * class.c (fixup_pending_inline): Take a tree, not a
10415         struct pending_inline *.  All callers changed.
10416         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
10417         RID_PROTECTED entries in ridpointers[] array here.
10418         * decl.c (duplicate_decls): Do not refer to struct
10419         pending_inline.
10420         (record_builtin_type, init_decl_processing): Use RID_MAX not
10421         CP_RID_MAX.
10422         (grokdeclarator): Use C_IS_RESERVED_WORD.
10423         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
10424         cpplib.
10425         (grok_x_components): Do not inspect pending_inlines chain.
10426
10427         * cp-tree.h (struct lang_identifier): Add rid_code entry.
10428         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
10429         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
10430         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
10431         TIME_IDENTIFIER_FILEINFO): Kill.
10432         Update prototypes.
10433         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
10434         single 32-bit word.
10435         * parse.y: Call do_pending_inlines unconditionally.
10436         reinit_parse_for_method is now snarf_method.  fn.defpen is no
10437         longer necessary.  Remove unnecessary <itype> annotation on
10438         SCOPE.  Do not refer to end_of_file or struct pending_inline.
10439         * semantics.c (begin_inline_definitions): Call
10440         do_pending_inlines unconditionally.
10441
10442         * lex.c: Remove all code now shared with C front end.
10443         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
10444         into the get_identifier table.  Rewrite pragma handling to
10445         work with the registry.  Move code to save tokens for later
10446         processing to spew.c.
10447
10448         * spew.c: Rewrite everything in terms of token streams instead
10449         of text.  Move routines here from lex.c / input.c as
10450         appropriate.  GC-mark trees hanging off the pending inlines
10451         chain.
10452
10453 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
10454
10455         * NEWS: Mention that the named return value extension has been
10456         deprecated.
10457         * cp-tree.h (original_result_rtx): Define.
10458         (TREE_REFERENCE_EXPR): Remove.
10459         (DECL_VPARENT): Likewise.
10460         (pushdecl_nonclass_level): Likewise.
10461         (store_return_init): Likewise.
10462         (reinit_lang_specific): Likewise.
10463         (genrtl_named_return_value): Change prototype.
10464         * decl.c (original_result_rtx): Remove.
10465         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
10466         Do not generate RTL for local variables here.
10467         (store_return_init): Remove.
10468         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
10469         store_return_init.
10470         (finish_named_return_value): Adjust accordingly.  Warn that this
10471         extension is deprecated.
10472         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
10473
10474 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10475
10476         * pt.c (type_unification_real): Replace switch with if.
10477         (unify): Tsubst non-type parms before comparing.
10478
10479 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10480
10481         * error.c (dump_typename): New function, broken out of ...
10482         (dump_type): ... here. Use it.
10483         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
10484
10485 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10486
10487         * init.c (build_offset_ref): Deal with namespace scoped
10488         TEMPLATE_ID_EXPRs.
10489
10490 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10491
10492         * class.c (resolve_address_of_overloaded_function): Add
10493         explanation message.
10494         * decl.c (define_case_label): Reformat explanation.
10495         * decl2.c (finish_static_data_member_decl): Likewise.
10496         (grokfield): Likewise.
10497         * friend.c (do_friend): Likewise.
10498
10499 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
10500
10501         * tree.c (walk_tree): Expose tail recursion.
10502         (walk_stmt_tree): New function.
10503         * cp-tree.h: Prototype walk_stmt_tree.
10504         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
10505         the BLOCKs directly.  If a BLOCK has no variables after
10506         pruning, discard it.
10507         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
10508         restore the line number.
10509
10510 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
10511
10512         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
10513         (pt.o): Remove dependency on HTAB_H.
10514         * cp-tree.h: Include hashtab.h.
10515         (walk_tree): Change prototype.
10516         (walk_tree_without_duplicates): New function.
10517         * decl.c (check_default_argument): Use it.
10518         * optimize.c (remap_decl): Adjust calls to walk_tree.
10519         (copy_body): Likewise.
10520         (expand_calls_inline): Likewise.
10521         (calls_setjmp_p): Use walk_tree_without_duplicates.
10522         * pt.c: Don't include hashtab.h.
10523         (for_each_template_parm): Use walk_tree_without_duplicates.
10524         * semantics.c (finish-stmt_tree): Likewise.
10525         (expand_body): Likewise.
10526         * tree.c (walk_tree): Add additional parameter.
10527         (walk_tree_without_duplicates): New function.
10528         (count_trees): Use it.
10529         (verify_stmt_tree): Adjust call to walk_tree.
10530         (find_tree): Use walk_tree_without_duplicates.
10531         (no_linkage_check): Likewise.
10532         (break_out_target_exprs): Adjust call to walk_tree.
10533         (cp_unsave): Likewise.
10534
10535 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10536
10537         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
10538         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
10539         * cp-tree.h (TYPE_BINFO): Adjust comment.
10540         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
10541         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
10542         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
10543         (TYPE_TEMPLATE_INFO): Likewise.
10544         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
10545         * class.c (push_nested_class): Likewise.
10546         * decl.c (lookup_name_real): Likewise.
10547         (grokdeclarator): Likewise.
10548         (grok_op_properties): Likewise.
10549         (xref_tag): Likewise.
10550         (xref_basetypes): Likewise.
10551         * decl2.c (constructor_name_full): Likewise.
10552         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
10553         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
10554         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
10555         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10556         (dump_type_suffix): Likewise.
10557         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
10558         instead.
10559         (get_aggr_from_typedef): Likewise.
10560         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
10561         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10562         (write_template_parm): Likewise.
10563         (write_template_template_parm): Check tree code instead of
10564         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10565         * method.c (build_overload_nested_name): Add
10566         BOUND_TEMPLATE_TEMPLATE_PARM.
10567         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
10568         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10569         * pt.c (convert_template_argument): Check tree code instead of
10570         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10571         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
10572         (for_each_template_parm): Adjust comment.
10573         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
10574         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10575         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
10576         template_args_equal to compare template template parameter cases.
10577         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10578         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
10579         instead.
10580         * tree.c (copy_template_template_parm): Decide whether to create
10581         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
10582         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10583         (copy_tree_r): Likewise.
10584         * typeck.c (comptypes): Likewise.  Check tree code instead of
10585         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10586
10587 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
10588
10589         * decl.c (finish_function): Move the code for handling functions
10590         marked with the constructor and destructor attributes inside the
10591         expand_p block.
10592
10593 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10594
10595         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
10596
10597 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10598
10599         * pt.c (lookup_template_class): Remove abort.
10600         * tree.c (get_type_decl): Allow error_mark_node.
10601
10602 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10603
10604         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
10605         TEMPLATE_ID_EXPRs.
10606
10607 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
10608
10609         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
10610         new ABI mangling.
10611
10612 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
10613
10614         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
10615         union tag mismatch error reporting.
10616
10617 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
10618
10619         * call.c (build_scoped_method_call): Check it is not a namespace.
10620
10621 2000-08-30  Jason Merrill  <jason@redhat.com>
10622
10623         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
10624
10625         * tree.c (bot_manip): Check TREE_CONSTANT rather than
10626         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
10627         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
10628
10629         * decl.c (start_function): Always call make_function_rtl.
10630
10631 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
10632
10633         * semantics.c (prune_unused_decls): New function.
10634         (finish_stmt_tree): Call it via walk_tree.
10635
10636 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
10637
10638         * class.c (build_secondary_vtable): Constify a char *.
10639         * decl.c (init_decl_processing): Initialize function_id_node,
10640         pretty_function_id_node, and func_id_node.
10641         * input.c (struct input_source): Constify 'str'.
10642         (feed_input): Constify first argument.
10643         * mangle.c (write_identifier): Constify argument.
10644         * pt.c (mangle_class_name_for_template): Constify argument.
10645
10646 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
10647
10648         * typeck.c (mark_addressable): Remove code that pokes around in
10649         RTL.
10650
10651 2000-08-28  Jason Merrill  <jason@redhat.com>
10652
10653         * lex.c (file_name_nondirectory): Move to toplev.c.
10654
10655         * cp-tree.h (LOCAL_CLASS_P): New macro.
10656         * class.c (finish_struct_1): Use it.
10657
10658 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
10659
10660         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
10661         (write_encoding): Pass another argument to write_name.
10662         (write_name): Add ignore_local_scope parameter.  Fix handling of
10663         local names.
10664         (write_nested_name): Use write_unqualified_name.
10665         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
10666         (write_template_prefix): Use write_unqualified_name.
10667         (write_component): Remove.
10668         (write_local_name): Add parameter.  Use direct local entity to
10669         discriminator calculation.
10670         (write_class_enum_type): Pass another argument to write_name.
10671         (write_template_template_arg): Likewise.
10672         (make_guard_variable): Likewise.
10673
10674 2000-08-27  Jason Merrill  <jason@redhat.com>
10675
10676         * decl.c (pushdecl): Matching decls for local externs are found in
10677         the current level.  Propagate linkage information from previous
10678         declarations.
10679
10680 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
10681
10682         * ir.texi (Expressions): Fix typo.
10683
10684 2000-08-25  Greg McGary  <greg@mcgary.org>
10685
10686         * tree.c (init_tree): Use ARRAY_SIZE.
10687
10688 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
10689
10690         * error.c (cp_tree_printer): Rework.
10691
10692 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
10693
10694         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
10695         dyn-string.o.
10696         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
10697         (cp-demangle.o): Remove target.
10698         (dyn-string.o): Likewise.
10699
10700         * decl.c (grokfndecl): Require that `main' return an `int'.
10701         * mangle.c (write_encoding): Don't mangle return types for
10702         conversion functions.
10703
10704 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
10705
10706         * error.c (tree_formatting_info): New data type.
10707         (tree_being_formatted): New macro.
10708         (tree_formatting_flags): Likewise.
10709         (put_whitespace): Likewise.
10710         (print_tree_identifier): Likewise.
10711         (print_identifier): Likewise.
10712         (cp_tree_printer, print_function_argument_list, print_declaration,
10713         print_expression, print_function_declaration,
10714         print_function_parameter, print_type, print_cv_qualifier): New
10715         functions.
10716         (init_error): Initialize lang_printer.
10717
10718 2000-08-24  Jason Merrill  <jason@redhat.com>
10719
10720         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
10721         adjustment necessary.
10722
10723 2000-08-24  Greg McGary  <greg@mcgary.org>
10724
10725         * cp-tree.h (MAIN_NAME_P): Remove macro.
10726
10727 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
10728
10729         * error.c (print_instantiation_context): Don't forget to flush the
10730         buffer.
10731
10732 2000-08-23  Jason Merrill  <jason@redhat.com>
10733
10734         * typeck.c (build_ptrmemfunc): Save the input pmf.
10735
10736         * method.c (process_modifiers): Use same_type_p.
10737
10738 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
10739
10740         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
10741         * mangle.c (write_function_type): Change prototype.
10742         (write_encoding): Don't mangle return types for
10743         constructors or destructors.
10744         (write_type): Adjust call to write_function_type.
10745         * pt.c (instantiate_template): Instantiate alternate entry points
10746         when instantiating the main function.
10747
10748 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
10749
10750         * error.c (cp_print_error_function): Don't use embedded '\n' in
10751         output_printf.
10752
10753 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
10754
10755         * decl.c (init_decl_processing): Remove bogus initialization.
10756         * error.c (lang_print_error_function): Restore here.
10757         (init_error): Initialize print_error_function.
10758
10759 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
10760
10761         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
10762
10763 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
10764
10765         * Makefile.in (error.o): Depends on diagnostic.h
10766
10767         * cp-tree.h (problematic_instantiation_changed,
10768         record_last_problematic_instantiation, current_instantiation,
10769         print_instantiation_context): Declare.
10770         (maybe_print_template_context): Remove.
10771
10772         * decl.c (init_decl_processing): Set print_error_function to NULL.
10773         (lang_print_error_function): Remove, since we're using a new
10774         machinery.
10775
10776         * error.c: #include diagnostic.h
10777         (function_category): New function.
10778         (cp_diagnostic_starter): Likewise.
10779         (cp_diagnostic_finalizer): Likewise.
10780         (cp_print_error_function): Likewise.
10781         (maybe_print_instantiation_context): Likewise.
10782         (print_instantiation_full_context): Likewise.
10783         (print_instantiation_partial_context): Likewise.
10784         (print_instantiation_context): Define.
10785         (init_error): Initialize diagnostic pager and finalizer.
10786
10787         * pt.c (problematic_instantiation_changed): Define.
10788         (record_last_problematic_instantiation): Likewise.
10789         (current_instantiation): Likewise.
10790         (maybe_print_template_context): Remove.
10791         (print_template_context): Likewise.
10792         (current_tinst_level): Make static to reflect Brendan Kehoe's
10793         change of 1995-04-13.
10794         (push_tinst_level): Call print_instantiation_context.
10795
10796 2000-08-21  Nix  <nix@esperi.demon.co.uk>
10797
10798         * lang-specs.h: Do not process -o or run the assembler if
10799         -fsyntax-only.
10800
10801 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
10802
10803         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
10804         variables.
10805         * decl2.c (lang_decode_option): Disable gettext attributes for
10806         -ansi.
10807
10808 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
10809
10810         * lex.c (lang_init_options): Default diagnostic message maximum
10811         length to 80, when line-wrapping.
10812
10813 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
10814
10815         * class.c (build_vtbl_initializer): Clear the entire
10816         vtbl_init_data.  Start keeping track of the functions for which we
10817         have created vcall offsets here.
10818         (dfs_build_vcall_offset_vtbl_entries): Remove.
10819         (build_vcall_offset_vtbl_entries): Reimplement.
10820         (add_vcall_offset_vtbl_entries_r): New function.
10821         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
10822         computing when vcall offsets are necessary.
10823
10824 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10825
10826         * decl.c (member_function_or_else): Use cp_error ... %T.
10827         (grokdeclarator): Likewise.
10828         (start_method): Likewise.
10829         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
10830
10831 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10832
10833         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
10834         TYPE_DECLs.
10835
10836 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10837
10838         * cp-tree.h (PTRMEM_OK_P): New macro.
10839         (itf_ptrmem_ok): New enumeration value.
10840         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
10841         argument. Diagnose implicit pointer to member.
10842         (instantiate_type): Don't diagnose implicit pointer to member
10843         here. Pass itf_ptrmem_ok if ok. Adjust calls to
10844         resolve_address_of_overloaded_function.
10845         * init.c (build_offset_ref): Set PTRMEM_OK_P.
10846         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
10847         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
10848         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
10849         (build_unary_op): Deal with single non-static member in
10850         microsoft-land.
10851
10852 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10853
10854         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
10855
10856 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10857
10858         * cp-tree.h (enum_name_string): Remove prototype.
10859         (report_case_error): Remove prototype.
10860         * cp/typeck2.c (enum_name_string): Remove.
10861         (report_case_error): Remove.
10862         * error.c (dump_expr): Deal with enum values directly.
10863         Correctly negate integer constant.
10864
10865 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10866
10867         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
10868         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
10869         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
10870         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
10871         (__cxa_vec_new): Use __cxa_vec_new2.
10872         (__cxa_vec_delete): Use __cxa_vec_delete2.
10873
10874 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10875
10876         * vec.cc (__cxa_vec_new): Set "C" linkage.
10877         (__cxa_vec_ctor): Likewise.
10878         (__cxa_vec_cctor): Likewise.
10879         (__cxa_vec_dtor): Likewise.
10880         (__cxa_vec_delete): Likewise.
10881         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
10882         (__cxa_vec_ctor): Likewise.
10883         (__cxa_vec_cctor): Likewise.
10884         (__cxa_vec_dtor): Likewise.
10885         (__cxa_vec_delete): Likewise.
10886
10887 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10888
10889         * class.c (instantiate_type): Reinstate local variable
10890         deleted in previous change.
10891
10892         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
10893         itf_no_attributes.
10894
10895 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10896
10897         * cp-tree.h (instantiate_type_flags): New enumeration.
10898         (instantiate_type): Change parameter.
10899         * class.c (instantiate_type): Adjust prototype. Adjust.
10900         * call.c (standard_conversion): Adjust instantiate_type call.
10901         (reference_binding): Likewise.
10902         (build_op_delete_call): Likewise.
10903         (convert_like_real): Likewise.
10904         * cvt.c (cp_convert_to_pointer): Likewise.
10905         (convert_to_reference): Likewise.
10906         * pt.c (convert_nontype_argument): Likewise.
10907         * typeck.c (build_binary_op): Likewise.
10908         (build_ptrmemfunc): Likewise.
10909         (convert_for_assignment): Likewise.
10910
10911 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10912
10913         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
10914         (current_aggr): Define.
10915         * decl.c (grokdeclarator): Make sure a friend class is an
10916         elaborated type specifier.
10917         * parse.y (current_aggr): Remove static definition.
10918         (cp_parse_init): Adjust.
10919         (structsp): Clear and restore current_aggr.
10920         (component_decl_list): Clear current_aggr.
10921
10922         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
10923         aggregate tag on the typename's context.
10924
10925         * pt.c (tsubst_friend_class): Return error_mark_node, if
10926         parms becomes NULL.
10927         (instantiate_class_template): Ignore error_mark_node friend types.
10928
10929 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
10930
10931         * cvt.c (warn_ref_binding): New static function, broken out of ...
10932         (convert_to_reference): ... here. Use it.
10933
10934 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10935
10936         * parse.y (template_arg): Add rule for template qualified with
10937         global scope.
10938
10939 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10940
10941         * decl2.c (add_function): Reorganize.
10942         (arg_assoc): Do not consider function template decls.
10943
10944 2000-08-11  Jason Merrill  <jason@redhat.com>
10945
10946         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
10947         looking inside.
10948
10949 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
10950
10951         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
10952         (lookup_nested_tag): Likewise.
10953
10954         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
10955         can be produced.
10956
10957 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
10958
10959         * parse.y (named_complex_class_head_sans_basetype): Remove
10960         always true if.
10961
10962 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
10963
10964         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
10965         explicit TEMPLATE_ID_EXPR args.
10966         (build_expr_from_tree, case CALL_EXPR): Likewise.
10967
10968 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
10969
10970         * decl.c (check_tag_decl): Diagnose typename's which don't
10971         declare anything.
10972
10973 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
10974
10975         * init.c (build_aggr_init): Reject bogus array initializers
10976         early.
10977
10978 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
10979
10980         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
10981         runtime.
10982         * cp/tinfo.cc (__dynamic_cast): Likewise.
10983         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
10984
10985 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
10986
10987         * cvt.c (convert_to_pointer_force): Fix error message when
10988         attempting to cast from ambiguous base.
10989
10990 2000-08-08  Jason Merrill  <jason@redhat.com>
10991
10992         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
10993         (tsubst_template_arg_vector): Likewise.
10994
10995         * decl2.c (build_anon_union_vars): Choose the largest field; don't
10996         assume that one will be as large as the union.
10997
10998 2000-08-07  Kazu Hirata  <kazu@hxi.com>
10999
11000         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
11001         * decl.c (pop_labels): Likewise.
11002
11003 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
11004
11005         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
11006         specifications.
11007         (__pointer_to_member_type_info): Likewise.
11008         (__base_class_info): Likewise.
11009         (__class_type_info): Likewise.
11010         (__si_class_type_info): Likewise.
11011         (__vmi_class_type_info): Likewise.
11012         * tinfo.cc (__si_class_type_info::__do_find_public_src):
11013         Changed member names to match specifications.
11014         (__vmi_class_type_info::__do_find_public_src): Likewise.
11015         (__si_class_type_info::__do_dyncast): Likewise.
11016         (__vmi_class_type_info::__do_dyncast): Likewise.
11017         (__si_class_type_info::__do_upcast): Likewise.
11018         (__vmi_class_type_info::__do_upcast): Likewise.
11019         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
11020         (__pbase_type_info::__pointer_catch): Likewise.
11021         (__pointer_type_info::__pointer_catch): Likewise.
11022         (__pointer_to_member_type_info::__pointer_catch): Likewise.
11023
11024 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
11025
11026         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
11027         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
11028         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
11029
11030 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
11031
11032         * cp-tree.h (add_method): Change prototype.
11033         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
11034         Don't double the size of the method vector in the error case.
11035         (handle_using_decl): Adjust call to add_method.
11036         (add_implicitly_declared_members): Likewise.
11037         (clone_function_decl): Likewise.
11038         * decl2.c (check_classfn): Likewise.
11039         * semantics.c (finish_member_declaration): Likewise.
11040
11041 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
11042
11043         * decl.c (flag_isoc94): New variable.
11044
11045 2000-08-02  Jason Merrill  <jason@redhat.com>
11046
11047         * pt.c (do_type_instantiation): Add complain parm; don't complain
11048         if called recursively.
11049         * cp-tree.h, parse.y: Adjust.
11050
11051 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
11052
11053         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
11054         -Wno-strict-prototypes.
11055
11056         * g++spec.c: Adjust type of second argument to
11057         lang_specific_driver, and update code as necessary.
11058
11059         * cp-tree.h: Don't prototype min_precision here.
11060         (my_friendly_assert): Cast expression to void.
11061         * semantics.c (do_poplevel): Initialize scope_stmts.
11062
11063 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
11064
11065         * cp-tree.h (DECL_NEEDED_P): Tweak.
11066
11067 2000-07-28  Jason Merrill  <jason@redhat.com>
11068
11069         * lang-specs.h: Use %i in rule for .ii files.
11070
11071 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
11072
11073         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
11074
11075 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
11076
11077         Allow indirect primary bases.
11078         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
11079         primary_base.
11080         (CLASSTYPE_VFIELD_PARENT): Remove.
11081         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
11082         (BINFO_PRIMARY_BINFO): Remove.
11083         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
11084         (BINFO_VBASE_PRIMARY_P): Likewise.
11085         (BINFO_PRIMARY_BASE_OF): New macro.
11086         (BINFO_INDIRECT_PRIMARY_P): Likewise.
11087         (get_primary_binfo): New function.
11088         * decl.c (lang_mark_tree): Make lang_type::primary_base.
11089         * class.c (vcall_offset_data_s): Rename to ...
11090         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
11091         and add ctor_vtbl_p.
11092         (get_derived_offset): Use get_primary_binfo.
11093         (dfs_mark_primary_bases): Adjust handling of virtual primary
11094         bases.
11095         (mark_primary_bases): Likewise.
11096         (set_primary_base): Take a binfo, not an integer, as a
11097         representation of the primary base.
11098         (indirect_primary_base_p): Remove.
11099         (determine_primary_base): Adjust for indirect primary bases.
11100         (dfs_find_final_overrider): Fix typo in coment.
11101         (update_vtable_entry_for_fn): Use get_primary_binfo.
11102         (layout_nonempty_base_or_field): Tweak.
11103         (build_base_fields): Adjust for new primary base semantics.
11104         (dfs_propagate_binfo_offsets): Remove.
11105         (propagate_binfo_offsets): Rewrite.
11106         (dfs_set_offset_for_shared_vbases): Remove.
11107         (layout_virtual_bases): Don't use it.
11108         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
11109         ABI.
11110         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
11111         CLASSTYPE_VFIELD_PARENT.
11112         (dfs_get_primary_binfo): New function.
11113         (get_primary_binfo): Likewise.
11114         (dump_class_hierarchy_r): Tweak printing of primary bases.
11115         (build_vtbl_initializer): Fix typo in comments.  Use
11116         vtbl_init_data.
11117         (build_vcall_and_vbase_vtbl_entries): Likewise.
11118         (build_vbaes_offset_vtbl_entries): Likewise.
11119         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
11120         BV_VCALL_INDEX to handle indirect primary bases.
11121         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
11122         (build_rtti_vtbl_entries): Likewise.
11123         * search.c (get_shared_vbase_if_not_primary): Tweak.
11124         (find_vbase_instance): Likewise.
11125         (binfo_for_vtable): Simplify.
11126         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
11127         (make_binfo): Make it have 11 entries.
11128
11129 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
11130
11131         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
11132         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
11133         ascertaining primaryness.
11134         (G): Remove template_args.
11135         (decl_is_template_id): New function.
11136         (write_encoding): Use decl_is_template_id.
11137         (write_name): Likewise.  Handle type_decls.  Get main variant of
11138         type decls.
11139         (write_nested_name): Likewise.
11140         (write_prefix): Likewise.
11141         (write_template_prefix): Likewise.
11142         (write_special_name_constructor): Remove defunct production from
11143         comment.
11144         (write_bare_function_type): Remove comment about absent parameter.
11145         (write_template_template_arg): Add missing grammar production to
11146         comment.
11147
11148 2000-07-27  Jason Merrill  <jason@redhat.com>
11149
11150         * decl.c (duplicate_decls): If common_type produces a non-typedef
11151         type for a typedef, just use the old type.
11152
11153 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
11154
11155         * cp-tree.h (function_depth): Declare.
11156         (verify_stmt_tree): Likewise.
11157         (find_tree): Likewise.
11158         * decl.c (function_depth): Give it external linkage.
11159         * optimize.c (optimize_function): Increment and decrement it.
11160         * tree.c (verify_stmt_tree_r): New function.
11161         (verify_stmt_tree): Likewise.
11162         (find_tree_r): Likewise.
11163         (find_tree): Likewise.
11164
11165 2000-07-27  Jason Merrill  <jason@redhat.com>
11166
11167         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
11168         TYPE_PTRMEMFUNC_P.
11169         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
11170
11171 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
11172
11173         * decl.c (start_cleanup_fn): Mark the function as `inline'.
11174         * decl2.c (get_guard): Call cp_finish_decl, not
11175         rest_of_decl_compilation, for local guards.
11176         * lex.c (do_identifier): Remove unused variable.
11177
11178 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
11179
11180         * parse.y:  Add missing ';'.
11181
11182 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
11183
11184         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
11185         of `extern "C++"'.
11186
11187 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11188
11189         Kill strict_prototype. Backwards compatibility only for
11190         non NO_IMPLICIT_EXTERN_C systems.
11191         * cp-tree.h (flag_strict_prototype): Remove.
11192         (strict_prototype): Remove.
11193         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
11194         * decl.c (maybe_push_to_top_level): Adjust.
11195         (pop_from_top_level): Adjust.
11196         (decls_match): Only allow sloppy parm matching for ancient
11197         system headers.
11198         (init_decl_processing): Adjust.
11199         (grokdeclarator): Adjust.
11200         * decl2.c (flag_strict_prototype): Remove.
11201         (strict_prototype): Remove.
11202         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
11203         (lang_f_options): Remove "strict-prototype".
11204         (unsupported-options): Add "strict-prototype".
11205         * lex.c (do_identifier): Adjust.
11206         (do_scoped_id): Adjust.
11207         * parse.y (empty_parms): Adjust.
11208         * class.c (push_lang_context): Adjust.
11209         (pop_lang_context): Adjust.
11210         * typeck.c (comp_target_parms): Adjust.
11211
11212 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11213
11214         * decl.c (poplevel): Deal with anonymous variables at for scope.
11215         (maybe_inject_for_scope_var): Likewise.
11216
11217 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
11218
11219         * decl.c: Remove all signal handling code, now done in toplev.c.
11220
11221 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
11222
11223         * decl.c (make_rtl_for_nonlocal_decl): Rework.
11224
11225         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
11226         correctly.
11227
11228 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
11229
11230         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
11231         Define my_friendly_assert and my_friendly_abort as macros
11232         which may call friendly_abort.  Prototype friendly abort, not
11233         my_friendly_abort or my_friendly_assert.
11234         * decl.c (signal_catch): Report the signal caught in the error
11235         message.  Call fatal directly.
11236         * typeck2.c (ack, my_friendly_assert): Delete.
11237         (my_friendly_abort): Rename to friendly_abort.  Expect file,
11238         line, and function parameters.  Report the abort code, then
11239         call fancy_abort.  Do not mask an abort if errors have
11240         already occurred.
11241
11242 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
11243
11244         * typeck.c (comp_target_parms): Remove obsolete parameter.
11245         (comp_target_types): Adjust.
11246
11247 2000-07-17  Jason Merrill  <jason@redhat.com>
11248
11249         * typeck.c (mark_addressable): Never set TREE_USED.
11250         * call.c (build_call): Don't abort on calls to library functions
11251         that have been declared normally.
11252
11253         * typeck.c (build_binary_op): Fix grammar in warning.
11254
11255         * exception.cc (__eh_free): Fix prototype.
11256
11257         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
11258
11259         * decl.c (pushdecl): Handle seeing an OVERLOAD in
11260         IDENTIFIER_NAMESPACE_VALUE.
11261
11262 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
11263
11264         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
11265         * method.c (use_thunk): Correct handling of vcall offsets.
11266
11267 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
11268
11269         * .cvsignore: parse.h and parse.c have no cp- prefix.
11270
11271 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
11272
11273         * .cvsignore: New file.
11274
11275 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
11276
11277         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
11278
11279 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
11280
11281         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
11282         * parse.c: Remove.
11283         * parse.h: Likewise.
11284
11285 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
11286
11287         * class.c (layout_class_type): Add pointers to virtual bases after
11288         base classes under the old ABI.
11289
11290 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
11291
11292         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
11293         (finish_continue_stmt): Likewise.
11294         (begin_for_stmt): Remove call to note_level_for_for.
11295         (finish_goto_stmt): Change call from build_min_nt
11296         to build_stmt.
11297         (finish_expr_stmt): Likewise.
11298         (begin_if_stmt): Likewise.
11299         (begin_while_stmt): Likewise.
11300         (finish_while_stmt): Likewise.
11301         (finish_return_stmt): Likewise.
11302         (begin_for_stmt): Likewise.
11303         (finish_for_stmt): Likewise.
11304         (finish_break_stmt): Likewise.
11305         (begin_switch_stmt): Likewise.
11306         (finish_case_label): Likewise.
11307         (genrtl_try_block): Likewise.
11308         (begin_try_block): Likewise.
11309         (begin_handler): Likewise.
11310         (begin_compound_stmt): Likewise.
11311         (finish_asm_stmt): Likewise.
11312         (finish_label_stmt): Likewise.
11313         (add_decl_stmt): Likewise.
11314         (finish_subobject): Likewise.
11315         (finish_decl_cleanup): Likewise.
11316         (finish_named_return_value): Likewise.
11317         (setup_vtbl_ptr): Likewise.
11318         (add_scope_stmt): Likewise.
11319         * decl.c (finish_constructor_body): Likewise.
11320         (finish_destructor_body): Likewise.
11321         * optimize.c (copy_body_r): Likewise.
11322         (initialize_inlined_parameters): Likewise.
11323         (declare_return_variable): Likewise.
11324         (expand_call_inline): Likewise.
11325
11326 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
11327
11328         * semantics.c (expand_body): Sync interface information
11329         at the end of function body expansion.
11330
11331 2000-07-09  Jason Merrill  <jason@redhat.com>
11332
11333         * init.c (build_new_1): Bail early if the call to new fails.
11334
11335         * decl.c (compute_array_index_type): Check specifically for
11336         an INTEGER_CST, not just TREE_CONSTANT.
11337
11338         * decl.c (duplicate_decls): Don't call duplicate_decls on
11339         the DECL_TEMPLATE_RESULT.
11340         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
11341         codes.
11342
11343         * error.c (dump_template_bindings): Don't crash if we had an
11344         invalid argument list.
11345
11346         * typeck.c (c_expand_start_case): Do narrowing here.
11347         * semantics.c (finish_switch_cond): Not here.
11348
11349 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
11350
11351         * parse.y (asm_clobbers): Do string concatenation.
11352
11353 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
11354
11355         * decl.c (pushtag): Don't put local classes in template functions
11356         on the local_classes list.
11357
11358 2000-07-04  Scott Snyder  <snyder@fnal.gov>
11359
11360         * decl2.c (get_guard): Add missing return for old ABI local
11361         variable case.
11362
11363 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
11364
11365         * cp-tree.h (char_type_p): New function.
11366         * decl.c (init_decl_processing): Don't initialize
11367         signed_wchar_type_node or unsigned_wchar_type_node.
11368         (complete_array_type): Handle brace-enclosed string-constants.
11369         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
11370         * tree.c (char_type_p): New function.
11371         * typeck2.c (digest_init): Use char_type_p.
11372
11373 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
11374
11375         * pt.c (tsubst): Don't layout type, if it's error_mark.
11376
11377 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
11378
11379         * pt.c (instantiate_pending_templates): Reset template level.
11380
11381 2000-07-05  Jason Merrill  <jason@redhat.com>
11382
11383         * call.c (joust): Don't complain about `operator char *()' beating
11384         `operator const char *() const'.
11385
11386 2000-07-04  scott snyder  <snyder@fnal.gov>
11387             Jason Merrill  <jason@redhat.com>
11388
11389         * repo.c (repo_get_id): Handle the case where a class with virtual
11390         bases has a null TYPE_BINFO_VTABLE.
11391
11392 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
11393             Jason Merrill  <jason@redhat.com>
11394
11395         * parse.y (member_init): Just pass in the type.
11396         * init.c (expand_member_init): Handle getting a type.
11397
11398 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11399             Jason Merrill  <jason@redhat.com>
11400
11401         * decl.c (finish_function): Warn if a function has no return
11402         statement.
11403         Suggested by Andrew Koenig.
11404         * typeck.c (check_return_expr): Do set current_function_returns_value
11405         if we got an error_mark_node.
11406
11407 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
11408
11409         * decl2.c (push_decl_namespace): Push the original namespace.
11410
11411 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
11412
11413         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
11414         * semantics.c (begin_class_definition): Clear it.
11415
11416 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
11417
11418         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
11419         (genrtl_expr_stmt): Likewise.
11420         (genrtl_decl_stmt): Likewise.
11421         (genrtl_if_stmt): Likewise.
11422         (genrtl_while_stmt): Likewise.
11423         (genrtl_do_stmt): Likewise.
11424         (genrtl_return_stmt): Likewise.
11425         (genrtl_for_stmt): Likewise.
11426         (genrtl_break_stmt): Likewise.
11427         (genrtl_continue_stmt): Likewise.
11428         (genrtl_scope_stmt): Likewise.
11429         (genrtl_switch_stmt): Likewise.
11430         (genrtl_case_label): Likewise.
11431         (genrtl_begin_compound_stmt): Likewise.
11432         (genrtl_finish_compound_stmt): Likewise.
11433         (genrtl_compound_stmt): Likewise.
11434         (genrtl_asm_stmt): Likewise.
11435
11436         * init.c (begin_init_stmts): Remove call to
11437         genrtl_begin_compound_stmt.
11438         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
11439
11440         * semantics.c (lang_expand_stmt): Changed call to
11441         genrtl_compound_stmt to ignore return value.
11442
11443 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
11444
11445         * mangle.c (canonicalize_for_substitution): Return the canonical
11446         variant of a type.
11447
11448         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
11449         TYPE_DECL.
11450         * typeck.c (commonparms): Remove obstack manipulations.
11451
11452 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
11453
11454         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
11455
11456         * Makefile.in (OBJS): Added ../c-semantics.o.
11457         (OBJDEPS): Likewise.
11458
11459         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
11460         ../c-common.h.
11461         (struct stmt_tree): Added comment.
11462         (current_function_name_declared): Removed.
11463         (stmts_are_full_exprs_p): Likewise.
11464         (genrtl_do_pushlevel): Likewise.
11465         (genrtl_clear_out_block): Likewise.
11466         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
11467         (DECL_ANON_UNION_ELEMS): Likewise.
11468         (emit_local_var): Likewise.
11469         (make_rtl_for_local_static): Likewise.
11470         (do_case): Likewise.
11471         (expand_stmt): Likewise.
11472         (genrtl_decl_cleanup): Likewise.
11473         (c_expand_asm_operands): Likewise.
11474         (c_expand_return): Likewise.
11475         (c_expand_start_case): Likewise.
11476
11477         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
11478         (emit_local_var): Likewise.
11479         (initialize_local_var): Change reference to
11480         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
11481         Change reference to stmts_are_full_exprs_p to
11482         current_stmt_tree->stmts_are_full_exprs_p.
11483         (push_cp_function_context): Likewise.
11484
11485         * expect.c (expand_throw): Change reference to
11486         stmts_are_full_exprs_p.
11487
11488         * init.c (build_aggr_init): Change reference to
11489         stmts_are_full_exprs_p.
11490         (build_vec_init): Likewise.
11491
11492         * optimize.c (maybe_clone_body): Change reference to
11493         current_function_name_declared to
11494         cp_function_chain->name_declared.
11495
11496         * pt.c (instantiate_decl): Change reference to
11497         current_function_name_declared to
11498         cp_function_chain->name_declared.
11499
11500         * semantics.c (expand_cond): Moved declaration to c-common.h.
11501         (genrtl_do_pushlevel): Moved to c-semantics.c.
11502         (genrtl_clear_out_block): Likewise.
11503         (genrtl_goto_stmt): Likewise.
11504         (genrtl_expr_stmt): Likewise.
11505         (genrtl_decl_stmt): Likewise.
11506         (gerntl_if_stmt): Likewise.
11507         (genrtl_while_stmt): Likewise.
11508         (genrtl_do_stmt): Likewise.
11509         (genrtl_return_stmt): Likewise.
11510         (genrtl_for_stmt): Likewise.
11511         (genrtl_break_stmt): Likewise.
11512         (genrtl_continue_stmt): Likewise.
11513         (genrtl_scope_stmt): Likewise.
11514         (genrtl_switch_stmt): Likewise.
11515         (genrtl_case_label): Likewise.
11516         (genrtl_begin_compound_stmt): Likewise.
11517         (genrtl_finish_compound_stmt): Likewise.
11518         (genrtl_compound_stmt): Likewise.
11519         (genrtl_asm_stmt): Likewise.
11520         (genrtl_decl_cleanup): Likewise.
11521         (expand_cond): Likewise.
11522         (expand_stmt): Renamed to ...
11523         (lang_expand_stmt): ... this.
11524         (lang_expand_expr_stmt): Initialize.
11525         (set_current_function_name_declared): Likewise.
11526         (stmts_are_full_exprs_p): Likewise.
11527         (current_function_name_declared): Likewise.
11528         (anon_aggr_type_p): Likewise.
11529         (do_poplevel): Change reference to
11530         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
11531         Change reference to stmts_are_full_exprs_p to
11532         current_stmt_tree->stmts_are_full_exprs_p.
11533         (add_tree): Likewise.
11534         (finish_expr_stmt): Likewise.
11535         (prep_stmt): Likewise.
11536         (lang_expand_stmt): Likewise.
11537         (begin_compound_stmt): Change reference to
11538         current_function_name_declared to
11539         cp_function_chain->name_declared and call to
11540         current_function_name_declared().
11541         (setup_vtbl_ptr): Likewise.
11542         (genrtl_do_poplevel): Removed.
11543
11544 2000-06-30  Jason Merrill  <jason@redhat.com>
11545
11546         * init.c (init_init_processing): Go back to aligning like
11547         double_type_node for old ABI.
11548         (get_cookie_size): Make cookie larger if we get a type that needs
11549         more alignment.
11550         (build_vec_delete): Call it.
11551
11552         * typeck.c (qualify_type_recursive): New fn.
11553         (composite_pointer_type): Use it.
11554         (build_binary_op): Use composite_pointer_type.
11555
11556 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
11557             Jason Merrill  <jason@redhat.com>
11558
11559         * typeck.c (check_return_expr): Don't complain about returning
11560         NULL from operator new if -fcheck-new.
11561         * cp-tree.h: Declare flag_check_new here.
11562         * init.c: Not here.
11563
11564 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
11565
11566         * mangle.c (find_substitution): Use same_type_p.
11567         (write_encoding): Don't check for substitutions.
11568
11569 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
11570
11571         * parse.y (expr_no_comma_rangle): New non-terminal.
11572         (template_parm): Use it for default parameter case.
11573         (template_arg): Use it.
11574         (expr_no_commas): Remove commented out undefined extensions.
11575         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
11576         * parse.h, parse.c: Rebuilt.
11577
11578 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
11579
11580         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
11581         (finish_asm_stmt): Do it here, instead.
11582
11583         * cp-tree.h (ridpointers): Don't declare.
11584         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
11585         (record_builtin_java_type): Likewise.
11586         (init_decl_processing): Likewise.
11587         * lex.c: Move inclusion of lex.h.
11588         (ridpointers): Don't define.
11589         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
11590         RID_MAX.
11591         * lex.h (enum rid): Rename to ...
11592         (enum cp_rid): ... this.
11593         (ridpointers): Don't declare.
11594         * parse.y: Move inclusion of lex.h.
11595         * parse.c: Regenerated.
11596         * spew.c: Move inclusion of lex.h.
11597
11598         * cp-tree.h (struct language_function): Remove temp_name_counter.
11599         (temp_name_counter): Remove.
11600         (get_temp_name): Change prototype.
11601         (get_guard): New function.
11602         (get_guard_cond): Likewise.
11603         (set_guard): Likewise.
11604         * cvt.c (build_up_reference): Adjust call to get_temp_name.
11605         * decl.c (expand_static_init): Use get_guard and friends to
11606         implement guard variables.
11607         * decl2.c (get_temp_name): Assume that the variables created are
11608         always static.
11609         (get_sentry): Rename to ...
11610         (get_guard): ... this.  Implement new ABI guard variables.
11611         (get_guard_bits): New function.
11612         (get_guard_cond): Likewise.
11613         (set_guard): Likewise.
11614         (start_static_initialization_or_destruction): Use them.
11615         (do_static_initialization): Replace sentry with guard throughout.
11616         (do_static_destruction): Likewise.
11617         * init.c (create_temporary_var): Add comment.
11618
11619 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
11620
11621         * mangle.c (find_substitution): Use same_type_p.
11622         (write_encoding): Don't check for substitutions.
11623
11624 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
11625
11626         * parse.y (expr_no_comma_rangle): New non-terminal.
11627         (template_parm): Use it for default parameter case.
11628         (template_arg): Use it.
11629         (expr_no_commas): Remove commented out undefined extensions.
11630         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
11631         * parse.h, parse.c: Rebuilt.
11632
11633 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
11634
11635         * cp-tree.h (flag_const_strings): Remove.
11636         (warn_parentheses): Likewise.
11637         (warn_format): Likewise.
11638         (common_type): Likewise.
11639         (default_conversion): Likewise.
11640         (build_binary_op): Likewise.
11641         (cp_build_binary_op): New macro.
11642         * call.c (build_new_op): Use cp_build_binary_op instead of
11643         build_binary_op.
11644         * class.c (build_vtable_entry_ref): Likewise.
11645         * decl.c (expand_static_init): Likewise.
11646         (compute_array_index_type): Likewise.
11647         (build_enumerator): Likewise.
11648         * decl2.c (delete_sanity): Likewise.
11649         (start_static_initialization_or_destruction): Likewise.
11650         * error.c (dump_type_suffix): Likewise.
11651         * init.c (resolve_offset_ref): Likewise.
11652         (build_new): Likewise.
11653         (build_new_1): Likewise.
11654         (build_vec_delete_1): Likewise.
11655         (build_vec_init): Likewise.
11656         (build_delete): Likewise.
11657         * rtti.c (synthesize_tinfo_fn): Likewise.
11658         (synthesize_tinfo_var): Likewise.
11659         * search.c (expand_upcast_fixups): Likewise.
11660         (fixup_all_virtual_upcast_offsets): Likewise.
11661         * typeck.c (build_array_ref): Likewise.
11662         (get_member_function_from_ptrfunc): Likewise.
11663         (build_binary_op): Add parameter.
11664         (pointer_int_sum): Use cp_build_binary_op.
11665         (pointer_diff): Likewise.
11666         (build_modify_expr): Likewise.
11667         (get_delta_difference): Likewise.
11668         (build_ptrmemfunc): Likewise.
11669
11670 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
11671
11672         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
11673         * decl.c (create_implicit_typedef): Adjust.
11674         * decl2.c (build_artificial_parm): Adjust.
11675         * method.c (implicitly_declare_fn): Adjust.
11676         * pt.c (push_inline_template_parms_recursive): Adjust.
11677         (process_template_parm): Adjust.
11678         (overloaded_template_name): Adjust.
11679         * semantics.c (finish_template_template_parm): Adjust.
11680
11681 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
11682
11683         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
11684         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
11685         where to emit thunks.
11686         (build_vtt): Adjust call to build_vtt_inits.
11687         (build_vtt_inits): Add parameter to indicate whether or not
11688         sub-VTTs for virtual bases should be included.  Adjust handling of
11689         construction vtables.
11690         (get_matching_base): New function.
11691         (dfs_build_vtt_inits): Rename to ...
11692         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
11693         construction vtables.
11694         (dfs_fixup_binfo_vtbls): Likewise.
11695         (build_ctor_vtbl_groups): Build construction vtables for virtual
11696         bases, too.
11697         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
11698         to build construction vtbls.
11699         (dfs_accumulate_vtbl_inits): Adjust handling of
11700         construction vtables.
11701
11702         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
11703         types correctly.
11704
11705 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
11706
11707         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
11708
11709 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
11710
11711         * search.c (hides): Remove.
11712         (is_subobject_of_p): Add most_derived parameter. Use
11713         CANONICAL_BINFO.
11714         (lookup_field_queue_p): Adjust.
11715         (lookup_field_r): Adjust.
11716
11717 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
11718
11719         * decl2.c (handle_class_head): Bash typedefs to the type's main
11720         decl.
11721
11722 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
11723
11724         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
11725         (begin_global_stmt_expr): ... this.
11726         (genrtl_finish_stmt_expr): Rename to ...
11727         (finish_global_stmt_expr): ... this.
11728         * init.c (begin_init_stmts): Adjust calls.
11729         (finish_init_stmts): Likewise.
11730         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
11731         (begin_global_stmt_expr): ... this.
11732         (genrtl_finish_stmt_expr): Rename to ...
11733         (finish_global_stmt_expr): ... this.
11734
11735 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11736
11737         * search.c (lookup_member): Fix typo in comment.
11738
11739 2000-06-24  Jason Merrill  <jason@redhat.com>
11740
11741         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
11742         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
11743
11744 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11745
11746         * parse.y (complex_direct_notype_declarator): Support global_scope.
11747         * Makefile.in: Adjust conflict count.
11748
11749 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11750
11751         * parse.y (template_arg): Convert TEMPLATE_DECL
11752         that is a template template parameter to
11753         TEMPLATE_TEMPLATE_PARM here.
11754
11755         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
11756         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
11757         (copy_template_template_parm): Adjust prototype.
11758         * decl.c (grokdeclarator): Remove dead code.
11759         * pt.c (process_template_parm): Tidy.
11760         (lookup_template_class): Construct nodes in
11761         copy_template_template_parm.
11762         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
11763         lookup_template_class.  Use TYPE_TI_TEMPLATE.
11764         * tree.c (copy_template_template_parm): Add NEWARGS
11765         parameter.
11766         (mapcar): Adjust call to copy_template_template_parm.
11767         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
11768         * method.c (build_template_template_parm_names): Change error
11769         code to avoid compilation warning.
11770
11771         * gxxint.texi: Document template template parameter
11772         name mangling.
11773
11774 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
11775
11776         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
11777         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
11778         (cp-demangle.o): New rule.
11779         (dyn-string.o): Likewise.
11780         * inc/cxxabi.h (__cxa_demangle): New declaration.
11781
11782 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
11783
11784         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
11785         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
11786         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
11787         a tree, not an int.
11788         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
11789         (make_thunk): Change prototype.
11790         (emit_thunk): Rename to use_thunk.
11791         (mangle_thunk): Change prototype.
11792         * class.c (get_derived_offset): Simplify.
11793         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
11794         BV_GENERATE_THUNK_WITH_VTABLE_P.
11795         (build_primary_vtable): Simplify.
11796         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
11797         (dfs_find_base): Remove.
11798         (update_vtable_entry_for_fn): Correct bug in finding the base
11799         where a virtual function was first declared.  Figure out whether
11800         or not to emit a vcall-thunk with the vtables in which it appears.
11801         Correct logic for deciding whether to use an ordinary thunk, or a
11802         vcall thunk.
11803         (finish_struct_1): Remove unnecssary code.
11804         (build_vtbl_initializer): Use ssize_int for the running counter of
11805         negative indices.
11806         (build_vtbl_initializer): Only use vcall thunks where necessary.
11807         Mark thunks as needing to be emitted with their vtables, or not.
11808         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
11809         indices.  Use size_binop.
11810         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
11811         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
11812         size_binop.
11813         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
11814         (build_vtable_entry): Mark thunks as needing to be emitted with
11815         their vtables, or not.
11816         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
11817         * decl2.c (mark_vtable_entries): Use use_thunk instead of
11818         emit_thunk.
11819         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
11820         information.
11821         * error.c (dump_expr): Use BV_FN.
11822         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
11823         not an int.
11824         * method.c (make_thunk): Likewise.
11825         (emit_thunk): Rename to use_thunk.  Allow callers to decide
11826         whether or not to actually emit the thunk.  Adjust for changes in
11827         representation of vcall offsets.
11828         * search.c (dfs_get_pure_virtuals): Use BV_FN.
11829         * semantics.c (emit_associated_thunks): New function.
11830         (expand_body): Use it.
11831         * ir.texi: Adjust decriptions of thunks.
11832
11833 2000-06-22  Jason Merrill  <jason@redhat.com>
11834
11835         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
11836         (tsubst_friend_function): Copy it here.
11837
11838         * decl.c (grok_op_properties): Fix typo.
11839
11840         * decl2.c (delete_sanity): Clarify warning, avoid failure on
11841         deleting void*.
11842
11843         * pt.c (check_explicit_specialization): Clarify error.
11844
11845         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
11846         an old OVERLOAD when we're declaring a non-function.
11847         (pushdecl, destroy_local_var): Check for error_mark_node.
11848         (warn_extern_redeclared_static): Also bail early if
11849         we're a CONST_DECL.
11850         (push_overloaded_decl): Ignore an old error_mark_node.
11851
11852 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
11853
11854         * call.c (build_x_va_arg): Check if in a template decl.
11855         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
11856
11857 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11858
11859         * class.c (push_lang_context): TYPE_NAME gets you to the Java
11860         types DECLs.
11861         * decl.c (check_goto): Computed gotos assumed OK.
11862
11863 2000-06-20  Jason Merrill  <jason@redhat.com>
11864
11865         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
11866         for which we don't need to look for instantiations.
11867
11868 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
11869
11870         * parse.y (program): Always call finish_translation_unit.
11871         * parse.c, parse.h: Rebuilt.
11872
11873 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
11874
11875         * method.c: Don't include hard-reg-set.h.
11876
11877 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
11878
11879         * rtti.c (get_base_offset): Cope when vbase field is in a base.
11880
11881 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
11882
11883         * call.c (build_conditional_expr): Use VOID_TYPE_P.
11884         * cvt.c (cp_convert_to_pointer): Likewise.
11885         (convert_to_void): Likewise.
11886         * error.c (dump_expr): Likewise.
11887         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
11888         * init.c (build_delete): Likewise.
11889         * method.c (emit_thunk): Likewise.
11890         * optmize.c (declare_return_variable): Likewise.
11891         * rtti.c (get_tinfo_decl_dynamic): Likewise.
11892         (get_typeid): Likewise.
11893         (build_dynamic_cast_1): Likewise.
11894         * typeck.c (composite_pointer_type): Likewise.
11895         (common_type): Likewise.
11896         (build_indirect_ref): Likewise.
11897         (build_binary_op): Likewise.
11898         (build_x_compound_expr): Likewise.
11899         (check_return_expr): Likewise.
11900         * typeck2.c (add_exception_specifier): Likewise.
11901
11902         * mangle.c (write_method_parms): Use direct comparison for end
11903         of parmlist.
11904
11905 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
11906
11907         * cp-tree.h (genrtl_try_block): Declare function.
11908         (genrtl_handler): Likewise.
11909         (genrtl_catch_block): Likewise.
11910         (genrtl_ctor_stmt): Likewise.
11911         (genrtl_subobject): Likewise.
11912         (genrtl_decl_cleanup): Likewise.
11913         (genrtl_do_poplevel): Likewise.
11914         (genrtl_do_pushlevel): Likewise.
11915         (genrtl_clear_out_block): Likewise.
11916         (genrtl_goto_stmt): Likewise.
11917         (genrtl_expr_stmt): Likewise.
11918         (genrtl_decl_stmt): Likewise.
11919         (genrtl_if_stmt): Likewise.
11920         (genrtl_while_stmt): Likewise.
11921         (genrtl_do_stmt): Likewise.
11922         (genrtl_return_stmt): Likewise.
11923         (genrtl_for_stmt): Likewise.
11924         (genrtl_break_stmt): Likewise.
11925         (genrtl_continue_stmt): Likewise.
11926         (genrtl_scope_stmt): Likewise.
11927         (genrtl_switch_stmt): Likewise.
11928         (genrtl_case_label): Likewise.
11929         (genrtl_begin_compound_stmt): Likewise.
11930         (genrtl_finish_compound_stmt): Likewise.
11931         (genrtl_compound_stmt): Likewise.
11932         (genrtl_asm_stmt): Likewise.
11933         (genrtl_named_return_value): Likewise.
11934         (genrtl_begin_stmt_expr): Likewise.
11935         (genrtl_finish_stmt_expr): Likewise.
11936         (finish_for_stmt): Removed first argument.
11937         (finish_switch_stmt): Likewise.
11938
11939         * semantics.c (genrtl_try_block): Define function.
11940         (genrtl_handler): Likewise.
11941         (genrtl_catch_block): Likewise.
11942         (genrtl_ctor_stmt): Likewise.
11943         (genrtl_subobject): Likewise.
11944         (genrtl_decl_cleanup): Likewise.
11945         (genrtl_do_poplevel): Likewise.
11946         (genrtl_do_pushlevel): Likewise.
11947         (genrtl_clear_out_block): Likewise.
11948         (genrtl_goto_stmt): Likewise.
11949         (genrtl_expr_stmt): Likewise.
11950         (genrtl_decl_stmt): Likewise.
11951         (genrtl_if_stmt): Likewise.
11952         (genrtl_while_stmt): Likewise.
11953         (genrtl_do_stmt): Likewise.
11954         (genrtl_return_stmt): Likewise.
11955         (genrtl_for_stmt): Likewise.
11956         (genrtl_break_stmt): Likewise.
11957         (genrtl_continue_stmt): Likewise.
11958         (genrtl_scope_stmt): Likewise.
11959         (genrtl_switch_stmt): Likewise.
11960         (genrtl_case_label): Likewise.
11961         (genrtl_begin_compound_stmt): Likewise.
11962         (genrtl_finish_compound_stmt): Likewise.
11963         (genrtl_compound_stmt): Likewise.
11964         (genrtl_asm_stmt): Likewise.
11965         (genrtl_named_return_value): Likewise.
11966         (genrtl_begin_stmt_expr): Likewise.
11967         (genrtl_finish_stmt_expr): Likewise.
11968         (finish_for_stmt): Removed first argument and generate rtl
11969         specific code.
11970         (finish_switch_stmt): Likewise.
11971         (do_poplevel): Removed generate rtl specific code.
11972         (do_pushlevel): Likewise.
11973         (add_tree): Likewise.
11974         (finish_goto_stmt): Likewise.
11975         (finish_expr_stmt): Likewise.
11976         (begin_if_stmt): Likewise.
11977         (finish_if_stmt_cond): Likewise.
11978         (finish_then_clause): Likewise.
11979         (begin_else_clause): Likewise.
11980         (finish_else_clause): Likewise.
11981         (finish_if_stmt): Likewise.
11982         (clear_out_block): Likewise.
11983         (begin_while_stmt): Likewise.
11984         (finish_while_stmt_cond): Likewise.
11985         (finish_while_stmt): Likewise.
11986         (begin_do_stmt): Likewise.
11987         (finish_do_body): Likewise.
11988         (finish_do_stmt): Likewise.
11989         (finish_return_stmt): Likewise.
11990         (begin_for_stmt): Likewise.
11991         (finish_for_init_stmt): Likewise.
11992         (finish_for_cond): Likewise.
11993         (finish_for_expr): Likewise.
11994         (finish_break_stmt): Likewise.
11995         (finish_continue_stmt): Likewise.
11996         (begin_switch_stmt): Likewise.
11997         (finish_switch_cond): Likewise.
11998         (finish_case_label): Likewise.
11999         (begin_try_block): Likewise.
12000         (begin_function_try_block): Likewise.
12001         (finish_try_block): Likewise.
12002         (finish_cleanup_try_block): Likewise.
12003         (finish_cleanup): Likewise.
12004         (finish_function_try_block): Likewise.
12005         (finish_handler_sequence): Likewise.
12006         (finish_function_handler_sequence): Likewise.
12007         (begin_handler): Likewise.
12008         (finish_handler_parms): Likewise.
12009         (begin_catch_block): Likewise.
12010         (finish_handler): Likewise.
12011         (begin_compound_stmt): Likewise.
12012         (finish_compound_stmt): Likewise.
12013         (finish_asm_stmt): Likewise.
12014         (finish_label_stmt): Likewise.
12015         (finish_label_decl): Likewise.
12016         (finish_subobject): Likewise.
12017         (finish_decl_cleanup): Likewise.
12018         (finish_named_return_value): Likewise.
12019         (begin_stmt_expr): Likewise.
12020         (finish_stmt_expr): Likewise.
12021
12022         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
12023         to call genrtl_expr_stmt when appropriate.
12024
12025         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
12026         begin_compound_expr to call genrtl_begin_stmt_expr and
12027         genrtl_begin_compound_expr when appropriate.
12028         (finish_init_stmts): Changed calls to finish_compound_expr and
12029         finish_stmt_expr to call genrtl_finish_compound_expr and
12030         genrtl_finish_stmt_expr when appropriate.
12031         (expand_default_init): Changed call to finish_expr_stmt to call
12032         genrtl_expr_stmt when appropriate.
12033         (build_vec_init): Likewise.
12034
12035         * parse.y (simple_stmt): Removed first argument from call to
12036         finish_for_stmt. Removed first argument from call to
12037         finish_switch_stmt.
12038
12039         * parse.c: Regenerated.
12040
12041         * pt.c (tsubst_expr): Removed first argument from call to
12042         finish_for_stmt. Removed first argument from call to
12043         finish_switch_stmt.
12044
12045 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
12046
12047         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
12048         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
12049
12050         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
12051         (cplus_tree_code_length[]): Likewise.
12052         (cplus_tree_code_name[]): Likewise.
12053         (init_parse): Added call to add_c_tree_codes. Changed
12054         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
12055
12056 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
12057
12058         * cp-tree.h (finish_mem_initializers): Declare.
12059         (count_trees): Likewise.
12060         * parse.y (base_init): Use finish_mem_initializers.
12061         * semantics.c (finish_mem_initializers): New function.
12062
12063         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
12064         the number of trees.
12065         (n_trees): Remove.
12066         (count_trees): Don't use it.
12067
12068 2000-06-15  Jason Merrill  <jason@redhat.com>
12069
12070         * tree.c (count_trees): New debugging function.
12071
12072         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
12073         * init.c (build_member_call): Pull out the name of a DECL.
12074
12075         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
12076         * semantics.c (expand_body): Push to TV_INTEGRATION here.
12077         * optimize.c (optimize_function): Not here.
12078         * pt.c (instantiate_decl): Push to TV_PARSE.
12079
12080 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
12081
12082         * cp-tree.h (struct language_function): Remove x_base_init_list
12083         and x_member_init_list.
12084         (current_base_init_list): Remove.
12085         (current_member_init_list): Likewise.
12086         (setup_vtbl_ptr): Change prototype.
12087         (emit_base_init): Likewise.
12088         (expand_member_init): Likewise.
12089         (reinit_parse_for_function): Remove.
12090         * decl.c (save_function_data): Don't clear x_base_init_list and
12091         x_member_init_list.
12092         (mark_language_function): Don't mark them.
12093         * init.c (perform_member_init): Tweak comment.
12094         (sort_member_init): Take the list of initializers as an argument.
12095         (sort_base_init): Likewise.
12096         (emit_base_init): Likewise.
12097         (expand_member_init): Return the initializer.  Don't use global
12098         variables.
12099         * lex.c (reinit_parse_for_function): Remove.
12100         * method.c (build_template_parm_names): Correct substitution.
12101         (do_build_copy_constructor): Don't use current_member_init_list
12102         and current_base_init_list.
12103         (synthesize_method): Likewise.
12104         * parse.y (base_init): Split mem-initializers into
12105         base-initializers and field-initializers.
12106         (member_init_list): Build up the list here.
12107         (member_init): Return the initializer.
12108         (fn.depfn): Don't use reinit_parse_for_function.
12109         * parse.c: Regenerated.
12110         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
12111         ERROR_MARK.
12112         (tsubst_expr): Don't use current_member_init_list
12113         and current_base_init_list.
12114         (tsubst_expr_values): Rename to ...
12115         (tsubst_initializer_list): ... this.  Use convert_from_reference.
12116         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
12117         and current_base_init_list.
12118         (begin_function_definition): Don't call reinit_parse_for_function.
12119
12120         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
12121
12122         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
12123         correctly.
12124
12125         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
12126
12127 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
12128
12129         * cp-tree.h (IF_COND): Move to c-common.h.
12130         (THEN_CLAUSE): Likewise.
12131         (ELSE_CLAUSE): Likewise.
12132         (WHILE_COND): Likewise.
12133         (WHILE_BODY): Likewise.
12134         (DO_COND): Likewise.
12135         (DO_BODY): Likewise.
12136         (RETURN_EXPR): Likewise.
12137         (EXPR_STMT_EXPR): Likewise.
12138         (FOR_INIT_STMT): Likewise.
12139         (FOR_COND): Likewise.
12140         (FOR_EXPR): Likewise.
12141         (FOR_BODY): Likewise.
12142         (SWITCH_COND): Likewise.
12143         (SWITCH_BODY): Likewise.
12144         (CASE_LOW): Likewise.
12145         (CASE_HIGH): Likewise.
12146         (GOTO_DESTINATION): Likewise.
12147         (COMPOUND_BODY): Likewise.
12148         (ASM_CV_QUAL): Likewise.
12149         (ASM_STRING): Likewise.
12150         (ASM_OUTPUTS): Likewise.
12151         (ASM_INPUTS): Likewise.
12152         (ASM_CLOBBERS): Likewise.
12153         (DECL_STMT_DECL): Likewise.
12154         (STMT_EXPR_STMT): Likewise.
12155         (LABEL_STMT_LABEL): Likewise.
12156         (SCOPE_BEGIN_P): Likewise.
12157         (SCOPE_END_P): Likewise.
12158         (SCOPE_STMT_BLOCK): Likewise.
12159         (SCOPE_NULLIFIED_P): Likewise.
12160         (SCOPE_NO_CLEANUPS_P): Likewise.
12161         (SCOPE_PARTIAL_P): Likewise.
12162         (ASM_VOLATILE_P): Likewise.
12163         (STMT_LINENO): Likewise.
12164         (STMT_LINENO_FOR_FN_P): Likewise.
12165
12166         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
12167         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
12168         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
12169         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
12170         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
12171
12172         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
12173
12174         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
12175         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
12176
12177         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
12178         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
12179         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
12180
12181 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
12182
12183         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
12184         * class.c (dfs_find_final_overrider): Set it appropriately.
12185         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
12186         avoid unneeded secondary vptrs.
12187
12188 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
12189
12190         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
12191         (check_bitfield_decl, check_field_decl): Likewise.
12192         (build_vtbl_or_vbase_field, build_base_field): Likewise.
12193         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
12194         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
12195         (xfer_tag, finish_enum): Likewise.
12196         * decl2.c (finish_builtin_type): Likewise.
12197         * init.c (init_init_processing): Likewise.
12198         * pt.c (instantiate_class_template): Likewise.
12199         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
12200         * cp-tree.h (struct lang_type): Add user_align member.
12201         (CLASSTYPE_USER_ALIGN): Define.
12202
12203 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
12204
12205         * Make-lang.in (c++.install-common): Install g++-cross in
12206         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
12207         $(target_alias)-g++ and $(target_alias)-c++.
12208
12209 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
12210
12211         * class.c (vcall_offset_data_s): Add last_init and fns.
12212         (overrides): Rename to same_signature_p.
12213         (dfs_find_final_overrider): Adjust accordingly.
12214         (mark_overriders): Likewise.
12215         (warn_hidden): Likewise.
12216         (build_vtbl_initializer): Reorganize machinery for building things
12217         at negative offsets.
12218         (build_vcall_and_vbase_vtbl_entries): Likewise.
12219         (build_vbase_offset_vtbl_entries): Likewise.
12220         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
12221         offset entries.  Do not create two entries for functions with the
12222         same signature.
12223         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
12224         (build_rtti_vtbl_entries): Reorganize machinery for building things
12225         at negative offsets.
12226
12227         * optimize.c (expand_call_inline): Don't recurse into the code
12228         used to initialize the parameters more than once.
12229
12230 2000-06-11  Mark Mitchell <mark@codesourcery.com>
12231
12232         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
12233         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
12234         (find_substitution): Only use the `Sa' substitution for
12235         std::allocator, not instantiations of it.
12236         (write_template_prefix): Move comment.  Only use a TREE_LIST to
12237         represent substitutions for a member template.
12238         (write_array_type): Mangle array dimensions correctly.
12239         * optimize.c (maybe_clone_body): Copy more information from the
12240         cloned function.
12241         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
12242         on the regenerated declaration.
12243
12244 2000-06-11  Chip Salzenberg  <chip@valinux.com>
12245             Mark Mitchell <mark@codesourcery.com>
12246
12247         * class.c (build_vtable): Clarify comment.
12248         (build_ctor_vtbl_group): Pass the most derived type to
12249         build_vtable.
12250
12251 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12252
12253         * decl2.c (compare_options): Don't needlessly cast away const-ness.
12254
12255 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
12256
12257         * decl.c (add_binding): Handle duplicate declarations of external
12258         variables.
12259
12260 2000-06-09  Chip Salzenberg  <chip@valinux.com>
12261             Mark Mitchell <mark@codesourcery.com>
12262
12263         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
12264         argument.
12265         (write_signed_number): New macro.
12266         (write_unsigned_number): Likewise.
12267         (write_source_name): Use them.
12268         (write_number): Handle signed and unsigned values.
12269         (write_integer_cst): Use tree_int_cst_sgn, and use
12270         write_unsigned_number or write_signed_number as appropriate.
12271         (write_discriminator): Use write_unsigned_number or
12272         write_signed_number as appropriate.
12273         (write_template_arg_literal): Likewise.
12274         (write_array_type): Use tree_low_cst.
12275         (write_template_parm):  Use write_unsigned_number or
12276         write_signed_number as appropriate.
12277         (write_substitution): Adjust call to write_number.
12278         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
12279         (write_expression): Handle non-type template arguments of
12280         reference type correctly.
12281         (mangle_thunk): Use write_signed_number.
12282
12283 2000-06-09  Chip Salzenberg  <chip@valinux.com>
12284
12285         * mangle.c (find_substition): Don't mangle objects with typename
12286         substitutions (e.g. "cin" as "Si").
12287
12288 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
12289
12290         * call.c (add_candidate): Use ggc_alloc_cleared.
12291         * decl.c (lookup_label): Likewise.
12292         * lex.c (retrofit_lang_decl): Likewise.
12293
12294 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
12295
12296         * semantics.c (expand_body): Push to TV_EXPAND.
12297         * optimize.c (optimize_function): Push to TV_INTEGRATION.
12298         * decl.c (start_function): Always call announce_function.
12299
12300         * tinfo2.cc: Just declare abort.
12301
12302 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
12303
12304         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
12305         whenever @ is a symbolic name.
12306
12307 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
12308
12309         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
12310
12311 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
12312
12313         * decl.c (pushdecl): Look up functions by DECL_NAME, not
12314         DECL_ASSEMBLER_NAME.
12315
12316 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
12317
12318         * decl2.c (c_language): Define.
12319
12320 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
12321
12322         * lex.c (lang_init_options): Tweak.
12323
12324         * decl2.c: Remove #inclusion of diagnostic.h
12325         (lang_decode_option): Move diagnostic formatting options to
12326         toplevel.
12327
12328         * lang-options.h: Remove documentation for diagnostic options.
12329
12330         * Makefile.in (lex.o): Depends upon diagnostic.h
12331
12332 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
12333
12334         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
12335         the same DECL_RESULT, it's not a redefinition.
12336         * pt.c (tsubst_decl): Remove code to handle illegal
12337         specializations.
12338
12339 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
12340
12341         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
12342
12343 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
12344
12345         * search.c (maybe_suppress_debug_info): Don't check
12346         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
12347
12348         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
12349         here if extern_p.
12350
12351         Remember instantiation context in deferred instantiations.
12352         * cp-tree.h (struct tinst_level): Remove.
12353         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
12354         * pt.c (current_tinst_level): Now a tree.
12355         (print_template_context, push_tinst_level, pop_tinst_level,
12356         tinst_for_decl): Adjust.
12357         (reopen_tinst_level): New fn.
12358         (init_pt): Register current_tinst_level as a root.
12359         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
12360         of the pending templates list.
12361         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
12362         * lex.c (extract_interface_info): Adjust.
12363         * decl2.c (warn_if_unknown_interface): Adjust.
12364
12365 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
12366
12367         * class.c (indirect_primary_base_p): New function.
12368         (determine_primary_base): Use it.
12369
12370 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12371
12372         Update new-abi dynamic cast algorithm.
12373         * tinfo.cc (__class_type_info::__dyncast_result): Add
12374         whole_details. Adjust constructor.
12375         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
12376         Avoid unnecessary searching.
12377         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
12378
12379 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12380
12381         * decl.c (init_decl_processing): Don't call record_component_aliases.
12382         * tree.c (build_cplus_array_type_1): Likewise.
12383
12384 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
12385
12386         * ir.texi: Correct typo.
12387         * mangle.c (write_expression): Handle non-type template arguments
12388         with reference type.
12389         * method.c (build_overload_value): Likewise.
12390         * pt.c (convert_nontype_argument): Explicitly represent conversion
12391         to a reference with an ADDR_EXPR.
12392         (unify): Always unify arguments in left-to-right order.
12393
12394 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
12395             Mark Mitchell  <mark@codesourcery.com>
12396
12397         * Make-lang.in (CXX_SRCS): Add mangle.c.
12398         * Makefile.in (CXX_OBJS): Add mangle.o.
12399         (mangle.o): New rule.
12400
12401         * class.c (local_classes): New variable.
12402         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
12403         (get_vtt_name): Use mangle_vtt_name for new ABI.
12404         (init_class_processing): Initialize local_classes.
12405         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
12406         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
12407         (std_identifier): New macro.
12408         (DECL_VOLATILE_MEMFUNC_P): New macro.
12409         (DECL_NAMESPACE_STD_P): Likewise.
12410         (local_classes): Declare.
12411         (get_mostly_instantiated_function_type): Declare.
12412         (init_mangle): Declare.
12413         (mangle_decl): Likewise.
12414         (mangle_type_string): Likewise.
12415         (mangle_type): Likewise.
12416         (mangle_typeinfo_for_type): Likewise.
12417         (mangle_typeinfo_string_for_type): Likewise.
12418         (mangle_vtbl_for_type): Likewise.
12419         (mangle_vtt_for_type): Likewise.
12420         (mangle_ctor_vtbl_for_type): Likewise.
12421         (mangle_thunk): Likewise.
12422         (mangle_conv_op_name_for_type): Likewise.
12423         (mangle_guard_variable): Likewise.
12424         * decl.c (pushtag): Keep track of local classes.
12425         (initialize_predefined_identifiers): Initialize std_identifier.
12426         (init_decl_processing): Use std_identifier.
12427         (start_decl): Don't treat instantiations as specializations.
12428         (grokdeclarator): Likewise.
12429         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
12430         name for fully-instantiated templates.
12431         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
12432         destructors with the new ABI.
12433         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
12434         (grokfield): Use mangle_type for new ABI.
12435         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
12436         (get_sentry): Use mangle_guard_variable for new ABI.
12437         (start_static_initialization_or_destruction): Likewise.
12438         * expr.c (extract_aggr_init): Remove.
12439         (extract_scalar_init): Likewise.
12440         (extract_init): Remove #if 0'd code.
12441         * mangle.c: New function.
12442         * method.c (build_mangled_name): Assert not flag_new_abi.
12443         (build_static_name): Likewise.
12444         (build_decl_overload_real): Likewise.
12445         (build_typename_overload): Likewise.
12446         (build_overload_with_type): Likewise.
12447         (build_overload_name): Likewise.
12448         (get_ctor_vtbl_name): Likewise.
12449         (start_squangling): Likewise.
12450         (get_id_2): Likewise.
12451         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
12452         (init_method): Call init_mangle for new ABI.
12453         (make_thunk): Call mangle_thunk for new ABI.
12454         * operators.def: Correct new ABI manglings for the `%' operator.
12455         Add `::' operator.
12456         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
12457         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
12458         (lookup_template_class): Call mangle_decl for new ABI.
12459         (get_mostly_instantiated_function_type): New function.
12460         (set_mangled_name_for_template_decl): Use it.
12461         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
12462         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
12463         conversion op names.
12464         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
12465         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
12466         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
12467         mangle_typeinfo_string_for_type.
12468
12469 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
12470
12471         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
12472         (INNERMOST_TEMPLATE_ARGS): New macro.
12473         (innermost_args): Remove.
12474         (get_innermost_template_args): New function.
12475         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
12476         * error.c (dump_function_decl): Be caution when using
12477         most_general_template.
12478         * method.c (build_template_parm_names):  Use
12479         INNERMOST_TEMPLATE_ARGS.
12480         * pt.c (add_to_template_args): Tidy comment
12481         (get_innermost_template_args): New function.
12482         (check_explicit_specialization): Clear DECL_INITIAL for a new
12483         specialization.
12484         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
12485         Tidy.
12486         (push_template_decl): Always register specializations of the most
12487         general template.
12488         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
12489         (coerce_template_parms): Likewise.
12490         (lookup_template_class): Likewise.
12491         (innermost_args): Remove.
12492         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
12493         (tsubst_decl): Handle tricky specializations.  Use
12494         get_innermost_template_args.
12495         (instantiate_template): Simplify handling of partial
12496         instantiations.
12497         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
12498         (most_general_template): Reimplement, in a more straightforward
12499         manner.
12500         (regenerate_decl_from_template): Tweak formatting.  Use
12501         TMPL_ARGS_DEPTH for clarity.
12502         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
12503
12504         * dump.c (dequeue_and_dump): Dump information about thunks.
12505
12506 2000-06-01  Richard Henderson  <rth@cygnus.com>
12507
12508         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
12509
12510 2000-06-01  Richard Henderson  <rth@cygnus.com>
12511
12512         * decl2.c (unsupported_options): Fix typo, make const.
12513         (lang_decode_option): Fix bsearch argument order.
12514
12515 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
12516
12517         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
12518         on FIELD_DECLs.
12519
12520 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12521
12522         * cp-tree.h (c_get_alias_set): Deleted.
12523         * Makefile.in (decl.o): Include ../expr.h.
12524         * decl.c (expr.h): Include.
12525         (init_decl_processing): Call record_component_aliases for arrays.
12526         (grokdeclarator): Likewise.
12527         Set TREE_ADDRESSABLE for fields that aren't bitfields.
12528         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
12529
12530 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
12531
12532         Remove guiding declaration support.
12533         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
12534         (flag_guiding_decls): Remove.
12535         * call.c (build_user_type_conversion_1): Remove support for
12536         guiding decls.
12537         (build_new_function_call): Likewise.
12538         (build_new_op): Likewise.
12539         (build_new_method_call): Likewise.
12540         * decl.c (start_function): Likewise.
12541         * friend.c (is_friend): Likewise.
12542         (do_friend): Likewise.
12543         * decl2.c ((flag_dump_translation_unit): Make it const.
12544         (flag_guiding_decls): Remove.
12545         (unsupported_options): New variable
12546         (compare_options): New function.
12547         (lang_decode_option): Use them.
12548
12549         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
12550
12551         * method.c (mangle_expression): Adjust test for legal expression
12552         operators.
12553
12554         * pt.c (instantiate_decl): Save and restore the local
12555         specializations list.
12556
12557 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
12558
12559         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
12560
12561 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
12562
12563         * call.c (add_template_candidate_real): Handle member template
12564         constructors for classes with virtual bases.
12565         (build_user_type_conversion_1): Use in_charge_arg_for_name.
12566         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
12567
12568         * ir.texi: Update thunk documentation.
12569
12570         * call.c (joust): Fix handling of overloaded builtin operators.
12571
12572 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
12573
12574         * cp-tree.h (DECL_ANTICIPATED): New macro.
12575         Document new use of DECL_LANG_FLAG_7.
12576         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
12577         in the user namespace.
12578         * lex.c (do_identifier): If the identifier's declaration has
12579         DECL_ANTICIPATED on, it has not yet been declared.  But do not
12580         replace it with an ordinary implicit declaration.
12581
12582         * tinfo2.cc: Include stdlib.h.
12583
12584 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
12585
12586         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
12587         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
12588         CLASSTYPE_ALIGN.
12589
12590 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
12591
12592         * decl2.c (lang_decode_option): Use skip_leading_substring instead
12593         of plain strncmp.
12594
12595 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
12596
12597         * operators.def (<?): Duplicated, should have been...
12598         (>?): this.  Fixed.
12599
12600 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
12601             Mark Mitchell  <mark@codesourcery.com>
12602
12603         * cp-tree.h (ansi_opname): Make it a macro.
12604         (ansi_assopname): Likewise.
12605         (struct lang_decl_flags): Add assignment_operator_p.
12606         (struct lang_decl): Add operator_code.
12607         (DECL_VTT_PARM): Adjust.
12608         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
12609         overloaded operator.
12610         (SET_OVERLOADED_OPERATOR_CODE): New macro.
12611         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
12612         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
12613         (opname_tab): Remove.
12614         (assignop_tab): Likewise.
12615         (operator_name_info_t): New type.
12616         (operator_name_info): New variable.
12617         (assignment_operator_name_info): Likewise.
12618         (build_cp_library_fn): Remove declaration.
12619         (push_cp_library_fn): Likewise.
12620         (operator_name_string): Likewise.
12621         (build_decl_overload): Likewise.
12622         * call.c (print_z_candidates): Simplify.
12623         (build_object_call): Adjust usage of ansi_opname.  Use
12624         DECL_OVERLOADED_OPERATOR_P.
12625         (op_error): Adjust operator name lookup.
12626         (build_conditional_expr): Adjust usage of ansi_opname.
12627         (build_new_op): Likewise.
12628         (build_op_delete_call): Likewise.
12629         (build_over_call): Likewise.
12630         (joust): Use DECL_OVERLOADED_OPERATOR_P.
12631         * decl.c (duplicate_decls): Copy operator_code.
12632         (init_decl_processing): Adjust parameters to push_cp_library_fn.
12633         (builtin_function): Adjust parameters to build_library_fn_1.
12634         (build_library_fn_1): Accept an overloaded operator code.
12635         (build_library_fn): Pass ERROR_MARK.
12636         (build_cp_library_fn): Accept an overloaded operator code.
12637         (push_cp_library_fn): Likewise.
12638         (grokfndecl): Tweak.
12639         (grokdeclarator): Simplify code to compute names of overloaded
12640         operators.  Adjust use of ansi_opname.
12641         (ambi_op_p): Work on tree_codes, not identifiers.
12642         (unary_op_p): Likewise.
12643         (grok_op_properties): Likewise.
12644         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
12645         (lang_mark_tree): Don't try to mark the operator_code.
12646         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
12647         * error.c (dump_decl): Remove special handling for operator
12648         names.
12649         (dump_function_name): Likewise.
12650         (dump_expr): Adjust name lookup of operators.
12651         (op_to_string): Simplify.
12652         (assop_to_string): Likewise.
12653         * init.c (build_new_1): Adjust use of ansi_opname.
12654         * lex.c (opname_tab): Remove.
12655         (assignop_tab): Likewise.
12656         (ansi_opname): Likewise.
12657         (ansi_assopname): Likewise.
12658         (operator_name_string): Likewise.
12659         (reinit_lang_specific): Likewise.
12660         (operator_name_info): New variable.
12661         (assignment_operator_name_info): Likewise.
12662         (init_operators): New function.
12663         (init_parse): Use it.
12664         (do_identifier): Adjust use of ansi_opname.
12665         * method.c (mangle_expression): Don't use ansi_opname for
12666         mangling.
12667         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
12668         (build_decl_overload): Remove.
12669         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
12670         (do_build_assign_ref): Adjust use of ansi_opname.
12671         (synthesize_method): Likewise.
12672         (implicitly_declare_fn): Likewise.
12673         * operators.def: New file.
12674         * parse.y (operator): Adjust use of ansi_opname.
12675         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
12676         (set_mangled_name_for_template_decl): Don't play games with
12677         current_namespace.
12678         (special_function_p): Adjust use of ansi_opname.
12679         * typeck.c (check_return_expr): Likewise.
12680         * Make-lang.in (cc1plus): Depend on operators.def.
12681         * Makefile.in (lex.o): Likewise.
12682         (decl.o): Likewise.
12683
12684 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
12685
12686         * Make-lang.in (cplib2.ready): Eradicate.
12687
12688 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12689
12690         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
12691         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
12692         (built_min, cp_tree_equal): Likewise.
12693
12694 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
12695
12696         * class.c (layout_nonempty_base_or_field): Replace
12697         `record_layout_info' with `record_layout_info_s'.
12698
12699 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
12700
12701         Fix goto checking.
12702         * cp-tree.h (struct language_function): x_named_labels is now
12703         a struct named_label_list*.
12704         * decl.c (struct named_label_use_list): Renamed from...
12705         (struct named_label_list): ...this.  New struct.
12706         (push_binding_level): Don't set eh_region.
12707         (note_level_for_eh): New fn.
12708         (pop_label): Take label and old value directly.
12709         (pop_labels): Adjust for new named_labels format.
12710         (lookup_label): Likewise.
12711         (poplevel): Note characteristics of a binding level containing a
12712         named label.  Mess with named label lists earlier.
12713         (mark_named_label_lists): New fn.
12714         (mark_lang_function): Call it.
12715         (use_label): New fn, split out from...
12716         (make_label_decl): ...here.  Don't call it.
12717         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
12718         check_previous_gotos): New fns, split out from...
12719         (define_label): ...here.
12720         (check_switch_goto): New fn.
12721         (define_case_label): Call it.
12722         (check_goto): New fn.
12723         * semantics.c (finish_goto_stmt): Call it and use_label.
12724         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
12725         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
12726
12727 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
12728
12729         * class.c (build_vtable_entry_ref): Correct usage of
12730         get_vtbl_decl_for_binfo.
12731
12732         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
12733         * method.c (implicitly_declare_fn): Not here.
12734
12735 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
12736
12737         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
12738         (CPTI_PTMD_DESC_TYPE): ... here.
12739         (ptmd_desc_type_node): Rename to ...
12740         (ptm_desc_type_node): ... here.
12741         * decl.c: Likewise.
12742         * rtti.c (ptmd_initializer): Rename to ...
12743         (ptm_initializer): ... here.
12744         (sythesize_tinfo_var): Adjust. Deal with pointer to member
12745         function.
12746         (create_tinfo_types): Adjust.
12747
12748 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
12749
12750         Finish implementation of VTTs.
12751         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
12752         CPTI_VTT_PARM_IDENTIFIER.
12753         (vtt_parm_identifier): New macro.
12754         (vtt_parm_type): Likewise.
12755         (BINFO_SUBVTT_INDEX): Likewise.
12756         (BINFO_VPTR_INDEX): Likewise.
12757         (struct lang_decl): Add vtt_parm.
12758         (DECL_VTT_PARM): New macro.
12759         (DECL_USE_VTT_PARM): Likewise.
12760         (DECL_NEEDS_VTT_PARM_P): Likewise.
12761         (get_vtt_name): Declare.
12762         (build_artificial_parm): Likewise.
12763         (fixup_all_virtual_upcast_offsets): Likewise.
12764         (expand_indirect_vtbls_init): Remove.
12765         * call.c (build_new_method_call): Pass the vtt to subobject
12766         constructors and destructors.
12767         * class.c (get_vtt_name): Give it external linkage.
12768         (build_clone): Handle the magic VTT parameters for clones.
12769         (clone_function_decl): Fix typo in comment.
12770         (build_vtt): Keep track of the indices in the VTTs where various
12771         entities are stored.
12772         (build_vtt_inits): Likewise.
12773         (dfs_build_vtt_inits): Likewise.
12774         (build_ctor_vtbl_group): Tweak type of construction vtables.
12775         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
12776         primary bases, when building construction vtables.
12777         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
12778         (initialize_predefined_identifiers): Add vtt_parm_identifier.
12779         (init_decl_processing): Initialize vtt_parm_type.
12780         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
12781         (lang_mark_tree): Make vtt_parm.
12782         * decl2.c (build_artificial_parm): New function.
12783         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
12784         (grokclassfn): Use build_artificial_parm.
12785         * init.c (initialize_vtbl_ptrs): Call
12786         fixup_all_virtual_upcast_offsets directly.
12787         (perform_member_init): Use the complete subobject destructor for
12788         member cleanups.
12789         (build_vtbl_address): New function.
12790         (expand_virtual_init): Handle VTTs.
12791         * optimize (maybe_clone_body): Likewise.
12792         * search.c (fixup_all_virtual_upcast_offsets): Give it external
12793         linkage.
12794         (expand_indirect_vtbls_init): Remove.
12795         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
12796         * tree.c (make_binfo): Make them bigger.
12797
12798 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
12799
12800         * inc/cxxabi.h (__pbase_type_info): Define, based on
12801         __pointer_type_info.
12802         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
12803         (__pointer_to_member_type_info): Likewise.
12804         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
12805         (__pointer_to_member_type_info::__is_pointer_p): Remove.
12806         (__pointer_type_info::__do_catch): Rename to ...
12807         (__pbase_type_info::__do_catch): ... here. Adjust.
12808         (__pbase_type_info::__pointer_catch): Implement.
12809         (__pointer_type_info::__pointer_catch): Adjust.
12810         (__pointer_to_member_type_info::__pointer_catch): Adjust.
12811
12812 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
12813
12814         * tinfo.h (__user_type_info::contained_virtual_p): New
12815         predicate.
12816         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
12817         shaped hierarchy.
12818         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
12819         diamond shaped hierarchy. Add early out for mixed diamond and
12820         duplicate shaped hierarchy.
12821
12822 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
12823
12824         * cp-tree.h (build_delete): Change prototype.
12825         (build_vec_delete): Likewise.
12826         * call.c (build_scoped_method_call): Use special_function_kind
12827         values to indicate the kind of destruction to be done.
12828         (build_method_call): Likewise.
12829         * decl.c (finish_destructor_body): Likewise.
12830         (maybe_build_cleanup_1): Likewise.  Rename to ...
12831         (maybe_build_cleanup): ... this.
12832         * decl2.c (delete_sanity): Use special_function_kind
12833         values to indicate the kind of destruction to be done.
12834         (build_cleanup): Likewise.
12835         * init.c (perform_member_init): Likewise.
12836         (build_vec_delete_1): Likewise.
12837         (build_dtor_call): Simplify.
12838         (build_delete): Use special_function_kind
12839         values to indicate the kind of destruction to be done.
12840         (build_vbase_delete): Likewise.
12841         (build_vec_delete): Likewise.
12842
12843         * init.c (sort_member_init): Fix typo in error message generation
12844         code.
12845
12846 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
12847
12848         * semantics.c (begin_class_definition): make the packed
12849         attribute be sensitive to the "-fpack-struct" command line flag
12850
12851 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
12852
12853         Update new-abi upcast algorithm.
12854         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
12855         prototype and meaning of return value.
12856         (__si_class_type_info::__do_upcast): Likewise.
12857         (__vmi_class_type_info::__do_upcast): Likewise.
12858         * tinfo.cc (__class_type_info::__upcast_result): Replace
12859         whole2dst with part2dst. Adjust ctor.
12860         (__class_type_info::__do_upcast): Adjust call of worker function.
12861         (__class_type_info::__do_upcast): Adjust.
12862         (__si_class_type_info::__do_upcast): Adjust. Use parent's
12863         __do_upcast.
12864         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
12865         virtual base in diamond hierarchy bug.
12866
12867 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
12868
12869         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
12870         and bitfield to tinfo_fn_p.
12871         (DECL_TINFO_FN_P): Adjust.
12872         (SET_DECL_TINFO_FN_P): Likewise.
12873         (DECL_MUTABLE_P): Likewise.
12874         (DECL_C_BIT_FIELD): Likewise.
12875         (SET_DECL_C_BIT_FIELD): Likewise.
12876         (CLEAR_DECL_C_BIT_FIELD): Likewise.
12877         (DECL_UNINLINABLE): Likewise.
12878         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
12879         (handle_using_decl): Remove assertion.
12880         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
12881         to build FIELD_DECLs.
12882         (build_base_field): Likewise.
12883         (layout_class_type): Likewise.
12884         * decl.c (init_decl_processing): Likewise.
12885         (build_ptrmemfunc_type): Likewise.
12886         (grokdeclarator): Likewise.
12887         * decl2.c (grok_x_components): Likewise.
12888         * except.c (call_eh_info): Likewise.
12889         * init.c (init_init_processing): Likewise.
12890         * rtti.c (expand_class_desc): Likewise.
12891         (create_pseudo_type_info): Likewise.
12892         (get_vmi_pseudo_type_info): Likewise.
12893         (create_tinfo_types): Likewise.
12894         * ptree.c (print_lang_decl): Adjust.
12895         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
12896         before checking DECL_MUTABLE_P.
12897
12898         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
12899         parameters for template functions.
12900         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
12901         destructors as well as constructors.
12902
12903 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
12904
12905         * class.c (build_ctor_vtbl_group): Set inits.
12906         * optimize.c (maybe_clone_body): Set DECL_INLINE and
12907         DECL_THIS_INLINE appropriately for clones.
12908
12909         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
12910         (DECL_CONV_FN_P): Simplify.
12911         (DECL_OPERATOR): Remove.
12912         (language_to_string): Declare.
12913         * decl.c (duplicate_decls): Fix typo in comment.
12914         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
12915         (grok_op_properties): Use DECL_CONV_FN_P instead of
12916         IDENTIFIER_TYPENAME_P.
12917         * dump.c (dequeue_and_dump): Dump the language linkage of
12918         declarations.
12919         * error.c (language_to_string): Give it external linkage.
12920         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
12921         (implicitly_declare_fn): Set DECL_LANGUAGE.
12922         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
12923         IDENTIFIER_TYPENAME_P.
12924         (tsubst_decl): Likewise.
12925         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
12926         * semantics.c (finish_member_declaration): Don't mark members of
12927         classes declared in an extern "C" region as extern "C".
12928
12929 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12930
12931         * decl2.c (qualified_lookup_using_namespace): Look through
12932         namespace aliases.
12933
12934         * decl.c (push_using_decl): Return the old decl on namespace level.
12935
12936 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
12937
12938         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
12939         (VTT_NAME_PREFIX): New macro.
12940         (CTOR_VTBL_NAME_PREFIX): Likewise.
12941         (get_ctor_vtbl_name): New function.
12942         * class.c (get_vtable_name): Simplify.
12943         (get_vtt_name): New function.
12944         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
12945         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
12946         when a virtual base becomes primary.
12947         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
12948         VTTs.
12949         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
12950         additional parameters.
12951         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
12952         (initialize_array): New function.
12953         (build_vtt): Likewise.
12954         (build_vtt_inits): Likewise.
12955         (dfs_build_vtt_inits): Likewise.
12956         (dfs_fixup_binfo_vtbls): Likewise.
12957         (build_ctor_vtbl_group): Likewise.
12958         (initialize_vtable): Use initialize_array.
12959         (accumulate_vtbl_inits): Reimplement to handle construction
12960         vtables.
12961         (dfs_accumulate_vtbl_inits): Likewise.
12962         (bulid_vtbl_initializer): Adjust parameter name.
12963         * method.c (build_typename_overload): Remove #if 0'd code.
12964         (get_ctor_vtbl_name): New function.
12965         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
12966         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
12967
12968         * cp-tree.h (struct lang_type): Remove search_slot.
12969         (CLASSTYPE_SEARCH_SLOT): Remove.
12970         (emit_base_init): Change prototype.
12971         (initialize_vtbl_ptrs): Likewise.
12972         (expand_indirect_vtbls_init): Likewise.
12973         (clear_search_slots): Remove.
12974         * decl.c (lang_mark_tree): Don't mark search_slot.
12975         * init.c (initialize_vtbl_ptrs): Simplify.
12976         (emit_base_init): Likewise.
12977         * search.c (struct vbase_info): Document decl_ptr.
12978         (convert_pointer_to_single_level): Remove.
12979         (dfs_find_vbases): Remove.
12980         (dfs_init_base_pointers): Simplify.
12981         (dfs_clear_vbase_slots): Remove.
12982         (dfs_vtable_path_unmark): New function.
12983         (init_vbase_pointers): Simplify.
12984         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
12985         (expand_indirect_vtbls_init): Simplify.  Don't call
12986         mark_all_temps_used.
12987         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
12988         initialize_vtbl_ptrs.
12989
12990 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
12991
12992         * except.c: Add static prototypes.
12993
12994 2000-05-20  H.J. Lu  <hjl@gnu.org>
12995
12996         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
12997
12998 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
12999
13000         Don't create a separate copy of virtual bases for the
13001         CLASSTYPE_VBASECLASSES list.
13002         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
13003         (BINFO_FOR_VBASE): Remove.
13004         (CANONICAL_BINFO): Adjust.
13005         (binfo_for_vbase): New function.
13006         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
13007         instead of BINFO_FOR_VBASE.
13008         (build_vbase_pointer): Likewise.
13009         (build_secondary_vtable): Likewise.
13010         (dfs_mark_primary_bases): Likewise.
13011         (mark_primary_bases): Likewise.
13012         (layout_nonempty_base_or_field): Likewise.
13013         (dfs_set_offset_for_shared_vbases): Likewise.
13014         (dfs_set_offset_for_unshared_vbases): Likewise.
13015         (layout_virtual_bases): Likewise.  Adjust for changes to the
13016         CLASSTYPE_VBASECLASSES list.
13017         (dump_class_hierarchy_r): Use binfo_for_vbase
13018         instead of BINFO_FOR_VBASE.
13019         (dump_class_hierarchy): Likewise.
13020         (finish_vtbls): Likewise.
13021         (build_vtbl_initializer): Adjust for changes to the
13022         CLASSTYPE_VBASECLASSES list.
13023         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
13024         * decl.c (finish_destructor_body): Adjust for changes to the
13025         CLASSTYPE_VBASECLASSES list.
13026         * init.c (sort_base_init): Use binfo_for_vbase.
13027         (construct_virtual_bases): Adjust for changes to the
13028         CLASSTYPE_VBASECLASSES list.
13029         (expand_member_init): Use binfo_for_vbase.
13030         (build_vbase_delete):  Adjust for changes to the
13031         CLASSTYPE_VBASECLASSES list.
13032         * method.c (do_build_copy_constructor): Likewise.
13033         * rtti.c (get_base_offset): Use binfo_for_vbase.
13034         (expand_class_desc): Remove #if 0'd code.
13035         * search.c (struct vbase_info): Remove vbase_types.
13036         (get_base_distance):  Use binfo_for_vbase.
13037         (lookup_field_queue_p): Use CANONICAL_BINFO.
13038         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
13039         (get_pure_virtuals): Adjust for changes to the
13040         CLASSTYPE_VBASECLASSES list.
13041         (dfs_find_vbases): Use binfo_for_vbase.
13042         (dfs_init_vbase_pointers): Likewise.
13043         (init_vbase_pointers): Don't initialize vi.vbase_types.
13044         (virtual_context): Use binfo_for_vbase.
13045         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
13046         CLASSTYPE_VBASECLASSES list.
13047         (expand_indirect_vtbls_init): Simplify.
13048         (dfs_get_vbase_types): Don't replicate virtual bases.
13049         (find_vbase_instance): Use binfo_for_vbase.
13050         (binfo_for_vbase): New function.
13051         * typeck.c (get_delta_difference): Use binfo_for_vbase.
13052
13053 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
13054
13055         * decl2.c (finish_anon_union): Generalize error messages to handle
13056         anonymous structures.
13057         * init.c (perform_member_init): Remove `name' parameter.
13058         (build_field_list): New function.
13059         (sort_member_init): Handle anonymous union initialization order
13060         correctly.  Check for multiple initializations of the same union.
13061         (emit_base_init): Don't look up fields by name here.
13062         (expand_member_init): Record the result of name lookup for future
13063         reference.
13064         * typeck.c (build_component_ref): Fix formatting.
13065
13066 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
13067
13068         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
13069         * typeck.c (build_x_compound_expr): Replace warn_unused with
13070         warn_unused_value.
13071
13072         * decl2.c (lang_decode_option): Update -Wall unused flags by
13073         calling set_Wunused.
13074
13075 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
13076
13077         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
13078         * init.c (dfs_vtable_path_unmark): Remove.
13079         * search.c (marked_new_vtable_p): Likewise.
13080         (unmarked_new_vtable_p): Likewise.
13081         (dfs_search_slot_nonempty_p): Likewise.
13082         (dfs_mark): Likewise.
13083         (dfs_vtable_path_unmark): Likewise.
13084         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
13085         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
13086         (dfs_init_vbase_pointers): Remove special-case new ABI code.
13087         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
13088         (init_vbase_pointers): Simplify.
13089         (expand_indirect_vtbls_init): Likewise.
13090
13091         * class.c (copy_virtuals): New function.
13092         (build_primary_table): Use it.
13093         (build_secondary_vtable): Likewise.
13094         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
13095         indicate that no vcall offset is required.
13096         (add_virtual_function): Likewise.
13097         (modify_all_vtables): Likewise.
13098         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
13099         (dfs_accumulate_vtbl_inits): Likewise.
13100         (build_vtbl_initializer): Make changes to handle construction
13101         vtables.
13102         (dfs_build_vcall_offset_vtbl_entries): Likewise.
13103         (build_rtti_vtbl_entries): Likewise.
13104         (build_vtable_entries): Handle a NULL vcall_index.
13105
13106 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
13107
13108         * decl2.c (lang_decode_option): Fix thinko.
13109
13110 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
13111
13112         * except.c (check_handlers): New fn.
13113         * cp-tree.h: Declare it.
13114         * semantics.c (finish_handler_sequence): Call it.
13115         (finish_function_handler_sequence): Likewise.
13116         (finish_handler_parms): Set TREE_TYPE on the handler.
13117         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
13118         * search.c (get_base_distance_recursive): If protect>1, ignore
13119         special access.
13120         (get_base_distance): Don't reduce watch_access.
13121
13122 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
13123
13124         * lex.c: #include diagnostic.h.
13125         (lang_init_options): Set default prefixing rules.
13126
13127         * lang-options.h: Add -fdiagnostics-show-location=.
13128
13129         * decl2.c: #include diagnostic.h.
13130         (lang_decode_option): Handle -fdiagnostics-show-location=.
13131
13132 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
13133
13134         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
13135         * vec.cc: Revert my 2000-05-07 change.
13136
13137 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
13138
13139         * class.c (check_field_decls): Complain about non-static data
13140         members with same name as class in class with constructor.
13141
13142 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
13143
13144         * decl.c (grokdeclarator): Allow non-static data members with
13145         same name as class.
13146
13147 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
13148
13149         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
13150         and pending_inline.filename.  Update prototypes.
13151         * decl.c (define_label): Constify filename parameter.
13152         * decl2.c (warn_if_unknown_interface): Constify local char *.
13153         * input.c Constify input_source.filename. Don't declare
13154         input_filename or lineno.  Constify filename parameter to feed_input.
13155         * lex.c (init_parse): Constify parameter and return value.
13156         (cp_pragma_interface, cp_pragma_implementation): Constify
13157         filename argument.
13158         (reinit_parse_for_method, reinit_parse_for_block,
13159         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
13160         Constify local char *.
13161         * pt.c: Don't declare lineno or input_filename.
13162         (print_template_context, tsubst_friend_function, tsubst_decl,
13163         tsubst, instantiate_decl): Constify local char *.
13164         * semantics.c (expand_body): Constify local char *.
13165         * tree.c (build_srcloc): Constify filename parameter.
13166         * typeck.c (c_expand_asm_operands): Constify filename
13167         parameter.
13168
13169 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
13170
13171         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
13172         offsetof expansion.
13173
13174 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
13175
13176         * inc/cxxabi.h:  Fix typos in comment.
13177         (__base_class_info::__offset): Use a static_cast.
13178
13179 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
13180
13181         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
13182         of std::size_t and std::ptrdiff_t respectively.
13183         * tinfo.cc: Likewise.
13184         * vec.cc: Likewise.
13185
13186 2000-05-06  Richard Henderson  <rth@cygnus.com>
13187
13188         * typeck.c (build_c_cast): Don't warn integer->pointer size
13189         mismatch for constants.
13190
13191 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
13192
13193         * rtti.c (ptmd_initializer): Set non-public, if class is
13194         incomplete.
13195
13196         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
13197         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
13198         __cxa_vec_delete): Likewise.
13199         * tinfo.cc (__dynamic_cast): Likewise.
13200         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
13201         __cxa_vec_delete): Likewise.
13202
13203 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
13204
13205         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
13206         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
13207         (lang_decl_flags): Add vcall_offset.
13208         (THUNK_VCALL_OFFSET): Use it.
13209         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
13210         * method.c (make_thunk): Create the lang_decl here, not in
13211         emit_thunk.
13212         (emit_thunk): Make generic thunks into ordinary functions once
13213         they have been fed to expand_body.
13214         * semantics.c (expand_body): Set current_function_is_thunk here.
13215
13216 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13217
13218         * class.c (update_vtable_entry_for_fn): Prototype.
13219
13220         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
13221         and `tmpl'.
13222
13223         * search.c (dfs_build_inheritance_graph_order): Prototype.
13224
13225 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
13226
13227         * cp-tree.h (special_function_kind): Add various kinds of
13228         destructors.
13229         (special_function_p): New function.
13230         * class.c (overrides): Don't let one kind of destructor override
13231         another.
13232         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
13233         whether or not to instantiate a template.
13234         * tree.c (special_function_p): Define.
13235
13236 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
13237
13238         * cp-tree.def (THUNK_DECL): Remove.
13239         * cp-tree.h (DECL_THUNK_P): New macro.
13240         (DECL_NON_THUNK_FUNCTION_P): Likewise.
13241         (DECL_EXTERN_C_FUNCTION_P): Likewise.
13242         (SET_DECL_THUNK_P): Likewise.
13243         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
13244         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
13245         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
13246         * decl.c (decls_match): Use DECL_EXTERN_C_P.
13247         (duplicate_decls): Likewise.
13248         (pushdecl): Likewise.  Adjust thunk handling.
13249         (grokfndecl): Use DECL_EXTERN_C_P.
13250         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
13251         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
13252         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
13253         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
13254         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
13255         DECL_NO_STATIC_CHAIN.
13256         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
13257         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
13258         * search.c (covariant_return_p): Remove THUNK_DECL handling.
13259         * ir.texi: Update.
13260
13261 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
13262
13263         * tree.c (walk_tree): Set lineno.
13264
13265 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
13266
13267         * exception.cc: Update license notice.
13268         * new.cc: Likewise.
13269         * new1.cc: Likewise.
13270         * new2.cc: Likewise.
13271         * tinfo.cc: Likewise.
13272         * tinfo2.cc: Likewise.
13273         * vec.cc: Likewise.
13274         * inc/cxxabi.h: Likewise.
13275         * inc/exception: Likewise.
13276         * inc/new: Likewise.
13277         * inc/new.h: Likewise.
13278         * inc/typeinfo: Likewise.
13279
13280 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
13281
13282         * tree.c (build_target_expr_with_type): If we already have a
13283         TARGET_EXPR, just return it.
13284
13285         * optimize.c (initialize_inlined_parameters): Don't generate an
13286         EXPR_STMT if we can just use DECL_INITIAL.
13287         * decl.c (emit_local_var): Only make the initialization a
13288         full-expression if stmts_are_full_exprs_p.
13289
13290 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
13291
13292         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
13293         macro.
13294         * call.c (standard_conversion): Use it.
13295         (direct_reference_binding): Likewise.
13296         (build_over_call): Likewise.
13297         (is_properly_derived_from): Likewise.
13298         (compare_ics): Likewise.
13299         * class.c (resolves_to_fixed_type_p): Likewise.
13300         * optimize.c (declare_return_variable): Likewise.
13301         * pt.c (is_specialization_of): Likewise.
13302         (unify): Likewise.
13303         * typeck.c (comp_target_parms): Likeiwse.
13304         (build_static_cast): Likewise.
13305         (build_reinterpret_cast): Likewise.
13306         (build_const_cast): Likewise.
13307         (comp_ptr_ttypes_real): Likewise.
13308         (comp_ptr_ttypes_const): Likewise.
13309         * typeck2.c (process_init_constructor): Likewise.
13310
13311 2000-04-30  Scott Snyder <snyder@fnal.gov>
13312
13313         * decl.c (finish_destructor_body): Use the base destructor when
13314         destroying virtual bases.
13315
13316 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
13317
13318         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
13319         STMT_EXPRs.
13320         * optimize.c (struct inline_data): Add target_exprs field.
13321         (declare_return_variable): When a function returns an aggregate,
13322         use the variable declared in the TARGET_EXPR as the remapped
13323         DECL_RESULT.
13324         (expand_call_inline): Update the pending target_exprs stack.
13325         (optimize_function): Initialize the stack.
13326
13327         * decl2.c (finish_file): Fix typo in comment.
13328
13329         * method.c (emit_thunk): Don't try to return a `void' value.
13330
13331         * optimize.c (initialize_inlined_parameters): If the parameter is
13332         addressable, we need to make a new VAR_DECL, even if the
13333         initializer is constant.
13334
13335 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
13336
13337         * decl.c (grok_op_properties): Add an extra check of argtypes.
13338
13339 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
13340
13341         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
13342         variables.
13343         (initialize_inlined_parameters): Try to avoid creating new
13344         VAR_DECLs.
13345
13346 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
13347
13348         * lex.c (my_get_run_time): Remove.
13349         (init_filename_times): Use get_run_time instead of my_get_run_time.
13350         (check_newline): Likewise.
13351         (dump_time_statistics): Likewise.
13352         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
13353         of computing elapsed time explicitly.
13354
13355 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
13356
13357         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
13358         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
13359         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
13360         before calling decl_constant_value.
13361         * class.c (check_bitfield_decl): Likewise.
13362         * cvt.c (ocp_convert): Likewise.
13363         (convert): Likewise.
13364         * decl.c (compute_array_index_type): Likewise.
13365         (build_enumerator): Likewise.
13366         * decl2.c (check_cp_case_value): Likewise.
13367         * pt.c (convert_nontype_argument): Likewise.
13368         (tsubst): Likewise.
13369         * typeck.c (decay_conversion): Likewise.
13370         (build_compound_expr): Likewise.
13371         (build_reinterpret_cast): Likewise.
13372         (build_c_cast): Likewise.
13373         (convert_for_assignment): Likewise.
13374
13375 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
13376
13377         * decl.c (finish_function): Don't play games with DECL_INLINE.
13378
13379 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
13380
13381         * ir.texi: Correct typo.
13382
13383 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13384
13385         * decl.c (grokdeclarator): Reject VLAs as members.
13386
13387 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
13388
13389         * call.c (standard_conversion): Accept conversion between
13390         COMPLEX_TYPEs.
13391
13392         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
13393
13394 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
13395
13396         * decl2.c (finish_file): Remove double setup for accounting
13397         compile time.
13398
13399 2000-04-24  Robert Lipe <robertlipe@usa.net>
13400
13401         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
13402
13403 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
13404
13405         * new.cc (set_new_handler): Needs to be in std::.
13406
13407 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
13408
13409         * cp-tree.h (lang_decl): Remove pretty_function_p.
13410         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
13411         language-specific node.
13412         * decl.c (cp_make_fname_decl): Use build_decl, not
13413         build_lang_decl, to build the variables.
13414         (grokvardecl): Don't call build_lang_decl for local variables in
13415         templates.
13416         (grokdeclarator): Don't call build_lang_decl for local type
13417         declarations in templates.
13418         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
13419         zero'd memory, rather than calling memset.
13420         * pt.c: Include hashtab.h.
13421         (local_specializations): New variable.
13422         (retrieve_local_specialization): Use it.
13423         (register_local_specialization): Likewise.
13424         (tsubst_decl): Don't assume local variables have
13425         DECL_LANG_SPECIFIC.
13426         (instantiate_decl): Set up local_specializations.
13427         * Makefile.in (HTAB_H): New variable.
13428
13429 2000-04-23  Richard Henderson  <rth@cygnus.com>
13430
13431         * typeck.c (c_expand_asm_operands): Restore the original
13432         contents of the output list.
13433
13434 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
13435
13436         * ir.texi:  Document complex number representation.
13437
13438 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
13439
13440         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
13441         (target_incomplete_p): New function.
13442         (tinfo_base_init): Create comdat NTBS name variable.
13443         (ptr_initializer): Add non_public parameter. Calculate it.
13444         (ptmd_initializer): Likewise.
13445         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
13446         (create_real_tinfo_var): Add non_public parameter. Use it.
13447         Push proxy into global namespace.
13448         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
13449         New enumeration.
13450         * inc/typeinfo (type_info::before, type_info::operator==):
13451         Compare __name addresses.
13452
13453         * tinfo2.cc: Remove new-abi builtins comment.
13454
13455 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
13456
13457         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
13458
13459         * call.c (joust): Exit early if we get the same function, too.
13460
13461         * decl2.c (key_method): Return NULL_TREE for template classes.
13462         (import_export_class): Don't need to check for template classes.
13463
13464 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
13465
13466         * lex.c: Remove references to cccp.c.
13467
13468 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
13469
13470         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
13471         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
13472         (DECL_DESTRUCTOR_P): Use destructor_attr.
13473         (DECL_CONST_MEMFUNC_P): Reimplement.
13474         (DECL_VOLATILE_MEMFUNC_P): Remove.
13475         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
13476         (overrides): Use DECL_DESTRUCTOR_P.
13477         (check_for_override): Likewise.
13478         * decl.c (start_function): Likewise.
13479         * decl2.c (grokfclassfn): Likewise.
13480         (check_classfn): Likewise.
13481         (grok_function_init): Likewise.
13482
13483 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
13484
13485         * decl2.c (grokfield): Issue error on illegal data member
13486         declaration.
13487
13488 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
13489
13490         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
13491
13492 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
13493
13494         * class.c (build_vtable_entry): Don't build thunks for type-info
13495         functions.
13496
13497 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
13498
13499         * decl.c (decls_match): Allow a redeclaration of a builtin to
13500         specify args while the builtin did not.
13501
13502 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
13503
13504         * cp-tree.def (THUNK_DECL): Add to documentation.
13505         * cp-tree.h (flag_huge_objects): Declare.
13506         * class.c (modify_vtable_entry): Tidy.
13507         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
13508         Calculate delta appropriately for the new ABI.
13509         (dfs_modify_vtables): Use it.
13510         (modify_all_vtables): Fix thinko in code to add overriding copies
13511         of functions to primary vtables.
13512         (build_clone): Fix typo in comment.
13513         (clone_function_decl): Correct order of destructors in vtable.
13514         (build_vbase_offset_vtbl_entries): Adjust comment.
13515         (dfs_vcall_offset_queue_p): Remove.
13516         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
13517         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
13518         (build_vtable_entry): Correct check for pure virtual functions.
13519         Don't declare flag_huge_objects.
13520         * decl.c (flag_huge_objects): Remove declaration.
13521         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
13522         Use int_size_in_bytes.
13523         (emit_thunk): Handle vcall offset thunks.
13524
13525 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13526
13527         * decl2.c (parse_time, varconst_time): Delete declarations.
13528         (finish_file): Delete LINENO declaration.
13529         START_TIME and THIS_TIME now long.
13530
13531 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
13532
13533         * class.c (build_base_field): Reformat comment.
13534
13535         * inc/cxxabi.h (stddef.h): Comment inclusion.
13536         (__base_class_info::__offset): Comment shift.
13537
13538 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
13539
13540         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
13541         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
13542         (cp_push_exception_identifier): New macro.
13543         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
13544         (DECL_BASE_DESTRUCTOR_P): Likewise.
13545         (DECL_DELETING_DESTRUCTOR_P): Likewise.
13546         (get_vtbl_decl_for_binfo): Fix formatting.
13547         (in_charge_arg_for_name): New macro.
13548         (maybe_build_cleanup_and_delete): Remove declaration.
13549         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
13550         (in_charge_arg_for_name): New function.
13551         (build_new_method_call): Use it.  Handle cloned destructors.
13552         (build_clone): Don't make the base constructor virtual.
13553         Automatically defer generated functions.
13554         (clone_function_decl): Handle destructors, too.
13555         (clone_constructors_and_destructors): Likewise.
13556         (create_vtable_ptr): Don't create a vtable entry for a cloned
13557         function.
13558         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
13559         (initialize_predefined_identifiers): Update appropriately.
13560         (finish_destructor_body): Simplify.
13561         (maybe_build_cleanup_and_delete): Remove.
13562         * except.c (expand_throw): Handle new-ABI destructors.
13563         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
13564         (build_dtor_call): New function.
13565         (build_delete): Use it.  Simplify.
13566         * optimize.c (maybe_clone_body): Handle destructors.
13567         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
13568
13569         * exception.cc (cleanup_fn): New typedef.
13570         (CALL_CLEANUP): New macro.
13571         (cp_eh_info): Use them.
13572         (__cp_push_exception): Likewise.
13573         (__cp_pop_exception): Likewise.
13574
13575 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
13576
13577         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
13578         (complete_dtor_identifier): New macro.
13579         (CLASSTYPE_FIRST_CONVERSION): Remove.
13580         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
13581         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
13582         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
13583         (CLASSTYPE_CONSTRUCTORS): Likewise.
13584         (CLASSTYPE_DESTRUCTORS): Likewise.
13585         (lang_decl): Add cloned_function.
13586         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
13587         (DECL_BASE_CONSTRUCTOR_P): Likewise.
13588         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
13589         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
13590         (DECL_CLONED_FUNCTION_P): Likewise.
13591         (DECL_CLONED_FUNCTION): Likewise.
13592         (clone_function_decl): Declare.
13593         (maybe_clone_body): Likewise.
13594         * call.c (build_user_type_conversion_1): Call complete object
13595         constructors in the new ABI.
13596         (build_new_method_call): Don't add in-charge parameters under the
13597         new ABI.
13598         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
13599         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
13600         CLASSTYPE_DESTRUCTOR_SLOT.
13601         (build_clone): New function.
13602         (clone_function_decl): Likewise.
13603         (clone_constructors_and_destructors): Likewise.
13604         (check_bases_and_members): Use it.
13605         * decl.c (iniitialize_predefined_identifiers): Initialize
13606         complete_dtor_identifier.
13607         (finish_function): Don't add extra code to a clone.
13608         (lang_mark_tree): Mark cloned_function.
13609         * decl2.c (mark_used): Don't bother trying to instantiate things
13610         we synthesized.
13611         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
13612         * method.c (set_mangled_name_for_decl): Don't treat clones as
13613         constructors.
13614         (synthesize_method): Sythesize cloned functions, not the clones.
13615         * optimize.c (inline_data): Update comment on ret_label.
13616         (remap_block): Don't assume DECL_INITIAL exists.
13617         (copy_body_r): Allow ret_label to be NULL.
13618         (maybe_clone_body): Define.
13619         * pt.c (tsubst_decl): Handle clones.
13620         (instantiate_clone): New function.
13621         (instantiate_template): Use it.
13622         (set_mangled_name_for_template_decl): Don't treat clones as
13623         constructors.
13624         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
13625         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
13626         * semantics.c (expand_body): Clone function bodies as necessary.
13627
13628         * optimize.c (remap_decl): Avoid sharing structure for arrays
13629         whose size is only known at run-time.
13630         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
13631
13632         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
13633         to has_in_charge_parm_p.
13634         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
13635         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
13636         (DECL_COPY_CONSTRUCTOR_P): New macro.
13637         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
13638         (build_user_type_conversion_1): Likewise.
13639         (convert_like_real): Likewise.
13640         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
13641         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
13642         (copy_args_p): Likewise.
13643         (grok_ctor_properties): Likewise.
13644         (start_function): Likewise.
13645         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
13646         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
13647         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
13648         * method.c (do_build_copy_constructor): Use
13649         DECL_HAS_IN_CHARGE_PARM_P.
13650         (synthesize_method): Likewise.
13651         * pt.c (instantiate_template): Remove goto.
13652         * tree.c (build_cplus_method_type): Remove mention of obstacks in
13653         comment.
13654
13655         * cp-tre.h (finish_function): Change prototype.
13656         * decl.c (end_cleanup_fn): Adjust caller.
13657         (finish_function): Take only one parameter.
13658         * decl2.c (finish_objects): Adjust caller.
13659         (finish_static_storage_duration_function): Likewise.
13660         * method.c (emit_thunk): Likewise.
13661         * parse.y: Likewise.
13662         * parse.c: Regenerated.
13663         * pt.c (instantiate_decl): Likewise.
13664         * rtti.c (synthesize_tinfo_fn): Likewise.
13665         * semantics.c (expand_body): Likewise.
13666
13667         * cp-tree.h (copy_decl): New function.
13668         * class.c (finish_struct_1): Use it.
13669         * lex.c (copy_decl): Define it.
13670         * pt.c (tsubst_decl): Likewise.
13671         * tree.c (copy_template_template_parm): Likewise.
13672
13673         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
13674         has_nonpublic_assign_ref.
13675         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
13676         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
13677         * class.c (finish_struct_methods): Don't set
13678         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
13679         (interface_only): Don't declare.
13680         (interface_unknown): Likewise.
13681
13682 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13683
13684         * tree.h (HAVE_TEMPLATES): Remove definition.
13685         * lang-options.h (-fthis-is-variable): Remove documentation.
13686
13687 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
13688
13689         * class.c (instantiate_type): Handle object-relative template-id.
13690
13691         * semantics.c (finish_expr_stmt): Call convert_to_void here.
13692         * decl.c (cplus_expand_expr_stmt): Not here.
13693
13694         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
13695         Initialize exprtype earlier.
13696
13697         * parse.y (fn.def1): Check for defining types in return types.
13698
13699         * decl.c (check_tag_decl): Notice extra fundamental types.
13700         Diagnose empty decls in classes, too.
13701
13702         * decl.c (grokdeclarator): Don't override an anonymous name if no
13703         declarator was given.
13704
13705         * cvt.c (convert_to_void): Call resolve_offset_ref.
13706
13707         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
13708
13709         * decl2.c (decl_namespace): Handle getting a type.
13710
13711         * typeck.c (build_c_cast): Re-enable warning for cast between
13712         pointer and integer of different size.
13713
13714 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
13715
13716         * inc/cxxabi.h (__pointer_type_info): Add restrict and
13717         incomplete flags.
13718         (__pointer_type_info::__pointer_catch): New virtual function.
13719         (__pointer_to_member_type_info): Derive from
13720         __pointer_type_info. Adjust.
13721         (__pointer_to_member_type_info::__do_catch): Remove.
13722         (__pointer_to_member_type_info::__is_pointer_p): Declare.
13723         (__pointer_to_member_type_info::__pointer_catch): Declare.
13724         * rtti.c (qualifier_flags): Add restrict flag.
13725         (ptmd_initializer): Reorder members.
13726         (create_tinfo_types): Expand comments. Reorder
13727         ptmd_desc_type_node members.
13728         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
13729         Implement.
13730         (__pointer_type_info::__do_catch): Move specific code into
13731         __pointer_catch. Call it.
13732         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
13733         specific catch checking. Fix void conversion check.
13734         (__pointer_to_member_type_info::__do_catch): Remove.
13735         (__pointer_to_member_type_info::__pointer_catch): Implement.
13736
13737 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13738
13739         * lex.c (init_parse): Remove traces of classof and headof.
13740         * decl2.c (flag_operator_names): Default to 1.
13741         (lang_decode_option): Do not set it for -ansi.
13742
13743 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
13744
13745         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
13746         (DECL_MAIN_VARIANT): Remove.
13747         * decl.c (duplicate_decls): Don't set it.
13748         (start_function): Likewise.
13749         (lang_mark_tree): Don't mark it.
13750         * decl2.c (defer_fn): Don't use it.
13751         * lex.c (retrofit_lang_decl): Don't set it.
13752         * pt.c (tsubst_decl): Likewise.
13753         * ptree.c (print_lang_decl): Don't print it.
13754         * typeck.c (mark_addressable): Don't use it.
13755
13756 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
13757
13758         * vec.cc: Include <new> and <exception>.
13759         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
13760         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
13761         terminate.
13762         (__cxa_vec_delete): Catch dtor exceptions.
13763
13764 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
13765
13766         Prepend __ to implementation defined names.
13767         * inc/typeinfo (type_info): Rename _name to __name.
13768         (type_info::type_info): Rename parameter.
13769         (type_info::operator==, type_info::operator!=,
13770         type_info::before): Likewise.
13771         (type_info::is_pointer_p, type_info::is_function_p,
13772         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
13773         parameters.
13774         * inc/cxxabi.h
13775         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
13776         (__pointer_type_info::__pointer_type_info): Likewise.
13777         (__pointer_type_info::is_pointer_p,
13778         __pointer_type_info::do_catch): Prepend __. Rename parameters.
13779         (__array_type_info::__array_type_info): Rename parameters.
13780         (__function_type_info::__function_type_info): Likewise.
13781         (__function_type_info::is_function_p): Prepend __.
13782         (__enum_type_info::__enum_type_info): Rename parameters.
13783         (__pointer_to_member_type_info::__pointer_to_member_type_info):
13784         Likewise.
13785         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
13786         parameters.
13787         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
13788         (__class_type_info::__class_type_info): Rename parameters.
13789         (__class_type_info::sub_kind): Prepend __. Adjust member names.
13790         (__class_type_info::upcast_result,
13791         __class_type_info::dyncast_result): Prepend __. Move definition
13792         into tinfo.cc.
13793         (__class_type_info::do_upcast, __class_type_info::do_catch,
13794         __class_type_info::find_public_src,
13795         __class_type_info::do_dyncast,
13796         __class_type_info::do_find_public_src): Prepend __. Rename
13797         parameters.
13798         (__si_class_type_info::__si_class_type_info): Rename parameters.
13799         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
13800         __si_class_type_info::do_find_public_src): Prepent __. Rename
13801         parameters.
13802         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
13803         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
13804         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
13805         parameters.
13806         (__dynamic_cast): Rename parameters.
13807         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
13808         type_info::do_catch, type_info::do_upcast): Prepend __.
13809         (contained_p, public_p, virtual_p, contained_public_p,
13810         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
13811         (__class_type_info::do_catch,
13812         __class_type_info::do_upcast): Prepend __. Adjust.
13813         (__class_type_info::__upcast_result,
13814         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
13815         Adjust.
13816         (__class_type_info::find_public_src): Prepend __. Adjust.
13817         (__class_type_info::do_find_public_src,
13818         __si_class_type_info::do_find_public_src,
13819         __vmi_class_type_info::do_find_public_src): Likewise.
13820         (__class_type_info::do_dyncast,
13821         __si_class_type_info::do_dyncast,
13822         __vmi_class_type_info::do_dyncast): Likewise.
13823         (__class_type_info::do_upcast,
13824         __si_class_type_info::do_upcast,
13825         __vmi_class_type_info::do_upcast): Likewise.
13826         (__dynamic_cast): Adjust.
13827         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
13828         (__function_type_info::is_function_p): Likewise.
13829         (__pointer_type_info::do_catch): Likewise. Adjust.
13830         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
13831         (__throw_type_match_rtti_2): Adjust.
13832         (__is_pointer): Adjust.
13833
13834 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
13835
13836         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
13837         (complete_ctor_identifier): New macro.
13838         (special_function_kind): Add sfk_copy_constructor and
13839         sfk_assignment_operator.
13840         (LOOKUP_HAS_IN_CHARGE): Remove.
13841         (cons_up_default_function): Rename to ...
13842         (implicitly_declare_fn): ... this.
13843         * call.c (build_new_method_call): Add in-charge parameters for
13844         constructors here.
13845         * class.c (add_implicitly_declared_members): Change parameter name
13846         from cant_have_assignment to cant_have_const_assignment.
13847         Replace calls to cons_up_default_function to implicitly_declare_fn.
13848         * cvt.c (ocp_convert): Use complete_ctor_identifier.
13849         * decl.c (initialize_predefined_identifiers): Initialize it.
13850         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
13851         complex expression.
13852         * init.c (expand_default_init): Don't calculate the in-charge
13853         parameter here.
13854         (build_new_1): Likewise.
13855         * lex.c (cons_up_default_function): Move to method.c.
13856         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
13857         (implicitly_declare_fn): New function.
13858         * typeck.c (build_static_cast): Use complete_ctor_identifier.
13859         (build_modify_expr): Likewise.
13860         * typeck2.c (build_functional_cast): Likewise.
13861
13862         Under the new ABI, constructors don't return `this'.
13863         * cp-tree.h (warn_reorder): Declare.
13864         (special_function_kind): New enum.
13865         (global_base_init_list): Remove declaration.
13866         (emit_base_init): Don't return a value.
13867         (check_base_init): Don't declare.
13868         (is_aggr_typedef): Likewise.
13869         * decl.c (check_special_function_return_type): New function.
13870         (return_types): Remove.
13871         (grokdeclarator): Use check_special_function_return_type.
13872         (start_function): Don't initialize ctor_label under the new ABI.
13873         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
13874         * init.c (begin_init_stmts): Move to top of file.
13875         (finish_init_stmts): Likewise.
13876         (warn_reorder): Don't declare.
13877         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
13878         value.
13879         (check_base_init): Remove.
13880         (is_aggr_typedef): Likewise.
13881         (build_new_1): Don't use the return value of a constructor.
13882         * semantics.c (setup_vtbl_ptr): Don't use the return value
13883         of emit_base_init.
13884         * typeck.c (check_return_expr): Don't magically convert return
13885         statements into `return this' in constructors under the new ABI.
13886
13887         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
13888         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
13889         (base_ctor_identifier): New macro.
13890         (base_dtor_identifier): Likewise.
13891         (deleting_dtor_identifier): Likewise.
13892         * decl.c: Don't include obstack.h.
13893         (obstack_chunk_alloc): Don't define.
13894         (obstack_chunk_free): Likewise.
13895         (struct predefined_identifier): New type.
13896         (initialize_predefined_identifiers): New function.
13897         (init_decl_processing): Use it.
13898         (debug_temp_inits): Remove.
13899         (start_method): Don't call preserve_data.
13900         (hack_incomplete_structures): Update comment.
13901         * init.c (init_init_processing): Don't initialize
13902         nelts_identifier.
13903         (build_offset_rf): Remove dead code.
13904         (build_delete): Use CLASSTYPE_N_BASECLASSES.
13905         * search.c (init_search_processing): Don't initialize
13906         vptr_identifier.
13907
13908 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13909
13910         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
13911         some sign_compare warnings.
13912
13913 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
13914
13915         Rename abi::__vmi_class_type_info members.
13916         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
13917         base_list, detail_masks members to vmi_flags, vmi_base_count,
13918         vmi_bases and vmi_flags_masks respectively.
13919         (__vmi_class_type_info::vmi_flags_masks): Rename
13920         details_unknown_mask to flags_unknown_mask.
13921         * tinfo.cc (__class_type_info::do_upcast): Adjust.
13922         (__vmi_class_type_info::do_find_public_src): Adjust.
13923         (__vmi_class_type_info::do_dyncast): Adjust.
13924         (__vmi_class_type_info::do_upcast): Adjust.
13925
13926 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
13927
13928         * tinfo.cc (convert_to_base): New function.
13929         (get_vbase_offset): Remove. Move into convert_to_base.
13930         (__vmi_class_type_info::do_find_public_src): Adjust.
13931         (__vmi_class_type_info::do_dyncast): Adjust.
13932         (__vmi_class_type_info::do_upcast): Adjust.
13933
13934 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
13935
13936         * tinfo.cc (operator=): Use __builtin_strcmp.
13937         * tinfo2.cc (before): Likewise.
13938
13939 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
13940
13941         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
13942         (DECL_SAVED_INLINE): Rename to ...
13943         (DECL_DEFERRED_FN): ... this.
13944         (in_function_p): Remove declaration.
13945         (mark_inline_for_output): Rename to ...
13946         (defer_fn): ... this.
13947         * decl.c (finish_function): Adjust call to mark_inline_for_output.
13948         (in_function_p): Remove definition.
13949         * decl2.c (saved_inlines): Rename to ...
13950         (deferred_fns): ... this.
13951         (saved_inlines_used): Rename to ...
13952         (deferred_fns_used): ... this.
13953         (mark_inline_for_output): Rename to ...
13954         (defer_fn): ... this.
13955         (finish_file): Adjust accordingly.
13956         (init_decl2): Likewise.
13957         * lex.c (cons_up_default_function): Likewise.
13958         * pt.c (mark_decl_instantiated): Likewise.
13959         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
13960         circumstances.
13961         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
13962         * semantics.c (expand_body): Defer more functions.
13963
13964 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
13965
13966         * vec.cc: New file.
13967         * Make-lang.in (CXX_LIB2FUNCS): Add it.
13968         (vec.o): Build it.
13969         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
13970         __cxa_vec_delete): Declare.
13971
13972 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
13973
13974         * rtti.c (dfs_class_hint_mark): New static function.
13975         (dfs_class_hint_unmark): New static function.
13976         (class_hint_flags): Use them.
13977
13978 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
13979
13980         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
13981
13982 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
13983
13984         * cp-tree.h (instantiate_decl): Change prototype.
13985         * decl2.c (mark_used): Adjust call.
13986         * optimize.c (inlinable_function_p): Adjust handling of templates.
13987         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
13988         (do_type_instantiation): Likewise.
13989         (instantiate_decl): Defer more templates.
13990         (instantiate_pending_templates): Adjust logic to handle inline
13991         friend functions.
13992
13993         * Makefile.in (GGC_H): New variable.  Use it throughout in place
13994         of ggc.h.
13995
13996         * call.c: Don't include obstack.h.  Include ggc.h.
13997         (obstack_chunk_alloc): Don't define.
13998         (obstack_chunk_free): Likewise.
13999         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
14000         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
14001         (pop_switch): Free it.
14002
14003         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
14004
14005         * dump.c (dequeue_and_dump): Don't try to print the bit_position
14006         if we don't have a DECL_FIELD_OFFSET.
14007
14008 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
14009
14010         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
14011         special_function_p.
14012
14013 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14014
14015         * cfns.gperf (hash, libc_name_p): Prototype.
14016
14017         * rtti.c (build_dynamic_cast_1): Constification.
14018
14019         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
14020
14021         * semantics.c (deferred_type_access_control): Prototype.
14022
14023 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
14024
14025         Correct many new ABI issues regarding vbase and vcall offset
14026         layout.
14027         * cp-tree.h (BINFO_VTABLE): Document.
14028         (struct lang_type): Tweak formatting.
14029         (BINFO_PRIMARY_BINFO): Add to documentation.
14030         (CLASSTYPE_VSIZE): Fix typo in comment.
14031         (CLASSTYPE_VBASECLASSES): Update documentation.
14032         (BINFO_VBASE_MARKED): Remove.
14033         (SET_BINFO_VBASE_MARKED): Likewise.
14034         (CLEAR_BINFO_VBASE_MARKED): Likewise.
14035         (BINFO_FIELDS_MARKED): Remove.
14036         (SET_BINFO_FIELDS_MARKED): Likewise.
14037         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
14038         (enum access_kind): New enumeration.
14039         (num_extra_vtbl_entries): Remove declaration.
14040         (size_extra_vtbl_entries): Likewise.
14041         (get_vtbl_decl_for_binfo): New function.
14042         (dfs_vbase_unmark): Remove declaration.
14043         (mark_primary_bases): Likewise.
14044         * class.c (SAME_FN): Remove.
14045         (struct vcall_offset_data_s): Move definition.
14046         (build_vbase_pointer): Use `build', not `build_binary_op', to
14047         access the vbase pointer under the new ABI.
14048         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
14049         (build_primary_vtable): Likewise.
14050         (dfs_mark_primary_bases): Move here from search.c.
14051         (mark_primary_bases): Likewise.
14052         (determine_primary_bases): Under the new ABI, don't make a base
14053         class a primary base just because we don't yet have any virtual
14054         functions.
14055         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
14056         (num_vfun_entries): Remove.
14057         (dfs_count_virtuals): Likewise.
14058         (num_extra_vtbl_entries): Likewise.
14059         (size_extra_vtbl_entries): Likewise.
14060         (layout_virtual_bases): Iterate in inheritance graph order under
14061         the new ABI.
14062         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
14063         indicate that a vfield is present.
14064         (init_class_processing): Initialize access_public_node, etc., from
14065         ak_public, etc.
14066         (get_vtbl_decl_for_binfo): New function.
14067         (dump_class_hierarchy_r): Likewise.
14068         (dump_class_hierarchy): Use it.
14069         (finish_vtbls): Build the vtbls in inheritance graph order.
14070         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
14071         (initialize_vtable): Use get_vtbl_decl_for_binfo.
14072         (accumulate_vtbl_inits): Add comments explaining why a pre-order
14073         walk is required.
14074         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
14075         where the vptr points, even for primary vtables.
14076         (build_vtbl_initializer): Adjust handling of vbase and vcall
14077         offsets.
14078         (build_vcall_and_vbase_vtable_entries): New function.
14079         (dfs_build_vbase_offset_vtbl_entries): Remove.
14080         (build_vbase_offset_vtbl_entries): Reimplement.
14081         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
14082         were already handled in a primary base class vtable.
14083         (build_vcall_offset_vtbl_entries): Adjust.
14084         (build_rtti_vtbl_entries): Adjust.
14085         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
14086         * init.c (expand_virtual_init): Simplify.
14087         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
14088         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
14089         * search.c (BINFO_ACCESS): New macro.
14090         (SET_BINFO_ACCESS): Likewise.
14091         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
14092         (access_in_type): Likewise.
14093         (dfs_accessible_p): Likewise.
14094         (protected_accessible_p): Likewise.
14095         (lookup_fnfields_1): Adjust documentation.
14096         (dfs_mark_primary_bases): Move to class.c
14097         (mark_primary_bases): Likewise.
14098         (dfs_vbase_unmark): Remove.
14099         (virtual_context): Use BINFO_FOR_VBASE.
14100         (dfs_get_vbase_types): Simplify.
14101         (dfs_build_inheritance_graph_order): New function.
14102         (get_vbase_types): Use it.
14103         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
14104
14105         * tinfo.cc (get_vbase_offset): New function.
14106         (__vmi_class_type_info::do_find_public_src): Use it.
14107         (__vmi_class_type_info::do_dyncast): Likewise.
14108         (__vmi_class_type_info::do_upcast): Likewise.
14109
14110 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
14111
14112         * lang-specs.h: Pass -fno-show-column to the preprocessor.
14113
14114 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
14115
14116         * rtti.c (class_hint_flags): Rename flags.
14117         (class_initializer): Remove flags.
14118         (synthesize_tinfo_var): Combine offset and flags. Add flags
14119         for __vmi_class_type_info.
14120         (create_tinfo_types): Remove flags from __class_type_info and
14121         __si_class_type_info. Merge flags and offset from
14122         base_class_type_info.
14123         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
14124         (__base_class_info::is_virtual_p): Adjust.
14125         (__base_class_info::is_public_p): Adjust.
14126         (__base_class_info::offset): New accessor.
14127         (__class_type_info::details): Remove member.
14128         (__class_type_info::__class_type_info): Lose details.
14129         (__class_type_info::detail_masks): Remove.
14130         (__si_class_type_info::__si_class_type_info): Lose details.
14131         (__vmi_class_type_info::details): New member.
14132         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
14133         (__vmi_class_type_info::detail_masks): New member.
14134         * tinfo.cc (__class_type_info::do_upcast): Initialize result
14135         with unknown_details_mask.
14136         (__vmi_class_type_info::do_find_public_src): Adjust
14137         (__vmi_class_type_info::do_dyncast): Adjust.
14138         (__vmi_class_type_info::do_upcast): Set result details, if
14139         needed. Adjust.
14140         (__dynamic_cast): Temporarily #if out optimization.
14141
14142 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
14143
14144         * rtti.c (get_tinfo_decl): Mark used.
14145         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
14146         mark as dealt with, if we output it.
14147
14148 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
14149
14150         * class.c: Reorganize to put virtual function table initialization
14151         machinery at the end of the file.
14152
14153 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
14154
14155         * class.c (finish_struct): Use bitsize_zero_node.
14156         * pt.c (instantiate_class_template): Likewise.
14157
14158 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
14159
14160         Put RTTI entries at negative offsets in new ABI.
14161         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
14162         vbase offset at index -3, not -1.
14163         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
14164         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
14165         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
14166         (build_rtti_vtbl_entries): New function.
14167         (set_rtti_entry): Remove.
14168         (build_primary_vtable): Don't use it.
14169         (build_secondary_vtable): Likewise.
14170         (start_vtable): Remove.
14171         (first_vfun_index): New function.
14172         (set_vindex): Likewise.
14173         (add_virtual_function): Don't call start_vtable.  Do call
14174         set_vindex.
14175         (set_primary_base): Rename parameter.
14176         (determine_primary_base): Likewise.
14177         (num_vfun_entries): Don't use skip_rtti_stuff.
14178         (num_extra_vtbl_entries): Include RTTI information.
14179         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
14180         (skip_rtti_stuff): Remove.
14181         (dfs_modify_vtables): Don't use it.
14182         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
14183         (layout_nonempty_base_or_field): Update size handling.
14184         (create_vtable_ptr): Tweak.
14185         (layout_class_type): Adjust parameter names.
14186         (finish_struct_1): Simplify.
14187         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
14188         (skip_rtti_stuff): Remove.
14189         (first_vfun_index): New function.
14190         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
14191         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
14192         (marked_vtable_pathp): Declare.
14193         (unmarked_vtable_pathp): Likewise.
14194         * error.c (dump_expr): Use first_vfun_index to calculate vtable
14195         offsets.
14196         * rtti.c (build_headof): Look for RTTI at negative offsets.
14197         (get_tinfo_decl_dynamic): Likewise.
14198         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
14199         here.
14200         (create_pseudo_type_info): Do it here instead.  Adjust so that
14201         vptr points at first virtual function.
14202         * search.c (marked_vtable_pathp): Make it global.
14203         (unmarked_vtable_pathp): Likewise.
14204         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
14205         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
14206         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
14207         (get_pure_virtuals): Likewise.
14208         (expand_upcast_fixups): Likewise.
14209         * tree.c (debug_binfo): Likewise.
14210         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
14211         negative offset.
14212
14213 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14214
14215         * class.c (check_field_decl): Fix typo.
14216         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
14217         (check_methods): Likewise.
14218         (check_field_decls): Likewise.
14219         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
14220         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
14221         Use DECL_RESULT_FLD, not DECL_RESULT.
14222         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
14223         * lex.c (identifier_type): Likewise.
14224         * pt.c (determine_specialization, lookup_template_class): Likewise.
14225         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
14226         (resolve_overloaded_unification, more_specialized): Likewise.
14227         * semantics.c (finish_member_declaration): Likewise.
14228         * typeck.c (build_x_function_call): Likewise.
14229
14230 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
14231
14232         * class.c (layout_empty_base): Handle empty bases with non-byte
14233         alignment.
14234         (build_base_field): Likewise.
14235         (layout_virtual_bases): Likewise.
14236
14237         * class.c (finish_struct_1): Fix typo in this change:
14238
14239         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14240
14241 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
14242
14243         * decl.c (grokdeclarator): Count partial specializations when
14244         keeping track of how many template classes have been seen.
14245
14246         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
14247
14248 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14249
14250         * class.c (build_vbase_pointer_fields): layout_field now place_field.
14251         (get_vfield_offset): Use byte_position.
14252         (set_rtti_entry): Set OFFSET to ssizetype zero.
14253         (get_binfo_offset_as_int): Deleted.
14254         (dfs_record_base_offsets): Use tree_low_cst.
14255         (dfs_search_base_offsets): Likewise.
14256         (layout_nonempty_base_or_field): Reflect changes in RLI format
14257         and call byte_position.
14258         (layout_empty_base): Convert offset to ssizetype.
14259         (build_base_field): use rli_size_unit_so_far.
14260         (dfs_propagate_binfo_offsets): Do computation in proper type.
14261         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
14262         (layout_class_type): Reflect changes in RLI names and fields.
14263         (finish_struct_1): Set DECL_FIELD_OFFSET.
14264         * dump.c (dequeue_and_dump): Call bit_position.
14265         * expr.c (cplus_expand_constant): Use byte_position.
14266         * rtti.c (expand_class_desc): Use bitsize_one_node.
14267         * typeck.c (build_component_addr): Use byte_position and don't
14268         special case for zero offset.
14269
14270 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
14271
14272         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
14273
14274         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
14275         tinfo object.
14276         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
14277         vtable.
14278
14279 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14280
14281         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
14282         DECL_P macros.
14283         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
14284         make_typename_type, check_initializer, cp_finish_decl,
14285         xref_tag): Likewise.
14286         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
14287         decl_namespace, arg_assoc_template_arg, arg_assoc,
14288         validate_nonmember_using_decl, do_class_using_decl): Likewise.
14289         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
14290         args_to_string): Likewise.
14291         * friend.c (is_friend): Likewise.
14292         * lex.c (note_got_semicolon, note_list_got_semicolon,
14293         is_global): Likewise.
14294         * method.c (build_overload_nested_name, build_overload_value,
14295         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
14296         * parse.y (typename_sub, typename_sub1): Likewise.
14297         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
14298         process_partial_specialization, convert_template_argument,
14299         template_args_equal, add_pending_template, lookup_template_class,
14300         for_each_template_parm_r, maybe_fold_nontype_arg,
14301         tsubst, instantiate_template, type_unification_real, unify,
14302         instantiate_pending_templates, set_mangled_name_for_template_decl):
14303         Likewise.
14304         * repo.c (repo_get_id, repo_template_used): Likewise.
14305         * search.c (lookup_field_1): Likewise.
14306         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
14307         * xref.c (classname): Likewise.
14308
14309 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
14310
14311         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
14312         (CANONICAL_BINFO): New macro.
14313         (BINFO_NEW_VTABLE_MARKED): Use it.
14314         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
14315         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
14316         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
14317         not TREE_TYPE.
14318         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
14319         (build_secondary_vtable): Likewise.
14320         (dfs_finish_vtbls): Likewise.
14321         (dfs_accumulate_vtbl_inits): Likewise.
14322         (accumulate_vtbl_inits): New function.
14323         (finish_vtbls): Make sure that virtual bases come after
14324         non-virtual bases in the vtable group.
14325         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
14326         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
14327         * search.c (struct vbase_info): Move definition.
14328         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
14329         (unmarked_new_vtable_p): Likewise.
14330         (dfs_mark_vtable_path): Remove.
14331         (dfs_mark_new_vtable): Remove.
14332         (dfs_unmark_new_vtable): Likewise.
14333         (dfs_clear_search_slot): Likewise.
14334         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
14335         (dfs_clear_vbase_slots): Likewise.
14336         (init_vbase_pointers): LIkewise.
14337
14338 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
14339
14340         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
14341         SIZETYPE to a non-SIZETYPE.
14342
14343 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
14344
14345         * class.c (layout_virtual_bases): Adjust names in conditionally
14346         compiled code.
14347
14348         * class.c (record_base_offsets): New function.
14349         (layout_conflict_p): Likewise.
14350         (layout_nonempty_base_or_field): Use it.
14351         (layout_empty_base): New function.
14352         (build_base_field): Use it.
14353         (build_base_fields): Update comment.
14354         (layout_virtual_bases): Fold in a little code form
14355         layout_basetypes.  Use layout_empty_base.
14356         (layout_basetypes): Remove.
14357         (end_of_class): New function.
14358         (layout_class_type): Use it.  Adjust.
14359
14360         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
14361         (fntype_p): Remove.
14362         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
14363         comment.
14364         (dfs_skip_nonprimary_vbases_markedp): Likewise.
14365         * typeck.c (fntype_p): Remove.
14366
14367         * cp-tree.h (TI_SPEC_INFO): Remove.
14368         (CLASSTYPE_TI_SPEC_INFO): Likewise.
14369         * pt.c (process_partial_specialization): Likewise.
14370
14371         * class.c (build_base_field): Fix thinko in computation of binfo
14372         offsets.
14373
14374         * tree.c (mark_local_for_remap_p): Mark variables declared in
14375         TARGET_EXPRs as well.
14376
14377 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
14378
14379         * typeck.c (require_complete_type, complete_type,
14380         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
14381         build_array_ref, convert_arguments, pointer_diff,
14382         build_x_unary_op, build_unary_op, build_c_cast,
14383         build_modify_expr): Use COMPLETE_TYPE_P etc.
14384         * call.c (is_complete, convert_like_real,
14385         build_new_method_call): Likewise.
14386         * class.c (build_vbase_pointer_fields, check_bases,
14387         build_base_field, finish_struct_1, pushclass): Likewise.
14388         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
14389         * decl.c (maybe_process_template_type_declaration, pushtag,
14390         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
14391         layout_var_decl, check_initializer, cp_finish_decl,
14392         grokdeclarator, require_complete_types_for_parms,
14393         grok_op_properties, xref_tag, xref_basetypes,
14394         check_function_type): Likewise.
14395         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
14396         * friend.c (do_friend): Likewise.
14397         * init.c (build_offset_ref): Likewise.
14398         * parse.y (structsp): Likewise.
14399         * pt.c (maybe_process_partial_specialization,
14400         tsubst_friend_function, instantiate_class_template, tsubst,
14401         do_type_instantiation, instantiate_pending_templates): Likewise.
14402         * repo.c (repo_get_id): Likewise.
14403         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
14404         synthesize_tinfo_var, emit_support_tinfos): Likewise.
14405         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
14406         * semantics.c (begin_class_definition): Likewise.
14407         * tree.c (build_cplus_method_type): Likewise.
14408         * typeck2.c (digest_init, build_functional_cast,
14409         add_exception_specifier): Likewise.
14410         * parse.h, parse.c: Regenerated.
14411
14412 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
14413
14414         * inc/cxxabi.h: New header file. Define new-abi entry points.
14415         (__pointer_type_info::target): Rename member to ...
14416         (__pointer_type_info::type): ... here.
14417         (__base_class_info::type): Rename member to ...
14418         (__base_class_info::base): ... here.
14419         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
14420         * cp-tree.h (CPTI_ABI): New global tree enumeration.
14421         (abi_node): New global tree node.
14422         * decl.c (abi_node): Document.
14423         (init_decl_processing): Initialize abi_node.
14424         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
14425         (get_vmi_pseudo_type_info): Likewise.
14426         (create_tinfo_types): Likewise.
14427         (emit_support_tinfos): Likewise.
14428         * tinfo.h (cxxabi.h): Include for new-abi.
14429         Move rtti class definitions to new header file.
14430         * tinfo.cc (abi): Use the namespace.
14431         (std): Move new abi rtti classes from here ...
14432         (__cxxabiv1): ... to here.
14433         * tinfo2.cc (cxxabi.h): Include for new-abi.
14434         Move rtti class definitions to new header file.
14435         (std): Move new abi rtti classes from here ...
14436         (__cxxabiv1): ... to here.
14437         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
14438         namespace.
14439
14440 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
14441             Jason Merrill  <jason@casey.cygnus.com>
14442
14443         * method.c (build_overload_int): Use host_integerp.
14444
14445 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14446
14447         * init.c (build_offset_ref): Handle the case of a templated member
14448         function.
14449
14450 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14451
14452         * except.c (expand_exception_blocks): Clear catch_clauses_last.
14453
14454 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
14455
14456         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
14457         * class.c (check_bitfield_decl): Turn illegal bitfields into
14458         non-bitfields.
14459         (dfs_propagate_binfo_offsets): Adjust for new size_binop
14460         semantics.
14461         (dfs_offset_for_unshared_vbases): Likewise.
14462         * cvt.c (cp_convert_to_pointer): Convert NULL to a
14463         pointer-to-member correctly under the new ABI.
14464         * expr.c (cplus_expand_constant): Don't use cp_convert when
14465         turning an offset into a pointer-to-member.
14466         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
14467         when dereferencing them under the new ABI.
14468         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
14469         of pointers-to-members under the new ABI.
14470
14471         * class.c (check_bitfield_decl): Remove restriction on really long
14472         bitfields.
14473         (layout_class_type): Implement new ABI handling of bitfields
14474         longer than their types.
14475
14476 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14477
14478         * parse.y (extdefs): Call ggc_collect.
14479         * parse.c: Regenerated.
14480
14481 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
14482
14483         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
14484         (note_name_declared_in_class): Use OVL_CURRENT to get at a
14485         potential overload.
14486
14487 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14488
14489         * class.c (build_vbase_path): Use integer_zerop.
14490         (build_vtable_entry): Use tree_low_cst.
14491         (get_vfield_offset): Use bit_position.
14492         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
14493         Use tree_low_cst.
14494         (check_bitfield_decl): Set DECL_SIZE using convert.
14495         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
14496         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
14497         Use tree_low_cst.
14498         (finish_struct_1): Use bit_position.
14499         (dump_class_hierarchy): Use tree_low_cst.
14500         * cp-tree.h (min_precision): Add declaration.
14501         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
14502         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
14503         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
14504         * expr.c (cplus_expand_constant): Use bit_position.
14505         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
14506         * rtti.c (get_base_offset): Use bit_position.
14507         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
14508         host_integerp, and tree_low_cst.
14509         (pointer_int_sum): Use integer_zerop.
14510         (build_component_addr): Use bit_position.
14511
14512 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
14513
14514         * typeck.c (require_complete_type): Don't assume size_zero_node.
14515         (complete_type_or_else): Likewise.
14516
14517 2000-03-16  Steven Grady <grady@digitaldeck.com>
14518             Jason Merrill  <jason@casey.cygnus.com>
14519
14520         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
14521
14522 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
14523
14524         * decl2.c (grokfield): Bail out if type is error_mark_node.
14525
14526 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
14527
14528         * tinfo2.cc (__ptr_to_member_data): Rename to ...
14529         (__pointer_to_member_data): ... here. Adjust.
14530         * rtti.c (create_tinfo_types): Adjust.
14531
14532 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
14533
14534         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
14535         * decl.c (ref_desc_type_node): Undocument.
14536         * rtti.c (ptr_ref_initializer): Rename to ...
14537         (ptr_initializer): ... here. Adjust comments.
14538         (ptmd_initializer): Fix comment thinko.
14539         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
14540         (create_tinfo_types): Remove ref_desc_type_node init.
14541         * tinfo2.cc (__reference_type_info): Remove.
14542
14543 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
14544
14545         * decl.c (cp_finish_decl): Remove obsolete comment.
14546
14547         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
14548
14549 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
14550
14551         * cp-tree.h: Tweak documentation.
14552         * class.c (build_vbase_pointer_fields): Layout the fields, too.
14553         (avoid_overlap): Remove.
14554         (get_binfo_offset_as_int): New function.
14555         (dfs_serach_base_offsets): Likewise.
14556         (layout_nonempty_base_or_field): Likewise.
14557         (build_base_field): Layout fields here.  Avoid placing two objects
14558         of the same type at the same address, under the new ABI.
14559         (build_base_fields): Adjust accordingly.
14560         (create_vtable_ptr): Return the new field, but don't attach it to
14561         TYPE_FIELDS.
14562         (remove_base_field): Remove.
14563         (remove_base_fields): Remove.
14564         (layout_basetypes): Adjust accordingly.
14565         (layout_class_type): Call layout_field for each field, rather than
14566         just making a wholesale call to layout_type.
14567
14568 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
14569
14570         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
14571
14572 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
14573
14574         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
14575
14576         * except.c (dtor_nothrow): New fn.
14577         (do_pop_exception): Use it.  Take type parm.
14578         (push_eh_cleanup): Take type parm.
14579         (expand_start_catch_block): Pass it.
14580         (build_eh_type_type_ref): Accept null type.
14581
14582 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
14583
14584         * cp-tree.h (revert_static_member_fn): Change prototype.
14585         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
14586         (grok_op_properties): Likewise.
14587         (start_function): Likewise.
14588         (revert_static_member_fn): Simplify.
14589         * pt.c (check_explicit_specialization): Adjust call to
14590         revert_static_member_fn.
14591
14592 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
14593
14594         * cp-tree.h (scope_kind): New type.
14595         (tmpl_spec_kind): Likewise.
14596         (declare_pseudo_global_level): Remove.
14597         (pseudo_global_level_p): Rename to template_parm_scope_p.
14598         (pushlevel): Remove declaration.
14599         (begin_scope): New function.
14600         (finish_scope): Likewise.
14601         (current_tmpl_spec_kind): Likewise.
14602         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
14603         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
14604         Add template_spec_p.
14605         (toplevel_bindings_p): Adjust.
14606         (declare_pseudo_global_level): Remove.
14607         (pseudo_global_level_p): Rename to template_parm_scope_p.
14608         (current_tmpl_spec_kind): New function.
14609         (begin_scope): Likewise.
14610         (finish_scope): Likewise.
14611         (maybe_push_to_top_level): Adjust.
14612         (maybe_process_template_type_declaration): Likewise.
14613         (pushtag): Likewise.
14614         (pushdecl_nonclass_level): Likewise.
14615         (lookup_tag): Likewise.
14616         (grokfndecl): Handle member template specializations.  Share
14617         constructor and non-constructor code.
14618         * decl2.c (check_classfn): Handle member template specializations.
14619         * pt.c (begin_template_parm_list): Use begin_scope.
14620         (begin_specialization): Likewise.
14621         (end_specialization): Likewise.
14622         (check_explicit_specialization): Use current_tmpl_spec_kind.
14623         Handle member template specializations.
14624         (end_template_decl): Use finish_scope.  Remove call to
14625         get_pending_sizes.
14626         (push_template_decl_real): Remove bogus error message.
14627         (tsubst_decl): Fix typo in code contained in comment.
14628         (instantiate_template): Handle member template specializations.
14629         (most_general_template): Likewise.
14630
14631 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
14632
14633         * lex.c (whitespace_cr): Compress consecutive calls to warning().
14634         (do_identifier): Ditto for error().
14635
14636         * pt.c (convert_nontype_argument): Ditto for cp_error().
14637         (convert_template_argument): Ditto for cp_pedwarn().
14638
14639 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
14640
14641         * exception.cc (__check_null_eh_spec): New fn.
14642         * except.c (expand_end_eh_spec): Call it if the spec is throw().
14643
14644 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
14645
14646         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
14647         * except.c (expand_end_eh_spec): Add the return type.
14648         * rtti.c (throw_bad_cast): Add the parmtypes.
14649         (throw_bad_typeid): Likewise.
14650
14651         * semantics.c (expand_stmt): Only leave out rtl for unused
14652         artificials, and set DECL_IGNORED_P on them as well.
14653         * decl.c (wrapup_globals_for_namespace): Likewise.
14654
14655 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
14656
14657         * decl.c (maybe_commonize_var): Skip all artificial decls.
14658         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
14659
14660 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
14661
14662         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
14663         * cp-tree.h: Declare flag_enforce_eh_specs.
14664         * decl.c (store_parm_decls, finish_function): Check it.
14665
14666         C library functions don't throw.
14667         * Makefile.in (cfns.h): New target.
14668         (except.o): Depend on it.
14669         * Make-lang.in (cc1plus): Depend on cfns.gperf.
14670         * cfns.gperf: New file.
14671         * cfns.h: Generated.
14672         * except.c: Include it.
14673         (nothrow_libfn_p): New fn.
14674         * decl.c (grokfndecl): Use it.
14675         * cp-tree.h: Declare it.
14676
14677         * decl.c (push_overloaded_decl_1, auto_function,
14678         define_function): Lose.
14679         (build_library_fn_1): New static fn.
14680         (builtin_function): Use it.
14681         (get_atexit_node): Use build_library_fn_ptr.
14682         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
14683         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
14684         push_void_library_fn, push_throw_library_fn): New fns.
14685         * cp-tree.h: Declare them.
14686         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
14687         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
14688         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
14689         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
14690         * rtti.c (build_runtime_decl): Lose.
14691         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
14692         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
14693         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
14694
14695         * call.c (build_call): Remove result_type parm.
14696         Call mark_used on unused artificial fns.
14697         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
14698
14699 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
14700
14701         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
14702         appropriate.
14703         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
14704         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
14705         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
14706         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
14707         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
14708         expand_generic_desc): Likewise.
14709
14710 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14711
14712         * exception.cc (__cp_pop_exception): Cleanup the original object.
14713
14714 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14715
14716         * decl.c (grok_op_properties): Merge conversion to void warning
14717         with other silly op warnings.
14718
14719 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
14720
14721         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
14722         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
14723
14724 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14725
14726         * decl.c (cp_make_fname_decl): New function.
14727         (wrapup_globals_for_namespace): Don't emit unused static vars.
14728         (init_decl_processing): Remove comment about use of
14729         array_domain_type. Set make_fname_decl.
14730         (cp_finish_decl): Remove __FUNCTION__ nadgering.
14731         * semantics.c (begin_compound_stmt): Remove
14732         current_function_name_declared flagging.
14733         (expand_stmt): Don't emit unused local statics.
14734         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
14735         specially.
14736
14737 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14738
14739         * typeck.c (convert_for_assignment): Don't look at array
14740         initializer.
14741         * call.c (convert_like_real): Likewise.
14742
14743 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
14744
14745         Add initial support for '\uNNNN' specifier.
14746         * lex.c (read_ucs): New fn.
14747         (readescape, skip_white_space): Call it.
14748         (is_extended_char, is_extended_char_1): New fns.
14749         (utf8_extend_token): New fn, #if 0'd out.
14750         (real_yylex): Treat extended chars like letters.
14751
14752         * search.c (note_debug_info_needed): Walk the bases even if we
14753         weren't deferring the type itself.
14754
14755 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14756
14757         * decl2.c (finish_objects): Constify a char*.
14758
14759         * method.c (emit_thunk): Likewise.
14760
14761 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
14762
14763         * typeck.c (dubious_conversion_warnings): Look through
14764         REFERENCE_TYPE.
14765
14766 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14767
14768         * class.c (dfs_modify_vtables): I is now unsigned.
14769         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
14770         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
14771         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
14772         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
14773         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
14774         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
14775         Call integer_all_onesp.
14776         * typeck2.c (process_init_constructor): Use compare_tree_int.
14777
14778         * lang-specs.h (as): Don't call if -syntax-only.
14779
14780 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
14781
14782         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
14783         RTL_EXPR_HAS_NO_SCOPE after all.
14784
14785 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
14786
14787         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
14788         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
14789         RTL_EXPR_HAS_NO_SCOPE.
14790
14791         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
14792         later.
14793
14794         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
14795
14796 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
14797
14798         * call.c (convert_like): Macrofy.
14799         (convert_like_with_context): New macro.
14800         (convert_like_real): Renamed from convert_like.  Add calling
14801         context parameters, for diagnostics. Add recursive flag.  Call
14802         dubious_conversion_warnings for outer conversion.
14803         (build_user_type_conversion): Use convert_like_with_context.
14804         (build_over_call): Likewise. Don't warn about dubious
14805         conversions here. Adjust convert_default_arg calls.
14806         (convert_default_arg): Add context parameters for diagnostics.
14807         Pass through to convert_like_with_context.
14808         * cp-tree.h (convert_default_arg): Add context parameters.
14809         (dubious_conversion_warnings): Prototype new function.
14810         * typeck.c (convert_arguments): Adjust convert_default_arg call.
14811         (dubious_conversion_warnings): New function, broken
14812         out of convert_for_assignment.
14813         (convert_for_assignment): Adjust.
14814
14815 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
14816
14817         * decl2.c (key_method): Break out from...
14818         (import_export_vtable, import_export_class): ...here.
14819
14820         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
14821         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
14822
14823         * search.c (note_debug_info_needed, dfs_debug_mark,
14824         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
14825         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
14826
14827 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
14828
14829         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
14830         typos.
14831
14832 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
14833
14834         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
14835         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
14836         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
14837         (lang_type): Split gets_new into has_new and has_array_new.
14838         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14839         (TYPE_GETS_NEW): Split into ...
14840         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
14841         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
14842         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
14843         (build_op_new_call): Don't declare.
14844         (build_new_1): Likewise.
14845         * call.c (build_op_new_call): Remove.
14846         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
14847         instead of TYPE_NEEDS_DESTRUCTOR.
14848         (finish_struct_bits): Likewise.
14849         (add_implicitly_declared_members): Likewise.
14850         (check_field_decl): Likewise.
14851         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
14852         correctly under the new ABI.
14853         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
14854         instead of TYPE_NEEDS_DESTRUCTOR.
14855         (initialize_local_var): Likewise.
14856         (destroy_local_var): Likewise.
14857         (cp_finish_decl): Likewise.
14858         (register_dtor_fn): Likewise.
14859         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
14860         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
14861         TYPE_VEC_DELETE_TAKES_SIZE here.
14862         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
14863         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
14864         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14865         (finish_destructor_body): Likewise.
14866         (maybe_build_cleanup_1): Likewise.
14867         * decl2.c (do_static_destruction): Likewise.
14868         * init.c (build_new_1): Make it static.
14869         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14870         (expand_cleanup_for_base): Likewise.
14871         (get_cookie_size): New function.
14872         (build_new_1): Handle array-new cookies correctly under the new
14873         ABI.
14874         (build_vec_delete_1): Likewise.
14875         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14876         (build_delete): Likewise.
14877         (build_vec_delete): Handle array-new cookies correctly under the new
14878         ABI.
14879         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14880         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
14881         TYPE_HAS_ARRAY_NEW_OPERATOR.
14882         * ptree.c (print_lang_type): Check them.
14883         * search.c (context_for_name_lookup): Fix typo in comment.
14884         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14885         * tree.c (break_out_cleanups): Likewise.
14886         (build_cplus_array_test_1): Likewise.
14887         (cp_build_qualified_type_real): Likewise.
14888         * typeck.c (complete_type): Likewise.
14889
14890         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
14891         the command-line, not the end.
14892
14893 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
14894
14895         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
14896
14897 2000-03-02  Tom Tromey  <tromey@cygnus.com>
14898
14899         * cp-tree.h (build_java_class_ref): Declare.
14900         * init.c (build_java_class_ref): No longer static.
14901         * except.c (expand_throw): Generate a Java-style `throw' if the
14902         thrown object is a "Java" object.
14903         (initialize_handler_parm): Generate a Java-style lookup of
14904         exception info if the caught object is a "Java" object.
14905         (catch_language, catch_language_init): New globals.
14906         (decl_is_java_type): New function.
14907         (expand_start_catch_block): Don't call push_eh_info() or
14908         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
14909         class reference to build_catch_block.
14910
14911 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14912
14913         * typeck.c (comptypes): Treat sizetype like its language equivalent.
14914
14915 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
14916
14917         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
14918         to merge reference/pointer code and fix incorrect warnings.
14919
14920 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
14921
14922         * search.c (protected_accessible_p): Use context_for_name_lookup.
14923
14924         * init.c (construct_virtual_bases): Fix thinko.
14925         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
14926
14927 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
14928
14929         * decl.c (current_function_decl): Move to toplev.c.
14930
14931 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
14932
14933         * pt.c (fn_type_unification): Unify return type, whenever
14934         provided.
14935         (get_bindings_real): Only pass return type when necessary.
14936         Remove explicit return type check.
14937         * class.c (resolve_address_of_overloaded_function): Pass desired
14938         return type to fn_type_unification.
14939
14940 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14941
14942         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
14943         DECL_FIELD_SIZE.
14944         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
14945         DECL_FIELD_SIZE.
14946         * rtti.c (expand_class_desc): Likewise.
14947         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
14948         (THUNK_VCALL_OFFSET): Likewise.
14949         (THUNK_DELTA): Reflect changes in ../tree.h.
14950
14951 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
14952
14953         * search.c (protected_accessible_p): Also allow the access if
14954         the member is public in DERIVED.  Lose TYPE parm.
14955         (friend_accessible_p): Lose TYPE parm.
14956         (accessible_p): Adjust.
14957
14958 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14959
14960         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
14961         on things that are not sizes; ssize_binop deleted.
14962         Call size_diffop when appropriate.
14963         (dfs_build_vcall_offset_vtbl_entries): Likewise.
14964         (build_primary_vtable, build_secondary_vtable): Likewise.
14965         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
14966         Variable I is HOST_WIDE_INT.
14967         (get_vfield_offset): Pass proper types to size_binop.
14968         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
14969         (finish_struct_1): Likewise.
14970         (skip_rtti_stuff): Arg N is now pointer to signed.
14971         (layout_class_type): Use size_zero_node.
14972         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
14973         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
14974         * decl.c (complete_arry_type): Pass proper types to size_binop.
14975         (xref_basetypes): BINFO_OFFSET is sizetype.
14976         * error.c (dump_expr): Don't use size_binop non-sizes.
14977         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
14978         * init.c (construct_virtual_bases): Fix type error.
14979         (build_vec_delete_1): Pass proper type to size_binop and don't
14980         fold result.
14981         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
14982         * rtti.c (get_base_offset): Pass proper type to size_binop.
14983         * search.c (dfs_find_vbases): Fix type error.
14984         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
14985         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
14986         * tree.c (debug_binfo): Variable N is signed.
14987         Use HOST_WIDE_INT_PRINT_DEC.
14988         * typeck.c (comptypes): sizetype is same as equivalent integer type.
14989         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
14990         size_one_node and size_zero_node.
14991         (c_alignof): Use size_one_node.
14992         (build_component_addr): Pass proper types to size_binop.
14993         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
14994
14995 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
14996
14997         Implement class scope using-declarations for functions.
14998         * class.c (handle_using_decl): Call add_method for used functions.
14999         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
15000         (add_method): Used functions are hidden by local functions.
15001         (check_bases_and_members): Handle using-decls before finalizing
15002         CLASSTYPE_METHOD_VEC.
15003         * call.c (add_function_candidate): Add ctype parm; if nonzero,
15004         override the type of 'this' accordingly.
15005         (add_template_candidate, add_template_candidate_real): Add ctype parm.
15006         (convert_class_to_reference, build_user_type_conversion_1,
15007         build_new_function_call, build_object_call, build_new_op,
15008         build_new_method_call): Pass ctype parm.
15009
15010         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
15011         the baselink.
15012         * call.c (convert_class_to_reference, build_user_type_conversion_1,
15013         build_new_function_call, build_object_call, build_new_op,
15014         build_new_method_call, build_op_delete_call): Don't get basetype_path
15015         from a baselink.
15016         * typeck.c (build_component_ref): Likewise.
15017         * init.c (build_offset_ref): Likewise.
15018         (resolve_offset_ref): Don't call enforce_access.
15019         Call build_scoped_ref.
15020         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
15021         would cause an error or if -pedantic.
15022         * class.c (alter_access): Lose binfo parm.
15023
15024 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
15025
15026         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
15027         types.
15028
15029 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
15030
15031         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
15032         pseudo_type_info creation into the std namespace
15033
15034 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
15035
15036         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
15037         (import_export_class): Remove declaration.
15038         * decl2.c (import_export_class): Make it static.
15039         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
15040         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
15041         EXPR_WITH_FILE_LOCATION.
15042         * lex.c (check_newline): Tweak filename/lineno setting.
15043         * semantics.c (begin_while_stmt): Fix typo in comment.
15044
15045 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15046
15047         * lang-options.h (-fmessage-length=): Add missing option.
15048
15049         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
15050
15051 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
15052
15053         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
15054
15055 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
15056
15057         * optimize.c (expand_call_inline): Emit the return label before
15058         evaluating the return value.
15059
15060 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
15061
15062         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
15063         than duplicating functionality here.
15064         * optimize.c: Include input.h.
15065         (expand_call_inline): Use push_srcloc and pop_srcloc.
15066         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
15067         * parse.c: Regenerated.
15068         * Makefile.in (lex.o): Depend on input.h.
15069         (optimize.o): Likewise.
15070
15071 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
15072
15073         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
15074         function type, rather than ICE.
15075
15076 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
15077
15078         * decl.c (grokdeclarator): Call decl_type_access_control.
15079         * parse.y (parse_end_decl): Don't call decl_type_access_control if
15080         decl is null.
15081
15082 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
15083
15084         * decl.c (decls_match): Remove obsolete static member nadgering.
15085
15086 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15087
15088         * decl.c (grokdeclarator): Change ANSI to ISO.
15089         * lex.c (consume_string, readescape, do_identifier): Likewise.
15090         (parse_float, real_yylex): Likewise.
15091         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
15092         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
15093         new_type_id, maybe_label_decls, simple_stmt,
15094         for.init.statement): Likewise.
15095         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
15096         * semantics.c (finish_named_return_value): Likewise.
15097         * parse.c: Regenerate.
15098
15099 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
15100
15101         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
15102         (CPTI_CLASS_STAR_TYPE): Remove.
15103         (vtable_index_type): Likewise.
15104         (class_star_type_node): Remove.
15105         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
15106         (build_binary_op_nodefault): Remove.
15107         * call.c (build_new_op): Use build_binary_op instead of
15108         build_binary_op_nodefault.
15109         * decl.c (init_decl_processing): Remove class_star_type_node
15110         initialization.  Make delta_type_node ptrdiff_type_node under the
15111         new ABI.  Initialize vtable_index_type.
15112         (build_ptrmemfunc_type): Build different structures for the new
15113         ABI.
15114         (build_enumerator): Use build_binary_op instead of
15115         build_binary_op_nodefault.
15116         * method.c (build_overload_value): Mangle pointers-to-members
15117         appropriately under the new ABI.
15118         * typeck.c (build_array_ref): Use build_binary_op instead of
15119         build_binary_op_nodefault.
15120         (get_member_function_from_ptrfunc): Adjust for the new ABI.
15121         (build_binary_op_nodefault): Rename to ...
15122         (build_binary_op): ... this.  Remove old version.  Adjust for
15123         pointer-to-member comparisons under the new ABI.
15124         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
15125         (build_ptrmemfunc): Adjust for the new ABI.
15126         (expand_ptrmemfunc_cst): Likewise.
15127         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
15128         (pfn_from_ptrmemfunc): Adjust for the new ABI.
15129
15130 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
15131
15132         * call.c (build_object_call): Compress consecutive calls to
15133         cp_error.
15134         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
15135         (build_op_delete_call): Adjust message formatting.
15136
15137         * class.c (check_bases): Compress consecutive calls to
15138         cp_pedwarn.
15139         (finish_struct_anon): Say 'ISO C++'.
15140
15141         * decl.c (start_decl): Same here.
15142         (grok_reference_init): Likewise.
15143         (grokfndecl): Correct message formatting.
15144         (grokfndecl): Improve diagnostic.
15145         (check_static_variable_definition): Likewise. Say 'ISO C++'
15146         (compute_array_index_type): Say 'ISO C++'
15147         (create_array_type_for_decl): Compress consecutive calls to
15148         cp_error.
15149         (grokdeclarator): Say 'ISO C++'
15150         (grok_op_properties): Likewise.
15151
15152         * decl2.c (delete_sanity): Clairify diagnostic.
15153         (check_member_template): Same here.
15154         (grok_function_init): Use consistent terminology.
15155
15156         * expr.c (do_case): Say 'ISO C++'
15157
15158         * friend.c (do_friend): Compress consecutive calls to warning.
15159
15160 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
15161
15162         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
15163         * class.c (build_secondary_vtable): Reorganize.  Don't create a
15164         new vtable under the new ABI.
15165         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
15166         computing the size.
15167         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
15168         the initializing elements.
15169         (initialize_vtable): New function.
15170         (dfs_finish_vtbls): Use it.
15171         (dfs_accumulate_vtbl_inits): New function.
15172         (finish_vtbls): Merge primary and secondary vtables under the new
15173         ABI.
15174         (finish_struct_1): Remove redundant call to layout_vtable_decl.
15175         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
15176         aren't VAR_DECLs.
15177
15178         * class.c (build_vtable): New function, split out from ...
15179         (get_vtable_decl): ... here, and ...
15180         (build_secondary_vtable): ... here.
15181
15182         * pt.c (tsubst_decl): Fix formatting.
15183
15184 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15185
15186         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
15187         (avoid_overlap, build_base_field): Likewise.
15188         (build_base_field, build_base_fields, is_empty_class):
15189         Test DECL_SIZE with integer_zero.
15190         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
15191         * cp-tree.h (struct lang_type): New field size_unit.
15192         (CLASSTYPE_SIZE_UNIT): New macro.
15193         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
15194         (cp_finish_decl): Delete -Wlarger-than processing.
15195         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
15196         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
15197         * tree.c (make_binfo): binfo vector is one entry longer.
15198         (walk_tree): Walk DECL_SIZE_UNIT.
15199
15200 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
15201
15202         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
15203         comment.
15204         (build_vtable_entry): Don't assume all vtable entries are
15205         functions.
15206         (build_vtbl_initializer): Adjust accordingly.
15207         (get_vtable_decl): Fix formatting.
15208
15209 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
15210
15211         * semantics.c (deferred_type_access_control): Walk the entire
15212         type_lookups list.
15213         (save_type_access_control): Rename from
15214         initial_deferred_type_access_control.  Just remember the value.
15215         (decl_type_access_control): New fn.
15216         (begin_function_definition): Use deferred_type_access_control, after
15217         we've started the function.  Set type_lookups to error_mark_node.
15218         * parse.y (frob_specs, fn.def1): Adjust.
15219         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
15220         (parse_end_decl, parse_bitfield0, parse_method): New fns.
15221         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
15222         (after_type_component_declarator0): Likewise.
15223         (after_type_component_declarator): Likewise.
15224         (notype_component_declarator): Likewise.
15225         * cp-tree.h: Adjust.
15226
15227         * decl.c (redeclaration_error_message): Allow redeclaration of
15228         namespace-scope decls.
15229
15230 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
15231
15232         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
15233
15234 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
15235
15236         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
15237         * decl2.c (grokclassfn): Likewise.
15238
15239         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
15240
15241         * decl2.c (lang_decode_option): Don't set default message length
15242         here.
15243         * lex.c (lang_init_options): Set it here.
15244
15245 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
15246
15247         Make DECL_CONTEXT mean the class in which a member function was
15248         declared, even for a virtual function.
15249         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
15250         (DECL_FRIEND_CONTEXT): New macro.
15251         (DECL_REAL_CONTEXT): Remove.
15252         (SET_DECL_FRIEND_CONTEXT): Likewise.
15253         (DECL_VIRTUAL_CONTEXT): Adjust.
15254         (DECL_CLASS_SCOPE_P): Use TYPE_P.
15255         (add_friends): Remove.
15256         (hack_decl_function_context): Likewise.
15257         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
15258         CP_DECL_CONTEXT.
15259         (build_over_call): Fix indentation.  Use DECL_CONTEXT
15260         instead of DECL_CLASS_CONTEXT.
15261         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
15262         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
15263         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15264         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
15265         (build_base_field): Likewise.
15266         (finish_struct_1): Likewise.
15267         (build_self_reference): Likewise.
15268         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
15269         DECL_REAL_CONTEXT.
15270         (pushtag): Use decl_function_context, not
15271         hack_decl_function_context.
15272         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
15273         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
15274         (pushdecl): Remove bogus code.
15275         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
15276         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
15277         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15278         Use decl_function_context, nothack_decl_function_context.
15279         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
15280         (grokdeclarator): Likewise.  Use decl_function_context, not
15281         hack_decl_function_context.
15282         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
15283         (start_function): Use DECL_FRIEND_CONTEXT, not
15284         DECL_CLASS_CONTEXT.  Use decl_function_context, not
15285         hack_decl_function_context.
15286         (finish_function): Use decl_function_context, not
15287         hack_decl_function_context.
15288         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
15289         DECL_CLASS_CONTEXT.
15290         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
15291         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
15292         (grokfield): Likewise.
15293         (finish_builtin_type): Likewise.
15294         (finish_vtable_vardec): Use decl_function_context, not
15295         hack_decl_function_context.
15296         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15297         (start_static_initialization_or_destruction): Likewise.
15298         (finish_static_initialization_or_destruction): Likewise.
15299         (mark_used): Adjust logic for deciding when to synthesize methods.
15300         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
15301         DECL_REAL_CONTEXT.
15302         * error.c (dump_function_decl): Use DECL_CONTEXT, not
15303         DECL_CLASS_CONTEXT.
15304         * friend.c (is_friend): Likewise.
15305         (add_friends): Remove.
15306         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
15307         * lex.c (begin_definition_of_inclass_inline): Use
15308         decl_function_context, not hack_decl_function_context.
15309         (process_next_inline): Likewise.
15310         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
15311         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
15312         DECL_CLASSS_CONTEXT.
15313         (hack_identifier): Likewise.
15314         (synthesize_method):  Use decl_function_context, not
15315         hack_decl_function_context.
15316         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
15317         DECL_REAL_CONTEXT.
15318         (is_member_template): Use decl_function_context, not
15319         hack_decl_function_context.  Use DECL_CONTEXT, not
15320         DECL_CLASS_CONTEXT.
15321         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
15322         DECL_CLASS_CONTEXT.
15323         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
15324         DECL_REAL_CONTEXT.
15325         (push_template_decl_real): Likewise.
15326         (instantiate_class_template): Don't call add_friends.
15327         (tsubst_default_argument): Use DECL_CONTEXT, not
15328         DECL_REAL_CONTEXT.
15329         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
15330         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15331         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
15332         DECL_CLASS_CONTEXT.
15333         * repo.c (repo_inline_used): Likewise.
15334         * search.c (current_scope): Adjust for new _CONTEXT macros.
15335         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
15336         DECL_REAL_CONTEXT.
15337         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15338         (lookup_fnfields_here):Likewise.
15339         (check_final_overrider): Likewise.
15340         (init_vbase_pointers): Likewise.
15341         (virtual_context): Likewise.
15342         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
15343         (expand_body): Use decl_function_context, not
15344         hack_decl_function_context.
15345         * tree.c (hack_decl_function_context): Remove.
15346         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
15347         DECL_CLASS_CONTEXT.
15348         * typeck2.c (error_not_base_type): Likewise.
15349
15350 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
15351
15352         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
15353
15354 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15355
15356         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
15357
15358 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
15359
15360         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
15361
15362 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
15363
15364         * decl2.c (lang_decode_option): Enable automatic line wrapping.
15365
15366 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
15367
15368         * parse.y (frob_specs): Split out...
15369         (parse_decl): From here.
15370         (fn.def2): Call initial_deferred_type_access_control.
15371         (after_type_component_declarator0): Call frob_specs.
15372         (notype_component_declarator0): Likewise.
15373         * search.c (friend_accessible_p): Nested classes are friends of their
15374         enclosing classes.
15375
15376 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
15377
15378         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
15379         used to create an implicit temporary.
15380
15381         * class.c (dfs_modify_vtables): Tweak calculation of functions to
15382         override.
15383
15384 2000-02-08  Nathan Sidwell  <nathan@acm.org>
15385
15386         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
15387         strip array element qualifiers too.
15388
15389 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
15390
15391         * decl.c (store_parm_decls): Don't build cleanups for parameters
15392         while processing_template_decl.
15393
15394 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
15395
15396         * cp-tree.h (struct saved_scope): Add incomplete field.
15397         (namespace_scope_incomplete): New macro.
15398         * decl.c (pushdecl): Use it.
15399         (hack_incomplete_structures): Use it.  See through artificial
15400         binding levels.
15401         (mark_saved_scope): Mark it.
15402
15403         Implement access control for nested types.
15404         * search.c (type_access_control): New fn.
15405         (accessible_p): Now we do perform access control for types.
15406         * semantics.c (deferred_type_access_control): New fn.
15407         (initial_deferred_type_access_control): New fn.
15408         (begin_function_definition): Call it.  Add lookups parm.
15409         * decl.c (struct binding_level): Add this_class field.
15410         (pushlevel_class): Set it.
15411         (mark_binding_level): Mark it.
15412         (lookup_name_real): Use it.  Call type_access_control.
15413         (mark_saved_scope): Mark lookups field.
15414         * cp-tree.h (flagged_type_tree): Add lookups field.
15415         (struct saved_scope): Add lookups field.
15416         (type_lookups): New macro.
15417         * parse.y (declmods): Now <ftype>.
15418         (parse_decl): Add lookups parm.  Call
15419         initial_deferred_type_access_control.
15420         (lang_extdef): Clear type_lookups.
15421         (typed_declspecs, declmods, typespec): Set lookups field.
15422         (initdcl): Call deferred_type_access_control.
15423         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
15424         component_decl_1, named_parm): Adjust.
15425         * friend.c (is_friend): Nested classes are friends of their
15426         enclosing classes.
15427
15428         * class.c (currently_open_derived_class): New fn.
15429         * method.c (hack_identifier): Use it.
15430
15431         * lex.c (do_identifier): Remove obsolete code.
15432
15433         * parse.y (typed_typespecs): Propagate new_type_flag properly.
15434
15435 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
15436
15437         * tinfo.h: Remove apostrophes from C++ comment (xgettext
15438         thinks this file is plain C).
15439
15440 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15441
15442         * Makefile.in (call.o): Depend on $(EXPR_H).
15443
15444         * call.c: Include "expr.h".
15445
15446         * class.c (dump_class_hierarchy): Add prototype.
15447
15448         * search.c (dfs_get_pure_virtuals): Likewise.
15449
15450 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
15451
15452         * parse.y (simple_stmt): Allow :: token in asm parameter list.
15453         * parse.c: Rebuilt.
15454
15455 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
15456
15457         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
15458         Store it in DECL_FCONTEXT.
15459         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
15460
15461 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
15462
15463         * tinfo.h (old abi): #include "tconfig.h".
15464         * tinfo.cc (convert_to_base): Move into old abi section.
15465
15466 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
15467
15468         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
15469         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
15470         (BINFO_PRIMARY_BINFO): New macro.
15471         (BF_DELTA): Rename to ...
15472         (BV_DELTA): ... this.
15473         (BF_VCALL_INDEX): Rename to ...
15474         (BV_VCALL_INDEX): ... this.
15475         (BF_FN): Rename to ...
15476         (BV_FN): ... this.
15477         * class.c (build_vbase_path): Adjust for changes to reverse_path.
15478         (set_rtti_entry): Rename BF_ macros to BV_ variants.
15479         (modify_vtable_entry): Simplify.
15480         (add_virtual_function): Rename BF_ macros to BV_ variants.
15481         (build_vtable_initializer): Likewise.
15482         (get_class_offset_1): Remove.
15483         (dfs_get_class_offset): Likewise.
15484         (get_class_offset): Likewise.
15485         (dfs_find_final_overrider): New function.
15486         (find_final_overrider): Likewise.
15487         (modify_one_vtable): Remove.
15488         (dfs_find_base): New function.
15489         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
15490         find_final_overrider.
15491         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
15492         virtuals.
15493         (dfs_fixup_vtable_deltas): Remove.
15494         (override_one_vtable): Remove.
15495         (merge_overrides): Likewise.
15496         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
15497         unreal chilren of virtual bases.
15498         (finish_struct_1): Don't use merge_overrides.  Don't use
15499         dfs_fixup_vtable_deltas.
15500         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
15501         BINFOs.
15502
15503 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
15504             Jason Merrill  <jason@yorick.cygnus.com>
15505
15506         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
15507
15508 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
15509
15510         * exception.cc (__throw_bad_typeid): Add missing std::.
15511
15512 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15513
15514         * cp-tree.h (make_thunk): PROTO -> PARAMS.
15515
15516 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
15517
15518         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
15519
15520         Runtime support for new-abi rtti.
15521         * inc/typeinfo (type_info::operator!=): Define in class.
15522         (type_info::before, type_info::name, type_info::operator==,
15523         type_info::operator!=): Define new ABI implementations.
15524         (type_info::is_pointer_p, type_info::is_function_p): Declare
15525         new virtual functions.
15526         (type_info::do_catch, type_info::do_upcast): Likewise.
15527
15528         * tinfo.h (__base_class_info): Define new class.
15529         (__class_type_info): Likewise.
15530         (__si_class_type_info): Likewise.
15531         (__vmi_class_type_info): Likewise.
15532         (__dynamic_cast): Prototype.
15533
15534         * tinfo.cc: Conditionalize old and new rtti mechanisms.
15535         (type_info::is_pointer_p): Define new function.
15536         (type_info::is_function_p): Likewise.
15537         (type_info::do_catch): Likewise.
15538         (type_info::do_upcast): Likewise.
15539         (vtable_prefix): New structure for vtable access.
15540         (adjust_pointer): Define new template function.
15541         (contained_p, public_p, virtual_p, contained_public_p,
15542         contained_nonpublic_p, contained_nonvirtual_p): Define new
15543         functions.
15544         (nonvirtual_base_type): New local variable.
15545         (__class_type_info::~__class_type_info): Define.
15546         (__si_class_type_info::~__si_class_type_info): Likewise.
15547         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
15548         (__class_type_info::do_catch): Define new function.
15549         (__class_type_info::do_upcast): Likewise.
15550         (__class_type_info::find_public_src): Likewise.
15551         (__class_type_info::do_find_public_src): Likewise.
15552         (__si_class_type_info::do_find_public_src): Likewise.
15553         (__vmi_class_type_info::do_find_public_src): Likewise.
15554         (__class_type_info::do_dyncast): Likewise.
15555         (__si_class_type_info::do_dyncast): Likewise.
15556         (__vmi_class_type_info::do_dyncast): Likewise.
15557         (__class_type_info::do_upcast): Likewise.
15558         (__si_class_type_info::do_upcast): Likewise.
15559         (__vmi_class_type_info::do_upcast): Likewise.
15560         (__dynamic_cast): Likewise.
15561
15562         * tinfo2.cc (__fundamental_type_info): Define new class.
15563         (__pointer_type_info): Likewise.
15564         (__reference_type_info): Likewise.
15565         (__array_type_info): Likewise.
15566         (__function_type_info): Likewise.
15567         (__enum_type_info): Likewise.
15568         (__ptr_to_member_type_info): Likewise.
15569         (__fundamental_type_info::~__fundamental_type_info): Define.
15570         (__pointer_type_info::~__pointer_type_info): Likewise.
15571         (__reference_type_info::~__reference_type_info): Likewise.
15572         (__array_type_info::~__array_type_info): Likewise.
15573         (__function_type_info::~__function_type_info): Likewise.
15574         (__enum_type_info::~__enum_type_info): Likewise.
15575         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
15576         (__pointer_type_info::do_catch): Define new function.
15577         (__ptr_to_member_type_info::do_catch): Define new function.
15578
15579         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
15580         (__is_pointer): Likewise.
15581
15582         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
15583
15584 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
15585
15586         * cp/class.c (build_vtable): Rename to build_primary_vtable.
15587         (prepare_fresh_vtable): Rename to build_secondary_vtable.
15588         (make_new_vtable): New function.
15589         (modify_vtable_entry): Handle generation of new vtables correctly.
15590         (modify_one_vtable): Remove unused parameter.
15591         (dfs_fixup_vtable_deltas): Likewise.
15592         (override_one_vtable): Use build_secondary_vtable.
15593         (finish_struct_1): Use build_primary_vtable and
15594         build_secondary_vtable.
15595
15596 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
15597
15598         * cp/decl.c: Adjust variable names, comments, help strings.
15599
15600 2000-01-29  Nathan Sidwell  <nathan@acm.org>
15601
15602         * new2.cc (operator delete[]): Use operator delete, don't assume
15603         implementation.
15604
15605 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
15606
15607         * class.c (build_vtbl_initializer): Add argument to
15608         build_vtable_entry call.
15609
15610 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
15611
15612         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
15613         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
15614         (BF_DELTA): New macro.
15615         (BF_VCALL_INDEX): Likewise.
15616         (BF_FN): Likewise.
15617         (THUNK_VCALL_OFFSET): Likewise.
15618         (make_thunk): Change prototype.
15619         * class.c (build_vtable_entry): Integrate
15620         build_vtable_entry_for_fn.  Handle vcall indices.
15621         (build_vtable_entry_for_fn): Remove.
15622         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
15623         BF_VCALL_INDEX, BF_FN.
15624         (modify_vtable_entry): Integrate common code from
15625         modify_one_vtable and dfs_fixup_vtable_deltas.
15626         (add_virtual_function): Set BF_VCALL_INDEX.
15627         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
15628         and BF_FN.
15629         (modify_one_vtable): Simplify.
15630         (dfs_fixup_vtable_deltas): Likewise.
15631         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
15632         * method.c (make_thunk): Handle vcall indices.
15633
15634 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
15635
15636         Compiler side new abi rtti (not enabled).
15637         * cp-tree.h (new_abi_rtti_p): New macro.
15638         (emit_support_tinfos): Prototype new function.
15639         (tinfo_decl_p): Likewise.
15640         (emit_tinfo_decl): Likwise.
15641         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
15642         macros.
15643         (doing_runtime): New local static.
15644         (init_rtti_processing): Add new-abi initializer.
15645         (get_tinfo_decl): Add new-abi logic.
15646         (tinfo_from_decl): Likewise.
15647         (build_dynamic_cast_1): Likewise.
15648         (qualifier_flags): New static function.
15649         (tinfo_base_init): Likewise.
15650         (generic_initializer): Likewise.
15651         (ptr_ref_initializer): Likewise.
15652         (ptmd_initializer): Likewise.
15653         (class_hint_flags): Likewise.
15654         (class_initializer): Likewise.
15655         (synthesize_tinfo_var): Likewise.
15656         (create_real_tinfo_var): Likewise.
15657         (create_pseudo_type_info): Likewise.
15658         (get_vmi_pseudo_type_info): Likewise.
15659         (create_tinfo_types): Likewise.
15660         (emit_support_tinfos): New global function.
15661         (tinfo_decl_p): New global predicate.
15662         (emit_tinfo_decl): New global function.
15663         * class.c (set_rtti_entry): Generalize for old and new rtti.
15664         (build_vtbl_initializer): Likewise.
15665         * decl2.c (finish_file): Likewise.
15666
15667 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
15668
15669         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
15670         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
15671
15672 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
15673
15674         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
15675         for scopes.
15676
15677 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
15678
15679         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
15680
15681 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
15682
15683         * optimize.c (calls_setjmp_r): Supply new argument
15684         to special_function_p.
15685
15686 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15687
15688         * call.c: PROTO -> PARAMS.
15689         * class.c: Likewise.
15690         * cp-tree.h: Likewise.
15691         * cvt.c: Likewise.
15692         * decl.c: Likewise.
15693         * decl.h: Likewise.
15694         * decl2.c: Likewise.
15695         * dump.c: Likewise.
15696         * errfn.c: Likewise.
15697         * error.c: Likewise.
15698         * except.c: Likewise.
15699         * expr.c: Likewise.
15700         * init.c: Likewise.
15701         * input.c: Likewise.
15702         * lex.c: Likewise.
15703         * lex.h: Likewise.
15704         * method.c: Likewise.
15705         * optimize.c: Likewise.
15706         * parse.y: Likewise.
15707         * pt.c: Likewise.
15708         * repo.c: Likewise.
15709         * rtti.c: Likewise.
15710         * search.c: Likewise.
15711         * semantics.c: Likewise.
15712         * spew.c: Likewise.
15713         * tree.c: Likewise.
15714         * typeck.c: Likewise.
15715         * typeck2.c: Likewise.
15716         * xref.c: Likewise.
15717
15718 2000-01-25  Richard Henderson  <rth@cygnus.com>
15719
15720         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
15721
15722 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
15723
15724         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
15725         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
15726         (struct vcall_offset_data_s): New type.
15727         (dfs_vcall_offset_queue_p): New function.
15728         (dfs_build_vcall_offset_vtbl_entries): Likewise.
15729         (build_vcall_offset_vtbl_entries): Likewise.
15730         (layout_vtable_decl): Likewise.
15731         (num_vfun_entries): Likewise.
15732         (num_extra_vtbl_entries): Add the entries for vcall offsets.
15733         (build_vtbl_initializer): Likewise.
15734         (dfs_finish_vtabls): Use layout_vtable_decl.
15735         (modify_one_vtables): Always duplicate vtables under the new ABI.
15736         (finish_struct_1): Use layout_vtable_decl.
15737
15738 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15739
15740         * decl.c (member_function_or_else): Change third arg from a format
15741         specifier to an `enum overload_flags'.  Callers changed.
15742
15743 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
15744
15745         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
15746         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
15747         build_const_cast, get_delta_difference, check_return_expr): Avoid
15748         ANSI string concatenation usage.
15749
15750 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
15751
15752         * class.c (layout_class_type): Put the fields required to make a
15753         class non-empty at the end, not the beginning, of the TYPE_FIELDs
15754         list.
15755
15756 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
15757
15758         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
15759         template.
15760
15761         * decl2.c (mark_used): Do instantiate inlines that have been
15762         explicitly instantiated.
15763
15764 2000-01-24  Richard Henderson  <rth@cygnus.com>
15765
15766         * call.c (build_over_call): Use expand_tree_builtin.
15767         * typeck.c (build_function_call_real): Likewise.
15768         (build_binary_op_nodefault): Handle unordered compares.
15769
15770 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
15771
15772         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
15773         cp_tree_index values.
15774         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
15775         New global node #defines for them.
15776         * rtti.c (call_void_fn): Replace with ...
15777         (build_runtime_decl): ... new static function.
15778         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
15779         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
15780         (build_dynamic_cast_1): Always produce correctly typed result.
15781         Explicitly produce type_info addresses. Use dynamic_cast_node.
15782         * exception.cc (__throw_bad_cast): Return `void *'.
15783         (__throw_bad_typeid): Return `const type_info &'.
15784
15785 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
15786
15787         * cp-tree.h (get_vtable_decl): Prototype new function.
15788         * class.c (get_vtable_decl): New function. Broken out from ...
15789         (build_vtable): ... here. Use it.
15790         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
15791         by get_vtable_decl.
15792
15793 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
15794
15795         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
15796         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
15797         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
15798         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
15799         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
15800         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
15801         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
15802         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
15803         (CPTI_TINFO_VAR_ID): New enumeration.
15804         (__tp_desc_type_node, __access_mode_type_node,
15805         __bltn_desc_type_node, __user_desc_type_node,
15806         __class_desc_type_node, __ptr_desc_type_node,
15807         __attr_desc_type_node, __func_desc_type_node,
15808         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
15809         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
15810         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
15811         enum_desc_type_node, class_desc_type_node,
15812         si_class_desc_type_node, vmi_class_desc_type_node,
15813         ptmd_desc_type_node, base_desc_type_node): New #defines.
15814         (tinfo_fn_id, tinfo_fn_type): Rename to ...
15815         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
15816         (tinfo_var_id): New enumeration.
15817         (DECL_TINFO_FN_P): Augment comment.
15818         * decl.c (cp_global_trees): Adjust documentation.
15819         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
15820         tinfo_decl_type and tinfo_var_id.
15821         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
15822         (build_typeid): Remove unused variable.
15823         (get_tinfo_var): Use tinfo_var_id.
15824         (tinfo_name): New static function.
15825         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
15826         (tinfo_from_decl): Likewise.
15827         (get_base_offset): New static function, broken out of
15828         expand_class_desc.
15829         (expand_si_desc): Use tinfo_name.
15830         (expand_class_desc): Likewise. Lose local static variable.
15831         Use base_desc_type_node. Use get_base_offset.
15832         (expand_ptr_desc): Use tinfo_name.
15833         (expand_attr_desc): Likewise.
15834         (expand_generic_desc): Likewise.
15835
15836         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
15837         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
15838
15839 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
15840
15841         * cp-tree.h (__eprintf): Remove declaration.
15842         * tree.c (__eprintf): Remove definition.
15843
15844 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
15845             Mark Mitchell  <mark@codesourcery.com>
15846
15847         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
15848         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
15849
15850 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
15851
15852         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
15853
15854 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
15855
15856         * cp-tree.h (register_dtor_fn): New function.
15857         * decl.c (destroy_local_static): Rename to ...
15858         (register_dtor_fn): ... this.  Give it external linkage.
15859         (expand_static_init): Use it.
15860         * decl2.c (do_static_initialization): Likewise, if using
15861         __cxa_atexit.
15862         (do_static_destruction): Check that __cxa_atexit is not in use.
15863         (finish_file): Don't call do_static_destruction if using
15864         __cxa_atexit.
15865
15866         * typeck.c (convert_arguments): Restore two-message error
15867         reporting.
15868
15869 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
15870
15871         Remap dynamic cast hint values to be consistent across ABIs.
15872         * search.c (dynamic_cast_base_recurse): Remap generated value.
15873         (get_dynamic_cast_base_type): Adjust documentation.
15874         * tinfo.h (__user_type_info::dyncast): Likewise.
15875         (__user_type_info::find_public_subobj): Remap BOFF meaning.
15876         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
15877         (__class_type_info::do_dyncast): Likewise.
15878         (__class_type_info::do_find_public_subobj): Likewise.
15879         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
15880
15881 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
15882
15883         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
15884
15885         * typeck2.c (incomplete_type_error): Restore previous
15886         cp_error and cp_error_at call sequence.
15887
15888 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
15889
15890         * class.c (dump_class_hierarchy): Make format agree with argument;
15891         cast pointer to unsigned long and print with %lx.
15892
15893 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
15894
15895         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
15896
15897         * typeck.c (composite_pointer_type, common_type,
15898         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
15899         build_function_call_real, convert_arguments,
15900         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
15901         build_unary_op, mark_addressable, build_compound_expr,
15902         build_static_cast, build_reinterpret_cast, build_const_cast,
15903         build_c_cast, build_modify_expr, get_delta_difference,
15904         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
15905         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
15906         into a single one.
15907         * typeck2.c (readonly_error, abstract_virtuals_error,
15908         process_init_constructor, check_for_new_type): Likewise.
15909
15910 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
15911
15912         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
15913         VAR_DECLs.
15914
15915 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
15916
15917         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
15918         (build_x_typeid): Likewise.
15919         (get_tinfo_fn): Likewise.
15920         (get_tinfo_fn_unused): Rename to ...
15921         (get_tinfo_decl): ... here.
15922         * rtti.c (build_headof): Replace logic error with assertion.
15923         (get_tinfo_fn_dynamic): Rename to ...
15924         (get_tinfo_decl_dynamic): ... here. Make static. Use
15925         complete_type_or_else.
15926         (build_x_typeid): Move into ...
15927         (build_typeid): ... here. Adjust call to
15928         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
15929         throw_bad_typeid expression.
15930         (get_tinfo_fn_unused): Rename to ...
15931         (get_tinfo_decl): ... here. Adjust comment.
15932         (get_tinfo_fn): Delete.
15933         (tinfo_from_decl): New static function.
15934         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
15935         (get_typeid): Use complete_type_or_else.
15936         (build_dynamic_cast_1): Adjust calls to
15937         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
15938         * parse.y (primary): Adjust call to build_typeid.
15939         * except.c (build_eh_type_type_ref): Adjust call to
15940         get_tinfo_decl. Mark as used.
15941         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
15942         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
15943         * parse.c: Regenerated.
15944
15945 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
15946
15947         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
15948         calling convention.
15949         (resolves_to_fixed_type_p): Document calling convention.
15950         * rtti.c (build_x_typeid): Initialize NONNULL.
15951
15952         * cp-tree.h (build_shared_int_cst): New function.
15953         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
15954         * class.c (modify_vtable_entry): Likewise.
15955         (add_virtual_function): Split out code to generated shared
15956         INTEGER_CSTs to build_share_int_cst.
15957         (modify_all_vtables): Handle all the overridden functions here.
15958         Add overridden functions from non-primary virtual bases to the
15959         primary vtable.
15960         (finish_struct_1): Adjust call to modify_all_vtables.  Add
15961         overridden functions from non-primary bases to the vtable.
15962         * tree.c (build_shared_int_cst): New function.
15963
15964         * cp-tree.h (scratchalloc): Remove.
15965         (build_scratch_list): Likewise.
15966         * call.c (convert_class_to_reference): Replace build_scratch_list
15967         and build_expr_list with build_tree_list.
15968         (add_candidate): Replace scratchalloc with expralloc.  Note memory
15969         leak.
15970         (build_user_type_conversion_1):  Replace build_scratch_list
15971         and build_expr_list with build_tree_list.
15972         (build_new_op): Likewise.
15973         (build_op_delete_call): Likewise.
15974         (convert_like): Likewise.
15975         * cvt.c (ocp_convert): Likewise.
15976         * decl.c (start_decl): Likewise.
15977         (start_function): Likewise.
15978         (finish_destructor_body): Likewise.
15979         (maybe_build_cleanup_1): Likewise.
15980         * decl2.c (reparse_decl_as_expr): Likewise.
15981         * init.c (perform_member_init): Likewise.
15982         (expand_cleanup_for_base): Likewise.
15983         (build_builtin_delete_call): Likewise.
15984         (build_new_1): Likewise.
15985         (build_delete): Likewise.
15986         * method.c (do_build_assign_ref): Likewise.
15987         * parse.y (already_scoped_stmt): Likewise.
15988         (nontrivial_exprlist): Likewise.
15989         (net_initializer): Likewise.
15990         (initlist): Likewise.
15991         * parse.c: Regenerated.
15992         * rtti.c (build_x_typeid): Likewise.
15993         (build_dynamic_cast_1): Likewise.
15994         * typeck.c (build_x_compound_expr): Likewise.
15995         (build_static_cast): Likewise.
15996         (build_modify_expr): Likewise.
15997
15998         * cp-tree.h (DECL_VINDEX): Add documentation.
15999         * class.c (build_vtable_entry): Likewise.
16000         (start_vtable): Add comment.
16001         (add_virtual_function): Replace pending_hard_virtuals with
16002         overridden_virtuals and pending_virtuals with new_virtuals.
16003         Replace redundant assignments with assertions.
16004         (check_for_override): Add comment.
16005         (check_bases_and_members): Replace pending_hard_virtuals with
16006         overridden_virtuals and pending_virtuals with new_virtuals.
16007         (create_vtbl_ptr): Likewise.
16008         (layout_class_type): Likewise.
16009         (finish_struct_1): Likewise.  Add comments.
16010
16011 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
16012
16013         * class.c (finish_struct_1): Replace redundant code with
16014         assertions.
16015
16016         * cp-tree.h (flag_new_abi): Move.
16017         (flag_use_cxa_atexit): Likewise.
16018         (flag_honor_std): Likewise.
16019         (flag_rtti): Likewise.
16020         (vbase_offsets_in_vtable_p): Define.
16021         (vptrs_present_everywhere_p): Likewise.
16022         (TYPE_CONTAINS_VPTR_P): Likewise.
16023         (dfs_walk_real): Declare.
16024         * class.c (build_vbase_pointer_fields): Check
16025         vbase_offsets_in_vtable_p.
16026         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
16027         BINFO_VPTR_FIELD.
16028         (build_vbase_offset_vtbl_entries): Simplify.
16029         (build_vbase_offset_vtbl_entries): Adjust.
16030         (build_vbase_pointer): Add ability to look up vbase offsets in
16031         vtable.
16032         (start_vtable): New function.
16033         (add_virtual_function): Use it.
16034         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
16035         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
16036         (build_vtbl_initializer): Take the type of the complete object as
16037         input.  Use it to correctly calculate vbase offsets.
16038         (dfs_finish_vtbls): Pass the complete type to
16039         build_vtbl_initializer.
16040         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
16041         (create_vtable_ptr): Create a vtable even if there are no
16042         new virtual functions, under the new ABI.
16043         (finish_struct_1): Likewise.
16044         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
16045         * decl.c (exapnd_static_init): Remove call to
16046         preserve_initializer.
16047         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
16048         vtables.
16049         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
16050         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
16051         (construct_virtual_bases): Don't initialize virtual base pointers
16052         under the new ABI.
16053         (build_aggr_init): Clean up comment.
16054         (expand_aggr_init_1): Likewise.
16055         * rtti.c (expand_class_desc): Store the virtual function table
16056         index where the vbase offset lives in the offset field.
16057         * search.c (dfs_walk_real): Make it global.
16058         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
16059         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
16060
16061         * tinfo.h (USItype): Make it signed under the new ABI.
16062         * tinfo.cc (convert_to_base): New function.  Encapsulate base
16063         conversion logic here.
16064         (__class_type_info::do_upcast): Use it.
16065         (__class_type_info::do_dyncast): Likewise.
16066         (__class_type_info::do_find_public_subobj): Likewise.
16067
16068         * init.c (construct_virtual_bases): Don't look up the addresses of
16069         virtual bases at run-time.
16070
16071         * class.c (build_vbase_pointer): Relocate.
16072         (build_vbase_pointer_fields): Likewise.
16073         (dfs_build_vbase_offset_vtbl_entries): Likewise.
16074         (build_vbase_offset_vtbl_entries): Likewise.
16075
16076         * decl.c (init_decl_processing): Complain if -fnew-abi
16077         -fno-vtable-thunks is used.
16078
16079         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
16080         flag_new_abi.
16081
16082 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
16083
16084         * cp-tree.h (num_extra_vtbl_entries): New function.
16085         (size_extra_vtbl_entries): Likewise.
16086         (dfs_vtable_path_unmark): Likewise.
16087         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
16088         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
16089         * class.c (num_extra_vtbl_entries): New function.
16090         (size_extra_vtbl_entries): Likewise.
16091         (dfs_build_vbase_offset_vtbl_entries): New function.
16092         (build_vbase_offset_vtbl_entries): Likewise.
16093         (build_vtbl_initializer): Use it.
16094         (finish_struct_1): Adjust vtable sizes (using
16095         num_extra_vtbl_entries).
16096         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
16097         THUNK_DECL is non-NULL before expanding it.
16098         * init.c (expand_virtual_init): Adjust the vtable pointer by
16099         size_extra_vtbl_entries before storing it.
16100         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
16101         Handle TREE_LIST parameters here, not in the dfs_* functions.
16102         (dfs_unmarked_real_bases_queue_p): Adjust.
16103         (dfs_marked_real_bases_queue_p): Likewise.
16104         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
16105         (dfs_vtable_path_marked_real_bases_queue_p): New function.
16106         (dfs_vtable_path_unmark): Likewise.
16107
16108 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
16109
16110         * optimize.c (copy_body_r): Clear the operand three of a
16111         TARGET_EXPR when copying it.
16112
16113 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16114
16115         * method.c (build_decl_overload_real): Check whether we are in ::
16116         before returning __builtin_new/delete.
16117
16118 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
16119
16120         * pt.c (tsubst_friend_function): Improve comment.
16121         (instantiate_decl): Avoid crashing when a "nested" function is
16122         instantiated from the top level.
16123
16124         * dump.c (dqeueue_and_dump): Dump
16125         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
16126
16127 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16128
16129         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
16130
16131 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
16132
16133         * g++spec.c (lang_specific_driver): Add -fnew-abi if
16134         ENABLE_NEW_GXX_ABI defined.
16135         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
16136         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
16137         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
16138
16139 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
16140
16141         * decl.c (start_cleanup_fn): Call pushdecl.
16142
16143         * call.c (convert_class_to_reference): Fix typos.
16144         (build_conditional_expr): Handle errors gracefully.
16145         * class.c (push_nested_class): Likewise.
16146         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
16147         (DECL_THIS_EXTERN): Use it.
16148         (DECL_THIS_STATIC): Likewise.
16149         * cvt.c (convert_to_void): Handle errors gracefully.
16150         (build_expr_type_conversion): Likewise.
16151         * decl.c (maybe_push_decl): Likewise.
16152         (start_decl_1): Likewise.
16153         (require_complete_types_for_parms): Likewise.
16154         * parse.y (structsp): Likewise.
16155         (base_class): Likewise.
16156         * parse.c: Regenerated.
16157         * pt.c (finish_member_template_decl): Likewise.
16158         * typeck.c (decay_conversion): Likewise.
16159
16160         * cp-tree.h (dfs_skip_vbases): New function.
16161         (find_vbase_instance): Likewise.
16162         * class.c (determine_primary_base): Allow a nearly empty base to
16163         serve as a primary base class under the new ABI.
16164         (get_class_offset_1): Rename to ...
16165         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
16166         messages here.
16167         (get_class_offset): Use it.  Issue error messages here.
16168         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
16169         find the right copies of virtual bases.
16170         (fixup_vtable_deltas1): Rename to ...
16171         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
16172         bases as primary bases.
16173         (fixup_vtable_deltas): Remove.
16174         (override_one_vtable): Handle virtual bases as primary bases.
16175         (merge_overrides): Likewise.
16176         (finish_struct_1): Likewise.
16177         (dump_class_hierarchy): Dump primary-ness of bases as well.
16178         * search.c (mark_primary_bases): Use a pre-order traversal to
16179         handle primary virtual bases.
16180         (dfs_skip_vbases): New fiunction.
16181         (expand_upcast_fixups): Adjust to handle primary virtual bases.
16182         (fixup_virtual_upcast_offsets): Likewise.
16183         (fixup_all_virtual_upcast_offsets): Likewise.
16184         (dfs_find_vbase_instances): New function.
16185         (find_vbase_instance): Likewise.
16186
16187 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
16188
16189         * lex.c (DIR_SEPARATOR): Delete macro.
16190
16191 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
16192
16193        * decl2.c (lang_decode_option): Handle automatic line wrapping
16194        option.
16195
16196 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
16197
16198         * friend.c (do_friend): Don't resolve scopes when processing
16199         template declarations, even if the qualifying scope doesn't
16200         involve template parameters.
16201
16202 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
16203
16204         * class.c (dfs_modify_vtables_queue_p): Remove.
16205         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
16206         and dfs_marked_real_bases_queue_p instead of
16207         dfs_modify_vtables_queue_p.
16208
16209         * class.c (build_vbase_path): Simplify.
16210         (dfs_propagate_binfo_offsets): New function.
16211         (propagate_binfo_offsets): Use it.
16212         (remove_base_field): Simplify.
16213         (dfs_set_offset_for_vbases): Remove.
16214         (dfs_set_offset_for_shared_vbases): New function.
16215         (dfs_set_offset_for_unshared_vbases): Likewise.
16216         (layout_virtual_bases): Use them.
16217         (layout_basetypes): Don't call propagate_binfo_offsets.
16218         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
16219         for the vbases.
16220
16221         * class.c (build_base_field): New function, split out from ...
16222         (build_base_fields): ... here.  Use it.  Allocate primary bases
16223         first, under the new ABI.
16224         (get_vtable_entry): Remove.
16225         (remove_base_field): New function, split out from ...
16226         (remove_base_fields): ... here.  Adjust since primary bases come
16227         first under the new ABI.
16228
16229         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
16230         (initialize_vtbl_ptrs): New function.
16231         (expand_indirect_vtbls_init): Change prototype.
16232         (convert_pointer_to_vbase): Declare.
16233         * init.c (expand_direct_vtbls_init): Remove.
16234         (dfs_initialize_vtbl_ptrs): New function.
16235         (initialize_vtbl_ptrs): Likewise.
16236         (emit_base_init): Use initialize_vtbl_ptrs.
16237         * search.c (convert_pointer_to_vbase): Make it global.
16238         (expand_indirect_vtbls_init): Remove vtable initialization code.
16239         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
16240
16241         * class.c (dfs_finish_vtbls): New function.
16242         (finish_vtbls): Use it.
16243         (dump_class_hierarchy): New function.
16244
16245         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
16246         (BINFO_VBASE_PRIMARY_P): New macro.
16247         (BINFO_VIRTUALS): Add to documentation.
16248         (SET_BINFO_PRIMARY_MARKED_P): Remove.
16249         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
16250         (dfs_mark_primary_bases_queue_p): Likewise.
16251         (dfs_unmarked_real_bases_queue_p): New function.
16252         (dfs_marked_real_bases_queue_p): Likewise.
16253         * search.c (dfs_mark_primary_bases): Adjust.
16254         (mark_primary_bases): Likewise.
16255         (get_shared_vbase_if_not_primary): New function.
16256         (dfs_unmarked_real_bases_queue_p): Likewise.
16257         (dfs_marked_real_bases_queue_p): Likewise.
16258         (dfs_get_pure_virtuals): Simplify.
16259         (get_pure_virtuals): Likewise.
16260
16261 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16262
16263         * lex.c: Include tm_p.h.
16264
16265 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
16266
16267         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
16268
16269 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
16270
16271         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
16272         * pt.c (instantiate_decl): Defer comdat templates that might not be
16273         needed.
16274
16275         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
16276         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
16277         (finish_file): Likewise.
16278
16279         * decl2.c (import_export_class): Undo 12/14 change.
16280
16281         * error.c (dump_decl): operator new, not operatornew.
16282
16283         * class.c (field_decl_cmp): A nontype is "greater" than a type.
16284         * search.c (lookup_field_1): Look for the last field with the
16285         desired name.
16286
16287 2000-01-05  Nathan Sidwell  <nathan@acm.org>
16288
16289         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
16290         FUNCTION_DECL.
16291
16292 2000-01-05  Nathan Sidwell  <nathan@acm.org>
16293
16294         * typeck.c (build_static_cast): Don't strip target qualifiers
16295         when casting from a class.
16296
16297 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16298
16299         * class.c (warn_hidden): Initialize variable `fndecl'.
16300
16301 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
16302
16303         * decl.c (flag_isoc9x): New variable to be able to use code in
16304         c-common.c.  For now always zero.
16305
16306 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
16307
16308         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
16309         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
16310         or unshare_base_binfos for virtual bases here.
16311         * search.c (dfs_get_vbase_types): Do it here.
16312         (get_vbase_types): Adjust.
16313
16314 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
16315
16316         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
16317         (BINFO_PRIMARY_MARKED_P): Use flag 5.
16318         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
16319         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
16320         (unmark_primary_bases): Remove declaration.
16321         (unmarkedp): Declare.
16322         (dfs_vbase_unmark): Likewise.
16323         * class.c (determine_primary_base): Return immediately if there
16324         are no base classes.  Call mark_primary_bases here.
16325         (modify_all_direct_vtables): Remove.
16326         (modify_all_indirect_vtables): Remove.
16327         (dfs_modify_vtables_queue_p): New function.
16328         (dfs_modify_vtables): New function.
16329         (modify_all_vtables): Use them.
16330         (build_base_fields): Build FIELD_DECLs for primary virtual base
16331         classes.
16332         (create_vtable_ptr): Don't call determine_primary_base here.
16333         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
16334         (dfs_set_offset_for_vbases): ... this.
16335         (layout_virtual_bases): Use it.
16336         (layout_class_type): Call determine_primary_base here.
16337         * search.c (unmarkedp): Make it global.
16338         (shared_marked_p): Simplify.
16339         (shared_unmarked_p): Likewise.
16340         (dfs_primary_bases_queue_p): Remove.
16341         (dfs_unmark_primary_bases): Likewise.
16342         (unmark_primary_bases): Likewise.
16343         (mark_primary_bases): Simplify.
16344         (get_pure_virtuals): Don't call mark_primary_bases here.
16345         (dfs_vbase_unmark): New function.
16346         (get_vbase_types): Simplify.
16347
16348         * class.c (struct base_info): Remove.
16349         (determine_primary_base): Take has_virtual_p rather than a
16350         base_info as input.  Don't calculate max_has_virtual.
16351         (finish_struct_bits): Remove max_has_virtual argument.
16352         (create_vtable_ptr): Remove max_has_virtual_p argument.
16353         (layout_virtual_bases): Remove max argument.
16354         (layout_basetypes): Likewise.
16355         (layout_class_type): Remove max_has_virtual_p argument.
16356         (finish_struct_1): Remove max_has_virtual.
16357
16358         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
16359         (layout_basetypes): Remove.
16360         * class.c (propagate_binfo_offsets): Moved here from tree.c.
16361         Update to handle primary virtual bases.
16362         (remove_base_fields): New function, split out from
16363         layout_basetypes.
16364         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
16365         (layout_virtual_bases): New function, split out from
16366         layout_basetypes.  Update to handle primary virtual bases.
16367         (layout_basetypes): Moved here from tree.c.  Use
16368         remove_base_fields and layout_virtual_bases.
16369         * search.c (dfs_mark_primary_bases_queue_p): New function.
16370         (mark_primary_bases): Use it.
16371         * tree.c (CEIL): Remove.
16372         (propagate_binfo_offsets): Remove.
16373         (layout_basetypes): Remove.
16374
16375 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
16376
16377         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
16378         (BINFO_PRIMARY_MARKED_P): New macro.
16379         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
16380         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
16381         (mark_primary_bases): New function.
16382         (unmark_primary_bases): Likewise.
16383         * search.c (get_abstract_virtuals_1): Remove.
16384         (dfs_mark_primary_bases): New function.
16385         (mark_primary_bases): Likewise.
16386         (dfs_unmark_primary_bases): Likewise.
16387         (unmark_primary_bases): Likewise.
16388         (dfs_get_pure_virtuals): Likewise.
16389
16390 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
16391
16392         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
16393         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
16394         (modify_one_vtable): Adjust.
16395         (fixup_vtable_deltas1): Likewise.
16396         (override_one_vtable): Likewise.
16397         * search.c (get_abstract_virtuals_1): Likewise.
16398         (get_pure_virtuals): Likewise.
16399         (expand_upcast_fixups): Likewise.
16400         * tree.c (debug_binfo): Likewise.
16401
16402         * class.c (build_vtable): Don't return a value.  Don't rebuild
16403         vtables for bases that have already been handled.
16404         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
16405         already been handled.
16406         (modify_one_vtable): Adjust accordingly.
16407         (fixup_vtable_deltas1): Likewise.
16408         (finish_struct_1): Likewise.
16409
16410 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16411
16412         * call.c (build_new_method_call): Also check destructors.