OSDN Git Service

gcc:
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-05-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2
3         * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
4         libiberty VA_ macros, always use stdarg.
5         * rtti.c (create_pseudo_type_info): Likewise.
6         * tree.c (build_min_nt, build_min): Likewise.
7
8 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9
10         * ptree.c (cxx_print_type, cxx_print_xnode): Use string
11         concatentation on HOST_WIDE_INT_PRINT_* format specifier to
12         collapse multiple function calls into one.
13         * tree.c (debug_binfo): Likewise.       
14
15 2003-05-15  Jason Merrill  <jason@redhat.com>
16
17         PR c++/5388
18         * call.c (conditional_conversion): Don't consider implicit
19         conversions if T2 is a base of T1. 
20         * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
21         (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
22
23         * parser.c (cp_parser_primary_expression): Convert a static data
24         member from reference.
25
26 2003-05-15  Mark Mitchell  <mark@codesourcery.com>
27
28         * call.c (build_op_delete_call): Avoid creating unnecessary types.
29         * class.c (instantiate_type): Remove tests for tf_no_attributes.
30         * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
31         (COMPARE_NO_ATTRIBUTES): Remove.
32         * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
33
34         PR c++/8385
35         * semantics.c (finish_typeof): Refine type-dependency check.
36
37 2003-05-13  Jason Merrill  <jason@redhat.com>
38
39         * typeck.c (build_modify_expr): Don't always stabilize the lhs and
40         rhs.  Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
41
42 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
43
44         * method.c (synthesize_method): Call push/pop_deferring_access_checks.
45
46 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
47
48         PR c++/10230, c++/10481
49         * semantics.c (finish_non_static_data_member): Handle when the
50         non-static member is not from a base of the current class type.
51
52 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
53
54         PR c++/10552
55         * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
56         template and has dependent context.
57
58 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
59
60         * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
61
62 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
63
64         PR c++/9252
65         * cp-tree.h (saved_scope): Remove check_access field.
66         (tsubst_flags_t): Remove tf_parsing.
67         * decl.c (maybe_push_to_top_level): Don't initialize
68         scope_chain->check_access.
69         (make_typename_type, make_unbound_class_template): Don't use
70         tf_parsing.
71         (register_dtor_fn): Use push/pop_deferring_access_checks
72         instead of scope_chain->check_access.
73         * method.c (use_thunk): Likewise.
74         * parser.c (cp_parser_explicit_instantiation
75         (cp_parser_constructor_declarator_p): Don't call
76         push/pop_deferring_access_checks here.
77         (cp_parser_template_argument, cp_parser_class_name): Don't use
78         tf_parsing.
79         (yyparse): Check flag_access_control.
80         * pt.c (instantiate_class_template): Call
81         push/pop_deferring_access_checks.
82         * semantics.c (push_deferring_access_checks): Propagate
83         dk_no_check.
84         (perform_or_defer_access_check): Make sure basetype_path is
85         a type before comparison.
86         * call.c (build_op_delete_call, build_over_call): Use
87         perform_or_defer_access_check.
88         * class.c (alter_access): Likewise.
89         * init.c (build_offset_ref): Likewise.
90         * lex.c (do_identifier): Likewise.
91         * method.c (hack_identifier): Likewise.
92         * search.c (lookup_member): Likewise.
93         * semantics.c (finish_non_static_data_member): Likewise.
94         (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
95         instead of flag_access_control.
96
97 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
98
99         PR c++/9554
100         * parser.c (cp_parser_class_name): Remove check_access parameter.
101         All caller adjusted.  Update declaration.
102         (cp_parser_lookup_name): Likewise.
103         * semantics.c (push_deferring_access_checks): Change parameter type
104         to enum deferring_kind.  All caller adjusted.
105         (resume_deferring_access_checks): Adjust to use new enum.
106         (stop_deferring_access_checks): Likewise.
107         (perform_or_defer_access_check): Likewise.
108         * cp-tree.h (deferring_kind): New enum.
109         (deferred_access): Adjust field type.
110         (push_deferring_access_checks): Update declaration.
111
112 2003-05-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
113
114         PR c++/10555, c++/10576
115         * pt.c (lookup_template_class): Handle class template with
116         multiple levels of parameters when one of the levels contain
117         errors.
118
119 2003-05-08  Jason Merrill  <jason@redhat.com>
120
121         * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
122         expression.  Undo some of the recent reorg.
123
124 2003-05-07  Richard Henderson  <rth@redhat.com>
125
126         PR c++/10570
127         * cfns.gperf: Comment out POSIX thread cancellation points,
128         plus abort and raise.
129         * cfns.h: Regenerate.
130
131 2003-05-07  Jason Merrill  <jason@redhat.com>
132
133         * call.c (build_conditional_expr): Don't assume that the folded
134         expression has result_type.
135
136 2003-05-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
137
138         * typeck.c (build_unary_op): Deal with const qualifier in
139         invalid pointer-to-member earlier.
140
141 2003-05-05  Jason Merrill  <jason@redhat.com>
142
143         PR c++/9537
144         * call.c (conditional_conversion): Build an RVALUE_CONV if
145         we're just changing the cv-quals.
146         (build_conditional_expr): Don't call convert to change
147         cv-quals.
148
149 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
150
151         PR c++/10496
152         * typeck.c (build_unary_op): Don't output const qualifier when
153         output invalid pointer-to-member diagnostics.
154
155 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
156
157         * decl.c: Fix typos.
158
159 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
160
161         PR c++/4494
162         * decl.c (start_function): Use same_type_p to check return type
163         of main.
164
165 2003-05-03  Zack Weinberg  <zack@codesourcery.com>
166
167         PR c/10604
168         * cp/typeck.c (build_x_compound_expr): No need to check
169         extra_warnings as well as warn_unused_value.
170
171 2003-05-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
172
173         PR c++/9364, c++/10553, c++/10586
174         * decl.c (make_typename_type): Don't crash on illegal code.
175
176 2003-05-03  Nathan Sidwell  <nathan@codesourcery.com>
177
178         * class.c (finish_struct): Use location_t and input_location
179         directly.
180         * decl.c (make_label_decl): Likewise.
181         (use_label): Likewise.
182         * decl2.c (warn_if_unknown_interface): Likewise.
183         (start_static_initialization_or_destruction): Likewise.
184         (generate_ctor_or_dtor_function): Likewise.
185         (finish_file): Likewise.
186         * error.c (print_instantiation_full_context): Likewise.
187         * init.c (create_temporary_var): Likewise.
188         * method.c (synthesize_method): Likewise.
189         * parser.c (cp_token): Likewise.
190         (cp_lexer_set_source_position_from_token): Likewise.
191         (cp_lexer_get_preprocessor_token): Likewise.
192         (cp_parser_statement): Likewise.
193         * pt.c (tsubst_friend_function): Likewise.
194         (instantiate_class_template): Likewise.
195         (tsubst_decl): Likewise.
196         (tsubst): Likewise.
197         (instantiate_decl): Likewise.
198         * semantics.c (begin_class_definition): Likewise.
199         (expand_body): Likewise.
200
201 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
202
203         * class.c (finish_struct): Rename lineno to input_line.
204         * decl.c (push_binding_level, pop_binding_level,
205         suspend_binding_level, resume_binding_level, make_label_decl,
206         use_label, start_function): Likewise.
207         * decl2.c (warn_if_unknown_interface,
208         start_static_initialization_or_destruction,
209         generate_ctor_or_dtor_function, finish_file): Likewise.
210         * error.c (cp_line_of, print_instantiation_full_context,
211         print_instantiation_context): Likewise.
212         * except.c (check_handlers_1, check_handlers): Likewise.
213         * init.c (create_temporary_var): Likewise.
214         * method.c (use_thunk, synthesize_method): Likewise.
215         * parser.c (cp_lexer_set_source_position_from_token,
216         cp_lexer_get_preprocessor_token): Likewise.
217         * pt.c (push_tinst_level, pop_tinst_level,
218         tsubst_friend_function, instantiate_class_template, tsubst_decl,
219         tsubst, tsubst_expr, instantiate_decl): Likewise.
220         * semantics.c (genrtl_try_block, finish_label_stmt,
221         begin_class_definition, expand_body,
222         genrtl_finish_function): Likewise.
223         * tree.c (build_min_nt, build_min): Likewise.
224
225 2003-05-01  Mark Mitchell  <mark@codesourcery.com>
226
227         * decl2.c (comdat_linkage): Don't externalize explicit
228         instantiations.
229
230 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
231
232         PR c++/10554
233         * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
234         is not NULL.
235
236 2003-05-01  Steven Bosscher  <steven@gcc.gnu.org>
237
238         * cp-tree.h (struct lang_id2): Remove.  Move fields from here...
239         (struct lang_identifier): ... to here.
240         (LANG_ID_FIELD): Remove.
241         (SET_LANG_ID): Remove.
242         (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
243         (SET_IDENTIFIER_LABEL_VALUE): Likewise.
244         (IDENTIFIER_IMPLICIT_DECL): Likewise.
245         (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
246         (IDENTIFIER_ERROR_LOCUS): Likewise.
247         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
248
249 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
250
251         PR c++/8772
252         * pt.c (convert_template_argument): Correct diagnostic.
253
254 2003-04-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
255
256         PR c++/9432, c++/9528
257         * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
258
259 2003-04-30  Garbiel Dos Reis  <gcc@integrable-solutions.net>
260
261         * decl.c (check_previous_goto_1): Adjust prototype.
262         (check_previous_goto): Adjust use.
263         (check_switch_goto): Likewise.
264         (use_label): Adjust.
265         (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
266         (struct named_label_use_list): Use location_t datatype.
267
268 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
269
270         PR c++/10551
271         * pt.c (mark_decl_instantiated): Defer all explicit instantiations
272         that have not yet been written out.
273
274 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
275
276         PR c++/10549
277         * class.c (layout_class_type): Mark overlong bitfields as having
278         the maximum size permitted by their type, after layout.
279
280         PR c++/10527
281         * error.c (dump_expr): Correctly handling of NEW_EXPR.4
282
283 2003-04-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
284
285         * call.c (build_operator_new_call): Fix typo.
286         * lang-options.h: Likewise.
287
288 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
289
290         PR c++/10515
291         * cp-tree.h (lookup_field_1): Declare it.
292         * search.c (lookup_field_1): Make it public.
293         * decl.c (reshape_init): Handle designated initializers.
294
295         * decl.c (maybe_commonize_var): Further tweak support for systems
296         without weak symbols.
297
298 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
299
300         * decl.c (maybe_commonize_var): Fix thinko in last patch.
301
302 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
303
304         PR c++/10506
305         * method.c (use_thunk): Decrement immediate_size_expand.
306
307         PR c++/10503
308         * cp-tree.h (DECL_VAR_MARKED_P): New macro.
309         (DECL_MAYBE_TEMPLATE): Remove.
310         * class.c (fixed_type_or_null): Avoid infinite recursion.
311
312         * decl.c (maybe_commonize_var): Make the code match the comments.
313         * pt.c (instantiate_decl): Move call to import_export_decl.
314
315 2003-04-26  Mark Mitchell  <mark@codesourcery.com>
316
317         * decl2.c (finish_file): Fix merge botch.
318
319 2003-04-25  Mark Mitchell  <mark@codesourcery.com>
320
321         * decl2.c (finish_file): Don't call import_export_decl for
322         functions that are not defined.
323         (handle_class_head): Robustify.
324         * pt.c (instantiate_decl): Do not call cp_finish_decl for
325         variables that are not defined.
326
327 2003-04-24  Sylvain Pion  <Sylvain.Pion@mpi-sb.mpg.de>
328
329         * call.c (print_z_candidates): Fix off by one error.
330
331 2003-04-24  Nathan Sidwell  <nathan@codesourcery.com>
332
333         PR c++/10337
334         * call.c (joust): Don't warn about conversion ops that are exact
335         or cv-conversions. Rearrange to avoid multiple type comparisons.
336
337 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
338
339         PR c++/10471
340         * call.c (build_cxx_call): Robustify.
341
342 2003-04-23  Neil Booth  <neil@daikokuya.co.uk>
343
344         * Make-lang.in (lex.o): Remove mbchar.h.
345         * lex.c (MULTIBYTE_CHARS): Lose.
346         * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
347         in c-lex.c.
348
349 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
350
351         PR c++/9847
352         * cp-tree.h (duplicate_tag_error): Remove.
353         * class.c (duplicate_tag_error): Remove.
354         * semantics.c (begin_class_definition): Return immediately for a
355         duplicate class definition.
356
357         PR c++/10451
358         * decl.c (grokdeclarator): Correct logic for "mutable" errors.
359
360 2003-04-22  Mark Mitchell  <mark@codesourcery.com>
361
362         PR c++/10446
363         * search.c (lookup_fnfields_1): Handle empty slots in the method
364         vector.
365
366         PR c++/10428
367         * decl.c (check_elaborated_type_specifier): New function, split
368         out from ...
369         (xref_tag): ... here.  Use the new function in more places.
370
371         * rtti.c (throw_bad_typeid): Use build_cxx_call.
372
373 2003-04-21  Mark Mitchell  <mark@codesourcery.com>
374
375         * call.c (build_over_call): Use build_cxx_call.
376         (build_cxx_call): New method, split out of build_over_call.
377         * cp-tree.h (language_function): Add can_throw.
378         (build_cxx_call): Declare it.
379         * decl.c (finish_function): If a function does not contain any
380         calls to functions that can throw an exception, indicate that
381         fact.
382         * decl2.c (mark_used): Do not defer the instantiation of
383         functions, if the current function does not throw.
384         * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
385         * pt.c (instantiate_decl): Make sure import_export_decl is called
386         before emitting things.
387         * rtti.c (throw_bad_cast): Use build_cxx_call.
388         (build_dynamic_cast_1): Likewise.
389         * typeck.c (build_function_call): Likewise.
390
391 2003-04-21  Nathan Sidwell  <nathan@codesourcery.com>
392
393         PR c++/9881
394         * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
395         expressions. Reverts my 2002-08-08 patch.
396
397         * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
398         cheaper early exit.
399
400 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
401
402         * cp/decl2.c (start_static_storage_duration_function): Take count
403         arg, don't check if it wraps round.
404         (generate_ctor_or_dtor_function): Add locus arg, use it.
405         (generate_ctor_and_dtor_functions_for_priority): Data arg is a
406         locus.
407         (finish_file): Set line numbers to past EOF for synthesized
408         functions.
409
410 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
411
412         PR c++/10405
413         * search.c (lookup_field_1): Final scan goes backwards for
414         types, forwards for non-types.
415
416 2003-04-17  Roger Sayle  <roger@eyesopen.com>
417
418         PR c/10375
419         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
420         "nothrow" function attributes.
421
422 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
423
424         PR c++/10347
425         * pt.c (type_dependent_expression_p): Handle array new.
426
427 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
428
429         PR c++/10381
430         * parser.c (cp_parser_primary_expression): Reorganize logic for
431         dealing with name lookup failures.
432
433 2003-04-15  Jason Merrill  <jason@redhat.com>
434
435         * decl2.c (mark_used): Don't instantiate anything if
436         skip_evaluation.
437
438 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
439
440         * tree.c (build_cplus_array_type_1): Do not call
441         uses_template_parms() on a NULL index_type.
442
443 2003-04-13  Roger Sayle  <roger@eyesopen.com>
444
445         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
446
447 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
448
449         PR c++/10300
450         * init.c (build_new_1): Reorganize.
451
452 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
453
454         * class.c (initialize_array)
455         * decl.c (reshape_init)
456         * decl2.c (build_expr_from_tree)
457         * init.c (build_zero_init)
458         * pt.c (tsubst_copy, tsubst_copy_and_build)
459         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
460         (ptm_initializer, class_initializer, get_pseudo_ti_init)
461         * semantics.c (finish_compound_literal)
462         * typeck.c (build_ptrmemfunc1)
463         * typeck2.c (store_init_value, process_init_constructor)
464         (build_functional_cast): Use build_constructor.
465
466 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
467
468         * call.c (print_z_candidates): Use gcc_gettext_width, not
469         strlen, to determine how much padding to use.
470
471 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
472
473         * decl.c: Update all calls to shadow_warning.
474
475 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
476
477         * class.c (layout_class_type): Correct handling for overlong
478         bit-fields whose width is the same as an integer type.
479
480 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
481
482         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
483         * cp-lang.c (cp_tree_size): New function.
484         (LANG_HOOKS_TREE_SIZE): Override.
485
486         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
487         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
488         (union lang_tree_node): Remove common and srcloc members.
489         (build_srcloc_here): Don't prototype.
490         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
491         * pt.c (pending_templates): Correct comment.
492         * tree.c (build_srcloc, build_srcloc_here): Kill.
493
494 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
495
496         * call.c: Include intl.h.
497         (print_z_candidate): Always use inform; get rid of errfn
498         argument. Reorganize so that all the strings get picked up
499         by xgettext.  Note obligation of caller to pass first argument
500         through gettext.
501         (print_z_candidates): Update to match.  Indent second and
502         successive candidates by strlen() of translated message.
503         (joust): Restructure ambiguous-conversion pedwarn so that
504         translators see a complete sentence.  Update calls to
505         print_z_candidate.
506
507         * Make-lang.in (cp/call.o): Update dependencies.
508
509 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
510
511         * decl.c (set_current_binding_level): Delete, revert last change.
512         (current_binding_level): Modify to allow it as as lvalue.
513
514 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
515
516         * name-lookup.c (find_binding): Pass appropriate pointer type to
517         POP_TIMEVAR_AND_RETURN.
518
519 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
520
521         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
522         * cp-tree.h: Don't insist on having GNUC.
523
524 2003-04-03  Jason Merrill  <jason@redhat.com>
525
526         * cvt.c (ocp_convert): Only abort if we try to convert an object
527         of TREE_ADDRESSABLE type.
528
529         * class.c (build_vtable): Set DECL_ALIGN here.
530         (get_vtable_decl): Not here.
531         (layout_vtable_decl): Or here.
532         (create_vtable_ptr): Or here.
533         (layout_class_type): Or here.
534         (check_bitfield_decl): Don't mess with field alignment.
535
536 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
537
538         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
539         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
540         * rtti.c (dfs_class_hint_mark): Likewise.
541
542         * decl.c (push_local_name, push_class_level_binding,
543         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
544         functions returning void.
545         * decl2.c (add_using_namespace): Likewise.
546
547         * decl.c (print_binding_level, print_other_binding_stack,
548         print_binding_stack): Cast argument of %p specifier to void*.
549         * ptree.c (cxx_print_decl): Likewise.
550
551         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
552         VAR_FUNCTION_OR_PARM_DECL_CHECK,
553         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
554         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
555         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
556
557         * decl.c (set_current_binding_level): New macro.  Use throughout
558         when setting the current binding level.
559
560         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
561         in enum.
562         * method.c (mangling_flags): Likewise.
563
564         * cp-tree.h (lang_type_header): Add __extension__ and use
565         CHAR_BITFIELD for members.
566
567 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
568
569         PR other/9274
570         * mangle.c: Include gt-cp-mangle.h.
571         (subst_identifiers): Mark with GTY.
572         * config-lang.in (gtfiles): Add cp/mangle.c.
573         * Make-lang.in: (gt-cp-mangle.h): New rule.
574         (cp/mangle.o): Depends on gt-cp-mangle.h.
575
576 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
577
578         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
579         after \$(srcdir)/cp/name-lookup.h.
580         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
581         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
582         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
583         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
584
585 2003-03-31  Jason Merrill  <jason@redhat.com>
586
587         PR java/10145
588         * class.c (check_field_decl): Don't set DECL_ALIGN.
589
590 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
591
592         PR c++/7647
593         * decl.c (grokdeclarator): Tidy, slightly.
594         * search.c (lookup_field_1): Add want_type parameter.
595         (lookup_field_r): Adjust call to lookup_field_1.
596
597 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
598
599         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
600
601 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
602
603         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
604         prototype.
605         (cxx_scope_find_binding_for_name): Likewise.
606         * decl.c (find_binding: Move to name-lookup.c.
607         (binding_for_name): Likewise.
608         (cxx_scope_find_binding_for_name): Likewise.
609         (BINDING_LEVEL):  Remove.
610         (push_binding): Tidy.
611         (push_class_binding): Likewise.
612         (pop_binding): Likewise.
613         (poplevel): Likewise.
614         (poplevel_class): Likewise.
615         (set_identifier_type_value_with_scope): Likewise.
616         (push_overloaded_decl): Likewise.
617         (lookup_tag): Likewise.
618         (unqualified_namespace_lookup): Likewise.
619         (lookup_name_current_level): Likewise.
620         (maybe_inject_for_scope_var): Likewise.
621         (namespace_binding): Move to name-lookup.c.
622         (set_namespace_binding): Likewise.
623         * decl2.c (lookup_using_namespace): Tidy.
624         (qualified_lookup_using_namespace): Likewise.
625         (do_toplevel_using_decl): Likewise.
626         * name-lookup.c: Include "timevar.h"
627         * name-lookup.h (cxx_scope):  Declare.
628         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
629         member declaration.
630         (BINDING_SCOPE): Adjust definition.
631         (BINDING_HAS_LEVEL_P): Remove.
632
633 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
634
635         * name-lookup.c: New file.
636         * name-lookup.h: Likewise..
637         * decl.c (push_binding): Adjust use cxx_binding_make.
638         (free_bindings): Move to name-lookup.c
639         (pop_binding): Use cxx_binding_free.
640         (binding_for_name): Tidy.
641         * cp-tree.h: Include "name-lookup.h"
642         (cxx_binding_make): Move to name-lookup.h
643         (cxx_binding_clear): Likewise.
644         (struct cxx_binding): Likewise.
645         (LOCAL_BINDING_P): Likewise.
646         (INHERITED_VALUE_BINDING_P): Likewise.
647         (BINDING_SCOPE): Likewise.
648         (BINDING_HAS_LEVEL_P): Likewise.
649         (BINDING_VALUE): Likewise.
650         (BINDING_TYPE): Likewise.
651         * config-lang.in (gtfiles): Add cp/name-lookup.h
652         * Make-lang.in (cp/name-lookup.o): New rule.
653         (CXX_OBJS): Add cp/name-lookup.o
654         (CXX_TREE_H): Add cp/name-lookup.h
655
656 2003-03-28  Jason Merrill  <jason@redhat.com>
657
658         PR c++/10245
659         * cvt.c (force_rvalue): New fn.
660         * call.c (build_conditional_expr): Use it.
661         * cp-tree.h: Declare it.
662
663 2003-03-28  Mike Stump  <mrs@apple.com>
664
665         * error.c (dump_expr): Add 0x to printed hex numbers to make
666         output match source code better.
667
668 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
669
670         PR c++/10218
671         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
672         definitions.
673
674         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
675         non-existant ssdf_decls array.
676         (finish_file): Call generator_ctor_or_dtor_function when there are
677         static constructors or destructors and no other static
678         initializations.
679
680 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
681
682         PR c++/10047
683         * decl2.c (finish_file): Don't warn about explicitly instantiated
684         inline decls.
685
686 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
687
688         PR c++/10224
689         * pt.c (lookup_template_class): Only check instantiated args if
690         they do not contain template parameters.
691
692 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
693
694         PR c++/10158
695         * parser.c (cp_parser_function_definition): Set
696         DECL_INITIALIZED_IN_CLASS for members.
697         * pt.c (instantiate_decl): Only reduce the template args for
698         friends that are not defined in class.
699
700 2003-03-25  Jason Merrill  <jason@redhat.com>
701
702         * call.c (print_z_candidate): Change name of first arg to msgid.
703         (joust): Add comment for translators.
704
705 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
706
707         PR c++/9898, PR c++/383, DR 322
708         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
709         through reference types on both PARM and ARG.
710
711 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
712
713         PR c++/10119
714         * error.c (dump_expr) <BASELINK>: Use dump_expr.
715         * pt.c (maybe_fold_nontype_args): New function.
716         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
717         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
718         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
719         maybe_fold_nontype_args.
720
721 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
722
723         PR c++/10026
724         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
725
726 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
727
728         PR c++/7086
729         * typeck.c (cxx_mark_addressable):  Adjust call to
730         gen_mem_addressof or put_var_into_stack.
731
732 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
733
734         PR c++/9978, c++/9708
735         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
736         * call.c (add_template_candidate_real): Adjust
737         instantiate_template call.
738         * class.c (resolve_address_of_overloaded_function): Likewise.
739         * decl.c (build_enumerator): Set TREE_CONSTANT.
740         * pt.c (check_instantiated_args): New.
741         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
742         TREE_READONLY.
743         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
744         (reduce_template_parm_level): Likewise.
745         (process_template_parm): Likewise.
746         (check_explicit_specialization): Adjust instantiate_template call.
747         (convert_template_argument): Don't check non-type argument here.
748         (lookup_template_class): Check them here.
749         (tsubst_friend_function): Adjust instantiate_template call.
750         (instantiate_template): Add tsubst_flags parameter, use it. Check
751         instantiated args.
752
753 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
754
755         * decl.c: Update calls to shadow_warning.
756
757 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
758
759         PR c++/9898
760         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
761         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
762
763 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
764
765         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
766         friends.
767         * cp/pt.c (instantiate_class_template): Fix formatting.
768
769 2003-03-14  Matt Austern  <austern@apple.com>
770
771         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
772         (unemitted_tinfo_decl_p): Remove.
773         (emit_tinfo_decl): Change declaration to remove unused parameter.
774         * decl2.c (finish_file): Change tinfo emission to loop through
775         unemitted_tinfo_decls array instead of looping through all decls.
776         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
777         unused second parameter.
778         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
779         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
780         (emit_tinfo_decl): remove unused second parameter, add assertion
781         that decl hasn't already been emitted.
782
783 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
784
785         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
786         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
787         return statements.
788
789 2003-03-19  Jason Merrill  <jason@redhat.com>
790
791         PR c++/8316, c++/9315, c++/10136
792         * call.c (print_z_candidate): Split out from...
793         (print_z_candidiates): ...here.
794         (joust): Use it.
795
796 2003-03-17  Roger Sayle  <roger@eyesopen.com>
797
798         PR c++/10031
799         * decl.c (duplicate_decls): Use the new type when prototyping
800         anticipated decls, even when the types match.  This defines the
801         exception list for the built-in function.
802
803 2003-03-17  Jason Merrill  <jason@redhat.com>
804
805         PR c++/10091
806         * typeck.c (build_class_member_access_expr): Compare
807         TYPE_MAIN_VARIANTs.
808
809 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
810
811         PR c++/9639
812         * parser.c (cp_parser_declarator_id): Clear parser->scope.
813
814 2003-03-16  Jason Merrill  <jason@redhat.com>
815
816         PR c++/9993
817         * decl.c (finish_function): Only allow the NRVO to use variables
818         declared at function scope.
819
820 2003-03-17  Andreas Jaeger  <aj@suse.de>
821
822         * Make-lang.in (cp/TAGS): Remove.
823
824 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
825
826         PR c++/9629
827         * cp-tree.h (struct language_function): Add in_base_initializer.
828         (in_base_initializer): define it.
829         (expand_member_init): Remove INIT param.
830         * init.c (expand_member_init): Remove INIT param, return the member.
831         (emit_mem_initializers): Set in_base_initializer.
832         * class.c (build_base_path): Check in_base_initializer.
833         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
834         * pt.c (tsubst_initializer_list): Likewise.
835
836 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
837
838         * decl.c (binding_for_name): Fix initialization thinko.
839
840 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
841
842         Compile-time improvement: 2/n.
843         * cp-tree.h (struct cxx_binding): New datatype;
844         (struct lang_identifier): Use it.
845         (LOCAL_BINDING_P): Adjust definition.
846         (INHERITED_VALUE_BINDING_P): Likewise.
847         (BINDING_SCOPE): Likewise.
848         (BINDING_HAS_LEVEL_P): Likewise.
849         (BINDING_VALUE): Likewise.
850         (BINDING_TYPE): Likewise.
851         (IDENTIFIER_VALUE): Likewise.
852         (struct tree_binding): Remove.
853         (TS_CP_BINDING): Likewise.
854         ((union lang_tree_node): Remove field "binding".
855         (cxx_binding_clear): New macro.
856         (binding_for_name): Adjust return type.
857         (qualified_lookup_using_namespace): Adjust prototype.
858         (lookup_using_namespace): Adjust prototype.
859         (cxx_scope_find_binding_for_name): Declare.
860         * cp-tree.def: Remove CPLUS_BINDING definition.
861         * decl.c (push_binding): Adjust local variable type.
862         (add_binding): Likewise.
863         (push_class_binding): Likewise.
864         (pop_binding): Likewise.
865         (poplevel): Likewise.
866         (poplevel_class): Likewise.
867         (free_bindings):  Adjust type.
868         (find_binding): Adjust return type, add a third parameter. Remove
869         non-useful assertion now that we use static typing.
870         (cxx_scope_find_binding_for_name): New function.
871         (binding_for_name): Use it.  Adjust local variable type. Simplify.
872         (namespace_binding):  Simplify.
873         (set_namespace_binding): Likewise.
874         (set_identifier_type_value_with_scope): Adjust local variable type.
875         (lookup_tag): Don't type-abuse of local variable 'old'.
876         (lookup_namespace_name): Likewise.  Allocate binding on stack.
877         (select_decl): Adjust prototype.
878         (unqualified_namespace_lookup):  Allocate binding on stack.
879         Don't type-abuse of local variable 'val'.
880         (lookup_name_real): Likewise.
881         (maybe_inject_for_scope_var): Adjust local variable type.
882         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
883         (namespace_binding): Adjust logic, simplify.
884         (BINDING_LEVEL): Adjust definition.
885         (push_class_level_binding): Adjust local variable type.
886         (struct cxx_saved_binding): Adjust field 'binding' type.
887         * decl2.c (ambiguous_decl): Adjust prototype.
888         (lookup_using_namespace): Adjust local variable type.
889         (qualified_lookup_using_namespace): Catch type error and correct
890         ensueing logic error.
891         (do_nonmember_using_decl): Adjust local variable type.  Allocate
892         temporary cxx_binding on stack.
893         (do_toplevel_using_decl): Adjust local variable type.
894         * ptree.c (cxx_print_cxx_binding): New function.
895         (cxx_print_identifier): Use it.
896         (cxx_print_xnode): Delete CPLUS_BINDING case label.
897
898 2003-03-15  Roger Sayle  <roger@eyesopen.com>
899
900         * tree.c (count_functions): Fix whitespace.
901
902 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
903
904         * Make-lang.in: Update.
905
906 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
907
908         PR c++/6440
909         * pt.c (maybe_process_partial_specialization): Handle
910         member class template when enclosing class template is
911         explicit specialized.
912         (most_general_template): Stop looking when DECL is already
913         specialized.
914
915 2003-03-13  Jason Merrill  <jason@redhat.com>
916
917         PR c++/9420
918         * search.c (lookup_conversions): Call complete_type here.
919         * call.c (implicit_conversion): Not here.
920
921 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
922
923         * decl2.c (do_nonmember_using_decl): Correct handling of
924         simultaneous type/non-type bindings.
925
926         * call.c (initialize_reference): Remove bogus assertion.
927         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
928
929 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
930
931         PR c++/7050
932         * expr.c (cxx_expand_expr): Return const0_rtx for throw
933         expressions.
934
935 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
936
937         PR c++/9474
938         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
939         to merge old and new declarations.
940
941 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
942
943         * g++.1: Remove.
944         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
945         (cp/g++.1): Build it from scratch in the build tree.
946         (c++.install-man): Depend on it.  Install it from the build tree.
947         (c++.mostlyclean): Clean it.
948
949 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
950
951         PR c++/9474
952         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
953         to merge old and new declarations.
954
955         PR c++/9924
956         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
957
958 2003-03-11  Jason Merrill  <jason@redhat.com>
959
960         PR c++/9820
961         * search.c (lookup_member): Fix handling of functions in a class
962         being defined.
963
964 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
965
966         PR c++/8700
967         * call.c (convert_class_to_reference): Adjust usage of
968         splice_viable.
969         (any_viable): Remove.
970         (splice_viable): Combine with any_viable.
971         (print_z_candidates): Avoid printing duplicates.
972         (build_user_type_conversion_1): Adjust usage of splice_viable.
973         (build_new_function_call): Likewise.
974         (build_operator_new_call): Likewise.
975         (build_object_call): Likewise.
976         (build_conditional_expr): Likewise.
977         (build_new_op): Likewise.
978         (build_new_method_call): Likewise.
979         (joust): Remove spurious comment.
980         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
981         * decl2.c (arg_assoc_class): Simplify.
982         * friend.c (add_friend): Likewise.
983
984 2003-03-11  Jason Merrill  <jason@redhat.com>
985
986         PR c++/8660
987         * decl2.c (check_classfn): A member template only matches a
988         member template.
989
990 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
991
992         * Make-lang.in (CXX_C_OBJS): Update.
993         * lang-specs.h: Don't define __GNUG__ here.
994
995 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
996
997         * call.c (perform_overload_resolution): New function.
998         (build_new_function_call): Use it.
999         (build_operator_new_call): Likewise.
1000         (add_candidates): Add explicit_targs and template_only parameters.
1001         (build_new_op): Adjust accordingly.
1002         * cp-tree.h (build_operator_new_call): New function.
1003         (build_function_call_real): Remove.
1004         (build_function_call_maybe): Likewise.
1005         * init.c (build_new_1): Use build_operator_new_call.
1006         * typeck.c (build_function_call_real): Rename to ...
1007         (build_function_call): ... this.
1008
1009 2003-03-10  Devang Patel  <dpatel@apple.com>
1010
1011         PR c++/9394
1012         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
1013
1014 2003-03-10  Jason Merrill  <jason@redhat.com>
1015
1016         PR c++/9798
1017         * decl.c (push_using_directive): Push before recursing.
1018
1019         PR c++/9868, c++/9524
1020         * call.c (resolve_scoped_fn_name): Handle the case of a function
1021         pointer member.
1022
1023         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
1024         argument in the pointer-to-member case.
1025
1026 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
1027
1028         PR c++/9373
1029         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
1030         pointers to member functions.
1031
1032         PR c++/8534
1033         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
1034         in pointer-to-member-function types.
1035
1036 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1037
1038         * expr.c (cplus_expand_constant): Use C90 prototype style.
1039         (cxx_expand_expr): Likewise.
1040
1041 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1042
1043         PR c++/9970
1044         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
1045         functions.
1046
1047 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
1048
1049         * lang-specs.h (c++-header): Change .pch to .gch.
1050
1051 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
1052
1053         * cp-tree.h (cxx_init): Update prototype.
1054         * lex.c (cxx_init): Similarly.
1055
1056 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
1057
1058         PR c++/9823
1059         * cp-tree.h (begin_mem_initializers): Remove.
1060         * parser.c (cp_parser_mem_initializer_list): Inline it here.
1061         Do not call finish_mem_initializers if not in a constructor.
1062         (cp_parser_class_head): Fix typo in error message.
1063         * semantics.c (begin_mem_initializers): Remove.
1064         * testsuite/g++.dg/parser/constructor1.C: New test.
1065
1066         PR c++/9809
1067         * call.c (add_function_candidate): Skip builtin fuctions that have
1068         not yet been declared.
1069
1070         PR c++/9982
1071         * init.c (build_new_1): Correct logic for determining whether or
1072         not to use an array cookie.
1073
1074         PR c++/9524
1075         * parser.c (cp_parser_postfix_expression): Call
1076         finish_non_static_data_member, even when processing_template_decl.
1077
1078         PR c++/9912
1079         * cp-tree.h (is_ancestor): New function.
1080         (handle_class_head): Change prototype.
1081         * decl2.c (is_namespace_ancestor): Rename to ...
1082         (namespace_anecestor): ... this.
1083         (set_decl_namespace): Adjust accordingly.
1084         (handle_class_head): Remove unncessary parameters.
1085         * parser.c (cp_parser_class_head): Check that
1086         nested-name-specifiers are used appropriately.
1087
1088 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
1089
1090         * call.c (reference_binding): Remove REF_IS_VAR parameter.
1091         (implicit_conversion): Adjust call to reference_binding.
1092         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
1093         (initialize_reference): Adjust handling for references bound to
1094         rvalues.
1095         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
1096         prototype.
1097         (real_non_cast_lvalue_p): New method.
1098         * cvt.c (build_up_reference): Adjust use of
1099         make_temporary_var_for_ref_to_temp.
1100         * tree.c (real_non_cast_lvalue_p): New method.
1101
1102 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1103
1104         * except.c (init_exception_processing): Use C90 prototype style.
1105         (cp_protect_cleanup_actions): Likewise.
1106         (prepare_eh_type): Likewise.
1107         (build_eh_type_type): Likewise.
1108         (build_exc_ptr): Likewise.
1109         (do_begin_catch): Likewise.
1110         (dtor_nothrow): Likewise.
1111         (do_end_catch): Likewise.
1112         (push_eh_cleanup): Likewise.
1113         (decl_is_java_type): Likewise.
1114         (choose_personality_routine): Likewise.
1115         (initialize_handler_parm): Likewise.
1116         (expand_start_catch_block): Likewise.
1117         (expand_end_catch_block): Likewise.
1118         (begin_eh_spec_block): Likewise.
1119         (finish_eh_spec_block): Likewise.
1120         (do_allocate_exception): Likewise.
1121         (do_free_exception): Likewise.
1122         (wrap_cleanups_r): Likewise.
1123         (stabilize_throw_expr): Likewise.
1124         (build_throw): Likewise.
1125         (complete_ptr_ref_or_void_ptr_p): Likewise.
1126         (is_admissible_throw_operand): Likewise.
1127         (nothrow_libfn_p): Likewise.
1128         (can_convert_eh): Likewise.
1129         (check_handlers_1): Likewise.
1130         (check_handlers): Likewise.
1131
1132 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
1133
1134         * call.c (merge_conversion_sequences): New function.
1135         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
1136         (convert_class_to_reference): Correct handling of second
1137         standard conversion sequence in a user-defined conversion
1138         sequence.
1139         (build_user_type_conversion_1): Use merge_conversion_sequences.
1140         * cp-tree.def: Add comments for CONV nodes.
1141         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
1142
1143 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1144
1145         * error.c (init_error): Use C90 prototype style.
1146         (dump_scope): Likewise.
1147         (dump_qualifiers): Likewise.
1148         (dump_template_argument): Likewise.
1149         (dump_template_argument_list): Likewise.
1150         (dump_template_parameter): Likewise.
1151         (dump_template_bindings): Likewise.
1152         (dump_type): Likewise.
1153         (dump_typename): Likewise.
1154         (class_key_or_enum): Likewise.
1155         (dump_aggr_type): Likewise.
1156         (dump_type_prefix): Likewise.
1157         (dump_type_suffix): Likewise.
1158         (dump_global_iord): Likewise.
1159         (dump_simple_decl): Likewise.
1160         (dump_decl): Likewise.
1161         (dump_template_decl): Likewise.
1162         (dump_function_decl): Likewise.
1163         (dump_parameters): Likewise.
1164         (dump_exception_spec): Likewise.
1165         (dump_function_name): Likewise.
1166         (dump_template_parms): Likewise.
1167         (dump_char): Likewise.
1168         (dump_expr_list): Likewise.
1169         (dump_expr): Likewise.
1170         (dump_binary_op): Likewise.
1171         (dump_unary_op): Likewise.
1172         (type_as_string): Likewise.
1173         (expr_as_string): Likewise.
1174         (decl_as_string): Likewise.
1175         (context_as_string): Likewise.
1176         (lang_decl_name): Likewise.
1177         (cp_file_of): Likewise.
1178         (cp_line_of): Likewise.
1179         (decl_to_string): Likewise.
1180         (expr_to_string): Likewise.
1181         (fndecl_to_string): Likewise.
1182         (code_to_string): Likewise.
1183         (language_to_string): Likewise.
1184         (parm_to_string): Likewise.
1185         (op_to_string): Likewise.
1186         (type_to_string): Likewise.
1187         (assop_to_string): Likewise.
1188         (args_to_string): Likewise.
1189         (cv_to_string): Likewise.
1190         (cxx_print_error_function): Likewise.
1191         (cp_diagnostic_starter): Likewise.
1192         (cp_diagnostic_finalizer): Likewise.
1193         (cp_print_error_function): Likewise.
1194         (function_category): Likewise.
1195         (print_instantiation_full_context): Likewise.
1196         (print_instantiation_partial_context): Likewise.
1197         (maybe_print_instantiation_context): Likewise.
1198         (print_instantiation_context): Likewise.
1199         (cp_printer): Likewise.
1200         (print_integer): Likewise.
1201         (print_non_consecutive_character): Likewise.
1202         (locate_error): Likewise.
1203
1204 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
1205
1206         PR c++/9965
1207         * call.c (reference_binding): Add ref_is_var parameter.
1208         (implicit_conversion): Adjust call to reference_binding.
1209         (initialize_reference): Likewise.
1210
1211         PR c++/9400
1212         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
1213         PARM_DECLs.
1214
1215         PR c++/9791
1216         * class.c (get_basefndecls): Use lookup_fnfields_1.
1217
1218 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1219
1220         PR c++/9188
1221         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
1222         in error message.
1223         (cp_parser_single_declaration): Likewise.
1224
1225 2003-03-05  Jason Merrill  <jason@redhat.com>
1226
1227         PR c++/9440
1228         * call.c (build_conditional_expr): Use convert rather than an
1229         explicit NOP_EXPR.
1230
1231 2003-03-02  Matt Austern  <austern@apple.com>
1232
1233         * decl.c (cp_binding_level): Add static_decls varray member.
1234         (add_decl_to_level): Add static/inline namespace scope
1235         declarations to static_decls array.
1236         (wrapup_global_for_namespace): Pass static_decls only, instead of
1237         all decls, to wrapup_global_declarations/check_global_declarations.
1238         (push_namespace): Initialize static_decls for ordinary namespaces.
1239         (cxx_init_decl_processing): Initialize static_decls for global
1240         namespace.
1241
1242 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
1243
1244         * class.c (end_of_class): Correct thinko.
1245
1246 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
1247
1248         * config-lang.in: Replace ${libstdcxx_version} by its value.
1249
1250 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
1251
1252         * cp-tree.h (cxx_saved_binding): Declare.
1253         (struct saved_scope): Adjust type of field 'old_binding'.
1254         * decl.c (cxx_saved_binding_make): New macro.
1255         (struct cxx_saved_binding): Define.
1256         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
1257         C++ bindings.
1258         (maybe_push_to_top_level): Adjust local variable type.
1259         (pop_from_top_level): Likewise.
1260
1261 2003-03-04  Tom Tromey  <tromey@redhat.com>
1262
1263         * Make-lang.in (c++.tags): New target.
1264
1265 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
1266
1267         * Make-lang.in: Update.
1268
1269 2003-03-03  Jason Merrill  <jason@redhat.com>
1270
1271         * decl.c (finish_enum): Do set the type in a template. Simplify.
1272         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
1273
1274 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
1275
1276         PR c++/9878
1277         * call.c (convert_class_to_reference): Correct conversion
1278         sequences.
1279         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
1280         (implicit_conversion): Adjust call to reference_binding.
1281         (add_candidate): Change type of candidates parameter.
1282         (add_function_candidate): Likewise.
1283         (add_conv_candidate): Likewise.
1284         (build_builtin_candidate): Likewise.
1285         (add_builtin_candidate): Likewise.
1286         (add_builtin_candidates): Likewise.
1287         (add_template_candidate_real): Likewise.
1288         (add_template_candidate): Likewise.
1289         (add_template_conv_candidate): Likewise.
1290         (build_user_type_conversion_1): Adjust accordingly.
1291         (build_object_call): Likewise.
1292         (build_conditional_expr): Likewise.
1293         (add_candidates): Likewise.
1294         (build_new_op): Likewise.
1295         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
1296         (build_new_method_call): Adjust calls to add_function_candidate.
1297         (make_temporary_var_for_ref_to_temp): New function.
1298         (initialize_reference): Add decl parameter.
1299         * class.c (build_rtti_vtbl_entries): Use build_address and
1300         build_nop.
1301         * cp-tree.h (initialize_reference): Change prototype.
1302         (make_temporary_var_for_ref_to_temp): New function.
1303         (build_type_conversion): Change prototype.
1304         (build_address): New function.
1305         (build_nop): Likewise.
1306         * cvt.c (cp_convert_to_pointer): Adjust call to
1307         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
1308         Use build_nop.
1309         (convert_to_pointer_force): Use build_nop.
1310         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
1311         (convert_to_reference): Adjust call to build_type_conversion.
1312         (ocp_convert): Likewise.
1313         (build_type_conversion): Remove for_sure parameter.
1314         * decl.c (grok_reference_init): Use initialize_reference.
1315         * typeck.c (build_address): New function.
1316         (build_nop): Likewise.
1317         (build_unary_op): Use them.
1318         (build_ptrmemfunc): Tidy slightly.
1319         (convert_for_initialization): Adjust call to
1320         initialize_reference.
1321         * typeck2.c (store_init_value): Remove #if 0'd code.
1322
1323 2003-03-03  Jason Merrill  <jason@redhat.com>
1324
1325         * decl.c (start_function): Clear DECL_NUM_STMTS.
1326
1327         * class.c (get_vtable_decl): Use vtbl_type_node.
1328         (build_primary_vtable): Check for it.
1329
1330 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
1331
1332         * decl.c (check_initializer): Check for vector_opaque_p.
1333
1334 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
1335
1336         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
1337           invoke an external cpp during compilation.
1338
1339 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1340
1341         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
1342         that of warning().
1343         (start_decl): Likewise.
1344         (start_function): Likewise.
1345
1346 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
1347
1348         * Make-lang.in (CXX_C_OBJS): Update.
1349
1350 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
1351
1352         PR c++/9892
1353         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
1354         instantiating it.
1355
1356 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
1357
1358         * parser.c (cp_parser_init_declarator): Revert opaque
1359         vector_opaque_p change.
1360         Do not include target.h.
1361
1362 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
1363
1364         PR c++/9879
1365         * cp-tree.h (build_zero_init): Add parameter.
1366         * decl.c (cp_finish_decl): Adjust call.
1367         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
1368         calls.
1369         (build_default_init): Add nelts parameter.  Adjust calls to
1370         build_zero_init.
1371         (build_new_1): Adjust call to build_default_init.
1372         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
1373
1374 2003-02-26  Devang Patel  <dpatel@apple.com>
1375
1376         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
1377         required.  Postpone enum setting for template decls.
1378         (build_enumerator): Delay copying value node until finish_enum
1379         (). Remove #if 0'ed code.
1380         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
1381         (tsubst_copy): Add check for enum type.
1382
1383 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
1384
1385         PR c++/9683
1386         * decl2.c (prune_vars_needing_no_initialization): Do not throw
1387         away initializations for DECL_EXTERNAL VAR_DECLs.
1388         (finish_file): Adjust accordingly.
1389         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
1390
1391 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
1392
1393         * decl.c (add_binding): Time TV_NAME_LOOKUP.
1394         (push_class_binding): Likewise.
1395         (set_namespace_binding): Likewise.
1396
1397 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
1398
1399         PR c++/9836
1400         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
1401         specializations back to the main template.
1402         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
1403         * pt.c (resolve_typename_type): Likewise.
1404
1405 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
1406
1407         PR c++/9778
1408         * pt.c (tsubst_copy_and_build): For a templated function inside a
1409         scope, process template arguments.
1410
1411 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1412
1413         PR c++/9602
1414         * typeck2.c (abstract_virtuals_error): Don't check when
1415         TYPE is still template parameter dependent.
1416
1417 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
1418
1419         PR c++/5333
1420         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
1421         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
1422         * pt.c (instantiate_class_template): Don't try to instantiate
1423         dependent types.
1424         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
1425
1426 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
1427
1428         PR c++/9749
1429         * decl.c (grokdeclarator): Do not allow parameters with variably
1430         modified types.
1431
1432 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
1433
1434         * search.c (grow_bfs_bases): Remove. Fold into ...
1435         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
1436         in previous patch.
1437
1438 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
1439
1440         PR c++/9729
1441         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
1442         when the G++ 3.2 ABI prevents correct compilation.
1443
1444 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
1445
1446         Change base class access representation. Share virtual base
1447         binfos.
1448         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
1449         call.
1450         * cp/class.c (build_base_path): Likewise.
1451         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
1452         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
1453         (make_new_vtable): Adjust.
1454         (force_canonical_binfo_r): Delete.
1455         (force_canonical_binfo): Delete.
1456         (mark_primary_virtual_base): Delete.
1457         (dfs_unshared_virtual_bases): Delete.
1458         (mark_primary_bases): Adjust.
1459         (maybe_warn_about_overly_private_class): Adjust.
1460         (dfs_base_derived_from): Delete.
1461         (base_derived_from): Follow the inheritance chain.
1462         (struct find_final_overrider_data): Add vpath member.
1463         (dfs_find_final_overrider): Adjust.
1464         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
1465         (find_final_overrider): Adjust.
1466         (update_vtable_entry_for_fn): Adjust.
1467         (modify_all_vtables): Adjust.
1468         (walk_subobject_offsets): Adjust.
1469         (layout_nonempty_base_or_field): Adjust.
1470         (layout_empty_base): Remove last parameter. Adjust.
1471         (build_base_field): Adjust.
1472         (build_base_fields): Adjust.
1473         (propagate_binfo_offsets): Remove last parameter. Adjust.
1474         (dfs_set_offset_for_unshared_vbases): Delete.
1475         (layout_virtual_bases): Adjust.
1476         (finish_struct_1): Adjust.
1477         (init_class_processing): Don't init access nodes.
1478         (dfs_get_primary_binfo): Delete.
1479         (get_primary_binfo): Adjust.
1480         (dump_class_hierarchy_r): Remove most derived arg, add IGO
1481         parameter. Adjust.
1482         (dump_class_hierarchy): Adjust.
1483         (finish_vtbls): Adjust.
1484         (get_original_base): Delete.
1485         (build_vtt_inits): Adjust.
1486         (dfs_build_secondary_vptr_vtt_inits): Adjust.
1487         (dfs_ctor_vtable_bases_queue_p): Adjust.
1488         (build_ctor_vtbl_group): Adjust.
1489         (dfs_accumulate_vtbl_inits): Adjust.
1490         (build_vtbl_initializer): Adjust.
1491         (build_vbase_offset_vtbl_entries): Adjust.
1492         (add_vcall_offset_vtbl_entries_1): Adjust.
1493         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
1494         (access_*_node): Remove.
1495         (CANONICAL_BINFO): Delete.
1496         (BINFO_UNSHARED_MARKED): Remove.
1497         (BINFO_MARKED): Set LANG_FLAG_0 directly.
1498         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
1499         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
1500         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
1501         Delete.
1502         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
1503         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
1504         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
1505         Delete.
1506         (BINFO_DEPENDENT_BASE_P): New.
1507         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
1508         index.
1509         (markedp, unmarkedp): Adjust.
1510         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
1511         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
1512         find_vbase_instance, binfo_for_vbase): Delete.
1513         (copied_binfo, original_binfo): Declare.
1514         (finish_base_specifier): Add virtual_p arg.
1515         (unshare_base_binfos): Delete.
1516         (copy_base_binfos): Declare.
1517         (reverse_path): Delete.
1518         * cp/decl.c (xref_basetypes): Access and virtuality passed
1519         differently. Don't copy direct base binfos here. Call
1520         copy_base_binfos.
1521         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
1522         (initialize_vtbl_ptrs): Adjust.
1523         (expand_member_init): Adjust.
1524         * cp/parser.c (cp_parser_base_specifier): Adjust.
1525         * cp/pt.c (instantiate_class_template): Adjust.
1526         (get_template_base_recursive): Adjust.
1527         * cp/rtti.c (get_pseudo_ti_init): Adjust.
1528         (get_pseudo_ti_desc): Adjust.
1529         * cp/tree.c (unshare_base_binfos): Rename to ...
1530         (copy_base_binfos): ... here, reimplement.
1531         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
1532         (reverse_path): Remove.
1533         * cp/typeck.c (get_delta_difference): Adjust error messages.
1534         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
1535         * cp/search.c (lookup_base_r): Adjust.
1536         (dynamic_cast_base_recurse): Adjust.
1537         (canonical_binfo): Remove.
1538         (dfs_canonical_queue): Remove.
1539         (dfs_assert_unmarked_p): Remove.
1540         (assert_canonical_unmarked): Remove.
1541         (shared_marked_p, shared_unmarked_p): Remove.
1542         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
1543         (dfs_access_in_type): Adjust.
1544         (access_in_type): Adjust.
1545         (dfs_accessible_queue_p): Adjust.
1546         (dfs_accessible_p): Adjust.
1547         (is_subobject_of_p_1, is_subobject_of_p): Remove.
1548         (struct lookup_field_info): Remove from_dep_base_p field.
1549         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
1550         (lookup_field_r): Remove dependent base code.
1551         (lookup_member): Likewise.
1552         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
1553         (dfs_unmarked_real_bases_queue_p): Remove.
1554         (dfs_marked_real_bases_queue_p): Remove.
1555         (dfs_skip_vbases): Remove.
1556         (dfs_get_pure_virtuals): Adjust.
1557         (markedp, unmarkedp): Adjust.
1558         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
1559         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
1560         (dfs_unmark): Adjust.
1561         (dfs_get_vbase_types):Remove.
1562         (dfs_build_inheritance_graph_order): Remove.
1563         (get_vbase_types): Remove
1564         (dfs_find_vbase_instance): Remove.
1565         (find_vbase_instance): Remove.
1566         (dfs_debug_unmarkedp): Adjust.
1567         (dependent_base_p): Remove.
1568         (dfs_push_type_decls): Adjust.
1569         (dfs_push_decls): Adjust.
1570         (dfs_no_overlap_yet): Adjust.
1571         (copied_binfo): New function.
1572         (original_binfo): New function.
1573         (binfo_for_vbase): Remove.
1574
1575 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
1576
1577         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
1578         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
1579         vectors, for speed.
1580
1581 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
1582
1583         PR c++/9704
1584         * class.c (layout_class_type): In the 3.2 ABI, take into account
1585         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
1586
1587 2003-02-18  Matt Austern <austern@apple.com>
1588
1589         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
1590         nothing for C++.
1591         * cp/decl.c (wrapup_globals_for_namespace): Remove special
1592         handling of global namespace.
1593
1594 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
1595
1596         * cp-tree.h (rid_to_yy): Delete.
1597         (C_RID_YYCODE): Delete.
1598         (finish_file): Delete redundant declaration.
1599
1600 2003-02-18  Jason Merrill  <jason@redhat.com>
1601
1602         PR c++/9623
1603         * decl.c (reshape_init): Don't mess with initializer labels.
1604
1605         PR c++/9485
1606         * parser.c (cp_parser_postfix_expression): Set idk properly for
1607         object->scope::member.
1608
1609 2003-02-18  Ben Elliston  <bje@redhat.com>
1610
1611         PR other/7350
1612         * decl.c (duplicate_decls): Fix typo in comment.
1613
1614 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
1615
1616         PR debug/9717
1617         * class.c (build_base_field): Mark fields for base classes with
1618         DECL_IGNORED_P.
1619
1620 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1621
1622         PR c++/9457
1623         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
1624         CONSTRUCTOR_ELTS only once.
1625
1626 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1627
1628         PR c++/9459
1629         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
1630         (dump_type_suffix): Likewise.
1631
1632 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
1633
1634         * search.c: ANSIfy function declarations and definitions.
1635         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
1636         * call.c (build_method_call, resolve_scoped_fn_name,
1637         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
1638         calls.
1639         * class.c (handle_using_decl): Likewise.
1640         * decl.c (make_typename_type, make_unmound_class_template,
1641         start_decl, compute_array_index_type): Likewise.
1642         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
1643         * init.c (expand_member_init, build_member_call): Likewise.
1644         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
1645         resolve_typename_type): Likewise.
1646         * typeck.c (lookup_destructor, finish_class_member_access_exprm
1647         build_prememfunc_access_expr): Likewise.
1648
1649 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
1650
1651         * decl2.c: Include "timevar.h".
1652         (namespace_ancestor): Time name lookup.
1653         (add_using_namespace): Likewise.
1654         (lookup_using_namespace): Likewise.
1655         (qualified_lookup_using_namespace): Likewise.
1656         (decl_namespace): Likewise.
1657         (lookup_arg_dependent): Likewise.
1658         * lex.c (do_identifier): Likewise.
1659         (do_scoped_id): Likewise.
1660         * pt.c (lookup_template_class): Likewise.
1661
1662 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
1663
1664         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
1665
1666 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1667
1668         * decl.c: Include "timevar.h".
1669         (poplevel): Time name lookup.
1670         (find_binding): Likewise.
1671         (push_namespace): Likewise.
1672         (pop_nested_namespace): Likewise.
1673         (store_bindings): Likewise.
1674         (maybe_push_to_top_level): Likewise.
1675         (pop_from_top_level): Likewise.
1676         (push_local_name): Likewise.
1677         (pushtag): Likewise.
1678         (pushdecl): Likewise.
1679         (pushdecl_with_scope): Likewise.
1680         (pushdecl_namespace_level): Likewise.
1681         (pushdecl_top_level): Likewise.
1682         (pushdecl_class_level): Likewise.
1683         (push_class_level_binding): Likewise.
1684         (push_using_decl): Likewise.
1685         (push_using_directive): Likewise.
1686         (push_overloaded_decl): Likewise.
1687         (lookup_label): Likewise.
1688         (define_label): Likewise.
1689         (lookup_tag): Likewise.
1690         (lookup_tag_reverse): Likewise.
1691         (lookup_namespace_name): Likewise.
1692         (select_decl): Likewise.
1693         (unqualified_namespace_lookup): Likewise.
1694         (lookup_name_real): Likewise.
1695         (lookup_name_current_level): Likewise.
1696         (lookup_type_current_level): Likewise.
1697         (maybe_inject_for_scope_var): Likewise.
1698         (xref_tag): Likewise.
1699
1700         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
1701
1702 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
1703
1704         * decl.c (build_enumerator):  Remove unneeded test.
1705
1706 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
1707
1708         * cp-tree.h (struct lang_type_header): Make all fields unsigned
1709         char.
1710
1711 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
1712
1713         PR c++/7129
1714         * call.c (z_candidate): Add args.
1715         (convert_class_to_reference): Set it.
1716         (implicit_conversion): Tidy.
1717         (add_candidate): Add args parameter.
1718         (add_function_candidate): Adjust call to add_candidate.
1719         (add_conv_candidate): Likewise.
1720         (build_builtin_candidate): Likewise.
1721         (build_user_type_conversion_1): Eliminate wasteful tree_cons
1722         usage.
1723         (build_new_function_call): Likewise.
1724         (build_object_call): Likewise.
1725         (add_candidates): New function.
1726         (build_new_op): Use it.
1727         (covert_like_real): Adjust call to build_over_call.
1728         (build_over_call): Remove args parameter.
1729         * operators.def: Add <?= and >?=.
1730
1731 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
1732
1733         * typeck.c (build_indirect_ref): Don't check flag_volatile.
1734
1735 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1736
1737         PR c++/8849
1738         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
1739
1740 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
1741
1742         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
1743         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
1744         (BINFO_LANG_ELTS): New #define.
1745         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
1746
1747 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
1748
1749         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
1750
1751 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
1752
1753         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
1754         for class types.
1755         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
1756         rather than TYPE_LANG_FLAG_0.
1757         (TYPE_BUILT_IN): Remove.
1758         (TYPE_DEPENDENT_P): New macro.
1759         (TYPE_DEPENDENT_P_VALID): Likewise.
1760         (lang_type_class): Add fields_readonly.
1761         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
1762         * pt.c (dependent_type_p_r): New function, split out from ...
1763         (dependent_type_p): ... here.  Memoize results.
1764         * search.c (dependent_base_p): Use dependent_type_p, not
1765         uses_template_parms.
1766         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
1767         for class types.
1768
1769 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
1770
1771         * call.c (build_field_call): Use build_new_op, not build_opfncall.
1772         (prep_operand): New function.
1773         (build_new_op): Use it.  Remove dead code.
1774         * class.c (pushclass): Change "modify" parameter type from int to
1775         bool.
1776         (currently_open_class): Use same_type_p, not pointer equality.
1777         (push_nested_class): Adjust calls to pushclass, remove modify
1778         parameter.
1779         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
1780         (pushclass): Change prototype.
1781         (push_nested_class): Likewise.
1782         (grokoptypename): Remove.
1783         (build_opfncall): Remove.
1784         (value_dependent_expression_p): Declare.
1785         (resolve_typename_type): Likewise.
1786         (resolve_typename_type_in_current_instantiation): Likewise.
1787         (enter_scope_of): Remove.
1788         (tsubst): Remove.
1789         (tsubst_expr): Likewise.
1790         (tsubst_copy): Likewise.
1791         (tsubst_copy_and_build): Likewise.
1792         * decl.c (warn_about_implicit_typename_lookup): Remove.
1793         (finish_case_label): Return error_mark_node for erroneous labels.
1794         (start_decl): Adjust calls to push_nested_class.
1795         (grokfndecl): Call push_scope/pop_scope around call to
1796         duplicate_decls.
1797         (grokdeclarator): Do not call tsubst.
1798         (start_function): Adjust calls to push_nested_class.
1799         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
1800         (check_classfn): Use push_scope/pop_scope around type comparisions.
1801         (grokoptypename): Remove.
1802         (push_sscope): Adjust call to push_nested_class.
1803         * error.c (dump_type): Show cv-qualification of typename types.
1804         * init.c (build_member_call): Use build_new_op, not
1805         build_opfncall.
1806         * method.c (build_opfncall): Remove.
1807         * parser.c (cp_parser): Add allow_non_constant_expression_p and
1808         non_constant_expression_p.
1809         (cp_parser_constant_expression): Adjust prototype.
1810         (cp_parser_resolve_typename_type): Remove.
1811         (cp_parser_non_constant_expression): New function.
1812         (cp_parser_non_constant_id_expression): Likewise.
1813         (cp_parser_new): Set allow_non_constant_expression_p and
1814         non_constant_expression_p.
1815         (cp_parser_primary_expression): Reject `this' and `va_arg' in
1816         constant-expressions.  Note that dependent names aren't really
1817         constant.
1818         (cp_parser_postfix_expression): Reject conversions to non-integral
1819         types in constant-expressions.  Neither are increments or
1820         decrements.
1821         (cp_parser_unary_expression): Reject increments and decrements in
1822         constant-expressions.
1823         (cp_parser_direct_new_declarator): Adjust call to
1824         cp_parser_constant_expression.
1825         (cp_parser_cast_expression): Reject conversions to non-integral
1826         types in constant-expressions.
1827         (cp_parser_assignment_expression): Rejects assignments in
1828         constant-expressions.
1829         (cp_parser_expression): Reject commas in constant-expressions.
1830         (cp_parser_labeled_statement): Adjust call to
1831         cp_parser_constant_expression.
1832         (cp_parser_direct_declarator): Simplify array bounds, even in
1833         templates, when they are non-dependent.  Use
1834         resolve_typename_type, not cp_parser_resolve_typename_type.
1835         (cp_parser_class_head): Use resolve_typename_type, not
1836         cp_parser_resolve_typename_type.
1837         (cp_parser_member_declaration): Adjust call to
1838         cp_parser_constant_expression.
1839         (cp_parser_constant_initializer): Likewise.
1840         (cp_parser_constructor_declarator): Use resolve_typename_type, not
1841         cp_parser_resolve_typename_type.
1842         (cp_parser_late_parsing_default_args): Adjust call to
1843         push_nested_class.
1844         * pt.c (tsubst): Give it internal linkage.
1845         (tsubst_expr): Likewise.
1846         (tsubst_copy): Likewise.
1847         (tsubst_copy_and_build): Likewise.
1848         (push_access_scope_real): Likewise.
1849         (tsubst_friend_class): Likewise.
1850         (instantiate_class_template): Adjust call to pushclass.
1851         (value_dependent_expression_p): Give it external linkage.
1852         Robustify.
1853         (resolve_typename_type): New function.
1854         * semantics.c (finish_call_expr): Use build_new_op, not
1855         build_opfncall.
1856         (begin_constructor_declarator): Remove.
1857         (begin_class_definition): Adjust call to pushclass.
1858         (enter_scope_of): Remove.
1859         * typeck.c (comptypes): Resolve typename types as appropriate.
1860         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
1861         (build_x_compound_expr): Likewise.
1862         (build_modify_expr): Likewise.
1863         (build_x_modify_expr): Likewise.
1864         * typeck2.c (build_x_arrow): Likewise.
1865
1866 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
1867
1868         * pt.c (last_pending_template) Declare GTY().
1869
1870 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1871
1872         PR c++/8591
1873         * parser.c (cp_parser_elaborated_type_specifier): Convert
1874         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
1875         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
1876
1877 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
1878
1879         PR c++/9437
1880         * pt.c (unify): Don't unify '*T' with 'U C::*'.
1881
1882         PR c++/3902
1883         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
1884         inside a declarator.
1885
1886 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
1887
1888         * class.c (update_vtable_entry_for_fn): Add index parameter.
1889         Generate vcall thunk for covariant overriding from a virtual
1890         primary base.
1891         (dfs_modify_vtables): Adjust.
1892
1893 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
1894
1895         PR c++/9403
1896         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
1897         template keyword.
1898         (cp_parser_base_specifier): Look for and consume a
1899         TEMPLATE keyword. Replace switch with array index.
1900
1901         PR c++/795
1902         * semantics.c (finish_non_static_data_member): Remember the
1903         field's type even in a template.
1904
1905         PR c++/9415
1906         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
1907         already scoped.
1908
1909         PR c++/8545
1910         * parser.c (cp_parser_cast_expression): Be more tentative.
1911
1912 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1913
1914         * cp-tree.h (flagged_type_tree_s): Remove.
1915         (check_for_new_type): Likewise.
1916         * typeck2.c (check_for_new_type): Likewise.
1917
1918 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
1919
1920         * dump.c: ANSIfy function declarations and definitions.
1921
1922         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
1923
1924 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1925
1926         PR c++/9354
1927         * init.c (build_new): Set the type of the new-expression, even
1928         when processing_templte_decl.
1929
1930         PR c++/9216
1931         * parser.c (cp_parser_primary_expression): Improve error message
1932         for templates used in an expression context.
1933
1934         PR c++/8696
1935         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
1936         parse when encountering "typedef".
1937
1938 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
1939
1940         * class.c, parser.c: ANSIfy function definitions and declarations.
1941
1942 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1943
1944         PR c++/9328
1945         * error.c (dump_decl): For an OVERLOAD, just print the name of the
1946         function; it doesn't make sense to try to print its type.
1947         * semantics.c (finish_typeof): Issue errors about invalid uses.
1948
1949         PR c++/9298
1950         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
1951         function.
1952         (cp_parser_expression_statement): Use it.
1953         (cp_parser_explicit_instantiation): Likewise.
1954         * pt.c (do_decl_instantiation): Improve error handling logic.
1955
1956 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1957
1958         PR c++/9384
1959         * parser.c (cp_parser_using_declaration): Issue error messages
1960         about name resolution failures here.
1961
1962         PR c++/9388
1963         * class.c (currently_open_derived_class): Use dependent_type_p.
1964         * cp-tree.h (dependent_type_p): New function.
1965         (dependent_template_arg_p): Likewise.
1966         (dependent_template_p): Likewise.
1967         (type_dependent_expression_p): Likewise.
1968         * parser.c (cp_parser_dependent_type_p): Remove.
1969         (cp_parser_value_dependent_type_p): Likewise.
1970         (cp_parser_type_dependent_expression_p): Likewise.
1971         (cp_parser_dependent_template_arg_p): Likewise.
1972         (cp_parser_dependent_template_id_p): Likewise.
1973         (cp_parser_dependent_template_p): Likewise.
1974         (cp_parser_diagnose_invalid_type_name): Replace
1975         cp_parser_dependent_type_p with dependent_type_p, etc.
1976         (cp_parser_primary_expresion): Likewise.
1977         (cp_parser_nested_name_specifier_opt): Likewise.
1978         (cp_parser_postfix_expression): Likewise.
1979         (cp_parser_unary_expression): Likewise.
1980         (cp_parser_template_name): Likewise.
1981         (cp_parser_class_name): Likewise.
1982         (cp_parser_lookup_name): Likewise.
1983         * pt.c (dependent_type_p): New function.
1984         (value_dependent_expression_p): Likewise.
1985         (type_dependent_expression_p): Likewise.
1986         (dependent_template_arg_p): Likewise.
1987         (dependent_template_id_p): Likewise.
1988         (dependent_template_p): Likewise.
1989
1990         PR c++/9285
1991         PR c++/9294
1992         * parser.c (cp_parser_simple_declaration): Return quickly when
1993         encountering errors.
1994
1995 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1996
1997         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
1998
1999 2003-01-17  Jason Merrill  <jason@redhat.com>
2000
2001         PR c++/9167, c++/9358
2002         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
2003
2004 2003-01-17  Jason Merrill  <jason@redhat.com>
2005
2006         PR c++/9342
2007         * call.c (build_conditional_expr): Always do lvalue-rvalue
2008         conversion.
2009
2010 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
2011
2012         PR c++/9294
2013         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
2014         * cp-tree.h (BASELINK_BINFO): Adjust.
2015         (BASELINK_FUNCTIONS): Likewise.
2016         (BASELINK_ACCESS_BINFO): Likewise.
2017         (tree_baselink): New structure.
2018         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
2019         (lang_tree_node): Add baselink.
2020         * decl.c (cp_tree_node_structure): Add BASELINK case.
2021         * search.c (build_baselink): Adjust.
2022         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
2023         test from TREE_LIST case.
2024
2025         PR c++/9272
2026         * parser.c (cp_parser_constructor_declarator_p): Do not assume
2027         that a constructor cannot be declared outside of its own class.
2028
2029         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
2030         be resolved, neither can the qualified name.
2031
2032         * rtti.c (get_pseudo_ti_desc): Fix thinko.
2033
2034 2003-01-16  Jason Merrill  <jason@redhat.com>
2035
2036         PR c++/8564
2037         * init.c (build_vec_init): Re-add maxindex parm.
2038         (perform_member_init, build_aggr_init): Pass it.
2039         (build_new_1): Pass it. Use an incomplete array type for full_type.
2040         * typeck.c (build_modify_expr): Pass it.
2041         * cp-tree.h: Adjust.
2042
2043 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
2044
2045         * cp-tree.h (tsubst_copy_and_build): New declaration.
2046         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
2047         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
2048         (tsubst_copy_and_build): New function.
2049
2050 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
2051
2052         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
2053         (PARTIAL_INSTANTIATION_P): Remove.
2054         (IMPLICIT_TYPENAME_P): Likewise.
2055         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
2056         (build_typename_type): Remove declaration.
2057         (parmlist_is_exprlist): Likewise.
2058         * decl.c (build_typename_type): Make it static, remove third
2059         parameter.
2060         (push_class_binding): Don't do implicit typename stuff.
2061         (make_typename_type): Likewise.
2062         (lookup_name_real): Likewise.
2063         (grokdeclarator): Don't try to convert declarations into
2064         initializations.  Don't do implicit typename stuff.
2065         (parmlist_is_exprlist): Remove.
2066         (xref_basetypes): Simplify.
2067         * decl2.c (grokfield): Don't try to convert declarations into
2068         initializations.
2069         (build_anon_union_vars): Do this while processing templates, too.
2070         (finish_anon_union): Likewise.
2071         * error.c (dump_type): Remove implicit typename handling.
2072         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
2073         (cp_parser_primary_expression): Correct handling of names not
2074         found by unqualified name lookup in templates.
2075         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
2076         of types when possible.
2077         (cp_parser_simple_declaration): Complain intelligently about some
2078         invalid declarations.
2079         (cp_parser_member_declaration): Likewise.
2080         (cp_parser_constructor_declarator_p): Don't check when we're in a
2081         function scope.
2082         * pt.c (instantiate_class_template): Remove
2083         PARTIAL_INSTANTIATION_P gunk.
2084         * search.c (lookup_field_r): Don't build implicit typenames.
2085         (marked_pushdecls_p): Don't enter dependent base types.
2086         (unmarked_pushdecls_p): Likewise.
2087         * semantics.c (begin_class_definition): Remove implicit typename
2088         stuff.
2089
2090 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
2091
2092         PR c++/9212
2093         * parser.c (cp_parser_direct_declarator): If accepting either
2094         abstract or named, the name must be an unqualified-id.
2095
2096 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2097
2098         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
2099
2100 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2101
2102         * decl2.c (check_classfn): Fix uninitialized warning.
2103         (build_anon_union_vars): Likewise.
2104         * pt.c (tsubst_copy): Likewise.
2105
2106 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
2107
2108         Further conform g++'s __vmi_class_type_info to the C++ ABI
2109         specification.
2110         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
2111         the specification.
2112         (class_hint_flags): Likewise.
2113
2114 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2115
2116         * config-lang.in: Add semantics.c to gtfiles.
2117         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
2118         (saved_scope): Likewise.
2119         (type_lookups): Remove.
2120         (deferred_access): New structure.
2121         (type_access_control): Remove.
2122         (save_type_access_control): Likewise.
2123         (reset_type_access_control): Likewise.
2124         (decl_type_access_control): Likewise.
2125         (push_deferring_access_checks): Declare.
2126         (resume_deferring_access_checks): Likewise.
2127         (stop_deferring_access_checks): Likewise.
2128         (pop_deferring_access_checks): Likewise.
2129         (get_deferred_access_checks): Likewise.
2130         (pop_to_parent_deferring_access_checks): Likewise.
2131         (perform_deferred_access_checks): Likewise.
2132         (perform_or_defer_access_check): Likewise.
2133         * decl.c (make_typename_type): Use perform_or_defer_access_check.
2134         (make_unbound_class_template): Likewise.
2135         (grokdeclarator): Don't call decl_type_access_control.
2136         * parser.c (cp_parser_context): Remove deferred_access_checks
2137         and deferring_access_checks_p fields.
2138         (cp_parser_context_new): Adjust.
2139         (cp_parser): Remove access_checks_lists.
2140         (cp_parser_defer_access_check): Remove.
2141         (cp_parser_start_deferring_access_checks): Remove.
2142         (cp_parser_stop_deferring_access_checks): Remove.
2143         (cp_parser_perform_deferred_access_checks): Remove.
2144         (cp_parser_nested_name_specifier_opt): Use new deferred access
2145         functions.
2146         (cp_parser_simple_declaration): Likewise.
2147         (cp_parser_template_id): Likewise.
2148         (cp_parser_function_definition): Likewise.
2149         (cp_parser_class_specifier): Likewise.
2150         (cp_parser_lookup_name): Likewise.
2151         (cp_parser_single_declaration): Likewise.
2152         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
2153         (cp_parser_parse_tentatively): Likewise.
2154         (cp_parser_parse_definitely): Likewise.
2155         (yyparse): Likewise.
2156         (cp_parser_init_declarator): Remove access_checks parameter.
2157         Use new deferred access functions.
2158         (cp_parser_function_definition_from_specifiers_and_declarator):
2159         Likewise.
2160         (cp_parser_class_head): Remove deferring_access_checks_p and
2161         saved_access_checks parameters.  Use new deferred access functions.
2162         (cp_parser_member_specification_opt): Don't call
2163         reset_type_access_control.
2164         * search.c (type_access_control): Remove.
2165         * semantics.c: Include "gt-cp-semantics.h".
2166         (deferred_type_access_control): Remove.
2167         (deferred_access_stack): New variable.
2168         (deferred_access_free_list): Likewise.
2169         (push_deferring_access_checks): New function.
2170         (resume_deferring_access_checks): Likewise.
2171         (stop_deferring_access_checks): Likewise.
2172         (pop_deferring_access_checks): Likewise.
2173         (get_deferred_access_checks): Likewise.
2174         (pop_to_parent_deferring_access_checks): Likewise.
2175         (perform_deferred_access_checks): New function, adapted from
2176         cp_parser_perform_deferred_access_checks.
2177         (perform_or_defer_access_check): New function, adapted from
2178         cp_parser_defer_access_check.
2179         (current_type_lookups): Remove.
2180         (deferred_type_access_control): Likewise.
2181         (decl_type_access_control): Likewise.
2182         (save_type_access_control): Likewise.
2183         (reset_type_access_control): Likewise.
2184         (begin_function_definition): Adjust.
2185         (begin_class_definiton): Likewise.
2186
2187 2003-01-13  Jason Merrill  <jason@redhat.com>
2188
2189         PR c++/8748
2190         * class.c (build_base_path): Take the address before calling save_expr.
2191
2192         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
2193         all the ambiguous conversions are bad.
2194
2195         * class.c (maybe_warn_about_overly_private_class): Don't stop
2196         searching when we find a nonprivate method.
2197
2198         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
2199
2200 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
2201
2202         * cp-tree.h (get_arglist_len_in_bytes): Remove.
2203
2204         PR c++/9264
2205         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
2206         typeame types more robustly.
2207
2208 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
2209
2210         * parser.c:  Fix comment typos.
2211
2212 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
2213
2214         PR c++/9099
2215         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
2216         an object_type which is not a class type.
2217
2218 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
2219
2220         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
2221         (cp_parser_late_parsing_default_args): Likewise.
2222
2223 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
2224
2225         * cfns.gperf: ANSIfy function declarations.
2226         * cfns.h: Regenerate.
2227         * cp-tree.h: ANSIfy function declarations.
2228
2229 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
2230
2231         * cp-tree.h (reparse_absdcl_as_expr): Remove.
2232         (reparse_absdcl_as_casts): Likewise.
2233         (reparse_decl_as_expr): Likewise.
2234         (finish_decl_parsing): Likewise.
2235         * decl2.c (reparse_absdcl_as_expr): Remove.
2236         (reparse_absdcl_as_casts): Likewise.
2237         (repase_decl_as_expr): Likewise.
2238         (finish_decl_parsing): Likewise.
2239
2240         PR c++/9128
2241         PR c++/9153
2242         PR c++/9171
2243         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
2244         function.
2245         (cp_parser_nested_name_specifier_opt): Correct the
2246         check_dependency_p false.
2247         (cp_parser_postfix_expression): Fix formatting.
2248         (cp_parser_decl_specifier_seq): Avoid looking for constructor
2249         declarators when possible.
2250         (cp_parser_template_id): Avoid performing name-lookup when
2251         possible.
2252         (cp_parser_class_head): Do not count specializations when counting
2253         levels of templates.
2254         (cp_parser_constructor_declarator_p): Return immediately if
2255         there's no chance that the tokens form a constructor declarator.
2256         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
2257         expression with reference type.
2258         (get_tinfo_decl_dynamic): Do not return an expression with
2259         reference type.
2260         (build_typeid): Add comment.  Do not return an expression with
2261         reference type.
2262         * typeck.c (build_class_member_access_expr): Improve handling of
2263         conditionals and comma-expressions as objects.
2264
2265 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
2266
2267         * cfns.gperf: ANSIfy function declarations.
2268         * cfns.h: Regenerate.
2269         * cp-tree.h: ANSIfy function declarations.
2270         * parser.c: ANSIfy function declarations & definitions.
2271
2272         * decl.c (bad_specifiers): Fix parameter order error I introduced.
2273
2274 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
2275
2276         Merge from pch-branch:
2277
2278         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
2279
2280         Merge to tag pch-merge-20030102:
2281
2282         * semantics.c (finish_translation_unit): Don't call finish_file.
2283         * parser.c: Don't include ggc.h.
2284         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
2285         read first token here.  Don't allow PCH files after the first
2286         token is read.
2287         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
2288         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
2289         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
2290         (cp_parser_late_parsing_for_member): Don't duplicate call to
2291         cp_lexer_set_source_position_from_token.
2292         (cp_parser_late_parsing_default_args): Likewise.
2293         (yyparse): Call finish_file after clearing the_parser.
2294
2295         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
2296
2297         * Make-lang.in: Remove $(GGC_H) from all dependencies.
2298         (CXX_TREE_H): Add $(GGC_H).
2299         * class.c: Don't include ggc.h.
2300         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
2301         (method_name_cmp): Likewise.
2302         (resort_data): New variable.
2303         (resort_field_decl_cmp): New.
2304         (resort_method_name_cmp): New.
2305         (resort_sorted_fields): New.
2306         (resort_type_method_vec): New.
2307         (finish_struct_methods): Delete cast.
2308         (finish_struct_1): Delete cast.
2309         * cp-tree.h: Include ggc.h.
2310         (struct lang_type_class): Add reorder attribute to field `methods'.
2311         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
2312         (resort_sorted_fields): New prototype.
2313         (resort_type_method_vec): New prototype.
2314         * call.c: Don't include ggc.h.
2315         * decl.c: Likewise.
2316         * decl2.c: Likewise.
2317         * init.c: Likewise.
2318         * lex.c: Likewise.
2319         * method.c: Likewise.
2320         * optimize.c: Likewise.
2321         * parse.y: Likewise.
2322         * pt.c: Likewise.
2323         * repo.c: Likewise.
2324         * search.c: Likewise.
2325         * semantics.c: Likewise.
2326         * spew.c: Likewise.
2327         * tree.c: Likewise.
2328
2329         * lang-specs.h: Remove comment.
2330
2331         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
2332
2333         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
2334         (operator_name_info): Mark to be saved for PCH, specify size.
2335         (assignment_operator_name_info): Likewise.
2336
2337         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
2338
2339         * decl.c (anon_cnt): Mark to be saved for PCH.
2340
2341         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
2342
2343         * lex.c  (init_reswords): Delete now-untrue comment.
2344         Allocate ridpointers using GGC.
2345
2346         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
2347
2348         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
2349
2350         * g++spec.c (lang_specific_driver): Don't include standard
2351         libraries in `added'.
2352
2353         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
2354
2355         * decl2.c (finish_file): Call c_common_write_pch.
2356         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
2357
2358         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
2359
2360         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
2361         files when using g++.
2362         * lang-specs.h: Handle compiling C++ header files.
2363
2364 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
2365
2366         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
2367
2368 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2369
2370         * pt.c (push_access_scope_real): Call push_to_top_level for
2371         function in namespace scope.
2372         (pop_access_scope): Call pop_from_top_level for function in
2373         namespace scope.
2374
2375 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
2376
2377         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
2378
2379 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
2380
2381         * Make-lang.in (c++.install-common, c++.install-man,
2382         c++.uninstall): Prepend $(DESTDIR) to destination paths in
2383         all (un)installation commands.
2384         (c++.install-common): Rewrite $(LN) commands to support
2385         DESTDIR with "ln" as well as with "ln -s".
2386
2387 2003-01-08  Jason Merrill  <jason@redhat.com>
2388
2389         * parser.c (cp_parser_primary_expression): See through explicitly
2390         scoped ALIAS_DECLs, too.
2391
2392 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
2393
2394         * decl.c: Remove some #if 0 code.
2395
2396         * decl.c: ANSIfy function declarations.
2397
2398 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
2399
2400         * parser.c (cp_parser_asm_definition): Correct handling of omitted
2401         operands.
2402
2403 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2404
2405         PR c++/9030
2406         * decl.c (make_typename_type): Check access only when tf_error.
2407         (make_unbound_class_template): Likewise.
2408         * pt.c (saved_access_scope): New variable.
2409         (push_access_scope_real): New function.
2410         (push_access_scope): Likewise.
2411         (pop_access_scope): Likewise.
2412         (tsubst_default_argument): Use them.
2413         (instantiate_template): Likewise.
2414         (regenerate_decl_from_template): Likewise.
2415         (instantiate_decl): Likewise.
2416         (get_mostly_instantiated_function_type): Likewise.
2417
2418 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
2419
2420         * tree.c: Delete bogus #if 0 code.
2421
2422 2003-01-07  Andreas Schwab  <schwab@suse.de>
2423
2424         * class.c (layout_class_type): Don't use
2425         PCC_BITFIELD_TYPE_MATTERS if not defined.
2426
2427 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
2428
2429         PR c++/9165
2430         * decl2.c (build_cleanup): Mark the object as used.
2431
2432         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
2433         (hash_local_specialization): New function.
2434         (register_local_specialization): Revert 2003-01-05 change.
2435         (instantiate_decl): Use hash_local_specialization when creating
2436         the local_specializations table.
2437
2438         * decl2.c (mark_used): Do not synthesize thunks.
2439
2440         * class.c (layout_class_type): Correct handling of unnamed
2441         bitfields wider than their types.
2442
2443         PR c++/9189
2444         * parser.c (cp_parser): Remove default_arg_types.  Update
2445         documentation for unparsed_functions_queues.
2446         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
2447         parameter.
2448         (cp_parser_new): Don't set parser->default_arg_types.
2449         (cp_parser_function_definition): Adjust usage of
2450         unparsed_funtions_queues.
2451         (cp_parser_class_specifier): Don't mess with
2452         parser->default_arg_types.  Handle default argument processing in
2453         a separate phase from function body processing.
2454         (cp_parser_template_declaration_after_export): Adjust usage of
2455         unparsed_functions_queues.
2456         (cp_parser_late_parsing_for_member): Do not handle default
2457         arguments.
2458
2459 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
2460
2461         PR c++/9109
2462         * parser.c (cp_parser_declarator_kind): New enum.
2463         (cp_parser_declarator): Adjust.
2464         (cp_parser_direct_declarator): Adjust. Allow for either named or
2465         abstract declarator. Prefer abstract, if possible. Allow
2466         parenthesized function name.
2467         (cp_parser_condition): Adjust cp_parser_declarator call.
2468         (cp_parser_explicit_instantiation): Likewise.
2469         (cp_parser_init_declarator): Likewise.
2470         (cp_parser_type_id): Likewise.
2471         (cp_parser_function_definition): Likewise.
2472         (cp_parser_member_declaration): Likewise.
2473         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
2474         the tentative parsing.
2475         (cp_parser_exception_declaration): Likewise.
2476
2477 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
2478
2479         * parser.c (cp_parser_template_parameter): Adjust call to
2480         cp_parser_parameter_declaration.
2481         (cp_parser_parameter_declaration_list): Likewise.
2482         (cp_parser_parameter_declaration): Replace
2483         greater_than_is_operator_p with template_parm_p parameter.  Do not
2484         cache tokens for template default arguments.
2485
2486         * pt.c (retrieve_local_specialization): Use htab_find, not
2487         htab_find_with_hash.
2488         (register_local_specialization): Use htab_find_slot, not
2489         htab_find_slot_with_hash.
2490         (instantiate_decl): Pass a hash function to htab_create.
2491
2492 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2493
2494         * parser.c (cp_parser_binary_expression,
2495         cp_parser_multiplicative_expression,
2496         cp_parser_additive_expression, cp_parser_shift_expression,
2497         cp_parser_relational_expression, cp_parser_equality_expression,
2498         cp_parser_and_expression, cp_parser_exclusive_or_expression,
2499         cp_parser_inclusive_or_expression,
2500         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
2501         cp_parser_binary_expression): Const-ify.
2502
2503 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
2504
2505         * method.c (use_thunk): Disable access control while building the
2506         body of the thunk.
2507
2508 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
2509
2510         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
2511         front end.
2512
2513 2003-01-03  Matt Austern  <austern@apple.com>
2514
2515         * cp-tree.h (struct lang_type_class): add field for key method
2516         (cp_global_trees): rename dynamic_classes to keyed_classes
2517         (key_method): add definition
2518         * class.c (finish_struct_1): compute class's key method, and add
2519         the class to keyed_classes list if there is no key method.
2520         * decl.c (finish_function): add class to keyed_classes list if we
2521         see a definition of the class's key method.
2522         * pt.c (instantiate_class_template): add template specialization
2523         of a dynamic class to keyed_classes list.
2524         * decl2.c (key_method): remove
2525         (finish_file): iterate only through keyed_classes list when
2526         deciding whether to emit vtables, remove class from its list after
2527         we do the emission.
2528
2529 2003-01-02  Jason Merrill  <jason@redhat.com>
2530
2531         * call.c (build_conditional_expr): Stabilize lvalues properly.
2532         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
2533         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
2534         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
2535
2536         * call.c (convert_like_real): Call decl_constant_value for an
2537         IDENTITY_CONV even if there are no more conversions.
2538
2539         * cvt.c (build_up_reference): Don't push unnamed temps.
2540
2541         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
2542
2543         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
2544         for a backend struct.
2545
2546         * except.c (wrap_cleanups_r, build_throw): Make
2547         MUST_NOT_THROW_EXPRs void.
2548         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
2549
2550         * init.c (build_vec_delete_1): Pre-evaluate the base address.
2551
2552         * init.c (get_temp_regvar): Simplify logic.
2553
2554         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
2555         our replacement is a decl.
2556
2557         * decl.c (cp_make_fname_decl): Push the decls inside the
2558         outermost scope.
2559
2560 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
2561
2562         PR c++/45, c++/3784
2563         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
2564         the same too.
2565
2566 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
2567
2568         * parser.c (struct cp_parser): Add access_checks_lists field
2569         (cp_parser_simple_declaration): Use.
2570         (cp_parser_init_declarator): Likewise.
2571
2572 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
2573
2574         * parser.c (cp_parser_declaration): Accept the __extension__
2575         keyword before the declaration.
2576
2577         PR c++/2843
2578         * parser.c (cp_parser_parameter_declaration): Allow attributes to
2579         appear after the declarator.
2580
2581         * call.c (build_new_method_call): Fix typo in message format
2582         string.
2583
2584 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
2585
2586         * parser.c (cp_lexer_next_token_is): Declare it inline.
2587         (cp_lexer_set_source_position_from_token): Likewise.
2588         (cp_lexer_debugging_p): Likewise.
2589         (cp_parser_parsing_tentatively): Likewise.
2590         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
2591         to the cp_lexer_peek_token.
2592
2593         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
2594         expression.
2595
2596 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
2597
2598         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
2599         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
2600         cp/repo.c: Fix copyright years.
2601
2602 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
2603
2604         * lex.c: Remove superfluous include of cpplib.h.
2605         (CONSTRAINT): Define without conditions.
2606         (init_cp_pragma): Use c_register_pragma.
2607
2608 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
2609
2610         * .cvsignore: Remove.
2611
2612 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2613
2614         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
2615           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
2616           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
2617           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
2618           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
2619           copyright header.
2620         * lex.h: parse.y is dead, so don't mention it.  Also replace the
2621           copyright header with the default GNU copyright header.
2622
2623 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2624
2625         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
2626         (lookup_name_namespace_only): Likewise.
2627         (begin_only_namespace_names): Likewise.
2628         (end_only_namespace_names): Likewise.
2629         * decl.c (only_namespace_names): Remove.
2630         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
2631         (lookup_name_real): Do not check only_namespace_names.
2632         (lookup_name_namespace_only): Remove.
2633         (begin_only_namespace_names): Likewise.
2634         (end_only_namespace_names): Likewise.
2635         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
2636         nested-name-specifiers more gracefully.
2637         (cp_parser_class_or_namespace_name): Avoid looking up namespace
2638         names when they cannot possibly appear.
2639         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
2640         (cp_parser_elaborated_type_specifier): Likewise.
2641         (cp_parser_namespace_name): Only look for namespace names.
2642         (cp_parser_lookup_name): Add is_namespace parameter.
2643         (cp_parser_lookup_name_simple): Adjust call to
2644         cp_parser_lookup_name.
2645
2646         * parser.c (cp_parser_dependent_type_p): Fix thinko.
2647
2648 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
2649
2650         * .cvsignore: Update.
2651
2652 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
2653
2654         * class.c (modify_vtable_entry): Remove unused variable.
2655         (get_vcall_index): Always expect a non-thunk.
2656         (update_vtable_entry_for_fn): Combine covariant adjustments, when
2657         overriding a thunk. Pass get_vcall_index a non-thunk.
2658
2659         * decl2.c (finish_file): Mark undefined inlines as extern.
2660
2661 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2662
2663         * cp-tree.def (RETURN_INIT): Remove.
2664         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
2665         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
2666         (note_level_for_for): Remove.
2667         (note_level_for_try): Likewise.
2668         (note_level_for_catch): Likewise.
2669         (finish_named_return_value): Likewise.
2670         (do_pushlevel): Change prototype.
2671         (pending_lang_change): Remove.
2672         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
2673         sk_for.
2674         (note_level_for_for): Remove.
2675         (note_level_for_try): Likewise.
2676         (note_level_for_catch): Likewise.
2677         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
2678         * parser.c (cp_parser_context_free_list): Make it "deletable".
2679         (cp_parser_template_argument): Remove misleading comment.
2680         * pt.c (tsubst_expr): Remove RETURN_INIT code.
2681         * semantics.c (genrtl_named_return_value): Remove.
2682         (do_pushlevel): Take a scope kind as an argument.
2683         (begin_if_stmt): Adjust.
2684         (begin_while_stmt): Likewise.
2685         (begin_for_stmt): Likewise.
2686         (finish_for_init_stmt): Likewise.
2687         (begin_switch_stmt): Likewise.
2688         (begin_handler): Likewise.
2689         (begin_compound_stmt): Likewise.
2690         (finish_named_return_value): Remove.
2691         (cp_expand_stmt): Remove RETURN_INIT case.
2692         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
2693
2694 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2695
2696         PR c++/9112
2697         * parser.c (cp_parser_direct_declarator): Handle erroneous
2698         parenthesized declarators correctly.
2699
2700 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2701
2702         * cp-tree.h (pending_lang_change): Declare.
2703
2704 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
2705
2706         * parser.c (cp_parser_context_free_list): New variable.
2707         (cp_parser_context_new): Use it.
2708         (cp_parser_error): Check return code from
2709         cp_parser_simulate_error.
2710         (cp_parser_simulate_error): Return a value.
2711         (cp_parser_id_expression): Optimize common case.
2712         (cp_parser_class_name): Likewise.
2713         (cp_parser_class_specifier): Adjust call to
2714         cp_parser_late_parsing_default_args.
2715         (cp_parser_lookup_name): Optimize common case.
2716         (cp_parser_late_parsing_for_member): Adjust call to
2717         cp_parser_late_parsing_default_args.
2718         (cp_parser_late_parsing_default_args): Add scope parameter.
2719         (cp_parser_require): Avoid creating the error message unless it's
2720         needed.
2721         (cp_parser_parse_definitely): Place free'd contexts on the free
2722         list.
2723
2724         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
2725
2726 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
2727
2728         * parser.c (cp_parser_parameter_declaration_clause): Treat system
2729         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
2730
2731 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
2732
2733         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
2734         GCC, not GNU CC.
2735
2736 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
2737
2738         * parse.y: Remove.
2739         * spew.c: Likewise.
2740         * Make-lang.in (gt-cp-spew.h): Remove.
2741         * cp-tree.h (do_pending_lang_change): Remove.
2742         (do_identifier): Change prototype.
2743         (finish_id_expr): Remove.
2744         * decl.c (lookup_name_real): Remove yylex variable.
2745         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
2746         * lex.c (init_cpp_parse): Remove.
2747         (reduce_cmp): Likewise.
2748         (token_cmp): Likewise.
2749         (yychar): Likewise.
2750         (lastiddecl): Likewise.
2751         (token_count): Likewise.
2752         (reduce_count): Likewise.
2753         (yyhook): Likewise.
2754         (print_parse_statistics): Likewise.
2755         (do_pending_lang_change): Likewise.
2756         (do_identifier): Remove parsing parameter.
2757         * lex.h (lastiddecl): Remove.
2758         (looking_for_typename): Remove.
2759         (looking_for_template): Likewise.
2760         (pending_lang_change): Likewise.
2761         (yylex): Likewise.
2762         * semantics.c (finish_id_expr): Remove.
2763
2764         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
2765         thread" correctly.
2766
2767 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
2768
2769         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
2770         end, not the C front end.
2771
2772 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
2773
2774         * cp-tree.h (THUNK_TARGET): New macro.
2775         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
2776         (finish_thunk): Remove offset parms.
2777         * class.c (find_final_overrider): Look through thunks.
2778         (get_vcall_index): Use THUNK_TARGET.
2779         (update_vtable_entry_for_fn): Look through thunks. Set covariant
2780         fixed offset here. Adjust finish_thunk call.
2781         (build_vtbl_initializer): Adjust finish_thunk calls.
2782         * mangle.c (mangle_call_offset): Remove superfluous if.
2783         (mangle_thunk): Adjust.
2784         * method.c (make_thunk): Adjust.
2785         (finish_thunk): Adjust.
2786         (thunk_adjust): Remove assert.
2787         (use_thunk): Use THUNK_TARGET
2788         * dump1.c (cp_dump_tree): Adjust thunk dumping.
2789
2790         PR c++/9054
2791         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
2792         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
2793
2794 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2795
2796         Remove traditional C constructs 4/n.
2797         * decl2.c (grok_method_quals, warn_if_unknown_interface,
2798         grok_x_components, cp_build_parm_decl, build_artificial_parm,
2799         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
2800         delete_sanity, check_member_template, check_java_method,
2801         check_classfn, finish_static_data_member_decl, grokfield,
2802         grokbitfield, grokoptypename, grok_function_init,
2803         cplus_decl_attributes, constructor_name, defer_fn,
2804         build_anon_union_vars, finish_anon_union, coerce_new_type,
2805         coerce_delete_type, comdat_linkage, maybe_make_one_only,
2806         key_method, import_export_vtable, import_export_class,
2807         output_vtable_inherit, import_export_decl, import_export_tinfo,
2808         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
2809         set_guard, start_objects, finish_objects,
2810         start_static_storage_duration_function,
2811         finish_static_storage_duration_function, get_priority_info,
2812         start_static_initialization_or_destruction,
2813         finish_static_initialization_or_destruction,
2814         do_static_initialization, do_static_destruction,
2815         prune_vars_needing_no_initialization, write_out_vars,
2816         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
2817         add_using_namespace, merge_functions, ambiguous_decl,
2818         lookup_using_namespace, lookup_using_namespace,
2819         qualified_lookup_using_namespace, set_decl_namespace,
2820         decl_namespace, current_decl_namespace, push_decl_namespace,
2821         pop_decl_namespace, push_scope, pop_scope, add_function,
2822         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
2823         lookup_arg_dependent, do_namespace_alias,
2824         validate_nonmember_using_decl, do_nonmember_using_decl,
2825         do_toplevel_using_decl, do_local_using_decl,
2826         do_class_using_decl, do_using_directive, check_default_args,
2827         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
2828         * parser.c (cp_parser_class_head): Use booleanss.
2829         * decl.c (walk_globals, walk_vtables): Likewise.
2830         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
2831         walk_globals): Change return type from 'int' to 'bool'.
2832         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
2833         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
2834         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
2835         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
2836         qualifier_flags, tinfo_base_init, generic_initializer,
2837         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
2838         dfs_class_hint_unmark, class_hint_flags, class_initializer,
2839         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
2840         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
2841         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
2842         * repo.c (repo_compile_flags, repo_template_declared,
2843         repo_template_defined, repo_class_defined, repo_get_id,
2844         repo_template_used, repo_vtable_used, repo_inline_used,
2845         repo_tinfo_used, repo_template_instantiated, extract_string,
2846         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
2847         finish_repo): Likewise.
2848         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
2849         cxx_print_xnode): Likewise..
2850         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
2851         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
2852         * cxxfilt.c (demangle_it, print_demangler_list, usage,
2853         standard_symbol_characters, hp_symbol_characters, main, fatal):
2854         Likewise.
2855         (strip_underscore):  Change type from 'int' to 'bool'.
2856         (main): Use boolean constants.
2857
2858 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2859
2860         Remove traditional C constructs 3/n.
2861         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2862         build_up_reference, warn_ref_binding, convert_to_reference,
2863         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
2864         convert_to_void, convert, convert_force, build_type_conversion,
2865         build_expr_type_conversion, type_promotes_to,
2866         perform_qualification_conversions): Use C90 prototyping style.
2867         * decl2.c (grok_array_decl): Use boolean constant.
2868         (delete_sanity): Likewise.
2869         * typeck.c (build_unary_op): Likewise.
2870         * semantics.c (finish_switch_cond): Likewise.
2871         * parser.c (cp_parser_direct_new_declarator): Likewise.
2872         * init.c (build_new): Likewise.
2873
2874 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
2875
2876         * Make-lang.in (po-generated): Remove parse.c.
2877         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
2878         ($(srcdir)/cp/parse.h): Remove target.
2879         ($(srcdir)/cp/parse.c): Likewise.
2880         (gt-cp-parse.h): Likewise.
2881         (gt-cp-parser.h): New target.
2882         (c++.distclean): Do not remove parse.output.
2883         (c++.maintainer-clean): Do not remove parse.c or parse.h.
2884         (cp/spew.o): Remove target.
2885         (cp/lex.o): Adjust dependencies.
2886         (cp/pt.o): Likewise.
2887         (cp/parse.o): Likewise.
2888         (cp/TAGS): Do not mention parse.c.
2889         (cp/parser.o): New target.
2890         * NEWS: Mention the new parser.
2891         * call.c (build_scoped_method_call): Simplify.
2892         (build_method_call): Likewise.
2893         (build_new_function_call): Adjust calls to add_function_candidate
2894         and add_template_candidate.
2895         (build_new_op): Improve handling of erroroneous operands.
2896         (convert_default_arg): Remove circular argument processing.
2897         (name_as_c_string): New function.
2898         (build_new_method_call): Use it.
2899         (perform_implicit_conversion): Use error_operand_p.
2900         * class.c (finish_struct_anon): Use constructor_name_p.
2901         (check_field_decls): Likewise.
2902         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
2903         (resolve_address_of_overloaded_function): Likewise.
2904         (instantiate_type): Tweak pointer-to-member handling.
2905         (get_primary_binfo): Remove incorrect assertion.
2906         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
2907         * cp-tree.h (DEFARG_TOKENS): New macro.
2908         (default_arg): New structure.
2909         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
2910         (lang_tree_node): Add default_arg.
2911         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
2912         (type_info_ref_type): New macro.
2913         (saved_scope): Make processing_explicit_instantiation a boolean.
2914         (check_access): New field.
2915         (unparsed_text): Remove.
2916         (language_function): Remove unparsed_inlines.
2917         (error_operand_p): New macro.
2918         (lang_decl): Adjust pending_inline_info.
2919         (DEFARG_POINTER): Remove.
2920         (tag_types): Add typenames.
2921         (lookup_ualified_name): Declare.
2922         (lookup_name_real): Likewise.
2923         (shadow_tag): Adjust prototype.
2924         (get_scope_of_declarator): Declare it.
2925         (process_next_inline): Remove it.
2926         (check_for_missing_semicolon): Likewise.
2927         (maybe_get_template_decl_from_type_decl): Declare it.
2928         (finish_label_stmt): Adjust prototype.
2929         (finish_non_static_data_meber): Declare it.
2930         (finish_pseudo_destructor_call_expr): Rename to ...
2931         (finish_pseudo_destructor_expr): ... this.
2932         (finish_compound_literal): Declare it.
2933         (begin_inline_definitions): Remove it.
2934         (init_spew): Remove.
2935         (peekyylex): Likewise.
2936         (arbitrate_lookup): Likewise.
2937         (frob_opname): Likewise.
2938         (maybe_snarf_defarg): Likewise.
2939         (add_defarg_fn): Likewise.
2940         (do_pending_defargs): Likewise.
2941         (done_pending_defargs): Likewise.
2942         (unprocessed_defarg_fn): Likewise.
2943         (replace_defarg): Likewise.
2944         (end_input): Likewise.
2945         (get_overloaded_fn): Likewise.
2946         * cvt.c (convert_to_reference): Improve error handling.
2947         * decl.c (lookup_name_real): Do not declare it static.
2948         (maybe_push_to_top_level): Set check_access.
2949         (identifier_type_value): Adjust call to lookup_name_real.
2950         (lookup_qualified_name): New method.
2951         (lookup_name_real): Remove special-case parsing code.
2952         (lookup_name-nonclass): Adjust call to lookup_name_real.
2953         (lookup_name_namespace_only): Likewise.
2954         (lookup_name): Likewise.
2955         (check_tag_decl): Return the type declared.
2956         (shadow_tag): Likewise.
2957         (register_dtor_fn): Tweak check_access.
2958         (grokfndecl): Use constructor_name_p.
2959         (get_scope_of_declarator): New function.
2960         (grokdeclarator): Obscure tweaks for slightly different declarator
2961         representations.
2962         (start_method): Return error_mark_node to indicate failure.
2963         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
2964         * decl2.c (constructor_name_full): Simplify.
2965         (constructor_name): Use it.
2966         (build_expr_from_tree): Adjust for changes to do new parser.
2967         (push_scope): Improve robustness.
2968         (validate_nonmember_using_decl): Process declarations, not names.
2969         (do_class_using_decl): Likewise.
2970         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
2971         here.
2972         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
2973         * expr.c (cxx_expand_expr): Handle BASELINKs.
2974         * init.c (member_init_ok_or_else): Issue more errors.
2975         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
2976         * lex.c: Do not include parse.h.
2977         (yypring): Do not declare.
2978         (yylval): Likewise.
2979         (make_reference_declarator): Remove error-generating code.
2980         (rid_to_yy): Remove.
2981         (cxx_init): Do not call init_spew.
2982         (yypring): Remove.
2983         (check_for_missing_semicolon): Remove.
2984         * lex.h (got_scope): Remove.
2985         (got_object): Remove.
2986         * method.c (hack_identifier): Use finish_non_static_data_member.
2987         (implicitly_declare_fn): Adjust use of constructor_name.
2988         * parser.c: New file.
2989         * pt.c (parse.h): Do not include it.
2990         (maybe_get_template_decl_from_template): Do not declare it.
2991         (finish_member_template_decl): Tweak.
2992         (begin_explicit_instantiation): Adjust for
2993         processing_explicit_instantiation being boolean.
2994         (end_explicit_instantiation): Likewise.
2995         (maybe_process_partial_specialization): Tighten specialization
2996         test.
2997         (retrieve_local_specialization): Adjust ue of hash table.
2998         (eq_local_specializations): New function.
2999         (register_local_specialization): Likewise.
3000         (push_template_decl_real): Remove unnecessary test.
3001         (maybe_get_template_decl_from_type_decl): Don't make it static.
3002         (for_each_template_parm_r): Handle TYPEOF_TYPE.
3003         (tsubst_copy): Use retrieive_local_specialization to handle
3004         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
3005         Handle COMPONENT_REFs with pseudo-destructor-expressions.
3006         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
3007         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
3008         (unify): Tweak handling of CONST_DECLs.
3009         (regenerate_decl_from_template): Use push_nested_class.
3010         (template_for_substitution): New funciton.
3011         (instantiate_decl): Use it.  Register parameters as local
3012         specializations.
3013         * rtti.c (init_rtti_processing): Set type_info_ref_type.
3014         (build_typeid): Use it.
3015         (get_typeid): Likeise.
3016         * search.c (accessible_p): Use check_access, not
3017         flag_access_control.
3018         (adjust_result_of_qualified_name_lookup): Pay attention to the
3019         context_class.
3020         * semantics.c (finish_asm_stmt): Adjust error handling.
3021         (finish_label_stmt): Return the statement.
3022         (finish_non_static_data_member): New function.
3023         (finish_class_expr): Handle BASELINKs.
3024         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
3025         (finish_object_call_expr): Simplify handling during templates.
3026         (finish_pseudo_destructor_call_expr): Rename to ...
3027         (finish_pseudo_dtor_expr): ... this.
3028         (finish_compound_literal): New function.
3029         (begin_inline_definitions): Remove.
3030         (finish_sizeof): Remove special template handling.
3031         * spew.c: Do not include parse.h.
3032         * tree.c (get_overloaded_fn): Remove.
3033         * typeck.c (build_class_member_access_expr): Handle
3034         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
3035         (lookup_destructor): New function.
3036         (finish_class_member_access_expr): Use it.
3037         (convert_arguments): Simplify.
3038         (build_unary_op): Handle BASELINKs.
3039
3040 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
3041
3042         PR c++/4803
3043         * decl2.c (mark_used): Defer inline functions.
3044         (finish_file): Merge deferred_fns loops. Check all used
3045         inline functions have a definition.
3046         * method.c (make_thunk): Thunks are not inline.
3047
3048         PR c++/5116, c++/764
3049         * call.c (build_new_op): Make sure template class operands are
3050         instantiated.
3051
3052 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
3053
3054         PR C++/7964
3055         * cp-tree.h (resolve_scoped_fn_name): Prototype.
3056         * call.c (resolve_scoped_fn_name): New function. Deal with
3057         more template expansion. Broken out of ...
3058         * parse.y (parse_finish_call_expr): ... here. Call it.
3059         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
3060         resolve_scoped_fn_name and build_call_from_tree.
3061
3062         PR c++/9053
3063         * decl.c (duplicate_decls): Templates may be disambiguated by
3064         return type.
3065
3066         PR c++/8702
3067         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
3068         conversion operators on failure.
3069
3070 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3071
3072         Remove traditional C constructs 2/n.
3073         * call.c (tourney, build_field_call, equal_functions, joust,
3074         compare_ics, build_over_call, build_java_interface_fn_ref,
3075         convert_like_real, op_error, build_object_call, resolve_args,
3076         build_vfield_ref, check_dtor_name, build_scoped_method_call,
3077         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
3078         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
3079         standard_conversion, reference_related_p,
3080         reference_compatible_p, convert_class_to_reference,
3081         direct_reference_binding, reference_binding,
3082         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
3083         add_template_conv_candidate, any_viable, any_strictly_viable,
3084         build_this, splice_viable, print_z_candidates,
3085         build_user_type_conversion, build_new_function_call,
3086         conditional_conversion, build_conditional_expr, build_new_op,
3087         build_op_delete_call, enforce_access, call_builtin_trap,
3088         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
3089         convert_default_arg, type_passed_as, convert_for_arg_passing,
3090         in_charge_arg_for_name, is_properly_derived_from,
3091         maybe_handle_implicit_object, maybe_handle_ref_bind,
3092         source_type, add_warning, can_convert, can_convert_arg,
3093         perform_implicit_conversion, can_convert_arg_bad,
3094         initialize_reference, add_conv_candidate,
3095         add_template_candidate_real, add_template_candidate): Ansify.
3096
3097 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
3098
3099         PR c++/8572
3100         * cp-tree.h (grokoptypename): Add SCOPE parameter.
3101         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
3102         if in a template scope.
3103         * parse.y (unoperator): Return the scope.
3104         (operator_name): Adjust grokoptypename call.
3105
3106 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3107
3108         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
3109         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
3110         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
3111
3112 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
3113
3114         * ChangeLog: Fix a typo.
3115         * class.c: Fix comment typos.
3116         * cp-tree.h: Likewise.
3117
3118 2002-12-18  Jason Merrill  <jason@redhat.com>
3119
3120         Handle anonymous unions at the tree level.
3121         C++ ABI change: Mangle anonymous unions using the name of their
3122         first named field (by depth-first search).  Should not cause
3123         binary compatibility problems, though, as the compiler previously
3124         didn't emit anything for affected unions.
3125         * cp-tree.def (ALIAS_DECL): New tree code.
3126         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
3127         first field, not the largest.
3128         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
3129         push the decl, and write it out at namespace scope.
3130         * decl.c (lookup_name_real): See through an ALIAS_DECL.
3131         (pushdecl): Add namespace bindings for ALIAS_DECLs.
3132         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
3133         of a decl which doesn't have one.
3134         * typeck.c (build_class_member_access_expr): Don't recurse if
3135         we already have the type we want.
3136
3137 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3138
3139         PR c++/8099
3140         * friend.c (make_friend_class): Allow partial specialization
3141         when declaration is not a template friend.
3142
3143 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3144
3145         PR c++/3663
3146         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
3147         TREE_PROTECTED to created decl nodes.
3148
3149 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
3150
3151         * class.c (build_base_field): Do not set DECL_PACKED on the
3152         FIELD_DECL.
3153
3154 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3155
3156         * cp-tree.h (struct tree_srcloc): Use location_t.
3157         (SOURCE_LOCUS): New.
3158         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
3159
3160 2002-12-17  Jason Merrill  <jason@redhat.com>
3161
3162         * decl.c (finish_function): Also complain about no return in
3163         templates.
3164         * semantics.c (finish_return_stmt): Also call check_return_expr in
3165         templates.
3166         * typeck.c (check_return_expr): In a template, just remember that we
3167         saw a return.
3168
3169 2002-12-16  Jason Merrill  <jason@redhat.com>
3170
3171         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
3172         of the CALL_EXPR.
3173
3174         * semantics.c (do_pushlevel): Call pushlevel after adding the
3175         SCOPE_STMT.
3176         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
3177         * parse.y (function_body): Go back to using compstmt.
3178         * decl.c (pushdecl): Skip another level to get to the parms level.
3179
3180         * call.c (build_new_method_call): Use is_dummy_object to determine
3181         whether or not to evaluate the object parameter to a static member
3182         function.
3183
3184 2002-12-14  Jason Merrill  <jason@redhat.com>
3185
3186         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
3187         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
3188         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
3189         don't bother with an AGGR_INIT_EXPR.
3190         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
3191         just generate a new decl normally.  Take return slot parm.
3192         * cp-tree.h: Adjust prototype.
3193
3194 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3195
3196         PR C++/8031
3197         * cvt.c (convert_to_pointer_force): Don't try comparing against
3198         erronous type.
3199
3200 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
3201
3202         * cp-tree.h: Have the multiple-include guards around
3203         the entire file.
3204
3205 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
3206
3207         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
3208         for SPEW_DEBUG.
3209         (snarf_method): Same.
3210         (snarf_defarg): Same.
3211
3212 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
3213
3214         PR c++/8372
3215         * pt.c (tsubst_copy): Handle destructor names more correctly.
3216
3217 2002-12-10  Matt Austern   <austern@apple.com>
3218
3219         * cp-tree.h: get rid of needs_virtual_reinit bit.
3220
3221 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
3222
3223         * NEWS: Document removal of in-class initialization extension for
3224         static data members of non-arithmetic, non-enumeration type.
3225         * decl.c (check_static_variable_definition): Do not allow that
3226         extension.
3227         * decl2.c (grokfield): Do not call digest_init when processing
3228         templates.
3229
3230 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3231
3232         * error.c (dump_expr): Fix format specifier warning.
3233
3234 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
3235
3236         * class.c (finish_struct_1): Correct comment.
3237         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
3238
3239 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3240
3241         PR C++/8799
3242         * error.c (dump_expr): Don't ever try to dump a non-existent
3243         expression.
3244
3245 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
3246
3247         Implement covariant returns.
3248         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
3249         (struct lang_decl_flags): Add this_thunk_p flag.
3250         Rename vcall_offset to virtual_offset.
3251         (struct lang_decl): Rename delta to fixed_offset.
3252         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
3253         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
3254         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
3255         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
3256         (make_thunk): Add this_adjusting arg.
3257         (finish_thunk): Declare.
3258         (mangle_thunk): Add this_adjusting arg.
3259         * class.c (get_vcall_index): Use base function for lookup.
3260         (update_vtable_entry_for_fn): Generate covariant thunk.
3261         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
3262         (build_vtbl_initializer): Use base function for lookup.
3263         Finish covariant thunk here. Adjust thunk generation.
3264         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
3265         Adjust thunk dumping.
3266         * mangle.c (mangle_call_offset): New function.
3267         (mangle_thunk): Adjust for covariant thunks.
3268         * method.c (make_thunk): Adjust. Do not set name here.
3269         (finish_thunk): New function. Set name here.
3270         (use_thunk): Generate covariant thunks too.
3271         (thunk_adjust): New function.
3272         * search.c (covariant_return_p): Remove. Fold into ...
3273         (check_final_overrider): ... here. Simplify.
3274         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
3275
3276 2002-12-03  Jason Merrill  <jason@redhat.com>
3277
3278         PR c++/8674
3279         * call.c (build_over_call): Check specifically for TARGET_EXPR
3280         when eliding.
3281
3282         PR c++/8461, c++/8625
3283         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
3284         (cp_convert_parm_for_inlining): Remove.
3285         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
3286         Remove.
3287         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
3288         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
3289
3290         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
3291         an ambiguous conversion.
3292
3293 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
3294
3295         PR c++/8688
3296         * decl.c (reshape_init): Handle erroneous initializers.
3297
3298 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
3299
3300         PR c++/8720
3301         * spew.c (remove_last_token): Make sure that last_chunk is set
3302         correctly.
3303
3304         PR c++/8615
3305         * error.c (dump_expr): Handle character constants with
3306         TREE_OVERFLOW set.
3307
3308 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3309
3310         DR 180
3311         * decl.c (grokdeclarator): Require class-key for all friend class.
3312         Output the correct type and context in the error message.
3313
3314 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
3315
3316         PR c++/5919
3317         * pt.c (unify): Use variably_modified_type_p to test validity of
3318         template argument types.
3319
3320         PR c++/8727
3321         * cp-tree.h (lang_type_class): Add typeinfo_var.
3322         (CLASSTYPE_TYPEINFO_VAR): New macro.
3323         * rtti.c (get_tinfo_decl): Use it.
3324
3325         PR c++/8663
3326         * init.c (expand_member_init): Always get the main variant of a
3327         base class.
3328
3329 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
3330
3331         PR c++/8332
3332         PR c++/8493
3333         * decl.c (cxx_init_decl_processing): Use size_type_node, not
3334         c_size_type_node.
3335         * decl2.c (coerce_new_type): Likewise.
3336         * except.c (do_allocate_exception): Likewise.
3337
3338 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
3339
3340         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
3341         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
3342         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
3343         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
3344         typeck2.c: Include coretypes.h and tm.h.
3345         * Make-lang.in: Update dependencies.
3346
3347 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
3348
3349         PR c++/8227
3350         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
3351         (check_initializer): Validate the type of the initialized
3352         variable, even if the initializer is absent.
3353         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
3354
3355         PR c++/8214
3356         * typeck.c (convert_for_assignment): Do not use
3357         decl_constant_value on the operand.
3358
3359         PR c++/8511
3360         * pt.c (instantiate_decl): Handle template friends defined outside
3361         of the class correctly.
3362
3363 2002-11-29  Joe Buck <jbuck@synopsys.com>
3364
3365         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
3366         anonymous structs.
3367
3368 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
3369
3370         * class.c (walk_subobject_offsets): Recur on binfos as well as on
3371         types.
3372         (layout_nonempty_base_or_field): Pass it a binfo when processing a
3373         base class.
3374         (layout_empty_base): Likewise.
3375         (build_base_field): Likewise.
3376
3377 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
3378
3379         * class.c (build_base_field): Make sure we get the canonical base
3380         when descending through primary bases.
3381
3382 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
3383
3384         * decl.c (check_initializer): Don't error on initialisation of
3385         a scalar with a brace-enclosed expression.
3386
3387 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
3388
3389         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
3390         (template_parms_equal): Remove prototype.
3391         * typeck.c (buuld_indirect_ref): Reformat.
3392
3393 2002-11-25  Jason Merrill  <jason@redhat.com>
3394
3395         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
3396         and a DO_STMT.
3397
3398 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
3399
3400         * tree.c (cp_build_qualified_type_real): Correct handling of
3401         array types.
3402         * class.c (walk_subobject_offsets): Fix thinko.
3403         (build_base_field): Record offsets of empty bases in primary
3404         virtual bases.
3405         (layout_class_type): Record offsets of empty bases in fields.
3406
3407         * search.c (is_subobject_of_p_1): Fix thinko.
3408         (lookup_field_queue_p): Likewise.
3409
3410 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
3411
3412         * class.c (layout_class_type): Reuse tail padding when laying out
3413         virtual bases.
3414
3415 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
3416
3417         * rtti.c (qualifier_flags): Fix thinko.
3418
3419 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3420
3421         Remove traditional C constructs 1/n.
3422         * cp-tree.h (init_method, set_mangled_name_for_decl,
3423         build_opfncall, hack_identifier, make_thunk, use_thunk,
3424         synthesize_method, implicitly_declare_fn,
3425         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
3426         maybe_clone_body): Remove use of PARAMS.
3427
3428         * method.c (do_build_assign_ref, do_build_copy_constructor,
3429         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
3430         Likewise.
3431         (synthesize_method): Use 'bool' type and constants instead of
3432         'int'.
3433         (locate_copy): Likewise.
3434         (implicitly_declare_fn): Likewise.
3435
3436         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
3437         Remove old-style declaration.
3438         (maybe_clone_body): Use 'bool' type and constants.
3439
3440 2002-11-21  Glen Nakamura  <glen@imodulo.com>
3441
3442         PR c++/8342
3443         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
3444         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
3445         of the branches of a COND_EXPR.
3446
3447 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
3448
3449         * pt.c (for_each_template_parm): Free allocated memory.
3450         * search.c (is_subobject_of_p_1): New function.
3451         (is_subobject_of_p): Avoid walking virtual bases multiple times.
3452
3453 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
3454
3455         * g++spec.c (lang_specific_spec_functions): New.
3456
3457 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
3458
3459         * ChangeLog: Follow spelling conventions.
3460         * class.c: Likewise.
3461         * decl2.c: Likewise.
3462
3463 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
3464
3465         * search.c (dfs_push_decls): Do not try to reorder elements
3466         3..n of method_vec if method_vec has only two elements.
3467         Reverse order of two tests to avoid accessing unallocated
3468         memory.
3469
3470 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
3471
3472         * class.c (dfs_find_final_overrider): Adjust so that the most
3473         derived object is a binfo, rather than a class type.
3474         (find_final_overrider): Likewise.
3475         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
3476         (add_vcall_offset): Likewise.
3477
3478 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3479
3480         PR c++/8389
3481         * pt.c (instantiate_template): Push class scope for member
3482         functions.
3483         (get_mostly_instantiated_function_type): Likewise.  Don't call
3484         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
3485         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
3486         * mangle.c (write_encoding, write_unqualified_name): Adjust.
3487
3488 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
3489
3490         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
3491         vcall offfsets.  Split out ...
3492         (add_vcall_offset): ... new function.
3493
3494         PR c++/8338
3495         * pt.c (for_each_template_parm): Add htab parameter.
3496         (process_partial_specialization): Adjust call.
3497         (push_template_decl_real): Likewise.
3498         (pair_fn_data): Add visited.
3499         (for_each_template_parm_r): Avoid walking duplicates more than
3500         once.
3501         (uses_template_parms): Adjust call to for_each_template_parm.
3502
3503 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
3504
3505         * class.c (add_implicitly_declared_members): Put implicitly
3506         declared functions at the end of TYPE_METHODs when -fabi-version
3507         is at least 2.
3508
3509 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
3510
3511         * decl2.c (finish_file): Correct spelling.
3512
3513 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
3514
3515         * call.c (build_special_member_call): Do not try to lookup VTTs by
3516         name.
3517         * class.c (vtbl_init_data): Add generate_vcall_entries.
3518         (get_vtable_decl): Do not look up virtual tables by name.
3519         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
3520         (set_primary_base): Do not set CLASSTYPE_RTTI.
3521         (determine_primary_base): Likewise.
3522         (get_matching_virtual): Remove.
3523         (get_vcall_index): New function.
3524         (update_vtable_entry_for_fn): Do not try to use virtual thunks
3525         when they are not required.  Assign vcall indices at this point.
3526         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
3527         Do update dynamic_classes.
3528         (build_vtt): Do not add VTTs to the symbol table.
3529         (build_ctor_vtbl_group): Likewise.
3530         (build_vtbl_initializer): Simplify handling of vcall indices.
3531         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
3532         for the most derived class.
3533         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
3534         the vtable.
3535         * cp-tree.h (dynamic_classes): New macro.
3536         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
3537         (CLASSTYPE_RTTI): Remove.
3538         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
3539         (CLASSTYPE_VCALL_INDICES): New macro.
3540         (CLASSTYPE_VTABLES): Likewise.
3541         (BV_USE_VCALL_INDEX_P): Remove.
3542         (build_vtable_path): Remove.
3543         * decl2.c (finish_vtable_vardecl): Remove.
3544         (key_method): Remove #if 0'd code.
3545         (finish_vtable_vardecl): Rename to ...
3546         (maybe_emit_vtables): ... this.
3547         (finish_file): Use it.
3548         * search.c (look_for_overrides_here): Update comment.
3549
3550 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
3551
3552         PR c/7353 redux
3553         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
3554
3555 2002-10-30  Jason Merrill  <jason@redhat.com>
3556
3557         PR c++/8186
3558         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
3559         * call.c (convert_for_arg_passing): Set it.
3560         * except.c (stabilize_throw_expr): Recurse for such an arg.
3561
3562 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
3563
3564         * cp-tree.h (lang_decl_flags): Remove init_priority.
3565         (lang_decl): Add delta.
3566         (GLOBAL_INIT_PRIORITY): Remove.
3567         (THUNK_DELTA): Revise definition.
3568         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
3569         * dump.c (cp_dump_tree): Don't dump it.
3570
3571 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
3572
3573         PR c++/8160
3574         * typeck2.c (process_init_constructor): Call complete_array_type.
3575
3576         PR c++/8149
3577         * decl.c (make_typename_type): Issue errors about invalid results.
3578
3579 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3580
3581         Core issue 287, PR c++/7639
3582         * cp-tree.h (lang_type_class): Add decl_list field.
3583         (CLASSTYPE_DECL_LIST): New macro.
3584         (maybe_add_class_template_decl_list): Add declaration.
3585         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
3586         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
3587         (maybe_add_class_template_decl_list): New function.
3588         (add_implicitly_declared_members): Use it.
3589         * decl.c (maybe_process_template_type_declaration): Likewise.
3590         (pushtag): Likewise.
3591         * friend.c (add_friend): Likewise.
3592         (make_friend_class): Likewise.
3593         * semantics.c (finish_member_declaration): Likewise.
3594         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
3595         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
3596         to process members and friends in the order of declaration.
3597
3598 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
3599
3600         PR c++/8287
3601         * decl.c (finish_destructor_body): Create the label to jump to
3602         when returning from a destructor here.
3603         (finish_function_body): Rather than here.
3604
3605 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
3606
3607         PR c++/7266
3608         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
3609         SCOPE_REF is not null before dereferencing it.
3610
3611 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
3612
3613         * call.c (build_over_call): Use DECL_CONTEXT, not
3614         DECL_VIRTUAL_CONTEXT.
3615         * class.c (modify_vtable_entry): Don't mess with
3616         DECL_VIRTUAL_CONTEXT.
3617         (set_vindex): Remove.
3618         (set_primary_base): Remove vfuns_p parameter.
3619         (determine_primary_base): Likewise.
3620         (modify_all_vtables): Likewise.
3621         (layout_class_type): Likewise.  Adjust calls to other functions
3622         accordingly.
3623         (finish_struct_1): Adjust calls to modified functions.  Set
3624         DECL_VINDEX here.
3625         * cp-tree.h (lang_type_class): Remove vsize.
3626         (CLASSTYPE_VSIZE): Remove.
3627         (lang_decl): Remove thunks.
3628         (DECL_THUNKS): Adjust.
3629         (DECL_VIRTUAL_CONTEXT): Remove.
3630         (duplicate_decls): Don't copy it.
3631         * pt.c (build_template_decl): Don't set it.
3632         (tsubst_decl): Likewise.
3633         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
3634
3635         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
3636         (build_vtable_entry): Remove.
3637         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
3638         (lang_decl): Add thunks.
3639         (DECL_THUNKS): New macro.
3640         * decl.c (duplicate_decls): Copy it.
3641         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
3642         * semantics.c (emit_associated_thunks): Simplify.
3643
3644 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
3645
3646         PR c++/7228
3647         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
3648         lang_type structure exists before accessing field.
3649         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
3650         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
3651         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
3652         * class.c (check_field_decls): Use new macros.
3653         * typeck2.c (process_init_constructor): Remove redundant check for
3654         existence of lang_type structure.
3655
3656 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
3657
3658         * class.c (end_of_base): New method.
3659         (end_of_class): Use it.  Check indirect virtual bases.
3660
3661         * class.c (check_field_decls): Fix typo.
3662
3663 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
3664
3665         PR c++/8067
3666         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
3667         related variables.
3668
3669         PR c++/7679
3670         * spew.c (next_token): Do not return an endless stream of
3671         END_OF_SAVED_INPUT tokens.
3672         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
3673         the cached token stream.
3674         (snarf_defarg): Likewise.
3675
3676 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
3677
3678         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
3679         variably_modified_type_p.
3680         * cp-tree.h: Remove prototype of variably_modified_type_p.
3681         * tree.c (variably_modified_type_p): Remove; now implemented
3682         in language-independent code.
3683
3684 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
3685
3686         PR c++/6579
3687         * spew.c (snarf_parenthesized_expression): New function.
3688         (snarf_block): Use it.
3689
3690 2002-10-22  Richard Henderson  <rth@redhat.com>
3691
3692         * method.c (use_thunk): Always compute vcall_value; assert that
3693         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
3694         for vcall thunks as well.
3695
3696 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
3697
3698         * class.c (empty_base_at_nonzero_offset_p): New function.
3699         (layout_nonempty_base_or_field): Do not check for conflicts when
3700         laying out a virtual base using the GCC 3.2 ABI.
3701         (build_base_field): Correct checking for presence of empty classes
3702         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
3703
3704         * class.c (include_empty_classes): Use normalize_rli.
3705         (layout_class_type): Likewise.
3706
3707         * decl.c (reshape_init): Tweak handling of character arrays.
3708
3709         PR c++/8218
3710         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
3711         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
3712         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
3713         (check_field_decls): Likewise.
3714         (layout_class_type): Likewise.
3715         (finish_struct_1): Initialize it.
3716         (walk_subobject_offsets): Use it to prune searches.
3717
3718 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
3719
3720         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
3721         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
3722         TARGET_ASM_OUTPUT_MI_THUNK in comments.
3723
3724 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
3725
3726         * decl.c (start_decl): Point users of the old initialized-
3727         typedef extension at __typeof__.
3728
3729 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3730
3731         * Make-lang.in (method.o): Depend on TARGET_H.
3732         * method.c (target.h): Include it.
3733         (use_thunk): Use target hooks.  Use vcall thunks, if available.
3734
3735 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3736
3737         * class.c (base_derived_from): Make sure return value is a bool.
3738
3739 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3740
3741         * class.c (find_final_overrider_data_s): Remove overriding_fn and
3742         overriding_base.
3743         (dfs_base_derived_from): New function.
3744         (base_derived_from): Likewise.
3745         (dfs_find_final_overrider): Use base_derived_from.
3746         (find_final_overrider): Adjust.
3747
3748 2002-10-18  Jason Merrill  <jason@redhat.com>
3749
3750         PR c++/8080
3751         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
3752         with condition decls in a template.
3753
3754 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
3755
3756         * class.c (add_method): Compare template parms too.
3757
3758 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
3759
3760         PR c++/7584
3761         * class.c (handle_using_decl): Allow the declaration used to be
3762         from an ambiguous base.
3763
3764         * pt.c (convert_template_argument): Revert this change:
3765                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3766                 * pt.c (convert_template_argument): Do not fold non-type
3767                 template rguments when inside a template.
3768
3769         * init.c (expand_default_init): Handle brace-enclosed initializers
3770         correctly.
3771
3772 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3773
3774         * mangle.c (write_expression): Correct handling of enumeration
3775         constants.
3776         (write_template_arg): Likewise.
3777         * pt.c (convert_template_argument): Do not fold non-type template
3778         arguments when inside a template.
3779
3780         PR c++/7478
3781         * cvt.c (convert_to_reference): Allow references as the incoming
3782         type.
3783
3784 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3785
3786         PR c++/7524
3787         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
3788         build_qualified_type.
3789
3790 2002-10-15  Richard Henderson  <rth@redhat.com>
3791
3792         * error.c (dump_expr): Use real_to_decimal directly, and with
3793         the new arguments.
3794
3795 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
3796
3797         * decl.c (reshape_init): Fix typo.
3798
3799         * cp-tree.h (operator_name_info_t): Add arity.
3800         * lex.c (init_operators): Initialize it.
3801         * mangle.c (write_conversion_operator_name): New function.
3802         (write_unqualified_name): Use it.
3803         (write_template_args): Accept template arguments as a TREE_LIST.
3804         (write_expression): Adjust handling of qualified names to match
3805         specification.
3806
3807 2002-10-15  Jason Merrill  <jason@redhat.com>
3808
3809         * call.c (call_builtin_trap): New fn.
3810         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
3811         (build_call): Don't set current_function_returns_abnormally outside
3812         a function.
3813
3814 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
3815
3816         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
3817         clear CLASSTYPE_EMPTY_P.
3818         (build_base_field): Likewise.
3819         (build_base_fields): Likewise.
3820         (check_bases_and_members): Likewise.
3821         (create_vtbl_ptr): Likewise.
3822         (layout_class_type): Likewise.  Ensure that empty classes have
3823         size zero when used as base classes in the 3.2 ABI.
3824         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
3825         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
3826         parameter.
3827         (is_empty_class): Correct definition when using post-3.2 ABI.
3828         * cp-tree.h (lang_type_class): Add empty_p.
3829         (CLASSTYPE_EMPTY_P): New macro.
3830
3831 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
3832
3833         * init.c (build_delete): Do not apply save_expr for arrays.
3834         (build_vec_delete): Likewise.
3835
3836 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
3837
3838         * decl.c (layout_var_decl): Call layout_decl even for variables
3839         whose type is an array with unspecified bounds.
3840
3841         PR c++/7176
3842         * lex.c (do_identifier): Add another option for the parsing
3843         parameter.
3844         * parse.y (do_id): Use it.
3845
3846 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3847
3848         PRs C++/6803, C++/7721 and C++/7803
3849         * decl.c (grokdeclarator): Gracefully handle template-name as
3850         decl-specifier.
3851
3852 2002-10-11  Jason Molenda  <jmolenda@apple.com>
3853
3854         * init.c (build_field_list): Provide uses_unions_p with a default
3855         value.
3856
3857 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
3858
3859         PR c++/5661
3860         * cp-tree.h (variably_modified_type_p): New function.
3861         (grokdeclarator) Tighten check for variably modified types as
3862         fields.
3863         * pt.c (convert_template_argument): Do not allow variably modified
3864         types as template arguments.
3865         * tree.c (variably_modified_type_p): New function.
3866
3867         * NEWS: Document removal of "new X = ..." extension.
3868         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
3869         brace-enclosed initializers.
3870         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
3871         (initialize_local_var): Remove declaration.
3872         (expand_static_init): Likewise.
3873         * decl.c (next_initializable_field): New function.
3874         (reshape_init): Likewise.
3875         (check_initializer): Use them.  Build dynamic initializer for
3876         aggregates here too.
3877         (initialize_local_var): Simplify, and incorporate cleanup
3878         insertion code as well.
3879         (destroy_local_var): Remove.
3880         (cp_finish_decl): Tidy.
3881         (expand_static_init): Fold checks for whether or not a variable
3882         needs initialization into this function.  Simplify.
3883         * decl2.c (do_static_initialization): Simplify.
3884         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
3885         be done for us automatically.
3886         (expand_default_init): Handle brace-enclosed initializers
3887         correctly.
3888         (expand_aggr_init_1): Remove RTL-generation code.
3889         (build_vec_init): Remove "new X = ..." support.
3890         * parse.y (new_initializer): Likewise.
3891         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
3892         brace-enclosed initializer.
3893         (create_pseudo_type_info): Likewise.
3894         * typeck2.c (store_init_value): Don't try to handle digest_init
3895         being called more than once.
3896         (digest_init): Tidy handling of brace-enclosed initializers.
3897
3898 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3899
3900         * decl.c (typename_hash): Use htab_hash_pointer.
3901
3902 2002-10-10  Jim Wilson  <wilson@redhat.com>
3903
3904         * decl.c (duplicate_decls): Don't call decl_attributes.
3905
3906 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
3907
3908         PR c/7353
3909         * decl.c (start_decl): Unconditionally issue error for
3910         'typedef foo = bar'.
3911         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
3912         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
3913
3914 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3915
3916         * decl2.c (prune_vtable_vardecl): Delete unused function.
3917
3918 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3919
3920         PR c++/7754
3921         * decl2.c (finish_anon_union): Do not expand anonymous unions when
3922         procesing template functions.
3923         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
3924         type. Call layout_decl.
3925         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
3926
3927 2002-10-07  Richard Henderson  <rth@redhat.com>
3928
3929         * decl2.c, pt.c: Revert c++/7754 fix.
3930
3931 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3932
3933         PR c++/7804
3934         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
3935
3936 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3937
3938         PR c++/7931
3939         * pt.c (for_each_template_parm_r): Handle BASELINKs.
3940
3941         PR c++/7754
3942         * decl2.c (finish_anon_union): Do not expand anonymous unions when
3943         procesing template functions.
3944         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
3945         type. Call layout_decl.
3946         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
3947
3948 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3949
3950         PR c++/8006
3951         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
3952         template parameters.
3953         (globals): Add entity and need_abi_warning.
3954         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
3955         CLASSTYPE_TEMPLATE_INFO.
3956         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
3957         TYPE_TI_TEMPLATE.
3958         (write_prefix): Handle typename types correctly.
3959         (write_template_prefix): Handle template template parameters
3960         correctly.
3961         (start_mangling): Add entity parameter.
3962         (finish_mangling): Warn about names whose mangling will change.
3963         (mangle_decl_string): Adjust.
3964         (mangle_type_string): Likewise.
3965         (mangle_special_for_type): Likewise.
3966         (mangle_ctor_vtbl_for_type): Likewise.
3967         (mangle_thunk): Likewise.
3968         (mangle_guard_variable): Likewise.
3969         (mangle_ref_init_variable): Likewise.
3970
3971 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
3972
3973         PR c++/7188.
3974         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
3975         * cp-tree.h (emit_base_init): Rename to ....
3976         (emit_mem_initializers): ... this.
3977         (expand_member_init): Change prototype.
3978         * init.c (perform_member_init): Compute explicit, rather than
3979         requiring it as a parameter.
3980         (sort_member_init): Rename to ...
3981         (sort_mem_initializers): ... this.  Process bases and data members
3982         together.
3983         (sort_base_init): Remove.
3984         (emit_base_init): Rename to ...
3985         (emit_mem_initializers): ... this.
3986         (expand_aggr_vbase_init_1): Remove.
3987         (construct_virtual_bases): Rename to ...
3988         (construct_virtual_base): ... this.
3989         (expand_member_init): Rework handling of base initializers.
3990         * method.c (do_build_copy_constructor): Use
3991         finish_mem_initializers.
3992         * parse.y (member_init): Adjust calls to expand_member_init.
3993         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
3994         (tsubst_initializer_list): Use expand_member_init.
3995         * semantics.c (finish_mem_intiailizers): Simplify.
3996
3997 2002-10-02  Matt Austern  <austern@apple.com>
3998         * decl.c (walk_vtables_r): Fixed typo that caused result to
3999         never get a nonzero value.
4000
4001 2002-10-02  Roger Sayle  <roger@eyesopen.com>
4002
4003         PR optimization/6627
4004         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
4005         from here, and move it to tree.h.
4006         * decl.c (cxx_init_decl_processing): If storing the vbit
4007         in function pointers, ensure that force_align_functions_log
4008         is atleast one.
4009
4010 2002-10-02  Matt Austern  <austern@apple.com>
4011
4012         * class.c (check_field_decls): Changed warning about const member
4013         variables so that it doesn't get issued for a class aggregate.
4014
4015 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
4016
4017         * decl.c (cp_finish_decl): Make sure array types are laid out,
4018         even if the array bounds are unknown.
4019
4020 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
4021
4022         * class.c (build_vtbl_initializer): Change build_c_cast
4023         to build1.
4024
4025 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
4026
4027         * decl.c (cp_finish_decl): Make sure array types are laid out,
4028         even if the array bounds are unknown.
4029
4030         * decl.c (cp_finish_decl): Correct check for dynamic
4031         initialization of thread-local storage.
4032
4033 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
4034
4035         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
4036         overloaded.
4037
4038 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
4039
4040         * class.c (build_vtbl_initializer): Add cast.
4041         (add_vcall_offset_vtbl_entries_1):
4042         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
4043
4044 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
4045
4046         * class.c (walk_subobject_offsets): Correct the calculation of
4047         offsets for virtual bases.  Correct the counting of array
4048         elements.
4049         (layout_nonempty_base_or_field): Simplify.  Correct the
4050         calculation of offsets to be propagated through the binfo
4051         hierarchy.
4052         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
4053         Add the FIELD_DECL to TYPE_FIELDS.
4054         (build_base_fields): Adjust accordingly.
4055         (layout_virtual_bases): Use build_base_field.
4056         (end_of_class): Return a tree, not an integer.
4057         (warn_about_ambiguous_direct_bases): Rename to ...
4058         (warn_about_ambiguous_bases): ... this.
4059         (include_empty_classes): New function.
4060         (layout_class_type): Create an alternative version of the type to
4061         be used when as a base class type.  Do not call
4062         finish_record_layout until we are done laying out the class.
4063         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
4064         as_base.
4065         (CLASSTYPE_SIZE): Reimplement.
4066         (CLASSTYPE_SIZE_UNIT): Likewise.
4067         (CLASSTYPE_ALIGN): Likweise.
4068         (CLASSTYPE_USER_ALIGN): Likewise.
4069         (CLASSTYPE_AS_BASE): New macro.
4070         (DECL_INITIALIZED_P): Likewise.
4071         (extract_init): Remove prototype.
4072         (build_forced_zero_init): Rename to ...
4073         (build_zero_init): ... this.
4074         (force_store_init_value): Remove.
4075         * decl.c (obscure_complex_init): Remove.
4076         (duplicate_decls): Copy DECL_INITIALIZED_P.
4077         (check_initializer): Do not leave junk in DECL_INITIAL.
4078         (cp_finish_decl): Handle zero-initialization of entities with
4079         static storage duration.
4080         * expr.c (extract_init): Remove.
4081         * init.c (build_forced_zero_init): Remove.
4082         (build_zero_init): New function.
4083         (build_default_init): Use it.
4084         (build_field_list): Skip FIELD_DECLs for base subobjects.
4085         (push_base_cleanups): Likewise.
4086         * method.c (do_build_assign_ref): Likewise.
4087         (synthesize_exception_spec): Likewise.
4088         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
4089         (regenerate_decl_from_template): To not set DECL_INITIAL for a
4090         static data member whose initialization took place in its class.
4091         (instantiate_decl): Do not pass an initializer to cp_finish_decl
4092         in that situation.
4093         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
4094         (dfs_unuse_fields): Likewise.
4095         * tree.c (pod_type_p): Handle error_mark_node.
4096         (zero_init_p): Likewise.
4097         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
4098         subobjects.
4099         * typeck2.c (store_init_value): Remove #if 0'd code.
4100         (force_store_init_value): Remove.
4101         (process_init_constructor): Use build_zero_init.
4102
4103 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
4104
4105         PR c++/7788
4106         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
4107
4108 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
4109
4110         * cp-tree.h: Fix comment typos.
4111         * decl.c: Likewise.
4112         * pt.c: Likewise.
4113
4114 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
4115
4116         * cp/class.c (contains_empty_class_p): New method.
4117         (walk_subobject_offsets): Correct computation of field offset.
4118         (layout_empty_base): Correct placement of emtpy base classes.
4119         (layout_class_type): Warn about ABI changes.
4120
4121 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
4122
4123         * cp/class.c (layout_virtual_bases): Do not round the size of the
4124         type to a multiple of the alignment before laying out virtual bases.
4125         (layout_class_type): Correct handling of bit-fields that are wider
4126         than their type inside unions.  Round the size of the type to a
4127         even number of bytes when computing the size without virtual
4128         bases.
4129         * cp/cp-tree.h (abi_version_at_least): New macro.
4130
4131 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
4132
4133         * ChangeLog: Follow spelling conventions.
4134         * ChangeLog.2: Likewise.
4135         * call.c: Likewise.
4136         * class.c: Likewise.
4137         * cp-tree.h: Likewise.
4138         * cvt.c: Likewise.
4139         * decl.c: Likewise.
4140         * decl2.c: Likewise.
4141         * except.c: Likewise.
4142         * friend.c: Likewise.
4143         * g++spec.c: Likewise.
4144         * init.c: Likewise.
4145         * lex.c: Likewise.
4146         * mangle.c: Likewise.
4147         * method.c: Likewise.
4148         * operators.def: Likewise.
4149         * optimize.c: Likewise.
4150         * pt.c: Likewise.
4151         * rtti.c: Likewise.
4152         * search.c: Likewise.
4153         * semantics.c: Likewise.
4154         * spew.c: Likewise.
4155         * tree.c: Likewise.
4156         * typeck.c: Likewise.
4157
4158 2002-09-18  Devang Patel  <dpatel@apple.com>
4159
4160         * cp/cp-tree.h: New prototype for walk_vtabls().
4161         * cp/decl.c (walk_vtables_r): New function.
4162         (struct cp_binding_level): Add new members, namespaces,
4163         names_size and vtables.
4164         (add_decl_to_level): Add decl in namespaces or vtables
4165         chain, if conditions match.
4166         (walk_vtables): New function.
4167         (walk_namespaces_r): Travers separate namespace chain
4168         for namespace decls.
4169         (wrapup_globals_for_namespace): Use names_size instead
4170         of list_length().
4171         * cp/decl2.c (finish_file): Use walk_vtables() instead of
4172         walk_globals() to walk vtable decls.
4173
4174 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
4175
4176         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
4177         ICE with invalid pointers & references.
4178
4179 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
4180
4181         * Make-lang.in: Remove all references to the demangler.
4182         * cxxfilt.c: Moved to binutils.
4183
4184 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
4185
4186         PR c++/7718
4187         * pt.c (tsubst_decl): Remove assert.
4188
4189         Remove DR 295 implementation.
4190         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
4191         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
4192         about ignoring volatile qualifiers.
4193
4194         * search.c (lookup_member): Correct documentation.
4195
4196 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
4197
4198         * cp-tree.h (union lang_tree_node): Add chain_next option.
4199
4200 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
4201
4202         * parse.y (parse_finish_call_expr): Check lookup_member result.
4203
4204         PR c++/7015
4205         * semantic.c (finish_asm_stmt): Fix operand/output_operands
4206         thinko.
4207         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
4208
4209 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
4210
4211         PR c++/7919
4212         * call.c (build_over_call): Convert this pointer for fns found by
4213         using decls.
4214
4215 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
4216
4217         * ChangeLog: Follow spelling conventions.
4218         * ChangeLog.1: Likewise.
4219
4220 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
4221
4222         PR c++/7768
4223         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
4224
4225 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
4226
4227         * error.c: Fix comment formatting.
4228         * except.c: Likewise.
4229         * expr.c: Likewise.
4230         * friend.c: Likewise.
4231         * g++spec.c: Likewise.
4232         * init.c: Likewise.
4233         * lex.c: Likewise.
4234         * mangle.c: Likewise.
4235         * method.c: Likewise.
4236         * optimize.c: Likewise.
4237         * pt.c: Likewise.
4238         * rtti.c: Likewise.
4239         * search.c: Likewise.
4240         * semantics.c: Likewise.
4241         * spew.c: Likewise.
4242         * tree.c: Likewise.
4243         * typeck.c: Likewise.
4244         * typeck2.c: Likewise.
4245
4246 2002-09-13  Matt Austern  <austern@apple.com>
4247
4248         PR C++/7828
4249         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
4250         * cp/call.c: Change call-by-const-reference mechanism to use
4251         non_cast_lvalue_p when deciding whether the create a temporary.
4252         We need a temporary when passing, e.g. (long) x by const ref.
4253
4254 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
4255
4256         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
4257
4258 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
4259
4260         * decl.c: Fix comment formatting.
4261         * decl2.c: Likewise.
4262
4263 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
4264
4265         * call.c: Fix comment formatting.
4266         * class.c: Likewise.
4267         * cp-lang.c: Likewise.
4268         * cp-tree.h: Likewise.
4269         * cvt.c: Likewise.
4270
4271 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
4272
4273         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
4274         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
4275         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
4276         minor adjustments (use version_string, eliminate yet another
4277         duplicate of xmalloc)
4278
4279 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4280
4281         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
4282
4283 2002-09-05  Jason Merrill  <jason@redhat.com>
4284
4285         * typeck2.c (add_exception_specifier): Only pedwarn for an
4286         incomplete type.
4287         (require_complete_eh_spec_types): New fn.
4288         (cxx_incomplete_type_diagnostic): Also support pedwarning.
4289         * typeck.c (complete_type_or_diagnostic): Likewise.
4290         * call.c (build_call): Call require_complete_eh_spec_types.
4291         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
4292         on an incomplete type.
4293
4294 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
4295
4296         * decl.c (start_cleanup_fn): Clear interface_only before
4297         start_function, restore it afterwards.
4298
4299 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
4300
4301         * cp-tree.h (finish_builtin_type): Remove.
4302         * decl2.c (finish_builtin_type): Move to common code.
4303         * decl.c (build_ptrmemfunc_type): Adjust.
4304         * rtti.c (create_pseudo_type_info): Adjust.
4305         (create_tinfo_types): Adjust.
4306
4307 2002-08-31  Jason Merrill  <jason@redhat.com>
4308
4309         * cp-lang.c (cp_expr_size): Allow initialization from a
4310         CONSTRUCTOR.
4311
4312 2002-08-30  Richard Henderson  <rth@redhat.com>
4313
4314         PR opt/7515
4315         * tree.c: Include target.h.
4316         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
4317         don't bind locally.
4318         * Makefile.in (tree.o): Update.
4319
4320 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
4321
4322         * class.c (layout_virtual_bases): Warn about bugs in G++ that
4323         result in incorrect object layouts.
4324         (layout_class_type): Likewise.
4325
4326 2002-08-24  Matt Austern  <austern@apple.com>
4327
4328         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
4329         are allowable.
4330         (real_lvalue_p): Update caller.
4331         (lvalue_p): Ditto.
4332         (non_cast_lvalue_or_else): New.
4333         * tree.h: Declare it.
4334         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
4335
4336 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
4337
4338         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
4339         and COND_EXPR specially; fix error message output.
4340
4341 2002-08-22  Jason Merrill  <jason@redhat.com>
4342
4343         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
4344         * semantics.c (nullify_returns_r): Likewise.
4345
4346 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4347
4348         Fix PR/7621
4349         * typeck.c (finish_class_member_access_expr): Diagnose cases where
4350         name lookup finds nothing.
4351
4352 2002-08-15  Jason Merrill  <jason@redhat.com>
4353
4354         * semantics.c (finish_then_clause): Remove redundant assignment.
4355         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
4356         extra binding level outside the if/switch statement.
4357         (finish_while_cond, finish_for_cond): Rewrite complex condition
4358         into the loop body.
4359
4360 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
4361
4362         * parse.y (sizeof, alignof, typeof): New non-terminals to
4363         increment skip_evaluation.  Replace terminals with them and
4364         decrement skip_evaluation at the end of rules using them.
4365         * decl2.c (mark_used): Don't assemble_external if
4366         skipping evaluation.
4367
4368 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
4369
4370         Fix PR/7504
4371         * parse.y (parse_finish_call_expr): Handle incomplete
4372         type used to name a scope.
4373
4374 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
4375
4376         PR c++/7598
4377         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
4378         regression caused by my 2002-08-08 patch.
4379
4380 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
4381
4382         * decl.c (pushdecl_class_level): Honor requests to bind names to
4383         OVERLOADs.
4384
4385 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4386
4387         * decl2.c (build_call_from_tree): Fix uninitialized variable.
4388         * parse.y (parse_finish_call_expr): Likewise.
4389         * repo.c (old_args, old_dir, old_main): Const-ify.
4390
4391 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
4392
4393         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
4394         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
4395         * optimize.c (maybe_clone_body): Likewise.
4396         * pt.c (tsubst_enum): Likewise.
4397         (lookup_template_class): Likewise.
4398         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
4399
4400 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
4401
4402         * lang-specs.h: Remove -ansi.
4403
4404 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
4405
4406         * tree.c (maybe_dummy_object): Replace // with /* */
4407
4408 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
4409
4410         * call.c (standard_conversion): Use build_ptrmem_type.
4411         * cp-tree.h (build_ptrmem_type): New function.
4412         (adjust_result_of_qualified_name_lookup): Likewise.
4413         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
4414         static data members.
4415         (build_ptrmem_type): New function.
4416         (grokdeclarator): Do not use build_offset_type when encountering a
4417         qualified name.
4418         * parse.y (parse_finish_call_expr): Use
4419         adjust_result_of_qualified_name_lookup.
4420         * search.c (adjust_result_of_qualified_name_lookup): New function.
4421         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
4422         accessing OFFSET_TYPEs directly.
4423
4424 2002-08-08  Mike Stump  <mrs@apple.com>
4425
4426         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
4427         (type_decays_to): Likewise.
4428         * class.c (find_final_overrider): Likewise.
4429         (maybe_note_name_used_in_class): Likewise.
4430         * decl.c (current_tmpl_spec_kind): Likewise.
4431         (add_binding): Likewise.
4432         (push_class_binding): Likewise.
4433         (duplicate_decls): Likewise.
4434         (layout_var_decl): Likewise.
4435         (grokfndecl): Likewise.
4436         (grokdeclarator): Likewise.
4437         (check_default_argument): Likewise.
4438         * decl2.c (handle_class_head): Likewise.
4439         * error.c (dump_template_decl): Likewise.
4440         * init.c (build_offset_ref): Likewise.
4441         * pt.c (check_specialization_scope): Likewise.
4442         (determine_specialization): Likewise.
4443         (check_explicit_specialization): Likewise.
4444         (maybe_check_template_type): Likewise.
4445         (process_partial_specialization): Likewise.
4446         (check_default_tmpl_args): Likewise.
4447         (push_template_decl_real): Likewise.
4448         (convert_template_argument): Likewise.
4449         (try_class_unification): Likewise.
4450         (get_bindings_real): Likewise.
4451         (do_decl_instantiation): Likewise.
4452         * semantics.c (begin_function_definition): Likewise.
4453         (finish_member_declaration): Likewise.
4454         (check_multiple_declarators): Likewise.
4455         * typeck.c (comp_array_types): Likewise.
4456         (comptypes): Likewise.
4457         (expr_sizeof): Likewise.
4458         (build_binary_op): Likewise.
4459         (dubious_conversion_warnings): Likewise.
4460         (check_return_expr): Likewise.
4461
4462 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
4463
4464         * typeck.c (build_class_member_access_expr): Do not return
4465         error_mark_node when no error has occurred.
4466
4467 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4468
4469         * typeck.c (build_component_addr): Remove.
4470         (build_unary_op): Just check it's not a bitfield, and then build
4471         an ADDR_EXPR.
4472
4473 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4474
4475         * class.c (convert_to_base): Correct check for error_mark_node.
4476         (create_vtable_ptr): Remove unused VFUNS_P parm.
4477
4478 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4479
4480         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
4481
4482 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
4483
4484         Rework build_component_ref.
4485         * call.c (build_vfield_ref): Do not go through build_component_ref.
4486         (build_field_call): Use build_class_member_access_expr.
4487         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
4488         (build_object_call): Likewise.
4489         * class.c (convert_to_base): New function.
4490         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
4491         (instantiate_type): Handle BASELINKs.
4492         * cp-tree.def (BASELINK): New tree code.
4493         * cp-tree.h (BASELINK_P): Reimplement.
4494         (SET_BASELINK_P): Remove.
4495         (BASELINK_BINFO): Reimplement.
4496         (BASELINK_FUNCTIONS): Likewise.
4497         (BASELINK_ACCESS_BINFO): Likewise.
4498         (BASELINK_OPTYPE): Likewise.
4499         (convert_to_base): New function.
4500         (name_p): Likewise.
4501         (build_object_ref): Remove.
4502         (build_component_ref_1): Likewise.
4503         (build_component_ref): Likewise.
4504         (build_x_component_ref): Likewise.
4505         (build_class_member_access_expr): New function.
4506         (finish_class_member_access_expr): Likewise.
4507         (build_ptrmemfunc_access_expr): Likewise.
4508         * decl.c (grokdeclarator): Handle BASELINKs.
4509         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
4510         finish_class_member_access_expr.
4511         (arg_assoc): Handle BASELINKs.
4512         (do_class_using_decl): Likewise.
4513         * error.c (dump_decl): Likewise.
4514         (dump_expr): Use build_ptrmemfunc_access_expr.
4515         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
4516         destructors.
4517         (build_throw): Use BASELINK_FUNCTIONS.
4518         * init.c (perform_member_init): Use
4519         build_class_member_access_expr.
4520         (build_offset_ref): Handle BASELINKs.  Use
4521         build_class_member_access_expr.
4522         * method.c (hack_identifier): Likewise.
4523         * parse.y (do_id): Use BASELINK, not TREE_LIST.
4524         (primary): Remove uses of build_object_ref.
4525         * pt.c (lookup_template_function): Handle BASELINKs.
4526         (resolve_overloaded_unification): Likewise.
4527         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
4528         (lookup_field): Use BASELINK, not TREE_LIST.
4529         (lookup_fnfiels): Likewise.
4530         (setup_class_bindings): Likewise.
4531         * semantics.c (finish_object_call_expr): Do not use
4532         build_method_call when we already know what function is being
4533         called.
4534         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
4535         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
4536         TREE_CHAIN.
4537         (name_p): New function.
4538         * typeck.c (build_object_ref): Remove.
4539         (build_component_ref_1): Likewise.
4540         (build_x_component_ref): Likewise.
4541         (build_class_member_access_expr): New function.
4542         (finish_class_member_access_expr): Likewise.
4543         (build_ptrmemfunc_access_expr): Likewise.
4544         (get_member_function_from_ptrfunc): Use
4545         build_ptrmemfunc_access_expr.
4546         (build_binary_op): Likewise.
4547         (build_unary_op): Likewise.
4548         (build_ptrmemfunc): Likewise.
4549         (pfn_from_ptrmemfunc): Likewise.
4550         * typeck2.c (build_m_component_ref): Adjust comment.
4551
4552 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
4553
4554         * Make-lang.in (CXX_C_OBJS): Update.
4555         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
4556         * cp-tree.h (cxx_decode_option): Remove.
4557         * decl2.c (compare_options, lang_f_options, unsupported_options,
4558         cxx_decode_option): Remove.
4559
4560 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
4561
4562         * typeck.c (build_x_unary_op): Handle pointer-to-member.
4563
4564 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
4565
4566         * class.c: Don't include obstack.h.
4567         (popclass):
4568         * decl2.c: Delete bogus comment.
4569         * error.c: Don't include obstack.h.
4570         * except.c: Likewise.
4571         (dump_type): Correct comment.
4572         * method.c: Don't include obstack.h.
4573         * tree.c: Likewise.
4574
4575 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
4576
4577         Fix PR/2213
4578         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
4579         expressions to pointer-to-data-member of pointer-to-member-functions.
4580
4581 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
4582
4583         * cvt.c (ocp_convert): Delete obsolete code.
4584         * parse.y (permanent_obstack): Delete declaration.
4585         * pt.c (permanent_obstack): Delete declaration.
4586         * repo.c (permanent_obstack): Delete declaration.
4587         (open_repo_file): Use xmalloc instead of permanent_obstack.
4588         (init_repo): Use xstrdup instead of permanent_obstack.
4589
4590 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
4591
4592         * cp-tree.h (VF_DERIVED_VALUE): Remove.
4593         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
4594
4595 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
4596
4597         PR 7470.
4598         C++ ABI change - vfunc ordering.
4599         * class.c (add_virtual_function): Remove.
4600         (dfs_modify_all_vtables): Take list of all declared
4601         virtuals. Assign all that are not in primary base.
4602         (check_for_override): Adjust comments.
4603         (create_vtable_ptr): Take single list of virtuals. Build chain
4604         of declared virtuals here.
4605         (layout_class_type): Take single list of virtuals. Adjust.
4606         (finish_struct_1): Keep virtuals on single list. Adjust.
4607
4608 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
4609
4610         * init.c (build_member_call): Use build_new_method_call, not
4611         build_method_call.
4612
4613 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
4614
4615         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
4616
4617 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
4618
4619         * call.c (build_method_call): Issue a more helpful error message
4620         about ambiguous method names.
4621
4622 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
4623
4624         * tree.c (build_shared_int_cst): Make cache file scope, and
4625         GTY it.
4626
4627 2002-08-02  Jason Merrill  <jason@redhat.com>
4628
4629         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
4630         (cp_expr_size): New fn.
4631         * call.c (build_over_call): Lose empty class hackery.
4632         (convert_arg_to_ellipsis): Promote non-POD warning to error.
4633         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
4634
4635         * semantics.c (expand_body): Do tree optimization in the function
4636         context, too.
4637
4638 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
4639
4640         * cp-tree.h: Move all warning and flag declarations to c-common.h.
4641         * decl.c: Move all warning and flag variables to c-common.c.
4642         * decl2.c: Move all warning and flag variables to c-common.c.
4643         * lex.c (flag_digraphs): Remove.
4644         (warn_traditional): Now in c-common.c.
4645
4646 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
4647
4648         * call.c (build_field_call): Do not look up the field by name.
4649         (build_method_call): Simplify.
4650         (struct z_candidate): Add access_path and conversion_path.  Remove
4651         basetype_path.
4652         (convert_class_to_reference): Adjust use of
4653         add_function_candidate.
4654         (add_candidate): Add conversion_path argument.
4655         (add_function_candidate): Use it.
4656         (add_conv_dndidate): Likewise.
4657         (build_builtin_candidate): Likewise.
4658         (add_template_candidate_real): Add conversion_path argument.
4659         (add_template_conv_candidate): Likewise.
4660         (add_template_candidate): Likewise.
4661         (build_user_type_conversion_1): Use it.
4662         (build_new_function_call): Remove name lookup code.  Adjust use of
4663         add_template_candidate and add_function_candidate.
4664         (build_new_op): Likewise.
4665         (convert_like_real): Use build_special_member_call.
4666         (build_over_call): Use cand->conversion_path.
4667         (build_special_member_call): New method.
4668         (build_new_method_call): Remove name lookup code.
4669         * cp-tree.def (OFFSET_REF): Update documentation.
4670         (TEMPLATE_ID_EXPR): Likewise.
4671         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
4672         (BASELINK_OPTYPE): Likewise.
4673         (build_new_method_call): Adjust prototype.
4674         (build_special_member_call): New method.
4675         (build_baselink): New method.
4676         (build_offset_ref_call_from_tree): Likewise.
4677         (build_call_from_tree): Likewise.
4678         (finish_qualified_call_expr): Remove.
4679         (finish_call_expr): Adjust prototype.
4680         (build_x_function_call): Remove.
4681         * cvt.c (ocp_convert): Use build_special_member_call.
4682         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
4683         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
4684         CALL_EXPR.
4685         (build_offset_ref_call_from_tree): New function.
4686         (build_call_from_tree): Likewise.
4687         * init.c (expand_cleanup): Use build_special_member_call.
4688         (expand_default_init): Likewise.
4689         (build_member_call): Use finish_call_expr.
4690         (build_new_1): Use build_special_member_call.
4691         (push_base_cleanups): Likewise.
4692         * method.c (do_build_assign_ref): Likewise.
4693         * parse.y (template_id): Do not pass a COMPONENT_REF to
4694         lookup_template_function.
4695         (primary): Use parse_finish_call_epxr, not finish_call_expr.
4696         (parse_finish_call_expr): New function.
4697         * pt.c (lookup_template_function): Add assertions.
4698         * search.c (lookup_base): Allow T to be a binfo.
4699         (build_baselink): New function.
4700         (lookup_member): Use it.
4701         * semantics.c (finish_call_expr): Do not do name lookup.
4702         (finish_object_call_expr): Remove #if 0'd code.
4703         (finish_qualified_call_expr): Remove.
4704         * typeck.c (build_x_function_call): Remove.
4705         (build_static_case): Use build_special_member_call.
4706         * typeck2.c (build_functional_cast): Likewise.
4707
4708 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
4709
4710         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
4711
4712 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
4713
4714         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
4715
4716 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
4717
4718         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
4719         documentation.
4720
4721 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
4722
4723         * cp-tree.h: Comment typo fix.
4724
4725 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
4726
4727         * spew.c (space_for_token): Allocate zeroed memory for a new token
4728         chunk.
4729
4730 2002-07-27  Roger Sayle  <roger@eyesopen.com>
4731
4732         * decl.c (builtin_function_1): No need to explicitly mark
4733         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
4734
4735 2002-07-27  Roger Sayle  <roger@eyesopen.com>
4736
4737         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
4738
4739 2002-07-26  Jason Merrill  <jason@redhat.com>
4740
4741         * call.c (build_over_call): Likewise.
4742         (cp_convert_parm_for_inlining): New fn.
4743         (convert_for_arg_passing): New fn.
4744         (convert_default_arg, build_over_call): Use it.
4745         (type_passed_as): New fn.
4746         * pt.c (tsubst_decl): Use it.
4747         * decl2.c (cp_build_parm_decl): New fn.
4748         (build_artificial_parm): Use it.
4749         (start_static_storage_duration_function): Likewise.
4750         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
4751         (grokparms): Don't mess with DECL_ARG_TYPE.
4752         * typeck.c (convert_arguments): Use convert_for_arg_passing.
4753         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
4754         Define.
4755         * cp-tree.h: Declare new fns.
4756
4757 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
4758
4759         * cp-tree.h (flag_operator_names): Remove.
4760         * decl2.c (flag_operator_names): Remove.
4761         (lang_f_options): Remove operator-names.
4762         * lex.c (D_OPNAME): Remove.
4763         (reswords): Remove operator names.
4764         (rid_to_yy): Remove operator names.
4765         (init_reswords): No need to handle D_OPNAME.
4766         * spew.c (read_process_identifier): There are no operator
4767         names.
4768
4769 2002-07-26  Jason Merrill  <jason@redhat.com>
4770
4771         * dump.c (cp_dump_tree): Call c_dump_tree.
4772         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
4773
4774 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
4775
4776         * error.c (print_whitespace): Remove.
4777         * g++spec.c (LIBUNWIND): Move.
4778         * mangle.c (mangled_position, write_signed_number): Remove.
4779
4780 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
4781
4782         * decl2.c (cxx_decode_option): Similarly.
4783
4784 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
4785
4786         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
4787         (cxx_sizeof_or_alignof_type): Take a third argument.
4788         (cxx_sizeof): Adjust definition.
4789         (cxx_alignof): Likewise.
4790         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
4791         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
4792         complaining.
4793         (c_sizeof_nowarn): Remove definition.
4794         (build_unary_op): Use cxx_sizeof_nowarn.
4795
4796 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
4797
4798         * tree.c (cp_build_qualified_type_real): When copying
4799         pointer-to-method types, unshare the record that holds
4800         the cached pointer-to-member-function type.
4801
4802 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
4803
4804         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
4805
4806 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
4807
4808         Fix PR/7363:
4809         * typeck.c (cxx_sizeof_or_alignof_type): New function.
4810         (c_sizeof): Remove definition.
4811         (expr_sizeof): Use cxx_sizeof.
4812         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
4813         * decl.c (finish_destructor_body): Use cxx_sizeof.
4814         * semantics.c (finish_alignof): Likewise.
4815         (finish_alignof): Use cxx_alignof.
4816         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
4817         (cxx_sizeof_or_alignof_type): Declare.
4818         (my_friendly_assert): Move to ../c-common.h.
4819
4820 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
4821
4822         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
4823
4824 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4825
4826         PR c++/7347, c++/7348
4827         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
4828         * decl.c (make_typename_type): Use it.
4829         (make_unbound_class_template): Likewise.
4830         (lookup_name_real): Don't call type_access_control if scope is
4831         template parameter dependent.
4832         * parse.y (template_arg): Call make_unbound_class_template with
4833         tf_parsing set.
4834         (nest_name_specifier): Call make_typename_type with tf_parsing set.
4835         (typename_sub0): Likewise.
4836         (typename_sub1): Likewise.
4837         (instantiate_decl): Push class scope.
4838         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
4839         for both static variable and member function template.
4840         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
4841         and arguments.
4842         * search.c (type_access_control): Do type access for TEMPLATE_DECL
4843         too.
4844
4845 2002-07-20  Roger Sayle  <roger@eyesopen.com>
4846
4847         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
4848         test by using positive_option.  Make whitespace consistent.
4849
4850 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
4851
4852         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
4853         members with 'locus'.  Adjust use throughout.
4854         (struct feed):  Likewise.
4855         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
4856         Adjust use.
4857         (snarf_defarg): Use error(), not error_with_file_and_line().
4858
4859 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
4860
4861         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
4862         cpp_options is included.
4863
4864 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4865
4866         PR c++/2862, c++/2863
4867         * pt.c (determine_specialization): Compare the length of
4868         TYPE_ARG_TYPES.  Tidy.
4869
4870 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4871
4872         PR c++/3797
4873         * decl.c (duplicate_decls): Don't propagate inlining parameters from
4874         olddecl to newdecl when newdecl is a specialization of the
4875         instantiation olddecl.
4876
4877 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4878
4879         PR c++/4802, c++/5387
4880         * decl.c (make_typename_type): Use enforce_access.
4881
4882 2002-07-17  Scott Snyder <snyder@fnal.gov>
4883
4884         PR c++/7320
4885         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
4886
4887 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
4888
4889         * class.c (add_method): Correct handling of conversion operators.
4890
4891 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
4892
4893         PR c++/7224
4894         * class.c (add_method): Simplify.
4895
4896 2002-07-11  Jason Merrill  <jason@redhat.com>
4897
4898         PR c++/7279
4899         * tree.c (cp_copy_res_decl_for_inlining): Also copy
4900         TREE_ADDRESSABLE.
4901
4902 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
4903
4904         * pt.c (template_parm_this_level_p, push_template_decl_real):
4905         Pass depth as int pointer.
4906
4907 2002-07-11  Tim Josling  <tej@melbpc.org.au>
4908
4909         Remove front end hard coding from gengtype.c.
4910
4911         * config-lang.in (gtfiles): Add files needed for this front end.
4912
4913 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
4914
4915         * cp-tree.h (unqualified_name_lookup_error): Declare it.
4916         (begin_function_definition): Adjust prototype.
4917         * lex.c (unqualified_name_lookup_error): New function, split out
4918         from ...
4919         (do_identifier): ... here.
4920         * parse.y (parse_begin_function_definition): New function.
4921         (fn.def1): Use it.
4922         * semantics.c (begin_function_definition): Accept decl-specifiers
4923         and attributes as separate parameters.
4924
4925 2002-07-10  Jason Merrill  <jason@redhat.com>
4926
4927         PR c++/6255
4928         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
4929         modifying the old one.
4930
4931 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
4932
4933         * cp-tree.h (constructor_name_p): Declare it.
4934         (check_template_template_default_arg): Likewise.
4935         * class.c (handle_using_decl): Use constructor_name_p.
4936         * decl.c (grokdeclarator): Likewise.
4937         * decl2.c (constructor_name_p): Define it.
4938         * init.c (build_member_call): Use constructor_name_p.
4939         * parse.y (template_parm): Use check_template_template_default_arg.
4940         * pt.c (check_explicit_specialization): Use constructor_name_p.
4941         * semantics.c (check_template_template_default_arg): New function.
4942
4943 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4944
4945         * pt.c (can_complete_type_without_circularity): Add static to
4946         function definition.
4947
4948 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
4949
4950         * cp-tree.h (have_extern_spec): Declare it
4951         * decl.c (have_extern_spec): Define it.
4952         (start_decl): Eliminate use of used_extern_spec.
4953         (start_function): Likewise.
4954         * parse.y (have_extern_spec): Remove declaration.
4955         (used_extern_spec): Likewise.
4956         (frob_specs): Eliminate use of used_extern_spec.
4957         (.hush_warning): Likewise.
4958
4959 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
4960
4961         * Make-lang.in (cp/parse.o): Depend on decl.h.
4962         * cp-tree.h (do_decl_instantiation): Change prototype.
4963         * parse.y: Include decl.h.
4964         (parse_decl_instantiation): New function.
4965         (explicit_instantiation): Use it.
4966         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
4967         and DECLSPECS.
4968
4969 2002-07-07  Roger Sayle  <roger@eyesopen.com>
4970
4971         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
4972         constructor and destructor tests when passed a TEMPLATE_DECL.
4973
4974 2002-07-05  Jason Merrill  <jason@redhat.com>
4975
4976         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
4977         pointers.
4978
4979         PR optimization/7145
4980         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
4981
4982 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
4983
4984         Repair damage on weak-impared targets caused by my previous patch.
4985         * cp-tree.h (import_export_tinfo): Add parameter.
4986         * decl2.c (import_export_tinfo): Add parameter, post adjust
4987         DECL_COMDAT.
4988         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
4989         import_export_tinfo.
4990
4991 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4992
4993         PR c++/6944
4994         * init.c (build_aggr_init): Remove qualifiers of init before calling
4995         build_vec_init.
4996         (build_vec_init): Flatten multi-dimensional array during cleanup.
4997         (build_vec_delete_1): Abort if the type of each element is array.
4998
4999 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
5000
5001         * pt.c (instantiate_class_template): Fix typo.
5002
5003 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5004
5005         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
5006         by CVS conflict in my last patch.
5007
5008 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5009
5010         PR c++/6716
5011         * pt.c (can_complete_type_without_circularity): New function.
5012         (instantiate_class_template): Use it.
5013         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
5014         message due to incomplete fields.
5015
5016 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
5017
5018         PR c++/7112
5019         * mangle.c (write_expression): Add mangling for sizeof when
5020         applied to a type.
5021         * operators.def: Remove stale comment.
5022
5023 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
5024
5025         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
5026         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
5027         (tinfo_decl_type): Replace with ...
5028         (type_info_ptr_type): ... this.
5029         (import_export_tinfo): Declare.
5030         (tinfo_decl_p): Rename to ...
5031         (unemitted_tinfo_decl_p): ... this.
5032         * decl2.c (import_export_decl): Break out tinfo handling into ...
5033         (import_export_tinfo): ... here. New function.
5034         (finish_file): Adjust.
5035         * rtti.c (TINFO_REAL_NAME): New macro.
5036         (init_rtti_processing): Create the tinfo types.
5037         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
5038         (get_tinfo_decl): Adjust.
5039         (get_tinfo_ptr): New function.
5040         (get_type_id): Use it.
5041         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
5042         (ptr_initializer): Use get_tinfo_ptr.
5043         (ptm_initializer): Likewise.
5044         (synthesize_tinfo_var): Break into ...
5045         (get_pseudo_ti_init): ... this. Just create the initializer.
5046         (get_pseudo_ti_desc): .. and this.
5047         (create_real_tinfo_var): Remove.
5048         (create_pseudo_type_info): Don't create the vtable decl here.
5049         (get_vmi_pseudo_type_info): Remove.
5050         (create_tinfo_types): Adjust.
5051         (tinfo_decl_p): Rename to ...
5052         (unemitted_tinfo_decl_p): ... here. Adjust.
5053         (emit_tinfo_decl): Adjust. Create the initializer.
5054
5055 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
5056
5057         PR c++/6695
5058         * pt.c (tsubst_friend_class): Substitute into the context of the
5059         friend before using it.
5060
5061 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
5062
5063         * cp-tree.h (xref_tag): Change prototype.
5064         (handle_class_head): Likewise.
5065         (build_x_component_ref): Likewise.
5066         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
5067         (xref_tag): Take attributes as a separate parameter.
5068         (xref_tag_from_type): Adjust call to xref_tag.
5069         * decl2.c (build_expr_from_tree): Adjust call to
5070         build_x_component_ref.
5071         (handle_class_head): Take attributes as a separate parameter.
5072         * parse.y (parse_xref_tag): New function.
5073         (parse_handle_class_head): Likewise.
5074         (primary): Use parse_xref_tag.
5075         (class_head_decl): Use parse_handle_class_head.
5076         (class_head_defn): Likewise.
5077         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
5078         (build_dynamic_cast_1): Likewise.
5079         (create_pseudo_type_info): Likewise.
5080         (emit_support_tinfos): Likewise.
5081         * typeck.c (build_object_ref): Adjust call to
5082         build_x_component_ref.
5083         (build_x_component_ref): Remove protect parameter.
5084
5085 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
5086
5087         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
5088         * class.c (handle_using_decl): Likewise.
5089         (instantiate_type): Likewise.
5090         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
5091         (xref_basetypes): Change prototype.
5092         (begin_mem_initializers): New function.
5093         (get_overloaded_fn): Likewise.
5094         * decl.c (xref_basetypes): Simplify.
5095         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
5096         * init.c (build_offset_ref): Likewise.
5097         * parse.y (base_init): Use begin_mem_initializers().
5098         (structsp): Adjust call to xref_basetypes.
5099         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
5100         (instantiate_class_template): Adjust call to xref_basetypes.
5101         * semantics.c (begin_mem_initializers): New function.
5102         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
5103         (really_overlaoded_fn): Likewise.
5104         (get_overloaded_fn): New function.'
5105         (get_first_fn): USe BASELINK_FUNCTIONS.
5106
5107 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
5108
5109         * cp-tree.h (SCALAR_TYPE_P): New macro.
5110         (check_for_out_of_scope_variable): New function.
5111         (at_class_scope_p): Likewise.
5112         (finish_fname): Likewise.
5113         * class.c (finish_struct): Use at_function_scope_p.
5114         * decl.c (check_for_out_of_scope_variable): New function, split
5115         out from do_identifier.
5116         (finish_enum): Use at_function_scope_p.
5117         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
5118         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
5119         (primary): Use at_function_scope_p.
5120         * search.c (at_class_scope_p): New function.
5121         * semantics.c (finish_fname): Likewise.
5122         (check_multiple_declarators): Use at_function_scope_p.
5123
5124 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
5125
5126         * parse.y (parse_scoped_id): New function.
5127         (primary): Use it.
5128         * cp-tree.h (do_scoped_id): Adjust declaration.
5129         * lex.c (do_scoped_id): Remove call to yylex.
5130         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
5131         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
5132         expanding it inline.
5133
5134 2002-06-23  Matt Thomas  <matt@3am-software.com>
5135
5136         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
5137         "#if VMS_TARGET".
5138
5139 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5140
5141         * mangle.c (integer_type_codes): Const-ify.
5142
5143 2002-06-20  Richard Henderson  <rth@redhat.com>
5144
5145         PR c++/6747
5146         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
5147         Call put_var_into_stack.
5148
5149 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5150
5151         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
5152         array size calculation.
5153
5154 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5155
5156         PR c++/6892
5157         * pt.c (tsubst_expr): Handle FILE_STMT.
5158
5159 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5160
5161         PR c++/6723
5162         * pt.c (lookup_template_class): Don't build complete argument of
5163         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
5164         argument.
5165
5166 2002-06-19  Akim Demaille  <akim@epita.fr>
5167
5168         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
5169         decl.h's TYPENAME.
5170         * spew.c, lex.c: Adjust.
5171         * parse.y (explicit_instantiation): Add empty action to override
5172         the default $$ = $1 where it introduces a type clash.
5173
5174 2002-06-14  Jason Merrill  <jason@redhat.com>
5175
5176         * semantics.c (begin_for_stmt): Push the 'for' scope before
5177         adding the FOR_STMT.
5178
5179         C++ ABI changes.
5180         * class.c (build_base_field): Set DECL_PACKED.
5181         (layout_class_type): Don't use tail padding of PODs.
5182         * mangle.c (write_unqualified_name): Fix template conversion op
5183         mangling.
5184
5185 2002-06-16  Richard Henderson  <rth@redhat.com>
5186
5187         PR opt/6793
5188         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
5189         after template instantiation.
5190
5191 2002-06-16  Richard Henderson  <rth@redhat.com>
5192
5193         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
5194
5195 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
5196
5197         * cp-tree.h (compiler_error): Remove declaration.
5198         * lex.c (compiler_error): Remove definition.
5199
5200 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
5201
5202         * g++spec.c (LIBUNWIND): New.
5203         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
5204
5205 2002-06-13  Jessica Han  <jessica@cup.hp.com>
5206
5207         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
5208         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
5209         (build_vbase_offset_vtbl_entries): Likewise.
5210         * rtti.c (build_headof): Likewise.
5211         (get_tinfo_decl_dynamic): Likewise.
5212         (create_pseudo_type_info): Likewise.
5213
5214 2002-06-12  Stan Shebs  <shebs@apple.com>
5215
5216         * mpw-config.in: Remove file, no longer used.
5217         * mpw-make.sed: Ditto.
5218
5219 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
5220
5221         * decl2.c: Update call to cpp_handle_option.
5222
5223 2002-06-07  H.J. Lu  (hjl@gnu.org)
5224
5225         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
5226
5227 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
5228
5229         * error.c (cp_error_at): Fix typo.
5230
5231 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
5232
5233         * error.c (cp_diagnostic_starter): Adjust call.
5234         (maybe_print_instantiation_context): Change prototype to take a
5235         'diagnostic_info *'.
5236         (print_instantiation_full_context): Likewise.
5237         (print_instantiation_partial_context): Likewise.
5238         (cp_diagnostic_starter): Likewise.
5239         (cp_diagnostic_finalizer): Likewise.
5240         (cp_print_error_function): Likewise.
5241         (cp_printer): Take a secondary parameter as a 'text_info *'.
5242         Remove output_state savings.  Adjust calls.
5243
5244 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
5245
5246         * pt.c (inline_parm_levels): Mark for GC.
5247
5248         * mangle.c (start_mangling): Allocate G.substitutions here...
5249         (init_mangle): ... rather than here.
5250         (finish_mangling): Clear the varray pointer when done with it.
5251         * spew.c (yylexstring): Don't use VARRAY_FREE.
5252         * search.c (bfs_walk): Don't use VARRAY_FREE.
5253         * decl2.c (pending_statics): Use gengtype to mark.
5254         (deferred_fns): Likewise.
5255         (ssdf_decls): Likewise.
5256         (init_decl2): Delete.
5257         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
5258         (cxx_init_decl_processing): Don't call init_decl2.
5259         (cxx_pop_function_context): Don't use VARRAY_FREE.
5260         * cp-tree.h (struct saved_scope): No need for special marking
5261         of varrays.
5262         (struct language_function): Likewise.
5263         (local_classes): Use gengtype to mark.
5264         (init_decl2): Delete prototype.
5265         * class.c (init_class_processing): Don't use
5266         ggc_add_tree_varray_root.
5267         (build_vtbl_initializer): Don't use VARRAY_FREE.
5268
5269         * decl.c (typename_compare): Don't use same_type_p.
5270
5271         * decl.c: Include hashtab.h instead of hash.h.
5272         (typename_hash): Update to use htab_h.
5273         (typename_compare): Likewise.
5274         (typename_htab): Use gengtype to mark.
5275         (build_typename_type): Update to use htab_h.
5276         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
5277
5278         * Make-lang.in (gt-cp-tree.h): New rule.
5279         (cp/tree.o): Depend on gt-cp-tree.h.
5280         * config-lang.in (gtfiles): Add cp/tree.c.
5281         * tree.c: Include gt-cp-tree.h.
5282         (list_hash_table): Use gengtype to mark.
5283         (init_tree): Use gengtype to mark trees.
5284
5285         * Make-lang.in (cp/decl.o): Add debug.h dependency.
5286         * call.c (struct z_candidate): Use gengtype.
5287         (USER_CONV_CAND): Use WRAPPER_ZC.
5288         (convert_class_to_reference): Use build_zc_wrapper.
5289         (build_type_conversion_1): Likewise.
5290         (build_over_call): Use WRAPPER_ZC.
5291         (add_warning): Use build_zc_wrapper.
5292         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
5293         * cp-tree.h (struct lang_identifier): Use gengtype.
5294         (struct template_parm_index_s): Likewise.
5295         (struct ptrmem_cst): Likewise.
5296         (struct tree_binding): Likewise.
5297         (struct tree_overload): Likewise.
5298         (struct tree_srcloc): Likewise.
5299         (struct tree_wrapper): Likewise.  Also modify to have a pointer
5300         to struct z_candidate rather than void.
5301         (enum cp_tree_node_structure_enum): New.
5302         (union lang_tree_node): New.
5303         (cxx_mark_tree): Delete prototype.
5304         (cp_tree_node_structure): New prototype.
5305         (build_ptr_wrapper): Delete prototype.
5306         (build_int_wrapper): Delete prototype.
5307         (build_zc_wrapper): New prototype.
5308         * decl.c: Include debug.h
5309         (cxx_mark_tree): Delete.
5310         (cp_tree_node_structure): New.
5311         * tree.c (build_ptr_wrapper): Delete.
5312         (build_int_wrapper): Delete.
5313         (build_zc_wrapper): New.
5314
5315         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
5316         Correct typo.  Patch from k_fukui@highway.ne.jp.
5317
5318         * semantics.c (current_stmt_tree): Update for change to
5319         struct language_function.
5320         (finish_mem_initializers): Likewise.
5321         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
5322         * cp-tree.h (struct language_function): Rename from
5323         cp_language_function.  Change all uses.
5324         (cp_function_chain): Don't need to cast.
5325
5326         * class.c (duplicate_tag_error): Reset discriminator.
5327         (check_bases_and_members): Update for data structure changes.
5328         * cp-tree.h (struct lang_id2): Use gengtype.
5329         (flagged_type_tree): Likewise.
5330         (SET_LANG_ID): Use GGC on struct lang_id2.
5331         (struct cp_language_function): Use gengtype.  Remove field
5332         'x_vcalls_possible_p'.
5333         (current_vcalls_possible_p): Delete.
5334         (struct lang_type_header): New.
5335         (struct lang_type_class): Rename from struct lang_type.  Include
5336         struct lang_type_header.
5337         (struct lang_type_ptrmem): New.
5338         (struct lang_type): New.
5339         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
5340         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
5341         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
5342         (struct lang_decl_flags): Use gengtype.  Add discriminators.
5343         (struct lang_decl): Use gengtype.  Add and use discriminators.
5344         Update the macros that reference moved fields.
5345         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
5346         (SET_DECL_THUNK_P): Set discriminator too.
5347         (clear_inline_text_obstack): Delete prototype.
5348         (finish_inline_definitions): Delete prototype.
5349         (mark_pending_inlines): Delete prototype.
5350         (lang_check_failed): New prototype.
5351         * decl.c (struct named_label_use_list): Use gengtype.
5352         (struct named_label_list): Likewise.
5353         (mark_binding_level): Delete.
5354         (mark_named_label_lists): Delete.
5355         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
5356         (cxx_init_decl_processing): Use generated marker routine.
5357         (begin_destructor_body): Delete dead set to
5358         current_vcalls_possible_p.
5359         (mark_lang_function): Delete.
5360         (mark_cp_function_context): Delete.
5361         (lang_mark_tree): Use generated marker routines.
5362         * decl2.c (start_objects): Set discriminator when setting
5363         GLOBAL_INIT_PRIORITY.
5364         * lex.c (retrofit_lang_decl): Set discriminators.
5365         (copy_lang_type): Update for changes to lang_type structure.
5366         (cp_make_lang_type): Set discriminator.
5367         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
5368         * search.c: Include ggc.h.
5369         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
5370         (finish_inline_definitions): Delete.
5371         * spew.c (struct token): Use gengtype.
5372         (struct token_chunk): New.
5373         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
5374         (struct feed): Use gengtype.
5375         (feed_obstack): Delete.
5376         (feed): Mark as GC root.
5377         (pending_inlines): Mark as GC root.
5378         (pending_inlines_tail): Likewise.
5379         (processing_these_inlines): Likewise.
5380         (token_obstack): Make static.
5381         (first_token): Likewise.
5382         (init_spew): Don't initialize deleted things; use gengtype for roots.
5383         (clear_inline_text_obstack): Delete.
5384         (feed_input): Use GC for struct feed.  Update for changes to
5385         struct unparsed_text.
5386         (mark_pending_inlines): Delete.
5387         (next_token): Rename from add_token.  Change all callers.  Update
5388         for changes to struct unparsed_text.
5389         (space_for_token): New.
5390         (remove_last_token): New.
5391         (alloc_unparsed_text): New.
5392         (snarf_block): Take an unparsed_text.  Update for changes to struct
5393         unparsed_text.
5394         (snarf_method): Update for changes to struct unparsed_text.
5395         (snarf_defarg): Update for changes to struct unparsed_text.
5396         * tree.c (lang_check_failed): New.
5397
5398         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
5399         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
5400         (cp/spew.o): Add dependency on gt-<filename>.h.
5401         (cp/decl2.o): Add dependency on gt-<filename>.h.
5402         (cp/call.o): Add dependency on gt-<filename>.h.
5403         (cp/pt.o): Add dependency on gt-<filename>.h.
5404         (cp/repo.o): Add dependency on gt-<filename>.h.
5405         (cp/parse.o): Add dependency on gt-<filename>.h.
5406         * call.c: Use gengtype for roots.
5407         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
5408         decl2.c parse.y pt.c repo.c spew.c.
5409         * cp-tree.h: Use gengtype for roots.
5410         (struct saved_scope): Use GGC, gengtype.
5411         (cp_parse_init): Delete prototype.
5412         (init_pt): Delete prototype.
5413         * decl.c: Use gengtype for roots.
5414         (mark_saved_scope): Delete.
5415         (cxx_init_decl_processing): Don't call deleted initilisation
5416         routines.
5417         (signed_size_zero_node): Delete, unused.
5418         * decl.h: Use gengtype for roots.
5419         * decl2.c: Use gengtype for roots.
5420         * lex.h: Use gengtype for roots.
5421         * parse.y: Use gengtype for roots.
5422         (cp_parse_init): Delete.
5423         * pt.c: Use gengtype for roots.
5424         (init_pt): Delete.
5425         * repo.c: Use gengtype for roots.
5426         * spew.c: Use gengtype for roots.
5427
5428         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
5429         (cp/decl.o): Add dependency on gtype-cp.h.
5430         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
5431         Include gtype-cp.h.  Allow for filename changes.
5432
5433         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
5434         (cp/decl.o): Add cp/gt-decl.h dependency.
5435         * config-lang.in (gtfiles): New.
5436         * tree.h: Rename struct binding_level to struct cp_binding_level.
5437         * decl.c: Rename struct binding_level to struct cp_binding_level.
5438         Include cp/gt-decl.h.
5439         (struct cp_binding_level): Use gengtype.
5440         (make_binding_level): Use GGC on struct cp_binding_level.
5441         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
5442         (cxx_init_decl_processing): Mark free_binding_level as
5443         deletable.
5444
5445         * decl.c (mark_cp_function_context): Update calling sequence.
5446
5447         * decl.c (start_function): Don't free 'struct
5448         cp_language_function'.
5449         (pop_cp_function_context): Likewise.
5450         (save_function_data): Allocate it using GC.
5451         * semantics.c (genrtl_start_function): Don't free 'struct
5452         cp_language_function'.
5453
5454 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
5455
5456         * lang-specs.h: Use cpp_debug_options.
5457
5458 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
5459
5460         * mangle.c, tree.c: Include real.h.
5461         * Make-lang.in: Update dependency lists.
5462
5463 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5464
5465         * lex.c: Don't include c-lex.h.
5466         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
5467
5468 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
5469
5470         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
5471
5472 2002-05-22  Richard Henderson  <rth@redhat.com>
5473
5474         * decl.c (obscure_complex_init): Check for VAR_DECL
5475         before using DECL_THREAD_LOCAL.
5476
5477 2002-05-22  Richard Henderson  <rth@redhat.com>
5478
5479         * decl.c (check_tag_decl): Handle RID_THREAD.
5480         (obscure_complex_init): Reject run-time init of tls.
5481         (grokvardecl, grokdeclarator): Handle RID_THREAD.
5482         * lex.c (reswords): Add __thread.
5483         (rid_to_yy): Map RID_THREAD to SCSPEC.
5484
5485 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
5486
5487         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
5488         * cp-tree.h (cxx_post_options): Kill.
5489         * cp-lex.c (cxx_post_options): Kill.
5490
5491 2002-05-21  Richard Henderson  <rth@redhat.com>
5492
5493         * lex.c (rid_to_yy): Add RID_THREAD.
5494
5495 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
5496
5497         * init.c (build_vec_init): Test for trivial copy-assignment when
5498         copy-assigning arrays.
5499
5500 2002-05-20  Andreas Jaeger  <aj@suse.de>
5501
5502         * init.c (build_default_init): Remove unused variable.
5503
5504 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
5505
5506         * call.c (any_strictly_viable): New.
5507         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
5508
5509 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5510
5511         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
5512
5513 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5514
5515         PR c++/186, DR 259
5516         * pt.c (do_decl_instantiation): Don't complain explicit
5517         instantiation after explicit specialization.
5518         (do_type_instantiation): Likewise.
5519
5520 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
5521
5522         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
5523         renamed from...
5524         (complete_type_or_else): ... this.  Redefined as macro.
5525         (cxx_incomplete_type_diagnostic): Declare.
5526         (cxx_incomplete_type_error): Define as macro.
5527         * init.c (build_delete): Warn about incomplete types other than
5528         void, and use the built-in operator delete for them.
5529         * typeck.c (complete_type_or_diagnostic): Renamed from
5530         complete_type_or_else.  Added warn_only argument, passed to...
5531         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
5532         warnings or errors depending on new warn_only argument.  Renamed
5533         from...
5534         (cxx_incomplete_type_error): ... this.  New implementation in
5535         terms of cxx_incomplete_type_diagnostic.
5536
5537 2002-05-18  Jason Merrill  <jason@redhat.com>
5538
5539         PR c++/6611
5540         * decl2.c (import_export_decl): If we clear
5541         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
5542
5543 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5544
5545         PR c++/6620
5546         * pt.c (verify_class_unification): Don't check if PARM is template
5547         parameter dependent.  Simplify.
5548         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
5549         parameter dependent expression.
5550
5551 2002-05-14  Jason Merrill  <jason@redhat.com>
5552
5553         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
5554         Do set DECL_COMDAT.
5555         (synthesize_tinfo_var): Take the public decl.
5556         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
5557         (emit_tinfo_decl): Adjust.  Call import_export_decl.
5558         * decl2.c (import_export_decl): Simplify tinfo decl handling.
5559
5560 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
5561
5562         * cp-tree.h (struct lang_type): Added non_zero_init.
5563         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
5564         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
5565         * class.c (check_field_decls): Test non_zero_init.
5566         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
5567         zero-to-NULL conversions.
5568         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
5569         type that needs zero-initialization without zeros.
5570         (check_initializer_decl): Compute zero-initializer for types
5571         that require a non-trivial one.
5572         * init.c (build_forced_zero_init): New function.
5573         (build_default_init): Use it.
5574         * tree.c (zero_init_p): New function.
5575         * typeck2.c (force_store_init_value): New function.
5576         (process_init_constructor): Create non-trivial zero-initializers
5577         for array members and class fields.
5578
5579 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
5580
5581         * lang-specs.h: Remove redundant -lang-c++.
5582
5583 2002-05-13  Jason Merrill  <jason@redhat.com>
5584
5585         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
5586         (fixed_type_or_null): See through reference vars.
5587         (build_base_path): Vtable contents are constant.
5588         * typeck.c (get_member_function_from_ptrfunc): Likewise.
5589
5590 2002-05-12  Jason Merrill  <jason@redhat.com>
5591
5592         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
5593         structs are safe.
5594
5595 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
5596
5597         * cp-tree.h (flag_ansi): Remove.
5598         * decl2.c (flag_ansi): Remove.
5599         (cxx_decode_option): Set flag_iso and flag_undef.
5600
5601 2002-05-09  Jason Merrill  <jason@redhat.com>
5602
5603         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
5604         Use subtraction rather than a bitmask to get the index.
5605         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
5606
5607         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
5608
5609 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
5610
5611         * Make-lang.in (decl2.o): Update.
5612         * cp-tree.h (warn_multichar): Remove.
5613         * decl2.c: Include c-common.h.
5614         (warn_multichar): Remove.
5615
5616 2002-05-03  Jason Merrill  <jason@redhat.com>
5617
5618         * tree.c (build_cplus_array_type): Only const and volatile get
5619         special handling.
5620
5621         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
5622
5623 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
5624
5625         ABI change, returning simple classes from functions.
5626         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
5627         TYPE_HAS_TRIVIAL_INIT_REF is false or
5628         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
5629
5630 2002-04-30  Jason Merrill  <jason@redhat.com>
5631
5632         PR debug/6436
5633         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
5634         anonymous class with a typedef if there are attributes.
5635
5636 2002-04-29  Paul Eggert  <eggert@twinsun.com>
5637
5638         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
5639
5640 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
5641
5642         PR c++/6477
5643         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
5644         non-NULL first.
5645
5646 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
5647
5648         PR c++/6492
5649         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
5650         enter that scope before name lookup.
5651
5652         PR c++/6486
5653         * method.c (do_build_copy_constructor): Avoid building
5654         cv-qualified reference types.
5655
5656 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
5657
5658         PR c++/5719
5659         * decl.c (grok_op_properties): Assignment ops don't have to return
5660         by value. operator% should.
5661
5662 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
5663
5664         PR c/6343
5665         * decl.c (duplicate_decls): Call merge_weak.
5666
5667 2002-04-26  Richard Henderson  <rth@redhat.com>
5668
5669         * parse.y (malloced_yyss, malloced_yyvs): New.
5670         (yyoverflow): Re-add.  Set them.
5671         (free_parser_stacks): New.
5672
5673 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
5674
5675         PR c++/6497
5676         * method.c (do_build_assign_ref): Pass a derivation to
5677         build_method_call when calling base class assignment operators.
5678
5679 2002-04-26  Richard Henderson  <rth@redhat.com>
5680
5681         * parse.y (yyoverflow): Revert.
5682
5683 2002-04-26  Richard Henderson  <rth@redhat.com>
5684
5685         PR c/3581
5686         * parse.y (string): Remove.  Update all uses to use STRING
5687         instead, and not call combine_strings.
5688         * rtti.c (tinfo_name): Use fix_string_type.
5689         * semantics.c (finish_asm_stmt): Don't call combine_strings.
5690         * spew.c (yylexstring): New.
5691         (read_token): Use it.
5692
5693 2002-04-25  Richard Henderson  <rth@redhat.com>
5694
5695         PR c/2161
5696         * parse.y (yyoverflow): New.
5697
5698 2002-04-25  Jason Merrill  <jason@redhat.com>
5699
5700         PR c++/5607
5701         * search.c (check_final_overrider): No longer static.
5702         * class.c (update_vtable_entry_for_fn): Call it.
5703         * cp-tree.h: Adjust.
5704
5705 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5706
5707         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
5708         * cp-tree.h (cxx_set_yydebug): Die.
5709         * lex.c (YYDEBUG): Get from c-lex.h.
5710         (cxx_set_yydebug): Remove.
5711         * parse.y: Include c-lex.h.
5712         (YYDEBUG): Get from c-lex.h.
5713
5714 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
5715
5716         PR c++/6438.
5717         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
5718         void.
5719
5720 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
5721
5722         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
5723         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
5724         Redefine.
5725         * cp-tree.h (cp_attribute_table): Rename.
5726         * decl.c (lang_attribute_table): Remove declaration.
5727         (cxx_init_decl_processing): Don't set it.
5728         * tree.c (cp_attribute_table): Rename.
5729
5730 2002-04-24  Jason Merrill  <jason@redhat.com>
5731
5732         PR c++/6331
5733         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
5734         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
5735         The pedwarn for array assignment is now unconditional.
5736         * tree.c (build_cplus_array_type_1): Still process simple array types
5737         normally in templates.
5738
5739         PR c++/6395
5740         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
5741         stuff for comdats.
5742
5743 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
5744
5745         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
5746         node with attributes.
5747
5748 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
5749
5750         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
5751         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
5752
5753 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
5754
5755         PR c++/6256:
5756         * pt.c (tsubst_friend_class): Handle templates with explicit
5757         nested names.
5758
5759         PR c++/6331:
5760         * typeck.c (merge_types): Remember the cv-qualification of pointer
5761         types when merging them.
5762
5763 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
5764
5765         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
5766         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
5767         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
5768         cxx_mark_function_context): New.
5769         * decl.c (push_cp_function_context, pop_cp_function_context,
5770         mark_cp_function_context): Rename for consistency.
5771         (cxx_init_decl_processing): Don't set old hooks.
5772
5773 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
5774
5775         * call.c (convert_type_from_ellipsis): Rename, update.
5776         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
5777         * cp-tree.h (convert_type_from_ellipsis): Rename.
5778         * decl.c (cxx_init_decl_processing): Don't set hook.
5779
5780 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
5781
5782         * call.c (build_new_method_call): Update.
5783         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
5784         * cp-tree.h (cxx_incomplete_type_error): New.
5785         * decl.c (grokdeclarator, grokparms): Update.
5786         * decl2.c (check_classfn): Update.
5787         * pt.c (tsubst): Update.
5788         * typeck.c (complete_type_or_else, expr_sizeof,
5789         decay_conversion): Update.
5790         * typeck2.c (incomplete_type_error): Rename.
5791         (add_exception_specifier): Update.
5792
5793 2002-04-18  Jason Merrill  <jason@redhat.com>
5794
5795         PR c++/5658
5796         * search.c (setup_class_bindings): A class template qualifies as a
5797         type binding.
5798
5799 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
5800
5801         PR c++/6316
5802         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
5803         before expanding.
5804
5805 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
5806
5807         * init.c (begin_init_stmts): Remove commented out code.
5808         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
5809         * semantics.c (begin_gobal_stmt_expr): Adjust call to
5810         expand_start_stmt_expr.
5811
5812 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
5813
5814         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
5815         dso_handle itself, to __cxa_atexit.
5816
5817 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5818
5819         * error.c (cxx_print_error_function): Adjust call to macros.
5820
5821 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
5822
5823         * class.c (layout_virtual_bases): Do all dsize computation on trees.
5824
5825 2002-04-14  Jason Merrill  <jason@redhat.com>
5826
5827         * typeck.c (get_member_function_from_ptrfunc): Don't do
5828         gratuitious division and multiplication on
5829         ptrmemfunc_vbit_in_delta targets.
5830
5831 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5832
5833         PR c++/5373.
5834         * semantics.c (finish_expr_stmt): Remember the type of the
5835         expression before any conversions are performed.
5836
5837 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5838
5839         PR c++/5189.
5840         * call.c (add_template_candidate_real): Do not treat member
5841         templates as copy constructors.
5842
5843 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5844
5845         * decl.c (duplicate_decls): Do not copy the RTL for a variable
5846         declaration if the old variable had an incomplete type and the new
5847         variable does not.
5848         (complete_vars): Do not call layout_decl for completed variables.
5849
5850 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
5851
5852         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
5853         with an explicit one.
5854         (follow_tag_typedef): New.
5855         (lookup_tag): Use it to extract the tag of an explicit typedef.
5856         (xref_tag): Likewise.
5857
5858 2002-04-11  Andrew Haley  <aph@redhat.com>
5859
5860         * typeck.c (type_after_usual_arithmetic_conversions):
5861         If two types have the same variant, return immediately.
5862         When two floating-point operands are the same precision:
5863           convert to float if one of the operands is float;
5864           if neither operand is one of the standard types, return the type
5865           of the first operand.
5866
5867 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
5868
5869         PR c++/5507
5870         * decl.c (make_typename_type): Remove implicit typenameness.
5871
5872 2002-04-09  Jason Merrill  <jason@redhat.com>
5873
5874         PR optimization/6189
5875         * semantics.c (genrtl_start_function): Don't free
5876         DECL_SAVED_FUNCTION_DATA for inline functions.
5877
5878         * init.c (build_member_call): For now, don't convert to
5879         intermediate base if it would cause an error.
5880
5881 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
5882
5883         * parse.y (namespace_qualifier, maybe_identifier,
5884         begin_explicit_instantiation, end_explicit_instantiation,
5885         apparent_template_type, .finish_template_type,
5886         do_id, maybe_init, defarg_again, component_decl_1):
5887         Add ending ';', in accordance with POSIX.
5888
5889 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
5890
5891         PR c++/5571
5892         * class.c (layout_class_type): Remember incomplete static
5893         variables.
5894         (finish_struct_1): Call complete_vars, not
5895         hack_incomplete_structures.
5896         * cp-tree.h (hack_incomplete_structures): Rename to ...
5897         (complete_vars): ... this.
5898         (struct saved_scope): Remove incomplete.
5899         (namespace_scope_incomplete): Remove.
5900         * decl.c (struct binding_level): Remove incomplete.
5901         (incomplete_vars): New variable.
5902         (mark_binding_level): Don't mark incomplete.
5903         (print_binding_level): Don't print it.
5904         (mark_saved_scope): Don't mark incomplete.
5905         (pushdecl): Use maybe_register_incopmlete_var.
5906         (cxx_init_decl_processing): Register incomplete_vars for GC.
5907         (start_decl_1): Clarify error message.
5908         (hack_incomplete_vars): Remove.
5909         (maybe_register_incomplete_var): New function.
5910         (complete_vars): Likewise.
5911
5912 2002-04-06  Jason Merrill  <jason@redhat.com>
5913
5914         PR c++/4934
5915         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
5916         set before checking it.
5917
5918         PR c++/525
5919         * init.c (build_member_call): Use build_scoped_ref.
5920         (resolve_offset_ref): Likewise.
5921         * call.c (build_scoped_method_call): Likewise.
5922         * tree.c (maybe_dummy_object): Kludge around current_class_type being
5923         wrong.
5924         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
5925         * cp-tree.h: Adjust.
5926
5927         * init.c (push_base_cleanups): Just use build_scoped_method_call.
5928
5929         PR c++/6179
5930         * method.c (implicitly_declare_fn): Pass unqualified type to
5931         synthesize_exception_spec.
5932
5933 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
5934
5935         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
5936         * cvt.c: Update comment.
5937         * init.c (expand_cleanup_for_base): Update.
5938         * semantics.c (finish_parenthesized_expr): Update.
5939         * typeck.c (cp_truthvalue_conversion): Update.
5940
5941 2002-04-04  Jason Merrill  <jason@redhat.com>
5942
5943         * semantics.c (finish_eh_cleanup): New fn.
5944         * cp-tree.h: Add prototype.
5945         * init.c (perform_member_init, expand_cleanup_for_base): Use
5946         finish_eh_cleanup.
5947         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
5948         * cp-tree.h: Remove references.
5949         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
5950         * dump.c (cp_dump_tree): Likewise.
5951         * pt.c (tsubst_expr): Likewise.
5952         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
5953         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
5954         * tree.c (cp_statement_code_p): Likewise.
5955
5956         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
5957
5958         PR c++/5636
5959         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
5960         cleanup for nrv.
5961
5962         PR c++/5104
5963         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
5964         specifiers.
5965         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
5966
5967 2002-04-03  Richard Henderson  <rth@redhat.com>
5968
5969         * cp-lang.c (cxx_warn_unused_global_decl): New.
5970         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
5971
5972 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
5973
5974         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
5975         * tree.c (init_tree): Don't set hook.
5976
5977 2002-04-03  Roger Sayle  <roger@eyesopen.com>
5978
5979         PR c++/5998:
5980         * decl.c (duplicate_decls): Don't mess with assembler names when
5981         redeclaring builtin functions as static.
5982
5983 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5984
5985         * call.c (build_addr_func): Update.
5986         * class.c (resolve_address_of_overloaded_function): Update.
5987         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
5988         * cp-tree.h (cxx_mark_addressable): New.
5989         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
5990         * decl2.c (build_cleanup): Update.
5991         * except.c (build_throw): Update.
5992         * init.c (resolve_offset_ref): Update.
5993         * pt.c (convert_nontype_argument): Update.
5994         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
5995         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
5996         unary_complex_lvalue): Update.
5997         (mark_addressable): Rename.
5998
5999 2002-04-01  Roger Sayle  <roger@eyesopen.com>
6000
6001         PR c++/5998:
6002         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
6003         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
6004         but follow the SET_DECL_RTL idiom used elsewhere in the function.
6005
6006 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
6007
6008         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
6009         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
6010         * decl.c (grokdeclarator): Update.
6011         * mangle.c (write_integer_cst): Update.
6012         * typeck.c (build_binary_op): Update.
6013
6014 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
6015
6016         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
6017         * lex.c (cxx_init): Don't set hook.
6018
6019 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
6020
6021         * Make-lang.in (error.o): Update.
6022         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
6023         * cp-tree.h (struct diagnostic_context): Predeclare.
6024         (cxx_print_error_function): New.
6025         * error.c: Include langhooks-def.h.
6026         (lang_print_error_function): Rename.  Update.
6027         (init_error): Don't set hook.
6028
6029 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
6030
6031         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
6032         Redefine.
6033         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
6034         * decl.c (finish_enum): Similarly.
6035         * error.c (dump_type): Similarly.
6036         * lex.c (cxx_init): Similarly.
6037         * mangle.c (write_builtin_type): Similarly.
6038         * typeck.c (comptypes): Similarly.
6039
6040 2002-03-28  Roger Sayle  <roger@eyesopen.com>
6041
6042         PR c++/5998:
6043         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
6044         in the g++ front-end.
6045         (duplicate_decl): Allow redefinition of anticipated built-ins.
6046         Fix inlining problem by over-writing the old DECL_RTL.
6047         (lookup_namespace_name): Fail to find an identifier in the
6048         specified namespace if its still anticipated.
6049         (builtin_function_1): New function split out from builtin_function
6050         to create a builtin in the current namespace with given context.
6051         (builtin_function): Call builtin_function_1 to define the
6052         appropriate builtins in both the std and global namespaces.
6053         (select_decl): Don't test for anticipated decls here.
6054         (unqualified_namespace_lookup): Instead ignore them whilst
6055         searching through scopes and namespaces.
6056         * decl2.c (do_nonmember_using_decl): If a using declaration
6057         specifies an anticipated built-in function, mark it as no longer
6058         anticipated in that scope.
6059         (ambiguous_decl):  Avoid resolving to an anticipated decl.
6060         * lex.c (do_scoped_id): Fail to find an identifier in the global
6061         namespace if its still anticipated.
6062
6063 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
6064
6065         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
6066         * cp-tree.h (cp_make_lang_type): Rename.
6067         * lex.c (cp_make_lang_type): Rename.
6068         (make_aggr_type): Update.
6069         * tree.c (init_tree): Don't set make_lang_type_fn.
6070
6071 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
6072
6073         PR c++/6073
6074         * class.c (finish_struct_1): Update static field's DECL_MODE even
6075         if its type is a variant of t.
6076
6077 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
6078
6079         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
6080         * cp-tree.h (cxx_insert_default_attributes): New.
6081         * decl.c (insert_default_attributes): Rename.
6082
6083 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
6084
6085         PR c++/4884
6086         * call.c (build_op_delete_call): Allow for the fact the placement
6087         may be a COMPOUND_EXPR.
6088
6089 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
6090
6091         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
6092         * cp-tree.h (init_cplus_expand): Remove.
6093         (cxx_expand_expr): New.
6094         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
6095         fix prototype.
6096         (init_cplus_expand): Remove.
6097         * lex.c (cxx_init): Don't call init_cplus_expand.
6098
6099 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
6100
6101         PR c++/4884.
6102         * init.c (build_new_1): Allow for the fact the result of
6103         build_function_call may be a COMPOUND_EXPR.
6104
6105 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
6106
6107         PR c++/5682
6108         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
6109         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
6110         (dfs_skip_nonprimary_vbases_markedp): Remove.
6111         * search.c (get_shared_vbase_if_not_primary): Remove.
6112         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
6113         (dfs_skip_nonprimary_vbases_markedp): Remove.
6114         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
6115         (dfs_marked_real_bases_queue_p): Likewise.
6116
6117 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
6118
6119         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
6120         * cp-tree.h (cxx_mark_tree): New.
6121         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
6122
6123 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
6124
6125         * cp-tree.h (cxx_maybe_build_cleanup): New.
6126         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
6127         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
6128         * tree.c (build_target_expr): Update.
6129         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
6130
6131 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
6132
6133         * decl2.c (cxx_decode_option): Handle -E.
6134         * lang-specs.h (default_compilers): Preprocess with cc1plus.
6135         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
6136
6137 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
6138
6139         PR c++/6037
6140         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
6141
6142 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6143
6144         * error.c (dump_type): Be careful about implicit typenames.
6145
6146 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6147
6148         PR C++/3656
6149         * semantics.c (finish_base_specifier): Handle erronous base
6150         classes.
6151
6152 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
6153
6154         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
6155         REAL_IS_NOT_DOUBLE.
6156
6157 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
6158
6159         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
6160         an index into the vtable_entry array regardless of
6161         TARGET_PTRMEMFUNC_VBIT_LOCATION.
6162
6163 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
6164
6165         * tree.c (cp_cannot_inline_tree_fn): Same.
6166
6167 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
6168
6169         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
6170         insert_block, getdecls, global_bindings_p): New.
6171
6172 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
6173
6174         PR c++/4361
6175         * mangle.c (struct globals) Add internal_mangling_p member.
6176         (write_template_param): Do internal mangling, if needed.
6177         (mangle_conv_op_name_for_type): Request internal mangling.
6178
6179 2002-03-20  Jason Merrill  <jason@redhat.com>
6180
6181         PR c++/2136
6182         * init.c (build_delete): Check access for a member op delete here.
6183         * decl2.c (delete_sanity): Not here.
6184
6185 2002-03-19  Jason Merrill  <jason@redhat.com>
6186
6187         PR c++/5118
6188         * class.c (get_vfield_name): Use the constructor_name.
6189
6190 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
6191
6192         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
6193         * cp-tree.h (lang_printable_name): Rename.
6194         * error.c (lang_decl_name): Use new hook.
6195         * lex.c (cxx_init): Remove old hook.
6196         * pt.c (tsubst_decl): Use new hook.
6197         * tree.c (lang_printable_name): Rename.
6198
6199 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
6200
6201         PR c++/3882
6202         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
6203         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
6204         only after recording the declaration.
6205
6206 2002-03-18  Jason Merrill  <jason@redhat.com>
6207
6208         PR c++/2039
6209         * init.c (resolve_offset_ref): Hand off to build_component_ref.
6210
6211         PR c++/4222, c++/5995
6212         * call.c (build_over_call): Fix empty class logic.
6213
6214         PR c++/3870
6215         * cp-tree.h (struct saved_scope): Add last_parms field.
6216         * decl.c (maybe_push_to_top_level): Save last_function_parms.
6217         (pop_from_top_level): Restore it.
6218
6219         PR c++/4377
6220         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
6221         NON_LVALUE_EXPRs.
6222
6223         PR c++/4003
6224         * pt.c (tsubst_friend_function): Use decl_namespace_context.
6225
6226         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
6227         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
6228         type with a nontrivial destructor.
6229
6230 2002-03-17  Jason Merrill  <jason@redhat.com>
6231
6232         PR c++/4460
6233         * class.c (build_base_path): Virtual base layout is fixed in
6234         in-charge [cd]tors.
6235
6236 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
6237
6238         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
6239         * parse.y (yyparse): Remove macro.
6240
6241 2002-03-17  Jason Merrill  <jason@redhat.com>
6242
6243         PR c++/5757
6244         * init.c (build_new_1): Pass the right pointer to op delete.
6245
6246 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
6247
6248         PR c++/4361
6249         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
6250         conversion operators go.
6251         (struct lang_decl_flags): Add template_conv_p and unused
6252         bitfields.
6253         (DECL_TEMPLATE_CONV_FN_P): New macro.
6254         * call.c (build_user_type_conversion_1): Don't check second type
6255         conversion of overload set first.
6256         * class.c (add_method): Make sure templated conversion operators
6257         all end up on slot 2.
6258         * lex.c (do_identifier): A conversion operator token might be
6259         satisfied by a templated conversion operator.
6260         * pt.c (check_explicit_specialization): Use
6261         CLASSTYPE_FIRST_CONVERSION_SLOT.
6262         (template_parm_this_level_p): New function.
6263         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
6264         * search.c (lookup_fnfields_1): Template conversions will be on
6265         the first slot.
6266         * typeck.c (build_component_ref): Preserve the type of an
6267         conversion operator name on the overload type.
6268         (build_x_function_call): Retrieve the conversion operator name.
6269
6270 2002-03-15  Richard Henderson  <rth@redhat.com>
6271
6272         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
6273
6274 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
6275
6276         * cp-tree.h (CLEANUP_DECL): Remove.
6277         (CLEANUP_EXPR): Likewise.
6278         * decl.c (destroy_local_var): Simplify.
6279         (maybe_build_cleanup): Tidy.
6280         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
6281         * semantics.c (cp_expand_stmt): Likewise.
6282         * cp/tree.c (cp_statement_code_p): Likewise.
6283
6284 2002-03-15  Jason Merrill  <jason@redhat.com>
6285
6286         PR c++/5857
6287         * decl.c (duplicate_decls): Use merge_types instead of common_type.
6288         * typeck.c (common_type): Just hand off to
6289         type_after_usual_arithmetic_conversions and
6290         composite_pointer_type.
6291         (merge_types): New fn.
6292         (commonparms): Use it instead of common_type.
6293         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
6294         (composite_pointer_type): Also handle attributes.
6295         * cp-tree.h: Declare merge_types.
6296
6297         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
6298         variables.
6299         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
6300
6301 2002-03-14  Richard Henderson  <rth@redhat.com>
6302
6303         * decl.c: Include c-pragma.h.
6304         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
6305         * Make-lang.in: Update dependencies.
6306
6307 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
6308
6309         PR c++/5908
6310         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
6311         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
6312
6313 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
6314
6315         * mangle.c (write_builtin_type): Handle 128-bit integers even if
6316         they are not a standard integer type.
6317
6318 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
6319
6320         * cp-tree.h (init_init_processing): Remove declaration.
6321         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
6322         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
6323
6324 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6325
6326         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
6327         Define.
6328         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
6329         tree_code_length.
6330         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
6331         cplus_tree_code_name): Delete.
6332         (cxx_init): Don't call add_c_tree_codes, instead set
6333         lang_unsafe_for_reeval.  Don't try to copy into the various
6334         tree_code arrays.
6335
6336 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
6337
6338         PR c++/5659
6339         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
6340         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
6341         definitions.
6342
6343 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
6344
6345         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
6346         DR209 is now not a defect.
6347         * cp-tree.h (skip_type_access_control): Remove.
6348         * decl.c (grokdeclarator): Do type access control for friend
6349         declarations.
6350         * semantics.c (decl_type_access_control): Don't reset
6351         current_type_lookups.
6352         (save_type_access_control): Always save the lookups.
6353         (skip_type_access_control): Remove.
6354         (finish_class_definition): Don't change type_lookups.
6355
6356 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
6357
6358         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
6359         It is incorrect.
6360         * typeck.c (build_static_cast): Compare non-qualified types
6361         with pointer to member conversions.
6362
6363 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
6364             Daniel Berlin  <dan@dberlin.org>
6365
6366         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
6367         (cxx_get_alias_set): Use it.
6368
6369 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6370
6371         * cp-tree.h (stabilize_expr): Prototype.
6372
6373 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6374
6375         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
6376         conditional return void.
6377
6378 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
6379
6380         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
6381         * cp-tree.h (cxx_unsave): New.
6382         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
6383         (init_tree): Update.
6384
6385 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6386
6387         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
6388         explicit sizeof/sizeof.
6389         * decl2.c (cxx_decode_option): Likewise.
6390         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
6391
6392 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
6393
6394         PR c++/775
6395         * decl.c (lookup_tag): Only reject enum/class mismatch, not
6396         class/union mismatch.
6397         * parse.y (check_class_key): New function.
6398         (structsp): Call it.
6399
6400 2002-03-01  Michael Matz  <matz@suse.de>
6401
6402         * typeck.c (cp_pointer_int_sum): Complete inner type which is
6403         used later by size_in_bytes().
6404
6405 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
6406
6407         * cp-tree.h:  Require __GNUC__ to be #defined.
6408         (build_init):  Add missing prototype.
6409
6410 2002-03-01  Jason Merrill  <jason@redhat.com>
6411
6412         * except.c: Don't include decl.h or obstack.h.  Do include
6413         tree-inline.h.
6414         (build_throw): Destroy temporaries from the thrown
6415         expression before calling __cxa_throw.  Construct a thrown
6416         temporary directly into the exception object.
6417         (stabilize_throw_expr): New function.
6418         (wrap_cleanups_r): New function.
6419         * tree.c (stabilize_expr): New function.
6420         * init.c (build_init): New function.
6421         * Make-lang.in (cp/except.o): Adjust .h deps.
6422
6423 2002-02-28  Jason Merrill  <jason@redhat.com>
6424
6425         * search.c (lookup_base_r): Don't clear is_non_public just because
6426         we found a friendly scope.
6427
6428         * decl.c (finish_function): Only warn about missing return
6429         statement with -Wreturn-type.
6430
6431 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
6432
6433         * class.c (build_clone): Update.
6434         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
6435         * cp-tree.h (cxx_dup_lang_specific_decl): New.
6436         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
6437         (copy_decl): Update.
6438         * method.c (make_thunk): Update.
6439
6440 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
6441
6442         * decl2.c: Delete traditional-mode-related code copied from
6443         the C front end but not used, or used only to permit the
6444         compiler to link.
6445
6446 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
6447
6448         PR c++/4093
6449         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
6450         to void.
6451
6452 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
6453
6454         PR other/5746
6455         * semantics.c (finish_switch_cond): Don't call get_unwidened
6456         if error_mark_node.
6457
6458 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
6459
6460         PR c++/2645, DR 295
6461         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
6462         tf_keep_type_decl.
6463         (make_typename_type): Use tsubst_flags_t.
6464         * decl.c (make_typename_type): Adjust. Return non-artificial
6465         TYPE_DECLs, if required.
6466         (grokdeclarator): Simplify CVR qualification handling. Allow bad
6467         qualifiers on typedef types.
6468         * decl2.c (handle_class_head): Adjust make_typename_type call.
6469         * parse.y (nested_name_specifier): Likewise.
6470         (typename_sub0): Likewise.
6471         (typename_sub1): Likewise.
6472         * pt.c (convert_template_argument): Adjust make_typename_type
6473         return value.
6474         (tsubst): Adjust cp_build_qualified_type_real calls.
6475         (check_cv_quals_for_unify): Cope with allowing bad qualifications
6476         on template type parms.
6477         (instantiate_decl): Recheck substitutions to give warnings on bad
6478         qualifications.
6479         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
6480
6481 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
6482
6483         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
6484
6485         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
6486         unless DECL_ALWAYS_INLINE.
6487
6488 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
6489
6490         * typeck.c (cp_pointer_int_sum): Renamed from
6491         pointer_int_sum, call pointer_int_sum.
6492
6493 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
6494
6495         * decl.c (duplicate_decls): Return 0 if issued error about
6496         redeclaration.
6497
6498 2002-02-19  Jason Merrill  <jason@redhat.com>
6499
6500         ABI change: Mangle `void (A::*)() const' as
6501         M1AKFvvE, not MK1AFvvE.
6502         * mangle.c (write_function_type): Write cv-quals for member
6503         function type here.
6504         (write_pointer_to_member_type): Not here.
6505
6506 2002-02-18  Jason Merrill  <jason@redhat.com>
6507
6508         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
6509         (do_decl_instantiation): Likewise.
6510
6511 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6512
6513         PR c++/5685
6514         * decl.c (duplicate_decls): Make warning unconditional
6515         if duplicate default argument declarations are present.
6516
6517 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
6518
6519         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
6520         shortening.
6521
6522 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
6523
6524         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
6525         remove incorrect comment. Move #if 0'd code to common path. Use
6526         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
6527
6528 2002-02-13  Jason Merrill  <jason@redhat.com>
6529
6530         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
6531         (finish_function): Don't warn if current_function_returns_null.
6532
6533         * typeck2.c (digest_init): Do handle values of vector type.
6534
6535         * typeck2.c (digest_init, process_init_constructor): Treat vectors
6536         like arrays.
6537
6538 2002-02-11  Jason Merrill  <jason@redhat.com>
6539
6540         * parse.y (reserved_declspecs): Don't handle attributes.
6541         (reserved_typespecquals): Handle them here.
6542         * Make-lang.in (parse.c): Adjust expected conflicts.
6543
6544 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
6545
6546         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
6547         instead of compstmt.
6548         (compstmt_or_stmtexpr): Renamed from compstmt.
6549         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
6550
6551 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
6552
6553         Rename instantiate_type_flags to tsubst_flags_t & expand use.
6554         * cp-tree.h (instantiate_type_flags): Rename to ...
6555         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
6556         add tf_warning flag.
6557         (instantiate_type): Adjust prototype.
6558         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
6559         do_type_instantiation, cp_build_qualified_type_real): Likewise.
6560         cp_build_qualified_type: Adjust.
6561         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
6562         tf_*.
6563         * call.c (standard_conversion): Rename itf_* to tf_*.
6564         (reference_binding): Likewise.
6565         (convert_like_real): Likewise.
6566         * cvt.c (cp_convert_to_pointer): Likewise.
6567         (convert_to_reference): Likewise.
6568         * decl.c (lookup_namespace_name): Use tf_* flags.
6569         (make_typename_type): Likewise.
6570         (grokdeclarator): Likewise.
6571         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
6572         (coerce_template_template_parms, convert_template_argument,
6573         coerce_template_parms, maybe_get_template_decl_from_type_decl,
6574         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
6575         instantiate_class_template, tsubst_template_arg_vector,
6576         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
6577         tsubst_decl, tsubst_arg_types, tsubst_function_type,
6578         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
6579         instantiate_template, fn_type_unification,
6580         resolve_overloaded_unification, verify_class_unification,
6581         unify, get_bindings_real, do_type_instantiation,
6582         regenerate_decl_from_template, instantiate_decl,
6583         tsubst_initializer_list, tsubst_enum,
6584         get_mostly_instantiated_function_type,
6585         invalid_nontype_parm_type_p): Likewise.
6586         * tree.c (cp_build_qualified_type_real): Likewise.
6587         * typeck.c (build_binary_op): Rename itf_* to tf_*.
6588         (build_ptrmemfunc): Likewise.
6589         (convert_for_assignment): Likewise.
6590
6591 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
6592
6593         PR c++/109
6594         * decl.c (grokdeclarator): Allow friend declarations from
6595         dependent types.
6596         * decl2.c (handle_class_head): Don't push into template parm contexts.
6597         * pt.c (push_template_decl_real): Template parm contexts are never
6598         being defined.
6599
6600 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
6601
6602         * class.c: Include target.h.
6603         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
6604         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
6605         bit-field layout.
6606         * Make-lang.in: Adjust deps.
6607
6608 2002-02-05  Jason Merrill  <jason@redhat.com>
6609
6610         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
6611
6612 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
6613
6614         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
6615         (finish_switch_cond): Set SWITCH_TYPE.
6616
6617 2002-02-04  Richard Henderson  <rth@redhat.com>
6618
6619         * method.c (use_thunk): Always initialize the block tree.  Reindent.
6620         * semantics.c (expand_body): Emit thunks after function, not before.
6621
6622 2002-02-04  Jason Merrill  <jason@redhat.com>
6623
6624         * decl.c (start_function): Call cplus_decl_attributes immediately
6625         after grokdeclarator.
6626
6627         * decl.c (start_function): Combine DECL_RESULT handling code.
6628
6629 2002-02-03  Jason Merrill  <jason@redhat.com>
6630
6631         * xref.c: Remove.
6632         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
6633         (cp/xref.o): Remove dependencies.
6634         * class.c (finish_struct_1, check_methods): Don't call xref fns.
6635         (finish_struct_1): Likewise.
6636         * friend.c (make_friend_class): Likewise.
6637         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
6638         * spew.c (read_process_identifier): Likewise.
6639
6640 2002-02-01  Jason Merrill  <jason@redhat.com>
6641
6642         PR c++/4872
6643         * decl.c (finish_function): Warn about a non-void function with
6644         no return statement and no abnormal exit.
6645         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
6646         (current_function_returns_abnormally): New macro.
6647         * call.c (build_call): Set it.
6648
6649         * typeck.c (build_component_ref): Always complain about offsetof
6650         constructs on non-PODs.  Only make it an error for members of
6651         virtual bases.
6652
6653         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
6654         (dump_function_decl): Always dump parms.
6655
6656         * decl2.c (finish_static_data_member_decl): Complain about a local
6657         class with a static data member.
6658
6659         PR c++/4286
6660         * search.c (lookup_field_1): Don't xref a static data member
6661         just because we looked it up.
6662
6663 2002-01-31  Jason Merrill  <jason@redhat.com>
6664
6665         * Make-lang.in (parse.c): Handle .output file.
6666
6667         PR c++/3395
6668         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
6669         not TREE_TYPE.
6670         * semantics.c (finish_class_definition): Adjust.
6671
6672         Allow attributes in parms and casts.
6673         * parse.y (named_parm): Don't strip attrs.
6674         (declmods): Remove 'attributes' production.
6675         (nonempty_cv_qualifiers): Accept attributes.
6676         (ATTRIBUTE): Give precedence.
6677         * decl.c (groktypename): Handle attributes.
6678         (grokparms): Likewise.
6679
6680 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
6681
6682         * decl2.c (cxx_decode_option): Pass 0 as last argument to
6683         cpp_handle_option.
6684         * lang-specs.h: Use cpp_unique_options instead of cpp_options
6685         when used together with cc1_options.
6686
6687 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
6688
6689         PR c++/5132
6690         * typeck2.c (digest_init): Make sure non-array core type is
6691         instantiated.
6692         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
6693         constructor, rather than build a new one.
6694         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
6695         PURPOSE of constructor elts.
6696
6697 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
6698
6699         * Make-lang.in (parse.c): Adjust expected number of
6700         shift-reduce conflicts.
6701         (decl.o): Depend on diagnostic.h.
6702         * decl.c: Include diagnostic.h.
6703         (grokdeclarator): Check for null pointer.
6704         (finish_function): Don't abort when
6705         current_binding_level->parm_flag != 1, if errors have
6706         occurred; throw away the statement tree and extra binding
6707         levels, and continue.
6708         * lex.c (note_list_got_semicolon): Check for null pointer.
6709         * method.c (hack_identifier): Just return error_mark_node if
6710         value is error_mark_node.
6711         * parse.y (primary: TYPEID(type_id)): No need to use
6712         TYPE_MAIN_VARIANT here.
6713         (handler_seq): Accept an empty list of catch clauses and
6714         generate a fake handler block to avoid later crashes.
6715         (ansi_raise_identifier): Accept the error token too.
6716         * semantics.c (begin_class_definition,
6717         finish_class_definition): Check for error_mark_node.
6718
6719 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
6720
6721         * typeck2.c (friendly_abort): Delete definition.
6722         * cp-tree.h (friendly_abort): Don't prototype.
6723         (my_friendly_assert): Use fancy_abort.
6724
6725 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6726
6727         * cp-tree.h (my_friendly_abort): Remove.
6728
6729 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
6730
6731         * spew.c (pending_inlines, pending_inlines_tail,
6732         processing_these_inlines): Make static.
6733         (mark_pending_inlines): Remove static.
6734         (begin_parsing_inclass_inline): If in function, save pi
6735         for GC to cp_function_chain->unparsed_inlines instead.
6736         (process_next_inline): Likewise.
6737         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
6738         (mark_pending_inlines): Add prototype.
6739         * decl.c (spew_debug): Remove unused extern.
6740         (mark_lang_function): Call mark_pending_inlines.
6741
6742 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6743
6744         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
6745         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
6746         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
6747         Change my_fancy_abort() to abort().
6748
6749 2002-01-23  Jason Merrill  <jason@redhat.com>
6750
6751         PR c++/5453
6752         * class.c (fixed_type_or_null): Fix thinko.
6753
6754         PR c++/3331
6755         * init.c (resolve_offset_ref): Use build_indirect_ref.
6756
6757         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
6758
6759 2002-01-22  Jason Merrill  <jason@redhat.com>
6760
6761         * parse.y (function_body): Suppress the block for the outermost
6762         curly braces.
6763         * decl.c (pushdecl): Don't try to skip it.
6764         (begin_function_body): Keep the block we create, not the next one.
6765         * init.c (emit_base_init): Don't mess with keep_next_level.
6766
6767         * class.c (build_base_path): Tweak formatting.
6768
6769 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
6770
6771         Fix regression introduced with patch for c++/775
6772         * parse.y (class_head_defn): Check for template specializations
6773         with a different class-key.
6774
6775 2002-01-17  Jason Merrill  <jason@redhat.com>
6776
6777         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
6778         (begin_function_body): Call them and keep_next_level.
6779         * init.c (emit_base_init): Call keep_next_level.
6780         * semantics.c (setup_vtbl_ptr): Lose.
6781         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
6782         (vtbls_set_up_p): Lose.
6783         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
6784         * method.c (do_build_copy_constructor): Likewise.
6785         (synthesize_method): Call finish_mem_initializers.
6786         * parse.y (nodecls): Likewise.
6787
6788         * error.c (dump_type_suffix): Print the exception specs before
6789         recursing.
6790         (dump_function_decl): Here, too.
6791
6792         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
6793
6794 2002-01-10  Ira Ruben   <ira@apple.com>
6795
6796         PR c++/907
6797         * decl.c (start_method): Handle attrlist.
6798
6799 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
6800
6801         * decl2.c (max_tinst_depth): Increase default limit to 500.
6802
6803 2002-01-10  Graham Stott  <grahams@redhat.com>
6804
6805         * spew.c (YYCHAR): Uppercase macro parameter and add
6806         parenthesis.
6807         (YYCODE): Likewise.
6808         (NAME): Uppercase macro parameter.
6809
6810 2002-01-09  Graham Stott  <grahams@redhat.com>
6811
6812         * decl.h (grokdeclarator): Wrap long line.
6813
6814         * semantics.c (FINISH_COND): Uppercase macro paramaters and
6815         add parenthesis.
6816
6817 2002-01-08  Graham Stott  <grahams@redhat.com>
6818
6819         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
6820         (PALLOC): Uppercase macro parameter and whitespace.
6821         (SALLOC): Uppercase macro parameter.
6822         (SFREE): Uppercase macros parameter, add parenthese and
6823         whitespace.
6824         (STREQL): Uppercase macro parameter and whitespace.
6825         (STRNEQ): Likewise.
6826         (STRLSS): Likewise.
6827         (STRLEQ): Likewise.
6828         (STRGTR): Likewise.
6829         (STRGEQ): Likewise.
6830
6831         * call.c (convert_like): Add parenthesis and wrap.
6832         (convert_like_with_context): Likewise.
6833         (ICS_RANK): Whitespace.
6834         (NEED_TEMPORARY_P): Remove parenthesis.
6835
6836         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
6837         whitespace.
6838         (VTT_MARKED_BINFO_P): Likewise.
6839
6840         * decl.c (BINDING_LEVEL): Add parenthesis.
6841         (DEF_OPERATOR): Likewise.
6842
6843         * mangle.c (MANGLE_TRACE): Add parenthesis.
6844         (MANGLE_TRACE_TREE): Likewise.
6845         (write_signed_number): Likewise.
6846         (write_unsigned_number): Likewise.
6847
6848         * pt.c (ccat): Uppercase macro parameter.
6849         (cat): Likewise
6850
6851         * search.c (SET_BINFO_ACCESS): Add parenthesis.
6852
6853 2002-01-07  Jason Merrill  <jason@redhat.com>
6854
6855         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
6856         to pedwarn.
6857
6858         PR c++/3536
6859         * method.c (make_thunk): If !flag_weak, give the thunk the
6860         function's linkage.
6861         (use_thunk): Here, too.
6862
6863 2002-01-07  Graham Stott  <grahams@redhat.com>
6864
6865         * error.c: Update copyright date.
6866         (print_scope_operator): Add parenthesis.
6867         (print_left_paren): Likewise.
6868         (print_right_paren): Likewise.
6869         (print_left_bracket): Likewise.
6870         (print_right_bracket): Likewise.
6871         (print_template_argument_list_start): Likewise.
6872         (print_template_argument_list_end): Likewise.
6873         (print_non_consecutive_character): Likewise.
6874         (print_tree_identifier): Likewise.
6875         (print_identifier): Likewise.
6876         (NEXT_CODE): Uppercase macro parameter.
6877         (ident_fndecl): Delete unused.
6878         (GLOBAL_THING): Likewise.
6879
6880 2002-01-06  Graham Stott  <grahams@redhat.com>
6881
6882         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
6883         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
6884         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
6885         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
6886         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
6887         (C_IS_RESERVED_WORD): Uppercase macro parameter.
6888         (C_RID_YYCODE) Likewise.
6889         (ptrmem_cst): Use rtx.
6890         (LOCAL_BINDING_P): Add whitespace.
6891         (INHERITED_VALUE_BINDING_P): Likewise.
6892         (BINDING_SCOPE): Wrap long line.
6893         (BINDING_HAS_LEVEL_P): Remove parenthesis.
6894         (BINDING_VALUE): Wrap long line.
6895         (BINDING_TYPE): Whitespace.
6896         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
6897         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
6898         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
6899         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
6900         (same_type_p): Uppercase macro parameters.
6901         (same_type_ignoring_top_level_qualifiers_p): Likewise.
6902         (OVL_FUNCTION): Wrap long line.
6903         (OVL_CHAIN): Whitespace.
6904         (OVL_CURRENT): Add parenthesis and whitespace.
6905         (OVL_NEXT): Whitespace.
6906         (OVL_USED): Likewise.
6907         (IDENTIFIER_TYPE_VALUE): Likewise.
6908         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
6909         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
6910         (LANG_ID_FIELD): Whitespace.
6911         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
6912         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
6913         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
6914         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
6915         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
6916         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
6917         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
6918         (IDENTIFIER_VIRTUAL_P): Likewise.
6919         (IDENTIFIER_OPNAME_P): Likewise.
6920         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
6921         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
6922         (C_SET_EXP_ORIGINAL_CODE): Likewise.
6923         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
6924         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
6925         (IS_AGGR_TYPE): Uppercase macro parameter.
6926         (CLASS_TYPE_P): Likewise.
6927         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
6928         (IS_AGGR_TYPE_2): Whitespace.
6929         (TAGGED_TYPE_P): Uppercase macro parameter.
6930         (TYPE_BUILT_IN): Whitespace.
6931         (TYPE_FOR_JAVA): Likewise.
6932         (FUNCTION_ARG_CHAIN): Remove parenthesis.
6933         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
6934         (FUNCTION_FIRST_USER_PARAM): Likewise.
6935         (PROMOTES_TO_AGGR_TYPE): Whitespace.
6936         (DERIVED_FROM_P): Add parenthesis and wrap.
6937         (UNIQUELY_DERIVED_FROM_P): Likewise.
6938         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
6939         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
6940         (CLASSTYPE_USE_TEMPLATE): Whitespace.
6941         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
6942         (TYPE_GETS_DELETE): Add parenthesis.
6943         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
6944         (TYPE_HAS_ASSIGN_REF): Likewise,
6945         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
6946         (TYPE_HAS_INIT_REF): Likewise.
6947         (TYPE_HAS_CONST_INIT_REF): Likewise.
6948         (TYPE_BEING_DEFINED): Likewise.
6949         (TYPE_LANG_SPECIFIC): Likewise.
6950         (CLASSTYPE_RTTI): Likewise.
6951         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
6952         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
6953         (TYPE_OVERLOADS_ARROW): Likewise.
6954         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
6955         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
6956         (CLASSTYPE_METHOD_VEC): Likewise.
6957         (CLASSTYPE_MARKED_N): Likewise.
6958         (CLASSTYPE_MARKED): Likewise.
6959         (CLASSTYPE_MARKED2): Likewise.
6960         (CLASSTYPE_MARKED3): Likewise.
6961         (CLASSTYPE_MARKED4): Likewise.
6962         (CLASSTYPE_MARKED5): Likewise.
6963         (CLASSTYPE_MARKED6): Likewise.
6964         (SET_CLASSTYPE_MARKED): Whitespace.
6965         (CLEAR_CLASSTYPE_MARKED): Likewise.
6966         (SET_CLASSTYPE_MARKED2): Likewise.
6967         (CLEAR_CLASSTYPE_MARKED2): Likewise.
6968         (SET_CLASSTYPE_MARKED3): Likewise.
6969         (CLEAR_CLASSTYPE_MARKED3): Likewise.
6970         (SET_CLASSTYPE_MARKED4): Likewise.
6971         (CLEAR_CLASSTYPE_MARKED4): Likewise.
6972         (SET_CLASSTYPE_MARKED5): Likewise.
6973         (CLEAR_CLASSTYPE_MARKED5): Likewise.
6974         (SET_CLASSTYPE_MARKED6): Likewise.
6975         (CLEAR_CLASSTYPE_MARKED6): Likewise.
6976         (CLASSTYPE_TAGS): Likewise.
6977         (CLASSTYPE_VSIZE): Likewise.
6978         (CLASSTYPE_VBASECLASSES): Likewise.
6979         (CANONICAL_BINFO): Add parenthesis.
6980         (CLASSTYPE_SIZE(NODE): Likewise.
6981         (CLASSTYPE_SIZE_UNIT): Likewise.
6982         (CLASSTYPE_ALIGN(NODE): Likewise.
6983         (CLASSTYPE_USER_ALIGN): Likewise.
6984         (TYPE_JAVA_INTERFACE): Likewise.
6985         (CLASSTYPE_PURE_VIRTUALS): Likewise.
6986         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
6987         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
6988         (CLASSTYPE_HAS_MUTABLE): Likewise.
6989         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
6990         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
6991         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
6992         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
6993         (CLASSTYPE_INTERFACE_ONLY): Likewise.
6994         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
6995         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
6996         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
6997         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
6998         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
6999         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
7000         (BINFO_UNSHARED_MARKED): Whitespace.
7001         (BINFO_MARKED): Whitespace and wrap.
7002         (SET_BINFO_MARKED): Likewise.
7003         (CLEAR_BINFO_MARKED): Likewise.
7004         (BINFO_VTABLE_PATH_MARKED): Likewise.
7005         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
7006         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
7007         (BINFO_SUBVTT_INDEX): Remove parenthesis.
7008         (BINFO_VPTR_INDEX): Likewise.
7009         (BINFO_PRIMARY_BASE_OF): Likewise,
7010         (CLASSTYPE_VFIELDS): Whitespace.
7011         (VF_DERIVED_VALUE): Wrap long line.
7012         (NAMESPACE_LEVEL): Whitespace.
7013         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
7014         (DEFARG_POINTER): Whitespace.
7015         (DECL_NEEDED_P): Remove parenthesis.
7016         (DECL_LANGUAGE): Whitespace.
7017         (SET_DECL_LANGUAGE): Add parenthesis.
7018         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
7019         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
7020         (DECL_IN_AGGR_P): Whitespace.
7021         (DECL_FRIEND_P): Likewise.
7022         (DECL_BEFRIENDING_CLASSES): Likewise.
7023         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
7024         (DECL_NONCONVERTING_P): Whitespace.
7025         (DECL_PURE_VIRTUAL_P): Likewise.
7026         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
7027         (DECL_PENDING_INLINE_INFO): Whitespace.
7028         (DECL_SORTED_FIELDS): Likewise.
7029         (DECL_DEFERRED_FN): Likewise.
7030         (DECL_TEMPLATE_INFO): Likewise.
7031         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
7032         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
7033         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
7034         (TMPL_ARGS_LEVEL): Likewise.
7035         (SET_TMPL_ARGS_LEVEL): Likewise.
7036         (INNERMOST_TEMPLATE_PARMS): Whitespace.
7037         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
7038         (INTEGRAL_CODE_P(CODE): Add parenthesis.
7039         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
7040         (TYPE_HAS_CONSTRUCTOR): Whitespace.
7041         (TREE_HAS_CONSTRUCTOR): Likewise.
7042         (TYPE_HAS_DESTRUCTOR): Likewise.
7043         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
7044         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
7045         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
7046         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
7047         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
7048         (TYPE_PTRMEMFUNC_P): Likewise.
7049         (TYPE_PTRMEMFUNC_FLAG): Likewise.
7050         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
7051         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
7052         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
7053         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
7054         (DECL_ACCESS): Whitespace.
7055         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
7056         (DECL_GLOBAL_DTOR_P): Likewise.
7057         (GLOBAL_INIT_PRIORITY): Likewise.
7058         (DECL_TEMPLATE_PARMS): Likewise.
7059         (DECL_TEMPLATE_RESULT): Likewise.
7060         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
7061         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
7062         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
7063         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
7064         (PRIMARY_TEMPLATE_P): Add parenthesis.
7065         (DECL_USE_TEMPLATE): Whitespace.
7066         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
7067         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
7068         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
7069         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
7070         (CALL_DECLARATOR_PARMS): Remove parenthesis.
7071         (CALL_DECLARATOR_QUALS): Likewise.
7072         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
7073         (TEMP_NAME_P): Wrap.
7074         (VFIELD_NAME_P): Likewise.
7075         (B_SET): Uppercase macro parameters and add parenthesis.
7076         (B_CLR): Likewise.
7077         (B_TST): Likewise.
7078         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
7079         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
7080         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
7081         (same_or_base_type_p): Likewise.
7082         (cp_deprecated): Likewise.
7083
7084 2002-01-05  Richard Henderson  <rth@redhat.com>
7085
7086         * semantics.c (expand_body): Revert last change.
7087
7088 2002-01-04  Jason Merrill  <jason@redhat.com>
7089
7090         PR c++/4122
7091         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
7092         lost primary.
7093
7094         * class.c (build_vtbl_initializer): Check for a lost primary
7095         before calculating the vtable entry to throw away.
7096
7097 2002-01-02  Jason Merrill  <jason@redhat.com>
7098
7099         * semantics.c (expand_body): Call outlining_inline_function when
7100         emitting an inline function out of line.
7101
7102 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7103
7104         PR c++/5116, c++/764 reversion
7105         * call.c (build_new_op): Revert the instantiations. They are
7106         incorrect.
7107
7108 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7109
7110         PR c++/5089
7111         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
7112
7113 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7114
7115         PR c++/3716
7116         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
7117         (tsubst, case POINTER_TYPE): Handle pmfs here.
7118         (tsubst, case OFFSET_TYPE): Check it is not an offset to
7119         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
7120
7121 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7122
7123         PR c++/35
7124         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
7125         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
7126         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
7127         PARM_DECL.
7128         (tsubst_template_parms): Break up loop statements.
7129         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
7130         parm PARM_DECLs don't get promoted.
7131
7132 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7133
7134         PR c++/5123
7135         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
7136         (build_x_function_call): Cope with a COMPONENT_REF containing a
7137         TEMPLATE_ID_EXPR.
7138
7139 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7140
7141         PR c++/5213
7142         * pt.c (convert_template_argument): Be more careful determining
7143         when RECORD_TYPE templates are or are not templates.
7144
7145 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7146
7147         PR c++/775
7148         * cp-tree.h (handle_class_head): Adjust prototype.
7149         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
7150         parameters. Use for all class heads.
7151         * parse.y (named_class_head_sans_basetype, named_class_head,
7152         named_complex_class_head_sans_basetype,
7153         named_class_head_sans_basetype_defn,
7154         unnamed_class_head): Remove.
7155         (class_head, class_head_apparent_template): Recognize class heads
7156         (class_head_decl, class_head_defn): New reductions. Process class
7157         heads.
7158         (structsp): Adjust class definition and class declaration
7159         reductions.
7160         (maybe_base_class_list): Give diagnostic on empty list.
7161
7162 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7163
7164         PR c++/4379
7165         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
7166         single non-static member.
7167         (unary_complex_lvalue): If it cannot be a pointer to member, don't
7168         make it so. Check it is not pointer to reference.
7169
7170 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7171
7172         PR c++/5132
7173         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
7174         are processing a template decl.
7175
7176 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7177
7178         PR c++/5116, c++/764
7179         * call.c (build_new_op): Make sure template class operands are
7180         instantiated. Simplify arglist construction.
7181
7182 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
7183
7184         * call.c (build_user_type_conversion_1): Use my_friendly_assert
7185         rather than if ... abort.
7186         * cvt.c (convert_to_reference): Likewise.
7187         * semantics.c (setup_vtbl_ptr): Likewise.
7188         * pt.c (lookup_template_class): Comment typo.
7189
7190 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
7191
7192         PR c++/5125
7193         * pt.c (push_template_decl_real): Make sure DECL has
7194         DECL_LANG_SPECIFIC.
7195
7196 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
7197
7198         PR c++/335
7199         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
7200         for non-reference fields.
7201         * typeck.c (require_complete_type): Use resolve_offset_ref).
7202
7203 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
7204
7205         PR c++/196
7206         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
7207
7208 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
7209
7210         PR c++/160
7211         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
7212         up. Don't stabilize_references when initializing a reference.
7213
7214 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7215
7216         * decl2.c (lang_f_options): Const-ify.
7217
7218 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
7219
7220         * config-lang.in (diff_excludes): Remove.
7221
7222 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
7223
7224         PR c++/90
7225         * typeck.c (build_function_call_real): Use original function
7226         expression for errors.
7227
7228 2001-12-18  Jason Merrill  <jason@redhat.com>
7229
7230         PR c++/3242
7231         * class.c (add_method): Do compare 'this' quals when trying to match a
7232         used function.  Don't defer to another used function.
7233
7234 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
7235
7236         * pt.c (instantiate_clone): Remove, fold into ...
7237         (instantiate_template): ... here. Simplify by removing mutual
7238         recursion.
7239         * typeck2.c (build_m_component_ref): Don't cv qualify the function
7240         pointed to by a pointer to function.
7241         * class.c (delete_duplicate_fields_1): Typo.
7242
7243 2001-12-18  Jason Merrill  <jason@redhat.com>
7244
7245         C++ ABI change: destroy value arguments in caller.
7246         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
7247         create an extra binding level for the parameters.
7248         * decl.c (store_parm_decls): Don't do parameter cleanups.
7249
7250 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
7251
7252         * call.c (build_new_method_call): Use '%#V'.
7253         * error.c (cv_to_string): Use V parameter to determine padding.
7254
7255 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
7256
7257         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
7258         spellings in messages.
7259
7260 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
7261
7262         * cp-tree.h: Delete #defines for cp_error, cp_warning,
7263         cp_pedwarn, and cp_compiler_error.
7264         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
7265         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
7266         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
7267         typeck2.c: Change calls to the above macros to use their
7268         language-independent equivalents: error, warning, pedwarn, and
7269         internal_error respectively.
7270
7271 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
7272
7273         * decl2.c (finish_file): Remove back_end_hook.
7274
7275 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
7276
7277         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
7278         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
7279         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
7280
7281 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
7282
7283         * lang-options.h: Use American spelling in messages.
7284
7285 2001-12-13  Jason Merrill  <jason@redhat.com>
7286
7287         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
7288
7289         Use cleanups to run base and member destructors.
7290         * init.c (push_base_cleanups): New function, split out from...
7291         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
7292         * decl.c (finish_destructor_body): Move vbase destruction code to
7293         push_base_cleanups.
7294         (begin_function_body, finish_function_body): New fns.
7295         (finish_function): Move [cd]tor handling and call_poplevel to
7296         finish_function_body.
7297         (pushdecl): Skip the new level.
7298         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
7299         (setup_vtbl_ptr): Call push_base_cleanups.
7300         * method.c (synthesize_method): Call {begin,end}_function_body.
7301         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
7302         * cp-tree.h: Declare new fns.
7303         * parse.y (function_body, .begin_function_body): New nonterminals.
7304         (fndef, pending_inline, function_try_block): Use function_body.
7305         (ctor_initializer_opt, function_try_block): No longer has a value.
7306         (base_init): Remove .set_base_init token.
7307         (.set_base_init, compstmt_or_error): Remove.
7308         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
7309
7310         * optimize.c (maybe_clone_body): Fix parameter updating.
7311
7312 2001-12-12  Jason Merrill  <jason@redhat.com>
7313
7314         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
7315         * semantics.c (genrtl_start_function): Don't pass
7316         parms_have_cleanups or push an extra binding level.
7317         (genrtl_finish_function): Lose cleanup_label cruft.
7318
7319         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
7320         (ctor_label): Remove.
7321         * semantics.c (finish_return_stmt): Lose ctor_label support.
7322         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
7323         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
7324         dtor_label.
7325
7326         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
7327         check for [cd]tors.
7328         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
7329
7330         * decl.c (finish_function): Check VMS_TARGET, not VMS.
7331
7332         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
7333         (end_cleanup_fn): And poplevel.
7334
7335         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
7336         if we're in a template.
7337
7338 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
7339
7340         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
7341         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
7342         THIS_NAME_P): Delete.
7343         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
7344         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
7345         with internal naming scheme.
7346         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
7347
7348 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
7349
7350         * decl.c (grokdeclarator): Deprecated implicit typename use.
7351
7352 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
7353
7354         PR g++/51
7355         * parse.y (frob_specs): Indicate it is a language linkage which
7356         contained the extern.
7357         * decl.c (grokdeclarator): Allow extern language linkage with
7358         other specifiers.
7359
7360 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
7361
7362         PR g++/72
7363         * decl.c (add_binding): Don't reject duplicate typedefs involving
7364         template parameters.
7365
7366 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
7367
7368         * parse.y, semantics.c: Similarly.
7369
7370 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
7371
7372         PR g++/87
7373         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
7374         (copy_args_p): Rename to ...
7375         (copy_fn_p): ... here.
7376         (grok_special_member_properties): New function.
7377         (grok_op_properties): Lose VIRTUALP parameter.
7378         (copy_assignment_arg_p): Remove.
7379         * call.c (build_over_call): Use copy_fn_p.
7380         * decl.c (grokfndecl): Reformat. Adjust call to
7381         grok_op_properties.
7382         (copy_args_p): Rename to ...
7383         (copy_fn_p): ... here. Reject template functions. Check for pass
7384         by value.
7385         (grok_special_member_properties): Remember special functions.
7386         (grok_ctor_properties): Don't remember them here, just check.
7387         (grok_op_properties): Likewise.
7388         (start_method): Call grok_special_member_properties.
7389         * decl2.c (grokfield): Likewise.
7390         (copy_assignment_arg_p): Remove.
7391         (grok_function_init): Don't remember abstract assignment here.
7392         * pt.c (instantiate_class_template): Call
7393         grok_special_member_properties.
7394         (tsubst_decl): Adjust grok_op_properties call.
7395
7396 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
7397
7398         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
7399         RID_TYPES_COMPATIBLE_P.
7400
7401 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7402
7403         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
7404         call to build_aggr_init.
7405         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
7406
7407 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
7408
7409         * parse.y: Replace uses of the string non-terminal with STRING.
7410         Don't perform string concatentaion here.
7411         (string): Remove non-terminal.
7412         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
7413
7414 2001-12-05  Jason Merrill  <jason@redhat.com>
7415
7416         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
7417         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
7418         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
7419         * pt.c (push_tinst_level): No longer static.
7420         * cp-tree.h: Declare them.
7421
7422         * init.c (resolve_offset_ref): Don't check access for the base
7423         conversion to access a FIELD_DECL.
7424
7425         * cp-tree.h (TYPE_REFFN_P): New macro.
7426         * decl.c (bad_specifiers): Check it, too.
7427
7428         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
7429         on the __*_type_info type if we haven't seen a definition.
7430
7431 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
7432
7433         * decl.c: Include c-common.h.
7434         (shadow_warning): Move to c-common.c.
7435
7436 2001-12-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7437
7438         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
7439
7440 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
7441
7442         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
7443
7444 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
7445
7446         PR g++/164
7447         * init.c (sort_base_init): Allow binfos to be directly specified.
7448         * method.c (do_build_copy_constructor): Explicitly convert to the
7449         base instance.
7450         (do_build_assign_ref): Likewise.
7451
7452 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
7453
7454         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
7455         declaration and initialization.
7456
7457 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
7458
7459         * typeck2.c: Remove leading capital from diagnostic messages, as
7460         per GNU coding standards.
7461
7462 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
7463
7464         PR c++/3394
7465         * decl.c (xref_basetypes): Handle attributes between
7466         'class' and name.
7467
7468 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
7469
7470         PR g++/3381
7471         * parse.y (named_complex_class_head_sans_basetype): Add new
7472         reduction.
7473         * Make-lang.in (parse.c): Adjust expected conflict count.
7474
7475 2001-12-03  Jason Merrill  <jason@redhat.com>
7476
7477         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
7478         immediate binfos for our virtual bases.
7479
7480 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
7481
7482         * call.c (build_java_interface_fn_ref): Similarly.
7483         * except.c (is_admissible_throw_operand): Similarly.
7484         * init.c (build_java_class_ref): Similarly.
7485         * xref.c (open_xref_file): Similarly.
7486
7487 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7488
7489         * class.c (finish_struct): Remove trailing periods from messages.
7490         * decl.c (check_tag_decl): Similarly.
7491         * lex.c (cxx_set_yydebug): Similarly.
7492         * typeck2.c (friendly_abort): Similarly.
7493
7494 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
7495
7496         PR c++/3048
7497         * cp-tree.h (ovl_member): Remove.
7498         * decl2.c (merge_functions): Handle extern "C" functions
7499         specially.
7500         * tree.c (ovl_member): Remove.
7501
7502 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
7503
7504         PR c++/4842
7505         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
7506         FUNCTION_DECL, as input.
7507         (mark_overriders): Remove.
7508         (warn_hidden): Rework for the new ABI.
7509
7510 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
7511
7512         PR c++/3471
7513         * call.c (convert_like_real): Do not build additional temporaries
7514         for rvalues of class type.
7515
7516 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
7517
7518         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
7519         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
7520         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
7521         (DERIVED_FROM_P): Likewise.
7522         (enum base_access): Renumber, add ba_quiet bit mask.
7523         (get_binfo): Remove.
7524         (get_base_distance): Remove.
7525         (binfo_value): Remove.
7526         (ACCESSIBLY_DERIVED_FROM_P): Remove.
7527         * call.c (standard_conversion): Use lookup_base.
7528         * class.c (strictly_overrides): Likewise.
7529         (layout_virtual_bases): Likewise.
7530         (warn_about_ambiguous_direct_bases): Likewise.
7531         (is_base_of_enclosing_class): Likewise.
7532         (add_vcall_offset_vtbl_entries_1): Likewise.
7533         * cvt.c (build_up_reference): Adjust comment.
7534         * init.c (build_member_call): Reformat.
7535         * search.c (get_binfo): Remove.
7536         (get_base_distance_recursive): Remove.
7537         (get_base_distance): Remove.
7538         (lookup_base_r): Tweak.
7539         (lookup_base): Add ba_quiet control. Complete the types here.
7540         (covariant_return_p): Use lookup_base.
7541         * tree.c (binfo_value): Remove.
7542         (maybe_dummy_object): Use lookup_base.
7543         * typeck.c (build_static_cast): Use lookup_base.
7544         (get_delta_difference): Likewise.
7545         * typeck2.c (binfo_or_else): Use lookup_base.
7546         (build_scoped_ref): Add back error_mark_check.
7547         (build_m_component_ref): Use lookup_base.
7548
7549 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
7550
7551         * Make-lang.in (c++.generated-manpages): New dummy target.
7552
7553 2001-11-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7554
7555         * Make-lang.in (cp-lang.o): Depends on c-common.h.
7556         * cp-lang.c (c-common.h): Include.
7557         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
7558         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
7559         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
7560
7561 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
7562
7563         * decl2.c (c_language): Move to c-common.c.
7564         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
7565         functions.
7566         (cxx_init): Update.
7567
7568 2001-11-26  Jason Merrill  <jason@redhat.com>
7569
7570         * call.c (joust): Remove COND_EXPR hack.
7571
7572 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
7573
7574         * search.c (lookup_base_r): Declare bk in variable declaration
7575         space.
7576
7577 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
7578
7579         PR g++/3145
7580         * class.c (build_vbase_pointer): Remove.
7581         (build_vbase_path): Remove.
7582         (build_base_path): New function.
7583         * cp-tree.h (base_access, base_kind): New enumerations.
7584         (build_base_path): Declare.
7585         (convert_pointer_to_real): Remove.
7586         (convert_pointer_to): Remove.
7587         (lookup_base): Declare.
7588         (convert_pointer_to_vbase): Remove.
7589         * call.c (build_scoped_method_call): Use lookup_base &
7590         build_base_path instead of convert_pointer_to_real,
7591         get_base_distance & get_binfo.
7592         (build_over_call): Likewise.
7593         * cvt.c (cp_convert_to_pointer): Likewise.
7594         (convert_to_pointer_force): Likewise.
7595         (build_up_reference): Likewise.
7596         (convert_pointer_to_real): Remove.
7597         (convert_pointer_to): Remove.
7598         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
7599         instead of convert_pointer_to_vbase & build_vbase_path.
7600         (emit_base_init): Use build_base_path instead of
7601         convert_pointer_to_real.
7602         (expand_virtual_init): Lose unrequired conversions.
7603         (resolve_offset_ref): Use lookup_base and build_base_path
7604         instead of convert_pointer_to.
7605         * rtti.c (build_dynamic_cast_1): Use lookup_base &
7606         build_base_path instead of get_base_distance & build_vbase_path.
7607         * search.c (get_vbase_1): Remove.
7608         (get_vbase): Remove.
7609         (convert_pointer_to_vbase): Remove.
7610         (lookup_base_r): New function.
7611         (lookup_base): New function.
7612         * typeck.c (require_complete_type): Use lookup_base &
7613         build_base_path instead of convert_pointer_to.
7614         (build_component_ref): Likewise.
7615         (build_x_function_call): Likewise.
7616         (get_member_function_from_ptrfunc): Likewise.
7617         (build_component_addr): Likewise.
7618         * typeck2.c (build_scoped_ref): Likewise.
7619
7620 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7621
7622         * cp-tree.h (CP_TYPE_QUALS): Removed.
7623         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
7624         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
7625         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
7626         * dump.c (cp_dump_tree): Use void* dump_info argument to match
7627         lang-hooks prototype.
7628         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
7629         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
7630         CP_TYPE_QUALS changed to cp_type_quals.
7631         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
7632         (CXX_C_OBJS): Remove c-dump.o.
7633
7634 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
7635
7636         PR c++/3637
7637         * pt.c (lookup_template_class): Ensure that all specializations
7638         are registered on the list corresponding to the most general
7639         template.
7640
7641 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
7642
7643         * call.c (non_reference): Add documentation.
7644         (convert_class_to_reference): Do not strip reference types
7645         from conversion operators.
7646         (maybe_handle_ref_bind): Simplify.
7647         (compare_ics): Correct handling of references.
7648
7649 2001-11-19  John Wilkinson <johnw@research.att.com>
7650
7651         * dump.c (dump_op): New function.
7652         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
7653         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
7654         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
7655
7656 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
7657
7658         PR4629
7659         * semantics.c (finish_sizeof): Make sure that expression created
7660         while processing a template do not have a type.
7661         (finish_alignof): Likewise.
7662         * typeck.c (c_sizeof): Likewise.
7663         (expr_sizeof): Likewise.
7664
7665 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
7666
7667         * lex.c (cxx_finish): Call c_common_finish.
7668         (finish_parse): Remove.
7669
7670 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7671
7672         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
7673         when displaying error message about missing array bounds.
7674
7675 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7676
7677         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
7678         CONST_CAST_EXPR.
7679         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
7680
7681 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
7682
7683         * cp-tree.h (print_class_statistics): Restore.
7684
7685 2001-11-15  Jason Merrill  <jason@redhat.com>
7686
7687         * method.c (use_thunk): Don't emit debugging information for thunks.
7688
7689         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
7690         * decl.c (make_typename_type): Handle getting a class template.
7691         * search.c (lookup_field_r): A class template is good enough for
7692         want_type.
7693
7694         * call.c (convert_like_real): Only use cp_convert for the bad part.
7695         (standard_conversion): Also allow bad int->enum.
7696         * typeck.c (ptr_reasonably_similar): Also allow functions to
7697         interconvert.  Pointers to same-size integers are reasonably
7698         similar.
7699
7700         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
7701         give it void type.
7702
7703 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
7704
7705         PR g++/3154
7706         * init.c (sort_base_init): Remove unreachable code.
7707         (expand_member_init): Adjust comment to reflect reality. Simplify
7708         and remove unreachable code.
7709
7710 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
7711
7712         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
7713         (cxx_init): Update prototype.
7714         * decl.c (init_decl_processing): Rename.  Move null node init
7715         to its creation time.
7716         * lex.c (cxx_init_options): Update.
7717         (cxx_init): Combine with old init_parse; also call
7718         cxx_init_decl_processing.
7719
7720 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
7721
7722         * decl.c (check_initializer): Try to complete the type of an
7723         array element before checking whether it's complete.  Don't
7724         complain about arrays with complete element types but an
7725         unknown size.
7726         (cp_finish_decl): Build the hierarchical constructor before
7727         calling maybe_deduce_size_from_array_init.
7728
7729 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
7730
7731         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
7732
7733 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
7734
7735         PR g++/4206
7736         * parse.y (already_scoped_stmt): Remove.
7737         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
7738
7739 2001-11-12  H.J. Lu <hjl@gnu.org>
7740
7741         * cvt.c (ocp_convert): Don't warn the address of a weak
7742         function is always `true'.
7743
7744 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
7745
7746         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
7747         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
7748         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
7749         * cp-tree.h (print_class_statistics): Remove.
7750         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
7751         cxx_print_identifier, cxx_set_yydebug): New.
7752         * lex.c (set_yydebug): Rename c_set_yydebug.
7753         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
7754         lang_print_xnode): Rename.
7755         * tree.c (print_lang_statistics): Rename.
7756
7757 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7758
7759         * class.c (dump_array): Fix format specifier warning.
7760
7761 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
7762
7763         * cp-lang.c (LANG_HOOKS_NAME): Override.
7764         (struct lang_hooks): Constify.
7765         * lex.c (cxx_init_options): Update.
7766         (lang_identify): Remove.
7767         * parse.y (language_string): Remove.
7768
7769 2001-11-08  Andreas Franck  <afranck@gmx.de>
7770
7771         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
7772         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
7773         suggested by autoconf.
7774         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
7775         (c++.install-common): Use the transformed target alias names.
7776
7777 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7778
7779         * Make-lang.in: Update.
7780         * cp-lang.c: Include langhooks-def.h.
7781
7782 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7783
7784         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
7785
7786 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7787
7788         * lex.c (copy_lang_type): Add static prototype.
7789
7790 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7791
7792         * pt.c (unify): Handle SCOPE_REF.
7793
7794 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
7795
7796         * tree.c (cp_copy_res_decl_for_inlining): Adjust
7797         DECL_ABSTRACT_ORIGIN for the return variable.
7798
7799 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
7800
7801         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
7802
7803 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
7804
7805         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
7806         semantics.c, spew.c: Fix spelling errors.
7807
7808 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7809
7810         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
7811
7812 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
7813
7814         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
7815         pop_everything.
7816
7817 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7818
7819         * cp-lang.c (cxx_get_alias_set): New function.
7820         Point LANG_HOOKS_GET_ALIAS_SET to it.
7821
7822 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7823
7824         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
7825         * cp-tree.h (make_unbound_class_template): Prototype new function.
7826         * decl.c (make_unbound_class_template): New function.
7827         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
7828         * error.c (dump_type): Likewise.
7829         * mangle.c (write_type): Likewise.
7830         * parse.y (template_parm): Likewise.
7831         (template_argument): Use make_unbound_class_template.
7832         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
7833         (tsubst): Likewise.
7834         (tsubst_copy): Likewise.
7835         (unify): Likewise.
7836         * tree.c (walk_tree): Likewise.
7837         * typeck.c (comptypes): Likewise.
7838
7839 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7840
7841         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
7842         extra calls into fewer ones.
7843
7844 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
7845
7846         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
7847         Warn when merging inline with attribute noinline.
7848         (start_decl, start_function): Warn if inline and attribute
7849         noinline appear in the same declaration.
7850
7851 2001-10-16  H.J. Lu <hjl@gnu.org>
7852
7853         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
7854         for tree checking disabled.
7855
7856 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
7857
7858         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
7859         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
7860
7861 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
7862
7863         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
7864         (unify): Only handle MINUS_EXPR specially if the above flag is set
7865         and the subtracted constant is 1.  Clear the flag on recursive calls.
7866         Set it when unifying the maximum value in an INTEGER_TYPE's range.
7867
7868 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
7869
7870         * decl.c (bad_specifiers): Don't allow exception specifications
7871         on any typedefs.
7872
7873 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
7874
7875         * cp/lex.c (init_cp_pragma): Similarly.
7876
7877 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7878
7879         * pt.c (lookup_template_class): Build complete template arguments
7880         for BOUND_TEMPLATE_TEMPLATE_PARM.
7881
7882 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7883
7884         * cp-tree.h (TYPE_BINFO): Update comment.
7885         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
7886         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
7887         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
7888         (copy_type): Prototype new function.
7889         * lex.c (copy_lang_decl): Gather tree node statistics.
7890         (copy_lang_type): New function.
7891         (copy_type): Likewise.
7892         (cp_make_lang_type): Create lang_type for
7893         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
7894         and BOUND_TEMPLATE_TEMPLATE_PARM.
7895         * pt.c (tsubst): Use copy_type instead of copy_node.
7896         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
7897
7898 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7899
7900         * pt.c (determine_specialization): Ignore functions without
7901         DECL_TEMPLATE_INFO.
7902
7903 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
7904
7905         PR g++/4476
7906         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
7907
7908 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
7909
7910         * typeck2.c (store_init_value): Don't re-digest a bracketed
7911         initializer.
7912
7913         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
7914         ANON_AGGR_TYPE_P.
7915
7916 2001-10-11  Richard Henderson  <rth@redhat.com>
7917
7918         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
7919         of an asm statement.
7920         (build_vtbl_ref_1): Split out from build_vtbl_ref.
7921         (build_vfn_ref): Use it to handle vtable descriptors before
7922         calling build_vtable_entry_ref.
7923         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
7924
7925 2001-10-10  Richard Henderson  <rth@redhat.com>
7926
7927         * parse.y (asm_operand): Allow named operands.
7928         * semantics.c (finish_asm_stmt): Tweek for changed location
7929         of the operand constraint.
7930
7931 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
7932
7933         * call.c (standard_conversion): Add bad conversion between
7934         integers and pointers.
7935         (convert_like_real): Don't use convert_for_initialization for bad
7936         conversions; complain here and use cp_convert.
7937         (build_over_call): Don't handle bad conversions specially.
7938         (perform_implicit_conversion): Allow bad conversions.
7939         (can_convert_arg_bad): New fn.
7940         * cp-tree.h: Declare it.
7941         * typeck.c (convert_for_assignment): Use it.
7942         (ptr_reasonably_similar): Any target type is similar to void.
7943
7944 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
7945
7946         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
7947         (cp/cp-lang.o): New rule.
7948         * cp-tree.h: Declare hooks.
7949         * tree.c: Make hooks non-static.
7950         (init_tree): Don't initialize hooks here.
7951         * lex.c: Likewise.  Move definition of lang_hooks to...
7952         * cp-lang.c: ... new file.
7953
7954 2001-10-08  Richard Henderson  <rth@redhat.com>
7955
7956         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
7957         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
7958
7959 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7960
7961         * class.c (build_vtable_entry_ref): Const-ify.
7962         * decl.c (predefined_identifier,
7963         initialize_predefined_identifiers): Likewise.
7964         * init.c (build_new_1): Likewise.
7965         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
7966         Likewise.
7967
7968 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
7969
7970         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
7971         (INSNS_PER_STMT): Likewise.
7972         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
7973         (copy_body, initialize_inlined_parameters): Likewise.
7974         (declare_return_variable, inlinable_function_p): Likewise.
7975         (expand_call_inline, expand_calls_inline): Likewise.
7976         (optimize_inline_calls, clone_body): Likewise.
7977         * tree.c (walk_tree): Moved to ../tree-inline.c.
7978         (walk_tree_without_duplicates): Likewise.
7979         (copy_tree_r, remap_save_expr): Likewise.
7980
7981 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
7982
7983         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
7984         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
7985         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
7986         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
7987         (flag_inline_trees): Moved declaration to ../tree-inline.h.
7988         (walk_tree): Moved declaration to ../tree-inline.h.
7989         (walk_tree_without_duplicates, copy_tree_r): Likewise.
7990         (remap_save_expr): Likewise.
7991         * decl.c: Include tree-inline.h.
7992         (lang_mark_tree): Don't mark inlined_fns.
7993         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
7994         * optimize.c: Include tree-inline.h.
7995         (optimize_inline_calls): Move declaration to ../tree.h, as
7996         non-static.
7997         (remap_decl): Use language-independent constructs and hooks.
7998         (remap_block, copy_body_r, declare_return_variable): Likewise.
7999         (inlinable_function_p): Likewise.  Don't test for
8000         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
8001         no longer language-specific.
8002         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
8003         call of dump_function to...
8004         (optimize_function): Here...
8005         (clone_body): New function, extracted from...
8006         (maybe_clone_body): ... here.  Build decl_map locally and pass
8007         it on to clone_body.
8008         * pt.c, semantics.c: Include tree-inline.h.
8009         * tree.c: Likewise.
8010         (cp_walk_subtrees): New language-specific hook for tree inlining.
8011         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
8012         cp_is_overload_p, cp_auto_var_in_fn_p,
8013         cp_copy_res_decl_for_inlining): Likewise.
8014         (walk_tree): Move language-specific constructs into...
8015         (cp_walk_subtrees): this new function.
8016         (copy_tree_r): Use language-independent constructs and hooks.
8017         (init_tree): Initialize tree inlining hooks.
8018         (remap_save_expr): Adjust prototype so that the declaration
8019         does not require the definition of splay_tree.
8020
8021 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8022
8023         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
8024         to build the declaration instead of the declaration itself.
8025
8026 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
8027
8028         * decl2.c (cxx_decode_option): Add 'else'.
8029
8030         * spew.c (end_input): No longer static.
8031         * cp-tree.h: Declare it.
8032         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
8033
8034 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
8035
8036         * call.c (build_over_call), typeck.c (build_function_call_real):
8037         Pass type attributes to check_function_format rather than name or
8038         assembler name.  Don't require there to be a name or assembler
8039         name to check formats.
8040
8041 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
8042
8043         * decl.c (init_decl_processing): Don't call
8044         init_function_format_info.  Initialize lang_attribute_table
8045         earlier.
8046         (builtin_function): Call decl_attributes.
8047         (insert_default_attributes): New.
8048
8049 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
8050
8051         * decl.c (grokdeclarator): Copy array typedef handling from C
8052         frontend.
8053
8054         * decl.c (grokdeclarator): Copy too-large array handling from C
8055         frontend.
8056
8057 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
8058
8059         * config-lang.in (target_libs): Added target-gperf, so that we
8060         don't try to build it if C++ is disabled.
8061
8062 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
8063
8064         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
8065         (cp/errfn.o): Delete rule.
8066         (cp/error.o): Depend on flags.h.
8067         * errfn.c: Delete file.
8068         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
8069         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
8070         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
8071         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
8072         internal_error respectively.  Make cp_deprecated into a macro.
8073         Don't define cp_printer typedef or declare cp_printers.
8074         * error.c: Include flags.h.
8075         Delete: struct tree_formatting_info, print_function_argument_list,
8076         print_declaration, print_expression, print_function_declaration,
8077         print_function_parameter, print_type_id, print_cv_qualifier_seq,
8078         print_type_specifier_seq, print_simple_type_specifier,
8079         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
8080         print_parameter_declaration_clause, print_exception_specification,
8081         print_nested_name_specifier, and definition of cp_printers.
8082         (locate_error): New function.
8083         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
8084         rewritten in terms of locate_error and diagnostic.c.
8085         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
8086         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
8087         (init_error): Adjust to match.
8088
8089 2001-09-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8090
8091         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
8092
8093 2001-09-21  Richard Henderson  <rth@redhat.com>
8094
8095         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
8096         (build_vtbl_initializer): Likewise.
8097         (build_vfn_ref): New.
8098         * cp-tree.h: Declare it.
8099         * call.c (build_over_call): Use it.
8100         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
8101         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
8102
8103 2001-09-21  J"orn Rennecke <amylaar@redhat.com>
8104
8105         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
8106
8107 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
8108
8109         Table-driven attributes.
8110         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
8111         * decl2.c (cplus_decl_attributes): Only take one attributes
8112         parameter.
8113         * cp-tree.c (cplus_decl_attributes): Update prototype.
8114         * class.c (finish_struct), decl.c (start_decl, start_function),
8115         decl2.c (grokfield), friend.c (do_friend), parse.y
8116         (parse_bitfield): Update calls to cplus_decl_attributes.
8117         * decl.c (grokdeclarator): Take a pointer to a single ordinary
8118         attribute list.
8119         * decl.h (grokdeclarator): Update prototype.
8120         * decl2.c (grokfield): Take a single ordinary attribute list.
8121         * friend.c (do_friend): Likewise.
8122         * decl.c (shadow_tag, groktypename, start_decl,
8123         start_handler_parms, grokdeclarator, grokparms, start_function,
8124         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
8125         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
8126         (process_template_parm, do_decl_instantiation): Pass single
8127         ordinary attribute lists around.
8128         * decl.c (grokdeclarator): Correct handling of nested attributes.
8129         Revert the patch
8130         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
8131                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
8132                 not the left.
8133         .
8134         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
8135         (cp_attribute_table): Declare.
8136         * decl.c (valid_lang_attribute): Don't define.
8137         (lang_attribute_table): Define.
8138         (init_decl_processing): Initialize lang_attribute_table instead of
8139         valid_lang_attribute.
8140         * tree.c (cp_valid_lang_attribute): Remove.
8141         (handle_java_interface_attribute, handle_com_interface_attribute,
8142         handle_init_priority_attribute): New functions.
8143         (cp_attribute_table): New array.
8144         * decl2.c (import_export_class): Don't use
8145         targetm.valid_type_attribute.
8146
8147 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8148
8149         * Make-lang.in (cp/error.o): Depend on real.h
8150         * error.c: #include "real.h"
8151
8152 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8153
8154         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
8155         xmalloc/strcpy/strcat.
8156
8157 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8158
8159         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
8160         Const-ification.
8161         * pt.c (tsubst_decl): Likewise.
8162
8163 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8164
8165         * decl2.c (lang_f_options): Const-ification.
8166         * lex.c (cplus_tree_code_name): Likewise.
8167         * spew.c (yyerror): Likewise.
8168
8169 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
8170
8171         PR c++/3986
8172         * class.c (force_canonical_binfo_r): Check & move an indirect
8173         primary base first.
8174         (force_canonical_binfo): Check that it's not already
8175         canonical.
8176         (mark_primary_virtual_base): Remove BINFO parameter.
8177         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
8178
8179 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
8180
8181         Remove TYPE_NONCOPIED_PARTS.
8182         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
8183         CLASSTYPE_PURE_VIRTUALS.
8184         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
8185         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
8186         (layout_class_type): Don't call fixup_inline_methods here ...
8187         (finish_struct_1): ... call it here.
8188
8189 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
8190
8191         * decl.c (duplicate_decls): Remove code deadling with
8192         DECL_SAVED_INSNS.
8193         * decl2.c (finish_file): Likewise.
8194         * pt.c (instantiate_decl): Likewise.
8195         * semantics.c (expand_body): Don't defer local functions if
8196         they wouldn't be deferred for some other reason.  Don't
8197         generate RTL for functions that will not be emitted.
8198         (genrtl_start_function): Remove code deadling with
8199         DECL_SAVED_INSNS.
8200         (genrtl_finish_function): Likewise.
8201
8202 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
8203
8204         PR c++/4203
8205         * call.c (build_over_call): Do not optimize any empty base
8206         construction.
8207
8208 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8209
8210         * error.c (dump_template_decl): Output template parameters
8211         together with their specifiers.
8212         Output `class' prefix for template template parameter.
8213         (dump_decl): Fix formatting.
8214
8215 2001-08-30  Kurt Garloff  <garloff@suse.de>
8216
8217         * optimize.c (inlinable_function_p): Allow only smaller single
8218         functions. Halve inline limit after reaching recursive limit.
8219
8220 2001-08-30  Joern Rennecke <amylaar@redhat.com>
8221             Jason Merrill  <jason_merrill@redhat.com>
8222
8223         * class.c (build_vtable_entry_ref): Subtract in char*, not
8224         ptrdiff_t.
8225
8226 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
8227
8228         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
8229         (build_cplus_array_type): Use cp_build_qualified_type, not
8230         TYPE_MAIN_VARIANT, to get an unqualified version.
8231
8232         * decl2.c (grok_alignof): Lose.
8233         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
8234         * typeck.c (c_alignof): Lose.
8235         * semantics.c (finish_sizeof, finish_alignof): New.
8236         * parse.y: Use them.
8237         * cp-tree.h: Declare them.
8238
8239 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
8240
8241         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
8242         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
8243         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
8244
8245 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
8246
8247         * typeck2.c (add_exception_specifier): Only require complete type if
8248         not in processing template declaration.
8249
8250 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8251
8252         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
8253         GNU_xref_start_scope and GNU_xref_end_scope.
8254
8255         * tree.c (TYPE_HASH): Moved to ../tree.h.
8256
8257 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
8258
8259         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
8260         on COMPOUND_EXPRs.
8261
8262 2001-08-14  Richard Henderson  <rth@redhat.com>
8263
8264         * class.c, cp-tree.h (build_vfn_ref): Remove.
8265         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
8266
8267 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
8268
8269         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
8270         empty class assignment as having side-effects to avoid
8271         spurious warnings.
8272
8273 2001-08-13  Zack Weinberg  <zackw@panix.com>
8274
8275         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
8276         * except.c: Include libfuncs.h.
8277
8278 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8279
8280         * decl.c (grokdeclarator): Clarify diagnostic message.
8281
8282 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8283
8284         * decl2.c (do_nonmember_using_decl): Replace using directive
8285         with using declaration in the error message.
8286
8287 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8288
8289         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
8290         criterion to avoid rebuilding expression tree instead of
8291         processing_template_decl.
8292
8293 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
8294
8295         Support named return value optimization for inlines, too.
8296         * decl.c (finish_function): Nullify returns here.
8297         * semantics.c (genrtl_start_function): Not here.
8298         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
8299         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
8300         Also nullify the CLEANUP_STMT for the nrv.
8301         * cp-tree.h: Declare it.
8302         * optimize.c (declare_return_variable): Replace the nrv with the
8303         return variable.
8304         * typeck.c (check_return_expr): Be more flexible on alignment check.
8305         Ignore cv-quals when checking for a matching type.
8306
8307 2001-08-09  Richard Henderson  <rth@redhat.com>
8308
8309         * decl2.c (finish_objects): Use target hooks instead of
8310         assemble_constructor and assemble_destructor.
8311
8312 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8313
8314         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
8315
8316 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
8317
8318         PR c++/3820
8319         Stop using TYPE_NONCOPIED_PARTS.
8320         * call.c (build_over_call): Be careful when copy constructing
8321         or assigning to an empty class.
8322         * class.c (check_bases_and_members): It has a
8323         COMPLEX_ASSIGN_REF if it has a vptr.
8324         (layout_class_type): Don't add empty class padding to
8325         TYPE_NONCOPIED_PARTS.
8326         (finish_struct_1): Don't add the VFIELD either.
8327         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
8328         initialization.
8329
8330 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
8331
8332         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
8333
8334 2001-08-06  Richard Henderson  <rth@redhat.com>
8335
8336         * decl2.c (finish_objects): Pass a symbol_ref and priority to
8337         assemble_{constructor,destructor}.  Remove priority handling.
8338
8339 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8340
8341         Don't allow template-id in using-declaration.
8342         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
8343         (do_class_using_decl): Likewise.
8344
8345 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8346
8347         * cp/spew.c (read_token): No need to pop buffers.
8348
8349 2001-08-02  Stan Shebs  <shebs@apple.com>
8350
8351         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
8352         (fnaddr_from_vtable_entry): Remove decl.
8353         * method.c (use_thunk): Update comment.
8354
8355 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
8356
8357         * repo.c (get_base_filename): Change return value to const char
8358         pointer.
8359
8360 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
8361
8362         Kill -fhonor-std.
8363         * NEWS: Document.
8364         * cp-tree.h (flag_honor_std): Remove.
8365         (CPTI_FAKE_STD): Remove.
8366         (std_node): Remove comment about it being NULL.
8367         (fake_std_node): Remove.
8368         * decl.c (in_fake_std): Remove.
8369         (walk_namespaces_r): Remove fake_std_node check.
8370         (push_namespace): Remove in_fake_std code.
8371         (pop_namespace): Likewise.
8372         (lookup_name_real): Remove fake_std_node check.
8373         (init_decl_processing): Always create std_node. Always add
8374         std:: things there.
8375         (builtin_function): Always put non '_' fns in std.
8376         * decl2.c (flag_honor_std): Remove.
8377         (lang_f_options): Remove honor-std.
8378         (unsupported_options): Add honor-std.
8379         (set_decl_namespace): Remove fake_std_node check.
8380         (validate_nonmember_using_decl): Likewise.
8381         (do_using_directive): Likewise.
8382         (handle_class_head): Likewise.
8383         * dump.c (cp_dump_tree): Likewise.
8384         * except.c (init_exception_processing): Adjust.
8385         * init.c (build_member_call): Remove fake_std_node check.
8386         (build_offset_ref): Likewise.
8387         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
8388         * rtti.c (init_rtti_processing): Adjust.
8389
8390 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
8391
8392         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
8393         operand while calling cp_tree_equal.
8394
8395 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
8396
8397         The 3.0 ABI no longer has vbase pointer fields.
8398         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
8399         FORMAT_VBASE_NAME): Remove.
8400         * method.c (do_build_copy_constructor): Adjust.
8401         (do_build_assign_ref): Adjust.
8402         * search.c (lookup_field_r): Adjust.
8403         * typeck.c (build_component_ref): Adjust.
8404
8405         The 3.0 ABI always has a vtable pointer at the start of every
8406         polymorphic class.
8407         * rtti.c (build_headof_sub): Remove.
8408         (build_headof): Adjust.
8409         (get_tinfo_decl_dynamic): No need to check flag_rtti
8410         here. Adjust.
8411         (create_real_tinfo_var): Explain why we need a hidden name.
8412
8413 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
8414
8415         PR c++/3631
8416         * class.c (update_vtable_entry_for_fn): The fixed adjustment
8417         of a virtual thunk should be from declaring base.
8418
8419 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
8420
8421         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
8422         the shared virtual base, so preserving inheritance graph order.
8423
8424 2001-07-30  Andreas Jaeger  <aj@suse.de>
8425
8426         * decl2.c: Remove unused var global_temp_name_counter.
8427
8428 2001-07-28  Richard Henderson  <rth@redhat.com>
8429
8430         * method.c (pending_inlines): Remove.
8431
8432 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
8433
8434         * class.c (mark_primary_virtual_base): Don't adjust base
8435         offsets here.
8436         (dfs_unshared_virtual_bases): Adjust them here.
8437         (mark_primary_bases): Explain why we adjust at the end.
8438
8439 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
8440
8441         * class.c (finish_struct_1): When copying the primary base's
8442         VFIELD, make sure we find it is at offset zero.
8443
8444 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8445
8446         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
8447         tsubst_expr for default template arguments.
8448
8449 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
8450
8451         PR c++/3621
8452         * spew.c (yylex): Only copy the token's lineno, if it is
8453         nonzero.
8454
8455 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
8456
8457         PR c++/3624
8458         * call.c (resolve_args): Simplify, call
8459         convert_from_reference.
8460         (build_new_op): Resolve and convert from reference ARG1
8461         earlier. Adjust ARG2 & ARG3 resolve and conversion.
8462
8463 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
8464
8465         * decl.c (last_function_parm_tags): Remove.
8466         (current_function_parm_tags): Remove.
8467         (init_decl_processing): Adjust.
8468         (start_function): Adjust.
8469         (store_parm_decls): Adjust.
8470
8471         PR c++/3152
8472         * decl.c (grokdeclarator): Detect when a function typedef is
8473         declaring a function, and create last_function_parms correctly.
8474
8475 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
8476
8477         * call.c (joust): Only prefer a non-builtin candidate to a builtin
8478         one if they have the same signature.
8479
8480         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
8481         it rather than toplevel_bindings_p.  Give it a mangled name if static.
8482         (convert_to_reference): Adjust.
8483         * decl2.c (get_temp_name): Lose.
8484         * mangle.c (mangle_ref_init_variable): New fn.
8485         (mangle_guard_variable): Strip the ref-init header.
8486         * cp-tree.h: Adjust.
8487         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
8488         initializer.
8489         (grok_reference_init): Always use DECL_INITIAL.
8490
8491 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8492
8493         PR c++/3416
8494         * call.c (build_conditional_expr): Recheck args after
8495         conversions.
8496         * cp-tree.h (build_conditional_expr): Move to correct file.
8497         * typeck.c (decay_conversion): Diagnose any unknown types
8498         reaching here.
8499         (build_binary_op): Don't do initial decay or default
8500         conversions on overloaded functions.
8501         (build_static_cast): Don't do a decay conversion here.
8502
8503 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8504
8505         PR c++/3543
8506         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
8507         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
8508
8509 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8510
8511         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
8512         (create_vtbl_ptr): ... here.
8513
8514 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8515
8516         * class.c (build_vbase_offset_vbtl_entries): Look for
8517         non-primary base of which we are a sub vtable.
8518
8519 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
8520
8521         * semantics.c (finish_this_expr):  Remove unused code.
8522
8523 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
8524
8525         Simplify rtti, now we've only one ABI.
8526         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
8527         CPTI_TINFO_VAR_ID.
8528         (tinfo_decl_id, tinfo_var_id): Remove.
8529         (get_typeid_1): Remove.
8530         * rtti.c
8531         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
8532         (typeid_ok_p): New function.
8533         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
8534         (get_tinfo_decl): Remove old abi documentation.
8535         (tinfo_from_decl): Remove.
8536         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
8537         (get_typeid_1): Remove.
8538         (get_base_offset): Remove.
8539         (synthesize_tinfo_var): Absorb get_base_offset.
8540         (create_real_tinfo_var): Don't use tinfo_decl_id.
8541
8542 2001-07-23  Graham Stott  <grahams@redhat.com>
8543
8544         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
8545         variable has_two_argument_delete_p.
8546
8547 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
8548
8549         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
8550         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
8551         (CPTI_INDEX_IDENTIFIER): Remove.
8552         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
8553         (delta2_identifier): Remove.
8554         (index_identifier): Remove.
8555         (pfn_or_delta2_identifier): Remove.
8556         (flag_vtable_thunks): Remove.
8557         (VTABLE_DELTA2_NAME): Remove.
8558         (VTABLE_INDEX_NAME): Remove.
8559         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
8560         (vfunc_ptr_type_node): Adjust.
8561         (VTABLE_NAME_PREFIX): Adjust.
8562         (build_vfn_ref): Lose first parameter.
8563         (fixup_all_virtual_upcast_offsets): Remove.
8564         * decl.c (initialize_predefined_identifiers): Remove
8565         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
8566         (init_decl_processing): Remove no-vtable-thunk code.
8567         * decl2.c (flag_vtable_thunks): Remove.
8568         (mark_vtable_entries): Remove no-vtable-thunk code.
8569         * error.c (dump_decl): Remove no-vtable-thunk code.
8570         (dump_expr): Adjust ptr to member function code.
8571         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
8572         code.
8573         * rtti.c (build_headof): Remove no-vtable-thunk code.
8574         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
8575         * search.c (get_base_distance): Remove expand_upcast_fixups case.
8576         (virtual_context) Remove.
8577         (expand_upcast_fixups): Remove.
8578         (fixup_virtual_upcast_offsets): Remove.
8579         (fixup_all_virtual_upcast_offsets): Remove.
8580         * typeck.c (get_member_function_from_ptrfunc): Remove
8581         no-vtable-thunk code.
8582         * call.c (build_over_call): Adjust call to build_vfn_ref.
8583         * class.c (build_vfn_ref): Lose first parameter. Remove
8584         no-vtable-thunk code.
8585         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
8586         (build_vtable_entry): Remove no-vtable-thunk code.
8587
8588 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
8589
8590         Remove old-abi remnants. Remove comments about old abi
8591         behavior. Remove references to 'new-abi' in comments.
8592         * cp-tree.h: Adjust comments.
8593         (vbase_offsets_in_vtable_p): Delete.
8594         (vcall_offsets_in_vtable_p): Delete.
8595         (vptrs_present_everywhere_p): Delete.
8596         (all_overridden_vfuns_in_vtables_p): Delete.
8597         (merge_primary_and_secondary_vtables_p): Delete.
8598         (TYPE_CONTAINS_VPTR_P): Adjust.
8599         (VTT_NAME_PREFIX): Remove.
8600         (CTOR_VTBL_NAME_PREFIX): Remove.
8601         (init_vbase_pointers): Remove.
8602         * class.c: Adjust coments.
8603         (build_vbase_pointer_fields): Delete.
8604         (build_vbase_pointer): Remove old-abi code.
8605         (build_secondary_vtable): Likewise.
8606         (modify_all_vtables): Likewise.
8607         (create_vtable_ptr): Likewise.
8608         (layout_class_type): Likewise.
8609         (finish_struct_1): Likewise.
8610         (finish_vtbls): Likewise.
8611         (dfs_finish_vtbls): Delete.
8612         (build_vbase_offset_vtbl_entries): Remove old-abi code.
8613         * cvt.c: Adjust comments.
8614         * decl.c: Adjust comments.
8615         * decl2.c: Adjust comments.
8616         * init.c: Adjust comments.
8617         (construct_virtual_bases): Remove old-abi code.
8618         * lang-specs.h: Remove -fno-new-abi.
8619         * mangle.c: Adjust comments.
8620         * rtti.c: Adjust comments.
8621         (get_base_offset): Remove old-abi-code.
8622         * search.c: Adjust comments.
8623         (dfs_init_vbase_pointers): Remove.
8624         (dfs_vtable_path_unmark): Remove.
8625         (init_vbase_pointers): Remove.
8626         * semantics.c: Adjust comments.
8627         (emit_associated_thunks): Remove old-abi code.
8628         * typeck.c: Adjust comments.
8629
8630 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
8631
8632         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
8633         params.h.
8634
8635 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
8636
8637         * class.c (finish_struct_anon): Forbid nested classes.
8638
8639 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
8640
8641         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
8642         * optimize.c: Include debug.h.
8643         (maybe_clone_body): Use debug hook.
8644         * semantics.c: Include debug.h.
8645         (expand_body): Use debug hook.
8646
8647 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
8648
8649         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
8650
8651 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
8652
8653         * class.c (type_requires_array_cookie): New function.
8654         (check_methods): Don't try to figure out whether the type needs a
8655         cookie here.
8656         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
8657         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
8658         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
8659         * pt.c (instantiate_class_template): Don't set
8660         TYPE_VEC_DELETE_TAKES_SIZE.
8661         * NEWS: Document ABI changes from GCC 3.0.
8662
8663 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
8664             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
8665
8666         * NEWS (Changes in GCC 3.0): Fix typo.
8667
8668 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8669
8670         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
8671         which attributes are to be attached, and a flags argument.  Update
8672         call to decl_attributes.
8673         (grokfield): Update call to decl_attributes.
8674         * class.c (finish_struct): Update call to cplus_decl_attributes.
8675         * cp-tree.h (cplus_decl_attributes): Update prototype.
8676         * decl.c (start_decl, grokdeclarator, start_function): Update
8677         calls to decl_attributes and cplus_decl_attributes.
8678         * friend.c (do_friend): Update call to cplus_decl_attributes.
8679         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
8680
8681 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
8682
8683         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
8684         for `register' variables with an asm-specification.
8685
8686 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
8687
8688         * semantics.c (finish_asm_stmt): Mark the output operands
8689         to an asm addressable, if necessary.
8690
8691 2001-07-11  Ben Elliston  <bje@redhat.com>
8692
8693         * Revert this change -- there is a subtle bug.
8694
8695         PR c++/80
8696         * decl.c (finish_enum): New "attributes" argument; pass it to
8697         cplus_decl_attributes.  Use a narrower type if the enum is packed.
8698         * cp-tree.h (finish_enum): Adjust prototype.
8699         * parse.y (enum_head): New non-terminal.
8700         (structsp): Use it. Enums now may be preceded or followed by
8701         optional attributes -- pass their chained tree to finish_enum().
8702         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
8703
8704 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
8705
8706         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
8707         variables.
8708
8709 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
8710
8711         * semantics.c (cp_expand_stmt): Fix for null
8712         current_function_return_value.
8713
8714 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
8715
8716         * call.c (build_op_delete_call): Initialize fn.
8717         (convert_like_real): Delete conditional.
8718         (joust): Initialize *w and *l.
8719         * class.c: Add prototype for binfo_ctor_vtable.
8720         (get_primary_binfo): Initialize result.
8721         * init.c (build_java_class_ref): Initialize name.
8722
8723 2001-07-09  Erik Rozendaal  <dlr@acm.org>
8724
8725         * typeck.c (unary_complex_lvalue): Do not duplicate the
8726         argument to modify, pre-, or post-increment when used as an
8727         lvalue and when the argument has side-effects.
8728
8729 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
8730
8731         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
8732         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
8733         cplus_decl_attributes even if attrs is NULL.
8734         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
8735
8736 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
8737
8738         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
8739         calls to decl_attributes.
8740
8741 2001-07-06  Ira Ruben   <ira@apple.com>
8742
8743         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
8744         be DECL_TEMPLATE_RESULT.
8745
8746 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8747
8748         * cp-tree.h (copy_template_template_parm): Rename to ...
8749         (bind_template_template_parm): ... here.
8750         * tree.c (copy_template_template_parm): Rename to ...
8751         (bind_template_template_parm): ... here.  Remove the case when
8752         NEWARGS is NULL_TREE.
8753         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
8754         BOUND_TEMPLATE_TEMPLATE_PARM.
8755         * pt.c (lookup_template_class): Adjust.
8756
8757 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
8758
8759         * cvt.c (convert_lvalue): New fn.
8760         * cp-tree.h: Declare it.
8761         * method.c (do_build_assign_ref): Use it.
8762         (do_build_copy_constructor): Convert parm to base types
8763         before calling base constructors.
8764
8765         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
8766         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
8767         optimize.
8768         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
8769
8770 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
8771
8772         * optimize.c (optimize_inline_calls): New function, broken out
8773         of ...
8774         (optimize_function): ... here. Call it. Don't inline if it is
8775         a thunk.
8776         (dump_function): Print name of dump flag causing this dump.
8777         * semantics.c (expand_body): Move thunk inline check to
8778         optimize_function.
8779
8780 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8781
8782         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
8783         (comptypes): Use target.comp_type_attributes.
8784
8785 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
8786
8787         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
8788
8789 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8790
8791         * error.c (lang_print_error_function): Add a `diagnostic_context *'
8792         parameter. Tweak.
8793
8794 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8795
8796         * decl2.c (import_export_class): Update.
8797
8798 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
8799
8800         * error.c (init_error): Adjust settings.
8801
8802 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
8803
8804         * error.c (init_error): Adjust settings.
8805
8806 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
8807
8808         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
8809         return pointers to data members by reference rather than by value.
8810
8811 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
8812
8813         Implement the Named Return Value optimization.
8814         * cp-tree.h (struct cp_language_function): Add x_return_value.
8815         (current_function_return_value): Now a macro.
8816         * decl.c: Don't define it.
8817         (define_label, finish_case_label): Don't clear it.
8818         (init_decl_processing): Don't register it with GC.
8819         * semantics.c (genrtl_finish_function): Don't check it for
8820         no_return_label.  Copy the RTL from the return value to
8821         current_function_return_value and walk, calling...
8822         (nullify_returns_r): ...this new fn.
8823         * typeck.c (check_return_expr): Set current_function_return_value.
8824
8825 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
8826
8827         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
8828         sharing a ctor vtable with.  Merge code for cases 1 and 2.
8829         (binfo_ctor_vtable): New fn.
8830         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
8831
8832 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
8833
8834         * class.c (dfs_find_final_overrider): Fix logic.
8835
8836         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
8837         virtual thunk instead of non-virtual.
8838         (get_matching_virtual): Uncomment.
8839
8840         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
8841         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
8842         PARM, not ARG.
8843
8844 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
8845
8846         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
8847         we've not emerged from the hierarchy of RTTI_BINFO on reaching
8848         a non-virtual base.
8849
8850 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
8851
8852         * NEWS: Update release number.
8853
8854 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
8855
8856         PR c++/3130, c++/3131, c++/3132
8857         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
8858         * class.c (force_canonical_binfo_r): Move
8859         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
8860         virtual bases unless they're primary and what they're primary
8861         too has been moved.
8862         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
8863         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
8864         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
8865         derived binfo.
8866         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
8867         (layout_nonempty_base_or_field): Add most derived type
8868         parameter. Adjust.
8869         (layout_empty_base): Likewise.
8870         (build_base_field): Likewise.
8871         (build_base_fields): Likewise.
8872         (propagate_binfo_offsets): Add most derived type
8873         parameter. Skip non canonical virtual bases too.
8874         (dfs_set_offset_for_unshared_vbases): Don't skip primary
8875         bases. Do skip canonical bases.
8876         (layout_virtual_bases): Adjust.
8877         (layout_class_type): Adjust.
8878         (dfs_get_primary_binfo): Build list of virtual primary base
8879         candidates.
8880         (get_primary_binfo): Check that the shared virtual primary
8881         base candidate was found first.
8882         (accumulate_vtbl_inits): Don't do anything for non-vptr
8883         containing binfos. For case 1 primary virtual bases, keep
8884         checking that we've not emerged from the hierarchy of RTTI_BINFO.
8885
8886 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
8887
8888         PR c++/3089
8889         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
8890         hierarchy looking for primary bases for a ctor
8891         vtable. Recursively call oneself, if we meet our primary via
8892         this route and haven't met it yet via inheritance graph order.
8893
8894 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
8895
8896         * lang-options.h: Emit documentation for -fno-honor-std, not
8897         -fhonor-std.
8898
8899 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
8900
8901         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
8902         Don't clobber delta.
8903         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
8904
8905 2001-06-10  Mark Mitchell <mark@codesourcery.com>
8906             Gabriel Dos Reis  <gdr@codesourcery.com>
8907
8908         * Make-lang.in (cp/call.o): Depend on diagnostic.h
8909         (cp/typeck.o): Depend on diagnostic.h
8910         (cp/typeck2.o): Depend on diagnostic.h
8911         (cp/repo.o): Depend on dignostic.h
8912         * typeck.c: #include diagnostic.h
8913         (convert_for_initialization): Remove extern declaration for
8914         warningcount and errorcount.
8915
8916         * call.c: #include diagnostic.h
8917         (convert_like_real): Remove extern declaration for warnincount and
8918         errorcount.
8919
8920         * repo.c: #include diagnostic.h
8921         * typeck2.c: #include diagnostic.h
8922
8923 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8924
8925         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
8926         in previous change.
8927
8928 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8929
8930         PR c++/2929
8931         * friend.c (do_friend): Use push_decl_namespace for classes at
8932         namespace scope.
8933
8934 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8935             Jason Merrill <jason_merrill@redhat.com>
8936
8937         PR c++/3061
8938         * class.c (build_secondary_vtable): Use assert, rather than an error
8939         message.
8940         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
8941         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
8942         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
8943         Don't set BINFO_VTABLE for a primary virtual base.
8944
8945 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
8946
8947         * decl.c (duplicate_decls): Update source position information
8948         when a template function is defined.
8949
8950 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
8951
8952         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
8953
8954 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
8955
8956         PR c++/2914
8957         * decl.c (pushtag): Don't push into a complete type's scope.
8958
8959 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
8960
8961         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
8962         (struct lang_decl_flags): Lose generate_with_vtable_p.
8963         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
8964         * class.c (copy_virtuals): Adjust.
8965         * decl2.c (mark_vtable_entries): Adjust.
8966         * method.c (make_thunk, build_vtable_entry): Adjust.
8967         * class.c (update_vtable_entry_for_fn): Only look as far as the
8968         first defining class.
8969         (build_vtbl_initializer): Put nothing in the slot for a function only
8970         defined in a lost primary virtual base.
8971         (add_vcall_offset_vtbl_entries_1): Use the same code for
8972         the lost primary case and the normal case.
8973         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
8974         (get_vfield_offset, get_derived_offset): Lose.
8975         (dfs_find_final_overrider): Use look_for_overrides_here.
8976         (get_matching_virtual): New fn.
8977         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
8978         not BV_VCALL_INDEX.
8979         * search.c (look_for_overrides_here): Split out from...
8980         (look_for_overrides_r): Here.
8981
8982         * class.c (find_final_overrider): Return error_mark_node on error.
8983
8984         * decl2.c (key_method): #if 0 accidental change.
8985
8986 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8987
8988         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
8989         (build_over_call): Likewise.
8990         * decl.c (grokparms): Likewise.
8991         * pt.c (tsubst_decl): Likewise.
8992         * typeck.c (convert_arguments): Likewise.
8993
8994 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
8995
8996         * semantics.c (begin_class_definition): Robustify.
8997
8998         * pt.c (instantiate_decl): Tell the repository code about the
8999         clones, not the cloned functions.
9000         * repo.c (repo_template_used): Explicitly instantiate the cloned
9001         function, not the clones.
9002
9003 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
9004
9005         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
9006         ICS_BAD_FLAG on created conversion.
9007         (compare_ics): Break out rank.
9008
9009 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
9010
9011         * decl.c (xref_tag): Remove extraneous %s on dependent name
9012         lookup warning.
9013
9014 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
9015
9016         * class.c (layout_vtable_decl): Fix off by one error on
9017         build_index_type.
9018         (build_vtt): Likewise.
9019         (build_ctor_vtbl_group): Likewise.
9020
9021 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
9022
9023         * class.c (maybe_indent_hierarchy): New function.
9024         (dump_class_hierarchy_r): Add flags. Dump extra binfo
9025         information, if enabled. Use maybe_indent_hierarchy. Adjust
9026         output format.
9027         (dump_class_hierarchy): Adjust prototype. Adjust output format.
9028         (dump_array, dump_vtable, dump_vtt): New functions.
9029         (finish_struct_1): Adjust hierarchy dumping.
9030         (initialize_vtable): Call dump_vtable.
9031         (build_vtt): Call dump_vtt.
9032         (build_ctor_vtbl_group): Call dump_vtable.
9033         * decl2.c (flag_dump_class_layout): Remove.
9034         (cxx_decode_option): Remove dump translation unit
9035         and dump class hierarchy check. Call dump_switch_p.
9036         (finish_file): Adjust dumping.
9037         (dump.c): Only dump base classes if not TDF_SLIM.
9038         Only dump namespace members if not TDF_SLIM.
9039         * optimize.c (dump_function): New function.
9040         (optimize_function): Call dump_function.
9041         * semantics.c (expand_body): Use dump_enabled_p.
9042
9043 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
9044
9045         PR g++/2936
9046         Part missed from first commit
9047         * decl2.c (finish_anon_union): Copy context.
9048
9049 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
9050
9051         PR g++/2936
9052         * optimize.c (remap_decl): Remap anonymous aggregate members too.
9053
9054 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
9055
9056         PR g++/2823
9057         * semantics.c (expand_body): Don't optimize thunks.
9058
9059 2001-05-25  Sam TH  <sam@uchicago.edu>
9060
9061         * cp-tree.h lex.h: Fix header include guards.
9062
9063 2001-05-25  Mark Mitchell <mark@codesourcery.com>
9064
9065         * decl.c (init_decl_processing): Tweak.
9066
9067 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
9068
9069         * decl.c (duplicate_decls): Tidy.
9070         (init_decl_processing): Always set flag_no_builtin.
9071
9072 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
9073
9074         PR c++/2184
9075         * decl2.c (do_local_using_decl): Push the decls, even in a
9076         template.
9077
9078 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
9079
9080         * optimize.c (initialize_inlined_parameters): Don't set
9081         TREE_READONLY for a VAR_DECL taking the place of an inlined
9082         PARM_DECL.
9083
9084 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
9085
9086         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
9087         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
9088         attribute.
9089
9090 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
9091
9092         * parse.y: Refer to compound literals as such, not as
9093         constructor-expressions.
9094
9095 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
9096
9097         * call.c (build_op_delete_call): Ignore exception-specifications
9098         when looking for matching delete operators.
9099         * init.c (build_new_1): Compute whether or not the allocation
9100         function used is a placement allocation function or not, and
9101         communicate this information to build_op_delete_call.
9102
9103 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
9104
9105         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
9106         (build_vtbl_ref): Adjust.
9107         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
9108         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
9109         Re-add vtable-gc.
9110         (unsupported_options): Correspondingly.
9111
9112         * decl2.c (maybe_make_one_only): Check flag_weak, not
9113         supports_one_only().
9114
9115         * cp-tree.def (START_CATCH_STMT): Lose.
9116         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
9117         * tree.c (cp_statement_code_p): Don't case it.
9118         * semantics.c (cp_expand_stmt): Likewise.
9119         * cp-tree.h (START_CATCH_TYPE): Lose.
9120         (HANDLER_TYPE): New.
9121         * except.c (expand_start_catch_block): Don't start any blocks.
9122         Return the type.
9123         (expand_end_catch_block): Don't end any blocks.
9124         * parse.y (handler): Don't pass anything from finish_handler_parms
9125         to finish_handler.
9126         * pt.c (tsubst_expr): Likewise.
9127         * semantics.c (begin_handler): Call note_level_for_catch here.
9128         (finish_handler_parms): Don't return anything.
9129         (genrtl_catch_block, begin_catch_block): Lose.
9130         (genrtl_handler): Call expand_start_catch here.
9131
9132 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
9133
9134         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
9135         (get_vtable_decl, build_vtt): Not here.
9136
9137 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
9138
9139         PR c++/2781
9140         * optimize.c (update_cloned_parm): Copy addressability and other
9141         flags.
9142
9143 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9144
9145         * pt.c (determine_specialization): Ignore artificial functions.
9146
9147 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
9148
9149         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
9150         (C_RID_CODE): Remove.
9151         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
9152         (init_parse): Don't do it here.
9153
9154 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
9155
9156         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
9157         function declaration to avoid stripping the symbol's attributes.
9158
9159 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
9160
9161         * decl.c (pushdecl): Adjust error string.
9162         (xref_tag): Adjust friend class injection warning. Remove the
9163         inherited name from the class shadowed scope.
9164
9165 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
9166
9167         * except.c (cp_protect_cleanup_actions): New function.
9168         (init_exception_processing): Don't set protect_cleanup_actions
9169         here.  Do set lang_protect_cleanup_actions.
9170
9171 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
9172
9173         * spew.c (read_token): Call yyerror on all unexpected tokens.
9174
9175 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
9176
9177         * init.c (member_init_ok_or_else): Take a tree rather than
9178         string for name.
9179         (expand_member_init): Adjust.
9180
9181 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
9182
9183         * decl.c (duplicate_decls): Suppress warning about duplicate
9184         decls if the first decl is a friend.
9185
9186 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
9187
9188         * except.c (choose_personality_routine): Export.  Add
9189         explanatory comment.  Take an enum languages, not a boolean.
9190         (initialize_handler_parm): Adjust to match.
9191         * cp-tree.h: Prototype choose_personality_routine.
9192         * lex.c (handle_pragma_java_exceptions): New function.
9193         (init_cp_pragma): Register #pragma GCC java_exceptions.
9194
9195 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
9196
9197         * method.c (build_mangled_C99_name): Remove unused prototype.
9198
9199 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
9200
9201         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
9202         * typeck.c (get_member_function_from_ptrfunc,
9203         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
9204         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
9205
9206         Reverted Geoff Keating's 2001-05-03's patch.
9207
9208 2001-05-11  Ira Ruben   <ira@apple.com>
9209
9210         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
9211
9212 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
9213
9214         * cp-tree.h (finish_label_expr, lookup_label): Delete.
9215         * parse.y: Update for '&&'; don't issue warning here.
9216         * semantics.c (finish_label_expr): Delete.
9217
9218 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
9219
9220         * splay-tree.h (splay_tree_max): New function.
9221         (splay_tree_min): Likewise.
9222
9223 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
9224
9225         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
9226         (pfn_vflag_identifier): Define.
9227         Update comment about layout of pointer functions.
9228         (build_ptrmemfunc1): Update prototype.
9229         (expand_ptrmemfunc_cst): Update prototype.
9230         * decl.c (initialize_predefined_identifiers): Initialize
9231         pfn_vflag_identifier.
9232         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
9233         an extra field to the type.
9234         * expr.c (cplus_expand_constant): Pass 'flag' between
9235         expand_ptrmemfunc_cst and build_ptrmemfunc1.
9236         * typeck.c (get_member_function_from_ptrfunc): When
9237         FUNCTION_BOUNDARY < 16, look at additional field to determine
9238         if a pointer-to-member is a real pointer or a vtable offset.
9239         (build_ptrmemfunc1): Add new parameter to contain extra field.
9240         (build_ptrmemfunc): Pass the extra field around.
9241         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
9242         (pfn_from_ptrmemfunc): Ignore the extra field.
9243
9244 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
9245
9246         * cp-tree.h (flag_inline_trees): Update documentation.
9247         * decl.c (init_decl_processing): Adjust handling of
9248         flag_inline_functions and flag_inline_trees to support -O3.
9249         (grokfndecl): Set DECL_INLINE on all functions if that's what
9250         the user requested.
9251         (save_function_data): Clear DECL_INLINE in
9252         current_function_cannot_inline is non-NULL.
9253         * decl2.c (flag_inline_trees): Update documentation.
9254
9255 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
9256
9257         * dump.c (cp_dump_tree, USING_STMT case): New case.
9258         * tree.c (cp_statement_code_p): Add USING_STMT.
9259         * decl2.c (do_using_directive): Add the using directive statement.
9260
9261         * tree.c (walk_tree): Reformat an if block.
9262
9263 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
9264
9265         * decl.c (compute_array_index_type): Don't try to do anything with
9266         the indices when processing a template.
9267
9268 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9269
9270         * call.c: NULL_PTR -> NULL.
9271         * class.c: Likewise.
9272         * cvt.c: Likewise.
9273         * decl.c: Likewise.
9274         * decl2.c: Likewise.
9275         * except.c: Likewise.
9276         * init.c: Likewise.
9277         * rtti.c: Likewise.
9278         * search.c: Likewise.
9279         * tree.c: Likewise.
9280         * typeck.c: Likewise.
9281         * typeck2.c: Likewise.
9282
9283 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
9284
9285         * decl2.c (do_using_directive): Revert previous patch.
9286
9287 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
9288
9289         * cp-tree.def (USING_STMT): New statement node.
9290         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
9291         * decl2.c (do_using_directive): Add USING_STMT to statement
9292         tree. Don't emit errors when processing template decl.
9293         * pt.c (tsubst_expr, USING_STMT case): New case.
9294         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
9295
9296 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
9297
9298         * call.c (build_new_op): Convert args from reference here.
9299         (build_conditional_expr): Don't convert here.
9300
9301 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
9302
9303         * spew.c (last_token_id): New static variable.
9304         (read_token): Set it here.
9305         (yyerror): Use it here.
9306
9307 2001-04-30  Richard Henderson  <rth@redhat.com>
9308
9309         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
9310         * decl.c: Likewise.
9311
9312 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
9313
9314         * gxxint.texi: Remove.
9315         * Make-lang.in: Remove all traces of gxxint.texi.
9316
9317 2001-04-30  Mark P Mitchell  <mark@codesourcery.com>
9318
9319         * decl2.c (start_static_initialization_or_destruction): Correct
9320         logic to handle the -fno-use-cxa-atexit case.
9321
9322 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
9323
9324         * optimize.c (update_cloned_parm): New function.
9325         (maybe_clone_body): Use it.  Update the `this' parameter too.
9326
9327 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
9328
9329         * decl2.c (unsupported_options): Add new-abi.
9330         * lang-options.h: Remove no longer supported options.
9331
9332 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
9333
9334         * except.c (can_convert_eh): Don't check template parms,
9335         typename types etc.
9336
9337 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
9338
9339         * optimize.c (maybe_clone_body): Copy parameter names and locations.
9340
9341 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
9342
9343         * cp-tree.h (adjust_clone_args): Prototype new function.
9344         * class.c (adjust_clone_args): New function.
9345         * decl.c (start_function): Call it for in charge ctors.
9346
9347 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
9348
9349         * method.c (use_thunk): Make sure that thunks really are emitted
9350         when requested.
9351
9352 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
9353
9354         * mangle.c (write_chars): New macro.
9355         (hwint_to_ascii): New function
9356         (write_number): Use it.
9357         (write_integer_cst): Deal with really big numbers.
9358
9359 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
9360
9361         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
9362         the clone.
9363
9364 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
9365
9366         * decl.c (grokdeclarator): Set context of namespace scope
9367         TYPE_DECLS.
9368
9369 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
9370
9371         * cp/optimize.c: Include hashtab.h.
9372         (struct inline_data): Add tree_pruner.
9373         (expand_call_inline, expand_calls_inline): Use it when calling
9374         walk_tree.
9375         (optimize_function): Initialize and free tree_pruner.
9376
9377 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
9378
9379         Lazy __FUNCTION__ generation.
9380         * cp-tree.def (FUNCTION_NAME): Remove.
9381         * cp-tree.h (function_name_declared_p): Remove.
9382         (cp_fname_init): Prototype.
9383         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
9384         don't call declare_function_name. Call start_fname_decls.
9385         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
9386         clobber the line number.
9387         (cp_fname_init): New function.
9388         (start_function): Call start_fname_decls.
9389         (finish_function): Call finish_fname_decls.
9390         * lex.c (reswords): Add slots for __FUNCTION__ et al.
9391         (rid_to_yy): Add mappings for __FUNCTION__ et al.
9392         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
9393         * parse.y (VAR_FUNC_NAME): New token.
9394         (primary): Add VAR_FUNC_NAME.
9395         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
9396         generation.
9397         (tsubst, FUNCTION_NAME case): Remove.
9398         (tsubst_copy, FUNCTION_NAME case): Remove.
9399         (tsubst_expr, DECL_STMT case): Be careful with a
9400         DECL_PRETTY_FUNCTION_P.
9401         (instantiate_decl): Remove function_name_declared_p.
9402         * semantics.c (begin_compound_statement): Don't call
9403         declare_function_name here.
9404         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
9405         (finish_translation_unit): Call finish_fname_decls.
9406         (expand_body): Remove function_name_declared_p.
9407         * typeck2.c (digest_init): Allow any ERROR_MARK.
9408
9409 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
9410
9411         * pt.c (tsubst_decl): Use VOID_TYPE_P.
9412         * semantics.c: Fix some typos.
9413
9414 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
9415
9416         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
9417
9418 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9419
9420         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
9421
9422 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
9423
9424         * except.c (build_throw): Wrap the initialization of the exception
9425         object in a MUST_NOT_THROW_EXPR.
9426         (do_free_exception): #if 0.
9427
9428 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
9429
9430         * cp-tree.h (finish_enum): Change prototype.
9431         * decl.c (finish_enum): Reorganize.
9432         * parse.y (structsp): Adjust calls to finish_enum.
9433
9434 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
9435
9436         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
9437         't' case.
9438
9439 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
9440
9441         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
9442         (layout_empty_base): Return at end flag.
9443         (build_base_field): Likewise.
9444         (build_base_fields): Likewise.
9445         (layout_virtual_bases): Don't add 1 to eoc value.
9446         (end_of_class): Use full size for empty bases.
9447         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
9448         empty bases. Don't add 1 to eoc value. Only add trailing padding
9449         if we're an empty class with no empty bases.
9450         (dump_class_hierarchy): Dump size and alignment.
9451
9452 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
9453
9454         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
9455         ICS_BAD_FLAG.
9456
9457 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
9458
9459         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
9460         is found, look first if name does not match the structure name.
9461
9462 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
9463
9464         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
9465         set.
9466         (SET_DECL_LANGUAGE): New macro.
9467         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
9468         (pushdecl): Likewise.
9469         (build_library_fn_1): Likewise.
9470         (build_cp_library_fn): Likewise.
9471         (grokfndecl): Likewise.
9472         (grokvardecl): Mark `extern "C"' variables as having C linkage.
9473         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
9474         * lex.c (retrofit_lang_decl): Likewise.
9475         * mangle.c (mangle_decl_string): Don't mangle the names of
9476         variables declared with C language linkage.
9477         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
9478
9479 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
9480
9481         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
9482         flag_access_control from uninitialized storage.
9483
9484 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
9485
9486         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
9487         * mangle.c (write_pointer_to_member_type): Fix mangling of
9488         pointers to cv-qualified member function types.
9489
9490         * init.c (build_delete): Create a SAVE_EXPR for the address if
9491         we're going to use it more than once.
9492
9493 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
9494
9495         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
9496         (expand_ptremfunc_cst): Change prototype.
9497         (delta2_from_ptrmemfunc): Remove.
9498         * expr.c (cplus_expand_constant): Adjust call to
9499         expand_ptrmemfunc_cst.
9500         * typeck.c (build_ptrmemfunc1): Simplify.
9501         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
9502         results in a constant.
9503         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
9504         (delta2_from_ptrmemfunc): Remove.
9505         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
9506
9507 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
9508
9509         * cp-tree.h (decl_namespace_list): New macro.
9510         (struct saved_scope): Add decl_ns_list.
9511         * decl.c (mark_saved_scope): Mark it.
9512         * decl2.c: Lose static decl_namespace_list.
9513         (init_decl2): Don't save it.
9514
9515 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9516
9517         * cp-tree.h (warn_return_type, yylex): Delete redundant
9518         declarations.
9519
9520         * decl.c (current_class_depth, global_namespace): Likewise.
9521
9522         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
9523
9524         * repo.c (flag_use_repository): Likewise.
9525
9526 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9527
9528         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
9529         set_block, pushdecl, getdecls, gettags, init_decl_processing,
9530         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
9531         lvalue_or_else, print_lang_statistics, comp_target_types,
9532         unsigned_type, signed_type, signed_or_unsigned_type,
9533         build_function_call, mark_addressable, incomplete_type_error):
9534         Delete redundant declarations.
9535
9536 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
9537
9538         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
9539         (TYPE_ANONYMOUS_P): New macro.
9540         (TAGGED_TYPE_P): New macro.
9541         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
9542         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
9543         * tree.c (no_linkage_helper): Likewise.
9544         * semantics.c (begin_class_definition): Likewise.
9545         * pt.c (convert_template_argument): Likewise.
9546         * lex.c (check_for_missing_semicolon): Likewise.
9547
9548 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
9549
9550         * class.c (dfs_unshared_virtual_bases): New function.
9551         (mark_primary_bases): Call it.
9552         (check_bases): Ignore virtual bases when determining
9553         nearly-emptiness.
9554
9555 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
9556
9557         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
9558
9559 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
9560
9561         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
9562         cloned function to the clone.
9563
9564 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9565
9566         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
9567
9568         * semantics.c: Include expr.h.
9569
9570 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
9571
9572         * method.c (implicitly_declare_fn): Commonize code for copy ctor
9573         and assignment op. Set TREE_USED for parameter.
9574
9575 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
9576
9577         * class.c (find_final_overrider_data): Add `candidates'.
9578         (dfs_find_final_overrider): Don't issue error messages
9579         prematurely.
9580         (find_final_overrider): Issue error messages here.
9581         (build_base_field): Don't warn about amgibuous direct bases here.
9582         (warn_about_ambiguous_direct_bases): New function.
9583         (layout_class_type): Use it.
9584
9585 2001-04-10  Richard Henderson  <rth@redhat.com>
9586
9587         * typeck.c (build_array_ref): Push the array reference inside
9588         COMPOUND_EXPR and COND_EXPR.
9589
9590 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
9591
9592         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
9593         * decl.c (duplicate_decls): Adjust accordingly.
9594         (maybe_commonize_var): Likewise.
9595         (grokfndecl): Likewise.
9596         (start_function): Likewise.
9597         (start_method): Likewise.
9598         * decl2.c (key_method): Likewise.
9599         (import_export_decl): Likewise.
9600         * method.c (implicitly_declare_fn): Likewise.
9601         * optimize.c (maybe_clone_body): Likewise.
9602
9603 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
9604
9605         * lang-specs.h: Add __DEPRECATED.
9606
9607 2001-04-05  J"orn Rennecke <amylaar@redhat.com>
9608
9609         * search.c (get_dynamic_cast_base_type): When building a new
9610         constant, set its type to ssizetype.
9611
9612 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
9613
9614         * optimize.c (expand_call_inline): Only add newly inlined statements
9615         into inlined_stmts.
9616
9617 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
9618
9619         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
9620         (OPERATOR_FORMAT): Likewise.
9621         (OPERATOR_TYPENAME_FORMAT): Likewise.
9622         * operators.def: Remove old name-mangling information.
9623         * decl.c (grok_op_properties): Adjust accordingly.
9624         * lex.c (init_operators): Likewise.
9625         * rtti.c (get_tinfo_decl): Issue error messages about types that
9626         have variable size.
9627
9628 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
9629
9630         * decl2.c (import_export_decl): Don't call import_export_class
9631         when processing an inline member function.
9632         * semantics.c (expand_body): Call import_export_decl before
9633         emitting inline functions.
9634
9635 2001-03-28  Richard Henderson  <rth@redhat.com>
9636
9637         IA-64 ABI Exception Handling:
9638         * cp-tree.def (EH_SPEC_BLOCK): New.
9639         (MUST_NOT_THROW_EXPR): New.
9640         * cp-tree.h: Update changed function declarations.
9641         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
9642         (CPTI_CALL_UNEXPECTED): New.
9643         (struct cp_language_function): Rename x_eh_spec_try_block
9644         to x_eh_spec_block.
9645         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
9646         * decl.c (current_binding_level): If no current function
9647         bindings, revert to scope_chain.
9648         (initialize_predefined_identifiers): Remove __cp_push_exception.
9649         (store_parm_decls): Use begin_eh_spec_block.
9650         (finish_function): Use finish_eh_spec_block.
9651         (mark_lang_function): Update for name changes.
9652         * decl2.c (finish_file): No mark_all_runtime_matches.
9653         * dump.c (cp_dump_tree): Handle new tree codes.
9654         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
9655         * except.c (catch_language_init, catch_language): Remove.
9656         (init_exception_processing): Don't set language code.
9657         Initialize call_unexpected_node, protect_cleanup_actions,
9658         eh_personality_libfunc, lang_eh_runtime_type.
9659         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
9660         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
9661         (prepare_eh_type): Split out type canonicalizations ...
9662         (build_eh_type_type): ... from here.
9663         (build_eh_type_type_ref): Remove.
9664         (mark_all_runtime_matches): Remove.
9665         (build_exc_ptr): New.
9666         (do_begin_catch, do_end_catch): New.
9667         (do_pop_exception): Remove.
9668         (build_terminate_handler): Remove.
9669         (choose_personality_routine): Split out language choice from ...
9670         (initialize_handler_parm): ... here.
9671         Use MUST_NOT_THROW_EXPR.
9672         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
9673         exception object handling.
9674         (expand_start_eh_spec, expand_end_eh_spec): Remove.
9675         (expand_exception_blocks, alloc_eh_object): Remove.
9676         (begin_eh_spec_block, finish_eh_spec_block): New.
9677         (do_allocate_exception, do_free_exception): New.
9678         (expand_throw): Merge into ...
9679         (build_throw): ... here.  Update for abi.
9680         * expr.c (cplus_expand_expr): No expand_internal_throw.
9681         Handle MUST_NOT_THROW_EXPR.
9682         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
9683         * semantics.c (*) Update for except.h name changes.
9684         (genrtl_try_block): No protect_with_terminate.
9685         (genrtl_eh_spec_block): New.
9686         (genrtl_handler): Don't emit the goto here.
9687         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
9688         (genrtl_finish_function): Don't expand_exception_blocks.
9689         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
9690
9691 2001-03-28  Richard Henderson  <rth@redhat.com>
9692
9693         * decl.c (struct named_label_list): Rename eh_region to
9694         in_try_scope, add in_catch_scope.
9695         (struct binding_level): Rename eh_region to is_try_scope,
9696         add is_catch_scope.
9697         (note_level_for_try): Rename from note_level_for_eh.
9698         (note_level_for_catch): New.
9699         (poplevel): Copy both is_try_scope and is_catch_scope to
9700         the named_label_list struct.
9701         (check_previous_goto_1): Don't check for catch block via
9702         DECL_ARTIFICIAL; use in_try_scope instead.
9703         (check_goto): Likewise.
9704         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
9705         * except.c (expand_start_catch_block): Call note_level_for_catch.
9706         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
9707
9708 2001-03-27  Richard Henderson  <rth@redhat.com>
9709
9710         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
9711         exceptions_via_longjmp.
9712
9713 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
9714
9715         * pt.c (check_default_tmpl_args):  Make error messages clearer.
9716
9717 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
9718
9719         * error.c:  Also undefine 'A' macro used for cp_printers definition.
9720
9721 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9722
9723         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
9724
9725 2001-03-26  Mike Yang <yang@research.att.com>
9726             Mark Mitchell  <mark@codesourcery.com>
9727
9728         * dump.c (dump_access): New function.
9729         (cp_dump_tree): Use it.  Dump basetype information for class
9730         types.
9731
9732 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
9733
9734         * Makefile.in (optimize.o): Depend on params.h.
9735         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
9736         (init_decl_processing): Set flag_no_inline when doing
9737         inlining-on-trees.
9738         * optimize.c: Include params.h.
9739         (struct inline_data): Improve documentation of FNS.  Add
9740         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
9741         (INSNS_PER_STMT): New macro.
9742         (remap_block): Use CLONING_P.
9743         (inlinable_function_p): Don't inline big functions.
9744         (expand_call_inline): Keep track of how much inlining we've done.
9745         (optimize_function): Set FIRST_INLINED_FN.
9746         (maybe_clone_body): Set CLONING_P.
9747         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
9748         tree nodes.
9749         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
9750         rest_of_compilation.  Clear DECL_RTL for local variables
9751         afterwards.
9752         (clear_decl_rtl): New function.
9753
9754 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
9755
9756         Implement DR 209
9757         * cp-tree.h (skip_type_access_control,
9758         reset_type_access_control): Prototype.
9759         * decl.c (grokdeclarator): Access of friends is not checked.
9760         * parse.y (component_decl_list): Reset type access control.
9761         * semantics.c (decl_type_access_control): Clear
9762         current_type_lookups.
9763         (save_type_access_control): Don't save if not deferring.
9764         (skip_type_access_control, reset_type_access_control): New
9765         functions.
9766         (begin_class_definition): Do type access control for basetypes.
9767         Start deferred access control.
9768         (finish_class_definition): Resume immediate access control if
9769         this is a local class.
9770
9771 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9772
9773         * class.c (add_method): Use memcpy/memmove, not bcopy.
9774
9775         * decl.c (duplicate_decls): Likewise.
9776
9777 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
9778
9779         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
9780         not `_'.
9781
9782 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
9783
9784         * decl.c (local_names): Define.
9785         (push_local_name): New.
9786         (grok_reference_init): Return init if initializing static reference
9787         variable with non-constant instead of emitting it.
9788         Move expand_static_init call to cp_finish_decl.
9789         (layout_var_decl): Call push_local_name.
9790         (maybe_commonize_var): Allow inlining functions even if they have
9791         static local variables, use comdat_linkage for them if flag_weak.
9792         (check_initializer): Call obscure_complex_init if
9793         grok_reference_init returned nonzero.
9794         (save_function_data): Clear x_local_names.
9795         (pop_cp_function_context): Free x_local_names.
9796         (mark_inlined_fns): Remove.
9797         (mark_lang_function): Mark x_local_names.
9798         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
9799         Mark inlined_fns as tree, remove call to mark_inlined_fns.
9800         * class.c (alter_access): Ensure DECL_ACCESS is never set if
9801         DECL_DISCRIMINATOR_P.
9802         * cp-tree.h (cp_language_function): Add x_local_names.
9803         (lang_decl_flags): Add discriminator into u2.
9804         (lang_decl_inlined_fns): Remove.
9805         (lang_decl): inlined_fns is now a TREE_VEC.
9806         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
9807         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
9808         TREE_VEC, not a custom structure.
9809         (optimize_function): Likewise.
9810         * mangle.c (discriminator_for_local_entity): Discriminate among
9811         VAR_DECL local entities.
9812         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
9813         is not valid.
9814
9815 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
9816
9817         Add support for Java interface method calls.
9818         * cp-tree.h (struct lang_type): Add java_interface flag.
9819         (TYPE_JAVA_INTERFACE): New macro.
9820         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
9821         by setting TYPE_JAVA_INTERFACE.
9822         * call.c (java_iface_lookup_fn): New static.
9823         (build_over_call): If calling a method declared in a
9824         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
9825         expression which resolves the function address.
9826         (build_java_interface_fn_ref): New function.
9827
9828 2001-03-22  Richard Henderson  <rth@redhat.com>
9829
9830         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
9831         * except.c: Don't include it.
9832
9833 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
9834             based on an idea from Joe Buck <jbuck@synopsys.com>
9835
9836         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
9837         New nonterminals.
9838         (data_def, component_decl): Add reductions to bad_decl.
9839
9840 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
9841
9842         * method.c (do_build_assign_ref): Don't use build_modify_expr for
9843         anonymous aggregates, since they don't have assignment operator
9844         method.
9845         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
9846         assignment operators for anonymous structure fields.
9847
9848 2001-03-21  Jason Merrill  <jason@redhat.com>
9849
9850         * pt.c (instantiate_decl): Abort if we see a member constant
9851         instantiation that doesn't already have its initializer.
9852         Downgrade explicit instantiation without definition to pedwarn.
9853
9854         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
9855         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
9856         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
9857
9858         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
9859         (pending_vtables): Remove.
9860         * decl2.c (pending_vtables): Remove.
9861         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
9862         CLASSTYPE_VTABLE_NEEDS_WRITING.
9863         (import_export_class): Likewise.
9864         (init_decl2): Don't mark pending_vtables.
9865         * lex.c (handle_pragma_vtable): Just sorry.
9866         * pt.c (instantiate_class_template): Don't mess with
9867         CLASSTYPE_VTABLE_NEEDS_WRITING.
9868         (mark_class_instantiated): Likewise.
9869         * ptree.c (print_lang_type): Don't print it.
9870         * semantics.c (begin_class_definition): Don't set it.
9871
9872         * pt.c (template_tail): Replace with last_pending_template.
9873         (maybe_templates, maybe_template_tail): Remove.
9874         (add_pending_template): Adjust.
9875         (instantiate_pending_templates): Adjust.
9876
9877         * cp-tree.h (struct saved_scope): Remove lang_stack field.
9878         (current_lang_stack): Remove.
9879         * decl.c (maybe_push_to_top_level): Don't initialize it.
9880         (duplicate_decls): Use current_lang_depth.
9881         (xref_basetypes): Likewise.
9882         * class.c (current_lang_depth): New fn.
9883         (push_lang_context): Use more varray functionality.
9884         (pop_lang_context): Likewise.
9885
9886         * error.c (GLOBAL_THING): Always use '__'.
9887
9888 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
9889
9890         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
9891
9892         * mangle.c (mangle_decl_string): Mangle the names of overloaded
9893         operators, even when they have `extern "C"' linkage.
9894
9895 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
9896
9897         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
9898         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9899         where it's not necessary.
9900         (add_method): Remove optimization involving comparison of
9901         DECL_ASSEMBLER_NAME.
9902         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
9903         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9904         where it's not necessary.
9905         (check_methods): Likewise.
9906         (build_clone): Likewise.
9907         (built_vtt): Likewise.
9908         * cp-tree.h (DECL_NEEDED_P): Likewise.
9909         * decl.c (pushtag): Likewise.
9910         (duplicate_decls): Likewise.
9911         (pushdecl): Likewise.
9912         (builtin_function): Likewise.
9913         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
9914         (build_cp_library_fn): Likewise.
9915         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
9916         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9917         where it's not necessary.
9918         (make_rtl_for_nonlocal_decl): Likewise.
9919         (cp_finish_decl): Likewise.
9920         (grokfndecl): Likewise.
9921         (grokvardecl): Likewise.
9922         (grokdeclarator): Likewise.
9923         (start_function): Likewise.
9924         (cp_missing_return_ok_p): Likewise.
9925         * decl2.c (grokclassfn): Likewise.
9926         (check_classfn): Likewise.
9927         (finish_static_data_member_decl): Likewise.
9928         (grokfield): Likewise.
9929         * error.c (GLOBAL_IORD_P): Remove.
9930         (dump_global_iord): Improve output.
9931         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
9932         * except.c (nothrow_libfn_p): Summarily reject any function not in
9933         namespace-scope.
9934         * init.c (build_java_class_ref): Don't explicitly set
9935         DECL_ASSEMBLER_NAME after calling mangle_decl.
9936         * mangle.c (mangle_decl_string): Handle extern "C" functions.
9937         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
9938         * method.c (set_mangled_name_for_decl): Don't explicitly set
9939         DECL_ASSEMBLER_NAME after calling mangle_decl.
9940         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
9941         IDENTIFIER_GLOBAL_VALUE for the thunk.
9942         * pt.c (set_mangled_name_for_template_decl): Remove.
9943         (check_explicit_specialization): Don't use it.
9944         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
9945         (tsubst_friend_function): Likewise.
9946         (tsubst_decl): Likewise.
9947         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
9948         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
9949         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9950         where it's not necessary.
9951         (tinfo_base_init): Likewise.
9952         (create_real_tinfo_var): Likewise.
9953         * search.c (looup_field_1): Likewise.
9954         * semantics.c (finish_named_return_value): Likewise.
9955         * tree.c (init_tree): Set lang_set_decl_assembler_name.
9956
9957 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
9958
9959         Correct semantics restrictions checking in throw-expression.
9960         * except.c (is_admissible_throw_operand): New function.
9961         (build_throw): Use it.
9962
9963 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
9964
9965         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
9966         and its ilk.
9967
9968 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
9969
9970         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9971         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
9972         * decl.c (duplicate_decls): Likewise.
9973         (builtin_function): Likewise.
9974         (build_library_fn): Likewise.
9975         (build_cp_library_fn): Likewise.
9976         (check_initializer): Likewise.
9977         (cp_finish_decl): Likewise.
9978         * decl2.c (grokfield): Likewise.
9979         (grok_function_init): Remove #if 0'd code.
9980         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9981         * friend.c (do_friend): Likewise.
9982         * init.c (get_temp_regvar): Likewise.
9983         * method.c (make_thunk): Likewise.
9984         * pt.c (tsubst_friend_function): Likewise.
9985         (tsubst_decl): Likewise.
9986         (regenerate_decl_from_template): Likewise.
9987         * semantics.c (genrtl_named_return_value): Likewise.
9988         (expand_body): Likewise.
9989         (genrtl_finish_function): Likewise.
9990         * tree.c (cp_tree_equal): Likewise.
9991
9992 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
9993
9994         * call.c (convert_like_real): Add extra semantics to INNER
9995         parameter. Don't convert to temporary if a user conversion
9996         gives us an lvalue that we're about to bind to a reference.
9997         Set INNER to indicate pending reference binding on recursive
9998         calls.
9999
10000 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
10001
10002         * cp/lex.c: Delete duplicate pending_lang_change.
10003
10004 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
10005
10006         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
10007         Similarly.
10008         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
10009         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
10010
10011 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
10012
10013         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
10014
10015 2001-03-08  Stan Shebs  <shebs@apple.com>
10016
10017         * cp-tree.h (set_identifier_local_value): Remove unused decl.
10018
10019 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
10020
10021         * spew.c: Remove references to CPP_OSTRING.
10022
10023 2001-03-06  Andrew Haley  <aph@redhat.com>
10024
10025         * typeck.c (convert_arguments): Check that we have an fndecl.
10026
10027 2001-03-05  Andrew Haley  <aph@redhat.com>
10028
10029         * typeck.c (convert_arguments): Don't do ellipsis conversion for
10030         __built_in_constant_p.
10031
10032 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
10033
10034         * typeck.c (build_static_cast): Allow enum to enum conversions
10035         as per DR 128.
10036
10037 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
10038
10039         * class.c (check_field_decls): Pointers to member do not a
10040         non-pod struct make, as per DR 148.
10041
10042 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
10043
10044         * call.c (joust): cp_pedwarn when using gnu extension concerning
10045         worst conversion sequences.
10046
10047 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
10048
10049         * decl.c: Replace all uses of 'boolean' with 'bool'.
10050
10051 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
10052
10053         * lang-specs.h: Add zero initializer for cpp_spec field to
10054         all array elements that need one.  Don't put an #ifdef inside
10055         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
10056         use it.
10057
10058 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
10059
10060         Implement using decls inside template functions.
10061         * decl2.c (validate_nonmember_using_decl): Don't special case
10062         fake_std_node in the global namespace. Don't reject early when
10063         processing a template.
10064         (do_local_using_decl): Add to statement tree. Don't do further
10065         processing when building a template.
10066         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
10067
10068 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
10069
10070         * decl2.c (do_nonmember_using_decl): Don't complain if we find
10071         same function. Do complain about ambiguating extern "C"
10072         declarations.
10073
10074 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
10075
10076         Remove floating point and complex type template constant parms.
10077         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
10078         COMPLEX_TYPE extensions.
10079         (invalid_nontype_parm_type_p): Likewise.
10080
10081 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
10082
10083         * except.c (call_eh_info): Revert "match_function"'s type.
10084
10085 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
10086
10087         Fix ctor vtable vcall offsets.
10088         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
10089         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
10090         (get_matching_base): Remove.
10091         (get_original_base): New function.
10092         (build_vtbl_initializer): Initialize vid.rtti_binfo.
10093         Use a virtual thunk for a ctor vtable with an index
10094         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
10095         primary base within a constructor vtable. Only set
10096         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
10097         when primary base has been lost.
10098         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
10099
10100 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
10101
10102         * call.c (joust): Ensure more_specialized()'s argument length
10103         parameter has correct value for constructors.
10104
10105 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
10106
10107         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
10108
10109         * decl.c (mark_inlined_fns): Prototype.
10110
10111 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
10112
10113         * spew.c (yylex): Correct handling of friends.
10114
10115 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
10116
10117         * mangle.c (write_encoding): Pass write_function_type the
10118         FUNCTION_DECL for the function being encoded.
10119         (write_function_type): Pass it along to write_bare_function_type.
10120         (write_bare_function_type): Pass it along to write_method_parms.
10121         (write_method_parms): Don't mangle the compiler-generated
10122         parameters to a constructor or destructor.
10123
10124 2001-02-22  Andreas Jaeger  <aj@suse.de>
10125
10126         * optimize.c: Include toplev.h for
10127         note_deferral_of_defined_inline_function prototype.
10128
10129 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
10130
10131         * cp-tree.h (struct lang_decl_inlined_fns): New.
10132         (struct lang_decls): Add inlined_fns.
10133         (DECL_INLINED_FNS): New macro.
10134         * optimize.c (struct inline_data): Add inlined_fns.
10135         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
10136         (inlinable_function_p): Likewise, fix typo in comment,
10137         function is not inlinable if it already inlined function currently
10138         being optimized.
10139         (expand_call_inline): Add fn to inlined_fns if necessary.
10140         (optimize_function): Initialize inlined_fns.
10141         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
10142         * decl.c (mark_inlined_fns): New function.
10143         (lang_mark_tree): Call it.
10144
10145 2001-02-21  Jason Merrill  <jason@redhat.com>
10146
10147         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
10148         (DECL_UNINLINABLE): Move to middle-end.
10149
10150         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
10151         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
10152         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
10153         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
10154         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
10155
10156         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
10157         second parm of op=.
10158
10159 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
10160
10161         * decl2.c (set_decl_namespace): Allow explicit instantiations in
10162         any namespace.
10163
10164 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10165
10166         * optimize.c (expand_call_inline): Don't walk subtrees of type
10167         nodes.
10168
10169 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
10170
10171         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
10172         for a destructor.
10173
10174 2001-02-18  Jason Merrill  <jason@redhat.com>
10175
10176         Do put the VTT parameter in DECL_ARGUMENTS.
10177         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
10178         (current_vtt_parm): New macro.
10179         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
10180         (DECL_HAS_VTT_PARM_P): New macro.
10181         (DECL_VTT_PARM): Remove.
10182         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
10183         * decl.c (duplicate_decls): Only copy the operator code if
10184         appropriate.
10185         (start_function): Set current_vtt_parm.
10186         (lang_mark_tree): Don't mark vtt_parm.
10187         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
10188         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
10189         * class.c (build_clone): Maybe remove the VTT parm.
10190         * optimize.c (maybe_clone_body): Set up the VTT parm.
10191         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
10192         * call.c (build_over_call): Just allow the VTT arg.
10193         * method.c (make_thunk): Don't set DECL_VTT_PARM.
10194         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
10195         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
10196         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
10197         * error.c (dump_function_decl): Likewise.
10198         * call.c (build_user_type_conversion_1, convert_like_real): Abort
10199         if we try to call a constructor with in-charge or VTT parms.
10200         * method.c (skip_artificial_parms_for): New fn.
10201         * call.c (add_function_candidate, build_over_call): Call it.
10202         * call.c (build_new_method_call): Use current_vtt_parm.
10203         * init.c (expand_virtual_init): Likewise.
10204         * class.c (same_signature_p): No longer static.
10205         * cp-tree.h: Declare it.
10206         * search.c (look_for_overrides_r): Use it.
10207
10208 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
10209
10210         * cp-tree.h (new_abi_rtti_p): Remove.
10211         (name_mangling_version): Likewise.
10212         (flag_do_squangling): Likewise.
10213         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
10214         * decl.c (grokfndecl): Likewise.
10215         * decl2.c (name_mangling_version): Remove.
10216         (flag_do_squangling): Likewise.
10217         (lang_f_options): Remove `squangle'.
10218         (unsupported_options): Add `squangle'.
10219         (cxx_decode_option): Issue a warning about uses of
10220         -fname-mangling-version.
10221         (finish_file): Remove old ABI support.
10222         * pt.c (check_explicit_specialization): Likewise.
10223         (tsubst_decl): Likewise.
10224         * rtti.c (init_rtti_processing): Likewise.
10225         (build_headof): Likewise.
10226         (get_tinfo_decl_dynamic): Likewise.
10227         (tinfo_from_decl): Likewise.
10228         (build_dynamic_cast_1): Likewise.
10229         (synthesize_tinfo_var): Likewise.
10230         * init.c (build_new): Allow enumeration types for the array-bounds
10231         in a direct-new-declarator.
10232
10233         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
10234
10235         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
10236         TREE_PROTECTED from the template being specialized.
10237
10238 2001-02-17  Jason Merrill  <jason@redhat.com>
10239
10240         * decl2.c (build_artificial_parm): Set TREE_READONLY.
10241
10242         * decl.c (bad_specifiers): Allow throw specs on things with
10243         pointer-to-function or -member-function type.
10244         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
10245         a pmf.
10246
10247 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
10248
10249         * call.c (check_dtor_name): Handle template names correctly.
10250
10251 2001-02-16  Jason Merrill  <jason@redhat.com>
10252
10253         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
10254         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
10255         * optimize.c (maybe_clone_body): Don't substitute it.
10256         * call.c (build_new_method_call): Check in_chrg instead.
10257         * init.c (expand_virtual_init): Likewise.
10258
10259 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
10260
10261         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
10262         class-type introduces at least a type-name.
10263
10264 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
10265
10266         * call.c (convert_like_real): Create a temporary for non-lvalue.
10267
10268 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
10269
10270         * cp-tree.h: Fix typos in comments.
10271
10272 2001-02-16  Jason Merrill  <jason@redhat.com>
10273
10274         * optimize.c (remap_block): If we're compiling a clone, pass the
10275         new block to insert_block.
10276
10277 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
10278
10279         * semantics.c (finish_asm_stmt): Robustify.
10280
10281 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
10282
10283         * pt.c (push_template_decl_real): Don't remangle the name of a
10284         class template.
10285
10286 2001-02-15  Jim Meyering  <meyering@lucent.com>
10287
10288         * Make-lang.in (c++.install-common): Depend on installdirs.
10289         (c++.install-info): Likewise.
10290         (c++.install-man): Likewise.
10291
10292 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
10293
10294         * typeck2.c (build_m_component_ref): Robustify.
10295
10296 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
10297
10298         * friend.c (do_friend): Don't take the nested [template] class
10299         into account when deciding whether to warn about the friend
10300         function not referring to a template function.
10301
10302 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
10303
10304         * typeck.c (build_unary_op): Clarify error message.
10305
10306 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
10307
10308         * parse.y (component_constructor_declarator): allow optional
10309         parentheses around constructor class name.
10310
10311 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
10312
10313         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
10314         section.
10315         * init.c (emit_base_init): Remove incorrect comment about
10316         virtual bases.
10317         * method.c (make_thunk): Fix comment alignment.
10318
10319 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
10320
10321         Kill remnants of this is variable.
10322         * cp-tree.h (flag_this_is_variable): Remove.
10323         * decl2.c (flag_this_is_variable): Remove.
10324         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
10325         (build_vbase_path): The path is non-static, even in a cdtor.
10326         (resolves_to_fixed_type_p): Add additional return value.
10327         * search.c (init_vbase_pointers): Adjust.
10328         * tree.c (lvalue_p_1): Adjust.
10329         * typeck.c (mark_addressable): Adjust.
10330
10331 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
10332
10333         * pt.c (unify): Don't check cv quals of array types.
10334
10335 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
10336
10337         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
10338         check whether we already have the type.
10339
10340 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
10341
10342         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
10343         * call.c (build_op_delete_call): Simplify to remove duplicate
10344         code.
10345         * class.c (clone_function_decl): Don't build the deleting variant
10346         of a non-virtual destructor.
10347         * decl.c (finish_destructor_body): Don't call delete if this is a
10348         non-virtual destructor.
10349         * init.c (build_delete): Explicitly call `operator delete' when
10350         deleting an object with a non-virtual destructor.
10351
10352 2001-02-13  Jason Merrill  <jason@redhat.com>
10353
10354         * lang-specs.h: Add more __EXCEPTIONS.
10355
10356 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
10357
10358         * typeck2.c (process_init_constructor): Check
10359         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
10360
10361 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
10362
10363         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
10364         Remove spurious information in comment. Allow further
10365         adjustments of REFERENCE_TYPE args.
10366
10367 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
10368
10369         * errfn.c (cp_deprecated): Tweak diagnostic text.
10370         * parse.y (new_initializer): Deprecate initializer lists
10371         extension.
10372
10373 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
10374
10375         Remove old ABI support.
10376
10377 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
10378
10379         * decl2.c (flag_vtable_thunks): Always set it to 1.
10380         (flag_new_abi): Likewise.
10381         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
10382
10383         * Makefile.in (g++spec.o): Fix typo.
10384
10385 2001-02-09  Jason Merrill  <jason@redhat.com>
10386
10387         * lang-specs.h: Restore definition of __EXCEPTIONS.
10388
10389 2001-02-08  Jason Merrill  <jason@redhat.com>
10390
10391         * search.c (shared_member_p): New function.
10392         (lookup_field_r): Use it.
10393         * cp-tree.h (SHARED_MEMBER_P): Remove.
10394
10395         * method.c (process_overload_item): Handle template-dependent array
10396         bounds.
10397         * pt.c (type_unification_real): If we end up with undeduced nontype
10398         parms, try again.
10399
10400         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
10401         types.
10402
10403         * typeck2.c (friendly_abort): Don't say anything if we have
10404         earlier errors or sorries.
10405
10406         * decl.c (check_tag_decl): Notice attempts to redefine bool and
10407         wchar_t.  Ignore if in_system_header.
10408
10409         * decl.c (maybe_push_cleanup_level): New fn...
10410         (start_decl_1): ...split out from here.
10411         * cvt.c (build_up_reference): Use it.
10412         * cp-tree.h: Declare it.
10413
10414 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
10415
10416         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
10417         spec.
10418
10419 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
10420
10421         * pt.c (lookup_template_class): Make sure it's a primary
10422         template or template_template_parm when called from the parser.
10423         (instantiate_template_class): Add assertion.
10424
10425 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
10426
10427         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
10428         from error_mark_node.
10429
10430 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
10431
10432         Fix specification and implementation bugs in V3 ABI
10433         construction vtables.
10434         * cp-tree.h (flag_dump_class_layout): New flag.
10435         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
10436         (BINFO_LOST_PRIMARY_P): New flag.
10437         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
10438         (BINFO_PRIMARY_MARKED_P): Rename to ...
10439         (BINFO_PRIMARY_P): ... here.
10440         (binfo_via_virtual): New prototype.
10441         * decl2.c (flag_dump_class_layout): New flag.
10442         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
10443         use `=' as a file name separator.
10444         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
10445         bases.
10446         (build_vtbl_address): If this is a virtual primary base, then
10447         get the vtbl of what it is ultimately primary for.
10448         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
10449         for BINFO_PRIMARY_P.
10450         (dfs_skip_nonprimary_vbases_markedp): Likewise.
10451         (get_shared_vbase_if_not_primary): Likewise.
10452         (dfs_get_pure_virtuals): Likewise.
10453         (expand_upcast_fixups): Likewise.
10454         (fixup_virtual_upcast_offsets): Likewise.
10455         (dfs_find_vbase_instance): Likewise.
10456         (find_vbase_instance): Likewise.
10457         (binfo_from_vbase): Adjust comment to reflect reality.
10458         (binfo_via_virtual): New function.
10459         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
10460         for binfo walking during VTT construction.
10461         (dfs_mark_primary_bases): Remove.
10462         (force_canonical_binfo_r): New function.
10463         (force_canonical_binfo): New function.
10464         (mark_primary_virtual_base): New function.
10465         (mark_primary_bases): Walk in inheritance graph order, use
10466         mark_primary_virtual_base.
10467         (determine_primary_base): Use some more intermediate variables.
10468         (dfs_find_final_overrider): Don't check for overriding along a
10469         virtual path.
10470         (dfs_modify_vtables): Walk into primary virtual bases too.
10471         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
10472         (build_base_fields): Likewise.
10473         (dfs_set_offset_for_unshared_vbases): Likewise.
10474         (layout_virtual_bases): Likewise.
10475         (end_of_class): Likewise.
10476         (finish_struct_1): Call dump_class_hierarchy, if requested.
10477         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
10478         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
10479         (dump_class_hierarchy): Add file parameter. Append to file, if
10480         required.
10481         (finish_vtbls): Adjust accumulate_vtbl_inits call.
10482         Use canonical base for virtual bases.
10483         (build_vtt): Add more comments. Adjust build_vtt_inits call.
10484         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
10485         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
10486         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
10487         virtual VTTs.
10488         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
10489         from DATA.  We want virtual primary bases and all bases via virtual.
10490         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
10491         virtual base when not a construction vtable.
10492         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
10493         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
10494         Use canonical bases when processing virtual bases.
10495         (accumulate_vtbl_inits): We're interested in any base via a
10496         virtual path.
10497         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
10498         within a construction vtable, determine what is being overridden.
10499         (build_vtbl_initializer): Add more comments
10500         (add_vcall_offset_vtbl_entries_1): Adjust comment.
10501         (build_rtti_vtbl_entries): Check if the base has lost its
10502         primary.
10503
10504 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
10505
10506         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
10507
10508 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10509
10510         * decl.c (pushdecl): Call abort instead of fatal.
10511         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
10512         * init.c (build_new_1): Likewise.
10513         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
10514         * decl.c (build_typename_type): hash_table_init now returns void.
10515         decl.c (init_decl_processing): Make an error non-fatal.
10516
10517 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
10518
10519         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
10520         Document.
10521         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10522         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10523         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10524         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10525         * decl.c (maybe_commonize_var): Use the new name-mangling where
10526         appropriate.
10527         * decl2.c (comdat_linkage): Enhance comments.  Make all
10528         compiler-generated things static, if COMDAT is not available.
10529         (get_tinfo_decl): Do not make typeinfo objects that belong in the
10530         library COMDAT.
10531         (tinfo_base_init): Use the correct mangled name for typeinfo
10532         strings, and push them into the global scope.
10533         (typeinfo_in_lib_p): New function.
10534         (synthesize_tinfo_var): Use it.
10535         (create_real_tinfo_var): Likewise.
10536
10537 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
10538
10539         * decl.c (push_class_binding): Use context_for_name_lookup instead
10540         of CP_DECL_CONTEXT.
10541         * search.c (context_for_name_lookup): Remove static.  Check for NULL
10542         context in the loop.
10543         * cp-tree.h (context_for_name_lookup): Add prototype.
10544
10545 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
10546
10547         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
10548         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
10549         Remove.
10550         * call.c (convert_class_to_reference, build_user_type_conversion_1,
10551         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
10552
10553 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
10554
10555         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
10556         of macros used when compiling g++spec.c.
10557         * g++spec.c (lang_specific_driver): Link with the shared
10558         libgcc by default.
10559
10560 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
10561
10562         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
10563         make_reference_declarator, make_call_declarator), method.c
10564         (implicitly_declare_fn), parse.y (namespace_using_decl,
10565         notype_unqualified_id, expr_or_declarator, new_type_id,
10566         after_type_declarator, direct_after_type_declarator,
10567         notype_declarator, complex_notype_declarator,
10568         complex_direct_notype_declarator, qualified_id,
10569         notype_qualified_id, overqualified_id, direct_new_declarator,
10570         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
10571         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
10572         instead of build_parse_node.
10573
10574 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10575
10576         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
10577         (minus_one_node): Moved to top level gcc directory.  Renamed
10578         to integer_minus_one_node.
10579
10580         * init.c (init_init_processing): Don't set minus_one_node.
10581         (build_vec_init): Use integer_minus_one_node.
10582
10583         * rtti.c (get_tinfo_decl_dynamic): Likewise.
10584
10585 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
10586
10587         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
10588         identical and they would be replaced with constant, remove
10589         MODIFY_EXPR from the tree.
10590
10591 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10592
10593         * Make-lang.in: Remove all dependencies on defaults.h.
10594         * call.c: Don't include defaults.h.
10595         * decl.c: Likewise.
10596         * decl2.c: Likewise.
10597         * except.c: Likewise.
10598         * pt.c: Likewise.
10599         * rtti.c: Likewise.
10600         * tree.c: Likewise.
10601         * typeck.c: Likewise.
10602
10603 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
10604
10605         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
10606         operators even in "C" linkage.
10607         * method.c (set_mangled_name_for_decl): Likewise.
10608         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
10609         overloaded operators in "C" linkage.
10610
10611 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
10612
10613         * pt.c (tsubst_decl): Remove IN_DECL parameter.
10614         (tsubst_arg_types): Check parameter is not void.
10615         (tsubst): Adjust tsubst_decl call.
10616
10617 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
10618
10619         * call.c (add_builtin_candidate): Quote std properly, from
10620         previous change.
10621
10622 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10623
10624         * pt.c (check_explicit_specialization): Clone constructors and
10625         destructors.
10626
10627 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
10628
10629         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
10630         indicates anything special about template depth. Make sure we
10631         only count the user visible template classes.
10632
10633 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
10634
10635         * call.c (build_conv): Typo in comment.
10636         (add_builtin_candidate): Add more explanation.
10637         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
10638         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
10639         when we have enumeral types.
10640         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
10641         candidates for relops and eqops.
10642         (joust): Simplify control flow. Allow a non-template user
10643         function to hide a builtin.
10644
10645 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
10646
10647         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
10648         (more_specialized): Add deduction parameter.
10649         * call.c (joust): Adjust more_specialized call.
10650         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
10651         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
10652         (get_bindings_order): Remove.
10653         (get_bindings_real): Add DEDUCE parameter.
10654         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
10655         REFERENCE_TYPE jig for DEDUCE_ORDER.
10656         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
10657         maybe_adjust_types_for_deduction.
10658         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
10659         directly.
10660         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
10661         (check_cv_quals_for_unify): Use new unify qualifier flags.
10662         (unify): Clear new unify qualifier flags.
10663         (get_bindings_real): Add DEDUCE parameter.
10664         (get_bindings): Adjust call to get_bindings_real.
10665         (get_bindings_overload): Likewise.
10666         (most_specialized_instantiation): Adjust call to
10667         more_specialized.
10668
10669 2001-01-19  Jason Merrill  <jason@redhat.com>
10670
10671         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
10672
10673         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
10674         -fnew-abi.
10675
10676 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
10677
10678         * decl2.c (arg_assoc_class): Fix double iteration logic.
10679
10680 2001-01-19  Jason Merrill  <jason@redhat.com>
10681
10682         * init.c (build_delete): Always call convert_force to strip cv-quals.
10683
10684         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
10685         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
10686         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
10687
10688 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10689
10690         * search.c (get_vbase_1): Count only virtual bases.
10691
10692 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10693
10694         * class.c (duplicate_tag_error): Robustify flag clearing.
10695
10696 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10697
10698         * cp-tree.h (lookup_template_class): Add complain parm.
10699         * decl.c (lookup_namespace_name): Adjust call to
10700         lookup_template_class.
10701         (make_typename_type): Likewise.
10702         * semantics.c (finish_template_type): Likewise.
10703         * pt.c (lookup_template_class): Add complain parm. Adjust.
10704         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
10705         (tsubst): Likewise.
10706
10707 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10708
10709         * pt.c (copy_default_args_to_explicit_spec): Preserve
10710         object's CV quals. Reorganize.
10711
10712 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10713
10714         * typeck.c (build_modify_expr): Say `initialization' for
10715         INIT_EXPRs.
10716         * init.c (build_default_init): Convert to enumeral type, if
10717         needed.
10718
10719 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
10720
10721         * parse.y (nomods_initdcl0): Properly set things up for
10722         initdcl0_innards.
10723
10724 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10725
10726         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
10727         (type_unification_real): Set it.
10728         (unify): Use it.
10729
10730 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10731
10732         * decl.c (finish_destructor_body): Convert to vbase pointer here.
10733
10734 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10735
10736         * semantics.c (begin_class_definition): Check we're not inside a
10737         template parm list.
10738
10739 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10740
10741         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
10742         BASELINK_P.
10743
10744 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10745
10746         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
10747         * call.c (build_over_call): Add comment.
10748
10749 2001-01-16 Daniel Berlin <dberlin@redhat.com>
10750
10751         * cvt.c (ocp_convert): Handle vector type conversion
10752         * typeck2.c (digest_init): Handle vector type initializations
10753
10754 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
10755
10756         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
10757           was given.
10758
10759 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
10760
10761         * pt.c (check_nontype_parm): Rename to ...
10762         (invalid_nontype_parm_type_p): ... here.
10763         (process_template_parm): Adjust.
10764         (convert_template_argument): Adjust.
10765
10766 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
10767
10768         * pt.c (check_nontype_parm): New function.
10769         (process_template_parm): Use it.
10770         (convert_template_argument): Use it.
10771         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
10772         member.
10773
10774 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
10775
10776         * tree.c: Add defaults.h
10777         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
10778         * Make-lang.in (cp/tree.o): Add defaults.h.
10779
10780 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10781
10782         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
10783
10784 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10785
10786         * g++.1: Change to be ".so man1/gcc.1".
10787
10788 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10789
10790         * Make-lang.in (c++.info, c++.install-info): Build and install g++
10791         internals info.
10792         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
10793         ($(srcdir)/cp/g++int.info): New target.
10794         * gxxint.texi: Add info directory entry.  Use @@ in email address.
10795         * .cvsignore: Update.
10796
10797 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
10798
10799         * typeck.c (build_c_cast): Do template processing earlier.
10800         Always pedwarn on array casts.
10801
10802 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
10803
10804         * friend.c (make_friend_class): Make sure a templated class is
10805         actually a template.
10806
10807 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10808
10809         * decl2.c (get_guard): Set linkage from guarded decl.
10810
10811 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10812
10813         * call.c (convert_default_arg): Check for unprocessed
10814         DEFAULT_ARG.
10815         * cp-tree.h (replace_defarg): Move to spew.c.
10816         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
10817         spew.c, which is where they really are.
10818         (done_pending_defargs): Declare.
10819         (unprocessed_defarg_fn): Declare.
10820         * decl.c (replace_defarg): Move to spew.c
10821         * parse.y (structsp): Call done_pending_defargs.
10822         * spew.c (defarg_fns): Rearrange list structure.
10823         (defarg_fnsdone): New static variable.
10824         (defarg_depfns): New static variable.
10825         (init_spew): Adjust.
10826         (add_defarg_fn): Store the type in TREE_TYPE.
10827         (do_pending_defargs): Detect and deal with ordering constraints
10828         and circularity.
10829         (done_pending_defargs): New function.
10830         (unprocessed_defarg_fn): New function.
10831         (replace_defarg): Moved from decl.c. Robustify. Don't save
10832         if circularity detected.
10833
10834 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10835
10836         * pt.c (unify): Check array has a domain, before checking
10837         whether it is variable sized.
10838
10839 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10840
10841         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
10842         parameters with pointers to arrays of unknown bound.
10843
10844 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10845
10846         * parse.y (template_parm_header, template_spec_header): New
10847         reductions. Split out from ...
10848         (template_header): ... here. Use them.
10849         (template_template_parm): Use template_parm_header.
10850         * semantics.c (finish_template_template_parm): Add assert.
10851
10852 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10853
10854         * mangle.c (write_builtin_type): Fix thinko.
10855
10856         * pt.c (copy_default_args_to_explicit_spec_1): New function.
10857         (copy_default_args_to_explicit_spec): Likewise.
10858         (check_explicit_specialization): Use it.
10859
10860         * class.c (finish_struct_1):  Remove last argument in call to
10861         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
10862         * decl.c (builtin_function): Likewise.
10863         (build_cp_library_fn): Likewise.
10864         (check_initializer): Likewise.
10865         (make_rtl_for_nonlocal_decl): Likewise.
10866         (cp_finish_decl): Likewise.
10867         (start_function): Likewise.
10868         * decl2.c (finish_anon_union): Likewise.
10869         * friend.c (do_friend): Likewise.
10870         * init.c (build_java_class_ref): Likewise.
10871         * method.c (make_thunk): Likewise.
10872         * pt.c (tsubst_friend_function): Likewise.
10873         * semantics.c (expand_body): Likewise.
10874
10875 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10876
10877         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
10878         looking at DECL_CLONED_FUNCTION for non-functions.
10879
10880 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10881
10882         * error.c (dump_template_parameter): Use parm to determine how
10883         to print default value.
10884
10885 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10886
10887         * class.c (duplicate_tag_error): Clear more flags.
10888
10889 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10890
10891         * call.c (build_new_method_call): Use binfo_for_vbase.
10892
10893 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
10894
10895         * cp-tree.h (flag_cond_mismatch): Don't declare.
10896         * decl2.c (flag_cond_mismatch): Don't define.
10897         (lang_f_options): Remove cond-mismatch.
10898         (unsupported_options): Add cond-mismatch.
10899
10900 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
10901
10902         * class.c (handle_using_decl): Reject using of constructor name
10903         of sourcing class. Allow injecting of a method with same name as
10904         nested class. Fixup error messages.
10905
10906 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
10907
10908         * decl2.c (lang_decode_option): Handle -Wformat=2.
10909
10910 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10911
10912         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
10913         initialized_in_class.
10914         (DECL_DEFINED_IN_CLASS_P): Rename to ...
10915         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
10916         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
10917         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
10918         * pt.c (check_default_tmpl_args): Adjust for
10919         DECL_INITIALIZED_IN_CLASS_P.
10920         (instantiate_class_template): Likewise.
10921         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
10922
10923         * class.c (finish_struct): Constify saved_filename.
10924
10925 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10926
10927         * class.c (duplicate_tag_error): Adjust diagnostic.
10928         (finish_struct): Locally set location to start of struct.
10929         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
10930
10931 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10932
10933         * decl.c (struct binding_level): Adjust class_shadowed comments
10934         to reflect reality.
10935         (push_class_level_binding): Adjust comments to reflect reality.
10936         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
10937         Don't set TREE_VALUE on the class_shadowed list.
10938
10939 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10940
10941         * decl2.c (acceptable_java_type): Allow references too.
10942         * init.c (build_java_class_ref): When using the new ABI, search
10943         `class$' and have it mangled with `mangle_decl.'
10944         * mangle.c (write_java_integer_type_codes): New function.
10945         (write_builtin_type): Detect and mangle Java integer and real
10946         types.
10947
10948 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
10949
10950         * decl2.c (grokfield): Don't accept `asm' specifiers for
10951         non-static data members.
10952
10953 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10954
10955         * expr.c (cplus_expand_expr): Don't reset `target'.
10956
10957 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
10958
10959         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
10960
10961 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
10962
10963         * parse.y (template_datadef): Check for error_mark_node.
10964
10965 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
10966
10967         * cp-tree.def (DEFAULT_ARG): Make `x' class.
10968
10969 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
10970
10971         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
10972         (record_builtin_type): Make non-static.
10973         (flag_short_double): Don't declare.
10974         (init_decl_processing): Remove the creation of many tree nodes now
10975         in c_common_nodes_and_builtins.
10976         (build_void_list_node): New function.
10977         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
10978         * cp-tree.h (flag_short_wchar): Don't declare.
10979
10980 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
10981
10982         * call.c (build_conv): Don't use build1 for USER_CONV.
10983         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
10984
10985 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
10986
10987         * lex.c (lang_init): Call c_common_lang_init.
10988
10989 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
10990
10991         * search.c (lookup_fnfields_here): Remove.
10992         (look_for_overrides_r): Use lookup_fnfields_1.
10993         Ignore functions from using declarations.
10994
10995 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
10996
10997         Implement exceptions specifiers for implicit member functions.
10998         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
10999         * method.c (synthesize_exception_spec): New function.
11000         (locate_dtor, locate_ctor, locate_copy): New functions.
11001         (implicitly_declare_fn): Generate the exception spec too.
11002         * search.c (check_final_overrider): Check artificial functions
11003         too.
11004         * typeck2.c (merge_exception_specifiers): New function.
11005
11006 2001-01-03  Jason Merrill  <jason@redhat.com>
11007
11008         * init.c (build_default_init): New fn.
11009         (perform_member_init): Split out from here.
11010         (build_new_1): Use it.  Simplify initialization logic.
11011         (build_vec_init): Take an array, rather than a pointer and maxindex.
11012         Speed up simple initializations.  Don't clean up if we're assigning.
11013         * cp-tree.h: Adjust.
11014         * decl2.c (do_static_initialization): Remove TREE_VEC case.
11015         * parse.y (new_initializer): Return void_zero_node for ().
11016         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
11017         * typeck2.c (digest_init): Only complain about user-written
11018         CONSTRUCTORs.
11019
11020 2000-12-22  Mike Stump  <mrs@wrs.com>
11021
11022         * decl2.c: (max_tinst_depth): Increase to 50.
11023
11024 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
11025
11026         * class.c (invalidate_class_lookup_cache): Zero the
11027         previous_class_values.
11028         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
11029         TREE_INT_CST_HIGH.
11030         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
11031         * decl.c (free_bindings): New variable.
11032         (push_binding): Don't create a new binding if we have one on the
11033         free list.
11034         (pop_binding): Put old bindings on the free list.
11035         (init_decl_processing): Use size_int, not build_int_2.
11036         Register free_bindings as a GC root.
11037         (cp_make_fname_decl): Use size_int, not build_int_2.
11038         (push_inline_template_parms_recursive): Likewise.
11039         (end_template_parm_list): Likewise.
11040         (for_each_template_parm): Do not use walk_tree_without_duplicates.
11041         (tsubst_template_parms): Use size_int, not build_int_2.
11042         (tsubst): Likewise.
11043         * rtti.c (get_vmi_pseudo_type_info): Likewise.
11044
11045 2001-01-02  Richard Henderson  <rth@redhat.com>
11046
11047         * parse.y (asm): Set ASM_INPUT_P.
11048
11049 2001-01-02  Jason Merrill  <jason@redhat.com>
11050
11051         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
11052         for v3 ABI.
11053
11054         * typeck.c (cp_truthvalue_conversion): New fn.
11055         * cvt.c (ocp_convert): Use it.
11056
11057         * cp-tree.h: Lose c-common.c decls.
11058
11059         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
11060         * cvt.c (convert_to_void): Use type_unknown_p.
11061
11062         * typeck.c (strip_all_pointer_quals): Also strip quals from
11063         pointer-to-member types.
11064
11065         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
11066         parse.y as C.
11067
11068         * call.c (build_new_method_call): Do evaluate the object parameter
11069         when accessing a static member.
11070         * typeck.c (build_component_ref): Likewise.
11071
11072 2001-01-02  Andreas Jaeger  <aj@suse.de>
11073
11074         * decl.c (cp_missing_noreturn_ok_p): New.
11075         (init_decl_processing): Set lang_missing_noreturn_ok_p.
11076
11077 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
11078
11079         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
11080
11081 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
11082
11083         * class.c (pushclass): Remove #if 0'd code.
11084         * cp-tree.h (overload_template_name): Remove.
11085         * decl.c (store_bindings): Simplify.
11086         (pop_from_top_level): Likewise.
11087         * pt.c (overload_template_name): Remove.
11088         (instantiate_decl): Don't call push_to_top_level if it's not
11089         needed.
11090
11091 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
11092
11093         * pt.c (register_local_specialization): Don't return a value.
11094         (lookup_template_class): Use move-to-front heuristic when looking
11095         up template instantiations.
11096         (instantiate_decl): Only push_to_top_level when we're actually
11097         going to instantiate the template.
11098
11099 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
11100
11101         * search.c (binfo_for_vtable): Return least derived class, not
11102         most.  Handle secondary vtables.
11103
11104 2000-12-22  Jason Merrill  <jason@redhat.com>
11105
11106         * pt.c (more_specialized): Don't optimize len==0.
11107         (fn_type_unification): If we're adding the return type, increase len.
11108
11109         * typeck.c (build_binary_op): Fix pmf comparison logic.
11110
11111         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
11112         DECL_STATIC_FUNCTION_P.
11113
11114         * semantics.c (genrtl_finish_function): Don't try to jump to
11115         return_label unless it exists.
11116
11117         In partial ordering for a call, ignore parms for which we don't have
11118         a real argument.
11119         * call.c (joust): Pass len to more_specialized.
11120         (add_template_candidate_real): Strip 'this', pass len.
11121         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
11122         (get_bindings_order): New fn.  Pass len down.
11123         (get_bindings_real): Strip 'this', pass len.
11124         (fn_type_unification): Likewise.
11125         (type_unification_real): Succeed after checking 'len' args.
11126         (most_specialized_instantiation): Lose explicit_args parm.
11127         * class.c (resolve_address_of_overloaded_function): Strip 'this',
11128         pass len.
11129
11130 2000-12-21  Jason Merrill  <jason@redhat.com>
11131
11132         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
11133         DECL_TEMPLATE_RESULT.
11134
11135         * search.c (lookup_field_r): Call lookup_fnfields_1, not
11136         lookup_fnfields_here.
11137
11138         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
11139
11140         * call.c (build_object_call): Also allow conversions that return
11141         reference to pointer to function.
11142         (add_conv_candidate): Handle totype being ref to ptr to fn.
11143         (build_field_call): Also allow members of type reference to function.
11144         Lose support for calling pointer to METHOD_TYPE fields.
11145
11146         * error.c (dump_expr): Handle *_CAST_EXPR.
11147
11148         * typeck2.c (build_scoped_ref): Always convert to the naming class.
11149
11150         * tree.c (break_out_cleanups): Lose.
11151         * cp-tree.h: Remove prototype.
11152         * typeck.c (build_component_ref): Don't break_out_cleanups.
11153         (build_compound_expr): Likewise.
11154         * semantics.c (finish_expr_stmt): Likewise.
11155
11156 2000-12-20  Richard Henderson  <rth@redhat.com>
11157
11158         * cp-tree.h: Update declarations.
11159         * decl.c (finish_case_label): Return the new stmt node.
11160         * semantics.c (finish_goto_stmt): Likewise.
11161         (finish_expr_stmt, finish_return_stmt): Likewise.
11162         (finish_break_stmt, finish_continue_stmt): Likewise.
11163         (finish_asm_stmt): Likewise.
11164         * parse.y (already_scoped_stmt): Set STMT_LINENO.
11165         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
11166         (simple_if, simple_stmt): Return the new stmt node.
11167         (save_lineno): New.
11168
11169 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
11170
11171         * cp-tree.h: Don't declare warn_long_long.
11172
11173 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11174
11175         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
11176         IS_AGGR_TYPE.
11177
11178 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11179
11180         * pt.c (unify): Handle when both ARG and PARM are
11181         BOUND_TEMPLATE_TEMPLATE_PARM.
11182
11183 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11184
11185         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
11186         DECL_TEMPLATE_PARM_P.
11187
11188 2000-12-15  Jason Merrill  <jason@redhat.com>
11189
11190         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
11191
11192         * init.c (build_new_1): Don't strip quals from type.
11193
11194         * decl.c (pushdecl): Don't check for linkage on a non-decl.
11195
11196         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
11197
11198         * call.c (build_new_function_call): Lose space before paren in
11199         error message.
11200         (build_new_method_call): Likewise.
11201
11202         * typeck2.c (build_m_component_ref): Propagate quals from datum.
11203
11204 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11205
11206         * pt.c (check_explicit_specialization): Propagate default
11207         function arguments to explicit specializations.
11208
11209 2000-12-13  DJ Delorie  <dj@redhat.com>
11210
11211         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
11212         and <? operators.
11213
11214 2000-12-08  Jason Merrill  <jason@redhat.com>
11215
11216         * error.c (dump_function_name): Don't let the user see __comp_ctor.
11217
11218         Clean up copy-initialization in overloading code.
11219         * call.c (build_user_type_conversion_1): Die if we are asked to
11220         convert to the same or a base type.
11221         (implicit_conversion): Avoid doing so.  Lose reference binding code.
11222         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
11223         direct-initialization.  Also do direct-init part of copy-init.
11224         (build_user_type_conversion): Don't provide context to convert_like.
11225         * cvt.c (ocp_convert): build_user_type_conversion will now provide
11226         the constructor call for copy-init.
11227
11228         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
11229         instantiation of a member template.
11230         (do_decl_instantiation): Not here.
11231
11232 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
11233
11234         * class.c (check_field_decls): Don't special case anonymous
11235         fields in error messages.
11236         (note_name_declared_in_class): Use %D on diagnostic.
11237
11238         * tree.c (pod_type_p): Use strip_array_types.
11239         (cp_valid_lang_attribute): Likewise.
11240         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
11241         multiple evaluations.
11242         (cp_has_mutable_p): Use strip_array_types.
11243
11244 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
11245
11246         * cp-tree.h (sufficient_parms_p): Declare new function.
11247         * call.c (sufficient_parms_p): New function, broken out of ...
11248         (add_function_candidate): ... here. Use it.
11249         (add_conv_candidate): Use it.
11250         * decl.c (grok_ctor_properties): Use it.
11251
11252 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
11253
11254         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
11255
11256 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
11257
11258         * decl2.c (lang_decode_option): Handle -Wformat-security.
11259
11260 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11261
11262         * pt.c (verify_class_unification): New function.
11263         (get_class_bindings): Use it.
11264         (try_class_unification): Tidy.
11265         (unify): Handle when argument of a template-id is not
11266         template parameter dependent.
11267         (template_args_equal): Handle when TREE_CODE's do not match.
11268
11269 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
11270
11271         * lang-specs.h (c++): When invoking the stand-alone preprocessor
11272         for -save-temps, pass all relevant -Defines to it, and then don't
11273         pass them to cc1plus.
11274
11275 2000-12-05  Will Cohen  <wcohen@redhat.com>
11276
11277         * decl.c (finish_case_label): Cleared
11278         more_cleanups_ok in surrounding function scopes.
11279         (define_label): Likewise.
11280
11281 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
11282
11283         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
11284         (get_matching_virtual): Remove.
11285         (look_for_overrides): Declare new function.
11286         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
11287         DECL_VINDEX here.
11288         * class.c (check_for_override): Move base class iteration code
11289         to look_for_overrides.
11290         * search.c (next_baselink): Remove.
11291         (get_virtuals_named_this): Remove.
11292         (get_virtual_destructor): Remove.
11293         (tree_has_any_destructors_p): Remove.
11294         (struct gvnt_info): Remove.
11295         (check_final_overrider): Remove `virtual' from error messages.
11296         (get_matching_virtuals): Remove. Move functionality to ...
11297         (look_for_overrides): ... here, and ...
11298         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
11299         to be overriding.
11300
11301 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
11302
11303         * typeck.c (get_delta_difference): If via a virtual base,
11304         return zero.
11305         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
11306         adjustment.
11307
11308 2000-12-04  Richard Henderson  <rth@redhat.com>
11309
11310         * error.c (dump_tree): Use output_add_string not OB_PUTS.
11311
11312 2000-12-04  Jason Merrill  <jason@redhat.com>
11313
11314         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
11315         (write_builtin_type): Pass intSI_type_node and the like through
11316         type_for_mode.
11317         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
11318         Pass intSI_type_node and the like through type_for_mode.
11319         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
11320         * pt.c (tsubst, unify): Likewise.
11321         * tree.c (walk_tree): Likewise.
11322         * error.c (dump_type): Likewise.
11323         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
11324
11325         * Make-lang.in: Tweak top comment for emacs.
11326         (cp/TAGS): Restore.
11327
11328         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
11329
11330         * class.c (clone_function_decl): Robustify.
11331
11332 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
11333
11334         * decl.c (store_bindings): Only search in the non modified
11335         old_bindings for duplicates.
11336
11337 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
11338
11339         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
11340         TYPE_POLYMORPHIC_P.
11341
11342         * typeck.c (build_static_cast): Remove unused variable.
11343
11344 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11345
11346         * pt.c: Fix typo in comment.
11347
11348 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
11349
11350         * decl2.c (warn_format): Remove definition.
11351         (lang_decode_option): Handle -Wformat-nonliteral,
11352         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
11353
11354 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
11355
11356         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
11357         (init_decl_processing): Don't create string_type_node,
11358         const_string_type_node, wint_type_node, intmax_type_node,
11359         uintmax_type_node, default_function_type, ptrdiff_type_node and
11360         unsigned_ptrdiff_type_node.  Adjust position of call to
11361         c_common_nodes_and_builtins.
11362         (identifier_global_value): New function.
11363
11364 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
11365
11366         * call.c (standard_conversion): Reject pointer to member
11367         conversions from ambiguous, inaccessible or virtual bases.
11368         * typeck.c (build_static_cast): Don't check pointers to members
11369         specially.
11370
11371 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
11372
11373         * method.c (do_build_copy_constructor): Preserve cv
11374         qualifications when accessing source object members.
11375         (do_build_assign_ref): Likewise. Remove separate diagnostics for
11376         unnamed fields.
11377
11378 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
11379
11380         * method.c (do_build_assign_ref): Construct appropriately
11381         CV-qualified base reference. Don't allow const casts in base
11382         conversion.
11383
11384 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
11385
11386         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
11387         incomplete return type.
11388
11389 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11390
11391         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
11392         * semantics.c (finish_base_specifier): Accept a _TYPE not a
11393         _DECL.
11394
11395 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11396
11397         * spew.c (yyerror): Cope if yylval.ttype is NULL.
11398
11399 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11400
11401         * decl.c (grokdeclarator): Diagnose undefined template contexts.
11402
11403 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11404
11405         * decl.c (grokdeclarator): Do type access control on friend
11406         class.
11407
11408 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
11409
11410         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
11411         bison parser ickiness.
11412         * pt.c (tsubst_friend_function): Enter namespace scope when
11413         tsubsting the function name.
11414         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
11415
11416 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
11417
11418         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
11419         * cvt.c (cp_convert_to_pointer): Add force parameter.
11420         Allow conversions via virtual base if forced.
11421         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
11422         (ocp_convert): Likewise.
11423         * search.c (binfo_from_vbase): Return the virtual base's binfo.
11424         * typeck.c (get_delta_difference): Adjust handling of virtual
11425         bases.
11426
11427 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
11428
11429         * tree.c (struct list_hash): Remove.
11430         (list_hash_table): Make it be an htab.
11431         (struct list_proxy): New type.
11432         (list_hash_eq): New function.
11433         (list_hash_pieces): Renamed from ...
11434         (list_hash): ... this.
11435         (list_hash_lookup): Remove.
11436         (list_hash_add): Remove.
11437         (hash_tree_cons): Use the generic hashtable.
11438         (mark_list_hash): Remove.
11439         (init_tree): Create the hashtable.
11440
11441 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
11442
11443         * method.c (build_mangled_C9x_name): Rename to
11444         build_mangled_C99_name.  Change C9X references in comments to
11445         refer to C99.
11446
11447 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
11448
11449         * parse.y (unary_expr): Move VA_ARG from here ...
11450         (primary): ... to here.
11451
11452 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
11453
11454         * semantics.c (finish_id_expr): If type is error_mark, return
11455         error_mark.
11456
11457 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
11458
11459         * pt.c (lookup_template_class): Simplify loop exit constructs.
11460         Cope when there is no partial instantiation of a template
11461         template member.
11462
11463 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
11464
11465         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
11466
11467 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
11468
11469         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
11470         prefix.
11471
11472         * pt.c (do_decl_instantiate): Explicitly clone constructors and
11473         destructors that haven't already been cloned.
11474
11475 2000-11-20  Richard Henderson  <rth@redhat.com>
11476
11477         * parse.y (yyparse_1): Rename the parser entry point.
11478
11479 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
11480
11481         * mangle.c (write_name): Use <unscoped-name> for names directly in
11482         function scope.
11483         (write_unscoped_name): Accept names directly in function scope.
11484
11485 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
11486
11487         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
11488         * parse.y (extdef): Add EXPORT reduction.
11489         * spew.c (yylex): Don't skip export here.
11490
11491 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
11492
11493         * decl.c (init_decl_processing): Correct name of pure virtual
11494         function under the new ABI.
11495         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
11496         (throw_bad_typeid): Likewise for bad typeid function.
11497
11498 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
11499
11500         * decl.c (grokparms): Don't even function types of `void' type,
11501         either.
11502         * mangle.c (write_type): Don't crash when confronted with the
11503         error_mark_node.
11504
11505         * decl.c (grokparms): Don't create parameters of `void' type.
11506
11507 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
11508
11509         * lex.c (mark_impl_file_chain): Delete.
11510         (init_parse): Remove call to ggc_add_string_root.  No need to
11511         ggc_strdup a string constant.  Do not add impl_file_chain to GC
11512         roots.
11513         (handle_pragma_implementation): No need to ggc_strdup main_filename.
11514
11515 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
11516
11517         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
11518
11519 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
11520
11521         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
11522         * decl.c (grokdeclarator): Don't reject void parms here.
11523         (require_complete_types_for_parms): Simplify, use
11524         complete_type_or_else.
11525         (grokparms): Remove bitrot. Remove funcdef parm.
11526         Deal with ellipsis parm lists here.
11527         * semantics.c (finish_parmlist): Don't append void_list_node
11528         here. Set PARMLIST_ELLIPSIS_P.
11529
11530 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
11531
11532         * typeck2.c (incomplete_type_error): Reorganize to avoid
11533         excessive diagnostics.
11534
11535 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
11536
11537         * lex.c (struct impl_files, internal_filename): Constify a char *.
11538
11539 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
11540
11541         * mangle.c (write_special_name_constructor): Don't generate
11542         assembler junk when confronted with an old-style constructor.
11543         (write_special_name_destructor): Likewise.
11544         (mangle_decl_string): Do it here instead.
11545
11546 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
11547
11548         * call.c (op_error): Make error messages clearer.
11549
11550 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
11551
11552         * decl.c (wrapup_globals_for_namespace): Don't mark things
11553         TREE_ASM_WRITTEN when they're not.
11554
11555 2000-11-15  Jason Merrill  <jason@redhat.com>
11556
11557         * typeck2.c (friendly_abort): Uncount the error before handing
11558         off to fancy_abort.
11559
11560 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
11561
11562         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
11563
11564 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
11565
11566         * class.c (build_vtbl_initializer): Fix typo in comment.
11567         * typeck.c (expr_sizeof): Don't crash on errors.
11568
11569 2000-11-14  Jim Wilson  <wilson@redhat.com>
11570
11571         * lang-specs.h: Add %2 after %(cc1_options).
11572
11573 2000-11-14  Richard Henderson  <rth@redhat.com>
11574
11575         * typeck.c (c_sizeof): Be strict about casting result value
11576         back to c_size_type_node.
11577         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
11578
11579 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
11580
11581         * typeck.c (build_unary_op): Use boolean_increment from
11582         c-common.c, moving the relevant code there.
11583
11584 2000-11-11  Jason Merrill  <jason@redhat.com>
11585
11586         * typeck.c (mark_addressable): Don't call put_var_into_stack.
11587
11588         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
11589         in inlines.
11590
11591 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11592
11593         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
11594         * lex.c (copy_lang_decl): Likewise.
11595
11596 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
11597
11598         * dump.c (cp_dump_tree): Don't dump function bodies here.
11599
11600         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
11601         (dump.o): Update dependency list.
11602         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
11603         (flag_dump_translation_unit): Likewise.
11604         (CP_TYPE_QUALS): Adjust definition.
11605         (DECL_C_BIT_FIELD): Remove.
11606         (SET_DECL_C_BIT_FIELD): Likewise.
11607         (CLEAR_DECL_C_BIT_FIELD): Likewise.
11608         (add_maybe_template): Likewise.
11609         (strip_array_types): Likewise.
11610         (dump_node_to_file): Likewise.
11611         (cp_dump_tree): New function.
11612         * decl.c (init_decl_processing): Set lang_dump_tree.
11613         * decl2.c (flag_dump_translation_unit): Remove.
11614         * dump.c: Move most of it to ../c-dump.c.
11615         (cp_dump_tree): New function.
11616         * pt.c (add_maybe_template): Remove.
11617         * typeck.c (strip_array_types): Likewise.
11618
11619 2000-11-07  Eric Christopher  <echristo@redhat.com>
11620
11621         * decl.c (init_decl_processing): Change definition of
11622         __wchar_t to wchar_t.  Remove artificial declaration of
11623         wchar_t.
11624         * lex.c: Change instances of __wchar_t to wchar_t.
11625
11626 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
11627
11628         * lex.c (do_identifier): Don't lookup_name for operators.
11629         * parse.y (operator): Save looking_for_typename.
11630         (unoperator): Restore it.
11631         * spew.c (frob_opname): Use nth_token for lookahead.
11632
11633 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
11634
11635         * decl.c (grok_op_properties): Always use coerce_new_type and
11636         coerce_delete_type.
11637         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
11638         exception specification. Tidy up.
11639         (coerce_delete_type): Preserve exception specification. Tidy up.
11640
11641 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
11642
11643         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
11644         (push_binding_level), error.c (cp_tree_printer), pt.c
11645         (process_partial_specialization, tsubst_template_arg_vector),
11646         search.c (lookup_member): Use memset () instead of bzero ().
11647
11648 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
11649
11650         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
11651
11652 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
11653
11654         * Make-lang.in (c++.distdir): Remove.
11655
11656 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
11657
11658         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
11659         declarations from different namespaces to be combined.
11660
11661 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
11662
11663         * decl.c: Include tm_p.h.
11664
11665 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
11666
11667         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
11668
11669 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11670
11671         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
11672         (build_overload_value), repo.c (open_repo_file), xref.c
11673         (open_xref_file): Use strchr () and strrchr () instead of index ()
11674         and rindex ().
11675
11676 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
11677
11678         * call.c (build_over_call): Call fold on the CALL_EXPR.
11679
11680 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
11681
11682         * error.c (dump_template_decl): Separate template hearders with
11683         space not comma.
11684
11685 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
11686
11687         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
11688         TS_* flags with corresponding TFF_*.  Adjust prototypes of
11689         functions (which used to take a tree_string_flags) to take an int.
11690
11691         * cp-tree.h (enum tree_string_flags): Remove
11692         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
11693         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
11694         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
11695         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
11696         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
11697         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
11698         (type_as_string, decl_as_string, expr_as_string,
11699         context_as_string): Adjust prototype.
11700
11701         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
11702         instead of TS_PLAIN.
11703
11704         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
11705         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
11706         plain `0'.
11707
11708 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
11709
11710         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
11711         (linkage_kind): New enumeration.
11712         (decl_linkage): New function.
11713         * decl2.c (comdat_linkage): Extend comment.
11714         * error.c (dump_function_decl): Print the arguments used to
11715         instantiate a template, even when not printing the type of the
11716         function.
11717         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
11718         not TREE_PUBLIC, to test for external linkage.
11719         * tree.c (decl_linkage): New function.
11720
11721 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
11722
11723         * pt.c (instantiate_decl): Always instantiate static data members
11724         initialized in-class.
11725
11726 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
11727
11728         * Make-lang.in: Move all build rules here from Makefile.in,
11729         adapt to new context.  Wrap all rules that change the current
11730         directory in parentheses.  Expunge all references to $(P).
11731         When one command depends on another and they're run all at
11732         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
11733         all object-file generation rules.  Delete obsolete variables.
11734
11735         * Makefile.in: Delete.
11736         * config-lang.in: Delete outputs= line.
11737
11738 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
11739
11740         * error.c (dump_function_decl): Print no space between
11741         `ptr-operator' the `type-specifier' of the return type.
11742         (dump_type_prefix): Make sure we put space at the appropriate
11743         place.
11744
11745 2000-10-23  Jason Merrill  <jason@redhat.com>
11746
11747         * call.c (equal_functions): Also call decls_match for extern "C" fns.
11748
11749 2000-10-22  Jason Merrill  <jason@redhat.com>
11750
11751         * call.c (build_conditional_expr): Use ocp_convert to force
11752         rvalue conversion.
11753
11754 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
11755
11756         * call.c (standard_conversion): Use RVALUE_CONVs for all
11757         expressions that satisfy lvalue_p, not just those that satisfy
11758         real_lvalue_p.
11759
11760         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
11761
11762         * typeck.c (c_sizeof): Return an expression of `size_t' type,
11763         not one with TYPE_IS_SIZETYPE set.
11764         (dubious_conversion_warnings): Remove special-case code.
11765
11766 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
11767
11768         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
11769         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
11770         (dump_type_prefix): Print vector-of-int as 'int vector'.
11771         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
11772         * tree.c (walk_tree): Handle VECTOR_TYPE.
11773
11774         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
11775
11776 2000-10-21  Jason Merrill  <jason@redhat.com>
11777
11778         * parse.y (operator): Set got_object from got_scope.
11779         Set looking_for_typename.
11780         * decl.c (lookup_name_real): Clear val after setting from_obj.
11781         Reorganize diagnostic.
11782
11783 2000-10-20  Jason Merrill  <jason@redhat.com>
11784
11785         * tree.c (walk_tree): Don't walk into default args.
11786
11787         * error.c (dump_expr): Use host_integerp.
11788
11789 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
11790
11791         * typeck2.c (abstract_virtuals_error): Use "because" instead of
11792         "since" in error message.
11793
11794 2000-10-20  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11795
11796         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
11797
11798 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
11799
11800         * decl.c (revert_static_member_fn): Fixed typo.
11801
11802 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
11803
11804         * class.c (subobject_offset_fn): New type.
11805         (dfs_record_base_offsets): Remove.
11806         (record_base_offsets): Likewise.
11807         (dfs_search_base_offsets): Likewise.
11808         (record_subobject_offset): New function.
11809         (check_subobject_offset): Likewise.
11810         (walk_subobject_offsets): Likewise.
11811         (record_subobject_offsets): Likewise.
11812         (layout_conflict_p): Reimplement.
11813         (layout_nonempty_base_or_field): Correct handling of type
11814         conflicts during layout.
11815         (layout_empty_base): Likewise.
11816         (build_base_field): Adjust to handle new representation of empty
11817         base offset table.
11818         (build_base_fields): Likewise.
11819         (layout_virtual_bases): Likewise.
11820         (splay_tree_compare_integer_csts): New function.
11821         (layout_class_type): Use a splay_tree, rather than a varray, to
11822         represent the offsets of empty bases.
11823
11824         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
11825         * decl.c (select_decl): Don't return declarations that are
11826         DECL_ANTICIPATED.
11827
11828 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
11829
11830         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
11831         (fake_std_node): New macro.
11832         * decl.c (in_std): Rename to ...
11833         (in_fake_std): ... this.
11834         (flag_no_builtin): Remove.
11835         (flag_no_nonansi_builtin): Likewise.
11836         (walk_namespaces_r): Use fake_std_node.
11837         (push_namespace): Use std_identifier.
11838         (pop_namespace): Use in_fake_std.
11839         (lookup_name_real): Use fake_std_node.
11840         (init_decl_processing): When -fhonor-std, create the `std'
11841         namespace.  Don't create a dummy fake_std_node in that case.
11842         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
11843         (builtin_function): Put builtins whose names don't begin
11844         with `_' in the std namespace.
11845         * decl2.c (flag_no_builtin): Remove.
11846         (flag_no_nonansi_builtin): Likewise.
11847         (set_decl_namespace): Use fake_std_node.
11848         (validate_nonmember_using_decl): Likewise.
11849         (do_using_directive): Likewise.
11850         (handle_class_head): Likewise.
11851         * dump.c (dequeue_and_dump): Likewise.
11852         * except.c (init_exception_processing): Use std_identifier.
11853         * init.c (build_member_call): Use fake_std_node.
11854         * rtti.c (init_rtti_processing): Use std_identifier.
11855
11856 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
11857
11858         * cp-tree.h (back_end_hook): Remove declaration.
11859         * decl2.c (back_end_hook): Remove definition.
11860
11861         * dump.c (dequeue_and_dump): Dump TREE_USED.
11862
11863 2000-10-17  Brad Lucier <lucier@math.purdue.edu>
11864
11865         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
11866
11867 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
11868
11869         * decl.c (WINT_TYPE): Define.
11870         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
11871         c_size_type_node, signed_size_type_node and wint_type_node.
11872
11873 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
11874
11875         * decl2.c (warn_missing_format_attribute): New variable.
11876         (lang_decode_option): Decode -Wmissing-format-attribute.
11877
11878 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
11879
11880         * typeck.c (qualify_type): Remove.
11881         (composite_pointer_type): Fix handling of conversions to `cv void*'.
11882
11883 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11884
11885         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
11886
11887 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11888
11889         * Makefile.in (parse.c, parse.h): Create atomically.
11890
11891 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
11892
11893         * class.c (current_obstack): Remove.
11894         * decl.c (ggc_p): Remove.
11895         (start_decl): Don't use decl_tree_cons.
11896         (grokdeclarator): Don't use build_decl_list.
11897         (start_function): Don't use decl_tree_cons.
11898         (finish_function): Don't mess with obstacks.
11899         * decl2.c (grok_x_components): Don't use build_decl_list.
11900         * lex.c (make_call_declarator): Don't call decl_tree_cons.
11901         (implicitly_declare_fn): Don't call build_decl_list.
11902         * parse.y (frob_specs): Don't call build_decl_list or
11903         decl_tree_cons.
11904         (expr_or_declarator_intern): Don't call decl_tree_cons.
11905         (primary): Don't call build_decl_list.
11906         (fcast_or_absdcl): Likewise.
11907         (typed_declspecs): Don't call decl_tree_cons.
11908         (reserved_declspecs): Don't call build_decl_list.
11909         (declmods): Likewise.
11910         (reserved_typespecquals): Likewise.
11911         (aggr): Likewise.
11912         (new_type_id): Likewise.
11913         (cv_qualifiers): Likewise.
11914         (after_type_declarator_intern): Likewise.
11915         (notype_declarator_intern): Likewise.
11916         (absdcl_intern): Likewise.
11917         (named_parm): Likewise.
11918         * pt.c (most_specialized_class): Likewise.
11919         * repo.c (temporary_obstack): Make it a structure, not a pointer.
11920         (init_repo): Initialize it.
11921         * search.c (current_obstack): Remove.
11922         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
11923
11924 2000-10-09  Richard Henderson  <rth@cygnus.com>
11925
11926         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
11927         (c++ language support bits for libgcc): Remove.
11928         (c++.clean): Remove cplib2.txt cleanup.
11929         * config-lang.in (headers, lib2funcs): Remove.
11930
11931         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
11932         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
11933         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
11934         * inc/new.h, inc/typeinfo: Remove files.
11935
11936 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
11937
11938         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
11939         defined.
11940         (init_decl_processing): Initialize intmax_type_node and
11941         uintmax_type_node.
11942
11943 2000-10-06  Richard Henderson  <rth@cygnus.com>
11944
11945         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
11946         (original_result_rtx): Remove.
11947         * decl.c (save_function_data): Don't clear x_result_rtx.
11948         (mark_lang_function): Don't mark it either.
11949         * expr.c (fixup_result_decl): Remove.
11950         * semantics.c (genrtl_named_return_value): Frob the return decl
11951         before calling emit_local_var.
11952         (genrtl_finish_function): Don't call fixup_result_decl.
11953         Always emit the jump to return_label.
11954
11955 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
11956
11957         * pt.c (lookup_template_class): Set current access for enum.
11958         (tsubst_enum): Set file & line for enum decl.
11959
11960         * spew.c (yylex): Remove unused variable.
11961
11962 2000-10-05  Richard Henderson  <rth@cygnus.com>
11963
11964         * semantics.c (genrtl_finish_function): Don't init or check
11965         can_reach_end; remove noreturn and return value checks.
11966
11967 2000-10-05  Tom Tromey  <tromey@cygnus.com>
11968
11969         * init.c (build_java_class_ref): Use `build_static_name' with a
11970         suffix, not a prefix, to build the class object's name.
11971
11972 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11973
11974         * cp-tree.h (access_kind): Fix comment typo.
11975         * decl2.c (grokfield): Fix diagnostic typo.
11976         * semantics.c (finish_template_type): Fix comment typo.
11977         (finish_qualified_object_call_expr): Likewise.
11978
11979 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11980
11981         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
11982         tsubsting fails.
11983
11984 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11985
11986         * spew.c (frob_id): New static function.
11987         (frob_opname): Use it.
11988         (yylex): Use it.
11989
11990 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
11991
11992         * decl.c (lang_mark_false_label_stack): Remove.
11993         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
11994
11995 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
11996
11997         * gxxint.texi: Use @email for formatting email addresses.
11998
11999 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
12000
12001         * error.c: Remove direct obstack manipulation.  Replace with
12002         output_buffer-based formatting.  Adjust calls to removed macros.
12003         (obstack_chunk_alloc, obstack_chunk_free): Remove.
12004         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
12005         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
12006
12007 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
12008
12009         * ir.texi: Move to ../c-tree.texi.
12010
12011 2000-09-20  Jason Merrill  <jason@redhat.com>
12012
12013         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
12014
12015 2000-09-21  Andreas Jaeger  <aj@suse.de>
12016
12017         * errfn.c: Move declaration of cp_printer and cp_printers to ...
12018         * cp-tree.h: ... here.
12019
12020         * error.c: Remove declaration of cp_printer.
12021
12022 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
12023
12024         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
12025
12026 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
12027
12028         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
12029         users.
12030
12031 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
12032
12033         * decl.c (start_function): Robustify.
12034
12035 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12036
12037         * cp-tree.h (check_function_format): Accept a `status' parameter.
12038
12039         * call.c, typeck.c: Updates calls to `check_function_format'.
12040
12041 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
12042
12043         * decl2.c (handle_class_head): Always push some scope even
12044         in the error case.
12045
12046 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
12047
12048         * cp-tree.h (struct cp_language_function): Remove
12049         x_scope_stmt_stack and name_declared.
12050         (current_scope_stmt_stack): Remove.
12051         (function_name_declared_p): New macro.
12052         (struct lang_decl_flags): Use c_lang_decl as a base class.
12053         (context): Remove.
12054         (struct lang_decl): Replace saved_tree with context.
12055         (DECL_FRIEND_CONTEXT): Adjust accordingly.
12056         (SET_DECL_FRIEND_CONTEXT): Likewise.
12057         (DECL_VIRTUAL_CONTEXT): Likewise.
12058         (DECL_SAVED_TREE): Remove.
12059         (C_DECLARED_LABEL_FLAG): Likewise.
12060         (cplus_expand_expr_stmt): Don't declare.
12061         (add_decl_stmt): Likewise.
12062         (add_scope_stmt): Likewise.
12063         * decl.c (mark_stmt_tree): Remove.
12064         (case_compare): Likewise.
12065         (finish_case_label): Use c_add_case_label.
12066         (init_decl_processing): Set more language-specific hooks.
12067         (build_enumerator): Fix typo in comment.
12068         (cplus_expand_expr_stmt): Remove.
12069         (mark_lang_function): Use mark_c_language_function.
12070         (lang_mark_tree): Use c_mark_lang_decl.
12071         * decl2.c: Change order of inclusion.
12072         * except.c: Likewise.
12073         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
12074         back on c_expand_expr.
12075         * friend.c: Include expr.h.
12076         * init.c: Change order of inclusion.
12077         * Makefile.in: Update dependencies.
12078         * lex.h (free_lang_decl_chain): Remove.
12079         * optimize.c (maybe_clone_body): Use function_name_declared_p.
12080         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
12081         it doesn't exist.
12082         (instantiate_decl): Use function_name_declared_p.
12083         * semantics.c (lang_expand_expr_stmt): Remove.
12084         (set_current_function_name_declared): Likewise.
12085         (current_function_name_declared): Likewise.
12086         (begin_compound_stmt): Use function_name_declared_p.
12087         (add_decl_stmt): Remove.
12088         (setup_vtbl_ptr): Use function_name_declared_p.
12089         (add_scope_stmt): Remove.
12090         (current_scope_stmt_stack): New function.
12091         (cp_expand_stmt): Don't handle SCOPE_STMTs.
12092         (expand_body): Use function_name_declared_p.
12093         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
12094         * typeck.c: Change order of includes.
12095         (convert_sequence): Remove.
12096
12097 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
12098
12099         * lex.c (reswords): Add _Complex.
12100
12101 2000-09-14  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12102
12103         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
12104
12105 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
12106
12107         * init.c (begin_init_stmts): Don't use // comments.
12108
12109 2000-09-12  Jason Merrill  <jason@redhat.com>
12110
12111         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
12112         all non-extern arrays.
12113
12114         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
12115         typenames, too.  Downgrade complaint to pedwarn.
12116         (xref_tag): Warn about surprising behavior of 'friend struct T'.
12117         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
12118         'class This::Inherited'.
12119
12120 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
12121
12122         * decl.c (finish_case_label): Given the LABEL_DECL a
12123         DECL_CONTEXT.
12124
12125 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
12126
12127         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
12128         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
12129         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
12130         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
12131         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
12132         New macros.
12133         (sorry_for_unsupported_tree, print_scope_operator,
12134         print_left_paren, print_right_paren, print_left_bracket,
12135         print_right_bracket, print_whitespace): Likewise.
12136         (aggr_variety): Rename to class_key_or_enum.
12137         (print_type): Rename to print_type_id.
12138         (print_type_specifier_seq, print_simple_type_specifier,
12139         print_elaborated_type_specifier,
12140         print_rest_of_abstract_declarator,
12141         print_parameter_declaration_clause, print_exception_specification,
12142         print_nested_name_specifier, print_template_id,
12143         typedef_original_name,  print_template_argument_list_start,
12144         print_template_argument_list_end): New functions.
12145
12146 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
12147
12148         * ir.texi: Add more documentation.
12149
12150 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
12151
12152         * cp-tree.h (struct saved_scope): Remove x_function_parms.
12153         (current_function_parms): Don't define.
12154         (struct cp_language_function): Remove parms_stored.
12155         (current_function_just_assigned_this): Don't define.
12156         (current_function_parms_stored): Likewise.
12157         (static_ctors): Declare.
12158         (static_dtors): Likewise.
12159         (SF_EXPAND): Don't define.
12160         (expand_start_early_try_stmts): Remove declaration.
12161         (store_parm_decls): Likewise.
12162         * decl.c (static_ctors): Don't declare.
12163         (static_dtors): Likewise.
12164         (struct binding_level): Remove this_block.
12165         (poplevel): Remove dead code.
12166         (set_block): Likewise.
12167         (mark_binding_level): Don't mark this_block.
12168         (mark_saved_scope): Don't mark x_function_parms.
12169         (init_decl_processing): Don't add current_function_parms as a GC
12170         root.
12171         (check_function_type): Change prototype.
12172         (start_function): Remove RTL-generation code.
12173         (expand_start_early_try_stmts): Remove.
12174         (store_parm_decls): Give it internal linkage.  Remove
12175         RTL-generation code.
12176         (finish_function): Remove RTL-generation code.
12177         * decl2.c (static_ctors): Fix formatting.
12178         (static_dtors): Likewise.
12179         * method.c (use_thunk): Don't call store_parm_decls.
12180         (synthesize_method): Likewise.
12181         * optimize.c (maybe_clone_body): Likewise.
12182         * parse.y (fn.def2): Likewise.
12183         (.set_base_init): Likewise.
12184         (nodecls): Likewise.
12185         * pt.c (instantiate_decl): Likewise.
12186         * rtti.c (synthesize_tinfo_fn): Likewise.
12187         * semantics.c (genrtl_try_block): Simplify.
12188         (expand_body): Use genrtl_start_function and
12189         genrtl_finish_function.
12190         (genrtl_start_function): New function.
12191         (genrtl_finish_function): Likewise.
12192
12193 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
12194
12195         * error.c (cp_tree_printer, case 'P'): Append break.
12196
12197 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
12198
12199         * cp-tree.h (frob_opname): Declare.
12200         * parse.y (saved_scopes): New static variable.
12201         (cp_parse_init): Adjust.
12202         (do_id): If lastiddecl is NULL, do do_identifier.
12203         (operator): Save scope information.
12204         (unoperator): New reduction. Restore scope information.
12205         (operator_name): Append unoperator. Call frob_opname.
12206         * spew.c (frob_opname): Define.
12207
12208 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
12209
12210         * decl.c, rtti.c: Include defaults.h if not already included.
12211         Don't define the *_TYPE_SIZE macros.
12212
12213 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
12214
12215         * cp-tree.h (push_switch): Change prototype.
12216         (check_cp_case_value): Remove declaration.
12217         (decl_constant_value): Likewise.
12218         * decl.c (struct cp_switch): Add switch_stmt and cases.
12219         (case_compare): New function.
12220         (push_switch): Set switch_stmt.  Initialize cases.
12221         (pop_switch): Clean up cases.
12222         (define_case_label): Rename to ...
12223         (finish_case_label): ... this.  Do semantic analysis for case
12224         labels here.
12225         (start_function): Correct comment.
12226         * decl2.c (check_cp_case_value): Remove.
12227         * expr.c (do_case): Remove.
12228         * pt.c (tsubst_expr): Adjust call to finish_case_label.
12229         * semantics.c (genrtl_do_poplevel): Remove declaration.
12230         (RECHAIN_STMTS): Remove.
12231         (finish_break_stmt): Use build_break_stmt.
12232         (finish_continue_stmt): Use build_continue_stmt.
12233         (finish_switch_cond): Adjust condition here, rater than in
12234         c_expand_start_case.
12235         (finish_case_label): Remove.
12236         * typeck.c (c_expand_return): Remove.
12237         (c_expand_start_case): Likewise.
12238
12239 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
12240
12241         * ir.texi: Document type nodes.
12242
12243 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
12244
12245         * cp-tree.h (init_cp_semantics): Declare.
12246         (genrtl_try_block): Don't declare.
12247         (genrtl_handler): Likewise.
12248         (genrtl_catch_block): Likewise.
12249         (genrtl_ctor_stmt): Likewise.
12250         (genrtl_subobject): Likewise.
12251         (genrtl_do_poplevel): Likewise.
12252         (genrtl_named_return_value): Likewise.
12253         * lex.c (init_parse): Call init_cp_semantics.
12254         * semantics.c (genrtl_try_block): Give it internal linkage.
12255         (genrtl_handler): Likewise.
12256         (genrtl_catch_block): Likewise.
12257         (genrtl_ctor_stmt): Likewise.
12258         (genrtl_subobject): Likewise.
12259         (genrtl_do_poplevel): Likewise.
12260         (genrtl_named_return_value): Likewise.
12261         (lang_expand_stmt): Rename to ...
12262         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
12263         (init_cp_semantics): Define.
12264
12265         * decl.c (initialize_local_var): Remove RTL-generating code.
12266         * semantics.c (genrtl_try_block): Fix formatting.
12267
12268         Move statement-tree facilities from C++ to C front-end.
12269         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
12270         (void_zero_node): Remove.
12271         (stmt_tree): Likewise.
12272         (scope_chain): Adjust.
12273         (language_function): Rename to cp_language_function.
12274         (cp_function_chain): Adjust.
12275         (current_stmt_tree): Remove.
12276         (last_tree): Likewise.
12277         (last_expr_type): Likewise.
12278         (struct lang_decl): Adjust.
12279         (STMT_IS_FULL_EXPR_P): Remove.
12280         (add_tree): Remove.
12281         (begin_stmt_tree): Likewise.
12282         (finish_stmt_tree): Likewise.
12283         (walk_tree_fn): Likewise.
12284         (walk_stmt_tree): Likewise.
12285         * class.c (finish_struct): Replace use of add_tree with add_stmt.
12286         * decl.c (mark_stmt_tree): Adjust type.
12287         (init_decl_processing): Don't build void_zero_node.
12288         (initialize_local_var): Adjust usage of current_stmt_tree.
12289         (finish_enum): Use add_stmt, not add_tree.
12290         (save_function_data): Adjust use of language_function.
12291         (finish_constructor_body): Use add_stmt, not add_tree.
12292         (finish_destructor_body): Likewise.
12293         (push_cp_function_context): Adjust use of language_function.
12294         (pop_cp_function_context): Likewise.
12295         (mark_lang_function): Likewise.
12296         (mark_cp_function_context): Likewise.
12297         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
12298         (build_vec_init): Likewise.
12299         * semantics.c (SET_LAST_STMT): Remove.
12300         (RECHAIN_STMTS): Don't use it.
12301         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
12302         (current_stmt_tree): Define.
12303         (add_tree): Remove.
12304         (finish_goto_stmt): Use add_stmt, not add_tree.
12305         (finish_expr_stmt): Likewise.
12306         (begin_if_stmt): Likewise.
12307         (finish_then_clause): Likewise.
12308         (begin_while_stmt): Likewise.
12309         (begin_do_stmt): Likewise.
12310         (finish_return_stmt): Likewise.
12311         (begin_for_stmt): Likewise.
12312         (finish_break_stmt): Likewise.
12313         (finish_continue_stmt): Likewise.
12314         (begin_switch_stmt): Likewise.
12315         (finish_case_label): Likewise.
12316         (begin_try_block): Likewise.
12317         (begin_function_try_block): Likewise.
12318         (begin_handler): Likewise.
12319         (begin_catch_block): Likewise.
12320         (begin_compound_stmt): Likewise.
12321         (begin_asm_stmt): Likewise.
12322         (finish_asm_stmt): Likewise.
12323         (finish_label_stmt): Likewise.
12324         (add_decl_stmt): Likewise.
12325         (finish_subobject): Likewise.
12326         (finish_decl_cleanup): Likewise.
12327         (finish_named_return_value): Likewise.
12328         (setup_vtbl_ptr): Likewise.
12329         (add_scope_stmt): Likewise.
12330         (finish_stmt_expr): Likewise.
12331         (prune_unused_decls): Remove.
12332         (begin_stmt_tree): Likewise.
12333         (finish_stmt_tree): Likewise.
12334         (prep_stmt): Adjust use of current_stmt_tree.
12335         (lang_expand_stmt): Likewise.
12336         * tree.c (statement_code_p): Remove.
12337         (cp_statement_code_p): New function.
12338         (walk_stmt_tree): Remove.
12339         (init_tree): Set lang_statement_code_p.
12340
12341 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
12342
12343         Integrated preprocessor.
12344
12345         * Make-lang.in, Makefile.in: Remove all references to input.c,
12346         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
12347         * gxx.gperf, hash.h, input.c: Delete.
12348         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
12349         initialized properly.
12350
12351         * class.c (fixup_pending_inline): Take a tree, not a
12352         struct pending_inline *.  All callers changed.
12353         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
12354         RID_PROTECTED entries in ridpointers[] array here.
12355         * decl.c (duplicate_decls): Do not refer to struct
12356         pending_inline.
12357         (record_builtin_type, init_decl_processing): Use RID_MAX not
12358         CP_RID_MAX.
12359         (grokdeclarator): Use C_IS_RESERVED_WORD.
12360         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
12361         cpplib.
12362         (grok_x_components): Do not inspect pending_inlines chain.
12363
12364         * cp-tree.h (struct lang_identifier): Add rid_code entry.
12365         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
12366         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
12367         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
12368         TIME_IDENTIFIER_FILEINFO): Kill.
12369         Update prototypes.
12370         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
12371         single 32-bit word.
12372         * parse.y: Call do_pending_inlines unconditionally.
12373         reinit_parse_for_method is now snarf_method.  fn.defpen is no
12374         longer necessary.  Remove unnecessary <itype> annotation on
12375         SCOPE.  Do not refer to end_of_file or struct pending_inline.
12376         * semantics.c (begin_inline_definitions): Call
12377         do_pending_inlines unconditionally.
12378
12379         * lex.c: Remove all code now shared with C front end.
12380         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
12381         into the get_identifier table.  Rewrite pragma handling to
12382         work with the registry.  Move code to save tokens for later
12383         processing to spew.c.
12384
12385         * spew.c: Rewrite everything in terms of token streams instead
12386         of text.  Move routines here from lex.c / input.c as
12387         appropriate.  GC-mark trees hanging off the pending inlines
12388         chain.
12389
12390 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
12391
12392         * NEWS: Mention that the named return value extension has been
12393         deprecated.
12394         * cp-tree.h (original_result_rtx): Define.
12395         (TREE_REFERENCE_EXPR): Remove.
12396         (DECL_VPARENT): Likewise.
12397         (pushdecl_nonclass_level): Likewise.
12398         (store_return_init): Likewise.
12399         (reinit_lang_specific): Likewise.
12400         (genrtl_named_return_value): Change prototype.
12401         * decl.c (original_result_rtx): Remove.
12402         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
12403         Do not generate RTL for local variables here.
12404         (store_return_init): Remove.
12405         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
12406         store_return_init.
12407         (finish_named_return_value): Adjust accordingly.  Warn that this
12408         extension is deprecated.
12409         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
12410
12411 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12412
12413         * pt.c (type_unification_real): Replace switch with if.
12414         (unify): Tsubst non-type parms before comparing.
12415
12416 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12417
12418         * error.c (dump_typename): New function, broken out of ...
12419         (dump_type): ... here. Use it.
12420         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
12421
12422 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12423
12424         * init.c (build_offset_ref): Deal with namespace scoped
12425         TEMPLATE_ID_EXPRs.
12426
12427 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12428
12429         * class.c (resolve_address_of_overloaded_function): Add
12430         explanation message.
12431         * decl.c (define_case_label): Reformat explanation.
12432         * decl2.c (finish_static_data_member_decl): Likewise.
12433         (grokfield): Likewise.
12434         * friend.c (do_friend): Likewise.
12435
12436 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
12437
12438         * tree.c (walk_tree): Expose tail recursion.
12439         (walk_stmt_tree): New function.
12440         * cp-tree.h: Prototype walk_stmt_tree.
12441         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
12442         the BLOCKs directly.  If a BLOCK has no variables after
12443         pruning, discard it.
12444         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
12445         restore the line number.
12446
12447 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
12448
12449         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
12450         (pt.o): Remove dependency on HTAB_H.
12451         * cp-tree.h: Include hashtab.h.
12452         (walk_tree): Change prototype.
12453         (walk_tree_without_duplicates): New function.
12454         * decl.c (check_default_argument): Use it.
12455         * optimize.c (remap_decl): Adjust calls to walk_tree.
12456         (copy_body): Likewise.
12457         (expand_calls_inline): Likewise.
12458         (calls_setjmp_p): Use walk_tree_without_duplicates.
12459         * pt.c: Don't include hashtab.h.
12460         (for_each_template_parm): Use walk_tree_without_duplicates.
12461         * semantics.c (finish-stmt_tree): Likewise.
12462         (expand_body): Likewise.
12463         * tree.c (walk_tree): Add additional parameter.
12464         (walk_tree_without_duplicates): New function.
12465         (count_trees): Use it.
12466         (verify_stmt_tree): Adjust call to walk_tree.
12467         (find_tree): Use walk_tree_without_duplicates.
12468         (no_linkage_check): Likewise.
12469         (break_out_target_exprs): Adjust call to walk_tree.
12470         (cp_unsave): Likewise.
12471
12472 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12473
12474         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
12475         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
12476         * cp-tree.h (TYPE_BINFO): Adjust comment.
12477         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
12478         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
12479         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
12480         (TYPE_TEMPLATE_INFO): Likewise.
12481         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
12482         * class.c (push_nested_class): Likewise.
12483         * decl.c (lookup_name_real): Likewise.
12484         (grokdeclarator): Likewise.
12485         (grok_op_properties): Likewise.
12486         (xref_tag): Likewise.
12487         (xref_basetypes): Likewise.
12488         * decl2.c (constructor_name_full): Likewise.
12489         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
12490         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
12491         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
12492         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12493         (dump_type_suffix): Likewise.
12494         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
12495         instead.
12496         (get_aggr_from_typedef): Likewise.
12497         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
12498         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12499         (write_template_parm): Likewise.
12500         (write_template_template_parm): Check tree code instead of
12501         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12502         * method.c (build_overload_nested_name): Add
12503         BOUND_TEMPLATE_TEMPLATE_PARM.
12504         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
12505         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12506         * pt.c (convert_template_argument): Check tree code instead of
12507         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12508         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
12509         (for_each_template_parm): Adjust comment.
12510         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
12511         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12512         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
12513         template_args_equal to compare template template parameter cases.
12514         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12515         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
12516         instead.
12517         * tree.c (copy_template_template_parm): Decide whether to create
12518         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
12519         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12520         (copy_tree_r): Likewise.
12521         * typeck.c (comptypes): Likewise.  Check tree code instead of
12522         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12523
12524 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
12525
12526         * decl.c (finish_function): Move the code for handling functions
12527         marked with the constructor and destructor attributes inside the
12528         expand_p block.
12529
12530 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
12531
12532         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
12533
12534 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
12535
12536         * pt.c (lookup_template_class): Remove abort.
12537         * tree.c (get_type_decl): Allow error_mark_node.
12538
12539 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
12540
12541         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
12542         TEMPLATE_ID_EXPRs.
12543
12544 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
12545
12546         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
12547         new ABI mangling.
12548
12549 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
12550
12551         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
12552         union tag mismatch error reporting.
12553
12554 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
12555
12556         * call.c (build_scoped_method_call): Check it is not a namespace.
12557
12558 2000-08-30  Jason Merrill  <jason@redhat.com>
12559
12560         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
12561
12562         * tree.c (bot_manip): Check TREE_CONSTANT rather than
12563         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
12564         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
12565
12566         * decl.c (start_function): Always call make_function_rtl.
12567
12568 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
12569
12570         * semantics.c (prune_unused_decls): New function.
12571         (finish_stmt_tree): Call it via walk_tree.
12572
12573 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
12574
12575         * class.c (build_secondary_vtable): Constify a char *.
12576         * decl.c (init_decl_processing): Initialize function_id_node,
12577         pretty_function_id_node, and func_id_node.
12578         * input.c (struct input_source): Constify 'str'.
12579         (feed_input): Constify first argument.
12580         * mangle.c (write_identifier): Constify argument.
12581         * pt.c (mangle_class_name_for_template): Constify argument.
12582
12583 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
12584
12585         * typeck.c (mark_addressable): Remove code that pokes around in
12586         RTL.
12587
12588 2000-08-28  Jason Merrill  <jason@redhat.com>
12589
12590         * lex.c (file_name_nondirectory): Move to toplev.c.
12591
12592         * cp-tree.h (LOCAL_CLASS_P): New macro.
12593         * class.c (finish_struct_1): Use it.
12594
12595 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
12596
12597         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
12598         (write_encoding): Pass another argument to write_name.
12599         (write_name): Add ignore_local_scope parameter.  Fix handling of
12600         local names.
12601         (write_nested_name): Use write_unqualified_name.
12602         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
12603         (write_template_prefix): Use write_unqualified_name.
12604         (write_component): Remove.
12605         (write_local_name): Add parameter.  Use direct local entity to
12606         discriminator calculation.
12607         (write_class_enum_type): Pass another argument to write_name.
12608         (write_template_template_arg): Likewise.
12609         (make_guard_variable): Likewise.
12610
12611 2000-08-27  Jason Merrill  <jason@redhat.com>
12612
12613         * decl.c (pushdecl): Matching decls for local externs are found in
12614         the current level.  Propagate linkage information from previous
12615         declarations.
12616
12617 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
12618
12619         * ir.texi (Expressions): Fix typo.
12620
12621 2000-08-25  Greg McGary  <greg@mcgary.org>
12622
12623         * tree.c (init_tree): Use ARRAY_SIZE.
12624
12625 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
12626
12627         * error.c (cp_tree_printer): Rework.
12628
12629 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
12630
12631         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
12632         dyn-string.o.
12633         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
12634         (cp-demangle.o): Remove target.
12635         (dyn-string.o): Likewise.
12636
12637         * decl.c (grokfndecl): Require that `main' return an `int'.
12638         * mangle.c (write_encoding): Don't mangle return types for
12639         conversion functions.
12640
12641 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
12642
12643         * error.c (tree_formatting_info): New data type.
12644         (tree_being_formatted): New macro.
12645         (tree_formatting_flags): Likewise.
12646         (put_whitespace): Likewise.
12647         (print_tree_identifier): Likewise.
12648         (print_identifier): Likewise.
12649         (cp_tree_printer, print_function_argument_list, print_declaration,
12650         print_expression, print_function_declaration,
12651         print_function_parameter, print_type, print_cv_qualifier): New
12652         functions.
12653         (init_error): Initialize lang_printer.
12654
12655 2000-08-24  Jason Merrill  <jason@redhat.com>
12656
12657         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
12658         adjustment necessary.
12659
12660 2000-08-24  Greg McGary  <greg@mcgary.org>
12661
12662         * cp-tree.h (MAIN_NAME_P): Remove macro.
12663
12664 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
12665
12666         * error.c (print_instantiation_context): Don't forget to flush the
12667         buffer.
12668
12669 2000-08-23  Jason Merrill  <jason@redhat.com>
12670
12671         * typeck.c (build_ptrmemfunc): Save the input pmf.
12672
12673         * method.c (process_modifiers): Use same_type_p.
12674
12675 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
12676
12677         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
12678         * mangle.c (write_function_type): Change prototype.
12679         (write_encoding): Don't mangle return types for
12680         constructors or destructors.
12681         (write_type): Adjust call to write_function_type.
12682         * pt.c (instantiate_template): Instantiate alternate entry points
12683         when instantiating the main function.
12684
12685 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
12686
12687         * error.c (cp_print_error_function): Don't use embedded '\n' in
12688         output_printf.
12689
12690 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
12691
12692         * decl.c (init_decl_processing): Remove bogus initialization.
12693         * error.c (lang_print_error_function): Restore here.
12694         (init_error): Initialize print_error_function.
12695
12696 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
12697
12698         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
12699
12700 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
12701
12702         * Makefile.in (error.o): Depends on diagnostic.h
12703
12704         * cp-tree.h (problematic_instantiation_changed,
12705         record_last_problematic_instantiation, current_instantiation,
12706         print_instantiation_context): Declare.
12707         (maybe_print_template_context): Remove.
12708
12709         * decl.c (init_decl_processing): Set print_error_function to NULL.
12710         (lang_print_error_function): Remove, since we're using a new
12711         machinery.
12712
12713         * error.c: #include diagnostic.h
12714         (function_category): New function.
12715         (cp_diagnostic_starter): Likewise.
12716         (cp_diagnostic_finalizer): Likewise.
12717         (cp_print_error_function): Likewise.
12718         (maybe_print_instantiation_context): Likewise.
12719         (print_instantiation_full_context): Likewise.
12720         (print_instantiation_partial_context): Likewise.
12721         (print_instantiation_context): Define.
12722         (init_error): Initialize diagnostic pager and finalizer.
12723
12724         * pt.c (problematic_instantiation_changed): Define.
12725         (record_last_problematic_instantiation): Likewise.
12726         (current_instantiation): Likewise.
12727         (maybe_print_template_context): Remove.
12728         (print_template_context): Likewise.
12729         (current_tinst_level): Make static to reflect Brendan Kehoe's
12730         change of 1995-04-13.
12731         (push_tinst_level): Call print_instantiation_context.
12732
12733 2000-08-21  Nix  <nix@esperi.demon.co.uk>
12734
12735         * lang-specs.h: Do not process -o or run the assembler if
12736         -fsyntax-only.
12737
12738 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
12739
12740         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
12741         variables.
12742         * decl2.c (lang_decode_option): Disable gettext attributes for
12743         -ansi.
12744
12745 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
12746
12747         * lex.c (lang_init_options): Default diagnostic message maximum
12748         length to 80, when line-wrapping.
12749
12750 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
12751
12752         * class.c (build_vtbl_initializer): Clear the entire
12753         vtbl_init_data.  Start keeping track of the functions for which we
12754         have created vcall offsets here.
12755         (dfs_build_vcall_offset_vtbl_entries): Remove.
12756         (build_vcall_offset_vtbl_entries): Reimplement.
12757         (add_vcall_offset_vtbl_entries_r): New function.
12758         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
12759         computing when vcall offsets are necessary.
12760
12761 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12762
12763         * decl.c (member_function_or_else): Use cp_error ... %T.
12764         (grokdeclarator): Likewise.
12765         (start_method): Likewise.
12766         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
12767
12768 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12769
12770         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
12771         TYPE_DECLs.
12772
12773 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12774
12775         * cp-tree.h (PTRMEM_OK_P): New macro.
12776         (itf_ptrmem_ok): New enumeration value.
12777         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
12778         argument. Diagnose implicit pointer to member.
12779         (instantiate_type): Don't diagnose implicit pointer to member
12780         here. Pass itf_ptrmem_ok if ok. Adjust calls to
12781         resolve_address_of_overloaded_function.
12782         * init.c (build_offset_ref): Set PTRMEM_OK_P.
12783         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
12784         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
12785         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
12786         (build_unary_op): Deal with single non-static member in
12787         microsoft-land.
12788
12789 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12790
12791         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
12792
12793 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12794
12795         * cp-tree.h (enum_name_string): Remove prototype.
12796         (report_case_error): Remove prototype.
12797         * cp/typeck2.c (enum_name_string): Remove.
12798         (report_case_error): Remove.
12799         * error.c (dump_expr): Deal with enum values directly.
12800         Correctly negate integer constant.
12801
12802 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12803
12804         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
12805         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
12806         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
12807         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
12808         (__cxa_vec_new): Use __cxa_vec_new2.
12809         (__cxa_vec_delete): Use __cxa_vec_delete2.
12810
12811 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12812
12813         * vec.cc (__cxa_vec_new): Set "C" linkage.
12814         (__cxa_vec_ctor): Likewise.
12815         (__cxa_vec_cctor): Likewise.
12816         (__cxa_vec_dtor): Likewise.
12817         (__cxa_vec_delete): Likewise.
12818         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
12819         (__cxa_vec_ctor): Likewise.
12820         (__cxa_vec_cctor): Likewise.
12821         (__cxa_vec_dtor): Likewise.
12822         (__cxa_vec_delete): Likewise.
12823
12824 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12825
12826         * class.c (instantiate_type): Reinstate local variable
12827         deleted in previous change.
12828
12829         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
12830         itf_no_attributes.
12831
12832 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12833
12834         * cp-tree.h (instantiate_type_flags): New enumeration.
12835         (instantiate_type): Change parameter.
12836         * class.c (instantiate_type): Adjust prototype. Adjust.
12837         * call.c (standard_conversion): Adjust instantiate_type call.
12838         (reference_binding): Likewise.
12839         (build_op_delete_call): Likewise.
12840         (convert_like_real): Likewise.
12841         * cvt.c (cp_convert_to_pointer): Likewise.
12842         (convert_to_reference): Likewise.
12843         * pt.c (convert_nontype_argument): Likewise.
12844         * typeck.c (build_binary_op): Likewise.
12845         (build_ptrmemfunc): Likewise.
12846         (convert_for_assignment): Likewise.
12847
12848 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12849
12850         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
12851         (current_aggr): Define.
12852         * decl.c (grokdeclarator): Make sure a friend class is an
12853         elaborated type specifier.
12854         * parse.y (current_aggr): Remove static definition.
12855         (cp_parse_init): Adjust.
12856         (structsp): Clear and restore current_aggr.
12857         (component_decl_list): Clear current_aggr.
12858
12859         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
12860         aggregate tag on the typename's context.
12861
12862         * pt.c (tsubst_friend_class): Return error_mark_node, if
12863         parms becomes NULL.
12864         (instantiate_class_template): Ignore error_mark_node friend types.
12865
12866 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
12867
12868         * cvt.c (warn_ref_binding): New static function, broken out of ...
12869         (convert_to_reference): ... here. Use it.
12870
12871 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
12872
12873         * parse.y (template_arg): Add rule for template qualified with
12874         global scope.
12875
12876 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12877
12878         * decl2.c (add_function): Reorganize.
12879         (arg_assoc): Do not consider function template decls.
12880
12881 2000-08-11  Jason Merrill  <jason@redhat.com>
12882
12883         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
12884         looking inside.
12885
12886 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12887
12888         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
12889         (lookup_nested_tag): Likewise.
12890
12891         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
12892         can be produced.
12893
12894 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12895
12896         * parse.y (named_complex_class_head_sans_basetype): Remove
12897         always true if.
12898
12899 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12900
12901         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
12902         explicit TEMPLATE_ID_EXPR args.
12903         (build_expr_from_tree, case CALL_EXPR): Likewise.
12904
12905 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12906
12907         * decl.c (check_tag_decl): Diagnose typename's which don't
12908         declare anything.
12909
12910 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
12911
12912         * init.c (build_aggr_init): Reject bogus array initializers
12913         early.
12914
12915 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
12916
12917         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
12918         runtime.
12919         * cp/tinfo.cc (__dynamic_cast): Likewise.
12920         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
12921
12922 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
12923
12924         * cvt.c (convert_to_pointer_force): Fix error message when
12925         attempting to cast from ambiguous base.
12926
12927 2000-08-08  Jason Merrill  <jason@redhat.com>
12928
12929         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
12930         (tsubst_template_arg_vector): Likewise.
12931
12932         * decl2.c (build_anon_union_vars): Choose the largest field; don't
12933         assume that one will be as large as the union.
12934
12935 2000-08-07  Kazu Hirata  <kazu@hxi.com>
12936
12937         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
12938         * decl.c (pop_labels): Likewise.
12939
12940 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
12941
12942         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
12943         specifications.
12944         (__pointer_to_member_type_info): Likewise.
12945         (__base_class_info): Likewise.
12946         (__class_type_info): Likewise.
12947         (__si_class_type_info): Likewise.
12948         (__vmi_class_type_info): Likewise.
12949         * tinfo.cc (__si_class_type_info::__do_find_public_src):
12950         Changed member names to match specifications.
12951         (__vmi_class_type_info::__do_find_public_src): Likewise.
12952         (__si_class_type_info::__do_dyncast): Likewise.
12953         (__vmi_class_type_info::__do_dyncast): Likewise.
12954         (__si_class_type_info::__do_upcast): Likewise.
12955         (__vmi_class_type_info::__do_upcast): Likewise.
12956         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
12957         (__pbase_type_info::__pointer_catch): Likewise.
12958         (__pointer_type_info::__pointer_catch): Likewise.
12959         (__pointer_to_member_type_info::__pointer_catch): Likewise.
12960
12961 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
12962
12963         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
12964         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
12965         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
12966
12967 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
12968
12969         * cp-tree.h (add_method): Change prototype.
12970         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
12971         Don't double the size of the method vector in the error case.
12972         (handle_using_decl): Adjust call to add_method.
12973         (add_implicitly_declared_members): Likewise.
12974         (clone_function_decl): Likewise.
12975         * decl2.c (check_classfn): Likewise.
12976         * semantics.c (finish_member_declaration): Likewise.
12977
12978 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
12979
12980         * decl.c (flag_isoc94): New variable.
12981
12982 2000-08-02  Jason Merrill  <jason@redhat.com>
12983
12984         * pt.c (do_type_instantiation): Add complain parm; don't complain
12985         if called recursively.
12986         * cp-tree.h, parse.y: Adjust.
12987
12988 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
12989
12990         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
12991         -Wno-strict-prototypes.
12992
12993         * g++spec.c: Adjust type of second argument to
12994         lang_specific_driver, and update code as necessary.
12995
12996         * cp-tree.h: Don't prototype min_precision here.
12997         (my_friendly_assert): Cast expression to void.
12998         * semantics.c (do_poplevel): Initialize scope_stmts.
12999
13000 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
13001
13002         * cp-tree.h (DECL_NEEDED_P): Tweak.
13003
13004 2000-07-28  Jason Merrill  <jason@redhat.com>
13005
13006         * lang-specs.h: Use %i in rule for .ii files.
13007
13008 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
13009
13010         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
13011
13012 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
13013
13014         Allow indirect primary bases.
13015         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
13016         primary_base.
13017         (CLASSTYPE_VFIELD_PARENT): Remove.
13018         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
13019         (BINFO_PRIMARY_BINFO): Remove.
13020         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
13021         (BINFO_VBASE_PRIMARY_P): Likewise.
13022         (BINFO_PRIMARY_BASE_OF): New macro.
13023         (BINFO_INDIRECT_PRIMARY_P): Likewise.
13024         (get_primary_binfo): New function.
13025         * decl.c (lang_mark_tree): Make lang_type::primary_base.
13026         * class.c (vcall_offset_data_s): Rename to ...
13027         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
13028         and add ctor_vtbl_p.
13029         (get_derived_offset): Use get_primary_binfo.
13030         (dfs_mark_primary_bases): Adjust handling of virtual primary
13031         bases.
13032         (mark_primary_bases): Likewise.
13033         (set_primary_base): Take a binfo, not an integer, as a
13034         representation of the primary base.
13035         (indirect_primary_base_p): Remove.
13036         (determine_primary_base): Adjust for indirect primary bases.
13037         (dfs_find_final_overrider): Fix typo in coment.
13038         (update_vtable_entry_for_fn): Use get_primary_binfo.
13039         (layout_nonempty_base_or_field): Tweak.
13040         (build_base_fields): Adjust for new primary base semantics.
13041         (dfs_propagate_binfo_offsets): Remove.
13042         (propagate_binfo_offsets): Rewrite.
13043         (dfs_set_offset_for_shared_vbases): Remove.
13044         (layout_virtual_bases): Don't use it.
13045         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
13046         ABI.
13047         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
13048         CLASSTYPE_VFIELD_PARENT.
13049         (dfs_get_primary_binfo): New function.
13050         (get_primary_binfo): Likewise.
13051         (dump_class_hierarchy_r): Tweak printing of primary bases.
13052         (build_vtbl_initializer): Fix typo in comments.  Use
13053         vtbl_init_data.
13054         (build_vcall_and_vbase_vtbl_entries): Likewise.
13055         (build_vbaes_offset_vtbl_entries): Likewise.
13056         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
13057         BV_VCALL_INDEX to handle indirect primary bases.
13058         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
13059         (build_rtti_vtbl_entries): Likewise.
13060         * search.c (get_shared_vbase_if_not_primary): Tweak.
13061         (find_vbase_instance): Likewise.
13062         (binfo_for_vtable): Simplify.
13063         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
13064         (make_binfo): Make it have 11 entries.
13065
13066 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
13067
13068         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
13069         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
13070         ascertaining primaryness.
13071         (G): Remove template_args.
13072         (decl_is_template_id): New function.
13073         (write_encoding): Use decl_is_template_id.
13074         (write_name): Likewise.  Handle type_decls.  Get main variant of
13075         type decls.
13076         (write_nested_name): Likewise.
13077         (write_prefix): Likewise.
13078         (write_template_prefix): Likewise.
13079         (write_special_name_constructor): Remove defunct production from
13080         comment.
13081         (write_bare_function_type): Remove comment about absent parameter.
13082         (write_template_template_arg): Add missing grammar production to
13083         comment.
13084
13085 2000-07-27  Jason Merrill  <jason@redhat.com>
13086
13087         * decl.c (duplicate_decls): If common_type produces a non-typedef
13088         type for a typedef, just use the old type.
13089
13090 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
13091
13092         * cp-tree.h (function_depth): Declare.
13093         (verify_stmt_tree): Likewise.
13094         (find_tree): Likewise.
13095         * decl.c (function_depth): Give it external linkage.
13096         * optimize.c (optimize_function): Increment and decrement it.
13097         * tree.c (verify_stmt_tree_r): New function.
13098         (verify_stmt_tree): Likewise.
13099         (find_tree_r): Likewise.
13100         (find_tree): Likewise.
13101
13102 2000-07-27  Jason Merrill  <jason@redhat.com>
13103
13104         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
13105         TYPE_PTRMEMFUNC_P.
13106         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
13107
13108 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
13109
13110         * decl.c (start_cleanup_fn): Mark the function as `inline'.
13111         * decl2.c (get_guard): Call cp_finish_decl, not
13112         rest_of_decl_compilation, for local guards.
13113         * lex.c (do_identifier): Remove unused variable.
13114
13115 2000-07-26      Marc Espie <espie@cvs.openbsd.org>
13116
13117         * parse.y:  Add missing ';'.
13118
13119 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
13120
13121         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
13122         of `extern "C++"'.
13123
13124 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
13125
13126         Kill strict_prototype. Backwards compatibility only for
13127         non NO_IMPLICIT_EXTERN_C systems.
13128         * cp-tree.h (flag_strict_prototype): Remove.
13129         (strict_prototype): Remove.
13130         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
13131         * decl.c (maybe_push_to_top_level): Adjust.
13132         (pop_from_top_level): Adjust.
13133         (decls_match): Only allow sloppy parm matching for ancient
13134         system headers.
13135         (init_decl_processing): Adjust.
13136         (grokdeclarator): Adjust.
13137         * decl2.c (flag_strict_prototype): Remove.
13138         (strict_prototype): Remove.
13139         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
13140         (lang_f_options): Remove "strict-prototype".
13141         (unsupported-options): Add "strict-prototype".
13142         * lex.c (do_identifier): Adjust.
13143         (do_scoped_id): Adjust.
13144         * parse.y (empty_parms): Adjust.
13145         * class.c (push_lang_context): Adjust.
13146         (pop_lang_context): Adjust.
13147         * typeck.c (comp_target_parms): Adjust.
13148
13149 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
13150
13151         * decl.c (poplevel): Deal with anonymous variables at for scope.
13152         (maybe_inject_for_scope_var): Likewise.
13153
13154 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
13155
13156         * decl.c: Remove all signal handling code, now done in toplev.c.
13157
13158 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
13159
13160         * decl.c (make_rtl_for_nonlocal_decl): Rework.
13161
13162         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
13163         correctly.
13164
13165 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
13166
13167         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
13168         Define my_friendly_assert and my_friendly_abort as macros
13169         which may call friendly_abort.  Prototype friendly abort, not
13170         my_friendly_abort or my_friendly_assert.
13171         * decl.c (signal_catch): Report the signal caught in the error
13172         message.  Call fatal directly.
13173         * typeck2.c (ack, my_friendly_assert): Delete.
13174         (my_friendly_abort): Rename to friendly_abort.  Expect file,
13175         line, and function parameters.  Report the abort code, then
13176         call fancy_abort.  Do not mask an abort if errors have
13177         already occurred.
13178
13179 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
13180
13181         * typeck.c (comp_target_parms): Remove obsolete parameter.
13182         (comp_target_types): Adjust.
13183
13184 2000-07-17  Jason Merrill  <jason@redhat.com>
13185
13186         * typeck.c (mark_addressable): Never set TREE_USED.
13187         * call.c (build_call): Don't abort on calls to library functions
13188         that have been declared normally.
13189
13190         * typeck.c (build_binary_op): Fix grammar in warning.
13191
13192         * exception.cc (__eh_free): Fix prototype.
13193
13194         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
13195
13196         * decl.c (pushdecl): Handle seeing an OVERLOAD in
13197         IDENTIFIER_NAMESPACE_VALUE.
13198
13199 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
13200
13201         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
13202         * method.c (use_thunk): Correct handling of vcall offsets.
13203
13204 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
13205
13206         * .cvsignore: parse.h and parse.c have no cp- prefix.
13207
13208 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
13209
13210         * .cvsignore: New file.
13211
13212 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
13213
13214         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
13215
13216 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
13217
13218         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
13219         * parse.c: Remove.
13220         * parse.h: Likewise.
13221
13222 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
13223
13224         * class.c (layout_class_type): Add pointers to virtual bases after
13225         base classes under the old ABI.
13226
13227 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
13228
13229         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
13230         (finish_continue_stmt): Likewise.
13231         (begin_for_stmt): Remove call to note_level_for_for.
13232         (finish_goto_stmt): Change call from build_min_nt
13233         to build_stmt.
13234         (finish_expr_stmt): Likewise.
13235         (begin_if_stmt): Likewise.
13236         (begin_while_stmt): Likewise.
13237         (finish_while_stmt): Likewise.
13238         (finish_return_stmt): Likewise.
13239         (begin_for_stmt): Likewise.
13240         (finish_for_stmt): Likewise.
13241         (finish_break_stmt): Likewise.
13242         (begin_switch_stmt): Likewise.
13243         (finish_case_label): Likewise.
13244         (genrtl_try_block): Likewise.
13245         (begin_try_block): Likewise.
13246         (begin_handler): Likewise.
13247         (begin_compound_stmt): Likewise.
13248         (finish_asm_stmt): Likewise.
13249         (finish_label_stmt): Likewise.
13250         (add_decl_stmt): Likewise.
13251         (finish_subobject): Likewise.
13252         (finish_decl_cleanup): Likewise.
13253         (finish_named_return_value): Likewise.
13254         (setup_vtbl_ptr): Likewise.
13255         (add_scope_stmt): Likewise.
13256         * decl.c (finish_constructor_body): Likewise.
13257         (finish_destructor_body): Likewise.
13258         * optimize.c (copy_body_r): Likewise.
13259         (initialize_inlined_parameters): Likewise.
13260         (declare_return_variable): Likewise.
13261         (expand_call_inline): Likewise.
13262
13263 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
13264
13265         * semantics.c (expand_body): Sync interface information
13266         at the end of function body expansion.
13267
13268 2000-07-09  Jason Merrill  <jason@redhat.com>
13269
13270         * init.c (build_new_1): Bail early if the call to new fails.
13271
13272         * decl.c (compute_array_index_type): Check specifically for
13273         an INTEGER_CST, not just TREE_CONSTANT.
13274
13275         * decl.c (duplicate_decls): Don't call duplicate_decls on
13276         the DECL_TEMPLATE_RESULT.
13277         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
13278         codes.
13279
13280         * error.c (dump_template_bindings): Don't crash if we had an
13281         invalid argument list.
13282
13283         * typeck.c (c_expand_start_case): Do narrowing here.
13284         * semantics.c (finish_switch_cond): Not here.
13285
13286 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
13287
13288         * parse.y (asm_clobbers): Do string concatenation.
13289
13290 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
13291
13292         * decl.c (pushtag): Don't put local classes in template functions
13293         on the local_classes list.
13294
13295 2000-07-04  Scott Snyder  <snyder@fnal.gov>
13296
13297         * decl2.c (get_guard): Add missing return for old ABI local
13298         variable case.
13299
13300 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
13301
13302         * cp-tree.h (char_type_p): New function.
13303         * decl.c (init_decl_processing): Don't initialize
13304         signed_wchar_type_node or unsigned_wchar_type_node.
13305         (complete_array_type): Handle brace-enclosed string-constants.
13306         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
13307         * tree.c (char_type_p): New function.
13308         * typeck2.c (digest_init): Use char_type_p.
13309
13310 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
13311
13312         * pt.c (tsubst): Don't layout type, if it's error_mark.
13313
13314 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
13315
13316         * pt.c (instantiate_pending_templates): Reset template level.
13317
13318 2000-07-05  Jason Merrill  <jason@redhat.com>
13319
13320         * call.c (joust): Don't complain about `operator char *()' beating
13321         `operator const char *() const'.
13322
13323 2000-07-04  scott snyder  <snyder@fnal.gov>
13324             Jason Merrill  <jason@redhat.com>
13325
13326         * repo.c (repo_get_id): Handle the case where a class with virtual
13327         bases has a null TYPE_BINFO_VTABLE.
13328
13329 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
13330             Jason Merrill  <jason@redhat.com>
13331
13332         * parse.y (member_init): Just pass in the type.
13333         * init.c (expand_member_init): Handle getting a type.
13334
13335 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13336             Jason Merrill  <jason@redhat.com>
13337
13338         * decl.c (finish_function): Warn if a function has no return
13339         statement.
13340         Suggested by Andrew Koenig.
13341         * typeck.c (check_return_expr): Do set current_function_returns_value
13342         if we got an error_mark_node.
13343
13344 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
13345
13346         * decl2.c (push_decl_namespace): Push the original namespace.
13347
13348 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
13349
13350         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
13351         * semantics.c (begin_class_definition): Clear it.
13352
13353 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
13354
13355         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
13356         (genrtl_expr_stmt): Likewise.
13357         (genrtl_decl_stmt): Likewise.
13358         (genrtl_if_stmt): Likewise.
13359         (genrtl_while_stmt): Likewise.
13360         (genrtl_do_stmt): Likewise.
13361         (genrtl_return_stmt): Likewise.
13362         (genrtl_for_stmt): Likewise.
13363         (genrtl_break_stmt): Likewise.
13364         (genrtl_continue_stmt): Likewise.
13365         (genrtl_scope_stmt): Likewise.
13366         (genrtl_switch_stmt): Likewise.
13367         (genrtl_case_label): Likewise.
13368         (genrtl_begin_compound_stmt): Likewise.
13369         (genrtl_finish_compound_stmt): Likewise.
13370         (genrtl_compound_stmt): Likewise.
13371         (genrtl_asm_stmt): Likewise.
13372
13373         * init.c (begin_init_stmts): Remove call to
13374         genrtl_begin_compound_stmt.
13375         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
13376
13377         * semantics.c (lang_expand_stmt): Changed call to
13378         genrtl_compound_stmt to ignore return value.
13379
13380 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
13381
13382         * mangle.c (canonicalize_for_substitution): Return the canonical
13383         variant of a type.
13384
13385         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
13386         TYPE_DECL.
13387         * typeck.c (commonparms): Remove obstack manipulations.
13388
13389 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
13390
13391         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
13392
13393         * Makefile.in (OBJS): Added ../c-semantics.o.
13394         (OBJDEPS): Likewise.
13395
13396         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
13397         ../c-common.h.
13398         (struct stmt_tree): Added comment.
13399         (current_function_name_declared): Removed.
13400         (stmts_are_full_exprs_p): Likewise.
13401         (genrtl_do_pushlevel): Likewise.
13402         (genrtl_clear_out_block): Likewise.
13403         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
13404         (DECL_ANON_UNION_ELEMS): Likewise.
13405         (emit_local_var): Likewise.
13406         (make_rtl_for_local_static): Likewise.
13407         (do_case): Likewise.
13408         (expand_stmt): Likewise.
13409         (genrtl_decl_cleanup): Likewise.
13410         (c_expand_asm_operands): Likewise.
13411         (c_expand_return): Likewise.
13412         (c_expand_start_case): Likewise.
13413
13414         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
13415         (emit_local_var): Likewise.
13416         (initialize_local_var): Change reference to
13417         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
13418         Change reference to stmts_are_full_exprs_p to
13419         current_stmt_tree->stmts_are_full_exprs_p.
13420         (push_cp_function_context): Likewise.
13421
13422         * expect.c (expand_throw): Change reference to
13423         stmts_are_full_exprs_p.
13424
13425         * init.c (build_aggr_init): Change reference to
13426         stmts_are_full_exprs_p.
13427         (build_vec_init): Likewise.
13428
13429         * optimize.c (maybe_clone_body): Change reference to
13430         current_function_name_declared to
13431         cp_function_chain->name_declared.
13432
13433         * pt.c (instantiate_decl): Change reference to
13434         current_function_name_declared to
13435         cp_function_chain->name_declared.
13436
13437         * semantics.c (expand_cond): Moved declaration to c-common.h.
13438         (genrtl_do_pushlevel): Moved to c-semantics.c.
13439         (genrtl_clear_out_block): Likewise.
13440         (genrtl_goto_stmt): Likewise.
13441         (genrtl_expr_stmt): Likewise.
13442         (genrtl_decl_stmt): Likewise.
13443         (gerntl_if_stmt): Likewise.
13444         (genrtl_while_stmt): Likewise.
13445         (genrtl_do_stmt): Likewise.
13446         (genrtl_return_stmt): Likewise.
13447         (genrtl_for_stmt): Likewise.
13448         (genrtl_break_stmt): Likewise.
13449         (genrtl_continue_stmt): Likewise.
13450         (genrtl_scope_stmt): Likewise.
13451         (genrtl_switch_stmt): Likewise.
13452         (genrtl_case_label): Likewise.
13453         (genrtl_begin_compound_stmt): Likewise.
13454         (genrtl_finish_compound_stmt): Likewise.
13455         (genrtl_compound_stmt): Likewise.
13456         (genrtl_asm_stmt): Likewise.
13457         (genrtl_decl_cleanup): Likewise.
13458         (expand_cond): Likewise.
13459         (expand_stmt): Renamed to ...
13460         (lang_expand_stmt): ... this.
13461         (lang_expand_expr_stmt): Initialize.
13462         (set_current_function_name_declared): Likewise.
13463         (stmts_are_full_exprs_p): Likewise.
13464         (current_function_name_declared): Likewise.
13465         (anon_aggr_type_p): Likewise.
13466         (do_poplevel): Change reference to
13467         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
13468         Change reference to stmts_are_full_exprs_p to
13469         current_stmt_tree->stmts_are_full_exprs_p.
13470         (add_tree): Likewise.
13471         (finish_expr_stmt): Likewise.
13472         (prep_stmt): Likewise.
13473         (lang_expand_stmt): Likewise.
13474         (begin_compound_stmt): Change reference to
13475         current_function_name_declared to
13476         cp_function_chain->name_declared and call to
13477         current_function_name_declared().
13478         (setup_vtbl_ptr): Likewise.
13479         (genrtl_do_poplevel): Removed.
13480
13481 2000-06-30  Jason Merrill  <jason@redhat.com>
13482
13483         * init.c (init_init_processing): Go back to aligning like
13484         double_type_node for old ABI.
13485         (get_cookie_size): Make cookie larger if we get a type that needs
13486         more alignment.
13487         (build_vec_delete): Call it.
13488
13489         * typeck.c (qualify_type_recursive): New fn.
13490         (composite_pointer_type): Use it.
13491         (build_binary_op): Use composite_pointer_type.
13492
13493 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
13494             Jason Merrill  <jason@redhat.com>
13495
13496         * typeck.c (check_return_expr): Don't complain about returning
13497         NULL from operator new if -fcheck-new.
13498         * cp-tree.h: Declare flag_check_new here.
13499         * init.c: Not here.
13500
13501 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
13502
13503         * mangle.c (find_substitution): Use same_type_p.
13504         (write_encoding): Don't check for substitutions.
13505
13506 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
13507
13508         * parse.y (expr_no_comma_rangle): New non-terminal.
13509         (template_parm): Use it for default parameter case.
13510         (template_arg): Use it.
13511         (expr_no_commas): Remove commented out undefined extensions.
13512         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
13513         * parse.h, parse.c: Rebuilt.
13514
13515 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
13516
13517         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
13518         (finish_asm_stmt): Do it here, instead.
13519
13520         * cp-tree.h (ridpointers): Don't declare.
13521         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
13522         (record_builtin_java_type): Likewise.
13523         (init_decl_processing): Likewise.
13524         * lex.c: Move inclusion of lex.h.
13525         (ridpointers): Don't define.
13526         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
13527         RID_MAX.
13528         * lex.h (enum rid): Rename to ...
13529         (enum cp_rid): ... this.
13530         (ridpointers): Don't declare.
13531         * parse.y: Move inclusion of lex.h.
13532         * parse.c: Regenerated.
13533         * spew.c: Move inclusion of lex.h.
13534
13535         * cp-tree.h (struct language_function): Remove temp_name_counter.
13536         (temp_name_counter): Remove.
13537         (get_temp_name): Change prototype.
13538         (get_guard): New function.
13539         (get_guard_cond): Likewise.
13540         (set_guard): Likewise.
13541         * cvt.c (build_up_reference): Adjust call to get_temp_name.
13542         * decl.c (expand_static_init): Use get_guard and friends to
13543         implement guard variables.
13544         * decl2.c (get_temp_name): Assume that the variables created are
13545         always static.
13546         (get_sentry): Rename to ...
13547         (get_guard): ... this.  Implement new ABI guard variables.
13548         (get_guard_bits): New function.
13549         (get_guard_cond): Likewise.
13550         (set_guard): Likewise.
13551         (start_static_initialization_or_destruction): Use them.
13552         (do_static_initialization): Replace sentry with guard throughout.
13553         (do_static_destruction): Likewise.
13554         * init.c (create_temporary_var): Add comment.
13555
13556 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
13557
13558         * mangle.c (find_substitution): Use same_type_p.
13559         (write_encoding): Don't check for substitutions.
13560
13561 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
13562
13563         * parse.y (expr_no_comma_rangle): New non-terminal.
13564         (template_parm): Use it for default parameter case.
13565         (template_arg): Use it.
13566         (expr_no_commas): Remove commented out undefined extensions.
13567         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
13568         * parse.h, parse.c: Rebuilt.
13569
13570 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
13571
13572         * cp-tree.h (flag_const_strings): Remove.
13573         (warn_parentheses): Likewise.
13574         (warn_format): Likewise.
13575         (common_type): Likewise.
13576         (default_conversion): Likewise.
13577         (build_binary_op): Likewise.
13578         (cp_build_binary_op): New macro.
13579         * call.c (build_new_op): Use cp_build_binary_op instead of
13580         build_binary_op.
13581         * class.c (build_vtable_entry_ref): Likewise.
13582         * decl.c (expand_static_init): Likewise.
13583         (compute_array_index_type): Likewise.
13584         (build_enumerator): Likewise.
13585         * decl2.c (delete_sanity): Likewise.
13586         (start_static_initialization_or_destruction): Likewise.
13587         * error.c (dump_type_suffix): Likewise.
13588         * init.c (resolve_offset_ref): Likewise.
13589         (build_new): Likewise.
13590         (build_new_1): Likewise.
13591         (build_vec_delete_1): Likewise.
13592         (build_vec_init): Likewise.
13593         (build_delete): Likewise.
13594         * rtti.c (synthesize_tinfo_fn): Likewise.
13595         (synthesize_tinfo_var): Likewise.
13596         * search.c (expand_upcast_fixups): Likewise.
13597         (fixup_all_virtual_upcast_offsets): Likewise.
13598         * typeck.c (build_array_ref): Likewise.
13599         (get_member_function_from_ptrfunc): Likewise.
13600         (build_binary_op): Add parameter.
13601         (pointer_int_sum): Use cp_build_binary_op.
13602         (pointer_diff): Likewise.
13603         (build_modify_expr): Likewise.
13604         (get_delta_difference): Likewise.
13605         (build_ptrmemfunc): Likewise.
13606
13607 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
13608
13609         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
13610         * decl.c (create_implicit_typedef): Adjust.
13611         * decl2.c (build_artificial_parm): Adjust.
13612         * method.c (implicitly_declare_fn): Adjust.
13613         * pt.c (push_inline_template_parms_recursive): Adjust.
13614         (process_template_parm): Adjust.
13615         (overloaded_template_name): Adjust.
13616         * semantics.c (finish_template_template_parm): Adjust.
13617
13618 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
13619
13620         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
13621         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
13622         where to emit thunks.
13623         (build_vtt): Adjust call to build_vtt_inits.
13624         (build_vtt_inits): Add parameter to indicate whether or not
13625         sub-VTTs for virtual bases should be included.  Adjust handling of
13626         construction vtables.
13627         (get_matching_base): New function.
13628         (dfs_build_vtt_inits): Rename to ...
13629         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
13630         construction vtables.
13631         (dfs_fixup_binfo_vtbls): Likewise.
13632         (build_ctor_vtbl_groups): Build construction vtables for virtual
13633         bases, too.
13634         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
13635         to build construction vtbls.
13636         (dfs_accumulate_vtbl_inits): Adjust handling of
13637         construction vtables.
13638
13639         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
13640         types correctly.
13641
13642 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
13643
13644         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
13645
13646 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
13647
13648         * search.c (hides): Remove.
13649         (is_subobject_of_p): Add most_derived parameter. Use
13650         CANONICAL_BINFO.
13651         (lookup_field_queue_p): Adjust.
13652         (lookup_field_r): Adjust.
13653
13654 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
13655
13656         * decl2.c (handle_class_head): Bash typedefs to the type's main
13657         decl.
13658
13659 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
13660
13661         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
13662         (begin_global_stmt_expr): ... this.
13663         (genrtl_finish_stmt_expr): Rename to ...
13664         (finish_global_stmt_expr): ... this.
13665         * init.c (begin_init_stmts): Adjust calls.
13666         (finish_init_stmts): Likewise.
13667         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
13668         (begin_global_stmt_expr): ... this.
13669         (genrtl_finish_stmt_expr): Rename to ...
13670         (finish_global_stmt_expr): ... this.
13671
13672 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13673
13674         * search.c (lookup_member): Fix typo in comment.
13675
13676 2000-06-24  Jason Merrill  <jason@redhat.com>
13677
13678         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
13679         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
13680
13681 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13682
13683         * parse.y (complex_direct_notype_declarator): Support global_scope.
13684         * Makefile.in: Adjust conflict count.
13685
13686 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13687
13688         * parse.y (template_arg): Convert TEMPLATE_DECL
13689         that is a template template parameter to
13690         TEMPLATE_TEMPLATE_PARM here.
13691
13692         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
13693         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
13694         (copy_template_template_parm): Adjust prototype.
13695         * decl.c (grokdeclarator): Remove dead code.
13696         * pt.c (process_template_parm): Tidy.
13697         (lookup_template_class): Construct nodes in
13698         copy_template_template_parm.
13699         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
13700         lookup_template_class.  Use TYPE_TI_TEMPLATE.
13701         * tree.c (copy_template_template_parm): Add NEWARGS
13702         parameter.
13703         (mapcar): Adjust call to copy_template_template_parm.
13704         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
13705         * method.c (build_template_template_parm_names): Change error
13706         code to avoid compilation warning.
13707
13708         * gxxint.texi: Document template template parameter
13709         name mangling.
13710
13711 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
13712
13713         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
13714         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
13715         (cp-demangle.o): New rule.
13716         (dyn-string.o): Likewise.
13717         * inc/cxxabi.h (__cxa_demangle): New declaration.
13718
13719 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
13720
13721         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
13722         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
13723         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
13724         a tree, not an int.
13725         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
13726         (make_thunk): Change prototype.
13727         (emit_thunk): Rename to use_thunk.
13728         (mangle_thunk): Change prototype.
13729         * class.c (get_derived_offset): Simplify.
13730         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
13731         BV_GENERATE_THUNK_WITH_VTABLE_P.
13732         (build_primary_vtable): Simplify.
13733         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
13734         (dfs_find_base): Remove.
13735         (update_vtable_entry_for_fn): Correct bug in finding the base
13736         where a virtual function was first declared.  Figure out whether
13737         or not to emit a vcall-thunk with the vtables in which it appears.
13738         Correct logic for deciding whether to use an ordinary thunk, or a
13739         vcall thunk.
13740         (finish_struct_1): Remove unnecssary code.
13741         (build_vtbl_initializer): Use ssize_int for the running counter of
13742         negative indices.
13743         (build_vtbl_initializer): Only use vcall thunks where necessary.
13744         Mark thunks as needing to be emitted with their vtables, or not.
13745         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
13746         indices.  Use size_binop.
13747         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
13748         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
13749         size_binop.
13750         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
13751         (build_vtable_entry): Mark thunks as needing to be emitted with
13752         their vtables, or not.
13753         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
13754         * decl2.c (mark_vtable_entries): Use use_thunk instead of
13755         emit_thunk.
13756         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
13757         information.
13758         * error.c (dump_expr): Use BV_FN.
13759         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
13760         not an int.
13761         * method.c (make_thunk): Likewise.
13762         (emit_thunk): Rename to use_thunk.  Allow callers to decide
13763         whether or not to actually emit the thunk.  Adjust for changes in
13764         representation of vcall offsets.
13765         * search.c (dfs_get_pure_virtuals): Use BV_FN.
13766         * semantics.c (emit_associated_thunks): New function.
13767         (expand_body): Use it.
13768         * ir.texi: Adjust decriptions of thunks.
13769
13770 2000-06-22  Jason Merrill  <jason@redhat.com>
13771
13772         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
13773         (tsubst_friend_function): Copy it here.
13774
13775         * decl.c (grok_op_properties): Fix typo.
13776
13777         * decl2.c (delete_sanity): Clarify warning, avoid failure on
13778         deleting void*.
13779
13780         * pt.c (check_explicit_specialization): Clarify error.
13781
13782         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
13783         an old OVERLOAD when we're declaring a non-function.
13784         (pushdecl, destroy_local_var): Check for error_mark_node.
13785         (warn_extern_redeclared_static): Also bail early if
13786         we're a CONST_DECL.
13787         (push_overloaded_decl): Ignore an old error_mark_node.
13788
13789 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
13790
13791         * call.c (build_x_va_arg): Check if in a template decl.
13792         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
13793
13794 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13795
13796         * class.c (push_lang_context): TYPE_NAME gets you to the Java
13797         types DECLs.
13798         * decl.c (check_goto): Computed gotos assumed OK.
13799
13800 2000-06-20  Jason Merrill  <jason@redhat.com>
13801
13802         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
13803         for which we don't need to look for instantiations.
13804
13805 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
13806
13807         * parse.y (program): Always call finish_translation_unit.
13808         * parse.c, parse.h: Rebuilt.
13809
13810 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
13811
13812         * method.c: Don't include hard-reg-set.h.
13813
13814 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
13815
13816         * rtti.c (get_base_offset): Cope when vbase field is in a base.
13817
13818 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
13819
13820         * call.c (build_conditional_expr): Use VOID_TYPE_P.
13821         * cvt.c (cp_convert_to_pointer): Likewise.
13822         (convert_to_void): Likewise.
13823         * error.c (dump_expr): Likewise.
13824         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
13825         * init.c (build_delete): Likewise.
13826         * method.c (emit_thunk): Likewise.
13827         * optmize.c (declare_return_variable): Likewise.
13828         * rtti.c (get_tinfo_decl_dynamic): Likewise.
13829         (get_typeid): Likewise.
13830         (build_dynamic_cast_1): Likewise.
13831         * typeck.c (composite_pointer_type): Likewise.
13832         (common_type): Likewise.
13833         (build_indirect_ref): Likewise.
13834         (build_binary_op): Likewise.
13835         (build_x_compound_expr): Likewise.
13836         (check_return_expr): Likewise.
13837         * typeck2.c (add_exception_specifier): Likewise.
13838
13839         * mangle.c (write_method_parms): Use direct comparison for end
13840         of parmlist.
13841
13842 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
13843
13844         * cp-tree.h (genrtl_try_block): Declare function.
13845         (genrtl_handler): Likewise.
13846         (genrtl_catch_block): Likewise.
13847         (genrtl_ctor_stmt): Likewise.
13848         (genrtl_subobject): Likewise.
13849         (genrtl_decl_cleanup): Likewise.
13850         (genrtl_do_poplevel): Likewise.
13851         (genrtl_do_pushlevel): Likewise.
13852         (genrtl_clear_out_block): Likewise.
13853         (genrtl_goto_stmt): Likewise.
13854         (genrtl_expr_stmt): Likewise.
13855         (genrtl_decl_stmt): Likewise.
13856         (genrtl_if_stmt): Likewise.
13857         (genrtl_while_stmt): Likewise.
13858         (genrtl_do_stmt): Likewise.
13859         (genrtl_return_stmt): Likewise.
13860         (genrtl_for_stmt): Likewise.
13861         (genrtl_break_stmt): Likewise.
13862         (genrtl_continue_stmt): Likewise.
13863         (genrtl_scope_stmt): Likewise.
13864         (genrtl_switch_stmt): Likewise.
13865         (genrtl_case_label): Likewise.
13866         (genrtl_begin_compound_stmt): Likewise.
13867         (genrtl_finish_compound_stmt): Likewise.
13868         (genrtl_compound_stmt): Likewise.
13869         (genrtl_asm_stmt): Likewise.
13870         (genrtl_named_return_value): Likewise.
13871         (genrtl_begin_stmt_expr): Likewise.
13872         (genrtl_finish_stmt_expr): Likewise.
13873         (finish_for_stmt): Removed first argument.
13874         (finish_switch_stmt): Likewise.
13875
13876         * semantics.c (genrtl_try_block): Define function.
13877         (genrtl_handler): Likewise.
13878         (genrtl_catch_block): Likewise.
13879         (genrtl_ctor_stmt): Likewise.
13880         (genrtl_subobject): Likewise.
13881         (genrtl_decl_cleanup): Likewise.
13882         (genrtl_do_poplevel): Likewise.
13883         (genrtl_do_pushlevel): Likewise.
13884         (genrtl_clear_out_block): Likewise.
13885         (genrtl_goto_stmt): Likewise.
13886         (genrtl_expr_stmt): Likewise.
13887         (genrtl_decl_stmt): Likewise.
13888         (genrtl_if_stmt): Likewise.
13889         (genrtl_while_stmt): Likewise.
13890         (genrtl_do_stmt): Likewise.
13891         (genrtl_return_stmt): Likewise.
13892         (genrtl_for_stmt): Likewise.
13893         (genrtl_break_stmt): Likewise.
13894         (genrtl_continue_stmt): Likewise.
13895         (genrtl_scope_stmt): Likewise.
13896         (genrtl_switch_stmt): Likewise.
13897         (genrtl_case_label): Likewise.
13898         (genrtl_begin_compound_stmt): Likewise.
13899         (genrtl_finish_compound_stmt): Likewise.
13900         (genrtl_compound_stmt): Likewise.
13901         (genrtl_asm_stmt): Likewise.
13902         (genrtl_named_return_value): Likewise.
13903         (genrtl_begin_stmt_expr): Likewise.
13904         (genrtl_finish_stmt_expr): Likewise.
13905         (finish_for_stmt): Removed first argument and generate rtl
13906         specific code.
13907         (finish_switch_stmt): Likewise.
13908         (do_poplevel): Removed generate rtl specific code.
13909         (do_pushlevel): Likewise.
13910         (add_tree): Likewise.
13911         (finish_goto_stmt): Likewise.
13912         (finish_expr_stmt): Likewise.
13913         (begin_if_stmt): Likewise.
13914         (finish_if_stmt_cond): Likewise.
13915         (finish_then_clause): Likewise.
13916         (begin_else_clause): Likewise.
13917         (finish_else_clause): Likewise.
13918         (finish_if_stmt): Likewise.
13919         (clear_out_block): Likewise.
13920         (begin_while_stmt): Likewise.
13921         (finish_while_stmt_cond): Likewise.
13922         (finish_while_stmt): Likewise.
13923         (begin_do_stmt): Likewise.
13924         (finish_do_body): Likewise.
13925         (finish_do_stmt): Likewise.
13926         (finish_return_stmt): Likewise.
13927         (begin_for_stmt): Likewise.
13928         (finish_for_init_stmt): Likewise.
13929         (finish_for_cond): Likewise.
13930         (finish_for_expr): Likewise.
13931         (finish_break_stmt): Likewise.
13932         (finish_continue_stmt): Likewise.
13933         (begin_switch_stmt): Likewise.
13934         (finish_switch_cond): Likewise.
13935         (finish_case_label): Likewise.
13936         (begin_try_block): Likewise.
13937         (begin_function_try_block): Likewise.
13938         (finish_try_block): Likewise.
13939         (finish_cleanup_try_block): Likewise.
13940         (finish_cleanup): Likewise.
13941         (finish_function_try_block): Likewise.
13942         (finish_handler_sequence): Likewise.
13943         (finish_function_handler_sequence): Likewise.
13944         (begin_handler): Likewise.
13945         (finish_handler_parms): Likewise.
13946         (begin_catch_block): Likewise.
13947         (finish_handler): Likewise.
13948         (begin_compound_stmt): Likewise.
13949         (finish_compound_stmt): Likewise.
13950         (finish_asm_stmt): Likewise.
13951         (finish_label_stmt): Likewise.
13952         (finish_label_decl): Likewise.
13953         (finish_subobject): Likewise.
13954         (finish_decl_cleanup): Likewise.
13955         (finish_named_return_value): Likewise.
13956         (begin_stmt_expr): Likewise.
13957         (finish_stmt_expr): Likewise.
13958
13959         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
13960         to call genrtl_expr_stmt when appropriate.
13961
13962         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
13963         begin_compound_expr to call genrtl_begin_stmt_expr and
13964         genrtl_begin_compound_expr when appropriate.
13965         (finish_init_stmts): Changed calls to finish_compound_expr and
13966         finish_stmt_expr to call genrtl_finish_compound_expr and
13967         genrtl_finish_stmt_expr when appropriate.
13968         (expand_default_init): Changed call to finish_expr_stmt to call
13969         genrtl_expr_stmt when appropriate.
13970         (build_vec_init): Likewise.
13971
13972         * parse.y (simple_stmt): Removed first argument from call to
13973         finish_for_stmt. Removed first argument from call to
13974         finish_switch_stmt.
13975
13976         * parse.c: Regenerated.
13977
13978         * pt.c (tsubst_expr): Removed first argument from call to
13979         finish_for_stmt. Removed first argument from call to
13980         finish_switch_stmt.
13981
13982 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
13983
13984         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
13985         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
13986
13987         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
13988         (cplus_tree_code_length[]): Likewise.
13989         (cplus_tree_code_name[]): Likewise.
13990         (init_parse): Added call to add_c_tree_codes. Changed
13991         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
13992
13993 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
13994
13995         * cp-tree.h (finish_mem_initializers): Declare.
13996         (count_trees): Likewise.
13997         * parse.y (base_init): Use finish_mem_initializers.
13998         * semantics.c (finish_mem_initializers): New function.
13999
14000         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
14001         the number of trees.
14002         (n_trees): Remove.
14003         (count_trees): Don't use it.
14004
14005 2000-06-15  Jason Merrill  <jason@redhat.com>
14006
14007         * tree.c (count_trees): New debugging function.
14008
14009         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
14010         * init.c (build_member_call): Pull out the name of a DECL.
14011
14012         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
14013         * semantics.c (expand_body): Push to TV_INTEGRATION here.
14014         * optimize.c (optimize_function): Not here.
14015         * pt.c (instantiate_decl): Push to TV_PARSE.
14016
14017 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
14018
14019         * cp-tree.h (struct language_function): Remove x_base_init_list
14020         and x_member_init_list.
14021         (current_base_init_list): Remove.
14022         (current_member_init_list): Likewise.
14023         (setup_vtbl_ptr): Change prototype.
14024         (emit_base_init): Likewise.
14025         (expand_member_init): Likewise.
14026         (reinit_parse_for_function): Remove.
14027         * decl.c (save_function_data): Don't clear x_base_init_list and
14028         x_member_init_list.
14029         (mark_language_function): Don't mark them.
14030         * init.c (perform_member_init): Tweak comment.
14031         (sort_member_init): Take the list of initializers as an argument.
14032         (sort_base_init): Likewise.
14033         (emit_base_init): Likewise.
14034         (expand_member_init): Return the initializer.  Don't use global
14035         variables.
14036         * lex.c (reinit_parse_for_function): Remove.
14037         * method.c (build_template_parm_names): Correct substitution.
14038         (do_build_copy_constructor): Don't use current_member_init_list
14039         and current_base_init_list.
14040         (synthesize_method): Likewise.
14041         * parse.y (base_init): Split mem-initializers into
14042         base-initializers and field-initializers.
14043         (member_init_list): Build up the list here.
14044         (member_init): Return the initializer.
14045         (fn.depfn): Don't use reinit_parse_for_function.
14046         * parse.c: Regenerated.
14047         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
14048         ERROR_MARK.
14049         (tsubst_expr): Don't use current_member_init_list
14050         and current_base_init_list.
14051         (tsubst_expr_values): Rename to ...
14052         (tsubst_initializer_list): ... this.  Use convert_from_reference.
14053         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
14054         and current_base_init_list.
14055         (begin_function_definition): Don't call reinit_parse_for_function.
14056
14057         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
14058
14059         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
14060         correctly.
14061
14062         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
14063
14064 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
14065
14066         * cp-tree.h (IF_COND): Move to c-common.h.
14067         (THEN_CLAUSE): Likewise.
14068         (ELSE_CLAUSE): Likewise.
14069         (WHILE_COND): Likewise.
14070         (WHILE_BODY): Likewise.
14071         (DO_COND): Likewise.
14072         (DO_BODY): Likewise.
14073         (RETURN_EXPR): Likewise.
14074         (EXPR_STMT_EXPR): Likewise.
14075         (FOR_INIT_STMT): Likewise.
14076         (FOR_COND): Likewise.
14077         (FOR_EXPR): Likewise.
14078         (FOR_BODY): Likewise.
14079         (SWITCH_COND): Likewise.
14080         (SWITCH_BODY): Likewise.
14081         (CASE_LOW): Likewise.
14082         (CASE_HIGH): Likewise.
14083         (GOTO_DESTINATION): Likewise.
14084         (COMPOUND_BODY): Likewise.
14085         (ASM_CV_QUAL): Likewise.
14086         (ASM_STRING): Likewise.
14087         (ASM_OUTPUTS): Likewise.
14088         (ASM_INPUTS): Likewise.
14089         (ASM_CLOBBERS): Likewise.
14090         (DECL_STMT_DECL): Likewise.
14091         (STMT_EXPR_STMT): Likewise.
14092         (LABEL_STMT_LABEL): Likewise.
14093         (SCOPE_BEGIN_P): Likewise.
14094         (SCOPE_END_P): Likewise.
14095         (SCOPE_STMT_BLOCK): Likewise.
14096         (SCOPE_NULLIFIED_P): Likewise.
14097         (SCOPE_NO_CLEANUPS_P): Likewise.
14098         (SCOPE_PARTIAL_P): Likewise.
14099         (ASM_VOLATILE_P): Likewise.
14100         (STMT_LINENO): Likewise.
14101         (STMT_LINENO_FOR_FN_P): Likewise.
14102
14103         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
14104         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
14105         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
14106         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
14107         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
14108
14109         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
14110
14111         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
14112         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
14113
14114         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
14115         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
14116         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
14117
14118 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
14119
14120         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
14121         * class.c (dfs_find_final_overrider): Set it appropriately.
14122         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
14123         avoid unneeded secondary vptrs.
14124
14125 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
14126
14127         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
14128         (check_bitfield_decl, check_field_decl): Likewise.
14129         (build_vtbl_or_vbase_field, build_base_field): Likewise.
14130         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
14131         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
14132         (xfer_tag, finish_enum): Likewise.
14133         * decl2.c (finish_builtin_type): Likewise.
14134         * init.c (init_init_processing): Likewise.
14135         * pt.c (instantiate_class_template): Likewise.
14136         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
14137         * cp-tree.h (struct lang_type): Add user_align member.
14138         (CLASSTYPE_USER_ALIGN): Define.
14139
14140 2000-06-13  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
14141
14142         * Make-lang.in (c++.install-common): Install g++-cross in
14143         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
14144         $(target_alias)-g++ and $(target_alias)-c++.
14145
14146 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
14147
14148         * class.c (vcall_offset_data_s): Add last_init and fns.
14149         (overrides): Rename to same_signature_p.
14150         (dfs_find_final_overrider): Adjust accordingly.
14151         (mark_overriders): Likewise.
14152         (warn_hidden): Likewise.
14153         (build_vtbl_initializer): Reorganize machinery for building things
14154         at negative offsets.
14155         (build_vcall_and_vbase_vtbl_entries): Likewise.
14156         (build_vbase_offset_vtbl_entries): Likewise.
14157         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
14158         offset entries.  Do not create two entries for functions with the
14159         same signature.
14160         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
14161         (build_rtti_vtbl_entries): Reorganize machinery for building things
14162         at negative offsets.
14163
14164         * optimize.c (expand_call_inline): Don't recurse into the code
14165         used to initialize the parameters more than once.
14166
14167 2000-06-11  Mark Mitchell <mark@codesourcery.com>
14168
14169         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
14170         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
14171         (find_substitution): Only use the `Sa' substitution for
14172         std::allocator, not instantiations of it.
14173         (write_template_prefix): Move comment.  Only use a TREE_LIST to
14174         represent substitutions for a member template.
14175         (write_array_type): Mangle array dimensions correctly.
14176         * optimize.c (maybe_clone_body): Copy more information from the
14177         cloned function.
14178         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
14179         on the regenerated declaration.
14180
14181 2000-06-11  Chip Salzenberg  <chip@valinux.com>
14182             Mark Mitchell <mark@codesourcery.com>
14183
14184         * class.c (build_vtable): Clarify comment.
14185         (build_ctor_vtbl_group): Pass the most derived type to
14186         build_vtable.
14187
14188 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14189
14190         * decl2.c (compare_options): Don't needlessly cast away const-ness.
14191
14192 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
14193
14194         * decl.c (add_binding): Handle duplicate declarations of external
14195         variables.
14196
14197 2000-06-09  Chip Salzenberg  <chip@valinux.com>
14198             Mark Mitchell <mark@codesourcery.com>
14199
14200         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
14201         argument.
14202         (write_signed_number): New macro.
14203         (write_unsigned_number): Likewise.
14204         (write_source_name): Use them.
14205         (write_number): Handle signed and unsigned values.
14206         (write_integer_cst): Use tree_int_cst_sgn, and use
14207         write_unsigned_number or write_signed_number as appropriate.
14208         (write_discriminator): Use write_unsigned_number or
14209         write_signed_number as appropriate.
14210         (write_template_arg_literal): Likewise.
14211         (write_array_type): Use tree_low_cst.
14212         (write_template_parm):  Use write_unsigned_number or
14213         write_signed_number as appropriate.
14214         (write_substitution): Adjust call to write_number.
14215         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
14216         (write_expression): Handle non-type template arguments of
14217         reference type correctly.
14218         (mangle_thunk): Use write_signed_number.
14219
14220 2000-06-09  Chip Salzenberg  <chip@valinux.com>
14221
14222         * mangle.c (find_substition): Don't mangle objects with typename
14223         substitutions (e.g. "cin" as "Si").
14224
14225 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
14226
14227         * call.c (add_candidate): Use ggc_alloc_cleared.
14228         * decl.c (lookup_label): Likewise.
14229         * lex.c (retrofit_lang_decl): Likewise.
14230
14231 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
14232
14233         * semantics.c (expand_body): Push to TV_EXPAND.
14234         * optimize.c (optimize_function): Push to TV_INTEGRATION.
14235         * decl.c (start_function): Always call announce_function.
14236
14237         * tinfo2.cc: Just declare abort.
14238
14239 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
14240
14241         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
14242         whenever @ is a symbolic name.
14243
14244 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
14245
14246         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
14247
14248 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
14249
14250         * decl.c (pushdecl): Look up functions by DECL_NAME, not
14251         DECL_ASSEMBLER_NAME.
14252
14253 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
14254
14255         * decl2.c (c_language): Define.
14256
14257 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
14258
14259         * lex.c (lang_init_options): Tweak.
14260
14261         * decl2.c: Remove #inclusion of diagnostic.h
14262         (lang_decode_option): Move diagnostic formatting options to
14263         toplevel.
14264
14265         * lang-options.h: Remove documentation for diagnostic options.
14266
14267         * Makefile.in (lex.o): Depends upon diagnostic.h
14268
14269 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
14270
14271         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
14272         the same DECL_RESULT, it's not a redefinition.
14273         * pt.c (tsubst_decl): Remove code to handle illegal
14274         specializations.
14275
14276 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
14277
14278         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
14279
14280 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
14281
14282         * search.c (maybe_suppress_debug_info): Don't check
14283         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
14284
14285         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
14286         here if extern_p.
14287
14288         Remember instantiation context in deferred instantiations.
14289         * cp-tree.h (struct tinst_level): Remove.
14290         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
14291         * pt.c (current_tinst_level): Now a tree.
14292         (print_template_context, push_tinst_level, pop_tinst_level,
14293         tinst_for_decl): Adjust.
14294         (reopen_tinst_level): New fn.
14295         (init_pt): Register current_tinst_level as a root.
14296         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
14297         of the pending templates list.
14298         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
14299         * lex.c (extract_interface_info): Adjust.
14300         * decl2.c (warn_if_unknown_interface): Adjust.
14301
14302 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
14303
14304         * class.c (indirect_primary_base_p): New function.
14305         (determine_primary_base): Use it.
14306
14307 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
14308
14309         Update new-abi dynamic cast algorithm.
14310         * tinfo.cc (__class_type_info::__dyncast_result): Add
14311         whole_details. Adjust constructor.
14312         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
14313         Avoid unnecessary searching.
14314         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
14315
14316 2000-06-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14317
14318         * decl.c (init_decl_processing): Don't call record_component_aliases.
14319         * tree.c (build_cplus_array_type_1): Likewise.
14320
14321 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
14322
14323         * ir.texi: Correct typo.
14324         * mangle.c (write_expression): Handle non-type template arguments
14325         with reference type.
14326         * method.c (build_overload_value): Likewise.
14327         * pt.c (convert_nontype_argument): Explicitly represent conversion
14328         to a reference with an ADDR_EXPR.
14329         (unify): Always unify arguments in left-to-right order.
14330
14331 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
14332             Mark Mitchell  <mark@codesourcery.com>
14333
14334         * Make-lang.in (CXX_SRCS): Add mangle.c.
14335         * Makefile.in (CXX_OBJS): Add mangle.o.
14336         (mangle.o): New rule.
14337
14338         * class.c (local_classes): New variable.
14339         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
14340         (get_vtt_name): Use mangle_vtt_name for new ABI.
14341         (init_class_processing): Initialize local_classes.
14342         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
14343         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
14344         (std_identifier): New macro.
14345         (DECL_VOLATILE_MEMFUNC_P): New macro.
14346         (DECL_NAMESPACE_STD_P): Likewise.
14347         (local_classes): Declare.
14348         (get_mostly_instantiated_function_type): Declare.
14349         (init_mangle): Declare.
14350         (mangle_decl): Likewise.
14351         (mangle_type_string): Likewise.
14352         (mangle_type): Likewise.
14353         (mangle_typeinfo_for_type): Likewise.
14354         (mangle_typeinfo_string_for_type): Likewise.
14355         (mangle_vtbl_for_type): Likewise.
14356         (mangle_vtt_for_type): Likewise.
14357         (mangle_ctor_vtbl_for_type): Likewise.
14358         (mangle_thunk): Likewise.
14359         (mangle_conv_op_name_for_type): Likewise.
14360         (mangle_guard_variable): Likewise.
14361         * decl.c (pushtag): Keep track of local classes.
14362         (initialize_predefined_identifiers): Initialize std_identifier.
14363         (init_decl_processing): Use std_identifier.
14364         (start_decl): Don't treat instantiations as specializations.
14365         (grokdeclarator): Likewise.
14366         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
14367         name for fully-instantiated templates.
14368         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
14369         destructors with the new ABI.
14370         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
14371         (grokfield): Use mangle_type for new ABI.
14372         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
14373         (get_sentry): Use mangle_guard_variable for new ABI.
14374         (start_static_initialization_or_destruction): Likewise.
14375         * expr.c (extract_aggr_init): Remove.
14376         (extract_scalar_init): Likewise.
14377         (extract_init): Remove #if 0'd code.
14378         * mangle.c: New function.
14379         * method.c (build_mangled_name): Assert not flag_new_abi.
14380         (build_static_name): Likewise.
14381         (build_decl_overload_real): Likewise.
14382         (build_typename_overload): Likewise.
14383         (build_overload_with_type): Likewise.
14384         (build_overload_name): Likewise.
14385         (get_ctor_vtbl_name): Likewise.
14386         (start_squangling): Likewise.
14387         (get_id_2): Likewise.
14388         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
14389         (init_method): Call init_mangle for new ABI.
14390         (make_thunk): Call mangle_thunk for new ABI.
14391         * operators.def: Correct new ABI manglings for the `%' operator.
14392         Add `::' operator.
14393         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
14394         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
14395         (lookup_template_class): Call mangle_decl for new ABI.
14396         (get_mostly_instantiated_function_type): New function.
14397         (set_mangled_name_for_template_decl): Use it.
14398         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
14399         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
14400         conversion op names.
14401         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
14402         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
14403         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
14404         mangle_typeinfo_string_for_type.
14405
14406 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
14407
14408         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
14409         (INNERMOST_TEMPLATE_ARGS): New macro.
14410         (innermost_args): Remove.
14411         (get_innermost_template_args): New function.
14412         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
14413         * error.c (dump_function_decl): Be caution when using
14414         most_general_template.
14415         * method.c (build_template_parm_names):  Use
14416         INNERMOST_TEMPLATE_ARGS.
14417         * pt.c (add_to_template_args): Tidy comment
14418         (get_innermost_template_args): New function.
14419         (check_explicit_specialization): Clear DECL_INITIAL for a new
14420         specialization.
14421         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
14422         Tidy.
14423         (push_template_decl): Always register specializations of the most
14424         general template.
14425         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
14426         (coerce_template_parms): Likewise.
14427         (lookup_template_class): Likewise.
14428         (innermost_args): Remove.
14429         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
14430         (tsubst_decl): Handle tricky specializations.  Use
14431         get_innermost_template_args.
14432         (instantiate_template): Simplify handling of partial
14433         instantiations.
14434         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
14435         (most_general_template): Reimplement, in a more straightforward
14436         manner.
14437         (regenerate_decl_from_template): Tweak formatting.  Use
14438         TMPL_ARGS_DEPTH for clarity.
14439         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
14440
14441         * dump.c (dequeue_and_dump): Dump information about thunks.
14442
14443 2000-06-01  Richard Henderson  <rth@cygnus.com>
14444
14445         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
14446
14447 2000-06-01  Richard Henderson  <rth@cygnus.com>
14448
14449         * decl2.c (unsupported_options): Fix typo, make const.
14450         (lang_decode_option): Fix bsearch argument order.
14451
14452 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
14453
14454         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
14455         on FIELD_DECLs.
14456
14457 2000-05-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14458
14459         * cp-tree.h (c_get_alias_set): Deleted.
14460         * Makefile.in (decl.o): Include ../expr.h.
14461         * decl.c (expr.h): Include.
14462         (init_decl_processing): Call record_component_aliases for arrays.
14463         (grokdeclarator): Likewise.
14464         Set TREE_ADDRESSABLE for fields that aren't bitfields.
14465         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
14466
14467 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
14468
14469         Remove guiding declaration support.
14470         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
14471         (flag_guiding_decls): Remove.
14472         * call.c (build_user_type_conversion_1): Remove support for
14473         guiding decls.
14474         (build_new_function_call): Likewise.
14475         (build_new_op): Likewise.
14476         (build_new_method_call): Likewise.
14477         * decl.c (start_function): Likewise.
14478         * friend.c (is_friend): Likewise.
14479         (do_friend): Likewise.
14480         * decl2.c ((flag_dump_translation_unit): Make it const.
14481         (flag_guiding_decls): Remove.
14482         (unsupported_options): New variable
14483         (compare_options): New function.
14484         (lang_decode_option): Use them.
14485
14486         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
14487
14488         * method.c (mangle_expression): Adjust test for legal expression
14489         operators.
14490
14491         * pt.c (instantiate_decl): Save and restore the local
14492         specializations list.
14493
14494 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
14495
14496         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
14497
14498 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
14499
14500         * call.c (add_template_candidate_real): Handle member template
14501         constructors for classes with virtual bases.
14502         (build_user_type_conversion_1): Use in_charge_arg_for_name.
14503         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
14504
14505         * ir.texi: Update thunk documentation.
14506
14507         * call.c (joust): Fix handling of overloaded builtin operators.
14508
14509 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
14510
14511         * cp-tree.h (DECL_ANTICIPATED): New macro.
14512         Document new use of DECL_LANG_FLAG_7.
14513         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
14514         in the user namespace.
14515         * lex.c (do_identifier): If the identifier's declaration has
14516         DECL_ANTICIPATED on, it has not yet been declared.  But do not
14517         replace it with an ordinary implicit declaration.
14518
14519         * tinfo2.cc: Include stdlib.h.
14520
14521 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
14522
14523         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
14524         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
14525         CLASSTYPE_ALIGN.
14526
14527 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
14528
14529         * decl2.c (lang_decode_option): Use skip_leading_substring instead
14530         of plain strncmp.
14531
14532 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
14533
14534         * operators.def (<?): Duplicated, should have been...
14535         (>?): this.  Fixed.
14536
14537 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
14538             Mark Mitchell  <mark@codesourcery.com>
14539
14540         * cp-tree.h (ansi_opname): Make it a macro.
14541         (ansi_assopname): Likewise.
14542         (struct lang_decl_flags): Add assignment_operator_p.
14543         (struct lang_decl): Add operator_code.
14544         (DECL_VTT_PARM): Adjust.
14545         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
14546         overloaded operator.
14547         (SET_OVERLOADED_OPERATOR_CODE): New macro.
14548         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
14549         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
14550         (opname_tab): Remove.
14551         (assignop_tab): Likewise.
14552         (operator_name_info_t): New type.
14553         (operator_name_info): New variable.
14554         (assignment_operator_name_info): Likewise.
14555         (build_cp_library_fn): Remove declaration.
14556         (push_cp_library_fn): Likewise.
14557         (operator_name_string): Likewise.
14558         (build_decl_overload): Likewise.
14559         * call.c (print_z_candidates): Simplify.
14560         (build_object_call): Adjust usage of ansi_opname.  Use
14561         DECL_OVERLOADED_OPERATOR_P.
14562         (op_error): Adjust operator name lookup.
14563         (build_conditional_expr): Adjust usage of ansi_opname.
14564         (build_new_op): Likewise.
14565         (build_op_delete_call): Likewise.
14566         (build_over_call): Likewise.
14567         (joust): Use DECL_OVERLOADED_OPERATOR_P.
14568         * decl.c (duplicate_decls): Copy operator_code.
14569         (init_decl_processing): Adjust parameters to push_cp_library_fn.
14570         (builtin_function): Adjust parameters to build_library_fn_1.
14571         (build_library_fn_1): Accept an overloaded operator code.
14572         (build_library_fn): Pass ERROR_MARK.
14573         (build_cp_library_fn): Accept an overloaded operator code.
14574         (push_cp_library_fn): Likewise.
14575         (grokfndecl): Tweak.
14576         (grokdeclarator): Simplify code to compute names of overloaded
14577         operators.  Adjust use of ansi_opname.
14578         (ambi_op_p): Work on tree_codes, not identifiers.
14579         (unary_op_p): Likewise.
14580         (grok_op_properties): Likewise.
14581         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
14582         (lang_mark_tree): Don't try to mark the operator_code.
14583         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
14584         * error.c (dump_decl): Remove special handling for operator
14585         names.
14586         (dump_function_name): Likewise.
14587         (dump_expr): Adjust name lookup of operators.
14588         (op_to_string): Simplify.
14589         (assop_to_string): Likewise.
14590         * init.c (build_new_1): Adjust use of ansi_opname.
14591         * lex.c (opname_tab): Remove.
14592         (assignop_tab): Likewise.
14593         (ansi_opname): Likewise.
14594         (ansi_assopname): Likewise.
14595         (operator_name_string): Likewise.
14596         (reinit_lang_specific): Likewise.
14597         (operator_name_info): New variable.
14598         (assignment_operator_name_info): Likewise.
14599         (init_operators): New function.
14600         (init_parse): Use it.
14601         (do_identifier): Adjust use of ansi_opname.
14602         * method.c (mangle_expression): Don't use ansi_opname for
14603         mangling.
14604         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
14605         (build_decl_overload): Remove.
14606         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
14607         (do_build_assign_ref): Adjust use of ansi_opname.
14608         (synthesize_method): Likewise.
14609         (implicitly_declare_fn): Likewise.
14610         * operators.def: New file.
14611         * parse.y (operator): Adjust use of ansi_opname.
14612         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
14613         (set_mangled_name_for_template_decl): Don't play games with
14614         current_namespace.
14615         (special_function_p): Adjust use of ansi_opname.
14616         * typeck.c (check_return_expr): Likewise.
14617         * Make-lang.in (cc1plus): Depend on operators.def.
14618         * Makefile.in (lex.o): Likewise.
14619         (decl.o): Likewise.
14620
14621 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
14622
14623         * Make-lang.in (cplib2.ready): Eradicate.
14624
14625 2000-05-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14626
14627         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
14628         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
14629         (built_min, cp_tree_equal): Likewise.
14630
14631 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
14632
14633         * class.c (layout_nonempty_base_or_field): Replace
14634         `record_layout_info' with `record_layout_info_s'.
14635
14636 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
14637
14638         Fix goto checking.
14639         * cp-tree.h (struct language_function): x_named_labels is now
14640         a struct named_label_list*.
14641         * decl.c (struct named_label_use_list): Renamed from...
14642         (struct named_label_list): ...this.  New struct.
14643         (push_binding_level): Don't set eh_region.
14644         (note_level_for_eh): New fn.
14645         (pop_label): Take label and old value directly.
14646         (pop_labels): Adjust for new named_labels format.
14647         (lookup_label): Likewise.
14648         (poplevel): Note characteristics of a binding level containing a
14649         named label.  Mess with named label lists earlier.
14650         (mark_named_label_lists): New fn.
14651         (mark_lang_function): Call it.
14652         (use_label): New fn, split out from...
14653         (make_label_decl): ...here.  Don't call it.
14654         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
14655         check_previous_gotos): New fns, split out from...
14656         (define_label): ...here.
14657         (check_switch_goto): New fn.
14658         (define_case_label): Call it.
14659         (check_goto): New fn.
14660         * semantics.c (finish_goto_stmt): Call it and use_label.
14661         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
14662         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
14663
14664 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
14665
14666         * class.c (build_vtable_entry_ref): Correct usage of
14667         get_vtbl_decl_for_binfo.
14668
14669         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
14670         * method.c (implicitly_declare_fn): Not here.
14671
14672 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
14673
14674         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
14675         (CPTI_PTMD_DESC_TYPE): ... here.
14676         (ptmd_desc_type_node): Rename to ...
14677         (ptm_desc_type_node): ... here.
14678         * decl.c: Likewise.
14679         * rtti.c (ptmd_initializer): Rename to ...
14680         (ptm_initializer): ... here.
14681         (sythesize_tinfo_var): Adjust. Deal with pointer to member
14682         function.
14683         (create_tinfo_types): Adjust.
14684
14685 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
14686
14687         Finish implementation of VTTs.
14688         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
14689         CPTI_VTT_PARM_IDENTIFIER.
14690         (vtt_parm_identifier): New macro.
14691         (vtt_parm_type): Likewise.
14692         (BINFO_SUBVTT_INDEX): Likewise.
14693         (BINFO_VPTR_INDEX): Likewise.
14694         (struct lang_decl): Add vtt_parm.
14695         (DECL_VTT_PARM): New macro.
14696         (DECL_USE_VTT_PARM): Likewise.
14697         (DECL_NEEDS_VTT_PARM_P): Likewise.
14698         (get_vtt_name): Declare.
14699         (build_artificial_parm): Likewise.
14700         (fixup_all_virtual_upcast_offsets): Likewise.
14701         (expand_indirect_vtbls_init): Remove.
14702         * call.c (build_new_method_call): Pass the vtt to subobject
14703         constructors and destructors.
14704         * class.c (get_vtt_name): Give it external linkage.
14705         (build_clone): Handle the magic VTT parameters for clones.
14706         (clone_function_decl): Fix typo in comment.
14707         (build_vtt): Keep track of the indices in the VTTs where various
14708         entities are stored.
14709         (build_vtt_inits): Likewise.
14710         (dfs_build_vtt_inits): Likewise.
14711         (build_ctor_vtbl_group): Tweak type of construction vtables.
14712         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
14713         primary bases, when building construction vtables.
14714         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
14715         (initialize_predefined_identifiers): Add vtt_parm_identifier.
14716         (init_decl_processing): Initialize vtt_parm_type.
14717         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
14718         (lang_mark_tree): Make vtt_parm.
14719         * decl2.c (build_artificial_parm): New function.
14720         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
14721         (grokclassfn): Use build_artificial_parm.
14722         * init.c (initialize_vtbl_ptrs): Call
14723         fixup_all_virtual_upcast_offsets directly.
14724         (perform_member_init): Use the complete subobject destructor for
14725         member cleanups.
14726         (build_vtbl_address): New function.
14727         (expand_virtual_init): Handle VTTs.
14728         * optimize (maybe_clone_body): Likewise.
14729         * search.c (fixup_all_virtual_upcast_offsets): Give it external
14730         linkage.
14731         (expand_indirect_vtbls_init): Remove.
14732         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
14733         * tree.c (make_binfo): Make them bigger.
14734
14735 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
14736
14737         * inc/cxxabi.h (__pbase_type_info): Define, based on
14738         __pointer_type_info.
14739         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
14740         (__pointer_to_member_type_info): Likewise.
14741         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
14742         (__pointer_to_member_type_info::__is_pointer_p): Remove.
14743         (__pointer_type_info::__do_catch): Rename to ...
14744         (__pbase_type_info::__do_catch): ... here. Adjust.
14745         (__pbase_type_info::__pointer_catch): Implement.
14746         (__pointer_type_info::__pointer_catch): Adjust.
14747         (__pointer_to_member_type_info::__pointer_catch): Adjust.
14748
14749 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
14750
14751         * tinfo.h (__user_type_info::contained_virtual_p): New
14752         predicate.
14753         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
14754         shaped hierarchy.
14755         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
14756         diamond shaped hierarchy. Add early out for mixed diamond and
14757         duplicate shaped hierarchy.
14758
14759 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
14760
14761         * cp-tree.h (build_delete): Change prototype.
14762         (build_vec_delete): Likewise.
14763         * call.c (build_scoped_method_call): Use special_function_kind
14764         values to indicate the kind of destruction to be done.
14765         (build_method_call): Likewise.
14766         * decl.c (finish_destructor_body): Likewise.
14767         (maybe_build_cleanup_1): Likewise.  Rename to ...
14768         (maybe_build_cleanup): ... this.
14769         * decl2.c (delete_sanity): Use special_function_kind
14770         values to indicate the kind of destruction to be done.
14771         (build_cleanup): Likewise.
14772         * init.c (perform_member_init): Likewise.
14773         (build_vec_delete_1): Likewise.
14774         (build_dtor_call): Simplify.
14775         (build_delete): Use special_function_kind
14776         values to indicate the kind of destruction to be done.
14777         (build_vbase_delete): Likewise.
14778         (build_vec_delete): Likewise.
14779
14780         * init.c (sort_member_init): Fix typo in error message generation
14781         code.
14782
14783 2000-05-15  Donald Lindsay  <dlindsay@cygnus.com>
14784
14785         * semantics.c (begin_class_definition): make the packed
14786         attribute be sensitive to the "-fpack-struct" command line flag
14787
14788 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
14789
14790         Update new-abi upcast algorithm.
14791         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
14792         prototype and meaning of return value.
14793         (__si_class_type_info::__do_upcast): Likewise.
14794         (__vmi_class_type_info::__do_upcast): Likewise.
14795         * tinfo.cc (__class_type_info::__upcast_result): Replace
14796         whole2dst with part2dst. Adjust ctor.
14797         (__class_type_info::__do_upcast): Adjust call of worker function.
14798         (__class_type_info::__do_upcast): Adjust.
14799         (__si_class_type_info::__do_upcast): Adjust. Use parent's
14800         __do_upcast.
14801         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
14802         virtual base in diamond hierarchy bug.
14803
14804 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
14805
14806         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
14807         and bitfield to tinfo_fn_p.
14808         (DECL_TINFO_FN_P): Adjust.
14809         (SET_DECL_TINFO_FN_P): Likewise.
14810         (DECL_MUTABLE_P): Likewise.
14811         (DECL_C_BIT_FIELD): Likewise.
14812         (SET_DECL_C_BIT_FIELD): Likewise.
14813         (CLEAR_DECL_C_BIT_FIELD): Likewise.
14814         (DECL_UNINLINABLE): Likewise.
14815         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
14816         (handle_using_decl): Remove assertion.
14817         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
14818         to build FIELD_DECLs.
14819         (build_base_field): Likewise.
14820         (layout_class_type): Likewise.
14821         * decl.c (init_decl_processing): Likewise.
14822         (build_ptrmemfunc_type): Likewise.
14823         (grokdeclarator): Likewise.
14824         * decl2.c (grok_x_components): Likewise.
14825         * except.c (call_eh_info): Likewise.
14826         * init.c (init_init_processing): Likewise.
14827         * rtti.c (expand_class_desc): Likewise.
14828         (create_pseudo_type_info): Likewise.
14829         (get_vmi_pseudo_type_info): Likewise.
14830         (create_tinfo_types): Likewise.
14831         * ptree.c (print_lang_decl): Adjust.
14832         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
14833         before checking DECL_MUTABLE_P.
14834
14835         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
14836         parameters for template functions.
14837         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
14838         destructors as well as constructors.
14839
14840 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
14841
14842         * class.c (build_ctor_vtbl_group): Set inits.
14843         * optimize.c (maybe_clone_body): Set DECL_INLINE and
14844         DECL_THIS_INLINE appropriately for clones.
14845
14846         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
14847         (DECL_CONV_FN_P): Simplify.
14848         (DECL_OPERATOR): Remove.
14849         (language_to_string): Declare.
14850         * decl.c (duplicate_decls): Fix typo in comment.
14851         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
14852         (grok_op_properties): Use DECL_CONV_FN_P instead of
14853         IDENTIFIER_TYPENAME_P.
14854         * dump.c (dequeue_and_dump): Dump the language linkage of
14855         declarations.
14856         * error.c (language_to_string): Give it external linkage.
14857         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
14858         (implicitly_declare_fn): Set DECL_LANGUAGE.
14859         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
14860         IDENTIFIER_TYPENAME_P.
14861         (tsubst_decl): Likewise.
14862         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
14863         * semantics.c (finish_member_declaration): Don't mark members of
14864         classes declared in an extern "C" region as extern "C".
14865
14866 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14867
14868         * decl2.c (qualified_lookup_using_namespace): Look through
14869         namespace aliases.
14870
14871         * decl.c (push_using_decl): Return the old decl on namespace level.
14872
14873 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
14874
14875         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
14876         (VTT_NAME_PREFIX): New macro.
14877         (CTOR_VTBL_NAME_PREFIX): Likewise.
14878         (get_ctor_vtbl_name): New function.
14879         * class.c (get_vtable_name): Simplify.
14880         (get_vtt_name): New function.
14881         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
14882         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
14883         when a virtual base becomes primary.
14884         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
14885         VTTs.
14886         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
14887         additional parameters.
14888         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
14889         (initialize_array): New function.
14890         (build_vtt): Likewise.
14891         (build_vtt_inits): Likewise.
14892         (dfs_build_vtt_inits): Likewise.
14893         (dfs_fixup_binfo_vtbls): Likewise.
14894         (build_ctor_vtbl_group): Likewise.
14895         (initialize_vtable): Use initialize_array.
14896         (accumulate_vtbl_inits): Reimplement to handle construction
14897         vtables.
14898         (dfs_accumulate_vtbl_inits): Likewise.
14899         (bulid_vtbl_initializer): Adjust parameter name.
14900         * method.c (build_typename_overload): Remove #if 0'd code.
14901         (get_ctor_vtbl_name): New function.
14902         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
14903         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
14904
14905         * cp-tree.h (struct lang_type): Remove search_slot.
14906         (CLASSTYPE_SEARCH_SLOT): Remove.
14907         (emit_base_init): Change prototype.
14908         (initialize_vtbl_ptrs): Likewise.
14909         (expand_indirect_vtbls_init): Likewise.
14910         (clear_search_slots): Remove.
14911         * decl.c (lang_mark_tree): Don't mark search_slot.
14912         * init.c (initialize_vtbl_ptrs): Simplify.
14913         (emit_base_init): Likewise.
14914         * search.c (struct vbase_info): Document decl_ptr.
14915         (convert_pointer_to_single_level): Remove.
14916         (dfs_find_vbases): Remove.
14917         (dfs_init_base_pointers): Simplify.
14918         (dfs_clear_vbase_slots): Remove.
14919         (dfs_vtable_path_unmark): New function.
14920         (init_vbase_pointers): Simplify.
14921         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
14922         (expand_indirect_vtbls_init): Simplify.  Don't call
14923         mark_all_temps_used.
14924         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
14925         initialize_vtbl_ptrs.
14926
14927 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
14928
14929         * except.c: Add static prototypes.
14930
14931 2000-05-20  H.J. Lu  <hjl@gnu.org>
14932
14933         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
14934
14935 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
14936
14937         Don't create a separate copy of virtual bases for the
14938         CLASSTYPE_VBASECLASSES list.
14939         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
14940         (BINFO_FOR_VBASE): Remove.
14941         (CANONICAL_BINFO): Adjust.
14942         (binfo_for_vbase): New function.
14943         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
14944         instead of BINFO_FOR_VBASE.
14945         (build_vbase_pointer): Likewise.
14946         (build_secondary_vtable): Likewise.
14947         (dfs_mark_primary_bases): Likewise.
14948         (mark_primary_bases): Likewise.
14949         (layout_nonempty_base_or_field): Likewise.
14950         (dfs_set_offset_for_shared_vbases): Likewise.
14951         (dfs_set_offset_for_unshared_vbases): Likewise.
14952         (layout_virtual_bases): Likewise.  Adjust for changes to the
14953         CLASSTYPE_VBASECLASSES list.
14954         (dump_class_hierarchy_r): Use binfo_for_vbase
14955         instead of BINFO_FOR_VBASE.
14956         (dump_class_hierarchy): Likewise.
14957         (finish_vtbls): Likewise.
14958         (build_vtbl_initializer): Adjust for changes to the
14959         CLASSTYPE_VBASECLASSES list.
14960         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
14961         * decl.c (finish_destructor_body): Adjust for changes to the
14962         CLASSTYPE_VBASECLASSES list.
14963         * init.c (sort_base_init): Use binfo_for_vbase.
14964         (construct_virtual_bases): Adjust for changes to the
14965         CLASSTYPE_VBASECLASSES list.
14966         (expand_member_init): Use binfo_for_vbase.
14967         (build_vbase_delete):  Adjust for changes to the
14968         CLASSTYPE_VBASECLASSES list.
14969         * method.c (do_build_copy_constructor): Likewise.
14970         * rtti.c (get_base_offset): Use binfo_for_vbase.
14971         (expand_class_desc): Remove #if 0'd code.
14972         * search.c (struct vbase_info): Remove vbase_types.
14973         (get_base_distance):  Use binfo_for_vbase.
14974         (lookup_field_queue_p): Use CANONICAL_BINFO.
14975         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
14976         (get_pure_virtuals): Adjust for changes to the
14977         CLASSTYPE_VBASECLASSES list.
14978         (dfs_find_vbases): Use binfo_for_vbase.
14979         (dfs_init_vbase_pointers): Likewise.
14980         (init_vbase_pointers): Don't initialize vi.vbase_types.
14981         (virtual_context): Use binfo_for_vbase.
14982         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
14983         CLASSTYPE_VBASECLASSES list.
14984         (expand_indirect_vtbls_init): Simplify.
14985         (dfs_get_vbase_types): Don't replicate virtual bases.
14986         (find_vbase_instance): Use binfo_for_vbase.
14987         (binfo_for_vbase): New function.
14988         * typeck.c (get_delta_difference): Use binfo_for_vbase.
14989
14990 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
14991
14992         * decl2.c (finish_anon_union): Generalize error messages to handle
14993         anonymous structures.
14994         * init.c (perform_member_init): Remove `name' parameter.
14995         (build_field_list): New function.
14996         (sort_member_init): Handle anonymous union initialization order
14997         correctly.  Check for multiple initializations of the same union.
14998         (emit_base_init): Don't look up fields by name here.
14999         (expand_member_init): Record the result of name lookup for future
15000         reference.
15001         * typeck.c (build_component_ref): Fix formatting.
15002
15003 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
15004
15005         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
15006         * typeck.c (build_x_compound_expr): Replace warn_unused with
15007         warn_unused_value.
15008
15009         * decl2.c (lang_decode_option): Update -Wall unused flags by
15010         calling set_Wunused.
15011
15012 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
15013
15014         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
15015         * init.c (dfs_vtable_path_unmark): Remove.
15016         * search.c (marked_new_vtable_p): Likewise.
15017         (unmarked_new_vtable_p): Likewise.
15018         (dfs_search_slot_nonempty_p): Likewise.
15019         (dfs_mark): Likewise.
15020         (dfs_vtable_path_unmark): Likewise.
15021         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
15022         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
15023         (dfs_init_vbase_pointers): Remove special-case new ABI code.
15024         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
15025         (init_vbase_pointers): Simplify.
15026         (expand_indirect_vtbls_init): Likewise.
15027
15028         * class.c (copy_virtuals): New function.
15029         (build_primary_table): Use it.
15030         (build_secondary_vtable): Likewise.
15031         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
15032         indicate that no vcall offset is required.
15033         (add_virtual_function): Likewise.
15034         (modify_all_vtables): Likewise.
15035         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
15036         (dfs_accumulate_vtbl_inits): Likewise.
15037         (build_vtbl_initializer): Make changes to handle construction
15038         vtables.
15039         (dfs_build_vcall_offset_vtbl_entries): Likewise.
15040         (build_rtti_vtbl_entries): Likewise.
15041         (build_vtable_entries): Handle a NULL vcall_index.
15042
15043 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
15044
15045         * decl2.c (lang_decode_option): Fix thinko.
15046
15047 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
15048
15049         * except.c (check_handlers): New fn.
15050         * cp-tree.h: Declare it.
15051         * semantics.c (finish_handler_sequence): Call it.
15052         (finish_function_handler_sequence): Likewise.
15053         (finish_handler_parms): Set TREE_TYPE on the handler.
15054         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
15055         * search.c (get_base_distance_recursive): If protect>1, ignore
15056         special access.
15057         (get_base_distance): Don't reduce watch_access.
15058
15059 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
15060
15061         * lex.c: #include diagnostic.h.
15062         (lang_init_options): Set default prefixing rules.
15063
15064         * lang-options.h: Add -fdiagnostics-show-location=.
15065
15066         * decl2.c: #include diagnostic.h.
15067         (lang_decode_option): Handle -fdiagnostics-show-location=.
15068
15069 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
15070
15071         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
15072         * vec.cc: Revert my 2000-05-07 change.
15073
15074 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
15075
15076         * class.c (check_field_decls): Complain about non-static data
15077         members with same name as class in class with constructor.
15078
15079 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
15080
15081         * decl.c (grokdeclarator): Allow non-static data members with
15082         same name as class.
15083
15084 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
15085
15086         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
15087         and pending_inline.filename.  Update prototypes.
15088         * decl.c (define_label): Constify filename parameter.
15089         * decl2.c (warn_if_unknown_interface): Constify local char *.
15090         * input.c Constify input_source.filename. Don't declare
15091         input_filename or lineno.  Constify filename parameter to feed_input.
15092         * lex.c (init_parse): Constify parameter and return value.
15093         (cp_pragma_interface, cp_pragma_implementation): Constify
15094         filename argument.
15095         (reinit_parse_for_method, reinit_parse_for_block,
15096         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
15097         Constify local char *.
15098         * pt.c: Don't declare lineno or input_filename.
15099         (print_template_context, tsubst_friend_function, tsubst_decl,
15100         tsubst, instantiate_decl): Constify local char *.
15101         * semantics.c (expand_body): Constify local char *.
15102         * tree.c (build_srcloc): Constify filename parameter.
15103         * typeck.c (c_expand_asm_operands): Constify filename
15104         parameter.
15105
15106 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
15107
15108         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
15109         offsetof expansion.
15110
15111 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
15112
15113         * inc/cxxabi.h:  Fix typos in comment.
15114         (__base_class_info::__offset): Use a static_cast.
15115
15116 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
15117
15118         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
15119         of std::size_t and std::ptrdiff_t respectively.
15120         * tinfo.cc: Likewise.
15121         * vec.cc: Likewise.
15122
15123 2000-05-06  Richard Henderson  <rth@cygnus.com>
15124
15125         * typeck.c (build_c_cast): Don't warn integer->pointer size
15126         mismatch for constants.
15127
15128 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
15129
15130         * rtti.c (ptmd_initializer): Set non-public, if class is
15131         incomplete.
15132
15133         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
15134         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
15135         __cxa_vec_delete): Likewise.
15136         * tinfo.cc (__dynamic_cast): Likewise.
15137         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
15138         __cxa_vec_delete): Likewise.
15139
15140 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
15141
15142         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
15143         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
15144         (lang_decl_flags): Add vcall_offset.
15145         (THUNK_VCALL_OFFSET): Use it.
15146         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
15147         * method.c (make_thunk): Create the lang_decl here, not in
15148         emit_thunk.
15149         (emit_thunk): Make generic thunks into ordinary functions once
15150         they have been fed to expand_body.
15151         * semantics.c (expand_body): Set current_function_is_thunk here.
15152
15153 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15154
15155         * class.c (update_vtable_entry_for_fn): Prototype.
15156
15157         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
15158         and `tmpl'.
15159
15160         * search.c (dfs_build_inheritance_graph_order): Prototype.
15161
15162 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
15163
15164         * cp-tree.h (special_function_kind): Add various kinds of
15165         destructors.
15166         (special_function_p): New function.
15167         * class.c (overrides): Don't let one kind of destructor override
15168         another.
15169         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
15170         whether or not to instantiate a template.
15171         * tree.c (special_function_p): Define.
15172
15173 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
15174
15175         * cp-tree.def (THUNK_DECL): Remove.
15176         * cp-tree.h (DECL_THUNK_P): New macro.
15177         (DECL_NON_THUNK_FUNCTION_P): Likewise.
15178         (DECL_EXTERN_C_FUNCTION_P): Likewise.
15179         (SET_DECL_THUNK_P): Likewise.
15180         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
15181         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
15182         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
15183         * decl.c (decls_match): Use DECL_EXTERN_C_P.
15184         (duplicate_decls): Likewise.
15185         (pushdecl): Likewise.  Adjust thunk handling.
15186         (grokfndecl): Use DECL_EXTERN_C_P.
15187         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
15188         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
15189         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
15190         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
15191         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
15192         DECL_NO_STATIC_CHAIN.
15193         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
15194         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
15195         * search.c (covariant_return_p): Remove THUNK_DECL handling.
15196         * ir.texi: Update.
15197
15198 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
15199
15200         * tree.c (walk_tree): Set lineno.
15201
15202 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
15203
15204         * exception.cc: Update license notice.
15205         * new.cc: Likewise.
15206         * new1.cc: Likewise.
15207         * new2.cc: Likewise.
15208         * tinfo.cc: Likewise.
15209         * tinfo2.cc: Likewise.
15210         * vec.cc: Likewise.
15211         * inc/cxxabi.h: Likewise.
15212         * inc/exception: Likewise.
15213         * inc/new: Likewise.
15214         * inc/new.h: Likewise.
15215         * inc/typeinfo: Likewise.
15216
15217 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
15218
15219         * tree.c (build_target_expr_with_type): If we already have a
15220         TARGET_EXPR, just return it.
15221
15222         * optimize.c (initialize_inlined_parameters): Don't generate an
15223         EXPR_STMT if we can just use DECL_INITIAL.
15224         * decl.c (emit_local_var): Only make the initialization a
15225         full-expression if stmts_are_full_exprs_p.
15226
15227 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
15228
15229         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
15230         macro.
15231         * call.c (standard_conversion): Use it.
15232         (direct_reference_binding): Likewise.
15233         (build_over_call): Likewise.
15234         (is_properly_derived_from): Likewise.
15235         (compare_ics): Likewise.
15236         * class.c (resolves_to_fixed_type_p): Likewise.
15237         * optimize.c (declare_return_variable): Likewise.
15238         * pt.c (is_specialization_of): Likewise.
15239         (unify): Likewise.
15240         * typeck.c (comp_target_parms): Likeiwse.
15241         (build_static_cast): Likewise.
15242         (build_reinterpret_cast): Likewise.
15243         (build_const_cast): Likewise.
15244         (comp_ptr_ttypes_real): Likewise.
15245         (comp_ptr_ttypes_const): Likewise.
15246         * typeck2.c (process_init_constructor): Likewise.
15247
15248 2000-04-30  Scott Snyder <snyder@fnal.gov>
15249
15250         * decl.c (finish_destructor_body): Use the base destructor when
15251         destroying virtual bases.
15252
15253 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
15254
15255         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
15256         STMT_EXPRs.
15257         * optimize.c (struct inline_data): Add target_exprs field.
15258         (declare_return_variable): When a function returns an aggregate,
15259         use the variable declared in the TARGET_EXPR as the remapped
15260         DECL_RESULT.
15261         (expand_call_inline): Update the pending target_exprs stack.
15262         (optimize_function): Initialize the stack.
15263
15264         * decl2.c (finish_file): Fix typo in comment.
15265
15266         * method.c (emit_thunk): Don't try to return a `void' value.
15267
15268         * optimize.c (initialize_inlined_parameters): If the parameter is
15269         addressable, we need to make a new VAR_DECL, even if the
15270         initializer is constant.
15271
15272 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
15273
15274         * decl.c (grok_op_properties): Add an extra check of argtypes.
15275
15276 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
15277
15278         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
15279         variables.
15280         (initialize_inlined_parameters): Try to avoid creating new
15281         VAR_DECLs.
15282
15283 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
15284
15285         * lex.c (my_get_run_time): Remove.
15286         (init_filename_times): Use get_run_time instead of my_get_run_time.
15287         (check_newline): Likewise.
15288         (dump_time_statistics): Likewise.
15289         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
15290         of computing elapsed time explicitly.
15291
15292 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
15293
15294         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
15295         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
15296         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
15297         before calling decl_constant_value.
15298         * class.c (check_bitfield_decl): Likewise.
15299         * cvt.c (ocp_convert): Likewise.
15300         (convert): Likewise.
15301         * decl.c (compute_array_index_type): Likewise.
15302         (build_enumerator): Likewise.
15303         * decl2.c (check_cp_case_value): Likewise.
15304         * pt.c (convert_nontype_argument): Likewise.
15305         (tsubst): Likewise.
15306         * typeck.c (decay_conversion): Likewise.
15307         (build_compound_expr): Likewise.
15308         (build_reinterpret_cast): Likewise.
15309         (build_c_cast): Likewise.
15310         (convert_for_assignment): Likewise.
15311
15312 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
15313
15314         * decl.c (finish_function): Don't play games with DECL_INLINE.
15315
15316 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
15317
15318         * ir.texi: Correct typo.
15319
15320 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15321
15322         * decl.c (grokdeclarator): Reject VLAs as members.
15323
15324 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
15325
15326         * call.c (standard_conversion): Accept conversion between
15327         COMPLEX_TYPEs.
15328
15329         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
15330
15331 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
15332
15333         * decl2.c (finish_file): Remove double setup for accounting
15334         compile time.
15335
15336 2000-04-24  Robert Lipe <robertlipe@usa.net>
15337
15338         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
15339
15340 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
15341
15342         * new.cc (set_new_handler): Needs to be in std::.
15343
15344 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
15345
15346         * cp-tree.h (lang_decl): Remove pretty_function_p.
15347         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
15348         language-specific node.
15349         * decl.c (cp_make_fname_decl): Use build_decl, not
15350         build_lang_decl, to build the variables.
15351         (grokvardecl): Don't call build_lang_decl for local variables in
15352         templates.
15353         (grokdeclarator): Don't call build_lang_decl for local type
15354         declarations in templates.
15355         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
15356         zero'd memory, rather than calling memset.
15357         * pt.c: Include hashtab.h.
15358         (local_specializations): New variable.
15359         (retrieve_local_specialization): Use it.
15360         (register_local_specialization): Likewise.
15361         (tsubst_decl): Don't assume local variables have
15362         DECL_LANG_SPECIFIC.
15363         (instantiate_decl): Set up local_specializations.
15364         * Makefile.in (HTAB_H): New variable.
15365
15366 2000-04-23  Richard Henderson  <rth@cygnus.com>
15367
15368         * typeck.c (c_expand_asm_operands): Restore the original
15369         contents of the output list.
15370
15371 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
15372
15373         * ir.texi:  Document complex number representation.
15374
15375 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
15376
15377         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
15378         (target_incomplete_p): New function.
15379         (tinfo_base_init): Create comdat NTBS name variable.
15380         (ptr_initializer): Add non_public parameter. Calculate it.
15381         (ptmd_initializer): Likewise.
15382         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
15383         (create_real_tinfo_var): Add non_public parameter. Use it.
15384         Push proxy into global namespace.
15385         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
15386         New enumeration.
15387         * inc/typeinfo (type_info::before, type_info::operator==):
15388         Compare __name addresses.
15389
15390         * tinfo2.cc: Remove new-abi builtins comment.
15391
15392 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
15393
15394         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
15395
15396         * call.c (joust): Exit early if we get the same function, too.
15397
15398         * decl2.c (key_method): Return NULL_TREE for template classes.
15399         (import_export_class): Don't need to check for template classes.
15400
15401 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
15402
15403         * lex.c: Remove references to cccp.c.
15404
15405 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
15406
15407         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
15408         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
15409         (DECL_DESTRUCTOR_P): Use destructor_attr.
15410         (DECL_CONST_MEMFUNC_P): Reimplement.
15411         (DECL_VOLATILE_MEMFUNC_P): Remove.
15412         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
15413         (overrides): Use DECL_DESTRUCTOR_P.
15414         (check_for_override): Likewise.
15415         * decl.c (start_function): Likewise.
15416         * decl2.c (grokfclassfn): Likewise.
15417         (check_classfn): Likewise.
15418         (grok_function_init): Likewise.
15419
15420 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
15421
15422         * decl2.c (grokfield): Issue error on illegal data member
15423         declaration.
15424
15425 2000-04-17  Mark P Mitchell  <mark@codesourcery.com>
15426
15427         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
15428
15429 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
15430
15431         * class.c (build_vtable_entry): Don't build thunks for type-info
15432         functions.
15433
15434 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
15435
15436         * decl.c (decls_match): Allow a redeclaration of a builtin to
15437         specify args while the builtin did not.
15438
15439 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
15440
15441         * cp-tree.def (THUNK_DECL): Add to documentation.
15442         * cp-tree.h (flag_huge_objects): Declare.
15443         * class.c (modify_vtable_entry): Tidy.
15444         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
15445         Calculate delta appropriately for the new ABI.
15446         (dfs_modify_vtables): Use it.
15447         (modify_all_vtables): Fix thinko in code to add overriding copies
15448         of functions to primary vtables.
15449         (build_clone): Fix typo in comment.
15450         (clone_function_decl): Correct order of destructors in vtable.
15451         (build_vbase_offset_vtbl_entries): Adjust comment.
15452         (dfs_vcall_offset_queue_p): Remove.
15453         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
15454         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
15455         (build_vtable_entry): Correct check for pure virtual functions.
15456         Don't declare flag_huge_objects.
15457         * decl.c (flag_huge_objects): Remove declaration.
15458         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
15459         Use int_size_in_bytes.
15460         (emit_thunk): Handle vcall offset thunks.
15461
15462 2000-04-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15463
15464         * decl2.c (parse_time, varconst_time): Delete declarations.
15465         (finish_file): Delete LINENO declaration.
15466         START_TIME and THIS_TIME now long.
15467
15468 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
15469
15470         * class.c (build_base_field): Reformat comment.
15471
15472         * inc/cxxabi.h (stddef.h): Comment inclusion.
15473         (__base_class_info::__offset): Comment shift.
15474
15475 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
15476
15477         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
15478         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
15479         (cp_push_exception_identifier): New macro.
15480         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
15481         (DECL_BASE_DESTRUCTOR_P): Likewise.
15482         (DECL_DELETING_DESTRUCTOR_P): Likewise.
15483         (get_vtbl_decl_for_binfo): Fix formatting.
15484         (in_charge_arg_for_name): New macro.
15485         (maybe_build_cleanup_and_delete): Remove declaration.
15486         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
15487         (in_charge_arg_for_name): New function.
15488         (build_new_method_call): Use it.  Handle cloned destructors.
15489         (build_clone): Don't make the base constructor virtual.
15490         Automatically defer generated functions.
15491         (clone_function_decl): Handle destructors, too.
15492         (clone_constructors_and_destructors): Likewise.
15493         (create_vtable_ptr): Don't create a vtable entry for a cloned
15494         function.
15495         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
15496         (initialize_predefined_identifiers): Update appropriately.
15497         (finish_destructor_body): Simplify.
15498         (maybe_build_cleanup_and_delete): Remove.
15499         * except.c (expand_throw): Handle new-ABI destructors.
15500         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
15501         (build_dtor_call): New function.
15502         (build_delete): Use it.  Simplify.
15503         * optimize.c (maybe_clone_body): Handle destructors.
15504         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
15505
15506         * exception.cc (cleanup_fn): New typedef.
15507         (CALL_CLEANUP): New macro.
15508         (cp_eh_info): Use them.
15509         (__cp_push_exception): Likewise.
15510         (__cp_pop_exception): Likewise.
15511
15512 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
15513
15514         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
15515         (complete_dtor_identifier): New macro.
15516         (CLASSTYPE_FIRST_CONVERSION): Remove.
15517         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
15518         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
15519         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
15520         (CLASSTYPE_CONSTRUCTORS): Likewise.
15521         (CLASSTYPE_DESTRUCTORS): Likewise.
15522         (lang_decl): Add cloned_function.
15523         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
15524         (DECL_BASE_CONSTRUCTOR_P): Likewise.
15525         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
15526         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
15527         (DECL_CLONED_FUNCTION_P): Likewise.
15528         (DECL_CLONED_FUNCTION): Likewise.
15529         (clone_function_decl): Declare.
15530         (maybe_clone_body): Likewise.
15531         * call.c (build_user_type_conversion_1): Call complete object
15532         constructors in the new ABI.
15533         (build_new_method_call): Don't add in-charge parameters under the
15534         new ABI.
15535         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
15536         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
15537         CLASSTYPE_DESTRUCTOR_SLOT.
15538         (build_clone): New function.
15539         (clone_function_decl): Likewise.
15540         (clone_constructors_and_destructors): Likewise.
15541         (check_bases_and_members): Use it.
15542         * decl.c (iniitialize_predefined_identifiers): Initialize
15543         complete_dtor_identifier.
15544         (finish_function): Don't add extra code to a clone.
15545         (lang_mark_tree): Mark cloned_function.
15546         * decl2.c (mark_used): Don't bother trying to instantiate things
15547         we synthesized.
15548         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
15549         * method.c (set_mangled_name_for_decl): Don't treat clones as
15550         constructors.
15551         (synthesize_method): Sythesize cloned functions, not the clones.
15552         * optimize.c (inline_data): Update comment on ret_label.
15553         (remap_block): Don't assume DECL_INITIAL exists.
15554         (copy_body_r): Allow ret_label to be NULL.
15555         (maybe_clone_body): Define.
15556         * pt.c (tsubst_decl): Handle clones.
15557         (instantiate_clone): New function.
15558         (instantiate_template): Use it.
15559         (set_mangled_name_for_template_decl): Don't treat clones as
15560         constructors.
15561         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
15562         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
15563         * semantics.c (expand_body): Clone function bodies as necessary.
15564
15565         * optimize.c (remap_decl): Avoid sharing structure for arrays
15566         whose size is only known at run-time.
15567         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
15568
15569         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
15570         to has_in_charge_parm_p.
15571         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
15572         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
15573         (DECL_COPY_CONSTRUCTOR_P): New macro.
15574         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
15575         (build_user_type_conversion_1): Likewise.
15576         (convert_like_real): Likewise.
15577         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
15578         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
15579         (copy_args_p): Likewise.
15580         (grok_ctor_properties): Likewise.
15581         (start_function): Likewise.
15582         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
15583         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
15584         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
15585         * method.c (do_build_copy_constructor): Use
15586         DECL_HAS_IN_CHARGE_PARM_P.
15587         (synthesize_method): Likewise.
15588         * pt.c (instantiate_template): Remove goto.
15589         * tree.c (build_cplus_method_type): Remove mention of obstacks in
15590         comment.
15591
15592         * cp-tre.h (finish_function): Change prototype.
15593         * decl.c (end_cleanup_fn): Adjust caller.
15594         (finish_function): Take only one parameter.
15595         * decl2.c (finish_objects): Adjust caller.
15596         (finish_static_storage_duration_function): Likewise.
15597         * method.c (emit_thunk): Likewise.
15598         * parse.y: Likewise.
15599         * parse.c: Regenerated.
15600         * pt.c (instantiate_decl): Likewise.
15601         * rtti.c (synthesize_tinfo_fn): Likewise.
15602         * semantics.c (expand_body): Likewise.
15603
15604         * cp-tree.h (copy_decl): New function.
15605         * class.c (finish_struct_1): Use it.
15606         * lex.c (copy_decl): Define it.
15607         * pt.c (tsubst_decl): Likewise.
15608         * tree.c (copy_template_template_parm): Likewise.
15609
15610         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
15611         has_nonpublic_assign_ref.
15612         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
15613         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
15614         * class.c (finish_struct_methods): Don't set
15615         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
15616         (interface_only): Don't declare.
15617         (interface_unknown): Likewise.
15618
15619 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15620
15621         * tree.h (HAVE_TEMPLATES): Remove definition.
15622         * lang-options.h (-fthis-is-variable): Remove documentation.
15623
15624 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
15625
15626         * class.c (instantiate_type): Handle object-relative template-id.
15627
15628         * semantics.c (finish_expr_stmt): Call convert_to_void here.
15629         * decl.c (cplus_expand_expr_stmt): Not here.
15630
15631         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
15632         Initialize exprtype earlier.
15633
15634         * parse.y (fn.def1): Check for defining types in return types.
15635
15636         * decl.c (check_tag_decl): Notice extra fundamental types.
15637         Diagnose empty decls in classes, too.
15638
15639         * decl.c (grokdeclarator): Don't override an anonymous name if no
15640         declarator was given.
15641
15642         * cvt.c (convert_to_void): Call resolve_offset_ref.
15643
15644         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
15645
15646         * decl2.c (decl_namespace): Handle getting a type.
15647
15648         * typeck.c (build_c_cast): Re-enable warning for cast between
15649         pointer and integer of different size.
15650
15651 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
15652
15653         * inc/cxxabi.h (__pointer_type_info): Add restrict and
15654         incomplete flags.
15655         (__pointer_type_info::__pointer_catch): New virtual function.
15656         (__pointer_to_member_type_info): Derive from
15657         __pointer_type_info. Adjust.
15658         (__pointer_to_member_type_info::__do_catch): Remove.
15659         (__pointer_to_member_type_info::__is_pointer_p): Declare.
15660         (__pointer_to_member_type_info::__pointer_catch): Declare.
15661         * rtti.c (qualifier_flags): Add restrict flag.
15662         (ptmd_initializer): Reorder members.
15663         (create_tinfo_types): Expand comments. Reorder
15664         ptmd_desc_type_node members.
15665         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
15666         Implement.
15667         (__pointer_type_info::__do_catch): Move specific code into
15668         __pointer_catch. Call it.
15669         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
15670         specific catch checking. Fix void conversion check.
15671         (__pointer_to_member_type_info::__do_catch): Remove.
15672         (__pointer_to_member_type_info::__pointer_catch): Implement.
15673
15674 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15675
15676         * lex.c (init_parse): Remove traces of classof and headof.
15677         * decl2.c (flag_operator_names): Default to 1.
15678         (lang_decode_option): Do not set it for -ansi.
15679
15680 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
15681
15682         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
15683         (DECL_MAIN_VARIANT): Remove.
15684         * decl.c (duplicate_decls): Don't set it.
15685         (start_function): Likewise.
15686         (lang_mark_tree): Don't mark it.
15687         * decl2.c (defer_fn): Don't use it.
15688         * lex.c (retrofit_lang_decl): Don't set it.
15689         * pt.c (tsubst_decl): Likewise.
15690         * ptree.c (print_lang_decl): Don't print it.
15691         * typeck.c (mark_addressable): Don't use it.
15692
15693 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
15694
15695         * vec.cc: Include <new> and <exception>.
15696         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
15697         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
15698         terminate.
15699         (__cxa_vec_delete): Catch dtor exceptions.
15700
15701 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
15702
15703         Prepend __ to implementation defined names.
15704         * inc/typeinfo (type_info): Rename _name to __name.
15705         (type_info::type_info): Rename parameter.
15706         (type_info::operator==, type_info::operator!=,
15707         type_info::before): Likewise.
15708         (type_info::is_pointer_p, type_info::is_function_p,
15709         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
15710         parameters.
15711         * inc/cxxabi.h
15712         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
15713         (__pointer_type_info::__pointer_type_info): Likewise.
15714         (__pointer_type_info::is_pointer_p,
15715         __pointer_type_info::do_catch): Prepend __. Rename parameters.
15716         (__array_type_info::__array_type_info): Rename parameters.
15717         (__function_type_info::__function_type_info): Likewise.
15718         (__function_type_info::is_function_p): Prepend __.
15719         (__enum_type_info::__enum_type_info): Rename parameters.
15720         (__pointer_to_member_type_info::__pointer_to_member_type_info):
15721         Likewise.
15722         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
15723         parameters.
15724         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
15725         (__class_type_info::__class_type_info): Rename parameters.
15726         (__class_type_info::sub_kind): Prepend __. Adjust member names.
15727         (__class_type_info::upcast_result,
15728         __class_type_info::dyncast_result): Prepend __. Move definition
15729         into tinfo.cc.
15730         (__class_type_info::do_upcast, __class_type_info::do_catch,
15731         __class_type_info::find_public_src,
15732         __class_type_info::do_dyncast,
15733         __class_type_info::do_find_public_src): Prepend __. Rename
15734         parameters.
15735         (__si_class_type_info::__si_class_type_info): Rename parameters.
15736         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
15737         __si_class_type_info::do_find_public_src): Prepent __. Rename
15738         parameters.
15739         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
15740         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
15741         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
15742         parameters.
15743         (__dynamic_cast): Rename parameters.
15744         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
15745         type_info::do_catch, type_info::do_upcast): Prepend __.
15746         (contained_p, public_p, virtual_p, contained_public_p,
15747         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
15748         (__class_type_info::do_catch,
15749         __class_type_info::do_upcast): Prepend __. Adjust.
15750         (__class_type_info::__upcast_result,
15751         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
15752         Adjust.
15753         (__class_type_info::find_public_src): Prepend __. Adjust.
15754         (__class_type_info::do_find_public_src,
15755         __si_class_type_info::do_find_public_src,
15756         __vmi_class_type_info::do_find_public_src): Likewise.
15757         (__class_type_info::do_dyncast,
15758         __si_class_type_info::do_dyncast,
15759         __vmi_class_type_info::do_dyncast): Likewise.
15760         (__class_type_info::do_upcast,
15761         __si_class_type_info::do_upcast,
15762         __vmi_class_type_info::do_upcast): Likewise.
15763         (__dynamic_cast): Adjust.
15764         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
15765         (__function_type_info::is_function_p): Likewise.
15766         (__pointer_type_info::do_catch): Likewise. Adjust.
15767         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
15768         (__throw_type_match_rtti_2): Adjust.
15769         (__is_pointer): Adjust.
15770
15771 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
15772
15773         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
15774         (complete_ctor_identifier): New macro.
15775         (special_function_kind): Add sfk_copy_constructor and
15776         sfk_assignment_operator.
15777         (LOOKUP_HAS_IN_CHARGE): Remove.
15778         (cons_up_default_function): Rename to ...
15779         (implicitly_declare_fn): ... this.
15780         * call.c (build_new_method_call): Add in-charge parameters for
15781         constructors here.
15782         * class.c (add_implicitly_declared_members): Change parameter name
15783         from cant_have_assignment to cant_have_const_assignment.
15784         Replace calls to cons_up_default_function to implicitly_declare_fn.
15785         * cvt.c (ocp_convert): Use complete_ctor_identifier.
15786         * decl.c (initialize_predefined_identifiers): Initialize it.
15787         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
15788         complex expression.
15789         * init.c (expand_default_init): Don't calculate the in-charge
15790         parameter here.
15791         (build_new_1): Likewise.
15792         * lex.c (cons_up_default_function): Move to method.c.
15793         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
15794         (implicitly_declare_fn): New function.
15795         * typeck.c (build_static_cast): Use complete_ctor_identifier.
15796         (build_modify_expr): Likewise.
15797         * typeck2.c (build_functional_cast): Likewise.
15798
15799         Under the new ABI, constructors don't return `this'.
15800         * cp-tree.h (warn_reorder): Declare.
15801         (special_function_kind): New enum.
15802         (global_base_init_list): Remove declaration.
15803         (emit_base_init): Don't return a value.
15804         (check_base_init): Don't declare.
15805         (is_aggr_typedef): Likewise.
15806         * decl.c (check_special_function_return_type): New function.
15807         (return_types): Remove.
15808         (grokdeclarator): Use check_special_function_return_type.
15809         (start_function): Don't initialize ctor_label under the new ABI.
15810         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
15811         * init.c (begin_init_stmts): Move to top of file.
15812         (finish_init_stmts): Likewise.
15813         (warn_reorder): Don't declare.
15814         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
15815         value.
15816         (check_base_init): Remove.
15817         (is_aggr_typedef): Likewise.
15818         (build_new_1): Don't use the return value of a constructor.
15819         * semantics.c (setup_vtbl_ptr): Don't use the return value
15820         of emit_base_init.
15821         * typeck.c (check_return_expr): Don't magically convert return
15822         statements into `return this' in constructors under the new ABI.
15823
15824         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
15825         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
15826         (base_ctor_identifier): New macro.
15827         (base_dtor_identifier): Likewise.
15828         (deleting_dtor_identifier): Likewise.
15829         * decl.c: Don't include obstack.h.
15830         (obstack_chunk_alloc): Don't define.
15831         (obstack_chunk_free): Likewise.
15832         (struct predefined_identifier): New type.
15833         (initialize_predefined_identifiers): New function.
15834         (init_decl_processing): Use it.
15835         (debug_temp_inits): Remove.
15836         (start_method): Don't call preserve_data.
15837         (hack_incomplete_structures): Update comment.
15838         * init.c (init_init_processing): Don't initialize
15839         nelts_identifier.
15840         (build_offset_rf): Remove dead code.
15841         (build_delete): Use CLASSTYPE_N_BASECLASSES.
15842         * search.c (init_search_processing): Don't initialize
15843         vptr_identifier.
15844
15845 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15846
15847         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
15848         some sign_compare warnings.
15849
15850 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
15851
15852         Rename abi::__vmi_class_type_info members.
15853         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
15854         base_list, detail_masks members to vmi_flags, vmi_base_count,
15855         vmi_bases and vmi_flags_masks respectively.
15856         (__vmi_class_type_info::vmi_flags_masks): Rename
15857         details_unknown_mask to flags_unknown_mask.
15858         * tinfo.cc (__class_type_info::do_upcast): Adjust.
15859         (__vmi_class_type_info::do_find_public_src): Adjust.
15860         (__vmi_class_type_info::do_dyncast): Adjust.
15861         (__vmi_class_type_info::do_upcast): Adjust.
15862
15863 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
15864
15865         * tinfo.cc (convert_to_base): New function.
15866         (get_vbase_offset): Remove. Move into convert_to_base.
15867         (__vmi_class_type_info::do_find_public_src): Adjust.
15868         (__vmi_class_type_info::do_dyncast): Adjust.
15869         (__vmi_class_type_info::do_upcast): Adjust.
15870
15871 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
15872
15873         * tinfo.cc (operator=): Use __builtin_strcmp.
15874         * tinfo2.cc (before): Likewise.
15875
15876 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
15877
15878         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
15879         (DECL_SAVED_INLINE): Rename to ...
15880         (DECL_DEFERRED_FN): ... this.
15881         (in_function_p): Remove declaration.
15882         (mark_inline_for_output): Rename to ...
15883         (defer_fn): ... this.
15884         * decl.c (finish_function): Adjust call to mark_inline_for_output.
15885         (in_function_p): Remove definition.
15886         * decl2.c (saved_inlines): Rename to ...
15887         (deferred_fns): ... this.
15888         (saved_inlines_used): Rename to ...
15889         (deferred_fns_used): ... this.
15890         (mark_inline_for_output): Rename to ...
15891         (defer_fn): ... this.
15892         (finish_file): Adjust accordingly.
15893         (init_decl2): Likewise.
15894         * lex.c (cons_up_default_function): Likewise.
15895         * pt.c (mark_decl_instantiated): Likewise.
15896         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
15897         circumstances.
15898         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
15899         * semantics.c (expand_body): Defer more functions.
15900
15901 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
15902
15903         * vec.cc: New file.
15904         * Make-lang.in (CXX_LIB2FUNCS): Add it.
15905         (vec.o): Build it.
15906         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
15907         __cxa_vec_delete): Declare.
15908
15909 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
15910
15911         * rtti.c (dfs_class_hint_mark): New static function.
15912         (dfs_class_hint_unmark): New static function.
15913         (class_hint_flags): Use them.
15914
15915 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
15916
15917         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
15918
15919 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
15920
15921         * cp-tree.h (instantiate_decl): Change prototype.
15922         * decl2.c (mark_used): Adjust call.
15923         * optimize.c (inlinable_function_p): Adjust handling of templates.
15924         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
15925         (do_type_instantiation): Likewise.
15926         (instantiate_decl): Defer more templates.
15927         (instantiate_pending_templates): Adjust logic to handle inline
15928         friend functions.
15929
15930         * Makefile.in (GGC_H): New variable.  Use it throughout in place
15931         of ggc.h.
15932
15933         * call.c: Don't include obstack.h.  Include ggc.h.
15934         (obstack_chunk_alloc): Don't define.
15935         (obstack_chunk_free): Likewise.
15936         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
15937         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
15938         (pop_switch): Free it.
15939
15940         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
15941
15942         * dump.c (dequeue_and_dump): Don't try to print the bit_position
15943         if we don't have a DECL_FIELD_OFFSET.
15944
15945 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
15946
15947         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
15948         special_function_p.
15949
15950 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15951
15952         * cfns.gperf (hash, libc_name_p): Prototype.
15953
15954         * rtti.c (build_dynamic_cast_1): Constification.
15955
15956         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
15957
15958         * semantics.c (deferred_type_access_control): Prototype.
15959
15960 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
15961
15962         Correct many new ABI issues regarding vbase and vcall offset
15963         layout.
15964         * cp-tree.h (BINFO_VTABLE): Document.
15965         (struct lang_type): Tweak formatting.
15966         (BINFO_PRIMARY_BINFO): Add to documentation.
15967         (CLASSTYPE_VSIZE): Fix typo in comment.
15968         (CLASSTYPE_VBASECLASSES): Update documentation.
15969         (BINFO_VBASE_MARKED): Remove.
15970         (SET_BINFO_VBASE_MARKED): Likewise.
15971         (CLEAR_BINFO_VBASE_MARKED): Likewise.
15972         (BINFO_FIELDS_MARKED): Remove.
15973         (SET_BINFO_FIELDS_MARKED): Likewise.
15974         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
15975         (enum access_kind): New enumeration.
15976         (num_extra_vtbl_entries): Remove declaration.
15977         (size_extra_vtbl_entries): Likewise.
15978         (get_vtbl_decl_for_binfo): New function.
15979         (dfs_vbase_unmark): Remove declaration.
15980         (mark_primary_bases): Likewise.
15981         * class.c (SAME_FN): Remove.
15982         (struct vcall_offset_data_s): Move definition.
15983         (build_vbase_pointer): Use `build', not `build_binary_op', to
15984         access the vbase pointer under the new ABI.
15985         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
15986         (build_primary_vtable): Likewise.
15987         (dfs_mark_primary_bases): Move here from search.c.
15988         (mark_primary_bases): Likewise.
15989         (determine_primary_bases): Under the new ABI, don't make a base
15990         class a primary base just because we don't yet have any virtual
15991         functions.
15992         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
15993         (num_vfun_entries): Remove.
15994         (dfs_count_virtuals): Likewise.
15995         (num_extra_vtbl_entries): Likewise.
15996         (size_extra_vtbl_entries): Likewise.
15997         (layout_virtual_bases): Iterate in inheritance graph order under
15998         the new ABI.
15999         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
16000         indicate that a vfield is present.
16001         (init_class_processing): Initialize access_public_node, etc., from
16002         ak_public, etc.
16003         (get_vtbl_decl_for_binfo): New function.
16004         (dump_class_hierarchy_r): Likewise.
16005         (dump_class_hierarchy): Use it.
16006         (finish_vtbls): Build the vtbls in inheritance graph order.
16007         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
16008         (initialize_vtable): Use get_vtbl_decl_for_binfo.
16009         (accumulate_vtbl_inits): Add comments explaining why a pre-order
16010         walk is required.
16011         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
16012         where the vptr points, even for primary vtables.
16013         (build_vtbl_initializer): Adjust handling of vbase and vcall
16014         offsets.
16015         (build_vcall_and_vbase_vtable_entries): New function.
16016         (dfs_build_vbase_offset_vtbl_entries): Remove.
16017         (build_vbase_offset_vtbl_entries): Reimplement.
16018         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
16019         were already handled in a primary base class vtable.
16020         (build_vcall_offset_vtbl_entries): Adjust.
16021         (build_rtti_vtbl_entries): Adjust.
16022         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
16023         * init.c (expand_virtual_init): Simplify.
16024         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
16025         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
16026         * search.c (BINFO_ACCESS): New macro.
16027         (SET_BINFO_ACCESS): Likewise.
16028         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
16029         (access_in_type): Likewise.
16030         (dfs_accessible_p): Likewise.
16031         (protected_accessible_p): Likewise.
16032         (lookup_fnfields_1): Adjust documentation.
16033         (dfs_mark_primary_bases): Move to class.c
16034         (mark_primary_bases): Likewise.
16035         (dfs_vbase_unmark): Remove.
16036         (virtual_context): Use BINFO_FOR_VBASE.
16037         (dfs_get_vbase_types): Simplify.
16038         (dfs_build_inheritance_graph_order): New function.
16039         (get_vbase_types): Use it.
16040         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
16041
16042         * tinfo.cc (get_vbase_offset): New function.
16043         (__vmi_class_type_info::do_find_public_src): Use it.
16044         (__vmi_class_type_info::do_dyncast): Likewise.
16045         (__vmi_class_type_info::do_upcast): Likewise.
16046
16047 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
16048
16049         * lang-specs.h: Pass -fno-show-column to the preprocessor.
16050
16051 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
16052
16053         * rtti.c (class_hint_flags): Rename flags.
16054         (class_initializer): Remove flags.
16055         (synthesize_tinfo_var): Combine offset and flags. Add flags
16056         for __vmi_class_type_info.
16057         (create_tinfo_types): Remove flags from __class_type_info and
16058         __si_class_type_info. Merge flags and offset from
16059         base_class_type_info.
16060         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
16061         (__base_class_info::is_virtual_p): Adjust.
16062         (__base_class_info::is_public_p): Adjust.
16063         (__base_class_info::offset): New accessor.
16064         (__class_type_info::details): Remove member.
16065         (__class_type_info::__class_type_info): Lose details.
16066         (__class_type_info::detail_masks): Remove.
16067         (__si_class_type_info::__si_class_type_info): Lose details.
16068         (__vmi_class_type_info::details): New member.
16069         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
16070         (__vmi_class_type_info::detail_masks): New member.
16071         * tinfo.cc (__class_type_info::do_upcast): Initialize result
16072         with unknown_details_mask.
16073         (__vmi_class_type_info::do_find_public_src): Adjust
16074         (__vmi_class_type_info::do_dyncast): Adjust.
16075         (__vmi_class_type_info::do_upcast): Set result details, if
16076         needed. Adjust.
16077         (__dynamic_cast): Temporarily #if out optimization.
16078
16079 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
16080
16081         * rtti.c (get_tinfo_decl): Mark used.
16082         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
16083         mark as dealt with, if we output it.
16084
16085 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
16086
16087         * class.c: Reorganize to put virtual function table initialization
16088         machinery at the end of the file.
16089
16090 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
16091
16092         * class.c (finish_struct): Use bitsize_zero_node.
16093         * pt.c (instantiate_class_template): Likewise.
16094
16095 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
16096
16097         Put RTTI entries at negative offsets in new ABI.
16098         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
16099         vbase offset at index -3, not -1.
16100         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
16101         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
16102         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
16103         (build_rtti_vtbl_entries): New function.
16104         (set_rtti_entry): Remove.
16105         (build_primary_vtable): Don't use it.
16106         (build_secondary_vtable): Likewise.
16107         (start_vtable): Remove.
16108         (first_vfun_index): New function.
16109         (set_vindex): Likewise.
16110         (add_virtual_function): Don't call start_vtable.  Do call
16111         set_vindex.
16112         (set_primary_base): Rename parameter.
16113         (determine_primary_base): Likewise.
16114         (num_vfun_entries): Don't use skip_rtti_stuff.
16115         (num_extra_vtbl_entries): Include RTTI information.
16116         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
16117         (skip_rtti_stuff): Remove.
16118         (dfs_modify_vtables): Don't use it.
16119         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
16120         (layout_nonempty_base_or_field): Update size handling.
16121         (create_vtable_ptr): Tweak.
16122         (layout_class_type): Adjust parameter names.
16123         (finish_struct_1): Simplify.
16124         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
16125         (skip_rtti_stuff): Remove.
16126         (first_vfun_index): New function.
16127         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
16128         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
16129         (marked_vtable_pathp): Declare.
16130         (unmarked_vtable_pathp): Likewise.
16131         * error.c (dump_expr): Use first_vfun_index to calculate vtable
16132         offsets.
16133         * rtti.c (build_headof): Look for RTTI at negative offsets.
16134         (get_tinfo_decl_dynamic): Likewise.
16135         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
16136         here.
16137         (create_pseudo_type_info): Do it here instead.  Adjust so that
16138         vptr points at first virtual function.
16139         * search.c (marked_vtable_pathp): Make it global.
16140         (unmarked_vtable_pathp): Likewise.
16141         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
16142         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
16143         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
16144         (get_pure_virtuals): Likewise.
16145         (expand_upcast_fixups): Likewise.
16146         * tree.c (debug_binfo): Likewise.
16147         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
16148         negative offset.
16149
16150 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16151
16152         * class.c (check_field_decl): Fix typo.
16153         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
16154         (check_methods): Likewise.
16155         (check_field_decls): Likewise.
16156         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
16157         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
16158         Use DECL_RESULT_FLD, not DECL_RESULT.
16159         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
16160         * lex.c (identifier_type): Likewise.
16161         * pt.c (determine_specialization, lookup_template_class): Likewise.
16162         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
16163         (resolve_overloaded_unification, more_specialized): Likewise.
16164         * semantics.c (finish_member_declaration): Likewise.
16165         * typeck.c (build_x_function_call): Likewise.
16166
16167 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
16168
16169         * class.c (layout_empty_base): Handle empty bases with non-byte
16170         alignment.
16171         (build_base_field): Likewise.
16172         (layout_virtual_bases): Likewise.
16173
16174         * class.c (finish_struct_1): Fix typo in this change:
16175
16176         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16177
16178 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
16179
16180         * decl.c (grokdeclarator): Count partial specializations when
16181         keeping track of how many template classes have been seen.
16182
16183         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
16184
16185 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16186
16187         * class.c (build_vbase_pointer_fields): layout_field now place_field.
16188         (get_vfield_offset): Use byte_position.
16189         (set_rtti_entry): Set OFFSET to ssizetype zero.
16190         (get_binfo_offset_as_int): Deleted.
16191         (dfs_record_base_offsets): Use tree_low_cst.
16192         (dfs_search_base_offsets): Likewise.
16193         (layout_nonempty_base_or_field): Reflect changes in RLI format
16194         and call byte_position.
16195         (layout_empty_base): Convert offset to ssizetype.
16196         (build_base_field): use rli_size_unit_so_far.
16197         (dfs_propagate_binfo_offsets): Do computation in proper type.
16198         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
16199         (layout_class_type): Reflect changes in RLI names and fields.
16200         (finish_struct_1): Set DECL_FIELD_OFFSET.
16201         * dump.c (dequeue_and_dump): Call bit_position.
16202         * expr.c (cplus_expand_constant): Use byte_position.
16203         * rtti.c (expand_class_desc): Use bitsize_one_node.
16204         * typeck.c (build_component_addr): Use byte_position and don't
16205         special case for zero offset.
16206
16207 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
16208
16209         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
16210
16211         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
16212         tinfo object.
16213         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
16214         vtable.
16215
16216 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16217
16218         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
16219         DECL_P macros.
16220         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
16221         make_typename_type, check_initializer, cp_finish_decl,
16222         xref_tag): Likewise.
16223         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
16224         decl_namespace, arg_assoc_template_arg, arg_assoc,
16225         validate_nonmember_using_decl, do_class_using_decl): Likewise.
16226         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
16227         args_to_string): Likewise.
16228         * friend.c (is_friend): Likewise.
16229         * lex.c (note_got_semicolon, note_list_got_semicolon,
16230         is_global): Likewise.
16231         * method.c (build_overload_nested_name, build_overload_value,
16232         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
16233         * parse.y (typename_sub, typename_sub1): Likewise.
16234         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
16235         process_partial_specialization, convert_template_argument,
16236         template_args_equal, add_pending_template, lookup_template_class,
16237         for_each_template_parm_r, maybe_fold_nontype_arg,
16238         tsubst, instantiate_template, type_unification_real, unify,
16239         instantiate_pending_templates, set_mangled_name_for_template_decl):
16240         Likewise.
16241         * repo.c (repo_get_id, repo_template_used): Likewise.
16242         * search.c (lookup_field_1): Likewise.
16243         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
16244         * xref.c (classname): Likewise.
16245
16246 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
16247
16248         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
16249         (CANONICAL_BINFO): New macro.
16250         (BINFO_NEW_VTABLE_MARKED): Use it.
16251         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
16252         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
16253         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
16254         not TREE_TYPE.
16255         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
16256         (build_secondary_vtable): Likewise.
16257         (dfs_finish_vtbls): Likewise.
16258         (dfs_accumulate_vtbl_inits): Likewise.
16259         (accumulate_vtbl_inits): New function.
16260         (finish_vtbls): Make sure that virtual bases come after
16261         non-virtual bases in the vtable group.
16262         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
16263         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
16264         * search.c (struct vbase_info): Move definition.
16265         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
16266         (unmarked_new_vtable_p): Likewise.
16267         (dfs_mark_vtable_path): Remove.
16268         (dfs_mark_new_vtable): Remove.
16269         (dfs_unmark_new_vtable): Likewise.
16270         (dfs_clear_search_slot): Likewise.
16271         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
16272         (dfs_clear_vbase_slots): Likewise.
16273         (init_vbase_pointers): LIkewise.
16274
16275 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
16276
16277         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
16278         SIZETYPE to a non-SIZETYPE.
16279
16280 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
16281
16282         * class.c (layout_virtual_bases): Adjust names in conditionally
16283         compiled code.
16284
16285         * class.c (record_base_offsets): New function.
16286         (layout_conflict_p): Likewise.
16287         (layout_nonempty_base_or_field): Use it.
16288         (layout_empty_base): New function.
16289         (build_base_field): Use it.
16290         (build_base_fields): Update comment.
16291         (layout_virtual_bases): Fold in a little code form
16292         layout_basetypes.  Use layout_empty_base.
16293         (layout_basetypes): Remove.
16294         (end_of_class): New function.
16295         (layout_class_type): Use it.  Adjust.
16296
16297         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
16298         (fntype_p): Remove.
16299         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
16300         comment.
16301         (dfs_skip_nonprimary_vbases_markedp): Likewise.
16302         * typeck.c (fntype_p): Remove.
16303
16304         * cp-tree.h (TI_SPEC_INFO): Remove.
16305         (CLASSTYPE_TI_SPEC_INFO): Likewise.
16306         * pt.c (process_partial_specialization): Likewise.
16307
16308         * class.c (build_base_field): Fix thinko in computation of binfo
16309         offsets.
16310
16311         * tree.c (mark_local_for_remap_p): Mark variables declared in
16312         TARGET_EXPRs as well.
16313
16314 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
16315
16316         * typeck.c (require_complete_type, complete_type,
16317         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
16318         build_array_ref, convert_arguments, pointer_diff,
16319         build_x_unary_op, build_unary_op, build_c_cast,
16320         build_modify_expr): Use COMPLETE_TYPE_P etc.
16321         * call.c (is_complete, convert_like_real,
16322         build_new_method_call): Likewise.
16323         * class.c (build_vbase_pointer_fields, check_bases,
16324         build_base_field, finish_struct_1, pushclass): Likewise.
16325         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
16326         * decl.c (maybe_process_template_type_declaration, pushtag,
16327         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
16328         layout_var_decl, check_initializer, cp_finish_decl,
16329         grokdeclarator, require_complete_types_for_parms,
16330         grok_op_properties, xref_tag, xref_basetypes,
16331         check_function_type): Likewise.
16332         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
16333         * friend.c (do_friend): Likewise.
16334         * init.c (build_offset_ref): Likewise.
16335         * parse.y (structsp): Likewise.
16336         * pt.c (maybe_process_partial_specialization,
16337         tsubst_friend_function, instantiate_class_template, tsubst,
16338         do_type_instantiation, instantiate_pending_templates): Likewise.
16339         * repo.c (repo_get_id): Likewise.
16340         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
16341         synthesize_tinfo_var, emit_support_tinfos): Likewise.
16342         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
16343         * semantics.c (begin_class_definition): Likewise.
16344         * tree.c (build_cplus_method_type): Likewise.
16345         * typeck2.c (digest_init, build_functional_cast,
16346         add_exception_specifier): Likewise.
16347         * parse.h, parse.c: Regenerated.
16348
16349 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
16350
16351         * inc/cxxabi.h: New header file. Define new-abi entry points.
16352         (__pointer_type_info::target): Rename member to ...
16353         (__pointer_type_info::type): ... here.
16354         (__base_class_info::type): Rename member to ...
16355         (__base_class_info::base): ... here.
16356         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
16357         * cp-tree.h (CPTI_ABI): New global tree enumeration.
16358         (abi_node): New global tree node.
16359         * decl.c (abi_node): Document.
16360         (init_decl_processing): Initialize abi_node.
16361         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
16362         (get_vmi_pseudo_type_info): Likewise.
16363         (create_tinfo_types): Likewise.
16364         (emit_support_tinfos): Likewise.
16365         * tinfo.h (cxxabi.h): Include for new-abi.
16366         Move rtti class definitions to new header file.
16367         * tinfo.cc (abi): Use the namespace.
16368         (std): Move new abi rtti classes from here ...
16369         (__cxxabiv1): ... to here.
16370         * tinfo2.cc (cxxabi.h): Include for new-abi.
16371         Move rtti class definitions to new header file.
16372         (std): Move new abi rtti classes from here ...
16373         (__cxxabiv1): ... to here.
16374         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
16375         namespace.
16376
16377 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
16378             Jason Merrill  <jason@casey.cygnus.com>
16379
16380         * method.c (build_overload_int): Use host_integerp.
16381
16382 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16383
16384         * init.c (build_offset_ref): Handle the case of a templated member
16385         function.
16386
16387 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16388
16389         * except.c (expand_exception_blocks): Clear catch_clauses_last.
16390
16391 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
16392
16393         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
16394         * class.c (check_bitfield_decl): Turn illegal bitfields into
16395         non-bitfields.
16396         (dfs_propagate_binfo_offsets): Adjust for new size_binop
16397         semantics.
16398         (dfs_offset_for_unshared_vbases): Likewise.
16399         * cvt.c (cp_convert_to_pointer): Convert NULL to a
16400         pointer-to-member correctly under the new ABI.
16401         * expr.c (cplus_expand_constant): Don't use cp_convert when
16402         turning an offset into a pointer-to-member.
16403         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
16404         when dereferencing them under the new ABI.
16405         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
16406         of pointers-to-members under the new ABI.
16407
16408         * class.c (check_bitfield_decl): Remove restriction on really long
16409         bitfields.
16410         (layout_class_type): Implement new ABI handling of bitfields
16411         longer than their types.
16412
16413 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16414
16415         * parse.y (extdefs): Call ggc_collect.
16416         * parse.c: Regenerated.
16417
16418 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
16419
16420         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
16421         (note_name_declared_in_class): Use OVL_CURRENT to get at a
16422         potential overload.
16423
16424 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16425
16426         * class.c (build_vbase_path): Use integer_zerop.
16427         (build_vtable_entry): Use tree_low_cst.
16428         (get_vfield_offset): Use bit_position.
16429         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
16430         Use tree_low_cst.
16431         (check_bitfield_decl): Set DECL_SIZE using convert.
16432         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
16433         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
16434         Use tree_low_cst.
16435         (finish_struct_1): Use bit_position.
16436         (dump_class_hierarchy): Use tree_low_cst.
16437         * cp-tree.h (min_precision): Add declaration.
16438         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
16439         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
16440         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
16441         * expr.c (cplus_expand_constant): Use bit_position.
16442         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
16443         * rtti.c (get_base_offset): Use bit_position.
16444         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
16445         host_integerp, and tree_low_cst.
16446         (pointer_int_sum): Use integer_zerop.
16447         (build_component_addr): Use bit_position.
16448
16449 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
16450
16451         * typeck.c (require_complete_type): Don't assume size_zero_node.
16452         (complete_type_or_else): Likewise.
16453
16454 2000-03-16  Steven Grady <grady@digitaldeck.com>
16455             Jason Merrill  <jason@casey.cygnus.com>
16456
16457         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
16458
16459 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
16460
16461         * decl2.c (grokfield): Bail out if type is error_mark_node.
16462
16463 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
16464
16465         * tinfo2.cc (__ptr_to_member_data): Rename to ...
16466         (__pointer_to_member_data): ... here. Adjust.
16467         * rtti.c (create_tinfo_types): Adjust.
16468
16469 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
16470
16471         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
16472         * decl.c (ref_desc_type_node): Undocument.
16473         * rtti.c (ptr_ref_initializer): Rename to ...
16474         (ptr_initializer): ... here. Adjust comments.
16475         (ptmd_initializer): Fix comment thinko.
16476         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
16477         (create_tinfo_types): Remove ref_desc_type_node init.
16478         * tinfo2.cc (__reference_type_info): Remove.
16479
16480 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
16481
16482         * decl.c (cp_finish_decl): Remove obsolete comment.
16483
16484         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
16485
16486 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
16487
16488         * cp-tree.h: Tweak documentation.
16489         * class.c (build_vbase_pointer_fields): Layout the fields, too.
16490         (avoid_overlap): Remove.
16491         (get_binfo_offset_as_int): New function.
16492         (dfs_serach_base_offsets): Likewise.
16493         (layout_nonempty_base_or_field): Likewise.
16494         (build_base_field): Layout fields here.  Avoid placing two objects
16495         of the same type at the same address, under the new ABI.
16496         (build_base_fields): Adjust accordingly.
16497         (create_vtable_ptr): Return the new field, but don't attach it to
16498         TYPE_FIELDS.
16499         (remove_base_field): Remove.
16500         (remove_base_fields): Remove.
16501         (layout_basetypes): Adjust accordingly.
16502         (layout_class_type): Call layout_field for each field, rather than
16503         just making a wholesale call to layout_type.
16504
16505 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
16506
16507         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
16508
16509 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
16510
16511         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
16512
16513         * except.c (dtor_nothrow): New fn.
16514         (do_pop_exception): Use it.  Take type parm.
16515         (push_eh_cleanup): Take type parm.
16516         (expand_start_catch_block): Pass it.
16517         (build_eh_type_type_ref): Accept null type.
16518
16519 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
16520
16521         * cp-tree.h (revert_static_member_fn): Change prototype.
16522         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
16523         (grok_op_properties): Likewise.
16524         (start_function): Likewise.
16525         (revert_static_member_fn): Simplify.
16526         * pt.c (check_explicit_specialization): Adjust call to
16527         revert_static_member_fn.
16528
16529 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
16530
16531         * cp-tree.h (scope_kind): New type.
16532         (tmpl_spec_kind): Likewise.
16533         (declare_pseudo_global_level): Remove.
16534         (pseudo_global_level_p): Rename to template_parm_scope_p.
16535         (pushlevel): Remove declaration.
16536         (begin_scope): New function.
16537         (finish_scope): Likewise.
16538         (current_tmpl_spec_kind): Likewise.
16539         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
16540         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
16541         Add template_spec_p.
16542         (toplevel_bindings_p): Adjust.
16543         (declare_pseudo_global_level): Remove.
16544         (pseudo_global_level_p): Rename to template_parm_scope_p.
16545         (current_tmpl_spec_kind): New function.
16546         (begin_scope): Likewise.
16547         (finish_scope): Likewise.
16548         (maybe_push_to_top_level): Adjust.
16549         (maybe_process_template_type_declaration): Likewise.
16550         (pushtag): Likewise.
16551         (pushdecl_nonclass_level): Likewise.
16552         (lookup_tag): Likewise.
16553         (grokfndecl): Handle member template specializations.  Share
16554         constructor and non-constructor code.
16555         * decl2.c (check_classfn): Handle member template specializations.
16556         * pt.c (begin_template_parm_list): Use begin_scope.
16557         (begin_specialization): Likewise.
16558         (end_specialization): Likewise.
16559         (check_explicit_specialization): Use current_tmpl_spec_kind.
16560         Handle member template specializations.
16561         (end_template_decl): Use finish_scope.  Remove call to
16562         get_pending_sizes.
16563         (push_template_decl_real): Remove bogus error message.
16564         (tsubst_decl): Fix typo in code contained in comment.
16565         (instantiate_template): Handle member template specializations.
16566         (most_general_template): Likewise.
16567
16568 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
16569
16570         * lex.c (whitespace_cr): Compress consecutive calls to warning().
16571         (do_identifier): Ditto for error().
16572
16573         * pt.c (convert_nontype_argument): Ditto for cp_error().
16574         (convert_template_argument): Ditto for cp_pedwarn().
16575
16576 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
16577
16578         * exception.cc (__check_null_eh_spec): New fn.
16579         * except.c (expand_end_eh_spec): Call it if the spec is throw().
16580
16581 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
16582
16583         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
16584         * except.c (expand_end_eh_spec): Add the return type.
16585         * rtti.c (throw_bad_cast): Add the parmtypes.
16586         (throw_bad_typeid): Likewise.
16587
16588         * semantics.c (expand_stmt): Only leave out rtl for unused
16589         artificials, and set DECL_IGNORED_P on them as well.
16590         * decl.c (wrapup_globals_for_namespace): Likewise.
16591
16592 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
16593
16594         * decl.c (maybe_commonize_var): Skip all artificial decls.
16595         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
16596
16597 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
16598
16599         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
16600         * cp-tree.h: Declare flag_enforce_eh_specs.
16601         * decl.c (store_parm_decls, finish_function): Check it.
16602
16603         C library functions don't throw.
16604         * Makefile.in (cfns.h): New target.
16605         (except.o): Depend on it.
16606         * Make-lang.in (cc1plus): Depend on cfns.gperf.
16607         * cfns.gperf: New file.
16608         * cfns.h: Generated.
16609         * except.c: Include it.
16610         (nothrow_libfn_p): New fn.
16611         * decl.c (grokfndecl): Use it.
16612         * cp-tree.h: Declare it.
16613
16614         * decl.c (push_overloaded_decl_1, auto_function,
16615         define_function): Lose.
16616         (build_library_fn_1): New static fn.
16617         (builtin_function): Use it.
16618         (get_atexit_node): Use build_library_fn_ptr.
16619         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
16620         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
16621         push_void_library_fn, push_throw_library_fn): New fns.
16622         * cp-tree.h: Declare them.
16623         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
16624         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
16625         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
16626         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
16627         * rtti.c (build_runtime_decl): Lose.
16628         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
16629         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
16630         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
16631
16632         * call.c (build_call): Remove result_type parm.
16633         Call mark_used on unused artificial fns.
16634         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
16635
16636 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
16637
16638         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
16639         appropriate.
16640         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
16641         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
16642         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
16643         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
16644         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
16645         expand_generic_desc): Likewise.
16646
16647 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16648
16649         * exception.cc (__cp_pop_exception): Cleanup the original object.
16650
16651 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16652
16653         * decl.c (grok_op_properties): Merge conversion to void warning
16654         with other silly op warnings.
16655
16656 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
16657
16658         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
16659         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
16660
16661 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16662
16663         * decl.c (cp_make_fname_decl): New function.
16664         (wrapup_globals_for_namespace): Don't emit unused static vars.
16665         (init_decl_processing): Remove comment about use of
16666         array_domain_type. Set make_fname_decl.
16667         (cp_finish_decl): Remove __FUNCTION__ nadgering.
16668         * semantics.c (begin_compound_stmt): Remove
16669         current_function_name_declared flagging.
16670         (expand_stmt): Don't emit unused local statics.
16671         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
16672         specially.
16673
16674 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16675
16676         * typeck.c (convert_for_assignment): Don't look at array
16677         initializer.
16678         * call.c (convert_like_real): Likewise.
16679
16680 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
16681
16682         Add initial support for '\uNNNN' specifier.
16683         * lex.c (read_ucs): New fn.
16684         (readescape, skip_white_space): Call it.
16685         (is_extended_char, is_extended_char_1): New fns.
16686         (utf8_extend_token): New fn, #if 0'd out.
16687         (real_yylex): Treat extended chars like letters.
16688
16689         * search.c (note_debug_info_needed): Walk the bases even if we
16690         weren't deferring the type itself.
16691
16692 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16693
16694         * decl2.c (finish_objects): Constify a char*.
16695
16696         * method.c (emit_thunk): Likewise.
16697
16698 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
16699
16700         * typeck.c (dubious_conversion_warnings): Look through
16701         REFERENCE_TYPE.
16702
16703 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16704
16705         * class.c (dfs_modify_vtables): I is now unsigned.
16706         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
16707         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
16708         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
16709         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
16710         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
16711         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
16712         Call integer_all_onesp.
16713         * typeck2.c (process_init_constructor): Use compare_tree_int.
16714
16715         * lang-specs.h (as): Don't call if -syntax-only.
16716
16717 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
16718
16719         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
16720         RTL_EXPR_HAS_NO_SCOPE after all.
16721
16722 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
16723
16724         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
16725         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
16726         RTL_EXPR_HAS_NO_SCOPE.
16727
16728         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
16729         later.
16730
16731         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
16732
16733 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
16734
16735         * call.c (convert_like): Macrofy.
16736         (convert_like_with_context): New macro.
16737         (convert_like_real): Renamed from convert_like.  Add calling
16738         context parameters, for diagnostics. Add recursive flag.  Call
16739         dubious_conversion_warnings for outer conversion.
16740         (build_user_type_conversion): Use convert_like_with_context.
16741         (build_over_call): Likewise. Don't warn about dubious
16742         conversions here. Adjust convert_default_arg calls.
16743         (convert_default_arg): Add context parameters for diagnostics.
16744         Pass through to convert_like_with_context.
16745         * cp-tree.h (convert_default_arg): Add context parameters.
16746         (dubious_conversion_warnings): Prototype new function.
16747         * typeck.c (convert_arguments): Adjust convert_default_arg call.
16748         (dubious_conversion_warnings): New function, broken
16749         out of convert_for_assignment.
16750         (convert_for_assignment): Adjust.
16751
16752 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
16753
16754         * decl2.c (key_method): Break out from...
16755         (import_export_vtable, import_export_class): ...here.
16756
16757         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
16758         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
16759
16760         * search.c (note_debug_info_needed, dfs_debug_mark,
16761         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
16762         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
16763
16764 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
16765
16766         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
16767         typos.
16768
16769 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
16770
16771         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
16772         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
16773         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
16774         (lang_type): Split gets_new into has_new and has_array_new.
16775         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16776         (TYPE_GETS_NEW): Split into ...
16777         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
16778         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
16779         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
16780         (build_op_new_call): Don't declare.
16781         (build_new_1): Likewise.
16782         * call.c (build_op_new_call): Remove.
16783         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
16784         instead of TYPE_NEEDS_DESTRUCTOR.
16785         (finish_struct_bits): Likewise.
16786         (add_implicitly_declared_members): Likewise.
16787         (check_field_decl): Likewise.
16788         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
16789         correctly under the new ABI.
16790         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
16791         instead of TYPE_NEEDS_DESTRUCTOR.
16792         (initialize_local_var): Likewise.
16793         (destroy_local_var): Likewise.
16794         (cp_finish_decl): Likewise.
16795         (register_dtor_fn): Likewise.
16796         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
16797         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
16798         TYPE_VEC_DELETE_TAKES_SIZE here.
16799         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
16800         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
16801         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16802         (finish_destructor_body): Likewise.
16803         (maybe_build_cleanup_1): Likewise.
16804         * decl2.c (do_static_destruction): Likewise.
16805         * init.c (build_new_1): Make it static.
16806         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16807         (expand_cleanup_for_base): Likewise.
16808         (get_cookie_size): New function.
16809         (build_new_1): Handle array-new cookies correctly under the new
16810         ABI.
16811         (build_vec_delete_1): Likewise.
16812         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16813         (build_delete): Likewise.
16814         (build_vec_delete): Handle array-new cookies correctly under the new
16815         ABI.
16816         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16817         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
16818         TYPE_HAS_ARRAY_NEW_OPERATOR.
16819         * ptree.c (print_lang_type): Check them.
16820         * search.c (context_for_name_lookup): Fix typo in comment.
16821         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16822         * tree.c (break_out_cleanups): Likewise.
16823         (build_cplus_array_test_1): Likewise.
16824         (cp_build_qualified_type_real): Likewise.
16825         * typeck.c (complete_type): Likewise.
16826
16827         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
16828         the command-line, not the end.
16829
16830 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
16831
16832         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
16833
16834 2000-03-02  Tom Tromey  <tromey@cygnus.com>
16835
16836         * cp-tree.h (build_java_class_ref): Declare.
16837         * init.c (build_java_class_ref): No longer static.
16838         * except.c (expand_throw): Generate a Java-style `throw' if the
16839         thrown object is a "Java" object.
16840         (initialize_handler_parm): Generate a Java-style lookup of
16841         exception info if the caught object is a "Java" object.
16842         (catch_language, catch_language_init): New globals.
16843         (decl_is_java_type): New function.
16844         (expand_start_catch_block): Don't call push_eh_info() or
16845         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
16846         class reference to build_catch_block.
16847
16848 2000-03-02  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16849
16850         * typeck.c (comptypes): Treat sizetype like its language equivalent.
16851
16852 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
16853
16854         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
16855         to merge reference/pointer code and fix incorrect warnings.
16856
16857 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
16858
16859         * search.c (protected_accessible_p): Use context_for_name_lookup.
16860
16861         * init.c (construct_virtual_bases): Fix thinko.
16862         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
16863
16864 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
16865
16866         * decl.c (current_function_decl): Move to toplev.c.
16867
16868 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
16869
16870         * pt.c (fn_type_unification): Unify return type, whenever
16871         provided.
16872         (get_bindings_real): Only pass return type when necessary.
16873         Remove explicit return type check.
16874         * class.c (resolve_address_of_overloaded_function): Pass desired
16875         return type to fn_type_unification.
16876
16877 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16878
16879         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
16880         DECL_FIELD_SIZE.
16881         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
16882         DECL_FIELD_SIZE.
16883         * rtti.c (expand_class_desc): Likewise.
16884         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
16885         (THUNK_VCALL_OFFSET): Likewise.
16886         (THUNK_DELTA): Reflect changes in ../tree.h.
16887
16888 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
16889
16890         * search.c (protected_accessible_p): Also allow the access if
16891         the member is public in DERIVED.  Lose TYPE parm.
16892         (friend_accessible_p): Lose TYPE parm.
16893         (accessible_p): Adjust.
16894
16895 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16896
16897         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
16898         on things that are not sizes; ssize_binop deleted.
16899         Call size_diffop when appropriate.
16900         (dfs_build_vcall_offset_vtbl_entries): Likewise.
16901         (build_primary_vtable, build_secondary_vtable): Likewise.
16902         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
16903         Variable I is HOST_WIDE_INT.
16904         (get_vfield_offset): Pass proper types to size_binop.
16905         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
16906         (finish_struct_1): Likewise.
16907         (skip_rtti_stuff): Arg N is now pointer to signed.
16908         (layout_class_type): Use size_zero_node.
16909         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
16910         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
16911         * decl.c (complete_arry_type): Pass proper types to size_binop.
16912         (xref_basetypes): BINFO_OFFSET is sizetype.
16913         * error.c (dump_expr): Don't use size_binop non-sizes.
16914         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
16915         * init.c (construct_virtual_bases): Fix type error.
16916         (build_vec_delete_1): Pass proper type to size_binop and don't
16917         fold result.
16918         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
16919         * rtti.c (get_base_offset): Pass proper type to size_binop.
16920         * search.c (dfs_find_vbases): Fix type error.
16921         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
16922         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
16923         * tree.c (debug_binfo): Variable N is signed.
16924         Use HOST_WIDE_INT_PRINT_DEC.
16925         * typeck.c (comptypes): sizetype is same as equivalent integer type.
16926         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
16927         size_one_node and size_zero_node.
16928         (c_alignof): Use size_one_node.
16929         (build_component_addr): Pass proper types to size_binop.
16930         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
16931
16932 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
16933
16934         Implement class scope using-declarations for functions.
16935         * class.c (handle_using_decl): Call add_method for used functions.
16936         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
16937         (add_method): Used functions are hidden by local functions.
16938         (check_bases_and_members): Handle using-decls before finalizing
16939         CLASSTYPE_METHOD_VEC.
16940         * call.c (add_function_candidate): Add ctype parm; if nonzero,
16941         override the type of 'this' accordingly.
16942         (add_template_candidate, add_template_candidate_real): Add ctype parm.
16943         (convert_class_to_reference, build_user_type_conversion_1,
16944         build_new_function_call, build_object_call, build_new_op,
16945         build_new_method_call): Pass ctype parm.
16946
16947         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
16948         the baselink.
16949         * call.c (convert_class_to_reference, build_user_type_conversion_1,
16950         build_new_function_call, build_object_call, build_new_op,
16951         build_new_method_call, build_op_delete_call): Don't get basetype_path
16952         from a baselink.
16953         * typeck.c (build_component_ref): Likewise.
16954         * init.c (build_offset_ref): Likewise.
16955         (resolve_offset_ref): Don't call enforce_access.
16956         Call build_scoped_ref.
16957         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
16958         would cause an error or if -pedantic.
16959         * class.c (alter_access): Lose binfo parm.
16960
16961 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
16962
16963         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
16964         types.
16965
16966 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
16967
16968         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
16969         pseudo_type_info creation into the std namespace
16970
16971 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
16972
16973         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
16974         (import_export_class): Remove declaration.
16975         * decl2.c (import_export_class): Make it static.
16976         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
16977         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
16978         EXPR_WITH_FILE_LOCATION.
16979         * lex.c (check_newline): Tweak filename/lineno setting.
16980         * semantics.c (begin_while_stmt): Fix typo in comment.
16981
16982 2000-02-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16983
16984         * lang-options.h (-fmessage-length=): Add missing option.
16985
16986         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
16987
16988 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
16989
16990         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
16991
16992 2000-02-25  Jim Wilson  <wilson@cygnus.com>
16993
16994         * optimize.c (expand_call_inline): Emit the return label before
16995         evaluating the return value.
16996
16997 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
16998
16999         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
17000         than duplicating functionality here.
17001         * optimize.c: Include input.h.
17002         (expand_call_inline): Use push_srcloc and pop_srcloc.
17003         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
17004         * parse.c: Regenerated.
17005         * Makefile.in (lex.o): Depend on input.h.
17006         (optimize.o): Likewise.
17007
17008 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
17009
17010         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
17011         function type, rather than ICE.
17012
17013 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
17014
17015         * decl.c (grokdeclarator): Call decl_type_access_control.
17016         * parse.y (parse_end_decl): Don't call decl_type_access_control if
17017         decl is null.
17018
17019 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
17020
17021         * decl.c (decls_match): Remove obsolete static member nadgering.
17022
17023 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17024
17025         * decl.c (grokdeclarator): Change ANSI to ISO.
17026         * lex.c (consume_string, readescape, do_identifier): Likewise.
17027         (parse_float, real_yylex): Likewise.
17028         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
17029         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
17030         new_type_id, maybe_label_decls, simple_stmt,
17031         for.init.statement): Likewise.
17032         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
17033         * semantics.c (finish_named_return_value): Likewise.
17034         * parse.c: Regenerate.
17035
17036 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
17037
17038         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
17039         (CPTI_CLASS_STAR_TYPE): Remove.
17040         (vtable_index_type): Likewise.
17041         (class_star_type_node): Remove.
17042         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
17043         (build_binary_op_nodefault): Remove.
17044         * call.c (build_new_op): Use build_binary_op instead of
17045         build_binary_op_nodefault.
17046         * decl.c (init_decl_processing): Remove class_star_type_node
17047         initialization.  Make delta_type_node ptrdiff_type_node under the
17048         new ABI.  Initialize vtable_index_type.
17049         (build_ptrmemfunc_type): Build different structures for the new
17050         ABI.
17051         (build_enumerator): Use build_binary_op instead of
17052         build_binary_op_nodefault.
17053         * method.c (build_overload_value): Mangle pointers-to-members
17054         appropriately under the new ABI.
17055         * typeck.c (build_array_ref): Use build_binary_op instead of
17056         build_binary_op_nodefault.
17057         (get_member_function_from_ptrfunc): Adjust for the new ABI.
17058         (build_binary_op_nodefault): Rename to ...
17059         (build_binary_op): ... this.  Remove old version.  Adjust for
17060         pointer-to-member comparisons under the new ABI.
17061         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
17062         (build_ptrmemfunc): Adjust for the new ABI.
17063         (expand_ptrmemfunc_cst): Likewise.
17064         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
17065         (pfn_from_ptrmemfunc): Adjust for the new ABI.
17066
17067 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
17068
17069         * call.c (build_object_call): Compress consecutive calls to
17070         cp_error.
17071         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
17072         (build_op_delete_call): Adjust message formatting.
17073
17074         * class.c (check_bases): Compress consecutive calls to
17075         cp_pedwarn.
17076         (finish_struct_anon): Say 'ISO C++'.
17077
17078         * decl.c (start_decl): Same here.
17079         (grok_reference_init): Likewise.
17080         (grokfndecl): Correct message formatting.
17081         (grokfndecl): Improve diagnostic.
17082         (check_static_variable_definition): Likewise. Say 'ISO C++'
17083         (compute_array_index_type): Say 'ISO C++'
17084         (create_array_type_for_decl): Compress consecutive calls to
17085         cp_error.
17086         (grokdeclarator): Say 'ISO C++'
17087         (grok_op_properties): Likewise.
17088
17089         * decl2.c (delete_sanity): Clairify diagnostic.
17090         (check_member_template): Same here.
17091         (grok_function_init): Use consistent terminology.
17092
17093         * expr.c (do_case): Say 'ISO C++'
17094
17095         * friend.c (do_friend): Compress consecutive calls to warning.
17096
17097 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
17098
17099         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
17100         * class.c (build_secondary_vtable): Reorganize.  Don't create a
17101         new vtable under the new ABI.
17102         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
17103         computing the size.
17104         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
17105         the initializing elements.
17106         (initialize_vtable): New function.
17107         (dfs_finish_vtbls): Use it.
17108         (dfs_accumulate_vtbl_inits): New function.
17109         (finish_vtbls): Merge primary and secondary vtables under the new
17110         ABI.
17111         (finish_struct_1): Remove redundant call to layout_vtable_decl.
17112         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
17113         aren't VAR_DECLs.
17114
17115         * class.c (build_vtable): New function, split out from ...
17116         (get_vtable_decl): ... here, and ...
17117         (build_secondary_vtable): ... here.
17118
17119         * pt.c (tsubst_decl): Fix formatting.
17120
17121 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17122
17123         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
17124         (avoid_overlap, build_base_field): Likewise.
17125         (build_base_field, build_base_fields, is_empty_class):
17126         Test DECL_SIZE with integer_zero.
17127         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
17128         * cp-tree.h (struct lang_type): New field size_unit.
17129         (CLASSTYPE_SIZE_UNIT): New macro.
17130         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
17131         (cp_finish_decl): Delete -Wlarger-than processing.
17132         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
17133         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
17134         * tree.c (make_binfo): binfo vector is one entry longer.
17135         (walk_tree): Walk DECL_SIZE_UNIT.
17136
17137 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
17138
17139         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
17140         comment.
17141         (build_vtable_entry): Don't assume all vtable entries are
17142         functions.
17143         (build_vtbl_initializer): Adjust accordingly.
17144         (get_vtable_decl): Fix formatting.
17145
17146 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
17147
17148         * semantics.c (deferred_type_access_control): Walk the entire
17149         type_lookups list.
17150         (save_type_access_control): Rename from
17151         initial_deferred_type_access_control.  Just remember the value.
17152         (decl_type_access_control): New fn.
17153         (begin_function_definition): Use deferred_type_access_control, after
17154         we've started the function.  Set type_lookups to error_mark_node.
17155         * parse.y (frob_specs, fn.def1): Adjust.
17156         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
17157         (parse_end_decl, parse_bitfield0, parse_method): New fns.
17158         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
17159         (after_type_component_declarator0): Likewise.
17160         (after_type_component_declarator): Likewise.
17161         (notype_component_declarator): Likewise.
17162         * cp-tree.h: Adjust.
17163
17164         * decl.c (redeclaration_error_message): Allow redeclaration of
17165         namespace-scope decls.
17166
17167 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
17168
17169         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
17170
17171 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
17172
17173         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
17174         * decl2.c (grokclassfn): Likewise.
17175
17176         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
17177
17178         * decl2.c (lang_decode_option): Don't set default message length
17179         here.
17180         * lex.c (lang_init_options): Set it here.
17181
17182 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
17183
17184         Make DECL_CONTEXT mean the class in which a member function was
17185         declared, even for a virtual function.
17186         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
17187         (DECL_FRIEND_CONTEXT): New macro.
17188         (DECL_REAL_CONTEXT): Remove.
17189         (SET_DECL_FRIEND_CONTEXT): Likewise.
17190         (DECL_VIRTUAL_CONTEXT): Adjust.
17191         (DECL_CLASS_SCOPE_P): Use TYPE_P.
17192         (add_friends): Remove.
17193         (hack_decl_function_context): Likewise.
17194         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
17195         CP_DECL_CONTEXT.
17196         (build_over_call): Fix indentation.  Use DECL_CONTEXT
17197         instead of DECL_CLASS_CONTEXT.
17198         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
17199         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
17200         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17201         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
17202         (build_base_field): Likewise.
17203         (finish_struct_1): Likewise.
17204         (build_self_reference): Likewise.
17205         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
17206         DECL_REAL_CONTEXT.
17207         (pushtag): Use decl_function_context, not
17208         hack_decl_function_context.
17209         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
17210         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
17211         (pushdecl): Remove bogus code.
17212         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
17213         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
17214         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17215         Use decl_function_context, nothack_decl_function_context.
17216         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
17217         (grokdeclarator): Likewise.  Use decl_function_context, not
17218         hack_decl_function_context.
17219         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
17220         (start_function): Use DECL_FRIEND_CONTEXT, not
17221         DECL_CLASS_CONTEXT.  Use decl_function_context, not
17222         hack_decl_function_context.
17223         (finish_function): Use decl_function_context, not
17224         hack_decl_function_context.
17225         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
17226         DECL_CLASS_CONTEXT.
17227         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
17228         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
17229         (grokfield): Likewise.
17230         (finish_builtin_type): Likewise.
17231         (finish_vtable_vardec): Use decl_function_context, not
17232         hack_decl_function_context.
17233         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17234         (start_static_initialization_or_destruction): Likewise.
17235         (finish_static_initialization_or_destruction): Likewise.
17236         (mark_used): Adjust logic for deciding when to synthesize methods.
17237         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
17238         DECL_REAL_CONTEXT.
17239         * error.c (dump_function_decl): Use DECL_CONTEXT, not
17240         DECL_CLASS_CONTEXT.
17241         * friend.c (is_friend): Likewise.
17242         (add_friends): Remove.
17243         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
17244         * lex.c (begin_definition_of_inclass_inline): Use
17245         decl_function_context, not hack_decl_function_context.
17246         (process_next_inline): Likewise.
17247         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
17248         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
17249         DECL_CLASSS_CONTEXT.
17250         (hack_identifier): Likewise.
17251         (synthesize_method):  Use decl_function_context, not
17252         hack_decl_function_context.
17253         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
17254         DECL_REAL_CONTEXT.
17255         (is_member_template): Use decl_function_context, not
17256         hack_decl_function_context.  Use DECL_CONTEXT, not
17257         DECL_CLASS_CONTEXT.
17258         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
17259         DECL_CLASS_CONTEXT.
17260         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
17261         DECL_REAL_CONTEXT.
17262         (push_template_decl_real): Likewise.
17263         (instantiate_class_template): Don't call add_friends.
17264         (tsubst_default_argument): Use DECL_CONTEXT, not
17265         DECL_REAL_CONTEXT.
17266         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
17267         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17268         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
17269         DECL_CLASS_CONTEXT.
17270         * repo.c (repo_inline_used): Likewise.
17271         * search.c (current_scope): Adjust for new _CONTEXT macros.
17272         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
17273         DECL_REAL_CONTEXT.
17274         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17275         (lookup_fnfields_here):Likewise.
17276         (check_final_overrider): Likewise.
17277         (init_vbase_pointers): Likewise.
17278         (virtual_context): Likewise.
17279         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
17280         (expand_body): Use decl_function_context, not
17281         hack_decl_function_context.
17282         * tree.c (hack_decl_function_context): Remove.
17283         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
17284         DECL_CLASS_CONTEXT.
17285         * typeck2.c (error_not_base_type): Likewise.
17286
17287 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
17288
17289         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
17290
17291 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17292
17293         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
17294
17295 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
17296
17297         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
17298
17299 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
17300
17301         * decl2.c (lang_decode_option): Enable automatic line wrapping.
17302
17303 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
17304
17305         * parse.y (frob_specs): Split out...
17306         (parse_decl): From here.
17307         (fn.def2): Call initial_deferred_type_access_control.
17308         (after_type_component_declarator0): Call frob_specs.
17309         (notype_component_declarator0): Likewise.
17310         * search.c (friend_accessible_p): Nested classes are friends of their
17311         enclosing classes.
17312
17313 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
17314
17315         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
17316         used to create an implicit temporary.
17317
17318         * class.c (dfs_modify_vtables): Tweak calculation of functions to
17319         override.
17320
17321 2000-02-08  Nathan Sidwell  <nathan@acm.org>
17322
17323         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
17324         strip array element qualifiers too.
17325
17326 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
17327
17328         * decl.c (store_parm_decls): Don't build cleanups for parameters
17329         while processing_template_decl.
17330
17331 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
17332
17333         * cp-tree.h (struct saved_scope): Add incomplete field.
17334         (namespace_scope_incomplete): New macro.
17335         * decl.c (pushdecl): Use it.
17336         (hack_incomplete_structures): Use it.  See through artificial
17337         binding levels.
17338         (mark_saved_scope): Mark it.
17339
17340         Implement access control for nested types.
17341         * search.c (type_access_control): New fn.
17342         (accessible_p): Now we do perform access control for types.
17343         * semantics.c (deferred_type_access_control): New fn.
17344         (initial_deferred_type_access_control): New fn.
17345         (begin_function_definition): Call it.  Add lookups parm.
17346         * decl.c (struct binding_level): Add this_class field.
17347         (pushlevel_class): Set it.
17348         (mark_binding_level): Mark it.
17349         (lookup_name_real): Use it.  Call type_access_control.
17350         (mark_saved_scope): Mark lookups field.
17351         * cp-tree.h (flagged_type_tree): Add lookups field.
17352         (struct saved_scope): Add lookups field.
17353         (type_lookups): New macro.
17354         * parse.y (declmods): Now <ftype>.
17355         (parse_decl): Add lookups parm.  Call
17356         initial_deferred_type_access_control.
17357         (lang_extdef): Clear type_lookups.
17358         (typed_declspecs, declmods, typespec): Set lookups field.
17359         (initdcl): Call deferred_type_access_control.
17360         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
17361         component_decl_1, named_parm): Adjust.
17362         * friend.c (is_friend): Nested classes are friends of their
17363         enclosing classes.
17364
17365         * class.c (currently_open_derived_class): New fn.
17366         * method.c (hack_identifier): Use it.
17367
17368         * lex.c (do_identifier): Remove obsolete code.
17369
17370         * parse.y (typed_typespecs): Propagate new_type_flag properly.
17371
17372 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
17373
17374         * tinfo.h: Remove apostrophes from C++ comment (xgettext
17375         thinks this file is plain C).
17376
17377 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17378
17379         * Makefile.in (call.o): Depend on $(EXPR_H).
17380
17381         * call.c: Include "expr.h".
17382
17383         * class.c (dump_class_hierarchy): Add prototype.
17384
17385         * search.c (dfs_get_pure_virtuals): Likewise.
17386
17387 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
17388
17389         * parse.y (simple_stmt): Allow :: token in asm parameter list.
17390         * parse.c: Rebuilt.
17391
17392 2000-01-31  Jim Wilson  <wilson@cygnus.com>
17393
17394         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
17395         Store it in DECL_FCONTEXT.
17396         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
17397
17398 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
17399
17400         * tinfo.h (old abi): #include "tconfig.h".
17401         * tinfo.cc (convert_to_base): Move into old abi section.
17402
17403 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
17404
17405         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
17406         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
17407         (BINFO_PRIMARY_BINFO): New macro.
17408         (BF_DELTA): Rename to ...
17409         (BV_DELTA): ... this.
17410         (BF_VCALL_INDEX): Rename to ...
17411         (BV_VCALL_INDEX): ... this.
17412         (BF_FN): Rename to ...
17413         (BV_FN): ... this.
17414         * class.c (build_vbase_path): Adjust for changes to reverse_path.
17415         (set_rtti_entry): Rename BF_ macros to BV_ variants.
17416         (modify_vtable_entry): Simplify.
17417         (add_virtual_function): Rename BF_ macros to BV_ variants.
17418         (build_vtable_initializer): Likewise.
17419         (get_class_offset_1): Remove.
17420         (dfs_get_class_offset): Likewise.
17421         (get_class_offset): Likewise.
17422         (dfs_find_final_overrider): New function.
17423         (find_final_overrider): Likewise.
17424         (modify_one_vtable): Remove.
17425         (dfs_find_base): New function.
17426         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
17427         find_final_overrider.
17428         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
17429         virtuals.
17430         (dfs_fixup_vtable_deltas): Remove.
17431         (override_one_vtable): Remove.
17432         (merge_overrides): Likewise.
17433         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
17434         unreal chilren of virtual bases.
17435         (finish_struct_1): Don't use merge_overrides.  Don't use
17436         dfs_fixup_vtable_deltas.
17437         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
17438         BINFOs.
17439
17440 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
17441             Jason Merrill  <jason@yorick.cygnus.com>
17442
17443         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
17444
17445 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
17446
17447         * exception.cc (__throw_bad_typeid): Add missing std::.
17448
17449 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17450
17451         * cp-tree.h (make_thunk): PROTO -> PARAMS.
17452
17453 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
17454
17455         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
17456
17457         Runtime support for new-abi rtti.
17458         * inc/typeinfo (type_info::operator!=): Define in class.
17459         (type_info::before, type_info::name, type_info::operator==,
17460         type_info::operator!=): Define new ABI implementations.
17461         (type_info::is_pointer_p, type_info::is_function_p): Declare
17462         new virtual functions.
17463         (type_info::do_catch, type_info::do_upcast): Likewise.
17464
17465         * tinfo.h (__base_class_info): Define new class.
17466         (__class_type_info): Likewise.
17467         (__si_class_type_info): Likewise.
17468         (__vmi_class_type_info): Likewise.
17469         (__dynamic_cast): Prototype.
17470
17471         * tinfo.cc: Conditionalize old and new rtti mechanisms.
17472         (type_info::is_pointer_p): Define new function.
17473         (type_info::is_function_p): Likewise.
17474         (type_info::do_catch): Likewise.
17475         (type_info::do_upcast): Likewise.
17476         (vtable_prefix): New structure for vtable access.
17477         (adjust_pointer): Define new template function.
17478         (contained_p, public_p, virtual_p, contained_public_p,
17479         contained_nonpublic_p, contained_nonvirtual_p): Define new
17480         functions.
17481         (nonvirtual_base_type): New local variable.
17482         (__class_type_info::~__class_type_info): Define.
17483         (__si_class_type_info::~__si_class_type_info): Likewise.
17484         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
17485         (__class_type_info::do_catch): Define new function.
17486         (__class_type_info::do_upcast): Likewise.
17487         (__class_type_info::find_public_src): Likewise.
17488         (__class_type_info::do_find_public_src): Likewise.
17489         (__si_class_type_info::do_find_public_src): Likewise.
17490         (__vmi_class_type_info::do_find_public_src): Likewise.
17491         (__class_type_info::do_dyncast): Likewise.
17492         (__si_class_type_info::do_dyncast): Likewise.
17493         (__vmi_class_type_info::do_dyncast): Likewise.
17494         (__class_type_info::do_upcast): Likewise.
17495         (__si_class_type_info::do_upcast): Likewise.
17496         (__vmi_class_type_info::do_upcast): Likewise.
17497         (__dynamic_cast): Likewise.
17498
17499         * tinfo2.cc (__fundamental_type_info): Define new class.
17500         (__pointer_type_info): Likewise.
17501         (__reference_type_info): Likewise.
17502         (__array_type_info): Likewise.
17503         (__function_type_info): Likewise.
17504         (__enum_type_info): Likewise.
17505         (__ptr_to_member_type_info): Likewise.
17506         (__fundamental_type_info::~__fundamental_type_info): Define.
17507         (__pointer_type_info::~__pointer_type_info): Likewise.
17508         (__reference_type_info::~__reference_type_info): Likewise.
17509         (__array_type_info::~__array_type_info): Likewise.
17510         (__function_type_info::~__function_type_info): Likewise.
17511         (__enum_type_info::~__enum_type_info): Likewise.
17512         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
17513         (__pointer_type_info::do_catch): Define new function.
17514         (__ptr_to_member_type_info::do_catch): Define new function.
17515
17516         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
17517         (__is_pointer): Likewise.
17518
17519         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
17520
17521 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
17522
17523         * cp/class.c (build_vtable): Rename to build_primary_vtable.
17524         (prepare_fresh_vtable): Rename to build_secondary_vtable.
17525         (make_new_vtable): New function.
17526         (modify_vtable_entry): Handle generation of new vtables correctly.
17527         (modify_one_vtable): Remove unused parameter.
17528         (dfs_fixup_vtable_deltas): Likewise.
17529         (override_one_vtable): Use build_secondary_vtable.
17530         (finish_struct_1): Use build_primary_vtable and
17531         build_secondary_vtable.
17532
17533 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
17534
17535         * cp/decl.c: Adjust variable names, comments, help strings.
17536
17537 2000-01-29  Nathan Sidwell  <nathan@acm.org>
17538
17539         * new2.cc (operator delete[]): Use operator delete, don't assume
17540         implementation.
17541
17542 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
17543
17544         * class.c (build_vtbl_initializer): Add argument to
17545         build_vtable_entry call.
17546
17547 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
17548
17549         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
17550         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
17551         (BF_DELTA): New macro.
17552         (BF_VCALL_INDEX): Likewise.
17553         (BF_FN): Likewise.
17554         (THUNK_VCALL_OFFSET): Likewise.
17555         (make_thunk): Change prototype.
17556         * class.c (build_vtable_entry): Integrate
17557         build_vtable_entry_for_fn.  Handle vcall indices.
17558         (build_vtable_entry_for_fn): Remove.
17559         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
17560         BF_VCALL_INDEX, BF_FN.
17561         (modify_vtable_entry): Integrate common code from
17562         modify_one_vtable and dfs_fixup_vtable_deltas.
17563         (add_virtual_function): Set BF_VCALL_INDEX.
17564         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
17565         and BF_FN.
17566         (modify_one_vtable): Simplify.
17567         (dfs_fixup_vtable_deltas): Likewise.
17568         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
17569         * method.c (make_thunk): Handle vcall indices.
17570
17571 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
17572
17573         Compiler side new abi rtti (not enabled).
17574         * cp-tree.h (new_abi_rtti_p): New macro.
17575         (emit_support_tinfos): Prototype new function.
17576         (tinfo_decl_p): Likewise.
17577         (emit_tinfo_decl): Likwise.
17578         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
17579         macros.
17580         (doing_runtime): New local static.
17581         (init_rtti_processing): Add new-abi initializer.
17582         (get_tinfo_decl): Add new-abi logic.
17583         (tinfo_from_decl): Likewise.
17584         (build_dynamic_cast_1): Likewise.
17585         (qualifier_flags): New static function.
17586         (tinfo_base_init): Likewise.
17587         (generic_initializer): Likewise.
17588         (ptr_ref_initializer): Likewise.
17589         (ptmd_initializer): Likewise.
17590         (class_hint_flags): Likewise.
17591         (class_initializer): Likewise.
17592         (synthesize_tinfo_var): Likewise.
17593         (create_real_tinfo_var): Likewise.
17594         (create_pseudo_type_info): Likewise.
17595         (get_vmi_pseudo_type_info): Likewise.
17596         (create_tinfo_types): Likewise.
17597         (emit_support_tinfos): New global function.
17598         (tinfo_decl_p): New global predicate.
17599         (emit_tinfo_decl): New global function.
17600         * class.c (set_rtti_entry): Generalize for old and new rtti.
17601         (build_vtbl_initializer): Likewise.
17602         * decl2.c (finish_file): Likewise.
17603
17604 2000-01-27  Jim Wilson  <wilson@cygnus.com>
17605
17606         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
17607         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
17608
17609 2000-01-27  Mike Stump  <mrs@wrs.com>
17610
17611         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
17612         for scopes.
17613
17614 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
17615
17616         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
17617
17618 2000-01-26  J"orn Rennecke <amylaar@cygnus.co.uk>
17619
17620         * optimize.c (calls_setjmp_r): Supply new argument
17621         to special_function_p.
17622
17623 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17624
17625         * call.c: PROTO -> PARAMS.
17626         * class.c: Likewise.
17627         * cp-tree.h: Likewise.
17628         * cvt.c: Likewise.
17629         * decl.c: Likewise.
17630         * decl.h: Likewise.
17631         * decl2.c: Likewise.
17632         * dump.c: Likewise.
17633         * errfn.c: Likewise.
17634         * error.c: Likewise.
17635         * except.c: Likewise.
17636         * expr.c: Likewise.
17637         * init.c: Likewise.
17638         * input.c: Likewise.
17639         * lex.c: Likewise.
17640         * lex.h: Likewise.
17641         * method.c: Likewise.
17642         * optimize.c: Likewise.
17643         * parse.y: Likewise.
17644         * pt.c: Likewise.
17645         * repo.c: Likewise.
17646         * rtti.c: Likewise.
17647         * search.c: Likewise.
17648         * semantics.c: Likewise.
17649         * spew.c: Likewise.
17650         * tree.c: Likewise.
17651         * typeck.c: Likewise.
17652         * typeck2.c: Likewise.
17653         * xref.c: Likewise.
17654
17655 2000-01-25  Richard Henderson  <rth@cygnus.com>
17656
17657         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
17658
17659 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
17660
17661         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
17662         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
17663         (struct vcall_offset_data_s): New type.
17664         (dfs_vcall_offset_queue_p): New function.
17665         (dfs_build_vcall_offset_vtbl_entries): Likewise.
17666         (build_vcall_offset_vtbl_entries): Likewise.
17667         (layout_vtable_decl): Likewise.
17668         (num_vfun_entries): Likewise.
17669         (num_extra_vtbl_entries): Add the entries for vcall offsets.
17670         (build_vtbl_initializer): Likewise.
17671         (dfs_finish_vtabls): Use layout_vtable_decl.
17672         (modify_one_vtables): Always duplicate vtables under the new ABI.
17673         (finish_struct_1): Use layout_vtable_decl.
17674
17675 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17676
17677         * decl.c (member_function_or_else): Change third arg from a format
17678         specifier to an `enum overload_flags'.  Callers changed.
17679
17680 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
17681
17682         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
17683         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
17684         build_const_cast, get_delta_difference, check_return_expr): Avoid
17685         ANSI string concatenation usage.
17686
17687 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
17688
17689         * class.c (layout_class_type): Put the fields required to make a
17690         class non-empty at the end, not the beginning, of the TYPE_FIELDs
17691         list.
17692
17693 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
17694
17695         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
17696         template.
17697
17698         * decl2.c (mark_used): Do instantiate inlines that have been
17699         explicitly instantiated.
17700
17701 2000-01-24  Richard Henderson  <rth@cygnus.com>
17702
17703         * call.c (build_over_call): Use expand_tree_builtin.
17704         * typeck.c (build_function_call_real): Likewise.
17705         (build_binary_op_nodefault): Handle unordered compares.
17706
17707 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
17708
17709         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
17710         cp_tree_index values.
17711         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
17712         New global node #defines for them.
17713         * rtti.c (call_void_fn): Replace with ...
17714         (build_runtime_decl): ... new static function.
17715         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
17716         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
17717         (build_dynamic_cast_1): Always produce correctly typed result.
17718         Explicitly produce type_info addresses. Use dynamic_cast_node.
17719         * exception.cc (__throw_bad_cast): Return `void *'.
17720         (__throw_bad_typeid): Return `const type_info &'.
17721
17722 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
17723
17724         * cp-tree.h (get_vtable_decl): Prototype new function.
17725         * class.c (get_vtable_decl): New function. Broken out from ...
17726         (build_vtable): ... here. Use it.
17727         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
17728         by get_vtable_decl.
17729
17730 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
17731
17732         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
17733         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
17734         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
17735         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
17736         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
17737         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
17738         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
17739         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
17740         (CPTI_TINFO_VAR_ID): New enumeration.
17741         (__tp_desc_type_node, __access_mode_type_node,
17742         __bltn_desc_type_node, __user_desc_type_node,
17743         __class_desc_type_node, __ptr_desc_type_node,
17744         __attr_desc_type_node, __func_desc_type_node,
17745         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
17746         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
17747         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
17748         enum_desc_type_node, class_desc_type_node,
17749         si_class_desc_type_node, vmi_class_desc_type_node,
17750         ptmd_desc_type_node, base_desc_type_node): New #defines.
17751         (tinfo_fn_id, tinfo_fn_type): Rename to ...
17752         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
17753         (tinfo_var_id): New enumeration.
17754         (DECL_TINFO_FN_P): Augment comment.
17755         * decl.c (cp_global_trees): Adjust documentation.
17756         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
17757         tinfo_decl_type and tinfo_var_id.
17758         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
17759         (build_typeid): Remove unused variable.
17760         (get_tinfo_var): Use tinfo_var_id.
17761         (tinfo_name): New static function.
17762         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
17763         (tinfo_from_decl): Likewise.
17764         (get_base_offset): New static function, broken out of
17765         expand_class_desc.
17766         (expand_si_desc): Use tinfo_name.
17767         (expand_class_desc): Likewise. Lose local static variable.
17768         Use base_desc_type_node. Use get_base_offset.
17769         (expand_ptr_desc): Use tinfo_name.
17770         (expand_attr_desc): Likewise.
17771         (expand_generic_desc): Likewise.
17772
17773         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
17774         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
17775
17776 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
17777
17778         * cp-tree.h (__eprintf): Remove declaration.
17779         * tree.c (__eprintf): Remove definition.
17780
17781 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
17782             Mark Mitchell  <mark@codesourcery.com>
17783
17784         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
17785         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
17786
17787 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
17788
17789         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
17790
17791 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
17792
17793         * cp-tree.h (register_dtor_fn): New function.
17794         * decl.c (destroy_local_static): Rename to ...
17795         (register_dtor_fn): ... this.  Give it external linkage.
17796         (expand_static_init): Use it.
17797         * decl2.c (do_static_initialization): Likewise, if using
17798         __cxa_atexit.
17799         (do_static_destruction): Check that __cxa_atexit is not in use.
17800         (finish_file): Don't call do_static_destruction if using
17801         __cxa_atexit.
17802
17803         * typeck.c (convert_arguments): Restore two-message error
17804         reporting.
17805
17806 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
17807
17808         Remap dynamic cast hint values to be consistent across ABIs.
17809         * search.c (dynamic_cast_base_recurse): Remap generated value.
17810         (get_dynamic_cast_base_type): Adjust documentation.
17811         * tinfo.h (__user_type_info::dyncast): Likewise.
17812         (__user_type_info::find_public_subobj): Remap BOFF meaning.
17813         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
17814         (__class_type_info::do_dyncast): Likewise.
17815         (__class_type_info::do_find_public_subobj): Likewise.
17816         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
17817
17818 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
17819
17820         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
17821
17822         * typeck2.c (incomplete_type_error): Restore previous
17823         cp_error and cp_error_at call sequence.
17824
17825 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
17826
17827         * class.c (dump_class_hierarchy): Make format agree with argument;
17828         cast pointer to unsigned long and print with %lx.
17829
17830 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
17831
17832         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
17833
17834         * typeck.c (composite_pointer_type, common_type,
17835         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
17836         build_function_call_real, convert_arguments,
17837         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
17838         build_unary_op, mark_addressable, build_compound_expr,
17839         build_static_cast, build_reinterpret_cast, build_const_cast,
17840         build_c_cast, build_modify_expr, get_delta_difference,
17841         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
17842         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
17843         into a single one.
17844         * typeck2.c (readonly_error, abstract_virtuals_error,
17845         process_init_constructor, check_for_new_type): Likewise.
17846
17847 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
17848
17849         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
17850         VAR_DECLs.
17851
17852 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
17853
17854         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
17855         (build_x_typeid): Likewise.
17856         (get_tinfo_fn): Likewise.
17857         (get_tinfo_fn_unused): Rename to ...
17858         (get_tinfo_decl): ... here.
17859         * rtti.c (build_headof): Replace logic error with assertion.
17860         (get_tinfo_fn_dynamic): Rename to ...
17861         (get_tinfo_decl_dynamic): ... here. Make static. Use
17862         complete_type_or_else.
17863         (build_x_typeid): Move into ...
17864         (build_typeid): ... here. Adjust call to
17865         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
17866         throw_bad_typeid expression.
17867         (get_tinfo_fn_unused): Rename to ...
17868         (get_tinfo_decl): ... here. Adjust comment.
17869         (get_tinfo_fn): Delete.
17870         (tinfo_from_decl): New static function.
17871         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
17872         (get_typeid): Use complete_type_or_else.
17873         (build_dynamic_cast_1): Adjust calls to
17874         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
17875         * parse.y (primary): Adjust call to build_typeid.
17876         * except.c (build_eh_type_type_ref): Adjust call to
17877         get_tinfo_decl. Mark as used.
17878         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
17879         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
17880         * parse.c: Regenerated.
17881
17882 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
17883
17884         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
17885         calling convention.
17886         (resolves_to_fixed_type_p): Document calling convention.
17887         * rtti.c (build_x_typeid): Initialize NONNULL.
17888
17889         * cp-tree.h (build_shared_int_cst): New function.
17890         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
17891         * class.c (modify_vtable_entry): Likewise.
17892         (add_virtual_function): Split out code to generated shared
17893         INTEGER_CSTs to build_share_int_cst.
17894         (modify_all_vtables): Handle all the overridden functions here.
17895         Add overridden functions from non-primary virtual bases to the
17896         primary vtable.
17897         (finish_struct_1): Adjust call to modify_all_vtables.  Add
17898         overridden functions from non-primary bases to the vtable.
17899         * tree.c (build_shared_int_cst): New function.
17900
17901         * cp-tree.h (scratchalloc): Remove.
17902         (build_scratch_list): Likewise.
17903         * call.c (convert_class_to_reference): Replace build_scratch_list
17904         and build_expr_list with build_tree_list.
17905         (add_candidate): Replace scratchalloc with expralloc.  Note memory
17906         leak.
17907         (build_user_type_conversion_1):  Replace build_scratch_list
17908         and build_expr_list with build_tree_list.
17909         (build_new_op): Likewise.
17910         (build_op_delete_call): Likewise.
17911         (convert_like): Likewise.
17912         * cvt.c (ocp_convert): Likewise.
17913         * decl.c (start_decl): Likewise.
17914         (start_function): Likewise.
17915         (finish_destructor_body): Likewise.
17916         (maybe_build_cleanup_1): Likewise.
17917         * decl2.c (reparse_decl_as_expr): Likewise.
17918         * init.c (perform_member_init): Likewise.
17919         (expand_cleanup_for_base): Likewise.
17920         (build_builtin_delete_call): Likewise.
17921         (build_new_1): Likewise.
17922         (build_delete): Likewise.
17923         * method.c (do_build_assign_ref): Likewise.
17924         * parse.y (already_scoped_stmt): Likewise.
17925         (nontrivial_exprlist): Likewise.
17926         (net_initializer): Likewise.
17927         (initlist): Likewise.
17928         * parse.c: Regenerated.
17929         * rtti.c (build_x_typeid): Likewise.
17930         (build_dynamic_cast_1): Likewise.
17931         * typeck.c (build_x_compound_expr): Likewise.
17932         (build_static_cast): Likewise.
17933         (build_modify_expr): Likewise.
17934
17935         * cp-tree.h (DECL_VINDEX): Add documentation.
17936         * class.c (build_vtable_entry): Likewise.
17937         (start_vtable): Add comment.
17938         (add_virtual_function): Replace pending_hard_virtuals with
17939         overridden_virtuals and pending_virtuals with new_virtuals.
17940         Replace redundant assignments with assertions.
17941         (check_for_override): Add comment.
17942         (check_bases_and_members): Replace pending_hard_virtuals with
17943         overridden_virtuals and pending_virtuals with new_virtuals.
17944         (create_vtbl_ptr): Likewise.
17945         (layout_class_type): Likewise.
17946         (finish_struct_1): Likewise.  Add comments.
17947
17948 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
17949
17950         * class.c (finish_struct_1): Replace redundant code with
17951         assertions.
17952
17953         * cp-tree.h (flag_new_abi): Move.
17954         (flag_use_cxa_atexit): Likewise.
17955         (flag_honor_std): Likewise.
17956         (flag_rtti): Likewise.
17957         (vbase_offsets_in_vtable_p): Define.
17958         (vptrs_present_everywhere_p): Likewise.
17959         (TYPE_CONTAINS_VPTR_P): Likewise.
17960         (dfs_walk_real): Declare.
17961         * class.c (build_vbase_pointer_fields): Check
17962         vbase_offsets_in_vtable_p.
17963         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
17964         BINFO_VPTR_FIELD.
17965         (build_vbase_offset_vtbl_entries): Simplify.
17966         (build_vbase_offset_vtbl_entries): Adjust.
17967         (build_vbase_pointer): Add ability to look up vbase offsets in
17968         vtable.
17969         (start_vtable): New function.
17970         (add_virtual_function): Use it.
17971         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
17972         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
17973         (build_vtbl_initializer): Take the type of the complete object as
17974         input.  Use it to correctly calculate vbase offsets.
17975         (dfs_finish_vtbls): Pass the complete type to
17976         build_vtbl_initializer.
17977         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
17978         (create_vtable_ptr): Create a vtable even if there are no
17979         new virtual functions, under the new ABI.
17980         (finish_struct_1): Likewise.
17981         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
17982         * decl.c (exapnd_static_init): Remove call to
17983         preserve_initializer.
17984         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
17985         vtables.
17986         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
17987         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
17988         (construct_virtual_bases): Don't initialize virtual base pointers
17989         under the new ABI.
17990         (build_aggr_init): Clean up comment.
17991         (expand_aggr_init_1): Likewise.
17992         * rtti.c (expand_class_desc): Store the virtual function table
17993         index where the vbase offset lives in the offset field.
17994         * search.c (dfs_walk_real): Make it global.
17995         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
17996         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
17997
17998         * tinfo.h (USItype): Make it signed under the new ABI.
17999         * tinfo.cc (convert_to_base): New function.  Encapsulate base
18000         conversion logic here.
18001         (__class_type_info::do_upcast): Use it.
18002         (__class_type_info::do_dyncast): Likewise.
18003         (__class_type_info::do_find_public_subobj): Likewise.
18004
18005         * init.c (construct_virtual_bases): Don't look up the addresses of
18006         virtual bases at run-time.
18007
18008         * class.c (build_vbase_pointer): Relocate.
18009         (build_vbase_pointer_fields): Likewise.
18010         (dfs_build_vbase_offset_vtbl_entries): Likewise.
18011         (build_vbase_offset_vtbl_entries): Likewise.
18012
18013         * decl.c (init_decl_processing): Complain if -fnew-abi
18014         -fno-vtable-thunks is used.
18015
18016         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
18017         flag_new_abi.
18018
18019 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
18020
18021         * cp-tree.h (num_extra_vtbl_entries): New function.
18022         (size_extra_vtbl_entries): Likewise.
18023         (dfs_vtable_path_unmark): Likewise.
18024         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
18025         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
18026         * class.c (num_extra_vtbl_entries): New function.
18027         (size_extra_vtbl_entries): Likewise.
18028         (dfs_build_vbase_offset_vtbl_entries): New function.
18029         (build_vbase_offset_vtbl_entries): Likewise.
18030         (build_vtbl_initializer): Use it.
18031         (finish_struct_1): Adjust vtable sizes (using
18032         num_extra_vtbl_entries).
18033         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
18034         THUNK_DECL is non-NULL before expanding it.
18035         * init.c (expand_virtual_init): Adjust the vtable pointer by
18036         size_extra_vtbl_entries before storing it.
18037         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
18038         Handle TREE_LIST parameters here, not in the dfs_* functions.
18039         (dfs_unmarked_real_bases_queue_p): Adjust.
18040         (dfs_marked_real_bases_queue_p): Likewise.
18041         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
18042         (dfs_vtable_path_marked_real_bases_queue_p): New function.
18043         (dfs_vtable_path_unmark): Likewise.
18044
18045 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
18046
18047         * optimize.c (copy_body_r): Clear the operand three of a
18048         TARGET_EXPR when copying it.
18049
18050 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18051
18052         * method.c (build_decl_overload_real): Check whether we are in ::
18053         before returning __builtin_new/delete.
18054
18055 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
18056
18057         * pt.c (tsubst_friend_function): Improve comment.
18058         (instantiate_decl): Avoid crashing when a "nested" function is
18059         instantiated from the top level.
18060
18061         * dump.c (dqeueue_and_dump): Dump
18062         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
18063
18064 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18065
18066         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
18067
18068 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
18069
18070         * g++spec.c (lang_specific_driver): Add -fnew-abi if
18071         ENABLE_NEW_GXX_ABI defined.
18072         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
18073         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
18074         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
18075
18076 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
18077
18078         * decl.c (start_cleanup_fn): Call pushdecl.
18079
18080         * call.c (convert_class_to_reference): Fix typos.
18081         (build_conditional_expr): Handle errors gracefully.
18082         * class.c (push_nested_class): Likewise.
18083         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
18084         (DECL_THIS_EXTERN): Use it.
18085         (DECL_THIS_STATIC): Likewise.
18086         * cvt.c (convert_to_void): Handle errors gracefully.
18087         (build_expr_type_conversion): Likewise.
18088         * decl.c (maybe_push_decl): Likewise.
18089         (start_decl_1): Likewise.
18090         (require_complete_types_for_parms): Likewise.
18091         * parse.y (structsp): Likewise.
18092         (base_class): Likewise.
18093         * parse.c: Regenerated.
18094         * pt.c (finish_member_template_decl): Likewise.
18095         * typeck.c (decay_conversion): Likewise.
18096
18097         * cp-tree.h (dfs_skip_vbases): New function.
18098         (find_vbase_instance): Likewise.
18099         * class.c (determine_primary_base): Allow a nearly empty base to
18100         serve as a primary base class under the new ABI.
18101         (get_class_offset_1): Rename to ...
18102         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
18103         messages here.
18104         (get_class_offset): Use it.  Issue error messages here.
18105         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
18106         find the right copies of virtual bases.
18107         (fixup_vtable_deltas1): Rename to ...
18108         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
18109         bases as primary bases.
18110         (fixup_vtable_deltas): Remove.
18111         (override_one_vtable): Handle virtual bases as primary bases.
18112         (merge_overrides): Likewise.
18113         (finish_struct_1): Likewise.
18114         (dump_class_hierarchy): Dump primary-ness of bases as well.
18115         * search.c (mark_primary_bases): Use a pre-order traversal to
18116         handle primary virtual bases.
18117         (dfs_skip_vbases): New fiunction.
18118         (expand_upcast_fixups): Adjust to handle primary virtual bases.
18119         (fixup_virtual_upcast_offsets): Likewise.
18120         (fixup_all_virtual_upcast_offsets): Likewise.
18121         (dfs_find_vbase_instances): New function.
18122         (find_vbase_instance): Likewise.
18123
18124 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
18125
18126         * lex.c (DIR_SEPARATOR): Delete macro.
18127
18128 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
18129
18130        * decl2.c (lang_decode_option): Handle automatic line wrapping
18131        option.
18132
18133 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
18134
18135         * friend.c (do_friend): Don't resolve scopes when processing
18136         template declarations, even if the qualifying scope doesn't
18137         involve template parameters.
18138
18139 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
18140
18141         * class.c (dfs_modify_vtables_queue_p): Remove.
18142         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
18143         and dfs_marked_real_bases_queue_p instead of
18144         dfs_modify_vtables_queue_p.
18145
18146         * class.c (build_vbase_path): Simplify.
18147         (dfs_propagate_binfo_offsets): New function.
18148         (propagate_binfo_offsets): Use it.
18149         (remove_base_field): Simplify.
18150         (dfs_set_offset_for_vbases): Remove.
18151         (dfs_set_offset_for_shared_vbases): New function.
18152         (dfs_set_offset_for_unshared_vbases): Likewise.
18153         (layout_virtual_bases): Use them.
18154         (layout_basetypes): Don't call propagate_binfo_offsets.
18155         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
18156         for the vbases.
18157
18158         * class.c (build_base_field): New function, split out from ...
18159         (build_base_fields): ... here.  Use it.  Allocate primary bases
18160         first, under the new ABI.
18161         (get_vtable_entry): Remove.
18162         (remove_base_field): New function, split out from ...
18163         (remove_base_fields): ... here.  Adjust since primary bases come
18164         first under the new ABI.
18165
18166         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
18167         (initialize_vtbl_ptrs): New function.
18168         (expand_indirect_vtbls_init): Change prototype.
18169         (convert_pointer_to_vbase): Declare.
18170         * init.c (expand_direct_vtbls_init): Remove.
18171         (dfs_initialize_vtbl_ptrs): New function.
18172         (initialize_vtbl_ptrs): Likewise.
18173         (emit_base_init): Use initialize_vtbl_ptrs.
18174         * search.c (convert_pointer_to_vbase): Make it global.
18175         (expand_indirect_vtbls_init): Remove vtable initialization code.
18176         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
18177
18178         * class.c (dfs_finish_vtbls): New function.
18179         (finish_vtbls): Use it.
18180         (dump_class_hierarchy): New function.
18181
18182         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
18183         (BINFO_VBASE_PRIMARY_P): New macro.
18184         (BINFO_VIRTUALS): Add to documentation.
18185         (SET_BINFO_PRIMARY_MARKED_P): Remove.
18186         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
18187         (dfs_mark_primary_bases_queue_p): Likewise.
18188         (dfs_unmarked_real_bases_queue_p): New function.
18189         (dfs_marked_real_bases_queue_p): Likewise.
18190         * search.c (dfs_mark_primary_bases): Adjust.
18191         (mark_primary_bases): Likewise.
18192         (get_shared_vbase_if_not_primary): New function.
18193         (dfs_unmarked_real_bases_queue_p): Likewise.
18194         (dfs_marked_real_bases_queue_p): Likewise.
18195         (dfs_get_pure_virtuals): Simplify.
18196         (get_pure_virtuals): Likewise.
18197
18198 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18199
18200         * lex.c: Include tm_p.h.
18201
18202 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
18203
18204         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
18205
18206 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
18207
18208         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
18209         * pt.c (instantiate_decl): Defer comdat templates that might not be
18210         needed.
18211
18212         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
18213         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
18214         (finish_file): Likewise.
18215
18216         * decl2.c (import_export_class): Undo 12/14 change.
18217
18218         * error.c (dump_decl): operator new, not operatornew.
18219
18220         * class.c (field_decl_cmp): A nontype is "greater" than a type.
18221         * search.c (lookup_field_1): Look for the last field with the
18222         desired name.
18223
18224 2000-01-05  Nathan Sidwell  <nathan@acm.org>
18225
18226         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
18227         FUNCTION_DECL.
18228
18229 2000-01-05  Nathan Sidwell  <nathan@acm.org>
18230
18231         * typeck.c (build_static_cast): Don't strip target qualifiers
18232         when casting from a class.
18233
18234 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18235
18236         * class.c (warn_hidden): Initialize variable `fndecl'.
18237
18238 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
18239
18240         * decl.c (flag_isoc9x): New variable to be able to use code in
18241         c-common.c.  For now always zero.
18242
18243 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
18244
18245         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
18246         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
18247         or unshare_base_binfos for virtual bases here.
18248         * search.c (dfs_get_vbase_types): Do it here.
18249         (get_vbase_types): Adjust.
18250
18251 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
18252
18253         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
18254         (BINFO_PRIMARY_MARKED_P): Use flag 5.
18255         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
18256         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
18257         (unmark_primary_bases): Remove declaration.
18258         (unmarkedp): Declare.
18259         (dfs_vbase_unmark): Likewise.
18260         * class.c (determine_primary_base): Return immediately if there
18261         are no base classes.  Call mark_primary_bases here.
18262         (modify_all_direct_vtables): Remove.
18263         (modify_all_indirect_vtables): Remove.
18264         (dfs_modify_vtables_queue_p): New function.
18265         (dfs_modify_vtables): New function.
18266         (modify_all_vtables): Use them.
18267         (build_base_fields): Build FIELD_DECLs for primary virtual base
18268         classes.
18269         (create_vtable_ptr): Don't call determine_primary_base here.
18270         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
18271         (dfs_set_offset_for_vbases): ... this.
18272         (layout_virtual_bases): Use it.
18273         (layout_class_type): Call determine_primary_base here.
18274         * search.c (unmarkedp): Make it global.
18275         (shared_marked_p): Simplify.
18276         (shared_unmarked_p): Likewise.
18277         (dfs_primary_bases_queue_p): Remove.
18278         (dfs_unmark_primary_bases): Likewise.
18279         (unmark_primary_bases): Likewise.
18280         (mark_primary_bases): Simplify.
18281         (get_pure_virtuals): Don't call mark_primary_bases here.
18282         (dfs_vbase_unmark): New function.
18283         (get_vbase_types): Simplify.
18284
18285         * class.c (struct base_info): Remove.
18286         (determine_primary_base): Take has_virtual_p rather than a
18287         base_info as input.  Don't calculate max_has_virtual.
18288         (finish_struct_bits): Remove max_has_virtual argument.
18289         (create_vtable_ptr): Remove max_has_virtual_p argument.
18290         (layout_virtual_bases): Remove max argument.
18291         (layout_basetypes): Likewise.
18292         (layout_class_type): Remove max_has_virtual_p argument.
18293         (finish_struct_1): Remove max_has_virtual.
18294
18295         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
18296         (layout_basetypes): Remove.
18297         * class.c (propagate_binfo_offsets): Moved here from tree.c.
18298         Update to handle primary virtual bases.
18299         (remove_base_fields): New function, split out from
18300         layout_basetypes.
18301         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
18302         (layout_virtual_bases): New function, split out from
18303         layout_basetypes.  Update to handle primary virtual bases.
18304         (layout_basetypes): Moved here from tree.c.  Use
18305         remove_base_fields and layout_virtual_bases.
18306         * search.c (dfs_mark_primary_bases_queue_p): New function.
18307         (mark_primary_bases): Use it.
18308         * tree.c (CEIL): Remove.
18309         (propagate_binfo_offsets): Remove.
18310         (layout_basetypes): Remove.
18311
18312 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
18313
18314         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
18315         (BINFO_PRIMARY_MARKED_P): New macro.
18316         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
18317         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
18318         (mark_primary_bases): New function.
18319         (unmark_primary_bases): Likewise.
18320         * search.c (get_abstract_virtuals_1): Remove.
18321         (dfs_mark_primary_bases): New function.
18322         (mark_primary_bases): Likewise.
18323         (dfs_unmark_primary_bases): Likewise.
18324         (unmark_primary_bases): Likewise.
18325         (dfs_get_pure_virtuals): Likewise.
18326
18327 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
18328
18329         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
18330         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
18331         (modify_one_vtable): Adjust.
18332         (fixup_vtable_deltas1): Likewise.
18333         (override_one_vtable): Likewise.
18334         * search.c (get_abstract_virtuals_1): Likewise.
18335         (get_pure_virtuals): Likewise.
18336         (expand_upcast_fixups): Likewise.
18337         * tree.c (debug_binfo): Likewise.
18338
18339         * class.c (build_vtable): Don't return a value.  Don't rebuild
18340         vtables for bases that have already been handled.
18341         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
18342         already been handled.
18343         (modify_one_vtable): Adjust accordingly.
18344         (fixup_vtable_deltas1): Likewise.
18345         (finish_struct_1): Likewise.
18346
18347 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18348
18349         * call.c (build_new_method_call): Also check destructors.