OSDN Git Service

* cp-tree.h, decl.h: Get rid of PARAMS. Again.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
2
3         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
4
5 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
6
7         PR c++/9354
8         * init.c (build_new): Set the type of the new-expression, even
9         when processing_templte_decl.
10
11         PR c++/9216
12         * parser.c (cp_parser_primary_expression): Improve error message
13         for templates used in an expression context.
14
15         PR c++/8696
16         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
17         parse when encountering "typedef".
18
19 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
20
21         * class.c, parser.c: ANSIfy function definitions and declarations.
22
23 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
24
25         PR c++/9328
26         * error.c (dump_decl): For an OVERLOAD, just print the name of the
27         function; it doesn't make sense to try to print its type.
28         * semantics.c (finish_typeof): Issue errors about invalid uses.
29
30         PR c++/9298
31         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
32         function.
33         (cp_parser_expression_statement): Use it.
34         (cp_parser_explicit_instantiation): Likewise.
35         * pt.c (do_decl_instantiation): Improve error handling logic.
36         
37 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
38
39         PR c++/9384
40         * parser.c (cp_parser_using_declaration): Issue error messages
41         about name resolution failures here.
42
43         PR c++/9388
44         * class.c (currently_open_derived_class): Use dependent_type_p.
45         * cp-tree.h (dependent_type_p): New function.
46         (dependent_template_arg_p): Likewise.
47         (dependent_template_p): Likewise.
48         (type_dependent_expression_p): Likewise.
49         * parser.c (cp_parser_dependent_type_p): Remove.
50         (cp_parser_value_dependent_type_p): Likewise.
51         (cp_parser_type_dependent_expression_p): Likewise.
52         (cp_parser_dependent_template_arg_p): Likewise.
53         (cp_parser_dependent_template_id_p): Likewise.
54         (cp_parser_dependent_template_p): Likewise.
55         (cp_parser_diagnose_invalid_type_name): Replace
56         cp_parser_dependent_type_p with dependent_type_p, etc.
57         (cp_parser_primary_expresion): Likewise.
58         (cp_parser_nested_name_specifier_opt): Likewise.
59         (cp_parser_postfix_expression): Likewise.
60         (cp_parser_unary_expression): Likewise.
61         (cp_parser_template_name): Likewise.
62         (cp_parser_class_name): Likewise.
63         (cp_parser_lookup_name): Likewise.
64         * pt.c (dependent_type_p): New function.
65         (value_dependent_expression_p): Likewise.
66         (type_dependent_expression_p): Likewise.
67         (dependent_template_arg_p): Likewise.
68         (dependent_template_id_p): Likewise.
69         (dependent_template_p): Likewise.
70         
71         PR c++/9285
72         PR c++/9294
73         * parser.c (cp_parser_simple_declaration): Return quickly when
74         encountering errors.
75
76 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
77
78         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
79
80 2003-01-17  Jason Merrill  <jason@redhat.com>
81
82         PR c++/9167, c++/9358
83         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
84
85 2003-01-17  Jason Merrill  <jason@redhat.com>
86
87         PR c++/9342
88         * call.c (build_conditional_expr): Always do lvalue-rvalue
89         conversion.
90
91 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
92
93         PR c++/9294
94         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
95         * cp-tree.h (BASELINK_BINFO): Adjust.
96         (BASELINK_FUNCTIONS): Likewise.
97         (BASELINK_ACCESS_BINFO): Likewise.
98         (tree_baselink): New structure.
99         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
100         (lang_tree_node): Add baselink.
101         * decl.c (cp_tree_node_structure): Add BASELINK case.
102         * search.c (build_baselink): Adjust.
103         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
104         test from TREE_LIST case.
105
106         PR c++/9272
107         * parser.c (cp_parser_constructor_declarator_p): Do not assume
108         that a constructor cannot be declared outside of its own class.
109         
110         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
111         be resolved, neither can the qualified name.
112
113         * rtti.c (get_pseudo_ti_desc): Fix thinko.
114
115 2003-01-16  Jason Merrill  <jason@redhat.com>
116
117         PR c++/8564
118         * init.c (build_vec_init): Re-add maxindex parm.
119         (perform_member_init, build_aggr_init): Pass it.
120         (build_new_1): Pass it. Use an incomplete array type for full_type.
121         * typeck.c (build_modify_expr): Pass it.
122         * cp-tree.h: Adjust.
123
124 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
125
126         * cp-tree.h (tsubst_copy_and_build): New declaration.
127         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
128         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
129         (tsubst_copy_and_build): New function.
130
131 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
132
133         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
134         (PARTIAL_INSTANTIATION_P): Remove.
135         (IMPLICIT_TYPENAME_P): Likewise.
136         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
137         (build_typename_type): Remove declaration.
138         (parmlist_is_exprlist): Likewise.
139         * decl.c (build_typename_type): Make it static, remove third
140         parameter.
141         (push_class_binding): Don't do implicit typename stuff.
142         (make_typename_type): Likewise.
143         (lookup_name_real): Likewise.
144         (grokdeclarator): Don't try to convert declarations into
145         initializations.  Don't do implicit typename stuff.
146         (parmlist_is_exprlist): Remove.
147         (xref_basetypes): Simplify.
148         * decl2.c (grokfield): Don't try to convert declarations into
149         initializations.
150         (build_anon_union_vars): Do this while processing templates, too.
151         (finish_anon_union): Likewise.
152         * error.c (dump_type): Remove implicit typename handling.
153         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
154         (cp_parser_primary_expression): Correct handling of names not
155         found by unqualified name lookup in templates.
156         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
157         of types when possible.
158         (cp_parser_simple_declaration): Complain intelligently about some
159         invalid declarations.
160         (cp_parser_member_declaration): Likewise.
161         (cp_parser_constructor_declarator_p): Don't check when we're in a
162         function scope.
163         * pt.c (instantiate_class_template): Remove
164         PARTIAL_INSTANTIATION_P gunk.
165         * search.c (lookup_field_r): Don't build implicit typenames.
166         (marked_pushdecls_p): Don't enter dependent base types.
167         (unmarked_pushdecls_p): Likewise.
168         * semantics.c (begin_class_definition): Remove implicit typename
169         stuff.
170
171 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
172
173         PR c++/9212
174         * parser.c (cp_parser_direct_declarator): If accepting either
175         abstract or named, the name must be an unqualified-id.
176
177 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
178
179         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
180
181 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
182
183         * decl2.c (check_classfn): Fix uninitialized warning.
184         (build_anon_union_vars): Likewise.
185         * pt.c (tsubst_copy): Likewise.
186
187 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
188
189         Further conform g++'s __vmi_class_type_info to the C++ ABI
190         specification.
191         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
192         the specification.
193         (class_hint_flags): Likewise.
194
195 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
196
197         * config-lang.in: Add semantics.c to gtfiles.
198         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
199         (saved_scope): Likewise.
200         (type_lookups): Remove.
201         (deferred_access): New structure.
202         (type_access_control): Remove.
203         (save_type_access_control): Likewise.
204         (reset_type_access_control): Likewise.
205         (decl_type_access_control): Likewise.
206         (push_deferring_access_checks): Declare.
207         (resume_deferring_access_checks): Likewise.
208         (stop_deferring_access_checks): Likewise.
209         (pop_deferring_access_checks): Likewise.
210         (get_deferred_access_checks): Likewise.
211         (pop_to_parent_deferring_access_checks): Likewise.
212         (perform_deferred_access_checks): Likewise.
213         (perform_or_defer_access_check): Likewise.
214         * decl.c (make_typename_type): Use perform_or_defer_access_check.
215         (make_unbound_class_template): Likewise.
216         (grokdeclarator): Don't call decl_type_access_control.
217         * parser.c (cp_parser_context): Remove deferred_access_checks
218         and deferring_access_checks_p fields.
219         (cp_parser_context_new): Adjust.
220         (cp_parser): Remove access_checks_lists.
221         (cp_parser_defer_access_check): Remove.
222         (cp_parser_start_deferring_access_checks): Remove.
223         (cp_parser_stop_deferring_access_checks): Remove.
224         (cp_parser_perform_deferred_access_checks): Remove.
225         (cp_parser_nested_name_specifier_opt): Use new deferred access
226         functions.
227         (cp_parser_simple_declaration): Likewise.
228         (cp_parser_template_id): Likewise.
229         (cp_parser_function_definition): Likewise.
230         (cp_parser_class_specifier): Likewise.
231         (cp_parser_lookup_name): Likewise.
232         (cp_parser_single_declaration): Likewise.
233         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
234         (cp_parser_parse_tentatively): Likewise.
235         (cp_parser_parse_definitely): Likewise.
236         (yyparse): Likewise.
237         (cp_parser_init_declarator): Remove access_checks parameter.
238         Use new deferred access functions.
239         (cp_parser_function_definition_from_specifiers_and_declarator):
240         Likewise.
241         (cp_parser_class_head): Remove deferring_access_checks_p and
242         saved_access_checks parameters.  Use new deferred access functions.
243         (cp_parser_member_specification_opt): Don't call
244         reset_type_access_control.
245         * search.c (type_access_control): Remove.
246         * semantics.c: Include "gt-cp-semantics.h".
247         (deferred_type_access_control): Remove.
248         (deferred_access_stack): New variable.
249         (deferred_access_free_list): Likewise.
250         (push_deferring_access_checks): New function.
251         (resume_deferring_access_checks): Likewise.
252         (stop_deferring_access_checks): Likewise.
253         (pop_deferring_access_checks): Likewise.
254         (get_deferred_access_checks): Likewise.
255         (pop_to_parent_deferring_access_checks): Likewise.
256         (perform_deferred_access_checks): New function, adapted from
257         cp_parser_perform_deferred_access_checks.
258         (perform_or_defer_access_check): New function, adapted from
259         cp_parser_defer_access_check.
260         (current_type_lookups): Remove.
261         (deferred_type_access_control): Likewise.
262         (decl_type_access_control): Likewise.
263         (save_type_access_control): Likewise.
264         (reset_type_access_control): Likewise.
265         (begin_function_definition): Adjust.
266         (begin_class_definiton): Likewise.
267
268 2003-01-13  Jason Merrill  <jason@redhat.com>
269
270         PR c++/8748
271         * class.c (build_base_path): Take the address before calling save_expr.
272
273         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
274         all the ambiguous conversions are bad.
275
276         * class.c (maybe_warn_about_overly_private_class): Don't stop
277         searching when we find a nonprivate method.
278
279         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
280
281 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
282
283         * cp-tree.h (get_arglist_len_in_bytes): Remove.
284
285         PR c++/9264
286         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
287         typeame types more robustly.
288
289 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
290
291         * parser.c:  Fix comment typos.
292
293 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
294
295         PR c++/9099
296         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
297         an object_type which is not a class type.
298
299 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
300
301         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
302         (cp_parser_late_parsing_default_args): Likewise.
303
304 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
305
306         * cfns.gperf: ANSIfy function declarations.
307         * cfns.h: Regenerate.
308         * cp-tree.h: ANSIfy function declarations.
309
310 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
311
312         * cp-tree.h (reparse_absdcl_as_expr): Remove.
313         (reparse_absdcl_as_casts): Likewise.
314         (reparse_decl_as_expr): Likewise.
315         (finish_decl_parsing): Likewise.
316         * decl2.c (reparse_absdcl_as_expr): Remove.
317         (reparse_absdcl_as_casts): Likewise.
318         (repase_decl_as_expr): Likewise.
319         (finish_decl_parsing): Likewise.
320
321         PR c++/9128
322         PR c++/9153
323         PR c++/9171
324         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
325         function.
326         (cp_parser_nested_name_specifier_opt): Correct the
327         check_dependency_p false.
328         (cp_parser_postfix_expression): Fix formatting.
329         (cp_parser_decl_specifier_seq): Avoid looking for constructor
330         declarators when possible.
331         (cp_parser_template_id): Avoid performing name-lookup when
332         possible.
333         (cp_parser_class_head): Do not count specializations when counting
334         levels of templates.
335         (cp_parser_constructor_declarator_p): Return immediately if
336         there's no chance that the tokens form a constructor declarator.
337         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
338         expression with reference type.
339         (get_tinfo_decl_dynamic): Do not return an expression with
340         reference type.
341         (build_typeid): Add comment.  Do not return an expression with
342         reference type.
343         * typeck.c (build_class_member_access_expr): Improve handling of
344         conditionals and comma-expressions as objects.
345
346 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
347
348         * cfns.gperf: ANSIfy function declarations.
349         * cfns.h: Regenerate.
350         * cp-tree.h: ANSIfy function declarations.
351         * parser.c: ANSIfy function declarations & definitions.
352
353         * decl.c (bad_specifiers): Fix parameter order error I introduced.
354
355 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
356
357         Merge from pch-branch:
358
359         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
360
361         Merge to tag pch-merge-20030102:
362         
363         * semantics.c (finish_translation_unit): Don't call finish_file.
364         * parser.c: Don't include ggc.h.
365         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
366         read first token here.  Don't allow PCH files after the first
367         token is read.
368         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
369         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
370         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
371         (cp_parser_late_parsing_for_member): Don't duplicate call to
372         cp_lexer_set_source_position_from_token.
373         (cp_parser_late_parsing_default_args): Likewise.
374         (yyparse): Call finish_file after clearing the_parser.
375
376         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
377
378         * Make-lang.in: Remove $(GGC_H) from all dependencies.
379         (CXX_TREE_H): Add $(GGC_H).
380         * class.c: Don't include ggc.h. 
381         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
382         (method_name_cmp): Likewise.
383         (resort_data): New variable.
384         (resort_field_decl_cmp): New.
385         (resort_method_name_cmp): New.
386         (resort_sorted_fields): New.
387         (resort_type_method_vec): New.
388         (finish_struct_methods): Delete cast.
389         (finish_struct_1): Delete cast.
390         * cp-tree.h: Include ggc.h.
391         (struct lang_type_class): Add reorder attribute to field `methods'.
392         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
393         (resort_sorted_fields): New prototype.
394         (resort_type_method_vec): New prototype.
395         * call.c: Don't include ggc.h.
396         * decl.c: Likewise.
397         * decl2.c: Likewise.
398         * init.c: Likewise.
399         * lex.c: Likewise.
400         * method.c: Likewise.
401         * optimize.c: Likewise.
402         * parse.y: Likewise.
403         * pt.c: Likewise.
404         * repo.c: Likewise.
405         * search.c: Likewise.
406         * semantics.c: Likewise.
407         * spew.c: Likewise.
408         * tree.c: Likewise.
409
410         * lang-specs.h: Remove comment.
411
412         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
413
414         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
415         (operator_name_info): Mark to be saved for PCH, specify size.
416         (assignment_operator_name_info): Likewise.
417
418         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
419
420         * decl.c (anon_cnt): Mark to be saved for PCH.
421
422         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
423
424         * lex.c  (init_reswords): Delete now-untrue comment.
425         Allocate ridpointers using GGC.
426
427         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
428
429         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
430
431         * g++spec.c (lang_specific_driver): Don't include standard
432         libraries in `added'.
433
434         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
435
436         * decl2.c (finish_file): Call c_common_write_pch.
437         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
438
439         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
440
441         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
442         files when using g++.
443         * lang-specs.h: Handle compiling C++ header files.
444
445 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
446
447         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
448
449 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
450
451         * pt.c (push_access_scope_real): Call push_to_top_level for
452         function in namespace scope.
453         (pop_access_scope): Call pop_from_top_level for function in
454         namespace scope.
455
456 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
457
458         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
459
460 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
461
462         * Make-lang.in (c++.install-common, c++.install-man,
463         c++.uninstall): Prepend $(DESTDIR) to destination paths in
464         all (un)installation commands.
465         (c++.install-common): Rewrite $(LN) commands to support
466         DESTDIR with "ln" as well as with "ln -s".
467
468 2003-01-08  Jason Merrill  <jason@redhat.com>
469
470         * parser.c (cp_parser_primary_expression): See through explicitly
471         scoped ALIAS_DECLs, too.
472
473 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
474
475         * decl.c: Remove some #if 0 code.
476
477         * decl.c: ANSIfy function declarations.
478
479 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
480
481         * parser.c (cp_parser_asm_definition): Correct handling of omitted
482         operands.
483
484 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
485
486         PR c++/9030
487         * decl.c (make_typename_type): Check access only when tf_error.
488         (make_unbound_class_template): Likewise.
489         * pt.c (saved_access_scope): New variable.
490         (push_access_scope_real): New function.
491         (push_access_scope): Likewise.
492         (pop_access_scope): Likewise.
493         (tsubst_default_argument): Use them.
494         (instantiate_template): Likewise.
495         (regenerate_decl_from_template): Likewise.
496         (instantiate_decl): Likewise.
497         (get_mostly_instantiated_function_type): Likewise.
498
499 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
500
501         * tree.c: Delete bogus #if 0 code.
502
503 2003-01-07  Andreas Schwab  <schwab@suse.de>
504
505         * class.c (layout_class_type): Don't use
506         PCC_BITFIELD_TYPE_MATTERS if not defined.
507
508 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
509
510         PR c++/9165
511         * decl2.c (build_cleanup): Mark the object as used.
512
513         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
514         (hash_local_specialization): New function.
515         (register_local_specialization): Revert 2003-01-05 change.
516         (instantiate_decl): Use hash_local_specialization when creating
517         the local_specializations table.
518         
519         * decl2.c (mark_used): Do not synthesize thunks.
520
521         * class.c (layout_class_type): Correct handling of unnamed
522         bitfields wider than their types.
523
524         PR c++/9189
525         * parser.c (cp_parser): Remove default_arg_types.  Update
526         documentation for unparsed_functions_queues.
527         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
528         parameter.
529         (cp_parser_new): Don't set parser->default_arg_types.
530         (cp_parser_function_definition): Adjust usage of
531         unparsed_funtions_queues.
532         (cp_parser_class_specifier): Don't mess with
533         parser->default_arg_types.  Handle default argument processing in
534         a separate phase from function body processing.
535         (cp_parser_template_declaration_after_export): Adjust usage of
536         unparsed_functions_queues.
537         (cp_parser_late_parsing_for_member): Do not handle default
538         arguments.
539
540 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
541
542         PR c++/9109
543         * parser.c (cp_parser_declarator_kind): New enum.
544         (cp_parser_declarator): Adjust.
545         (cp_parser_direct_declarator): Adjust. Allow for either named or
546         abstract declarator. Prefer abstract, if possible. Allow
547         parenthesized function name.
548         (cp_parser_condition): Adjust cp_parser_declarator call.
549         (cp_parser_explicit_instantiation): Likewise.
550         (cp_parser_init_declarator): Likewise.
551         (cp_parser_type_id): Likewise.
552         (cp_parser_function_definition): Likewise.
553         (cp_parser_member_declaration): Likewise.
554         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
555         the tentative parsing.
556         (cp_parser_exception_declaration): Likewise.
557
558 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
559
560         * parser.c (cp_parser_template_parameter): Adjust call to
561         cp_parser_parameter_declaration.
562         (cp_parser_parameter_declaration_list): Likewise.
563         (cp_parser_parameter_declaration): Replace
564         greater_than_is_operator_p with template_parm_p parameter.  Do not
565         cache tokens for template default arguments.
566
567         * pt.c (retrieve_local_specialization): Use htab_find, not
568         htab_find_with_hash.
569         (register_local_specialization): Use htab_find_slot, not
570         htab_find_slot_with_hash.
571         (instantiate_decl): Pass a hash function to htab_create.
572         
573 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
574
575         * parser.c (cp_parser_binary_expression,
576         cp_parser_multiplicative_expression,
577         cp_parser_additive_expression, cp_parser_shift_expression,
578         cp_parser_relational_expression, cp_parser_equality_expression,
579         cp_parser_and_expression, cp_parser_exclusive_or_expression,
580         cp_parser_inclusive_or_expression,
581         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
582         cp_parser_binary_expression): Const-ify.
583
584 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
585
586         * method.c (use_thunk): Disable access control while building the
587         body of the thunk.
588
589 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
590
591         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C 
592         front end.
593
594 2003-01-03  Matt Austern  <austern@apple.com>
595
596         * cp-tree.h (struct lang_type_class): add field for key method
597         (cp_global_trees): rename dynamic_classes to keyed_classes
598         (key_method): add definition
599         * class.c (finish_struct_1): compute class's key method, and add
600         the class to keyed_classes list if there is no key method.
601         * decl.c (finish_function): add class to keyed_classes list if we
602         see a definition of the class's key method.
603         * pt.c (instantiate_class_template): add template specialization
604         of a dynamic class to keyed_classes list.
605         * decl2.c (key_method): remove
606         (finish_file): iterate only through keyed_classes list when
607         deciding whether to emit vtables, remove class from its list after
608         we do the emission.
609         
610 2003-01-02  Jason Merrill  <jason@redhat.com>
611
612         * call.c (build_conditional_expr): Stabilize lvalues properly.
613         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
614         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
615         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
616
617         * call.c (convert_like_real): Call decl_constant_value for an
618         IDENTITY_CONV even if there are no more conversions.
619
620         * cvt.c (build_up_reference): Don't push unnamed temps.
621
622         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
623
624         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
625         for a backend struct.
626
627         * except.c (wrap_cleanups_r, build_throw): Make
628         MUST_NOT_THROW_EXPRs void.
629         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
630
631         * init.c (build_vec_delete_1): Pre-evaluate the base address.
632
633         * init.c (get_temp_regvar): Simplify logic.
634
635         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
636         our replacement is a decl.
637
638         * decl.c (cp_make_fname_decl): Push the decls inside the
639         outermost scope.
640
641 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
642
643         PR c++/45, c++/3784
644         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
645         the same too.
646
647 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
648
649         * parser.c (struct cp_parser): Add access_checks_lists field
650         (cp_parser_simple_declaration): Use.
651         (cp_parser_init_declarator): Likewise. 
652
653 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
654
655         * parser.c (cp_parser_declaration): Accept the __extension__
656         keyword before the declaration.
657
658         PR c++/2843
659         * parser.c (cp_parser_parameter_declaration): Allow attributes to
660         appear after the declarator.
661
662         * call.c (build_new_method_call): Fix typo in message format
663         string.
664
665 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
666
667         * parser.c (cp_lexer_next_token_is): Declare it inline.
668         (cp_lexer_set_source_position_from_token): Likewise.
669         (cp_lexer_debugging_p): Likewise.
670         (cp_parser_parsing_tentatively): Likewise.
671         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
672         to the cp_lexer_peek_token.
673
674         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
675         expression.
676
677 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
678
679         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
680         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
681         cp/repo.c: Fix copyright years.
682
683 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
684
685         * lex.c: Remove superfluous include of cpplib.h.
686         (CONSTRAINT): Define without conditions.
687         (init_cp_pragma): Use c_register_pragma.
688
689 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
690
691         * .cvsignore: Remove.
692
693 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
694
695         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
696           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
697           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
698           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
699           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
700           copyright header.
701         * lex.h: parse.y is dead, so don't mention it.  Also replace the
702           copyright header with the default GNU copyright header.
703
704 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
705
706         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
707         (lookup_name_namespace_only): Likewise.
708         (begin_only_namespace_names): Likewise.
709         (end_only_namespace_names): Likewise.
710         * decl.c (only_namespace_names): Remove.
711         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
712         (lookup_name_real): Do not check only_namespace_names.
713         (lookup_name_namespace_only): Remove.
714         (begin_only_namespace_names): Likewise.
715         (end_only_namespace_names): Likewise.
716         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
717         nested-name-specifiers more gracefully.
718         (cp_parser_class_or_namespace_name): Avoid looking up namespace
719         names when they cannot possibly appear.
720         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
721         (cp_parser_elaborated_type_specifier): Likewise.
722         (cp_parser_namespace_name): Only look for namespace names.
723         (cp_parser_lookup_name): Add is_namespace parameter.
724         (cp_parser_lookup_name_simple): Adjust call to
725         cp_parser_lookup_name.
726
727         * parser.c (cp_parser_dependent_type_p): Fix thinko.
728
729 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
730
731         * .cvsignore: Update.
732
733 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
734
735         * class.c (modify_vtable_entry): Remove unused variable.
736         (get_vcall_index): Always expect a non-thunk.
737         (update_vtable_entry_for_fn): Combine covariant adjustments, when
738         overriding a thunk. Pass get_vcall_index a non-thunk.
739
740         * decl2.c (finish_file): Mark undefined inlines as extern.
741
742 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
743
744         * cp-tree.def (RETURN_INIT): Remove.
745         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
746         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
747         (note_level_for_for): Remove.
748         (note_level_for_try): Likewise.
749         (note_level_for_catch): Likewise.
750         (finish_named_return_value): Likewise.
751         (do_pushlevel): Change prototype.
752         (pending_lang_change): Remove.
753         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
754         sk_for.
755         (note_level_for_for): Remove.
756         (note_level_for_try): Likewise.
757         (note_level_for_catch): Likewise.
758         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
759         * parser.c (cp_parser_context_free_list): Make it "deletable".
760         (cp_parser_template_argument): Remove misleading comment.
761         * pt.c (tsubst_expr): Remove RETURN_INIT code.
762         * semantics.c (genrtl_named_return_value): Remove.
763         (do_pushlevel): Take a scope kind as an argument.
764         (begin_if_stmt): Adjust.
765         (begin_while_stmt): Likewise.
766         (begin_for_stmt): Likewise.
767         (finish_for_init_stmt): Likewise.
768         (begin_switch_stmt): Likewise.
769         (begin_handler): Likewise.
770         (begin_compound_stmt): Likewise.
771         (finish_named_return_value): Remove.
772         (cp_expand_stmt): Remove RETURN_INIT case.
773         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
774
775 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
776
777         PR c++/9112
778         * parser.c (cp_parser_direct_declarator): Handle erroneous
779         parenthesized declarators correctly.
780
781 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
782
783         * cp-tree.h (pending_lang_change): Declare.
784
785 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
786
787         * parser.c (cp_parser_context_free_list): New variable.
788         (cp_parser_context_new): Use it.
789         (cp_parser_error): Check return code from
790         cp_parser_simulate_error.
791         (cp_parser_simulate_error): Return a value.
792         (cp_parser_id_expression): Optimize common case.
793         (cp_parser_class_name): Likewise.
794         (cp_parser_class_specifier): Adjust call to
795         cp_parser_late_parsing_default_args.
796         (cp_parser_lookup_name): Optimize common case.
797         (cp_parser_late_parsing_for_member): Adjust call to
798         cp_parser_late_parsing_default_args.
799         (cp_parser_late_parsing_default_args): Add scope parameter.
800         (cp_parser_require): Avoid creating the error message unless it's
801         needed.
802         (cp_parser_parse_definitely): Place free'd contexts on the free
803         list.
804
805         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
806
807 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
808
809         * parser.c (cp_parser_parameter_declaration_clause): Treat system
810         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
811
812 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
813
814         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
815         GCC, not GNU CC.
816
817 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
818
819         * parse.y: Remove.
820         * spew.c: Likewise.
821         * Make-lang.in (gt-cp-spew.h): Remove.
822         * cp-tree.h (do_pending_lang_change): Remove.
823         (do_identifier): Change prototype.
824         (finish_id_expr): Remove.
825         * decl.c (lookup_name_real): Remove yylex variable.
826         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
827         * lex.c (init_cpp_parse): Remove.
828         (reduce_cmp): Likewise.
829         (token_cmp): Likewise.
830         (yychar): Likewise.
831         (lastiddecl): Likewise.
832         (token_count): Likewise.
833         (reduce_count): Likewise.
834         (yyhook): Likewise.
835         (print_parse_statistics): Likewise.
836         (do_pending_lang_change): Likewise.
837         (do_identifier): Remove parsing parameter.
838         * lex.h (lastiddecl): Remove.
839         (looking_for_typename): Remove.
840         (looking_for_template): Likewise.
841         (pending_lang_change): Likewise.
842         (yylex): Likewise.
843         * semantics.c (finish_id_expr): Remove.
844
845         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
846         thread" correctly.
847
848 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
849
850         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
851         end, not the C front end.
852
853 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
854
855         * cp-tree.h (THUNK_TARGET): New macro.
856         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
857         (finish_thunk): Remove offset parms.
858         * class.c (find_final_overrider): Look through thunks.
859         (get_vcall_index): Use THUNK_TARGET.
860         (update_vtable_entry_for_fn): Look through thunks. Set covariant
861         fixed offset here. Adjust finish_thunk call.
862         (build_vtbl_initializer): Adjust finish_thunk calls.
863         * mangle.c (mangle_call_offset): Remove superfluous if.
864         (mangle_thunk): Adjust.
865         * method.c (make_thunk): Adjust.
866         (finish_thunk): Adjust.
867         (thunk_adjust): Remove assert.
868         (use_thunk): Use THUNK_TARGET
869         * dump1.c (cp_dump_tree): Adjust thunk dumping.
870
871         PR c++/9054
872         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
873         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
874
875 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
876
877         Remove traditional C constructs 4/n.
878         * decl2.c (grok_method_quals, warn_if_unknown_interface,
879         grok_x_components, cp_build_parm_decl, build_artificial_parm,
880         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
881         delete_sanity, check_member_template, check_java_method,
882         check_classfn, finish_static_data_member_decl, grokfield,
883         grokbitfield, grokoptypename, grok_function_init,
884         cplus_decl_attributes, constructor_name, defer_fn,
885         build_anon_union_vars, finish_anon_union, coerce_new_type,
886         coerce_delete_type, comdat_linkage, maybe_make_one_only,
887         key_method, import_export_vtable, import_export_class,
888         output_vtable_inherit, import_export_decl, import_export_tinfo,
889         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
890         set_guard, start_objects, finish_objects,
891         start_static_storage_duration_function,
892         finish_static_storage_duration_function, get_priority_info,
893         start_static_initialization_or_destruction,
894         finish_static_initialization_or_destruction,
895         do_static_initialization, do_static_destruction,
896         prune_vars_needing_no_initialization, write_out_vars,
897         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
898         add_using_namespace, merge_functions, ambiguous_decl,
899         lookup_using_namespace, lookup_using_namespace,
900         qualified_lookup_using_namespace, set_decl_namespace,
901         decl_namespace, current_decl_namespace, push_decl_namespace,
902         pop_decl_namespace, push_scope, pop_scope, add_function,
903         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
904         lookup_arg_dependent, do_namespace_alias,
905         validate_nonmember_using_decl, do_nonmember_using_decl,
906         do_toplevel_using_decl, do_local_using_decl,
907         do_class_using_decl, do_using_directive, check_default_args,
908         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
909         * parser.c (cp_parser_class_head): Use booleanss.
910         * decl.c (walk_globals, walk_vtables): Likewise.
911         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
912         walk_globals): Change return type from 'int' to 'bool'.
913         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
914         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
915         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
916         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
917         qualifier_flags, tinfo_base_init, generic_initializer,
918         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
919         dfs_class_hint_unmark, class_hint_flags, class_initializer,
920         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
921         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
922         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
923         * repo.c (repo_compile_flags, repo_template_declared,
924         repo_template_defined, repo_class_defined, repo_get_id,
925         repo_template_used, repo_vtable_used, repo_inline_used,
926         repo_tinfo_used, repo_template_instantiated, extract_string,
927         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
928         finish_repo): Likewise.
929         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
930         cxx_print_xnode): Likewise..
931         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
932         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
933         * cxxfilt.c (demangle_it, print_demangler_list, usage,
934         standard_symbol_characters, hp_symbol_characters, main, fatal):
935         Likewise.
936         (strip_underscore):  Change type from 'int' to 'bool'.
937         (main): Use boolean constants.
938
939 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
940
941         Remove traditional C constructs 3/n.
942         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
943         build_up_reference, warn_ref_binding, convert_to_reference,
944         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
945         convert_to_void, convert, convert_force, build_type_conversion,
946         build_expr_type_conversion, type_promotes_to,
947         perform_qualification_conversions): Use C90 prototyping style.
948         * decl2.c (grok_array_decl): Use boolean constant.
949         (delete_sanity): Likewise.
950         * typeck.c (build_unary_op): Likewise.
951         * semantics.c (finish_switch_cond): Likewise.
952         * parser.c (cp_parser_direct_new_declarator): Likewise.
953         * init.c (build_new): Likewise.
954
955 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
956
957         * Make-lang.in (po-generated): Remove parse.c.
958         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
959         ($(srcdir)/cp/parse.h): Remove target.
960         ($(srcdir)/cp/parse.c): Likewise.
961         (gt-cp-parse.h): Likewise.
962         (gt-cp-parser.h): New target.
963         (c++.distclean): Do not remove parse.output.
964         (c++.maintainer-clean): Do not remove parse.c or parse.h.
965         (cp/spew.o): Remove target.
966         (cp/lex.o): Adjust dependencies.
967         (cp/pt.o): Likewise.
968         (cp/parse.o): Likewise.
969         (cp/TAGS): Do not mention parse.c.
970         (cp/parser.o): New target.
971         * NEWS: Mention the new parser.
972         * call.c (build_scoped_method_call): Simplify.
973         (build_method_call): Likewise.
974         (build_new_function_call): Adjust calls to add_function_candidate
975         and add_template_candidate.
976         (build_new_op): Improve handling of erroroneous operands.
977         (convert_default_arg): Remove circular argument processing.
978         (name_as_c_string): New function.
979         (build_new_method_call): Use it.
980         (perform_implicit_conversion): Use error_operand_p.
981         * class.c (finish_struct_anon): Use constructor_name_p.
982         (check_field_decls): Likewise.
983         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
984         (resolve_address_of_overloaded_function): Likewise.
985         (instantiate_type): Tweak pointer-to-member handling.
986         (get_primary_binfo): Remove incorrect assertion.
987         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
988         * cp-tree.h (DEFARG_TOKENS): New macro.
989         (default_arg): New structure.
990         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
991         (lang_tree_node): Add default_arg.
992         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
993         (type_info_ref_type): New macro.
994         (saved_scope): Make processing_explicit_instantiation a boolean.
995         (check_access): New field.
996         (unparsed_text): Remove.
997         (language_function): Remove unparsed_inlines.
998         (error_operand_p): New macro.
999         (lang_decl): Adjust pending_inline_info.
1000         (DEFARG_POINTER): Remove.
1001         (tag_types): Add typenames.
1002         (lookup_ualified_name): Declare.
1003         (lookup_name_real): Likewise.
1004         (shadow_tag): Adjust prototype.
1005         (get_scope_of_declarator): Declare it.
1006         (process_next_inline): Remove it.
1007         (check_for_missing_semicolon): Likewise.
1008         (maybe_get_template_decl_from_type_decl): Declare it.
1009         (finish_label_stmt): Adjust prototype.
1010         (finish_non_static_data_meber): Declare it.
1011         (finish_pseudo_destructor_call_expr): Rename to ...
1012         (finish_pseudo_destructor_expr): ... this.
1013         (finish_compound_literal): Declare it.
1014         (begin_inline_definitions): Remove it.
1015         (init_spew): Remove.
1016         (peekyylex): Likewise.
1017         (arbitrate_lookup): Likewise.
1018         (frob_opname): Likewise.
1019         (maybe_snarf_defarg): Likewise.
1020         (add_defarg_fn): Likewise.
1021         (do_pending_defargs): Likewise.
1022         (done_pending_defargs): Likewise.
1023         (unprocessed_defarg_fn): Likewise.
1024         (replace_defarg): Likewise.
1025         (end_input): Likewise.
1026         (get_overloaded_fn): Likewise.
1027         * cvt.c (convert_to_reference): Improve error handling.
1028         * decl.c (lookup_name_real): Do not declare it static.
1029         (maybe_push_to_top_level): Set check_access.
1030         (identifier_type_value): Adjust call to lookup_name_real.
1031         (lookup_qualified_name): New method.
1032         (lookup_name_real): Remove special-case parsing code.
1033         (lookup_name-nonclass): Adjust call to lookup_name_real.
1034         (lookup_name_namespace_only): Likewise.
1035         (lookup_name): Likewise.
1036         (check_tag_decl): Return the type declared.
1037         (shadow_tag): Likewise.
1038         (register_dtor_fn): Tweak check_access.
1039         (grokfndecl): Use constructor_name_p.
1040         (get_scope_of_declarator): New function.
1041         (grokdeclarator): Obscure tweaks for slightly different declarator
1042         representations.
1043         (start_method): Return error_mark_node to indicate failure.
1044         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
1045         * decl2.c (constructor_name_full): Simplify.
1046         (constructor_name): Use it.
1047         (build_expr_from_tree): Adjust for changes to do new parser.
1048         (push_scope): Improve robustness.
1049         (validate_nonmember_using_decl): Process declarations, not names.
1050         (do_class_using_decl): Likewise.
1051         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
1052         here.
1053         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
1054         * expr.c (cxx_expand_expr): Handle BASELINKs.
1055         * init.c (member_init_ok_or_else): Issue more errors.
1056         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
1057         * lex.c: Do not include parse.h.
1058         (yypring): Do not declare.
1059         (yylval): Likewise.
1060         (make_reference_declarator): Remove error-generating code.
1061         (rid_to_yy): Remove.
1062         (cxx_init): Do not call init_spew.
1063         (yypring): Remove.
1064         (check_for_missing_semicolon): Remove.
1065         * lex.h (got_scope): Remove.
1066         (got_object): Remove.
1067         * method.c (hack_identifier): Use finish_non_static_data_member.
1068         (implicitly_declare_fn): Adjust use of constructor_name.
1069         * parser.c: New file.
1070         * pt.c (parse.h): Do not include it.
1071         (maybe_get_template_decl_from_template): Do not declare it.
1072         (finish_member_template_decl): Tweak.
1073         (begin_explicit_instantiation): Adjust for
1074         processing_explicit_instantiation being boolean.
1075         (end_explicit_instantiation): Likewise.
1076         (maybe_process_partial_specialization): Tighten specialization
1077         test.
1078         (retrieve_local_specialization): Adjust ue of hash table.
1079         (eq_local_specializations): New function.
1080         (register_local_specialization): Likewise.
1081         (push_template_decl_real): Remove unnecessary test.
1082         (maybe_get_template_decl_from_type_decl): Don't make it static.
1083         (for_each_template_parm_r): Handle TYPEOF_TYPE.
1084         (tsubst_copy): Use retrieive_local_specialization to handle
1085         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
1086         Handle COMPONENT_REFs with pseudo-destructor-expressions.
1087         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
1088         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
1089         (unify): Tweak handling of CONST_DECLs.
1090         (regenerate_decl_from_template): Use push_nested_class.
1091         (template_for_substitution): New funciton.
1092         (instantiate_decl): Use it.  Register parameters as local
1093         specializations.
1094         * rtti.c (init_rtti_processing): Set type_info_ref_type.
1095         (build_typeid): Use it.
1096         (get_typeid): Likeise.
1097         * search.c (accessible_p): Use check_access, not
1098         flag_access_control.
1099         (adjust_result_of_qualified_name_lookup): Pay attention to the
1100         context_class.
1101         * semantics.c (finish_asm_stmt): Adjust error handling.
1102         (finish_label_stmt): Return the statement.
1103         (finish_non_static_data_member): New function.
1104         (finish_class_expr): Handle BASELINKs.
1105         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
1106         (finish_object_call_expr): Simplify handling during templates.
1107         (finish_pseudo_destructor_call_expr): Rename to ...
1108         (finish_pseudo_dtor_expr): ... this.
1109         (finish_compound_literal): New function.
1110         (begin_inline_definitions): Remove.
1111         (finish_sizeof): Remove special template handling.
1112         * spew.c: Do not include parse.h.
1113         * tree.c (get_overloaded_fn): Remove.
1114         * typeck.c (build_class_member_access_expr): Handle
1115         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
1116         (lookup_destructor): New function.
1117         (finish_class_member_access_expr): Use it.
1118         (convert_arguments): Simplify.
1119         (build_unary_op): Handle BASELINKs.
1120
1121 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
1122
1123         PR c++/4803
1124         * decl2.c (mark_used): Defer inline functions.
1125         (finish_file): Merge deferred_fns loops. Check all used
1126         inline functions have a definition.
1127         * method.c (make_thunk): Thunks are not inline.
1128
1129         PR c++/5116, c++/764
1130         * call.c (build_new_op): Make sure template class operands are
1131         instantiated.
1132
1133 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
1134
1135         PR C++/7964
1136         * cp-tree.h (resolve_scoped_fn_name): Prototype.
1137         * call.c (resolve_scoped_fn_name): New function. Deal with
1138         more template expansion. Broken out of ...
1139         * parse.y (parse_finish_call_expr): ... here. Call it.
1140         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
1141         resolve_scoped_fn_name and build_call_from_tree.
1142
1143         PR c++/9053
1144         * decl.c (duplicate_decls): Templates may be disambiguated by
1145         return type.
1146
1147         PR c++/8702
1148         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
1149         conversion operators on failure.
1150
1151 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1152
1153         Remove traditional C constructs 2/n.
1154         * call.c (tourney, build_field_call, equal_functions, joust,
1155         compare_ics, build_over_call, build_java_interface_fn_ref,
1156         convert_like_real, op_error, build_object_call, resolve_args,
1157         build_vfield_ref, check_dtor_name, build_scoped_method_call,
1158         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
1159         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
1160         standard_conversion, reference_related_p,
1161         reference_compatible_p, convert_class_to_reference,
1162         direct_reference_binding, reference_binding,
1163         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
1164         add_template_conv_candidate, any_viable, any_strictly_viable,
1165         build_this, splice_viable, print_z_candidates,
1166         build_user_type_conversion, build_new_function_call,
1167         conditional_conversion, build_conditional_expr, build_new_op,
1168         build_op_delete_call, enforce_access, call_builtin_trap,
1169         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
1170         convert_default_arg, type_passed_as, convert_for_arg_passing,
1171         in_charge_arg_for_name, is_properly_derived_from,
1172         maybe_handle_implicit_object, maybe_handle_ref_bind,
1173         source_type, add_warning, can_convert, can_convert_arg,
1174         perform_implicit_conversion, can_convert_arg_bad,
1175         initialize_reference, add_conv_candidate,
1176         add_template_candidate_real, add_template_candidate): Ansify.
1177
1178 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
1179
1180         PR c++/8572
1181         * cp-tree.h (grokoptypename): Add SCOPE parameter.
1182         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
1183         if in a template scope.
1184         * parse.y (unoperator): Return the scope.
1185         (operator_name): Adjust grokoptypename call.
1186
1187 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1188
1189         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
1190         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
1191         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
1192
1193 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
1194
1195         * ChangeLog: Fix a typo.
1196         * class.c: Fix comment typos.
1197         * cp-tree.h: Likewise.
1198
1199 2002-12-18  Jason Merrill  <jason@redhat.com>
1200
1201         Handle anonymous unions at the tree level.
1202         C++ ABI change: Mangle anonymous unions using the name of their
1203         first named field (by depth-first search).  Should not cause
1204         binary compatibility problems, though, as the compiler previously
1205         didn't emit anything for affected unions.
1206         * cp-tree.def (ALIAS_DECL): New tree code.
1207         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
1208         first field, not the largest.
1209         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
1210         push the decl, and write it out at namespace scope.
1211         * decl.c (lookup_name_real): See through an ALIAS_DECL.
1212         (pushdecl): Add namespace bindings for ALIAS_DECLs.
1213         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
1214         of a decl which doesn't have one.
1215         * typeck.c (build_class_member_access_expr): Don't recurse if
1216         we already have the type we want.
1217
1218 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1219
1220         PR c++/8099
1221         * friend.c (make_friend_class): Allow partial specialization
1222         when declaration is not a template friend.
1223
1224 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1225
1226         PR c++/3663
1227         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
1228         TREE_PROTECTED to created decl nodes.
1229
1230 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
1231
1232         * class.c (build_base_field): Do not set DECL_PACKED on the
1233         FIELD_DECL.
1234
1235 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1236
1237         * cp-tree.h (struct tree_srcloc): Use location_t.
1238         (SOURCE_LOCUS): New.
1239         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
1240
1241 2002-12-17  Jason Merrill  <jason@redhat.com>
1242
1243         * decl.c (finish_function): Also complain about no return in
1244         templates.
1245         * semantics.c (finish_return_stmt): Also call check_return_expr in
1246         templates.
1247         * typeck.c (check_return_expr): In a template, just remember that we
1248         saw a return.
1249
1250 2002-12-16  Jason Merrill  <jason@redhat.com>
1251
1252         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
1253         of the CALL_EXPR.
1254
1255         * semantics.c (do_pushlevel): Call pushlevel after adding the
1256         SCOPE_STMT.
1257         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
1258         * parse.y (function_body): Go back to using compstmt.
1259         * decl.c (pushdecl): Skip another level to get to the parms level.
1260
1261         * call.c (build_new_method_call): Use is_dummy_object to determine
1262         whether or not to evaluate the object parameter to a static member
1263         function.
1264
1265 2002-12-14  Jason Merrill  <jason@redhat.com>
1266
1267         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
1268         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
1269         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
1270         don't bother with an AGGR_INIT_EXPR.
1271         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
1272         just generate a new decl normally.  Take return slot parm.
1273         * cp-tree.h: Adjust prototype.
1274
1275 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1276
1277         PR C++/8031
1278         * cvt.c (convert_to_pointer_force): Don't try comparing against
1279         erronous type.
1280
1281 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
1282
1283         * cp-tree.h: Have the multiple-include guards around
1284         the entire file.
1285
1286 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
1287
1288         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
1289         for SPEW_DEBUG.
1290         (snarf_method): Same.
1291         (snarf_defarg): Same.
1292
1293 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
1294
1295         PR c++/8372
1296         * pt.c (tsubst_copy): Handle destructor names more correctly.
1297
1298 2002-12-10  Matt Austern   <austern@apple.com>
1299
1300         * cp-tree.h: get rid of needs_virtual_reinit bit.
1301
1302 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
1303
1304         * NEWS: Document removal of in-class initialization extension for
1305         static data members of non-arithmetic, non-enumeration type.
1306         * decl.c (check_static_variable_definition): Do not allow that
1307         extension.
1308         * decl2.c (grokfield): Do not call digest_init when processing
1309         templates.
1310
1311 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1312
1313         * error.c (dump_expr): Fix format specifier warning.
1314
1315 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
1316
1317         * class.c (finish_struct_1): Correct comment.
1318         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
1319
1320 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1321
1322         PR C++/8799
1323         * error.c (dump_expr): Don't ever try to dump a non-existent
1324         expression.
1325
1326 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
1327
1328         Implement covariant returns.
1329         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
1330         (struct lang_decl_flags): Add this_thunk_p flag.
1331         Rename vcall_offset to virtual_offset.
1332         (struct lang_decl): Rename delta to fixed_offset.
1333         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
1334         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
1335         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
1336         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
1337         (make_thunk): Add this_adjusting arg.
1338         (finish_thunk): Declare.
1339         (mangle_thunk): Add this_adjusting arg.
1340         * class.c (get_vcall_index): Use base function for lookup.
1341         (update_vtable_entry_for_fn): Generate covariant thunk.
1342         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
1343         (build_vtbl_initializer): Use base function for lookup.
1344         Finish covariant thunk here. Adjust thunk generation.
1345         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
1346         Adjust thunk dumping.
1347         * mangle.c (mangle_call_offset): New function.
1348         (mangle_thunk): Adjust for covariant thunks.
1349         * method.c (make_thunk): Adjust. Do not set name here.
1350         (finish_thunk): New function. Set name here.
1351         (use_thunk): Generate covariant thunks too.
1352         (thunk_adjust): New function.
1353         * search.c (covariant_return_p): Remove. Fold into ...
1354         (check_final_overrider): ... here. Simplify.
1355         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
1356
1357 2002-12-03  Jason Merrill  <jason@redhat.com>
1358
1359         PR c++/8674
1360         * call.c (build_over_call): Check specifically for TARGET_EXPR
1361         when eliding.
1362
1363         PR c++/8461, c++/8625
1364         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
1365         (cp_convert_parm_for_inlining): Remove.
1366         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
1367         Remove.
1368         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
1369         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
1370
1371         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
1372         an ambiguous conversion.
1373
1374 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
1375
1376         PR c++/8688
1377         * decl.c (reshape_init): Handle erroneous initializers.
1378
1379 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
1380
1381         PR c++/8720
1382         * spew.c (remove_last_token): Make sure that last_chunk is set
1383         correctly.
1384
1385         PR c++/8615
1386         * error.c (dump_expr): Handle character constants with
1387         TREE_OVERFLOW set.
1388
1389 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1390
1391         DR 180
1392         * decl.c (grokdeclarator): Require class-key for all friend class.
1393         Output the correct type and context in the error message.
1394
1395 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
1396
1397         PR c++/5919
1398         * pt.c (unify): Use variably_modified_type_p to test validity of
1399         template argument types.
1400
1401         PR c++/8727
1402         * cp-tree.h (lang_type_class): Add typeinfo_var.
1403         (CLASSTYPE_TYPEINFO_VAR): New macro.
1404         * rtti.c (get_tinfo_decl): Use it.
1405
1406         PR c++/8663
1407         * init.c (expand_member_init): Always get the main variant of a
1408         base class.
1409
1410 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
1411
1412         PR c++/8332
1413         PR c++/8493
1414         * decl.c (cxx_init_decl_processing): Use size_type_node, not
1415         c_size_type_node.
1416         * decl2.c (coerce_new_type): Likewise.
1417         * except.c (do_allocate_exception): Likewise.
1418
1419 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
1420
1421         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
1422         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
1423         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
1424         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
1425         typeck2.c: Include coretypes.h and tm.h.
1426         * Make-lang.in: Update dependencies.
1427
1428 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
1429
1430         PR c++/8227
1431         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
1432         (check_initializer): Validate the type of the initialized
1433         variable, even if the initializer is absent.
1434         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
1435
1436         PR c++/8214
1437         * typeck.c (convert_for_assignment): Do not use
1438         decl_constant_value on the operand.
1439
1440         PR c++/8511
1441         * pt.c (instantiate_decl): Handle template friends defined outside
1442         of the class correctly.
1443
1444 2002-11-29  Joe Buck <jbuck@synopsys.com>
1445
1446         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
1447         anonymous structs.
1448
1449 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
1450
1451         * class.c (walk_subobject_offsets): Recur on binfos as well as on
1452         types.
1453         (layout_nonempty_base_or_field): Pass it a binfo when processing a
1454         base class.
1455         (layout_empty_base): Likewise.
1456         (build_base_field): Likewise.
1457
1458 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
1459
1460         * class.c (build_base_field): Make sure we get the canonical base
1461         when descending through primary bases.
1462
1463 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
1464
1465         * decl.c (check_initializer): Don't error on initialisation of
1466         a scalar with a brace-enclosed expression.
1467
1468 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
1469
1470         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
1471         (template_parms_equal): Remove prototype.
1472         * typeck.c (buuld_indirect_ref): Reformat.
1473
1474 2002-11-25  Jason Merrill  <jason@redhat.com>
1475
1476         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
1477         and a DO_STMT.
1478
1479 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
1480
1481         * tree.c (cp_build_qualified_type_real): Correct handling of
1482         array types.
1483         * class.c (walk_subobject_offsets): Fix thinko.
1484         (build_base_field): Record offsets of empty bases in primary
1485         virtual bases.
1486         (layout_class_type): Record offsets of empty bases in fields.
1487
1488         * search.c (is_subobject_of_p_1): Fix thinko.
1489         (lookup_field_queue_p): Likewise.
1490
1491 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
1492
1493         * class.c (layout_class_type): Reuse tail padding when laying out
1494         virtual bases.
1495
1496 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
1497
1498         * rtti.c (qualifier_flags): Fix thinko.
1499
1500 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1501
1502         Remove traditional C constructs 1/n.
1503         * cp-tree.h (init_method, set_mangled_name_for_decl,
1504         build_opfncall, hack_identifier, make_thunk, use_thunk,
1505         synthesize_method, implicitly_declare_fn,
1506         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
1507         maybe_clone_body): Remove use of PARAMS.
1508
1509         * method.c (do_build_assign_ref, do_build_copy_constructor,
1510         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
1511         Likewise.
1512         (synthesize_method): Use 'bool' type and constants instead of
1513         'int'.
1514         (locate_copy): Likewise.
1515         (implicitly_declare_fn): Likewise.
1516
1517         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
1518         Remove old-style declaration.
1519         (maybe_clone_body): Use 'bool' type and constants.
1520
1521 2002-11-21  Glen Nakamura  <glen@imodulo.com>
1522
1523         PR c++/8342
1524         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
1525         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
1526         of the branches of a COND_EXPR.
1527
1528 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
1529
1530         * pt.c (for_each_template_parm): Free allocated memory.
1531         * search.c (is_subobject_of_p_1): New function.
1532         (is_subobject_of_p): Avoid walking virtual bases multiple times.
1533
1534 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
1535
1536         * g++spec.c (lang_specific_spec_functions): New.
1537
1538 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
1539
1540         * ChangeLog: Follow spelling conventions.
1541         * class.c: Likewise.
1542         * decl2.c: Likewise.
1543
1544 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
1545
1546         * search.c (dfs_push_decls): Do not try to reorder elements
1547         3..n of method_vec if method_vec has only two elements.
1548         Reverse order of two tests to avoid accessing unallocated
1549         memory.
1550
1551 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
1552
1553         * class.c (dfs_find_final_overrider): Adjust so that the most
1554         derived object is a binfo, rather than a class type.
1555         (find_final_overrider): Likewise.
1556         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
1557         (add_vcall_offset): Likewise.
1558
1559 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1560
1561         PR c++/8389
1562         * pt.c (instantiate_template): Push class scope for member
1563         functions.
1564         (get_mostly_instantiated_function_type): Likewise.  Don't call
1565         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
1566         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
1567         * mangle.c (write_encoding, write_unqualified_name): Adjust.
1568
1569 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
1570
1571         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
1572         vcall offfsets.  Split out ...
1573         (add_vcall_offset): ... new function.
1574
1575         PR c++/8338
1576         * pt.c (for_each_template_parm): Add htab parameter.
1577         (process_partial_specialization): Adjust call.
1578         (push_template_decl_real): Likewise.
1579         (pair_fn_data): Add visited.
1580         (for_each_template_parm_r): Avoid walking duplicates more than
1581         once.
1582         (uses_template_parms): Adjust call to for_each_template_parm.
1583
1584 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
1585
1586         * class.c (add_implicitly_declared_members): Put implicitly
1587         declared functions at the end of TYPE_METHODs when -fabi-version
1588         is at least 2.
1589
1590 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
1591
1592         * decl2.c (finish_file): Correct spelling.
1593
1594 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
1595
1596         * call.c (build_special_member_call): Do not try to lookup VTTs by
1597         name.
1598         * class.c (vtbl_init_data): Add generate_vcall_entries.
1599         (get_vtable_decl): Do not look up virtual tables by name.
1600         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
1601         (set_primary_base): Do not set CLASSTYPE_RTTI.
1602         (determine_primary_base): Likewise.
1603         (get_matching_virtual): Remove.
1604         (get_vcall_index): New function.
1605         (update_vtable_entry_for_fn): Do not try to use virtual thunks
1606         when they are not required.  Assign vcall indices at this point.
1607         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
1608         Do update dynamic_classes.
1609         (build_vtt): Do not add VTTs to the symbol table.
1610         (build_ctor_vtbl_group): Likewise.
1611         (build_vtbl_initializer): Simplify handling of vcall indices.
1612         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
1613         for the most derived class.
1614         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
1615         the vtable.
1616         * cp-tree.h (dynamic_classes): New macro.
1617         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
1618         (CLASSTYPE_RTTI): Remove.
1619         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
1620         (CLASSTYPE_VCALL_INDICES): New macro.
1621         (CLASSTYPE_VTABLES): Likewise.
1622         (BV_USE_VCALL_INDEX_P): Remove.
1623         (build_vtable_path): Remove.
1624         * decl2.c (finish_vtable_vardecl): Remove.
1625         (key_method): Remove #if 0'd code.
1626         (finish_vtable_vardecl): Rename to ...
1627         (maybe_emit_vtables): ... this.
1628         (finish_file): Use it.
1629         * search.c (look_for_overrides_here): Update comment.
1630
1631 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
1632
1633         PR c/7353 redux
1634         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
1635
1636 2002-10-30  Jason Merrill  <jason@redhat.com>
1637
1638         PR c++/8186
1639         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
1640         * call.c (convert_for_arg_passing): Set it.
1641         * except.c (stabilize_throw_expr): Recurse for such an arg.
1642
1643 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
1644
1645         * cp-tree.h (lang_decl_flags): Remove init_priority.
1646         (lang_decl): Add delta.
1647         (GLOBAL_INIT_PRIORITY): Remove.
1648         (THUNK_DELTA): Revise definition.
1649         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
1650         * dump.c (cp_dump_tree): Don't dump it.
1651
1652 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
1653
1654         PR c++/8160
1655         * typeck2.c (process_init_constructor): Call complete_array_type.
1656
1657         PR c++/8149
1658         * decl.c (make_typename_type): Issue errors about invalid results.
1659
1660 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1661
1662         Core issue 287, PR c++/7639
1663         * cp-tree.h (lang_type_class): Add decl_list field.
1664         (CLASSTYPE_DECL_LIST): New macro.
1665         (maybe_add_class_template_decl_list): Add declaration.
1666         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
1667         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
1668         (maybe_add_class_template_decl_list): New function.
1669         (add_implicitly_declared_members): Use it.
1670         * decl.c (maybe_process_template_type_declaration): Likewise.
1671         (pushtag): Likewise.
1672         * friend.c (add_friend): Likewise.
1673         (make_friend_class): Likewise.
1674         * semantics.c (finish_member_declaration): Likewise.
1675         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
1676         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
1677         to process members and friends in the order of declaration.
1678
1679 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
1680
1681         PR c++/8287
1682         * decl.c (finish_destructor_body): Create the label to jump to
1683         when returning from a destructor here.
1684         (finish_function_body): Rather than here.
1685
1686 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
1687
1688         PR c++/7266
1689         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
1690         SCOPE_REF is not null before dereferencing it.
1691
1692 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
1693
1694         * call.c (build_over_call): Use DECL_CONTEXT, not
1695         DECL_VIRTUAL_CONTEXT.
1696         * class.c (modify_vtable_entry): Don't mess with
1697         DECL_VIRTUAL_CONTEXT.
1698         (set_vindex): Remove.
1699         (set_primary_base): Remove vfuns_p parameter.
1700         (determine_primary_base): Likewise.
1701         (modify_all_vtables): Likewise.
1702         (layout_class_type): Likewise.  Adjust calls to other functions
1703         accordingly.
1704         (finish_struct_1): Adjust calls to modified functions.  Set
1705         DECL_VINDEX here.
1706         * cp-tree.h (lang_type_class): Remove vsize.
1707         (CLASSTYPE_VSIZE): Remove.
1708         (lang_decl): Remove thunks.
1709         (DECL_THUNKS): Adjust.
1710         (DECL_VIRTUAL_CONTEXT): Remove.
1711         (duplicate_decls): Don't copy it.
1712         * pt.c (build_template_decl): Don't set it.
1713         (tsubst_decl): Likewise.
1714         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
1715
1716         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
1717         (build_vtable_entry): Remove.
1718         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
1719         (lang_decl): Add thunks.
1720         (DECL_THUNKS): New macro.
1721         * decl.c (duplicate_decls): Copy it.
1722         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
1723         * semantics.c (emit_associated_thunks): Simplify.
1724
1725 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
1726
1727         PR c++/7228
1728         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
1729         lang_type structure exists before accessing field.
1730         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
1731         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
1732         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
1733         * class.c (check_field_decls): Use new macros.
1734         * typeck2.c (process_init_constructor): Remove redundant check for
1735         existence of lang_type structure.
1736
1737 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
1738
1739         * class.c (end_of_base): New method.
1740         (end_of_class): Use it.  Check indirect virtual bases.
1741
1742         * class.c (check_field_decls): Fix typo.
1743
1744 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
1745
1746         PR c++/8067
1747         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
1748         related variables.
1749
1750         PR c++/7679
1751         * spew.c (next_token): Do not return an endless stream of
1752         END_OF_SAVED_INPUT tokens.
1753         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
1754         the cached token stream.
1755         (snarf_defarg): Likewise.
1756
1757 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
1758
1759         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
1760         variably_modified_type_p.
1761         * cp-tree.h: Remove prototype of variably_modified_type_p.
1762         * tree.c (variably_modified_type_p): Remove; now implemented
1763         in language-independent code.
1764
1765 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
1766
1767         PR c++/6579
1768         * spew.c (snarf_parenthesized_expression): New function.
1769         (snarf_block): Use it.
1770
1771 2002-10-22  Richard Henderson  <rth@redhat.com>
1772
1773         * method.c (use_thunk): Always compute vcall_value; assert that
1774         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
1775         for vcall thunks as well.
1776
1777 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
1778
1779         * class.c (empty_base_at_nonzero_offset_p): New function.
1780         (layout_nonempty_base_or_field): Do not check for conflicts when
1781         laying out a virtual base using the GCC 3.2 ABI.
1782         (build_base_field): Correct checking for presence of empty classes
1783         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
1784
1785         * class.c (include_empty_classes): Use normalize_rli.
1786         (layout_class_type): Likewise.
1787
1788         * decl.c (reshape_init): Tweak handling of character arrays.
1789
1790         PR c++/8218
1791         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
1792         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
1793         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
1794         (check_field_decls): Likewise.
1795         (layout_class_type): Likewise.
1796         (finish_struct_1): Initialize it.
1797         (walk_subobject_offsets): Use it to prune searches.
1798
1799 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
1800
1801         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
1802         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
1803         TARGET_ASM_OUTPUT_MI_THUNK in comments.
1804
1805 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
1806
1807         * decl.c (start_decl): Point users of the old initialized-
1808         typedef extension at __typeof__.
1809
1810 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
1811
1812         * Make-lang.in (method.o): Depend on TARGET_H.
1813         * method.c (target.h): Include it.
1814         (use_thunk): Use target hooks.  Use vcall thunks, if available.
1815
1816 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
1817
1818         * class.c (base_derived_from): Make sure return value is a bool.
1819
1820 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
1821
1822         * class.c (find_final_overrider_data_s): Remove overriding_fn and
1823         overriding_base.
1824         (dfs_base_derived_from): New function.
1825         (base_derived_from): Likewise.
1826         (dfs_find_final_overrider): Use base_derived_from.
1827         (find_final_overrider): Adjust.
1828
1829 2002-10-18  Jason Merrill  <jason@redhat.com>
1830
1831         PR c++/8080
1832         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
1833         with condition decls in a template.
1834
1835 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
1836
1837         * class.c (add_method): Compare template parms too.
1838
1839 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
1840
1841         PR c++/7584
1842         * class.c (handle_using_decl): Allow the declaration used to be
1843         from an ambiguous base.
1844
1845         * pt.c (convert_template_argument): Revert this change:
1846                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
1847                 * pt.c (convert_template_argument): Do not fold non-type
1848                 template rguments when inside a template.
1849
1850         * init.c (expand_default_init): Handle brace-enclosed initializers
1851         correctly.
1852
1853 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
1854
1855         * mangle.c (write_expression): Correct handling of enumeration
1856         constants.
1857         (write_template_arg): Likewise.
1858         * pt.c (convert_template_argument): Do not fold non-type template
1859         arguments when inside a template.
1860
1861         PR c++/7478
1862         * cvt.c (convert_to_reference): Allow references as the incoming
1863         type.
1864
1865 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
1866
1867         PR c++/7524
1868         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
1869         build_qualified_type.
1870
1871 2002-10-15  Richard Henderson  <rth@redhat.com>
1872
1873         * error.c (dump_expr): Use real_to_decimal directly, and with
1874         the new arguments.
1875
1876 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
1877
1878         * decl.c (reshape_init): Fix typo.
1879
1880         * cp-tree.h (operator_name_info_t): Add arity.
1881         * lex.c (init_operators): Initialize it.
1882         * mangle.c (write_conversion_operator_name): New function.
1883         (write_unqualified_name): Use it.
1884         (write_template_args): Accept template arguments as a TREE_LIST.
1885         (write_expression): Adjust handling of qualified names to match
1886         specification.
1887
1888 2002-10-15  Jason Merrill  <jason@redhat.com>
1889
1890         * call.c (call_builtin_trap): New fn.
1891         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
1892         (build_call): Don't set current_function_returns_abnormally outside
1893         a function.
1894
1895 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
1896
1897         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
1898         clear CLASSTYPE_EMPTY_P.
1899         (build_base_field): Likewise.
1900         (build_base_fields): Likewise.
1901         (check_bases_and_members): Likewise.
1902         (create_vtbl_ptr): Likewise.
1903         (layout_class_type): Likewise.  Ensure that empty classes have
1904         size zero when used as base classes in the 3.2 ABI.
1905         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
1906         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
1907         parameter.
1908         (is_empty_class): Correct definition when using post-3.2 ABI.
1909         * cp-tree.h (lang_type_class): Add empty_p.
1910         (CLASSTYPE_EMPTY_P): New macro.
1911
1912 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
1913
1914         * init.c (build_delete): Do not apply save_expr for arrays.
1915         (build_vec_delete): Likewise.
1916
1917 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
1918
1919         * decl.c (layout_var_decl): Call layout_decl even for variables
1920         whose type is an array with unspecified bounds.
1921
1922         PR c++/7176
1923         * lex.c (do_identifier): Add another option for the parsing
1924         parameter.
1925         * parse.y (do_id): Use it.
1926
1927 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1928
1929         PRs C++/6803, C++/7721 and C++/7803
1930         * decl.c (grokdeclarator): Gracefully handle template-name as
1931         decl-specifier.
1932
1933 2002-10-11  Jason Molenda  <jmolenda@apple.com>
1934
1935         * init.c (build_field_list): Provide uses_unions_p with a default
1936         value.
1937
1938 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
1939
1940         PR c++/5661
1941         * cp-tree.h (variably_modified_type_p): New function.
1942         (grokdeclarator) Tighten check for variably modified types as
1943         fields.
1944         * pt.c (convert_template_argument): Do not allow variably modified
1945         types as template arguments.
1946         * tree.c (variably_modified_type_p): New function.
1947
1948         * NEWS: Document removal of "new X = ..." extension.
1949         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
1950         brace-enclosed initializers.
1951         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
1952         (initialize_local_var): Remove declaration.
1953         (expand_static_init): Likewise.
1954         * decl.c (next_initializable_field): New function.
1955         (reshape_init): Likewise.
1956         (check_initializer): Use them.  Build dynamic initializer for
1957         aggregates here too.
1958         (initialize_local_var): Simplify, and incorporate cleanup
1959         insertion code as well.
1960         (destroy_local_var): Remove.
1961         (cp_finish_decl): Tidy.
1962         (expand_static_init): Fold checks for whether or not a variable
1963         needs initialization into this function.  Simplify.
1964         * decl2.c (do_static_initialization): Simplify.
1965         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
1966         be done for us automatically.
1967         (expand_default_init): Handle brace-enclosed initializers
1968         correctly.
1969         (expand_aggr_init_1): Remove RTL-generation code.
1970         (build_vec_init): Remove "new X = ..." support.
1971         * parse.y (new_initializer): Likewise.
1972         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
1973         brace-enclosed initializer.
1974         (create_pseudo_type_info): Likewise.
1975         * typeck2.c (store_init_value): Don't try to handle digest_init
1976         being called more than once.
1977         (digest_init): Tidy handling of brace-enclosed initializers.
1978
1979 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1980
1981         * decl.c (typename_hash): Use htab_hash_pointer.
1982
1983 2002-10-10  Jim Wilson  <wilson@redhat.com>
1984
1985         * decl.c (duplicate_decls): Don't call decl_attributes.
1986
1987 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
1988
1989         PR c/7353
1990         * decl.c (start_decl): Unconditionally issue error for
1991         'typedef foo = bar'.
1992         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
1993         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
1994
1995 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1996
1997         * decl2.c (prune_vtable_vardecl): Delete unused function.
1998
1999 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
2000
2001         PR c++/7754
2002         * decl2.c (finish_anon_union): Do not expand anonymous unions when
2003         procesing template functions.
2004         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
2005         type. Call layout_decl.
2006         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
2007
2008 2002-10-07  Richard Henderson  <rth@redhat.com>
2009
2010         * decl2.c, pt.c: Revert c++/7754 fix.
2011
2012 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2013
2014         PR c++/7804
2015         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
2016
2017 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
2018
2019         PR c++/7931
2020         * pt.c (for_each_template_parm_r): Handle BASELINKs.
2021
2022         PR c++/7754
2023         * decl2.c (finish_anon_union): Do not expand anonymous unions when
2024         procesing template functions.
2025         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
2026         type. Call layout_decl.
2027         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
2028
2029 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
2030
2031         PR c++/8006
2032         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
2033         template parameters.
2034         (globals): Add entity and need_abi_warning.
2035         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
2036         CLASSTYPE_TEMPLATE_INFO.
2037         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
2038         TYPE_TI_TEMPLATE.
2039         (write_prefix): Handle typename types correctly.
2040         (write_template_prefix): Handle template template parameters
2041         correctly.
2042         (start_mangling): Add entity parameter.
2043         (finish_mangling): Warn about names whose mangling will change.
2044         (mangle_decl_string): Adjust.
2045         (mangle_type_string): Likewise.
2046         (mangle_special_for_type): Likewise.
2047         (mangle_ctor_vtbl_for_type): Likewise.
2048         (mangle_thunk): Likewise.
2049         (mangle_guard_variable): Likewise.
2050         (mangle_ref_init_variable): Likewise.
2051
2052 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
2053
2054         PR c++/7188.
2055         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
2056         * cp-tree.h (emit_base_init): Rename to ....
2057         (emit_mem_initializers): ... this.
2058         (expand_member_init): Change prototype.
2059         * init.c (perform_member_init): Compute explicit, rather than
2060         requiring it as a parameter.
2061         (sort_member_init): Rename to ...
2062         (sort_mem_initializers): ... this.  Process bases and data members
2063         together.
2064         (sort_base_init): Remove.
2065         (emit_base_init): Rename to ...
2066         (emit_mem_initializers): ... this.
2067         (expand_aggr_vbase_init_1): Remove.
2068         (construct_virtual_bases): Rename to ...
2069         (construct_virtual_base): ... this.
2070         (expand_member_init): Rework handling of base initializers.
2071         * method.c (do_build_copy_constructor): Use
2072         finish_mem_initializers.
2073         * parse.y (member_init): Adjust calls to expand_member_init.
2074         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
2075         (tsubst_initializer_list): Use expand_member_init.
2076         * semantics.c (finish_mem_intiailizers): Simplify.
2077
2078 2002-10-02  Matt Austern  <austern@apple.com>
2079         * decl.c (walk_vtables_r): Fixed typo that caused result to
2080         never get a nonzero value.
2081
2082 2002-10-02  Roger Sayle  <roger@eyesopen.com>
2083
2084         PR optimization/6627
2085         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
2086         from here, and move it to tree.h.
2087         * decl.c (cxx_init_decl_processing): If storing the vbit
2088         in function pointers, ensure that force_align_functions_log
2089         is atleast one.
2090
2091 2002-10-02  Matt Austern  <austern@apple.com>
2092
2093         * class.c (check_field_decls): Changed warning about const member
2094         variables so that it doesn't get issued for a class aggregate.
2095
2096 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
2097
2098         * decl.c (cp_finish_decl): Make sure array types are laid out,
2099         even if the array bounds are unknown.
2100
2101 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
2102
2103         * class.c (build_vtbl_initializer): Change build_c_cast
2104         to build1.
2105
2106 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
2107
2108         * decl.c (cp_finish_decl): Make sure array types are laid out,
2109         even if the array bounds are unknown.
2110
2111         * decl.c (cp_finish_decl): Correct check for dynamic
2112         initialization of thread-local storage.
2113
2114 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
2115
2116         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
2117         overloaded.
2118
2119 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
2120
2121         * class.c (build_vtbl_initializer): Add cast.
2122         (add_vcall_offset_vtbl_entries_1):
2123         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
2124
2125 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
2126
2127         * class.c (walk_subobject_offsets): Correct the calculation of
2128         offsets for virtual bases.  Correct the counting of array
2129         elements.
2130         (layout_nonempty_base_or_field): Simplify.  Correct the
2131         calculation of offsets to be propagated through the binfo
2132         hierarchy.
2133         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
2134         Add the FIELD_DECL to TYPE_FIELDS.
2135         (build_base_fields): Adjust accordingly.
2136         (layout_virtual_bases): Use build_base_field.
2137         (end_of_class): Return a tree, not an integer.
2138         (warn_about_ambiguous_direct_bases): Rename to ...
2139         (warn_about_ambiguous_bases): ... this.
2140         (include_empty_classes): New function.
2141         (layout_class_type): Create an alternative version of the type to
2142         be used when as a base class type.  Do not call
2143         finish_record_layout until we are done laying out the class.
2144         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
2145         as_base.
2146         (CLASSTYPE_SIZE): Reimplement.
2147         (CLASSTYPE_SIZE_UNIT): Likewise.
2148         (CLASSTYPE_ALIGN): Likweise.
2149         (CLASSTYPE_USER_ALIGN): Likewise.
2150         (CLASSTYPE_AS_BASE): New macro.
2151         (DECL_INITIALIZED_P): Likewise.
2152         (extract_init): Remove prototype.
2153         (build_forced_zero_init): Rename to ...
2154         (build_zero_init): ... this.
2155         (force_store_init_value): Remove.
2156         * decl.c (obscure_complex_init): Remove.
2157         (duplicate_decls): Copy DECL_INITIALIZED_P.
2158         (check_initializer): Do not leave junk in DECL_INITIAL.
2159         (cp_finish_decl): Handle zero-initialization of entities with
2160         static storage duration.
2161         * expr.c (extract_init): Remove.
2162         * init.c (build_forced_zero_init): Remove.
2163         (build_zero_init): New function.
2164         (build_default_init): Use it.
2165         (build_field_list): Skip FIELD_DECLs for base subobjects.
2166         (push_base_cleanups): Likewise.
2167         * method.c (do_build_assign_ref): Likewise.
2168         (synthesize_exception_spec): Likewise.
2169         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
2170         (regenerate_decl_from_template): To not set DECL_INITIAL for a
2171         static data member whose initialization took place in its class.
2172         (instantiate_decl): Do not pass an initializer to cp_finish_decl
2173         in that situation.
2174         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
2175         (dfs_unuse_fields): Likewise.
2176         * tree.c (pod_type_p): Handle error_mark_node.
2177         (zero_init_p): Likewise.
2178         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
2179         subobjects.
2180         * typeck2.c (store_init_value): Remove #if 0'd code.
2181         (force_store_init_value): Remove.
2182         (process_init_constructor): Use build_zero_init.
2183
2184 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
2185
2186         PR c++/7788
2187         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
2188
2189 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
2190
2191         * cp-tree.h: Fix comment typos.
2192         * decl.c: Likewise.
2193         * pt.c: Likewise.
2194
2195 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
2196
2197         * cp/class.c (contains_empty_class_p): New method.
2198         (walk_subobject_offsets): Correct computation of field offset.
2199         (layout_empty_base): Correct placement of emtpy base classes.
2200         (layout_class_type): Warn about ABI changes.
2201
2202 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
2203
2204         * cp/class.c (layout_virtual_bases): Do not round the size of the
2205         type to a multiple of the alignment before laying out virtual bases.
2206         (layout_class_type): Correct handling of bit-fields that are wider
2207         than their type inside unions.  Round the size of the type to a
2208         even number of bytes when computing the size without virtual
2209         bases.
2210         * cp/cp-tree.h (abi_version_at_least): New macro.
2211
2212 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
2213
2214         * ChangeLog: Follow spelling conventions.
2215         * ChangeLog.2: Likewise.
2216         * call.c: Likewise.
2217         * class.c: Likewise.
2218         * cp-tree.h: Likewise.
2219         * cvt.c: Likewise.
2220         * decl.c: Likewise.
2221         * decl2.c: Likewise.
2222         * except.c: Likewise.
2223         * friend.c: Likewise.
2224         * g++spec.c: Likewise.
2225         * init.c: Likewise.
2226         * lex.c: Likewise.
2227         * mangle.c: Likewise.
2228         * method.c: Likewise.
2229         * operators.def: Likewise.
2230         * optimize.c: Likewise.
2231         * pt.c: Likewise.
2232         * rtti.c: Likewise.
2233         * search.c: Likewise.
2234         * semantics.c: Likewise.
2235         * spew.c: Likewise.
2236         * tree.c: Likewise.
2237         * typeck.c: Likewise.
2238
2239 2002-09-18  Devang Patel  <dpatel@apple.com>
2240
2241         * cp/cp-tree.h: New prototype for walk_vtabls().
2242         * cp/decl.c (walk_vtables_r): New function.
2243         (struct cp_binding_level): Add new members, namespaces,
2244         names_size and vtables.
2245         (add_decl_to_level): Add decl in namespaces or vtables
2246         chain, if conditions match.
2247         (walk_vtables): New function.
2248         (walk_namespaces_r): Travers separate namespace chain
2249         for namespace decls.
2250         (wrapup_globals_for_namespace): Use names_size instead
2251         of list_length().
2252         * cp/decl2.c (finish_file): Use walk_vtables() instead of
2253         walk_globals() to walk vtable decls.
2254
2255 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
2256
2257         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
2258         ICE with invalid pointers & references.
2259
2260 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
2261
2262         * Make-lang.in: Remove all references to the demangler.
2263         * cxxfilt.c: Moved to binutils.
2264
2265 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
2266
2267         PR c++/7718
2268         * pt.c (tsubst_decl): Remove assert.
2269
2270         Remove DR 295 implementation.
2271         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
2272         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
2273         about ignoring volatile qualifiers.
2274
2275         * search.c (lookup_member): Correct documentation.
2276
2277 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
2278
2279         * cp-tree.h (union lang_tree_node): Add chain_next option.
2280
2281 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
2282
2283         * parse.y (parse_finish_call_expr): Check lookup_member result.
2284
2285         PR c++/7015
2286         * semantic.c (finish_asm_stmt): Fix operand/output_operands
2287         thinko.
2288         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
2289
2290 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
2291
2292         PR c++/7919
2293         * call.c (build_over_call): Convert this pointer for fns found by
2294         using decls.
2295
2296 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
2297
2298         * ChangeLog: Follow spelling conventions.
2299         * ChangeLog.1: Likewise.
2300
2301 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
2302
2303         PR c++/7768
2304         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
2305
2306 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
2307
2308         * error.c: Fix comment formatting.
2309         * except.c: Likewise.
2310         * expr.c: Likewise.
2311         * friend.c: Likewise.
2312         * g++spec.c: Likewise.
2313         * init.c: Likewise.
2314         * lex.c: Likewise.
2315         * mangle.c: Likewise.
2316         * method.c: Likewise.
2317         * optimize.c: Likewise.
2318         * pt.c: Likewise.
2319         * rtti.c: Likewise.
2320         * search.c: Likewise.
2321         * semantics.c: Likewise.
2322         * spew.c: Likewise.
2323         * tree.c: Likewise.
2324         * typeck.c: Likewise.
2325         * typeck2.c: Likewise.
2326
2327 2002-09-13  Matt Austern  <austern@apple.com>
2328
2329         PR C++/7828
2330         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
2331         * cp/call.c: Change call-by-const-reference mechanism to use
2332         non_cast_lvalue_p when deciding whether the create a temporary.
2333         We need a temporary when passing, e.g. (long) x by const ref.
2334
2335 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
2336
2337         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
2338
2339 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
2340
2341         * decl.c: Fix comment formatting.
2342         * decl2.c: Likewise.
2343
2344 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
2345
2346         * call.c: Fix comment formatting.
2347         * class.c: Likewise.
2348         * cp-lang.c: Likewise.
2349         * cp-tree.h: Likewise.
2350         * cvt.c: Likewise.
2351
2352 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
2353
2354         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
2355         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
2356         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
2357         minor adjustments (use version_string, eliminate yet another
2358         duplicate of xmalloc)
2359
2360 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2361
2362         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
2363
2364 2002-09-05  Jason Merrill  <jason@redhat.com>
2365
2366         * typeck2.c (add_exception_specifier): Only pedwarn for an
2367         incomplete type.
2368         (require_complete_eh_spec_types): New fn.
2369         (cxx_incomplete_type_diagnostic): Also support pedwarning.
2370         * typeck.c (complete_type_or_diagnostic): Likewise.
2371         * call.c (build_call): Call require_complete_eh_spec_types.
2372         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
2373         on an incomplete type.
2374
2375 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
2376
2377         * decl.c (start_cleanup_fn): Clear interface_only before
2378         start_function, restore it afterwards.
2379
2380 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
2381
2382         * cp-tree.h (finish_builtin_type): Remove.
2383         * decl2.c (finish_builtin_type): Move to common code.
2384         * decl.c (build_ptrmemfunc_type): Adjust.
2385         * rtti.c (create_pseudo_type_info): Adjust.
2386         (create_tinfo_types): Adjust.
2387
2388 2002-08-31  Jason Merrill  <jason@redhat.com>
2389
2390         * cp-lang.c (cp_expr_size): Allow initialization from a
2391         CONSTRUCTOR.
2392
2393 2002-08-30  Richard Henderson  <rth@redhat.com>
2394
2395         PR opt/7515
2396         * tree.c: Include target.h.
2397         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
2398         don't bind locally.
2399         * Makefile.in (tree.o): Update.
2400
2401 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
2402
2403         * class.c (layout_virtual_bases): Warn about bugs in G++ that
2404         result in incorrect object layouts.
2405         (layout_class_type): Likewise.
2406
2407 2002-08-24  Matt Austern  <austern@apple.com>
2408
2409         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
2410         are allowable.
2411         (real_lvalue_p): Update caller.
2412         (lvalue_p): Ditto.
2413         (non_cast_lvalue_or_else): New.
2414         * tree.h: Declare it.
2415         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
2416
2417 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
2418
2419         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
2420         and COND_EXPR specially; fix error message output.
2421
2422 2002-08-22  Jason Merrill  <jason@redhat.com>
2423
2424         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
2425         * semantics.c (nullify_returns_r): Likewise.
2426
2427 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2428
2429         Fix PR/7621
2430         * typeck.c (finish_class_member_access_expr): Diagnose cases where
2431         name lookup finds nothing.
2432
2433 2002-08-15  Jason Merrill  <jason@redhat.com>
2434
2435         * semantics.c (finish_then_clause): Remove redundant assignment.
2436         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
2437         extra binding level outside the if/switch statement.
2438         (finish_while_cond, finish_for_cond): Rewrite complex condition
2439         into the loop body.
2440
2441 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
2442
2443         * parse.y (sizeof, alignof, typeof): New non-terminals to
2444         increment skip_evaluation.  Replace terminals with them and
2445         decrement skip_evaluation at the end of rules using them.
2446         * decl2.c (mark_used): Don't assemble_external if
2447         skipping evaluation.
2448
2449 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
2450
2451         Fix PR/7504
2452         * parse.y (parse_finish_call_expr): Handle incomplete
2453         type used to name a scope.
2454
2455 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
2456
2457         PR c++/7598
2458         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
2459         regression caused by my 2002-08-08 patch.
2460
2461 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
2462
2463         * decl.c (pushdecl_class_level): Honor requests to bind names to
2464         OVERLOADs.
2465
2466 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2467
2468         * decl2.c (build_call_from_tree): Fix uninitialized variable.
2469         * parse.y (parse_finish_call_expr): Likewise.
2470         * repo.c (old_args, old_dir, old_main): Const-ify.
2471
2472 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
2473
2474         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
2475         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
2476         * optimize.c (maybe_clone_body): Likewise.
2477         * pt.c (tsubst_enum): Likewise.
2478         (lookup_template_class): Likewise.
2479         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
2480
2481 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
2482
2483         * lang-specs.h: Remove -ansi.
2484
2485 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
2486
2487         * tree.c (maybe_dummy_object): Replace // with /* */
2488
2489 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
2490
2491         * call.c (standard_conversion): Use build_ptrmem_type.
2492         * cp-tree.h (build_ptrmem_type): New function.
2493         (adjust_result_of_qualified_name_lookup): Likewise.
2494         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
2495         static data members.
2496         (build_ptrmem_type): New function.
2497         (grokdeclarator): Do not use build_offset_type when encountering a
2498         qualified name.
2499         * parse.y (parse_finish_call_expr): Use
2500         adjust_result_of_qualified_name_lookup.
2501         * search.c (adjust_result_of_qualified_name_lookup): New function.
2502         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
2503         accessing OFFSET_TYPEs directly.
2504
2505 2002-08-08  Mike Stump  <mrs@apple.com>
2506
2507         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
2508         (type_decays_to): Likewise.
2509         * class.c (find_final_overrider): Likewise.
2510         (maybe_note_name_used_in_class): Likewise.
2511         * decl.c (current_tmpl_spec_kind): Likewise.
2512         (add_binding): Likewise.
2513         (push_class_binding): Likewise.
2514         (duplicate_decls): Likewise.
2515         (layout_var_decl): Likewise.
2516         (grokfndecl): Likewise.
2517         (grokdeclarator): Likewise.
2518         (check_default_argument): Likewise.
2519         * decl2.c (handle_class_head): Likewise.
2520         * error.c (dump_template_decl): Likewise.
2521         * init.c (build_offset_ref): Likewise.
2522         * pt.c (check_specialization_scope): Likewise.
2523         (determine_specialization): Likewise.
2524         (check_explicit_specialization): Likewise.
2525         (maybe_check_template_type): Likewise.
2526         (process_partial_specialization): Likewise.
2527         (check_default_tmpl_args): Likewise.
2528         (push_template_decl_real): Likewise.
2529         (convert_template_argument): Likewise.
2530         (try_class_unification): Likewise.
2531         (get_bindings_real): Likewise.
2532         (do_decl_instantiation): Likewise.
2533         * semantics.c (begin_function_definition): Likewise.
2534         (finish_member_declaration): Likewise.
2535         (check_multiple_declarators): Likewise.
2536         * typeck.c (comp_array_types): Likewise.
2537         (comptypes): Likewise.
2538         (expr_sizeof): Likewise.
2539         (build_binary_op): Likewise.
2540         (dubious_conversion_warnings): Likewise.
2541         (check_return_expr): Likewise.
2542
2543 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
2544
2545         * typeck.c (build_class_member_access_expr): Do not return
2546         error_mark_node when no error has occurred.
2547
2548 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2549
2550         * typeck.c (build_component_addr): Remove.
2551         (build_unary_op): Just check it's not a bitfield, and then build
2552         an ADDR_EXPR.
2553
2554 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2555
2556         * class.c (convert_to_base): Correct check for error_mark_node.
2557         (create_vtable_ptr): Remove unused VFUNS_P parm.
2558
2559 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2560
2561         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
2562
2563 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
2564
2565         Rework build_component_ref.
2566         * call.c (build_vfield_ref): Do not go through build_component_ref.
2567         (build_field_call): Use build_class_member_access_expr.
2568         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
2569         (build_object_call): Likewise.
2570         * class.c (convert_to_base): New function.
2571         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
2572         (instantiate_type): Handle BASELINKs.
2573         * cp-tree.def (BASELINK): New tree code.
2574         * cp-tree.h (BASELINK_P): Reimplement.
2575         (SET_BASELINK_P): Remove.
2576         (BASELINK_BINFO): Reimplement.
2577         (BASELINK_FUNCTIONS): Likewise.
2578         (BASELINK_ACCESS_BINFO): Likewise.
2579         (BASELINK_OPTYPE): Likewise.
2580         (convert_to_base): New function.
2581         (name_p): Likewise.
2582         (build_object_ref): Remove.
2583         (build_component_ref_1): Likewise.
2584         (build_component_ref): Likewise.
2585         (build_x_component_ref): Likewise.
2586         (build_class_member_access_expr): New function.
2587         (finish_class_member_access_expr): Likewise.
2588         (build_ptrmemfunc_access_expr): Likewise.
2589         * decl.c (grokdeclarator): Handle BASELINKs.
2590         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
2591         finish_class_member_access_expr.
2592         (arg_assoc): Handle BASELINKs.
2593         (do_class_using_decl): Likewise.
2594         * error.c (dump_decl): Likewise.
2595         (dump_expr): Use build_ptrmemfunc_access_expr.
2596         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
2597         destructors.
2598         (build_throw): Use BASELINK_FUNCTIONS.
2599         * init.c (perform_member_init): Use
2600         build_class_member_access_expr.
2601         (build_offset_ref): Handle BASELINKs.  Use
2602         build_class_member_access_expr.
2603         * method.c (hack_identifier): Likewise.
2604         * parse.y (do_id): Use BASELINK, not TREE_LIST.
2605         (primary): Remove uses of build_object_ref.
2606         * pt.c (lookup_template_function): Handle BASELINKs.
2607         (resolve_overloaded_unification): Likewise.
2608         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
2609         (lookup_field): Use BASELINK, not TREE_LIST.
2610         (lookup_fnfiels): Likewise.
2611         (setup_class_bindings): Likewise.
2612         * semantics.c (finish_object_call_expr): Do not use
2613         build_method_call when we already know what function is being
2614         called.
2615         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
2616         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
2617         TREE_CHAIN.
2618         (name_p): New function.
2619         * typeck.c (build_object_ref): Remove.
2620         (build_component_ref_1): Likewise.
2621         (build_x_component_ref): Likewise.
2622         (build_class_member_access_expr): New function.
2623         (finish_class_member_access_expr): Likewise.
2624         (build_ptrmemfunc_access_expr): Likewise.
2625         (get_member_function_from_ptrfunc): Use
2626         build_ptrmemfunc_access_expr.
2627         (build_binary_op): Likewise.
2628         (build_unary_op): Likewise.
2629         (build_ptrmemfunc): Likewise.
2630         (pfn_from_ptrmemfunc): Likewise.
2631         * typeck2.c (build_m_component_ref): Adjust comment.
2632
2633 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
2634
2635         * Make-lang.in (CXX_C_OBJS): Update.
2636         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
2637         * cp-tree.h (cxx_decode_option): Remove.
2638         * decl2.c (compare_options, lang_f_options, unsupported_options,
2639         cxx_decode_option): Remove.
2640
2641 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
2642
2643         * typeck.c (build_x_unary_op): Handle pointer-to-member.
2644
2645 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
2646
2647         * class.c: Don't include obstack.h.
2648         (popclass):
2649         * decl2.c: Delete bogus comment.
2650         * error.c: Don't include obstack.h.
2651         * except.c: Likewise.
2652         (dump_type): Correct comment.
2653         * method.c: Don't include obstack.h.
2654         * tree.c: Likewise.
2655
2656 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
2657
2658         Fix PR/2213
2659         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
2660         expressions to pointer-to-data-member of pointer-to-member-functions.
2661
2662 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
2663
2664         * cvt.c (ocp_convert): Delete obsolete code.
2665         * parse.y (permanent_obstack): Delete declaration.
2666         * pt.c (permanent_obstack): Delete declaration.
2667         * repo.c (permanent_obstack): Delete declaration.
2668         (open_repo_file): Use xmalloc instead of permanent_obstack.
2669         (init_repo): Use xstrdup instead of permanent_obstack.
2670
2671 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
2672
2673         * cp-tree.h (VF_DERIVED_VALUE): Remove.
2674         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
2675
2676 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
2677
2678         PR 7470.
2679         C++ ABI change - vfunc ordering.
2680         * class.c (add_virtual_function): Remove.
2681         (dfs_modify_all_vtables): Take list of all declared
2682         virtuals. Assign all that are not in primary base.
2683         (check_for_override): Adjust comments.
2684         (create_vtable_ptr): Take single list of virtuals. Build chain
2685         of declared virtuals here.
2686         (layout_class_type): Take single list of virtuals. Adjust.
2687         (finish_struct_1): Keep virtuals on single list. Adjust.
2688
2689 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
2690
2691         * init.c (build_member_call): Use build_new_method_call, not
2692         build_method_call.
2693
2694 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
2695
2696         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
2697
2698 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
2699
2700         * call.c (build_method_call): Issue a more helpful error message
2701         about ambiguous method names.
2702
2703 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
2704
2705         * tree.c (build_shared_int_cst): Make cache file scope, and
2706         GTY it.
2707
2708 2002-08-02  Jason Merrill  <jason@redhat.com>
2709
2710         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
2711         (cp_expr_size): New fn.
2712         * call.c (build_over_call): Lose empty class hackery.
2713         (convert_arg_to_ellipsis): Promote non-POD warning to error.
2714         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
2715
2716         * semantics.c (expand_body): Do tree optimization in the function
2717         context, too.
2718
2719 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
2720
2721         * cp-tree.h: Move all warning and flag declarations to c-common.h.
2722         * decl.c: Move all warning and flag variables to c-common.c.
2723         * decl2.c: Move all warning and flag variables to c-common.c.
2724         * lex.c (flag_digraphs): Remove.
2725         (warn_traditional): Now in c-common.c.
2726
2727 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
2728
2729         * call.c (build_field_call): Do not look up the field by name.
2730         (build_method_call): Simplify.
2731         (struct z_candidate): Add access_path and conversion_path.  Remove
2732         basetype_path.
2733         (convert_class_to_reference): Adjust use of
2734         add_function_candidate.
2735         (add_candidate): Add conversion_path argument.
2736         (add_function_candidate): Use it.
2737         (add_conv_dndidate): Likewise.
2738         (build_builtin_candidate): Likewise.
2739         (add_template_candidate_real): Add conversion_path argument.
2740         (add_template_conv_candidate): Likewise.
2741         (add_template_candidate): Likewise.
2742         (build_user_type_conversion_1): Use it.
2743         (build_new_function_call): Remove name lookup code.  Adjust use of
2744         add_template_candidate and add_function_candidate.
2745         (build_new_op): Likewise.
2746         (convert_like_real): Use build_special_member_call.
2747         (build_over_call): Use cand->conversion_path.
2748         (build_special_member_call): New method.
2749         (build_new_method_call): Remove name lookup code.
2750         * cp-tree.def (OFFSET_REF): Update documentation.
2751         (TEMPLATE_ID_EXPR): Likewise.
2752         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
2753         (BASELINK_OPTYPE): Likewise.
2754         (build_new_method_call): Adjust prototype.
2755         (build_special_member_call): New method.
2756         (build_baselink): New method.
2757         (build_offset_ref_call_from_tree): Likewise.
2758         (build_call_from_tree): Likewise.
2759         (finish_qualified_call_expr): Remove.
2760         (finish_call_expr): Adjust prototype.
2761         (build_x_function_call): Remove.
2762         * cvt.c (ocp_convert): Use build_special_member_call.
2763         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
2764         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
2765         CALL_EXPR.
2766         (build_offset_ref_call_from_tree): New function.
2767         (build_call_from_tree): Likewise.
2768         * init.c (expand_cleanup): Use build_special_member_call.
2769         (expand_default_init): Likewise.
2770         (build_member_call): Use finish_call_expr.
2771         (build_new_1): Use build_special_member_call.
2772         (push_base_cleanups): Likewise.
2773         * method.c (do_build_assign_ref): Likewise.
2774         * parse.y (template_id): Do not pass a COMPONENT_REF to
2775         lookup_template_function.
2776         (primary): Use parse_finish_call_epxr, not finish_call_expr.
2777         (parse_finish_call_expr): New function.
2778         * pt.c (lookup_template_function): Add assertions.
2779         * search.c (lookup_base): Allow T to be a binfo.
2780         (build_baselink): New function.
2781         (lookup_member): Use it.
2782         * semantics.c (finish_call_expr): Do not do name lookup.
2783         (finish_object_call_expr): Remove #if 0'd code.
2784         (finish_qualified_call_expr): Remove.
2785         * typeck.c (build_x_function_call): Remove.
2786         (build_static_case): Use build_special_member_call.
2787         * typeck2.c (build_functional_cast): Likewise.
2788
2789 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
2790
2791         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
2792
2793 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
2794
2795         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
2796
2797 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
2798
2799         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
2800         documentation.
2801
2802 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
2803
2804         * cp-tree.h: Comment typo fix.
2805
2806 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
2807
2808         * spew.c (space_for_token): Allocate zeroed memory for a new token
2809         chunk.
2810
2811 2002-07-27  Roger Sayle  <roger@eyesopen.com>
2812
2813         * decl.c (builtin_function_1): No need to explicitly mark
2814         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
2815
2816 2002-07-27  Roger Sayle  <roger@eyesopen.com>
2817
2818         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
2819
2820 2002-07-26  Jason Merrill  <jason@redhat.com>
2821
2822         * call.c (build_over_call): Likewise.
2823         (cp_convert_parm_for_inlining): New fn.
2824         (convert_for_arg_passing): New fn.
2825         (convert_default_arg, build_over_call): Use it.
2826         (type_passed_as): New fn.
2827         * pt.c (tsubst_decl): Use it.
2828         * decl2.c (cp_build_parm_decl): New fn.
2829         (build_artificial_parm): Use it.
2830         (start_static_storage_duration_function): Likewise.
2831         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
2832         (grokparms): Don't mess with DECL_ARG_TYPE.
2833         * typeck.c (convert_arguments): Use convert_for_arg_passing.
2834         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
2835         Define.
2836         * cp-tree.h: Declare new fns.
2837
2838 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
2839
2840         * cp-tree.h (flag_operator_names): Remove.
2841         * decl2.c (flag_operator_names): Remove.
2842         (lang_f_options): Remove operator-names.
2843         * lex.c (D_OPNAME): Remove.
2844         (reswords): Remove operator names.
2845         (rid_to_yy): Remove operator names.
2846         (init_reswords): No need to handle D_OPNAME.
2847         * spew.c (read_process_identifier): There are no operator
2848         names.
2849
2850 2002-07-26  Jason Merrill  <jason@redhat.com>
2851
2852         * dump.c (cp_dump_tree): Call c_dump_tree.
2853         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
2854
2855 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
2856
2857         * error.c (print_whitespace): Remove.
2858         * g++spec.c (LIBUNWIND): Move.
2859         * mangle.c (mangled_position, write_signed_number): Remove.
2860
2861 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
2862
2863         * decl2.c (cxx_decode_option): Similarly.
2864
2865 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
2866
2867         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
2868         (cxx_sizeof_or_alignof_type): Take a third argument.
2869         (cxx_sizeof): Adjust definition.
2870         (cxx_alignof): Likewise.
2871         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
2872         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
2873         complaining.
2874         (c_sizeof_nowarn): Remove definition.
2875         (build_unary_op): Use cxx_sizeof_nowarn.
2876
2877 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
2878
2879         * tree.c (cp_build_qualified_type_real): When copying
2880         pointer-to-method types, unshare the record that holds
2881         the cached pointer-to-member-function type.
2882
2883 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
2884
2885         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
2886
2887 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
2888
2889         Fix PR/7363:
2890         * typeck.c (cxx_sizeof_or_alignof_type): New function.
2891         (c_sizeof): Remove definition.
2892         (expr_sizeof): Use cxx_sizeof.
2893         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
2894         * decl.c (finish_destructor_body): Use cxx_sizeof.
2895         * semantics.c (finish_alignof): Likewise.
2896         (finish_alignof): Use cxx_alignof.
2897         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
2898         (cxx_sizeof_or_alignof_type): Declare.
2899         (my_friendly_assert): Move to ../c-common.h.
2900
2901 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
2902
2903         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
2904
2905 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2906
2907         PR c++/7347, c++/7348
2908         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
2909         * decl.c (make_typename_type): Use it.
2910         (make_unbound_class_template): Likewise.
2911         (lookup_name_real): Don't call type_access_control if scope is
2912         template parameter dependent.
2913         * parse.y (template_arg): Call make_unbound_class_template with
2914         tf_parsing set.
2915         (nest_name_specifier): Call make_typename_type with tf_parsing set.
2916         (typename_sub0): Likewise.
2917         (typename_sub1): Likewise.
2918         (instantiate_decl): Push class scope.
2919         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
2920         for both static variable and member function template.
2921         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
2922         and arguments.
2923         * search.c (type_access_control): Do type access for TEMPLATE_DECL
2924         too.
2925
2926 2002-07-20  Roger Sayle  <roger@eyesopen.com>
2927
2928         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
2929         test by using positive_option.  Make whitespace consistent.
2930
2931 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
2932
2933         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
2934         members with 'locus'.  Adjust use throughout.
2935         (struct feed):  Likewise.
2936         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
2937         Adjust use.
2938         (snarf_defarg): Use error(), not error_with_file_and_line().
2939
2940 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
2941
2942         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
2943         cpp_options is included.
2944
2945 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2946
2947         PR c++/2862, c++/2863
2948         * pt.c (determine_specialization): Compare the length of
2949         TYPE_ARG_TYPES.  Tidy.
2950
2951 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2952
2953         PR c++/3797
2954         * decl.c (duplicate_decls): Don't propagate inlining parameters from
2955         olddecl to newdecl when newdecl is a specialization of the
2956         instantiation olddecl.
2957
2958 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2959
2960         PR c++/4802, c++/5387
2961         * decl.c (make_typename_type): Use enforce_access.
2962
2963 2002-07-17  Scott Snyder <snyder@fnal.gov>
2964
2965         PR c++/7320
2966         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
2967
2968 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
2969
2970         * class.c (add_method): Correct handling of conversion operators.
2971
2972 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
2973
2974         PR c++/7224
2975         * class.c (add_method): Simplify.
2976
2977 2002-07-11  Jason Merrill  <jason@redhat.com>
2978
2979         PR c++/7279
2980         * tree.c (cp_copy_res_decl_for_inlining): Also copy
2981         TREE_ADDRESSABLE.
2982
2983 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
2984
2985         * pt.c (template_parm_this_level_p, push_template_decl_real):
2986         Pass depth as int pointer.
2987
2988 2002-07-11  Tim Josling  <tej@melbpc.org.au>
2989
2990         Remove front end hard coding from gengtype.c.
2991
2992         * config-lang.in (gtfiles): Add files needed for this front end.
2993
2994 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
2995
2996         * cp-tree.h (unqualified_name_lookup_error): Declare it.
2997         (begin_function_definition): Adjust prototype.
2998         * lex.c (unqualified_name_lookup_error): New function, split out
2999         from ...
3000         (do_identifier): ... here.
3001         * parse.y (parse_begin_function_definition): New function.
3002         (fn.def1): Use it.
3003         * semantics.c (begin_function_definition): Accept decl-specifiers
3004         and attributes as separate parameters.
3005
3006 2002-07-10  Jason Merrill  <jason@redhat.com>
3007
3008         PR c++/6255
3009         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
3010         modifying the old one.
3011
3012 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
3013
3014         * cp-tree.h (constructor_name_p): Declare it.
3015         (check_template_template_default_arg): Likewise.
3016         * class.c (handle_using_decl): Use constructor_name_p.
3017         * decl.c (grokdeclarator): Likewise.
3018         * decl2.c (constructor_name_p): Define it.
3019         * init.c (build_member_call): Use constructor_name_p.
3020         * parse.y (template_parm): Use check_template_template_default_arg.
3021         * pt.c (check_explicit_specialization): Use constructor_name_p.
3022         * semantics.c (check_template_template_default_arg): New function.
3023
3024 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3025
3026         * pt.c (can_complete_type_without_circularity): Add static to
3027         function definition.
3028
3029 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
3030
3031         * cp-tree.h (have_extern_spec): Declare it
3032         * decl.c (have_extern_spec): Define it.
3033         (start_decl): Eliminate use of used_extern_spec.
3034         (start_function): Likewise.
3035         * parse.y (have_extern_spec): Remove declaration.
3036         (used_extern_spec): Likewise.
3037         (frob_specs): Eliminate use of used_extern_spec.
3038         (.hush_warning): Likewise.
3039
3040 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
3041
3042         * Make-lang.in (cp/parse.o): Depend on decl.h.
3043         * cp-tree.h (do_decl_instantiation): Change prototype.
3044         * parse.y: Include decl.h.
3045         (parse_decl_instantiation): New function.
3046         (explicit_instantiation): Use it.
3047         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
3048         and DECLSPECS.
3049
3050 2002-07-07  Roger Sayle  <roger@eyesopen.com>
3051
3052         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
3053         constructor and destructor tests when passed a TEMPLATE_DECL.
3054
3055 2002-07-05  Jason Merrill  <jason@redhat.com>
3056
3057         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
3058         pointers.
3059
3060         PR optimization/7145
3061         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
3062
3063 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
3064
3065         Repair damage on weak-impared targets caused by my previous patch.
3066         * cp-tree.h (import_export_tinfo): Add parameter.
3067         * decl2.c (import_export_tinfo): Add parameter, post adjust
3068         DECL_COMDAT.
3069         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
3070         import_export_tinfo.
3071
3072 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3073
3074         PR c++/6944
3075         * init.c (build_aggr_init): Remove qualifiers of init before calling
3076         build_vec_init.
3077         (build_vec_init): Flatten multi-dimensional array during cleanup.
3078         (build_vec_delete_1): Abort if the type of each element is array.
3079
3080 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
3081
3082         * pt.c (instantiate_class_template): Fix typo.
3083
3084 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3085
3086         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
3087         by CVS conflict in my last patch.
3088
3089 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3090
3091         PR c++/6716
3092         * pt.c (can_complete_type_without_circularity): New function.
3093         (instantiate_class_template): Use it.
3094         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
3095         message due to incomplete fields.
3096
3097 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
3098
3099         PR c++/7112
3100         * mangle.c (write_expression): Add mangling for sizeof when
3101         applied to a type.
3102         * operators.def: Remove stale comment.
3103
3104 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
3105
3106         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
3107         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
3108         (tinfo_decl_type): Replace with ...
3109         (type_info_ptr_type): ... this.
3110         (import_export_tinfo): Declare.
3111         (tinfo_decl_p): Rename to ...
3112         (unemitted_tinfo_decl_p): ... this.
3113         * decl2.c (import_export_decl): Break out tinfo handling into ...
3114         (import_export_tinfo): ... here. New function.
3115         (finish_file): Adjust.
3116         * rtti.c (TINFO_REAL_NAME): New macro.
3117         (init_rtti_processing): Create the tinfo types.
3118         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
3119         (get_tinfo_decl): Adjust.
3120         (get_tinfo_ptr): New function.
3121         (get_type_id): Use it.
3122         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
3123         (ptr_initializer): Use get_tinfo_ptr.
3124         (ptm_initializer): Likewise.
3125         (synthesize_tinfo_var): Break into ...
3126         (get_pseudo_ti_init): ... this. Just create the initializer.
3127         (get_pseudo_ti_desc): .. and this.
3128         (create_real_tinfo_var): Remove.
3129         (create_pseudo_type_info): Don't create the vtable decl here.
3130         (get_vmi_pseudo_type_info): Remove.
3131         (create_tinfo_types): Adjust.
3132         (tinfo_decl_p): Rename to ...
3133         (unemitted_tinfo_decl_p): ... here. Adjust.
3134         (emit_tinfo_decl): Adjust. Create the initializer.
3135
3136 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
3137
3138         PR c++/6695
3139         * pt.c (tsubst_friend_class): Substitute into the context of the
3140         friend before using it.
3141
3142 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
3143
3144         * cp-tree.h (xref_tag): Change prototype.
3145         (handle_class_head): Likewise.
3146         (build_x_component_ref): Likewise.
3147         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
3148         (xref_tag): Take attributes as a separate parameter.
3149         (xref_tag_from_type): Adjust call to xref_tag.
3150         * decl2.c (build_expr_from_tree): Adjust call to
3151         build_x_component_ref.
3152         (handle_class_head): Take attributes as a separate parameter.
3153         * parse.y (parse_xref_tag): New function.
3154         (parse_handle_class_head): Likewise.
3155         (primary): Use parse_xref_tag.
3156         (class_head_decl): Use parse_handle_class_head.
3157         (class_head_defn): Likewise.
3158         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
3159         (build_dynamic_cast_1): Likewise.
3160         (create_pseudo_type_info): Likewise.
3161         (emit_support_tinfos): Likewise.
3162         * typeck.c (build_object_ref): Adjust call to
3163         build_x_component_ref.
3164         (build_x_component_ref): Remove protect parameter.
3165
3166 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
3167
3168         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
3169         * class.c (handle_using_decl): Likewise.
3170         (instantiate_type): Likewise.
3171         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
3172         (xref_basetypes): Change prototype.
3173         (begin_mem_initializers): New function.
3174         (get_overloaded_fn): Likewise.
3175         * decl.c (xref_basetypes): Simplify.
3176         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
3177         * init.c (build_offset_ref): Likewise.
3178         * parse.y (base_init): Use begin_mem_initializers().
3179         (structsp): Adjust call to xref_basetypes.
3180         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
3181         (instantiate_class_template): Adjust call to xref_basetypes.
3182         * semantics.c (begin_mem_initializers): New function.
3183         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
3184         (really_overlaoded_fn): Likewise.
3185         (get_overloaded_fn): New function.'
3186         (get_first_fn): USe BASELINK_FUNCTIONS.
3187
3188 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
3189
3190         * cp-tree.h (SCALAR_TYPE_P): New macro.
3191         (check_for_out_of_scope_variable): New function.
3192         (at_class_scope_p): Likewise.
3193         (finish_fname): Likewise.
3194         * class.c (finish_struct): Use at_function_scope_p.
3195         * decl.c (check_for_out_of_scope_variable): New function, split
3196         out from do_identifier.
3197         (finish_enum): Use at_function_scope_p.
3198         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
3199         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
3200         (primary): Use at_function_scope_p.
3201         * search.c (at_class_scope_p): New function.
3202         * semantics.c (finish_fname): Likewise.
3203         (check_multiple_declarators): Use at_function_scope_p.
3204
3205 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
3206
3207         * parse.y (parse_scoped_id): New function.
3208         (primary): Use it.
3209         * cp-tree.h (do_scoped_id): Adjust declaration.
3210         * lex.c (do_scoped_id): Remove call to yylex.
3211         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
3212         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
3213         expanding it inline.
3214
3215 2002-06-23  Matt Thomas  <matt@3am-software.com>
3216
3217         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
3218         "#if VMS_TARGET".
3219
3220 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3221
3222         * mangle.c (integer_type_codes): Const-ify.
3223
3224 2002-06-20  Richard Henderson  <rth@redhat.com>
3225
3226         PR c++/6747
3227         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
3228         Call put_var_into_stack.
3229
3230 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3231
3232         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
3233         array size calculation.
3234
3235 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3236
3237         PR c++/6892
3238         * pt.c (tsubst_expr): Handle FILE_STMT.
3239
3240 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3241
3242         PR c++/6723
3243         * pt.c (lookup_template_class): Don't build complete argument of
3244         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
3245         argument.
3246
3247 2002-06-19  Akim Demaille  <akim@epita.fr>
3248
3249         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
3250         decl.h's TYPENAME.
3251         * spew.c, lex.c: Adjust.
3252         * parse.y (explicit_instantiation): Add empty action to override
3253         the default $$ = $1 where it introduces a type clash.
3254
3255 2002-06-14  Jason Merrill  <jason@redhat.com>
3256
3257         * semantics.c (begin_for_stmt): Push the 'for' scope before
3258         adding the FOR_STMT.
3259
3260         C++ ABI changes.
3261         * class.c (build_base_field): Set DECL_PACKED.
3262         (layout_class_type): Don't use tail padding of PODs.
3263         * mangle.c (write_unqualified_name): Fix template conversion op
3264         mangling.
3265
3266 2002-06-16  Richard Henderson  <rth@redhat.com>
3267
3268         PR opt/6793
3269         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
3270         after template instantiation.
3271
3272 2002-06-16  Richard Henderson  <rth@redhat.com>
3273
3274         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
3275
3276 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
3277
3278         * cp-tree.h (compiler_error): Remove declaration.
3279         * lex.c (compiler_error): Remove definition.
3280
3281 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
3282
3283         * g++spec.c (LIBUNWIND): New.
3284         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
3285
3286 2002-06-13  Jessica Han  <jessica@cup.hp.com>
3287
3288         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
3289         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
3290         (build_vbase_offset_vtbl_entries): Likewise.
3291         * rtti.c (build_headof): Likewise.
3292         (get_tinfo_decl_dynamic): Likewise.
3293         (create_pseudo_type_info): Likewise.
3294
3295 2002-06-12  Stan Shebs  <shebs@apple.com>
3296
3297         * mpw-config.in: Remove file, no longer used.
3298         * mpw-make.sed: Ditto.
3299
3300 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
3301
3302         * decl2.c: Update call to cpp_handle_option.
3303
3304 2002-06-07  H.J. Lu  (hjl@gnu.org)
3305
3306         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
3307
3308 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
3309
3310         * error.c (cp_error_at): Fix typo.
3311
3312 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
3313
3314         * error.c (cp_diagnostic_starter): Adjust call.
3315         (maybe_print_instantiation_context): Change prototype to take a
3316         'diagnostic_info *'.
3317         (print_instantiation_full_context): Likewise.
3318         (print_instantiation_partial_context): Likewise.
3319         (cp_diagnostic_starter): Likewise.
3320         (cp_diagnostic_finalizer): Likewise.
3321         (cp_print_error_function): Likewise.
3322         (cp_printer): Take a secondary parameter as a 'text_info *'.
3323         Remove output_state savings.  Adjust calls.
3324
3325 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
3326
3327         * pt.c (inline_parm_levels): Mark for GC.
3328
3329         * mangle.c (start_mangling): Allocate G.substitutions here...
3330         (init_mangle): ... rather than here.
3331         (finish_mangling): Clear the varray pointer when done with it.
3332         * spew.c (yylexstring): Don't use VARRAY_FREE.
3333         * search.c (bfs_walk): Don't use VARRAY_FREE.
3334         * decl2.c (pending_statics): Use gengtype to mark.
3335         (deferred_fns): Likewise.
3336         (ssdf_decls): Likewise.
3337         (init_decl2): Delete.
3338         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
3339         (cxx_init_decl_processing): Don't call init_decl2.
3340         (cxx_pop_function_context): Don't use VARRAY_FREE.
3341         * cp-tree.h (struct saved_scope): No need for special marking
3342         of varrays.
3343         (struct language_function): Likewise.
3344         (local_classes): Use gengtype to mark.
3345         (init_decl2): Delete prototype.
3346         * class.c (init_class_processing): Don't use
3347         ggc_add_tree_varray_root.
3348         (build_vtbl_initializer): Don't use VARRAY_FREE.
3349
3350         * decl.c (typename_compare): Don't use same_type_p.
3351
3352         * decl.c: Include hashtab.h instead of hash.h.
3353         (typename_hash): Update to use htab_h.
3354         (typename_compare): Likewise.
3355         (typename_htab): Use gengtype to mark.
3356         (build_typename_type): Update to use htab_h.
3357         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
3358
3359         * Make-lang.in (gt-cp-tree.h): New rule.
3360         (cp/tree.o): Depend on gt-cp-tree.h.
3361         * config-lang.in (gtfiles): Add cp/tree.c.
3362         * tree.c: Include gt-cp-tree.h.
3363         (list_hash_table): Use gengtype to mark.
3364         (init_tree): Use gengtype to mark trees.
3365
3366         * Make-lang.in (cp/decl.o): Add debug.h dependency.
3367         * call.c (struct z_candidate): Use gengtype.
3368         (USER_CONV_CAND): Use WRAPPER_ZC.
3369         (convert_class_to_reference): Use build_zc_wrapper.
3370         (build_type_conversion_1): Likewise.
3371         (build_over_call): Use WRAPPER_ZC.
3372         (add_warning): Use build_zc_wrapper.
3373         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
3374         * cp-tree.h (struct lang_identifier): Use gengtype.
3375         (struct template_parm_index_s): Likewise.
3376         (struct ptrmem_cst): Likewise.
3377         (struct tree_binding): Likewise.
3378         (struct tree_overload): Likewise.
3379         (struct tree_srcloc): Likewise.
3380         (struct tree_wrapper): Likewise.  Also modify to have a pointer
3381         to struct z_candidate rather than void.
3382         (enum cp_tree_node_structure_enum): New.
3383         (union lang_tree_node): New.
3384         (cxx_mark_tree): Delete prototype.
3385         (cp_tree_node_structure): New prototype.
3386         (build_ptr_wrapper): Delete prototype.
3387         (build_int_wrapper): Delete prototype.
3388         (build_zc_wrapper): New prototype.
3389         * decl.c: Include debug.h
3390         (cxx_mark_tree): Delete.
3391         (cp_tree_node_structure): New.
3392         * tree.c (build_ptr_wrapper): Delete.
3393         (build_int_wrapper): Delete.
3394         (build_zc_wrapper): New.
3395
3396         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
3397         Correct typo.  Patch from k_fukui@highway.ne.jp.
3398
3399         * semantics.c (current_stmt_tree): Update for change to
3400         struct language_function.
3401         (finish_mem_initializers): Likewise.
3402         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
3403         * cp-tree.h (struct language_function): Rename from
3404         cp_language_function.  Change all uses.
3405         (cp_function_chain): Don't need to cast.
3406
3407         * class.c (duplicate_tag_error): Reset discriminator.
3408         (check_bases_and_members): Update for data structure changes.
3409         * cp-tree.h (struct lang_id2): Use gengtype.
3410         (flagged_type_tree): Likewise.
3411         (SET_LANG_ID): Use GGC on struct lang_id2.
3412         (struct cp_language_function): Use gengtype.  Remove field
3413         'x_vcalls_possible_p'.
3414         (current_vcalls_possible_p): Delete.
3415         (struct lang_type_header): New.
3416         (struct lang_type_class): Rename from struct lang_type.  Include
3417         struct lang_type_header.
3418         (struct lang_type_ptrmem): New.
3419         (struct lang_type): New.
3420         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
3421         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
3422         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
3423         (struct lang_decl_flags): Use gengtype.  Add discriminators.
3424         (struct lang_decl): Use gengtype.  Add and use discriminators.
3425         Update the macros that reference moved fields.
3426         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
3427         (SET_DECL_THUNK_P): Set discriminator too.
3428         (clear_inline_text_obstack): Delete prototype.
3429         (finish_inline_definitions): Delete prototype.
3430         (mark_pending_inlines): Delete prototype.
3431         (lang_check_failed): New prototype.
3432         * decl.c (struct named_label_use_list): Use gengtype.
3433         (struct named_label_list): Likewise.
3434         (mark_binding_level): Delete.
3435         (mark_named_label_lists): Delete.
3436         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
3437         (cxx_init_decl_processing): Use generated marker routine.
3438         (begin_destructor_body): Delete dead set to
3439         current_vcalls_possible_p.
3440         (mark_lang_function): Delete.
3441         (mark_cp_function_context): Delete.
3442         (lang_mark_tree): Use generated marker routines.
3443         * decl2.c (start_objects): Set discriminator when setting
3444         GLOBAL_INIT_PRIORITY.
3445         * lex.c (retrofit_lang_decl): Set discriminators.
3446         (copy_lang_type): Update for changes to lang_type structure.
3447         (cp_make_lang_type): Set discriminator.
3448         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
3449         * search.c: Include ggc.h.
3450         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
3451         (finish_inline_definitions): Delete.
3452         * spew.c (struct token): Use gengtype.
3453         (struct token_chunk): New.
3454         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
3455         (struct feed): Use gengtype.
3456         (feed_obstack): Delete.
3457         (feed): Mark as GC root.
3458         (pending_inlines): Mark as GC root.
3459         (pending_inlines_tail): Likewise.
3460         (processing_these_inlines): Likewise.
3461         (token_obstack): Make static.
3462         (first_token): Likewise.
3463         (init_spew): Don't initialize deleted things; use gengtype for roots.
3464         (clear_inline_text_obstack): Delete.
3465         (feed_input): Use GC for struct feed.  Update for changes to
3466         struct unparsed_text.
3467         (mark_pending_inlines): Delete.
3468         (next_token): Rename from add_token.  Change all callers.  Update
3469         for changes to struct unparsed_text.
3470         (space_for_token): New.
3471         (remove_last_token): New.
3472         (alloc_unparsed_text): New.
3473         (snarf_block): Take an unparsed_text.  Update for changes to struct
3474         unparsed_text.
3475         (snarf_method): Update for changes to struct unparsed_text.
3476         (snarf_defarg): Update for changes to struct unparsed_text.
3477         * tree.c (lang_check_failed): New.
3478
3479         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
3480         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
3481         (cp/spew.o): Add dependency on gt-<filename>.h.
3482         (cp/decl2.o): Add dependency on gt-<filename>.h.
3483         (cp/call.o): Add dependency on gt-<filename>.h.
3484         (cp/pt.o): Add dependency on gt-<filename>.h.
3485         (cp/repo.o): Add dependency on gt-<filename>.h.
3486         (cp/parse.o): Add dependency on gt-<filename>.h.
3487         * call.c: Use gengtype for roots.
3488         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
3489         decl2.c parse.y pt.c repo.c spew.c.
3490         * cp-tree.h: Use gengtype for roots.
3491         (struct saved_scope): Use GGC, gengtype.
3492         (cp_parse_init): Delete prototype.
3493         (init_pt): Delete prototype.
3494         * decl.c: Use gengtype for roots.
3495         (mark_saved_scope): Delete.
3496         (cxx_init_decl_processing): Don't call deleted initilisation
3497         routines.
3498         (signed_size_zero_node): Delete, unused.
3499         * decl.h: Use gengtype for roots.
3500         * decl2.c: Use gengtype for roots.
3501         * lex.h: Use gengtype for roots.
3502         * parse.y: Use gengtype for roots.
3503         (cp_parse_init): Delete.
3504         * pt.c: Use gengtype for roots.
3505         (init_pt): Delete.
3506         * repo.c: Use gengtype for roots.
3507         * spew.c: Use gengtype for roots.
3508
3509         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
3510         (cp/decl.o): Add dependency on gtype-cp.h.
3511         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
3512         Include gtype-cp.h.  Allow for filename changes.
3513
3514         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
3515         (cp/decl.o): Add cp/gt-decl.h dependency.
3516         * config-lang.in (gtfiles): New.
3517         * tree.h: Rename struct binding_level to struct cp_binding_level.
3518         * decl.c: Rename struct binding_level to struct cp_binding_level.
3519         Include cp/gt-decl.h.
3520         (struct cp_binding_level): Use gengtype.
3521         (make_binding_level): Use GGC on struct cp_binding_level.
3522         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
3523         (cxx_init_decl_processing): Mark free_binding_level as
3524         deletable.
3525
3526         * decl.c (mark_cp_function_context): Update calling sequence.
3527
3528         * decl.c (start_function): Don't free 'struct
3529         cp_language_function'.
3530         (pop_cp_function_context): Likewise.
3531         (save_function_data): Allocate it using GC.
3532         * semantics.c (genrtl_start_function): Don't free 'struct
3533         cp_language_function'.
3534
3535 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
3536
3537         * lang-specs.h: Use cpp_debug_options.
3538
3539 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
3540
3541         * mangle.c, tree.c: Include real.h.
3542         * Make-lang.in: Update dependency lists.
3543
3544 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3545
3546         * lex.c: Don't include c-lex.h.
3547         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
3548
3549 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
3550
3551         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
3552
3553 2002-05-22  Richard Henderson  <rth@redhat.com>
3554
3555         * decl.c (obscure_complex_init): Check for VAR_DECL
3556         before using DECL_THREAD_LOCAL.
3557
3558 2002-05-22  Richard Henderson  <rth@redhat.com>
3559
3560         * decl.c (check_tag_decl): Handle RID_THREAD.
3561         (obscure_complex_init): Reject run-time init of tls.
3562         (grokvardecl, grokdeclarator): Handle RID_THREAD.
3563         * lex.c (reswords): Add __thread.
3564         (rid_to_yy): Map RID_THREAD to SCSPEC.
3565
3566 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
3567
3568         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
3569         * cp-tree.h (cxx_post_options): Kill.
3570         * cp-lex.c (cxx_post_options): Kill.
3571
3572 2002-05-21  Richard Henderson  <rth@redhat.com>
3573
3574         * lex.c (rid_to_yy): Add RID_THREAD.
3575
3576 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
3577
3578         * init.c (build_vec_init): Test for trivial copy-assignment when
3579         copy-assigning arrays.
3580
3581 2002-05-20  Andreas Jaeger  <aj@suse.de>
3582
3583         * init.c (build_default_init): Remove unused variable.
3584
3585 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
3586
3587         * call.c (any_strictly_viable): New.
3588         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
3589
3590 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3591
3592         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
3593
3594 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3595
3596         PR c++/186, DR 259
3597         * pt.c (do_decl_instantiation): Don't complain explicit
3598         instantiation after explicit specialization.
3599         (do_type_instantiation): Likewise.
3600
3601 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
3602
3603         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
3604         renamed from...
3605         (complete_type_or_else): ... this.  Redefined as macro.
3606         (cxx_incomplete_type_diagnostic): Declare.
3607         (cxx_incomplete_type_error): Define as macro.
3608         * init.c (build_delete): Warn about incomplete types other than
3609         void, and use the built-in operator delete for them.
3610         * typeck.c (complete_type_or_diagnostic): Renamed from
3611         complete_type_or_else.  Added warn_only argument, passed to...
3612         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
3613         warnings or errors depending on new warn_only argument.  Renamed
3614         from...
3615         (cxx_incomplete_type_error): ... this.  New implementation in
3616         terms of cxx_incomplete_type_diagnostic.
3617
3618 2002-05-18  Jason Merrill  <jason@redhat.com>
3619
3620         PR c++/6611
3621         * decl2.c (import_export_decl): If we clear
3622         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
3623
3624 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3625
3626         PR c++/6620
3627         * pt.c (verify_class_unification): Don't check if PARM is template
3628         parameter dependent.  Simplify.
3629         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
3630         parameter dependent expression.
3631
3632 2002-05-14  Jason Merrill  <jason@redhat.com>
3633
3634         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
3635         Do set DECL_COMDAT.
3636         (synthesize_tinfo_var): Take the public decl.
3637         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
3638         (emit_tinfo_decl): Adjust.  Call import_export_decl.
3639         * decl2.c (import_export_decl): Simplify tinfo decl handling.
3640
3641 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
3642
3643         * cp-tree.h (struct lang_type): Added non_zero_init.
3644         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
3645         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
3646         * class.c (check_field_decls): Test non_zero_init.
3647         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
3648         zero-to-NULL conversions.
3649         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
3650         type that needs zero-initialization without zeros.
3651         (check_initializer_decl): Compute zero-initializer for types
3652         that require a non-trivial one.
3653         * init.c (build_forced_zero_init): New function.
3654         (build_default_init): Use it.
3655         * tree.c (zero_init_p): New function.
3656         * typeck2.c (force_store_init_value): New function.
3657         (process_init_constructor): Create non-trivial zero-initializers
3658         for array members and class fields.
3659
3660 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
3661
3662         * lang-specs.h: Remove redundant -lang-c++.
3663
3664 2002-05-13  Jason Merrill  <jason@redhat.com>
3665
3666         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
3667         (fixed_type_or_null): See through reference vars.
3668         (build_base_path): Vtable contents are constant.
3669         * typeck.c (get_member_function_from_ptrfunc): Likewise.
3670
3671 2002-05-12  Jason Merrill  <jason@redhat.com>
3672
3673         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
3674         structs are safe.
3675
3676 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
3677
3678         * cp-tree.h (flag_ansi): Remove.
3679         * decl2.c (flag_ansi): Remove.
3680         (cxx_decode_option): Set flag_iso and flag_undef.
3681
3682 2002-05-09  Jason Merrill  <jason@redhat.com>
3683
3684         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
3685         Use subtraction rather than a bitmask to get the index.
3686         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
3687
3688         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
3689
3690 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
3691
3692         * Make-lang.in (decl2.o): Update.
3693         * cp-tree.h (warn_multichar): Remove.
3694         * decl2.c: Include c-common.h.
3695         (warn_multichar): Remove.
3696
3697 2002-05-03  Jason Merrill  <jason@redhat.com>
3698
3699         * tree.c (build_cplus_array_type): Only const and volatile get
3700         special handling.
3701
3702         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
3703
3704 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
3705
3706         ABI change, returning simple classes from functions.
3707         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
3708         TYPE_HAS_TRIVIAL_INIT_REF is false or
3709         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
3710
3711 2002-04-30  Jason Merrill  <jason@redhat.com>
3712
3713         PR debug/6436
3714         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
3715         anonymous class with a typedef if there are attributes.
3716
3717 2002-04-29  Paul Eggert  <eggert@twinsun.com>
3718
3719         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
3720
3721 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
3722
3723         PR c++/6477
3724         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
3725         non-NULL first.
3726
3727 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
3728
3729         PR c++/6492
3730         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
3731         enter that scope before name lookup.
3732
3733         PR c++/6486
3734         * method.c (do_build_copy_constructor): Avoid building
3735         cv-qualified reference types.
3736
3737 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
3738
3739         PR c++/5719
3740         * decl.c (grok_op_properties): Assignment ops don't have to return
3741         by value. operator% should.
3742
3743 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
3744
3745         PR c/6343
3746         * decl.c (duplicate_decls): Call merge_weak.
3747
3748 2002-04-26  Richard Henderson  <rth@redhat.com>
3749
3750         * parse.y (malloced_yyss, malloced_yyvs): New.
3751         (yyoverflow): Re-add.  Set them.
3752         (free_parser_stacks): New.
3753
3754 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
3755
3756         PR c++/6497
3757         * method.c (do_build_assign_ref): Pass a derivation to
3758         build_method_call when calling base class assignment operators.
3759
3760 2002-04-26  Richard Henderson  <rth@redhat.com>
3761
3762         * parse.y (yyoverflow): Revert.
3763
3764 2002-04-26  Richard Henderson  <rth@redhat.com>
3765
3766         PR c/3581
3767         * parse.y (string): Remove.  Update all uses to use STRING
3768         instead, and not call combine_strings.
3769         * rtti.c (tinfo_name): Use fix_string_type.
3770         * semantics.c (finish_asm_stmt): Don't call combine_strings.
3771         * spew.c (yylexstring): New.
3772         (read_token): Use it.
3773
3774 2002-04-25  Richard Henderson  <rth@redhat.com>
3775
3776         PR c/2161
3777         * parse.y (yyoverflow): New.
3778
3779 2002-04-25  Jason Merrill  <jason@redhat.com>
3780
3781         PR c++/5607
3782         * search.c (check_final_overrider): No longer static.
3783         * class.c (update_vtable_entry_for_fn): Call it.
3784         * cp-tree.h: Adjust.
3785
3786 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3787
3788         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
3789         * cp-tree.h (cxx_set_yydebug): Die.
3790         * lex.c (YYDEBUG): Get from c-lex.h.
3791         (cxx_set_yydebug): Remove.
3792         * parse.y: Include c-lex.h.
3793         (YYDEBUG): Get from c-lex.h.
3794
3795 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
3796
3797         PR c++/6438.
3798         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
3799         void.
3800
3801 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
3802
3803         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
3804         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
3805         Redefine.
3806         * cp-tree.h (cp_attribute_table): Rename.
3807         * decl.c (lang_attribute_table): Remove declaration.
3808         (cxx_init_decl_processing): Don't set it.
3809         * tree.c (cp_attribute_table): Rename.
3810
3811 2002-04-24  Jason Merrill  <jason@redhat.com>
3812
3813         PR c++/6331
3814         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
3815         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
3816         The pedwarn for array assignment is now unconditional.
3817         * tree.c (build_cplus_array_type_1): Still process simple array types
3818         normally in templates.
3819
3820         PR c++/6395
3821         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
3822         stuff for comdats.
3823
3824 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
3825
3826         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
3827         node with attributes.
3828
3829 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
3830
3831         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
3832         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
3833
3834 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
3835
3836         PR c++/6256:
3837         * pt.c (tsubst_friend_class): Handle templates with explicit
3838         nested names.
3839
3840         PR c++/6331:
3841         * typeck.c (merge_types): Remember the cv-qualification of pointer
3842         types when merging them.
3843
3844 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
3845
3846         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
3847         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
3848         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
3849         cxx_mark_function_context): New.
3850         * decl.c (push_cp_function_context, pop_cp_function_context,
3851         mark_cp_function_context): Rename for consistency.
3852         (cxx_init_decl_processing): Don't set old hooks.
3853
3854 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
3855
3856         * call.c (convert_type_from_ellipsis): Rename, update.
3857         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
3858         * cp-tree.h (convert_type_from_ellipsis): Rename.
3859         * decl.c (cxx_init_decl_processing): Don't set hook.
3860
3861 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
3862
3863         * call.c (build_new_method_call): Update.
3864         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
3865         * cp-tree.h (cxx_incomplete_type_error): New.
3866         * decl.c (grokdeclarator, grokparms): Update.
3867         * decl2.c (check_classfn): Update.
3868         * pt.c (tsubst): Update.
3869         * typeck.c (complete_type_or_else, expr_sizeof,
3870         decay_conversion): Update.
3871         * typeck2.c (incomplete_type_error): Rename.
3872         (add_exception_specifier): Update.
3873
3874 2002-04-18  Jason Merrill  <jason@redhat.com>
3875
3876         PR c++/5658
3877         * search.c (setup_class_bindings): A class template qualifies as a
3878         type binding.
3879
3880 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
3881
3882         PR c++/6316
3883         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
3884         before expanding.
3885
3886 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
3887
3888         * init.c (begin_init_stmts): Remove commented out code.
3889         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
3890         * semantics.c (begin_gobal_stmt_expr): Adjust call to
3891         expand_start_stmt_expr.
3892
3893 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
3894
3895         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
3896         dso_handle itself, to __cxa_atexit.
3897
3898 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
3899
3900         * error.c (cxx_print_error_function): Adjust call to macros.
3901
3902 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
3903
3904         * class.c (layout_virtual_bases): Do all dsize computation on trees.
3905
3906 2002-04-14  Jason Merrill  <jason@redhat.com>
3907
3908         * typeck.c (get_member_function_from_ptrfunc): Don't do
3909         gratuitious division and multiplication on
3910         ptrmemfunc_vbit_in_delta targets.
3911
3912 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
3913
3914         PR c++/5373.
3915         * semantics.c (finish_expr_stmt): Remember the type of the
3916         expression before any conversions are performed.
3917
3918 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
3919
3920         PR c++/5189.
3921         * call.c (add_template_candidate_real): Do not treat member
3922         templates as copy constructors.
3923
3924 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
3925
3926         * decl.c (duplicate_decls): Do not copy the RTL for a variable
3927         declaration if the old variable had an incomplete type and the new
3928         variable does not.
3929         (complete_vars): Do not call layout_decl for completed variables.
3930
3931 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
3932
3933         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
3934         with an explicit one.
3935         (follow_tag_typedef): New.
3936         (lookup_tag): Use it to extract the tag of an explicit typedef.
3937         (xref_tag): Likewise.
3938
3939 2002-04-11  Andrew Haley  <aph@redhat.com>
3940
3941         * typeck.c (type_after_usual_arithmetic_conversions):
3942         If two types have the same variant, return immediately.
3943         When two floating-point operands are the same precision:
3944           convert to float if one of the operands is float;
3945           if neither operand is one of the standard types, return the type
3946           of the first operand.
3947
3948 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
3949
3950         PR c++/5507
3951         * decl.c (make_typename_type): Remove implicit typenameness.
3952
3953 2002-04-09  Jason Merrill  <jason@redhat.com>
3954
3955         PR optimization/6189
3956         * semantics.c (genrtl_start_function): Don't free
3957         DECL_SAVED_FUNCTION_DATA for inline functions.
3958
3959         * init.c (build_member_call): For now, don't convert to
3960         intermediate base if it would cause an error.
3961
3962 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
3963
3964         * parse.y (namespace_qualifier, maybe_identifier,
3965         begin_explicit_instantiation, end_explicit_instantiation,
3966         apparent_template_type, .finish_template_type,
3967         do_id, maybe_init, defarg_again, component_decl_1):
3968         Add ending ';', in accordance with POSIX.
3969
3970 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
3971
3972         PR c++/5571
3973         * class.c (layout_class_type): Remember incomplete static
3974         variables.
3975         (finish_struct_1): Call complete_vars, not
3976         hack_incomplete_structures.
3977         * cp-tree.h (hack_incomplete_structures): Rename to ...
3978         (complete_vars): ... this.
3979         (struct saved_scope): Remove incomplete.
3980         (namespace_scope_incomplete): Remove.
3981         * decl.c (struct binding_level): Remove incomplete.
3982         (incomplete_vars): New variable.
3983         (mark_binding_level): Don't mark incomplete.
3984         (print_binding_level): Don't print it.
3985         (mark_saved_scope): Don't mark incomplete.
3986         (pushdecl): Use maybe_register_incopmlete_var.
3987         (cxx_init_decl_processing): Register incomplete_vars for GC.
3988         (start_decl_1): Clarify error message.
3989         (hack_incomplete_vars): Remove.
3990         (maybe_register_incomplete_var): New function.
3991         (complete_vars): Likewise.
3992
3993 2002-04-06  Jason Merrill  <jason@redhat.com>
3994
3995         PR c++/4934
3996         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
3997         set before checking it.
3998
3999         PR c++/525
4000         * init.c (build_member_call): Use build_scoped_ref.
4001         (resolve_offset_ref): Likewise.
4002         * call.c (build_scoped_method_call): Likewise.
4003         * tree.c (maybe_dummy_object): Kludge around current_class_type being
4004         wrong.
4005         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
4006         * cp-tree.h: Adjust.
4007
4008         * init.c (push_base_cleanups): Just use build_scoped_method_call.
4009
4010         PR c++/6179
4011         * method.c (implicitly_declare_fn): Pass unqualified type to
4012         synthesize_exception_spec.
4013
4014 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
4015
4016         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
4017         * cvt.c: Update comment.
4018         * init.c (expand_cleanup_for_base): Update.
4019         * semantics.c (finish_parenthesized_expr): Update.
4020         * typeck.c (cp_truthvalue_conversion): Update.
4021
4022 2002-04-04  Jason Merrill  <jason@redhat.com>
4023
4024         * semantics.c (finish_eh_cleanup): New fn.
4025         * cp-tree.h: Add prototype.
4026         * init.c (perform_member_init, expand_cleanup_for_base): Use
4027         finish_eh_cleanup.
4028         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
4029         * cp-tree.h: Remove references.
4030         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
4031         * dump.c (cp_dump_tree): Likewise.
4032         * pt.c (tsubst_expr): Likewise.
4033         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
4034         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
4035         * tree.c (cp_statement_code_p): Likewise.
4036
4037         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
4038
4039         PR c++/5636
4040         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
4041         cleanup for nrv.
4042
4043         PR c++/5104
4044         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
4045         specifiers.
4046         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
4047
4048 2002-04-03  Richard Henderson  <rth@redhat.com>
4049
4050         * cp-lang.c (cxx_warn_unused_global_decl): New.
4051         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
4052
4053 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
4054
4055         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
4056         * tree.c (init_tree): Don't set hook.
4057
4058 2002-04-03  Roger Sayle  <roger@eyesopen.com>
4059
4060         PR c++/5998:
4061         * decl.c (duplicate_decls): Don't mess with assembler names when
4062         redeclaring builtin functions as static.
4063
4064 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
4065
4066         * call.c (build_addr_func): Update.
4067         * class.c (resolve_address_of_overloaded_function): Update.
4068         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
4069         * cp-tree.h (cxx_mark_addressable): New.
4070         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
4071         * decl2.c (build_cleanup): Update.
4072         * except.c (build_throw): Update.
4073         * init.c (resolve_offset_ref): Update.
4074         * pt.c (convert_nontype_argument): Update.
4075         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
4076         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
4077         unary_complex_lvalue): Update.
4078         (mark_addressable): Rename.
4079
4080 2002-04-01  Roger Sayle  <roger@eyesopen.com>
4081
4082         PR c++/5998:
4083         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
4084         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
4085         but follow the SET_DECL_RTL idiom used elsewhere in the function.
4086
4087 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
4088
4089         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
4090         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
4091         * decl.c (grokdeclarator): Update.
4092         * mangle.c (write_integer_cst): Update.
4093         * typeck.c (build_binary_op): Update.
4094
4095 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
4096
4097         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
4098         * lex.c (cxx_init): Don't set hook.
4099
4100 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
4101
4102         * Make-lang.in (error.o): Update.
4103         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
4104         * cp-tree.h (struct diagnostic_context): Predeclare.
4105         (cxx_print_error_function): New.
4106         * error.c: Include langhooks-def.h.
4107         (lang_print_error_function): Rename.  Update.
4108         (init_error): Don't set hook.
4109
4110 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
4111
4112         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
4113         Redefine.
4114         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
4115         * decl.c (finish_enum): Similarly.
4116         * error.c (dump_type): Similarly.
4117         * lex.c (cxx_init): Similarly.
4118         * mangle.c (write_builtin_type): Similarly.
4119         * typeck.c (comptypes): Similarly.
4120
4121 2002-03-28  Roger Sayle  <roger@eyesopen.com>
4122
4123         PR c++/5998:
4124         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
4125         in the g++ front-end.
4126         (duplicate_decl): Allow redefinition of anticipated built-ins.
4127         Fix inlining problem by over-writing the old DECL_RTL.
4128         (lookup_namespace_name): Fail to find an identifier in the
4129         specified namespace if its still anticipated.
4130         (builtin_function_1): New function split out from builtin_function
4131         to create a builtin in the current namespace with given context.
4132         (builtin_function): Call builtin_function_1 to define the
4133         appropriate builtins in both the std and global namespaces.
4134         (select_decl): Don't test for anticipated decls here.
4135         (unqualified_namespace_lookup): Instead ignore them whilst
4136         searching through scopes and namespaces.
4137         * decl2.c (do_nonmember_using_decl): If a using declaration
4138         specifies an anticipated built-in function, mark it as no longer
4139         anticipated in that scope.
4140         (ambiguous_decl):  Avoid resolving to an anticipated decl.
4141         * lex.c (do_scoped_id): Fail to find an identifier in the global
4142         namespace if its still anticipated.
4143
4144 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
4145
4146         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
4147         * cp-tree.h (cp_make_lang_type): Rename.
4148         * lex.c (cp_make_lang_type): Rename.
4149         (make_aggr_type): Update.
4150         * tree.c (init_tree): Don't set make_lang_type_fn.
4151
4152 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
4153
4154         PR c++/6073
4155         * class.c (finish_struct_1): Update static field's DECL_MODE even
4156         if its type is a variant of t.
4157
4158 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
4159
4160         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
4161         * cp-tree.h (cxx_insert_default_attributes): New.
4162         * decl.c (insert_default_attributes): Rename.
4163
4164 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
4165
4166         PR c++/4884
4167         * call.c (build_op_delete_call): Allow for the fact the placement
4168         may be a COMPOUND_EXPR.
4169
4170 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
4171
4172         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
4173         * cp-tree.h (init_cplus_expand): Remove.
4174         (cxx_expand_expr): New.
4175         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
4176         fix prototype.
4177         (init_cplus_expand): Remove.
4178         * lex.c (cxx_init): Don't call init_cplus_expand.
4179
4180 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
4181
4182         PR c++/4884.
4183         * init.c (build_new_1): Allow for the fact the result of
4184         build_function_call may be a COMPOUND_EXPR.
4185
4186 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
4187
4188         PR c++/5682
4189         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
4190         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
4191         (dfs_skip_nonprimary_vbases_markedp): Remove.
4192         * search.c (get_shared_vbase_if_not_primary): Remove.
4193         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
4194         (dfs_skip_nonprimary_vbases_markedp): Remove.
4195         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
4196         (dfs_marked_real_bases_queue_p): Likewise.
4197
4198 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
4199
4200         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
4201         * cp-tree.h (cxx_mark_tree): New.
4202         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
4203
4204 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
4205
4206         * cp-tree.h (cxx_maybe_build_cleanup): New.
4207         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
4208         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
4209         * tree.c (build_target_expr): Update.
4210         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
4211
4212 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
4213
4214         * decl2.c (cxx_decode_option): Handle -E.
4215         * lang-specs.h (default_compilers): Preprocess with cc1plus.
4216         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
4217
4218 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
4219
4220         PR c++/6037
4221         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
4222
4223 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
4224
4225         * error.c (dump_type): Be careful about implicit typenames.
4226
4227 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
4228
4229         PR C++/3656
4230         * semantics.c (finish_base_specifier): Handle erronous base
4231         classes.
4232
4233 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
4234
4235         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
4236         REAL_IS_NOT_DOUBLE.
4237
4238 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
4239
4240         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
4241         an index into the vtable_entry array regardless of
4242         TARGET_PTRMEMFUNC_VBIT_LOCATION.
4243
4244 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
4245
4246         * tree.c (cp_cannot_inline_tree_fn): Same.
4247
4248 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
4249
4250         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
4251         insert_block, getdecls, global_bindings_p): New.
4252
4253 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
4254
4255         PR c++/4361
4256         * mangle.c (struct globals) Add internal_mangling_p member.
4257         (write_template_param): Do internal mangling, if needed.
4258         (mangle_conv_op_name_for_type): Request internal mangling.
4259
4260 2002-03-20  Jason Merrill  <jason@redhat.com>
4261
4262         PR c++/2136
4263         * init.c (build_delete): Check access for a member op delete here.
4264         * decl2.c (delete_sanity): Not here.
4265
4266 2002-03-19  Jason Merrill  <jason@redhat.com>
4267
4268         PR c++/5118
4269         * class.c (get_vfield_name): Use the constructor_name.
4270
4271 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
4272
4273         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
4274         * cp-tree.h (lang_printable_name): Rename.
4275         * error.c (lang_decl_name): Use new hook.
4276         * lex.c (cxx_init): Remove old hook.
4277         * pt.c (tsubst_decl): Use new hook.
4278         * tree.c (lang_printable_name): Rename.
4279
4280 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
4281
4282         PR c++/3882
4283         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
4284         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
4285         only after recording the declaration.
4286
4287 2002-03-18  Jason Merrill  <jason@redhat.com>
4288
4289         PR c++/2039
4290         * init.c (resolve_offset_ref): Hand off to build_component_ref.
4291
4292         PR c++/4222, c++/5995
4293         * call.c (build_over_call): Fix empty class logic.
4294
4295         PR c++/3870
4296         * cp-tree.h (struct saved_scope): Add last_parms field.
4297         * decl.c (maybe_push_to_top_level): Save last_function_parms.
4298         (pop_from_top_level): Restore it.
4299
4300         PR c++/4377
4301         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
4302         NON_LVALUE_EXPRs.
4303
4304         PR c++/4003
4305         * pt.c (tsubst_friend_function): Use decl_namespace_context.
4306
4307         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
4308         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
4309         type with a nontrivial destructor.
4310
4311 2002-03-17  Jason Merrill  <jason@redhat.com>
4312
4313         PR c++/4460
4314         * class.c (build_base_path): Virtual base layout is fixed in
4315         in-charge [cd]tors.
4316
4317 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
4318
4319         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
4320         * parse.y (yyparse): Remove macro.
4321
4322 2002-03-17  Jason Merrill  <jason@redhat.com>
4323
4324         PR c++/5757
4325         * init.c (build_new_1): Pass the right pointer to op delete.
4326
4327 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
4328
4329         PR c++/4361
4330         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
4331         conversion operators go.
4332         (struct lang_decl_flags): Add template_conv_p and unused
4333         bitfields.
4334         (DECL_TEMPLATE_CONV_FN_P): New macro.
4335         * call.c (build_user_type_conversion_1): Don't check second type
4336         conversion of overload set first.
4337         * class.c (add_method): Make sure templated conversion operators
4338         all end up on slot 2.
4339         * lex.c (do_identifier): A conversion operator token might be
4340         satisfied by a templated conversion operator.
4341         * pt.c (check_explicit_specialization): Use
4342         CLASSTYPE_FIRST_CONVERSION_SLOT.
4343         (template_parm_this_level_p): New function.
4344         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
4345         * search.c (lookup_fnfields_1): Template conversions will be on
4346         the first slot.
4347         * typeck.c (build_component_ref): Preserve the type of an
4348         conversion operator name on the overload type.
4349         (build_x_function_call): Retrieve the conversion operator name.
4350
4351 2002-03-15  Richard Henderson  <rth@redhat.com>
4352
4353         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
4354
4355 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
4356
4357         * cp-tree.h (CLEANUP_DECL): Remove.
4358         (CLEANUP_EXPR): Likewise.
4359         * decl.c (destroy_local_var): Simplify.
4360         (maybe_build_cleanup): Tidy.
4361         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
4362         * semantics.c (cp_expand_stmt): Likewise.
4363         * cp/tree.c (cp_statement_code_p): Likewise.
4364
4365 2002-03-15  Jason Merrill  <jason@redhat.com>
4366
4367         PR c++/5857
4368         * decl.c (duplicate_decls): Use merge_types instead of common_type.
4369         * typeck.c (common_type): Just hand off to
4370         type_after_usual_arithmetic_conversions and
4371         composite_pointer_type.
4372         (merge_types): New fn.
4373         (commonparms): Use it instead of common_type.
4374         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
4375         (composite_pointer_type): Also handle attributes.
4376         * cp-tree.h: Declare merge_types.
4377
4378         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
4379         variables.
4380         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
4381
4382 2002-03-14  Richard Henderson  <rth@redhat.com>
4383
4384         * decl.c: Include c-pragma.h.
4385         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
4386         * Make-lang.in: Update dependencies.
4387
4388 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
4389
4390         PR c++/5908
4391         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
4392         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
4393
4394 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
4395
4396         * mangle.c (write_builtin_type): Handle 128-bit integers even if
4397         they are not a standard integer type.
4398
4399 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
4400
4401         * cp-tree.h (init_init_processing): Remove declaration.
4402         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
4403         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
4404
4405 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4406
4407         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
4408         Define.
4409         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
4410         tree_code_length.
4411         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
4412         cplus_tree_code_name): Delete.
4413         (cxx_init): Don't call add_c_tree_codes, instead set
4414         lang_unsafe_for_reeval.  Don't try to copy into the various
4415         tree_code arrays.
4416
4417 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
4418
4419         PR c++/5659
4420         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
4421         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
4422         definitions.
4423
4424 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
4425
4426         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
4427         DR209 is now not a defect.
4428         * cp-tree.h (skip_type_access_control): Remove.
4429         * decl.c (grokdeclarator): Do type access control for friend
4430         declarations.
4431         * semantics.c (decl_type_access_control): Don't reset
4432         current_type_lookups.
4433         (save_type_access_control): Always save the lookups.
4434         (skip_type_access_control): Remove.
4435         (finish_class_definition): Don't change type_lookups.
4436
4437 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
4438
4439         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
4440         It is incorrect.
4441         * typeck.c (build_static_cast): Compare non-qualified types
4442         with pointer to member conversions.
4443
4444 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
4445             Daniel Berlin  <dan@dberlin.org>
4446
4447         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
4448         (cxx_get_alias_set): Use it.
4449
4450 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4451
4452         * cp-tree.h (stabilize_expr): Prototype.
4453
4454 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4455
4456         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
4457         conditional return void.
4458
4459 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
4460
4461         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
4462         * cp-tree.h (cxx_unsave): New.
4463         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
4464         (init_tree): Update.
4465
4466 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4467
4468         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
4469         explicit sizeof/sizeof.
4470         * decl2.c (cxx_decode_option): Likewise.
4471         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
4472
4473 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
4474
4475         PR c++/775
4476         * decl.c (lookup_tag): Only reject enum/class mismatch, not
4477         class/union mismatch.
4478         * parse.y (check_class_key): New function.
4479         (structsp): Call it.
4480
4481 2002-03-01  Michael Matz  <matz@suse.de>
4482
4483         * typeck.c (cp_pointer_int_sum): Complete inner type which is
4484         used later by size_in_bytes().
4485
4486 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
4487
4488         * cp-tree.h:  Require __GNUC__ to be #defined.
4489         (build_init):  Add missing prototype.
4490
4491 2002-03-01  Jason Merrill  <jason@redhat.com>
4492
4493         * except.c: Don't include decl.h or obstack.h.  Do include
4494         tree-inline.h.
4495         (build_throw): Destroy temporaries from the thrown
4496         expression before calling __cxa_throw.  Construct a thrown
4497         temporary directly into the exception object.
4498         (stabilize_throw_expr): New function.
4499         (wrap_cleanups_r): New function.
4500         * tree.c (stabilize_expr): New function.
4501         * init.c (build_init): New function.
4502         * Make-lang.in (cp/except.o): Adjust .h deps.
4503
4504 2002-02-28  Jason Merrill  <jason@redhat.com>
4505
4506         * search.c (lookup_base_r): Don't clear is_non_public just because
4507         we found a friendly scope.
4508
4509         * decl.c (finish_function): Only warn about missing return
4510         statement with -Wreturn-type.
4511
4512 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
4513
4514         * class.c (build_clone): Update.
4515         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
4516         * cp-tree.h (cxx_dup_lang_specific_decl): New.
4517         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
4518         (copy_decl): Update.
4519         * method.c (make_thunk): Update.
4520
4521 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
4522
4523         * decl2.c: Delete traditional-mode-related code copied from
4524         the C front end but not used, or used only to permit the
4525         compiler to link.
4526
4527 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
4528
4529         PR c++/4093
4530         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
4531         to void.
4532
4533 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
4534
4535         PR other/5746
4536         * semantics.c (finish_switch_cond): Don't call get_unwidened
4537         if error_mark_node.
4538
4539 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
4540
4541         PR c++/2645, DR 295
4542         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
4543         tf_keep_type_decl.
4544         (make_typename_type): Use tsubst_flags_t.
4545         * decl.c (make_typename_type): Adjust. Return non-artificial
4546         TYPE_DECLs, if required.
4547         (grokdeclarator): Simplify CVR qualification handling. Allow bad
4548         qualifiers on typedef types.
4549         * decl2.c (handle_class_head): Adjust make_typename_type call.
4550         * parse.y (nested_name_specifier): Likewise.
4551         (typename_sub0): Likewise.
4552         (typename_sub1): Likewise.
4553         * pt.c (convert_template_argument): Adjust make_typename_type
4554         return value.
4555         (tsubst): Adjust cp_build_qualified_type_real calls.
4556         (check_cv_quals_for_unify): Cope with allowing bad qualifications
4557         on template type parms.
4558         (instantiate_decl): Recheck substitutions to give warnings on bad
4559         qualifications.
4560         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
4561
4562 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
4563
4564         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
4565
4566         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
4567         unless DECL_ALWAYS_INLINE.
4568
4569 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
4570
4571         * typeck.c (cp_pointer_int_sum): Renamed from
4572         pointer_int_sum, call pointer_int_sum.
4573
4574 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
4575
4576         * decl.c (duplicate_decls): Return 0 if issued error about
4577         redeclaration.
4578
4579 2002-02-19  Jason Merrill  <jason@redhat.com>
4580
4581         ABI change: Mangle `void (A::*)() const' as
4582         M1AKFvvE, not MK1AFvvE.
4583         * mangle.c (write_function_type): Write cv-quals for member
4584         function type here.
4585         (write_pointer_to_member_type): Not here.
4586
4587 2002-02-18  Jason Merrill  <jason@redhat.com>
4588
4589         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
4590         (do_decl_instantiation): Likewise.
4591
4592 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4593
4594         PR c++/5685
4595         * decl.c (duplicate_decls): Make warning unconditional
4596         if duplicate default argument declarations are present.
4597
4598 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
4599
4600         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
4601         shortening.
4602
4603 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
4604
4605         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
4606         remove incorrect comment. Move #if 0'd code to common path. Use
4607         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
4608
4609 2002-02-13  Jason Merrill  <jason@redhat.com>
4610
4611         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
4612         (finish_function): Don't warn if current_function_returns_null.
4613
4614         * typeck2.c (digest_init): Do handle values of vector type.
4615
4616         * typeck2.c (digest_init, process_init_constructor): Treat vectors
4617         like arrays.
4618
4619 2002-02-11  Jason Merrill  <jason@redhat.com>
4620
4621         * parse.y (reserved_declspecs): Don't handle attributes.
4622         (reserved_typespecquals): Handle them here.
4623         * Make-lang.in (parse.c): Adjust expected conflicts.
4624
4625 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
4626
4627         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
4628         instead of compstmt.
4629         (compstmt_or_stmtexpr): Renamed from compstmt.
4630         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
4631
4632 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
4633
4634         Rename instantiate_type_flags to tsubst_flags_t & expand use.
4635         * cp-tree.h (instantiate_type_flags): Rename to ...
4636         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
4637         add tf_warning flag.
4638         (instantiate_type): Adjust prototype.
4639         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
4640         do_type_instantiation, cp_build_qualified_type_real): Likewise.
4641         cp_build_qualified_type: Adjust.
4642         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
4643         tf_*.
4644         * call.c (standard_conversion): Rename itf_* to tf_*.
4645         (reference_binding): Likewise.
4646         (convert_like_real): Likewise.
4647         * cvt.c (cp_convert_to_pointer): Likewise.
4648         (convert_to_reference): Likewise.
4649         * decl.c (lookup_namespace_name): Use tf_* flags.
4650         (make_typename_type): Likewise.
4651         (grokdeclarator): Likewise.
4652         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
4653         (coerce_template_template_parms, convert_template_argument,
4654         coerce_template_parms, maybe_get_template_decl_from_type_decl,
4655         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
4656         instantiate_class_template, tsubst_template_arg_vector,
4657         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
4658         tsubst_decl, tsubst_arg_types, tsubst_function_type,
4659         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
4660         instantiate_template, fn_type_unification,
4661         resolve_overloaded_unification, verify_class_unification,
4662         unify, get_bindings_real, do_type_instantiation,
4663         regenerate_decl_from_template, instantiate_decl,
4664         tsubst_initializer_list, tsubst_enum,
4665         get_mostly_instantiated_function_type,
4666         invalid_nontype_parm_type_p): Likewise.
4667         * tree.c (cp_build_qualified_type_real): Likewise.
4668         * typeck.c (build_binary_op): Rename itf_* to tf_*.
4669         (build_ptrmemfunc): Likewise.
4670         (convert_for_assignment): Likewise.
4671
4672 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
4673
4674         PR c++/109
4675         * decl.c (grokdeclarator): Allow friend declarations from
4676         dependent types.
4677         * decl2.c (handle_class_head): Don't push into template parm contexts.
4678         * pt.c (push_template_decl_real): Template parm contexts are never
4679         being defined.
4680
4681 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
4682
4683         * class.c: Include target.h.
4684         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
4685         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
4686         bit-field layout.
4687         * Make-lang.in: Adjust deps.
4688
4689 2002-02-05  Jason Merrill  <jason@redhat.com>
4690
4691         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
4692
4693 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
4694
4695         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
4696         (finish_switch_cond): Set SWITCH_TYPE.
4697
4698 2002-02-04  Richard Henderson  <rth@redhat.com>
4699
4700         * method.c (use_thunk): Always initialize the block tree.  Reindent.
4701         * semantics.c (expand_body): Emit thunks after function, not before.
4702
4703 2002-02-04  Jason Merrill  <jason@redhat.com>
4704
4705         * decl.c (start_function): Call cplus_decl_attributes immediately
4706         after grokdeclarator.
4707
4708         * decl.c (start_function): Combine DECL_RESULT handling code.
4709
4710 2002-02-03  Jason Merrill  <jason@redhat.com>
4711
4712         * xref.c: Remove.
4713         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
4714         (cp/xref.o): Remove dependencies.
4715         * class.c (finish_struct_1, check_methods): Don't call xref fns.
4716         (finish_struct_1): Likewise.
4717         * friend.c (make_friend_class): Likewise.
4718         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
4719         * spew.c (read_process_identifier): Likewise.
4720
4721 2002-02-01  Jason Merrill  <jason@redhat.com>
4722
4723         PR c++/4872
4724         * decl.c (finish_function): Warn about a non-void function with
4725         no return statement and no abnormal exit.
4726         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
4727         (current_function_returns_abnormally): New macro.
4728         * call.c (build_call): Set it.
4729
4730         * typeck.c (build_component_ref): Always complain about offsetof
4731         constructs on non-PODs.  Only make it an error for members of
4732         virtual bases.
4733
4734         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
4735         (dump_function_decl): Always dump parms.
4736
4737         * decl2.c (finish_static_data_member_decl): Complain about a local
4738         class with a static data member.
4739
4740         PR c++/4286
4741         * search.c (lookup_field_1): Don't xref a static data member
4742         just because we looked it up.
4743
4744 2002-01-31  Jason Merrill  <jason@redhat.com>
4745
4746         * Make-lang.in (parse.c): Handle .output file.
4747
4748         PR c++/3395
4749         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
4750         not TREE_TYPE.
4751         * semantics.c (finish_class_definition): Adjust.
4752
4753         Allow attributes in parms and casts.
4754         * parse.y (named_parm): Don't strip attrs.
4755         (declmods): Remove 'attributes' production.
4756         (nonempty_cv_qualifiers): Accept attributes.
4757         (ATTRIBUTE): Give precedence.
4758         * decl.c (groktypename): Handle attributes.
4759         (grokparms): Likewise.
4760
4761 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
4762
4763         * decl2.c (cxx_decode_option): Pass 0 as last argument to
4764         cpp_handle_option.
4765         * lang-specs.h: Use cpp_unique_options instead of cpp_options
4766         when used together with cc1_options.
4767
4768 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
4769
4770         PR c++/5132
4771         * typeck2.c (digest_init): Make sure non-array core type is
4772         instantiated.
4773         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
4774         constructor, rather than build a new one.
4775         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
4776         PURPOSE of constructor elts.
4777
4778 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
4779
4780         * Make-lang.in (parse.c): Adjust expected number of
4781         shift-reduce conflicts.
4782         (decl.o): Depend on diagnostic.h.
4783         * decl.c: Include diagnostic.h.
4784         (grokdeclarator): Check for null pointer.
4785         (finish_function): Don't abort when
4786         current_binding_level->parm_flag != 1, if errors have
4787         occurred; throw away the statement tree and extra binding
4788         levels, and continue.
4789         * lex.c (note_list_got_semicolon): Check for null pointer.
4790         * method.c (hack_identifier): Just return error_mark_node if
4791         value is error_mark_node.
4792         * parse.y (primary: TYPEID(type_id)): No need to use
4793         TYPE_MAIN_VARIANT here.
4794         (handler_seq): Accept an empty list of catch clauses and
4795         generate a fake handler block to avoid later crashes.
4796         (ansi_raise_identifier): Accept the error token too.
4797         * semantics.c (begin_class_definition,
4798         finish_class_definition): Check for error_mark_node.
4799
4800 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
4801
4802         * typeck2.c (friendly_abort): Delete definition.
4803         * cp-tree.h (friendly_abort): Don't prototype.
4804         (my_friendly_assert): Use fancy_abort.
4805
4806 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4807
4808         * cp-tree.h (my_friendly_abort): Remove.
4809
4810 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
4811
4812         * spew.c (pending_inlines, pending_inlines_tail,
4813         processing_these_inlines): Make static.
4814         (mark_pending_inlines): Remove static.
4815         (begin_parsing_inclass_inline): If in function, save pi
4816         for GC to cp_function_chain->unparsed_inlines instead.
4817         (process_next_inline): Likewise.
4818         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
4819         (mark_pending_inlines): Add prototype.
4820         * decl.c (spew_debug): Remove unused extern.
4821         (mark_lang_function): Call mark_pending_inlines.
4822
4823 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4824
4825         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
4826         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
4827         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
4828         Change my_fancy_abort() to abort().
4829
4830 2002-01-23  Jason Merrill  <jason@redhat.com>
4831
4832         PR c++/5453
4833         * class.c (fixed_type_or_null): Fix thinko.
4834
4835         PR c++/3331
4836         * init.c (resolve_offset_ref): Use build_indirect_ref.
4837
4838         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
4839
4840 2002-01-22  Jason Merrill  <jason@redhat.com>
4841
4842         * parse.y (function_body): Suppress the block for the outermost
4843         curly braces.
4844         * decl.c (pushdecl): Don't try to skip it.
4845         (begin_function_body): Keep the block we create, not the next one.
4846         * init.c (emit_base_init): Don't mess with keep_next_level.
4847
4848         * class.c (build_base_path): Tweak formatting.
4849
4850 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
4851
4852         Fix regression introduced with patch for c++/775
4853         * parse.y (class_head_defn): Check for template specializations
4854         with a different class-key.
4855
4856 2002-01-17  Jason Merrill  <jason@redhat.com>
4857
4858         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
4859         (begin_function_body): Call them and keep_next_level.
4860         * init.c (emit_base_init): Call keep_next_level.
4861         * semantics.c (setup_vtbl_ptr): Lose.
4862         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
4863         (vtbls_set_up_p): Lose.
4864         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
4865         * method.c (do_build_copy_constructor): Likewise.
4866         (synthesize_method): Call finish_mem_initializers.
4867         * parse.y (nodecls): Likewise.
4868
4869         * error.c (dump_type_suffix): Print the exception specs before
4870         recursing.
4871         (dump_function_decl): Here, too.
4872
4873         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
4874
4875 2002-01-10  Ira Ruben   <ira@apple.com>
4876
4877         PR c++/907
4878         * decl.c (start_method): Handle attrlist.
4879
4880 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
4881
4882         * decl2.c (max_tinst_depth): Increase default limit to 500.
4883
4884 2002-01-10  Graham Stott  <grahams@redhat.com>
4885
4886         * spew.c (YYCHAR): Uppercase macro parameter and add
4887         parenthesis.
4888         (YYCODE): Likewise.
4889         (NAME): Uppercase macro parameter.
4890
4891 2002-01-09  Graham Stott  <grahams@redhat.com>
4892
4893         * decl.h (grokdeclarator): Wrap long line.
4894
4895         * semantics.c (FINISH_COND): Uppercase macro paramaters and
4896         add parenthesis.
4897
4898 2002-01-08  Graham Stott  <grahams@redhat.com>
4899
4900         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
4901         (PALLOC): Uppercase macro parameter and whitespace.
4902         (SALLOC): Uppercase macro parameter.
4903         (SFREE): Uppercase macros parameter, add parenthese and
4904         whitespace.
4905         (STREQL): Uppercase macro parameter and whitespace.
4906         (STRNEQ): Likewise.
4907         (STRLSS): Likewise.
4908         (STRLEQ): Likewise.
4909         (STRGTR): Likewise.
4910         (STRGEQ): Likewise.
4911
4912         * call.c (convert_like): Add parenthesis and wrap.
4913         (convert_like_with_context): Likewise.
4914         (ICS_RANK): Whitespace.
4915         (NEED_TEMPORARY_P): Remove parenthesis.
4916
4917         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
4918         whitespace.
4919         (VTT_MARKED_BINFO_P): Likewise.
4920
4921         * decl.c (BINDING_LEVEL): Add parenthesis.
4922         (DEF_OPERATOR): Likewise.
4923
4924         * mangle.c (MANGLE_TRACE): Add parenthesis.
4925         (MANGLE_TRACE_TREE): Likewise.
4926         (write_signed_number): Likewise.
4927         (write_unsigned_number): Likewise.
4928
4929         * pt.c (ccat): Uppercase macro parameter.
4930         (cat): Likewise
4931
4932         * search.c (SET_BINFO_ACCESS): Add parenthesis.
4933
4934 2002-01-07  Jason Merrill  <jason@redhat.com>
4935
4936         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
4937         to pedwarn.
4938
4939         PR c++/3536
4940         * method.c (make_thunk): If !flag_weak, give the thunk the
4941         function's linkage.
4942         (use_thunk): Here, too.
4943
4944 2002-01-07  Graham Stott  <grahams@redhat.com>
4945
4946         * error.c: Update copyright date.
4947         (print_scope_operator): Add parenthesis.
4948         (print_left_paren): Likewise.
4949         (print_right_paren): Likewise.
4950         (print_left_bracket): Likewise.
4951         (print_right_bracket): Likewise.
4952         (print_template_argument_list_start): Likewise.
4953         (print_template_argument_list_end): Likewise.
4954         (print_non_consecutive_character): Likewise.
4955         (print_tree_identifier): Likewise.
4956         (print_identifier): Likewise.
4957         (NEXT_CODE): Uppercase macro parameter.
4958         (ident_fndecl): Delete unused.
4959         (GLOBAL_THING): Likewise.
4960
4961 2002-01-06  Graham Stott  <grahams@redhat.com>
4962
4963         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
4964         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
4965         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
4966         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
4967         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
4968         (C_IS_RESERVED_WORD): Uppercase macro parameter.
4969         (C_RID_YYCODE) Likewise.
4970         (ptrmem_cst): Use rtx.
4971         (LOCAL_BINDING_P): Add whitespace.
4972         (INHERITED_VALUE_BINDING_P): Likewise.
4973         (BINDING_SCOPE): Wrap long line.
4974         (BINDING_HAS_LEVEL_P): Remove parenthesis.
4975         (BINDING_VALUE): Wrap long line.
4976         (BINDING_TYPE): Whitespace.
4977         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
4978         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
4979         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
4980         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
4981         (same_type_p): Uppercase macro parameters.
4982         (same_type_ignoring_top_level_qualifiers_p): Likewise.
4983         (OVL_FUNCTION): Wrap long line.
4984         (OVL_CHAIN): Whitespace.
4985         (OVL_CURRENT): Add parenthesis and whitespace.
4986         (OVL_NEXT): Whitespace.
4987         (OVL_USED): Likewise.
4988         (IDENTIFIER_TYPE_VALUE): Likewise.
4989         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
4990         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
4991         (LANG_ID_FIELD): Whitespace.
4992         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
4993         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
4994         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
4995         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
4996         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
4997         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
4998         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
4999         (IDENTIFIER_VIRTUAL_P): Likewise.
5000         (IDENTIFIER_OPNAME_P): Likewise.
5001         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
5002         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
5003         (C_SET_EXP_ORIGINAL_CODE): Likewise.
5004         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
5005         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
5006         (IS_AGGR_TYPE): Uppercase macro parameter.
5007         (CLASS_TYPE_P): Likewise.
5008         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
5009         (IS_AGGR_TYPE_2): Whitespace.
5010         (TAGGED_TYPE_P): Uppercase macro parameter.
5011         (TYPE_BUILT_IN): Whitespace.
5012         (TYPE_FOR_JAVA): Likewise.
5013         (FUNCTION_ARG_CHAIN): Remove parenthesis.
5014         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
5015         (FUNCTION_FIRST_USER_PARAM): Likewise.
5016         (PROMOTES_TO_AGGR_TYPE): Whitespace.
5017         (DERIVED_FROM_P): Add parenthesis and wrap.
5018         (UNIQUELY_DERIVED_FROM_P): Likewise.
5019         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
5020         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
5021         (CLASSTYPE_USE_TEMPLATE): Whitespace.
5022         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
5023         (TYPE_GETS_DELETE): Add parenthesis.
5024         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
5025         (TYPE_HAS_ASSIGN_REF): Likewise,
5026         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
5027         (TYPE_HAS_INIT_REF): Likewise.
5028         (TYPE_HAS_CONST_INIT_REF): Likewise.
5029         (TYPE_BEING_DEFINED): Likewise.
5030         (TYPE_LANG_SPECIFIC): Likewise.
5031         (CLASSTYPE_RTTI): Likewise.
5032         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
5033         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
5034         (TYPE_OVERLOADS_ARROW): Likewise.
5035         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
5036         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
5037         (CLASSTYPE_METHOD_VEC): Likewise.
5038         (CLASSTYPE_MARKED_N): Likewise.
5039         (CLASSTYPE_MARKED): Likewise.
5040         (CLASSTYPE_MARKED2): Likewise.
5041         (CLASSTYPE_MARKED3): Likewise.
5042         (CLASSTYPE_MARKED4): Likewise.
5043         (CLASSTYPE_MARKED5): Likewise.
5044         (CLASSTYPE_MARKED6): Likewise.
5045         (SET_CLASSTYPE_MARKED): Whitespace.
5046         (CLEAR_CLASSTYPE_MARKED): Likewise.
5047         (SET_CLASSTYPE_MARKED2): Likewise.
5048         (CLEAR_CLASSTYPE_MARKED2): Likewise.
5049         (SET_CLASSTYPE_MARKED3): Likewise.
5050         (CLEAR_CLASSTYPE_MARKED3): Likewise.
5051         (SET_CLASSTYPE_MARKED4): Likewise.
5052         (CLEAR_CLASSTYPE_MARKED4): Likewise.
5053         (SET_CLASSTYPE_MARKED5): Likewise.
5054         (CLEAR_CLASSTYPE_MARKED5): Likewise.
5055         (SET_CLASSTYPE_MARKED6): Likewise.
5056         (CLEAR_CLASSTYPE_MARKED6): Likewise.
5057         (CLASSTYPE_TAGS): Likewise.
5058         (CLASSTYPE_VSIZE): Likewise.
5059         (CLASSTYPE_VBASECLASSES): Likewise.
5060         (CANONICAL_BINFO): Add parenthesis.
5061         (CLASSTYPE_SIZE(NODE): Likewise.
5062         (CLASSTYPE_SIZE_UNIT): Likewise.
5063         (CLASSTYPE_ALIGN(NODE): Likewise.
5064         (CLASSTYPE_USER_ALIGN): Likewise.
5065         (TYPE_JAVA_INTERFACE): Likewise.
5066         (CLASSTYPE_PURE_VIRTUALS): Likewise.
5067         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
5068         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
5069         (CLASSTYPE_HAS_MUTABLE): Likewise.
5070         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
5071         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
5072         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
5073         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
5074         (CLASSTYPE_INTERFACE_ONLY): Likewise.
5075         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
5076         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
5077         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
5078         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
5079         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
5080         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
5081         (BINFO_UNSHARED_MARKED): Whitespace.
5082         (BINFO_MARKED): Whitespace and wrap.
5083         (SET_BINFO_MARKED): Likewise.
5084         (CLEAR_BINFO_MARKED): Likewise.
5085         (BINFO_VTABLE_PATH_MARKED): Likewise.
5086         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
5087         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
5088         (BINFO_SUBVTT_INDEX): Remove parenthesis.
5089         (BINFO_VPTR_INDEX): Likewise.
5090         (BINFO_PRIMARY_BASE_OF): Likewise,
5091         (CLASSTYPE_VFIELDS): Whitespace.
5092         (VF_DERIVED_VALUE): Wrap long line.
5093         (NAMESPACE_LEVEL): Whitespace.
5094         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
5095         (DEFARG_POINTER): Whitespace.
5096         (DECL_NEEDED_P): Remove parenthesis.
5097         (DECL_LANGUAGE): Whitespace.
5098         (SET_DECL_LANGUAGE): Add parenthesis.
5099         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
5100         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
5101         (DECL_IN_AGGR_P): Whitespace.
5102         (DECL_FRIEND_P): Likewise.
5103         (DECL_BEFRIENDING_CLASSES): Likewise.
5104         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
5105         (DECL_NONCONVERTING_P): Whitespace.
5106         (DECL_PURE_VIRTUAL_P): Likewise.
5107         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
5108         (DECL_PENDING_INLINE_INFO): Whitespace.
5109         (DECL_SORTED_FIELDS): Likewise.
5110         (DECL_DEFERRED_FN): Likewise.
5111         (DECL_TEMPLATE_INFO): Likewise.
5112         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
5113         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
5114         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
5115         (TMPL_ARGS_LEVEL): Likewise.
5116         (SET_TMPL_ARGS_LEVEL): Likewise.
5117         (INNERMOST_TEMPLATE_PARMS): Whitespace.
5118         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
5119         (INTEGRAL_CODE_P(CODE): Add parenthesis.
5120         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
5121         (TYPE_HAS_CONSTRUCTOR): Whitespace.
5122         (TREE_HAS_CONSTRUCTOR): Likewise.
5123         (TYPE_HAS_DESTRUCTOR): Likewise.
5124         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
5125         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
5126         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
5127         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
5128         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
5129         (TYPE_PTRMEMFUNC_P): Likewise.
5130         (TYPE_PTRMEMFUNC_FLAG): Likewise.
5131         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
5132         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
5133         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
5134         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
5135         (DECL_ACCESS): Whitespace.
5136         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
5137         (DECL_GLOBAL_DTOR_P): Likewise.
5138         (GLOBAL_INIT_PRIORITY): Likewise.
5139         (DECL_TEMPLATE_PARMS): Likewise.
5140         (DECL_TEMPLATE_RESULT): Likewise.
5141         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
5142         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
5143         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
5144         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
5145         (PRIMARY_TEMPLATE_P): Add parenthesis.
5146         (DECL_USE_TEMPLATE): Whitespace.
5147         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
5148         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
5149         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
5150         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
5151         (CALL_DECLARATOR_PARMS): Remove parenthesis.
5152         (CALL_DECLARATOR_QUALS): Likewise.
5153         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
5154         (TEMP_NAME_P): Wrap.
5155         (VFIELD_NAME_P): Likewise.
5156         (B_SET): Uppercase macro parameters and add parenthesis.
5157         (B_CLR): Likewise.
5158         (B_TST): Likewise.
5159         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
5160         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
5161         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
5162         (same_or_base_type_p): Likewise.
5163         (cp_deprecated): Likewise.
5164
5165 2002-01-05  Richard Henderson  <rth@redhat.com>
5166
5167         * semantics.c (expand_body): Revert last change.
5168
5169 2002-01-04  Jason Merrill  <jason@redhat.com>
5170
5171         PR c++/4122
5172         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
5173         lost primary.
5174
5175         * class.c (build_vtbl_initializer): Check for a lost primary
5176         before calculating the vtable entry to throw away.
5177
5178 2002-01-02  Jason Merrill  <jason@redhat.com>
5179
5180         * semantics.c (expand_body): Call outlining_inline_function when
5181         emitting an inline function out of line.
5182
5183 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5184
5185         PR c++/5116, c++/764 reversion
5186         * call.c (build_new_op): Revert the instantiations. They are
5187         incorrect.
5188
5189 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5190
5191         PR c++/5089
5192         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
5193
5194 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5195
5196         PR c++/3716
5197         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
5198         (tsubst, case POINTER_TYPE): Handle pmfs here.
5199         (tsubst, case OFFSET_TYPE): Check it is not an offset to
5200         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
5201
5202 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5203
5204         PR c++/35
5205         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
5206         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
5207         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
5208         PARM_DECL.
5209         (tsubst_template_parms): Break up loop statements.
5210         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
5211         parm PARM_DECLs don't get promoted.
5212
5213 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5214
5215         PR c++/5123
5216         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
5217         (build_x_function_call): Cope with a COMPONENT_REF containing a
5218         TEMPLATE_ID_EXPR.
5219
5220 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5221
5222         PR c++/5213
5223         * pt.c (convert_template_argument): Be more careful determining
5224         when RECORD_TYPE templates are or are not templates.
5225
5226 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5227
5228         PR c++/775
5229         * cp-tree.h (handle_class_head): Adjust prototype.
5230         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
5231         parameters. Use for all class heads.
5232         * parse.y (named_class_head_sans_basetype, named_class_head,
5233         named_complex_class_head_sans_basetype,
5234         named_class_head_sans_basetype_defn,
5235         unnamed_class_head): Remove.
5236         (class_head, class_head_apparent_template): Recognize class heads
5237         (class_head_decl, class_head_defn): New reductions. Process class
5238         heads.
5239         (structsp): Adjust class definition and class declaration
5240         reductions.
5241         (maybe_base_class_list): Give diagnostic on empty list.
5242
5243 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5244
5245         PR c++/4379
5246         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
5247         single non-static member.
5248         (unary_complex_lvalue): If it cannot be a pointer to member, don't
5249         make it so. Check it is not pointer to reference.
5250
5251 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5252
5253         PR c++/5132
5254         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
5255         are processing a template decl.
5256
5257 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5258
5259         PR c++/5116, c++/764
5260         * call.c (build_new_op): Make sure template class operands are
5261         instantiated. Simplify arglist construction.
5262
5263 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
5264
5265         * call.c (build_user_type_conversion_1): Use my_friendly_assert
5266         rather than if ... abort.
5267         * cvt.c (convert_to_reference): Likewise.
5268         * semantics.c (setup_vtbl_ptr): Likewise.
5269         * pt.c (lookup_template_class): Comment typo.
5270
5271 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
5272
5273         PR c++/5125
5274         * pt.c (push_template_decl_real): Make sure DECL has
5275         DECL_LANG_SPECIFIC.
5276
5277 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
5278
5279         PR c++/335
5280         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
5281         for non-reference fields.
5282         * typeck.c (require_complete_type): Use resolve_offset_ref).
5283
5284 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
5285
5286         PR c++/196
5287         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
5288
5289 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
5290
5291         PR c++/160
5292         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
5293         up. Don't stabilize_references when initializing a reference.
5294
5295 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5296
5297         * decl2.c (lang_f_options): Const-ify.
5298
5299 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
5300
5301         * config-lang.in (diff_excludes): Remove.
5302
5303 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
5304
5305         PR c++/90
5306         * typeck.c (build_function_call_real): Use original function
5307         expression for errors.
5308
5309 2001-12-18  Jason Merrill  <jason@redhat.com>
5310
5311         PR c++/3242
5312         * class.c (add_method): Do compare 'this' quals when trying to match a
5313         used function.  Don't defer to another used function.
5314
5315 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
5316
5317         * pt.c (instantiate_clone): Remove, fold into ...
5318         (instantiate_template): ... here. Simplify by removing mutual
5319         recursion.
5320         * typeck2.c (build_m_component_ref): Don't cv qualify the function
5321         pointed to by a pointer to function.
5322         * class.c (delete_duplicate_fields_1): Typo.
5323
5324 2001-12-18  Jason Merrill  <jason@redhat.com>
5325
5326         C++ ABI change: destroy value arguments in caller.
5327         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
5328         create an extra binding level for the parameters.
5329         * decl.c (store_parm_decls): Don't do parameter cleanups.
5330
5331 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
5332
5333         * call.c (build_new_method_call): Use '%#V'.
5334         * error.c (cv_to_string): Use V parameter to determine padding.
5335
5336 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
5337
5338         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
5339         spellings in messages.
5340
5341 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
5342
5343         * cp-tree.h: Delete #defines for cp_error, cp_warning,
5344         cp_pedwarn, and cp_compiler_error.
5345         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
5346         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
5347         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
5348         typeck2.c: Change calls to the above macros to use their
5349         language-independent equivalents: error, warning, pedwarn, and
5350         internal_error respectively.
5351
5352 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
5353
5354         * decl2.c (finish_file): Remove back_end_hook.
5355
5356 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
5357
5358         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
5359         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
5360         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
5361
5362 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
5363
5364         * lang-options.h: Use American spelling in messages.
5365
5366 2001-12-13  Jason Merrill  <jason@redhat.com>
5367
5368         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
5369
5370         Use cleanups to run base and member destructors.
5371         * init.c (push_base_cleanups): New function, split out from...
5372         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
5373         * decl.c (finish_destructor_body): Move vbase destruction code to
5374         push_base_cleanups.
5375         (begin_function_body, finish_function_body): New fns.
5376         (finish_function): Move [cd]tor handling and call_poplevel to
5377         finish_function_body.
5378         (pushdecl): Skip the new level.
5379         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
5380         (setup_vtbl_ptr): Call push_base_cleanups.
5381         * method.c (synthesize_method): Call {begin,end}_function_body.
5382         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
5383         * cp-tree.h: Declare new fns.
5384         * parse.y (function_body, .begin_function_body): New nonterminals.
5385         (fndef, pending_inline, function_try_block): Use function_body.
5386         (ctor_initializer_opt, function_try_block): No longer has a value.
5387         (base_init): Remove .set_base_init token.
5388         (.set_base_init, compstmt_or_error): Remove.
5389         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
5390
5391         * optimize.c (maybe_clone_body): Fix parameter updating.
5392
5393 2001-12-12  Jason Merrill  <jason@redhat.com>
5394
5395         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
5396         * semantics.c (genrtl_start_function): Don't pass
5397         parms_have_cleanups or push an extra binding level.
5398         (genrtl_finish_function): Lose cleanup_label cruft.
5399
5400         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
5401         (ctor_label): Remove.
5402         * semantics.c (finish_return_stmt): Lose ctor_label support.
5403         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
5404         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
5405         dtor_label.
5406
5407         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
5408         check for [cd]tors.
5409         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
5410
5411         * decl.c (finish_function): Check VMS_TARGET, not VMS.
5412
5413         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
5414         (end_cleanup_fn): And poplevel.
5415
5416         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
5417         if we're in a template.
5418
5419 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
5420
5421         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
5422         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
5423         THIS_NAME_P): Delete.
5424         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
5425         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
5426         with internal naming scheme.
5427         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
5428
5429 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
5430
5431         * decl.c (grokdeclarator): Deprecated implicit typename use.
5432
5433 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
5434
5435         PR g++/51
5436         * parse.y (frob_specs): Indicate it is a language linkage which
5437         contained the extern.
5438         * decl.c (grokdeclarator): Allow extern language linkage with
5439         other specifiers.
5440
5441 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
5442
5443         PR g++/72
5444         * decl.c (add_binding): Don't reject duplicate typedefs involving
5445         template parameters.
5446
5447 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
5448
5449         * parse.y, semantics.c: Similarly.
5450
5451 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
5452
5453         PR g++/87
5454         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
5455         (copy_args_p): Rename to ...
5456         (copy_fn_p): ... here.
5457         (grok_special_member_properties): New function.
5458         (grok_op_properties): Lose VIRTUALP parameter.
5459         (copy_assignment_arg_p): Remove.
5460         * call.c (build_over_call): Use copy_fn_p.
5461         * decl.c (grokfndecl): Reformat. Adjust call to
5462         grok_op_properties.
5463         (copy_args_p): Rename to ...
5464         (copy_fn_p): ... here. Reject template functions. Check for pass
5465         by value.
5466         (grok_special_member_properties): Remember special functions.
5467         (grok_ctor_properties): Don't remember them here, just check.
5468         (grok_op_properties): Likewise.
5469         (start_method): Call grok_special_member_properties.
5470         * decl2.c (grokfield): Likewise.
5471         (copy_assignment_arg_p): Remove.
5472         (grok_function_init): Don't remember abstract assignment here.
5473         * pt.c (instantiate_class_template): Call
5474         grok_special_member_properties.
5475         (tsubst_decl): Adjust grok_op_properties call.
5476
5477 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
5478
5479         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
5480         RID_TYPES_COMPATIBLE_P.
5481
5482 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5483
5484         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
5485         call to build_aggr_init.
5486         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
5487
5488 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
5489
5490         * parse.y: Replace uses of the string non-terminal with STRING.
5491         Don't perform string concatentaion here.
5492         (string): Remove non-terminal.
5493         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
5494
5495 2001-12-05  Jason Merrill  <jason@redhat.com>
5496
5497         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
5498         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
5499         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
5500         * pt.c (push_tinst_level): No longer static.
5501         * cp-tree.h: Declare them.
5502
5503         * init.c (resolve_offset_ref): Don't check access for the base
5504         conversion to access a FIELD_DECL.
5505
5506         * cp-tree.h (TYPE_REFFN_P): New macro.
5507         * decl.c (bad_specifiers): Check it, too.
5508
5509         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
5510         on the __*_type_info type if we haven't seen a definition.
5511
5512 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
5513
5514         * decl.c: Include c-common.h.
5515         (shadow_warning): Move to c-common.c.
5516
5517 Wed Dec  5 17:00:49 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5518
5519         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
5520
5521 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
5522
5523         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
5524
5525 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
5526
5527         PR g++/164
5528         * init.c (sort_base_init): Allow binfos to be directly specified.
5529         * method.c (do_build_copy_constructor): Explicitly convert to the
5530         base instance.
5531         (do_build_assign_ref): Likewise.
5532
5533 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
5534
5535         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
5536         declaration and initialization.
5537
5538 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
5539
5540         * typeck2.c: Remove leading capital from diagnostic messages, as
5541         per GNU coding standards.
5542
5543 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
5544
5545         PR c++/3394
5546         * decl.c (xref_basetypes): Handle attributes between
5547         'class' and name.
5548
5549 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
5550
5551         PR g++/3381
5552         * parse.y (named_complex_class_head_sans_basetype): Add new
5553         reduction.
5554         * Make-lang.in (parse.c): Adjust expected conflict count.
5555
5556 2001-12-03  Jason Merrill  <jason@redhat.com>
5557
5558         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
5559         immediate binfos for our virtual bases.
5560
5561 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
5562
5563         * call.c (build_java_interface_fn_ref): Similarly.
5564         * except.c (is_admissible_throw_operand): Similarly.
5565         * init.c (build_java_class_ref): Similarly.
5566         * xref.c (open_xref_file): Similarly.
5567
5568 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5569
5570         * class.c (finish_struct): Remove trailing periods from messages.
5571         * decl.c (check_tag_decl): Similarly.
5572         * lex.c (cxx_set_yydebug): Similarly.
5573         * typeck2.c (friendly_abort): Similarly.
5574
5575 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
5576
5577         PR c++/3048
5578         * cp-tree.h (ovl_member): Remove.
5579         * decl2.c (merge_functions): Handle extern "C" functions
5580         specially.
5581         * tree.c (ovl_member): Remove.
5582
5583 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
5584
5585         PR c++/4842
5586         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
5587         FUNCTION_DECL, as input.
5588         (mark_overriders): Remove.
5589         (warn_hidden): Rework for the new ABI.
5590
5591 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
5592
5593         PR c++/3471
5594         * call.c (convert_like_real): Do not build additional temporaries
5595         for rvalues of class type.
5596
5597 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
5598
5599         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
5600         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
5601         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
5602         (DERIVED_FROM_P): Likewise.
5603         (enum base_access): Renumber, add ba_quiet bit mask.
5604         (get_binfo): Remove.
5605         (get_base_distance): Remove.
5606         (binfo_value): Remove.
5607         (ACCESSIBLY_DERIVED_FROM_P): Remove.
5608         * call.c (standard_conversion): Use lookup_base.
5609         * class.c (strictly_overrides): Likewise.
5610         (layout_virtual_bases): Likewise.
5611         (warn_about_ambiguous_direct_bases): Likewise.
5612         (is_base_of_enclosing_class): Likewise.
5613         (add_vcall_offset_vtbl_entries_1): Likewise.
5614         * cvt.c (build_up_reference): Adjust comment.
5615         * init.c (build_member_call): Reformat.
5616         * search.c (get_binfo): Remove.
5617         (get_base_distance_recursive): Remove.
5618         (get_base_distance): Remove.
5619         (lookup_base_r): Tweak.
5620         (lookup_base): Add ba_quiet control. Complete the types here.
5621         (covariant_return_p): Use lookup_base.
5622         * tree.c (binfo_value): Remove.
5623         (maybe_dummy_object): Use lookup_base.
5624         * typeck.c (build_static_cast): Use lookup_base.
5625         (get_delta_difference): Likewise.
5626         * typeck2.c (binfo_or_else): Use lookup_base.
5627         (build_scoped_ref): Add back error_mark_check.
5628         (build_m_component_ref): Use lookup_base.
5629
5630 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
5631
5632         * Make-lang.in (c++.generated-manpages): New dummy target.
5633
5634 Tue Nov 27 09:03:47 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5635
5636         * Make-lang.in (cp-lang.o): Depends on c-common.h.
5637         * cp-lang.c (c-common.h): Include.
5638         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
5639         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
5640         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
5641
5642 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
5643
5644         * decl2.c (c_language): Move to c-common.c.
5645         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
5646         functions.
5647         (cxx_init): Update.
5648
5649 2001-11-26  Jason Merrill  <jason@redhat.com>
5650
5651         * call.c (joust): Remove COND_EXPR hack.
5652
5653 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
5654
5655         * search.c (lookup_base_r): Declare bk in variable declaration
5656         space.
5657
5658 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
5659
5660         PR g++/3145
5661         * class.c (build_vbase_pointer): Remove.
5662         (build_vbase_path): Remove.
5663         (build_base_path): New function.
5664         * cp-tree.h (base_access, base_kind): New enumerations.
5665         (build_base_path): Declare.
5666         (convert_pointer_to_real): Remove.
5667         (convert_pointer_to): Remove.
5668         (lookup_base): Declare.
5669         (convert_pointer_to_vbase): Remove.
5670         * call.c (build_scoped_method_call): Use lookup_base &
5671         build_base_path instead of convert_pointer_to_real,
5672         get_base_distance & get_binfo.
5673         (build_over_call): Likewise.
5674         * cvt.c (cp_convert_to_pointer): Likewise.
5675         (convert_to_pointer_force): Likewise.
5676         (build_up_reference): Likewise.
5677         (convert_pointer_to_real): Remove.
5678         (convert_pointer_to): Remove.
5679         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
5680         instead of convert_pointer_to_vbase & build_vbase_path.
5681         (emit_base_init): Use build_base_path instead of
5682         convert_pointer_to_real.
5683         (expand_virtual_init): Lose unrequired conversions.
5684         (resolve_offset_ref): Use lookup_base and build_base_path
5685         instead of convert_pointer_to.
5686         * rtti.c (build_dynamic_cast_1): Use lookup_base &
5687         build_base_path instead of get_base_distance & build_vbase_path.
5688         * search.c (get_vbase_1): Remove.
5689         (get_vbase): Remove.
5690         (convert_pointer_to_vbase): Remove.
5691         (lookup_base_r): New function.
5692         (lookup_base): New function.
5693         * typeck.c (require_complete_type): Use lookup_base &
5694         build_base_path instead of convert_pointer_to.
5695         (build_component_ref): Likewise.
5696         (build_x_function_call): Likewise.
5697         (get_member_function_from_ptrfunc): Likewise.
5698         (build_component_addr): Likewise.
5699         * typeck2.c (build_scoped_ref): Likewise.
5700
5701 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5702
5703         * cp-tree.h (CP_TYPE_QUALS): Removed.
5704         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
5705         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
5706         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
5707         * dump.c (cp_dump_tree): Use void* dump_info argument to match
5708         lang-hooks prototype.
5709         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
5710         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
5711         CP_TYPE_QUALS changed to cp_type_quals.
5712         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
5713         (CXX_C_OBJS): Remove c-dump.o.
5714
5715 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
5716
5717         PR c++/3637
5718         * pt.c (lookup_template_class): Ensure that all specializations
5719         are registered on the list corresponding to the most general
5720         template.
5721
5722 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
5723
5724         * call.c (non_reference): Add documentation.
5725         (convert_class_to_reference): Do not strip reference types
5726         from conversion operators.
5727         (maybe_handle_ref_bind): Simplify.
5728         (compare_ics): Correct handling of references.
5729
5730 2001-11-19  John Wilkinson <johnw@research.att.com>
5731
5732         * dump.c (dump_op): New function.
5733         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
5734         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
5735         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
5736
5737 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
5738
5739         PR4629
5740         * semantics.c (finish_sizeof): Make sure that expression created
5741         while processing a template do not have a type.
5742         (finish_alignof): Likewise.
5743         * typeck.c (c_sizeof): Likewise.
5744         (expr_sizeof): Likewise.
5745
5746 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
5747
5748         * lex.c (cxx_finish): Call c_common_finish.
5749         (finish_parse): Remove.
5750
5751 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5752
5753         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
5754         when displaying error message about missing array bounds.
5755
5756 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5757
5758         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
5759         CONST_CAST_EXPR.
5760         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
5761
5762 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
5763
5764         * cp-tree.h (print_class_statistics): Restore.
5765
5766 2001-11-15  Jason Merrill  <jason@redhat.com>
5767
5768         * method.c (use_thunk): Don't emit debugging information for thunks.
5769
5770         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
5771         * decl.c (make_typename_type): Handle getting a class template.
5772         * search.c (lookup_field_r): A class template is good enough for
5773         want_type.
5774
5775         * call.c (convert_like_real): Only use cp_convert for the bad part.
5776         (standard_conversion): Also allow bad int->enum.
5777         * typeck.c (ptr_reasonably_similar): Also allow functions to
5778         interconvert.  Pointers to same-size integers are reasonably
5779         similar.
5780
5781         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
5782         give it void type.
5783
5784 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
5785
5786         PR g++/3154
5787         * init.c (sort_base_init): Remove unreachable code.
5788         (expand_member_init): Adjust comment to reflect reality. Simplify
5789         and remove unreachable code.
5790
5791 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
5792
5793         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
5794         (cxx_init): Update prototype.
5795         * decl.c (init_decl_processing): Rename.  Move null node init
5796         to its creation time.
5797         * lex.c (cxx_init_options): Update.
5798         (cxx_init): Combine with old init_parse; also call
5799         cxx_init_decl_processing.
5800
5801 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
5802
5803         * decl.c (check_initializer): Try to complete the type of an
5804         array element before checking whether it's complete.  Don't
5805         complain about arrays with complete element types but an
5806         unknown size.
5807         (cp_finish_decl): Build the hierarchical constructor before
5808         calling maybe_deduce_size_from_array_init.
5809
5810 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
5811
5812         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
5813
5814 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
5815
5816         PR g++/4206
5817         * parse.y (already_scoped_stmt): Remove.
5818         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
5819
5820 2001-11-12  H.J. Lu <hjl@gnu.org>
5821
5822         * cvt.c (ocp_convert): Don't warn the address of a weak
5823         function is always `true'.
5824
5825 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
5826
5827         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
5828         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
5829         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
5830         * cp-tree.h (print_class_statistics): Remove.
5831         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
5832         cxx_print_identifier, cxx_set_yydebug): New.
5833         * lex.c (set_yydebug): Rename c_set_yydebug.
5834         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
5835         lang_print_xnode): Rename.
5836         * tree.c (print_lang_statistics): Rename.
5837
5838 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5839
5840         * class.c (dump_array): Fix format specifier warning.
5841
5842 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
5843
5844         * cp-lang.c (LANG_HOOKS_NAME): Override.
5845         (struct lang_hooks): Constify.
5846         * lex.c (cxx_init_options): Update.
5847         (lang_identify): Remove.
5848         * parse.y (language_string): Remove.
5849
5850 2001-11-08  Andreas Franck  <afranck@gmx.de>
5851
5852         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
5853         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
5854         suggested by autoconf.
5855         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
5856         (c++.install-common): Use the transformed target alias names.
5857
5858 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
5859
5860         * Make-lang.in: Update.
5861         * cp-lang.c: Include langhooks-def.h.
5862
5863 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5864
5865         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
5866
5867 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5868
5869         * lex.c (copy_lang_type): Add static prototype.
5870
5871 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5872
5873         * pt.c (unify): Handle SCOPE_REF.
5874
5875 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
5876
5877         * tree.c (cp_copy_res_decl_for_inlining): Adjust
5878         DECL_ABSTRACT_ORIGIN for the return variable.
5879
5880 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
5881
5882         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
5883
5884 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
5885
5886         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
5887         semantics.c, spew.c: Fix spelling errors.
5888
5889 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5890
5891         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
5892
5893 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
5894
5895         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
5896         pop_everything.
5897
5898 Tue Oct 23 14:00:20 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5899
5900         * cp-lang.c (cxx_get_alias_set): New function.
5901         Point LANG_HOOKS_GET_ALIAS_SET to it.
5902
5903 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5904
5905         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
5906         * cp-tree.h (make_unbound_class_template): Prototype new function.
5907         * decl.c (make_unbound_class_template): New function.
5908         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
5909         * error.c (dump_type): Likewise.
5910         * mangle.c (write_type): Likewise.
5911         * parse.y (template_parm): Likewise.
5912         (template_argument): Use make_unbound_class_template.
5913         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
5914         (tsubst): Likewise.
5915         (tsubst_copy): Likewise.
5916         (unify): Likewise.
5917         * tree.c (walk_tree): Likewise.
5918         * typeck.c (comptypes): Likewise.
5919
5920 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5921
5922         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
5923         extra calls into fewer ones.
5924
5925 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
5926
5927         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
5928         Warn when merging inline with attribute noinline.
5929         (start_decl, start_function): Warn if inline and attribute
5930         noinline appear in the same declaration.
5931
5932 2001-10-16  H.J. Lu <hjl@gnu.org>
5933
5934         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
5935         for tree checking disabled.
5936
5937 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
5938
5939         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
5940         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
5941
5942 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
5943
5944         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
5945         (unify): Only handle MINUS_EXPR specially if the above flag is set
5946         and the subtracted constant is 1.  Clear the flag on recursive calls.
5947         Set it when unifying the maximum value in an INTEGER_TYPE's range.
5948
5949 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
5950
5951         * decl.c (bad_specifiers): Don't allow exception specifications
5952         on any typedefs.
5953
5954 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
5955
5956         * cp/lex.c (init_cp_pragma): Similarly.
5957
5958 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5959
5960         * pt.c (lookup_template_class): Build complete template arguments
5961         for BOUND_TEMPLATE_TEMPLATE_PARM.
5962
5963 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5964
5965         * cp-tree.h (TYPE_BINFO): Update comment.
5966         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
5967         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
5968         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
5969         (copy_type): Prototype new function.
5970         * lex.c (copy_lang_decl): Gather tree node statistics.
5971         (copy_lang_type): New function.
5972         (copy_type): Likewise.
5973         (cp_make_lang_type): Create lang_type for
5974         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
5975         and BOUND_TEMPLATE_TEMPLATE_PARM.
5976         * pt.c (tsubst): Use copy_type instead of copy_node.
5977         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
5978
5979 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5980
5981         * pt.c (determine_specialization): Ignore functions without
5982         DECL_TEMPLATE_INFO.
5983
5984 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
5985
5986         PR g++/4476
5987         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
5988
5989 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
5990
5991         * typeck2.c (store_init_value): Don't re-digest a bracketed
5992         initializer.
5993
5994         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
5995         ANON_AGGR_TYPE_P.
5996
5997 2001-10-11  Richard Henderson  <rth@redhat.com>
5998
5999         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
6000         of an asm statement.
6001         (build_vtbl_ref_1): Split out from build_vtbl_ref.
6002         (build_vfn_ref): Use it to handle vtable descriptors before
6003         calling build_vtable_entry_ref.
6004         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
6005
6006 2001-10-10  Richard Henderson  <rth@redhat.com>
6007
6008         * parse.y (asm_operand): Allow named operands.
6009         * semantics.c (finish_asm_stmt): Tweek for changed location
6010         of the operand constraint.
6011
6012 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
6013
6014         * call.c (standard_conversion): Add bad conversion between
6015         integers and pointers.
6016         (convert_like_real): Don't use convert_for_initialization for bad
6017         conversions; complain here and use cp_convert.
6018         (build_over_call): Don't handle bad conversions specially.
6019         (perform_implicit_conversion): Allow bad conversions.
6020         (can_convert_arg_bad): New fn.
6021         * cp-tree.h: Declare it.
6022         * typeck.c (convert_for_assignment): Use it.
6023         (ptr_reasonably_similar): Any target type is similar to void.
6024
6025 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
6026
6027         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
6028         (cp/cp-lang.o): New rule.
6029         * cp-tree.h: Declare hooks.
6030         * tree.c: Make hooks non-static.
6031         (init_tree): Don't initialize hooks here.
6032         * lex.c: Likewise.  Move definition of lang_hooks to...
6033         * cp-lang.c: ... new file.
6034
6035 2001-10-08  Richard Henderson  <rth@redhat.com>
6036
6037         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
6038         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
6039
6040 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6041
6042         * class.c (build_vtable_entry_ref): Const-ify.
6043         * decl.c (predefined_identifier,
6044         initialize_predefined_identifiers): Likewise.
6045         * init.c (build_new_1): Likewise.
6046         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
6047         Likewise.
6048
6049 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
6050
6051         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
6052         (INSNS_PER_STMT): Likewise.
6053         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
6054         (copy_body, initialize_inlined_parameters): Likewise.
6055         (declare_return_variable, inlinable_function_p): Likewise.
6056         (expand_call_inline, expand_calls_inline): Likewise.
6057         (optimize_inline_calls, clone_body): Likewise.
6058         * tree.c (walk_tree): Moved to ../tree-inline.c.
6059         (walk_tree_without_duplicates): Likewise.
6060         (copy_tree_r, remap_save_expr): Likewise.
6061
6062 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
6063
6064         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
6065         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
6066         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
6067         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
6068         (flag_inline_trees): Moved declaration to ../tree-inline.h.
6069         (walk_tree): Moved declaration to ../tree-inline.h.
6070         (walk_tree_without_duplicates, copy_tree_r): Likewise.
6071         (remap_save_expr): Likewise.
6072         * decl.c: Include tree-inline.h.
6073         (lang_mark_tree): Don't mark inlined_fns.
6074         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
6075         * optimize.c: Include tree-inline.h.
6076         (optimize_inline_calls): Move declaration to ../tree.h, as
6077         non-static.
6078         (remap_decl): Use language-independent constructs and hooks.
6079         (remap_block, copy_body_r, declare_return_variable): Likewise.
6080         (inlinable_function_p): Likewise.  Don't test for
6081         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
6082         no longer language-specific.
6083         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
6084         call of dump_function to...
6085         (optimize_function): Here...
6086         (clone_body): New function, extracted from...
6087         (maybe_clone_body): ... here.  Build decl_map locally and pass
6088         it on to clone_body.
6089         * pt.c, semantics.c: Include tree-inline.h.
6090         * tree.c: Likewise.
6091         (cp_walk_subtrees): New language-specific hook for tree inlining.
6092         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
6093         cp_is_overload_p, cp_auto_var_in_fn_p,
6094         cp_copy_res_decl_for_inlining): Likewise.
6095         (walk_tree): Move language-specific constructs into...
6096         (cp_walk_subtrees): this new function.
6097         (copy_tree_r): Use language-independent constructs and hooks.
6098         (init_tree): Initialize tree inlining hooks.
6099         (remap_save_expr): Adjust prototype so that the declaration
6100         does not require the definition of splay_tree.
6101
6102 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6103
6104         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
6105         to build the declaration instead of the declaration itself.
6106
6107 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
6108
6109         * decl2.c (cxx_decode_option): Add 'else'.
6110
6111         * spew.c (end_input): No longer static.
6112         * cp-tree.h: Declare it.
6113         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
6114
6115 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
6116
6117         * call.c (build_over_call), typeck.c (build_function_call_real):
6118         Pass type attributes to check_function_format rather than name or
6119         assembler name.  Don't require there to be a name or assembler
6120         name to check formats.
6121
6122 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
6123
6124         * decl.c (init_decl_processing): Don't call
6125         init_function_format_info.  Initialize lang_attribute_table
6126         earlier.
6127         (builtin_function): Call decl_attributes.
6128         (insert_default_attributes): New.
6129
6130 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
6131
6132         * decl.c (grokdeclarator): Copy array typedef handling from C
6133         frontend.
6134
6135         * decl.c (grokdeclarator): Copy too-large array handling from C
6136         frontend.
6137
6138 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
6139
6140         * config-lang.in (target_libs): Added target-gperf, so that we
6141         don't try to build it if C++ is disabled.
6142
6143 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
6144
6145         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
6146         (cp/errfn.o): Delete rule.
6147         (cp/error.o): Depend on flags.h.
6148         * errfn.c: Delete file.
6149         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
6150         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
6151         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
6152         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
6153         internal_error respectively.  Make cp_deprecated into a macro.
6154         Don't define cp_printer typedef or declare cp_printers.
6155         * error.c: Include flags.h.
6156         Delete: struct tree_formatting_info, print_function_argument_list,
6157         print_declaration, print_expression, print_function_declaration,
6158         print_function_parameter, print_type_id, print_cv_qualifier_seq,
6159         print_type_specifier_seq, print_simple_type_specifier,
6160         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
6161         print_parameter_declaration_clause, print_exception_specification,
6162         print_nested_name_specifier, and definition of cp_printers.
6163         (locate_error): New function.
6164         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
6165         rewritten in terms of locate_error and diagnostic.c.
6166         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
6167         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
6168         (init_error): Adjust to match.
6169
6170 Sat Sep 22 09:15:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6171
6172         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
6173
6174 2001-09-21  Richard Henderson  <rth@redhat.com>
6175
6176         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
6177         (build_vtbl_initializer): Likewise.
6178         (build_vfn_ref): New.
6179         * cp-tree.h: Declare it.
6180         * call.c (build_over_call): Use it.
6181         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
6182         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
6183
6184 Fri Sep 21 08:16:19 2001  J"orn Rennecke <amylaar@redhat.com>
6185
6186         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
6187
6188 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
6189
6190         Table-driven attributes.
6191         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
6192         * decl2.c (cplus_decl_attributes): Only take one attributes
6193         parameter.
6194         * cp-tree.c (cplus_decl_attributes): Update prototype.
6195         * class.c (finish_struct), decl.c (start_decl, start_function),
6196         decl2.c (grokfield), friend.c (do_friend), parse.y
6197         (parse_bitfield): Update calls to cplus_decl_attributes.
6198         * decl.c (grokdeclarator): Take a pointer to a single ordinary
6199         attribute list.
6200         * decl.h (grokdeclarator): Update prototype.
6201         * decl2.c (grokfield): Take a single ordinary attribute list.
6202         * friend.c (do_friend): Likewise.
6203         * decl.c (shadow_tag, groktypename, start_decl,
6204         start_handler_parms, grokdeclarator, grokparms, start_function,
6205         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
6206         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
6207         (process_template_parm, do_decl_instantiation): Pass single
6208         ordinary attribute lists around.
6209         * decl.c (grokdeclarator): Correct handling of nested attributes.
6210         Revert the patch
6211         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
6212                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
6213                 not the left.
6214         .
6215         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
6216         (cp_attribute_table): Declare.
6217         * decl.c (valid_lang_attribute): Don't define.
6218         (lang_attribute_table): Define.
6219         (init_decl_processing): Initialize lang_attribute_table instead of
6220         valid_lang_attribute.
6221         * tree.c (cp_valid_lang_attribute): Remove.
6222         (handle_java_interface_attribute, handle_com_interface_attribute,
6223         handle_init_priority_attribute): New functions.
6224         (cp_attribute_table): New array.
6225         * decl2.c (import_export_class): Don't use
6226         targetm.valid_type_attribute.
6227
6228 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6229
6230         * Make-lang.in (cp/error.o): Depend on real.h
6231         * error.c: #include "real.h"
6232
6233 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6234
6235         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
6236         xmalloc/strcpy/strcat.
6237
6238 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6239
6240         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
6241         Const-ification.
6242         * pt.c (tsubst_decl): Likewise.
6243
6244 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6245
6246         * decl2.c (lang_f_options): Const-ification.
6247         * lex.c (cplus_tree_code_name): Likewise.
6248         * spew.c (yyerror): Likewise.
6249
6250 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6251
6252         PR c++/3986
6253         * class.c (force_canonical_binfo_r): Check & move an indirect
6254         primary base first.
6255         (force_canonical_binfo): Check that it's not already
6256         canonical.
6257         (mark_primary_virtual_base): Remove BINFO parameter.
6258         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
6259
6260 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6261
6262         Remove TYPE_NONCOPIED_PARTS.
6263         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
6264         CLASSTYPE_PURE_VIRTUALS.
6265         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
6266         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
6267         (layout_class_type): Don't call fixup_inline_methods here ...
6268         (finish_struct_1): ... call it here.
6269
6270 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
6271
6272         * decl.c (duplicate_decls): Remove code deadling with
6273         DECL_SAVED_INSNS.
6274         * decl2.c (finish_file): Likewise.
6275         * pt.c (instantiate_decl): Likewise.
6276         * semantics.c (expand_body): Don't defer local functions if
6277         they wouldn't be deferred for some other reason.  Don't
6278         generate RTL for functions that will not be emitted.
6279         (genrtl_start_function): Remove code deadling with
6280         DECL_SAVED_INSNS.
6281         (genrtl_finish_function): Likewise.
6282
6283 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
6284
6285         PR c++/4203
6286         * call.c (build_over_call): Do not optimize any empty base
6287         construction.
6288
6289 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6290
6291         * error.c (dump_template_decl): Output template parameters
6292         together with their specifiers.
6293         Output `class' prefix for template template parameter.
6294         (dump_decl): Fix formatting.
6295
6296 2001-08-30  Kurt Garloff  <garloff@suse.de>
6297
6298         * optimize.c (inlinable_function_p): Allow only smaller single
6299         functions. Halve inline limit after reaching recursive limit.
6300
6301 2001-08-30  Joern Rennecke <amylaar@redhat.com>
6302             Jason Merrill  <jason_merrill@redhat.com>
6303
6304         * class.c (build_vtable_entry_ref): Subtract in char*, not
6305         ptrdiff_t.
6306
6307 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
6308
6309         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
6310         (build_cplus_array_type): Use cp_build_qualified_type, not
6311         TYPE_MAIN_VARIANT, to get an unqualified version.
6312
6313         * decl2.c (grok_alignof): Lose.
6314         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
6315         * typeck.c (c_alignof): Lose.
6316         * semantics.c (finish_sizeof, finish_alignof): New.
6317         * parse.y: Use them.
6318         * cp-tree.h: Declare them.
6319
6320 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
6321
6322         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
6323         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
6324         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
6325
6326 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
6327
6328         * typeck2.c (add_exception_specifier): Only require complete type if
6329         not in processing template declaration.
6330
6331 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6332
6333         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
6334         GNU_xref_start_scope and GNU_xref_end_scope.
6335
6336         * tree.c (TYPE_HASH): Moved to ../tree.h.
6337
6338 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
6339
6340         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
6341         on COMPOUND_EXPRs.
6342
6343 2001-08-14  Richard Henderson  <rth@redhat.com>
6344
6345         * class.c, cp-tree.h (build_vfn_ref): Remove.
6346         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
6347
6348 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
6349
6350         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
6351         empty class assignment as having side-effects to avoid
6352         spurious warnings.
6353
6354 2001-08-13  Zack Weinberg  <zackw@panix.com>
6355
6356         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
6357         * except.c: Include libfuncs.h.
6358
6359 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6360
6361         * decl.c (grokdeclarator): Clarify diagnostic message.
6362
6363 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6364
6365         * decl2.c (do_nonmember_using_decl): Replace using directive
6366         with using declaration in the error message.
6367
6368 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6369
6370         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
6371         criterion to avoid rebuilding expression tree instead of
6372         processing_template_decl.
6373
6374 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
6375
6376         Support named return value optimization for inlines, too.
6377         * decl.c (finish_function): Nullify returns here.
6378         * semantics.c (genrtl_start_function): Not here.
6379         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
6380         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
6381         Also nullify the CLEANUP_STMT for the nrv.
6382         * cp-tree.h: Declare it.
6383         * optimize.c (declare_return_variable): Replace the nrv with the
6384         return variable.
6385         * typeck.c (check_return_expr): Be more flexible on alignment check.
6386         Ignore cv-quals when checking for a matching type.
6387
6388 2001-08-09  Richard Henderson  <rth@redhat.com>
6389
6390         * decl2.c (finish_objects): Use target hooks instead of
6391         assemble_constructor and assemble_destructor.
6392
6393 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6394
6395         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
6396
6397 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
6398
6399         PR c++/3820
6400         Stop using TYPE_NONCOPIED_PARTS.
6401         * call.c (build_over_call): Be careful when copy constructing
6402         or assigning to an empty class.
6403         * class.c (check_bases_and_members): It has a
6404         COMPLEX_ASSIGN_REF if it has a vptr.
6405         (layout_class_type): Don't add empty class padding to
6406         TYPE_NONCOPIED_PARTS.
6407         (finish_struct_1): Don't add the VFIELD either.
6408         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
6409         initialization.
6410
6411 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
6412
6413         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
6414
6415 2001-08-06  Richard Henderson  <rth@redhat.com>
6416
6417         * decl2.c (finish_objects): Pass a symbol_ref and priority to
6418         assemble_{constructor,destructor}.  Remove priority handling.
6419
6420 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6421
6422         Don't allow template-id in using-declaration.
6423         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
6424         (do_class_using_decl): Likewise.
6425
6426 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6427
6428         * cp/spew.c (read_token): No need to pop buffers.
6429
6430 2001-08-02  Stan Shebs  <shebs@apple.com>
6431
6432         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
6433         (fnaddr_from_vtable_entry): Remove decl.
6434         * method.c (use_thunk): Update comment.
6435
6436 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
6437
6438         * repo.c (get_base_filename): Change return value to const char
6439         pointer.
6440
6441 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
6442
6443         Kill -fhonor-std.
6444         * NEWS: Document.
6445         * cp-tree.h (flag_honor_std): Remove.
6446         (CPTI_FAKE_STD): Remove.
6447         (std_node): Remove comment about it being NULL.
6448         (fake_std_node): Remove.
6449         * decl.c (in_fake_std): Remove.
6450         (walk_namespaces_r): Remove fake_std_node check.
6451         (push_namespace): Remove in_fake_std code.
6452         (pop_namespace): Likewise.
6453         (lookup_name_real): Remove fake_std_node check.
6454         (init_decl_processing): Always create std_node. Always add
6455         std:: things there.
6456         (builtin_function): Always put non '_' fns in std.
6457         * decl2.c (flag_honor_std): Remove.
6458         (lang_f_options): Remove honor-std.
6459         (unsupported_options): Add honor-std.
6460         (set_decl_namespace): Remove fake_std_node check.
6461         (validate_nonmember_using_decl): Likewise.
6462         (do_using_directive): Likewise.
6463         (handle_class_head): Likewise.
6464         * dump.c (cp_dump_tree): Likewise.
6465         * except.c (init_exception_processing): Adjust.
6466         * init.c (build_member_call): Remove fake_std_node check.
6467         (build_offset_ref): Likewise.
6468         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
6469         * rtti.c (init_rtti_processing): Adjust.
6470
6471 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
6472
6473         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
6474         operand while calling cp_tree_equal.
6475
6476 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
6477
6478         The 3.0 ABI no longer has vbase pointer fields.
6479         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
6480         FORMAT_VBASE_NAME): Remove.
6481         * method.c (do_build_copy_constructor): Adjust.
6482         (do_build_assign_ref): Adjust.
6483         * search.c (lookup_field_r): Adjust.
6484         * typeck.c (build_component_ref): Adjust.
6485
6486         The 3.0 ABI always has a vtable pointer at the start of every
6487         polymorphic class.
6488         * rtti.c (build_headof_sub): Remove.
6489         (build_headof): Adjust.
6490         (get_tinfo_decl_dynamic): No need to check flag_rtti
6491         here. Adjust.
6492         (create_real_tinfo_var): Explain why we need a hidden name.
6493
6494 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
6495
6496         PR c++/3631
6497         * class.c (update_vtable_entry_for_fn): The fixed adjustment
6498         of a virtual thunk should be from declaring base.
6499
6500 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
6501
6502         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
6503         the shared virtual base, so preserving inheritance graph order.
6504
6505 2001-07-30  Andreas Jaeger  <aj@suse.de>
6506
6507         * decl2.c: Remove unused var global_temp_name_counter.
6508
6509 2001-07-28  Richard Henderson  <rth@redhat.com>
6510
6511         * method.c (pending_inlines): Remove.
6512
6513 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
6514
6515         * class.c (mark_primary_virtual_base): Don't adjust base
6516         offsets here.
6517         (dfs_unshared_virtual_bases): Adjust them here.
6518         (mark_primary_bases): Explain why we adjust at the end.
6519
6520 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
6521
6522         * class.c (finish_struct_1): When copying the primary base's
6523         VFIELD, make sure we find it is at offset zero.
6524
6525 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6526
6527         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
6528         tsubst_expr for default template arguments.
6529
6530 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
6531
6532         PR c++/3621
6533         * spew.c (yylex): Only copy the token's lineno, if it is
6534         nonzero.
6535
6536 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
6537
6538         PR c++/3624
6539         * call.c (resolve_args): Simplify, call
6540         convert_from_reference.
6541         (build_new_op): Resolve and convert from reference ARG1
6542         earlier. Adjust ARG2 & ARG3 resolve and conversion.
6543
6544 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
6545
6546         * decl.c (last_function_parm_tags): Remove.
6547         (current_function_parm_tags): Remove.
6548         (init_decl_processing): Adjust.
6549         (start_function): Adjust.
6550         (store_parm_decls): Adjust.
6551
6552         PR c++/3152
6553         * decl.c (grokdeclarator): Detect when a function typedef is
6554         declaring a function, and create last_function_parms correctly.
6555
6556 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
6557
6558         * call.c (joust): Only prefer a non-builtin candidate to a builtin
6559         one if they have the same signature.
6560
6561         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
6562         it rather than toplevel_bindings_p.  Give it a mangled name if static.
6563         (convert_to_reference): Adjust.
6564         * decl2.c (get_temp_name): Lose.
6565         * mangle.c (mangle_ref_init_variable): New fn.
6566         (mangle_guard_variable): Strip the ref-init header.
6567         * cp-tree.h: Adjust.
6568         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
6569         initializer.
6570         (grok_reference_init): Always use DECL_INITIAL.
6571
6572 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6573
6574         PR c++/3416
6575         * call.c (build_conditional_expr): Recheck args after
6576         conversions.
6577         * cp-tree.h (build_conditional_expr): Move to correct file.
6578         * typeck.c (decay_conversion): Diagnose any unknown types
6579         reaching here.
6580         (build_binary_op): Don't do initial decay or default
6581         conversions on overloaded functions.
6582         (build_static_cast): Don't do a decay conversion here.
6583
6584 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6585
6586         PR c++/3543
6587         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
6588         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
6589
6590 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6591
6592         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
6593         (create_vtbl_ptr): ... here.
6594
6595 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6596
6597         * class.c (build_vbase_offset_vbtl_entries): Look for
6598         non-primary base of which we are a sub vtable.
6599
6600 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
6601
6602         * semantics.c (finish_this_expr):  Remove unused code.
6603
6604 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
6605
6606         Simplify rtti, now we've only one ABI.
6607         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
6608         CPTI_TINFO_VAR_ID.
6609         (tinfo_decl_id, tinfo_var_id): Remove.
6610         (get_typeid_1): Remove.
6611         * rtti.c
6612         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
6613         (typeid_ok_p): New function.
6614         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
6615         (get_tinfo_decl): Remove old abi documentation.
6616         (tinfo_from_decl): Remove.
6617         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
6618         (get_typeid_1): Remove.
6619         (get_base_offset): Remove.
6620         (synthesize_tinfo_var): Absorb get_base_offset.
6621         (create_real_tinfo_var): Don't use tinfo_decl_id.
6622
6623 2001-07-23  Graham Stott  <grahams@redhat.com>
6624
6625         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
6626         variable has_two_argument_delete_p.
6627
6628 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
6629
6630         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
6631         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
6632         (CPTI_INDEX_IDENTIFIER): Remove.
6633         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
6634         (delta2_identifier): Remove.
6635         (index_identifier): Remove.
6636         (pfn_or_delta2_identifier): Remove.
6637         (flag_vtable_thunks): Remove.
6638         (VTABLE_DELTA2_NAME): Remove.
6639         (VTABLE_INDEX_NAME): Remove.
6640         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
6641         (vfunc_ptr_type_node): Adjust.
6642         (VTABLE_NAME_PREFIX): Adjust.
6643         (build_vfn_ref): Lose first parameter.
6644         (fixup_all_virtual_upcast_offsets): Remove.
6645         * decl.c (initialize_predefined_identifiers): Remove
6646         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
6647         (init_decl_processing): Remove no-vtable-thunk code.
6648         * decl2.c (flag_vtable_thunks): Remove.
6649         (mark_vtable_entries): Remove no-vtable-thunk code.
6650         * error.c (dump_decl): Remove no-vtable-thunk code.
6651         (dump_expr): Adjust ptr to member function code.
6652         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
6653         code.
6654         * rtti.c (build_headof): Remove no-vtable-thunk code.
6655         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
6656         * search.c (get_base_distance): Remove expand_upcast_fixups case.
6657         (virtual_context) Remove.
6658         (expand_upcast_fixups): Remove.
6659         (fixup_virtual_upcast_offsets): Remove.
6660         (fixup_all_virtual_upcast_offsets): Remove.
6661         * typeck.c (get_member_function_from_ptrfunc): Remove
6662         no-vtable-thunk code.
6663         * call.c (build_over_call): Adjust call to build_vfn_ref.
6664         * class.c (build_vfn_ref): Lose first parameter. Remove
6665         no-vtable-thunk code.
6666         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
6667         (build_vtable_entry): Remove no-vtable-thunk code.
6668
6669 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
6670
6671         Remove old-abi remnants. Remove comments about old abi
6672         behavior. Remove references to 'new-abi' in comments.
6673         * cp-tree.h: Adjust comments.
6674         (vbase_offsets_in_vtable_p): Delete.
6675         (vcall_offsets_in_vtable_p): Delete.
6676         (vptrs_present_everywhere_p): Delete.
6677         (all_overridden_vfuns_in_vtables_p): Delete.
6678         (merge_primary_and_secondary_vtables_p): Delete.
6679         (TYPE_CONTAINS_VPTR_P): Adjust.
6680         (VTT_NAME_PREFIX): Remove.
6681         (CTOR_VTBL_NAME_PREFIX): Remove.
6682         (init_vbase_pointers): Remove.
6683         * class.c: Adjust coments.
6684         (build_vbase_pointer_fields): Delete.
6685         (build_vbase_pointer): Remove old-abi code.
6686         (build_secondary_vtable): Likewise.
6687         (modify_all_vtables): Likewise.
6688         (create_vtable_ptr): Likewise.
6689         (layout_class_type): Likewise.
6690         (finish_struct_1): Likewise.
6691         (finish_vtbls): Likewise.
6692         (dfs_finish_vtbls): Delete.
6693         (build_vbase_offset_vtbl_entries): Remove old-abi code.
6694         * cvt.c: Adjust comments.
6695         * decl.c: Adjust comments.
6696         * decl2.c: Adjust comments.
6697         * init.c: Adjust comments.
6698         (construct_virtual_bases): Remove old-abi code.
6699         * lang-specs.h: Remove -fno-new-abi.
6700         * mangle.c: Adjust comments.
6701         * rtti.c: Adjust comments.
6702         (get_base_offset): Remove old-abi-code.
6703         * search.c: Adjust comments.
6704         (dfs_init_vbase_pointers): Remove.
6705         (dfs_vtable_path_unmark): Remove.
6706         (init_vbase_pointers): Remove.
6707         * semantics.c: Adjust comments.
6708         (emit_associated_thunks): Remove old-abi code.
6709         * typeck.c: Adjust comments.
6710
6711 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
6712
6713         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
6714         params.h.
6715
6716 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
6717
6718         * class.c (finish_struct_anon): Forbid nested classes.
6719
6720 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
6721
6722         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
6723         * optimize.c: Include debug.h.
6724         (maybe_clone_body): Use debug hook.
6725         * semantics.c: Include debug.h.
6726         (expand_body): Use debug hook.
6727
6728 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
6729
6730         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
6731
6732 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
6733
6734         * class.c (type_requires_array_cookie): New function.
6735         (check_methods): Don't try to figure out whether the type needs a
6736         cookie here.
6737         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
6738         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
6739         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
6740         * pt.c (instantiate_class_template): Don't set
6741         TYPE_VEC_DELETE_TAKES_SIZE.
6742         * NEWS: Document ABI changes from GCC 3.0.
6743
6744 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
6745             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
6746
6747         * NEWS (Changes in GCC 3.0): Fix typo.
6748
6749 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
6750
6751         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
6752         which attributes are to be attached, and a flags argument.  Update
6753         call to decl_attributes.
6754         (grokfield): Update call to decl_attributes.
6755         * class.c (finish_struct): Update call to cplus_decl_attributes.
6756         * cp-tree.h (cplus_decl_attributes): Update prototype.
6757         * decl.c (start_decl, grokdeclarator, start_function): Update
6758         calls to decl_attributes and cplus_decl_attributes.
6759         * friend.c (do_friend): Update call to cplus_decl_attributes.
6760         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
6761
6762 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
6763
6764         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
6765         for `register' variables with an asm-specification.
6766
6767 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
6768
6769         * semantics.c (finish_asm_stmt): Mark the output operands
6770         to an asm addressable, if necessary.
6771
6772 2001-07-11  Ben Elliston  <bje@redhat.com>
6773
6774         * Revert this change -- there is a subtle bug.
6775
6776         PR c++/80
6777         * decl.c (finish_enum): New "attributes" argument; pass it to
6778         cplus_decl_attributes.  Use a narrower type if the enum is packed.
6779         * cp-tree.h (finish_enum): Adjust prototype.
6780         * parse.y (enum_head): New non-terminal.
6781         (structsp): Use it. Enums now may be preceded or followed by
6782         optional attributes -- pass their chained tree to finish_enum().
6783         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
6784
6785 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
6786
6787         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
6788         variables.
6789
6790 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
6791
6792         * semantics.c (cp_expand_stmt): Fix for null
6793         current_function_return_value.
6794
6795 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
6796
6797         * call.c (build_op_delete_call): Initialize fn.
6798         (convert_like_real): Delete conditional.
6799         (joust): Initialize *w and *l.
6800         * class.c: Add prototype for binfo_ctor_vtable.
6801         (get_primary_binfo): Initialize result.
6802         * init.c (build_java_class_ref): Initialize name.
6803
6804 2001-07-09  Erik Rozendaal  <dlr@acm.org>
6805
6806         * typeck.c (unary_complex_lvalue): Do not duplicate the
6807         argument to modify, pre-, or post-increment when used as an
6808         lvalue and when the argument has side-effects.
6809
6810 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
6811
6812         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
6813         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
6814         cplus_decl_attributes even if attrs is NULL.
6815         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
6816
6817 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
6818
6819         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
6820         calls to decl_attributes.
6821
6822 2001-07-06  Ira Ruben   <ira@apple.com>
6823
6824         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
6825         be DECL_TEMPLATE_RESULT.
6826
6827 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6828
6829         * cp-tree.h (copy_template_template_parm): Rename to ...
6830         (bind_template_template_parm): ... here.
6831         * tree.c (copy_template_template_parm): Rename to ...
6832         (bind_template_template_parm): ... here.  Remove the case when
6833         NEWARGS is NULL_TREE.
6834         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
6835         BOUND_TEMPLATE_TEMPLATE_PARM.
6836         * pt.c (lookup_template_class): Adjust.
6837
6838 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
6839
6840         * cvt.c (convert_lvalue): New fn.
6841         * cp-tree.h: Declare it.
6842         * method.c (do_build_assign_ref): Use it.
6843         (do_build_copy_constructor): Convert parm to base types
6844         before calling base constructors.
6845
6846         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
6847         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
6848         optimize.
6849         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
6850
6851 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
6852
6853         * optimize.c (optimize_inline_calls): New function, broken out
6854         of ...
6855         (optimize_function): ... here. Call it. Don't inline if it is
6856         a thunk.
6857         (dump_function): Print name of dump flag causing this dump.
6858         * semantics.c (expand_body): Move thunk inline check to
6859         optimize_function.
6860
6861 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
6862
6863         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
6864         (comptypes): Use target.comp_type_attributes.
6865
6866 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
6867
6868         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
6869
6870 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6871
6872         * error.c (lang_print_error_function): Add a `diagnostic_context *'
6873         parameter. Tweak.
6874
6875 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6876
6877         * decl2.c (import_export_class): Update.
6878
6879 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
6880
6881         * error.c (init_error): Adjust settings.
6882
6883 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
6884
6885         * error.c (init_error): Adjust settings.
6886
6887 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
6888
6889         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
6890         return pointers to data members by reference rather than by value.
6891
6892 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
6893
6894         Implement the Named Return Value optimization.
6895         * cp-tree.h (struct cp_language_function): Add x_return_value.
6896         (current_function_return_value): Now a macro.
6897         * decl.c: Don't define it.
6898         (define_label, finish_case_label): Don't clear it.
6899         (init_decl_processing): Don't register it with GC.
6900         * semantics.c (genrtl_finish_function): Don't check it for
6901         no_return_label.  Copy the RTL from the return value to
6902         current_function_return_value and walk, calling...
6903         (nullify_returns_r): ...this new fn.
6904         * typeck.c (check_return_expr): Set current_function_return_value.
6905
6906 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
6907
6908         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
6909         sharing a ctor vtable with.  Merge code for cases 1 and 2.
6910         (binfo_ctor_vtable): New fn.
6911         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
6912
6913 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
6914
6915         * class.c (dfs_find_final_overrider): Fix logic.
6916
6917         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
6918         virtual thunk instead of non-virtual.
6919         (get_matching_virtual): Uncomment.
6920
6921         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
6922         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
6923         PARM, not ARG.
6924
6925 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
6926
6927         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
6928         we've not emerged from the hierarchy of RTTI_BINFO on reaching
6929         a non-virtual base.
6930
6931 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
6932
6933         * NEWS: Update release number.
6934
6935 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
6936
6937         PR c++/3130, c++/3131, c++/3132
6938         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
6939         * class.c (force_canonical_binfo_r): Move
6940         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
6941         virtual bases unless they're primary and what they're primary
6942         too has been moved.
6943         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
6944         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
6945         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
6946         derived binfo.
6947         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
6948         (layout_nonempty_base_or_field): Add most derived type
6949         parameter. Adjust.
6950         (layout_empty_base): Likewise.
6951         (build_base_field): Likewise.
6952         (build_base_fields): Likewise.
6953         (propagate_binfo_offsets): Add most derived type
6954         parameter. Skip non canonical virtual bases too.
6955         (dfs_set_offset_for_unshared_vbases): Don't skip primary
6956         bases. Do skip canonical bases.
6957         (layout_virtual_bases): Adjust.
6958         (layout_class_type): Adjust.
6959         (dfs_get_primary_binfo): Build list of virtual primary base
6960         candidates.
6961         (get_primary_binfo): Check that the shared virtual primary
6962         base candidate was found first.
6963         (accumulate_vtbl_inits): Don't do anything for non-vptr
6964         containing binfos. For case 1 primary virtual bases, keep
6965         checking that we've not emerged from the hierarchy of RTTI_BINFO.
6966
6967 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
6968
6969         PR c++/3089
6970         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
6971         hierarchy looking for primary bases for a ctor
6972         vtable. Recursively call oneself, if we meet our primary via
6973         this route and haven't met it yet via inheritance graph order.
6974
6975 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
6976
6977         * lang-options.h: Emit documentation for -fno-honor-std, not
6978         -fhonor-std.
6979
6980 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
6981
6982         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
6983         Don't clobber delta.
6984         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
6985
6986 2001-06-10  Mark Mitchell <mark@codesourcery.com>
6987             Gabriel Dos Reis  <gdr@codesourcery.com>
6988
6989         * Make-lang.in (cp/call.o): Depend on diagnostic.h
6990         (cp/typeck.o): Depend on diagnostic.h
6991         (cp/typeck2.o): Depend on diagnostic.h
6992         (cp/repo.o): Depend on dignostic.h
6993         * typeck.c: #include diagnostic.h
6994         (convert_for_initialization): Remove extern declaration for
6995         warningcount and errorcount.
6996
6997         * call.c: #include diagnostic.h
6998         (convert_like_real): Remove extern declaration for warnincount and
6999         errorcount.
7000
7001         * repo.c: #include diagnostic.h
7002         * typeck2.c: #include diagnostic.h
7003
7004 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
7005
7006         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
7007         in previous change.
7008
7009 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
7010
7011         PR c++/2929
7012         * friend.c (do_friend): Use push_decl_namespace for classes at
7013         namespace scope.
7014
7015 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
7016             Jason Merrill <jason_merrill@redhat.com>
7017
7018         PR c++/3061
7019         * class.c (build_secondary_vtable): Use assert, rather than an error
7020         message.
7021         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
7022         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
7023         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
7024         Don't set BINFO_VTABLE for a primary virtual base.
7025
7026 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
7027
7028         * decl.c (duplicate_decls): Update source position information
7029         when a template function is defined.
7030
7031 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
7032
7033         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
7034
7035 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
7036
7037         PR c++/2914
7038         * decl.c (pushtag): Don't push into a complete type's scope.
7039
7040 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
7041
7042         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
7043         (struct lang_decl_flags): Lose generate_with_vtable_p.
7044         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
7045         * class.c (copy_virtuals): Adjust.
7046         * decl2.c (mark_vtable_entries): Adjust.
7047         * method.c (make_thunk, build_vtable_entry): Adjust.
7048         * class.c (update_vtable_entry_for_fn): Only look as far as the
7049         first defining class.
7050         (build_vtbl_initializer): Put nothing in the slot for a function only
7051         defined in a lost primary virtual base.
7052         (add_vcall_offset_vtbl_entries_1): Use the same code for
7053         the lost primary case and the normal case.
7054         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
7055         (get_vfield_offset, get_derived_offset): Lose.
7056         (dfs_find_final_overrider): Use look_for_overrides_here.
7057         (get_matching_virtual): New fn.
7058         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
7059         not BV_VCALL_INDEX.
7060         * search.c (look_for_overrides_here): Split out from...
7061         (look_for_overrides_r): Here.
7062
7063         * class.c (find_final_overrider): Return error_mark_node on error.
7064
7065         * decl2.c (key_method): #if 0 accidental change.
7066
7067 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7068
7069         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
7070         (build_over_call): Likewise.
7071         * decl.c (grokparms): Likewise.
7072         * pt.c (tsubst_decl): Likewise.
7073         * typeck.c (convert_arguments): Likewise.
7074
7075 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
7076
7077         * semantics.c (begin_class_definition): Robustify.
7078
7079         * pt.c (instantiate_decl): Tell the repository code about the
7080         clones, not the cloned functions.
7081         * repo.c (repo_template_used): Explicitly instantiate the cloned
7082         function, not the clones.
7083
7084 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7085
7086         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
7087         ICS_BAD_FLAG on created conversion.
7088         (compare_ics): Break out rank.
7089
7090 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7091
7092         * decl.c (xref_tag): Remove extraneous %s on dependent name
7093         lookup warning.
7094
7095 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7096
7097         * class.c (layout_vtable_decl): Fix off by one error on
7098         build_index_type.
7099         (build_vtt): Likewise.
7100         (build_ctor_vtbl_group): Likewise.
7101
7102 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7103
7104         * class.c (maybe_indent_hierarchy): New function.
7105         (dump_class_hierarchy_r): Add flags. Dump extra binfo
7106         information, if enabled. Use maybe_indent_hierarchy. Adjust
7107         output format.
7108         (dump_class_hierarchy): Adjust prototype. Adjust output format.
7109         (dump_array, dump_vtable, dump_vtt): New functions.
7110         (finish_struct_1): Adjust hierarchy dumping.
7111         (initialize_vtable): Call dump_vtable.
7112         (build_vtt): Call dump_vtt.
7113         (build_ctor_vtbl_group): Call dump_vtable.
7114         * decl2.c (flag_dump_class_layout): Remove.
7115         (cxx_decode_option): Remove dump translation unit
7116         and dump class hierarchy check. Call dump_switch_p.
7117         (finish_file): Adjust dumping.
7118         (dump.c): Only dump base classes if not TDF_SLIM.
7119         Only dump namespace members if not TDF_SLIM.
7120         * optimize.c (dump_function): New function.
7121         (optimize_function): Call dump_function.
7122         * semantics.c (expand_body): Use dump_enabled_p.
7123
7124 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
7125
7126         PR g++/2936
7127         Part missed from first commit
7128         * decl2.c (finish_anon_union): Copy context.
7129
7130 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
7131
7132         PR g++/2936
7133         * optimize.c (remap_decl): Remap anonymous aggregate members too.
7134
7135 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
7136
7137         PR g++/2823
7138         * semantics.c (expand_body): Don't optimize thunks.
7139
7140 2001-05-25  Sam TH  <sam@uchicago.edu>
7141
7142         * cp-tree.h lex.h: Fix header include guards.
7143
7144 2001-05-25  Mark Mitchell <mark@codesourcery.com>
7145
7146         * decl.c (init_decl_processing): Tweak.
7147
7148 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
7149
7150         * decl.c (duplicate_decls): Tidy.
7151         (init_decl_processing): Always set flag_no_builtin.
7152
7153 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
7154
7155         PR c++/2184
7156         * decl2.c (do_local_using_decl): Push the decls, even in a
7157         template.
7158
7159 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
7160
7161         * optimize.c (initialize_inlined_parameters): Don't set
7162         TREE_READONLY for a VAR_DECL taking the place of an inlined
7163         PARM_DECL.
7164
7165 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
7166
7167         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
7168         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
7169         attribute.
7170
7171 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
7172
7173         * parse.y: Refer to compound literals as such, not as
7174         constructor-expressions.
7175
7176 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
7177
7178         * call.c (build_op_delete_call): Ignore exception-specifications
7179         when looking for matching delete operators.
7180         * init.c (build_new_1): Compute whether or not the allocation
7181         function used is a placement allocation function or not, and
7182         communicate this information to build_op_delete_call.
7183
7184 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
7185
7186         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
7187         (build_vtbl_ref): Adjust.
7188         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
7189         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
7190         Re-add vtable-gc.
7191         (unsupported_options): Correspondingly.
7192
7193         * decl2.c (maybe_make_one_only): Check flag_weak, not
7194         supports_one_only().
7195
7196         * cp-tree.def (START_CATCH_STMT): Lose.
7197         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
7198         * tree.c (cp_statement_code_p): Don't case it.
7199         * semantics.c (cp_expand_stmt): Likewise.
7200         * cp-tree.h (START_CATCH_TYPE): Lose.
7201         (HANDLER_TYPE): New.
7202         * except.c (expand_start_catch_block): Don't start any blocks.
7203         Return the type.
7204         (expand_end_catch_block): Don't end any blocks.
7205         * parse.y (handler): Don't pass anything from finish_handler_parms
7206         to finish_handler.
7207         * pt.c (tsubst_expr): Likewise.
7208         * semantics.c (begin_handler): Call note_level_for_catch here.
7209         (finish_handler_parms): Don't return anything.
7210         (genrtl_catch_block, begin_catch_block): Lose.
7211         (genrtl_handler): Call expand_start_catch here.
7212
7213 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
7214
7215         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
7216         (get_vtable_decl, build_vtt): Not here.
7217
7218 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
7219
7220         PR c++/2781
7221         * optimize.c (update_cloned_parm): Copy addressability and other
7222         flags.
7223
7224 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7225
7226         * pt.c (determine_specialization): Ignore artificial functions.
7227
7228 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
7229
7230         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
7231         (C_RID_CODE): Remove.
7232         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
7233         (init_parse): Don't do it here.
7234
7235 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
7236
7237         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
7238         function declaration to avoid stripping the symbol's attributes.
7239
7240 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
7241
7242         * decl.c (pushdecl): Adjust error string.
7243         (xref_tag): Adjust friend class injection warning. Remove the
7244         inherited name from the class shadowed scope.
7245
7246 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
7247
7248         * except.c (cp_protect_cleanup_actions): New function.
7249         (init_exception_processing): Don't set protect_cleanup_actions
7250         here.  Do set lang_protect_cleanup_actions.
7251
7252 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
7253
7254         * spew.c (read_token): Call yyerror on all unexpected tokens.
7255
7256 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
7257
7258         * init.c (member_init_ok_or_else): Take a tree rather than
7259         string for name.
7260         (expand_member_init): Adjust.
7261
7262 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
7263
7264         * decl.c (duplicate_decls): Suppress warning about duplicate
7265         decls if the first decl is a friend.
7266
7267 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
7268
7269         * except.c (choose_personality_routine): Export.  Add
7270         explanatory comment.  Take an enum languages, not a boolean.
7271         (initialize_handler_parm): Adjust to match.
7272         * cp-tree.h: Prototype choose_personality_routine.
7273         * lex.c (handle_pragma_java_exceptions): New function.
7274         (init_cp_pragma): Register #pragma GCC java_exceptions.
7275
7276 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7277
7278         * method.c (build_mangled_C99_name): Remove unused prototype.
7279
7280 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
7281
7282         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
7283         * typeck.c (get_member_function_from_ptrfunc,
7284         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
7285         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
7286
7287         Reverted Geoff Keating's 2001-05-03's patch.
7288
7289 2001-05-11  Ira Ruben   <ira@apple.com>
7290
7291         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
7292
7293 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
7294
7295         * cp-tree.h (finish_label_expr, lookup_label): Delete.
7296         * parse.y: Update for '&&'; don't issue warning here.
7297         * semantics.c (finish_label_expr): Delete.
7298
7299 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
7300
7301         * splay-tree.h (splay_tree_max): New function.
7302         (splay_tree_min): Likewise.
7303
7304 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
7305
7306         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
7307         (pfn_vflag_identifier): Define.
7308         Update comment about layout of pointer functions.
7309         (build_ptrmemfunc1): Update prototype.
7310         (expand_ptrmemfunc_cst): Update prototype.
7311         * decl.c (initialize_predefined_identifiers): Initialize
7312         pfn_vflag_identifier.
7313         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
7314         an extra field to the type.
7315         * expr.c (cplus_expand_constant): Pass 'flag' between
7316         expand_ptrmemfunc_cst and build_ptrmemfunc1.
7317         * typeck.c (get_member_function_from_ptrfunc): When
7318         FUNCTION_BOUNDARY < 16, look at additional field to determine
7319         if a pointer-to-member is a real pointer or a vtable offset.
7320         (build_ptrmemfunc1): Add new parameter to contain extra field.
7321         (build_ptrmemfunc): Pass the extra field around.
7322         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
7323         (pfn_from_ptrmemfunc): Ignore the extra field.
7324
7325 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
7326
7327         * cp-tree.h (flag_inline_trees): Update documentation.
7328         * decl.c (init_decl_processing): Adjust handling of
7329         flag_inline_functions and flag_inline_trees to support -O3.
7330         (grokfndecl): Set DECL_INLINE on all functions if that's what
7331         the user requested.
7332         (save_function_data): Clear DECL_INLINE in
7333         current_function_cannot_inline is non-NULL.
7334         * decl2.c (flag_inline_trees): Update documentation.
7335
7336 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
7337
7338         * dump.c (cp_dump_tree, USING_STMT case): New case.
7339         * tree.c (cp_statement_code_p): Add USING_STMT.
7340         * decl2.c (do_using_directive): Add the using directive statement.
7341
7342         * tree.c (walk_tree): Reformat an if block.
7343
7344 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
7345
7346         * decl.c (compute_array_index_type): Don't try to do anything with
7347         the indices when processing a template.
7348
7349 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7350
7351         * call.c: NULL_PTR -> NULL.
7352         * class.c: Likewise.
7353         * cvt.c: Likewise.
7354         * decl.c: Likewise.
7355         * decl2.c: Likewise.
7356         * except.c: Likewise.
7357         * init.c: Likewise.
7358         * rtti.c: Likewise.
7359         * search.c: Likewise.
7360         * tree.c: Likewise.
7361         * typeck.c: Likewise.
7362         * typeck2.c: Likewise.
7363
7364 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
7365
7366         * decl2.c (do_using_directive): Revert previous patch.
7367
7368 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
7369
7370         * cp-tree.def (USING_STMT): New statement node.
7371         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
7372         * decl2.c (do_using_directive): Add USING_STMT to statement
7373         tree. Don't emit errors when processing template decl.
7374         * pt.c (tsubst_expr, USING_STMT case): New case.
7375         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
7376
7377 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
7378
7379         * call.c (build_new_op): Convert args from reference here.
7380         (build_conditional_expr): Don't convert here.
7381
7382 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
7383
7384         * spew.c (last_token_id): New static variable.
7385         (read_token): Set it here.
7386         (yyerror): Use it here.
7387
7388 2001-04-30  Richard Henderson  <rth@redhat.com>
7389
7390         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
7391         * decl.c: Likewise.
7392
7393 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
7394
7395         * gxxint.texi: Remove.
7396         * Make-lang.in: Remove all traces of gxxint.texi.
7397
7398 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
7399
7400         * decl2.c (start_static_initialization_or_destruction): Correct
7401         logic to handle the -fno-use-cxa-atexit case.
7402
7403 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
7404
7405         * optimize.c (update_cloned_parm): New function.
7406         (maybe_clone_body): Use it.  Update the `this' parameter too.
7407
7408 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
7409
7410         * decl2.c (unsupported_options): Add new-abi.
7411         * lang-options.h: Remove no longer supported options.
7412
7413 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
7414
7415         * except.c (can_convert_eh): Don't check template parms,
7416         typename types etc.
7417
7418 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
7419
7420         * optimize.c (maybe_clone_body): Copy parameter names and locations.
7421
7422 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
7423
7424         * cp-tree.h (adjust_clone_args): Prototype new function.
7425         * class.c (adjust_clone_args): New function.
7426         * decl.c (start_function): Call it for in charge ctors.
7427
7428 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
7429
7430         * method.c (use_thunk): Make sure that thunks really are emitted
7431         when requested.
7432
7433 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
7434
7435         * mangle.c (write_chars): New macro.
7436         (hwint_to_ascii): New function
7437         (write_number): Use it.
7438         (write_integer_cst): Deal with really big numbers.
7439
7440 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
7441
7442         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
7443         the clone.
7444
7445 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
7446
7447         * decl.c (grokdeclarator): Set context of namespace scope
7448         TYPE_DECLS.
7449
7450 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
7451
7452         * cp/optimize.c: Include hashtab.h.
7453         (struct inline_data): Add tree_pruner.
7454         (expand_call_inline, expand_calls_inline): Use it when calling
7455         walk_tree.
7456         (optimize_function): Initialize and free tree_pruner.
7457
7458 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
7459
7460         Lazy __FUNCTION__ generation.
7461         * cp-tree.def (FUNCTION_NAME): Remove.
7462         * cp-tree.h (function_name_declared_p): Remove.
7463         (cp_fname_init): Prototype.
7464         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
7465         don't call declare_function_name. Call start_fname_decls.
7466         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
7467         clobber the line number.
7468         (cp_fname_init): New function.
7469         (start_function): Call start_fname_decls.
7470         (finish_function): Call finish_fname_decls.
7471         * lex.c (reswords): Add slots for __FUNCTION__ et al.
7472         (rid_to_yy): Add mappings for __FUNCTION__ et al.
7473         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
7474         * parse.y (VAR_FUNC_NAME): New token.
7475         (primary): Add VAR_FUNC_NAME.
7476         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
7477         generation.
7478         (tsubst, FUNCTION_NAME case): Remove.
7479         (tsubst_copy, FUNCTION_NAME case): Remove.
7480         (tsubst_expr, DECL_STMT case): Be careful with a
7481         DECL_PRETTY_FUNCTION_P.
7482         (instantiate_decl): Remove function_name_declared_p.
7483         * semantics.c (begin_compound_statement): Don't call
7484         declare_function_name here.
7485         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
7486         (finish_translation_unit): Call finish_fname_decls.
7487         (expand_body): Remove function_name_declared_p.
7488         * typeck2.c (digest_init): Allow any ERROR_MARK.
7489
7490 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
7491
7492         * pt.c (tsubst_decl): Use VOID_TYPE_P.
7493         * semantics.c: Fix some typos.
7494
7495 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
7496
7497         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
7498
7499 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7500
7501         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
7502
7503 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
7504
7505         * except.c (build_throw): Wrap the initialization of the exception
7506         object in a MUST_NOT_THROW_EXPR.
7507         (do_free_exception): #if 0.
7508
7509 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
7510
7511         * cp-tree.h (finish_enum): Change prototype.
7512         * decl.c (finish_enum): Reorganize.
7513         * parse.y (structsp): Adjust calls to finish_enum.
7514
7515 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
7516
7517         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
7518         't' case.
7519
7520 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
7521
7522         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
7523         (layout_empty_base): Return at end flag.
7524         (build_base_field): Likewise.
7525         (build_base_fields): Likewise.
7526         (layout_virtual_bases): Don't add 1 to eoc value.
7527         (end_of_class): Use full size for empty bases.
7528         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
7529         empty bases. Don't add 1 to eoc value. Only add trailing padding
7530         if we're an empty class with no empty bases.
7531         (dump_class_hierarchy): Dump size and alignment.
7532
7533 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
7534
7535         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
7536         ICS_BAD_FLAG.
7537
7538 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
7539
7540         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
7541         is found, look first if name does not match the structure name.
7542
7543 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
7544
7545         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
7546         set.
7547         (SET_DECL_LANGUAGE): New macro.
7548         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
7549         (pushdecl): Likewise.
7550         (build_library_fn_1): Likewise.
7551         (build_cp_library_fn): Likewise.
7552         (grokfndecl): Likewise.
7553         (grokvardecl): Mark `extern "C"' variables as having C linkage.
7554         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
7555         * lex.c (retrofit_lang_decl): Likewise.
7556         * mangle.c (mangle_decl_string): Don't mangle the names of
7557         variables declared with C language linkage.
7558         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
7559
7560 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7561
7562         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
7563         flag_access_control from uninitialized storage.
7564
7565 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
7566
7567         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
7568         * mangle.c (write_pointer_to_member_type): Fix mangling of
7569         pointers to cv-qualified member function types.
7570
7571         * init.c (build_delete): Create a SAVE_EXPR for the address if
7572         we're going to use it more than once.
7573
7574 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
7575
7576         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
7577         (expand_ptremfunc_cst): Change prototype.
7578         (delta2_from_ptrmemfunc): Remove.
7579         * expr.c (cplus_expand_constant): Adjust call to
7580         expand_ptrmemfunc_cst.
7581         * typeck.c (build_ptrmemfunc1): Simplify.
7582         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
7583         results in a constant.
7584         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
7585         (delta2_from_ptrmemfunc): Remove.
7586         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
7587
7588 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
7589
7590         * cp-tree.h (decl_namespace_list): New macro.
7591         (struct saved_scope): Add decl_ns_list.
7592         * decl.c (mark_saved_scope): Mark it.
7593         * decl2.c: Lose static decl_namespace_list.
7594         (init_decl2): Don't save it.
7595
7596 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7597
7598         * cp-tree.h (warn_return_type, yylex): Delete redundant
7599         declarations.
7600
7601         * decl.c (current_class_depth, global_namespace): Likewise.
7602
7603         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
7604
7605         * repo.c (flag_use_repository): Likewise.
7606
7607 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7608
7609         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
7610         set_block, pushdecl, getdecls, gettags, init_decl_processing,
7611         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
7612         lvalue_or_else, print_lang_statistics, comp_target_types,
7613         unsigned_type, signed_type, signed_or_unsigned_type,
7614         build_function_call, mark_addressable, incomplete_type_error):
7615         Delete redundant declarations.
7616
7617 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
7618
7619         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
7620         (TYPE_ANONYMOUS_P): New macro.
7621         (TAGGED_TYPE_P): New macro.
7622         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
7623         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
7624         * tree.c (no_linkage_helper): Likewise.
7625         * semantics.c (begin_class_definition): Likewise.
7626         * pt.c (convert_template_argument): Likewise.
7627         * lex.c (check_for_missing_semicolon): Likewise.
7628
7629 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
7630
7631         * class.c (dfs_unshared_virtual_bases): New function.
7632         (mark_primary_bases): Call it.
7633         (check_bases): Ignore virtual bases when determining
7634         nearly-emptiness.
7635
7636 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
7637
7638         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
7639
7640 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
7641
7642         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
7643         cloned function to the clone.
7644
7645 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7646
7647         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
7648
7649         * semantics.c: Include expr.h.
7650
7651 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
7652
7653         * method.c (implicitly_declare_fn): Commonize code for copy ctor
7654         and assignment op. Set TREE_USED for parameter.
7655
7656 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
7657
7658         * class.c (find_final_overrider_data): Add `candidates'.
7659         (dfs_find_final_overrider): Don't issue error messages
7660         prematurely.
7661         (find_final_overrider): Issue error messages here.
7662         (build_base_field): Don't warn about amgibuous direct bases here.
7663         (warn_about_ambiguous_direct_bases): New function.
7664         (layout_class_type): Use it.
7665
7666 2001-04-10  Richard Henderson  <rth@redhat.com>
7667
7668         * typeck.c (build_array_ref): Push the array reference inside
7669         COMPOUND_EXPR and COND_EXPR.
7670
7671 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
7672
7673         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
7674         * decl.c (duplicate_decls): Adjust accordingly.
7675         (maybe_commonize_var): Likewise.
7676         (grokfndecl): Likewise.
7677         (start_function): Likewise.
7678         (start_method): Likewise.
7679         * decl2.c (key_method): Likewise.
7680         (import_export_decl): Likewise.
7681         * method.c (implicitly_declare_fn): Likewise.
7682         * optimize.c (maybe_clone_body): Likewise.
7683
7684 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
7685
7686         * lang-specs.h: Add __DEPRECATED.
7687
7688 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
7689
7690         * search.c (get_dynamic_cast_base_type): When building a new
7691         constant, set its type to ssizetype.
7692
7693 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
7694
7695         * optimize.c (expand_call_inline): Only add newly inlined statements
7696         into inlined_stmts.
7697
7698 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
7699
7700         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
7701         (OPERATOR_FORMAT): Likewise.
7702         (OPERATOR_TYPENAME_FORMAT): Likewise.
7703         * operators.def: Remove old name-mangling information.
7704         * decl.c (grok_op_properties): Adjust accordingly.
7705         * lex.c (init_operators): Likewise.
7706         * rtti.c (get_tinfo_decl): Issue error messages about types that
7707         have variable size.
7708
7709 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
7710
7711         * decl2.c (import_export_decl): Don't call import_export_class
7712         when processing an inline member function.
7713         * semantics.c (expand_body): Call import_export_decl before
7714         emitting inline functions.
7715
7716 2001-03-28  Richard Henderson  <rth@redhat.com>
7717
7718         IA-64 ABI Exception Handling:
7719         * cp-tree.def (EH_SPEC_BLOCK): New.
7720         (MUST_NOT_THROW_EXPR): New.
7721         * cp-tree.h: Update changed function declarations.
7722         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
7723         (CPTI_CALL_UNEXPECTED): New.
7724         (struct cp_language_function): Rename x_eh_spec_try_block
7725         to x_eh_spec_block.
7726         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
7727         * decl.c (current_binding_level): If no current function
7728         bindings, revert to scope_chain.
7729         (initialize_predefined_identifiers): Remove __cp_push_exception.
7730         (store_parm_decls): Use begin_eh_spec_block.
7731         (finish_function): Use finish_eh_spec_block.
7732         (mark_lang_function): Update for name changes.
7733         * decl2.c (finish_file): No mark_all_runtime_matches.
7734         * dump.c (cp_dump_tree): Handle new tree codes.
7735         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
7736         * except.c (catch_language_init, catch_language): Remove.
7737         (init_exception_processing): Don't set language code.
7738         Initialize call_unexpected_node, protect_cleanup_actions,
7739         eh_personality_libfunc, lang_eh_runtime_type.
7740         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
7741         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
7742         (prepare_eh_type): Split out type canonicalizations ...
7743         (build_eh_type_type): ... from here.
7744         (build_eh_type_type_ref): Remove.
7745         (mark_all_runtime_matches): Remove.
7746         (build_exc_ptr): New.
7747         (do_begin_catch, do_end_catch): New.
7748         (do_pop_exception): Remove.
7749         (build_terminate_handler): Remove.
7750         (choose_personality_routine): Split out language choice from ...
7751         (initialize_handler_parm): ... here.
7752         Use MUST_NOT_THROW_EXPR.
7753         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
7754         exception object handling.
7755         (expand_start_eh_spec, expand_end_eh_spec): Remove.
7756         (expand_exception_blocks, alloc_eh_object): Remove.
7757         (begin_eh_spec_block, finish_eh_spec_block): New.
7758         (do_allocate_exception, do_free_exception): New.
7759         (expand_throw): Merge into ...
7760         (build_throw): ... here.  Update for abi.
7761         * expr.c (cplus_expand_expr): No expand_internal_throw.
7762         Handle MUST_NOT_THROW_EXPR.
7763         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
7764         * semantics.c (*) Update for except.h name changes.
7765         (genrtl_try_block): No protect_with_terminate.
7766         (genrtl_eh_spec_block): New.
7767         (genrtl_handler): Don't emit the goto here.
7768         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
7769         (genrtl_finish_function): Don't expand_exception_blocks.
7770         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
7771
7772 2001-03-28  Richard Henderson  <rth@redhat.com>
7773
7774         * decl.c (struct named_label_list): Rename eh_region to
7775         in_try_scope, add in_catch_scope.
7776         (struct binding_level): Rename eh_region to is_try_scope,
7777         add is_catch_scope.
7778         (note_level_for_try): Rename from note_level_for_eh.
7779         (note_level_for_catch): New.
7780         (poplevel): Copy both is_try_scope and is_catch_scope to
7781         the named_label_list struct.
7782         (check_previous_goto_1): Don't check for catch block via
7783         DECL_ARTIFICIAL; use in_try_scope instead.
7784         (check_goto): Likewise.
7785         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
7786         * except.c (expand_start_catch_block): Call note_level_for_catch.
7787         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
7788
7789 2001-03-27  Richard Henderson  <rth@redhat.com>
7790
7791         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
7792         exceptions_via_longjmp.
7793
7794 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
7795
7796         * pt.c (check_default_tmpl_args):  Make error messages clearer.
7797
7798 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
7799
7800         * error.c:  Also undefine 'A' macro used for cp_printers definition.
7801
7802 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7803
7804         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
7805
7806 2001-03-26  Mike Yang <yang@research.att.com>
7807             Mark Mitchell  <mark@codesourcery.com>
7808
7809         * dump.c (dump_access): New function.
7810         (cp_dump_tree): Use it.  Dump basetype information for class
7811         types.
7812
7813 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
7814
7815         * Makefile.in (optimize.o): Depend on params.h.
7816         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
7817         (init_decl_processing): Set flag_no_inline when doing
7818         inlining-on-trees.
7819         * optimize.c: Include params.h.
7820         (struct inline_data): Improve documentation of FNS.  Add
7821         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
7822         (INSNS_PER_STMT): New macro.
7823         (remap_block): Use CLONING_P.
7824         (inlinable_function_p): Don't inline big functions.
7825         (expand_call_inline): Keep track of how much inlining we've done.
7826         (optimize_function): Set FIRST_INLINED_FN.
7827         (maybe_clone_body): Set CLONING_P.
7828         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
7829         tree nodes.
7830         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
7831         rest_of_compilation.  Clear DECL_RTL for local variables
7832         afterwards.
7833         (clear_decl_rtl): New function.
7834
7835 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
7836
7837         Implement DR 209
7838         * cp-tree.h (skip_type_access_control,
7839         reset_type_access_control): Prototype.
7840         * decl.c (grokdeclarator): Access of friends is not checked.
7841         * parse.y (component_decl_list): Reset type access control.
7842         * semantics.c (decl_type_access_control): Clear
7843         current_type_lookups.
7844         (save_type_access_control): Don't save if not deferring.
7845         (skip_type_access_control, reset_type_access_control): New
7846         functions.
7847         (begin_class_definition): Do type access control for basetypes.
7848         Start deferred access control.
7849         (finish_class_definition): Resume immediate access control if
7850         this is a local class.
7851
7852 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7853
7854         * class.c (add_method): Use memcpy/memmove, not bcopy.
7855
7856         * decl.c (duplicate_decls): Likewise.
7857
7858 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
7859
7860         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
7861         not `_'.
7862
7863 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
7864
7865         * decl.c (local_names): Define.
7866         (push_local_name): New.
7867         (grok_reference_init): Return init if initializing static reference
7868         variable with non-constant instead of emitting it.
7869         Move expand_static_init call to cp_finish_decl.
7870         (layout_var_decl): Call push_local_name.
7871         (maybe_commonize_var): Allow inlining functions even if they have
7872         static local variables, use comdat_linkage for them if flag_weak.
7873         (check_initializer): Call obscure_complex_init if
7874         grok_reference_init returned nonzero.
7875         (save_function_data): Clear x_local_names.
7876         (pop_cp_function_context): Free x_local_names.
7877         (mark_inlined_fns): Remove.
7878         (mark_lang_function): Mark x_local_names.
7879         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
7880         Mark inlined_fns as tree, remove call to mark_inlined_fns.
7881         * class.c (alter_access): Ensure DECL_ACCESS is never set if
7882         DECL_DISCRIMINATOR_P.
7883         * cp-tree.h (cp_language_function): Add x_local_names.
7884         (lang_decl_flags): Add discriminator into u2.
7885         (lang_decl_inlined_fns): Remove.
7886         (lang_decl): inlined_fns is now a TREE_VEC.
7887         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
7888         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
7889         TREE_VEC, not a custom structure.
7890         (optimize_function): Likewise.
7891         * mangle.c (discriminator_for_local_entity): Discriminate among
7892         VAR_DECL local entities.
7893         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
7894         is not valid.
7895
7896 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
7897
7898         Add support for Java interface method calls.
7899         * cp-tree.h (struct lang_type): Add java_interface flag.
7900         (TYPE_JAVA_INTERFACE): New macro.
7901         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
7902         by setting TYPE_JAVA_INTERFACE.
7903         * call.c (java_iface_lookup_fn): New static.
7904         (build_over_call): If calling a method declared in a
7905         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
7906         expression which resolves the function address.
7907         (build_java_interface_fn_ref): New function.
7908
7909 2001-03-22  Richard Henderson  <rth@redhat.com>
7910
7911         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
7912         * except.c: Don't include it.
7913
7914 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
7915             based on an idea from Joe Buck <jbuck@synopsys.com>
7916
7917         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
7918         New nonterminals.
7919         (data_def, component_decl): Add reductions to bad_decl.
7920
7921 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
7922
7923         * method.c (do_build_assign_ref): Don't use build_modify_expr for
7924         anonymous aggregates, since they don't have assignment operator
7925         method.
7926         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
7927         assignment operators for anonymous structure fields.
7928
7929 2001-03-21  Jason Merrill  <jason@redhat.com>
7930
7931         * pt.c (instantiate_decl): Abort if we see a member constant
7932         instantiation that doesn't already have its initializer.
7933         Downgrade explicit instantiation without definition to pedwarn.
7934
7935         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
7936         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
7937         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
7938
7939         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
7940         (pending_vtables): Remove.
7941         * decl2.c (pending_vtables): Remove.
7942         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
7943         CLASSTYPE_VTABLE_NEEDS_WRITING.
7944         (import_export_class): Likewise.
7945         (init_decl2): Don't mark pending_vtables.
7946         * lex.c (handle_pragma_vtable): Just sorry.
7947         * pt.c (instantiate_class_template): Don't mess with
7948         CLASSTYPE_VTABLE_NEEDS_WRITING.
7949         (mark_class_instantiated): Likewise.
7950         * ptree.c (print_lang_type): Don't print it.
7951         * semantics.c (begin_class_definition): Don't set it.
7952
7953         * pt.c (template_tail): Replace with last_pending_template.
7954         (maybe_templates, maybe_template_tail): Remove.
7955         (add_pending_template): Adjust.
7956         (instantiate_pending_templates): Adjust.
7957
7958         * cp-tree.h (struct saved_scope): Remove lang_stack field.
7959         (current_lang_stack): Remove.
7960         * decl.c (maybe_push_to_top_level): Don't initialize it.
7961         (duplicate_decls): Use current_lang_depth.
7962         (xref_basetypes): Likewise.
7963         * class.c (current_lang_depth): New fn.
7964         (push_lang_context): Use more varray functionality.
7965         (pop_lang_context): Likewise.
7966
7967         * error.c (GLOBAL_THING): Always use '__'.
7968
7969 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
7970
7971         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
7972
7973         * mangle.c (mangle_decl_string): Mangle the names of overloaded
7974         operators, even when they have `extern "C"' linkage.
7975
7976 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
7977
7978         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
7979         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
7980         where it's not necessary.
7981         (add_method): Remove optimization involving comparison of
7982         DECL_ASSEMBLER_NAME.
7983         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
7984         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
7985         where it's not necessary.
7986         (check_methods): Likewise.
7987         (build_clone): Likewise.
7988         (built_vtt): Likewise.
7989         * cp-tree.h (DECL_NEEDED_P): Likewise.
7990         * decl.c (pushtag): Likewise.
7991         (duplicate_decls): Likewise.
7992         (pushdecl): Likewise.
7993         (builtin_function): Likewise.
7994         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
7995         (build_cp_library_fn): Likewise.
7996         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
7997         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
7998         where it's not necessary.
7999         (make_rtl_for_nonlocal_decl): Likewise.
8000         (cp_finish_decl): Likewise.
8001         (grokfndecl): Likewise.
8002         (grokvardecl): Likewise.
8003         (grokdeclarator): Likewise.
8004         (start_function): Likewise.
8005         (cp_missing_return_ok_p): Likewise.
8006         * decl2.c (grokclassfn): Likewise.
8007         (check_classfn): Likewise.
8008         (finish_static_data_member_decl): Likewise.
8009         (grokfield): Likewise.
8010         * error.c (GLOBAL_IORD_P): Remove.
8011         (dump_global_iord): Improve output.
8012         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
8013         * except.c (nothrow_libfn_p): Summarily reject any function not in
8014         namespace-scope.
8015         * init.c (build_java_class_ref): Don't explicitly set
8016         DECL_ASSEMBLER_NAME after calling mangle_decl.
8017         * mangle.c (mangle_decl_string): Handle extern "C" functions.
8018         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
8019         * method.c (set_mangled_name_for_decl): Don't explicitly set
8020         DECL_ASSEMBLER_NAME after calling mangle_decl.
8021         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
8022         IDENTIFIER_GLOBAL_VALUE for the thunk.
8023         * pt.c (set_mangled_name_for_template_decl): Remove.
8024         (check_explicit_specialization): Don't use it.
8025         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
8026         (tsubst_friend_function): Likewise.
8027         (tsubst_decl): Likewise.
8028         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
8029         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
8030         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
8031         where it's not necessary.
8032         (tinfo_base_init): Likewise.
8033         (create_real_tinfo_var): Likewise.
8034         * search.c (looup_field_1): Likewise.
8035         * semantics.c (finish_named_return_value): Likewise.
8036         * tree.c (init_tree): Set lang_set_decl_assembler_name.
8037
8038 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
8039
8040         Correct semantics restrictions checking in throw-expression.
8041         * except.c (is_admissible_throw_operand): New function.
8042         (build_throw): Use it.
8043
8044 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
8045
8046         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
8047         and its ilk.
8048
8049 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
8050
8051         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
8052         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
8053         * decl.c (duplicate_decls): Likewise.
8054         (builtin_function): Likewise.
8055         (build_library_fn): Likewise.
8056         (build_cp_library_fn): Likewise.
8057         (check_initializer): Likewise.
8058         (cp_finish_decl): Likewise.
8059         * decl2.c (grokfield): Likewise.
8060         (grok_function_init): Remove #if 0'd code.
8061         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
8062         * friend.c (do_friend): Likewise.
8063         * init.c (get_temp_regvar): Likewise.
8064         * method.c (make_thunk): Likewise.
8065         * pt.c (tsubst_friend_function): Likewise.
8066         (tsubst_decl): Likewise.
8067         (regenerate_decl_from_template): Likewise.
8068         * semantics.c (genrtl_named_return_value): Likewise.
8069         (expand_body): Likewise.
8070         (genrtl_finish_function): Likewise.
8071         * tree.c (cp_tree_equal): Likewise.
8072
8073 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
8074
8075         * call.c (convert_like_real): Add extra semantics to INNER
8076         parameter. Don't convert to temporary if a user conversion
8077         gives us an lvalue that we're about to bind to a reference.
8078         Set INNER to indicate pending reference binding on recursive
8079         calls.
8080
8081 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
8082
8083         * cp/lex.c: Delete duplicate pending_lang_change.
8084
8085 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
8086
8087         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
8088         Similarly.
8089         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
8090         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
8091
8092 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
8093
8094         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
8095
8096 2001-03-08  Stan Shebs  <shebs@apple.com>
8097
8098         * cp-tree.h (set_identifier_local_value): Remove unused decl.
8099
8100 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
8101
8102         * spew.c: Remove references to CPP_OSTRING.
8103
8104 2001-03-06  Andrew Haley  <aph@redhat.com>
8105
8106         * typeck.c (convert_arguments): Check that we have an fndecl.
8107
8108 2001-03-05  Andrew Haley  <aph@redhat.com>
8109
8110         * typeck.c (convert_arguments): Don't do ellipsis conversion for
8111         __built_in_constant_p.
8112
8113 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
8114
8115         * typeck.c (build_static_cast): Allow enum to enum conversions
8116         as per DR 128.
8117
8118 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
8119
8120         * class.c (check_field_decls): Pointers to member do not a
8121         non-pod struct make, as per DR 148.
8122
8123 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
8124
8125         * call.c (joust): cp_pedwarn when using gnu extension concerning
8126         worst conversion sequences.
8127
8128 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
8129
8130         * decl.c: Replace all uses of 'boolean' with 'bool'.
8131
8132 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
8133
8134         * lang-specs.h: Add zero initializer for cpp_spec field to
8135         all array elements that need one.  Don't put an #ifdef inside
8136         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
8137         use it.
8138
8139 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
8140
8141         Implement using decls inside template functions.
8142         * decl2.c (validate_nonmember_using_decl): Don't special case
8143         fake_std_node in the global namespace. Don't reject early when
8144         processing a template.
8145         (do_local_using_decl): Add to statement tree. Don't do further
8146         processing when building a template.
8147         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
8148
8149 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
8150
8151         * decl2.c (do_nonmember_using_decl): Don't complain if we find
8152         same function. Do complain about ambiguating extern "C"
8153         declarations.
8154
8155 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
8156
8157         Remove floating point and complex type template constant parms.
8158         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
8159         COMPLEX_TYPE extensions.
8160         (invalid_nontype_parm_type_p): Likewise.
8161
8162 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
8163
8164         * except.c (call_eh_info): Revert "match_function"'s type.
8165
8166 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
8167
8168         Fix ctor vtable vcall offsets.
8169         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
8170         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
8171         (get_matching_base): Remove.
8172         (get_original_base): New function.
8173         (build_vtbl_initializer): Initialize vid.rtti_binfo.
8174         Use a virtual thunk for a ctor vtable with an index
8175         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
8176         primary base within a constructor vtable. Only set
8177         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
8178         when primary base has been lost.
8179         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
8180
8181 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
8182
8183         * call.c (joust): Ensure more_specialized()'s argument length
8184         parameter has correct value for constructors.
8185
8186 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
8187
8188         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
8189
8190         * decl.c (mark_inlined_fns): Prototype.
8191
8192 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
8193
8194         * spew.c (yylex): Correct handling of friends.
8195
8196 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
8197
8198         * mangle.c (write_encoding): Pass write_function_type the
8199         FUNCTION_DECL for the function being encoded.
8200         (write_function_type): Pass it along to write_bare_function_type.
8201         (write_bare_function_type): Pass it along to write_method_parms.
8202         (write_method_parms): Don't mangle the compiler-generated
8203         parameters to a constructor or destructor.
8204
8205 2001-02-22  Andreas Jaeger  <aj@suse.de>
8206
8207         * optimize.c: Include toplev.h for
8208         note_deferral_of_defined_inline_function prototype.
8209
8210 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
8211
8212         * cp-tree.h (struct lang_decl_inlined_fns): New.
8213         (struct lang_decls): Add inlined_fns.
8214         (DECL_INLINED_FNS): New macro.
8215         * optimize.c (struct inline_data): Add inlined_fns.
8216         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
8217         (inlinable_function_p): Likewise, fix typo in comment,
8218         function is not inlinable if it already inlined function currently
8219         being optimized.
8220         (expand_call_inline): Add fn to inlined_fns if necessary.
8221         (optimize_function): Initialize inlined_fns.
8222         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
8223         * decl.c (mark_inlined_fns): New function.
8224         (lang_mark_tree): Call it.
8225
8226 2001-02-21  Jason Merrill  <jason@redhat.com>
8227
8228         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
8229         (DECL_UNINLINABLE): Move to middle-end.
8230
8231         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
8232         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
8233         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
8234         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
8235         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
8236
8237         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
8238         second parm of op=.
8239
8240 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
8241
8242         * decl2.c (set_decl_namespace): Allow explicit instantiations in
8243         any namespace.
8244
8245 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8246
8247         * optimize.c (expand_call_inline): Don't walk subtrees of type
8248         nodes.
8249
8250 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
8251
8252         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
8253         for a destructor.
8254
8255 2001-02-18  Jason Merrill  <jason@redhat.com>
8256
8257         Do put the VTT parameter in DECL_ARGUMENTS.
8258         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
8259         (current_vtt_parm): New macro.
8260         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
8261         (DECL_HAS_VTT_PARM_P): New macro.
8262         (DECL_VTT_PARM): Remove.
8263         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
8264         * decl.c (duplicate_decls): Only copy the operator code if
8265         appropriate.
8266         (start_function): Set current_vtt_parm.
8267         (lang_mark_tree): Don't mark vtt_parm.
8268         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
8269         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
8270         * class.c (build_clone): Maybe remove the VTT parm.
8271         * optimize.c (maybe_clone_body): Set up the VTT parm.
8272         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
8273         * call.c (build_over_call): Just allow the VTT arg.
8274         * method.c (make_thunk): Don't set DECL_VTT_PARM.
8275         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
8276         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
8277         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
8278         * error.c (dump_function_decl): Likewise.
8279         * call.c (build_user_type_conversion_1, convert_like_real): Abort
8280         if we try to call a constructor with in-charge or VTT parms.
8281         * method.c (skip_artificial_parms_for): New fn.
8282         * call.c (add_function_candidate, build_over_call): Call it.
8283         * call.c (build_new_method_call): Use current_vtt_parm.
8284         * init.c (expand_virtual_init): Likewise.
8285         * class.c (same_signature_p): No longer static.
8286         * cp-tree.h: Declare it.
8287         * search.c (look_for_overrides_r): Use it.
8288
8289 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
8290
8291         * cp-tree.h (new_abi_rtti_p): Remove.
8292         (name_mangling_version): Likewise.
8293         (flag_do_squangling): Likewise.
8294         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
8295         * decl.c (grokfndecl): Likewise.
8296         * decl2.c (name_mangling_version): Remove.
8297         (flag_do_squangling): Likewise.
8298         (lang_f_options): Remove `squangle'.
8299         (unsupported_options): Add `squangle'.
8300         (cxx_decode_option): Issue a warning about uses of
8301         -fname-mangling-version.
8302         (finish_file): Remove old ABI support.
8303         * pt.c (check_explicit_specialization): Likewise.
8304         (tsubst_decl): Likewise.
8305         * rtti.c (init_rtti_processing): Likewise.
8306         (build_headof): Likewise.
8307         (get_tinfo_decl_dynamic): Likewise.
8308         (tinfo_from_decl): Likewise.
8309         (build_dynamic_cast_1): Likewise.
8310         (synthesize_tinfo_var): Likewise.
8311         * init.c (build_new): Allow enumeration types for the array-bounds
8312         in a direct-new-declarator.
8313
8314         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
8315
8316         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
8317         TREE_PROTECTED from the template being specialized.
8318
8319 2001-02-17  Jason Merrill  <jason@redhat.com>
8320
8321         * decl2.c (build_artificial_parm): Set TREE_READONLY.
8322
8323         * decl.c (bad_specifiers): Allow throw specs on things with
8324         pointer-to-function or -member-function type.
8325         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
8326         a pmf.
8327
8328 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
8329
8330         * call.c (check_dtor_name): Handle template names correctly.
8331
8332 2001-02-16  Jason Merrill  <jason@redhat.com>
8333
8334         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
8335         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
8336         * optimize.c (maybe_clone_body): Don't substitute it.
8337         * call.c (build_new_method_call): Check in_chrg instead.
8338         * init.c (expand_virtual_init): Likewise.
8339
8340 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
8341
8342         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
8343         class-type introduces at least a type-name.
8344
8345 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
8346
8347         * call.c (convert_like_real): Create a temporary for non-lvalue.
8348
8349 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
8350
8351         * cp-tree.h: Fix typos in comments.
8352
8353 2001-02-16  Jason Merrill  <jason@redhat.com>
8354
8355         * optimize.c (remap_block): If we're compiling a clone, pass the
8356         new block to insert_block.
8357
8358 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
8359
8360         * semantics.c (finish_asm_stmt): Robustify.
8361
8362 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
8363
8364         * pt.c (push_template_decl_real): Don't remangle the name of a
8365         class template.
8366
8367 2001-02-15  Jim Meyering  <meyering@lucent.com>
8368
8369         * Make-lang.in (c++.install-common): Depend on installdirs.
8370         (c++.install-info): Likewise.
8371         (c++.install-man): Likewise.
8372
8373 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
8374
8375         * typeck2.c (build_m_component_ref): Robustify.
8376
8377 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
8378
8379         * friend.c (do_friend): Don't take the nested [template] class
8380         into account when deciding whether to warn about the friend
8381         function not referring to a template function.
8382
8383 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
8384
8385         * typeck.c (build_unary_op): Clarify error message.
8386
8387 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
8388
8389         * parse.y (component_constructor_declarator): allow optional
8390         parentheses around constructor class name.
8391
8392 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
8393
8394         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
8395         section.
8396         * init.c (emit_base_init): Remove incorrect comment about
8397         virtual bases.
8398         * method.c (make_thunk): Fix comment alignment.
8399
8400 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
8401
8402         Kill remnants of this is variable.
8403         * cp-tree.h (flag_this_is_variable): Remove.
8404         * decl2.c (flag_this_is_variable): Remove.
8405         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
8406         (build_vbase_path): The path is non-static, even in a cdtor.
8407         (resolves_to_fixed_type_p): Add additional return value.
8408         * search.c (init_vbase_pointers): Adjust.
8409         * tree.c (lvalue_p_1): Adjust.
8410         * typeck.c (mark_addressable): Adjust.
8411
8412 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
8413
8414         * pt.c (unify): Don't check cv quals of array types.
8415
8416 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
8417
8418         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
8419         check whether we already have the type.
8420
8421 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
8422
8423         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
8424         * call.c (build_op_delete_call): Simplify to remove duplicate
8425         code.
8426         * class.c (clone_function_decl): Don't build the deleting variant
8427         of a non-virtual destructor.
8428         * decl.c (finish_destructor_body): Don't call delete if this is a
8429         non-virtual destructor.
8430         * init.c (build_delete): Explicitly call `operator delete' when
8431         deleting an object with a non-virtual destructor.
8432
8433 2001-02-13  Jason Merrill  <jason@redhat.com>
8434
8435         * lang-specs.h: Add more __EXCEPTIONS.
8436
8437 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
8438
8439         * typeck2.c (process_init_constructor): Check
8440         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
8441
8442 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
8443
8444         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
8445         Remove spurious information in comment. Allow further
8446         adjustments of REFERENCE_TYPE args.
8447
8448 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
8449
8450         * errfn.c (cp_deprecated): Tweak diagnostic text.
8451         * parse.y (new_initializer): Deprecate initializer lists
8452         extension.
8453
8454 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
8455
8456         Remove old ABI support.
8457
8458 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
8459
8460         * decl2.c (flag_vtable_thunks): Always set it to 1.
8461         (flag_new_abi): Likewise.
8462         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
8463
8464         * Makefile.in (g++spec.o): Fix typo.
8465
8466 2001-02-09  Jason Merrill  <jason@redhat.com>
8467
8468         * lang-specs.h: Restore definition of __EXCEPTIONS.
8469
8470 2001-02-08  Jason Merrill  <jason@redhat.com>
8471
8472         * search.c (shared_member_p): New function.
8473         (lookup_field_r): Use it.
8474         * cp-tree.h (SHARED_MEMBER_P): Remove.
8475
8476         * method.c (process_overload_item): Handle template-dependent array
8477         bounds.
8478         * pt.c (type_unification_real): If we end up with undeduced nontype
8479         parms, try again.
8480
8481         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
8482         types.
8483
8484         * typeck2.c (friendly_abort): Don't say anything if we have
8485         earlier errors or sorries.
8486
8487         * decl.c (check_tag_decl): Notice attempts to redefine bool and
8488         wchar_t.  Ignore if in_system_header.
8489
8490         * decl.c (maybe_push_cleanup_level): New fn...
8491         (start_decl_1): ...split out from here.
8492         * cvt.c (build_up_reference): Use it.
8493         * cp-tree.h: Declare it.
8494
8495 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
8496
8497         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
8498         spec.
8499
8500 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
8501
8502         * pt.c (lookup_template_class): Make sure it's a primary
8503         template or template_template_parm when called from the parser.
8504         (instantiate_template_class): Add assertion.
8505
8506 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
8507
8508         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
8509         from error_mark_node.
8510
8511 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
8512
8513         Fix specification and implementation bugs in V3 ABI
8514         construction vtables.
8515         * cp-tree.h (flag_dump_class_layout): New flag.
8516         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
8517         (BINFO_LOST_PRIMARY_P): New flag.
8518         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
8519         (BINFO_PRIMARY_MARKED_P): Rename to ...
8520         (BINFO_PRIMARY_P): ... here.
8521         (binfo_via_virtual): New prototype.
8522         * decl2.c (flag_dump_class_layout): New flag.
8523         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
8524         use `=' as a file name separator.
8525         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
8526         bases.
8527         (build_vtbl_address): If this is a virtual primary base, then
8528         get the vtbl of what it is ultimately primary for.
8529         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
8530         for BINFO_PRIMARY_P.
8531         (dfs_skip_nonprimary_vbases_markedp): Likewise.
8532         (get_shared_vbase_if_not_primary): Likewise.
8533         (dfs_get_pure_virtuals): Likewise.
8534         (expand_upcast_fixups): Likewise.
8535         (fixup_virtual_upcast_offsets): Likewise.
8536         (dfs_find_vbase_instance): Likewise.
8537         (find_vbase_instance): Likewise.
8538         (binfo_from_vbase): Adjust comment to reflect reality.
8539         (binfo_via_virtual): New function.
8540         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
8541         for binfo walking during VTT construction.
8542         (dfs_mark_primary_bases): Remove.
8543         (force_canonical_binfo_r): New function.
8544         (force_canonical_binfo): New function.
8545         (mark_primary_virtual_base): New function.
8546         (mark_primary_bases): Walk in inheritance graph order, use
8547         mark_primary_virtual_base.
8548         (determine_primary_base): Use some more intermediate variables.
8549         (dfs_find_final_overrider): Don't check for overriding along a
8550         virtual path.
8551         (dfs_modify_vtables): Walk into primary virtual bases too.
8552         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
8553         (build_base_fields): Likewise.
8554         (dfs_set_offset_for_unshared_vbases): Likewise.
8555         (layout_virtual_bases): Likewise.
8556         (end_of_class): Likewise.
8557         (finish_struct_1): Call dump_class_hierarchy, if requested.
8558         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
8559         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
8560         (dump_class_hierarchy): Add file parameter. Append to file, if
8561         required.
8562         (finish_vtbls): Adjust accumulate_vtbl_inits call.
8563         Use canonical base for virtual bases.
8564         (build_vtt): Add more comments. Adjust build_vtt_inits call.
8565         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
8566         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
8567         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
8568         virtual VTTs.
8569         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
8570         from DATA.  We want virtual primary bases and all bases via virtual.
8571         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
8572         virtual base when not a construction vtable.
8573         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
8574         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
8575         Use canonical bases when processing virtual bases.
8576         (accumulate_vtbl_inits): We're interested in any base via a
8577         virtual path.
8578         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
8579         within a construction vtable, determine what is being overridden.
8580         (build_vtbl_initializer): Add more comments
8581         (add_vcall_offset_vtbl_entries_1): Adjust comment.
8582         (build_rtti_vtbl_entries): Check if the base has lost its
8583         primary.
8584
8585 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
8586
8587         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
8588
8589 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8590
8591         * decl.c (pushdecl): Call abort instead of fatal.
8592         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
8593         * init.c (build_new_1): Likewise.
8594         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
8595         * decl.c (build_typename_type): hash_table_init now returns void.
8596         decl.c (init_decl_processing): Make an error non-fatal.
8597
8598 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
8599
8600         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
8601         Document.
8602         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
8603         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
8604         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
8605         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
8606         * decl.c (maybe_commonize_var): Use the new name-mangling where
8607         appropriate.
8608         * decl2.c (comdat_linkage): Enhance comments.  Make all
8609         compiler-generated things static, if COMDAT is not available.
8610         (get_tinfo_decl): Do not make typeinfo objects that belong in the
8611         library COMDAT.
8612         (tinfo_base_init): Use the correct mangled name for typeinfo
8613         strings, and push them into the global scope.
8614         (typeinfo_in_lib_p): New function.
8615         (synthesize_tinfo_var): Use it.
8616         (create_real_tinfo_var): Likewise.
8617
8618 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
8619
8620         * decl.c (push_class_binding): Use context_for_name_lookup instead
8621         of CP_DECL_CONTEXT.
8622         * search.c (context_for_name_lookup): Remove static.  Check for NULL
8623         context in the loop.
8624         * cp-tree.h (context_for_name_lookup): Add prototype.
8625
8626 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
8627
8628         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
8629         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
8630         Remove.
8631         * call.c (convert_class_to_reference, build_user_type_conversion_1,
8632         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
8633
8634 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
8635
8636         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
8637         of macros used when compiling g++spec.c.
8638         * g++spec.c (lang_specific_driver): Link with the shared
8639         libgcc by default.
8640
8641 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8642
8643         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
8644         make_reference_declarator, make_call_declarator), method.c
8645         (implicitly_declare_fn), parse.y (namespace_using_decl,
8646         notype_unqualified_id, expr_or_declarator, new_type_id,
8647         after_type_declarator, direct_after_type_declarator,
8648         notype_declarator, complex_notype_declarator,
8649         complex_direct_notype_declarator, qualified_id,
8650         notype_qualified_id, overqualified_id, direct_new_declarator,
8651         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
8652         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
8653         instead of build_parse_node.
8654
8655 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8656
8657         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
8658         (minus_one_node): Moved to top level gcc directory.  Renamed
8659         to integer_minus_one_node.
8660
8661         * init.c (init_init_processing): Don't set minus_one_node.
8662         (build_vec_init): Use integer_minus_one_node.
8663
8664         * rtti.c (get_tinfo_decl_dynamic): Likewise.
8665
8666 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
8667
8668         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
8669         identical and they would be replaced with constant, remove
8670         MODIFY_EXPR from the tree.
8671
8672 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8673
8674         * Make-lang.in: Remove all dependencies on defaults.h.
8675         * call.c: Don't include defaults.h.
8676         * decl.c: Likewise.
8677         * decl2.c: Likewise.
8678         * except.c: Likewise.
8679         * pt.c: Likewise.
8680         * rtti.c: Likewise.
8681         * tree.c: Likewise.
8682         * typeck.c: Likewise.
8683
8684 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
8685
8686         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
8687         operators even in "C" linkage.
8688         * method.c (set_mangled_name_for_decl): Likewise.
8689         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
8690         overloaded operators in "C" linkage.
8691
8692 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
8693
8694         * pt.c (tsubst_decl): Remove IN_DECL parameter.
8695         (tsubst_arg_types): Check parameter is not void.
8696         (tsubst): Adjust tsubst_decl call.
8697
8698 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
8699
8700         * call.c (add_builtin_candidate): Quote std properly, from
8701         previous change.
8702
8703 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8704
8705         * pt.c (check_explicit_specialization): Clone constructors and
8706         destructors.
8707
8708 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
8709
8710         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
8711         indicates anything special about template depth. Make sure we
8712         only count the user visible template classes.
8713
8714 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
8715
8716         * call.c (build_conv): Typo in comment.
8717         (add_builtin_candidate): Add more explanation.
8718         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
8719         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
8720         when we have enumeral types.
8721         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
8722         candidates for relops and eqops.
8723         (joust): Simplify control flow. Allow a non-template user
8724         function to hide a builtin.
8725
8726 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
8727
8728         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
8729         (more_specialized): Add deduction parameter.
8730         * call.c (joust): Adjust more_specialized call.
8731         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
8732         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
8733         (get_bindings_order): Remove.
8734         (get_bindings_real): Add DEDUCE parameter.
8735         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
8736         REFERENCE_TYPE jig for DEDUCE_ORDER.
8737         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
8738         maybe_adjust_types_for_deduction.
8739         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
8740         directly.
8741         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
8742         (check_cv_quals_for_unify): Use new unify qualifier flags.
8743         (unify): Clear new unify qualifier flags.
8744         (get_bindings_real): Add DEDUCE parameter.
8745         (get_bindings): Adjust call to get_bindings_real.
8746         (get_bindings_overload): Likewise.
8747         (most_specialized_instantiation): Adjust call to
8748         more_specialized.
8749
8750 2001-01-19  Jason Merrill  <jason@redhat.com>
8751
8752         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
8753
8754         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
8755         -fnew-abi.
8756
8757 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
8758
8759         * decl2.c (arg_assoc_class): Fix double iteration logic.
8760
8761 2001-01-19  Jason Merrill  <jason@redhat.com>
8762
8763         * init.c (build_delete): Always call convert_force to strip cv-quals.
8764
8765         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
8766         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
8767         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
8768
8769 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8770
8771         * search.c (get_vbase_1): Count only virtual bases.
8772
8773 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8774
8775         * class.c (duplicate_tag_error): Robustify flag clearing.
8776
8777 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8778
8779         * cp-tree.h (lookup_template_class): Add complain parm.
8780         * decl.c (lookup_namespace_name): Adjust call to
8781         lookup_template_class.
8782         (make_typename_type): Likewise.
8783         * semantics.c (finish_template_type): Likewise.
8784         * pt.c (lookup_template_class): Add complain parm. Adjust.
8785         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
8786         (tsubst): Likewise.
8787
8788 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8789
8790         * pt.c (copy_default_args_to_explicit_spec): Preserve
8791         object's CV quals. Reorganize.
8792
8793 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8794
8795         * typeck.c (build_modify_expr): Say `initialization' for
8796         INIT_EXPRs.
8797         * init.c (build_default_init): Convert to enumeral type, if
8798         needed.
8799
8800 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
8801
8802         * parse.y (nomods_initdcl0): Properly set things up for
8803         initdcl0_innards.
8804
8805 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8806
8807         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
8808         (type_unification_real): Set it.
8809         (unify): Use it.
8810
8811 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8812
8813         * decl.c (finish_destructor_body): Convert to vbase pointer here.
8814
8815 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8816
8817         * semantics.c (begin_class_definition): Check we're not inside a
8818         template parm list.
8819
8820 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8821
8822         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
8823         BASELINK_P.
8824
8825 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8826
8827         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
8828         * call.c (build_over_call): Add comment.
8829
8830 2001-01-16 Daniel Berlin <dberlin@redhat.com>
8831
8832         * cvt.c (ocp_convert): Handle vector type conversion
8833         * typeck2.c (digest_init): Handle vector type initializations
8834
8835 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
8836
8837         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
8838           was given.
8839
8840 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
8841
8842         * pt.c (check_nontype_parm): Rename to ...
8843         (invalid_nontype_parm_type_p): ... here.
8844         (process_template_parm): Adjust.
8845         (convert_template_argument): Adjust.
8846
8847 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
8848
8849         * pt.c (check_nontype_parm): New function.
8850         (process_template_parm): Use it.
8851         (convert_template_argument): Use it.
8852         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
8853         member.
8854
8855 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
8856
8857         * tree.c: Add defaults.h
8858         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
8859         * Make-lang.in (cp/tree.o): Add defaults.h.
8860
8861 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8862
8863         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
8864
8865 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8866
8867         * g++.1: Change to be ".so man1/gcc.1".
8868
8869 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8870
8871         * Make-lang.in (c++.info, c++.install-info): Build and install g++
8872         internals info.
8873         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
8874         ($(srcdir)/cp/g++int.info): New target.
8875         * gxxint.texi: Add info directory entry.  Use @@ in email address.
8876         * .cvsignore: Update.
8877
8878 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
8879
8880         * typeck.c (build_c_cast): Do template processing earlier.
8881         Always pedwarn on array casts.
8882
8883 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
8884
8885         * friend.c (make_friend_class): Make sure a templated class is
8886         actually a template.
8887
8888 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8889
8890         * decl2.c (get_guard): Set linkage from guarded decl.
8891
8892 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8893
8894         * call.c (convert_default_arg): Check for unprocessed
8895         DEFAULT_ARG.
8896         * cp-tree.h (replace_defarg): Move to spew.c.
8897         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
8898         spew.c, which is where they really are.
8899         (done_pending_defargs): Declare.
8900         (unprocessed_defarg_fn): Declare.
8901         * decl.c (replace_defarg): Move to spew.c
8902         * parse.y (structsp): Call done_pending_defargs.
8903         * spew.c (defarg_fns): Rearrange list structure.
8904         (defarg_fnsdone): New static variable.
8905         (defarg_depfns): New static variable.
8906         (init_spew): Adjust.
8907         (add_defarg_fn): Store the type in TREE_TYPE.
8908         (do_pending_defargs): Detect and deal with ordering constraints
8909         and circularity.
8910         (done_pending_defargs): New function.
8911         (unprocessed_defarg_fn): New function.
8912         (replace_defarg): Moved from decl.c. Robustify. Don't save
8913         if circularity detected.
8914
8915 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8916
8917         * pt.c (unify): Check array has a domain, before checking
8918         whether it is variable sized.
8919
8920 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8921
8922         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
8923         parameters with pointers to arrays of unknown bound.
8924
8925 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8926
8927         * parse.y (template_parm_header, template_spec_header): New
8928         reductions. Split out from ...
8929         (template_header): ... here. Use them.
8930         (template_template_parm): Use template_parm_header.
8931         * semantics.c (finish_template_template_parm): Add assert.
8932
8933 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
8934
8935         * mangle.c (write_builtin_type): Fix thinko.
8936
8937         * pt.c (copy_default_args_to_explicit_spec_1): New function.
8938         (copy_default_args_to_explicit_spec): Likewise.
8939         (check_explicit_specialization): Use it.
8940
8941         * class.c (finish_struct_1):  Remove last argument in call to
8942         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
8943         * decl.c (builtin_function): Likewise.
8944         (build_cp_library_fn): Likewise.
8945         (check_initializer): Likewise.
8946         (make_rtl_for_nonlocal_decl): Likewise.
8947         (cp_finish_decl): Likewise.
8948         (start_function): Likewise.
8949         * decl2.c (finish_anon_union): Likewise.
8950         * friend.c (do_friend): Likewise.
8951         * init.c (build_java_class_ref): Likewise.
8952         * method.c (make_thunk): Likewise.
8953         * pt.c (tsubst_friend_function): Likewise.
8954         * semantics.c (expand_body): Likewise.
8955
8956 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
8957
8958         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
8959         looking at DECL_CLONED_FUNCTION for non-functions.
8960
8961 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
8962
8963         * error.c (dump_template_parameter): Use parm to determine how
8964         to print default value.
8965
8966 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
8967
8968         * class.c (duplicate_tag_error): Clear more flags.
8969
8970 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
8971
8972         * call.c (build_new_method_call): Use binfo_for_vbase.
8973
8974 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
8975
8976         * cp-tree.h (flag_cond_mismatch): Don't declare.
8977         * decl2.c (flag_cond_mismatch): Don't define.
8978         (lang_f_options): Remove cond-mismatch.
8979         (unsupported_options): Add cond-mismatch.
8980
8981 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
8982
8983         * class.c (handle_using_decl): Reject using of constructor name
8984         of sourcing class. Allow injecting of a method with same name as
8985         nested class. Fixup error messages.
8986
8987 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
8988
8989         * decl2.c (lang_decode_option): Handle -Wformat=2.
8990
8991 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
8992
8993         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
8994         initialized_in_class.
8995         (DECL_DEFINED_IN_CLASS_P): Rename to ...
8996         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
8997         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
8998         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
8999         * pt.c (check_default_tmpl_args): Adjust for
9000         DECL_INITIALIZED_IN_CLASS_P.
9001         (instantiate_class_template): Likewise.
9002         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
9003
9004         * class.c (finish_struct): Constify saved_filename.
9005
9006 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
9007
9008         * class.c (duplicate_tag_error): Adjust diagnostic.
9009         (finish_struct): Locally set location to start of struct.
9010         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
9011
9012 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
9013
9014         * decl.c (struct binding_level): Adjust class_shadowed comments
9015         to reflect reality.
9016         (push_class_level_binding): Adjust comments to reflect reality.
9017         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
9018         Don't set TREE_VALUE on the class_shadowed list.
9019
9020 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9021
9022         * decl2.c (acceptable_java_type): Allow references too.
9023         * init.c (build_java_class_ref): When using the new ABI, search
9024         `class$' and have it mangled with `mangle_decl.'
9025         * mangle.c (write_java_integer_type_codes): New function.
9026         (write_builtin_type): Detect and mangle Java integer and real
9027         types.
9028
9029 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
9030
9031         * decl2.c (grokfield): Don't accept `asm' specifiers for
9032         non-static data members.
9033
9034 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9035
9036         * expr.c (cplus_expand_expr): Don't reset `target'.
9037
9038 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
9039
9040         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
9041
9042 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
9043
9044         * parse.y (template_datadef): Check for error_mark_node.
9045
9046 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
9047
9048         * cp-tree.def (DEFAULT_ARG): Make `x' class.
9049
9050 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
9051
9052         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
9053         (record_builtin_type): Make non-static.
9054         (flag_short_double): Don't declare.
9055         (init_decl_processing): Remove the creation of many tree nodes now
9056         in c_common_nodes_and_builtins.
9057         (build_void_list_node): New function.
9058         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
9059         * cp-tree.h (flag_short_wchar): Don't declare.
9060
9061 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
9062
9063         * call.c (build_conv): Don't use build1 for USER_CONV.
9064         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
9065
9066 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
9067
9068         * lex.c (lang_init): Call c_common_lang_init.
9069
9070 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
9071
9072         * search.c (lookup_fnfields_here): Remove.
9073         (look_for_overrides_r): Use lookup_fnfields_1.
9074         Ignore functions from using declarations.
9075
9076 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
9077
9078         Implement exceptions specifiers for implicit member functions.
9079         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
9080         * method.c (synthesize_exception_spec): New function.
9081         (locate_dtor, locate_ctor, locate_copy): New functions.
9082         (implicitly_declare_fn): Generate the exception spec too.
9083         * search.c (check_final_overrider): Check artificial functions
9084         too.
9085         * typeck2.c (merge_exception_specifiers): New function.
9086
9087 2001-01-03  Jason Merrill  <jason@redhat.com>
9088
9089         * init.c (build_default_init): New fn.
9090         (perform_member_init): Split out from here.
9091         (build_new_1): Use it.  Simplify initialization logic.
9092         (build_vec_init): Take an array, rather than a pointer and maxindex.
9093         Speed up simple initializations.  Don't clean up if we're assigning.
9094         * cp-tree.h: Adjust.
9095         * decl2.c (do_static_initialization): Remove TREE_VEC case.
9096         * parse.y (new_initializer): Return void_zero_node for ().
9097         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
9098         * typeck2.c (digest_init): Only complain about user-written
9099         CONSTRUCTORs.
9100
9101 2000-12-22  Mike Stump  <mrs@wrs.com>
9102
9103         * decl2.c: (max_tinst_depth): Increase to 50.
9104
9105 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
9106
9107         * class.c (invalidate_class_lookup_cache): Zero the
9108         previous_class_values.
9109         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
9110         TREE_INT_CST_HIGH.
9111         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
9112         * decl.c (free_bindings): New variable.
9113         (push_binding): Don't create a new binding if we have one on the
9114         free list.
9115         (pop_binding): Put old bindings on the free list.
9116         (init_decl_processing): Use size_int, not build_int_2.
9117         Register free_bindings as a GC root.
9118         (cp_make_fname_decl): Use size_int, not build_int_2.
9119         (push_inline_template_parms_recursive): Likewise.
9120         (end_template_parm_list): Likewise.
9121         (for_each_template_parm): Do not use walk_tree_without_duplicates.
9122         (tsubst_template_parms): Use size_int, not build_int_2.
9123         (tsubst): Likewise.
9124         * rtti.c (get_vmi_pseudo_type_info): Likewise.
9125
9126 2001-01-02  Richard Henderson  <rth@redhat.com>
9127
9128         * parse.y (asm): Set ASM_INPUT_P.
9129
9130 2001-01-02  Jason Merrill  <jason@redhat.com>
9131
9132         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
9133         for v3 ABI.
9134
9135         * typeck.c (cp_truthvalue_conversion): New fn.
9136         * cvt.c (ocp_convert): Use it.
9137
9138         * cp-tree.h: Lose c-common.c decls.
9139
9140         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
9141         * cvt.c (convert_to_void): Use type_unknown_p.
9142
9143         * typeck.c (strip_all_pointer_quals): Also strip quals from
9144         pointer-to-member types.
9145
9146         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
9147         parse.y as C.
9148
9149         * call.c (build_new_method_call): Do evaluate the object parameter
9150         when accessing a static member.
9151         * typeck.c (build_component_ref): Likewise.
9152
9153 2001-01-02  Andreas Jaeger  <aj@suse.de>
9154
9155         * decl.c (cp_missing_noreturn_ok_p): New.
9156         (init_decl_processing): Set lang_missing_noreturn_ok_p.
9157
9158 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
9159
9160         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
9161
9162 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
9163
9164         * class.c (pushclass): Remove #if 0'd code.
9165         * cp-tree.h (overload_template_name): Remove.
9166         * decl.c (store_bindings): Simplify.
9167         (pop_from_top_level): Likewise.
9168         * pt.c (overload_template_name): Remove.
9169         (instantiate_decl): Don't call push_to_top_level if it's not
9170         needed.
9171
9172 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
9173
9174         * pt.c (register_local_specialization): Don't return a value.
9175         (lookup_template_class): Use move-to-front heuristic when looking
9176         up template instantiations.
9177         (instantiate_decl): Only push_to_top_level when we're actually
9178         going to instantiate the template.
9179
9180 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
9181
9182         * search.c (binfo_for_vtable): Return least derived class, not
9183         most.  Handle secondary vtables.
9184
9185 2000-12-22  Jason Merrill  <jason@redhat.com>
9186
9187         * pt.c (more_specialized): Don't optimize len==0.
9188         (fn_type_unification): If we're adding the return type, increase len.
9189
9190         * typeck.c (build_binary_op): Fix pmf comparison logic.
9191
9192         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
9193         DECL_STATIC_FUNCTION_P.
9194
9195         * semantics.c (genrtl_finish_function): Don't try to jump to
9196         return_label unless it exists.
9197
9198         In partial ordering for a call, ignore parms for which we don't have
9199         a real argument.
9200         * call.c (joust): Pass len to more_specialized.
9201         (add_template_candidate_real): Strip 'this', pass len.
9202         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
9203         (get_bindings_order): New fn.  Pass len down.
9204         (get_bindings_real): Strip 'this', pass len.
9205         (fn_type_unification): Likewise.
9206         (type_unification_real): Succeed after checking 'len' args.
9207         (most_specialized_instantiation): Lose explicit_args parm.
9208         * class.c (resolve_address_of_overloaded_function): Strip 'this',
9209         pass len.
9210
9211 2000-12-21  Jason Merrill  <jason@redhat.com>
9212
9213         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
9214         DECL_TEMPLATE_RESULT.
9215
9216         * search.c (lookup_field_r): Call lookup_fnfields_1, not
9217         lookup_fnfields_here.
9218
9219         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
9220
9221         * call.c (build_object_call): Also allow conversions that return
9222         reference to pointer to function.
9223         (add_conv_candidate): Handle totype being ref to ptr to fn.
9224         (build_field_call): Also allow members of type reference to function.
9225         Lose support for calling pointer to METHOD_TYPE fields.
9226
9227         * error.c (dump_expr): Handle *_CAST_EXPR.
9228
9229         * typeck2.c (build_scoped_ref): Always convert to the naming class.
9230
9231         * tree.c (break_out_cleanups): Lose.
9232         * cp-tree.h: Remove prototype.
9233         * typeck.c (build_component_ref): Don't break_out_cleanups.
9234         (build_compound_expr): Likewise.
9235         * semantics.c (finish_expr_stmt): Likewise.
9236
9237 2000-12-20  Richard Henderson  <rth@redhat.com>
9238
9239         * cp-tree.h: Update declarations.
9240         * decl.c (finish_case_label): Return the new stmt node.
9241         * semantics.c (finish_goto_stmt): Likewise.
9242         (finish_expr_stmt, finish_return_stmt): Likewise.
9243         (finish_break_stmt, finish_continue_stmt): Likewise.
9244         (finish_asm_stmt): Likewise.
9245         * parse.y (already_scoped_stmt): Set STMT_LINENO.
9246         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
9247         (simple_if, simple_stmt): Return the new stmt node.
9248         (save_lineno): New.
9249
9250 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
9251
9252         * cp-tree.h: Don't declare warn_long_long.
9253
9254 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9255
9256         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
9257         IS_AGGR_TYPE.
9258
9259 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9260
9261         * pt.c (unify): Handle when both ARG and PARM are
9262         BOUND_TEMPLATE_TEMPLATE_PARM.
9263
9264 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9265
9266         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
9267         DECL_TEMPLATE_PARM_P.
9268
9269 2000-12-15  Jason Merrill  <jason@redhat.com>
9270
9271         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
9272
9273         * init.c (build_new_1): Don't strip quals from type.
9274
9275         * decl.c (pushdecl): Don't check for linkage on a non-decl.
9276
9277         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
9278
9279         * call.c (build_new_function_call): Lose space before paren in
9280         error message.
9281         (build_new_method_call): Likewise.
9282
9283         * typeck2.c (build_m_component_ref): Propagate quals from datum.
9284
9285 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9286
9287         * pt.c (check_explicit_specialization): Propagate default
9288         function arguments to explicit specializations.
9289
9290 2000-12-13  DJ Delorie  <dj@redhat.com>
9291
9292         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
9293         and <? operators.
9294
9295 2000-12-08  Jason Merrill  <jason@redhat.com>
9296
9297         * error.c (dump_function_name): Don't let the user see __comp_ctor.
9298
9299         Clean up copy-initialization in overloading code.
9300         * call.c (build_user_type_conversion_1): Die if we are asked to
9301         convert to the same or a base type.
9302         (implicit_conversion): Avoid doing so.  Lose reference binding code.
9303         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
9304         direct-initialization.  Also do direct-init part of copy-init.
9305         (build_user_type_conversion): Don't provide context to convert_like.
9306         * cvt.c (ocp_convert): build_user_type_conversion will now provide
9307         the constructor call for copy-init.
9308
9309         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
9310         instantiation of a member template.
9311         (do_decl_instantiation): Not here.
9312
9313 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
9314
9315         * class.c (check_field_decls): Don't special case anonymous
9316         fields in error messages.
9317         (note_name_declared_in_class): Use %D on diagnostic.
9318
9319         * tree.c (pod_type_p): Use strip_array_types.
9320         (cp_valid_lang_attribute): Likewise.
9321         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
9322         multiple evaluations.
9323         (cp_has_mutable_p): Use strip_array_types.
9324
9325 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
9326
9327         * cp-tree.h (sufficient_parms_p): Declare new function.
9328         * call.c (sufficient_parms_p): New function, broken out of ...
9329         (add_function_candidate): ... here. Use it.
9330         (add_conv_candidate): Use it.
9331         * decl.c (grok_ctor_properties): Use it.
9332
9333 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
9334
9335         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
9336
9337 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
9338
9339         * decl2.c (lang_decode_option): Handle -Wformat-security.
9340
9341 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9342
9343         * pt.c (verify_class_unification): New function.
9344         (get_class_bindings): Use it.
9345         (try_class_unification): Tidy.
9346         (unify): Handle when argument of a template-id is not
9347         template parameter dependent.
9348         (template_args_equal): Handle when TREE_CODE's do not match.
9349
9350 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
9351
9352         * lang-specs.h (c++): When invoking the stand-alone preprocessor
9353         for -save-temps, pass all relevant -Defines to it, and then don't
9354         pass them to cc1plus.
9355
9356 2000-12-05  Will Cohen  <wcohen@redhat.com>
9357
9358         * decl.c (finish_case_label): Cleared
9359         more_cleanups_ok in surrounding function scopes.
9360         (define_label): Likewise.
9361
9362 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
9363
9364         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
9365         (get_matching_virtual): Remove.
9366         (look_for_overrides): Declare new function.
9367         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
9368         DECL_VINDEX here.
9369         * class.c (check_for_override): Move base class iteration code
9370         to look_for_overrides.
9371         * search.c (next_baselink): Remove.
9372         (get_virtuals_named_this): Remove.
9373         (get_virtual_destructor): Remove.
9374         (tree_has_any_destructors_p): Remove.
9375         (struct gvnt_info): Remove.
9376         (check_final_overrider): Remove `virtual' from error messages.
9377         (get_matching_virtuals): Remove. Move functionality to ...
9378         (look_for_overrides): ... here, and ...
9379         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
9380         to be overriding.
9381
9382 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
9383
9384         * typeck.c (get_delta_difference): If via a virtual base,
9385         return zero.
9386         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
9387         adjustment.
9388
9389 2000-12-04  Richard Henderson  <rth@redhat.com>
9390
9391         * error.c (dump_tree): Use output_add_string not OB_PUTS.
9392
9393 2000-12-04  Jason Merrill  <jason@redhat.com>
9394
9395         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
9396         (write_builtin_type): Pass intSI_type_node and the like through
9397         type_for_mode.
9398         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
9399         Pass intSI_type_node and the like through type_for_mode.
9400         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
9401         * pt.c (tsubst, unify): Likewise.
9402         * tree.c (walk_tree): Likewise.
9403         * error.c (dump_type): Likewise.
9404         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
9405
9406         * Make-lang.in: Tweak top comment for emacs.
9407         (cp/TAGS): Restore.
9408
9409         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
9410
9411         * class.c (clone_function_decl): Robustify.
9412
9413 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
9414
9415         * decl.c (store_bindings): Only search in the non modified
9416         old_bindings for duplicates.
9417
9418 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
9419
9420         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
9421         TYPE_POLYMORPHIC_P.
9422
9423         * typeck.c (build_static_cast): Remove unused variable.
9424
9425 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9426
9427         * pt.c: Fix typo in comment.
9428
9429 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
9430
9431         * decl2.c (warn_format): Remove definition.
9432         (lang_decode_option): Handle -Wformat-nonliteral,
9433         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
9434
9435 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
9436
9437         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
9438         (init_decl_processing): Don't create string_type_node,
9439         const_string_type_node, wint_type_node, intmax_type_node,
9440         uintmax_type_node, default_function_type, ptrdiff_type_node and
9441         unsigned_ptrdiff_type_node.  Adjust position of call to
9442         c_common_nodes_and_builtins.
9443         (identifier_global_value): New function.
9444
9445 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
9446
9447         * call.c (standard_conversion): Reject pointer to member
9448         conversions from ambiguous, inaccessible or virtual bases.
9449         * typeck.c (build_static_cast): Don't check pointers to members
9450         specially.
9451
9452 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
9453
9454         * method.c (do_build_copy_constructor): Preserve cv
9455         qualifications when accessing source object members.
9456         (do_build_assign_ref): Likewise. Remove separate diagnostics for
9457         unnamed fields.
9458
9459 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
9460
9461         * method.c (do_build_assign_ref): Construct appropriately
9462         CV-qualified base reference. Don't allow const casts in base
9463         conversion.
9464
9465 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
9466
9467         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
9468         incomplete return type.
9469
9470 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9471
9472         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
9473         * semantics.c (finish_base_specifier): Accept a _TYPE not a
9474         _DECL.
9475
9476 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9477
9478         * spew.c (yyerror): Cope if yylval.ttype is NULL.
9479
9480 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9481
9482         * decl.c (grokdeclarator): Diagnose undefined template contexts.
9483
9484 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9485
9486         * decl.c (grokdeclarator): Do type access control on friend
9487         class.
9488
9489 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
9490
9491         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
9492         bison parser ickiness.
9493         * pt.c (tsubst_friend_function): Enter namespace scope when
9494         tsubsting the function name.
9495         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
9496
9497 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
9498
9499         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
9500         * cvt.c (cp_convert_to_pointer): Add force parameter.
9501         Allow conversions via virtual base if forced.
9502         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
9503         (ocp_convert): Likewise.
9504         * search.c (binfo_from_vbase): Return the virtual base's binfo.
9505         * typeck.c (get_delta_difference): Adjust handling of virtual
9506         bases.
9507
9508 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
9509
9510         * tree.c (struct list_hash): Remove.
9511         (list_hash_table): Make it be an htab.
9512         (struct list_proxy): New type.
9513         (list_hash_eq): New function.
9514         (list_hash_pieces): Renamed from ...
9515         (list_hash): ... this.
9516         (list_hash_lookup): Remove.
9517         (list_hash_add): Remove.
9518         (hash_tree_cons): Use the generic hashtable.
9519         (mark_list_hash): Remove.
9520         (init_tree): Create the hashtable.
9521
9522 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
9523
9524         * method.c (build_mangled_C9x_name): Rename to
9525         build_mangled_C99_name.  Change C9X references in comments to
9526         refer to C99.
9527
9528 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
9529
9530         * parse.y (unary_expr): Move VA_ARG from here ...
9531         (primary): ... to here.
9532
9533 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
9534
9535         * semantics.c (finish_id_expr): If type is error_mark, return
9536         error_mark.
9537
9538 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
9539
9540         * pt.c (lookup_template_class): Simplify loop exit constructs.
9541         Cope when there is no partial instantiation of a template
9542         template member.
9543
9544 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
9545
9546         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
9547
9548 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
9549
9550         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
9551         prefix.
9552
9553         * pt.c (do_decl_instantiate): Explicitly clone constructors and
9554         destructors that haven't already been cloned.
9555
9556 2000-11-20  Richard Henderson  <rth@redhat.com>
9557
9558         * parse.y (yyparse_1): Rename the parser entry point.
9559
9560 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
9561
9562         * mangle.c (write_name): Use <unscoped-name> for names directly in
9563         function scope.
9564         (write_unscoped_name): Accept names directly in function scope.
9565
9566 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
9567
9568         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
9569         * parse.y (extdef): Add EXPORT reduction.
9570         * spew.c (yylex): Don't skip export here.
9571
9572 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
9573
9574         * decl.c (init_decl_processing): Correct name of pure virtual
9575         function under the new ABI.
9576         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
9577         (throw_bad_typeid): Likewise for bad typeid function.
9578
9579 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
9580
9581         * decl.c (grokparms): Don't even function types of `void' type,
9582         either.
9583         * mangle.c (write_type): Don't crash when confronted with the
9584         error_mark_node.
9585
9586         * decl.c (grokparms): Don't create parameters of `void' type.
9587
9588 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
9589
9590         * lex.c (mark_impl_file_chain): Delete.
9591         (init_parse): Remove call to ggc_add_string_root.  No need to
9592         ggc_strdup a string constant.  Do not add impl_file_chain to GC
9593         roots.
9594         (handle_pragma_implementation): No need to ggc_strdup main_filename.
9595
9596 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9597
9598         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
9599
9600 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9601
9602         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
9603         * decl.c (grokdeclarator): Don't reject void parms here.
9604         (require_complete_types_for_parms): Simplify, use
9605         complete_type_or_else.
9606         (grokparms): Remove bitrot. Remove funcdef parm.
9607         Deal with ellipsis parm lists here.
9608         * semantics.c (finish_parmlist): Don't append void_list_node
9609         here. Set PARMLIST_ELLIPSIS_P.
9610
9611 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9612
9613         * typeck2.c (incomplete_type_error): Reorganize to avoid
9614         excessive diagnostics.
9615
9616 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
9617
9618         * lex.c (struct impl_files, internal_filename): Constify a char *.
9619
9620 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
9621
9622         * mangle.c (write_special_name_constructor): Don't generate
9623         assembler junk when confronted with an old-style constructor.
9624         (write_special_name_destructor): Likewise.
9625         (mangle_decl_string): Do it here instead.
9626
9627 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
9628
9629         * call.c (op_error): Make error messages clearer.
9630
9631 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
9632
9633         * decl.c (wrapup_globals_for_namespace): Don't mark things
9634         TREE_ASM_WRITTEN when they're not.
9635
9636 2000-11-15  Jason Merrill  <jason@redhat.com>
9637
9638         * typeck2.c (friendly_abort): Uncount the error before handing
9639         off to fancy_abort.
9640
9641 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
9642
9643         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
9644
9645 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
9646
9647         * class.c (build_vtbl_initializer): Fix typo in comment.
9648         * typeck.c (expr_sizeof): Don't crash on errors.
9649
9650 2000-11-14  Jim Wilson  <wilson@redhat.com>
9651
9652         * lang-specs.h: Add %2 after %(cc1_options).
9653
9654 2000-11-14  Richard Henderson  <rth@redhat.com>
9655
9656         * typeck.c (c_sizeof): Be strict about casting result value
9657         back to c_size_type_node.
9658         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
9659
9660 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9661
9662         * typeck.c (build_unary_op): Use boolean_increment from
9663         c-common.c, moving the relevant code there.
9664
9665 2000-11-11  Jason Merrill  <jason@redhat.com>
9666
9667         * typeck.c (mark_addressable): Don't call put_var_into_stack.
9668
9669         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
9670         in inlines.
9671
9672 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9673
9674         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
9675         * lex.c (copy_lang_decl): Likewise.
9676
9677 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
9678
9679         * dump.c (cp_dump_tree): Don't dump function bodies here.
9680
9681         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
9682         (dump.o): Update dependency list.
9683         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
9684         (flag_dump_translation_unit): Likewise.
9685         (CP_TYPE_QUALS): Adjust definition.
9686         (DECL_C_BIT_FIELD): Remove.
9687         (SET_DECL_C_BIT_FIELD): Likewise.
9688         (CLEAR_DECL_C_BIT_FIELD): Likewise.
9689         (add_maybe_template): Likewise.
9690         (strip_array_types): Likewise.
9691         (dump_node_to_file): Likewise.
9692         (cp_dump_tree): New function.
9693         * decl.c (init_decl_processing): Set lang_dump_tree.
9694         * decl2.c (flag_dump_translation_unit): Remove.
9695         * dump.c: Move most of it to ../c-dump.c.
9696         (cp_dump_tree): New function.
9697         * pt.c (add_maybe_template): Remove.
9698         * typeck.c (strip_array_types): Likewise.
9699
9700 2000-11-07  Eric Christopher  <echristo@redhat.com>
9701
9702         * decl.c (init_decl_processing): Change definition of
9703         __wchar_t to wchar_t.  Remove artificial declaration of
9704         wchar_t.
9705         * lex.c: Change instances of __wchar_t to wchar_t.
9706
9707 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
9708
9709         * lex.c (do_identifier): Don't lookup_name for operators.
9710         * parse.y (operator): Save looking_for_typename.
9711         (unoperator): Restore it.
9712         * spew.c (frob_opname): Use nth_token for lookahead.
9713
9714 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
9715
9716         * decl.c (grok_op_properties): Always use coerce_new_type and
9717         coerce_delete_type.
9718         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
9719         exception specification. Tidy up.
9720         (coerce_delete_type): Preserve exception specification. Tidy up.
9721
9722 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
9723
9724         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
9725         (push_binding_level), error.c (cp_tree_printer), pt.c
9726         (process_partial_specialization, tsubst_template_arg_vector),
9727         search.c (lookup_member): Use memset () instead of bzero ().
9728
9729 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
9730
9731         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
9732
9733 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
9734
9735         * Make-lang.in (c++.distdir): Remove.
9736
9737 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
9738
9739         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
9740         declarations from different namespaces to be combined.
9741
9742 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
9743
9744         * decl.c: Include tm_p.h.
9745
9746 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
9747
9748         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
9749
9750 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
9751
9752         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
9753         (build_overload_value), repo.c (open_repo_file), xref.c
9754         (open_xref_file): Use strchr () and strrchr () instead of index ()
9755         and rindex ().
9756
9757 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
9758
9759         * call.c (build_over_call): Call fold on the CALL_EXPR.
9760
9761 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
9762
9763         * error.c (dump_template_decl): Separate template hearders with
9764         space not comma.
9765
9766 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
9767
9768         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
9769         TS_* flags with corresponding TFF_*.  Adjust prototypes of
9770         functions (which used to take a tree_string_flags) to take an int.
9771
9772         * cp-tree.h (enum tree_string_flags): Remove
9773         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
9774         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
9775         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
9776         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
9777         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
9778         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
9779         (type_as_string, decl_as_string, expr_as_string,
9780         context_as_string): Adjust prototype.
9781
9782         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
9783         instead of TS_PLAIN.
9784
9785         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
9786         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
9787         plain `0'.
9788
9789 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
9790
9791         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
9792         (linkage_kind): New enumeration.
9793         (decl_linkage): New function.
9794         * decl2.c (comdat_linkage): Extend comment.
9795         * error.c (dump_function_decl): Print the arguments used to
9796         instantiate a template, even when not printing the type of the
9797         function.
9798         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
9799         not TREE_PUBLIC, to test for external linkage.
9800         * tree.c (decl_linkage): New function.
9801
9802 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
9803
9804         * pt.c (instantiate_decl): Always instantiate static data members
9805         initialized in-class.
9806
9807 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
9808
9809         * Make-lang.in: Move all build rules here from Makefile.in,
9810         adapt to new context.  Wrap all rules that change the current
9811         directory in parentheses.  Expunge all references to $(P).
9812         When one command depends on another and they're run all at
9813         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
9814         all object-file generation rules.  Delete obsolete variables.
9815
9816         * Makefile.in: Delete.
9817         * config-lang.in: Delete outputs= line.
9818
9819 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
9820
9821         * error.c (dump_function_decl): Print no space between
9822         `ptr-operator' the `type-specifier' of the return type.
9823         (dump_type_prefix): Make sure we put space at the appropriate
9824         place.
9825
9826 2000-10-23  Jason Merrill  <jason@redhat.com>
9827
9828         * call.c (equal_functions): Also call decls_match for extern "C" fns.
9829
9830 2000-10-22  Jason Merrill  <jason@redhat.com>
9831
9832         * call.c (build_conditional_expr): Use ocp_convert to force
9833         rvalue conversion.
9834
9835 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
9836
9837         * call.c (standard_conversion): Use RVALUE_CONVs for all
9838         expressions that satisfy lvalue_p, not just those that satisfy
9839         real_lvalue_p.
9840
9841         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
9842
9843         * typeck.c (c_sizeof): Return an expression of `size_t' type,
9844         not one with TYPE_IS_SIZETYPE set.
9845         (dubious_conversion_warnings): Remove special-case code.
9846
9847 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
9848
9849         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
9850         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
9851         (dump_type_prefix): Print vector-of-int as 'int vector'.
9852         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
9853         * tree.c (walk_tree): Handle VECTOR_TYPE.
9854
9855         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
9856
9857 2000-10-21  Jason Merrill  <jason@redhat.com>
9858
9859         * parse.y (operator): Set got_object from got_scope.
9860         Set looking_for_typename.
9861         * decl.c (lookup_name_real): Clear val after setting from_obj.
9862         Reorganize diagnostic.
9863
9864 2000-10-20  Jason Merrill  <jason@redhat.com>
9865
9866         * tree.c (walk_tree): Don't walk into default args.
9867
9868         * error.c (dump_expr): Use host_integerp.
9869
9870 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
9871
9872         * typeck2.c (abstract_virtuals_error): Use "because" instead of
9873         "since" in error message.
9874
9875 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9876
9877         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
9878
9879 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
9880
9881         * decl.c (revert_static_member_fn): Fixed typo.
9882
9883 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
9884
9885         * class.c (subobject_offset_fn): New type.
9886         (dfs_record_base_offsets): Remove.
9887         (record_base_offsets): Likewise.
9888         (dfs_search_base_offsets): Likewise.
9889         (record_subobject_offset): New function.
9890         (check_subobject_offset): Likewise.
9891         (walk_subobject_offsets): Likewise.
9892         (record_subobject_offsets): Likewise.
9893         (layout_conflict_p): Reimplement.
9894         (layout_nonempty_base_or_field): Correct handling of type
9895         conflicts during layout.
9896         (layout_empty_base): Likewise.
9897         (build_base_field): Adjust to handle new representation of empty
9898         base offset table.
9899         (build_base_fields): Likewise.
9900         (layout_virtual_bases): Likewise.
9901         (splay_tree_compare_integer_csts): New function.
9902         (layout_class_type): Use a splay_tree, rather than a varray, to
9903         represent the offsets of empty bases.
9904
9905         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
9906         * decl.c (select_decl): Don't return declarations that are
9907         DECL_ANTICIPATED.
9908
9909 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
9910
9911         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
9912         (fake_std_node): New macro.
9913         * decl.c (in_std): Rename to ...
9914         (in_fake_std): ... this.
9915         (flag_no_builtin): Remove.
9916         (flag_no_nonansi_builtin): Likewise.
9917         (walk_namespaces_r): Use fake_std_node.
9918         (push_namespace): Use std_identifier.
9919         (pop_namespace): Use in_fake_std.
9920         (lookup_name_real): Use fake_std_node.
9921         (init_decl_processing): When -fhonor-std, create the `std'
9922         namespace.  Don't create a dummy fake_std_node in that case.
9923         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
9924         (builtin_function): Put builtins whose names don't begin
9925         with `_' in the std namespace.
9926         * decl2.c (flag_no_builtin): Remove.
9927         (flag_no_nonansi_builtin): Likewise.
9928         (set_decl_namespace): Use fake_std_node.
9929         (validate_nonmember_using_decl): Likewise.
9930         (do_using_directive): Likewise.
9931         (handle_class_head): Likewise.
9932         * dump.c (dequeue_and_dump): Likewise.
9933         * except.c (init_exception_processing): Use std_identifier.
9934         * init.c (build_member_call): Use fake_std_node.
9935         * rtti.c (init_rtti_processing): Use std_identifier.
9936
9937 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
9938
9939         * cp-tree.h (back_end_hook): Remove declaration.
9940         * decl2.c (back_end_hook): Remove definition.
9941
9942         * dump.c (dequeue_and_dump): Dump TREE_USED.
9943
9944 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
9945
9946         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
9947
9948 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
9949
9950         * decl.c (WINT_TYPE): Define.
9951         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
9952         c_size_type_node, signed_size_type_node and wint_type_node.
9953
9954 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
9955
9956         * decl2.c (warn_missing_format_attribute): New variable.
9957         (lang_decode_option): Decode -Wmissing-format-attribute.
9958
9959 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
9960
9961         * typeck.c (qualify_type): Remove.
9962         (composite_pointer_type): Fix handling of conversions to `cv void*'.
9963
9964 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9965
9966         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
9967
9968 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9969
9970         * Makefile.in (parse.c, parse.h): Create atomically.
9971
9972 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
9973
9974         * class.c (current_obstack): Remove.
9975         * decl.c (ggc_p): Remove.
9976         (start_decl): Don't use decl_tree_cons.
9977         (grokdeclarator): Don't use build_decl_list.
9978         (start_function): Don't use decl_tree_cons.
9979         (finish_function): Don't mess with obstacks.
9980         * decl2.c (grok_x_components): Don't use build_decl_list.
9981         * lex.c (make_call_declarator): Don't call decl_tree_cons.
9982         (implicitly_declare_fn): Don't call build_decl_list.
9983         * parse.y (frob_specs): Don't call build_decl_list or
9984         decl_tree_cons.
9985         (expr_or_declarator_intern): Don't call decl_tree_cons.
9986         (primary): Don't call build_decl_list.
9987         (fcast_or_absdcl): Likewise.
9988         (typed_declspecs): Don't call decl_tree_cons.
9989         (reserved_declspecs): Don't call build_decl_list.
9990         (declmods): Likewise.
9991         (reserved_typespecquals): Likewise.
9992         (aggr): Likewise.
9993         (new_type_id): Likewise.
9994         (cv_qualifiers): Likewise.
9995         (after_type_declarator_intern): Likewise.
9996         (notype_declarator_intern): Likewise.
9997         (absdcl_intern): Likewise.
9998         (named_parm): Likewise.
9999         * pt.c (most_specialized_class): Likewise.
10000         * repo.c (temporary_obstack): Make it a structure, not a pointer.
10001         (init_repo): Initialize it.
10002         * search.c (current_obstack): Remove.
10003         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
10004
10005 2000-10-09  Richard Henderson  <rth@cygnus.com>
10006
10007         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
10008         (c++ language support bits for libgcc): Remove.
10009         (c++.clean): Remove cplib2.txt cleanup.
10010         * config-lang.in (headers, lib2funcs): Remove.
10011
10012         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
10013         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
10014         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
10015         * inc/new.h, inc/typeinfo: Remove files.
10016
10017 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
10018
10019         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
10020         defined.
10021         (init_decl_processing): Initialize intmax_type_node and
10022         uintmax_type_node.
10023
10024 2000-10-06  Richard Henderson  <rth@cygnus.com>
10025
10026         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
10027         (original_result_rtx): Remove.
10028         * decl.c (save_function_data): Don't clear x_result_rtx.
10029         (mark_lang_function): Don't mark it either.
10030         * expr.c (fixup_result_decl): Remove.
10031         * semantics.c (genrtl_named_return_value): Frob the return decl
10032         before calling emit_local_var.
10033         (genrtl_finish_function): Don't call fixup_result_decl.
10034         Always emit the jump to return_label.
10035
10036 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
10037
10038         * pt.c (lookup_template_class): Set current access for enum.
10039         (tsubst_enum): Set file & line for enum decl.
10040
10041         * spew.c (yylex): Remove unused variable.
10042
10043 2000-10-05  Richard Henderson  <rth@cygnus.com>
10044
10045         * semantics.c (genrtl_finish_function): Don't init or check
10046         can_reach_end; remove noreturn and return value checks.
10047
10048 2000-10-05  Tom Tromey  <tromey@cygnus.com>
10049
10050         * init.c (build_java_class_ref): Use `build_static_name' with a
10051         suffix, not a prefix, to build the class object's name.
10052
10053 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
10054
10055         * cp-tree.h (access_kind): Fix comment typo.
10056         * decl2.c (grokfield): Fix diagnostic typo.
10057         * semantics.c (finish_template_type): Fix comment typo.
10058         (finish_qualified_object_call_expr): Likewise.
10059
10060 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
10061
10062         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
10063         tsubsting fails.
10064
10065 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
10066
10067         * spew.c (frob_id): New static function.
10068         (frob_opname): Use it.
10069         (yylex): Use it.
10070
10071 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
10072
10073         * decl.c (lang_mark_false_label_stack): Remove.
10074         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
10075
10076 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
10077
10078         * gxxint.texi: Use @email for formatting email addresses.
10079
10080 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
10081
10082         * error.c: Remove direct obstack manipulation.  Replace with
10083         output_buffer-based formatting.  Adjust calls to removed macros.
10084         (obstack_chunk_alloc, obstack_chunk_free): Remove.
10085         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
10086         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
10087
10088 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
10089
10090         * ir.texi: Move to ../c-tree.texi.
10091
10092 2000-09-20  Jason Merrill  <jason@redhat.com>
10093
10094         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
10095
10096 2000-09-21  Andreas Jaeger  <aj@suse.de>
10097
10098         * errfn.c: Move declaration of cp_printer and cp_printers to ...
10099         * cp-tree.h: ... here.
10100
10101         * error.c: Remove declaration of cp_printer.
10102
10103 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
10104
10105         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
10106
10107 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
10108
10109         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
10110         users.
10111
10112 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
10113
10114         * decl.c (start_function): Robustify.
10115
10116 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10117
10118         * cp-tree.h (check_function_format): Accept a `status' parameter.
10119
10120         * call.c, typeck.c: Updates calls to `check_function_format'.
10121
10122 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
10123
10124         * decl2.c (handle_class_head): Always push some scope even
10125         in the error case.
10126
10127 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
10128
10129         * cp-tree.h (struct cp_language_function): Remove
10130         x_scope_stmt_stack and name_declared.
10131         (current_scope_stmt_stack): Remove.
10132         (function_name_declared_p): New macro.
10133         (struct lang_decl_flags): Use c_lang_decl as a base class.
10134         (context): Remove.
10135         (struct lang_decl): Replace saved_tree with context.
10136         (DECL_FRIEND_CONTEXT): Adjust accordingly.
10137         (SET_DECL_FRIEND_CONTEXT): Likewise.
10138         (DECL_VIRTUAL_CONTEXT): Likewise.
10139         (DECL_SAVED_TREE): Remove.
10140         (C_DECLARED_LABEL_FLAG): Likewise.
10141         (cplus_expand_expr_stmt): Don't declare.
10142         (add_decl_stmt): Likewise.
10143         (add_scope_stmt): Likewise.
10144         * decl.c (mark_stmt_tree): Remove.
10145         (case_compare): Likewise.
10146         (finish_case_label): Use c_add_case_label.
10147         (init_decl_processing): Set more language-specific hooks.
10148         (build_enumerator): Fix typo in comment.
10149         (cplus_expand_expr_stmt): Remove.
10150         (mark_lang_function): Use mark_c_language_function.
10151         (lang_mark_tree): Use c_mark_lang_decl.
10152         * decl2.c: Change order of inclusion.
10153         * except.c: Likewise.
10154         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
10155         back on c_expand_expr.
10156         * friend.c: Include expr.h.
10157         * init.c: Change order of inclusion.
10158         * Makefile.in: Update dependencies.
10159         * lex.h (free_lang_decl_chain): Remove.
10160         * optimize.c (maybe_clone_body): Use function_name_declared_p.
10161         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
10162         it doesn't exist.
10163         (instantiate_decl): Use function_name_declared_p.
10164         * semantics.c (lang_expand_expr_stmt): Remove.
10165         (set_current_function_name_declared): Likewise.
10166         (current_function_name_declared): Likewise.
10167         (begin_compound_stmt): Use function_name_declared_p.
10168         (add_decl_stmt): Remove.
10169         (setup_vtbl_ptr): Use function_name_declared_p.
10170         (add_scope_stmt): Remove.
10171         (current_scope_stmt_stack): New function.
10172         (cp_expand_stmt): Don't handle SCOPE_STMTs.
10173         (expand_body): Use function_name_declared_p.
10174         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
10175         * typeck.c: Change order of includes.
10176         (convert_sequence): Remove.
10177
10178 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
10179
10180         * lex.c (reswords): Add _Complex.
10181
10182 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10183
10184         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
10185
10186 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
10187
10188         * init.c (begin_init_stmts): Don't use // comments.
10189
10190 2000-09-12  Jason Merrill  <jason@redhat.com>
10191
10192         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
10193         all non-extern arrays.
10194
10195         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
10196         typenames, too.  Downgrade complaint to pedwarn.
10197         (xref_tag): Warn about surprising behavior of 'friend struct T'.
10198         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
10199         'class This::Inherited'.
10200
10201 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
10202
10203         * decl.c (finish_case_label): Given the LABEL_DECL a
10204         DECL_CONTEXT.
10205
10206 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
10207
10208         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
10209         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
10210         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
10211         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
10212         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
10213         New macros.
10214         (sorry_for_unsupported_tree, print_scope_operator,
10215         print_left_paren, print_right_paren, print_left_bracket,
10216         print_right_bracket, print_whitespace): Likewise.
10217         (aggr_variety): Rename to class_key_or_enum.
10218         (print_type): Rename to print_type_id.
10219         (print_type_specifier_seq, print_simple_type_specifier,
10220         print_elaborated_type_specifier,
10221         print_rest_of_abstract_declarator,
10222         print_parameter_declaration_clause, print_exception_specification,
10223         print_nested_name_specifier, print_template_id,
10224         typedef_original_name,  print_template_argument_list_start,
10225         print_template_argument_list_end): New functions.
10226
10227 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
10228
10229         * ir.texi: Add more documentation.
10230
10231 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
10232
10233         * cp-tree.h (struct saved_scope): Remove x_function_parms.
10234         (current_function_parms): Don't define.
10235         (struct cp_language_function): Remove parms_stored.
10236         (current_function_just_assigned_this): Don't define.
10237         (current_function_parms_stored): Likewise.
10238         (static_ctors): Declare.
10239         (static_dtors): Likewise.
10240         (SF_EXPAND): Don't define.
10241         (expand_start_early_try_stmts): Remove declaration.
10242         (store_parm_decls): Likewise.
10243         * decl.c (static_ctors): Don't declare.
10244         (static_dtors): Likewise.
10245         (struct binding_level): Remove this_block.
10246         (poplevel): Remove dead code.
10247         (set_block): Likewise.
10248         (mark_binding_level): Don't mark this_block.
10249         (mark_saved_scope): Don't mark x_function_parms.
10250         (init_decl_processing): Don't add current_function_parms as a GC
10251         root.
10252         (check_function_type): Change prototype.
10253         (start_function): Remove RTL-generation code.
10254         (expand_start_early_try_stmts): Remove.
10255         (store_parm_decls): Give it internal linkage.  Remove
10256         RTL-generation code.
10257         (finish_function): Remove RTL-generation code.
10258         * decl2.c (static_ctors): Fix formatting.
10259         (static_dtors): Likewise.
10260         * method.c (use_thunk): Don't call store_parm_decls.
10261         (synthesize_method): Likewise.
10262         * optimize.c (maybe_clone_body): Likewise.
10263         * parse.y (fn.def2): Likewise.
10264         (.set_base_init): Likewise.
10265         (nodecls): Likewise.
10266         * pt.c (instantiate_decl): Likewise.
10267         * rtti.c (synthesize_tinfo_fn): Likewise.
10268         * semantics.c (genrtl_try_block): Simplify.
10269         (expand_body): Use genrtl_start_function and
10270         genrtl_finish_function.
10271         (genrtl_start_function): New function.
10272         (genrtl_finish_function): Likewise.
10273
10274 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
10275
10276         * error.c (cp_tree_printer, case 'P'): Append break.
10277
10278 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
10279
10280         * cp-tree.h (frob_opname): Declare.
10281         * parse.y (saved_scopes): New static variable.
10282         (cp_parse_init): Adjust.
10283         (do_id): If lastiddecl is NULL, do do_identifier.
10284         (operator): Save scope information.
10285         (unoperator): New reduction. Restore scope information.
10286         (operator_name): Append unoperator. Call frob_opname.
10287         * spew.c (frob_opname): Define.
10288
10289 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
10290
10291         * decl.c, rtti.c: Include defaults.h if not already included.
10292         Don't define the *_TYPE_SIZE macros.
10293
10294 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
10295
10296         * cp-tree.h (push_switch): Change prototype.
10297         (check_cp_case_value): Remove declaration.
10298         (decl_constant_value): Likewise.
10299         * decl.c (struct cp_switch): Add switch_stmt and cases.
10300         (case_compare): New function.
10301         (push_switch): Set switch_stmt.  Initialize cases.
10302         (pop_switch): Clean up cases.
10303         (define_case_label): Rename to ...
10304         (finish_case_label): ... this.  Do semantic analysis for case
10305         labels here.
10306         (start_function): Correct comment.
10307         * decl2.c (check_cp_case_value): Remove.
10308         * expr.c (do_case): Remove.
10309         * pt.c (tsubst_expr): Adjust call to finish_case_label.
10310         * semantics.c (genrtl_do_poplevel): Remove declaration.
10311         (RECHAIN_STMTS): Remove.
10312         (finish_break_stmt): Use build_break_stmt.
10313         (finish_continue_stmt): Use build_continue_stmt.
10314         (finish_switch_cond): Adjust condition here, rater than in
10315         c_expand_start_case.
10316         (finish_case_label): Remove.
10317         * typeck.c (c_expand_return): Remove.
10318         (c_expand_start_case): Likewise.
10319
10320 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
10321
10322         * ir.texi: Document type nodes.
10323
10324 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
10325
10326         * cp-tree.h (init_cp_semantics): Declare.
10327         (genrtl_try_block): Don't declare.
10328         (genrtl_handler): Likewise.
10329         (genrtl_catch_block): Likewise.
10330         (genrtl_ctor_stmt): Likewise.
10331         (genrtl_subobject): Likewise.
10332         (genrtl_do_poplevel): Likewise.
10333         (genrtl_named_return_value): Likewise.
10334         * lex.c (init_parse): Call init_cp_semantics.
10335         * semantics.c (genrtl_try_block): Give it internal linkage.
10336         (genrtl_handler): Likewise.
10337         (genrtl_catch_block): Likewise.
10338         (genrtl_ctor_stmt): Likewise.
10339         (genrtl_subobject): Likewise.
10340         (genrtl_do_poplevel): Likewise.
10341         (genrtl_named_return_value): Likewise.
10342         (lang_expand_stmt): Rename to ...
10343         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
10344         (init_cp_semantics): Define.
10345
10346         * decl.c (initialize_local_var): Remove RTL-generating code.
10347         * semantics.c (genrtl_try_block): Fix formatting.
10348
10349         Move statement-tree facilities from C++ to C front-end.
10350         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
10351         (void_zero_node): Remove.
10352         (stmt_tree): Likewise.
10353         (scope_chain): Adjust.
10354         (language_function): Rename to cp_language_function.
10355         (cp_function_chain): Adjust.
10356         (current_stmt_tree): Remove.
10357         (last_tree): Likewise.
10358         (last_expr_type): Likewise.
10359         (struct lang_decl): Adjust.
10360         (STMT_IS_FULL_EXPR_P): Remove.
10361         (add_tree): Remove.
10362         (begin_stmt_tree): Likewise.
10363         (finish_stmt_tree): Likewise.
10364         (walk_tree_fn): Likewise.
10365         (walk_stmt_tree): Likewise.
10366         * class.c (finish_struct): Replace use of add_tree with add_stmt.
10367         * decl.c (mark_stmt_tree): Adjust type.
10368         (init_decl_processing): Don't build void_zero_node.
10369         (initialize_local_var): Adjust usage of current_stmt_tree.
10370         (finish_enum): Use add_stmt, not add_tree.
10371         (save_function_data): Adjust use of language_function.
10372         (finish_constructor_body): Use add_stmt, not add_tree.
10373         (finish_destructor_body): Likewise.
10374         (push_cp_function_context): Adjust use of language_function.
10375         (pop_cp_function_context): Likewise.
10376         (mark_lang_function): Likewise.
10377         (mark_cp_function_context): Likewise.
10378         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
10379         (build_vec_init): Likewise.
10380         * semantics.c (SET_LAST_STMT): Remove.
10381         (RECHAIN_STMTS): Don't use it.
10382         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
10383         (current_stmt_tree): Define.
10384         (add_tree): Remove.
10385         (finish_goto_stmt): Use add_stmt, not add_tree.
10386         (finish_expr_stmt): Likewise.
10387         (begin_if_stmt): Likewise.
10388         (finish_then_clause): Likewise.
10389         (begin_while_stmt): Likewise.
10390         (begin_do_stmt): Likewise.
10391         (finish_return_stmt): Likewise.
10392         (begin_for_stmt): Likewise.
10393         (finish_break_stmt): Likewise.
10394         (finish_continue_stmt): Likewise.
10395         (begin_switch_stmt): Likewise.
10396         (finish_case_label): Likewise.
10397         (begin_try_block): Likewise.
10398         (begin_function_try_block): Likewise.
10399         (begin_handler): Likewise.
10400         (begin_catch_block): Likewise.
10401         (begin_compound_stmt): Likewise.
10402         (begin_asm_stmt): Likewise.
10403         (finish_asm_stmt): Likewise.
10404         (finish_label_stmt): Likewise.
10405         (add_decl_stmt): Likewise.
10406         (finish_subobject): Likewise.
10407         (finish_decl_cleanup): Likewise.
10408         (finish_named_return_value): Likewise.
10409         (setup_vtbl_ptr): Likewise.
10410         (add_scope_stmt): Likewise.
10411         (finish_stmt_expr): Likewise.
10412         (prune_unused_decls): Remove.
10413         (begin_stmt_tree): Likewise.
10414         (finish_stmt_tree): Likewise.
10415         (prep_stmt): Adjust use of current_stmt_tree.
10416         (lang_expand_stmt): Likewise.
10417         * tree.c (statement_code_p): Remove.
10418         (cp_statement_code_p): New function.
10419         (walk_stmt_tree): Remove.
10420         (init_tree): Set lang_statement_code_p.
10421
10422 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
10423
10424         Integrated preprocessor.
10425
10426         * Make-lang.in, Makefile.in: Remove all references to input.c,
10427         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
10428         * gxx.gperf, hash.h, input.c: Delete.
10429         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
10430         initialized properly.
10431
10432         * class.c (fixup_pending_inline): Take a tree, not a
10433         struct pending_inline *.  All callers changed.
10434         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
10435         RID_PROTECTED entries in ridpointers[] array here.
10436         * decl.c (duplicate_decls): Do not refer to struct
10437         pending_inline.
10438         (record_builtin_type, init_decl_processing): Use RID_MAX not
10439         CP_RID_MAX.
10440         (grokdeclarator): Use C_IS_RESERVED_WORD.
10441         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
10442         cpplib.
10443         (grok_x_components): Do not inspect pending_inlines chain.
10444
10445         * cp-tree.h (struct lang_identifier): Add rid_code entry.
10446         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
10447         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
10448         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
10449         TIME_IDENTIFIER_FILEINFO): Kill.
10450         Update prototypes.
10451         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
10452         single 32-bit word.
10453         * parse.y: Call do_pending_inlines unconditionally.
10454         reinit_parse_for_method is now snarf_method.  fn.defpen is no
10455         longer necessary.  Remove unnecessary <itype> annotation on
10456         SCOPE.  Do not refer to end_of_file or struct pending_inline.
10457         * semantics.c (begin_inline_definitions): Call
10458         do_pending_inlines unconditionally.
10459
10460         * lex.c: Remove all code now shared with C front end.
10461         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
10462         into the get_identifier table.  Rewrite pragma handling to
10463         work with the registry.  Move code to save tokens for later
10464         processing to spew.c.
10465
10466         * spew.c: Rewrite everything in terms of token streams instead
10467         of text.  Move routines here from lex.c / input.c as
10468         appropriate.  GC-mark trees hanging off the pending inlines
10469         chain.
10470
10471 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
10472
10473         * NEWS: Mention that the named return value extension has been
10474         deprecated.
10475         * cp-tree.h (original_result_rtx): Define.
10476         (TREE_REFERENCE_EXPR): Remove.
10477         (DECL_VPARENT): Likewise.
10478         (pushdecl_nonclass_level): Likewise.
10479         (store_return_init): Likewise.
10480         (reinit_lang_specific): Likewise.
10481         (genrtl_named_return_value): Change prototype.
10482         * decl.c (original_result_rtx): Remove.
10483         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
10484         Do not generate RTL for local variables here.
10485         (store_return_init): Remove.
10486         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
10487         store_return_init.
10488         (finish_named_return_value): Adjust accordingly.  Warn that this
10489         extension is deprecated.
10490         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
10491
10492 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10493
10494         * pt.c (type_unification_real): Replace switch with if.
10495         (unify): Tsubst non-type parms before comparing.
10496
10497 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10498
10499         * error.c (dump_typename): New function, broken out of ...
10500         (dump_type): ... here. Use it.
10501         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
10502
10503 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10504
10505         * init.c (build_offset_ref): Deal with namespace scoped
10506         TEMPLATE_ID_EXPRs.
10507
10508 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10509
10510         * class.c (resolve_address_of_overloaded_function): Add
10511         explanation message.
10512         * decl.c (define_case_label): Reformat explanation.
10513         * decl2.c (finish_static_data_member_decl): Likewise.
10514         (grokfield): Likewise.
10515         * friend.c (do_friend): Likewise.
10516
10517 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
10518
10519         * tree.c (walk_tree): Expose tail recursion.
10520         (walk_stmt_tree): New function.
10521         * cp-tree.h: Prototype walk_stmt_tree.
10522         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
10523         the BLOCKs directly.  If a BLOCK has no variables after
10524         pruning, discard it.
10525         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
10526         restore the line number.
10527
10528 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
10529
10530         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
10531         (pt.o): Remove dependency on HTAB_H.
10532         * cp-tree.h: Include hashtab.h.
10533         (walk_tree): Change prototype.
10534         (walk_tree_without_duplicates): New function.
10535         * decl.c (check_default_argument): Use it.
10536         * optimize.c (remap_decl): Adjust calls to walk_tree.
10537         (copy_body): Likewise.
10538         (expand_calls_inline): Likewise.
10539         (calls_setjmp_p): Use walk_tree_without_duplicates.
10540         * pt.c: Don't include hashtab.h.
10541         (for_each_template_parm): Use walk_tree_without_duplicates.
10542         * semantics.c (finish-stmt_tree): Likewise.
10543         (expand_body): Likewise.
10544         * tree.c (walk_tree): Add additional parameter.
10545         (walk_tree_without_duplicates): New function.
10546         (count_trees): Use it.
10547         (verify_stmt_tree): Adjust call to walk_tree.
10548         (find_tree): Use walk_tree_without_duplicates.
10549         (no_linkage_check): Likewise.
10550         (break_out_target_exprs): Adjust call to walk_tree.
10551         (cp_unsave): Likewise.
10552
10553 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10554
10555         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
10556         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
10557         * cp-tree.h (TYPE_BINFO): Adjust comment.
10558         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
10559         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
10560         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
10561         (TYPE_TEMPLATE_INFO): Likewise.
10562         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
10563         * class.c (push_nested_class): Likewise.
10564         * decl.c (lookup_name_real): Likewise.
10565         (grokdeclarator): Likewise.
10566         (grok_op_properties): Likewise.
10567         (xref_tag): Likewise.
10568         (xref_basetypes): Likewise.
10569         * decl2.c (constructor_name_full): Likewise.
10570         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
10571         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
10572         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
10573         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10574         (dump_type_suffix): Likewise.
10575         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
10576         instead.
10577         (get_aggr_from_typedef): Likewise.
10578         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
10579         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10580         (write_template_parm): Likewise.
10581         (write_template_template_parm): Check tree code instead of
10582         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10583         * method.c (build_overload_nested_name): Add
10584         BOUND_TEMPLATE_TEMPLATE_PARM.
10585         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
10586         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10587         * pt.c (convert_template_argument): Check tree code instead of
10588         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10589         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
10590         (for_each_template_parm): Adjust comment.
10591         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
10592         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10593         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
10594         template_args_equal to compare template template parameter cases.
10595         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10596         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
10597         instead.
10598         * tree.c (copy_template_template_parm): Decide whether to create
10599         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
10600         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10601         (copy_tree_r): Likewise.
10602         * typeck.c (comptypes): Likewise.  Check tree code instead of
10603         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10604
10605 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
10606
10607         * decl.c (finish_function): Move the code for handling functions
10608         marked with the constructor and destructor attributes inside the
10609         expand_p block.
10610
10611 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10612
10613         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
10614
10615 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10616
10617         * pt.c (lookup_template_class): Remove abort.
10618         * tree.c (get_type_decl): Allow error_mark_node.
10619
10620 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10621
10622         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
10623         TEMPLATE_ID_EXPRs.
10624
10625 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
10626
10627         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
10628         new ABI mangling.
10629
10630 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
10631
10632         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
10633         union tag mismatch error reporting.
10634
10635 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
10636
10637         * call.c (build_scoped_method_call): Check it is not a namespace.
10638
10639 2000-08-30  Jason Merrill  <jason@redhat.com>
10640
10641         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
10642
10643         * tree.c (bot_manip): Check TREE_CONSTANT rather than
10644         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
10645         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
10646
10647         * decl.c (start_function): Always call make_function_rtl.
10648
10649 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
10650
10651         * semantics.c (prune_unused_decls): New function.
10652         (finish_stmt_tree): Call it via walk_tree.
10653
10654 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
10655
10656         * class.c (build_secondary_vtable): Constify a char *.
10657         * decl.c (init_decl_processing): Initialize function_id_node,
10658         pretty_function_id_node, and func_id_node.
10659         * input.c (struct input_source): Constify 'str'.
10660         (feed_input): Constify first argument.
10661         * mangle.c (write_identifier): Constify argument.
10662         * pt.c (mangle_class_name_for_template): Constify argument.
10663
10664 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
10665
10666         * typeck.c (mark_addressable): Remove code that pokes around in
10667         RTL.
10668
10669 2000-08-28  Jason Merrill  <jason@redhat.com>
10670
10671         * lex.c (file_name_nondirectory): Move to toplev.c.
10672
10673         * cp-tree.h (LOCAL_CLASS_P): New macro.
10674         * class.c (finish_struct_1): Use it.
10675
10676 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
10677
10678         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
10679         (write_encoding): Pass another argument to write_name.
10680         (write_name): Add ignore_local_scope parameter.  Fix handling of
10681         local names.
10682         (write_nested_name): Use write_unqualified_name.
10683         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
10684         (write_template_prefix): Use write_unqualified_name.
10685         (write_component): Remove.
10686         (write_local_name): Add parameter.  Use direct local entity to
10687         discriminator calculation.
10688         (write_class_enum_type): Pass another argument to write_name.
10689         (write_template_template_arg): Likewise.
10690         (make_guard_variable): Likewise.
10691
10692 2000-08-27  Jason Merrill  <jason@redhat.com>
10693
10694         * decl.c (pushdecl): Matching decls for local externs are found in
10695         the current level.  Propagate linkage information from previous
10696         declarations.
10697
10698 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
10699
10700         * ir.texi (Expressions): Fix typo.
10701
10702 2000-08-25  Greg McGary  <greg@mcgary.org>
10703
10704         * tree.c (init_tree): Use ARRAY_SIZE.
10705
10706 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
10707
10708         * error.c (cp_tree_printer): Rework.
10709
10710 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
10711
10712         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
10713         dyn-string.o.
10714         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
10715         (cp-demangle.o): Remove target.
10716         (dyn-string.o): Likewise.
10717
10718         * decl.c (grokfndecl): Require that `main' return an `int'.
10719         * mangle.c (write_encoding): Don't mangle return types for
10720         conversion functions.
10721
10722 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
10723
10724         * error.c (tree_formatting_info): New data type.
10725         (tree_being_formatted): New macro.
10726         (tree_formatting_flags): Likewise.
10727         (put_whitespace): Likewise.
10728         (print_tree_identifier): Likewise.
10729         (print_identifier): Likewise.
10730         (cp_tree_printer, print_function_argument_list, print_declaration,
10731         print_expression, print_function_declaration,
10732         print_function_parameter, print_type, print_cv_qualifier): New
10733         functions.
10734         (init_error): Initialize lang_printer.
10735
10736 2000-08-24  Jason Merrill  <jason@redhat.com>
10737
10738         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
10739         adjustment necessary.
10740
10741 2000-08-24  Greg McGary  <greg@mcgary.org>
10742
10743         * cp-tree.h (MAIN_NAME_P): Remove macro.
10744
10745 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
10746
10747         * error.c (print_instantiation_context): Don't forget to flush the
10748         buffer.
10749
10750 2000-08-23  Jason Merrill  <jason@redhat.com>
10751
10752         * typeck.c (build_ptrmemfunc): Save the input pmf.
10753
10754         * method.c (process_modifiers): Use same_type_p.
10755
10756 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
10757
10758         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
10759         * mangle.c (write_function_type): Change prototype.
10760         (write_encoding): Don't mangle return types for
10761         constructors or destructors.
10762         (write_type): Adjust call to write_function_type.
10763         * pt.c (instantiate_template): Instantiate alternate entry points
10764         when instantiating the main function.
10765
10766 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
10767
10768         * error.c (cp_print_error_function): Don't use embedded '\n' in
10769         output_printf.
10770
10771 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
10772
10773         * decl.c (init_decl_processing): Remove bogus initialization.
10774         * error.c (lang_print_error_function): Restore here.
10775         (init_error): Initialize print_error_function.
10776
10777 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
10778
10779         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
10780
10781 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
10782
10783         * Makefile.in (error.o): Depends on diagnostic.h
10784
10785         * cp-tree.h (problematic_instantiation_changed,
10786         record_last_problematic_instantiation, current_instantiation,
10787         print_instantiation_context): Declare.
10788         (maybe_print_template_context): Remove.
10789
10790         * decl.c (init_decl_processing): Set print_error_function to NULL.
10791         (lang_print_error_function): Remove, since we're using a new
10792         machinery.
10793
10794         * error.c: #include diagnostic.h
10795         (function_category): New function.
10796         (cp_diagnostic_starter): Likewise.
10797         (cp_diagnostic_finalizer): Likewise.
10798         (cp_print_error_function): Likewise.
10799         (maybe_print_instantiation_context): Likewise.
10800         (print_instantiation_full_context): Likewise.
10801         (print_instantiation_partial_context): Likewise.
10802         (print_instantiation_context): Define.
10803         (init_error): Initialize diagnostic pager and finalizer.
10804
10805         * pt.c (problematic_instantiation_changed): Define.
10806         (record_last_problematic_instantiation): Likewise.
10807         (current_instantiation): Likewise.
10808         (maybe_print_template_context): Remove.
10809         (print_template_context): Likewise.
10810         (current_tinst_level): Make static to reflect Brendan Kehoe's
10811         change of 1995-04-13.
10812         (push_tinst_level): Call print_instantiation_context.
10813
10814 2000-08-21  Nix  <nix@esperi.demon.co.uk>
10815
10816         * lang-specs.h: Do not process -o or run the assembler if
10817         -fsyntax-only.
10818
10819 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
10820
10821         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
10822         variables.
10823         * decl2.c (lang_decode_option): Disable gettext attributes for
10824         -ansi.
10825
10826 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
10827
10828         * lex.c (lang_init_options): Default diagnostic message maximum
10829         length to 80, when line-wrapping.
10830
10831 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
10832
10833         * class.c (build_vtbl_initializer): Clear the entire
10834         vtbl_init_data.  Start keeping track of the functions for which we
10835         have created vcall offsets here.
10836         (dfs_build_vcall_offset_vtbl_entries): Remove.
10837         (build_vcall_offset_vtbl_entries): Reimplement.
10838         (add_vcall_offset_vtbl_entries_r): New function.
10839         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
10840         computing when vcall offsets are necessary.
10841
10842 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10843
10844         * decl.c (member_function_or_else): Use cp_error ... %T.
10845         (grokdeclarator): Likewise.
10846         (start_method): Likewise.
10847         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
10848
10849 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10850
10851         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
10852         TYPE_DECLs.
10853
10854 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10855
10856         * cp-tree.h (PTRMEM_OK_P): New macro.
10857         (itf_ptrmem_ok): New enumeration value.
10858         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
10859         argument. Diagnose implicit pointer to member.
10860         (instantiate_type): Don't diagnose implicit pointer to member
10861         here. Pass itf_ptrmem_ok if ok. Adjust calls to
10862         resolve_address_of_overloaded_function.
10863         * init.c (build_offset_ref): Set PTRMEM_OK_P.
10864         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
10865         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
10866         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
10867         (build_unary_op): Deal with single non-static member in
10868         microsoft-land.
10869
10870 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10871
10872         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
10873
10874 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10875
10876         * cp-tree.h (enum_name_string): Remove prototype.
10877         (report_case_error): Remove prototype.
10878         * cp/typeck2.c (enum_name_string): Remove.
10879         (report_case_error): Remove.
10880         * error.c (dump_expr): Deal with enum values directly.
10881         Correctly negate integer constant.
10882
10883 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10884
10885         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
10886         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
10887         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
10888         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
10889         (__cxa_vec_new): Use __cxa_vec_new2.
10890         (__cxa_vec_delete): Use __cxa_vec_delete2.
10891
10892 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10893
10894         * vec.cc (__cxa_vec_new): Set "C" linkage.
10895         (__cxa_vec_ctor): Likewise.
10896         (__cxa_vec_cctor): Likewise.
10897         (__cxa_vec_dtor): Likewise.
10898         (__cxa_vec_delete): Likewise.
10899         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
10900         (__cxa_vec_ctor): Likewise.
10901         (__cxa_vec_cctor): Likewise.
10902         (__cxa_vec_dtor): Likewise.
10903         (__cxa_vec_delete): Likewise.
10904
10905 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10906
10907         * class.c (instantiate_type): Reinstate local variable
10908         deleted in previous change.
10909
10910         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
10911         itf_no_attributes.
10912
10913 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10914
10915         * cp-tree.h (instantiate_type_flags): New enumeration.
10916         (instantiate_type): Change parameter.
10917         * class.c (instantiate_type): Adjust prototype. Adjust.
10918         * call.c (standard_conversion): Adjust instantiate_type call.
10919         (reference_binding): Likewise.
10920         (build_op_delete_call): Likewise.
10921         (convert_like_real): Likewise.
10922         * cvt.c (cp_convert_to_pointer): Likewise.
10923         (convert_to_reference): Likewise.
10924         * pt.c (convert_nontype_argument): Likewise.
10925         * typeck.c (build_binary_op): Likewise.
10926         (build_ptrmemfunc): Likewise.
10927         (convert_for_assignment): Likewise.
10928
10929 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10930
10931         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
10932         (current_aggr): Define.
10933         * decl.c (grokdeclarator): Make sure a friend class is an
10934         elaborated type specifier.
10935         * parse.y (current_aggr): Remove static definition.
10936         (cp_parse_init): Adjust.
10937         (structsp): Clear and restore current_aggr.
10938         (component_decl_list): Clear current_aggr.
10939
10940         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
10941         aggregate tag on the typename's context.
10942
10943         * pt.c (tsubst_friend_class): Return error_mark_node, if
10944         parms becomes NULL.
10945         (instantiate_class_template): Ignore error_mark_node friend types.
10946
10947 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
10948
10949         * cvt.c (warn_ref_binding): New static function, broken out of ...
10950         (convert_to_reference): ... here. Use it.
10951
10952 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10953
10954         * parse.y (template_arg): Add rule for template qualified with
10955         global scope.
10956
10957 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10958
10959         * decl2.c (add_function): Reorganize.
10960         (arg_assoc): Do not consider function template decls.
10961
10962 2000-08-11  Jason Merrill  <jason@redhat.com>
10963
10964         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
10965         looking inside.
10966
10967 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
10968
10969         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
10970         (lookup_nested_tag): Likewise.
10971
10972         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
10973         can be produced.
10974
10975 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
10976
10977         * parse.y (named_complex_class_head_sans_basetype): Remove
10978         always true if.
10979
10980 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
10981
10982         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
10983         explicit TEMPLATE_ID_EXPR args.
10984         (build_expr_from_tree, case CALL_EXPR): Likewise.
10985
10986 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
10987
10988         * decl.c (check_tag_decl): Diagnose typename's which don't
10989         declare anything.
10990
10991 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
10992
10993         * init.c (build_aggr_init): Reject bogus array initializers
10994         early.
10995
10996 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
10997
10998         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
10999         runtime.
11000         * cp/tinfo.cc (__dynamic_cast): Likewise.
11001         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
11002
11003 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
11004
11005         * cvt.c (convert_to_pointer_force): Fix error message when
11006         attempting to cast from ambiguous base.
11007
11008 2000-08-08  Jason Merrill  <jason@redhat.com>
11009
11010         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
11011         (tsubst_template_arg_vector): Likewise.
11012
11013         * decl2.c (build_anon_union_vars): Choose the largest field; don't
11014         assume that one will be as large as the union.
11015
11016 2000-08-07  Kazu Hirata  <kazu@hxi.com>
11017
11018         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
11019         * decl.c (pop_labels): Likewise.
11020
11021 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
11022
11023         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
11024         specifications.
11025         (__pointer_to_member_type_info): Likewise.
11026         (__base_class_info): Likewise.
11027         (__class_type_info): Likewise.
11028         (__si_class_type_info): Likewise.
11029         (__vmi_class_type_info): Likewise.
11030         * tinfo.cc (__si_class_type_info::__do_find_public_src):
11031         Changed member names to match specifications.
11032         (__vmi_class_type_info::__do_find_public_src): Likewise.
11033         (__si_class_type_info::__do_dyncast): Likewise.
11034         (__vmi_class_type_info::__do_dyncast): Likewise.
11035         (__si_class_type_info::__do_upcast): Likewise.
11036         (__vmi_class_type_info::__do_upcast): Likewise.
11037         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
11038         (__pbase_type_info::__pointer_catch): Likewise.
11039         (__pointer_type_info::__pointer_catch): Likewise.
11040         (__pointer_to_member_type_info::__pointer_catch): Likewise.
11041
11042 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
11043
11044         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
11045         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
11046         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
11047
11048 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
11049
11050         * cp-tree.h (add_method): Change prototype.
11051         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
11052         Don't double the size of the method vector in the error case.
11053         (handle_using_decl): Adjust call to add_method.
11054         (add_implicitly_declared_members): Likewise.
11055         (clone_function_decl): Likewise.
11056         * decl2.c (check_classfn): Likewise.
11057         * semantics.c (finish_member_declaration): Likewise.
11058
11059 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
11060
11061         * decl.c (flag_isoc94): New variable.
11062
11063 2000-08-02  Jason Merrill  <jason@redhat.com>
11064
11065         * pt.c (do_type_instantiation): Add complain parm; don't complain
11066         if called recursively.
11067         * cp-tree.h, parse.y: Adjust.
11068
11069 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
11070
11071         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
11072         -Wno-strict-prototypes.
11073
11074         * g++spec.c: Adjust type of second argument to
11075         lang_specific_driver, and update code as necessary.
11076
11077         * cp-tree.h: Don't prototype min_precision here.
11078         (my_friendly_assert): Cast expression to void.
11079         * semantics.c (do_poplevel): Initialize scope_stmts.
11080
11081 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
11082
11083         * cp-tree.h (DECL_NEEDED_P): Tweak.
11084
11085 2000-07-28  Jason Merrill  <jason@redhat.com>
11086
11087         * lang-specs.h: Use %i in rule for .ii files.
11088
11089 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
11090
11091         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
11092
11093 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
11094
11095         Allow indirect primary bases.
11096         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
11097         primary_base.
11098         (CLASSTYPE_VFIELD_PARENT): Remove.
11099         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
11100         (BINFO_PRIMARY_BINFO): Remove.
11101         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
11102         (BINFO_VBASE_PRIMARY_P): Likewise.
11103         (BINFO_PRIMARY_BASE_OF): New macro.
11104         (BINFO_INDIRECT_PRIMARY_P): Likewise.
11105         (get_primary_binfo): New function.
11106         * decl.c (lang_mark_tree): Make lang_type::primary_base.
11107         * class.c (vcall_offset_data_s): Rename to ...
11108         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
11109         and add ctor_vtbl_p.
11110         (get_derived_offset): Use get_primary_binfo.
11111         (dfs_mark_primary_bases): Adjust handling of virtual primary
11112         bases.
11113         (mark_primary_bases): Likewise.
11114         (set_primary_base): Take a binfo, not an integer, as a
11115         representation of the primary base.
11116         (indirect_primary_base_p): Remove.
11117         (determine_primary_base): Adjust for indirect primary bases.
11118         (dfs_find_final_overrider): Fix typo in coment.
11119         (update_vtable_entry_for_fn): Use get_primary_binfo.
11120         (layout_nonempty_base_or_field): Tweak.
11121         (build_base_fields): Adjust for new primary base semantics.
11122         (dfs_propagate_binfo_offsets): Remove.
11123         (propagate_binfo_offsets): Rewrite.
11124         (dfs_set_offset_for_shared_vbases): Remove.
11125         (layout_virtual_bases): Don't use it.
11126         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
11127         ABI.
11128         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
11129         CLASSTYPE_VFIELD_PARENT.
11130         (dfs_get_primary_binfo): New function.
11131         (get_primary_binfo): Likewise.
11132         (dump_class_hierarchy_r): Tweak printing of primary bases.
11133         (build_vtbl_initializer): Fix typo in comments.  Use
11134         vtbl_init_data.
11135         (build_vcall_and_vbase_vtbl_entries): Likewise.
11136         (build_vbaes_offset_vtbl_entries): Likewise.
11137         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
11138         BV_VCALL_INDEX to handle indirect primary bases.
11139         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
11140         (build_rtti_vtbl_entries): Likewise.
11141         * search.c (get_shared_vbase_if_not_primary): Tweak.
11142         (find_vbase_instance): Likewise.
11143         (binfo_for_vtable): Simplify.
11144         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
11145         (make_binfo): Make it have 11 entries.
11146
11147 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
11148
11149         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
11150         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
11151         ascertaining primaryness.
11152         (G): Remove template_args.
11153         (decl_is_template_id): New function.
11154         (write_encoding): Use decl_is_template_id.
11155         (write_name): Likewise.  Handle type_decls.  Get main variant of
11156         type decls.
11157         (write_nested_name): Likewise.
11158         (write_prefix): Likewise.
11159         (write_template_prefix): Likewise.
11160         (write_special_name_constructor): Remove defunct production from
11161         comment.
11162         (write_bare_function_type): Remove comment about absent parameter.
11163         (write_template_template_arg): Add missing grammar production to
11164         comment.
11165
11166 2000-07-27  Jason Merrill  <jason@redhat.com>
11167
11168         * decl.c (duplicate_decls): If common_type produces a non-typedef
11169         type for a typedef, just use the old type.
11170
11171 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
11172
11173         * cp-tree.h (function_depth): Declare.
11174         (verify_stmt_tree): Likewise.
11175         (find_tree): Likewise.
11176         * decl.c (function_depth): Give it external linkage.
11177         * optimize.c (optimize_function): Increment and decrement it.
11178         * tree.c (verify_stmt_tree_r): New function.
11179         (verify_stmt_tree): Likewise.
11180         (find_tree_r): Likewise.
11181         (find_tree): Likewise.
11182
11183 2000-07-27  Jason Merrill  <jason@redhat.com>
11184
11185         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
11186         TYPE_PTRMEMFUNC_P.
11187         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
11188
11189 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
11190
11191         * decl.c (start_cleanup_fn): Mark the function as `inline'.
11192         * decl2.c (get_guard): Call cp_finish_decl, not
11193         rest_of_decl_compilation, for local guards.
11194         * lex.c (do_identifier): Remove unused variable.
11195
11196 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
11197
11198         * parse.y:  Add missing ';'.
11199
11200 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
11201
11202         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
11203         of `extern "C++"'.
11204
11205 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11206
11207         Kill strict_prototype. Backwards compatibility only for
11208         non NO_IMPLICIT_EXTERN_C systems.
11209         * cp-tree.h (flag_strict_prototype): Remove.
11210         (strict_prototype): Remove.
11211         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
11212         * decl.c (maybe_push_to_top_level): Adjust.
11213         (pop_from_top_level): Adjust.
11214         (decls_match): Only allow sloppy parm matching for ancient
11215         system headers.
11216         (init_decl_processing): Adjust.
11217         (grokdeclarator): Adjust.
11218         * decl2.c (flag_strict_prototype): Remove.
11219         (strict_prototype): Remove.
11220         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
11221         (lang_f_options): Remove "strict-prototype".
11222         (unsupported-options): Add "strict-prototype".
11223         * lex.c (do_identifier): Adjust.
11224         (do_scoped_id): Adjust.
11225         * parse.y (empty_parms): Adjust.
11226         * class.c (push_lang_context): Adjust.
11227         (pop_lang_context): Adjust.
11228         * typeck.c (comp_target_parms): Adjust.
11229
11230 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11231
11232         * decl.c (poplevel): Deal with anonymous variables at for scope.
11233         (maybe_inject_for_scope_var): Likewise.
11234
11235 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
11236
11237         * decl.c: Remove all signal handling code, now done in toplev.c.
11238
11239 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
11240
11241         * decl.c (make_rtl_for_nonlocal_decl): Rework.
11242
11243         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
11244         correctly.
11245
11246 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
11247
11248         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
11249         Define my_friendly_assert and my_friendly_abort as macros
11250         which may call friendly_abort.  Prototype friendly abort, not
11251         my_friendly_abort or my_friendly_assert.
11252         * decl.c (signal_catch): Report the signal caught in the error
11253         message.  Call fatal directly.
11254         * typeck2.c (ack, my_friendly_assert): Delete.
11255         (my_friendly_abort): Rename to friendly_abort.  Expect file,
11256         line, and function parameters.  Report the abort code, then
11257         call fancy_abort.  Do not mask an abort if errors have
11258         already occurred.
11259
11260 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
11261
11262         * typeck.c (comp_target_parms): Remove obsolete parameter.
11263         (comp_target_types): Adjust.
11264
11265 2000-07-17  Jason Merrill  <jason@redhat.com>
11266
11267         * typeck.c (mark_addressable): Never set TREE_USED.
11268         * call.c (build_call): Don't abort on calls to library functions
11269         that have been declared normally.
11270
11271         * typeck.c (build_binary_op): Fix grammar in warning.
11272
11273         * exception.cc (__eh_free): Fix prototype.
11274
11275         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
11276
11277         * decl.c (pushdecl): Handle seeing an OVERLOAD in
11278         IDENTIFIER_NAMESPACE_VALUE.
11279
11280 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
11281
11282         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
11283         * method.c (use_thunk): Correct handling of vcall offsets.
11284
11285 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
11286
11287         * .cvsignore: parse.h and parse.c have no cp- prefix.
11288
11289 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
11290
11291         * .cvsignore: New file.
11292
11293 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
11294
11295         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
11296
11297 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
11298
11299         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
11300         * parse.c: Remove.
11301         * parse.h: Likewise.
11302
11303 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
11304
11305         * class.c (layout_class_type): Add pointers to virtual bases after
11306         base classes under the old ABI.
11307
11308 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
11309
11310         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
11311         (finish_continue_stmt): Likewise.
11312         (begin_for_stmt): Remove call to note_level_for_for.
11313         (finish_goto_stmt): Change call from build_min_nt
11314         to build_stmt.
11315         (finish_expr_stmt): Likewise.
11316         (begin_if_stmt): Likewise.
11317         (begin_while_stmt): Likewise.
11318         (finish_while_stmt): Likewise.
11319         (finish_return_stmt): Likewise.
11320         (begin_for_stmt): Likewise.
11321         (finish_for_stmt): Likewise.
11322         (finish_break_stmt): Likewise.
11323         (begin_switch_stmt): Likewise.
11324         (finish_case_label): Likewise.
11325         (genrtl_try_block): Likewise.
11326         (begin_try_block): Likewise.
11327         (begin_handler): Likewise.
11328         (begin_compound_stmt): Likewise.
11329         (finish_asm_stmt): Likewise.
11330         (finish_label_stmt): Likewise.
11331         (add_decl_stmt): Likewise.
11332         (finish_subobject): Likewise.
11333         (finish_decl_cleanup): Likewise.
11334         (finish_named_return_value): Likewise.
11335         (setup_vtbl_ptr): Likewise.
11336         (add_scope_stmt): Likewise.
11337         * decl.c (finish_constructor_body): Likewise.
11338         (finish_destructor_body): Likewise.
11339         * optimize.c (copy_body_r): Likewise.
11340         (initialize_inlined_parameters): Likewise.
11341         (declare_return_variable): Likewise.
11342         (expand_call_inline): Likewise.
11343
11344 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
11345
11346         * semantics.c (expand_body): Sync interface information
11347         at the end of function body expansion.
11348
11349 2000-07-09  Jason Merrill  <jason@redhat.com>
11350
11351         * init.c (build_new_1): Bail early if the call to new fails.
11352
11353         * decl.c (compute_array_index_type): Check specifically for
11354         an INTEGER_CST, not just TREE_CONSTANT.
11355
11356         * decl.c (duplicate_decls): Don't call duplicate_decls on
11357         the DECL_TEMPLATE_RESULT.
11358         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
11359         codes.
11360
11361         * error.c (dump_template_bindings): Don't crash if we had an
11362         invalid argument list.
11363
11364         * typeck.c (c_expand_start_case): Do narrowing here.
11365         * semantics.c (finish_switch_cond): Not here.
11366
11367 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
11368
11369         * parse.y (asm_clobbers): Do string concatenation.
11370
11371 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
11372
11373         * decl.c (pushtag): Don't put local classes in template functions
11374         on the local_classes list.
11375
11376 2000-07-04  Scott Snyder  <snyder@fnal.gov>
11377
11378         * decl2.c (get_guard): Add missing return for old ABI local
11379         variable case.
11380
11381 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
11382
11383         * cp-tree.h (char_type_p): New function.
11384         * decl.c (init_decl_processing): Don't initialize
11385         signed_wchar_type_node or unsigned_wchar_type_node.
11386         (complete_array_type): Handle brace-enclosed string-constants.
11387         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
11388         * tree.c (char_type_p): New function.
11389         * typeck2.c (digest_init): Use char_type_p.
11390
11391 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
11392
11393         * pt.c (tsubst): Don't layout type, if it's error_mark.
11394
11395 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
11396
11397         * pt.c (instantiate_pending_templates): Reset template level.
11398
11399 2000-07-05  Jason Merrill  <jason@redhat.com>
11400
11401         * call.c (joust): Don't complain about `operator char *()' beating
11402         `operator const char *() const'.
11403
11404 2000-07-04  scott snyder  <snyder@fnal.gov>
11405             Jason Merrill  <jason@redhat.com>
11406
11407         * repo.c (repo_get_id): Handle the case where a class with virtual
11408         bases has a null TYPE_BINFO_VTABLE.
11409
11410 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
11411             Jason Merrill  <jason@redhat.com>
11412
11413         * parse.y (member_init): Just pass in the type.
11414         * init.c (expand_member_init): Handle getting a type.
11415
11416 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11417             Jason Merrill  <jason@redhat.com>
11418
11419         * decl.c (finish_function): Warn if a function has no return
11420         statement.
11421         Suggested by Andrew Koenig.
11422         * typeck.c (check_return_expr): Do set current_function_returns_value
11423         if we got an error_mark_node.
11424
11425 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
11426
11427         * decl2.c (push_decl_namespace): Push the original namespace.
11428
11429 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
11430
11431         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
11432         * semantics.c (begin_class_definition): Clear it.
11433
11434 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
11435
11436         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
11437         (genrtl_expr_stmt): Likewise.
11438         (genrtl_decl_stmt): Likewise.
11439         (genrtl_if_stmt): Likewise.
11440         (genrtl_while_stmt): Likewise.
11441         (genrtl_do_stmt): Likewise.
11442         (genrtl_return_stmt): Likewise.
11443         (genrtl_for_stmt): Likewise.
11444         (genrtl_break_stmt): Likewise.
11445         (genrtl_continue_stmt): Likewise.
11446         (genrtl_scope_stmt): Likewise.
11447         (genrtl_switch_stmt): Likewise.
11448         (genrtl_case_label): Likewise.
11449         (genrtl_begin_compound_stmt): Likewise.
11450         (genrtl_finish_compound_stmt): Likewise.
11451         (genrtl_compound_stmt): Likewise.
11452         (genrtl_asm_stmt): Likewise.
11453
11454         * init.c (begin_init_stmts): Remove call to
11455         genrtl_begin_compound_stmt.
11456         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
11457
11458         * semantics.c (lang_expand_stmt): Changed call to
11459         genrtl_compound_stmt to ignore return value.
11460
11461 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
11462
11463         * mangle.c (canonicalize_for_substitution): Return the canonical
11464         variant of a type.
11465
11466         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
11467         TYPE_DECL.
11468         * typeck.c (commonparms): Remove obstack manipulations.
11469
11470 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
11471
11472         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
11473
11474         * Makefile.in (OBJS): Added ../c-semantics.o.
11475         (OBJDEPS): Likewise.
11476
11477         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
11478         ../c-common.h.
11479         (struct stmt_tree): Added comment.
11480         (current_function_name_declared): Removed.
11481         (stmts_are_full_exprs_p): Likewise.
11482         (genrtl_do_pushlevel): Likewise.
11483         (genrtl_clear_out_block): Likewise.
11484         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
11485         (DECL_ANON_UNION_ELEMS): Likewise.
11486         (emit_local_var): Likewise.
11487         (make_rtl_for_local_static): Likewise.
11488         (do_case): Likewise.
11489         (expand_stmt): Likewise.
11490         (genrtl_decl_cleanup): Likewise.
11491         (c_expand_asm_operands): Likewise.
11492         (c_expand_return): Likewise.
11493         (c_expand_start_case): Likewise.
11494
11495         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
11496         (emit_local_var): Likewise.
11497         (initialize_local_var): Change reference to
11498         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
11499         Change reference to stmts_are_full_exprs_p to
11500         current_stmt_tree->stmts_are_full_exprs_p.
11501         (push_cp_function_context): Likewise.
11502
11503         * expect.c (expand_throw): Change reference to
11504         stmts_are_full_exprs_p.
11505
11506         * init.c (build_aggr_init): Change reference to
11507         stmts_are_full_exprs_p.
11508         (build_vec_init): Likewise.
11509
11510         * optimize.c (maybe_clone_body): Change reference to
11511         current_function_name_declared to
11512         cp_function_chain->name_declared.
11513
11514         * pt.c (instantiate_decl): Change reference to
11515         current_function_name_declared to
11516         cp_function_chain->name_declared.
11517
11518         * semantics.c (expand_cond): Moved declaration to c-common.h.
11519         (genrtl_do_pushlevel): Moved to c-semantics.c.
11520         (genrtl_clear_out_block): Likewise.
11521         (genrtl_goto_stmt): Likewise.
11522         (genrtl_expr_stmt): Likewise.
11523         (genrtl_decl_stmt): Likewise.
11524         (gerntl_if_stmt): Likewise.
11525         (genrtl_while_stmt): Likewise.
11526         (genrtl_do_stmt): Likewise.
11527         (genrtl_return_stmt): Likewise.
11528         (genrtl_for_stmt): Likewise.
11529         (genrtl_break_stmt): Likewise.
11530         (genrtl_continue_stmt): Likewise.
11531         (genrtl_scope_stmt): Likewise.
11532         (genrtl_switch_stmt): Likewise.
11533         (genrtl_case_label): Likewise.
11534         (genrtl_begin_compound_stmt): Likewise.
11535         (genrtl_finish_compound_stmt): Likewise.
11536         (genrtl_compound_stmt): Likewise.
11537         (genrtl_asm_stmt): Likewise.
11538         (genrtl_decl_cleanup): Likewise.
11539         (expand_cond): Likewise.
11540         (expand_stmt): Renamed to ...
11541         (lang_expand_stmt): ... this.
11542         (lang_expand_expr_stmt): Initialize.
11543         (set_current_function_name_declared): Likewise.
11544         (stmts_are_full_exprs_p): Likewise.
11545         (current_function_name_declared): Likewise.
11546         (anon_aggr_type_p): Likewise.
11547         (do_poplevel): Change reference to
11548         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
11549         Change reference to stmts_are_full_exprs_p to
11550         current_stmt_tree->stmts_are_full_exprs_p.
11551         (add_tree): Likewise.
11552         (finish_expr_stmt): Likewise.
11553         (prep_stmt): Likewise.
11554         (lang_expand_stmt): Likewise.
11555         (begin_compound_stmt): Change reference to
11556         current_function_name_declared to
11557         cp_function_chain->name_declared and call to
11558         current_function_name_declared().
11559         (setup_vtbl_ptr): Likewise.
11560         (genrtl_do_poplevel): Removed.
11561
11562 2000-06-30  Jason Merrill  <jason@redhat.com>
11563
11564         * init.c (init_init_processing): Go back to aligning like
11565         double_type_node for old ABI.
11566         (get_cookie_size): Make cookie larger if we get a type that needs
11567         more alignment.
11568         (build_vec_delete): Call it.
11569
11570         * typeck.c (qualify_type_recursive): New fn.
11571         (composite_pointer_type): Use it.
11572         (build_binary_op): Use composite_pointer_type.
11573
11574 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
11575             Jason Merrill  <jason@redhat.com>
11576
11577         * typeck.c (check_return_expr): Don't complain about returning
11578         NULL from operator new if -fcheck-new.
11579         * cp-tree.h: Declare flag_check_new here.
11580         * init.c: Not here.
11581
11582 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
11583
11584         * mangle.c (find_substitution): Use same_type_p.
11585         (write_encoding): Don't check for substitutions.
11586
11587 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
11588
11589         * parse.y (expr_no_comma_rangle): New non-terminal.
11590         (template_parm): Use it for default parameter case.
11591         (template_arg): Use it.
11592         (expr_no_commas): Remove commented out undefined extensions.
11593         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
11594         * parse.h, parse.c: Rebuilt.
11595
11596 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
11597
11598         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
11599         (finish_asm_stmt): Do it here, instead.
11600
11601         * cp-tree.h (ridpointers): Don't declare.
11602         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
11603         (record_builtin_java_type): Likewise.
11604         (init_decl_processing): Likewise.
11605         * lex.c: Move inclusion of lex.h.
11606         (ridpointers): Don't define.
11607         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
11608         RID_MAX.
11609         * lex.h (enum rid): Rename to ...
11610         (enum cp_rid): ... this.
11611         (ridpointers): Don't declare.
11612         * parse.y: Move inclusion of lex.h.
11613         * parse.c: Regenerated.
11614         * spew.c: Move inclusion of lex.h.
11615
11616         * cp-tree.h (struct language_function): Remove temp_name_counter.
11617         (temp_name_counter): Remove.
11618         (get_temp_name): Change prototype.
11619         (get_guard): New function.
11620         (get_guard_cond): Likewise.
11621         (set_guard): Likewise.
11622         * cvt.c (build_up_reference): Adjust call to get_temp_name.
11623         * decl.c (expand_static_init): Use get_guard and friends to
11624         implement guard variables.
11625         * decl2.c (get_temp_name): Assume that the variables created are
11626         always static.
11627         (get_sentry): Rename to ...
11628         (get_guard): ... this.  Implement new ABI guard variables.
11629         (get_guard_bits): New function.
11630         (get_guard_cond): Likewise.
11631         (set_guard): Likewise.
11632         (start_static_initialization_or_destruction): Use them.
11633         (do_static_initialization): Replace sentry with guard throughout.
11634         (do_static_destruction): Likewise.
11635         * init.c (create_temporary_var): Add comment.
11636
11637 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
11638
11639         * mangle.c (find_substitution): Use same_type_p.
11640         (write_encoding): Don't check for substitutions.
11641
11642 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
11643
11644         * parse.y (expr_no_comma_rangle): New non-terminal.
11645         (template_parm): Use it for default parameter case.
11646         (template_arg): Use it.
11647         (expr_no_commas): Remove commented out undefined extensions.
11648         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
11649         * parse.h, parse.c: Rebuilt.
11650
11651 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
11652
11653         * cp-tree.h (flag_const_strings): Remove.
11654         (warn_parentheses): Likewise.
11655         (warn_format): Likewise.
11656         (common_type): Likewise.
11657         (default_conversion): Likewise.
11658         (build_binary_op): Likewise.
11659         (cp_build_binary_op): New macro.
11660         * call.c (build_new_op): Use cp_build_binary_op instead of
11661         build_binary_op.
11662         * class.c (build_vtable_entry_ref): Likewise.
11663         * decl.c (expand_static_init): Likewise.
11664         (compute_array_index_type): Likewise.
11665         (build_enumerator): Likewise.
11666         * decl2.c (delete_sanity): Likewise.
11667         (start_static_initialization_or_destruction): Likewise.
11668         * error.c (dump_type_suffix): Likewise.
11669         * init.c (resolve_offset_ref): Likewise.
11670         (build_new): Likewise.
11671         (build_new_1): Likewise.
11672         (build_vec_delete_1): Likewise.
11673         (build_vec_init): Likewise.
11674         (build_delete): Likewise.
11675         * rtti.c (synthesize_tinfo_fn): Likewise.
11676         (synthesize_tinfo_var): Likewise.
11677         * search.c (expand_upcast_fixups): Likewise.
11678         (fixup_all_virtual_upcast_offsets): Likewise.
11679         * typeck.c (build_array_ref): Likewise.
11680         (get_member_function_from_ptrfunc): Likewise.
11681         (build_binary_op): Add parameter.
11682         (pointer_int_sum): Use cp_build_binary_op.
11683         (pointer_diff): Likewise.
11684         (build_modify_expr): Likewise.
11685         (get_delta_difference): Likewise.
11686         (build_ptrmemfunc): Likewise.
11687
11688 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
11689
11690         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
11691         * decl.c (create_implicit_typedef): Adjust.
11692         * decl2.c (build_artificial_parm): Adjust.
11693         * method.c (implicitly_declare_fn): Adjust.
11694         * pt.c (push_inline_template_parms_recursive): Adjust.
11695         (process_template_parm): Adjust.
11696         (overloaded_template_name): Adjust.
11697         * semantics.c (finish_template_template_parm): Adjust.
11698
11699 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
11700
11701         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
11702         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
11703         where to emit thunks.
11704         (build_vtt): Adjust call to build_vtt_inits.
11705         (build_vtt_inits): Add parameter to indicate whether or not
11706         sub-VTTs for virtual bases should be included.  Adjust handling of
11707         construction vtables.
11708         (get_matching_base): New function.
11709         (dfs_build_vtt_inits): Rename to ...
11710         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
11711         construction vtables.
11712         (dfs_fixup_binfo_vtbls): Likewise.
11713         (build_ctor_vtbl_groups): Build construction vtables for virtual
11714         bases, too.
11715         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
11716         to build construction vtbls.
11717         (dfs_accumulate_vtbl_inits): Adjust handling of
11718         construction vtables.
11719
11720         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
11721         types correctly.
11722
11723 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
11724
11725         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
11726
11727 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
11728
11729         * search.c (hides): Remove.
11730         (is_subobject_of_p): Add most_derived parameter. Use
11731         CANONICAL_BINFO.
11732         (lookup_field_queue_p): Adjust.
11733         (lookup_field_r): Adjust.
11734
11735 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
11736
11737         * decl2.c (handle_class_head): Bash typedefs to the type's main
11738         decl.
11739
11740 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
11741
11742         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
11743         (begin_global_stmt_expr): ... this.
11744         (genrtl_finish_stmt_expr): Rename to ...
11745         (finish_global_stmt_expr): ... this.
11746         * init.c (begin_init_stmts): Adjust calls.
11747         (finish_init_stmts): Likewise.
11748         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
11749         (begin_global_stmt_expr): ... this.
11750         (genrtl_finish_stmt_expr): Rename to ...
11751         (finish_global_stmt_expr): ... this.
11752
11753 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11754
11755         * search.c (lookup_member): Fix typo in comment.
11756
11757 2000-06-24  Jason Merrill  <jason@redhat.com>
11758
11759         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
11760         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
11761
11762 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11763
11764         * parse.y (complex_direct_notype_declarator): Support global_scope.
11765         * Makefile.in: Adjust conflict count.
11766
11767 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11768
11769         * parse.y (template_arg): Convert TEMPLATE_DECL
11770         that is a template template parameter to
11771         TEMPLATE_TEMPLATE_PARM here.
11772
11773         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
11774         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
11775         (copy_template_template_parm): Adjust prototype.
11776         * decl.c (grokdeclarator): Remove dead code.
11777         * pt.c (process_template_parm): Tidy.
11778         (lookup_template_class): Construct nodes in
11779         copy_template_template_parm.
11780         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
11781         lookup_template_class.  Use TYPE_TI_TEMPLATE.
11782         * tree.c (copy_template_template_parm): Add NEWARGS
11783         parameter.
11784         (mapcar): Adjust call to copy_template_template_parm.
11785         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
11786         * method.c (build_template_template_parm_names): Change error
11787         code to avoid compilation warning.
11788
11789         * gxxint.texi: Document template template parameter
11790         name mangling.
11791
11792 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
11793
11794         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
11795         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
11796         (cp-demangle.o): New rule.
11797         (dyn-string.o): Likewise.
11798         * inc/cxxabi.h (__cxa_demangle): New declaration.
11799
11800 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
11801
11802         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
11803         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
11804         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
11805         a tree, not an int.
11806         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
11807         (make_thunk): Change prototype.
11808         (emit_thunk): Rename to use_thunk.
11809         (mangle_thunk): Change prototype.
11810         * class.c (get_derived_offset): Simplify.
11811         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
11812         BV_GENERATE_THUNK_WITH_VTABLE_P.
11813         (build_primary_vtable): Simplify.
11814         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
11815         (dfs_find_base): Remove.
11816         (update_vtable_entry_for_fn): Correct bug in finding the base
11817         where a virtual function was first declared.  Figure out whether
11818         or not to emit a vcall-thunk with the vtables in which it appears.
11819         Correct logic for deciding whether to use an ordinary thunk, or a
11820         vcall thunk.
11821         (finish_struct_1): Remove unnecssary code.
11822         (build_vtbl_initializer): Use ssize_int for the running counter of
11823         negative indices.
11824         (build_vtbl_initializer): Only use vcall thunks where necessary.
11825         Mark thunks as needing to be emitted with their vtables, or not.
11826         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
11827         indices.  Use size_binop.
11828         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
11829         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
11830         size_binop.
11831         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
11832         (build_vtable_entry): Mark thunks as needing to be emitted with
11833         their vtables, or not.
11834         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
11835         * decl2.c (mark_vtable_entries): Use use_thunk instead of
11836         emit_thunk.
11837         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
11838         information.
11839         * error.c (dump_expr): Use BV_FN.
11840         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
11841         not an int.
11842         * method.c (make_thunk): Likewise.
11843         (emit_thunk): Rename to use_thunk.  Allow callers to decide
11844         whether or not to actually emit the thunk.  Adjust for changes in
11845         representation of vcall offsets.
11846         * search.c (dfs_get_pure_virtuals): Use BV_FN.
11847         * semantics.c (emit_associated_thunks): New function.
11848         (expand_body): Use it.
11849         * ir.texi: Adjust decriptions of thunks.
11850
11851 2000-06-22  Jason Merrill  <jason@redhat.com>
11852
11853         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
11854         (tsubst_friend_function): Copy it here.
11855
11856         * decl.c (grok_op_properties): Fix typo.
11857
11858         * decl2.c (delete_sanity): Clarify warning, avoid failure on
11859         deleting void*.
11860
11861         * pt.c (check_explicit_specialization): Clarify error.
11862
11863         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
11864         an old OVERLOAD when we're declaring a non-function.
11865         (pushdecl, destroy_local_var): Check for error_mark_node.
11866         (warn_extern_redeclared_static): Also bail early if
11867         we're a CONST_DECL.
11868         (push_overloaded_decl): Ignore an old error_mark_node.
11869
11870 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
11871
11872         * call.c (build_x_va_arg): Check if in a template decl.
11873         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
11874
11875 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11876
11877         * class.c (push_lang_context): TYPE_NAME gets you to the Java
11878         types DECLs.
11879         * decl.c (check_goto): Computed gotos assumed OK.
11880
11881 2000-06-20  Jason Merrill  <jason@redhat.com>
11882
11883         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
11884         for which we don't need to look for instantiations.
11885
11886 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
11887
11888         * parse.y (program): Always call finish_translation_unit.
11889         * parse.c, parse.h: Rebuilt.
11890
11891 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
11892
11893         * method.c: Don't include hard-reg-set.h.
11894
11895 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
11896
11897         * rtti.c (get_base_offset): Cope when vbase field is in a base.
11898
11899 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
11900
11901         * call.c (build_conditional_expr): Use VOID_TYPE_P.
11902         * cvt.c (cp_convert_to_pointer): Likewise.
11903         (convert_to_void): Likewise.
11904         * error.c (dump_expr): Likewise.
11905         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
11906         * init.c (build_delete): Likewise.
11907         * method.c (emit_thunk): Likewise.
11908         * optmize.c (declare_return_variable): Likewise.
11909         * rtti.c (get_tinfo_decl_dynamic): Likewise.
11910         (get_typeid): Likewise.
11911         (build_dynamic_cast_1): Likewise.
11912         * typeck.c (composite_pointer_type): Likewise.
11913         (common_type): Likewise.
11914         (build_indirect_ref): Likewise.
11915         (build_binary_op): Likewise.
11916         (build_x_compound_expr): Likewise.
11917         (check_return_expr): Likewise.
11918         * typeck2.c (add_exception_specifier): Likewise.
11919
11920         * mangle.c (write_method_parms): Use direct comparison for end
11921         of parmlist.
11922
11923 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
11924
11925         * cp-tree.h (genrtl_try_block): Declare function.
11926         (genrtl_handler): Likewise.
11927         (genrtl_catch_block): Likewise.
11928         (genrtl_ctor_stmt): Likewise.
11929         (genrtl_subobject): Likewise.
11930         (genrtl_decl_cleanup): Likewise.
11931         (genrtl_do_poplevel): Likewise.
11932         (genrtl_do_pushlevel): Likewise.
11933         (genrtl_clear_out_block): Likewise.
11934         (genrtl_goto_stmt): Likewise.
11935         (genrtl_expr_stmt): Likewise.
11936         (genrtl_decl_stmt): Likewise.
11937         (genrtl_if_stmt): Likewise.
11938         (genrtl_while_stmt): Likewise.
11939         (genrtl_do_stmt): Likewise.
11940         (genrtl_return_stmt): Likewise.
11941         (genrtl_for_stmt): Likewise.
11942         (genrtl_break_stmt): Likewise.
11943         (genrtl_continue_stmt): Likewise.
11944         (genrtl_scope_stmt): Likewise.
11945         (genrtl_switch_stmt): Likewise.
11946         (genrtl_case_label): Likewise.
11947         (genrtl_begin_compound_stmt): Likewise.
11948         (genrtl_finish_compound_stmt): Likewise.
11949         (genrtl_compound_stmt): Likewise.
11950         (genrtl_asm_stmt): Likewise.
11951         (genrtl_named_return_value): Likewise.
11952         (genrtl_begin_stmt_expr): Likewise.
11953         (genrtl_finish_stmt_expr): Likewise.
11954         (finish_for_stmt): Removed first argument.
11955         (finish_switch_stmt): Likewise.
11956
11957         * semantics.c (genrtl_try_block): Define function.
11958         (genrtl_handler): Likewise.
11959         (genrtl_catch_block): Likewise.
11960         (genrtl_ctor_stmt): Likewise.
11961         (genrtl_subobject): Likewise.
11962         (genrtl_decl_cleanup): Likewise.
11963         (genrtl_do_poplevel): Likewise.
11964         (genrtl_do_pushlevel): Likewise.
11965         (genrtl_clear_out_block): Likewise.
11966         (genrtl_goto_stmt): Likewise.
11967         (genrtl_expr_stmt): Likewise.
11968         (genrtl_decl_stmt): Likewise.
11969         (genrtl_if_stmt): Likewise.
11970         (genrtl_while_stmt): Likewise.
11971         (genrtl_do_stmt): Likewise.
11972         (genrtl_return_stmt): Likewise.
11973         (genrtl_for_stmt): Likewise.
11974         (genrtl_break_stmt): Likewise.
11975         (genrtl_continue_stmt): Likewise.
11976         (genrtl_scope_stmt): Likewise.
11977         (genrtl_switch_stmt): Likewise.
11978         (genrtl_case_label): Likewise.
11979         (genrtl_begin_compound_stmt): Likewise.
11980         (genrtl_finish_compound_stmt): Likewise.
11981         (genrtl_compound_stmt): Likewise.
11982         (genrtl_asm_stmt): Likewise.
11983         (genrtl_named_return_value): Likewise.
11984         (genrtl_begin_stmt_expr): Likewise.
11985         (genrtl_finish_stmt_expr): Likewise.
11986         (finish_for_stmt): Removed first argument and generate rtl
11987         specific code.
11988         (finish_switch_stmt): Likewise.
11989         (do_poplevel): Removed generate rtl specific code.
11990         (do_pushlevel): Likewise.
11991         (add_tree): Likewise.
11992         (finish_goto_stmt): Likewise.
11993         (finish_expr_stmt): Likewise.
11994         (begin_if_stmt): Likewise.
11995         (finish_if_stmt_cond): Likewise.
11996         (finish_then_clause): Likewise.
11997         (begin_else_clause): Likewise.
11998         (finish_else_clause): Likewise.
11999         (finish_if_stmt): Likewise.
12000         (clear_out_block): Likewise.
12001         (begin_while_stmt): Likewise.
12002         (finish_while_stmt_cond): Likewise.
12003         (finish_while_stmt): Likewise.
12004         (begin_do_stmt): Likewise.
12005         (finish_do_body): Likewise.
12006         (finish_do_stmt): Likewise.
12007         (finish_return_stmt): Likewise.
12008         (begin_for_stmt): Likewise.
12009         (finish_for_init_stmt): Likewise.
12010         (finish_for_cond): Likewise.
12011         (finish_for_expr): Likewise.
12012         (finish_break_stmt): Likewise.
12013         (finish_continue_stmt): Likewise.
12014         (begin_switch_stmt): Likewise.
12015         (finish_switch_cond): Likewise.
12016         (finish_case_label): Likewise.
12017         (begin_try_block): Likewise.
12018         (begin_function_try_block): Likewise.
12019         (finish_try_block): Likewise.
12020         (finish_cleanup_try_block): Likewise.
12021         (finish_cleanup): Likewise.
12022         (finish_function_try_block): Likewise.
12023         (finish_handler_sequence): Likewise.
12024         (finish_function_handler_sequence): Likewise.
12025         (begin_handler): Likewise.
12026         (finish_handler_parms): Likewise.
12027         (begin_catch_block): Likewise.
12028         (finish_handler): Likewise.
12029         (begin_compound_stmt): Likewise.
12030         (finish_compound_stmt): Likewise.
12031         (finish_asm_stmt): Likewise.
12032         (finish_label_stmt): Likewise.
12033         (finish_label_decl): Likewise.
12034         (finish_subobject): Likewise.
12035         (finish_decl_cleanup): Likewise.
12036         (finish_named_return_value): Likewise.
12037         (begin_stmt_expr): Likewise.
12038         (finish_stmt_expr): Likewise.
12039
12040         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
12041         to call genrtl_expr_stmt when appropriate.
12042
12043         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
12044         begin_compound_expr to call genrtl_begin_stmt_expr and
12045         genrtl_begin_compound_expr when appropriate.
12046         (finish_init_stmts): Changed calls to finish_compound_expr and
12047         finish_stmt_expr to call genrtl_finish_compound_expr and
12048         genrtl_finish_stmt_expr when appropriate.
12049         (expand_default_init): Changed call to finish_expr_stmt to call
12050         genrtl_expr_stmt when appropriate.
12051         (build_vec_init): Likewise.
12052
12053         * parse.y (simple_stmt): Removed first argument from call to
12054         finish_for_stmt. Removed first argument from call to
12055         finish_switch_stmt.
12056
12057         * parse.c: Regenerated.
12058
12059         * pt.c (tsubst_expr): Removed first argument from call to
12060         finish_for_stmt. Removed first argument from call to
12061         finish_switch_stmt.
12062
12063 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
12064
12065         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
12066         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
12067
12068         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
12069         (cplus_tree_code_length[]): Likewise.
12070         (cplus_tree_code_name[]): Likewise.
12071         (init_parse): Added call to add_c_tree_codes. Changed
12072         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
12073
12074 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
12075
12076         * cp-tree.h (finish_mem_initializers): Declare.
12077         (count_trees): Likewise.
12078         * parse.y (base_init): Use finish_mem_initializers.
12079         * semantics.c (finish_mem_initializers): New function.
12080
12081         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
12082         the number of trees.
12083         (n_trees): Remove.
12084         (count_trees): Don't use it.
12085
12086 2000-06-15  Jason Merrill  <jason@redhat.com>
12087
12088         * tree.c (count_trees): New debugging function.
12089
12090         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
12091         * init.c (build_member_call): Pull out the name of a DECL.
12092
12093         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
12094         * semantics.c (expand_body): Push to TV_INTEGRATION here.
12095         * optimize.c (optimize_function): Not here.
12096         * pt.c (instantiate_decl): Push to TV_PARSE.
12097
12098 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
12099
12100         * cp-tree.h (struct language_function): Remove x_base_init_list
12101         and x_member_init_list.
12102         (current_base_init_list): Remove.
12103         (current_member_init_list): Likewise.
12104         (setup_vtbl_ptr): Change prototype.
12105         (emit_base_init): Likewise.
12106         (expand_member_init): Likewise.
12107         (reinit_parse_for_function): Remove.
12108         * decl.c (save_function_data): Don't clear x_base_init_list and
12109         x_member_init_list.
12110         (mark_language_function): Don't mark them.
12111         * init.c (perform_member_init): Tweak comment.
12112         (sort_member_init): Take the list of initializers as an argument.
12113         (sort_base_init): Likewise.
12114         (emit_base_init): Likewise.
12115         (expand_member_init): Return the initializer.  Don't use global
12116         variables.
12117         * lex.c (reinit_parse_for_function): Remove.
12118         * method.c (build_template_parm_names): Correct substitution.
12119         (do_build_copy_constructor): Don't use current_member_init_list
12120         and current_base_init_list.
12121         (synthesize_method): Likewise.
12122         * parse.y (base_init): Split mem-initializers into
12123         base-initializers and field-initializers.
12124         (member_init_list): Build up the list here.
12125         (member_init): Return the initializer.
12126         (fn.depfn): Don't use reinit_parse_for_function.
12127         * parse.c: Regenerated.
12128         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
12129         ERROR_MARK.
12130         (tsubst_expr): Don't use current_member_init_list
12131         and current_base_init_list.
12132         (tsubst_expr_values): Rename to ...
12133         (tsubst_initializer_list): ... this.  Use convert_from_reference.
12134         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
12135         and current_base_init_list.
12136         (begin_function_definition): Don't call reinit_parse_for_function.
12137
12138         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
12139
12140         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
12141         correctly.
12142
12143         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
12144
12145 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
12146
12147         * cp-tree.h (IF_COND): Move to c-common.h.
12148         (THEN_CLAUSE): Likewise.
12149         (ELSE_CLAUSE): Likewise.
12150         (WHILE_COND): Likewise.
12151         (WHILE_BODY): Likewise.
12152         (DO_COND): Likewise.
12153         (DO_BODY): Likewise.
12154         (RETURN_EXPR): Likewise.
12155         (EXPR_STMT_EXPR): Likewise.
12156         (FOR_INIT_STMT): Likewise.
12157         (FOR_COND): Likewise.
12158         (FOR_EXPR): Likewise.
12159         (FOR_BODY): Likewise.
12160         (SWITCH_COND): Likewise.
12161         (SWITCH_BODY): Likewise.
12162         (CASE_LOW): Likewise.
12163         (CASE_HIGH): Likewise.
12164         (GOTO_DESTINATION): Likewise.
12165         (COMPOUND_BODY): Likewise.
12166         (ASM_CV_QUAL): Likewise.
12167         (ASM_STRING): Likewise.
12168         (ASM_OUTPUTS): Likewise.
12169         (ASM_INPUTS): Likewise.
12170         (ASM_CLOBBERS): Likewise.
12171         (DECL_STMT_DECL): Likewise.
12172         (STMT_EXPR_STMT): Likewise.
12173         (LABEL_STMT_LABEL): Likewise.
12174         (SCOPE_BEGIN_P): Likewise.
12175         (SCOPE_END_P): Likewise.
12176         (SCOPE_STMT_BLOCK): Likewise.
12177         (SCOPE_NULLIFIED_P): Likewise.
12178         (SCOPE_NO_CLEANUPS_P): Likewise.
12179         (SCOPE_PARTIAL_P): Likewise.
12180         (ASM_VOLATILE_P): Likewise.
12181         (STMT_LINENO): Likewise.
12182         (STMT_LINENO_FOR_FN_P): Likewise.
12183
12184         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
12185         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
12186         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
12187         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
12188         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
12189
12190         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
12191
12192         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
12193         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
12194
12195         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
12196         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
12197         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
12198
12199 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
12200
12201         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
12202         * class.c (dfs_find_final_overrider): Set it appropriately.
12203         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
12204         avoid unneeded secondary vptrs.
12205
12206 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
12207
12208         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
12209         (check_bitfield_decl, check_field_decl): Likewise.
12210         (build_vtbl_or_vbase_field, build_base_field): Likewise.
12211         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
12212         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
12213         (xfer_tag, finish_enum): Likewise.
12214         * decl2.c (finish_builtin_type): Likewise.
12215         * init.c (init_init_processing): Likewise.
12216         * pt.c (instantiate_class_template): Likewise.
12217         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
12218         * cp-tree.h (struct lang_type): Add user_align member.
12219         (CLASSTYPE_USER_ALIGN): Define.
12220
12221 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
12222
12223         * Make-lang.in (c++.install-common): Install g++-cross in
12224         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
12225         $(target_alias)-g++ and $(target_alias)-c++.
12226
12227 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
12228
12229         * class.c (vcall_offset_data_s): Add last_init and fns.
12230         (overrides): Rename to same_signature_p.
12231         (dfs_find_final_overrider): Adjust accordingly.
12232         (mark_overriders): Likewise.
12233         (warn_hidden): Likewise.
12234         (build_vtbl_initializer): Reorganize machinery for building things
12235         at negative offsets.
12236         (build_vcall_and_vbase_vtbl_entries): Likewise.
12237         (build_vbase_offset_vtbl_entries): Likewise.
12238         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
12239         offset entries.  Do not create two entries for functions with the
12240         same signature.
12241         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
12242         (build_rtti_vtbl_entries): Reorganize machinery for building things
12243         at negative offsets.
12244
12245         * optimize.c (expand_call_inline): Don't recurse into the code
12246         used to initialize the parameters more than once.
12247
12248 2000-06-11  Mark Mitchell <mark@codesourcery.com>
12249
12250         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
12251         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
12252         (find_substitution): Only use the `Sa' substitution for
12253         std::allocator, not instantiations of it.
12254         (write_template_prefix): Move comment.  Only use a TREE_LIST to
12255         represent substitutions for a member template.
12256         (write_array_type): Mangle array dimensions correctly.
12257         * optimize.c (maybe_clone_body): Copy more information from the
12258         cloned function.
12259         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
12260         on the regenerated declaration.
12261
12262 2000-06-11  Chip Salzenberg  <chip@valinux.com>
12263             Mark Mitchell <mark@codesourcery.com>
12264
12265         * class.c (build_vtable): Clarify comment.
12266         (build_ctor_vtbl_group): Pass the most derived type to
12267         build_vtable.
12268
12269 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12270
12271         * decl2.c (compare_options): Don't needlessly cast away const-ness.
12272
12273 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
12274
12275         * decl.c (add_binding): Handle duplicate declarations of external
12276         variables.
12277
12278 2000-06-09  Chip Salzenberg  <chip@valinux.com>
12279             Mark Mitchell <mark@codesourcery.com>
12280
12281         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
12282         argument.
12283         (write_signed_number): New macro.
12284         (write_unsigned_number): Likewise.
12285         (write_source_name): Use them.
12286         (write_number): Handle signed and unsigned values.
12287         (write_integer_cst): Use tree_int_cst_sgn, and use
12288         write_unsigned_number or write_signed_number as appropriate.
12289         (write_discriminator): Use write_unsigned_number or
12290         write_signed_number as appropriate.
12291         (write_template_arg_literal): Likewise.
12292         (write_array_type): Use tree_low_cst.
12293         (write_template_parm):  Use write_unsigned_number or
12294         write_signed_number as appropriate.
12295         (write_substitution): Adjust call to write_number.
12296         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
12297         (write_expression): Handle non-type template arguments of
12298         reference type correctly.
12299         (mangle_thunk): Use write_signed_number.
12300
12301 2000-06-09  Chip Salzenberg  <chip@valinux.com>
12302
12303         * mangle.c (find_substition): Don't mangle objects with typename
12304         substitutions (e.g. "cin" as "Si").
12305
12306 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
12307
12308         * call.c (add_candidate): Use ggc_alloc_cleared.
12309         * decl.c (lookup_label): Likewise.
12310         * lex.c (retrofit_lang_decl): Likewise.
12311
12312 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
12313
12314         * semantics.c (expand_body): Push to TV_EXPAND.
12315         * optimize.c (optimize_function): Push to TV_INTEGRATION.
12316         * decl.c (start_function): Always call announce_function.
12317
12318         * tinfo2.cc: Just declare abort.
12319
12320 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
12321
12322         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
12323         whenever @ is a symbolic name.
12324
12325 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
12326
12327         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
12328
12329 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
12330
12331         * decl.c (pushdecl): Look up functions by DECL_NAME, not
12332         DECL_ASSEMBLER_NAME.
12333
12334 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
12335
12336         * decl2.c (c_language): Define.
12337
12338 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
12339
12340         * lex.c (lang_init_options): Tweak.
12341
12342         * decl2.c: Remove #inclusion of diagnostic.h
12343         (lang_decode_option): Move diagnostic formatting options to
12344         toplevel.
12345
12346         * lang-options.h: Remove documentation for diagnostic options.
12347
12348         * Makefile.in (lex.o): Depends upon diagnostic.h
12349
12350 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
12351
12352         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
12353         the same DECL_RESULT, it's not a redefinition.
12354         * pt.c (tsubst_decl): Remove code to handle illegal
12355         specializations.
12356
12357 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
12358
12359         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
12360
12361 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
12362
12363         * search.c (maybe_suppress_debug_info): Don't check
12364         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
12365
12366         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
12367         here if extern_p.
12368
12369         Remember instantiation context in deferred instantiations.
12370         * cp-tree.h (struct tinst_level): Remove.
12371         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
12372         * pt.c (current_tinst_level): Now a tree.
12373         (print_template_context, push_tinst_level, pop_tinst_level,
12374         tinst_for_decl): Adjust.
12375         (reopen_tinst_level): New fn.
12376         (init_pt): Register current_tinst_level as a root.
12377         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
12378         of the pending templates list.
12379         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
12380         * lex.c (extract_interface_info): Adjust.
12381         * decl2.c (warn_if_unknown_interface): Adjust.
12382
12383 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
12384
12385         * class.c (indirect_primary_base_p): New function.
12386         (determine_primary_base): Use it.
12387
12388 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12389
12390         Update new-abi dynamic cast algorithm.
12391         * tinfo.cc (__class_type_info::__dyncast_result): Add
12392         whole_details. Adjust constructor.
12393         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
12394         Avoid unnecessary searching.
12395         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
12396
12397 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12398
12399         * decl.c (init_decl_processing): Don't call record_component_aliases.
12400         * tree.c (build_cplus_array_type_1): Likewise.
12401
12402 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
12403
12404         * ir.texi: Correct typo.
12405         * mangle.c (write_expression): Handle non-type template arguments
12406         with reference type.
12407         * method.c (build_overload_value): Likewise.
12408         * pt.c (convert_nontype_argument): Explicitly represent conversion
12409         to a reference with an ADDR_EXPR.
12410         (unify): Always unify arguments in left-to-right order.
12411
12412 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
12413             Mark Mitchell  <mark@codesourcery.com>
12414
12415         * Make-lang.in (CXX_SRCS): Add mangle.c.
12416         * Makefile.in (CXX_OBJS): Add mangle.o.
12417         (mangle.o): New rule.
12418
12419         * class.c (local_classes): New variable.
12420         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
12421         (get_vtt_name): Use mangle_vtt_name for new ABI.
12422         (init_class_processing): Initialize local_classes.
12423         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
12424         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
12425         (std_identifier): New macro.
12426         (DECL_VOLATILE_MEMFUNC_P): New macro.
12427         (DECL_NAMESPACE_STD_P): Likewise.
12428         (local_classes): Declare.
12429         (get_mostly_instantiated_function_type): Declare.
12430         (init_mangle): Declare.
12431         (mangle_decl): Likewise.
12432         (mangle_type_string): Likewise.
12433         (mangle_type): Likewise.
12434         (mangle_typeinfo_for_type): Likewise.
12435         (mangle_typeinfo_string_for_type): Likewise.
12436         (mangle_vtbl_for_type): Likewise.
12437         (mangle_vtt_for_type): Likewise.
12438         (mangle_ctor_vtbl_for_type): Likewise.
12439         (mangle_thunk): Likewise.
12440         (mangle_conv_op_name_for_type): Likewise.
12441         (mangle_guard_variable): Likewise.
12442         * decl.c (pushtag): Keep track of local classes.
12443         (initialize_predefined_identifiers): Initialize std_identifier.
12444         (init_decl_processing): Use std_identifier.
12445         (start_decl): Don't treat instantiations as specializations.
12446         (grokdeclarator): Likewise.
12447         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
12448         name for fully-instantiated templates.
12449         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
12450         destructors with the new ABI.
12451         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
12452         (grokfield): Use mangle_type for new ABI.
12453         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
12454         (get_sentry): Use mangle_guard_variable for new ABI.
12455         (start_static_initialization_or_destruction): Likewise.
12456         * expr.c (extract_aggr_init): Remove.
12457         (extract_scalar_init): Likewise.
12458         (extract_init): Remove #if 0'd code.
12459         * mangle.c: New function.
12460         * method.c (build_mangled_name): Assert not flag_new_abi.
12461         (build_static_name): Likewise.
12462         (build_decl_overload_real): Likewise.
12463         (build_typename_overload): Likewise.
12464         (build_overload_with_type): Likewise.
12465         (build_overload_name): Likewise.
12466         (get_ctor_vtbl_name): Likewise.
12467         (start_squangling): Likewise.
12468         (get_id_2): Likewise.
12469         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
12470         (init_method): Call init_mangle for new ABI.
12471         (make_thunk): Call mangle_thunk for new ABI.
12472         * operators.def: Correct new ABI manglings for the `%' operator.
12473         Add `::' operator.
12474         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
12475         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
12476         (lookup_template_class): Call mangle_decl for new ABI.
12477         (get_mostly_instantiated_function_type): New function.
12478         (set_mangled_name_for_template_decl): Use it.
12479         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
12480         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
12481         conversion op names.
12482         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
12483         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
12484         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
12485         mangle_typeinfo_string_for_type.
12486
12487 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
12488
12489         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
12490         (INNERMOST_TEMPLATE_ARGS): New macro.
12491         (innermost_args): Remove.
12492         (get_innermost_template_args): New function.
12493         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
12494         * error.c (dump_function_decl): Be caution when using
12495         most_general_template.
12496         * method.c (build_template_parm_names):  Use
12497         INNERMOST_TEMPLATE_ARGS.
12498         * pt.c (add_to_template_args): Tidy comment
12499         (get_innermost_template_args): New function.
12500         (check_explicit_specialization): Clear DECL_INITIAL for a new
12501         specialization.
12502         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
12503         Tidy.
12504         (push_template_decl): Always register specializations of the most
12505         general template.
12506         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
12507         (coerce_template_parms): Likewise.
12508         (lookup_template_class): Likewise.
12509         (innermost_args): Remove.
12510         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
12511         (tsubst_decl): Handle tricky specializations.  Use
12512         get_innermost_template_args.
12513         (instantiate_template): Simplify handling of partial
12514         instantiations.
12515         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
12516         (most_general_template): Reimplement, in a more straightforward
12517         manner.
12518         (regenerate_decl_from_template): Tweak formatting.  Use
12519         TMPL_ARGS_DEPTH for clarity.
12520         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
12521
12522         * dump.c (dequeue_and_dump): Dump information about thunks.
12523
12524 2000-06-01  Richard Henderson  <rth@cygnus.com>
12525
12526         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
12527
12528 2000-06-01  Richard Henderson  <rth@cygnus.com>
12529
12530         * decl2.c (unsupported_options): Fix typo, make const.
12531         (lang_decode_option): Fix bsearch argument order.
12532
12533 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
12534
12535         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
12536         on FIELD_DECLs.
12537
12538 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12539
12540         * cp-tree.h (c_get_alias_set): Deleted.
12541         * Makefile.in (decl.o): Include ../expr.h.
12542         * decl.c (expr.h): Include.
12543         (init_decl_processing): Call record_component_aliases for arrays.
12544         (grokdeclarator): Likewise.
12545         Set TREE_ADDRESSABLE for fields that aren't bitfields.
12546         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
12547
12548 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
12549
12550         Remove guiding declaration support.
12551         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
12552         (flag_guiding_decls): Remove.
12553         * call.c (build_user_type_conversion_1): Remove support for
12554         guiding decls.
12555         (build_new_function_call): Likewise.
12556         (build_new_op): Likewise.
12557         (build_new_method_call): Likewise.
12558         * decl.c (start_function): Likewise.
12559         * friend.c (is_friend): Likewise.
12560         (do_friend): Likewise.
12561         * decl2.c ((flag_dump_translation_unit): Make it const.
12562         (flag_guiding_decls): Remove.
12563         (unsupported_options): New variable
12564         (compare_options): New function.
12565         (lang_decode_option): Use them.
12566
12567         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
12568
12569         * method.c (mangle_expression): Adjust test for legal expression
12570         operators.
12571
12572         * pt.c (instantiate_decl): Save and restore the local
12573         specializations list.
12574
12575 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
12576
12577         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
12578
12579 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
12580
12581         * call.c (add_template_candidate_real): Handle member template
12582         constructors for classes with virtual bases.
12583         (build_user_type_conversion_1): Use in_charge_arg_for_name.
12584         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
12585
12586         * ir.texi: Update thunk documentation.
12587
12588         * call.c (joust): Fix handling of overloaded builtin operators.
12589
12590 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
12591
12592         * cp-tree.h (DECL_ANTICIPATED): New macro.
12593         Document new use of DECL_LANG_FLAG_7.
12594         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
12595         in the user namespace.
12596         * lex.c (do_identifier): If the identifier's declaration has
12597         DECL_ANTICIPATED on, it has not yet been declared.  But do not
12598         replace it with an ordinary implicit declaration.
12599
12600         * tinfo2.cc: Include stdlib.h.
12601
12602 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
12603
12604         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
12605         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
12606         CLASSTYPE_ALIGN.
12607
12608 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
12609
12610         * decl2.c (lang_decode_option): Use skip_leading_substring instead
12611         of plain strncmp.
12612
12613 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
12614
12615         * operators.def (<?): Duplicated, should have been...
12616         (>?): this.  Fixed.
12617
12618 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
12619             Mark Mitchell  <mark@codesourcery.com>
12620
12621         * cp-tree.h (ansi_opname): Make it a macro.
12622         (ansi_assopname): Likewise.
12623         (struct lang_decl_flags): Add assignment_operator_p.
12624         (struct lang_decl): Add operator_code.
12625         (DECL_VTT_PARM): Adjust.
12626         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
12627         overloaded operator.
12628         (SET_OVERLOADED_OPERATOR_CODE): New macro.
12629         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
12630         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
12631         (opname_tab): Remove.
12632         (assignop_tab): Likewise.
12633         (operator_name_info_t): New type.
12634         (operator_name_info): New variable.
12635         (assignment_operator_name_info): Likewise.
12636         (build_cp_library_fn): Remove declaration.
12637         (push_cp_library_fn): Likewise.
12638         (operator_name_string): Likewise.
12639         (build_decl_overload): Likewise.
12640         * call.c (print_z_candidates): Simplify.
12641         (build_object_call): Adjust usage of ansi_opname.  Use
12642         DECL_OVERLOADED_OPERATOR_P.
12643         (op_error): Adjust operator name lookup.
12644         (build_conditional_expr): Adjust usage of ansi_opname.
12645         (build_new_op): Likewise.
12646         (build_op_delete_call): Likewise.
12647         (build_over_call): Likewise.
12648         (joust): Use DECL_OVERLOADED_OPERATOR_P.
12649         * decl.c (duplicate_decls): Copy operator_code.
12650         (init_decl_processing): Adjust parameters to push_cp_library_fn.
12651         (builtin_function): Adjust parameters to build_library_fn_1.
12652         (build_library_fn_1): Accept an overloaded operator code.
12653         (build_library_fn): Pass ERROR_MARK.
12654         (build_cp_library_fn): Accept an overloaded operator code.
12655         (push_cp_library_fn): Likewise.
12656         (grokfndecl): Tweak.
12657         (grokdeclarator): Simplify code to compute names of overloaded
12658         operators.  Adjust use of ansi_opname.
12659         (ambi_op_p): Work on tree_codes, not identifiers.
12660         (unary_op_p): Likewise.
12661         (grok_op_properties): Likewise.
12662         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
12663         (lang_mark_tree): Don't try to mark the operator_code.
12664         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
12665         * error.c (dump_decl): Remove special handling for operator
12666         names.
12667         (dump_function_name): Likewise.
12668         (dump_expr): Adjust name lookup of operators.
12669         (op_to_string): Simplify.
12670         (assop_to_string): Likewise.
12671         * init.c (build_new_1): Adjust use of ansi_opname.
12672         * lex.c (opname_tab): Remove.
12673         (assignop_tab): Likewise.
12674         (ansi_opname): Likewise.
12675         (ansi_assopname): Likewise.
12676         (operator_name_string): Likewise.
12677         (reinit_lang_specific): Likewise.
12678         (operator_name_info): New variable.
12679         (assignment_operator_name_info): Likewise.
12680         (init_operators): New function.
12681         (init_parse): Use it.
12682         (do_identifier): Adjust use of ansi_opname.
12683         * method.c (mangle_expression): Don't use ansi_opname for
12684         mangling.
12685         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
12686         (build_decl_overload): Remove.
12687         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
12688         (do_build_assign_ref): Adjust use of ansi_opname.
12689         (synthesize_method): Likewise.
12690         (implicitly_declare_fn): Likewise.
12691         * operators.def: New file.
12692         * parse.y (operator): Adjust use of ansi_opname.
12693         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
12694         (set_mangled_name_for_template_decl): Don't play games with
12695         current_namespace.
12696         (special_function_p): Adjust use of ansi_opname.
12697         * typeck.c (check_return_expr): Likewise.
12698         * Make-lang.in (cc1plus): Depend on operators.def.
12699         * Makefile.in (lex.o): Likewise.
12700         (decl.o): Likewise.
12701
12702 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
12703
12704         * Make-lang.in (cplib2.ready): Eradicate.
12705
12706 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12707
12708         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
12709         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
12710         (built_min, cp_tree_equal): Likewise.
12711
12712 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
12713
12714         * class.c (layout_nonempty_base_or_field): Replace
12715         `record_layout_info' with `record_layout_info_s'.
12716
12717 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
12718
12719         Fix goto checking.
12720         * cp-tree.h (struct language_function): x_named_labels is now
12721         a struct named_label_list*.
12722         * decl.c (struct named_label_use_list): Renamed from...
12723         (struct named_label_list): ...this.  New struct.
12724         (push_binding_level): Don't set eh_region.
12725         (note_level_for_eh): New fn.
12726         (pop_label): Take label and old value directly.
12727         (pop_labels): Adjust for new named_labels format.
12728         (lookup_label): Likewise.
12729         (poplevel): Note characteristics of a binding level containing a
12730         named label.  Mess with named label lists earlier.
12731         (mark_named_label_lists): New fn.
12732         (mark_lang_function): Call it.
12733         (use_label): New fn, split out from...
12734         (make_label_decl): ...here.  Don't call it.
12735         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
12736         check_previous_gotos): New fns, split out from...
12737         (define_label): ...here.
12738         (check_switch_goto): New fn.
12739         (define_case_label): Call it.
12740         (check_goto): New fn.
12741         * semantics.c (finish_goto_stmt): Call it and use_label.
12742         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
12743         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
12744
12745 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
12746
12747         * class.c (build_vtable_entry_ref): Correct usage of
12748         get_vtbl_decl_for_binfo.
12749
12750         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
12751         * method.c (implicitly_declare_fn): Not here.
12752
12753 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
12754
12755         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
12756         (CPTI_PTMD_DESC_TYPE): ... here.
12757         (ptmd_desc_type_node): Rename to ...
12758         (ptm_desc_type_node): ... here.
12759         * decl.c: Likewise.
12760         * rtti.c (ptmd_initializer): Rename to ...
12761         (ptm_initializer): ... here.
12762         (sythesize_tinfo_var): Adjust. Deal with pointer to member
12763         function.
12764         (create_tinfo_types): Adjust.
12765
12766 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
12767
12768         Finish implementation of VTTs.
12769         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
12770         CPTI_VTT_PARM_IDENTIFIER.
12771         (vtt_parm_identifier): New macro.
12772         (vtt_parm_type): Likewise.
12773         (BINFO_SUBVTT_INDEX): Likewise.
12774         (BINFO_VPTR_INDEX): Likewise.
12775         (struct lang_decl): Add vtt_parm.
12776         (DECL_VTT_PARM): New macro.
12777         (DECL_USE_VTT_PARM): Likewise.
12778         (DECL_NEEDS_VTT_PARM_P): Likewise.
12779         (get_vtt_name): Declare.
12780         (build_artificial_parm): Likewise.
12781         (fixup_all_virtual_upcast_offsets): Likewise.
12782         (expand_indirect_vtbls_init): Remove.
12783         * call.c (build_new_method_call): Pass the vtt to subobject
12784         constructors and destructors.
12785         * class.c (get_vtt_name): Give it external linkage.
12786         (build_clone): Handle the magic VTT parameters for clones.
12787         (clone_function_decl): Fix typo in comment.
12788         (build_vtt): Keep track of the indices in the VTTs where various
12789         entities are stored.
12790         (build_vtt_inits): Likewise.
12791         (dfs_build_vtt_inits): Likewise.
12792         (build_ctor_vtbl_group): Tweak type of construction vtables.
12793         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
12794         primary bases, when building construction vtables.
12795         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
12796         (initialize_predefined_identifiers): Add vtt_parm_identifier.
12797         (init_decl_processing): Initialize vtt_parm_type.
12798         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
12799         (lang_mark_tree): Make vtt_parm.
12800         * decl2.c (build_artificial_parm): New function.
12801         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
12802         (grokclassfn): Use build_artificial_parm.
12803         * init.c (initialize_vtbl_ptrs): Call
12804         fixup_all_virtual_upcast_offsets directly.
12805         (perform_member_init): Use the complete subobject destructor for
12806         member cleanups.
12807         (build_vtbl_address): New function.
12808         (expand_virtual_init): Handle VTTs.
12809         * optimize (maybe_clone_body): Likewise.
12810         * search.c (fixup_all_virtual_upcast_offsets): Give it external
12811         linkage.
12812         (expand_indirect_vtbls_init): Remove.
12813         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
12814         * tree.c (make_binfo): Make them bigger.
12815
12816 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
12817
12818         * inc/cxxabi.h (__pbase_type_info): Define, based on
12819         __pointer_type_info.
12820         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
12821         (__pointer_to_member_type_info): Likewise.
12822         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
12823         (__pointer_to_member_type_info::__is_pointer_p): Remove.
12824         (__pointer_type_info::__do_catch): Rename to ...
12825         (__pbase_type_info::__do_catch): ... here. Adjust.
12826         (__pbase_type_info::__pointer_catch): Implement.
12827         (__pointer_type_info::__pointer_catch): Adjust.
12828         (__pointer_to_member_type_info::__pointer_catch): Adjust.
12829
12830 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
12831
12832         * tinfo.h (__user_type_info::contained_virtual_p): New
12833         predicate.
12834         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
12835         shaped hierarchy.
12836         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
12837         diamond shaped hierarchy. Add early out for mixed diamond and
12838         duplicate shaped hierarchy.
12839
12840 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
12841
12842         * cp-tree.h (build_delete): Change prototype.
12843         (build_vec_delete): Likewise.
12844         * call.c (build_scoped_method_call): Use special_function_kind
12845         values to indicate the kind of destruction to be done.
12846         (build_method_call): Likewise.
12847         * decl.c (finish_destructor_body): Likewise.
12848         (maybe_build_cleanup_1): Likewise.  Rename to ...
12849         (maybe_build_cleanup): ... this.
12850         * decl2.c (delete_sanity): Use special_function_kind
12851         values to indicate the kind of destruction to be done.
12852         (build_cleanup): Likewise.
12853         * init.c (perform_member_init): Likewise.
12854         (build_vec_delete_1): Likewise.
12855         (build_dtor_call): Simplify.
12856         (build_delete): Use special_function_kind
12857         values to indicate the kind of destruction to be done.
12858         (build_vbase_delete): Likewise.
12859         (build_vec_delete): Likewise.
12860
12861         * init.c (sort_member_init): Fix typo in error message generation
12862         code.
12863
12864 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
12865
12866         * semantics.c (begin_class_definition): make the packed
12867         attribute be sensitive to the "-fpack-struct" command line flag
12868
12869 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
12870
12871         Update new-abi upcast algorithm.
12872         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
12873         prototype and meaning of return value.
12874         (__si_class_type_info::__do_upcast): Likewise.
12875         (__vmi_class_type_info::__do_upcast): Likewise.
12876         * tinfo.cc (__class_type_info::__upcast_result): Replace
12877         whole2dst with part2dst. Adjust ctor.
12878         (__class_type_info::__do_upcast): Adjust call of worker function.
12879         (__class_type_info::__do_upcast): Adjust.
12880         (__si_class_type_info::__do_upcast): Adjust. Use parent's
12881         __do_upcast.
12882         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
12883         virtual base in diamond hierarchy bug.
12884
12885 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
12886
12887         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
12888         and bitfield to tinfo_fn_p.
12889         (DECL_TINFO_FN_P): Adjust.
12890         (SET_DECL_TINFO_FN_P): Likewise.
12891         (DECL_MUTABLE_P): Likewise.
12892         (DECL_C_BIT_FIELD): Likewise.
12893         (SET_DECL_C_BIT_FIELD): Likewise.
12894         (CLEAR_DECL_C_BIT_FIELD): Likewise.
12895         (DECL_UNINLINABLE): Likewise.
12896         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
12897         (handle_using_decl): Remove assertion.
12898         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
12899         to build FIELD_DECLs.
12900         (build_base_field): Likewise.
12901         (layout_class_type): Likewise.
12902         * decl.c (init_decl_processing): Likewise.
12903         (build_ptrmemfunc_type): Likewise.
12904         (grokdeclarator): Likewise.
12905         * decl2.c (grok_x_components): Likewise.
12906         * except.c (call_eh_info): Likewise.
12907         * init.c (init_init_processing): Likewise.
12908         * rtti.c (expand_class_desc): Likewise.
12909         (create_pseudo_type_info): Likewise.
12910         (get_vmi_pseudo_type_info): Likewise.
12911         (create_tinfo_types): Likewise.
12912         * ptree.c (print_lang_decl): Adjust.
12913         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
12914         before checking DECL_MUTABLE_P.
12915
12916         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
12917         parameters for template functions.
12918         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
12919         destructors as well as constructors.
12920
12921 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
12922
12923         * class.c (build_ctor_vtbl_group): Set inits.
12924         * optimize.c (maybe_clone_body): Set DECL_INLINE and
12925         DECL_THIS_INLINE appropriately for clones.
12926
12927         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
12928         (DECL_CONV_FN_P): Simplify.
12929         (DECL_OPERATOR): Remove.
12930         (language_to_string): Declare.
12931         * decl.c (duplicate_decls): Fix typo in comment.
12932         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
12933         (grok_op_properties): Use DECL_CONV_FN_P instead of
12934         IDENTIFIER_TYPENAME_P.
12935         * dump.c (dequeue_and_dump): Dump the language linkage of
12936         declarations.
12937         * error.c (language_to_string): Give it external linkage.
12938         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
12939         (implicitly_declare_fn): Set DECL_LANGUAGE.
12940         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
12941         IDENTIFIER_TYPENAME_P.
12942         (tsubst_decl): Likewise.
12943         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
12944         * semantics.c (finish_member_declaration): Don't mark members of
12945         classes declared in an extern "C" region as extern "C".
12946
12947 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12948
12949         * decl2.c (qualified_lookup_using_namespace): Look through
12950         namespace aliases.
12951
12952         * decl.c (push_using_decl): Return the old decl on namespace level.
12953
12954 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
12955
12956         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
12957         (VTT_NAME_PREFIX): New macro.
12958         (CTOR_VTBL_NAME_PREFIX): Likewise.
12959         (get_ctor_vtbl_name): New function.
12960         * class.c (get_vtable_name): Simplify.
12961         (get_vtt_name): New function.
12962         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
12963         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
12964         when a virtual base becomes primary.
12965         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
12966         VTTs.
12967         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
12968         additional parameters.
12969         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
12970         (initialize_array): New function.
12971         (build_vtt): Likewise.
12972         (build_vtt_inits): Likewise.
12973         (dfs_build_vtt_inits): Likewise.
12974         (dfs_fixup_binfo_vtbls): Likewise.
12975         (build_ctor_vtbl_group): Likewise.
12976         (initialize_vtable): Use initialize_array.
12977         (accumulate_vtbl_inits): Reimplement to handle construction
12978         vtables.
12979         (dfs_accumulate_vtbl_inits): Likewise.
12980         (bulid_vtbl_initializer): Adjust parameter name.
12981         * method.c (build_typename_overload): Remove #if 0'd code.
12982         (get_ctor_vtbl_name): New function.
12983         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
12984         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
12985
12986         * cp-tree.h (struct lang_type): Remove search_slot.
12987         (CLASSTYPE_SEARCH_SLOT): Remove.
12988         (emit_base_init): Change prototype.
12989         (initialize_vtbl_ptrs): Likewise.
12990         (expand_indirect_vtbls_init): Likewise.
12991         (clear_search_slots): Remove.
12992         * decl.c (lang_mark_tree): Don't mark search_slot.
12993         * init.c (initialize_vtbl_ptrs): Simplify.
12994         (emit_base_init): Likewise.
12995         * search.c (struct vbase_info): Document decl_ptr.
12996         (convert_pointer_to_single_level): Remove.
12997         (dfs_find_vbases): Remove.
12998         (dfs_init_base_pointers): Simplify.
12999         (dfs_clear_vbase_slots): Remove.
13000         (dfs_vtable_path_unmark): New function.
13001         (init_vbase_pointers): Simplify.
13002         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
13003         (expand_indirect_vtbls_init): Simplify.  Don't call
13004         mark_all_temps_used.
13005         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
13006         initialize_vtbl_ptrs.
13007
13008 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
13009
13010         * except.c: Add static prototypes.
13011
13012 2000-05-20  H.J. Lu  <hjl@gnu.org>
13013
13014         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
13015
13016 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
13017
13018         Don't create a separate copy of virtual bases for the
13019         CLASSTYPE_VBASECLASSES list.
13020         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
13021         (BINFO_FOR_VBASE): Remove.
13022         (CANONICAL_BINFO): Adjust.
13023         (binfo_for_vbase): New function.
13024         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
13025         instead of BINFO_FOR_VBASE.
13026         (build_vbase_pointer): Likewise.
13027         (build_secondary_vtable): Likewise.
13028         (dfs_mark_primary_bases): Likewise.
13029         (mark_primary_bases): Likewise.
13030         (layout_nonempty_base_or_field): Likewise.
13031         (dfs_set_offset_for_shared_vbases): Likewise.
13032         (dfs_set_offset_for_unshared_vbases): Likewise.
13033         (layout_virtual_bases): Likewise.  Adjust for changes to the
13034         CLASSTYPE_VBASECLASSES list.
13035         (dump_class_hierarchy_r): Use binfo_for_vbase
13036         instead of BINFO_FOR_VBASE.
13037         (dump_class_hierarchy): Likewise.
13038         (finish_vtbls): Likewise.
13039         (build_vtbl_initializer): Adjust for changes to the
13040         CLASSTYPE_VBASECLASSES list.
13041         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
13042         * decl.c (finish_destructor_body): Adjust for changes to the
13043         CLASSTYPE_VBASECLASSES list.
13044         * init.c (sort_base_init): Use binfo_for_vbase.
13045         (construct_virtual_bases): Adjust for changes to the
13046         CLASSTYPE_VBASECLASSES list.
13047         (expand_member_init): Use binfo_for_vbase.
13048         (build_vbase_delete):  Adjust for changes to the
13049         CLASSTYPE_VBASECLASSES list.
13050         * method.c (do_build_copy_constructor): Likewise.
13051         * rtti.c (get_base_offset): Use binfo_for_vbase.
13052         (expand_class_desc): Remove #if 0'd code.
13053         * search.c (struct vbase_info): Remove vbase_types.
13054         (get_base_distance):  Use binfo_for_vbase.
13055         (lookup_field_queue_p): Use CANONICAL_BINFO.
13056         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
13057         (get_pure_virtuals): Adjust for changes to the
13058         CLASSTYPE_VBASECLASSES list.
13059         (dfs_find_vbases): Use binfo_for_vbase.
13060         (dfs_init_vbase_pointers): Likewise.
13061         (init_vbase_pointers): Don't initialize vi.vbase_types.
13062         (virtual_context): Use binfo_for_vbase.
13063         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
13064         CLASSTYPE_VBASECLASSES list.
13065         (expand_indirect_vtbls_init): Simplify.
13066         (dfs_get_vbase_types): Don't replicate virtual bases.
13067         (find_vbase_instance): Use binfo_for_vbase.
13068         (binfo_for_vbase): New function.
13069         * typeck.c (get_delta_difference): Use binfo_for_vbase.
13070
13071 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
13072
13073         * decl2.c (finish_anon_union): Generalize error messages to handle
13074         anonymous structures.
13075         * init.c (perform_member_init): Remove `name' parameter.
13076         (build_field_list): New function.
13077         (sort_member_init): Handle anonymous union initialization order
13078         correctly.  Check for multiple initializations of the same union.
13079         (emit_base_init): Don't look up fields by name here.
13080         (expand_member_init): Record the result of name lookup for future
13081         reference.
13082         * typeck.c (build_component_ref): Fix formatting.
13083
13084 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
13085
13086         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
13087         * typeck.c (build_x_compound_expr): Replace warn_unused with
13088         warn_unused_value.
13089
13090         * decl2.c (lang_decode_option): Update -Wall unused flags by
13091         calling set_Wunused.
13092
13093 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
13094
13095         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
13096         * init.c (dfs_vtable_path_unmark): Remove.
13097         * search.c (marked_new_vtable_p): Likewise.
13098         (unmarked_new_vtable_p): Likewise.
13099         (dfs_search_slot_nonempty_p): Likewise.
13100         (dfs_mark): Likewise.
13101         (dfs_vtable_path_unmark): Likewise.
13102         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
13103         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
13104         (dfs_init_vbase_pointers): Remove special-case new ABI code.
13105         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
13106         (init_vbase_pointers): Simplify.
13107         (expand_indirect_vtbls_init): Likewise.
13108
13109         * class.c (copy_virtuals): New function.
13110         (build_primary_table): Use it.
13111         (build_secondary_vtable): Likewise.
13112         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
13113         indicate that no vcall offset is required.
13114         (add_virtual_function): Likewise.
13115         (modify_all_vtables): Likewise.
13116         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
13117         (dfs_accumulate_vtbl_inits): Likewise.
13118         (build_vtbl_initializer): Make changes to handle construction
13119         vtables.
13120         (dfs_build_vcall_offset_vtbl_entries): Likewise.
13121         (build_rtti_vtbl_entries): Likewise.
13122         (build_vtable_entries): Handle a NULL vcall_index.
13123
13124 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
13125
13126         * decl2.c (lang_decode_option): Fix thinko.
13127
13128 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
13129
13130         * except.c (check_handlers): New fn.
13131         * cp-tree.h: Declare it.
13132         * semantics.c (finish_handler_sequence): Call it.
13133         (finish_function_handler_sequence): Likewise.
13134         (finish_handler_parms): Set TREE_TYPE on the handler.
13135         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
13136         * search.c (get_base_distance_recursive): If protect>1, ignore
13137         special access.
13138         (get_base_distance): Don't reduce watch_access.
13139
13140 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
13141
13142         * lex.c: #include diagnostic.h.
13143         (lang_init_options): Set default prefixing rules.
13144
13145         * lang-options.h: Add -fdiagnostics-show-location=.
13146
13147         * decl2.c: #include diagnostic.h.
13148         (lang_decode_option): Handle -fdiagnostics-show-location=.
13149
13150 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
13151
13152         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
13153         * vec.cc: Revert my 2000-05-07 change.
13154
13155 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
13156
13157         * class.c (check_field_decls): Complain about non-static data
13158         members with same name as class in class with constructor.
13159
13160 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
13161
13162         * decl.c (grokdeclarator): Allow non-static data members with
13163         same name as class.
13164
13165 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
13166
13167         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
13168         and pending_inline.filename.  Update prototypes.
13169         * decl.c (define_label): Constify filename parameter.
13170         * decl2.c (warn_if_unknown_interface): Constify local char *.
13171         * input.c Constify input_source.filename. Don't declare
13172         input_filename or lineno.  Constify filename parameter to feed_input.
13173         * lex.c (init_parse): Constify parameter and return value.
13174         (cp_pragma_interface, cp_pragma_implementation): Constify
13175         filename argument.
13176         (reinit_parse_for_method, reinit_parse_for_block,
13177         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
13178         Constify local char *.
13179         * pt.c: Don't declare lineno or input_filename.
13180         (print_template_context, tsubst_friend_function, tsubst_decl,
13181         tsubst, instantiate_decl): Constify local char *.
13182         * semantics.c (expand_body): Constify local char *.
13183         * tree.c (build_srcloc): Constify filename parameter.
13184         * typeck.c (c_expand_asm_operands): Constify filename
13185         parameter.
13186
13187 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
13188
13189         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
13190         offsetof expansion.
13191
13192 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
13193
13194         * inc/cxxabi.h:  Fix typos in comment.
13195         (__base_class_info::__offset): Use a static_cast.
13196
13197 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
13198
13199         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
13200         of std::size_t and std::ptrdiff_t respectively.
13201         * tinfo.cc: Likewise.
13202         * vec.cc: Likewise.
13203
13204 2000-05-06  Richard Henderson  <rth@cygnus.com>
13205
13206         * typeck.c (build_c_cast): Don't warn integer->pointer size
13207         mismatch for constants.
13208
13209 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
13210
13211         * rtti.c (ptmd_initializer): Set non-public, if class is
13212         incomplete.
13213
13214         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
13215         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
13216         __cxa_vec_delete): Likewise.
13217         * tinfo.cc (__dynamic_cast): Likewise.
13218         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
13219         __cxa_vec_delete): Likewise.
13220
13221 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
13222
13223         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
13224         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
13225         (lang_decl_flags): Add vcall_offset.
13226         (THUNK_VCALL_OFFSET): Use it.
13227         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
13228         * method.c (make_thunk): Create the lang_decl here, not in
13229         emit_thunk.
13230         (emit_thunk): Make generic thunks into ordinary functions once
13231         they have been fed to expand_body.
13232         * semantics.c (expand_body): Set current_function_is_thunk here.
13233
13234 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13235
13236         * class.c (update_vtable_entry_for_fn): Prototype.
13237
13238         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
13239         and `tmpl'.
13240
13241         * search.c (dfs_build_inheritance_graph_order): Prototype.
13242
13243 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
13244
13245         * cp-tree.h (special_function_kind): Add various kinds of
13246         destructors.
13247         (special_function_p): New function.
13248         * class.c (overrides): Don't let one kind of destructor override
13249         another.
13250         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
13251         whether or not to instantiate a template.
13252         * tree.c (special_function_p): Define.
13253
13254 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
13255
13256         * cp-tree.def (THUNK_DECL): Remove.
13257         * cp-tree.h (DECL_THUNK_P): New macro.
13258         (DECL_NON_THUNK_FUNCTION_P): Likewise.
13259         (DECL_EXTERN_C_FUNCTION_P): Likewise.
13260         (SET_DECL_THUNK_P): Likewise.
13261         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
13262         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
13263         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
13264         * decl.c (decls_match): Use DECL_EXTERN_C_P.
13265         (duplicate_decls): Likewise.
13266         (pushdecl): Likewise.  Adjust thunk handling.
13267         (grokfndecl): Use DECL_EXTERN_C_P.
13268         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
13269         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
13270         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
13271         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
13272         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
13273         DECL_NO_STATIC_CHAIN.
13274         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
13275         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
13276         * search.c (covariant_return_p): Remove THUNK_DECL handling.
13277         * ir.texi: Update.
13278
13279 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
13280
13281         * tree.c (walk_tree): Set lineno.
13282
13283 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
13284
13285         * exception.cc: Update license notice.
13286         * new.cc: Likewise.
13287         * new1.cc: Likewise.
13288         * new2.cc: Likewise.
13289         * tinfo.cc: Likewise.
13290         * tinfo2.cc: Likewise.
13291         * vec.cc: Likewise.
13292         * inc/cxxabi.h: Likewise.
13293         * inc/exception: Likewise.
13294         * inc/new: Likewise.
13295         * inc/new.h: Likewise.
13296         * inc/typeinfo: Likewise.
13297
13298 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
13299
13300         * tree.c (build_target_expr_with_type): If we already have a
13301         TARGET_EXPR, just return it.
13302
13303         * optimize.c (initialize_inlined_parameters): Don't generate an
13304         EXPR_STMT if we can just use DECL_INITIAL.
13305         * decl.c (emit_local_var): Only make the initialization a
13306         full-expression if stmts_are_full_exprs_p.
13307
13308 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
13309
13310         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
13311         macro.
13312         * call.c (standard_conversion): Use it.
13313         (direct_reference_binding): Likewise.
13314         (build_over_call): Likewise.
13315         (is_properly_derived_from): Likewise.
13316         (compare_ics): Likewise.
13317         * class.c (resolves_to_fixed_type_p): Likewise.
13318         * optimize.c (declare_return_variable): Likewise.
13319         * pt.c (is_specialization_of): Likewise.
13320         (unify): Likewise.
13321         * typeck.c (comp_target_parms): Likeiwse.
13322         (build_static_cast): Likewise.
13323         (build_reinterpret_cast): Likewise.
13324         (build_const_cast): Likewise.
13325         (comp_ptr_ttypes_real): Likewise.
13326         (comp_ptr_ttypes_const): Likewise.
13327         * typeck2.c (process_init_constructor): Likewise.
13328
13329 2000-04-30  Scott Snyder <snyder@fnal.gov>
13330
13331         * decl.c (finish_destructor_body): Use the base destructor when
13332         destroying virtual bases.
13333
13334 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
13335
13336         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
13337         STMT_EXPRs.
13338         * optimize.c (struct inline_data): Add target_exprs field.
13339         (declare_return_variable): When a function returns an aggregate,
13340         use the variable declared in the TARGET_EXPR as the remapped
13341         DECL_RESULT.
13342         (expand_call_inline): Update the pending target_exprs stack.
13343         (optimize_function): Initialize the stack.
13344
13345         * decl2.c (finish_file): Fix typo in comment.
13346
13347         * method.c (emit_thunk): Don't try to return a `void' value.
13348
13349         * optimize.c (initialize_inlined_parameters): If the parameter is
13350         addressable, we need to make a new VAR_DECL, even if the
13351         initializer is constant.
13352
13353 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
13354
13355         * decl.c (grok_op_properties): Add an extra check of argtypes.
13356
13357 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
13358
13359         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
13360         variables.
13361         (initialize_inlined_parameters): Try to avoid creating new
13362         VAR_DECLs.
13363
13364 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
13365
13366         * lex.c (my_get_run_time): Remove.
13367         (init_filename_times): Use get_run_time instead of my_get_run_time.
13368         (check_newline): Likewise.
13369         (dump_time_statistics): Likewise.
13370         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
13371         of computing elapsed time explicitly.
13372
13373 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
13374
13375         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
13376         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
13377         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
13378         before calling decl_constant_value.
13379         * class.c (check_bitfield_decl): Likewise.
13380         * cvt.c (ocp_convert): Likewise.
13381         (convert): Likewise.
13382         * decl.c (compute_array_index_type): Likewise.
13383         (build_enumerator): Likewise.
13384         * decl2.c (check_cp_case_value): Likewise.
13385         * pt.c (convert_nontype_argument): Likewise.
13386         (tsubst): Likewise.
13387         * typeck.c (decay_conversion): Likewise.
13388         (build_compound_expr): Likewise.
13389         (build_reinterpret_cast): Likewise.
13390         (build_c_cast): Likewise.
13391         (convert_for_assignment): Likewise.
13392
13393 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
13394
13395         * decl.c (finish_function): Don't play games with DECL_INLINE.
13396
13397 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
13398
13399         * ir.texi: Correct typo.
13400
13401 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13402
13403         * decl.c (grokdeclarator): Reject VLAs as members.
13404
13405 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
13406
13407         * call.c (standard_conversion): Accept conversion between
13408         COMPLEX_TYPEs.
13409
13410         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
13411
13412 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
13413
13414         * decl2.c (finish_file): Remove double setup for accounting
13415         compile time.
13416
13417 2000-04-24  Robert Lipe <robertlipe@usa.net>
13418
13419         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
13420
13421 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
13422
13423         * new.cc (set_new_handler): Needs to be in std::.
13424
13425 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
13426
13427         * cp-tree.h (lang_decl): Remove pretty_function_p.
13428         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
13429         language-specific node.
13430         * decl.c (cp_make_fname_decl): Use build_decl, not
13431         build_lang_decl, to build the variables.
13432         (grokvardecl): Don't call build_lang_decl for local variables in
13433         templates.
13434         (grokdeclarator): Don't call build_lang_decl for local type
13435         declarations in templates.
13436         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
13437         zero'd memory, rather than calling memset.
13438         * pt.c: Include hashtab.h.
13439         (local_specializations): New variable.
13440         (retrieve_local_specialization): Use it.
13441         (register_local_specialization): Likewise.
13442         (tsubst_decl): Don't assume local variables have
13443         DECL_LANG_SPECIFIC.
13444         (instantiate_decl): Set up local_specializations.
13445         * Makefile.in (HTAB_H): New variable.
13446
13447 2000-04-23  Richard Henderson  <rth@cygnus.com>
13448
13449         * typeck.c (c_expand_asm_operands): Restore the original
13450         contents of the output list.
13451
13452 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
13453
13454         * ir.texi:  Document complex number representation.
13455
13456 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
13457
13458         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
13459         (target_incomplete_p): New function.
13460         (tinfo_base_init): Create comdat NTBS name variable.
13461         (ptr_initializer): Add non_public parameter. Calculate it.
13462         (ptmd_initializer): Likewise.
13463         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
13464         (create_real_tinfo_var): Add non_public parameter. Use it.
13465         Push proxy into global namespace.
13466         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
13467         New enumeration.
13468         * inc/typeinfo (type_info::before, type_info::operator==):
13469         Compare __name addresses.
13470
13471         * tinfo2.cc: Remove new-abi builtins comment.
13472
13473 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
13474
13475         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
13476
13477         * call.c (joust): Exit early if we get the same function, too.
13478
13479         * decl2.c (key_method): Return NULL_TREE for template classes.
13480         (import_export_class): Don't need to check for template classes.
13481
13482 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
13483
13484         * lex.c: Remove references to cccp.c.
13485
13486 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
13487
13488         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
13489         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
13490         (DECL_DESTRUCTOR_P): Use destructor_attr.
13491         (DECL_CONST_MEMFUNC_P): Reimplement.
13492         (DECL_VOLATILE_MEMFUNC_P): Remove.
13493         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
13494         (overrides): Use DECL_DESTRUCTOR_P.
13495         (check_for_override): Likewise.
13496         * decl.c (start_function): Likewise.
13497         * decl2.c (grokfclassfn): Likewise.
13498         (check_classfn): Likewise.
13499         (grok_function_init): Likewise.
13500
13501 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
13502
13503         * decl2.c (grokfield): Issue error on illegal data member
13504         declaration.
13505
13506 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
13507
13508         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
13509
13510 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
13511
13512         * class.c (build_vtable_entry): Don't build thunks for type-info
13513         functions.
13514
13515 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
13516
13517         * decl.c (decls_match): Allow a redeclaration of a builtin to
13518         specify args while the builtin did not.
13519
13520 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
13521
13522         * cp-tree.def (THUNK_DECL): Add to documentation.
13523         * cp-tree.h (flag_huge_objects): Declare.
13524         * class.c (modify_vtable_entry): Tidy.
13525         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
13526         Calculate delta appropriately for the new ABI.
13527         (dfs_modify_vtables): Use it.
13528         (modify_all_vtables): Fix thinko in code to add overriding copies
13529         of functions to primary vtables.
13530         (build_clone): Fix typo in comment.
13531         (clone_function_decl): Correct order of destructors in vtable.
13532         (build_vbase_offset_vtbl_entries): Adjust comment.
13533         (dfs_vcall_offset_queue_p): Remove.
13534         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
13535         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
13536         (build_vtable_entry): Correct check for pure virtual functions.
13537         Don't declare flag_huge_objects.
13538         * decl.c (flag_huge_objects): Remove declaration.
13539         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
13540         Use int_size_in_bytes.
13541         (emit_thunk): Handle vcall offset thunks.
13542
13543 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13544
13545         * decl2.c (parse_time, varconst_time): Delete declarations.
13546         (finish_file): Delete LINENO declaration.
13547         START_TIME and THIS_TIME now long.
13548
13549 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
13550
13551         * class.c (build_base_field): Reformat comment.
13552
13553         * inc/cxxabi.h (stddef.h): Comment inclusion.
13554         (__base_class_info::__offset): Comment shift.
13555
13556 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
13557
13558         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
13559         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
13560         (cp_push_exception_identifier): New macro.
13561         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
13562         (DECL_BASE_DESTRUCTOR_P): Likewise.
13563         (DECL_DELETING_DESTRUCTOR_P): Likewise.
13564         (get_vtbl_decl_for_binfo): Fix formatting.
13565         (in_charge_arg_for_name): New macro.
13566         (maybe_build_cleanup_and_delete): Remove declaration.
13567         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
13568         (in_charge_arg_for_name): New function.
13569         (build_new_method_call): Use it.  Handle cloned destructors.
13570         (build_clone): Don't make the base constructor virtual.
13571         Automatically defer generated functions.
13572         (clone_function_decl): Handle destructors, too.
13573         (clone_constructors_and_destructors): Likewise.
13574         (create_vtable_ptr): Don't create a vtable entry for a cloned
13575         function.
13576         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
13577         (initialize_predefined_identifiers): Update appropriately.
13578         (finish_destructor_body): Simplify.
13579         (maybe_build_cleanup_and_delete): Remove.
13580         * except.c (expand_throw): Handle new-ABI destructors.
13581         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
13582         (build_dtor_call): New function.
13583         (build_delete): Use it.  Simplify.
13584         * optimize.c (maybe_clone_body): Handle destructors.
13585         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
13586
13587         * exception.cc (cleanup_fn): New typedef.
13588         (CALL_CLEANUP): New macro.
13589         (cp_eh_info): Use them.
13590         (__cp_push_exception): Likewise.
13591         (__cp_pop_exception): Likewise.
13592
13593 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
13594
13595         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
13596         (complete_dtor_identifier): New macro.
13597         (CLASSTYPE_FIRST_CONVERSION): Remove.
13598         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
13599         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
13600         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
13601         (CLASSTYPE_CONSTRUCTORS): Likewise.
13602         (CLASSTYPE_DESTRUCTORS): Likewise.
13603         (lang_decl): Add cloned_function.
13604         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
13605         (DECL_BASE_CONSTRUCTOR_P): Likewise.
13606         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
13607         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
13608         (DECL_CLONED_FUNCTION_P): Likewise.
13609         (DECL_CLONED_FUNCTION): Likewise.
13610         (clone_function_decl): Declare.
13611         (maybe_clone_body): Likewise.
13612         * call.c (build_user_type_conversion_1): Call complete object
13613         constructors in the new ABI.
13614         (build_new_method_call): Don't add in-charge parameters under the
13615         new ABI.
13616         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
13617         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
13618         CLASSTYPE_DESTRUCTOR_SLOT.
13619         (build_clone): New function.
13620         (clone_function_decl): Likewise.
13621         (clone_constructors_and_destructors): Likewise.
13622         (check_bases_and_members): Use it.
13623         * decl.c (iniitialize_predefined_identifiers): Initialize
13624         complete_dtor_identifier.
13625         (finish_function): Don't add extra code to a clone.
13626         (lang_mark_tree): Mark cloned_function.
13627         * decl2.c (mark_used): Don't bother trying to instantiate things
13628         we synthesized.
13629         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
13630         * method.c (set_mangled_name_for_decl): Don't treat clones as
13631         constructors.
13632         (synthesize_method): Sythesize cloned functions, not the clones.
13633         * optimize.c (inline_data): Update comment on ret_label.
13634         (remap_block): Don't assume DECL_INITIAL exists.
13635         (copy_body_r): Allow ret_label to be NULL.
13636         (maybe_clone_body): Define.
13637         * pt.c (tsubst_decl): Handle clones.
13638         (instantiate_clone): New function.
13639         (instantiate_template): Use it.
13640         (set_mangled_name_for_template_decl): Don't treat clones as
13641         constructors.
13642         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
13643         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
13644         * semantics.c (expand_body): Clone function bodies as necessary.
13645
13646         * optimize.c (remap_decl): Avoid sharing structure for arrays
13647         whose size is only known at run-time.
13648         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
13649
13650         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
13651         to has_in_charge_parm_p.
13652         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
13653         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
13654         (DECL_COPY_CONSTRUCTOR_P): New macro.
13655         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
13656         (build_user_type_conversion_1): Likewise.
13657         (convert_like_real): Likewise.
13658         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
13659         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
13660         (copy_args_p): Likewise.
13661         (grok_ctor_properties): Likewise.
13662         (start_function): Likewise.
13663         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
13664         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
13665         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
13666         * method.c (do_build_copy_constructor): Use
13667         DECL_HAS_IN_CHARGE_PARM_P.
13668         (synthesize_method): Likewise.
13669         * pt.c (instantiate_template): Remove goto.
13670         * tree.c (build_cplus_method_type): Remove mention of obstacks in
13671         comment.
13672
13673         * cp-tre.h (finish_function): Change prototype.
13674         * decl.c (end_cleanup_fn): Adjust caller.
13675         (finish_function): Take only one parameter.
13676         * decl2.c (finish_objects): Adjust caller.
13677         (finish_static_storage_duration_function): Likewise.
13678         * method.c (emit_thunk): Likewise.
13679         * parse.y: Likewise.
13680         * parse.c: Regenerated.
13681         * pt.c (instantiate_decl): Likewise.
13682         * rtti.c (synthesize_tinfo_fn): Likewise.
13683         * semantics.c (expand_body): Likewise.
13684
13685         * cp-tree.h (copy_decl): New function.
13686         * class.c (finish_struct_1): Use it.
13687         * lex.c (copy_decl): Define it.
13688         * pt.c (tsubst_decl): Likewise.
13689         * tree.c (copy_template_template_parm): Likewise.
13690
13691         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
13692         has_nonpublic_assign_ref.
13693         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
13694         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
13695         * class.c (finish_struct_methods): Don't set
13696         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
13697         (interface_only): Don't declare.
13698         (interface_unknown): Likewise.
13699
13700 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13701
13702         * tree.h (HAVE_TEMPLATES): Remove definition.
13703         * lang-options.h (-fthis-is-variable): Remove documentation.
13704
13705 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
13706
13707         * class.c (instantiate_type): Handle object-relative template-id.
13708
13709         * semantics.c (finish_expr_stmt): Call convert_to_void here.
13710         * decl.c (cplus_expand_expr_stmt): Not here.
13711
13712         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
13713         Initialize exprtype earlier.
13714
13715         * parse.y (fn.def1): Check for defining types in return types.
13716
13717         * decl.c (check_tag_decl): Notice extra fundamental types.
13718         Diagnose empty decls in classes, too.
13719
13720         * decl.c (grokdeclarator): Don't override an anonymous name if no
13721         declarator was given.
13722
13723         * cvt.c (convert_to_void): Call resolve_offset_ref.
13724
13725         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
13726
13727         * decl2.c (decl_namespace): Handle getting a type.
13728
13729         * typeck.c (build_c_cast): Re-enable warning for cast between
13730         pointer and integer of different size.
13731
13732 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
13733
13734         * inc/cxxabi.h (__pointer_type_info): Add restrict and
13735         incomplete flags.
13736         (__pointer_type_info::__pointer_catch): New virtual function.
13737         (__pointer_to_member_type_info): Derive from
13738         __pointer_type_info. Adjust.
13739         (__pointer_to_member_type_info::__do_catch): Remove.
13740         (__pointer_to_member_type_info::__is_pointer_p): Declare.
13741         (__pointer_to_member_type_info::__pointer_catch): Declare.
13742         * rtti.c (qualifier_flags): Add restrict flag.
13743         (ptmd_initializer): Reorder members.
13744         (create_tinfo_types): Expand comments. Reorder
13745         ptmd_desc_type_node members.
13746         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
13747         Implement.
13748         (__pointer_type_info::__do_catch): Move specific code into
13749         __pointer_catch. Call it.
13750         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
13751         specific catch checking. Fix void conversion check.
13752         (__pointer_to_member_type_info::__do_catch): Remove.
13753         (__pointer_to_member_type_info::__pointer_catch): Implement.
13754
13755 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13756
13757         * lex.c (init_parse): Remove traces of classof and headof.
13758         * decl2.c (flag_operator_names): Default to 1.
13759         (lang_decode_option): Do not set it for -ansi.
13760
13761 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
13762
13763         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
13764         (DECL_MAIN_VARIANT): Remove.
13765         * decl.c (duplicate_decls): Don't set it.
13766         (start_function): Likewise.
13767         (lang_mark_tree): Don't mark it.
13768         * decl2.c (defer_fn): Don't use it.
13769         * lex.c (retrofit_lang_decl): Don't set it.
13770         * pt.c (tsubst_decl): Likewise.
13771         * ptree.c (print_lang_decl): Don't print it.
13772         * typeck.c (mark_addressable): Don't use it.
13773
13774 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
13775
13776         * vec.cc: Include <new> and <exception>.
13777         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
13778         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
13779         terminate.
13780         (__cxa_vec_delete): Catch dtor exceptions.
13781
13782 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
13783
13784         Prepend __ to implementation defined names.
13785         * inc/typeinfo (type_info): Rename _name to __name.
13786         (type_info::type_info): Rename parameter.
13787         (type_info::operator==, type_info::operator!=,
13788         type_info::before): Likewise.
13789         (type_info::is_pointer_p, type_info::is_function_p,
13790         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
13791         parameters.
13792         * inc/cxxabi.h
13793         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
13794         (__pointer_type_info::__pointer_type_info): Likewise.
13795         (__pointer_type_info::is_pointer_p,
13796         __pointer_type_info::do_catch): Prepend __. Rename parameters.
13797         (__array_type_info::__array_type_info): Rename parameters.
13798         (__function_type_info::__function_type_info): Likewise.
13799         (__function_type_info::is_function_p): Prepend __.
13800         (__enum_type_info::__enum_type_info): Rename parameters.
13801         (__pointer_to_member_type_info::__pointer_to_member_type_info):
13802         Likewise.
13803         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
13804         parameters.
13805         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
13806         (__class_type_info::__class_type_info): Rename parameters.
13807         (__class_type_info::sub_kind): Prepend __. Adjust member names.
13808         (__class_type_info::upcast_result,
13809         __class_type_info::dyncast_result): Prepend __. Move definition
13810         into tinfo.cc.
13811         (__class_type_info::do_upcast, __class_type_info::do_catch,
13812         __class_type_info::find_public_src,
13813         __class_type_info::do_dyncast,
13814         __class_type_info::do_find_public_src): Prepend __. Rename
13815         parameters.
13816         (__si_class_type_info::__si_class_type_info): Rename parameters.
13817         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
13818         __si_class_type_info::do_find_public_src): Prepent __. Rename
13819         parameters.
13820         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
13821         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
13822         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
13823         parameters.
13824         (__dynamic_cast): Rename parameters.
13825         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
13826         type_info::do_catch, type_info::do_upcast): Prepend __.
13827         (contained_p, public_p, virtual_p, contained_public_p,
13828         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
13829         (__class_type_info::do_catch,
13830         __class_type_info::do_upcast): Prepend __. Adjust.
13831         (__class_type_info::__upcast_result,
13832         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
13833         Adjust.
13834         (__class_type_info::find_public_src): Prepend __. Adjust.
13835         (__class_type_info::do_find_public_src,
13836         __si_class_type_info::do_find_public_src,
13837         __vmi_class_type_info::do_find_public_src): Likewise.
13838         (__class_type_info::do_dyncast,
13839         __si_class_type_info::do_dyncast,
13840         __vmi_class_type_info::do_dyncast): Likewise.
13841         (__class_type_info::do_upcast,
13842         __si_class_type_info::do_upcast,
13843         __vmi_class_type_info::do_upcast): Likewise.
13844         (__dynamic_cast): Adjust.
13845         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
13846         (__function_type_info::is_function_p): Likewise.
13847         (__pointer_type_info::do_catch): Likewise. Adjust.
13848         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
13849         (__throw_type_match_rtti_2): Adjust.
13850         (__is_pointer): Adjust.
13851
13852 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
13853
13854         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
13855         (complete_ctor_identifier): New macro.
13856         (special_function_kind): Add sfk_copy_constructor and
13857         sfk_assignment_operator.
13858         (LOOKUP_HAS_IN_CHARGE): Remove.
13859         (cons_up_default_function): Rename to ...
13860         (implicitly_declare_fn): ... this.
13861         * call.c (build_new_method_call): Add in-charge parameters for
13862         constructors here.
13863         * class.c (add_implicitly_declared_members): Change parameter name
13864         from cant_have_assignment to cant_have_const_assignment.
13865         Replace calls to cons_up_default_function to implicitly_declare_fn.
13866         * cvt.c (ocp_convert): Use complete_ctor_identifier.
13867         * decl.c (initialize_predefined_identifiers): Initialize it.
13868         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
13869         complex expression.
13870         * init.c (expand_default_init): Don't calculate the in-charge
13871         parameter here.
13872         (build_new_1): Likewise.
13873         * lex.c (cons_up_default_function): Move to method.c.
13874         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
13875         (implicitly_declare_fn): New function.
13876         * typeck.c (build_static_cast): Use complete_ctor_identifier.
13877         (build_modify_expr): Likewise.
13878         * typeck2.c (build_functional_cast): Likewise.
13879
13880         Under the new ABI, constructors don't return `this'.
13881         * cp-tree.h (warn_reorder): Declare.
13882         (special_function_kind): New enum.
13883         (global_base_init_list): Remove declaration.
13884         (emit_base_init): Don't return a value.
13885         (check_base_init): Don't declare.
13886         (is_aggr_typedef): Likewise.
13887         * decl.c (check_special_function_return_type): New function.
13888         (return_types): Remove.
13889         (grokdeclarator): Use check_special_function_return_type.
13890         (start_function): Don't initialize ctor_label under the new ABI.
13891         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
13892         * init.c (begin_init_stmts): Move to top of file.
13893         (finish_init_stmts): Likewise.
13894         (warn_reorder): Don't declare.
13895         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
13896         value.
13897         (check_base_init): Remove.
13898         (is_aggr_typedef): Likewise.
13899         (build_new_1): Don't use the return value of a constructor.
13900         * semantics.c (setup_vtbl_ptr): Don't use the return value
13901         of emit_base_init.
13902         * typeck.c (check_return_expr): Don't magically convert return
13903         statements into `return this' in constructors under the new ABI.
13904
13905         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
13906         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
13907         (base_ctor_identifier): New macro.
13908         (base_dtor_identifier): Likewise.
13909         (deleting_dtor_identifier): Likewise.
13910         * decl.c: Don't include obstack.h.
13911         (obstack_chunk_alloc): Don't define.
13912         (obstack_chunk_free): Likewise.
13913         (struct predefined_identifier): New type.
13914         (initialize_predefined_identifiers): New function.
13915         (init_decl_processing): Use it.
13916         (debug_temp_inits): Remove.
13917         (start_method): Don't call preserve_data.
13918         (hack_incomplete_structures): Update comment.
13919         * init.c (init_init_processing): Don't initialize
13920         nelts_identifier.
13921         (build_offset_rf): Remove dead code.
13922         (build_delete): Use CLASSTYPE_N_BASECLASSES.
13923         * search.c (init_search_processing): Don't initialize
13924         vptr_identifier.
13925
13926 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13927
13928         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
13929         some sign_compare warnings.
13930
13931 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
13932
13933         Rename abi::__vmi_class_type_info members.
13934         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
13935         base_list, detail_masks members to vmi_flags, vmi_base_count,
13936         vmi_bases and vmi_flags_masks respectively.
13937         (__vmi_class_type_info::vmi_flags_masks): Rename
13938         details_unknown_mask to flags_unknown_mask.
13939         * tinfo.cc (__class_type_info::do_upcast): Adjust.
13940         (__vmi_class_type_info::do_find_public_src): Adjust.
13941         (__vmi_class_type_info::do_dyncast): Adjust.
13942         (__vmi_class_type_info::do_upcast): Adjust.
13943
13944 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
13945
13946         * tinfo.cc (convert_to_base): New function.
13947         (get_vbase_offset): Remove. Move into convert_to_base.
13948         (__vmi_class_type_info::do_find_public_src): Adjust.
13949         (__vmi_class_type_info::do_dyncast): Adjust.
13950         (__vmi_class_type_info::do_upcast): Adjust.
13951
13952 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
13953
13954         * tinfo.cc (operator=): Use __builtin_strcmp.
13955         * tinfo2.cc (before): Likewise.
13956
13957 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
13958
13959         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
13960         (DECL_SAVED_INLINE): Rename to ...
13961         (DECL_DEFERRED_FN): ... this.
13962         (in_function_p): Remove declaration.
13963         (mark_inline_for_output): Rename to ...
13964         (defer_fn): ... this.
13965         * decl.c (finish_function): Adjust call to mark_inline_for_output.
13966         (in_function_p): Remove definition.
13967         * decl2.c (saved_inlines): Rename to ...
13968         (deferred_fns): ... this.
13969         (saved_inlines_used): Rename to ...
13970         (deferred_fns_used): ... this.
13971         (mark_inline_for_output): Rename to ...
13972         (defer_fn): ... this.
13973         (finish_file): Adjust accordingly.
13974         (init_decl2): Likewise.
13975         * lex.c (cons_up_default_function): Likewise.
13976         * pt.c (mark_decl_instantiated): Likewise.
13977         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
13978         circumstances.
13979         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
13980         * semantics.c (expand_body): Defer more functions.
13981
13982 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
13983
13984         * vec.cc: New file.
13985         * Make-lang.in (CXX_LIB2FUNCS): Add it.
13986         (vec.o): Build it.
13987         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
13988         __cxa_vec_delete): Declare.
13989
13990 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
13991
13992         * rtti.c (dfs_class_hint_mark): New static function.
13993         (dfs_class_hint_unmark): New static function.
13994         (class_hint_flags): Use them.
13995
13996 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
13997
13998         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
13999
14000 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
14001
14002         * cp-tree.h (instantiate_decl): Change prototype.
14003         * decl2.c (mark_used): Adjust call.
14004         * optimize.c (inlinable_function_p): Adjust handling of templates.
14005         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
14006         (do_type_instantiation): Likewise.
14007         (instantiate_decl): Defer more templates.
14008         (instantiate_pending_templates): Adjust logic to handle inline
14009         friend functions.
14010
14011         * Makefile.in (GGC_H): New variable.  Use it throughout in place
14012         of ggc.h.
14013
14014         * call.c: Don't include obstack.h.  Include ggc.h.
14015         (obstack_chunk_alloc): Don't define.
14016         (obstack_chunk_free): Likewise.
14017         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
14018         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
14019         (pop_switch): Free it.
14020
14021         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
14022
14023         * dump.c (dequeue_and_dump): Don't try to print the bit_position
14024         if we don't have a DECL_FIELD_OFFSET.
14025
14026 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
14027
14028         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
14029         special_function_p.
14030
14031 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14032
14033         * cfns.gperf (hash, libc_name_p): Prototype.
14034
14035         * rtti.c (build_dynamic_cast_1): Constification.
14036
14037         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
14038
14039         * semantics.c (deferred_type_access_control): Prototype.
14040
14041 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
14042
14043         Correct many new ABI issues regarding vbase and vcall offset
14044         layout.
14045         * cp-tree.h (BINFO_VTABLE): Document.
14046         (struct lang_type): Tweak formatting.
14047         (BINFO_PRIMARY_BINFO): Add to documentation.
14048         (CLASSTYPE_VSIZE): Fix typo in comment.
14049         (CLASSTYPE_VBASECLASSES): Update documentation.
14050         (BINFO_VBASE_MARKED): Remove.
14051         (SET_BINFO_VBASE_MARKED): Likewise.
14052         (CLEAR_BINFO_VBASE_MARKED): Likewise.
14053         (BINFO_FIELDS_MARKED): Remove.
14054         (SET_BINFO_FIELDS_MARKED): Likewise.
14055         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
14056         (enum access_kind): New enumeration.
14057         (num_extra_vtbl_entries): Remove declaration.
14058         (size_extra_vtbl_entries): Likewise.
14059         (get_vtbl_decl_for_binfo): New function.
14060         (dfs_vbase_unmark): Remove declaration.
14061         (mark_primary_bases): Likewise.
14062         * class.c (SAME_FN): Remove.
14063         (struct vcall_offset_data_s): Move definition.
14064         (build_vbase_pointer): Use `build', not `build_binary_op', to
14065         access the vbase pointer under the new ABI.
14066         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
14067         (build_primary_vtable): Likewise.
14068         (dfs_mark_primary_bases): Move here from search.c.
14069         (mark_primary_bases): Likewise.
14070         (determine_primary_bases): Under the new ABI, don't make a base
14071         class a primary base just because we don't yet have any virtual
14072         functions.
14073         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
14074         (num_vfun_entries): Remove.
14075         (dfs_count_virtuals): Likewise.
14076         (num_extra_vtbl_entries): Likewise.
14077         (size_extra_vtbl_entries): Likewise.
14078         (layout_virtual_bases): Iterate in inheritance graph order under
14079         the new ABI.
14080         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
14081         indicate that a vfield is present.
14082         (init_class_processing): Initialize access_public_node, etc., from
14083         ak_public, etc.
14084         (get_vtbl_decl_for_binfo): New function.
14085         (dump_class_hierarchy_r): Likewise.
14086         (dump_class_hierarchy): Use it.
14087         (finish_vtbls): Build the vtbls in inheritance graph order.
14088         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
14089         (initialize_vtable): Use get_vtbl_decl_for_binfo.
14090         (accumulate_vtbl_inits): Add comments explaining why a pre-order
14091         walk is required.
14092         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
14093         where the vptr points, even for primary vtables.
14094         (build_vtbl_initializer): Adjust handling of vbase and vcall
14095         offsets.
14096         (build_vcall_and_vbase_vtable_entries): New function.
14097         (dfs_build_vbase_offset_vtbl_entries): Remove.
14098         (build_vbase_offset_vtbl_entries): Reimplement.
14099         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
14100         were already handled in a primary base class vtable.
14101         (build_vcall_offset_vtbl_entries): Adjust.
14102         (build_rtti_vtbl_entries): Adjust.
14103         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
14104         * init.c (expand_virtual_init): Simplify.
14105         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
14106         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
14107         * search.c (BINFO_ACCESS): New macro.
14108         (SET_BINFO_ACCESS): Likewise.
14109         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
14110         (access_in_type): Likewise.
14111         (dfs_accessible_p): Likewise.
14112         (protected_accessible_p): Likewise.
14113         (lookup_fnfields_1): Adjust documentation.
14114         (dfs_mark_primary_bases): Move to class.c
14115         (mark_primary_bases): Likewise.
14116         (dfs_vbase_unmark): Remove.
14117         (virtual_context): Use BINFO_FOR_VBASE.
14118         (dfs_get_vbase_types): Simplify.
14119         (dfs_build_inheritance_graph_order): New function.
14120         (get_vbase_types): Use it.
14121         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
14122
14123         * tinfo.cc (get_vbase_offset): New function.
14124         (__vmi_class_type_info::do_find_public_src): Use it.
14125         (__vmi_class_type_info::do_dyncast): Likewise.
14126         (__vmi_class_type_info::do_upcast): Likewise.
14127
14128 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
14129
14130         * lang-specs.h: Pass -fno-show-column to the preprocessor.
14131
14132 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
14133
14134         * rtti.c (class_hint_flags): Rename flags.
14135         (class_initializer): Remove flags.
14136         (synthesize_tinfo_var): Combine offset and flags. Add flags
14137         for __vmi_class_type_info.
14138         (create_tinfo_types): Remove flags from __class_type_info and
14139         __si_class_type_info. Merge flags and offset from
14140         base_class_type_info.
14141         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
14142         (__base_class_info::is_virtual_p): Adjust.
14143         (__base_class_info::is_public_p): Adjust.
14144         (__base_class_info::offset): New accessor.
14145         (__class_type_info::details): Remove member.
14146         (__class_type_info::__class_type_info): Lose details.
14147         (__class_type_info::detail_masks): Remove.
14148         (__si_class_type_info::__si_class_type_info): Lose details.
14149         (__vmi_class_type_info::details): New member.
14150         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
14151         (__vmi_class_type_info::detail_masks): New member.
14152         * tinfo.cc (__class_type_info::do_upcast): Initialize result
14153         with unknown_details_mask.
14154         (__vmi_class_type_info::do_find_public_src): Adjust
14155         (__vmi_class_type_info::do_dyncast): Adjust.
14156         (__vmi_class_type_info::do_upcast): Set result details, if
14157         needed. Adjust.
14158         (__dynamic_cast): Temporarily #if out optimization.
14159
14160 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
14161
14162         * rtti.c (get_tinfo_decl): Mark used.
14163         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
14164         mark as dealt with, if we output it.
14165
14166 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
14167
14168         * class.c: Reorganize to put virtual function table initialization
14169         machinery at the end of the file.
14170
14171 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
14172
14173         * class.c (finish_struct): Use bitsize_zero_node.
14174         * pt.c (instantiate_class_template): Likewise.
14175
14176 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
14177
14178         Put RTTI entries at negative offsets in new ABI.
14179         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
14180         vbase offset at index -3, not -1.
14181         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
14182         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
14183         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
14184         (build_rtti_vtbl_entries): New function.
14185         (set_rtti_entry): Remove.
14186         (build_primary_vtable): Don't use it.
14187         (build_secondary_vtable): Likewise.
14188         (start_vtable): Remove.
14189         (first_vfun_index): New function.
14190         (set_vindex): Likewise.
14191         (add_virtual_function): Don't call start_vtable.  Do call
14192         set_vindex.
14193         (set_primary_base): Rename parameter.
14194         (determine_primary_base): Likewise.
14195         (num_vfun_entries): Don't use skip_rtti_stuff.
14196         (num_extra_vtbl_entries): Include RTTI information.
14197         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
14198         (skip_rtti_stuff): Remove.
14199         (dfs_modify_vtables): Don't use it.
14200         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
14201         (layout_nonempty_base_or_field): Update size handling.
14202         (create_vtable_ptr): Tweak.
14203         (layout_class_type): Adjust parameter names.
14204         (finish_struct_1): Simplify.
14205         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
14206         (skip_rtti_stuff): Remove.
14207         (first_vfun_index): New function.
14208         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
14209         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
14210         (marked_vtable_pathp): Declare.
14211         (unmarked_vtable_pathp): Likewise.
14212         * error.c (dump_expr): Use first_vfun_index to calculate vtable
14213         offsets.
14214         * rtti.c (build_headof): Look for RTTI at negative offsets.
14215         (get_tinfo_decl_dynamic): Likewise.
14216         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
14217         here.
14218         (create_pseudo_type_info): Do it here instead.  Adjust so that
14219         vptr points at first virtual function.
14220         * search.c (marked_vtable_pathp): Make it global.
14221         (unmarked_vtable_pathp): Likewise.
14222         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
14223         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
14224         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
14225         (get_pure_virtuals): Likewise.
14226         (expand_upcast_fixups): Likewise.
14227         * tree.c (debug_binfo): Likewise.
14228         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
14229         negative offset.
14230
14231 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14232
14233         * class.c (check_field_decl): Fix typo.
14234         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
14235         (check_methods): Likewise.
14236         (check_field_decls): Likewise.
14237         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
14238         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
14239         Use DECL_RESULT_FLD, not DECL_RESULT.
14240         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
14241         * lex.c (identifier_type): Likewise.
14242         * pt.c (determine_specialization, lookup_template_class): Likewise.
14243         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
14244         (resolve_overloaded_unification, more_specialized): Likewise.
14245         * semantics.c (finish_member_declaration): Likewise.
14246         * typeck.c (build_x_function_call): Likewise.
14247
14248 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
14249
14250         * class.c (layout_empty_base): Handle empty bases with non-byte
14251         alignment.
14252         (build_base_field): Likewise.
14253         (layout_virtual_bases): Likewise.
14254
14255         * class.c (finish_struct_1): Fix typo in this change:
14256
14257         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14258
14259 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
14260
14261         * decl.c (grokdeclarator): Count partial specializations when
14262         keeping track of how many template classes have been seen.
14263
14264         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
14265
14266 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14267
14268         * class.c (build_vbase_pointer_fields): layout_field now place_field.
14269         (get_vfield_offset): Use byte_position.
14270         (set_rtti_entry): Set OFFSET to ssizetype zero.
14271         (get_binfo_offset_as_int): Deleted.
14272         (dfs_record_base_offsets): Use tree_low_cst.
14273         (dfs_search_base_offsets): Likewise.
14274         (layout_nonempty_base_or_field): Reflect changes in RLI format
14275         and call byte_position.
14276         (layout_empty_base): Convert offset to ssizetype.
14277         (build_base_field): use rli_size_unit_so_far.
14278         (dfs_propagate_binfo_offsets): Do computation in proper type.
14279         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
14280         (layout_class_type): Reflect changes in RLI names and fields.
14281         (finish_struct_1): Set DECL_FIELD_OFFSET.
14282         * dump.c (dequeue_and_dump): Call bit_position.
14283         * expr.c (cplus_expand_constant): Use byte_position.
14284         * rtti.c (expand_class_desc): Use bitsize_one_node.
14285         * typeck.c (build_component_addr): Use byte_position and don't
14286         special case for zero offset.
14287
14288 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
14289
14290         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
14291
14292         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
14293         tinfo object.
14294         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
14295         vtable.
14296
14297 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14298
14299         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
14300         DECL_P macros.
14301         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
14302         make_typename_type, check_initializer, cp_finish_decl,
14303         xref_tag): Likewise.
14304         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
14305         decl_namespace, arg_assoc_template_arg, arg_assoc,
14306         validate_nonmember_using_decl, do_class_using_decl): Likewise.
14307         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
14308         args_to_string): Likewise.
14309         * friend.c (is_friend): Likewise.
14310         * lex.c (note_got_semicolon, note_list_got_semicolon,
14311         is_global): Likewise.
14312         * method.c (build_overload_nested_name, build_overload_value,
14313         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
14314         * parse.y (typename_sub, typename_sub1): Likewise.
14315         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
14316         process_partial_specialization, convert_template_argument,
14317         template_args_equal, add_pending_template, lookup_template_class,
14318         for_each_template_parm_r, maybe_fold_nontype_arg,
14319         tsubst, instantiate_template, type_unification_real, unify,
14320         instantiate_pending_templates, set_mangled_name_for_template_decl):
14321         Likewise.
14322         * repo.c (repo_get_id, repo_template_used): Likewise.
14323         * search.c (lookup_field_1): Likewise.
14324         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
14325         * xref.c (classname): Likewise.
14326
14327 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
14328
14329         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
14330         (CANONICAL_BINFO): New macro.
14331         (BINFO_NEW_VTABLE_MARKED): Use it.
14332         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
14333         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
14334         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
14335         not TREE_TYPE.
14336         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
14337         (build_secondary_vtable): Likewise.
14338         (dfs_finish_vtbls): Likewise.
14339         (dfs_accumulate_vtbl_inits): Likewise.
14340         (accumulate_vtbl_inits): New function.
14341         (finish_vtbls): Make sure that virtual bases come after
14342         non-virtual bases in the vtable group.
14343         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
14344         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
14345         * search.c (struct vbase_info): Move definition.
14346         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
14347         (unmarked_new_vtable_p): Likewise.
14348         (dfs_mark_vtable_path): Remove.
14349         (dfs_mark_new_vtable): Remove.
14350         (dfs_unmark_new_vtable): Likewise.
14351         (dfs_clear_search_slot): Likewise.
14352         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
14353         (dfs_clear_vbase_slots): Likewise.
14354         (init_vbase_pointers): LIkewise.
14355
14356 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
14357
14358         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
14359         SIZETYPE to a non-SIZETYPE.
14360
14361 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
14362
14363         * class.c (layout_virtual_bases): Adjust names in conditionally
14364         compiled code.
14365
14366         * class.c (record_base_offsets): New function.
14367         (layout_conflict_p): Likewise.
14368         (layout_nonempty_base_or_field): Use it.
14369         (layout_empty_base): New function.
14370         (build_base_field): Use it.
14371         (build_base_fields): Update comment.
14372         (layout_virtual_bases): Fold in a little code form
14373         layout_basetypes.  Use layout_empty_base.
14374         (layout_basetypes): Remove.
14375         (end_of_class): New function.
14376         (layout_class_type): Use it.  Adjust.
14377
14378         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
14379         (fntype_p): Remove.
14380         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
14381         comment.
14382         (dfs_skip_nonprimary_vbases_markedp): Likewise.
14383         * typeck.c (fntype_p): Remove.
14384
14385         * cp-tree.h (TI_SPEC_INFO): Remove.
14386         (CLASSTYPE_TI_SPEC_INFO): Likewise.
14387         * pt.c (process_partial_specialization): Likewise.
14388
14389         * class.c (build_base_field): Fix thinko in computation of binfo
14390         offsets.
14391
14392         * tree.c (mark_local_for_remap_p): Mark variables declared in
14393         TARGET_EXPRs as well.
14394
14395 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
14396
14397         * typeck.c (require_complete_type, complete_type,
14398         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
14399         build_array_ref, convert_arguments, pointer_diff,
14400         build_x_unary_op, build_unary_op, build_c_cast,
14401         build_modify_expr): Use COMPLETE_TYPE_P etc.
14402         * call.c (is_complete, convert_like_real,
14403         build_new_method_call): Likewise.
14404         * class.c (build_vbase_pointer_fields, check_bases,
14405         build_base_field, finish_struct_1, pushclass): Likewise.
14406         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
14407         * decl.c (maybe_process_template_type_declaration, pushtag,
14408         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
14409         layout_var_decl, check_initializer, cp_finish_decl,
14410         grokdeclarator, require_complete_types_for_parms,
14411         grok_op_properties, xref_tag, xref_basetypes,
14412         check_function_type): Likewise.
14413         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
14414         * friend.c (do_friend): Likewise.
14415         * init.c (build_offset_ref): Likewise.
14416         * parse.y (structsp): Likewise.
14417         * pt.c (maybe_process_partial_specialization,
14418         tsubst_friend_function, instantiate_class_template, tsubst,
14419         do_type_instantiation, instantiate_pending_templates): Likewise.
14420         * repo.c (repo_get_id): Likewise.
14421         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
14422         synthesize_tinfo_var, emit_support_tinfos): Likewise.
14423         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
14424         * semantics.c (begin_class_definition): Likewise.
14425         * tree.c (build_cplus_method_type): Likewise.
14426         * typeck2.c (digest_init, build_functional_cast,
14427         add_exception_specifier): Likewise.
14428         * parse.h, parse.c: Regenerated.
14429
14430 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
14431
14432         * inc/cxxabi.h: New header file. Define new-abi entry points.
14433         (__pointer_type_info::target): Rename member to ...
14434         (__pointer_type_info::type): ... here.
14435         (__base_class_info::type): Rename member to ...
14436         (__base_class_info::base): ... here.
14437         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
14438         * cp-tree.h (CPTI_ABI): New global tree enumeration.
14439         (abi_node): New global tree node.
14440         * decl.c (abi_node): Document.
14441         (init_decl_processing): Initialize abi_node.
14442         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
14443         (get_vmi_pseudo_type_info): Likewise.
14444         (create_tinfo_types): Likewise.
14445         (emit_support_tinfos): Likewise.
14446         * tinfo.h (cxxabi.h): Include for new-abi.
14447         Move rtti class definitions to new header file.
14448         * tinfo.cc (abi): Use the namespace.
14449         (std): Move new abi rtti classes from here ...
14450         (__cxxabiv1): ... to here.
14451         * tinfo2.cc (cxxabi.h): Include for new-abi.
14452         Move rtti class definitions to new header file.
14453         (std): Move new abi rtti classes from here ...
14454         (__cxxabiv1): ... to here.
14455         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
14456         namespace.
14457
14458 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
14459             Jason Merrill  <jason@casey.cygnus.com>
14460
14461         * method.c (build_overload_int): Use host_integerp.
14462
14463 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14464
14465         * init.c (build_offset_ref): Handle the case of a templated member
14466         function.
14467
14468 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14469
14470         * except.c (expand_exception_blocks): Clear catch_clauses_last.
14471
14472 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
14473
14474         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
14475         * class.c (check_bitfield_decl): Turn illegal bitfields into
14476         non-bitfields.
14477         (dfs_propagate_binfo_offsets): Adjust for new size_binop
14478         semantics.
14479         (dfs_offset_for_unshared_vbases): Likewise.
14480         * cvt.c (cp_convert_to_pointer): Convert NULL to a
14481         pointer-to-member correctly under the new ABI.
14482         * expr.c (cplus_expand_constant): Don't use cp_convert when
14483         turning an offset into a pointer-to-member.
14484         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
14485         when dereferencing them under the new ABI.
14486         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
14487         of pointers-to-members under the new ABI.
14488
14489         * class.c (check_bitfield_decl): Remove restriction on really long
14490         bitfields.
14491         (layout_class_type): Implement new ABI handling of bitfields
14492         longer than their types.
14493
14494 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14495
14496         * parse.y (extdefs): Call ggc_collect.
14497         * parse.c: Regenerated.
14498
14499 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
14500
14501         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
14502         (note_name_declared_in_class): Use OVL_CURRENT to get at a
14503         potential overload.
14504
14505 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14506
14507         * class.c (build_vbase_path): Use integer_zerop.
14508         (build_vtable_entry): Use tree_low_cst.
14509         (get_vfield_offset): Use bit_position.
14510         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
14511         Use tree_low_cst.
14512         (check_bitfield_decl): Set DECL_SIZE using convert.
14513         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
14514         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
14515         Use tree_low_cst.
14516         (finish_struct_1): Use bit_position.
14517         (dump_class_hierarchy): Use tree_low_cst.
14518         * cp-tree.h (min_precision): Add declaration.
14519         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
14520         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
14521         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
14522         * expr.c (cplus_expand_constant): Use bit_position.
14523         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
14524         * rtti.c (get_base_offset): Use bit_position.
14525         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
14526         host_integerp, and tree_low_cst.
14527         (pointer_int_sum): Use integer_zerop.
14528         (build_component_addr): Use bit_position.
14529
14530 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
14531
14532         * typeck.c (require_complete_type): Don't assume size_zero_node.
14533         (complete_type_or_else): Likewise.
14534
14535 2000-03-16  Steven Grady <grady@digitaldeck.com>
14536             Jason Merrill  <jason@casey.cygnus.com>
14537
14538         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
14539
14540 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
14541
14542         * decl2.c (grokfield): Bail out if type is error_mark_node.
14543
14544 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
14545
14546         * tinfo2.cc (__ptr_to_member_data): Rename to ...
14547         (__pointer_to_member_data): ... here. Adjust.
14548         * rtti.c (create_tinfo_types): Adjust.
14549
14550 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
14551
14552         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
14553         * decl.c (ref_desc_type_node): Undocument.
14554         * rtti.c (ptr_ref_initializer): Rename to ...
14555         (ptr_initializer): ... here. Adjust comments.
14556         (ptmd_initializer): Fix comment thinko.
14557         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
14558         (create_tinfo_types): Remove ref_desc_type_node init.
14559         * tinfo2.cc (__reference_type_info): Remove.
14560
14561 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
14562
14563         * decl.c (cp_finish_decl): Remove obsolete comment.
14564
14565         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
14566
14567 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
14568
14569         * cp-tree.h: Tweak documentation.
14570         * class.c (build_vbase_pointer_fields): Layout the fields, too.
14571         (avoid_overlap): Remove.
14572         (get_binfo_offset_as_int): New function.
14573         (dfs_serach_base_offsets): Likewise.
14574         (layout_nonempty_base_or_field): Likewise.
14575         (build_base_field): Layout fields here.  Avoid placing two objects
14576         of the same type at the same address, under the new ABI.
14577         (build_base_fields): Adjust accordingly.
14578         (create_vtable_ptr): Return the new field, but don't attach it to
14579         TYPE_FIELDS.
14580         (remove_base_field): Remove.
14581         (remove_base_fields): Remove.
14582         (layout_basetypes): Adjust accordingly.
14583         (layout_class_type): Call layout_field for each field, rather than
14584         just making a wholesale call to layout_type.
14585
14586 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
14587
14588         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
14589
14590 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
14591
14592         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
14593
14594         * except.c (dtor_nothrow): New fn.
14595         (do_pop_exception): Use it.  Take type parm.
14596         (push_eh_cleanup): Take type parm.
14597         (expand_start_catch_block): Pass it.
14598         (build_eh_type_type_ref): Accept null type.
14599
14600 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
14601
14602         * cp-tree.h (revert_static_member_fn): Change prototype.
14603         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
14604         (grok_op_properties): Likewise.
14605         (start_function): Likewise.
14606         (revert_static_member_fn): Simplify.
14607         * pt.c (check_explicit_specialization): Adjust call to
14608         revert_static_member_fn.
14609
14610 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
14611
14612         * cp-tree.h (scope_kind): New type.
14613         (tmpl_spec_kind): Likewise.
14614         (declare_pseudo_global_level): Remove.
14615         (pseudo_global_level_p): Rename to template_parm_scope_p.
14616         (pushlevel): Remove declaration.
14617         (begin_scope): New function.
14618         (finish_scope): Likewise.
14619         (current_tmpl_spec_kind): Likewise.
14620         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
14621         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
14622         Add template_spec_p.
14623         (toplevel_bindings_p): Adjust.
14624         (declare_pseudo_global_level): Remove.
14625         (pseudo_global_level_p): Rename to template_parm_scope_p.
14626         (current_tmpl_spec_kind): New function.
14627         (begin_scope): Likewise.
14628         (finish_scope): Likewise.
14629         (maybe_push_to_top_level): Adjust.
14630         (maybe_process_template_type_declaration): Likewise.
14631         (pushtag): Likewise.
14632         (pushdecl_nonclass_level): Likewise.
14633         (lookup_tag): Likewise.
14634         (grokfndecl): Handle member template specializations.  Share
14635         constructor and non-constructor code.
14636         * decl2.c (check_classfn): Handle member template specializations.
14637         * pt.c (begin_template_parm_list): Use begin_scope.
14638         (begin_specialization): Likewise.
14639         (end_specialization): Likewise.
14640         (check_explicit_specialization): Use current_tmpl_spec_kind.
14641         Handle member template specializations.
14642         (end_template_decl): Use finish_scope.  Remove call to
14643         get_pending_sizes.
14644         (push_template_decl_real): Remove bogus error message.
14645         (tsubst_decl): Fix typo in code contained in comment.
14646         (instantiate_template): Handle member template specializations.
14647         (most_general_template): Likewise.
14648
14649 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
14650
14651         * lex.c (whitespace_cr): Compress consecutive calls to warning().
14652         (do_identifier): Ditto for error().
14653
14654         * pt.c (convert_nontype_argument): Ditto for cp_error().
14655         (convert_template_argument): Ditto for cp_pedwarn().
14656
14657 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
14658
14659         * exception.cc (__check_null_eh_spec): New fn.
14660         * except.c (expand_end_eh_spec): Call it if the spec is throw().
14661
14662 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
14663
14664         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
14665         * except.c (expand_end_eh_spec): Add the return type.
14666         * rtti.c (throw_bad_cast): Add the parmtypes.
14667         (throw_bad_typeid): Likewise.
14668
14669         * semantics.c (expand_stmt): Only leave out rtl for unused
14670         artificials, and set DECL_IGNORED_P on them as well.
14671         * decl.c (wrapup_globals_for_namespace): Likewise.
14672
14673 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
14674
14675         * decl.c (maybe_commonize_var): Skip all artificial decls.
14676         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
14677
14678 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
14679
14680         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
14681         * cp-tree.h: Declare flag_enforce_eh_specs.
14682         * decl.c (store_parm_decls, finish_function): Check it.
14683
14684         C library functions don't throw.
14685         * Makefile.in (cfns.h): New target.
14686         (except.o): Depend on it.
14687         * Make-lang.in (cc1plus): Depend on cfns.gperf.
14688         * cfns.gperf: New file.
14689         * cfns.h: Generated.
14690         * except.c: Include it.
14691         (nothrow_libfn_p): New fn.
14692         * decl.c (grokfndecl): Use it.
14693         * cp-tree.h: Declare it.
14694
14695         * decl.c (push_overloaded_decl_1, auto_function,
14696         define_function): Lose.
14697         (build_library_fn_1): New static fn.
14698         (builtin_function): Use it.
14699         (get_atexit_node): Use build_library_fn_ptr.
14700         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
14701         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
14702         push_void_library_fn, push_throw_library_fn): New fns.
14703         * cp-tree.h: Declare them.
14704         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
14705         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
14706         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
14707         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
14708         * rtti.c (build_runtime_decl): Lose.
14709         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
14710         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
14711         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
14712
14713         * call.c (build_call): Remove result_type parm.
14714         Call mark_used on unused artificial fns.
14715         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
14716
14717 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
14718
14719         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
14720         appropriate.
14721         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
14722         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
14723         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
14724         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
14725         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
14726         expand_generic_desc): Likewise.
14727
14728 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14729
14730         * exception.cc (__cp_pop_exception): Cleanup the original object.
14731
14732 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14733
14734         * decl.c (grok_op_properties): Merge conversion to void warning
14735         with other silly op warnings.
14736
14737 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
14738
14739         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
14740         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
14741
14742 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14743
14744         * decl.c (cp_make_fname_decl): New function.
14745         (wrapup_globals_for_namespace): Don't emit unused static vars.
14746         (init_decl_processing): Remove comment about use of
14747         array_domain_type. Set make_fname_decl.
14748         (cp_finish_decl): Remove __FUNCTION__ nadgering.
14749         * semantics.c (begin_compound_stmt): Remove
14750         current_function_name_declared flagging.
14751         (expand_stmt): Don't emit unused local statics.
14752         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
14753         specially.
14754
14755 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14756
14757         * typeck.c (convert_for_assignment): Don't look at array
14758         initializer.
14759         * call.c (convert_like_real): Likewise.
14760
14761 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
14762
14763         Add initial support for '\uNNNN' specifier.
14764         * lex.c (read_ucs): New fn.
14765         (readescape, skip_white_space): Call it.
14766         (is_extended_char, is_extended_char_1): New fns.
14767         (utf8_extend_token): New fn, #if 0'd out.
14768         (real_yylex): Treat extended chars like letters.
14769
14770         * search.c (note_debug_info_needed): Walk the bases even if we
14771         weren't deferring the type itself.
14772
14773 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14774
14775         * decl2.c (finish_objects): Constify a char*.
14776
14777         * method.c (emit_thunk): Likewise.
14778
14779 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
14780
14781         * typeck.c (dubious_conversion_warnings): Look through
14782         REFERENCE_TYPE.
14783
14784 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14785
14786         * class.c (dfs_modify_vtables): I is now unsigned.
14787         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
14788         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
14789         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
14790         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
14791         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
14792         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
14793         Call integer_all_onesp.
14794         * typeck2.c (process_init_constructor): Use compare_tree_int.
14795
14796         * lang-specs.h (as): Don't call if -syntax-only.
14797
14798 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
14799
14800         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
14801         RTL_EXPR_HAS_NO_SCOPE after all.
14802
14803 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
14804
14805         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
14806         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
14807         RTL_EXPR_HAS_NO_SCOPE.
14808
14809         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
14810         later.
14811
14812         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
14813
14814 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
14815
14816         * call.c (convert_like): Macrofy.
14817         (convert_like_with_context): New macro.
14818         (convert_like_real): Renamed from convert_like.  Add calling
14819         context parameters, for diagnostics. Add recursive flag.  Call
14820         dubious_conversion_warnings for outer conversion.
14821         (build_user_type_conversion): Use convert_like_with_context.
14822         (build_over_call): Likewise. Don't warn about dubious
14823         conversions here. Adjust convert_default_arg calls.
14824         (convert_default_arg): Add context parameters for diagnostics.
14825         Pass through to convert_like_with_context.
14826         * cp-tree.h (convert_default_arg): Add context parameters.
14827         (dubious_conversion_warnings): Prototype new function.
14828         * typeck.c (convert_arguments): Adjust convert_default_arg call.
14829         (dubious_conversion_warnings): New function, broken
14830         out of convert_for_assignment.
14831         (convert_for_assignment): Adjust.
14832
14833 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
14834
14835         * decl2.c (key_method): Break out from...
14836         (import_export_vtable, import_export_class): ...here.
14837
14838         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
14839         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
14840
14841         * search.c (note_debug_info_needed, dfs_debug_mark,
14842         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
14843         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
14844
14845 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
14846
14847         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
14848         typos.
14849
14850 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
14851
14852         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
14853         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
14854         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
14855         (lang_type): Split gets_new into has_new and has_array_new.
14856         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14857         (TYPE_GETS_NEW): Split into ...
14858         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
14859         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
14860         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
14861         (build_op_new_call): Don't declare.
14862         (build_new_1): Likewise.
14863         * call.c (build_op_new_call): Remove.
14864         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
14865         instead of TYPE_NEEDS_DESTRUCTOR.
14866         (finish_struct_bits): Likewise.
14867         (add_implicitly_declared_members): Likewise.
14868         (check_field_decl): Likewise.
14869         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
14870         correctly under the new ABI.
14871         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
14872         instead of TYPE_NEEDS_DESTRUCTOR.
14873         (initialize_local_var): Likewise.
14874         (destroy_local_var): Likewise.
14875         (cp_finish_decl): Likewise.
14876         (register_dtor_fn): Likewise.
14877         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
14878         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
14879         TYPE_VEC_DELETE_TAKES_SIZE here.
14880         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
14881         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
14882         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14883         (finish_destructor_body): Likewise.
14884         (maybe_build_cleanup_1): Likewise.
14885         * decl2.c (do_static_destruction): Likewise.
14886         * init.c (build_new_1): Make it static.
14887         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14888         (expand_cleanup_for_base): Likewise.
14889         (get_cookie_size): New function.
14890         (build_new_1): Handle array-new cookies correctly under the new
14891         ABI.
14892         (build_vec_delete_1): Likewise.
14893         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14894         (build_delete): Likewise.
14895         (build_vec_delete): Handle array-new cookies correctly under the new
14896         ABI.
14897         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14898         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
14899         TYPE_HAS_ARRAY_NEW_OPERATOR.
14900         * ptree.c (print_lang_type): Check them.
14901         * search.c (context_for_name_lookup): Fix typo in comment.
14902         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14903         * tree.c (break_out_cleanups): Likewise.
14904         (build_cplus_array_test_1): Likewise.
14905         (cp_build_qualified_type_real): Likewise.
14906         * typeck.c (complete_type): Likewise.
14907
14908         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
14909         the command-line, not the end.
14910
14911 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
14912
14913         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
14914
14915 2000-03-02  Tom Tromey  <tromey@cygnus.com>
14916
14917         * cp-tree.h (build_java_class_ref): Declare.
14918         * init.c (build_java_class_ref): No longer static.
14919         * except.c (expand_throw): Generate a Java-style `throw' if the
14920         thrown object is a "Java" object.
14921         (initialize_handler_parm): Generate a Java-style lookup of
14922         exception info if the caught object is a "Java" object.
14923         (catch_language, catch_language_init): New globals.
14924         (decl_is_java_type): New function.
14925         (expand_start_catch_block): Don't call push_eh_info() or
14926         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
14927         class reference to build_catch_block.
14928
14929 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14930
14931         * typeck.c (comptypes): Treat sizetype like its language equivalent.
14932
14933 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
14934
14935         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
14936         to merge reference/pointer code and fix incorrect warnings.
14937
14938 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
14939
14940         * search.c (protected_accessible_p): Use context_for_name_lookup.
14941
14942         * init.c (construct_virtual_bases): Fix thinko.
14943         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
14944
14945 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
14946
14947         * decl.c (current_function_decl): Move to toplev.c.
14948
14949 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
14950
14951         * pt.c (fn_type_unification): Unify return type, whenever
14952         provided.
14953         (get_bindings_real): Only pass return type when necessary.
14954         Remove explicit return type check.
14955         * class.c (resolve_address_of_overloaded_function): Pass desired
14956         return type to fn_type_unification.
14957
14958 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14959
14960         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
14961         DECL_FIELD_SIZE.
14962         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
14963         DECL_FIELD_SIZE.
14964         * rtti.c (expand_class_desc): Likewise.
14965         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
14966         (THUNK_VCALL_OFFSET): Likewise.
14967         (THUNK_DELTA): Reflect changes in ../tree.h.
14968
14969 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
14970
14971         * search.c (protected_accessible_p): Also allow the access if
14972         the member is public in DERIVED.  Lose TYPE parm.
14973         (friend_accessible_p): Lose TYPE parm.
14974         (accessible_p): Adjust.
14975
14976 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14977
14978         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
14979         on things that are not sizes; ssize_binop deleted.
14980         Call size_diffop when appropriate.
14981         (dfs_build_vcall_offset_vtbl_entries): Likewise.
14982         (build_primary_vtable, build_secondary_vtable): Likewise.
14983         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
14984         Variable I is HOST_WIDE_INT.
14985         (get_vfield_offset): Pass proper types to size_binop.
14986         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
14987         (finish_struct_1): Likewise.
14988         (skip_rtti_stuff): Arg N is now pointer to signed.
14989         (layout_class_type): Use size_zero_node.
14990         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
14991         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
14992         * decl.c (complete_arry_type): Pass proper types to size_binop.
14993         (xref_basetypes): BINFO_OFFSET is sizetype.
14994         * error.c (dump_expr): Don't use size_binop non-sizes.
14995         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
14996         * init.c (construct_virtual_bases): Fix type error.
14997         (build_vec_delete_1): Pass proper type to size_binop and don't
14998         fold result.
14999         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
15000         * rtti.c (get_base_offset): Pass proper type to size_binop.
15001         * search.c (dfs_find_vbases): Fix type error.
15002         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
15003         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
15004         * tree.c (debug_binfo): Variable N is signed.
15005         Use HOST_WIDE_INT_PRINT_DEC.
15006         * typeck.c (comptypes): sizetype is same as equivalent integer type.
15007         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
15008         size_one_node and size_zero_node.
15009         (c_alignof): Use size_one_node.
15010         (build_component_addr): Pass proper types to size_binop.
15011         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
15012
15013 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
15014
15015         Implement class scope using-declarations for functions.
15016         * class.c (handle_using_decl): Call add_method for used functions.
15017         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
15018         (add_method): Used functions are hidden by local functions.
15019         (check_bases_and_members): Handle using-decls before finalizing
15020         CLASSTYPE_METHOD_VEC.
15021         * call.c (add_function_candidate): Add ctype parm; if nonzero,
15022         override the type of 'this' accordingly.
15023         (add_template_candidate, add_template_candidate_real): Add ctype parm.
15024         (convert_class_to_reference, build_user_type_conversion_1,
15025         build_new_function_call, build_object_call, build_new_op,
15026         build_new_method_call): Pass ctype parm.
15027
15028         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
15029         the baselink.
15030         * call.c (convert_class_to_reference, build_user_type_conversion_1,
15031         build_new_function_call, build_object_call, build_new_op,
15032         build_new_method_call, build_op_delete_call): Don't get basetype_path
15033         from a baselink.
15034         * typeck.c (build_component_ref): Likewise.
15035         * init.c (build_offset_ref): Likewise.
15036         (resolve_offset_ref): Don't call enforce_access.
15037         Call build_scoped_ref.
15038         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
15039         would cause an error or if -pedantic.
15040         * class.c (alter_access): Lose binfo parm.
15041
15042 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
15043
15044         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
15045         types.
15046
15047 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
15048
15049         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
15050         pseudo_type_info creation into the std namespace
15051
15052 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
15053
15054         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
15055         (import_export_class): Remove declaration.
15056         * decl2.c (import_export_class): Make it static.
15057         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
15058         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
15059         EXPR_WITH_FILE_LOCATION.
15060         * lex.c (check_newline): Tweak filename/lineno setting.
15061         * semantics.c (begin_while_stmt): Fix typo in comment.
15062
15063 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15064
15065         * lang-options.h (-fmessage-length=): Add missing option.
15066
15067         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
15068
15069 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
15070
15071         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
15072
15073 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
15074
15075         * optimize.c (expand_call_inline): Emit the return label before
15076         evaluating the return value.
15077
15078 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
15079
15080         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
15081         than duplicating functionality here.
15082         * optimize.c: Include input.h.
15083         (expand_call_inline): Use push_srcloc and pop_srcloc.
15084         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
15085         * parse.c: Regenerated.
15086         * Makefile.in (lex.o): Depend on input.h.
15087         (optimize.o): Likewise.
15088
15089 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
15090
15091         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
15092         function type, rather than ICE.
15093
15094 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
15095
15096         * decl.c (grokdeclarator): Call decl_type_access_control.
15097         * parse.y (parse_end_decl): Don't call decl_type_access_control if
15098         decl is null.
15099
15100 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
15101
15102         * decl.c (decls_match): Remove obsolete static member nadgering.
15103
15104 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15105
15106         * decl.c (grokdeclarator): Change ANSI to ISO.
15107         * lex.c (consume_string, readescape, do_identifier): Likewise.
15108         (parse_float, real_yylex): Likewise.
15109         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
15110         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
15111         new_type_id, maybe_label_decls, simple_stmt,
15112         for.init.statement): Likewise.
15113         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
15114         * semantics.c (finish_named_return_value): Likewise.
15115         * parse.c: Regenerate.
15116
15117 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
15118
15119         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
15120         (CPTI_CLASS_STAR_TYPE): Remove.
15121         (vtable_index_type): Likewise.
15122         (class_star_type_node): Remove.
15123         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
15124         (build_binary_op_nodefault): Remove.
15125         * call.c (build_new_op): Use build_binary_op instead of
15126         build_binary_op_nodefault.
15127         * decl.c (init_decl_processing): Remove class_star_type_node
15128         initialization.  Make delta_type_node ptrdiff_type_node under the
15129         new ABI.  Initialize vtable_index_type.
15130         (build_ptrmemfunc_type): Build different structures for the new
15131         ABI.
15132         (build_enumerator): Use build_binary_op instead of
15133         build_binary_op_nodefault.
15134         * method.c (build_overload_value): Mangle pointers-to-members
15135         appropriately under the new ABI.
15136         * typeck.c (build_array_ref): Use build_binary_op instead of
15137         build_binary_op_nodefault.
15138         (get_member_function_from_ptrfunc): Adjust for the new ABI.
15139         (build_binary_op_nodefault): Rename to ...
15140         (build_binary_op): ... this.  Remove old version.  Adjust for
15141         pointer-to-member comparisons under the new ABI.
15142         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
15143         (build_ptrmemfunc): Adjust for the new ABI.
15144         (expand_ptrmemfunc_cst): Likewise.
15145         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
15146         (pfn_from_ptrmemfunc): Adjust for the new ABI.
15147
15148 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
15149
15150         * call.c (build_object_call): Compress consecutive calls to
15151         cp_error.
15152         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
15153         (build_op_delete_call): Adjust message formatting.
15154
15155         * class.c (check_bases): Compress consecutive calls to
15156         cp_pedwarn.
15157         (finish_struct_anon): Say 'ISO C++'.
15158
15159         * decl.c (start_decl): Same here.
15160         (grok_reference_init): Likewise.
15161         (grokfndecl): Correct message formatting.
15162         (grokfndecl): Improve diagnostic.
15163         (check_static_variable_definition): Likewise. Say 'ISO C++'
15164         (compute_array_index_type): Say 'ISO C++'
15165         (create_array_type_for_decl): Compress consecutive calls to
15166         cp_error.
15167         (grokdeclarator): Say 'ISO C++'
15168         (grok_op_properties): Likewise.
15169
15170         * decl2.c (delete_sanity): Clairify diagnostic.
15171         (check_member_template): Same here.
15172         (grok_function_init): Use consistent terminology.
15173
15174         * expr.c (do_case): Say 'ISO C++'
15175
15176         * friend.c (do_friend): Compress consecutive calls to warning.
15177
15178 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
15179
15180         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
15181         * class.c (build_secondary_vtable): Reorganize.  Don't create a
15182         new vtable under the new ABI.
15183         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
15184         computing the size.
15185         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
15186         the initializing elements.
15187         (initialize_vtable): New function.
15188         (dfs_finish_vtbls): Use it.
15189         (dfs_accumulate_vtbl_inits): New function.
15190         (finish_vtbls): Merge primary and secondary vtables under the new
15191         ABI.
15192         (finish_struct_1): Remove redundant call to layout_vtable_decl.
15193         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
15194         aren't VAR_DECLs.
15195
15196         * class.c (build_vtable): New function, split out from ...
15197         (get_vtable_decl): ... here, and ...
15198         (build_secondary_vtable): ... here.
15199
15200         * pt.c (tsubst_decl): Fix formatting.
15201
15202 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15203
15204         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
15205         (avoid_overlap, build_base_field): Likewise.
15206         (build_base_field, build_base_fields, is_empty_class):
15207         Test DECL_SIZE with integer_zero.
15208         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
15209         * cp-tree.h (struct lang_type): New field size_unit.
15210         (CLASSTYPE_SIZE_UNIT): New macro.
15211         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
15212         (cp_finish_decl): Delete -Wlarger-than processing.
15213         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
15214         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
15215         * tree.c (make_binfo): binfo vector is one entry longer.
15216         (walk_tree): Walk DECL_SIZE_UNIT.
15217
15218 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
15219
15220         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
15221         comment.
15222         (build_vtable_entry): Don't assume all vtable entries are
15223         functions.
15224         (build_vtbl_initializer): Adjust accordingly.
15225         (get_vtable_decl): Fix formatting.
15226
15227 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
15228
15229         * semantics.c (deferred_type_access_control): Walk the entire
15230         type_lookups list.
15231         (save_type_access_control): Rename from
15232         initial_deferred_type_access_control.  Just remember the value.
15233         (decl_type_access_control): New fn.
15234         (begin_function_definition): Use deferred_type_access_control, after
15235         we've started the function.  Set type_lookups to error_mark_node.
15236         * parse.y (frob_specs, fn.def1): Adjust.
15237         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
15238         (parse_end_decl, parse_bitfield0, parse_method): New fns.
15239         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
15240         (after_type_component_declarator0): Likewise.
15241         (after_type_component_declarator): Likewise.
15242         (notype_component_declarator): Likewise.
15243         * cp-tree.h: Adjust.
15244
15245         * decl.c (redeclaration_error_message): Allow redeclaration of
15246         namespace-scope decls.
15247
15248 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
15249
15250         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
15251
15252 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
15253
15254         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
15255         * decl2.c (grokclassfn): Likewise.
15256
15257         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
15258
15259         * decl2.c (lang_decode_option): Don't set default message length
15260         here.
15261         * lex.c (lang_init_options): Set it here.
15262
15263 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
15264
15265         Make DECL_CONTEXT mean the class in which a member function was
15266         declared, even for a virtual function.
15267         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
15268         (DECL_FRIEND_CONTEXT): New macro.
15269         (DECL_REAL_CONTEXT): Remove.
15270         (SET_DECL_FRIEND_CONTEXT): Likewise.
15271         (DECL_VIRTUAL_CONTEXT): Adjust.
15272         (DECL_CLASS_SCOPE_P): Use TYPE_P.
15273         (add_friends): Remove.
15274         (hack_decl_function_context): Likewise.
15275         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
15276         CP_DECL_CONTEXT.
15277         (build_over_call): Fix indentation.  Use DECL_CONTEXT
15278         instead of DECL_CLASS_CONTEXT.
15279         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
15280         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
15281         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15282         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
15283         (build_base_field): Likewise.
15284         (finish_struct_1): Likewise.
15285         (build_self_reference): Likewise.
15286         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
15287         DECL_REAL_CONTEXT.
15288         (pushtag): Use decl_function_context, not
15289         hack_decl_function_context.
15290         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
15291         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
15292         (pushdecl): Remove bogus code.
15293         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
15294         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
15295         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15296         Use decl_function_context, nothack_decl_function_context.
15297         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
15298         (grokdeclarator): Likewise.  Use decl_function_context, not
15299         hack_decl_function_context.
15300         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
15301         (start_function): Use DECL_FRIEND_CONTEXT, not
15302         DECL_CLASS_CONTEXT.  Use decl_function_context, not
15303         hack_decl_function_context.
15304         (finish_function): Use decl_function_context, not
15305         hack_decl_function_context.
15306         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
15307         DECL_CLASS_CONTEXT.
15308         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
15309         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
15310         (grokfield): Likewise.
15311         (finish_builtin_type): Likewise.
15312         (finish_vtable_vardec): Use decl_function_context, not
15313         hack_decl_function_context.
15314         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15315         (start_static_initialization_or_destruction): Likewise.
15316         (finish_static_initialization_or_destruction): Likewise.
15317         (mark_used): Adjust logic for deciding when to synthesize methods.
15318         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
15319         DECL_REAL_CONTEXT.
15320         * error.c (dump_function_decl): Use DECL_CONTEXT, not
15321         DECL_CLASS_CONTEXT.
15322         * friend.c (is_friend): Likewise.
15323         (add_friends): Remove.
15324         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
15325         * lex.c (begin_definition_of_inclass_inline): Use
15326         decl_function_context, not hack_decl_function_context.
15327         (process_next_inline): Likewise.
15328         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
15329         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
15330         DECL_CLASSS_CONTEXT.
15331         (hack_identifier): Likewise.
15332         (synthesize_method):  Use decl_function_context, not
15333         hack_decl_function_context.
15334         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
15335         DECL_REAL_CONTEXT.
15336         (is_member_template): Use decl_function_context, not
15337         hack_decl_function_context.  Use DECL_CONTEXT, not
15338         DECL_CLASS_CONTEXT.
15339         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
15340         DECL_CLASS_CONTEXT.
15341         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
15342         DECL_REAL_CONTEXT.
15343         (push_template_decl_real): Likewise.
15344         (instantiate_class_template): Don't call add_friends.
15345         (tsubst_default_argument): Use DECL_CONTEXT, not
15346         DECL_REAL_CONTEXT.
15347         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
15348         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15349         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
15350         DECL_CLASS_CONTEXT.
15351         * repo.c (repo_inline_used): Likewise.
15352         * search.c (current_scope): Adjust for new _CONTEXT macros.
15353         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
15354         DECL_REAL_CONTEXT.
15355         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15356         (lookup_fnfields_here):Likewise.
15357         (check_final_overrider): Likewise.
15358         (init_vbase_pointers): Likewise.
15359         (virtual_context): Likewise.
15360         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
15361         (expand_body): Use decl_function_context, not
15362         hack_decl_function_context.
15363         * tree.c (hack_decl_function_context): Remove.
15364         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
15365         DECL_CLASS_CONTEXT.
15366         * typeck2.c (error_not_base_type): Likewise.
15367
15368 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
15369
15370         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
15371
15372 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15373
15374         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
15375
15376 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
15377
15378         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
15379
15380 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
15381
15382         * decl2.c (lang_decode_option): Enable automatic line wrapping.
15383
15384 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
15385
15386         * parse.y (frob_specs): Split out...
15387         (parse_decl): From here.
15388         (fn.def2): Call initial_deferred_type_access_control.
15389         (after_type_component_declarator0): Call frob_specs.
15390         (notype_component_declarator0): Likewise.
15391         * search.c (friend_accessible_p): Nested classes are friends of their
15392         enclosing classes.
15393
15394 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
15395
15396         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
15397         used to create an implicit temporary.
15398
15399         * class.c (dfs_modify_vtables): Tweak calculation of functions to
15400         override.
15401
15402 2000-02-08  Nathan Sidwell  <nathan@acm.org>
15403
15404         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
15405         strip array element qualifiers too.
15406
15407 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
15408
15409         * decl.c (store_parm_decls): Don't build cleanups for parameters
15410         while processing_template_decl.
15411
15412 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
15413
15414         * cp-tree.h (struct saved_scope): Add incomplete field.
15415         (namespace_scope_incomplete): New macro.
15416         * decl.c (pushdecl): Use it.
15417         (hack_incomplete_structures): Use it.  See through artificial
15418         binding levels.
15419         (mark_saved_scope): Mark it.
15420
15421         Implement access control for nested types.
15422         * search.c (type_access_control): New fn.
15423         (accessible_p): Now we do perform access control for types.
15424         * semantics.c (deferred_type_access_control): New fn.
15425         (initial_deferred_type_access_control): New fn.
15426         (begin_function_definition): Call it.  Add lookups parm.
15427         * decl.c (struct binding_level): Add this_class field.
15428         (pushlevel_class): Set it.
15429         (mark_binding_level): Mark it.
15430         (lookup_name_real): Use it.  Call type_access_control.
15431         (mark_saved_scope): Mark lookups field.
15432         * cp-tree.h (flagged_type_tree): Add lookups field.
15433         (struct saved_scope): Add lookups field.
15434         (type_lookups): New macro.
15435         * parse.y (declmods): Now <ftype>.
15436         (parse_decl): Add lookups parm.  Call
15437         initial_deferred_type_access_control.
15438         (lang_extdef): Clear type_lookups.
15439         (typed_declspecs, declmods, typespec): Set lookups field.
15440         (initdcl): Call deferred_type_access_control.
15441         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
15442         component_decl_1, named_parm): Adjust.
15443         * friend.c (is_friend): Nested classes are friends of their
15444         enclosing classes.
15445
15446         * class.c (currently_open_derived_class): New fn.
15447         * method.c (hack_identifier): Use it.
15448
15449         * lex.c (do_identifier): Remove obsolete code.
15450
15451         * parse.y (typed_typespecs): Propagate new_type_flag properly.
15452
15453 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
15454
15455         * tinfo.h: Remove apostrophes from C++ comment (xgettext
15456         thinks this file is plain C).
15457
15458 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15459
15460         * Makefile.in (call.o): Depend on $(EXPR_H).
15461
15462         * call.c: Include "expr.h".
15463
15464         * class.c (dump_class_hierarchy): Add prototype.
15465
15466         * search.c (dfs_get_pure_virtuals): Likewise.
15467
15468 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
15469
15470         * parse.y (simple_stmt): Allow :: token in asm parameter list.
15471         * parse.c: Rebuilt.
15472
15473 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
15474
15475         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
15476         Store it in DECL_FCONTEXT.
15477         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
15478
15479 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
15480
15481         * tinfo.h (old abi): #include "tconfig.h".
15482         * tinfo.cc (convert_to_base): Move into old abi section.
15483
15484 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
15485
15486         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
15487         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
15488         (BINFO_PRIMARY_BINFO): New macro.
15489         (BF_DELTA): Rename to ...
15490         (BV_DELTA): ... this.
15491         (BF_VCALL_INDEX): Rename to ...
15492         (BV_VCALL_INDEX): ... this.
15493         (BF_FN): Rename to ...
15494         (BV_FN): ... this.
15495         * class.c (build_vbase_path): Adjust for changes to reverse_path.
15496         (set_rtti_entry): Rename BF_ macros to BV_ variants.
15497         (modify_vtable_entry): Simplify.
15498         (add_virtual_function): Rename BF_ macros to BV_ variants.
15499         (build_vtable_initializer): Likewise.
15500         (get_class_offset_1): Remove.
15501         (dfs_get_class_offset): Likewise.
15502         (get_class_offset): Likewise.
15503         (dfs_find_final_overrider): New function.
15504         (find_final_overrider): Likewise.
15505         (modify_one_vtable): Remove.
15506         (dfs_find_base): New function.
15507         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
15508         find_final_overrider.
15509         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
15510         virtuals.
15511         (dfs_fixup_vtable_deltas): Remove.
15512         (override_one_vtable): Remove.
15513         (merge_overrides): Likewise.
15514         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
15515         unreal chilren of virtual bases.
15516         (finish_struct_1): Don't use merge_overrides.  Don't use
15517         dfs_fixup_vtable_deltas.
15518         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
15519         BINFOs.
15520
15521 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
15522             Jason Merrill  <jason@yorick.cygnus.com>
15523
15524         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
15525
15526 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
15527
15528         * exception.cc (__throw_bad_typeid): Add missing std::.
15529
15530 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15531
15532         * cp-tree.h (make_thunk): PROTO -> PARAMS.
15533
15534 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
15535
15536         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
15537
15538         Runtime support for new-abi rtti.
15539         * inc/typeinfo (type_info::operator!=): Define in class.
15540         (type_info::before, type_info::name, type_info::operator==,
15541         type_info::operator!=): Define new ABI implementations.
15542         (type_info::is_pointer_p, type_info::is_function_p): Declare
15543         new virtual functions.
15544         (type_info::do_catch, type_info::do_upcast): Likewise.
15545
15546         * tinfo.h (__base_class_info): Define new class.
15547         (__class_type_info): Likewise.
15548         (__si_class_type_info): Likewise.
15549         (__vmi_class_type_info): Likewise.
15550         (__dynamic_cast): Prototype.
15551
15552         * tinfo.cc: Conditionalize old and new rtti mechanisms.
15553         (type_info::is_pointer_p): Define new function.
15554         (type_info::is_function_p): Likewise.
15555         (type_info::do_catch): Likewise.
15556         (type_info::do_upcast): Likewise.
15557         (vtable_prefix): New structure for vtable access.
15558         (adjust_pointer): Define new template function.
15559         (contained_p, public_p, virtual_p, contained_public_p,
15560         contained_nonpublic_p, contained_nonvirtual_p): Define new
15561         functions.
15562         (nonvirtual_base_type): New local variable.
15563         (__class_type_info::~__class_type_info): Define.
15564         (__si_class_type_info::~__si_class_type_info): Likewise.
15565         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
15566         (__class_type_info::do_catch): Define new function.
15567         (__class_type_info::do_upcast): Likewise.
15568         (__class_type_info::find_public_src): Likewise.
15569         (__class_type_info::do_find_public_src): Likewise.
15570         (__si_class_type_info::do_find_public_src): Likewise.
15571         (__vmi_class_type_info::do_find_public_src): Likewise.
15572         (__class_type_info::do_dyncast): Likewise.
15573         (__si_class_type_info::do_dyncast): Likewise.
15574         (__vmi_class_type_info::do_dyncast): Likewise.
15575         (__class_type_info::do_upcast): Likewise.
15576         (__si_class_type_info::do_upcast): Likewise.
15577         (__vmi_class_type_info::do_upcast): Likewise.
15578         (__dynamic_cast): Likewise.
15579
15580         * tinfo2.cc (__fundamental_type_info): Define new class.
15581         (__pointer_type_info): Likewise.
15582         (__reference_type_info): Likewise.
15583         (__array_type_info): Likewise.
15584         (__function_type_info): Likewise.
15585         (__enum_type_info): Likewise.
15586         (__ptr_to_member_type_info): Likewise.
15587         (__fundamental_type_info::~__fundamental_type_info): Define.
15588         (__pointer_type_info::~__pointer_type_info): Likewise.
15589         (__reference_type_info::~__reference_type_info): Likewise.
15590         (__array_type_info::~__array_type_info): Likewise.
15591         (__function_type_info::~__function_type_info): Likewise.
15592         (__enum_type_info::~__enum_type_info): Likewise.
15593         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
15594         (__pointer_type_info::do_catch): Define new function.
15595         (__ptr_to_member_type_info::do_catch): Define new function.
15596
15597         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
15598         (__is_pointer): Likewise.
15599
15600         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
15601
15602 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
15603
15604         * cp/class.c (build_vtable): Rename to build_primary_vtable.
15605         (prepare_fresh_vtable): Rename to build_secondary_vtable.
15606         (make_new_vtable): New function.
15607         (modify_vtable_entry): Handle generation of new vtables correctly.
15608         (modify_one_vtable): Remove unused parameter.
15609         (dfs_fixup_vtable_deltas): Likewise.
15610         (override_one_vtable): Use build_secondary_vtable.
15611         (finish_struct_1): Use build_primary_vtable and
15612         build_secondary_vtable.
15613
15614 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
15615
15616         * cp/decl.c: Adjust variable names, comments, help strings.
15617
15618 2000-01-29  Nathan Sidwell  <nathan@acm.org>
15619
15620         * new2.cc (operator delete[]): Use operator delete, don't assume
15621         implementation.
15622
15623 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
15624
15625         * class.c (build_vtbl_initializer): Add argument to
15626         build_vtable_entry call.
15627
15628 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
15629
15630         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
15631         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
15632         (BF_DELTA): New macro.
15633         (BF_VCALL_INDEX): Likewise.
15634         (BF_FN): Likewise.
15635         (THUNK_VCALL_OFFSET): Likewise.
15636         (make_thunk): Change prototype.
15637         * class.c (build_vtable_entry): Integrate
15638         build_vtable_entry_for_fn.  Handle vcall indices.
15639         (build_vtable_entry_for_fn): Remove.
15640         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
15641         BF_VCALL_INDEX, BF_FN.
15642         (modify_vtable_entry): Integrate common code from
15643         modify_one_vtable and dfs_fixup_vtable_deltas.
15644         (add_virtual_function): Set BF_VCALL_INDEX.
15645         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
15646         and BF_FN.
15647         (modify_one_vtable): Simplify.
15648         (dfs_fixup_vtable_deltas): Likewise.
15649         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
15650         * method.c (make_thunk): Handle vcall indices.
15651
15652 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
15653
15654         Compiler side new abi rtti (not enabled).
15655         * cp-tree.h (new_abi_rtti_p): New macro.
15656         (emit_support_tinfos): Prototype new function.
15657         (tinfo_decl_p): Likewise.
15658         (emit_tinfo_decl): Likwise.
15659         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
15660         macros.
15661         (doing_runtime): New local static.
15662         (init_rtti_processing): Add new-abi initializer.
15663         (get_tinfo_decl): Add new-abi logic.
15664         (tinfo_from_decl): Likewise.
15665         (build_dynamic_cast_1): Likewise.
15666         (qualifier_flags): New static function.
15667         (tinfo_base_init): Likewise.
15668         (generic_initializer): Likewise.
15669         (ptr_ref_initializer): Likewise.
15670         (ptmd_initializer): Likewise.
15671         (class_hint_flags): Likewise.
15672         (class_initializer): Likewise.
15673         (synthesize_tinfo_var): Likewise.
15674         (create_real_tinfo_var): Likewise.
15675         (create_pseudo_type_info): Likewise.
15676         (get_vmi_pseudo_type_info): Likewise.
15677         (create_tinfo_types): Likewise.
15678         (emit_support_tinfos): New global function.
15679         (tinfo_decl_p): New global predicate.
15680         (emit_tinfo_decl): New global function.
15681         * class.c (set_rtti_entry): Generalize for old and new rtti.
15682         (build_vtbl_initializer): Likewise.
15683         * decl2.c (finish_file): Likewise.
15684
15685 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
15686
15687         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
15688         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
15689
15690 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
15691
15692         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
15693         for scopes.
15694
15695 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
15696
15697         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
15698
15699 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
15700
15701         * optimize.c (calls_setjmp_r): Supply new argument
15702         to special_function_p.
15703
15704 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15705
15706         * call.c: PROTO -> PARAMS.
15707         * class.c: Likewise.
15708         * cp-tree.h: Likewise.
15709         * cvt.c: Likewise.
15710         * decl.c: Likewise.
15711         * decl.h: Likewise.
15712         * decl2.c: Likewise.
15713         * dump.c: Likewise.
15714         * errfn.c: Likewise.
15715         * error.c: Likewise.
15716         * except.c: Likewise.
15717         * expr.c: Likewise.
15718         * init.c: Likewise.
15719         * input.c: Likewise.
15720         * lex.c: Likewise.
15721         * lex.h: Likewise.
15722         * method.c: Likewise.
15723         * optimize.c: Likewise.
15724         * parse.y: Likewise.
15725         * pt.c: Likewise.
15726         * repo.c: Likewise.
15727         * rtti.c: Likewise.
15728         * search.c: Likewise.
15729         * semantics.c: Likewise.
15730         * spew.c: Likewise.
15731         * tree.c: Likewise.
15732         * typeck.c: Likewise.
15733         * typeck2.c: Likewise.
15734         * xref.c: Likewise.
15735
15736 2000-01-25  Richard Henderson  <rth@cygnus.com>
15737
15738         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
15739
15740 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
15741
15742         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
15743         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
15744         (struct vcall_offset_data_s): New type.
15745         (dfs_vcall_offset_queue_p): New function.
15746         (dfs_build_vcall_offset_vtbl_entries): Likewise.
15747         (build_vcall_offset_vtbl_entries): Likewise.
15748         (layout_vtable_decl): Likewise.
15749         (num_vfun_entries): Likewise.
15750         (num_extra_vtbl_entries): Add the entries for vcall offsets.
15751         (build_vtbl_initializer): Likewise.
15752         (dfs_finish_vtabls): Use layout_vtable_decl.
15753         (modify_one_vtables): Always duplicate vtables under the new ABI.
15754         (finish_struct_1): Use layout_vtable_decl.
15755
15756 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15757
15758         * decl.c (member_function_or_else): Change third arg from a format
15759         specifier to an `enum overload_flags'.  Callers changed.
15760
15761 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
15762
15763         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
15764         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
15765         build_const_cast, get_delta_difference, check_return_expr): Avoid
15766         ANSI string concatenation usage.
15767
15768 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
15769
15770         * class.c (layout_class_type): Put the fields required to make a
15771         class non-empty at the end, not the beginning, of the TYPE_FIELDs
15772         list.
15773
15774 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
15775
15776         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
15777         template.
15778
15779         * decl2.c (mark_used): Do instantiate inlines that have been
15780         explicitly instantiated.
15781
15782 2000-01-24  Richard Henderson  <rth@cygnus.com>
15783
15784         * call.c (build_over_call): Use expand_tree_builtin.
15785         * typeck.c (build_function_call_real): Likewise.
15786         (build_binary_op_nodefault): Handle unordered compares.
15787
15788 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
15789
15790         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
15791         cp_tree_index values.
15792         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
15793         New global node #defines for them.
15794         * rtti.c (call_void_fn): Replace with ...
15795         (build_runtime_decl): ... new static function.
15796         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
15797         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
15798         (build_dynamic_cast_1): Always produce correctly typed result.
15799         Explicitly produce type_info addresses. Use dynamic_cast_node.
15800         * exception.cc (__throw_bad_cast): Return `void *'.
15801         (__throw_bad_typeid): Return `const type_info &'.
15802
15803 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
15804
15805         * cp-tree.h (get_vtable_decl): Prototype new function.
15806         * class.c (get_vtable_decl): New function. Broken out from ...
15807         (build_vtable): ... here. Use it.
15808         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
15809         by get_vtable_decl.
15810
15811 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
15812
15813         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
15814         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
15815         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
15816         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
15817         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
15818         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
15819         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
15820         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
15821         (CPTI_TINFO_VAR_ID): New enumeration.
15822         (__tp_desc_type_node, __access_mode_type_node,
15823         __bltn_desc_type_node, __user_desc_type_node,
15824         __class_desc_type_node, __ptr_desc_type_node,
15825         __attr_desc_type_node, __func_desc_type_node,
15826         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
15827         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
15828         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
15829         enum_desc_type_node, class_desc_type_node,
15830         si_class_desc_type_node, vmi_class_desc_type_node,
15831         ptmd_desc_type_node, base_desc_type_node): New #defines.
15832         (tinfo_fn_id, tinfo_fn_type): Rename to ...
15833         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
15834         (tinfo_var_id): New enumeration.
15835         (DECL_TINFO_FN_P): Augment comment.
15836         * decl.c (cp_global_trees): Adjust documentation.
15837         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
15838         tinfo_decl_type and tinfo_var_id.
15839         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
15840         (build_typeid): Remove unused variable.
15841         (get_tinfo_var): Use tinfo_var_id.
15842         (tinfo_name): New static function.
15843         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
15844         (tinfo_from_decl): Likewise.
15845         (get_base_offset): New static function, broken out of
15846         expand_class_desc.
15847         (expand_si_desc): Use tinfo_name.
15848         (expand_class_desc): Likewise. Lose local static variable.
15849         Use base_desc_type_node. Use get_base_offset.
15850         (expand_ptr_desc): Use tinfo_name.
15851         (expand_attr_desc): Likewise.
15852         (expand_generic_desc): Likewise.
15853
15854         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
15855         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
15856
15857 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
15858
15859         * cp-tree.h (__eprintf): Remove declaration.
15860         * tree.c (__eprintf): Remove definition.
15861
15862 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
15863             Mark Mitchell  <mark@codesourcery.com>
15864
15865         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
15866         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
15867
15868 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
15869
15870         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
15871
15872 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
15873
15874         * cp-tree.h (register_dtor_fn): New function.
15875         * decl.c (destroy_local_static): Rename to ...
15876         (register_dtor_fn): ... this.  Give it external linkage.
15877         (expand_static_init): Use it.
15878         * decl2.c (do_static_initialization): Likewise, if using
15879         __cxa_atexit.
15880         (do_static_destruction): Check that __cxa_atexit is not in use.
15881         (finish_file): Don't call do_static_destruction if using
15882         __cxa_atexit.
15883
15884         * typeck.c (convert_arguments): Restore two-message error
15885         reporting.
15886
15887 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
15888
15889         Remap dynamic cast hint values to be consistent across ABIs.
15890         * search.c (dynamic_cast_base_recurse): Remap generated value.
15891         (get_dynamic_cast_base_type): Adjust documentation.
15892         * tinfo.h (__user_type_info::dyncast): Likewise.
15893         (__user_type_info::find_public_subobj): Remap BOFF meaning.
15894         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
15895         (__class_type_info::do_dyncast): Likewise.
15896         (__class_type_info::do_find_public_subobj): Likewise.
15897         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
15898
15899 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
15900
15901         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
15902
15903         * typeck2.c (incomplete_type_error): Restore previous
15904         cp_error and cp_error_at call sequence.
15905
15906 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
15907
15908         * class.c (dump_class_hierarchy): Make format agree with argument;
15909         cast pointer to unsigned long and print with %lx.
15910
15911 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
15912
15913         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
15914
15915         * typeck.c (composite_pointer_type, common_type,
15916         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
15917         build_function_call_real, convert_arguments,
15918         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
15919         build_unary_op, mark_addressable, build_compound_expr,
15920         build_static_cast, build_reinterpret_cast, build_const_cast,
15921         build_c_cast, build_modify_expr, get_delta_difference,
15922         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
15923         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
15924         into a single one.
15925         * typeck2.c (readonly_error, abstract_virtuals_error,
15926         process_init_constructor, check_for_new_type): Likewise.
15927
15928 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
15929
15930         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
15931         VAR_DECLs.
15932
15933 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
15934
15935         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
15936         (build_x_typeid): Likewise.
15937         (get_tinfo_fn): Likewise.
15938         (get_tinfo_fn_unused): Rename to ...
15939         (get_tinfo_decl): ... here.
15940         * rtti.c (build_headof): Replace logic error with assertion.
15941         (get_tinfo_fn_dynamic): Rename to ...
15942         (get_tinfo_decl_dynamic): ... here. Make static. Use
15943         complete_type_or_else.
15944         (build_x_typeid): Move into ...
15945         (build_typeid): ... here. Adjust call to
15946         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
15947         throw_bad_typeid expression.
15948         (get_tinfo_fn_unused): Rename to ...
15949         (get_tinfo_decl): ... here. Adjust comment.
15950         (get_tinfo_fn): Delete.
15951         (tinfo_from_decl): New static function.
15952         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
15953         (get_typeid): Use complete_type_or_else.
15954         (build_dynamic_cast_1): Adjust calls to
15955         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
15956         * parse.y (primary): Adjust call to build_typeid.
15957         * except.c (build_eh_type_type_ref): Adjust call to
15958         get_tinfo_decl. Mark as used.
15959         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
15960         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
15961         * parse.c: Regenerated.
15962
15963 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
15964
15965         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
15966         calling convention.
15967         (resolves_to_fixed_type_p): Document calling convention.
15968         * rtti.c (build_x_typeid): Initialize NONNULL.
15969
15970         * cp-tree.h (build_shared_int_cst): New function.
15971         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
15972         * class.c (modify_vtable_entry): Likewise.
15973         (add_virtual_function): Split out code to generated shared
15974         INTEGER_CSTs to build_share_int_cst.
15975         (modify_all_vtables): Handle all the overridden functions here.
15976         Add overridden functions from non-primary virtual bases to the
15977         primary vtable.
15978         (finish_struct_1): Adjust call to modify_all_vtables.  Add
15979         overridden functions from non-primary bases to the vtable.
15980         * tree.c (build_shared_int_cst): New function.
15981
15982         * cp-tree.h (scratchalloc): Remove.
15983         (build_scratch_list): Likewise.
15984         * call.c (convert_class_to_reference): Replace build_scratch_list
15985         and build_expr_list with build_tree_list.
15986         (add_candidate): Replace scratchalloc with expralloc.  Note memory
15987         leak.
15988         (build_user_type_conversion_1):  Replace build_scratch_list
15989         and build_expr_list with build_tree_list.
15990         (build_new_op): Likewise.
15991         (build_op_delete_call): Likewise.
15992         (convert_like): Likewise.
15993         * cvt.c (ocp_convert): Likewise.
15994         * decl.c (start_decl): Likewise.
15995         (start_function): Likewise.
15996         (finish_destructor_body): Likewise.
15997         (maybe_build_cleanup_1): Likewise.
15998         * decl2.c (reparse_decl_as_expr): Likewise.
15999         * init.c (perform_member_init): Likewise.
16000         (expand_cleanup_for_base): Likewise.
16001         (build_builtin_delete_call): Likewise.
16002         (build_new_1): Likewise.
16003         (build_delete): Likewise.
16004         * method.c (do_build_assign_ref): Likewise.
16005         * parse.y (already_scoped_stmt): Likewise.
16006         (nontrivial_exprlist): Likewise.
16007         (net_initializer): Likewise.
16008         (initlist): Likewise.
16009         * parse.c: Regenerated.
16010         * rtti.c (build_x_typeid): Likewise.
16011         (build_dynamic_cast_1): Likewise.
16012         * typeck.c (build_x_compound_expr): Likewise.
16013         (build_static_cast): Likewise.
16014         (build_modify_expr): Likewise.
16015
16016         * cp-tree.h (DECL_VINDEX): Add documentation.
16017         * class.c (build_vtable_entry): Likewise.
16018         (start_vtable): Add comment.
16019         (add_virtual_function): Replace pending_hard_virtuals with
16020         overridden_virtuals and pending_virtuals with new_virtuals.
16021         Replace redundant assignments with assertions.
16022         (check_for_override): Add comment.
16023         (check_bases_and_members): Replace pending_hard_virtuals with
16024         overridden_virtuals and pending_virtuals with new_virtuals.
16025         (create_vtbl_ptr): Likewise.
16026         (layout_class_type): Likewise.
16027         (finish_struct_1): Likewise.  Add comments.
16028
16029 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
16030
16031         * class.c (finish_struct_1): Replace redundant code with
16032         assertions.
16033
16034         * cp-tree.h (flag_new_abi): Move.
16035         (flag_use_cxa_atexit): Likewise.
16036         (flag_honor_std): Likewise.
16037         (flag_rtti): Likewise.
16038         (vbase_offsets_in_vtable_p): Define.
16039         (vptrs_present_everywhere_p): Likewise.
16040         (TYPE_CONTAINS_VPTR_P): Likewise.
16041         (dfs_walk_real): Declare.
16042         * class.c (build_vbase_pointer_fields): Check
16043         vbase_offsets_in_vtable_p.
16044         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
16045         BINFO_VPTR_FIELD.
16046         (build_vbase_offset_vtbl_entries): Simplify.
16047         (build_vbase_offset_vtbl_entries): Adjust.
16048         (build_vbase_pointer): Add ability to look up vbase offsets in
16049         vtable.
16050         (start_vtable): New function.
16051         (add_virtual_function): Use it.
16052         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
16053         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
16054         (build_vtbl_initializer): Take the type of the complete object as
16055         input.  Use it to correctly calculate vbase offsets.
16056         (dfs_finish_vtbls): Pass the complete type to
16057         build_vtbl_initializer.
16058         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
16059         (create_vtable_ptr): Create a vtable even if there are no
16060         new virtual functions, under the new ABI.
16061         (finish_struct_1): Likewise.
16062         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
16063         * decl.c (exapnd_static_init): Remove call to
16064         preserve_initializer.
16065         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
16066         vtables.
16067         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
16068         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
16069         (construct_virtual_bases): Don't initialize virtual base pointers
16070         under the new ABI.
16071         (build_aggr_init): Clean up comment.
16072         (expand_aggr_init_1): Likewise.
16073         * rtti.c (expand_class_desc): Store the virtual function table
16074         index where the vbase offset lives in the offset field.
16075         * search.c (dfs_walk_real): Make it global.
16076         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
16077         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
16078
16079         * tinfo.h (USItype): Make it signed under the new ABI.
16080         * tinfo.cc (convert_to_base): New function.  Encapsulate base
16081         conversion logic here.
16082         (__class_type_info::do_upcast): Use it.
16083         (__class_type_info::do_dyncast): Likewise.
16084         (__class_type_info::do_find_public_subobj): Likewise.
16085
16086         * init.c (construct_virtual_bases): Don't look up the addresses of
16087         virtual bases at run-time.
16088
16089         * class.c (build_vbase_pointer): Relocate.
16090         (build_vbase_pointer_fields): Likewise.
16091         (dfs_build_vbase_offset_vtbl_entries): Likewise.
16092         (build_vbase_offset_vtbl_entries): Likewise.
16093
16094         * decl.c (init_decl_processing): Complain if -fnew-abi
16095         -fno-vtable-thunks is used.
16096
16097         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
16098         flag_new_abi.
16099
16100 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
16101
16102         * cp-tree.h (num_extra_vtbl_entries): New function.
16103         (size_extra_vtbl_entries): Likewise.
16104         (dfs_vtable_path_unmark): Likewise.
16105         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
16106         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
16107         * class.c (num_extra_vtbl_entries): New function.
16108         (size_extra_vtbl_entries): Likewise.
16109         (dfs_build_vbase_offset_vtbl_entries): New function.
16110         (build_vbase_offset_vtbl_entries): Likewise.
16111         (build_vtbl_initializer): Use it.
16112         (finish_struct_1): Adjust vtable sizes (using
16113         num_extra_vtbl_entries).
16114         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
16115         THUNK_DECL is non-NULL before expanding it.
16116         * init.c (expand_virtual_init): Adjust the vtable pointer by
16117         size_extra_vtbl_entries before storing it.
16118         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
16119         Handle TREE_LIST parameters here, not in the dfs_* functions.
16120         (dfs_unmarked_real_bases_queue_p): Adjust.
16121         (dfs_marked_real_bases_queue_p): Likewise.
16122         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
16123         (dfs_vtable_path_marked_real_bases_queue_p): New function.
16124         (dfs_vtable_path_unmark): Likewise.
16125
16126 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
16127
16128         * optimize.c (copy_body_r): Clear the operand three of a
16129         TARGET_EXPR when copying it.
16130
16131 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16132
16133         * method.c (build_decl_overload_real): Check whether we are in ::
16134         before returning __builtin_new/delete.
16135
16136 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
16137
16138         * pt.c (tsubst_friend_function): Improve comment.
16139         (instantiate_decl): Avoid crashing when a "nested" function is
16140         instantiated from the top level.
16141
16142         * dump.c (dqeueue_and_dump): Dump
16143         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
16144
16145 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16146
16147         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
16148
16149 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
16150
16151         * g++spec.c (lang_specific_driver): Add -fnew-abi if
16152         ENABLE_NEW_GXX_ABI defined.
16153         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
16154         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
16155         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
16156
16157 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
16158
16159         * decl.c (start_cleanup_fn): Call pushdecl.
16160
16161         * call.c (convert_class_to_reference): Fix typos.
16162         (build_conditional_expr): Handle errors gracefully.
16163         * class.c (push_nested_class): Likewise.
16164         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
16165         (DECL_THIS_EXTERN): Use it.
16166         (DECL_THIS_STATIC): Likewise.
16167         * cvt.c (convert_to_void): Handle errors gracefully.
16168         (build_expr_type_conversion): Likewise.
16169         * decl.c (maybe_push_decl): Likewise.
16170         (start_decl_1): Likewise.
16171         (require_complete_types_for_parms): Likewise.
16172         * parse.y (structsp): Likewise.
16173         (base_class): Likewise.
16174         * parse.c: Regenerated.
16175         * pt.c (finish_member_template_decl): Likewise.
16176         * typeck.c (decay_conversion): Likewise.
16177
16178         * cp-tree.h (dfs_skip_vbases): New function.
16179         (find_vbase_instance): Likewise.
16180         * class.c (determine_primary_base): Allow a nearly empty base to
16181         serve as a primary base class under the new ABI.
16182         (get_class_offset_1): Rename to ...
16183         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
16184         messages here.
16185         (get_class_offset): Use it.  Issue error messages here.
16186         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
16187         find the right copies of virtual bases.
16188         (fixup_vtable_deltas1): Rename to ...
16189         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
16190         bases as primary bases.
16191         (fixup_vtable_deltas): Remove.
16192         (override_one_vtable): Handle virtual bases as primary bases.
16193         (merge_overrides): Likewise.
16194         (finish_struct_1): Likewise.
16195         (dump_class_hierarchy): Dump primary-ness of bases as well.
16196         * search.c (mark_primary_bases): Use a pre-order traversal to
16197         handle primary virtual bases.
16198         (dfs_skip_vbases): New fiunction.
16199         (expand_upcast_fixups): Adjust to handle primary virtual bases.
16200         (fixup_virtual_upcast_offsets): Likewise.
16201         (fixup_all_virtual_upcast_offsets): Likewise.
16202         (dfs_find_vbase_instances): New function.
16203         (find_vbase_instance): Likewise.
16204
16205 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
16206
16207         * lex.c (DIR_SEPARATOR): Delete macro.
16208
16209 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
16210
16211        * decl2.c (lang_decode_option): Handle automatic line wrapping
16212        option.
16213
16214 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
16215
16216         * friend.c (do_friend): Don't resolve scopes when processing
16217         template declarations, even if the qualifying scope doesn't
16218         involve template parameters.
16219
16220 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
16221
16222         * class.c (dfs_modify_vtables_queue_p): Remove.
16223         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
16224         and dfs_marked_real_bases_queue_p instead of
16225         dfs_modify_vtables_queue_p.
16226
16227         * class.c (build_vbase_path): Simplify.
16228         (dfs_propagate_binfo_offsets): New function.
16229         (propagate_binfo_offsets): Use it.
16230         (remove_base_field): Simplify.
16231         (dfs_set_offset_for_vbases): Remove.
16232         (dfs_set_offset_for_shared_vbases): New function.
16233         (dfs_set_offset_for_unshared_vbases): Likewise.
16234         (layout_virtual_bases): Use them.
16235         (layout_basetypes): Don't call propagate_binfo_offsets.
16236         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
16237         for the vbases.
16238
16239         * class.c (build_base_field): New function, split out from ...
16240         (build_base_fields): ... here.  Use it.  Allocate primary bases
16241         first, under the new ABI.
16242         (get_vtable_entry): Remove.
16243         (remove_base_field): New function, split out from ...
16244         (remove_base_fields): ... here.  Adjust since primary bases come
16245         first under the new ABI.
16246
16247         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
16248         (initialize_vtbl_ptrs): New function.
16249         (expand_indirect_vtbls_init): Change prototype.
16250         (convert_pointer_to_vbase): Declare.
16251         * init.c (expand_direct_vtbls_init): Remove.
16252         (dfs_initialize_vtbl_ptrs): New function.
16253         (initialize_vtbl_ptrs): Likewise.
16254         (emit_base_init): Use initialize_vtbl_ptrs.
16255         * search.c (convert_pointer_to_vbase): Make it global.
16256         (expand_indirect_vtbls_init): Remove vtable initialization code.
16257         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
16258
16259         * class.c (dfs_finish_vtbls): New function.
16260         (finish_vtbls): Use it.
16261         (dump_class_hierarchy): New function.
16262
16263         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
16264         (BINFO_VBASE_PRIMARY_P): New macro.
16265         (BINFO_VIRTUALS): Add to documentation.
16266         (SET_BINFO_PRIMARY_MARKED_P): Remove.
16267         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
16268         (dfs_mark_primary_bases_queue_p): Likewise.
16269         (dfs_unmarked_real_bases_queue_p): New function.
16270         (dfs_marked_real_bases_queue_p): Likewise.
16271         * search.c (dfs_mark_primary_bases): Adjust.
16272         (mark_primary_bases): Likewise.
16273         (get_shared_vbase_if_not_primary): New function.
16274         (dfs_unmarked_real_bases_queue_p): Likewise.
16275         (dfs_marked_real_bases_queue_p): Likewise.
16276         (dfs_get_pure_virtuals): Simplify.
16277         (get_pure_virtuals): Likewise.
16278
16279 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16280
16281         * lex.c: Include tm_p.h.
16282
16283 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
16284
16285         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
16286
16287 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
16288
16289         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
16290         * pt.c (instantiate_decl): Defer comdat templates that might not be
16291         needed.
16292
16293         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
16294         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
16295         (finish_file): Likewise.
16296
16297         * decl2.c (import_export_class): Undo 12/14 change.
16298
16299         * error.c (dump_decl): operator new, not operatornew.
16300
16301         * class.c (field_decl_cmp): A nontype is "greater" than a type.
16302         * search.c (lookup_field_1): Look for the last field with the
16303         desired name.
16304
16305 2000-01-05  Nathan Sidwell  <nathan@acm.org>
16306
16307         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
16308         FUNCTION_DECL.
16309
16310 2000-01-05  Nathan Sidwell  <nathan@acm.org>
16311
16312         * typeck.c (build_static_cast): Don't strip target qualifiers
16313         when casting from a class.
16314
16315 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16316
16317         * class.c (warn_hidden): Initialize variable `fndecl'.
16318
16319 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
16320
16321         * decl.c (flag_isoc9x): New variable to be able to use code in
16322         c-common.c.  For now always zero.
16323
16324 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
16325
16326         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
16327         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
16328         or unshare_base_binfos for virtual bases here.
16329         * search.c (dfs_get_vbase_types): Do it here.
16330         (get_vbase_types): Adjust.
16331
16332 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
16333
16334         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
16335         (BINFO_PRIMARY_MARKED_P): Use flag 5.
16336         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
16337         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
16338         (unmark_primary_bases): Remove declaration.
16339         (unmarkedp): Declare.
16340         (dfs_vbase_unmark): Likewise.
16341         * class.c (determine_primary_base): Return immediately if there
16342         are no base classes.  Call mark_primary_bases here.
16343         (modify_all_direct_vtables): Remove.
16344         (modify_all_indirect_vtables): Remove.
16345         (dfs_modify_vtables_queue_p): New function.
16346         (dfs_modify_vtables): New function.
16347         (modify_all_vtables): Use them.
16348         (build_base_fields): Build FIELD_DECLs for primary virtual base
16349         classes.
16350         (create_vtable_ptr): Don't call determine_primary_base here.
16351         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
16352         (dfs_set_offset_for_vbases): ... this.
16353         (layout_virtual_bases): Use it.
16354         (layout_class_type): Call determine_primary_base here.
16355         * search.c (unmarkedp): Make it global.
16356         (shared_marked_p): Simplify.
16357         (shared_unmarked_p): Likewise.
16358         (dfs_primary_bases_queue_p): Remove.
16359         (dfs_unmark_primary_bases): Likewise.
16360         (unmark_primary_bases): Likewise.
16361         (mark_primary_bases): Simplify.
16362         (get_pure_virtuals): Don't call mark_primary_bases here.
16363         (dfs_vbase_unmark): New function.
16364         (get_vbase_types): Simplify.
16365
16366         * class.c (struct base_info): Remove.
16367         (determine_primary_base): Take has_virtual_p rather than a
16368         base_info as input.  Don't calculate max_has_virtual.
16369         (finish_struct_bits): Remove max_has_virtual argument.
16370         (create_vtable_ptr): Remove max_has_virtual_p argument.
16371         (layout_virtual_bases): Remove max argument.
16372         (layout_basetypes): Likewise.
16373         (layout_class_type): Remove max_has_virtual_p argument.
16374         (finish_struct_1): Remove max_has_virtual.
16375
16376         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
16377         (layout_basetypes): Remove.
16378         * class.c (propagate_binfo_offsets): Moved here from tree.c.
16379         Update to handle primary virtual bases.
16380         (remove_base_fields): New function, split out from
16381         layout_basetypes.
16382         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
16383         (layout_virtual_bases): New function, split out from
16384         layout_basetypes.  Update to handle primary virtual bases.
16385         (layout_basetypes): Moved here from tree.c.  Use
16386         remove_base_fields and layout_virtual_bases.
16387         * search.c (dfs_mark_primary_bases_queue_p): New function.
16388         (mark_primary_bases): Use it.
16389         * tree.c (CEIL): Remove.
16390         (propagate_binfo_offsets): Remove.
16391         (layout_basetypes): Remove.
16392
16393 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
16394
16395         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
16396         (BINFO_PRIMARY_MARKED_P): New macro.
16397         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
16398         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
16399         (mark_primary_bases): New function.
16400         (unmark_primary_bases): Likewise.
16401         * search.c (get_abstract_virtuals_1): Remove.
16402         (dfs_mark_primary_bases): New function.
16403         (mark_primary_bases): Likewise.
16404         (dfs_unmark_primary_bases): Likewise.
16405         (unmark_primary_bases): Likewise.
16406         (dfs_get_pure_virtuals): Likewise.
16407
16408 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
16409
16410         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
16411         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
16412         (modify_one_vtable): Adjust.
16413         (fixup_vtable_deltas1): Likewise.
16414         (override_one_vtable): Likewise.
16415         * search.c (get_abstract_virtuals_1): Likewise.
16416         (get_pure_virtuals): Likewise.
16417         (expand_upcast_fixups): Likewise.
16418         * tree.c (debug_binfo): Likewise.
16419
16420         * class.c (build_vtable): Don't return a value.  Don't rebuild
16421         vtables for bases that have already been handled.
16422         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
16423         already been handled.
16424         (modify_one_vtable): Adjust accordingly.
16425         (fixup_vtable_deltas1): Likewise.
16426         (finish_struct_1): Likewise.
16427
16428 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16429
16430         * call.c (build_new_method_call): Also check destructors.