OSDN Git Service

testsuite/
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
2
3         PR c++/10915
4         * decl.c (grok_op_properties): Warn possible confusing conversion
5         only if -Wconversion.
6
7 2003-06-20  Mark Mitchell  <mark@codesourcery.com>
8
9         PR c++/10749
10         * parser.c (cp_parser_class_head): See through dependent names
11         when parsing a class-head.
12
13         PR c++/10845
14         * pt.c (try_class_unification): Correct handling of member class
15         templates.
16
17 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
18
19         * semantics.c (genrtl_finish_function): Adjust
20         expand_function_end call.
21
22 2003-06-19  Mark Mitchell  <mark@codesourcery.com>
23
24         PR c++/10939
25         * pt.c (tsubst_decl): Do not try to substitute into non-dependent
26         functions.
27         (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
28
29         PR c++/9649
30         * cp-tree.h (pushdecl_class_level): Change prototype.
31         (push_class_level_binding): Likewise.
32         * decl.c (add_binding): Reject duplicate static data members.
33         (pushdecl_class_level): Return a value indicating whether or not
34         the binding was valid.
35         (push_class_level_binding): Likewise.
36         * semantics.c (finish_member_declaration): Don't keep invalid
37         declarations.
38
39         PR c++/11041
40         * call.c (initialize_reference): Do not use cp_finish_decl to emit
41         temporary variables.
42         * cp-tree.h (static_aggregates): Declare.
43         (pushdecl_top_level_and_finish): Likewise.
44         * decl.c (pushdecl_top_level_1): New function.
45         (pushdecl_top_level): Use it.
46         (pushdecl_top_level_and_finish): New function.
47         (initialize_local_var): Remove redundant code.
48         (cp_finish_decl): Remove support for RESULT_DECLs.  Don't check
49         building_stmt_tree.
50         * decl.h (static_aggregates): Remove.
51         * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
52         * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
53         (tinfo_base_init): Likewise.
54         
55 2003-06-19  Matt Austern  <austern@apple.com>
56
57         PR c++/11228
58         * init.c (build_zero_init): Assert that number of array elements
59         is an integer constant.
60         (build_default_init) Don't use build_zero_init for arrays with
61         variable number of elements.
62         
63 2003-06-19  Andreas Jaeger  <aj@suse.de>
64
65         * cp-tree.h: Remove duplicated declarations.
66
67 2003-06-18  Nathanael Nerode  <neroden@gcc.gnu.org>
68
69         * pt.c: Convert to ISO C.
70         * semantics.c: Convert to ISO C.
71
72 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
73
74         * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
75         at_least_as_qualified_p, more_qualified_p): Return bool.
76         * typeck.c: ANSIFY function definitions.
77         (comp_array_types): Take redeclaration bool parameter.
78         (comptypes): Rearrange STRICT handling.
79         (at_least_as_qualified_p, more_qualified_p,
80         comp_cv_qualification): Cache cv quals.
81         (compparms): Rearrange loop.
82
83 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
84
85         * cp-tree.h (COMPARE_RELAXED): Rename to ...
86         (COMPARE_DERIVED): ... here. Adjust comment.
87         (resolve_typename_type_in_current_instantiation): Remove.
88         (cp_tree_equal, comptypes): Return a bool.
89         * cvt.c (convert_to_reference): Adjust comptypes call.
90         * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
91         (resolve_typename_type_in_current_instantiation): Remove.
92         * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
93         IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
94         calls. Refactor code.
95         * typeck.c (comp_array_types): Return bool. Lose callback.
96         parameter. Adjust cp_tree_equal calls.
97         (comptypes): Return bool. Adjust strict handling. Remove relaxed
98         enumeration and java type handling. Deal with typename types here.
99         Adjust recursive and cp_tree_equals calls. Adjust base and derived
100         checking.
101         (comp_target_types): Remove unreachable code. Adjust
102         same_or_base_type_p calls.
103         (ptr_reasonably_similar): Adjust base and derived check.
104
105         * typeck.c (maybe_warn_about_returning_address_of_local): Remove
106         unused calculation.
107         (check_return_expr): Adjust error messages.
108         * cp-tree.def (SCOPE_REF): Correct comment.
109
110 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
111
112         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
113         string again.
114
115 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
116
117         * optimize.c (dump_function): Form complete flag name by
118         prefixing 'fdump-' to string returned by dump_flag_name().
119
120 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
121
122         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
123         string.
124
125 2003-06-17  Jason Merrill  <jason@redhat.com>
126
127         PR c++/10929
128         * decl.c (grokfndecl): Don't mark a function inline for
129         -finline-functions if it isn't defined.
130
131 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
132
133         PR c++/10712
134         * class.c (handle_using_decl): Robustify.
135
136         PR c++/11105
137         * cp-tree.h (DECL_CONV_FN_TYPE): New method.
138         * mangle.c (struct globals): Remove internal_mangling_p.
139         (write_unqualified_name): Use DECL_CONV_FN_TYPE.
140         (write_template_parm): Don't write out the level number.
141         (conv_type_names): New variable.
142         (hash_type): New function.
143         (compare_type): Likewise.
144         (mangle_conv_op_name_for_type): Don't try to mangle conversion
145         operator names.
146         * search.c (lookup_conversion_operator): New function.
147         (lookup_fnfields_1): Use it.
148
149 2003-06-17  Andreas Jaeger  <aj@suse.de>
150
151         * except.c: Remove duplicate declaration of push_eh_cleanup.
152
153         * call.c: Remove extra declaration of inhibit_warnings.
154
155 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
156
157         2003-06-16  Jens-Michael Hoffmann  <jensmh@gmx.de>
158         * mangle.c: Convert to ISO C.
159
160 2003-06-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
161
162         * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
163         macro.
164
165 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
166
167         * tree.c: Convert to ISO C.
168
169 2003-06-16  Kazu Hirata  <kazu@cs.umass.edu>
170
171         * cp-tree.h: Follow spelling conventions.
172         * mangle.c: Likewise.
173         * method.c: Likewise.
174         * parser.c: Likewise.
175
176 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
177
178         * decl.c (start_function): Adjust init_function_start call.
179         * method.c (use_thunk): Likewise.
180         * semantics.c (genrtl_start_function): Likewise.
181
182 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
183
184         * Make-lang.in: Remove c-options.o.
185
186 2003-06-13  Nathanael Nerode  <neroden@gcc.gnu.org>
187
188         * lex.c: Convert to ISO C.
189
190         2003-05-19  Jens-Michael Hoffmann  <jensmh@gmx.de>
191         * init.c: removes use of PARAMS macro.  Use ISO style function
192         declarations.  (Not copyright-significant change.)
193
194         * rtti.c: Remove PARAMS.
195
196         * typeck2.c: Convert to ISO C.
197
198 2003-06-12  Mark Mitchell  <mark@codesourcery.com>
199
200         PR c++/10635
201         * typeck.c (build_c_cast): Check that the destination type is
202         complete.
203
204 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
205
206         PR c++/10432
207         * cp-tree.h (finish_declarator): Remove.
208         * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
209         erroneous declarations.
210         * semantics.c (finish_declarator): Remove.
211
212 2003-06-11  Roger Sayle  <roger@eyesopen.com>
213
214         * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
215         global static constructor/destructor if it will be empty, i.e.
216         either doesn't call any ctors/dtors or only calls pure or const
217         ctors/dtors.
218
219 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
220
221         * mangle.c (tm_p.h): Include it.
222         * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
223
224         PR c++/11131
225         * tree.c (cp_cannot_inline_fn): Check for "inline" before
226         instantiation.
227
228 2003-06-10  Jason Merrill  <jason@redhat.com>
229
230         PR c++/10968
231         * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
232
233 2003-06-10  Andrew Pinski  <pinskia@physics.uc.edu>
234
235         * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
236         (start_cleanup_cnt): New.
237
238 2003-06-10  Mark Mitchell  <mark@codesourcery.com>
239
240         PR c++/11131
241         * cp-tree.h (template_for_substitution): Declare.
242         * decl2.c (mark_used): Use it when figuring out whether or not a
243         function is inline.
244         * pt.c (template_for_substitution): Give it external linkage.
245         * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
246         possible.
247
248 2003-06-09  Zack Weinberg  <zack@codesourcery.com>
249
250         PR 8861
251         * mangle.c (write_real_cst): New function.  Implement
252         ABI-compliant mangling of floating-point literals when
253         -fabi-version>=2; provide backward compatibility with 3.3 when
254         -fabi-version=1 (with warning).  Clarify commentary.
255         (write_template_arg_literal): Use write_real_cst.
256
257 2003-06-07  Andreas Jaeger  <aj@suse.de>
258
259         * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
260
261 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
262
263         * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
264         (LANG_HOOKS_HANDLE_OPTION): Override.
265         * cp-tree.h (cxx_init_options): Update.
266         * lex.c (cxx_init_options): Update.
267
268 Thu Jun  5 18:33:40 CEST 2003  Jan Hubicka  <jh@suse.cz>
269
270         * Make-lang.in:  Add support for stageprofile and stagefeedback
271
272 2003-06-04  J"orn Rennecke <joern.rennecke@superh.com>
273
274         * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
275
276 2003-06-04  Andreas Jaeger  <aj@suse.de>
277
278         * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
279
280 2003-06-03  Jason Merrill  <jason@redhat.com>
281
282         * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
283
284         * cp/decl.c (reshape_init): Handle vectors.
285
286         * testsuite/g++.dg/init/array10.C: New.
287
288 2003-06-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
289
290         PR c++/10940
291         * pt.c (check_explicit_specialization): Check for 'static'
292         earlier.
293
294 2003-05-31  Diego Novillo  <dnovillo@redhat.com>
295
296         * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
297         the operand of a CONSTRUCTOR node.
298
299 2003-05-31  Gabriel Dos Reis <gdr@integrable-solutions.net>
300
301         * decl.c (cp_binding_level::this_entity): Rename from this_class.
302         (cxx_scope_descriptor): New function.
303         (cxx_scope_debug): Likewise.
304         (push_binding_level): Use it.
305         (pop_binding_level): Likewise.
306         (suspend_binding_level): Likewise.
307         (resume_binding_level): Likewise.
308         (pushlevel_class): Adjust use of this_class.
309         (pushtag): Likewise.
310         (lookup_name_real): Likewise.
311         (global_scope_name): New variable.
312         (initialize_predefined_identifiers): Initialize it.
313         (push_namespace): Use it.
314         (make_cxx_scope): New function.
315         (pushlevel): Use it.
316         (pushlevel_class): Likewise.
317         (push_binding_level): Simplify.  Loose the last two arguments.
318         (make_binding_level): Remove.
319         (initial_push__namespace_scope): New function.
320         (push_namespace): Use it.  Simplify.
321         (cxx_init_decl_processing): Likewise.
322         (declare_namespace_level): Remove.
323
324 2003-05-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
325
326         PR c++/10956
327         * pt.c (instantiate_decl): Don't use full template arguments if
328         we are dealing with specializations.
329
330 2003-05-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
331
332         * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
333         (binding_depth): Unconditionally define.
334         (is_class_level): Likewise.
335         (indent): Likewise.  Take an indenting parameter.
336         (push_binding_level): Remove conditional definittion.
337         (pop_binding_level): Likewise.
338         (suspend_binding_level): Likewise.
339         (resume_binding_level): Likewise.
340         (pushlevel): Likewise.
341         (pushlevel_class): Likewise.
342         (poplevel_class): Likewise.
343         (pop_everything): Likewise.
344
345 2003-05-27  Gabriel Dos Reis <gdr@integrable-solutions.net>
346
347         * name-lookup.h (global_scope_p): New macro.
348         * decl.c (pop_binding_level): Use it.  Don't refer directly to
349         global_binding_level.
350         (suspend_binding_level): Likewise.
351         (global_bindings_p): Likewise.
352         (print_other_binding_stack): Likewise.
353         (print_binding_stack): Likewise.
354         (maybe_push_to_top_level): Likewise.
355         (pushdecl_namespace_level): Likewise.
356         (cxx_init_decl_processing): Likewise.
357         (start_decl): Likewise.
358         (cp_finish_decl): Likewise.
359         (start_function): Likewise.
360         (global_binding_level): Remove.
361
362 2003-05-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
363
364         * parser.c (cp_parser_explicit_instantiation): Restore old
365         access before template instantiation.
366
367 2003-05-23  Geoffrey Keating  <geoffk@apple.com>
368
369         * lang-specs.h: Use -o to specify preprocessor's output file.
370         Make -no-integrated-cpp work when building PCH files.
371
372 2003-05-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
373
374         PR c++/10682
375         * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
376         check for implicitly created typedef to an enum.
377
378 2003-05-21  Jason Merrill  <jason@redhat.com>
379
380         * init.c (build_vec_delete): Copy the address into a temporary
381         variable before calling build_vec_delete_1.
382         * decl2.c (delete_sanity): Don't call stabilize_reference.
383
384 2003-05-21  Nathan Sidwell  <nathan@codesourcery.com>
385
386         * pt.c (register_specialization): Update the decl's location,
387         if necessary.
388         (check_explicit_specialization): Likewise.
389
390 2003-05-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
391
392         * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
393
394 2003-05-21  Danny Smith  <dannysmith@users.sourceforge.net>
395
396         PR c++/9738
397         * decl.c (duplicate_decls): Re-invoke make_decl_rtl
398         if the old decl had instantiated DECL_RTL.
399         (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
400
401 2003-05-19  Matt Austern  <austern@apple.com>
402
403         * lang-options.h: Document -Wno-invalid-offsetof
404         * typeck.c (build_class_member_access_expr): Don't complain about
405         (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
406
407 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
408
409         * name-lookup.c (free_binding_entry): fix where the GTY markers are.
410         (binding_entry_make): Make entry->chain NULL after getting an entry.
411         fix the spelling of chain in a comment.
412         (binding_table_free): speed up by having temporary variable.
413         (binding_table_new): set table->chain to be NULL after allocating
414         a table.
415         (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
416         binding->previous to NULL after getting an binding for speed.
417
418 2003-05-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
419
420         * cp-tree.h (struct lang_type_class): Replace data member tags
421         with hash-table nested_udts.
422         (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
423         * class.c (unreverse_member_declarations): Don't touch
424         CLASSTYPE_TAGS.
425         (pushclass): Use cxx_remember_type_decls.
426         * decl.c (struct cp_binding_level): Replace data member tags with
427         hash-table type_decls.
428         (pop_binding_level): Handle level->type_decls.
429         (kept_level_p): Adjust.
430         (poplevel): Remove unused local variable.
431         (bt_print_entry): New function.
432         (print_binding_level): Use it.
433         (push_namespace): Build current_binding_level->type_decls.
434         (maybe_process_template_type_declaration): Adjust.
435         (pushtag): Likewise.
436         (clear_anon_tags): Use binding_table_remove_anonymous_types.
437         (gettags): Remove.
438         (cxx_remember_type_decls):  Rename from storetags.  Adjust.
439         (lookup_tag): Use binding_table_find_anon_type.  Tidy.
440         (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
441         (cxx_init_decl_processing): Build global_binding_level->type_decls.
442         (store_parm_decls): Remove pointless code.
443         * name-lookup.c (free_binding_entry): New variable.
444         (ENTRY_INDEX): New macro.
445         (struct binding_table_s): New datatype.
446         (binding_entry_make): New function.
447         (binding_entry_free): Likewise.
448         (binding_table_construct): Likewise.
449         (binding_table_free): Likewise.
450         (binding_table_new): Likewise.
451         (binding_table_expand): Likewise.
452         (binding_table_insert): Likewise.
453         (binding_table_find): Likewise.
454         (binding_table_find_anon_type): Likewise.
455         (binding_table_reverse_maybe_remap): Likewise.
456         (binding_table_remove_anonymous_types): Likewise.
457         (binding_table_foreach): Likewise.
458         * name-lookup.h (binding_table): New type.
459         (binding_entry): Likewise.
460         (bt_foreach_proc): Likewise.
461         (struct binding_entry_s): New datatype.
462         (SCOPE_DEFAULT_HT_SIZE): New macro.
463         (CLASS_SCOPE_HT_SIZE): Likewise.
464         (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
465         (NAMESPACE_STD_HT_SIZE): Likewise.
466         (GLOBAL_SCOPE_HT_SIZE): Likewise.
467         (binding_table_new): Declare.
468         (binding_table_free): Likewise.
469         (binding_table_insert): Likewise.
470         (binding_table_find_anon_type): Likewise.
471         (binding_table_reverse_maybe_remap): Likewise.
472         (binding_table_remove_anonymous_types): Likewise.
473         (binding_table_foreach): Likewise.
474         (binding_table_find): Likewise.
475         (cxx_remember_type_decls): Likewise.
476         * pt.c (bt_instantiate_type_proc): New function.
477         (do_type_instantiation): Use it.
478         * search.c (lookup_field_r): Use binding_table_find.
479
480 2003-05-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
481
482         * semantics.c (perform_deferred_access_checks): Don't discard
483         checked access.
484
485 2003-05-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
486
487         * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
488         libiberty VA_ macros, always use stdarg.
489         * rtti.c (create_pseudo_type_info): Likewise.
490         * tree.c (build_min_nt, build_min): Likewise.
491
492 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
493
494         * ptree.c (cxx_print_type, cxx_print_xnode): Use string
495         concatentation on HOST_WIDE_INT_PRINT_* format specifier to
496         collapse multiple function calls into one.
497         * tree.c (debug_binfo): Likewise.
498
499 2003-05-15  Jason Merrill  <jason@redhat.com>
500
501         PR c++/5388
502         * call.c (conditional_conversion): Don't consider implicit
503         conversions if T2 is a base of T1.
504         * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
505         (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
506
507         * parser.c (cp_parser_primary_expression): Convert a static data
508         member from reference.
509
510 2003-05-15  Mark Mitchell  <mark@codesourcery.com>
511
512         * call.c (build_op_delete_call): Avoid creating unnecessary types.
513         * class.c (instantiate_type): Remove tests for tf_no_attributes.
514         * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
515         (COMPARE_NO_ATTRIBUTES): Remove.
516         * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
517
518         PR c++/8385
519         * semantics.c (finish_typeof): Refine type-dependency check.
520
521 2003-05-13  Jason Merrill  <jason@redhat.com>
522
523         * typeck.c (build_modify_expr): Don't always stabilize the lhs and
524         rhs.  Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
525
526 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
527
528         * method.c (synthesize_method): Call push/pop_deferring_access_checks.
529
530 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
531
532         PR c++/10230, c++/10481
533         * semantics.c (finish_non_static_data_member): Handle when the
534         non-static member is not from a base of the current class type.
535
536 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
537
538         PR c++/10552
539         * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
540         template and has dependent context.
541
542 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
543
544         * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
545
546 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
547
548         PR c++/9252
549         * cp-tree.h (saved_scope): Remove check_access field.
550         (tsubst_flags_t): Remove tf_parsing.
551         * decl.c (maybe_push_to_top_level): Don't initialize
552         scope_chain->check_access.
553         (make_typename_type, make_unbound_class_template): Don't use
554         tf_parsing.
555         (register_dtor_fn): Use push/pop_deferring_access_checks
556         instead of scope_chain->check_access.
557         * method.c (use_thunk): Likewise.
558         * parser.c (cp_parser_explicit_instantiation
559         (cp_parser_constructor_declarator_p): Don't call
560         push/pop_deferring_access_checks here.
561         (cp_parser_template_argument, cp_parser_class_name): Don't use
562         tf_parsing.
563         (yyparse): Check flag_access_control.
564         * pt.c (instantiate_class_template): Call
565         push/pop_deferring_access_checks.
566         * semantics.c (push_deferring_access_checks): Propagate
567         dk_no_check.
568         (perform_or_defer_access_check): Make sure basetype_path is
569         a type before comparison.
570         * call.c (build_op_delete_call, build_over_call): Use
571         perform_or_defer_access_check.
572         * class.c (alter_access): Likewise.
573         * init.c (build_offset_ref): Likewise.
574         * lex.c (do_identifier): Likewise.
575         * method.c (hack_identifier): Likewise.
576         * search.c (lookup_member): Likewise.
577         * semantics.c (finish_non_static_data_member): Likewise.
578         (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
579         instead of flag_access_control.
580
581 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
582
583         PR c++/9554
584         * parser.c (cp_parser_class_name): Remove check_access parameter.
585         All caller adjusted.  Update declaration.
586         (cp_parser_lookup_name): Likewise.
587         * semantics.c (push_deferring_access_checks): Change parameter type
588         to enum deferring_kind.  All caller adjusted.
589         (resume_deferring_access_checks): Adjust to use new enum.
590         (stop_deferring_access_checks): Likewise.
591         (perform_or_defer_access_check): Likewise.
592         * cp-tree.h (deferring_kind): New enum.
593         (deferred_access): Adjust field type.
594         (push_deferring_access_checks): Update declaration.
595
596 2003-05-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
597
598         PR c++/10555, c++/10576
599         * pt.c (lookup_template_class): Handle class template with
600         multiple levels of parameters when one of the levels contain
601         errors.
602
603 2003-05-08  Jason Merrill  <jason@redhat.com>
604
605         * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
606         expression.  Undo some of the recent reorg.
607
608 2003-05-07  Richard Henderson  <rth@redhat.com>
609
610         PR c++/10570
611         * cfns.gperf: Comment out POSIX thread cancellation points,
612         plus abort and raise.
613         * cfns.h: Regenerate.
614
615 2003-05-07  Jason Merrill  <jason@redhat.com>
616
617         * call.c (build_conditional_expr): Don't assume that the folded
618         expression has result_type.
619
620 2003-05-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
621
622         * typeck.c (build_unary_op): Deal with const qualifier in
623         invalid pointer-to-member earlier.
624
625 2003-05-05  Jason Merrill  <jason@redhat.com>
626
627         PR c++/9537
628         * call.c (conditional_conversion): Build an RVALUE_CONV if
629         we're just changing the cv-quals.
630         (build_conditional_expr): Don't call convert to change
631         cv-quals.
632
633 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
634
635         PR c++/10496
636         * typeck.c (build_unary_op): Don't output const qualifier when
637         output invalid pointer-to-member diagnostics.
638
639 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
640
641         * decl.c: Fix typos.
642
643 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
644
645         PR c++/4494
646         * decl.c (start_function): Use same_type_p to check return type
647         of main.
648
649 2003-05-03  Zack Weinberg  <zack@codesourcery.com>
650
651         PR c/10604
652         * cp/typeck.c (build_x_compound_expr): No need to check
653         extra_warnings as well as warn_unused_value.
654
655 2003-05-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
656
657         PR c++/9364, c++/10553, c++/10586
658         * decl.c (make_typename_type): Don't crash on illegal code.
659
660 2003-05-03  Nathan Sidwell  <nathan@codesourcery.com>
661
662         * class.c (finish_struct): Use location_t and input_location
663         directly.
664         * decl.c (make_label_decl): Likewise.
665         (use_label): Likewise.
666         * decl2.c (warn_if_unknown_interface): Likewise.
667         (start_static_initialization_or_destruction): Likewise.
668         (generate_ctor_or_dtor_function): Likewise.
669         (finish_file): Likewise.
670         * error.c (print_instantiation_full_context): Likewise.
671         * init.c (create_temporary_var): Likewise.
672         * method.c (synthesize_method): Likewise.
673         * parser.c (cp_token): Likewise.
674         (cp_lexer_set_source_position_from_token): Likewise.
675         (cp_lexer_get_preprocessor_token): Likewise.
676         (cp_parser_statement): Likewise.
677         * pt.c (tsubst_friend_function): Likewise.
678         (instantiate_class_template): Likewise.
679         (tsubst_decl): Likewise.
680         (tsubst): Likewise.
681         (instantiate_decl): Likewise.
682         * semantics.c (begin_class_definition): Likewise.
683         (expand_body): Likewise.
684
685 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
686
687         * class.c (finish_struct): Rename lineno to input_line.
688         * decl.c (push_binding_level, pop_binding_level,
689         suspend_binding_level, resume_binding_level, make_label_decl,
690         use_label, start_function): Likewise.
691         * decl2.c (warn_if_unknown_interface,
692         start_static_initialization_or_destruction,
693         generate_ctor_or_dtor_function, finish_file): Likewise.
694         * error.c (cp_line_of, print_instantiation_full_context,
695         print_instantiation_context): Likewise.
696         * except.c (check_handlers_1, check_handlers): Likewise.
697         * init.c (create_temporary_var): Likewise.
698         * method.c (use_thunk, synthesize_method): Likewise.
699         * parser.c (cp_lexer_set_source_position_from_token,
700         cp_lexer_get_preprocessor_token): Likewise.
701         * pt.c (push_tinst_level, pop_tinst_level,
702         tsubst_friend_function, instantiate_class_template, tsubst_decl,
703         tsubst, tsubst_expr, instantiate_decl): Likewise.
704         * semantics.c (genrtl_try_block, finish_label_stmt,
705         begin_class_definition, expand_body,
706         genrtl_finish_function): Likewise.
707         * tree.c (build_min_nt, build_min): Likewise.
708
709 2003-05-01  Mark Mitchell  <mark@codesourcery.com>
710
711         * decl2.c (comdat_linkage): Don't externalize explicit
712         instantiations.
713
714 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
715
716         PR c++/10554
717         * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
718         is not NULL.
719
720 2003-05-01  Steven Bosscher  <steven@gcc.gnu.org>
721
722         * cp-tree.h (struct lang_id2): Remove.  Move fields from here...
723         (struct lang_identifier): ... to here.
724         (LANG_ID_FIELD): Remove.
725         (SET_LANG_ID): Remove.
726         (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
727         (SET_IDENTIFIER_LABEL_VALUE): Likewise.
728         (IDENTIFIER_IMPLICIT_DECL): Likewise.
729         (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
730         (IDENTIFIER_ERROR_LOCUS): Likewise.
731         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
732
733 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
734
735         PR c++/8772
736         * pt.c (convert_template_argument): Correct diagnostic.
737
738 2003-04-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
739
740         PR c++/9432, c++/9528
741         * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
742
743 2003-04-30  Garbiel Dos Reis  <gcc@integrable-solutions.net>
744
745         * decl.c (check_previous_goto_1): Adjust prototype.
746         (check_previous_goto): Adjust use.
747         (check_switch_goto): Likewise.
748         (use_label): Adjust.
749         (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
750         (struct named_label_use_list): Use location_t datatype.
751
752 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
753
754         PR c++/10551
755         * pt.c (mark_decl_instantiated): Defer all explicit instantiations
756         that have not yet been written out.
757
758 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
759
760         PR c++/10549
761         * class.c (layout_class_type): Mark overlong bitfields as having
762         the maximum size permitted by their type, after layout.
763
764         PR c++/10527
765         * error.c (dump_expr): Correctly handling of NEW_EXPR.4
766
767 2003-04-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
768
769         * call.c (build_operator_new_call): Fix typo.
770         * lang-options.h: Likewise.
771
772 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
773
774         PR c++/10515
775         * cp-tree.h (lookup_field_1): Declare it.
776         * search.c (lookup_field_1): Make it public.
777         * decl.c (reshape_init): Handle designated initializers.
778
779         * decl.c (maybe_commonize_var): Further tweak support for systems
780         without weak symbols.
781
782 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
783
784         * decl.c (maybe_commonize_var): Fix thinko in last patch.
785
786 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
787
788         PR c++/10506
789         * method.c (use_thunk): Decrement immediate_size_expand.
790
791         PR c++/10503
792         * cp-tree.h (DECL_VAR_MARKED_P): New macro.
793         (DECL_MAYBE_TEMPLATE): Remove.
794         * class.c (fixed_type_or_null): Avoid infinite recursion.
795
796         * decl.c (maybe_commonize_var): Make the code match the comments.
797         * pt.c (instantiate_decl): Move call to import_export_decl.
798
799 2003-04-26  Mark Mitchell  <mark@codesourcery.com>
800
801         * decl2.c (finish_file): Fix merge botch.
802
803 2003-04-25  Mark Mitchell  <mark@codesourcery.com>
804
805         * decl2.c (finish_file): Don't call import_export_decl for
806         functions that are not defined.
807         (handle_class_head): Robustify.
808         * pt.c (instantiate_decl): Do not call cp_finish_decl for
809         variables that are not defined.
810
811 2003-04-24  Sylvain Pion  <Sylvain.Pion@mpi-sb.mpg.de>
812
813         * call.c (print_z_candidates): Fix off by one error.
814
815 2003-04-24  Nathan Sidwell  <nathan@codesourcery.com>
816
817         PR c++/10337
818         * call.c (joust): Don't warn about conversion ops that are exact
819         or cv-conversions. Rearrange to avoid multiple type comparisons.
820
821 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
822
823         PR c++/10471
824         * call.c (build_cxx_call): Robustify.
825
826 2003-04-23  Neil Booth  <neil@daikokuya.co.uk>
827
828         * Make-lang.in (lex.o): Remove mbchar.h.
829         * lex.c (MULTIBYTE_CHARS): Lose.
830         * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
831         in c-lex.c.
832
833 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
834
835         PR c++/9847
836         * cp-tree.h (duplicate_tag_error): Remove.
837         * class.c (duplicate_tag_error): Remove.
838         * semantics.c (begin_class_definition): Return immediately for a
839         duplicate class definition.
840
841         PR c++/10451
842         * decl.c (grokdeclarator): Correct logic for "mutable" errors.
843
844 2003-04-22  Mark Mitchell  <mark@codesourcery.com>
845
846         PR c++/10446
847         * search.c (lookup_fnfields_1): Handle empty slots in the method
848         vector.
849
850         PR c++/10428
851         * decl.c (check_elaborated_type_specifier): New function, split
852         out from ...
853         (xref_tag): ... here.  Use the new function in more places.
854
855         * rtti.c (throw_bad_typeid): Use build_cxx_call.
856
857 2003-04-21  Mark Mitchell  <mark@codesourcery.com>
858
859         * call.c (build_over_call): Use build_cxx_call.
860         (build_cxx_call): New method, split out of build_over_call.
861         * cp-tree.h (language_function): Add can_throw.
862         (build_cxx_call): Declare it.
863         * decl.c (finish_function): If a function does not contain any
864         calls to functions that can throw an exception, indicate that
865         fact.
866         * decl2.c (mark_used): Do not defer the instantiation of
867         functions, if the current function does not throw.
868         * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
869         * pt.c (instantiate_decl): Make sure import_export_decl is called
870         before emitting things.
871         * rtti.c (throw_bad_cast): Use build_cxx_call.
872         (build_dynamic_cast_1): Likewise.
873         * typeck.c (build_function_call): Likewise.
874
875 2003-04-21  Nathan Sidwell  <nathan@codesourcery.com>
876
877         PR c++/9881
878         * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
879         expressions. Reverts my 2002-08-08 patch.
880
881         * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
882         cheaper early exit.
883
884 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
885
886         * cp/decl2.c (start_static_storage_duration_function): Take count
887         arg, don't check if it wraps round.
888         (generate_ctor_or_dtor_function): Add locus arg, use it.
889         (generate_ctor_and_dtor_functions_for_priority): Data arg is a
890         locus.
891         (finish_file): Set line numbers to past EOF for synthesized
892         functions.
893
894 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
895
896         PR c++/10405
897         * search.c (lookup_field_1): Final scan goes backwards for
898         types, forwards for non-types.
899
900 2003-04-17  Roger Sayle  <roger@eyesopen.com>
901
902         PR c/10375
903         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
904         "nothrow" function attributes.
905
906 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
907
908         PR c++/10347
909         * pt.c (type_dependent_expression_p): Handle array new.
910
911 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
912
913         PR c++/10381
914         * parser.c (cp_parser_primary_expression): Reorganize logic for
915         dealing with name lookup failures.
916
917 2003-04-15  Jason Merrill  <jason@redhat.com>
918
919         * decl2.c (mark_used): Don't instantiate anything if
920         skip_evaluation.
921
922 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
923
924         * tree.c (build_cplus_array_type_1): Do not call
925         uses_template_parms() on a NULL index_type.
926
927 2003-04-13  Roger Sayle  <roger@eyesopen.com>
928
929         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
930
931 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
932
933         PR c++/10300
934         * init.c (build_new_1): Reorganize.
935
936 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
937
938         * class.c (initialize_array)
939         * decl.c (reshape_init)
940         * decl2.c (build_expr_from_tree)
941         * init.c (build_zero_init)
942         * pt.c (tsubst_copy, tsubst_copy_and_build)
943         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
944         (ptm_initializer, class_initializer, get_pseudo_ti_init)
945         * semantics.c (finish_compound_literal)
946         * typeck.c (build_ptrmemfunc1)
947         * typeck2.c (store_init_value, process_init_constructor)
948         (build_functional_cast): Use build_constructor.
949
950 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
951
952         * call.c (print_z_candidates): Use gcc_gettext_width, not
953         strlen, to determine how much padding to use.
954
955 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
956
957         * decl.c: Update all calls to shadow_warning.
958
959 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
960
961         * class.c (layout_class_type): Correct handling for overlong
962         bit-fields whose width is the same as an integer type.
963
964 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
965
966         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
967         * cp-lang.c (cp_tree_size): New function.
968         (LANG_HOOKS_TREE_SIZE): Override.
969
970         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
971         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
972         (union lang_tree_node): Remove common and srcloc members.
973         (build_srcloc_here): Don't prototype.
974         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
975         * pt.c (pending_templates): Correct comment.
976         * tree.c (build_srcloc, build_srcloc_here): Kill.
977
978 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
979
980         * call.c: Include intl.h.
981         (print_z_candidate): Always use inform; get rid of errfn
982         argument. Reorganize so that all the strings get picked up
983         by xgettext.  Note obligation of caller to pass first argument
984         through gettext.
985         (print_z_candidates): Update to match.  Indent second and
986         successive candidates by strlen() of translated message.
987         (joust): Restructure ambiguous-conversion pedwarn so that
988         translators see a complete sentence.  Update calls to
989         print_z_candidate.
990
991         * Make-lang.in (cp/call.o): Update dependencies.
992
993 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
994
995         * decl.c (set_current_binding_level): Delete, revert last change.
996         (current_binding_level): Modify to allow it as as lvalue.
997
998 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
999
1000         * name-lookup.c (find_binding): Pass appropriate pointer type to
1001         POP_TIMEVAR_AND_RETURN.
1002
1003 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1004
1005         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
1006         * cp-tree.h: Don't insist on having GNUC.
1007
1008 2003-04-03  Jason Merrill  <jason@redhat.com>
1009
1010         * cvt.c (ocp_convert): Only abort if we try to convert an object
1011         of TREE_ADDRESSABLE type.
1012
1013         * class.c (build_vtable): Set DECL_ALIGN here.
1014         (get_vtable_decl): Not here.
1015         (layout_vtable_decl): Or here.
1016         (create_vtable_ptr): Or here.
1017         (layout_class_type): Or here.
1018         (check_bitfield_decl): Don't mess with field alignment.
1019
1020 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1021
1022         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
1023         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
1024         * rtti.c (dfs_class_hint_mark): Likewise.
1025
1026         * decl.c (push_local_name, push_class_level_binding,
1027         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
1028         functions returning void.
1029         * decl2.c (add_using_namespace): Likewise.
1030
1031         * decl.c (print_binding_level, print_other_binding_stack,
1032         print_binding_stack): Cast argument of %p specifier to void*.
1033         * ptree.c (cxx_print_decl): Likewise.
1034
1035         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
1036         VAR_FUNCTION_OR_PARM_DECL_CHECK,
1037         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
1038         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
1039         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
1040
1041         * decl.c (set_current_binding_level): New macro.  Use throughout
1042         when setting the current binding level.
1043
1044         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
1045         in enum.
1046         * method.c (mangling_flags): Likewise.
1047
1048         * cp-tree.h (lang_type_header): Add __extension__ and use
1049         CHAR_BITFIELD for members.
1050
1051 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
1052
1053         PR other/9274
1054         * mangle.c: Include gt-cp-mangle.h.
1055         (subst_identifiers): Mark with GTY.
1056         * config-lang.in (gtfiles): Add cp/mangle.c.
1057         * Make-lang.in: (gt-cp-mangle.h): New rule.
1058         (cp/mangle.o): Depends on gt-cp-mangle.h.
1059
1060 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
1061
1062         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
1063         after \$(srcdir)/cp/name-lookup.h.
1064         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
1065         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
1066         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
1067         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
1068
1069 2003-03-31  Jason Merrill  <jason@redhat.com>
1070
1071         PR java/10145
1072         * class.c (check_field_decl): Don't set DECL_ALIGN.
1073
1074 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
1075
1076         PR c++/7647
1077         * decl.c (grokdeclarator): Tidy, slightly.
1078         * search.c (lookup_field_1): Add want_type parameter.
1079         (lookup_field_r): Adjust call to lookup_field_1.
1080
1081 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1082
1083         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
1084
1085 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
1086
1087         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
1088         prototype.
1089         (cxx_scope_find_binding_for_name): Likewise.
1090         * decl.c (find_binding: Move to name-lookup.c.
1091         (binding_for_name): Likewise.
1092         (cxx_scope_find_binding_for_name): Likewise.
1093         (BINDING_LEVEL):  Remove.
1094         (push_binding): Tidy.
1095         (push_class_binding): Likewise.
1096         (pop_binding): Likewise.
1097         (poplevel): Likewise.
1098         (poplevel_class): Likewise.
1099         (set_identifier_type_value_with_scope): Likewise.
1100         (push_overloaded_decl): Likewise.
1101         (lookup_tag): Likewise.
1102         (unqualified_namespace_lookup): Likewise.
1103         (lookup_name_current_level): Likewise.
1104         (maybe_inject_for_scope_var): Likewise.
1105         (namespace_binding): Move to name-lookup.c.
1106         (set_namespace_binding): Likewise.
1107         * decl2.c (lookup_using_namespace): Tidy.
1108         (qualified_lookup_using_namespace): Likewise.
1109         (do_toplevel_using_decl): Likewise.
1110         * name-lookup.c: Include "timevar.h"
1111         * name-lookup.h (cxx_scope):  Declare.
1112         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
1113         member declaration.
1114         (BINDING_SCOPE): Adjust definition.
1115         (BINDING_HAS_LEVEL_P): Remove.
1116
1117 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1118
1119         * name-lookup.c: New file.
1120         * name-lookup.h: Likewise..
1121         * decl.c (push_binding): Adjust use cxx_binding_make.
1122         (free_bindings): Move to name-lookup.c
1123         (pop_binding): Use cxx_binding_free.
1124         (binding_for_name): Tidy.
1125         * cp-tree.h: Include "name-lookup.h"
1126         (cxx_binding_make): Move to name-lookup.h
1127         (cxx_binding_clear): Likewise.
1128         (struct cxx_binding): Likewise.
1129         (LOCAL_BINDING_P): Likewise.
1130         (INHERITED_VALUE_BINDING_P): Likewise.
1131         (BINDING_SCOPE): Likewise.
1132         (BINDING_HAS_LEVEL_P): Likewise.
1133         (BINDING_VALUE): Likewise.
1134         (BINDING_TYPE): Likewise.
1135         * config-lang.in (gtfiles): Add cp/name-lookup.h
1136         * Make-lang.in (cp/name-lookup.o): New rule.
1137         (CXX_OBJS): Add cp/name-lookup.o
1138         (CXX_TREE_H): Add cp/name-lookup.h
1139
1140 2003-03-28  Jason Merrill  <jason@redhat.com>
1141
1142         PR c++/10245
1143         * cvt.c (force_rvalue): New fn.
1144         * call.c (build_conditional_expr): Use it.
1145         * cp-tree.h: Declare it.
1146
1147 2003-03-28  Mike Stump  <mrs@apple.com>
1148
1149         * error.c (dump_expr): Add 0x to printed hex numbers to make
1150         output match source code better.
1151
1152 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
1153
1154         PR c++/10218
1155         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
1156         definitions.
1157
1158         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
1159         non-existant ssdf_decls array.
1160         (finish_file): Call generator_ctor_or_dtor_function when there are
1161         static constructors or destructors and no other static
1162         initializations.
1163
1164 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
1165
1166         PR c++/10047
1167         * decl2.c (finish_file): Don't warn about explicitly instantiated
1168         inline decls.
1169
1170 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
1171
1172         PR c++/10224
1173         * pt.c (lookup_template_class): Only check instantiated args if
1174         they do not contain template parameters.
1175
1176 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
1177
1178         PR c++/10158
1179         * parser.c (cp_parser_function_definition): Set
1180         DECL_INITIALIZED_IN_CLASS for members.
1181         * pt.c (instantiate_decl): Only reduce the template args for
1182         friends that are not defined in class.
1183
1184 2003-03-25  Jason Merrill  <jason@redhat.com>
1185
1186         * call.c (print_z_candidate): Change name of first arg to msgid.
1187         (joust): Add comment for translators.
1188
1189 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
1190
1191         PR c++/9898, PR c++/383, DR 322
1192         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
1193         through reference types on both PARM and ARG.
1194
1195 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
1196
1197         PR c++/10119
1198         * error.c (dump_expr) <BASELINK>: Use dump_expr.
1199         * pt.c (maybe_fold_nontype_args): New function.
1200         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
1201         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
1202         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
1203         maybe_fold_nontype_args.
1204
1205 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
1206
1207         PR c++/10026
1208         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
1209
1210 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
1211
1212         PR c++/7086
1213         * typeck.c (cxx_mark_addressable):  Adjust call to
1214         gen_mem_addressof or put_var_into_stack.
1215
1216 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
1217
1218         PR c++/9978, c++/9708
1219         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
1220         * call.c (add_template_candidate_real): Adjust
1221         instantiate_template call.
1222         * class.c (resolve_address_of_overloaded_function): Likewise.
1223         * decl.c (build_enumerator): Set TREE_CONSTANT.
1224         * pt.c (check_instantiated_args): New.
1225         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
1226         TREE_READONLY.
1227         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
1228         (reduce_template_parm_level): Likewise.
1229         (process_template_parm): Likewise.
1230         (check_explicit_specialization): Adjust instantiate_template call.
1231         (convert_template_argument): Don't check non-type argument here.
1232         (lookup_template_class): Check them here.
1233         (tsubst_friend_function): Adjust instantiate_template call.
1234         (instantiate_template): Add tsubst_flags parameter, use it. Check
1235         instantiated args.
1236
1237 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
1238
1239         * decl.c: Update calls to shadow_warning.
1240
1241 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
1242
1243         PR c++/9898
1244         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
1245         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
1246
1247 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
1248
1249         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
1250         friends.
1251         * cp/pt.c (instantiate_class_template): Fix formatting.
1252
1253 2003-03-14  Matt Austern  <austern@apple.com>
1254
1255         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
1256         (unemitted_tinfo_decl_p): Remove.
1257         (emit_tinfo_decl): Change declaration to remove unused parameter.
1258         * decl2.c (finish_file): Change tinfo emission to loop through
1259         unemitted_tinfo_decls array instead of looping through all decls.
1260         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
1261         unused second parameter.
1262         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
1263         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
1264         (emit_tinfo_decl): remove unused second parameter, add assertion
1265         that decl hasn't already been emitted.
1266
1267 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
1268
1269         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
1270         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
1271         return statements.
1272
1273 2003-03-19  Jason Merrill  <jason@redhat.com>
1274
1275         PR c++/8316, c++/9315, c++/10136
1276         * call.c (print_z_candidate): Split out from...
1277         (print_z_candidiates): ...here.
1278         (joust): Use it.
1279
1280 2003-03-17  Roger Sayle  <roger@eyesopen.com>
1281
1282         PR c++/10031
1283         * decl.c (duplicate_decls): Use the new type when prototyping
1284         anticipated decls, even when the types match.  This defines the
1285         exception list for the built-in function.
1286
1287 2003-03-17  Jason Merrill  <jason@redhat.com>
1288
1289         PR c++/10091
1290         * typeck.c (build_class_member_access_expr): Compare
1291         TYPE_MAIN_VARIANTs.
1292
1293 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
1294
1295         PR c++/9639
1296         * parser.c (cp_parser_declarator_id): Clear parser->scope.
1297
1298 2003-03-16  Jason Merrill  <jason@redhat.com>
1299
1300         PR c++/9993
1301         * decl.c (finish_function): Only allow the NRVO to use variables
1302         declared at function scope.
1303
1304 2003-03-17  Andreas Jaeger  <aj@suse.de>
1305
1306         * Make-lang.in (cp/TAGS): Remove.
1307
1308 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
1309
1310         PR c++/9629
1311         * cp-tree.h (struct language_function): Add in_base_initializer.
1312         (in_base_initializer): define it.
1313         (expand_member_init): Remove INIT param.
1314         * init.c (expand_member_init): Remove INIT param, return the member.
1315         (emit_mem_initializers): Set in_base_initializer.
1316         * class.c (build_base_path): Check in_base_initializer.
1317         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
1318         * pt.c (tsubst_initializer_list): Likewise.
1319
1320 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
1321
1322         * decl.c (binding_for_name): Fix initialization thinko.
1323
1324 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
1325
1326         Compile-time improvement: 2/n.
1327         * cp-tree.h (struct cxx_binding): New datatype;
1328         (struct lang_identifier): Use it.
1329         (LOCAL_BINDING_P): Adjust definition.
1330         (INHERITED_VALUE_BINDING_P): Likewise.
1331         (BINDING_SCOPE): Likewise.
1332         (BINDING_HAS_LEVEL_P): Likewise.
1333         (BINDING_VALUE): Likewise.
1334         (BINDING_TYPE): Likewise.
1335         (IDENTIFIER_VALUE): Likewise.
1336         (struct tree_binding): Remove.
1337         (TS_CP_BINDING): Likewise.
1338         ((union lang_tree_node): Remove field "binding".
1339         (cxx_binding_clear): New macro.
1340         (binding_for_name): Adjust return type.
1341         (qualified_lookup_using_namespace): Adjust prototype.
1342         (lookup_using_namespace): Adjust prototype.
1343         (cxx_scope_find_binding_for_name): Declare.
1344         * cp-tree.def: Remove CPLUS_BINDING definition.
1345         * decl.c (push_binding): Adjust local variable type.
1346         (add_binding): Likewise.
1347         (push_class_binding): Likewise.
1348         (pop_binding): Likewise.
1349         (poplevel): Likewise.
1350         (poplevel_class): Likewise.
1351         (free_bindings):  Adjust type.
1352         (find_binding): Adjust return type, add a third parameter. Remove
1353         non-useful assertion now that we use static typing.
1354         (cxx_scope_find_binding_for_name): New function.
1355         (binding_for_name): Use it.  Adjust local variable type. Simplify.
1356         (namespace_binding):  Simplify.
1357         (set_namespace_binding): Likewise.
1358         (set_identifier_type_value_with_scope): Adjust local variable type.
1359         (lookup_tag): Don't type-abuse of local variable 'old'.
1360         (lookup_namespace_name): Likewise.  Allocate binding on stack.
1361         (select_decl): Adjust prototype.
1362         (unqualified_namespace_lookup):  Allocate binding on stack.
1363         Don't type-abuse of local variable 'val'.
1364         (lookup_name_real): Likewise.
1365         (maybe_inject_for_scope_var): Adjust local variable type.
1366         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
1367         (namespace_binding): Adjust logic, simplify.
1368         (BINDING_LEVEL): Adjust definition.
1369         (push_class_level_binding): Adjust local variable type.
1370         (struct cxx_saved_binding): Adjust field 'binding' type.
1371         * decl2.c (ambiguous_decl): Adjust prototype.
1372         (lookup_using_namespace): Adjust local variable type.
1373         (qualified_lookup_using_namespace): Catch type error and correct
1374         ensueing logic error.
1375         (do_nonmember_using_decl): Adjust local variable type.  Allocate
1376         temporary cxx_binding on stack.
1377         (do_toplevel_using_decl): Adjust local variable type.
1378         * ptree.c (cxx_print_cxx_binding): New function.
1379         (cxx_print_identifier): Use it.
1380         (cxx_print_xnode): Delete CPLUS_BINDING case label.
1381
1382 2003-03-15  Roger Sayle  <roger@eyesopen.com>
1383
1384         * tree.c (count_functions): Fix whitespace.
1385
1386 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
1387
1388         * Make-lang.in: Update.
1389
1390 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1391
1392         PR c++/6440
1393         * pt.c (maybe_process_partial_specialization): Handle
1394         member class template when enclosing class template is
1395         explicit specialized.
1396         (most_general_template): Stop looking when DECL is already
1397         specialized.
1398
1399 2003-03-13  Jason Merrill  <jason@redhat.com>
1400
1401         PR c++/9420
1402         * search.c (lookup_conversions): Call complete_type here.
1403         * call.c (implicit_conversion): Not here.
1404
1405 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
1406
1407         * decl2.c (do_nonmember_using_decl): Correct handling of
1408         simultaneous type/non-type bindings.
1409
1410         * call.c (initialize_reference): Remove bogus assertion.
1411         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
1412
1413 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
1414
1415         PR c++/7050
1416         * expr.c (cxx_expand_expr): Return const0_rtx for throw
1417         expressions.
1418
1419 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
1420
1421         PR c++/9474
1422         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
1423         to merge old and new declarations.
1424
1425 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
1426
1427         * g++.1: Remove.
1428         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
1429         (cp/g++.1): Build it from scratch in the build tree.
1430         (c++.install-man): Depend on it.  Install it from the build tree.
1431         (c++.mostlyclean): Clean it.
1432
1433 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
1434
1435         PR c++/9474
1436         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
1437         to merge old and new declarations.
1438
1439         PR c++/9924
1440         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
1441
1442 2003-03-11  Jason Merrill  <jason@redhat.com>
1443
1444         PR c++/9820
1445         * search.c (lookup_member): Fix handling of functions in a class
1446         being defined.
1447
1448 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
1449
1450         PR c++/8700
1451         * call.c (convert_class_to_reference): Adjust usage of
1452         splice_viable.
1453         (any_viable): Remove.
1454         (splice_viable): Combine with any_viable.
1455         (print_z_candidates): Avoid printing duplicates.
1456         (build_user_type_conversion_1): Adjust usage of splice_viable.
1457         (build_new_function_call): Likewise.
1458         (build_operator_new_call): Likewise.
1459         (build_object_call): Likewise.
1460         (build_conditional_expr): Likewise.
1461         (build_new_op): Likewise.
1462         (build_new_method_call): Likewise.
1463         (joust): Remove spurious comment.
1464         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
1465         * decl2.c (arg_assoc_class): Simplify.
1466         * friend.c (add_friend): Likewise.
1467
1468 2003-03-11  Jason Merrill  <jason@redhat.com>
1469
1470         PR c++/8660
1471         * decl2.c (check_classfn): A member template only matches a
1472         member template.
1473
1474 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
1475
1476         * Make-lang.in (CXX_C_OBJS): Update.
1477         * lang-specs.h: Don't define __GNUG__ here.
1478
1479 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
1480
1481         * call.c (perform_overload_resolution): New function.
1482         (build_new_function_call): Use it.
1483         (build_operator_new_call): Likewise.
1484         (add_candidates): Add explicit_targs and template_only parameters.
1485         (build_new_op): Adjust accordingly.
1486         * cp-tree.h (build_operator_new_call): New function.
1487         (build_function_call_real): Remove.
1488         (build_function_call_maybe): Likewise.
1489         * init.c (build_new_1): Use build_operator_new_call.
1490         * typeck.c (build_function_call_real): Rename to ...
1491         (build_function_call): ... this.
1492
1493 2003-03-10  Devang Patel  <dpatel@apple.com>
1494
1495         PR c++/9394
1496         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
1497
1498 2003-03-10  Jason Merrill  <jason@redhat.com>
1499
1500         PR c++/9798
1501         * decl.c (push_using_directive): Push before recursing.
1502
1503         PR c++/9868, c++/9524
1504         * call.c (resolve_scoped_fn_name): Handle the case of a function
1505         pointer member.
1506
1507         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
1508         argument in the pointer-to-member case.
1509
1510 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
1511
1512         PR c++/9373
1513         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
1514         pointers to member functions.
1515
1516         PR c++/8534
1517         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
1518         in pointer-to-member-function types.
1519
1520 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1521
1522         * expr.c (cplus_expand_constant): Use C90 prototype style.
1523         (cxx_expand_expr): Likewise.
1524
1525 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1526
1527         PR c++/9970
1528         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
1529         functions.
1530
1531 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
1532
1533         * lang-specs.h (c++-header): Change .pch to .gch.
1534
1535 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
1536
1537         * cp-tree.h (cxx_init): Update prototype.
1538         * lex.c (cxx_init): Similarly.
1539
1540 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
1541
1542         PR c++/9823
1543         * cp-tree.h (begin_mem_initializers): Remove.
1544         * parser.c (cp_parser_mem_initializer_list): Inline it here.
1545         Do not call finish_mem_initializers if not in a constructor.
1546         (cp_parser_class_head): Fix typo in error message.
1547         * semantics.c (begin_mem_initializers): Remove.
1548         * testsuite/g++.dg/parser/constructor1.C: New test.
1549
1550         PR c++/9809
1551         * call.c (add_function_candidate): Skip builtin fuctions that have
1552         not yet been declared.
1553
1554         PR c++/9982
1555         * init.c (build_new_1): Correct logic for determining whether or
1556         not to use an array cookie.
1557
1558         PR c++/9524
1559         * parser.c (cp_parser_postfix_expression): Call
1560         finish_non_static_data_member, even when processing_template_decl.
1561
1562         PR c++/9912
1563         * cp-tree.h (is_ancestor): New function.
1564         (handle_class_head): Change prototype.
1565         * decl2.c (is_namespace_ancestor): Rename to ...
1566         (namespace_anecestor): ... this.
1567         (set_decl_namespace): Adjust accordingly.
1568         (handle_class_head): Remove unncessary parameters.
1569         * parser.c (cp_parser_class_head): Check that
1570         nested-name-specifiers are used appropriately.
1571
1572 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
1573
1574         * call.c (reference_binding): Remove REF_IS_VAR parameter.
1575         (implicit_conversion): Adjust call to reference_binding.
1576         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
1577         (initialize_reference): Adjust handling for references bound to
1578         rvalues.
1579         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
1580         prototype.
1581         (real_non_cast_lvalue_p): New method.
1582         * cvt.c (build_up_reference): Adjust use of
1583         make_temporary_var_for_ref_to_temp.
1584         * tree.c (real_non_cast_lvalue_p): New method.
1585
1586 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1587
1588         * except.c (init_exception_processing): Use C90 prototype style.
1589         (cp_protect_cleanup_actions): Likewise.
1590         (prepare_eh_type): Likewise.
1591         (build_eh_type_type): Likewise.
1592         (build_exc_ptr): Likewise.
1593         (do_begin_catch): Likewise.
1594         (dtor_nothrow): Likewise.
1595         (do_end_catch): Likewise.
1596         (push_eh_cleanup): Likewise.
1597         (decl_is_java_type): Likewise.
1598         (choose_personality_routine): Likewise.
1599         (initialize_handler_parm): Likewise.
1600         (expand_start_catch_block): Likewise.
1601         (expand_end_catch_block): Likewise.
1602         (begin_eh_spec_block): Likewise.
1603         (finish_eh_spec_block): Likewise.
1604         (do_allocate_exception): Likewise.
1605         (do_free_exception): Likewise.
1606         (wrap_cleanups_r): Likewise.
1607         (stabilize_throw_expr): Likewise.
1608         (build_throw): Likewise.
1609         (complete_ptr_ref_or_void_ptr_p): Likewise.
1610         (is_admissible_throw_operand): Likewise.
1611         (nothrow_libfn_p): Likewise.
1612         (can_convert_eh): Likewise.
1613         (check_handlers_1): Likewise.
1614         (check_handlers): Likewise.
1615
1616 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
1617
1618         * call.c (merge_conversion_sequences): New function.
1619         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
1620         (convert_class_to_reference): Correct handling of second
1621         standard conversion sequence in a user-defined conversion
1622         sequence.
1623         (build_user_type_conversion_1): Use merge_conversion_sequences.
1624         * cp-tree.def: Add comments for CONV nodes.
1625         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
1626
1627 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1628
1629         * error.c (init_error): Use C90 prototype style.
1630         (dump_scope): Likewise.
1631         (dump_qualifiers): Likewise.
1632         (dump_template_argument): Likewise.
1633         (dump_template_argument_list): Likewise.
1634         (dump_template_parameter): Likewise.
1635         (dump_template_bindings): Likewise.
1636         (dump_type): Likewise.
1637         (dump_typename): Likewise.
1638         (class_key_or_enum): Likewise.
1639         (dump_aggr_type): Likewise.
1640         (dump_type_prefix): Likewise.
1641         (dump_type_suffix): Likewise.
1642         (dump_global_iord): Likewise.
1643         (dump_simple_decl): Likewise.
1644         (dump_decl): Likewise.
1645         (dump_template_decl): Likewise.
1646         (dump_function_decl): Likewise.
1647         (dump_parameters): Likewise.
1648         (dump_exception_spec): Likewise.
1649         (dump_function_name): Likewise.
1650         (dump_template_parms): Likewise.
1651         (dump_char): Likewise.
1652         (dump_expr_list): Likewise.
1653         (dump_expr): Likewise.
1654         (dump_binary_op): Likewise.
1655         (dump_unary_op): Likewise.
1656         (type_as_string): Likewise.
1657         (expr_as_string): Likewise.
1658         (decl_as_string): Likewise.
1659         (context_as_string): Likewise.
1660         (lang_decl_name): Likewise.
1661         (cp_file_of): Likewise.
1662         (cp_line_of): Likewise.
1663         (decl_to_string): Likewise.
1664         (expr_to_string): Likewise.
1665         (fndecl_to_string): Likewise.
1666         (code_to_string): Likewise.
1667         (language_to_string): Likewise.
1668         (parm_to_string): Likewise.
1669         (op_to_string): Likewise.
1670         (type_to_string): Likewise.
1671         (assop_to_string): Likewise.
1672         (args_to_string): Likewise.
1673         (cv_to_string): Likewise.
1674         (cxx_print_error_function): Likewise.
1675         (cp_diagnostic_starter): Likewise.
1676         (cp_diagnostic_finalizer): Likewise.
1677         (cp_print_error_function): Likewise.
1678         (function_category): Likewise.
1679         (print_instantiation_full_context): Likewise.
1680         (print_instantiation_partial_context): Likewise.
1681         (maybe_print_instantiation_context): Likewise.
1682         (print_instantiation_context): Likewise.
1683         (cp_printer): Likewise.
1684         (print_integer): Likewise.
1685         (print_non_consecutive_character): Likewise.
1686         (locate_error): Likewise.
1687
1688 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
1689
1690         PR c++/9965
1691         * call.c (reference_binding): Add ref_is_var parameter.
1692         (implicit_conversion): Adjust call to reference_binding.
1693         (initialize_reference): Likewise.
1694
1695         PR c++/9400
1696         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
1697         PARM_DECLs.
1698
1699         PR c++/9791
1700         * class.c (get_basefndecls): Use lookup_fnfields_1.
1701
1702 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1703
1704         PR c++/9188
1705         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
1706         in error message.
1707         (cp_parser_single_declaration): Likewise.
1708
1709 2003-03-05  Jason Merrill  <jason@redhat.com>
1710
1711         PR c++/9440
1712         * call.c (build_conditional_expr): Use convert rather than an
1713         explicit NOP_EXPR.
1714
1715 2003-03-02  Matt Austern  <austern@apple.com>
1716
1717         * decl.c (cp_binding_level): Add static_decls varray member.
1718         (add_decl_to_level): Add static/inline namespace scope
1719         declarations to static_decls array.
1720         (wrapup_global_for_namespace): Pass static_decls only, instead of
1721         all decls, to wrapup_global_declarations/check_global_declarations.
1722         (push_namespace): Initialize static_decls for ordinary namespaces.
1723         (cxx_init_decl_processing): Initialize static_decls for global
1724         namespace.
1725
1726 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
1727
1728         * class.c (end_of_class): Correct thinko.
1729
1730 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
1731
1732         * config-lang.in: Replace ${libstdcxx_version} by its value.
1733
1734 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
1735
1736         * cp-tree.h (cxx_saved_binding): Declare.
1737         (struct saved_scope): Adjust type of field 'old_binding'.
1738         * decl.c (cxx_saved_binding_make): New macro.
1739         (struct cxx_saved_binding): Define.
1740         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
1741         C++ bindings.
1742         (maybe_push_to_top_level): Adjust local variable type.
1743         (pop_from_top_level): Likewise.
1744
1745 2003-03-04  Tom Tromey  <tromey@redhat.com>
1746
1747         * Make-lang.in (c++.tags): New target.
1748
1749 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
1750
1751         * Make-lang.in: Update.
1752
1753 2003-03-03  Jason Merrill  <jason@redhat.com>
1754
1755         * decl.c (finish_enum): Do set the type in a template. Simplify.
1756         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
1757
1758 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
1759
1760         PR c++/9878
1761         * call.c (convert_class_to_reference): Correct conversion
1762         sequences.
1763         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
1764         (implicit_conversion): Adjust call to reference_binding.
1765         (add_candidate): Change type of candidates parameter.
1766         (add_function_candidate): Likewise.
1767         (add_conv_candidate): Likewise.
1768         (build_builtin_candidate): Likewise.
1769         (add_builtin_candidate): Likewise.
1770         (add_builtin_candidates): Likewise.
1771         (add_template_candidate_real): Likewise.
1772         (add_template_candidate): Likewise.
1773         (add_template_conv_candidate): Likewise.
1774         (build_user_type_conversion_1): Adjust accordingly.
1775         (build_object_call): Likewise.
1776         (build_conditional_expr): Likewise.
1777         (add_candidates): Likewise.
1778         (build_new_op): Likewise.
1779         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
1780         (build_new_method_call): Adjust calls to add_function_candidate.
1781         (make_temporary_var_for_ref_to_temp): New function.
1782         (initialize_reference): Add decl parameter.
1783         * class.c (build_rtti_vtbl_entries): Use build_address and
1784         build_nop.
1785         * cp-tree.h (initialize_reference): Change prototype.
1786         (make_temporary_var_for_ref_to_temp): New function.
1787         (build_type_conversion): Change prototype.
1788         (build_address): New function.
1789         (build_nop): Likewise.
1790         * cvt.c (cp_convert_to_pointer): Adjust call to
1791         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
1792         Use build_nop.
1793         (convert_to_pointer_force): Use build_nop.
1794         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
1795         (convert_to_reference): Adjust call to build_type_conversion.
1796         (ocp_convert): Likewise.
1797         (build_type_conversion): Remove for_sure parameter.
1798         * decl.c (grok_reference_init): Use initialize_reference.
1799         * typeck.c (build_address): New function.
1800         (build_nop): Likewise.
1801         (build_unary_op): Use them.
1802         (build_ptrmemfunc): Tidy slightly.
1803         (convert_for_initialization): Adjust call to
1804         initialize_reference.
1805         * typeck2.c (store_init_value): Remove #if 0'd code.
1806
1807 2003-03-03  Jason Merrill  <jason@redhat.com>
1808
1809         * decl.c (start_function): Clear DECL_NUM_STMTS.
1810
1811         * class.c (get_vtable_decl): Use vtbl_type_node.
1812         (build_primary_vtable): Check for it.
1813
1814 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
1815
1816         * decl.c (check_initializer): Check for vector_opaque_p.
1817
1818 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
1819
1820         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
1821           invoke an external cpp during compilation.
1822
1823 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1824
1825         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
1826         that of warning().
1827         (start_decl): Likewise.
1828         (start_function): Likewise.
1829
1830 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
1831
1832         * Make-lang.in (CXX_C_OBJS): Update.
1833
1834 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
1835
1836         PR c++/9892
1837         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
1838         instantiating it.
1839
1840 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
1841
1842         * parser.c (cp_parser_init_declarator): Revert opaque
1843         vector_opaque_p change.
1844         Do not include target.h.
1845
1846 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
1847
1848         PR c++/9879
1849         * cp-tree.h (build_zero_init): Add parameter.
1850         * decl.c (cp_finish_decl): Adjust call.
1851         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
1852         calls.
1853         (build_default_init): Add nelts parameter.  Adjust calls to
1854         build_zero_init.
1855         (build_new_1): Adjust call to build_default_init.
1856         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
1857
1858 2003-02-26  Devang Patel  <dpatel@apple.com>
1859
1860         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
1861         required.  Postpone enum setting for template decls.
1862         (build_enumerator): Delay copying value node until finish_enum
1863         (). Remove #if 0'ed code.
1864         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
1865         (tsubst_copy): Add check for enum type.
1866
1867 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
1868
1869         PR c++/9683
1870         * decl2.c (prune_vars_needing_no_initialization): Do not throw
1871         away initializations for DECL_EXTERNAL VAR_DECLs.
1872         (finish_file): Adjust accordingly.
1873         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
1874
1875 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
1876
1877         * decl.c (add_binding): Time TV_NAME_LOOKUP.
1878         (push_class_binding): Likewise.
1879         (set_namespace_binding): Likewise.
1880
1881 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
1882
1883         PR c++/9836
1884         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
1885         specializations back to the main template.
1886         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
1887         * pt.c (resolve_typename_type): Likewise.
1888
1889 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
1890
1891         PR c++/9778
1892         * pt.c (tsubst_copy_and_build): For a templated function inside a
1893         scope, process template arguments.
1894
1895 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1896
1897         PR c++/9602
1898         * typeck2.c (abstract_virtuals_error): Don't check when
1899         TYPE is still template parameter dependent.
1900
1901 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
1902
1903         PR c++/5333
1904         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
1905         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
1906         * pt.c (instantiate_class_template): Don't try to instantiate
1907         dependent types.
1908         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
1909
1910 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
1911
1912         PR c++/9749
1913         * decl.c (grokdeclarator): Do not allow parameters with variably
1914         modified types.
1915
1916 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
1917
1918         * search.c (grow_bfs_bases): Remove. Fold into ...
1919         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
1920         in previous patch.
1921
1922 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
1923
1924         PR c++/9729
1925         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
1926         when the G++ 3.2 ABI prevents correct compilation.
1927
1928 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
1929
1930         Change base class access representation. Share virtual base
1931         binfos.
1932         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
1933         call.
1934         * cp/class.c (build_base_path): Likewise.
1935         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
1936         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
1937         (make_new_vtable): Adjust.
1938         (force_canonical_binfo_r): Delete.
1939         (force_canonical_binfo): Delete.
1940         (mark_primary_virtual_base): Delete.
1941         (dfs_unshared_virtual_bases): Delete.
1942         (mark_primary_bases): Adjust.
1943         (maybe_warn_about_overly_private_class): Adjust.
1944         (dfs_base_derived_from): Delete.
1945         (base_derived_from): Follow the inheritance chain.
1946         (struct find_final_overrider_data): Add vpath member.
1947         (dfs_find_final_overrider): Adjust.
1948         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
1949         (find_final_overrider): Adjust.
1950         (update_vtable_entry_for_fn): Adjust.
1951         (modify_all_vtables): Adjust.
1952         (walk_subobject_offsets): Adjust.
1953         (layout_nonempty_base_or_field): Adjust.
1954         (layout_empty_base): Remove last parameter. Adjust.
1955         (build_base_field): Adjust.
1956         (build_base_fields): Adjust.
1957         (propagate_binfo_offsets): Remove last parameter. Adjust.
1958         (dfs_set_offset_for_unshared_vbases): Delete.
1959         (layout_virtual_bases): Adjust.
1960         (finish_struct_1): Adjust.
1961         (init_class_processing): Don't init access nodes.
1962         (dfs_get_primary_binfo): Delete.
1963         (get_primary_binfo): Adjust.
1964         (dump_class_hierarchy_r): Remove most derived arg, add IGO
1965         parameter. Adjust.
1966         (dump_class_hierarchy): Adjust.
1967         (finish_vtbls): Adjust.
1968         (get_original_base): Delete.
1969         (build_vtt_inits): Adjust.
1970         (dfs_build_secondary_vptr_vtt_inits): Adjust.
1971         (dfs_ctor_vtable_bases_queue_p): Adjust.
1972         (build_ctor_vtbl_group): Adjust.
1973         (dfs_accumulate_vtbl_inits): Adjust.
1974         (build_vtbl_initializer): Adjust.
1975         (build_vbase_offset_vtbl_entries): Adjust.
1976         (add_vcall_offset_vtbl_entries_1): Adjust.
1977         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
1978         (access_*_node): Remove.
1979         (CANONICAL_BINFO): Delete.
1980         (BINFO_UNSHARED_MARKED): Remove.
1981         (BINFO_MARKED): Set LANG_FLAG_0 directly.
1982         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
1983         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
1984         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
1985         Delete.
1986         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
1987         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
1988         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
1989         Delete.
1990         (BINFO_DEPENDENT_BASE_P): New.
1991         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
1992         index.
1993         (markedp, unmarkedp): Adjust.
1994         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
1995         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
1996         find_vbase_instance, binfo_for_vbase): Delete.
1997         (copied_binfo, original_binfo): Declare.
1998         (finish_base_specifier): Add virtual_p arg.
1999         (unshare_base_binfos): Delete.
2000         (copy_base_binfos): Declare.
2001         (reverse_path): Delete.
2002         * cp/decl.c (xref_basetypes): Access and virtuality passed
2003         differently. Don't copy direct base binfos here. Call
2004         copy_base_binfos.
2005         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
2006         (initialize_vtbl_ptrs): Adjust.
2007         (expand_member_init): Adjust.
2008         * cp/parser.c (cp_parser_base_specifier): Adjust.
2009         * cp/pt.c (instantiate_class_template): Adjust.
2010         (get_template_base_recursive): Adjust.
2011         * cp/rtti.c (get_pseudo_ti_init): Adjust.
2012         (get_pseudo_ti_desc): Adjust.
2013         * cp/tree.c (unshare_base_binfos): Rename to ...
2014         (copy_base_binfos): ... here, reimplement.
2015         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
2016         (reverse_path): Remove.
2017         * cp/typeck.c (get_delta_difference): Adjust error messages.
2018         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
2019         * cp/search.c (lookup_base_r): Adjust.
2020         (dynamic_cast_base_recurse): Adjust.
2021         (canonical_binfo): Remove.
2022         (dfs_canonical_queue): Remove.
2023         (dfs_assert_unmarked_p): Remove.
2024         (assert_canonical_unmarked): Remove.
2025         (shared_marked_p, shared_unmarked_p): Remove.
2026         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
2027         (dfs_access_in_type): Adjust.
2028         (access_in_type): Adjust.
2029         (dfs_accessible_queue_p): Adjust.
2030         (dfs_accessible_p): Adjust.
2031         (is_subobject_of_p_1, is_subobject_of_p): Remove.
2032         (struct lookup_field_info): Remove from_dep_base_p field.
2033         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
2034         (lookup_field_r): Remove dependent base code.
2035         (lookup_member): Likewise.
2036         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
2037         (dfs_unmarked_real_bases_queue_p): Remove.
2038         (dfs_marked_real_bases_queue_p): Remove.
2039         (dfs_skip_vbases): Remove.
2040         (dfs_get_pure_virtuals): Adjust.
2041         (markedp, unmarkedp): Adjust.
2042         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
2043         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
2044         (dfs_unmark): Adjust.
2045         (dfs_get_vbase_types):Remove.
2046         (dfs_build_inheritance_graph_order): Remove.
2047         (get_vbase_types): Remove
2048         (dfs_find_vbase_instance): Remove.
2049         (find_vbase_instance): Remove.
2050         (dfs_debug_unmarkedp): Adjust.
2051         (dependent_base_p): Remove.
2052         (dfs_push_type_decls): Adjust.
2053         (dfs_push_decls): Adjust.
2054         (dfs_no_overlap_yet): Adjust.
2055         (copied_binfo): New function.
2056         (original_binfo): New function.
2057         (binfo_for_vbase): Remove.
2058
2059 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
2060
2061         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
2062         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
2063         vectors, for speed.
2064
2065 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
2066
2067         PR c++/9704
2068         * class.c (layout_class_type): In the 3.2 ABI, take into account
2069         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
2070
2071 2003-02-18  Matt Austern <austern@apple.com>
2072
2073         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
2074         nothing for C++.
2075         * cp/decl.c (wrapup_globals_for_namespace): Remove special
2076         handling of global namespace.
2077
2078 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
2079
2080         * cp-tree.h (rid_to_yy): Delete.
2081         (C_RID_YYCODE): Delete.
2082         (finish_file): Delete redundant declaration.
2083
2084 2003-02-18  Jason Merrill  <jason@redhat.com>
2085
2086         PR c++/9623
2087         * decl.c (reshape_init): Don't mess with initializer labels.
2088
2089         PR c++/9485
2090         * parser.c (cp_parser_postfix_expression): Set idk properly for
2091         object->scope::member.
2092
2093 2003-02-18  Ben Elliston  <bje@redhat.com>
2094
2095         PR other/7350
2096         * decl.c (duplicate_decls): Fix typo in comment.
2097
2098 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
2099
2100         PR debug/9717
2101         * class.c (build_base_field): Mark fields for base classes with
2102         DECL_IGNORED_P.
2103
2104 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2105
2106         PR c++/9457
2107         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
2108         CONSTRUCTOR_ELTS only once.
2109
2110 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2111
2112         PR c++/9459
2113         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
2114         (dump_type_suffix): Likewise.
2115
2116 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
2117
2118         * search.c: ANSIfy function declarations and definitions.
2119         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
2120         * call.c (build_method_call, resolve_scoped_fn_name,
2121         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
2122         calls.
2123         * class.c (handle_using_decl): Likewise.
2124         * decl.c (make_typename_type, make_unmound_class_template,
2125         start_decl, compute_array_index_type): Likewise.
2126         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
2127         * init.c (expand_member_init, build_member_call): Likewise.
2128         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
2129         resolve_typename_type): Likewise.
2130         * typeck.c (lookup_destructor, finish_class_member_access_exprm
2131         build_prememfunc_access_expr): Likewise.
2132
2133 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
2134
2135         * decl2.c: Include "timevar.h".
2136         (namespace_ancestor): Time name lookup.
2137         (add_using_namespace): Likewise.
2138         (lookup_using_namespace): Likewise.
2139         (qualified_lookup_using_namespace): Likewise.
2140         (decl_namespace): Likewise.
2141         (lookup_arg_dependent): Likewise.
2142         * lex.c (do_identifier): Likewise.
2143         (do_scoped_id): Likewise.
2144         * pt.c (lookup_template_class): Likewise.
2145
2146 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
2147
2148         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
2149
2150 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2151
2152         * decl.c: Include "timevar.h".
2153         (poplevel): Time name lookup.
2154         (find_binding): Likewise.
2155         (push_namespace): Likewise.
2156         (pop_nested_namespace): Likewise.
2157         (store_bindings): Likewise.
2158         (maybe_push_to_top_level): Likewise.
2159         (pop_from_top_level): Likewise.
2160         (push_local_name): Likewise.
2161         (pushtag): Likewise.
2162         (pushdecl): Likewise.
2163         (pushdecl_with_scope): Likewise.
2164         (pushdecl_namespace_level): Likewise.
2165         (pushdecl_top_level): Likewise.
2166         (pushdecl_class_level): Likewise.
2167         (push_class_level_binding): Likewise.
2168         (push_using_decl): Likewise.
2169         (push_using_directive): Likewise.
2170         (push_overloaded_decl): Likewise.
2171         (lookup_label): Likewise.
2172         (define_label): Likewise.
2173         (lookup_tag): Likewise.
2174         (lookup_tag_reverse): Likewise.
2175         (lookup_namespace_name): Likewise.
2176         (select_decl): Likewise.
2177         (unqualified_namespace_lookup): Likewise.
2178         (lookup_name_real): Likewise.
2179         (lookup_name_current_level): Likewise.
2180         (lookup_type_current_level): Likewise.
2181         (maybe_inject_for_scope_var): Likewise.
2182         (xref_tag): Likewise.
2183
2184         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
2185
2186 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
2187
2188         * decl.c (build_enumerator):  Remove unneeded test.
2189
2190 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
2191
2192         * cp-tree.h (struct lang_type_header): Make all fields unsigned
2193         char.
2194
2195 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
2196
2197         PR c++/7129
2198         * call.c (z_candidate): Add args.
2199         (convert_class_to_reference): Set it.
2200         (implicit_conversion): Tidy.
2201         (add_candidate): Add args parameter.
2202         (add_function_candidate): Adjust call to add_candidate.
2203         (add_conv_candidate): Likewise.
2204         (build_builtin_candidate): Likewise.
2205         (build_user_type_conversion_1): Eliminate wasteful tree_cons
2206         usage.
2207         (build_new_function_call): Likewise.
2208         (build_object_call): Likewise.
2209         (add_candidates): New function.
2210         (build_new_op): Use it.
2211         (covert_like_real): Adjust call to build_over_call.
2212         (build_over_call): Remove args parameter.
2213         * operators.def: Add <?= and >?=.
2214
2215 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
2216
2217         * typeck.c (build_indirect_ref): Don't check flag_volatile.
2218
2219 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2220
2221         PR c++/8849
2222         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
2223
2224 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
2225
2226         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
2227         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
2228         (BINFO_LANG_ELTS): New #define.
2229         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
2230
2231 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
2232
2233         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
2234
2235 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
2236
2237         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
2238         for class types.
2239         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
2240         rather than TYPE_LANG_FLAG_0.
2241         (TYPE_BUILT_IN): Remove.
2242         (TYPE_DEPENDENT_P): New macro.
2243         (TYPE_DEPENDENT_P_VALID): Likewise.
2244         (lang_type_class): Add fields_readonly.
2245         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
2246         * pt.c (dependent_type_p_r): New function, split out from ...
2247         (dependent_type_p): ... here.  Memoize results.
2248         * search.c (dependent_base_p): Use dependent_type_p, not
2249         uses_template_parms.
2250         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
2251         for class types.
2252
2253 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
2254
2255         * call.c (build_field_call): Use build_new_op, not build_opfncall.
2256         (prep_operand): New function.
2257         (build_new_op): Use it.  Remove dead code.
2258         * class.c (pushclass): Change "modify" parameter type from int to
2259         bool.
2260         (currently_open_class): Use same_type_p, not pointer equality.
2261         (push_nested_class): Adjust calls to pushclass, remove modify
2262         parameter.
2263         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
2264         (pushclass): Change prototype.
2265         (push_nested_class): Likewise.
2266         (grokoptypename): Remove.
2267         (build_opfncall): Remove.
2268         (value_dependent_expression_p): Declare.
2269         (resolve_typename_type): Likewise.
2270         (resolve_typename_type_in_current_instantiation): Likewise.
2271         (enter_scope_of): Remove.
2272         (tsubst): Remove.
2273         (tsubst_expr): Likewise.
2274         (tsubst_copy): Likewise.
2275         (tsubst_copy_and_build): Likewise.
2276         * decl.c (warn_about_implicit_typename_lookup): Remove.
2277         (finish_case_label): Return error_mark_node for erroneous labels.
2278         (start_decl): Adjust calls to push_nested_class.
2279         (grokfndecl): Call push_scope/pop_scope around call to
2280         duplicate_decls.
2281         (grokdeclarator): Do not call tsubst.
2282         (start_function): Adjust calls to push_nested_class.
2283         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
2284         (check_classfn): Use push_scope/pop_scope around type comparisions.
2285         (grokoptypename): Remove.
2286         (push_sscope): Adjust call to push_nested_class.
2287         * error.c (dump_type): Show cv-qualification of typename types.
2288         * init.c (build_member_call): Use build_new_op, not
2289         build_opfncall.
2290         * method.c (build_opfncall): Remove.
2291         * parser.c (cp_parser): Add allow_non_constant_expression_p and
2292         non_constant_expression_p.
2293         (cp_parser_constant_expression): Adjust prototype.
2294         (cp_parser_resolve_typename_type): Remove.
2295         (cp_parser_non_constant_expression): New function.
2296         (cp_parser_non_constant_id_expression): Likewise.
2297         (cp_parser_new): Set allow_non_constant_expression_p and
2298         non_constant_expression_p.
2299         (cp_parser_primary_expression): Reject `this' and `va_arg' in
2300         constant-expressions.  Note that dependent names aren't really
2301         constant.
2302         (cp_parser_postfix_expression): Reject conversions to non-integral
2303         types in constant-expressions.  Neither are increments or
2304         decrements.
2305         (cp_parser_unary_expression): Reject increments and decrements in
2306         constant-expressions.
2307         (cp_parser_direct_new_declarator): Adjust call to
2308         cp_parser_constant_expression.
2309         (cp_parser_cast_expression): Reject conversions to non-integral
2310         types in constant-expressions.
2311         (cp_parser_assignment_expression): Rejects assignments in
2312         constant-expressions.
2313         (cp_parser_expression): Reject commas in constant-expressions.
2314         (cp_parser_labeled_statement): Adjust call to
2315         cp_parser_constant_expression.
2316         (cp_parser_direct_declarator): Simplify array bounds, even in
2317         templates, when they are non-dependent.  Use
2318         resolve_typename_type, not cp_parser_resolve_typename_type.
2319         (cp_parser_class_head): Use resolve_typename_type, not
2320         cp_parser_resolve_typename_type.
2321         (cp_parser_member_declaration): Adjust call to
2322         cp_parser_constant_expression.
2323         (cp_parser_constant_initializer): Likewise.
2324         (cp_parser_constructor_declarator): Use resolve_typename_type, not
2325         cp_parser_resolve_typename_type.
2326         (cp_parser_late_parsing_default_args): Adjust call to
2327         push_nested_class.
2328         * pt.c (tsubst): Give it internal linkage.
2329         (tsubst_expr): Likewise.
2330         (tsubst_copy): Likewise.
2331         (tsubst_copy_and_build): Likewise.
2332         (push_access_scope_real): Likewise.
2333         (tsubst_friend_class): Likewise.
2334         (instantiate_class_template): Adjust call to pushclass.
2335         (value_dependent_expression_p): Give it external linkage.
2336         Robustify.
2337         (resolve_typename_type): New function.
2338         * semantics.c (finish_call_expr): Use build_new_op, not
2339         build_opfncall.
2340         (begin_constructor_declarator): Remove.
2341         (begin_class_definition): Adjust call to pushclass.
2342         (enter_scope_of): Remove.
2343         * typeck.c (comptypes): Resolve typename types as appropriate.
2344         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
2345         (build_x_compound_expr): Likewise.
2346         (build_modify_expr): Likewise.
2347         (build_x_modify_expr): Likewise.
2348         * typeck2.c (build_x_arrow): Likewise.
2349
2350 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
2351
2352         * pt.c (last_pending_template) Declare GTY().
2353
2354 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2355
2356         PR c++/8591
2357         * parser.c (cp_parser_elaborated_type_specifier): Convert
2358         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
2359         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
2360
2361 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
2362
2363         PR c++/9437
2364         * pt.c (unify): Don't unify '*T' with 'U C::*'.
2365
2366         PR c++/3902
2367         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
2368         inside a declarator.
2369
2370 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
2371
2372         * class.c (update_vtable_entry_for_fn): Add index parameter.
2373         Generate vcall thunk for covariant overriding from a virtual
2374         primary base.
2375         (dfs_modify_vtables): Adjust.
2376
2377 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
2378
2379         PR c++/9403
2380         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
2381         template keyword.
2382         (cp_parser_base_specifier): Look for and consume a
2383         TEMPLATE keyword. Replace switch with array index.
2384
2385         PR c++/795
2386         * semantics.c (finish_non_static_data_member): Remember the
2387         field's type even in a template.
2388
2389         PR c++/9415
2390         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
2391         already scoped.
2392
2393         PR c++/8545
2394         * parser.c (cp_parser_cast_expression): Be more tentative.
2395
2396 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2397
2398         * cp-tree.h (flagged_type_tree_s): Remove.
2399         (check_for_new_type): Likewise.
2400         * typeck2.c (check_for_new_type): Likewise.
2401
2402 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
2403
2404         * dump.c: ANSIfy function declarations and definitions.
2405
2406         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
2407
2408 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
2409
2410         PR c++/9354
2411         * init.c (build_new): Set the type of the new-expression, even
2412         when processing_templte_decl.
2413
2414         PR c++/9216
2415         * parser.c (cp_parser_primary_expression): Improve error message
2416         for templates used in an expression context.
2417
2418         PR c++/8696
2419         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
2420         parse when encountering "typedef".
2421
2422 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
2423
2424         * class.c, parser.c: ANSIfy function definitions and declarations.
2425
2426 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
2427
2428         PR c++/9328
2429         * error.c (dump_decl): For an OVERLOAD, just print the name of the
2430         function; it doesn't make sense to try to print its type.
2431         * semantics.c (finish_typeof): Issue errors about invalid uses.
2432
2433         PR c++/9298
2434         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
2435         function.
2436         (cp_parser_expression_statement): Use it.
2437         (cp_parser_explicit_instantiation): Likewise.
2438         * pt.c (do_decl_instantiation): Improve error handling logic.
2439
2440 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
2441
2442         PR c++/9384
2443         * parser.c (cp_parser_using_declaration): Issue error messages
2444         about name resolution failures here.
2445
2446         PR c++/9388
2447         * class.c (currently_open_derived_class): Use dependent_type_p.
2448         * cp-tree.h (dependent_type_p): New function.
2449         (dependent_template_arg_p): Likewise.
2450         (dependent_template_p): Likewise.
2451         (type_dependent_expression_p): Likewise.
2452         * parser.c (cp_parser_dependent_type_p): Remove.
2453         (cp_parser_value_dependent_type_p): Likewise.
2454         (cp_parser_type_dependent_expression_p): Likewise.
2455         (cp_parser_dependent_template_arg_p): Likewise.
2456         (cp_parser_dependent_template_id_p): Likewise.
2457         (cp_parser_dependent_template_p): Likewise.
2458         (cp_parser_diagnose_invalid_type_name): Replace
2459         cp_parser_dependent_type_p with dependent_type_p, etc.
2460         (cp_parser_primary_expresion): Likewise.
2461         (cp_parser_nested_name_specifier_opt): Likewise.
2462         (cp_parser_postfix_expression): Likewise.
2463         (cp_parser_unary_expression): Likewise.
2464         (cp_parser_template_name): Likewise.
2465         (cp_parser_class_name): Likewise.
2466         (cp_parser_lookup_name): Likewise.
2467         * pt.c (dependent_type_p): New function.
2468         (value_dependent_expression_p): Likewise.
2469         (type_dependent_expression_p): Likewise.
2470         (dependent_template_arg_p): Likewise.
2471         (dependent_template_id_p): Likewise.
2472         (dependent_template_p): Likewise.
2473
2474         PR c++/9285
2475         PR c++/9294
2476         * parser.c (cp_parser_simple_declaration): Return quickly when
2477         encountering errors.
2478
2479 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2480
2481         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
2482
2483 2003-01-17  Jason Merrill  <jason@redhat.com>
2484
2485         PR c++/9167, c++/9358
2486         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
2487
2488 2003-01-17  Jason Merrill  <jason@redhat.com>
2489
2490         PR c++/9342
2491         * call.c (build_conditional_expr): Always do lvalue-rvalue
2492         conversion.
2493
2494 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
2495
2496         PR c++/9294
2497         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
2498         * cp-tree.h (BASELINK_BINFO): Adjust.
2499         (BASELINK_FUNCTIONS): Likewise.
2500         (BASELINK_ACCESS_BINFO): Likewise.
2501         (tree_baselink): New structure.
2502         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
2503         (lang_tree_node): Add baselink.
2504         * decl.c (cp_tree_node_structure): Add BASELINK case.
2505         * search.c (build_baselink): Adjust.
2506         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
2507         test from TREE_LIST case.
2508
2509         PR c++/9272
2510         * parser.c (cp_parser_constructor_declarator_p): Do not assume
2511         that a constructor cannot be declared outside of its own class.
2512
2513         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
2514         be resolved, neither can the qualified name.
2515
2516         * rtti.c (get_pseudo_ti_desc): Fix thinko.
2517
2518 2003-01-16  Jason Merrill  <jason@redhat.com>
2519
2520         PR c++/8564
2521         * init.c (build_vec_init): Re-add maxindex parm.
2522         (perform_member_init, build_aggr_init): Pass it.
2523         (build_new_1): Pass it. Use an incomplete array type for full_type.
2524         * typeck.c (build_modify_expr): Pass it.
2525         * cp-tree.h: Adjust.
2526
2527 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
2528
2529         * cp-tree.h (tsubst_copy_and_build): New declaration.
2530         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
2531         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
2532         (tsubst_copy_and_build): New function.
2533
2534 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
2535
2536         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
2537         (PARTIAL_INSTANTIATION_P): Remove.
2538         (IMPLICIT_TYPENAME_P): Likewise.
2539         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
2540         (build_typename_type): Remove declaration.
2541         (parmlist_is_exprlist): Likewise.
2542         * decl.c (build_typename_type): Make it static, remove third
2543         parameter.
2544         (push_class_binding): Don't do implicit typename stuff.
2545         (make_typename_type): Likewise.
2546         (lookup_name_real): Likewise.
2547         (grokdeclarator): Don't try to convert declarations into
2548         initializations.  Don't do implicit typename stuff.
2549         (parmlist_is_exprlist): Remove.
2550         (xref_basetypes): Simplify.
2551         * decl2.c (grokfield): Don't try to convert declarations into
2552         initializations.
2553         (build_anon_union_vars): Do this while processing templates, too.
2554         (finish_anon_union): Likewise.
2555         * error.c (dump_type): Remove implicit typename handling.
2556         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
2557         (cp_parser_primary_expression): Correct handling of names not
2558         found by unqualified name lookup in templates.
2559         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
2560         of types when possible.
2561         (cp_parser_simple_declaration): Complain intelligently about some
2562         invalid declarations.
2563         (cp_parser_member_declaration): Likewise.
2564         (cp_parser_constructor_declarator_p): Don't check when we're in a
2565         function scope.
2566         * pt.c (instantiate_class_template): Remove
2567         PARTIAL_INSTANTIATION_P gunk.
2568         * search.c (lookup_field_r): Don't build implicit typenames.
2569         (marked_pushdecls_p): Don't enter dependent base types.
2570         (unmarked_pushdecls_p): Likewise.
2571         * semantics.c (begin_class_definition): Remove implicit typename
2572         stuff.
2573
2574 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
2575
2576         PR c++/9212
2577         * parser.c (cp_parser_direct_declarator): If accepting either
2578         abstract or named, the name must be an unqualified-id.
2579
2580 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2581
2582         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
2583
2584 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2585
2586         * decl2.c (check_classfn): Fix uninitialized warning.
2587         (build_anon_union_vars): Likewise.
2588         * pt.c (tsubst_copy): Likewise.
2589
2590 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
2591
2592         Further conform g++'s __vmi_class_type_info to the C++ ABI
2593         specification.
2594         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
2595         the specification.
2596         (class_hint_flags): Likewise.
2597
2598 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2599
2600         * config-lang.in: Add semantics.c to gtfiles.
2601         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
2602         (saved_scope): Likewise.
2603         (type_lookups): Remove.
2604         (deferred_access): New structure.
2605         (type_access_control): Remove.
2606         (save_type_access_control): Likewise.
2607         (reset_type_access_control): Likewise.
2608         (decl_type_access_control): Likewise.
2609         (push_deferring_access_checks): Declare.
2610         (resume_deferring_access_checks): Likewise.
2611         (stop_deferring_access_checks): Likewise.
2612         (pop_deferring_access_checks): Likewise.
2613         (get_deferred_access_checks): Likewise.
2614         (pop_to_parent_deferring_access_checks): Likewise.
2615         (perform_deferred_access_checks): Likewise.
2616         (perform_or_defer_access_check): Likewise.
2617         * decl.c (make_typename_type): Use perform_or_defer_access_check.
2618         (make_unbound_class_template): Likewise.
2619         (grokdeclarator): Don't call decl_type_access_control.
2620         * parser.c (cp_parser_context): Remove deferred_access_checks
2621         and deferring_access_checks_p fields.
2622         (cp_parser_context_new): Adjust.
2623         (cp_parser): Remove access_checks_lists.
2624         (cp_parser_defer_access_check): Remove.
2625         (cp_parser_start_deferring_access_checks): Remove.
2626         (cp_parser_stop_deferring_access_checks): Remove.
2627         (cp_parser_perform_deferred_access_checks): Remove.
2628         (cp_parser_nested_name_specifier_opt): Use new deferred access
2629         functions.
2630         (cp_parser_simple_declaration): Likewise.
2631         (cp_parser_template_id): Likewise.
2632         (cp_parser_function_definition): Likewise.
2633         (cp_parser_class_specifier): Likewise.
2634         (cp_parser_lookup_name): Likewise.
2635         (cp_parser_single_declaration): Likewise.
2636         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
2637         (cp_parser_parse_tentatively): Likewise.
2638         (cp_parser_parse_definitely): Likewise.
2639         (yyparse): Likewise.
2640         (cp_parser_init_declarator): Remove access_checks parameter.
2641         Use new deferred access functions.
2642         (cp_parser_function_definition_from_specifiers_and_declarator):
2643         Likewise.
2644         (cp_parser_class_head): Remove deferring_access_checks_p and
2645         saved_access_checks parameters.  Use new deferred access functions.
2646         (cp_parser_member_specification_opt): Don't call
2647         reset_type_access_control.
2648         * search.c (type_access_control): Remove.
2649         * semantics.c: Include "gt-cp-semantics.h".
2650         (deferred_type_access_control): Remove.
2651         (deferred_access_stack): New variable.
2652         (deferred_access_free_list): Likewise.
2653         (push_deferring_access_checks): New function.
2654         (resume_deferring_access_checks): Likewise.
2655         (stop_deferring_access_checks): Likewise.
2656         (pop_deferring_access_checks): Likewise.
2657         (get_deferred_access_checks): Likewise.
2658         (pop_to_parent_deferring_access_checks): Likewise.
2659         (perform_deferred_access_checks): New function, adapted from
2660         cp_parser_perform_deferred_access_checks.
2661         (perform_or_defer_access_check): New function, adapted from
2662         cp_parser_defer_access_check.
2663         (current_type_lookups): Remove.
2664         (deferred_type_access_control): Likewise.
2665         (decl_type_access_control): Likewise.
2666         (save_type_access_control): Likewise.
2667         (reset_type_access_control): Likewise.
2668         (begin_function_definition): Adjust.
2669         (begin_class_definiton): Likewise.
2670
2671 2003-01-13  Jason Merrill  <jason@redhat.com>
2672
2673         PR c++/8748
2674         * class.c (build_base_path): Take the address before calling save_expr.
2675
2676         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
2677         all the ambiguous conversions are bad.
2678
2679         * class.c (maybe_warn_about_overly_private_class): Don't stop
2680         searching when we find a nonprivate method.
2681
2682         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
2683
2684 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
2685
2686         * cp-tree.h (get_arglist_len_in_bytes): Remove.
2687
2688         PR c++/9264
2689         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
2690         typeame types more robustly.
2691
2692 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
2693
2694         * parser.c:  Fix comment typos.
2695
2696 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
2697
2698         PR c++/9099
2699         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
2700         an object_type which is not a class type.
2701
2702 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
2703
2704         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
2705         (cp_parser_late_parsing_default_args): Likewise.
2706
2707 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
2708
2709         * cfns.gperf: ANSIfy function declarations.
2710         * cfns.h: Regenerate.
2711         * cp-tree.h: ANSIfy function declarations.
2712
2713 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
2714
2715         * cp-tree.h (reparse_absdcl_as_expr): Remove.
2716         (reparse_absdcl_as_casts): Likewise.
2717         (reparse_decl_as_expr): Likewise.
2718         (finish_decl_parsing): Likewise.
2719         * decl2.c (reparse_absdcl_as_expr): Remove.
2720         (reparse_absdcl_as_casts): Likewise.
2721         (repase_decl_as_expr): Likewise.
2722         (finish_decl_parsing): Likewise.
2723
2724         PR c++/9128
2725         PR c++/9153
2726         PR c++/9171
2727         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
2728         function.
2729         (cp_parser_nested_name_specifier_opt): Correct the
2730         check_dependency_p false.
2731         (cp_parser_postfix_expression): Fix formatting.
2732         (cp_parser_decl_specifier_seq): Avoid looking for constructor
2733         declarators when possible.
2734         (cp_parser_template_id): Avoid performing name-lookup when
2735         possible.
2736         (cp_parser_class_head): Do not count specializations when counting
2737         levels of templates.
2738         (cp_parser_constructor_declarator_p): Return immediately if
2739         there's no chance that the tokens form a constructor declarator.
2740         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
2741         expression with reference type.
2742         (get_tinfo_decl_dynamic): Do not return an expression with
2743         reference type.
2744         (build_typeid): Add comment.  Do not return an expression with
2745         reference type.
2746         * typeck.c (build_class_member_access_expr): Improve handling of
2747         conditionals and comma-expressions as objects.
2748
2749 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
2750
2751         * cfns.gperf: ANSIfy function declarations.
2752         * cfns.h: Regenerate.
2753         * cp-tree.h: ANSIfy function declarations.
2754         * parser.c: ANSIfy function declarations & definitions.
2755
2756         * decl.c (bad_specifiers): Fix parameter order error I introduced.
2757
2758 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
2759
2760         Merge from pch-branch:
2761
2762         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
2763
2764         Merge to tag pch-merge-20030102:
2765
2766         * semantics.c (finish_translation_unit): Don't call finish_file.
2767         * parser.c: Don't include ggc.h.
2768         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
2769         read first token here.  Don't allow PCH files after the first
2770         token is read.
2771         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
2772         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
2773         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
2774         (cp_parser_late_parsing_for_member): Don't duplicate call to
2775         cp_lexer_set_source_position_from_token.
2776         (cp_parser_late_parsing_default_args): Likewise.
2777         (yyparse): Call finish_file after clearing the_parser.
2778
2779         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
2780
2781         * Make-lang.in: Remove $(GGC_H) from all dependencies.
2782         (CXX_TREE_H): Add $(GGC_H).
2783         * class.c: Don't include ggc.h.
2784         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
2785         (method_name_cmp): Likewise.
2786         (resort_data): New variable.
2787         (resort_field_decl_cmp): New.
2788         (resort_method_name_cmp): New.
2789         (resort_sorted_fields): New.
2790         (resort_type_method_vec): New.
2791         (finish_struct_methods): Delete cast.
2792         (finish_struct_1): Delete cast.
2793         * cp-tree.h: Include ggc.h.
2794         (struct lang_type_class): Add reorder attribute to field `methods'.
2795         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
2796         (resort_sorted_fields): New prototype.
2797         (resort_type_method_vec): New prototype.
2798         * call.c: Don't include ggc.h.
2799         * decl.c: Likewise.
2800         * decl2.c: Likewise.
2801         * init.c: Likewise.
2802         * lex.c: Likewise.
2803         * method.c: Likewise.
2804         * optimize.c: Likewise.
2805         * parse.y: Likewise.
2806         * pt.c: Likewise.
2807         * repo.c: Likewise.
2808         * search.c: Likewise.
2809         * semantics.c: Likewise.
2810         * spew.c: Likewise.
2811         * tree.c: Likewise.
2812
2813         * lang-specs.h: Remove comment.
2814
2815         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
2816
2817         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
2818         (operator_name_info): Mark to be saved for PCH, specify size.
2819         (assignment_operator_name_info): Likewise.
2820
2821         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
2822
2823         * decl.c (anon_cnt): Mark to be saved for PCH.
2824
2825         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
2826
2827         * lex.c  (init_reswords): Delete now-untrue comment.
2828         Allocate ridpointers using GGC.
2829
2830         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
2831
2832         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
2833
2834         * g++spec.c (lang_specific_driver): Don't include standard
2835         libraries in `added'.
2836
2837         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
2838
2839         * decl2.c (finish_file): Call c_common_write_pch.
2840         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
2841
2842         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
2843
2844         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
2845         files when using g++.
2846         * lang-specs.h: Handle compiling C++ header files.
2847
2848 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
2849
2850         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
2851
2852 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2853
2854         * pt.c (push_access_scope_real): Call push_to_top_level for
2855         function in namespace scope.
2856         (pop_access_scope): Call pop_from_top_level for function in
2857         namespace scope.
2858
2859 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
2860
2861         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
2862
2863 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
2864
2865         * Make-lang.in (c++.install-common, c++.install-man,
2866         c++.uninstall): Prepend $(DESTDIR) to destination paths in
2867         all (un)installation commands.
2868         (c++.install-common): Rewrite $(LN) commands to support
2869         DESTDIR with "ln" as well as with "ln -s".
2870
2871 2003-01-08  Jason Merrill  <jason@redhat.com>
2872
2873         * parser.c (cp_parser_primary_expression): See through explicitly
2874         scoped ALIAS_DECLs, too.
2875
2876 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
2877
2878         * decl.c: Remove some #if 0 code.
2879
2880         * decl.c: ANSIfy function declarations.
2881
2882 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
2883
2884         * parser.c (cp_parser_asm_definition): Correct handling of omitted
2885         operands.
2886
2887 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2888
2889         PR c++/9030
2890         * decl.c (make_typename_type): Check access only when tf_error.
2891         (make_unbound_class_template): Likewise.
2892         * pt.c (saved_access_scope): New variable.
2893         (push_access_scope_real): New function.
2894         (push_access_scope): Likewise.
2895         (pop_access_scope): Likewise.
2896         (tsubst_default_argument): Use them.
2897         (instantiate_template): Likewise.
2898         (regenerate_decl_from_template): Likewise.
2899         (instantiate_decl): Likewise.
2900         (get_mostly_instantiated_function_type): Likewise.
2901
2902 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
2903
2904         * tree.c: Delete bogus #if 0 code.
2905
2906 2003-01-07  Andreas Schwab  <schwab@suse.de>
2907
2908         * class.c (layout_class_type): Don't use
2909         PCC_BITFIELD_TYPE_MATTERS if not defined.
2910
2911 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
2912
2913         PR c++/9165
2914         * decl2.c (build_cleanup): Mark the object as used.
2915
2916         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
2917         (hash_local_specialization): New function.
2918         (register_local_specialization): Revert 2003-01-05 change.
2919         (instantiate_decl): Use hash_local_specialization when creating
2920         the local_specializations table.
2921
2922         * decl2.c (mark_used): Do not synthesize thunks.
2923
2924         * class.c (layout_class_type): Correct handling of unnamed
2925         bitfields wider than their types.
2926
2927         PR c++/9189
2928         * parser.c (cp_parser): Remove default_arg_types.  Update
2929         documentation for unparsed_functions_queues.
2930         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
2931         parameter.
2932         (cp_parser_new): Don't set parser->default_arg_types.
2933         (cp_parser_function_definition): Adjust usage of
2934         unparsed_funtions_queues.
2935         (cp_parser_class_specifier): Don't mess with
2936         parser->default_arg_types.  Handle default argument processing in
2937         a separate phase from function body processing.
2938         (cp_parser_template_declaration_after_export): Adjust usage of
2939         unparsed_functions_queues.
2940         (cp_parser_late_parsing_for_member): Do not handle default
2941         arguments.
2942
2943 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
2944
2945         PR c++/9109
2946         * parser.c (cp_parser_declarator_kind): New enum.
2947         (cp_parser_declarator): Adjust.
2948         (cp_parser_direct_declarator): Adjust. Allow for either named or
2949         abstract declarator. Prefer abstract, if possible. Allow
2950         parenthesized function name.
2951         (cp_parser_condition): Adjust cp_parser_declarator call.
2952         (cp_parser_explicit_instantiation): Likewise.
2953         (cp_parser_init_declarator): Likewise.
2954         (cp_parser_type_id): Likewise.
2955         (cp_parser_function_definition): Likewise.
2956         (cp_parser_member_declaration): Likewise.
2957         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
2958         the tentative parsing.
2959         (cp_parser_exception_declaration): Likewise.
2960
2961 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
2962
2963         * parser.c (cp_parser_template_parameter): Adjust call to
2964         cp_parser_parameter_declaration.
2965         (cp_parser_parameter_declaration_list): Likewise.
2966         (cp_parser_parameter_declaration): Replace
2967         greater_than_is_operator_p with template_parm_p parameter.  Do not
2968         cache tokens for template default arguments.
2969
2970         * pt.c (retrieve_local_specialization): Use htab_find, not
2971         htab_find_with_hash.
2972         (register_local_specialization): Use htab_find_slot, not
2973         htab_find_slot_with_hash.
2974         (instantiate_decl): Pass a hash function to htab_create.
2975
2976 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2977
2978         * parser.c (cp_parser_binary_expression,
2979         cp_parser_multiplicative_expression,
2980         cp_parser_additive_expression, cp_parser_shift_expression,
2981         cp_parser_relational_expression, cp_parser_equality_expression,
2982         cp_parser_and_expression, cp_parser_exclusive_or_expression,
2983         cp_parser_inclusive_or_expression,
2984         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
2985         cp_parser_binary_expression): Const-ify.
2986
2987 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
2988
2989         * method.c (use_thunk): Disable access control while building the
2990         body of the thunk.
2991
2992 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
2993
2994         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
2995         front end.
2996
2997 2003-01-03  Matt Austern  <austern@apple.com>
2998
2999         * cp-tree.h (struct lang_type_class): add field for key method
3000         (cp_global_trees): rename dynamic_classes to keyed_classes
3001         (key_method): add definition
3002         * class.c (finish_struct_1): compute class's key method, and add
3003         the class to keyed_classes list if there is no key method.
3004         * decl.c (finish_function): add class to keyed_classes list if we
3005         see a definition of the class's key method.
3006         * pt.c (instantiate_class_template): add template specialization
3007         of a dynamic class to keyed_classes list.
3008         * decl2.c (key_method): remove
3009         (finish_file): iterate only through keyed_classes list when
3010         deciding whether to emit vtables, remove class from its list after
3011         we do the emission.
3012
3013 2003-01-02  Jason Merrill  <jason@redhat.com>
3014
3015         * call.c (build_conditional_expr): Stabilize lvalues properly.
3016         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
3017         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
3018         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
3019
3020         * call.c (convert_like_real): Call decl_constant_value for an
3021         IDENTITY_CONV even if there are no more conversions.
3022
3023         * cvt.c (build_up_reference): Don't push unnamed temps.
3024
3025         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
3026
3027         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
3028         for a backend struct.
3029
3030         * except.c (wrap_cleanups_r, build_throw): Make
3031         MUST_NOT_THROW_EXPRs void.
3032         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
3033
3034         * init.c (build_vec_delete_1): Pre-evaluate the base address.
3035
3036         * init.c (get_temp_regvar): Simplify logic.
3037
3038         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
3039         our replacement is a decl.
3040
3041         * decl.c (cp_make_fname_decl): Push the decls inside the
3042         outermost scope.
3043
3044 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
3045
3046         PR c++/45, c++/3784
3047         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
3048         the same too.
3049
3050 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
3051
3052         * parser.c (struct cp_parser): Add access_checks_lists field
3053         (cp_parser_simple_declaration): Use.
3054         (cp_parser_init_declarator): Likewise.
3055
3056 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
3057
3058         * parser.c (cp_parser_declaration): Accept the __extension__
3059         keyword before the declaration.
3060
3061         PR c++/2843
3062         * parser.c (cp_parser_parameter_declaration): Allow attributes to
3063         appear after the declarator.
3064
3065         * call.c (build_new_method_call): Fix typo in message format
3066         string.
3067
3068 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
3069
3070         * parser.c (cp_lexer_next_token_is): Declare it inline.
3071         (cp_lexer_set_source_position_from_token): Likewise.
3072         (cp_lexer_debugging_p): Likewise.
3073         (cp_parser_parsing_tentatively): Likewise.
3074         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
3075         to the cp_lexer_peek_token.
3076
3077         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
3078         expression.
3079
3080 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
3081
3082         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
3083         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
3084         cp/repo.c: Fix copyright years.
3085
3086 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
3087
3088         * lex.c: Remove superfluous include of cpplib.h.
3089         (CONSTRAINT): Define without conditions.
3090         (init_cp_pragma): Use c_register_pragma.
3091
3092 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
3093
3094         * .cvsignore: Remove.
3095
3096 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3097
3098         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
3099           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
3100           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
3101           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
3102           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
3103           copyright header.
3104         * lex.h: parse.y is dead, so don't mention it.  Also replace the
3105           copyright header with the default GNU copyright header.
3106
3107 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
3108
3109         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
3110         (lookup_name_namespace_only): Likewise.
3111         (begin_only_namespace_names): Likewise.
3112         (end_only_namespace_names): Likewise.
3113         * decl.c (only_namespace_names): Remove.
3114         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
3115         (lookup_name_real): Do not check only_namespace_names.
3116         (lookup_name_namespace_only): Remove.
3117         (begin_only_namespace_names): Likewise.
3118         (end_only_namespace_names): Likewise.
3119         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
3120         nested-name-specifiers more gracefully.
3121         (cp_parser_class_or_namespace_name): Avoid looking up namespace
3122         names when they cannot possibly appear.
3123         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
3124         (cp_parser_elaborated_type_specifier): Likewise.
3125         (cp_parser_namespace_name): Only look for namespace names.
3126         (cp_parser_lookup_name): Add is_namespace parameter.
3127         (cp_parser_lookup_name_simple): Adjust call to
3128         cp_parser_lookup_name.
3129
3130         * parser.c (cp_parser_dependent_type_p): Fix thinko.
3131
3132 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
3133
3134         * .cvsignore: Update.
3135
3136 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
3137
3138         * class.c (modify_vtable_entry): Remove unused variable.
3139         (get_vcall_index): Always expect a non-thunk.
3140         (update_vtable_entry_for_fn): Combine covariant adjustments, when
3141         overriding a thunk. Pass get_vcall_index a non-thunk.
3142
3143         * decl2.c (finish_file): Mark undefined inlines as extern.
3144
3145 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
3146
3147         * cp-tree.def (RETURN_INIT): Remove.
3148         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
3149         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
3150         (note_level_for_for): Remove.
3151         (note_level_for_try): Likewise.
3152         (note_level_for_catch): Likewise.
3153         (finish_named_return_value): Likewise.
3154         (do_pushlevel): Change prototype.
3155         (pending_lang_change): Remove.
3156         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
3157         sk_for.
3158         (note_level_for_for): Remove.
3159         (note_level_for_try): Likewise.
3160         (note_level_for_catch): Likewise.
3161         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
3162         * parser.c (cp_parser_context_free_list): Make it "deletable".
3163         (cp_parser_template_argument): Remove misleading comment.
3164         * pt.c (tsubst_expr): Remove RETURN_INIT code.
3165         * semantics.c (genrtl_named_return_value): Remove.
3166         (do_pushlevel): Take a scope kind as an argument.
3167         (begin_if_stmt): Adjust.
3168         (begin_while_stmt): Likewise.
3169         (begin_for_stmt): Likewise.
3170         (finish_for_init_stmt): Likewise.
3171         (begin_switch_stmt): Likewise.
3172         (begin_handler): Likewise.
3173         (begin_compound_stmt): Likewise.
3174         (finish_named_return_value): Remove.
3175         (cp_expand_stmt): Remove RETURN_INIT case.
3176         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
3177
3178 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
3179
3180         PR c++/9112
3181         * parser.c (cp_parser_direct_declarator): Handle erroneous
3182         parenthesized declarators correctly.
3183
3184 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3185
3186         * cp-tree.h (pending_lang_change): Declare.
3187
3188 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
3189
3190         * parser.c (cp_parser_context_free_list): New variable.
3191         (cp_parser_context_new): Use it.
3192         (cp_parser_error): Check return code from
3193         cp_parser_simulate_error.
3194         (cp_parser_simulate_error): Return a value.
3195         (cp_parser_id_expression): Optimize common case.
3196         (cp_parser_class_name): Likewise.
3197         (cp_parser_class_specifier): Adjust call to
3198         cp_parser_late_parsing_default_args.
3199         (cp_parser_lookup_name): Optimize common case.
3200         (cp_parser_late_parsing_for_member): Adjust call to
3201         cp_parser_late_parsing_default_args.
3202         (cp_parser_late_parsing_default_args): Add scope parameter.
3203         (cp_parser_require): Avoid creating the error message unless it's
3204         needed.
3205         (cp_parser_parse_definitely): Place free'd contexts on the free
3206         list.
3207
3208         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
3209
3210 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
3211
3212         * parser.c (cp_parser_parameter_declaration_clause): Treat system
3213         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
3214
3215 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
3216
3217         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
3218         GCC, not GNU CC.
3219
3220 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
3221
3222         * parse.y: Remove.
3223         * spew.c: Likewise.
3224         * Make-lang.in (gt-cp-spew.h): Remove.
3225         * cp-tree.h (do_pending_lang_change): Remove.
3226         (do_identifier): Change prototype.
3227         (finish_id_expr): Remove.
3228         * decl.c (lookup_name_real): Remove yylex variable.
3229         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
3230         * lex.c (init_cpp_parse): Remove.
3231         (reduce_cmp): Likewise.
3232         (token_cmp): Likewise.
3233         (yychar): Likewise.
3234         (lastiddecl): Likewise.
3235         (token_count): Likewise.
3236         (reduce_count): Likewise.
3237         (yyhook): Likewise.
3238         (print_parse_statistics): Likewise.
3239         (do_pending_lang_change): Likewise.
3240         (do_identifier): Remove parsing parameter.
3241         * lex.h (lastiddecl): Remove.
3242         (looking_for_typename): Remove.
3243         (looking_for_template): Likewise.
3244         (pending_lang_change): Likewise.
3245         (yylex): Likewise.
3246         * semantics.c (finish_id_expr): Remove.
3247
3248         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
3249         thread" correctly.
3250
3251 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
3252
3253         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
3254         end, not the C front end.
3255
3256 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
3257
3258         * cp-tree.h (THUNK_TARGET): New macro.
3259         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
3260         (finish_thunk): Remove offset parms.
3261         * class.c (find_final_overrider): Look through thunks.
3262         (get_vcall_index): Use THUNK_TARGET.
3263         (update_vtable_entry_for_fn): Look through thunks. Set covariant
3264         fixed offset here. Adjust finish_thunk call.
3265         (build_vtbl_initializer): Adjust finish_thunk calls.
3266         * mangle.c (mangle_call_offset): Remove superfluous if.
3267         (mangle_thunk): Adjust.
3268         * method.c (make_thunk): Adjust.
3269         (finish_thunk): Adjust.
3270         (thunk_adjust): Remove assert.
3271         (use_thunk): Use THUNK_TARGET
3272         * dump1.c (cp_dump_tree): Adjust thunk dumping.
3273
3274         PR c++/9054
3275         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
3276         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
3277
3278 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3279
3280         Remove traditional C constructs 4/n.
3281         * decl2.c (grok_method_quals, warn_if_unknown_interface,
3282         grok_x_components, cp_build_parm_decl, build_artificial_parm,
3283         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
3284         delete_sanity, check_member_template, check_java_method,
3285         check_classfn, finish_static_data_member_decl, grokfield,
3286         grokbitfield, grokoptypename, grok_function_init,
3287         cplus_decl_attributes, constructor_name, defer_fn,
3288         build_anon_union_vars, finish_anon_union, coerce_new_type,
3289         coerce_delete_type, comdat_linkage, maybe_make_one_only,
3290         key_method, import_export_vtable, import_export_class,
3291         output_vtable_inherit, import_export_decl, import_export_tinfo,
3292         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
3293         set_guard, start_objects, finish_objects,
3294         start_static_storage_duration_function,
3295         finish_static_storage_duration_function, get_priority_info,
3296         start_static_initialization_or_destruction,
3297         finish_static_initialization_or_destruction,
3298         do_static_initialization, do_static_destruction,
3299         prune_vars_needing_no_initialization, write_out_vars,
3300         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
3301         add_using_namespace, merge_functions, ambiguous_decl,
3302         lookup_using_namespace, lookup_using_namespace,
3303         qualified_lookup_using_namespace, set_decl_namespace,
3304         decl_namespace, current_decl_namespace, push_decl_namespace,
3305         pop_decl_namespace, push_scope, pop_scope, add_function,
3306         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
3307         lookup_arg_dependent, do_namespace_alias,
3308         validate_nonmember_using_decl, do_nonmember_using_decl,
3309         do_toplevel_using_decl, do_local_using_decl,
3310         do_class_using_decl, do_using_directive, check_default_args,
3311         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
3312         * parser.c (cp_parser_class_head): Use booleanss.
3313         * decl.c (walk_globals, walk_vtables): Likewise.
3314         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
3315         walk_globals): Change return type from 'int' to 'bool'.
3316         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
3317         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
3318         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
3319         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
3320         qualifier_flags, tinfo_base_init, generic_initializer,
3321         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
3322         dfs_class_hint_unmark, class_hint_flags, class_initializer,
3323         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
3324         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
3325         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
3326         * repo.c (repo_compile_flags, repo_template_declared,
3327         repo_template_defined, repo_class_defined, repo_get_id,
3328         repo_template_used, repo_vtable_used, repo_inline_used,
3329         repo_tinfo_used, repo_template_instantiated, extract_string,
3330         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
3331         finish_repo): Likewise.
3332         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
3333         cxx_print_xnode): Likewise..
3334         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
3335         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
3336         * cxxfilt.c (demangle_it, print_demangler_list, usage,
3337         standard_symbol_characters, hp_symbol_characters, main, fatal):
3338         Likewise.
3339         (strip_underscore):  Change type from 'int' to 'bool'.
3340         (main): Use boolean constants.
3341
3342 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3343
3344         Remove traditional C constructs 3/n.
3345         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
3346         build_up_reference, warn_ref_binding, convert_to_reference,
3347         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
3348         convert_to_void, convert, convert_force, build_type_conversion,
3349         build_expr_type_conversion, type_promotes_to,
3350         perform_qualification_conversions): Use C90 prototyping style.
3351         * decl2.c (grok_array_decl): Use boolean constant.
3352         (delete_sanity): Likewise.
3353         * typeck.c (build_unary_op): Likewise.
3354         * semantics.c (finish_switch_cond): Likewise.
3355         * parser.c (cp_parser_direct_new_declarator): Likewise.
3356         * init.c (build_new): Likewise.
3357
3358 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
3359
3360         * Make-lang.in (po-generated): Remove parse.c.
3361         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
3362         ($(srcdir)/cp/parse.h): Remove target.
3363         ($(srcdir)/cp/parse.c): Likewise.
3364         (gt-cp-parse.h): Likewise.
3365         (gt-cp-parser.h): New target.
3366         (c++.distclean): Do not remove parse.output.
3367         (c++.maintainer-clean): Do not remove parse.c or parse.h.
3368         (cp/spew.o): Remove target.
3369         (cp/lex.o): Adjust dependencies.
3370         (cp/pt.o): Likewise.
3371         (cp/parse.o): Likewise.
3372         (cp/TAGS): Do not mention parse.c.
3373         (cp/parser.o): New target.
3374         * NEWS: Mention the new parser.
3375         * call.c (build_scoped_method_call): Simplify.
3376         (build_method_call): Likewise.
3377         (build_new_function_call): Adjust calls to add_function_candidate
3378         and add_template_candidate.
3379         (build_new_op): Improve handling of erroroneous operands.
3380         (convert_default_arg): Remove circular argument processing.
3381         (name_as_c_string): New function.
3382         (build_new_method_call): Use it.
3383         (perform_implicit_conversion): Use error_operand_p.
3384         * class.c (finish_struct_anon): Use constructor_name_p.
3385         (check_field_decls): Likewise.
3386         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
3387         (resolve_address_of_overloaded_function): Likewise.
3388         (instantiate_type): Tweak pointer-to-member handling.
3389         (get_primary_binfo): Remove incorrect assertion.
3390         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
3391         * cp-tree.h (DEFARG_TOKENS): New macro.
3392         (default_arg): New structure.
3393         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
3394         (lang_tree_node): Add default_arg.
3395         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
3396         (type_info_ref_type): New macro.
3397         (saved_scope): Make processing_explicit_instantiation a boolean.
3398         (check_access): New field.
3399         (unparsed_text): Remove.
3400         (language_function): Remove unparsed_inlines.
3401         (error_operand_p): New macro.
3402         (lang_decl): Adjust pending_inline_info.
3403         (DEFARG_POINTER): Remove.
3404         (tag_types): Add typenames.
3405         (lookup_ualified_name): Declare.
3406         (lookup_name_real): Likewise.
3407         (shadow_tag): Adjust prototype.
3408         (get_scope_of_declarator): Declare it.
3409         (process_next_inline): Remove it.
3410         (check_for_missing_semicolon): Likewise.
3411         (maybe_get_template_decl_from_type_decl): Declare it.
3412         (finish_label_stmt): Adjust prototype.
3413         (finish_non_static_data_meber): Declare it.
3414         (finish_pseudo_destructor_call_expr): Rename to ...
3415         (finish_pseudo_destructor_expr): ... this.
3416         (finish_compound_literal): Declare it.
3417         (begin_inline_definitions): Remove it.
3418         (init_spew): Remove.
3419         (peekyylex): Likewise.
3420         (arbitrate_lookup): Likewise.
3421         (frob_opname): Likewise.
3422         (maybe_snarf_defarg): Likewise.
3423         (add_defarg_fn): Likewise.
3424         (do_pending_defargs): Likewise.
3425         (done_pending_defargs): Likewise.
3426         (unprocessed_defarg_fn): Likewise.
3427         (replace_defarg): Likewise.
3428         (end_input): Likewise.
3429         (get_overloaded_fn): Likewise.
3430         * cvt.c (convert_to_reference): Improve error handling.
3431         * decl.c (lookup_name_real): Do not declare it static.
3432         (maybe_push_to_top_level): Set check_access.
3433         (identifier_type_value): Adjust call to lookup_name_real.
3434         (lookup_qualified_name): New method.
3435         (lookup_name_real): Remove special-case parsing code.
3436         (lookup_name-nonclass): Adjust call to lookup_name_real.
3437         (lookup_name_namespace_only): Likewise.
3438         (lookup_name): Likewise.
3439         (check_tag_decl): Return the type declared.
3440         (shadow_tag): Likewise.
3441         (register_dtor_fn): Tweak check_access.
3442         (grokfndecl): Use constructor_name_p.
3443         (get_scope_of_declarator): New function.
3444         (grokdeclarator): Obscure tweaks for slightly different declarator
3445         representations.
3446         (start_method): Return error_mark_node to indicate failure.
3447         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
3448         * decl2.c (constructor_name_full): Simplify.
3449         (constructor_name): Use it.
3450         (build_expr_from_tree): Adjust for changes to do new parser.
3451         (push_scope): Improve robustness.
3452         (validate_nonmember_using_decl): Process declarations, not names.
3453         (do_class_using_decl): Likewise.
3454         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
3455         here.
3456         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
3457         * expr.c (cxx_expand_expr): Handle BASELINKs.
3458         * init.c (member_init_ok_or_else): Issue more errors.
3459         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
3460         * lex.c: Do not include parse.h.
3461         (yypring): Do not declare.
3462         (yylval): Likewise.
3463         (make_reference_declarator): Remove error-generating code.
3464         (rid_to_yy): Remove.
3465         (cxx_init): Do not call init_spew.
3466         (yypring): Remove.
3467         (check_for_missing_semicolon): Remove.
3468         * lex.h (got_scope): Remove.
3469         (got_object): Remove.
3470         * method.c (hack_identifier): Use finish_non_static_data_member.
3471         (implicitly_declare_fn): Adjust use of constructor_name.
3472         * parser.c: New file.
3473         * pt.c (parse.h): Do not include it.
3474         (maybe_get_template_decl_from_template): Do not declare it.
3475         (finish_member_template_decl): Tweak.
3476         (begin_explicit_instantiation): Adjust for
3477         processing_explicit_instantiation being boolean.
3478         (end_explicit_instantiation): Likewise.
3479         (maybe_process_partial_specialization): Tighten specialization
3480         test.
3481         (retrieve_local_specialization): Adjust ue of hash table.
3482         (eq_local_specializations): New function.
3483         (register_local_specialization): Likewise.
3484         (push_template_decl_real): Remove unnecessary test.
3485         (maybe_get_template_decl_from_type_decl): Don't make it static.
3486         (for_each_template_parm_r): Handle TYPEOF_TYPE.
3487         (tsubst_copy): Use retrieive_local_specialization to handle
3488         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
3489         Handle COMPONENT_REFs with pseudo-destructor-expressions.
3490         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
3491         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
3492         (unify): Tweak handling of CONST_DECLs.
3493         (regenerate_decl_from_template): Use push_nested_class.
3494         (template_for_substitution): New funciton.
3495         (instantiate_decl): Use it.  Register parameters as local
3496         specializations.
3497         * rtti.c (init_rtti_processing): Set type_info_ref_type.
3498         (build_typeid): Use it.
3499         (get_typeid): Likeise.
3500         * search.c (accessible_p): Use check_access, not
3501         flag_access_control.
3502         (adjust_result_of_qualified_name_lookup): Pay attention to the
3503         context_class.
3504         * semantics.c (finish_asm_stmt): Adjust error handling.
3505         (finish_label_stmt): Return the statement.
3506         (finish_non_static_data_member): New function.
3507         (finish_class_expr): Handle BASELINKs.
3508         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
3509         (finish_object_call_expr): Simplify handling during templates.
3510         (finish_pseudo_destructor_call_expr): Rename to ...
3511         (finish_pseudo_dtor_expr): ... this.
3512         (finish_compound_literal): New function.
3513         (begin_inline_definitions): Remove.
3514         (finish_sizeof): Remove special template handling.
3515         * spew.c: Do not include parse.h.
3516         * tree.c (get_overloaded_fn): Remove.
3517         * typeck.c (build_class_member_access_expr): Handle
3518         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
3519         (lookup_destructor): New function.
3520         (finish_class_member_access_expr): Use it.
3521         (convert_arguments): Simplify.
3522         (build_unary_op): Handle BASELINKs.
3523
3524 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
3525
3526         PR c++/4803
3527         * decl2.c (mark_used): Defer inline functions.
3528         (finish_file): Merge deferred_fns loops. Check all used
3529         inline functions have a definition.
3530         * method.c (make_thunk): Thunks are not inline.
3531
3532         PR c++/5116, c++/764
3533         * call.c (build_new_op): Make sure template class operands are
3534         instantiated.
3535
3536 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
3537
3538         PR C++/7964
3539         * cp-tree.h (resolve_scoped_fn_name): Prototype.
3540         * call.c (resolve_scoped_fn_name): New function. Deal with
3541         more template expansion. Broken out of ...
3542         * parse.y (parse_finish_call_expr): ... here. Call it.
3543         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
3544         resolve_scoped_fn_name and build_call_from_tree.
3545
3546         PR c++/9053
3547         * decl.c (duplicate_decls): Templates may be disambiguated by
3548         return type.
3549
3550         PR c++/8702
3551         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
3552         conversion operators on failure.
3553
3554 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3555
3556         Remove traditional C constructs 2/n.
3557         * call.c (tourney, build_field_call, equal_functions, joust,
3558         compare_ics, build_over_call, build_java_interface_fn_ref,
3559         convert_like_real, op_error, build_object_call, resolve_args,
3560         build_vfield_ref, check_dtor_name, build_scoped_method_call,
3561         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
3562         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
3563         standard_conversion, reference_related_p,
3564         reference_compatible_p, convert_class_to_reference,
3565         direct_reference_binding, reference_binding,
3566         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
3567         add_template_conv_candidate, any_viable, any_strictly_viable,
3568         build_this, splice_viable, print_z_candidates,
3569         build_user_type_conversion, build_new_function_call,
3570         conditional_conversion, build_conditional_expr, build_new_op,
3571         build_op_delete_call, enforce_access, call_builtin_trap,
3572         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
3573         convert_default_arg, type_passed_as, convert_for_arg_passing,
3574         in_charge_arg_for_name, is_properly_derived_from,
3575         maybe_handle_implicit_object, maybe_handle_ref_bind,
3576         source_type, add_warning, can_convert, can_convert_arg,
3577         perform_implicit_conversion, can_convert_arg_bad,
3578         initialize_reference, add_conv_candidate,
3579         add_template_candidate_real, add_template_candidate): Ansify.
3580
3581 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
3582
3583         PR c++/8572
3584         * cp-tree.h (grokoptypename): Add SCOPE parameter.
3585         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
3586         if in a template scope.
3587         * parse.y (unoperator): Return the scope.
3588         (operator_name): Adjust grokoptypename call.
3589
3590 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3591
3592         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
3593         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
3594         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
3595
3596 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
3597
3598         * ChangeLog: Fix a typo.
3599         * class.c: Fix comment typos.
3600         * cp-tree.h: Likewise.
3601
3602 2002-12-18  Jason Merrill  <jason@redhat.com>
3603
3604         Handle anonymous unions at the tree level.
3605         C++ ABI change: Mangle anonymous unions using the name of their
3606         first named field (by depth-first search).  Should not cause
3607         binary compatibility problems, though, as the compiler previously
3608         didn't emit anything for affected unions.
3609         * cp-tree.def (ALIAS_DECL): New tree code.
3610         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
3611         first field, not the largest.
3612         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
3613         push the decl, and write it out at namespace scope.
3614         * decl.c (lookup_name_real): See through an ALIAS_DECL.
3615         (pushdecl): Add namespace bindings for ALIAS_DECLs.
3616         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
3617         of a decl which doesn't have one.
3618         * typeck.c (build_class_member_access_expr): Don't recurse if
3619         we already have the type we want.
3620
3621 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3622
3623         PR c++/8099
3624         * friend.c (make_friend_class): Allow partial specialization
3625         when declaration is not a template friend.
3626
3627 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3628
3629         PR c++/3663
3630         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
3631         TREE_PROTECTED to created decl nodes.
3632
3633 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
3634
3635         * class.c (build_base_field): Do not set DECL_PACKED on the
3636         FIELD_DECL.
3637
3638 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3639
3640         * cp-tree.h (struct tree_srcloc): Use location_t.
3641         (SOURCE_LOCUS): New.
3642         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
3643
3644 2002-12-17  Jason Merrill  <jason@redhat.com>
3645
3646         * decl.c (finish_function): Also complain about no return in
3647         templates.
3648         * semantics.c (finish_return_stmt): Also call check_return_expr in
3649         templates.
3650         * typeck.c (check_return_expr): In a template, just remember that we
3651         saw a return.
3652
3653 2002-12-16  Jason Merrill  <jason@redhat.com>
3654
3655         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
3656         of the CALL_EXPR.
3657
3658         * semantics.c (do_pushlevel): Call pushlevel after adding the
3659         SCOPE_STMT.
3660         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
3661         * parse.y (function_body): Go back to using compstmt.
3662         * decl.c (pushdecl): Skip another level to get to the parms level.
3663
3664         * call.c (build_new_method_call): Use is_dummy_object to determine
3665         whether or not to evaluate the object parameter to a static member
3666         function.
3667
3668 2002-12-14  Jason Merrill  <jason@redhat.com>
3669
3670         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
3671         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
3672         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
3673         don't bother with an AGGR_INIT_EXPR.
3674         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
3675         just generate a new decl normally.  Take return slot parm.
3676         * cp-tree.h: Adjust prototype.
3677
3678 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3679
3680         PR C++/8031
3681         * cvt.c (convert_to_pointer_force): Don't try comparing against
3682         erronous type.
3683
3684 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
3685
3686         * cp-tree.h: Have the multiple-include guards around
3687         the entire file.
3688
3689 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
3690
3691         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
3692         for SPEW_DEBUG.
3693         (snarf_method): Same.
3694         (snarf_defarg): Same.
3695
3696 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
3697
3698         PR c++/8372
3699         * pt.c (tsubst_copy): Handle destructor names more correctly.
3700
3701 2002-12-10  Matt Austern   <austern@apple.com>
3702
3703         * cp-tree.h: get rid of needs_virtual_reinit bit.
3704
3705 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
3706
3707         * NEWS: Document removal of in-class initialization extension for
3708         static data members of non-arithmetic, non-enumeration type.
3709         * decl.c (check_static_variable_definition): Do not allow that
3710         extension.
3711         * decl2.c (grokfield): Do not call digest_init when processing
3712         templates.
3713
3714 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3715
3716         * error.c (dump_expr): Fix format specifier warning.
3717
3718 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
3719
3720         * class.c (finish_struct_1): Correct comment.
3721         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
3722
3723 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3724
3725         PR C++/8799
3726         * error.c (dump_expr): Don't ever try to dump a non-existent
3727         expression.
3728
3729 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
3730
3731         Implement covariant returns.
3732         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
3733         (struct lang_decl_flags): Add this_thunk_p flag.
3734         Rename vcall_offset to virtual_offset.
3735         (struct lang_decl): Rename delta to fixed_offset.
3736         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
3737         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
3738         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
3739         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
3740         (make_thunk): Add this_adjusting arg.
3741         (finish_thunk): Declare.
3742         (mangle_thunk): Add this_adjusting arg.
3743         * class.c (get_vcall_index): Use base function for lookup.
3744         (update_vtable_entry_for_fn): Generate covariant thunk.
3745         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
3746         (build_vtbl_initializer): Use base function for lookup.
3747         Finish covariant thunk here. Adjust thunk generation.
3748         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
3749         Adjust thunk dumping.
3750         * mangle.c (mangle_call_offset): New function.
3751         (mangle_thunk): Adjust for covariant thunks.
3752         * method.c (make_thunk): Adjust. Do not set name here.
3753         (finish_thunk): New function. Set name here.
3754         (use_thunk): Generate covariant thunks too.
3755         (thunk_adjust): New function.
3756         * search.c (covariant_return_p): Remove. Fold into ...
3757         (check_final_overrider): ... here. Simplify.
3758         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
3759
3760 2002-12-03  Jason Merrill  <jason@redhat.com>
3761
3762         PR c++/8674
3763         * call.c (build_over_call): Check specifically for TARGET_EXPR
3764         when eliding.
3765
3766         PR c++/8461, c++/8625
3767         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
3768         (cp_convert_parm_for_inlining): Remove.
3769         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
3770         Remove.
3771         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
3772         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
3773
3774         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
3775         an ambiguous conversion.
3776
3777 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
3778
3779         PR c++/8688
3780         * decl.c (reshape_init): Handle erroneous initializers.
3781
3782 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
3783
3784         PR c++/8720
3785         * spew.c (remove_last_token): Make sure that last_chunk is set
3786         correctly.
3787
3788         PR c++/8615
3789         * error.c (dump_expr): Handle character constants with
3790         TREE_OVERFLOW set.
3791
3792 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3793
3794         DR 180
3795         * decl.c (grokdeclarator): Require class-key for all friend class.
3796         Output the correct type and context in the error message.
3797
3798 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
3799
3800         PR c++/5919
3801         * pt.c (unify): Use variably_modified_type_p to test validity of
3802         template argument types.
3803
3804         PR c++/8727
3805         * cp-tree.h (lang_type_class): Add typeinfo_var.
3806         (CLASSTYPE_TYPEINFO_VAR): New macro.
3807         * rtti.c (get_tinfo_decl): Use it.
3808
3809         PR c++/8663
3810         * init.c (expand_member_init): Always get the main variant of a
3811         base class.
3812
3813 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
3814
3815         PR c++/8332
3816         PR c++/8493
3817         * decl.c (cxx_init_decl_processing): Use size_type_node, not
3818         c_size_type_node.
3819         * decl2.c (coerce_new_type): Likewise.
3820         * except.c (do_allocate_exception): Likewise.
3821
3822 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
3823
3824         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
3825         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
3826         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
3827         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
3828         typeck2.c: Include coretypes.h and tm.h.
3829         * Make-lang.in: Update dependencies.
3830
3831 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
3832
3833         PR c++/8227
3834         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
3835         (check_initializer): Validate the type of the initialized
3836         variable, even if the initializer is absent.
3837         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
3838
3839         PR c++/8214
3840         * typeck.c (convert_for_assignment): Do not use
3841         decl_constant_value on the operand.
3842
3843         PR c++/8511
3844         * pt.c (instantiate_decl): Handle template friends defined outside
3845         of the class correctly.
3846
3847 2002-11-29  Joe Buck <jbuck@synopsys.com>
3848
3849         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
3850         anonymous structs.
3851
3852 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
3853
3854         * class.c (walk_subobject_offsets): Recur on binfos as well as on
3855         types.
3856         (layout_nonempty_base_or_field): Pass it a binfo when processing a
3857         base class.
3858         (layout_empty_base): Likewise.
3859         (build_base_field): Likewise.
3860
3861 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
3862
3863         * class.c (build_base_field): Make sure we get the canonical base
3864         when descending through primary bases.
3865
3866 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
3867
3868         * decl.c (check_initializer): Don't error on initialisation of
3869         a scalar with a brace-enclosed expression.
3870
3871 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
3872
3873         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
3874         (template_parms_equal): Remove prototype.
3875         * typeck.c (buuld_indirect_ref): Reformat.
3876
3877 2002-11-25  Jason Merrill  <jason@redhat.com>
3878
3879         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
3880         and a DO_STMT.
3881
3882 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
3883
3884         * tree.c (cp_build_qualified_type_real): Correct handling of
3885         array types.
3886         * class.c (walk_subobject_offsets): Fix thinko.
3887         (build_base_field): Record offsets of empty bases in primary
3888         virtual bases.
3889         (layout_class_type): Record offsets of empty bases in fields.
3890
3891         * search.c (is_subobject_of_p_1): Fix thinko.
3892         (lookup_field_queue_p): Likewise.
3893
3894 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
3895
3896         * class.c (layout_class_type): Reuse tail padding when laying out
3897         virtual bases.
3898
3899 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
3900
3901         * rtti.c (qualifier_flags): Fix thinko.
3902
3903 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3904
3905         Remove traditional C constructs 1/n.
3906         * cp-tree.h (init_method, set_mangled_name_for_decl,
3907         build_opfncall, hack_identifier, make_thunk, use_thunk,
3908         synthesize_method, implicitly_declare_fn,
3909         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
3910         maybe_clone_body): Remove use of PARAMS.
3911
3912         * method.c (do_build_assign_ref, do_build_copy_constructor,
3913         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
3914         Likewise.
3915         (synthesize_method): Use 'bool' type and constants instead of
3916         'int'.
3917         (locate_copy): Likewise.
3918         (implicitly_declare_fn): Likewise.
3919
3920         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
3921         Remove old-style declaration.
3922         (maybe_clone_body): Use 'bool' type and constants.
3923
3924 2002-11-21  Glen Nakamura  <glen@imodulo.com>
3925
3926         PR c++/8342
3927         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
3928         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
3929         of the branches of a COND_EXPR.
3930
3931 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
3932
3933         * pt.c (for_each_template_parm): Free allocated memory.
3934         * search.c (is_subobject_of_p_1): New function.
3935         (is_subobject_of_p): Avoid walking virtual bases multiple times.
3936
3937 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
3938
3939         * g++spec.c (lang_specific_spec_functions): New.
3940
3941 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
3942
3943         * ChangeLog: Follow spelling conventions.
3944         * class.c: Likewise.
3945         * decl2.c: Likewise.
3946
3947 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
3948
3949         * search.c (dfs_push_decls): Do not try to reorder elements
3950         3..n of method_vec if method_vec has only two elements.
3951         Reverse order of two tests to avoid accessing unallocated
3952         memory.
3953
3954 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
3955
3956         * class.c (dfs_find_final_overrider): Adjust so that the most
3957         derived object is a binfo, rather than a class type.
3958         (find_final_overrider): Likewise.
3959         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
3960         (add_vcall_offset): Likewise.
3961
3962 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3963
3964         PR c++/8389
3965         * pt.c (instantiate_template): Push class scope for member
3966         functions.
3967         (get_mostly_instantiated_function_type): Likewise.  Don't call
3968         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
3969         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
3970         * mangle.c (write_encoding, write_unqualified_name): Adjust.
3971
3972 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
3973
3974         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
3975         vcall offfsets.  Split out ...
3976         (add_vcall_offset): ... new function.
3977
3978         PR c++/8338
3979         * pt.c (for_each_template_parm): Add htab parameter.
3980         (process_partial_specialization): Adjust call.
3981         (push_template_decl_real): Likewise.
3982         (pair_fn_data): Add visited.
3983         (for_each_template_parm_r): Avoid walking duplicates more than
3984         once.
3985         (uses_template_parms): Adjust call to for_each_template_parm.
3986
3987 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
3988
3989         * class.c (add_implicitly_declared_members): Put implicitly
3990         declared functions at the end of TYPE_METHODs when -fabi-version
3991         is at least 2.
3992
3993 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
3994
3995         * decl2.c (finish_file): Correct spelling.
3996
3997 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
3998
3999         * call.c (build_special_member_call): Do not try to lookup VTTs by
4000         name.
4001         * class.c (vtbl_init_data): Add generate_vcall_entries.
4002         (get_vtable_decl): Do not look up virtual tables by name.
4003         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
4004         (set_primary_base): Do not set CLASSTYPE_RTTI.
4005         (determine_primary_base): Likewise.
4006         (get_matching_virtual): Remove.
4007         (get_vcall_index): New function.
4008         (update_vtable_entry_for_fn): Do not try to use virtual thunks
4009         when they are not required.  Assign vcall indices at this point.
4010         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
4011         Do update dynamic_classes.
4012         (build_vtt): Do not add VTTs to the symbol table.
4013         (build_ctor_vtbl_group): Likewise.
4014         (build_vtbl_initializer): Simplify handling of vcall indices.
4015         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
4016         for the most derived class.
4017         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
4018         the vtable.
4019         * cp-tree.h (dynamic_classes): New macro.
4020         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
4021         (CLASSTYPE_RTTI): Remove.
4022         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
4023         (CLASSTYPE_VCALL_INDICES): New macro.
4024         (CLASSTYPE_VTABLES): Likewise.
4025         (BV_USE_VCALL_INDEX_P): Remove.
4026         (build_vtable_path): Remove.
4027         * decl2.c (finish_vtable_vardecl): Remove.
4028         (key_method): Remove #if 0'd code.
4029         (finish_vtable_vardecl): Rename to ...
4030         (maybe_emit_vtables): ... this.
4031         (finish_file): Use it.
4032         * search.c (look_for_overrides_here): Update comment.
4033
4034 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
4035
4036         PR c/7353 redux
4037         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
4038
4039 2002-10-30  Jason Merrill  <jason@redhat.com>
4040
4041         PR c++/8186
4042         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
4043         * call.c (convert_for_arg_passing): Set it.
4044         * except.c (stabilize_throw_expr): Recurse for such an arg.
4045
4046 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
4047
4048         * cp-tree.h (lang_decl_flags): Remove init_priority.
4049         (lang_decl): Add delta.
4050         (GLOBAL_INIT_PRIORITY): Remove.
4051         (THUNK_DELTA): Revise definition.
4052         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
4053         * dump.c (cp_dump_tree): Don't dump it.
4054
4055 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
4056
4057         PR c++/8160
4058         * typeck2.c (process_init_constructor): Call complete_array_type.
4059
4060         PR c++/8149
4061         * decl.c (make_typename_type): Issue errors about invalid results.
4062
4063 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4064
4065         Core issue 287, PR c++/7639
4066         * cp-tree.h (lang_type_class): Add decl_list field.
4067         (CLASSTYPE_DECL_LIST): New macro.
4068         (maybe_add_class_template_decl_list): Add declaration.
4069         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
4070         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
4071         (maybe_add_class_template_decl_list): New function.
4072         (add_implicitly_declared_members): Use it.
4073         * decl.c (maybe_process_template_type_declaration): Likewise.
4074         (pushtag): Likewise.
4075         * friend.c (add_friend): Likewise.
4076         (make_friend_class): Likewise.
4077         * semantics.c (finish_member_declaration): Likewise.
4078         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
4079         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
4080         to process members and friends in the order of declaration.
4081
4082 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
4083
4084         PR c++/8287
4085         * decl.c (finish_destructor_body): Create the label to jump to
4086         when returning from a destructor here.
4087         (finish_function_body): Rather than here.
4088
4089 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
4090
4091         PR c++/7266
4092         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
4093         SCOPE_REF is not null before dereferencing it.
4094
4095 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
4096
4097         * call.c (build_over_call): Use DECL_CONTEXT, not
4098         DECL_VIRTUAL_CONTEXT.
4099         * class.c (modify_vtable_entry): Don't mess with
4100         DECL_VIRTUAL_CONTEXT.
4101         (set_vindex): Remove.
4102         (set_primary_base): Remove vfuns_p parameter.
4103         (determine_primary_base): Likewise.
4104         (modify_all_vtables): Likewise.
4105         (layout_class_type): Likewise.  Adjust calls to other functions
4106         accordingly.
4107         (finish_struct_1): Adjust calls to modified functions.  Set
4108         DECL_VINDEX here.
4109         * cp-tree.h (lang_type_class): Remove vsize.
4110         (CLASSTYPE_VSIZE): Remove.
4111         (lang_decl): Remove thunks.
4112         (DECL_THUNKS): Adjust.
4113         (DECL_VIRTUAL_CONTEXT): Remove.
4114         (duplicate_decls): Don't copy it.
4115         * pt.c (build_template_decl): Don't set it.
4116         (tsubst_decl): Likewise.
4117         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
4118
4119         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
4120         (build_vtable_entry): Remove.
4121         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
4122         (lang_decl): Add thunks.
4123         (DECL_THUNKS): New macro.
4124         * decl.c (duplicate_decls): Copy it.
4125         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
4126         * semantics.c (emit_associated_thunks): Simplify.
4127
4128 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
4129
4130         PR c++/7228
4131         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
4132         lang_type structure exists before accessing field.
4133         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
4134         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
4135         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
4136         * class.c (check_field_decls): Use new macros.
4137         * typeck2.c (process_init_constructor): Remove redundant check for
4138         existence of lang_type structure.
4139
4140 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
4141
4142         * class.c (end_of_base): New method.
4143         (end_of_class): Use it.  Check indirect virtual bases.
4144
4145         * class.c (check_field_decls): Fix typo.
4146
4147 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
4148
4149         PR c++/8067
4150         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
4151         related variables.
4152
4153         PR c++/7679
4154         * spew.c (next_token): Do not return an endless stream of
4155         END_OF_SAVED_INPUT tokens.
4156         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
4157         the cached token stream.
4158         (snarf_defarg): Likewise.
4159
4160 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
4161
4162         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
4163         variably_modified_type_p.
4164         * cp-tree.h: Remove prototype of variably_modified_type_p.
4165         * tree.c (variably_modified_type_p): Remove; now implemented
4166         in language-independent code.
4167
4168 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
4169
4170         PR c++/6579
4171         * spew.c (snarf_parenthesized_expression): New function.
4172         (snarf_block): Use it.
4173
4174 2002-10-22  Richard Henderson  <rth@redhat.com>
4175
4176         * method.c (use_thunk): Always compute vcall_value; assert that
4177         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
4178         for vcall thunks as well.
4179
4180 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
4181
4182         * class.c (empty_base_at_nonzero_offset_p): New function.
4183         (layout_nonempty_base_or_field): Do not check for conflicts when
4184         laying out a virtual base using the GCC 3.2 ABI.
4185         (build_base_field): Correct checking for presence of empty classes
4186         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
4187
4188         * class.c (include_empty_classes): Use normalize_rli.
4189         (layout_class_type): Likewise.
4190
4191         * decl.c (reshape_init): Tweak handling of character arrays.
4192
4193         PR c++/8218
4194         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
4195         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
4196         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
4197         (check_field_decls): Likewise.
4198         (layout_class_type): Likewise.
4199         (finish_struct_1): Initialize it.
4200         (walk_subobject_offsets): Use it to prune searches.
4201
4202 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
4203
4204         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
4205         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
4206         TARGET_ASM_OUTPUT_MI_THUNK in comments.
4207
4208 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
4209
4210         * decl.c (start_decl): Point users of the old initialized-
4211         typedef extension at __typeof__.
4212
4213 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
4214
4215         * Make-lang.in (method.o): Depend on TARGET_H.
4216         * method.c (target.h): Include it.
4217         (use_thunk): Use target hooks.  Use vcall thunks, if available.
4218
4219 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
4220
4221         * class.c (base_derived_from): Make sure return value is a bool.
4222
4223 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
4224
4225         * class.c (find_final_overrider_data_s): Remove overriding_fn and
4226         overriding_base.
4227         (dfs_base_derived_from): New function.
4228         (base_derived_from): Likewise.
4229         (dfs_find_final_overrider): Use base_derived_from.
4230         (find_final_overrider): Adjust.
4231
4232 2002-10-18  Jason Merrill  <jason@redhat.com>
4233
4234         PR c++/8080
4235         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
4236         with condition decls in a template.
4237
4238 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
4239
4240         * class.c (add_method): Compare template parms too.
4241
4242 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
4243
4244         PR c++/7584
4245         * class.c (handle_using_decl): Allow the declaration used to be
4246         from an ambiguous base.
4247
4248         * pt.c (convert_template_argument): Revert this change:
4249                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
4250                 * pt.c (convert_template_argument): Do not fold non-type
4251                 template rguments when inside a template.
4252
4253         * init.c (expand_default_init): Handle brace-enclosed initializers
4254         correctly.
4255
4256 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
4257
4258         * mangle.c (write_expression): Correct handling of enumeration
4259         constants.
4260         (write_template_arg): Likewise.
4261         * pt.c (convert_template_argument): Do not fold non-type template
4262         arguments when inside a template.
4263
4264         PR c++/7478
4265         * cvt.c (convert_to_reference): Allow references as the incoming
4266         type.
4267
4268 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
4269
4270         PR c++/7524
4271         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
4272         build_qualified_type.
4273
4274 2002-10-15  Richard Henderson  <rth@redhat.com>
4275
4276         * error.c (dump_expr): Use real_to_decimal directly, and with
4277         the new arguments.
4278
4279 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
4280
4281         * decl.c (reshape_init): Fix typo.
4282
4283         * cp-tree.h (operator_name_info_t): Add arity.
4284         * lex.c (init_operators): Initialize it.
4285         * mangle.c (write_conversion_operator_name): New function.
4286         (write_unqualified_name): Use it.
4287         (write_template_args): Accept template arguments as a TREE_LIST.
4288         (write_expression): Adjust handling of qualified names to match
4289         specification.
4290
4291 2002-10-15  Jason Merrill  <jason@redhat.com>
4292
4293         * call.c (call_builtin_trap): New fn.
4294         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
4295         (build_call): Don't set current_function_returns_abnormally outside
4296         a function.
4297
4298 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
4299
4300         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
4301         clear CLASSTYPE_EMPTY_P.
4302         (build_base_field): Likewise.
4303         (build_base_fields): Likewise.
4304         (check_bases_and_members): Likewise.
4305         (create_vtbl_ptr): Likewise.
4306         (layout_class_type): Likewise.  Ensure that empty classes have
4307         size zero when used as base classes in the 3.2 ABI.
4308         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
4309         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
4310         parameter.
4311         (is_empty_class): Correct definition when using post-3.2 ABI.
4312         * cp-tree.h (lang_type_class): Add empty_p.
4313         (CLASSTYPE_EMPTY_P): New macro.
4314
4315 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
4316
4317         * init.c (build_delete): Do not apply save_expr for arrays.
4318         (build_vec_delete): Likewise.
4319
4320 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
4321
4322         * decl.c (layout_var_decl): Call layout_decl even for variables
4323         whose type is an array with unspecified bounds.
4324
4325         PR c++/7176
4326         * lex.c (do_identifier): Add another option for the parsing
4327         parameter.
4328         * parse.y (do_id): Use it.
4329
4330 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4331
4332         PRs C++/6803, C++/7721 and C++/7803
4333         * decl.c (grokdeclarator): Gracefully handle template-name as
4334         decl-specifier.
4335
4336 2002-10-11  Jason Molenda  <jmolenda@apple.com>
4337
4338         * init.c (build_field_list): Provide uses_unions_p with a default
4339         value.
4340
4341 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
4342
4343         PR c++/5661
4344         * cp-tree.h (variably_modified_type_p): New function.
4345         (grokdeclarator) Tighten check for variably modified types as
4346         fields.
4347         * pt.c (convert_template_argument): Do not allow variably modified
4348         types as template arguments.
4349         * tree.c (variably_modified_type_p): New function.
4350
4351         * NEWS: Document removal of "new X = ..." extension.
4352         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
4353         brace-enclosed initializers.
4354         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
4355         (initialize_local_var): Remove declaration.
4356         (expand_static_init): Likewise.
4357         * decl.c (next_initializable_field): New function.
4358         (reshape_init): Likewise.
4359         (check_initializer): Use them.  Build dynamic initializer for
4360         aggregates here too.
4361         (initialize_local_var): Simplify, and incorporate cleanup
4362         insertion code as well.
4363         (destroy_local_var): Remove.
4364         (cp_finish_decl): Tidy.
4365         (expand_static_init): Fold checks for whether or not a variable
4366         needs initialization into this function.  Simplify.
4367         * decl2.c (do_static_initialization): Simplify.
4368         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
4369         be done for us automatically.
4370         (expand_default_init): Handle brace-enclosed initializers
4371         correctly.
4372         (expand_aggr_init_1): Remove RTL-generation code.
4373         (build_vec_init): Remove "new X = ..." support.
4374         * parse.y (new_initializer): Likewise.
4375         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
4376         brace-enclosed initializer.
4377         (create_pseudo_type_info): Likewise.
4378         * typeck2.c (store_init_value): Don't try to handle digest_init
4379         being called more than once.
4380         (digest_init): Tidy handling of brace-enclosed initializers.
4381
4382 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4383
4384         * decl.c (typename_hash): Use htab_hash_pointer.
4385
4386 2002-10-10  Jim Wilson  <wilson@redhat.com>
4387
4388         * decl.c (duplicate_decls): Don't call decl_attributes.
4389
4390 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
4391
4392         PR c/7353
4393         * decl.c (start_decl): Unconditionally issue error for
4394         'typedef foo = bar'.
4395         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
4396         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
4397
4398 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4399
4400         * decl2.c (prune_vtable_vardecl): Delete unused function.
4401
4402 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
4403
4404         PR c++/7754
4405         * decl2.c (finish_anon_union): Do not expand anonymous unions when
4406         procesing template functions.
4407         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
4408         type. Call layout_decl.
4409         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
4410
4411 2002-10-07  Richard Henderson  <rth@redhat.com>
4412
4413         * decl2.c, pt.c: Revert c++/7754 fix.
4414
4415 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4416
4417         PR c++/7804
4418         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
4419
4420 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
4421
4422         PR c++/7931
4423         * pt.c (for_each_template_parm_r): Handle BASELINKs.
4424
4425         PR c++/7754
4426         * decl2.c (finish_anon_union): Do not expand anonymous unions when
4427         procesing template functions.
4428         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
4429         type. Call layout_decl.
4430         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
4431
4432 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
4433
4434         PR c++/8006
4435         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
4436         template parameters.
4437         (globals): Add entity and need_abi_warning.
4438         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
4439         CLASSTYPE_TEMPLATE_INFO.
4440         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
4441         TYPE_TI_TEMPLATE.
4442         (write_prefix): Handle typename types correctly.
4443         (write_template_prefix): Handle template template parameters
4444         correctly.
4445         (start_mangling): Add entity parameter.
4446         (finish_mangling): Warn about names whose mangling will change.
4447         (mangle_decl_string): Adjust.
4448         (mangle_type_string): Likewise.
4449         (mangle_special_for_type): Likewise.
4450         (mangle_ctor_vtbl_for_type): Likewise.
4451         (mangle_thunk): Likewise.
4452         (mangle_guard_variable): Likewise.
4453         (mangle_ref_init_variable): Likewise.
4454
4455 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
4456
4457         PR c++/7188.
4458         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
4459         * cp-tree.h (emit_base_init): Rename to ....
4460         (emit_mem_initializers): ... this.
4461         (expand_member_init): Change prototype.
4462         * init.c (perform_member_init): Compute explicit, rather than
4463         requiring it as a parameter.
4464         (sort_member_init): Rename to ...
4465         (sort_mem_initializers): ... this.  Process bases and data members
4466         together.
4467         (sort_base_init): Remove.
4468         (emit_base_init): Rename to ...
4469         (emit_mem_initializers): ... this.
4470         (expand_aggr_vbase_init_1): Remove.
4471         (construct_virtual_bases): Rename to ...
4472         (construct_virtual_base): ... this.
4473         (expand_member_init): Rework handling of base initializers.
4474         * method.c (do_build_copy_constructor): Use
4475         finish_mem_initializers.
4476         * parse.y (member_init): Adjust calls to expand_member_init.
4477         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
4478         (tsubst_initializer_list): Use expand_member_init.
4479         * semantics.c (finish_mem_intiailizers): Simplify.
4480
4481 2002-10-02  Matt Austern  <austern@apple.com>
4482         * decl.c (walk_vtables_r): Fixed typo that caused result to
4483         never get a nonzero value.
4484
4485 2002-10-02  Roger Sayle  <roger@eyesopen.com>
4486
4487         PR optimization/6627
4488         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
4489         from here, and move it to tree.h.
4490         * decl.c (cxx_init_decl_processing): If storing the vbit
4491         in function pointers, ensure that force_align_functions_log
4492         is atleast one.
4493
4494 2002-10-02  Matt Austern  <austern@apple.com>
4495
4496         * class.c (check_field_decls): Changed warning about const member
4497         variables so that it doesn't get issued for a class aggregate.
4498
4499 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
4500
4501         * decl.c (cp_finish_decl): Make sure array types are laid out,
4502         even if the array bounds are unknown.
4503
4504 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
4505
4506         * class.c (build_vtbl_initializer): Change build_c_cast
4507         to build1.
4508
4509 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
4510
4511         * decl.c (cp_finish_decl): Make sure array types are laid out,
4512         even if the array bounds are unknown.
4513
4514         * decl.c (cp_finish_decl): Correct check for dynamic
4515         initialization of thread-local storage.
4516
4517 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
4518
4519         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
4520         overloaded.
4521
4522 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
4523
4524         * class.c (build_vtbl_initializer): Add cast.
4525         (add_vcall_offset_vtbl_entries_1):
4526         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
4527
4528 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
4529
4530         * class.c (walk_subobject_offsets): Correct the calculation of
4531         offsets for virtual bases.  Correct the counting of array
4532         elements.
4533         (layout_nonempty_base_or_field): Simplify.  Correct the
4534         calculation of offsets to be propagated through the binfo
4535         hierarchy.
4536         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
4537         Add the FIELD_DECL to TYPE_FIELDS.
4538         (build_base_fields): Adjust accordingly.
4539         (layout_virtual_bases): Use build_base_field.
4540         (end_of_class): Return a tree, not an integer.
4541         (warn_about_ambiguous_direct_bases): Rename to ...
4542         (warn_about_ambiguous_bases): ... this.
4543         (include_empty_classes): New function.
4544         (layout_class_type): Create an alternative version of the type to
4545         be used when as a base class type.  Do not call
4546         finish_record_layout until we are done laying out the class.
4547         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
4548         as_base.
4549         (CLASSTYPE_SIZE): Reimplement.
4550         (CLASSTYPE_SIZE_UNIT): Likewise.
4551         (CLASSTYPE_ALIGN): Likweise.
4552         (CLASSTYPE_USER_ALIGN): Likewise.
4553         (CLASSTYPE_AS_BASE): New macro.
4554         (DECL_INITIALIZED_P): Likewise.
4555         (extract_init): Remove prototype.
4556         (build_forced_zero_init): Rename to ...
4557         (build_zero_init): ... this.
4558         (force_store_init_value): Remove.
4559         * decl.c (obscure_complex_init): Remove.
4560         (duplicate_decls): Copy DECL_INITIALIZED_P.
4561         (check_initializer): Do not leave junk in DECL_INITIAL.
4562         (cp_finish_decl): Handle zero-initialization of entities with
4563         static storage duration.
4564         * expr.c (extract_init): Remove.
4565         * init.c (build_forced_zero_init): Remove.
4566         (build_zero_init): New function.
4567         (build_default_init): Use it.
4568         (build_field_list): Skip FIELD_DECLs for base subobjects.
4569         (push_base_cleanups): Likewise.
4570         * method.c (do_build_assign_ref): Likewise.
4571         (synthesize_exception_spec): Likewise.
4572         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
4573         (regenerate_decl_from_template): To not set DECL_INITIAL for a
4574         static data member whose initialization took place in its class.
4575         (instantiate_decl): Do not pass an initializer to cp_finish_decl
4576         in that situation.
4577         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
4578         (dfs_unuse_fields): Likewise.
4579         * tree.c (pod_type_p): Handle error_mark_node.
4580         (zero_init_p): Likewise.
4581         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
4582         subobjects.
4583         * typeck2.c (store_init_value): Remove #if 0'd code.
4584         (force_store_init_value): Remove.
4585         (process_init_constructor): Use build_zero_init.
4586
4587 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
4588
4589         PR c++/7788
4590         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
4591
4592 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
4593
4594         * cp-tree.h: Fix comment typos.
4595         * decl.c: Likewise.
4596         * pt.c: Likewise.
4597
4598 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
4599
4600         * cp/class.c (contains_empty_class_p): New method.
4601         (walk_subobject_offsets): Correct computation of field offset.
4602         (layout_empty_base): Correct placement of emtpy base classes.
4603         (layout_class_type): Warn about ABI changes.
4604
4605 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
4606
4607         * cp/class.c (layout_virtual_bases): Do not round the size of the
4608         type to a multiple of the alignment before laying out virtual bases.
4609         (layout_class_type): Correct handling of bit-fields that are wider
4610         than their type inside unions.  Round the size of the type to a
4611         even number of bytes when computing the size without virtual
4612         bases.
4613         * cp/cp-tree.h (abi_version_at_least): New macro.
4614
4615 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
4616
4617         * ChangeLog: Follow spelling conventions.
4618         * ChangeLog.2: Likewise.
4619         * call.c: Likewise.
4620         * class.c: Likewise.
4621         * cp-tree.h: Likewise.
4622         * cvt.c: Likewise.
4623         * decl.c: Likewise.
4624         * decl2.c: Likewise.
4625         * except.c: Likewise.
4626         * friend.c: Likewise.
4627         * g++spec.c: Likewise.
4628         * init.c: Likewise.
4629         * lex.c: Likewise.
4630         * mangle.c: Likewise.
4631         * method.c: Likewise.
4632         * operators.def: Likewise.
4633         * optimize.c: Likewise.
4634         * pt.c: Likewise.
4635         * rtti.c: Likewise.
4636         * search.c: Likewise.
4637         * semantics.c: Likewise.
4638         * spew.c: Likewise.
4639         * tree.c: Likewise.
4640         * typeck.c: Likewise.
4641
4642 2002-09-18  Devang Patel  <dpatel@apple.com>
4643
4644         * cp/cp-tree.h: New prototype for walk_vtabls().
4645         * cp/decl.c (walk_vtables_r): New function.
4646         (struct cp_binding_level): Add new members, namespaces,
4647         names_size and vtables.
4648         (add_decl_to_level): Add decl in namespaces or vtables
4649         chain, if conditions match.
4650         (walk_vtables): New function.
4651         (walk_namespaces_r): Travers separate namespace chain
4652         for namespace decls.
4653         (wrapup_globals_for_namespace): Use names_size instead
4654         of list_length().
4655         * cp/decl2.c (finish_file): Use walk_vtables() instead of
4656         walk_globals() to walk vtable decls.
4657
4658 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
4659
4660         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
4661         ICE with invalid pointers & references.
4662
4663 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
4664
4665         * Make-lang.in: Remove all references to the demangler.
4666         * cxxfilt.c: Moved to binutils.
4667
4668 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
4669
4670         PR c++/7718
4671         * pt.c (tsubst_decl): Remove assert.
4672
4673         Remove DR 295 implementation.
4674         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
4675         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
4676         about ignoring volatile qualifiers.
4677
4678         * search.c (lookup_member): Correct documentation.
4679
4680 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
4681
4682         * cp-tree.h (union lang_tree_node): Add chain_next option.
4683
4684 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
4685
4686         * parse.y (parse_finish_call_expr): Check lookup_member result.
4687
4688         PR c++/7015
4689         * semantic.c (finish_asm_stmt): Fix operand/output_operands
4690         thinko.
4691         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
4692
4693 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
4694
4695         PR c++/7919
4696         * call.c (build_over_call): Convert this pointer for fns found by
4697         using decls.
4698
4699 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
4700
4701         * ChangeLog: Follow spelling conventions.
4702         * ChangeLog.1: Likewise.
4703
4704 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
4705
4706         PR c++/7768
4707         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
4708
4709 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
4710
4711         * error.c: Fix comment formatting.
4712         * except.c: Likewise.
4713         * expr.c: Likewise.
4714         * friend.c: Likewise.
4715         * g++spec.c: Likewise.
4716         * init.c: Likewise.
4717         * lex.c: Likewise.
4718         * mangle.c: Likewise.
4719         * method.c: Likewise.
4720         * optimize.c: Likewise.
4721         * pt.c: Likewise.
4722         * rtti.c: Likewise.
4723         * search.c: Likewise.
4724         * semantics.c: Likewise.
4725         * spew.c: Likewise.
4726         * tree.c: Likewise.
4727         * typeck.c: Likewise.
4728         * typeck2.c: Likewise.
4729
4730 2002-09-13  Matt Austern  <austern@apple.com>
4731
4732         PR C++/7828
4733         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
4734         * cp/call.c: Change call-by-const-reference mechanism to use
4735         non_cast_lvalue_p when deciding whether the create a temporary.
4736         We need a temporary when passing, e.g. (long) x by const ref.
4737
4738 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
4739
4740         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
4741
4742 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
4743
4744         * decl.c: Fix comment formatting.
4745         * decl2.c: Likewise.
4746
4747 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
4748
4749         * call.c: Fix comment formatting.
4750         * class.c: Likewise.
4751         * cp-lang.c: Likewise.
4752         * cp-tree.h: Likewise.
4753         * cvt.c: Likewise.
4754
4755 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
4756
4757         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
4758         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
4759         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
4760         minor adjustments (use version_string, eliminate yet another
4761         duplicate of xmalloc)
4762
4763 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4764
4765         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
4766
4767 2002-09-05  Jason Merrill  <jason@redhat.com>
4768
4769         * typeck2.c (add_exception_specifier): Only pedwarn for an
4770         incomplete type.
4771         (require_complete_eh_spec_types): New fn.
4772         (cxx_incomplete_type_diagnostic): Also support pedwarning.
4773         * typeck.c (complete_type_or_diagnostic): Likewise.
4774         * call.c (build_call): Call require_complete_eh_spec_types.
4775         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
4776         on an incomplete type.
4777
4778 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
4779
4780         * decl.c (start_cleanup_fn): Clear interface_only before
4781         start_function, restore it afterwards.
4782
4783 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
4784
4785         * cp-tree.h (finish_builtin_type): Remove.
4786         * decl2.c (finish_builtin_type): Move to common code.
4787         * decl.c (build_ptrmemfunc_type): Adjust.
4788         * rtti.c (create_pseudo_type_info): Adjust.
4789         (create_tinfo_types): Adjust.
4790
4791 2002-08-31  Jason Merrill  <jason@redhat.com>
4792
4793         * cp-lang.c (cp_expr_size): Allow initialization from a
4794         CONSTRUCTOR.
4795
4796 2002-08-30  Richard Henderson  <rth@redhat.com>
4797
4798         PR opt/7515
4799         * tree.c: Include target.h.
4800         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
4801         don't bind locally.
4802         * Makefile.in (tree.o): Update.
4803
4804 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
4805
4806         * class.c (layout_virtual_bases): Warn about bugs in G++ that
4807         result in incorrect object layouts.
4808         (layout_class_type): Likewise.
4809
4810 2002-08-24  Matt Austern  <austern@apple.com>
4811
4812         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
4813         are allowable.
4814         (real_lvalue_p): Update caller.
4815         (lvalue_p): Ditto.
4816         (non_cast_lvalue_or_else): New.
4817         * tree.h: Declare it.
4818         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
4819
4820 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
4821
4822         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
4823         and COND_EXPR specially; fix error message output.
4824
4825 2002-08-22  Jason Merrill  <jason@redhat.com>
4826
4827         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
4828         * semantics.c (nullify_returns_r): Likewise.
4829
4830 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4831
4832         Fix PR/7621
4833         * typeck.c (finish_class_member_access_expr): Diagnose cases where
4834         name lookup finds nothing.
4835
4836 2002-08-15  Jason Merrill  <jason@redhat.com>
4837
4838         * semantics.c (finish_then_clause): Remove redundant assignment.
4839         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
4840         extra binding level outside the if/switch statement.
4841         (finish_while_cond, finish_for_cond): Rewrite complex condition
4842         into the loop body.
4843
4844 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
4845
4846         * parse.y (sizeof, alignof, typeof): New non-terminals to
4847         increment skip_evaluation.  Replace terminals with them and
4848         decrement skip_evaluation at the end of rules using them.
4849         * decl2.c (mark_used): Don't assemble_external if
4850         skipping evaluation.
4851
4852 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
4853
4854         Fix PR/7504
4855         * parse.y (parse_finish_call_expr): Handle incomplete
4856         type used to name a scope.
4857
4858 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
4859
4860         PR c++/7598
4861         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
4862         regression caused by my 2002-08-08 patch.
4863
4864 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
4865
4866         * decl.c (pushdecl_class_level): Honor requests to bind names to
4867         OVERLOADs.
4868
4869 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4870
4871         * decl2.c (build_call_from_tree): Fix uninitialized variable.
4872         * parse.y (parse_finish_call_expr): Likewise.
4873         * repo.c (old_args, old_dir, old_main): Const-ify.
4874
4875 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
4876
4877         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
4878         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
4879         * optimize.c (maybe_clone_body): Likewise.
4880         * pt.c (tsubst_enum): Likewise.
4881         (lookup_template_class): Likewise.
4882         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
4883
4884 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
4885
4886         * lang-specs.h: Remove -ansi.
4887
4888 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
4889
4890         * tree.c (maybe_dummy_object): Replace // with /* */
4891
4892 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
4893
4894         * call.c (standard_conversion): Use build_ptrmem_type.
4895         * cp-tree.h (build_ptrmem_type): New function.
4896         (adjust_result_of_qualified_name_lookup): Likewise.
4897         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
4898         static data members.
4899         (build_ptrmem_type): New function.
4900         (grokdeclarator): Do not use build_offset_type when encountering a
4901         qualified name.
4902         * parse.y (parse_finish_call_expr): Use
4903         adjust_result_of_qualified_name_lookup.
4904         * search.c (adjust_result_of_qualified_name_lookup): New function.
4905         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
4906         accessing OFFSET_TYPEs directly.
4907
4908 2002-08-08  Mike Stump  <mrs@apple.com>
4909
4910         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
4911         (type_decays_to): Likewise.
4912         * class.c (find_final_overrider): Likewise.
4913         (maybe_note_name_used_in_class): Likewise.
4914         * decl.c (current_tmpl_spec_kind): Likewise.
4915         (add_binding): Likewise.
4916         (push_class_binding): Likewise.
4917         (duplicate_decls): Likewise.
4918         (layout_var_decl): Likewise.
4919         (grokfndecl): Likewise.
4920         (grokdeclarator): Likewise.
4921         (check_default_argument): Likewise.
4922         * decl2.c (handle_class_head): Likewise.
4923         * error.c (dump_template_decl): Likewise.
4924         * init.c (build_offset_ref): Likewise.
4925         * pt.c (check_specialization_scope): Likewise.
4926         (determine_specialization): Likewise.
4927         (check_explicit_specialization): Likewise.
4928         (maybe_check_template_type): Likewise.
4929         (process_partial_specialization): Likewise.
4930         (check_default_tmpl_args): Likewise.
4931         (push_template_decl_real): Likewise.
4932         (convert_template_argument): Likewise.
4933         (try_class_unification): Likewise.
4934         (get_bindings_real): Likewise.
4935         (do_decl_instantiation): Likewise.
4936         * semantics.c (begin_function_definition): Likewise.
4937         (finish_member_declaration): Likewise.
4938         (check_multiple_declarators): Likewise.
4939         * typeck.c (comp_array_types): Likewise.
4940         (comptypes): Likewise.
4941         (expr_sizeof): Likewise.
4942         (build_binary_op): Likewise.
4943         (dubious_conversion_warnings): Likewise.
4944         (check_return_expr): Likewise.
4945
4946 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
4947
4948         * typeck.c (build_class_member_access_expr): Do not return
4949         error_mark_node when no error has occurred.
4950
4951 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4952
4953         * typeck.c (build_component_addr): Remove.
4954         (build_unary_op): Just check it's not a bitfield, and then build
4955         an ADDR_EXPR.
4956
4957 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4958
4959         * class.c (convert_to_base): Correct check for error_mark_node.
4960         (create_vtable_ptr): Remove unused VFUNS_P parm.
4961
4962 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4963
4964         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
4965
4966 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
4967
4968         Rework build_component_ref.
4969         * call.c (build_vfield_ref): Do not go through build_component_ref.
4970         (build_field_call): Use build_class_member_access_expr.
4971         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
4972         (build_object_call): Likewise.
4973         * class.c (convert_to_base): New function.
4974         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
4975         (instantiate_type): Handle BASELINKs.
4976         * cp-tree.def (BASELINK): New tree code.
4977         * cp-tree.h (BASELINK_P): Reimplement.
4978         (SET_BASELINK_P): Remove.
4979         (BASELINK_BINFO): Reimplement.
4980         (BASELINK_FUNCTIONS): Likewise.
4981         (BASELINK_ACCESS_BINFO): Likewise.
4982         (BASELINK_OPTYPE): Likewise.
4983         (convert_to_base): New function.
4984         (name_p): Likewise.
4985         (build_object_ref): Remove.
4986         (build_component_ref_1): Likewise.
4987         (build_component_ref): Likewise.
4988         (build_x_component_ref): Likewise.
4989         (build_class_member_access_expr): New function.
4990         (finish_class_member_access_expr): Likewise.
4991         (build_ptrmemfunc_access_expr): Likewise.
4992         * decl.c (grokdeclarator): Handle BASELINKs.
4993         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
4994         finish_class_member_access_expr.
4995         (arg_assoc): Handle BASELINKs.
4996         (do_class_using_decl): Likewise.
4997         * error.c (dump_decl): Likewise.
4998         (dump_expr): Use build_ptrmemfunc_access_expr.
4999         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
5000         destructors.
5001         (build_throw): Use BASELINK_FUNCTIONS.
5002         * init.c (perform_member_init): Use
5003         build_class_member_access_expr.
5004         (build_offset_ref): Handle BASELINKs.  Use
5005         build_class_member_access_expr.
5006         * method.c (hack_identifier): Likewise.
5007         * parse.y (do_id): Use BASELINK, not TREE_LIST.
5008         (primary): Remove uses of build_object_ref.
5009         * pt.c (lookup_template_function): Handle BASELINKs.
5010         (resolve_overloaded_unification): Likewise.
5011         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
5012         (lookup_field): Use BASELINK, not TREE_LIST.
5013         (lookup_fnfiels): Likewise.
5014         (setup_class_bindings): Likewise.
5015         * semantics.c (finish_object_call_expr): Do not use
5016         build_method_call when we already know what function is being
5017         called.
5018         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
5019         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
5020         TREE_CHAIN.
5021         (name_p): New function.
5022         * typeck.c (build_object_ref): Remove.
5023         (build_component_ref_1): Likewise.
5024         (build_x_component_ref): Likewise.
5025         (build_class_member_access_expr): New function.
5026         (finish_class_member_access_expr): Likewise.
5027         (build_ptrmemfunc_access_expr): Likewise.
5028         (get_member_function_from_ptrfunc): Use
5029         build_ptrmemfunc_access_expr.
5030         (build_binary_op): Likewise.
5031         (build_unary_op): Likewise.
5032         (build_ptrmemfunc): Likewise.
5033         (pfn_from_ptrmemfunc): Likewise.
5034         * typeck2.c (build_m_component_ref): Adjust comment.
5035
5036 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
5037
5038         * Make-lang.in (CXX_C_OBJS): Update.
5039         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
5040         * cp-tree.h (cxx_decode_option): Remove.
5041         * decl2.c (compare_options, lang_f_options, unsupported_options,
5042         cxx_decode_option): Remove.
5043
5044 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
5045
5046         * typeck.c (build_x_unary_op): Handle pointer-to-member.
5047
5048 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
5049
5050         * class.c: Don't include obstack.h.
5051         (popclass):
5052         * decl2.c: Delete bogus comment.
5053         * error.c: Don't include obstack.h.
5054         * except.c: Likewise.
5055         (dump_type): Correct comment.
5056         * method.c: Don't include obstack.h.
5057         * tree.c: Likewise.
5058
5059 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
5060
5061         Fix PR/2213
5062         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
5063         expressions to pointer-to-data-member of pointer-to-member-functions.
5064
5065 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
5066
5067         * cvt.c (ocp_convert): Delete obsolete code.
5068         * parse.y (permanent_obstack): Delete declaration.
5069         * pt.c (permanent_obstack): Delete declaration.
5070         * repo.c (permanent_obstack): Delete declaration.
5071         (open_repo_file): Use xmalloc instead of permanent_obstack.
5072         (init_repo): Use xstrdup instead of permanent_obstack.
5073
5074 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
5075
5076         * cp-tree.h (VF_DERIVED_VALUE): Remove.
5077         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
5078
5079 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
5080
5081         PR 7470.
5082         C++ ABI change - vfunc ordering.
5083         * class.c (add_virtual_function): Remove.
5084         (dfs_modify_all_vtables): Take list of all declared
5085         virtuals. Assign all that are not in primary base.
5086         (check_for_override): Adjust comments.
5087         (create_vtable_ptr): Take single list of virtuals. Build chain
5088         of declared virtuals here.
5089         (layout_class_type): Take single list of virtuals. Adjust.
5090         (finish_struct_1): Keep virtuals on single list. Adjust.
5091
5092 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
5093
5094         * init.c (build_member_call): Use build_new_method_call, not
5095         build_method_call.
5096
5097 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
5098
5099         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
5100
5101 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
5102
5103         * call.c (build_method_call): Issue a more helpful error message
5104         about ambiguous method names.
5105
5106 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
5107
5108         * tree.c (build_shared_int_cst): Make cache file scope, and
5109         GTY it.
5110
5111 2002-08-02  Jason Merrill  <jason@redhat.com>
5112
5113         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
5114         (cp_expr_size): New fn.
5115         * call.c (build_over_call): Lose empty class hackery.
5116         (convert_arg_to_ellipsis): Promote non-POD warning to error.
5117         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
5118
5119         * semantics.c (expand_body): Do tree optimization in the function
5120         context, too.
5121
5122 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
5123
5124         * cp-tree.h: Move all warning and flag declarations to c-common.h.
5125         * decl.c: Move all warning and flag variables to c-common.c.
5126         * decl2.c: Move all warning and flag variables to c-common.c.
5127         * lex.c (flag_digraphs): Remove.
5128         (warn_traditional): Now in c-common.c.
5129
5130 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
5131
5132         * call.c (build_field_call): Do not look up the field by name.
5133         (build_method_call): Simplify.
5134         (struct z_candidate): Add access_path and conversion_path.  Remove
5135         basetype_path.
5136         (convert_class_to_reference): Adjust use of
5137         add_function_candidate.
5138         (add_candidate): Add conversion_path argument.
5139         (add_function_candidate): Use it.
5140         (add_conv_dndidate): Likewise.
5141         (build_builtin_candidate): Likewise.
5142         (add_template_candidate_real): Add conversion_path argument.
5143         (add_template_conv_candidate): Likewise.
5144         (add_template_candidate): Likewise.
5145         (build_user_type_conversion_1): Use it.
5146         (build_new_function_call): Remove name lookup code.  Adjust use of
5147         add_template_candidate and add_function_candidate.
5148         (build_new_op): Likewise.
5149         (convert_like_real): Use build_special_member_call.
5150         (build_over_call): Use cand->conversion_path.
5151         (build_special_member_call): New method.
5152         (build_new_method_call): Remove name lookup code.
5153         * cp-tree.def (OFFSET_REF): Update documentation.
5154         (TEMPLATE_ID_EXPR): Likewise.
5155         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
5156         (BASELINK_OPTYPE): Likewise.
5157         (build_new_method_call): Adjust prototype.
5158         (build_special_member_call): New method.
5159         (build_baselink): New method.
5160         (build_offset_ref_call_from_tree): Likewise.
5161         (build_call_from_tree): Likewise.
5162         (finish_qualified_call_expr): Remove.
5163         (finish_call_expr): Adjust prototype.
5164         (build_x_function_call): Remove.
5165         * cvt.c (ocp_convert): Use build_special_member_call.
5166         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
5167         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
5168         CALL_EXPR.
5169         (build_offset_ref_call_from_tree): New function.
5170         (build_call_from_tree): Likewise.
5171         * init.c (expand_cleanup): Use build_special_member_call.
5172         (expand_default_init): Likewise.
5173         (build_member_call): Use finish_call_expr.
5174         (build_new_1): Use build_special_member_call.
5175         (push_base_cleanups): Likewise.
5176         * method.c (do_build_assign_ref): Likewise.
5177         * parse.y (template_id): Do not pass a COMPONENT_REF to
5178         lookup_template_function.
5179         (primary): Use parse_finish_call_epxr, not finish_call_expr.
5180         (parse_finish_call_expr): New function.
5181         * pt.c (lookup_template_function): Add assertions.
5182         * search.c (lookup_base): Allow T to be a binfo.
5183         (build_baselink): New function.
5184         (lookup_member): Use it.
5185         * semantics.c (finish_call_expr): Do not do name lookup.
5186         (finish_object_call_expr): Remove #if 0'd code.
5187         (finish_qualified_call_expr): Remove.
5188         * typeck.c (build_x_function_call): Remove.
5189         (build_static_case): Use build_special_member_call.
5190         * typeck2.c (build_functional_cast): Likewise.
5191
5192 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
5193
5194         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
5195
5196 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
5197
5198         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
5199
5200 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
5201
5202         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
5203         documentation.
5204
5205 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
5206
5207         * cp-tree.h: Comment typo fix.
5208
5209 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
5210
5211         * spew.c (space_for_token): Allocate zeroed memory for a new token
5212         chunk.
5213
5214 2002-07-27  Roger Sayle  <roger@eyesopen.com>
5215
5216         * decl.c (builtin_function_1): No need to explicitly mark
5217         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
5218
5219 2002-07-27  Roger Sayle  <roger@eyesopen.com>
5220
5221         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
5222
5223 2002-07-26  Jason Merrill  <jason@redhat.com>
5224
5225         * call.c (build_over_call): Likewise.
5226         (cp_convert_parm_for_inlining): New fn.
5227         (convert_for_arg_passing): New fn.
5228         (convert_default_arg, build_over_call): Use it.
5229         (type_passed_as): New fn.
5230         * pt.c (tsubst_decl): Use it.
5231         * decl2.c (cp_build_parm_decl): New fn.
5232         (build_artificial_parm): Use it.
5233         (start_static_storage_duration_function): Likewise.
5234         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
5235         (grokparms): Don't mess with DECL_ARG_TYPE.
5236         * typeck.c (convert_arguments): Use convert_for_arg_passing.
5237         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
5238         Define.
5239         * cp-tree.h: Declare new fns.
5240
5241 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
5242
5243         * cp-tree.h (flag_operator_names): Remove.
5244         * decl2.c (flag_operator_names): Remove.
5245         (lang_f_options): Remove operator-names.
5246         * lex.c (D_OPNAME): Remove.
5247         (reswords): Remove operator names.
5248         (rid_to_yy): Remove operator names.
5249         (init_reswords): No need to handle D_OPNAME.
5250         * spew.c (read_process_identifier): There are no operator
5251         names.
5252
5253 2002-07-26  Jason Merrill  <jason@redhat.com>
5254
5255         * dump.c (cp_dump_tree): Call c_dump_tree.
5256         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
5257
5258 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
5259
5260         * error.c (print_whitespace): Remove.
5261         * g++spec.c (LIBUNWIND): Move.
5262         * mangle.c (mangled_position, write_signed_number): Remove.
5263
5264 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
5265
5266         * decl2.c (cxx_decode_option): Similarly.
5267
5268 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
5269
5270         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
5271         (cxx_sizeof_or_alignof_type): Take a third argument.
5272         (cxx_sizeof): Adjust definition.
5273         (cxx_alignof): Likewise.
5274         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
5275         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
5276         complaining.
5277         (c_sizeof_nowarn): Remove definition.
5278         (build_unary_op): Use cxx_sizeof_nowarn.
5279
5280 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
5281
5282         * tree.c (cp_build_qualified_type_real): When copying
5283         pointer-to-method types, unshare the record that holds
5284         the cached pointer-to-member-function type.
5285
5286 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
5287
5288         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
5289
5290 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
5291
5292         Fix PR/7363:
5293         * typeck.c (cxx_sizeof_or_alignof_type): New function.
5294         (c_sizeof): Remove definition.
5295         (expr_sizeof): Use cxx_sizeof.
5296         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
5297         * decl.c (finish_destructor_body): Use cxx_sizeof.
5298         * semantics.c (finish_alignof): Likewise.
5299         (finish_alignof): Use cxx_alignof.
5300         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
5301         (cxx_sizeof_or_alignof_type): Declare.
5302         (my_friendly_assert): Move to ../c-common.h.
5303
5304 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
5305
5306         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
5307
5308 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5309
5310         PR c++/7347, c++/7348
5311         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
5312         * decl.c (make_typename_type): Use it.
5313         (make_unbound_class_template): Likewise.
5314         (lookup_name_real): Don't call type_access_control if scope is
5315         template parameter dependent.
5316         * parse.y (template_arg): Call make_unbound_class_template with
5317         tf_parsing set.
5318         (nest_name_specifier): Call make_typename_type with tf_parsing set.
5319         (typename_sub0): Likewise.
5320         (typename_sub1): Likewise.
5321         (instantiate_decl): Push class scope.
5322         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
5323         for both static variable and member function template.
5324         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
5325         and arguments.
5326         * search.c (type_access_control): Do type access for TEMPLATE_DECL
5327         too.
5328
5329 2002-07-20  Roger Sayle  <roger@eyesopen.com>
5330
5331         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
5332         test by using positive_option.  Make whitespace consistent.
5333
5334 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
5335
5336         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
5337         members with 'locus'.  Adjust use throughout.
5338         (struct feed):  Likewise.
5339         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
5340         Adjust use.
5341         (snarf_defarg): Use error(), not error_with_file_and_line().
5342
5343 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
5344
5345         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
5346         cpp_options is included.
5347
5348 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5349
5350         PR c++/2862, c++/2863
5351         * pt.c (determine_specialization): Compare the length of
5352         TYPE_ARG_TYPES.  Tidy.
5353
5354 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5355
5356         PR c++/3797
5357         * decl.c (duplicate_decls): Don't propagate inlining parameters from
5358         olddecl to newdecl when newdecl is a specialization of the
5359         instantiation olddecl.
5360
5361 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5362
5363         PR c++/4802, c++/5387
5364         * decl.c (make_typename_type): Use enforce_access.
5365
5366 2002-07-17  Scott Snyder <snyder@fnal.gov>
5367
5368         PR c++/7320
5369         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
5370
5371 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
5372
5373         * class.c (add_method): Correct handling of conversion operators.
5374
5375 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
5376
5377         PR c++/7224
5378         * class.c (add_method): Simplify.
5379
5380 2002-07-11  Jason Merrill  <jason@redhat.com>
5381
5382         PR c++/7279
5383         * tree.c (cp_copy_res_decl_for_inlining): Also copy
5384         TREE_ADDRESSABLE.
5385
5386 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
5387
5388         * pt.c (template_parm_this_level_p, push_template_decl_real):
5389         Pass depth as int pointer.
5390
5391 2002-07-11  Tim Josling  <tej@melbpc.org.au>
5392
5393         Remove front end hard coding from gengtype.c.
5394
5395         * config-lang.in (gtfiles): Add files needed for this front end.
5396
5397 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
5398
5399         * cp-tree.h (unqualified_name_lookup_error): Declare it.
5400         (begin_function_definition): Adjust prototype.
5401         * lex.c (unqualified_name_lookup_error): New function, split out
5402         from ...
5403         (do_identifier): ... here.
5404         * parse.y (parse_begin_function_definition): New function.
5405         (fn.def1): Use it.
5406         * semantics.c (begin_function_definition): Accept decl-specifiers
5407         and attributes as separate parameters.
5408
5409 2002-07-10  Jason Merrill  <jason@redhat.com>
5410
5411         PR c++/6255
5412         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
5413         modifying the old one.
5414
5415 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
5416
5417         * cp-tree.h (constructor_name_p): Declare it.
5418         (check_template_template_default_arg): Likewise.
5419         * class.c (handle_using_decl): Use constructor_name_p.
5420         * decl.c (grokdeclarator): Likewise.
5421         * decl2.c (constructor_name_p): Define it.
5422         * init.c (build_member_call): Use constructor_name_p.
5423         * parse.y (template_parm): Use check_template_template_default_arg.
5424         * pt.c (check_explicit_specialization): Use constructor_name_p.
5425         * semantics.c (check_template_template_default_arg): New function.
5426
5427 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5428
5429         * pt.c (can_complete_type_without_circularity): Add static to
5430         function definition.
5431
5432 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
5433
5434         * cp-tree.h (have_extern_spec): Declare it
5435         * decl.c (have_extern_spec): Define it.
5436         (start_decl): Eliminate use of used_extern_spec.
5437         (start_function): Likewise.
5438         * parse.y (have_extern_spec): Remove declaration.
5439         (used_extern_spec): Likewise.
5440         (frob_specs): Eliminate use of used_extern_spec.
5441         (.hush_warning): Likewise.
5442
5443 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
5444
5445         * Make-lang.in (cp/parse.o): Depend on decl.h.
5446         * cp-tree.h (do_decl_instantiation): Change prototype.
5447         * parse.y: Include decl.h.
5448         (parse_decl_instantiation): New function.
5449         (explicit_instantiation): Use it.
5450         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
5451         and DECLSPECS.
5452
5453 2002-07-07  Roger Sayle  <roger@eyesopen.com>
5454
5455         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
5456         constructor and destructor tests when passed a TEMPLATE_DECL.
5457
5458 2002-07-05  Jason Merrill  <jason@redhat.com>
5459
5460         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
5461         pointers.
5462
5463         PR optimization/7145
5464         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
5465
5466 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
5467
5468         Repair damage on weak-impared targets caused by my previous patch.
5469         * cp-tree.h (import_export_tinfo): Add parameter.
5470         * decl2.c (import_export_tinfo): Add parameter, post adjust
5471         DECL_COMDAT.
5472         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
5473         import_export_tinfo.
5474
5475 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5476
5477         PR c++/6944
5478         * init.c (build_aggr_init): Remove qualifiers of init before calling
5479         build_vec_init.
5480         (build_vec_init): Flatten multi-dimensional array during cleanup.
5481         (build_vec_delete_1): Abort if the type of each element is array.
5482
5483 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
5484
5485         * pt.c (instantiate_class_template): Fix typo.
5486
5487 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5488
5489         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
5490         by CVS conflict in my last patch.
5491
5492 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5493
5494         PR c++/6716
5495         * pt.c (can_complete_type_without_circularity): New function.
5496         (instantiate_class_template): Use it.
5497         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
5498         message due to incomplete fields.
5499
5500 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
5501
5502         PR c++/7112
5503         * mangle.c (write_expression): Add mangling for sizeof when
5504         applied to a type.
5505         * operators.def: Remove stale comment.
5506
5507 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
5508
5509         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
5510         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
5511         (tinfo_decl_type): Replace with ...
5512         (type_info_ptr_type): ... this.
5513         (import_export_tinfo): Declare.
5514         (tinfo_decl_p): Rename to ...
5515         (unemitted_tinfo_decl_p): ... this.
5516         * decl2.c (import_export_decl): Break out tinfo handling into ...
5517         (import_export_tinfo): ... here. New function.
5518         (finish_file): Adjust.
5519         * rtti.c (TINFO_REAL_NAME): New macro.
5520         (init_rtti_processing): Create the tinfo types.
5521         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
5522         (get_tinfo_decl): Adjust.
5523         (get_tinfo_ptr): New function.
5524         (get_type_id): Use it.
5525         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
5526         (ptr_initializer): Use get_tinfo_ptr.
5527         (ptm_initializer): Likewise.
5528         (synthesize_tinfo_var): Break into ...
5529         (get_pseudo_ti_init): ... this. Just create the initializer.
5530         (get_pseudo_ti_desc): .. and this.
5531         (create_real_tinfo_var): Remove.
5532         (create_pseudo_type_info): Don't create the vtable decl here.
5533         (get_vmi_pseudo_type_info): Remove.
5534         (create_tinfo_types): Adjust.
5535         (tinfo_decl_p): Rename to ...
5536         (unemitted_tinfo_decl_p): ... here. Adjust.
5537         (emit_tinfo_decl): Adjust. Create the initializer.
5538
5539 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
5540
5541         PR c++/6695
5542         * pt.c (tsubst_friend_class): Substitute into the context of the
5543         friend before using it.
5544
5545 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
5546
5547         * cp-tree.h (xref_tag): Change prototype.
5548         (handle_class_head): Likewise.
5549         (build_x_component_ref): Likewise.
5550         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
5551         (xref_tag): Take attributes as a separate parameter.
5552         (xref_tag_from_type): Adjust call to xref_tag.
5553         * decl2.c (build_expr_from_tree): Adjust call to
5554         build_x_component_ref.
5555         (handle_class_head): Take attributes as a separate parameter.
5556         * parse.y (parse_xref_tag): New function.
5557         (parse_handle_class_head): Likewise.
5558         (primary): Use parse_xref_tag.
5559         (class_head_decl): Use parse_handle_class_head.
5560         (class_head_defn): Likewise.
5561         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
5562         (build_dynamic_cast_1): Likewise.
5563         (create_pseudo_type_info): Likewise.
5564         (emit_support_tinfos): Likewise.
5565         * typeck.c (build_object_ref): Adjust call to
5566         build_x_component_ref.
5567         (build_x_component_ref): Remove protect parameter.
5568
5569 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
5570
5571         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
5572         * class.c (handle_using_decl): Likewise.
5573         (instantiate_type): Likewise.
5574         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
5575         (xref_basetypes): Change prototype.
5576         (begin_mem_initializers): New function.
5577         (get_overloaded_fn): Likewise.
5578         * decl.c (xref_basetypes): Simplify.
5579         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
5580         * init.c (build_offset_ref): Likewise.
5581         * parse.y (base_init): Use begin_mem_initializers().
5582         (structsp): Adjust call to xref_basetypes.
5583         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
5584         (instantiate_class_template): Adjust call to xref_basetypes.
5585         * semantics.c (begin_mem_initializers): New function.
5586         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
5587         (really_overlaoded_fn): Likewise.
5588         (get_overloaded_fn): New function.'
5589         (get_first_fn): USe BASELINK_FUNCTIONS.
5590
5591 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
5592
5593         * cp-tree.h (SCALAR_TYPE_P): New macro.
5594         (check_for_out_of_scope_variable): New function.
5595         (at_class_scope_p): Likewise.
5596         (finish_fname): Likewise.
5597         * class.c (finish_struct): Use at_function_scope_p.
5598         * decl.c (check_for_out_of_scope_variable): New function, split
5599         out from do_identifier.
5600         (finish_enum): Use at_function_scope_p.
5601         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
5602         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
5603         (primary): Use at_function_scope_p.
5604         * search.c (at_class_scope_p): New function.
5605         * semantics.c (finish_fname): Likewise.
5606         (check_multiple_declarators): Use at_function_scope_p.
5607
5608 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
5609
5610         * parse.y (parse_scoped_id): New function.
5611         (primary): Use it.
5612         * cp-tree.h (do_scoped_id): Adjust declaration.
5613         * lex.c (do_scoped_id): Remove call to yylex.
5614         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
5615         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
5616         expanding it inline.
5617
5618 2002-06-23  Matt Thomas  <matt@3am-software.com>
5619
5620         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
5621         "#if VMS_TARGET".
5622
5623 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5624
5625         * mangle.c (integer_type_codes): Const-ify.
5626
5627 2002-06-20  Richard Henderson  <rth@redhat.com>
5628
5629         PR c++/6747
5630         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
5631         Call put_var_into_stack.
5632
5633 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5634
5635         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
5636         array size calculation.
5637
5638 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5639
5640         PR c++/6892
5641         * pt.c (tsubst_expr): Handle FILE_STMT.
5642
5643 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5644
5645         PR c++/6723
5646         * pt.c (lookup_template_class): Don't build complete argument of
5647         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
5648         argument.
5649
5650 2002-06-19  Akim Demaille  <akim@epita.fr>
5651
5652         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
5653         decl.h's TYPENAME.
5654         * spew.c, lex.c: Adjust.
5655         * parse.y (explicit_instantiation): Add empty action to override
5656         the default $$ = $1 where it introduces a type clash.
5657
5658 2002-06-14  Jason Merrill  <jason@redhat.com>
5659
5660         * semantics.c (begin_for_stmt): Push the 'for' scope before
5661         adding the FOR_STMT.
5662
5663         C++ ABI changes.
5664         * class.c (build_base_field): Set DECL_PACKED.
5665         (layout_class_type): Don't use tail padding of PODs.
5666         * mangle.c (write_unqualified_name): Fix template conversion op
5667         mangling.
5668
5669 2002-06-16  Richard Henderson  <rth@redhat.com>
5670
5671         PR opt/6793
5672         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
5673         after template instantiation.
5674
5675 2002-06-16  Richard Henderson  <rth@redhat.com>
5676
5677         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
5678
5679 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
5680
5681         * cp-tree.h (compiler_error): Remove declaration.
5682         * lex.c (compiler_error): Remove definition.
5683
5684 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
5685
5686         * g++spec.c (LIBUNWIND): New.
5687         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
5688
5689 2002-06-13  Jessica Han  <jessica@cup.hp.com>
5690
5691         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
5692         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
5693         (build_vbase_offset_vtbl_entries): Likewise.
5694         * rtti.c (build_headof): Likewise.
5695         (get_tinfo_decl_dynamic): Likewise.
5696         (create_pseudo_type_info): Likewise.
5697
5698 2002-06-12  Stan Shebs  <shebs@apple.com>
5699
5700         * mpw-config.in: Remove file, no longer used.
5701         * mpw-make.sed: Ditto.
5702
5703 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
5704
5705         * decl2.c: Update call to cpp_handle_option.
5706
5707 2002-06-07  H.J. Lu  (hjl@gnu.org)
5708
5709         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
5710
5711 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
5712
5713         * error.c (cp_error_at): Fix typo.
5714
5715 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
5716
5717         * error.c (cp_diagnostic_starter): Adjust call.
5718         (maybe_print_instantiation_context): Change prototype to take a
5719         'diagnostic_info *'.
5720         (print_instantiation_full_context): Likewise.
5721         (print_instantiation_partial_context): Likewise.
5722         (cp_diagnostic_starter): Likewise.
5723         (cp_diagnostic_finalizer): Likewise.
5724         (cp_print_error_function): Likewise.
5725         (cp_printer): Take a secondary parameter as a 'text_info *'.
5726         Remove output_state savings.  Adjust calls.
5727
5728 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
5729
5730         * pt.c (inline_parm_levels): Mark for GC.
5731
5732         * mangle.c (start_mangling): Allocate G.substitutions here...
5733         (init_mangle): ... rather than here.
5734         (finish_mangling): Clear the varray pointer when done with it.
5735         * spew.c (yylexstring): Don't use VARRAY_FREE.
5736         * search.c (bfs_walk): Don't use VARRAY_FREE.
5737         * decl2.c (pending_statics): Use gengtype to mark.
5738         (deferred_fns): Likewise.
5739         (ssdf_decls): Likewise.
5740         (init_decl2): Delete.
5741         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
5742         (cxx_init_decl_processing): Don't call init_decl2.
5743         (cxx_pop_function_context): Don't use VARRAY_FREE.
5744         * cp-tree.h (struct saved_scope): No need for special marking
5745         of varrays.
5746         (struct language_function): Likewise.
5747         (local_classes): Use gengtype to mark.
5748         (init_decl2): Delete prototype.
5749         * class.c (init_class_processing): Don't use
5750         ggc_add_tree_varray_root.
5751         (build_vtbl_initializer): Don't use VARRAY_FREE.
5752
5753         * decl.c (typename_compare): Don't use same_type_p.
5754
5755         * decl.c: Include hashtab.h instead of hash.h.
5756         (typename_hash): Update to use htab_h.
5757         (typename_compare): Likewise.
5758         (typename_htab): Use gengtype to mark.
5759         (build_typename_type): Update to use htab_h.
5760         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
5761
5762         * Make-lang.in (gt-cp-tree.h): New rule.
5763         (cp/tree.o): Depend on gt-cp-tree.h.
5764         * config-lang.in (gtfiles): Add cp/tree.c.
5765         * tree.c: Include gt-cp-tree.h.
5766         (list_hash_table): Use gengtype to mark.
5767         (init_tree): Use gengtype to mark trees.
5768
5769         * Make-lang.in (cp/decl.o): Add debug.h dependency.
5770         * call.c (struct z_candidate): Use gengtype.
5771         (USER_CONV_CAND): Use WRAPPER_ZC.
5772         (convert_class_to_reference): Use build_zc_wrapper.
5773         (build_type_conversion_1): Likewise.
5774         (build_over_call): Use WRAPPER_ZC.
5775         (add_warning): Use build_zc_wrapper.
5776         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
5777         * cp-tree.h (struct lang_identifier): Use gengtype.
5778         (struct template_parm_index_s): Likewise.
5779         (struct ptrmem_cst): Likewise.
5780         (struct tree_binding): Likewise.
5781         (struct tree_overload): Likewise.
5782         (struct tree_srcloc): Likewise.
5783         (struct tree_wrapper): Likewise.  Also modify to have a pointer
5784         to struct z_candidate rather than void.
5785         (enum cp_tree_node_structure_enum): New.
5786         (union lang_tree_node): New.
5787         (cxx_mark_tree): Delete prototype.
5788         (cp_tree_node_structure): New prototype.
5789         (build_ptr_wrapper): Delete prototype.
5790         (build_int_wrapper): Delete prototype.
5791         (build_zc_wrapper): New prototype.
5792         * decl.c: Include debug.h
5793         (cxx_mark_tree): Delete.
5794         (cp_tree_node_structure): New.
5795         * tree.c (build_ptr_wrapper): Delete.
5796         (build_int_wrapper): Delete.
5797         (build_zc_wrapper): New.
5798
5799         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
5800         Correct typo.  Patch from k_fukui@highway.ne.jp.
5801
5802         * semantics.c (current_stmt_tree): Update for change to
5803         struct language_function.
5804         (finish_mem_initializers): Likewise.
5805         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
5806         * cp-tree.h (struct language_function): Rename from
5807         cp_language_function.  Change all uses.
5808         (cp_function_chain): Don't need to cast.
5809
5810         * class.c (duplicate_tag_error): Reset discriminator.
5811         (check_bases_and_members): Update for data structure changes.
5812         * cp-tree.h (struct lang_id2): Use gengtype.
5813         (flagged_type_tree): Likewise.
5814         (SET_LANG_ID): Use GGC on struct lang_id2.
5815         (struct cp_language_function): Use gengtype.  Remove field
5816         'x_vcalls_possible_p'.
5817         (current_vcalls_possible_p): Delete.
5818         (struct lang_type_header): New.
5819         (struct lang_type_class): Rename from struct lang_type.  Include
5820         struct lang_type_header.
5821         (struct lang_type_ptrmem): New.
5822         (struct lang_type): New.
5823         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
5824         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
5825         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
5826         (struct lang_decl_flags): Use gengtype.  Add discriminators.
5827         (struct lang_decl): Use gengtype.  Add and use discriminators.
5828         Update the macros that reference moved fields.
5829         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
5830         (SET_DECL_THUNK_P): Set discriminator too.
5831         (clear_inline_text_obstack): Delete prototype.
5832         (finish_inline_definitions): Delete prototype.
5833         (mark_pending_inlines): Delete prototype.
5834         (lang_check_failed): New prototype.
5835         * decl.c (struct named_label_use_list): Use gengtype.
5836         (struct named_label_list): Likewise.
5837         (mark_binding_level): Delete.
5838         (mark_named_label_lists): Delete.
5839         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
5840         (cxx_init_decl_processing): Use generated marker routine.
5841         (begin_destructor_body): Delete dead set to
5842         current_vcalls_possible_p.
5843         (mark_lang_function): Delete.
5844         (mark_cp_function_context): Delete.
5845         (lang_mark_tree): Use generated marker routines.
5846         * decl2.c (start_objects): Set discriminator when setting
5847         GLOBAL_INIT_PRIORITY.
5848         * lex.c (retrofit_lang_decl): Set discriminators.
5849         (copy_lang_type): Update for changes to lang_type structure.
5850         (cp_make_lang_type): Set discriminator.
5851         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
5852         * search.c: Include ggc.h.
5853         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
5854         (finish_inline_definitions): Delete.
5855         * spew.c (struct token): Use gengtype.
5856         (struct token_chunk): New.
5857         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
5858         (struct feed): Use gengtype.
5859         (feed_obstack): Delete.
5860         (feed): Mark as GC root.
5861         (pending_inlines): Mark as GC root.
5862         (pending_inlines_tail): Likewise.
5863         (processing_these_inlines): Likewise.
5864         (token_obstack): Make static.
5865         (first_token): Likewise.
5866         (init_spew): Don't initialize deleted things; use gengtype for roots.
5867         (clear_inline_text_obstack): Delete.
5868         (feed_input): Use GC for struct feed.  Update for changes to
5869         struct unparsed_text.
5870         (mark_pending_inlines): Delete.
5871         (next_token): Rename from add_token.  Change all callers.  Update
5872         for changes to struct unparsed_text.
5873         (space_for_token): New.
5874         (remove_last_token): New.
5875         (alloc_unparsed_text): New.
5876         (snarf_block): Take an unparsed_text.  Update for changes to struct
5877         unparsed_text.
5878         (snarf_method): Update for changes to struct unparsed_text.
5879         (snarf_defarg): Update for changes to struct unparsed_text.
5880         * tree.c (lang_check_failed): New.
5881
5882         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
5883         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
5884         (cp/spew.o): Add dependency on gt-<filename>.h.
5885         (cp/decl2.o): Add dependency on gt-<filename>.h.
5886         (cp/call.o): Add dependency on gt-<filename>.h.
5887         (cp/pt.o): Add dependency on gt-<filename>.h.
5888         (cp/repo.o): Add dependency on gt-<filename>.h.
5889         (cp/parse.o): Add dependency on gt-<filename>.h.
5890         * call.c: Use gengtype for roots.
5891         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
5892         decl2.c parse.y pt.c repo.c spew.c.
5893         * cp-tree.h: Use gengtype for roots.
5894         (struct saved_scope): Use GGC, gengtype.
5895         (cp_parse_init): Delete prototype.
5896         (init_pt): Delete prototype.
5897         * decl.c: Use gengtype for roots.
5898         (mark_saved_scope): Delete.
5899         (cxx_init_decl_processing): Don't call deleted initilisation
5900         routines.
5901         (signed_size_zero_node): Delete, unused.
5902         * decl.h: Use gengtype for roots.
5903         * decl2.c: Use gengtype for roots.
5904         * lex.h: Use gengtype for roots.
5905         * parse.y: Use gengtype for roots.
5906         (cp_parse_init): Delete.
5907         * pt.c: Use gengtype for roots.
5908         (init_pt): Delete.
5909         * repo.c: Use gengtype for roots.
5910         * spew.c: Use gengtype for roots.
5911
5912         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
5913         (cp/decl.o): Add dependency on gtype-cp.h.
5914         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
5915         Include gtype-cp.h.  Allow for filename changes.
5916
5917         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
5918         (cp/decl.o): Add cp/gt-decl.h dependency.
5919         * config-lang.in (gtfiles): New.
5920         * tree.h: Rename struct binding_level to struct cp_binding_level.
5921         * decl.c: Rename struct binding_level to struct cp_binding_level.
5922         Include cp/gt-decl.h.
5923         (struct cp_binding_level): Use gengtype.
5924         (make_binding_level): Use GGC on struct cp_binding_level.
5925         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
5926         (cxx_init_decl_processing): Mark free_binding_level as
5927         deletable.
5928
5929         * decl.c (mark_cp_function_context): Update calling sequence.
5930
5931         * decl.c (start_function): Don't free 'struct
5932         cp_language_function'.
5933         (pop_cp_function_context): Likewise.
5934         (save_function_data): Allocate it using GC.
5935         * semantics.c (genrtl_start_function): Don't free 'struct
5936         cp_language_function'.
5937
5938 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
5939
5940         * lang-specs.h: Use cpp_debug_options.
5941
5942 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
5943
5944         * mangle.c, tree.c: Include real.h.
5945         * Make-lang.in: Update dependency lists.
5946
5947 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5948
5949         * lex.c: Don't include c-lex.h.
5950         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
5951
5952 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
5953
5954         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
5955
5956 2002-05-22  Richard Henderson  <rth@redhat.com>
5957
5958         * decl.c (obscure_complex_init): Check for VAR_DECL
5959         before using DECL_THREAD_LOCAL.
5960
5961 2002-05-22  Richard Henderson  <rth@redhat.com>
5962
5963         * decl.c (check_tag_decl): Handle RID_THREAD.
5964         (obscure_complex_init): Reject run-time init of tls.
5965         (grokvardecl, grokdeclarator): Handle RID_THREAD.
5966         * lex.c (reswords): Add __thread.
5967         (rid_to_yy): Map RID_THREAD to SCSPEC.
5968
5969 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
5970
5971         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
5972         * cp-tree.h (cxx_post_options): Kill.
5973         * cp-lex.c (cxx_post_options): Kill.
5974
5975 2002-05-21  Richard Henderson  <rth@redhat.com>
5976
5977         * lex.c (rid_to_yy): Add RID_THREAD.
5978
5979 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
5980
5981         * init.c (build_vec_init): Test for trivial copy-assignment when
5982         copy-assigning arrays.
5983
5984 2002-05-20  Andreas Jaeger  <aj@suse.de>
5985
5986         * init.c (build_default_init): Remove unused variable.
5987
5988 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
5989
5990         * call.c (any_strictly_viable): New.
5991         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
5992
5993 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5994
5995         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
5996
5997 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5998
5999         PR c++/186, DR 259
6000         * pt.c (do_decl_instantiation): Don't complain explicit
6001         instantiation after explicit specialization.
6002         (do_type_instantiation): Likewise.
6003
6004 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
6005
6006         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
6007         renamed from...
6008         (complete_type_or_else): ... this.  Redefined as macro.
6009         (cxx_incomplete_type_diagnostic): Declare.
6010         (cxx_incomplete_type_error): Define as macro.
6011         * init.c (build_delete): Warn about incomplete types other than
6012         void, and use the built-in operator delete for them.
6013         * typeck.c (complete_type_or_diagnostic): Renamed from
6014         complete_type_or_else.  Added warn_only argument, passed to...
6015         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
6016         warnings or errors depending on new warn_only argument.  Renamed
6017         from...
6018         (cxx_incomplete_type_error): ... this.  New implementation in
6019         terms of cxx_incomplete_type_diagnostic.
6020
6021 2002-05-18  Jason Merrill  <jason@redhat.com>
6022
6023         PR c++/6611
6024         * decl2.c (import_export_decl): If we clear
6025         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
6026
6027 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6028
6029         PR c++/6620
6030         * pt.c (verify_class_unification): Don't check if PARM is template
6031         parameter dependent.  Simplify.
6032         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
6033         parameter dependent expression.
6034
6035 2002-05-14  Jason Merrill  <jason@redhat.com>
6036
6037         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
6038         Do set DECL_COMDAT.
6039         (synthesize_tinfo_var): Take the public decl.
6040         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
6041         (emit_tinfo_decl): Adjust.  Call import_export_decl.
6042         * decl2.c (import_export_decl): Simplify tinfo decl handling.
6043
6044 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
6045
6046         * cp-tree.h (struct lang_type): Added non_zero_init.
6047         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
6048         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
6049         * class.c (check_field_decls): Test non_zero_init.
6050         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
6051         zero-to-NULL conversions.
6052         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
6053         type that needs zero-initialization without zeros.
6054         (check_initializer_decl): Compute zero-initializer for types
6055         that require a non-trivial one.
6056         * init.c (build_forced_zero_init): New function.
6057         (build_default_init): Use it.
6058         * tree.c (zero_init_p): New function.
6059         * typeck2.c (force_store_init_value): New function.
6060         (process_init_constructor): Create non-trivial zero-initializers
6061         for array members and class fields.
6062
6063 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
6064
6065         * lang-specs.h: Remove redundant -lang-c++.
6066
6067 2002-05-13  Jason Merrill  <jason@redhat.com>
6068
6069         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
6070         (fixed_type_or_null): See through reference vars.
6071         (build_base_path): Vtable contents are constant.
6072         * typeck.c (get_member_function_from_ptrfunc): Likewise.
6073
6074 2002-05-12  Jason Merrill  <jason@redhat.com>
6075
6076         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
6077         structs are safe.
6078
6079 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
6080
6081         * cp-tree.h (flag_ansi): Remove.
6082         * decl2.c (flag_ansi): Remove.
6083         (cxx_decode_option): Set flag_iso and flag_undef.
6084
6085 2002-05-09  Jason Merrill  <jason@redhat.com>
6086
6087         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
6088         Use subtraction rather than a bitmask to get the index.
6089         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
6090
6091         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
6092
6093 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
6094
6095         * Make-lang.in (decl2.o): Update.
6096         * cp-tree.h (warn_multichar): Remove.
6097         * decl2.c: Include c-common.h.
6098         (warn_multichar): Remove.
6099
6100 2002-05-03  Jason Merrill  <jason@redhat.com>
6101
6102         * tree.c (build_cplus_array_type): Only const and volatile get
6103         special handling.
6104
6105         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
6106
6107 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
6108
6109         ABI change, returning simple classes from functions.
6110         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
6111         TYPE_HAS_TRIVIAL_INIT_REF is false or
6112         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
6113
6114 2002-04-30  Jason Merrill  <jason@redhat.com>
6115
6116         PR debug/6436
6117         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
6118         anonymous class with a typedef if there are attributes.
6119
6120 2002-04-29  Paul Eggert  <eggert@twinsun.com>
6121
6122         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
6123
6124 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
6125
6126         PR c++/6477
6127         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
6128         non-NULL first.
6129
6130 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
6131
6132         PR c++/6492
6133         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
6134         enter that scope before name lookup.
6135
6136         PR c++/6486
6137         * method.c (do_build_copy_constructor): Avoid building
6138         cv-qualified reference types.
6139
6140 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
6141
6142         PR c++/5719
6143         * decl.c (grok_op_properties): Assignment ops don't have to return
6144         by value. operator% should.
6145
6146 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
6147
6148         PR c/6343
6149         * decl.c (duplicate_decls): Call merge_weak.
6150
6151 2002-04-26  Richard Henderson  <rth@redhat.com>
6152
6153         * parse.y (malloced_yyss, malloced_yyvs): New.
6154         (yyoverflow): Re-add.  Set them.
6155         (free_parser_stacks): New.
6156
6157 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
6158
6159         PR c++/6497
6160         * method.c (do_build_assign_ref): Pass a derivation to
6161         build_method_call when calling base class assignment operators.
6162
6163 2002-04-26  Richard Henderson  <rth@redhat.com>
6164
6165         * parse.y (yyoverflow): Revert.
6166
6167 2002-04-26  Richard Henderson  <rth@redhat.com>
6168
6169         PR c/3581
6170         * parse.y (string): Remove.  Update all uses to use STRING
6171         instead, and not call combine_strings.
6172         * rtti.c (tinfo_name): Use fix_string_type.
6173         * semantics.c (finish_asm_stmt): Don't call combine_strings.
6174         * spew.c (yylexstring): New.
6175         (read_token): Use it.
6176
6177 2002-04-25  Richard Henderson  <rth@redhat.com>
6178
6179         PR c/2161
6180         * parse.y (yyoverflow): New.
6181
6182 2002-04-25  Jason Merrill  <jason@redhat.com>
6183
6184         PR c++/5607
6185         * search.c (check_final_overrider): No longer static.
6186         * class.c (update_vtable_entry_for_fn): Call it.
6187         * cp-tree.h: Adjust.
6188
6189 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
6190
6191         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
6192         * cp-tree.h (cxx_set_yydebug): Die.
6193         * lex.c (YYDEBUG): Get from c-lex.h.
6194         (cxx_set_yydebug): Remove.
6195         * parse.y: Include c-lex.h.
6196         (YYDEBUG): Get from c-lex.h.
6197
6198 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
6199
6200         PR c++/6438.
6201         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
6202         void.
6203
6204 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
6205
6206         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
6207         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
6208         Redefine.
6209         * cp-tree.h (cp_attribute_table): Rename.
6210         * decl.c (lang_attribute_table): Remove declaration.
6211         (cxx_init_decl_processing): Don't set it.
6212         * tree.c (cp_attribute_table): Rename.
6213
6214 2002-04-24  Jason Merrill  <jason@redhat.com>
6215
6216         PR c++/6331
6217         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
6218         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
6219         The pedwarn for array assignment is now unconditional.
6220         * tree.c (build_cplus_array_type_1): Still process simple array types
6221         normally in templates.
6222
6223         PR c++/6395
6224         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
6225         stuff for comdats.
6226
6227 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
6228
6229         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
6230         node with attributes.
6231
6232 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
6233
6234         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
6235         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
6236
6237 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
6238
6239         PR c++/6256:
6240         * pt.c (tsubst_friend_class): Handle templates with explicit
6241         nested names.
6242
6243         PR c++/6331:
6244         * typeck.c (merge_types): Remember the cv-qualification of pointer
6245         types when merging them.
6246
6247 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
6248
6249         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
6250         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
6251         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
6252         cxx_mark_function_context): New.
6253         * decl.c (push_cp_function_context, pop_cp_function_context,
6254         mark_cp_function_context): Rename for consistency.
6255         (cxx_init_decl_processing): Don't set old hooks.
6256
6257 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
6258
6259         * call.c (convert_type_from_ellipsis): Rename, update.
6260         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
6261         * cp-tree.h (convert_type_from_ellipsis): Rename.
6262         * decl.c (cxx_init_decl_processing): Don't set hook.
6263
6264 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
6265
6266         * call.c (build_new_method_call): Update.
6267         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
6268         * cp-tree.h (cxx_incomplete_type_error): New.
6269         * decl.c (grokdeclarator, grokparms): Update.
6270         * decl2.c (check_classfn): Update.
6271         * pt.c (tsubst): Update.
6272         * typeck.c (complete_type_or_else, expr_sizeof,
6273         decay_conversion): Update.
6274         * typeck2.c (incomplete_type_error): Rename.
6275         (add_exception_specifier): Update.
6276
6277 2002-04-18  Jason Merrill  <jason@redhat.com>
6278
6279         PR c++/5658
6280         * search.c (setup_class_bindings): A class template qualifies as a
6281         type binding.
6282
6283 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
6284
6285         PR c++/6316
6286         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
6287         before expanding.
6288
6289 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
6290
6291         * init.c (begin_init_stmts): Remove commented out code.
6292         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
6293         * semantics.c (begin_gobal_stmt_expr): Adjust call to
6294         expand_start_stmt_expr.
6295
6296 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
6297
6298         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
6299         dso_handle itself, to __cxa_atexit.
6300
6301 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6302
6303         * error.c (cxx_print_error_function): Adjust call to macros.
6304
6305 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
6306
6307         * class.c (layout_virtual_bases): Do all dsize computation on trees.
6308
6309 2002-04-14  Jason Merrill  <jason@redhat.com>
6310
6311         * typeck.c (get_member_function_from_ptrfunc): Don't do
6312         gratuitious division and multiplication on
6313         ptrmemfunc_vbit_in_delta targets.
6314
6315 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
6316
6317         PR c++/5373.
6318         * semantics.c (finish_expr_stmt): Remember the type of the
6319         expression before any conversions are performed.
6320
6321 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
6322
6323         PR c++/5189.
6324         * call.c (add_template_candidate_real): Do not treat member
6325         templates as copy constructors.
6326
6327 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
6328
6329         * decl.c (duplicate_decls): Do not copy the RTL for a variable
6330         declaration if the old variable had an incomplete type and the new
6331         variable does not.
6332         (complete_vars): Do not call layout_decl for completed variables.
6333
6334 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
6335
6336         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
6337         with an explicit one.
6338         (follow_tag_typedef): New.
6339         (lookup_tag): Use it to extract the tag of an explicit typedef.
6340         (xref_tag): Likewise.
6341
6342 2002-04-11  Andrew Haley  <aph@redhat.com>
6343
6344         * typeck.c (type_after_usual_arithmetic_conversions):
6345         If two types have the same variant, return immediately.
6346         When two floating-point operands are the same precision:
6347           convert to float if one of the operands is float;
6348           if neither operand is one of the standard types, return the type
6349           of the first operand.
6350
6351 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
6352
6353         PR c++/5507
6354         * decl.c (make_typename_type): Remove implicit typenameness.
6355
6356 2002-04-09  Jason Merrill  <jason@redhat.com>
6357
6358         PR optimization/6189
6359         * semantics.c (genrtl_start_function): Don't free
6360         DECL_SAVED_FUNCTION_DATA for inline functions.
6361
6362         * init.c (build_member_call): For now, don't convert to
6363         intermediate base if it would cause an error.
6364
6365 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
6366
6367         * parse.y (namespace_qualifier, maybe_identifier,
6368         begin_explicit_instantiation, end_explicit_instantiation,
6369         apparent_template_type, .finish_template_type,
6370         do_id, maybe_init, defarg_again, component_decl_1):
6371         Add ending ';', in accordance with POSIX.
6372
6373 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
6374
6375         PR c++/5571
6376         * class.c (layout_class_type): Remember incomplete static
6377         variables.
6378         (finish_struct_1): Call complete_vars, not
6379         hack_incomplete_structures.
6380         * cp-tree.h (hack_incomplete_structures): Rename to ...
6381         (complete_vars): ... this.
6382         (struct saved_scope): Remove incomplete.
6383         (namespace_scope_incomplete): Remove.
6384         * decl.c (struct binding_level): Remove incomplete.
6385         (incomplete_vars): New variable.
6386         (mark_binding_level): Don't mark incomplete.
6387         (print_binding_level): Don't print it.
6388         (mark_saved_scope): Don't mark incomplete.
6389         (pushdecl): Use maybe_register_incopmlete_var.
6390         (cxx_init_decl_processing): Register incomplete_vars for GC.
6391         (start_decl_1): Clarify error message.
6392         (hack_incomplete_vars): Remove.
6393         (maybe_register_incomplete_var): New function.
6394         (complete_vars): Likewise.
6395
6396 2002-04-06  Jason Merrill  <jason@redhat.com>
6397
6398         PR c++/4934
6399         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
6400         set before checking it.
6401
6402         PR c++/525
6403         * init.c (build_member_call): Use build_scoped_ref.
6404         (resolve_offset_ref): Likewise.
6405         * call.c (build_scoped_method_call): Likewise.
6406         * tree.c (maybe_dummy_object): Kludge around current_class_type being
6407         wrong.
6408         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
6409         * cp-tree.h: Adjust.
6410
6411         * init.c (push_base_cleanups): Just use build_scoped_method_call.
6412
6413         PR c++/6179
6414         * method.c (implicitly_declare_fn): Pass unqualified type to
6415         synthesize_exception_spec.
6416
6417 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
6418
6419         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
6420         * cvt.c: Update comment.
6421         * init.c (expand_cleanup_for_base): Update.
6422         * semantics.c (finish_parenthesized_expr): Update.
6423         * typeck.c (cp_truthvalue_conversion): Update.
6424
6425 2002-04-04  Jason Merrill  <jason@redhat.com>
6426
6427         * semantics.c (finish_eh_cleanup): New fn.
6428         * cp-tree.h: Add prototype.
6429         * init.c (perform_member_init, expand_cleanup_for_base): Use
6430         finish_eh_cleanup.
6431         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
6432         * cp-tree.h: Remove references.
6433         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
6434         * dump.c (cp_dump_tree): Likewise.
6435         * pt.c (tsubst_expr): Likewise.
6436         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
6437         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
6438         * tree.c (cp_statement_code_p): Likewise.
6439
6440         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
6441
6442         PR c++/5636
6443         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
6444         cleanup for nrv.
6445
6446         PR c++/5104
6447         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
6448         specifiers.
6449         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
6450
6451 2002-04-03  Richard Henderson  <rth@redhat.com>
6452
6453         * cp-lang.c (cxx_warn_unused_global_decl): New.
6454         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
6455
6456 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
6457
6458         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
6459         * tree.c (init_tree): Don't set hook.
6460
6461 2002-04-03  Roger Sayle  <roger@eyesopen.com>
6462
6463         PR c++/5998:
6464         * decl.c (duplicate_decls): Don't mess with assembler names when
6465         redeclaring builtin functions as static.
6466
6467 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
6468
6469         * call.c (build_addr_func): Update.
6470         * class.c (resolve_address_of_overloaded_function): Update.
6471         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
6472         * cp-tree.h (cxx_mark_addressable): New.
6473         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
6474         * decl2.c (build_cleanup): Update.
6475         * except.c (build_throw): Update.
6476         * init.c (resolve_offset_ref): Update.
6477         * pt.c (convert_nontype_argument): Update.
6478         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
6479         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
6480         unary_complex_lvalue): Update.
6481         (mark_addressable): Rename.
6482
6483 2002-04-01  Roger Sayle  <roger@eyesopen.com>
6484
6485         PR c++/5998:
6486         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
6487         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
6488         but follow the SET_DECL_RTL idiom used elsewhere in the function.
6489
6490 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
6491
6492         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
6493         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
6494         * decl.c (grokdeclarator): Update.
6495         * mangle.c (write_integer_cst): Update.
6496         * typeck.c (build_binary_op): Update.
6497
6498 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
6499
6500         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
6501         * lex.c (cxx_init): Don't set hook.
6502
6503 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
6504
6505         * Make-lang.in (error.o): Update.
6506         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
6507         * cp-tree.h (struct diagnostic_context): Predeclare.
6508         (cxx_print_error_function): New.
6509         * error.c: Include langhooks-def.h.
6510         (lang_print_error_function): Rename.  Update.
6511         (init_error): Don't set hook.
6512
6513 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
6514
6515         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
6516         Redefine.
6517         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
6518         * decl.c (finish_enum): Similarly.
6519         * error.c (dump_type): Similarly.
6520         * lex.c (cxx_init): Similarly.
6521         * mangle.c (write_builtin_type): Similarly.
6522         * typeck.c (comptypes): Similarly.
6523
6524 2002-03-28  Roger Sayle  <roger@eyesopen.com>
6525
6526         PR c++/5998:
6527         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
6528         in the g++ front-end.
6529         (duplicate_decl): Allow redefinition of anticipated built-ins.
6530         Fix inlining problem by over-writing the old DECL_RTL.
6531         (lookup_namespace_name): Fail to find an identifier in the
6532         specified namespace if its still anticipated.
6533         (builtin_function_1): New function split out from builtin_function
6534         to create a builtin in the current namespace with given context.
6535         (builtin_function): Call builtin_function_1 to define the
6536         appropriate builtins in both the std and global namespaces.
6537         (select_decl): Don't test for anticipated decls here.
6538         (unqualified_namespace_lookup): Instead ignore them whilst
6539         searching through scopes and namespaces.
6540         * decl2.c (do_nonmember_using_decl): If a using declaration
6541         specifies an anticipated built-in function, mark it as no longer
6542         anticipated in that scope.
6543         (ambiguous_decl):  Avoid resolving to an anticipated decl.
6544         * lex.c (do_scoped_id): Fail to find an identifier in the global
6545         namespace if its still anticipated.
6546
6547 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
6548
6549         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
6550         * cp-tree.h (cp_make_lang_type): Rename.
6551         * lex.c (cp_make_lang_type): Rename.
6552         (make_aggr_type): Update.
6553         * tree.c (init_tree): Don't set make_lang_type_fn.
6554
6555 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
6556
6557         PR c++/6073
6558         * class.c (finish_struct_1): Update static field's DECL_MODE even
6559         if its type is a variant of t.
6560
6561 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
6562
6563         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
6564         * cp-tree.h (cxx_insert_default_attributes): New.
6565         * decl.c (insert_default_attributes): Rename.
6566
6567 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
6568
6569         PR c++/4884
6570         * call.c (build_op_delete_call): Allow for the fact the placement
6571         may be a COMPOUND_EXPR.
6572
6573 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
6574
6575         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
6576         * cp-tree.h (init_cplus_expand): Remove.
6577         (cxx_expand_expr): New.
6578         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
6579         fix prototype.
6580         (init_cplus_expand): Remove.
6581         * lex.c (cxx_init): Don't call init_cplus_expand.
6582
6583 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
6584
6585         PR c++/4884.
6586         * init.c (build_new_1): Allow for the fact the result of
6587         build_function_call may be a COMPOUND_EXPR.
6588
6589 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
6590
6591         PR c++/5682
6592         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
6593         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
6594         (dfs_skip_nonprimary_vbases_markedp): Remove.
6595         * search.c (get_shared_vbase_if_not_primary): Remove.
6596         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
6597         (dfs_skip_nonprimary_vbases_markedp): Remove.
6598         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
6599         (dfs_marked_real_bases_queue_p): Likewise.
6600
6601 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
6602
6603         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
6604         * cp-tree.h (cxx_mark_tree): New.
6605         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
6606
6607 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
6608
6609         * cp-tree.h (cxx_maybe_build_cleanup): New.
6610         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
6611         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
6612         * tree.c (build_target_expr): Update.
6613         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
6614
6615 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
6616
6617         * decl2.c (cxx_decode_option): Handle -E.
6618         * lang-specs.h (default_compilers): Preprocess with cc1plus.
6619         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
6620
6621 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
6622
6623         PR c++/6037
6624         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
6625
6626 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6627
6628         * error.c (dump_type): Be careful about implicit typenames.
6629
6630 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6631
6632         PR C++/3656
6633         * semantics.c (finish_base_specifier): Handle erronous base
6634         classes.
6635
6636 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
6637
6638         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
6639         REAL_IS_NOT_DOUBLE.
6640
6641 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
6642
6643         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
6644         an index into the vtable_entry array regardless of
6645         TARGET_PTRMEMFUNC_VBIT_LOCATION.
6646
6647 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
6648
6649         * tree.c (cp_cannot_inline_tree_fn): Same.
6650
6651 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
6652
6653         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
6654         insert_block, getdecls, global_bindings_p): New.
6655
6656 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
6657
6658         PR c++/4361
6659         * mangle.c (struct globals) Add internal_mangling_p member.
6660         (write_template_param): Do internal mangling, if needed.
6661         (mangle_conv_op_name_for_type): Request internal mangling.
6662
6663 2002-03-20  Jason Merrill  <jason@redhat.com>
6664
6665         PR c++/2136
6666         * init.c (build_delete): Check access for a member op delete here.
6667         * decl2.c (delete_sanity): Not here.
6668
6669 2002-03-19  Jason Merrill  <jason@redhat.com>
6670
6671         PR c++/5118
6672         * class.c (get_vfield_name): Use the constructor_name.
6673
6674 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
6675
6676         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
6677         * cp-tree.h (lang_printable_name): Rename.
6678         * error.c (lang_decl_name): Use new hook.
6679         * lex.c (cxx_init): Remove old hook.
6680         * pt.c (tsubst_decl): Use new hook.
6681         * tree.c (lang_printable_name): Rename.
6682
6683 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
6684
6685         PR c++/3882
6686         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
6687         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
6688         only after recording the declaration.
6689
6690 2002-03-18  Jason Merrill  <jason@redhat.com>
6691
6692         PR c++/2039
6693         * init.c (resolve_offset_ref): Hand off to build_component_ref.
6694
6695         PR c++/4222, c++/5995
6696         * call.c (build_over_call): Fix empty class logic.
6697
6698         PR c++/3870
6699         * cp-tree.h (struct saved_scope): Add last_parms field.
6700         * decl.c (maybe_push_to_top_level): Save last_function_parms.
6701         (pop_from_top_level): Restore it.
6702
6703         PR c++/4377
6704         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
6705         NON_LVALUE_EXPRs.
6706
6707         PR c++/4003
6708         * pt.c (tsubst_friend_function): Use decl_namespace_context.
6709
6710         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
6711         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
6712         type with a nontrivial destructor.
6713
6714 2002-03-17  Jason Merrill  <jason@redhat.com>
6715
6716         PR c++/4460
6717         * class.c (build_base_path): Virtual base layout is fixed in
6718         in-charge [cd]tors.
6719
6720 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
6721
6722         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
6723         * parse.y (yyparse): Remove macro.
6724
6725 2002-03-17  Jason Merrill  <jason@redhat.com>
6726
6727         PR c++/5757
6728         * init.c (build_new_1): Pass the right pointer to op delete.
6729
6730 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
6731
6732         PR c++/4361
6733         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
6734         conversion operators go.
6735         (struct lang_decl_flags): Add template_conv_p and unused
6736         bitfields.
6737         (DECL_TEMPLATE_CONV_FN_P): New macro.
6738         * call.c (build_user_type_conversion_1): Don't check second type
6739         conversion of overload set first.
6740         * class.c (add_method): Make sure templated conversion operators
6741         all end up on slot 2.
6742         * lex.c (do_identifier): A conversion operator token might be
6743         satisfied by a templated conversion operator.
6744         * pt.c (check_explicit_specialization): Use
6745         CLASSTYPE_FIRST_CONVERSION_SLOT.
6746         (template_parm_this_level_p): New function.
6747         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
6748         * search.c (lookup_fnfields_1): Template conversions will be on
6749         the first slot.
6750         * typeck.c (build_component_ref): Preserve the type of an
6751         conversion operator name on the overload type.
6752         (build_x_function_call): Retrieve the conversion operator name.
6753
6754 2002-03-15  Richard Henderson  <rth@redhat.com>
6755
6756         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
6757
6758 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
6759
6760         * cp-tree.h (CLEANUP_DECL): Remove.
6761         (CLEANUP_EXPR): Likewise.
6762         * decl.c (destroy_local_var): Simplify.
6763         (maybe_build_cleanup): Tidy.
6764         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
6765         * semantics.c (cp_expand_stmt): Likewise.
6766         * cp/tree.c (cp_statement_code_p): Likewise.
6767
6768 2002-03-15  Jason Merrill  <jason@redhat.com>
6769
6770         PR c++/5857
6771         * decl.c (duplicate_decls): Use merge_types instead of common_type.
6772         * typeck.c (common_type): Just hand off to
6773         type_after_usual_arithmetic_conversions and
6774         composite_pointer_type.
6775         (merge_types): New fn.
6776         (commonparms): Use it instead of common_type.
6777         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
6778         (composite_pointer_type): Also handle attributes.
6779         * cp-tree.h: Declare merge_types.
6780
6781         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
6782         variables.
6783         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
6784
6785 2002-03-14  Richard Henderson  <rth@redhat.com>
6786
6787         * decl.c: Include c-pragma.h.
6788         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
6789         * Make-lang.in: Update dependencies.
6790
6791 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
6792
6793         PR c++/5908
6794         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
6795         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
6796
6797 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
6798
6799         * mangle.c (write_builtin_type): Handle 128-bit integers even if
6800         they are not a standard integer type.
6801
6802 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
6803
6804         * cp-tree.h (init_init_processing): Remove declaration.
6805         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
6806         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
6807
6808 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6809
6810         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
6811         Define.
6812         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
6813         tree_code_length.
6814         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
6815         cplus_tree_code_name): Delete.
6816         (cxx_init): Don't call add_c_tree_codes, instead set
6817         lang_unsafe_for_reeval.  Don't try to copy into the various
6818         tree_code arrays.
6819
6820 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
6821
6822         PR c++/5659
6823         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
6824         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
6825         definitions.
6826
6827 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
6828
6829         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
6830         DR209 is now not a defect.
6831         * cp-tree.h (skip_type_access_control): Remove.
6832         * decl.c (grokdeclarator): Do type access control for friend
6833         declarations.
6834         * semantics.c (decl_type_access_control): Don't reset
6835         current_type_lookups.
6836         (save_type_access_control): Always save the lookups.
6837         (skip_type_access_control): Remove.
6838         (finish_class_definition): Don't change type_lookups.
6839
6840 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
6841
6842         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
6843         It is incorrect.
6844         * typeck.c (build_static_cast): Compare non-qualified types
6845         with pointer to member conversions.
6846
6847 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
6848             Daniel Berlin  <dan@dberlin.org>
6849
6850         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
6851         (cxx_get_alias_set): Use it.
6852
6853 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6854
6855         * cp-tree.h (stabilize_expr): Prototype.
6856
6857 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6858
6859         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
6860         conditional return void.
6861
6862 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
6863
6864         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
6865         * cp-tree.h (cxx_unsave): New.
6866         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
6867         (init_tree): Update.
6868
6869 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6870
6871         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
6872         explicit sizeof/sizeof.
6873         * decl2.c (cxx_decode_option): Likewise.
6874         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
6875
6876 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
6877
6878         PR c++/775
6879         * decl.c (lookup_tag): Only reject enum/class mismatch, not
6880         class/union mismatch.
6881         * parse.y (check_class_key): New function.
6882         (structsp): Call it.
6883
6884 2002-03-01  Michael Matz  <matz@suse.de>
6885
6886         * typeck.c (cp_pointer_int_sum): Complete inner type which is
6887         used later by size_in_bytes().
6888
6889 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
6890
6891         * cp-tree.h:  Require __GNUC__ to be #defined.
6892         (build_init):  Add missing prototype.
6893
6894 2002-03-01  Jason Merrill  <jason@redhat.com>
6895
6896         * except.c: Don't include decl.h or obstack.h.  Do include
6897         tree-inline.h.
6898         (build_throw): Destroy temporaries from the thrown
6899         expression before calling __cxa_throw.  Construct a thrown
6900         temporary directly into the exception object.
6901         (stabilize_throw_expr): New function.
6902         (wrap_cleanups_r): New function.
6903         * tree.c (stabilize_expr): New function.
6904         * init.c (build_init): New function.
6905         * Make-lang.in (cp/except.o): Adjust .h deps.
6906
6907 2002-02-28  Jason Merrill  <jason@redhat.com>
6908
6909         * search.c (lookup_base_r): Don't clear is_non_public just because
6910         we found a friendly scope.
6911
6912         * decl.c (finish_function): Only warn about missing return
6913         statement with -Wreturn-type.
6914
6915 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
6916
6917         * class.c (build_clone): Update.
6918         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
6919         * cp-tree.h (cxx_dup_lang_specific_decl): New.
6920         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
6921         (copy_decl): Update.
6922         * method.c (make_thunk): Update.
6923
6924 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
6925
6926         * decl2.c: Delete traditional-mode-related code copied from
6927         the C front end but not used, or used only to permit the
6928         compiler to link.
6929
6930 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
6931
6932         PR c++/4093
6933         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
6934         to void.
6935
6936 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
6937
6938         PR other/5746
6939         * semantics.c (finish_switch_cond): Don't call get_unwidened
6940         if error_mark_node.
6941
6942 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
6943
6944         PR c++/2645, DR 295
6945         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
6946         tf_keep_type_decl.
6947         (make_typename_type): Use tsubst_flags_t.
6948         * decl.c (make_typename_type): Adjust. Return non-artificial
6949         TYPE_DECLs, if required.
6950         (grokdeclarator): Simplify CVR qualification handling. Allow bad
6951         qualifiers on typedef types.
6952         * decl2.c (handle_class_head): Adjust make_typename_type call.
6953         * parse.y (nested_name_specifier): Likewise.
6954         (typename_sub0): Likewise.
6955         (typename_sub1): Likewise.
6956         * pt.c (convert_template_argument): Adjust make_typename_type
6957         return value.
6958         (tsubst): Adjust cp_build_qualified_type_real calls.
6959         (check_cv_quals_for_unify): Cope with allowing bad qualifications
6960         on template type parms.
6961         (instantiate_decl): Recheck substitutions to give warnings on bad
6962         qualifications.
6963         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
6964
6965 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
6966
6967         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
6968
6969         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
6970         unless DECL_ALWAYS_INLINE.
6971
6972 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
6973
6974         * typeck.c (cp_pointer_int_sum): Renamed from
6975         pointer_int_sum, call pointer_int_sum.
6976
6977 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
6978
6979         * decl.c (duplicate_decls): Return 0 if issued error about
6980         redeclaration.
6981
6982 2002-02-19  Jason Merrill  <jason@redhat.com>
6983
6984         ABI change: Mangle `void (A::*)() const' as
6985         M1AKFvvE, not MK1AFvvE.
6986         * mangle.c (write_function_type): Write cv-quals for member
6987         function type here.
6988         (write_pointer_to_member_type): Not here.
6989
6990 2002-02-18  Jason Merrill  <jason@redhat.com>
6991
6992         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
6993         (do_decl_instantiation): Likewise.
6994
6995 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6996
6997         PR c++/5685
6998         * decl.c (duplicate_decls): Make warning unconditional
6999         if duplicate default argument declarations are present.
7000
7001 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
7002
7003         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
7004         shortening.
7005
7006 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
7007
7008         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
7009         remove incorrect comment. Move #if 0'd code to common path. Use
7010         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
7011
7012 2002-02-13  Jason Merrill  <jason@redhat.com>
7013
7014         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
7015         (finish_function): Don't warn if current_function_returns_null.
7016
7017         * typeck2.c (digest_init): Do handle values of vector type.
7018
7019         * typeck2.c (digest_init, process_init_constructor): Treat vectors
7020         like arrays.
7021
7022 2002-02-11  Jason Merrill  <jason@redhat.com>
7023
7024         * parse.y (reserved_declspecs): Don't handle attributes.
7025         (reserved_typespecquals): Handle them here.
7026         * Make-lang.in (parse.c): Adjust expected conflicts.
7027
7028 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
7029
7030         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
7031         instead of compstmt.
7032         (compstmt_or_stmtexpr): Renamed from compstmt.
7033         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
7034
7035 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
7036
7037         Rename instantiate_type_flags to tsubst_flags_t & expand use.
7038         * cp-tree.h (instantiate_type_flags): Rename to ...
7039         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
7040         add tf_warning flag.
7041         (instantiate_type): Adjust prototype.
7042         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
7043         do_type_instantiation, cp_build_qualified_type_real): Likewise.
7044         cp_build_qualified_type: Adjust.
7045         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
7046         tf_*.
7047         * call.c (standard_conversion): Rename itf_* to tf_*.
7048         (reference_binding): Likewise.
7049         (convert_like_real): Likewise.
7050         * cvt.c (cp_convert_to_pointer): Likewise.
7051         (convert_to_reference): Likewise.
7052         * decl.c (lookup_namespace_name): Use tf_* flags.
7053         (make_typename_type): Likewise.
7054         (grokdeclarator): Likewise.
7055         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
7056         (coerce_template_template_parms, convert_template_argument,
7057         coerce_template_parms, maybe_get_template_decl_from_type_decl,
7058         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
7059         instantiate_class_template, tsubst_template_arg_vector,
7060         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
7061         tsubst_decl, tsubst_arg_types, tsubst_function_type,
7062         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
7063         instantiate_template, fn_type_unification,
7064         resolve_overloaded_unification, verify_class_unification,
7065         unify, get_bindings_real, do_type_instantiation,
7066         regenerate_decl_from_template, instantiate_decl,
7067         tsubst_initializer_list, tsubst_enum,
7068         get_mostly_instantiated_function_type,
7069         invalid_nontype_parm_type_p): Likewise.
7070         * tree.c (cp_build_qualified_type_real): Likewise.
7071         * typeck.c (build_binary_op): Rename itf_* to tf_*.
7072         (build_ptrmemfunc): Likewise.
7073         (convert_for_assignment): Likewise.
7074
7075 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
7076
7077         PR c++/109
7078         * decl.c (grokdeclarator): Allow friend declarations from
7079         dependent types.
7080         * decl2.c (handle_class_head): Don't push into template parm contexts.
7081         * pt.c (push_template_decl_real): Template parm contexts are never
7082         being defined.
7083
7084 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
7085
7086         * class.c: Include target.h.
7087         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
7088         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
7089         bit-field layout.
7090         * Make-lang.in: Adjust deps.
7091
7092 2002-02-05  Jason Merrill  <jason@redhat.com>
7093
7094         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
7095
7096 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
7097
7098         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
7099         (finish_switch_cond): Set SWITCH_TYPE.
7100
7101 2002-02-04  Richard Henderson  <rth@redhat.com>
7102
7103         * method.c (use_thunk): Always initialize the block tree.  Reindent.
7104         * semantics.c (expand_body): Emit thunks after function, not before.
7105
7106 2002-02-04  Jason Merrill  <jason@redhat.com>
7107
7108         * decl.c (start_function): Call cplus_decl_attributes immediately
7109         after grokdeclarator.
7110
7111         * decl.c (start_function): Combine DECL_RESULT handling code.
7112
7113 2002-02-03  Jason Merrill  <jason@redhat.com>
7114
7115         * xref.c: Remove.
7116         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
7117         (cp/xref.o): Remove dependencies.
7118         * class.c (finish_struct_1, check_methods): Don't call xref fns.
7119         (finish_struct_1): Likewise.
7120         * friend.c (make_friend_class): Likewise.
7121         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
7122         * spew.c (read_process_identifier): Likewise.
7123
7124 2002-02-01  Jason Merrill  <jason@redhat.com>
7125
7126         PR c++/4872
7127         * decl.c (finish_function): Warn about a non-void function with
7128         no return statement and no abnormal exit.
7129         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
7130         (current_function_returns_abnormally): New macro.
7131         * call.c (build_call): Set it.
7132
7133         * typeck.c (build_component_ref): Always complain about offsetof
7134         constructs on non-PODs.  Only make it an error for members of
7135         virtual bases.
7136
7137         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
7138         (dump_function_decl): Always dump parms.
7139
7140         * decl2.c (finish_static_data_member_decl): Complain about a local
7141         class with a static data member.
7142
7143         PR c++/4286
7144         * search.c (lookup_field_1): Don't xref a static data member
7145         just because we looked it up.
7146
7147 2002-01-31  Jason Merrill  <jason@redhat.com>
7148
7149         * Make-lang.in (parse.c): Handle .output file.
7150
7151         PR c++/3395
7152         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
7153         not TREE_TYPE.
7154         * semantics.c (finish_class_definition): Adjust.
7155
7156         Allow attributes in parms and casts.
7157         * parse.y (named_parm): Don't strip attrs.
7158         (declmods): Remove 'attributes' production.
7159         (nonempty_cv_qualifiers): Accept attributes.
7160         (ATTRIBUTE): Give precedence.
7161         * decl.c (groktypename): Handle attributes.
7162         (grokparms): Likewise.
7163
7164 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
7165
7166         * decl2.c (cxx_decode_option): Pass 0 as last argument to
7167         cpp_handle_option.
7168         * lang-specs.h: Use cpp_unique_options instead of cpp_options
7169         when used together with cc1_options.
7170
7171 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
7172
7173         PR c++/5132
7174         * typeck2.c (digest_init): Make sure non-array core type is
7175         instantiated.
7176         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
7177         constructor, rather than build a new one.
7178         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
7179         PURPOSE of constructor elts.
7180
7181 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
7182
7183         * Make-lang.in (parse.c): Adjust expected number of
7184         shift-reduce conflicts.
7185         (decl.o): Depend on diagnostic.h.
7186         * decl.c: Include diagnostic.h.
7187         (grokdeclarator): Check for null pointer.
7188         (finish_function): Don't abort when
7189         current_binding_level->parm_flag != 1, if errors have
7190         occurred; throw away the statement tree and extra binding
7191         levels, and continue.
7192         * lex.c (note_list_got_semicolon): Check for null pointer.
7193         * method.c (hack_identifier): Just return error_mark_node if
7194         value is error_mark_node.
7195         * parse.y (primary: TYPEID(type_id)): No need to use
7196         TYPE_MAIN_VARIANT here.
7197         (handler_seq): Accept an empty list of catch clauses and
7198         generate a fake handler block to avoid later crashes.
7199         (ansi_raise_identifier): Accept the error token too.
7200         * semantics.c (begin_class_definition,
7201         finish_class_definition): Check for error_mark_node.
7202
7203 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
7204
7205         * typeck2.c (friendly_abort): Delete definition.
7206         * cp-tree.h (friendly_abort): Don't prototype.
7207         (my_friendly_assert): Use fancy_abort.
7208
7209 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
7210
7211         * cp-tree.h (my_friendly_abort): Remove.
7212
7213 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
7214
7215         * spew.c (pending_inlines, pending_inlines_tail,
7216         processing_these_inlines): Make static.
7217         (mark_pending_inlines): Remove static.
7218         (begin_parsing_inclass_inline): If in function, save pi
7219         for GC to cp_function_chain->unparsed_inlines instead.
7220         (process_next_inline): Likewise.
7221         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
7222         (mark_pending_inlines): Add prototype.
7223         * decl.c (spew_debug): Remove unused extern.
7224         (mark_lang_function): Call mark_pending_inlines.
7225
7226 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
7227
7228         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
7229         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
7230         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
7231         Change my_fancy_abort() to abort().
7232
7233 2002-01-23  Jason Merrill  <jason@redhat.com>
7234
7235         PR c++/5453
7236         * class.c (fixed_type_or_null): Fix thinko.
7237
7238         PR c++/3331
7239         * init.c (resolve_offset_ref): Use build_indirect_ref.
7240
7241         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
7242
7243 2002-01-22  Jason Merrill  <jason@redhat.com>
7244
7245         * parse.y (function_body): Suppress the block for the outermost
7246         curly braces.
7247         * decl.c (pushdecl): Don't try to skip it.
7248         (begin_function_body): Keep the block we create, not the next one.
7249         * init.c (emit_base_init): Don't mess with keep_next_level.
7250
7251         * class.c (build_base_path): Tweak formatting.
7252
7253 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
7254
7255         Fix regression introduced with patch for c++/775
7256         * parse.y (class_head_defn): Check for template specializations
7257         with a different class-key.
7258
7259 2002-01-17  Jason Merrill  <jason@redhat.com>
7260
7261         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
7262         (begin_function_body): Call them and keep_next_level.
7263         * init.c (emit_base_init): Call keep_next_level.
7264         * semantics.c (setup_vtbl_ptr): Lose.
7265         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
7266         (vtbls_set_up_p): Lose.
7267         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
7268         * method.c (do_build_copy_constructor): Likewise.
7269         (synthesize_method): Call finish_mem_initializers.
7270         * parse.y (nodecls): Likewise.
7271
7272         * error.c (dump_type_suffix): Print the exception specs before
7273         recursing.
7274         (dump_function_decl): Here, too.
7275
7276         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
7277
7278 2002-01-10  Ira Ruben   <ira@apple.com>
7279
7280         PR c++/907
7281         * decl.c (start_method): Handle attrlist.
7282
7283 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
7284
7285         * decl2.c (max_tinst_depth): Increase default limit to 500.
7286
7287 2002-01-10  Graham Stott  <grahams@redhat.com>
7288
7289         * spew.c (YYCHAR): Uppercase macro parameter and add
7290         parenthesis.
7291         (YYCODE): Likewise.
7292         (NAME): Uppercase macro parameter.
7293
7294 2002-01-09  Graham Stott  <grahams@redhat.com>
7295
7296         * decl.h (grokdeclarator): Wrap long line.
7297
7298         * semantics.c (FINISH_COND): Uppercase macro paramaters and
7299         add parenthesis.
7300
7301 2002-01-08  Graham Stott  <grahams@redhat.com>
7302
7303         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
7304         (PALLOC): Uppercase macro parameter and whitespace.
7305         (SALLOC): Uppercase macro parameter.
7306         (SFREE): Uppercase macros parameter, add parenthese and
7307         whitespace.
7308         (STREQL): Uppercase macro parameter and whitespace.
7309         (STRNEQ): Likewise.
7310         (STRLSS): Likewise.
7311         (STRLEQ): Likewise.
7312         (STRGTR): Likewise.
7313         (STRGEQ): Likewise.
7314
7315         * call.c (convert_like): Add parenthesis and wrap.
7316         (convert_like_with_context): Likewise.
7317         (ICS_RANK): Whitespace.
7318         (NEED_TEMPORARY_P): Remove parenthesis.
7319
7320         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
7321         whitespace.
7322         (VTT_MARKED_BINFO_P): Likewise.
7323
7324         * decl.c (BINDING_LEVEL): Add parenthesis.
7325         (DEF_OPERATOR): Likewise.
7326
7327         * mangle.c (MANGLE_TRACE): Add parenthesis.
7328         (MANGLE_TRACE_TREE): Likewise.
7329         (write_signed_number): Likewise.
7330         (write_unsigned_number): Likewise.
7331
7332         * pt.c (ccat): Uppercase macro parameter.
7333         (cat): Likewise
7334
7335         * search.c (SET_BINFO_ACCESS): Add parenthesis.
7336
7337 2002-01-07  Jason Merrill  <jason@redhat.com>
7338
7339         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
7340         to pedwarn.
7341
7342         PR c++/3536
7343         * method.c (make_thunk): If !flag_weak, give the thunk the
7344         function's linkage.
7345         (use_thunk): Here, too.
7346
7347 2002-01-07  Graham Stott  <grahams@redhat.com>
7348
7349         * error.c: Update copyright date.
7350         (print_scope_operator): Add parenthesis.
7351         (print_left_paren): Likewise.
7352         (print_right_paren): Likewise.
7353         (print_left_bracket): Likewise.
7354         (print_right_bracket): Likewise.
7355         (print_template_argument_list_start): Likewise.
7356         (print_template_argument_list_end): Likewise.
7357         (print_non_consecutive_character): Likewise.
7358         (print_tree_identifier): Likewise.
7359         (print_identifier): Likewise.
7360         (NEXT_CODE): Uppercase macro parameter.
7361         (ident_fndecl): Delete unused.
7362         (GLOBAL_THING): Likewise.
7363
7364 2002-01-06  Graham Stott  <grahams@redhat.com>
7365
7366         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
7367         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
7368         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
7369         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
7370         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
7371         (C_IS_RESERVED_WORD): Uppercase macro parameter.
7372         (C_RID_YYCODE) Likewise.
7373         (ptrmem_cst): Use rtx.
7374         (LOCAL_BINDING_P): Add whitespace.
7375         (INHERITED_VALUE_BINDING_P): Likewise.
7376         (BINDING_SCOPE): Wrap long line.
7377         (BINDING_HAS_LEVEL_P): Remove parenthesis.
7378         (BINDING_VALUE): Wrap long line.
7379         (BINDING_TYPE): Whitespace.
7380         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
7381         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
7382         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
7383         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
7384         (same_type_p): Uppercase macro parameters.
7385         (same_type_ignoring_top_level_qualifiers_p): Likewise.
7386         (OVL_FUNCTION): Wrap long line.
7387         (OVL_CHAIN): Whitespace.
7388         (OVL_CURRENT): Add parenthesis and whitespace.
7389         (OVL_NEXT): Whitespace.
7390         (OVL_USED): Likewise.
7391         (IDENTIFIER_TYPE_VALUE): Likewise.
7392         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
7393         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
7394         (LANG_ID_FIELD): Whitespace.
7395         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
7396         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
7397         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
7398         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
7399         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
7400         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
7401         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
7402         (IDENTIFIER_VIRTUAL_P): Likewise.
7403         (IDENTIFIER_OPNAME_P): Likewise.
7404         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
7405         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
7406         (C_SET_EXP_ORIGINAL_CODE): Likewise.
7407         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
7408         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
7409         (IS_AGGR_TYPE): Uppercase macro parameter.
7410         (CLASS_TYPE_P): Likewise.
7411         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
7412         (IS_AGGR_TYPE_2): Whitespace.
7413         (TAGGED_TYPE_P): Uppercase macro parameter.
7414         (TYPE_BUILT_IN): Whitespace.
7415         (TYPE_FOR_JAVA): Likewise.
7416         (FUNCTION_ARG_CHAIN): Remove parenthesis.
7417         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
7418         (FUNCTION_FIRST_USER_PARAM): Likewise.
7419         (PROMOTES_TO_AGGR_TYPE): Whitespace.
7420         (DERIVED_FROM_P): Add parenthesis and wrap.
7421         (UNIQUELY_DERIVED_FROM_P): Likewise.
7422         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
7423         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
7424         (CLASSTYPE_USE_TEMPLATE): Whitespace.
7425         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
7426         (TYPE_GETS_DELETE): Add parenthesis.
7427         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
7428         (TYPE_HAS_ASSIGN_REF): Likewise,
7429         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
7430         (TYPE_HAS_INIT_REF): Likewise.
7431         (TYPE_HAS_CONST_INIT_REF): Likewise.
7432         (TYPE_BEING_DEFINED): Likewise.
7433         (TYPE_LANG_SPECIFIC): Likewise.
7434         (CLASSTYPE_RTTI): Likewise.
7435         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
7436         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
7437         (TYPE_OVERLOADS_ARROW): Likewise.
7438         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
7439         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
7440         (CLASSTYPE_METHOD_VEC): Likewise.
7441         (CLASSTYPE_MARKED_N): Likewise.
7442         (CLASSTYPE_MARKED): Likewise.
7443         (CLASSTYPE_MARKED2): Likewise.
7444         (CLASSTYPE_MARKED3): Likewise.
7445         (CLASSTYPE_MARKED4): Likewise.
7446         (CLASSTYPE_MARKED5): Likewise.
7447         (CLASSTYPE_MARKED6): Likewise.
7448         (SET_CLASSTYPE_MARKED): Whitespace.
7449         (CLEAR_CLASSTYPE_MARKED): Likewise.
7450         (SET_CLASSTYPE_MARKED2): Likewise.
7451         (CLEAR_CLASSTYPE_MARKED2): Likewise.
7452         (SET_CLASSTYPE_MARKED3): Likewise.
7453         (CLEAR_CLASSTYPE_MARKED3): Likewise.
7454         (SET_CLASSTYPE_MARKED4): Likewise.
7455         (CLEAR_CLASSTYPE_MARKED4): Likewise.
7456         (SET_CLASSTYPE_MARKED5): Likewise.
7457         (CLEAR_CLASSTYPE_MARKED5): Likewise.
7458         (SET_CLASSTYPE_MARKED6): Likewise.
7459         (CLEAR_CLASSTYPE_MARKED6): Likewise.
7460         (CLASSTYPE_TAGS): Likewise.
7461         (CLASSTYPE_VSIZE): Likewise.
7462         (CLASSTYPE_VBASECLASSES): Likewise.
7463         (CANONICAL_BINFO): Add parenthesis.
7464         (CLASSTYPE_SIZE(NODE): Likewise.
7465         (CLASSTYPE_SIZE_UNIT): Likewise.
7466         (CLASSTYPE_ALIGN(NODE): Likewise.
7467         (CLASSTYPE_USER_ALIGN): Likewise.
7468         (TYPE_JAVA_INTERFACE): Likewise.
7469         (CLASSTYPE_PURE_VIRTUALS): Likewise.
7470         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
7471         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
7472         (CLASSTYPE_HAS_MUTABLE): Likewise.
7473         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
7474         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
7475         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
7476         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
7477         (CLASSTYPE_INTERFACE_ONLY): Likewise.
7478         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
7479         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
7480         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
7481         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
7482         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
7483         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
7484         (BINFO_UNSHARED_MARKED): Whitespace.
7485         (BINFO_MARKED): Whitespace and wrap.
7486         (SET_BINFO_MARKED): Likewise.
7487         (CLEAR_BINFO_MARKED): Likewise.
7488         (BINFO_VTABLE_PATH_MARKED): Likewise.
7489         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
7490         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
7491         (BINFO_SUBVTT_INDEX): Remove parenthesis.
7492         (BINFO_VPTR_INDEX): Likewise.
7493         (BINFO_PRIMARY_BASE_OF): Likewise,
7494         (CLASSTYPE_VFIELDS): Whitespace.
7495         (VF_DERIVED_VALUE): Wrap long line.
7496         (NAMESPACE_LEVEL): Whitespace.
7497         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
7498         (DEFARG_POINTER): Whitespace.
7499         (DECL_NEEDED_P): Remove parenthesis.
7500         (DECL_LANGUAGE): Whitespace.
7501         (SET_DECL_LANGUAGE): Add parenthesis.
7502         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
7503         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
7504         (DECL_IN_AGGR_P): Whitespace.
7505         (DECL_FRIEND_P): Likewise.
7506         (DECL_BEFRIENDING_CLASSES): Likewise.
7507         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
7508         (DECL_NONCONVERTING_P): Whitespace.
7509         (DECL_PURE_VIRTUAL_P): Likewise.
7510         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
7511         (DECL_PENDING_INLINE_INFO): Whitespace.
7512         (DECL_SORTED_FIELDS): Likewise.
7513         (DECL_DEFERRED_FN): Likewise.
7514         (DECL_TEMPLATE_INFO): Likewise.
7515         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
7516         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
7517         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
7518         (TMPL_ARGS_LEVEL): Likewise.
7519         (SET_TMPL_ARGS_LEVEL): Likewise.
7520         (INNERMOST_TEMPLATE_PARMS): Whitespace.
7521         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
7522         (INTEGRAL_CODE_P(CODE): Add parenthesis.
7523         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
7524         (TYPE_HAS_CONSTRUCTOR): Whitespace.
7525         (TREE_HAS_CONSTRUCTOR): Likewise.
7526         (TYPE_HAS_DESTRUCTOR): Likewise.
7527         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
7528         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
7529         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
7530         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
7531         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
7532         (TYPE_PTRMEMFUNC_P): Likewise.
7533         (TYPE_PTRMEMFUNC_FLAG): Likewise.
7534         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
7535         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
7536         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
7537         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
7538         (DECL_ACCESS): Whitespace.
7539         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
7540         (DECL_GLOBAL_DTOR_P): Likewise.
7541         (GLOBAL_INIT_PRIORITY): Likewise.
7542         (DECL_TEMPLATE_PARMS): Likewise.
7543         (DECL_TEMPLATE_RESULT): Likewise.
7544         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
7545         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
7546         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
7547         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
7548         (PRIMARY_TEMPLATE_P): Add parenthesis.
7549         (DECL_USE_TEMPLATE): Whitespace.
7550         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
7551         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
7552         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
7553         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
7554         (CALL_DECLARATOR_PARMS): Remove parenthesis.
7555         (CALL_DECLARATOR_QUALS): Likewise.
7556         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
7557         (TEMP_NAME_P): Wrap.
7558         (VFIELD_NAME_P): Likewise.
7559         (B_SET): Uppercase macro parameters and add parenthesis.
7560         (B_CLR): Likewise.
7561         (B_TST): Likewise.
7562         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
7563         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
7564         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
7565         (same_or_base_type_p): Likewise.
7566         (cp_deprecated): Likewise.
7567
7568 2002-01-05  Richard Henderson  <rth@redhat.com>
7569
7570         * semantics.c (expand_body): Revert last change.
7571
7572 2002-01-04  Jason Merrill  <jason@redhat.com>
7573
7574         PR c++/4122
7575         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
7576         lost primary.
7577
7578         * class.c (build_vtbl_initializer): Check for a lost primary
7579         before calculating the vtable entry to throw away.
7580
7581 2002-01-02  Jason Merrill  <jason@redhat.com>
7582
7583         * semantics.c (expand_body): Call outlining_inline_function when
7584         emitting an inline function out of line.
7585
7586 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7587
7588         PR c++/5116, c++/764 reversion
7589         * call.c (build_new_op): Revert the instantiations. They are
7590         incorrect.
7591
7592 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7593
7594         PR c++/5089
7595         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
7596
7597 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7598
7599         PR c++/3716
7600         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
7601         (tsubst, case POINTER_TYPE): Handle pmfs here.
7602         (tsubst, case OFFSET_TYPE): Check it is not an offset to
7603         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
7604
7605 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7606
7607         PR c++/35
7608         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
7609         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
7610         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
7611         PARM_DECL.
7612         (tsubst_template_parms): Break up loop statements.
7613         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
7614         parm PARM_DECLs don't get promoted.
7615
7616 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7617
7618         PR c++/5123
7619         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
7620         (build_x_function_call): Cope with a COMPONENT_REF containing a
7621         TEMPLATE_ID_EXPR.
7622
7623 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7624
7625         PR c++/5213
7626         * pt.c (convert_template_argument): Be more careful determining
7627         when RECORD_TYPE templates are or are not templates.
7628
7629 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7630
7631         PR c++/775
7632         * cp-tree.h (handle_class_head): Adjust prototype.
7633         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
7634         parameters. Use for all class heads.
7635         * parse.y (named_class_head_sans_basetype, named_class_head,
7636         named_complex_class_head_sans_basetype,
7637         named_class_head_sans_basetype_defn,
7638         unnamed_class_head): Remove.
7639         (class_head, class_head_apparent_template): Recognize class heads
7640         (class_head_decl, class_head_defn): New reductions. Process class
7641         heads.
7642         (structsp): Adjust class definition and class declaration
7643         reductions.
7644         (maybe_base_class_list): Give diagnostic on empty list.
7645
7646 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7647
7648         PR c++/4379
7649         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
7650         single non-static member.
7651         (unary_complex_lvalue): If it cannot be a pointer to member, don't
7652         make it so. Check it is not pointer to reference.
7653
7654 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7655
7656         PR c++/5132
7657         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
7658         are processing a template decl.
7659
7660 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7661
7662         PR c++/5116, c++/764
7663         * call.c (build_new_op): Make sure template class operands are
7664         instantiated. Simplify arglist construction.
7665
7666 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
7667
7668         * call.c (build_user_type_conversion_1): Use my_friendly_assert
7669         rather than if ... abort.
7670         * cvt.c (convert_to_reference): Likewise.
7671         * semantics.c (setup_vtbl_ptr): Likewise.
7672         * pt.c (lookup_template_class): Comment typo.
7673
7674 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
7675
7676         PR c++/5125
7677         * pt.c (push_template_decl_real): Make sure DECL has
7678         DECL_LANG_SPECIFIC.
7679
7680 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
7681
7682         PR c++/335
7683         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
7684         for non-reference fields.
7685         * typeck.c (require_complete_type): Use resolve_offset_ref).
7686
7687 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
7688
7689         PR c++/196
7690         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
7691
7692 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
7693
7694         PR c++/160
7695         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
7696         up. Don't stabilize_references when initializing a reference.
7697
7698 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7699
7700         * decl2.c (lang_f_options): Const-ify.
7701
7702 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
7703
7704         * config-lang.in (diff_excludes): Remove.
7705
7706 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
7707
7708         PR c++/90
7709         * typeck.c (build_function_call_real): Use original function
7710         expression for errors.
7711
7712 2001-12-18  Jason Merrill  <jason@redhat.com>
7713
7714         PR c++/3242
7715         * class.c (add_method): Do compare 'this' quals when trying to match a
7716         used function.  Don't defer to another used function.
7717
7718 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
7719
7720         * pt.c (instantiate_clone): Remove, fold into ...
7721         (instantiate_template): ... here. Simplify by removing mutual
7722         recursion.
7723         * typeck2.c (build_m_component_ref): Don't cv qualify the function
7724         pointed to by a pointer to function.
7725         * class.c (delete_duplicate_fields_1): Typo.
7726
7727 2001-12-18  Jason Merrill  <jason@redhat.com>
7728
7729         C++ ABI change: destroy value arguments in caller.
7730         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
7731         create an extra binding level for the parameters.
7732         * decl.c (store_parm_decls): Don't do parameter cleanups.
7733
7734 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
7735
7736         * call.c (build_new_method_call): Use '%#V'.
7737         * error.c (cv_to_string): Use V parameter to determine padding.
7738
7739 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
7740
7741         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
7742         spellings in messages.
7743
7744 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
7745
7746         * cp-tree.h: Delete #defines for cp_error, cp_warning,
7747         cp_pedwarn, and cp_compiler_error.
7748         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
7749         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
7750         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
7751         typeck2.c: Change calls to the above macros to use their
7752         language-independent equivalents: error, warning, pedwarn, and
7753         internal_error respectively.
7754
7755 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
7756
7757         * decl2.c (finish_file): Remove back_end_hook.
7758
7759 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
7760
7761         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
7762         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
7763         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
7764
7765 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
7766
7767         * lang-options.h: Use American spelling in messages.
7768
7769 2001-12-13  Jason Merrill  <jason@redhat.com>
7770
7771         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
7772
7773         Use cleanups to run base and member destructors.
7774         * init.c (push_base_cleanups): New function, split out from...
7775         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
7776         * decl.c (finish_destructor_body): Move vbase destruction code to
7777         push_base_cleanups.
7778         (begin_function_body, finish_function_body): New fns.
7779         (finish_function): Move [cd]tor handling and call_poplevel to
7780         finish_function_body.
7781         (pushdecl): Skip the new level.
7782         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
7783         (setup_vtbl_ptr): Call push_base_cleanups.
7784         * method.c (synthesize_method): Call {begin,end}_function_body.
7785         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
7786         * cp-tree.h: Declare new fns.
7787         * parse.y (function_body, .begin_function_body): New nonterminals.
7788         (fndef, pending_inline, function_try_block): Use function_body.
7789         (ctor_initializer_opt, function_try_block): No longer has a value.
7790         (base_init): Remove .set_base_init token.
7791         (.set_base_init, compstmt_or_error): Remove.
7792         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
7793
7794         * optimize.c (maybe_clone_body): Fix parameter updating.
7795
7796 2001-12-12  Jason Merrill  <jason@redhat.com>
7797
7798         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
7799         * semantics.c (genrtl_start_function): Don't pass
7800         parms_have_cleanups or push an extra binding level.
7801         (genrtl_finish_function): Lose cleanup_label cruft.
7802
7803         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
7804         (ctor_label): Remove.
7805         * semantics.c (finish_return_stmt): Lose ctor_label support.
7806         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
7807         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
7808         dtor_label.
7809
7810         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
7811         check for [cd]tors.
7812         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
7813
7814         * decl.c (finish_function): Check VMS_TARGET, not VMS.
7815
7816         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
7817         (end_cleanup_fn): And poplevel.
7818
7819         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
7820         if we're in a template.
7821
7822 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
7823
7824         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
7825         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
7826         THIS_NAME_P): Delete.
7827         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
7828         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
7829         with internal naming scheme.
7830         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
7831
7832 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
7833
7834         * decl.c (grokdeclarator): Deprecated implicit typename use.
7835
7836 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
7837
7838         PR g++/51
7839         * parse.y (frob_specs): Indicate it is a language linkage which
7840         contained the extern.
7841         * decl.c (grokdeclarator): Allow extern language linkage with
7842         other specifiers.
7843
7844 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
7845
7846         PR g++/72
7847         * decl.c (add_binding): Don't reject duplicate typedefs involving
7848         template parameters.
7849
7850 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
7851
7852         * parse.y, semantics.c: Similarly.
7853
7854 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
7855
7856         PR g++/87
7857         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
7858         (copy_args_p): Rename to ...
7859         (copy_fn_p): ... here.
7860         (grok_special_member_properties): New function.
7861         (grok_op_properties): Lose VIRTUALP parameter.
7862         (copy_assignment_arg_p): Remove.
7863         * call.c (build_over_call): Use copy_fn_p.
7864         * decl.c (grokfndecl): Reformat. Adjust call to
7865         grok_op_properties.
7866         (copy_args_p): Rename to ...
7867         (copy_fn_p): ... here. Reject template functions. Check for pass
7868         by value.
7869         (grok_special_member_properties): Remember special functions.
7870         (grok_ctor_properties): Don't remember them here, just check.
7871         (grok_op_properties): Likewise.
7872         (start_method): Call grok_special_member_properties.
7873         * decl2.c (grokfield): Likewise.
7874         (copy_assignment_arg_p): Remove.
7875         (grok_function_init): Don't remember abstract assignment here.
7876         * pt.c (instantiate_class_template): Call
7877         grok_special_member_properties.
7878         (tsubst_decl): Adjust grok_op_properties call.
7879
7880 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
7881
7882         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
7883         RID_TYPES_COMPATIBLE_P.
7884
7885 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7886
7887         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
7888         call to build_aggr_init.
7889         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
7890
7891 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
7892
7893         * parse.y: Replace uses of the string non-terminal with STRING.
7894         Don't perform string concatentaion here.
7895         (string): Remove non-terminal.
7896         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
7897
7898 2001-12-05  Jason Merrill  <jason@redhat.com>
7899
7900         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
7901         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
7902         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
7903         * pt.c (push_tinst_level): No longer static.
7904         * cp-tree.h: Declare them.
7905
7906         * init.c (resolve_offset_ref): Don't check access for the base
7907         conversion to access a FIELD_DECL.
7908
7909         * cp-tree.h (TYPE_REFFN_P): New macro.
7910         * decl.c (bad_specifiers): Check it, too.
7911
7912         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
7913         on the __*_type_info type if we haven't seen a definition.
7914
7915 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
7916
7917         * decl.c: Include c-common.h.
7918         (shadow_warning): Move to c-common.c.
7919
7920 2001-12-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7921
7922         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
7923
7924 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
7925
7926         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
7927
7928 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
7929
7930         PR g++/164
7931         * init.c (sort_base_init): Allow binfos to be directly specified.
7932         * method.c (do_build_copy_constructor): Explicitly convert to the
7933         base instance.
7934         (do_build_assign_ref): Likewise.
7935
7936 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
7937
7938         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
7939         declaration and initialization.
7940
7941 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
7942
7943         * typeck2.c: Remove leading capital from diagnostic messages, as
7944         per GNU coding standards.
7945
7946 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
7947
7948         PR c++/3394
7949         * decl.c (xref_basetypes): Handle attributes between
7950         'class' and name.
7951
7952 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
7953
7954         PR g++/3381
7955         * parse.y (named_complex_class_head_sans_basetype): Add new
7956         reduction.
7957         * Make-lang.in (parse.c): Adjust expected conflict count.
7958
7959 2001-12-03  Jason Merrill  <jason@redhat.com>
7960
7961         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
7962         immediate binfos for our virtual bases.
7963
7964 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
7965
7966         * call.c (build_java_interface_fn_ref): Similarly.
7967         * except.c (is_admissible_throw_operand): Similarly.
7968         * init.c (build_java_class_ref): Similarly.
7969         * xref.c (open_xref_file): Similarly.
7970
7971 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7972
7973         * class.c (finish_struct): Remove trailing periods from messages.
7974         * decl.c (check_tag_decl): Similarly.
7975         * lex.c (cxx_set_yydebug): Similarly.
7976         * typeck2.c (friendly_abort): Similarly.
7977
7978 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
7979
7980         PR c++/3048
7981         * cp-tree.h (ovl_member): Remove.
7982         * decl2.c (merge_functions): Handle extern "C" functions
7983         specially.
7984         * tree.c (ovl_member): Remove.
7985
7986 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
7987
7988         PR c++/4842
7989         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
7990         FUNCTION_DECL, as input.
7991         (mark_overriders): Remove.
7992         (warn_hidden): Rework for the new ABI.
7993
7994 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
7995
7996         PR c++/3471
7997         * call.c (convert_like_real): Do not build additional temporaries
7998         for rvalues of class type.
7999
8000 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
8001
8002         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
8003         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
8004         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
8005         (DERIVED_FROM_P): Likewise.
8006         (enum base_access): Renumber, add ba_quiet bit mask.
8007         (get_binfo): Remove.
8008         (get_base_distance): Remove.
8009         (binfo_value): Remove.
8010         (ACCESSIBLY_DERIVED_FROM_P): Remove.
8011         * call.c (standard_conversion): Use lookup_base.
8012         * class.c (strictly_overrides): Likewise.
8013         (layout_virtual_bases): Likewise.
8014         (warn_about_ambiguous_direct_bases): Likewise.
8015         (is_base_of_enclosing_class): Likewise.
8016         (add_vcall_offset_vtbl_entries_1): Likewise.
8017         * cvt.c (build_up_reference): Adjust comment.
8018         * init.c (build_member_call): Reformat.
8019         * search.c (get_binfo): Remove.
8020         (get_base_distance_recursive): Remove.
8021         (get_base_distance): Remove.
8022         (lookup_base_r): Tweak.
8023         (lookup_base): Add ba_quiet control. Complete the types here.
8024         (covariant_return_p): Use lookup_base.
8025         * tree.c (binfo_value): Remove.
8026         (maybe_dummy_object): Use lookup_base.
8027         * typeck.c (build_static_cast): Use lookup_base.
8028         (get_delta_difference): Likewise.
8029         * typeck2.c (binfo_or_else): Use lookup_base.
8030         (build_scoped_ref): Add back error_mark_check.
8031         (build_m_component_ref): Use lookup_base.
8032
8033 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8034
8035         * Make-lang.in (c++.generated-manpages): New dummy target.
8036
8037 2001-11-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8038
8039         * Make-lang.in (cp-lang.o): Depends on c-common.h.
8040         * cp-lang.c (c-common.h): Include.
8041         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
8042         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
8043         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
8044
8045 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
8046
8047         * decl2.c (c_language): Move to c-common.c.
8048         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
8049         functions.
8050         (cxx_init): Update.
8051
8052 2001-11-26  Jason Merrill  <jason@redhat.com>
8053
8054         * call.c (joust): Remove COND_EXPR hack.
8055
8056 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
8057
8058         * search.c (lookup_base_r): Declare bk in variable declaration
8059         space.
8060
8061 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
8062
8063         PR g++/3145
8064         * class.c (build_vbase_pointer): Remove.
8065         (build_vbase_path): Remove.
8066         (build_base_path): New function.
8067         * cp-tree.h (base_access, base_kind): New enumerations.
8068         (build_base_path): Declare.
8069         (convert_pointer_to_real): Remove.
8070         (convert_pointer_to): Remove.
8071         (lookup_base): Declare.
8072         (convert_pointer_to_vbase): Remove.
8073         * call.c (build_scoped_method_call): Use lookup_base &
8074         build_base_path instead of convert_pointer_to_real,
8075         get_base_distance & get_binfo.
8076         (build_over_call): Likewise.
8077         * cvt.c (cp_convert_to_pointer): Likewise.
8078         (convert_to_pointer_force): Likewise.
8079         (build_up_reference): Likewise.
8080         (convert_pointer_to_real): Remove.
8081         (convert_pointer_to): Remove.
8082         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
8083         instead of convert_pointer_to_vbase & build_vbase_path.
8084         (emit_base_init): Use build_base_path instead of
8085         convert_pointer_to_real.
8086         (expand_virtual_init): Lose unrequired conversions.
8087         (resolve_offset_ref): Use lookup_base and build_base_path
8088         instead of convert_pointer_to.
8089         * rtti.c (build_dynamic_cast_1): Use lookup_base &
8090         build_base_path instead of get_base_distance & build_vbase_path.
8091         * search.c (get_vbase_1): Remove.
8092         (get_vbase): Remove.
8093         (convert_pointer_to_vbase): Remove.
8094         (lookup_base_r): New function.
8095         (lookup_base): New function.
8096         * typeck.c (require_complete_type): Use lookup_base &
8097         build_base_path instead of convert_pointer_to.
8098         (build_component_ref): Likewise.
8099         (build_x_function_call): Likewise.
8100         (get_member_function_from_ptrfunc): Likewise.
8101         (build_component_addr): Likewise.
8102         * typeck2.c (build_scoped_ref): Likewise.
8103
8104 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8105
8106         * cp-tree.h (CP_TYPE_QUALS): Removed.
8107         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
8108         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
8109         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
8110         * dump.c (cp_dump_tree): Use void* dump_info argument to match
8111         lang-hooks prototype.
8112         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
8113         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
8114         CP_TYPE_QUALS changed to cp_type_quals.
8115         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
8116         (CXX_C_OBJS): Remove c-dump.o.
8117
8118 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
8119
8120         PR c++/3637
8121         * pt.c (lookup_template_class): Ensure that all specializations
8122         are registered on the list corresponding to the most general
8123         template.
8124
8125 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
8126
8127         * call.c (non_reference): Add documentation.
8128         (convert_class_to_reference): Do not strip reference types
8129         from conversion operators.
8130         (maybe_handle_ref_bind): Simplify.
8131         (compare_ics): Correct handling of references.
8132
8133 2001-11-19  John Wilkinson <johnw@research.att.com>
8134
8135         * dump.c (dump_op): New function.
8136         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
8137         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
8138         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
8139
8140 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
8141
8142         PR4629
8143         * semantics.c (finish_sizeof): Make sure that expression created
8144         while processing a template do not have a type.
8145         (finish_alignof): Likewise.
8146         * typeck.c (c_sizeof): Likewise.
8147         (expr_sizeof): Likewise.
8148
8149 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
8150
8151         * lex.c (cxx_finish): Call c_common_finish.
8152         (finish_parse): Remove.
8153
8154 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8155
8156         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
8157         when displaying error message about missing array bounds.
8158
8159 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8160
8161         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
8162         CONST_CAST_EXPR.
8163         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
8164
8165 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
8166
8167         * cp-tree.h (print_class_statistics): Restore.
8168
8169 2001-11-15  Jason Merrill  <jason@redhat.com>
8170
8171         * method.c (use_thunk): Don't emit debugging information for thunks.
8172
8173         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
8174         * decl.c (make_typename_type): Handle getting a class template.
8175         * search.c (lookup_field_r): A class template is good enough for
8176         want_type.
8177
8178         * call.c (convert_like_real): Only use cp_convert for the bad part.
8179         (standard_conversion): Also allow bad int->enum.
8180         * typeck.c (ptr_reasonably_similar): Also allow functions to
8181         interconvert.  Pointers to same-size integers are reasonably
8182         similar.
8183
8184         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
8185         give it void type.
8186
8187 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
8188
8189         PR g++/3154
8190         * init.c (sort_base_init): Remove unreachable code.
8191         (expand_member_init): Adjust comment to reflect reality. Simplify
8192         and remove unreachable code.
8193
8194 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
8195
8196         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
8197         (cxx_init): Update prototype.
8198         * decl.c (init_decl_processing): Rename.  Move null node init
8199         to its creation time.
8200         * lex.c (cxx_init_options): Update.
8201         (cxx_init): Combine with old init_parse; also call
8202         cxx_init_decl_processing.
8203
8204 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
8205
8206         * decl.c (check_initializer): Try to complete the type of an
8207         array element before checking whether it's complete.  Don't
8208         complain about arrays with complete element types but an
8209         unknown size.
8210         (cp_finish_decl): Build the hierarchical constructor before
8211         calling maybe_deduce_size_from_array_init.
8212
8213 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
8214
8215         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
8216
8217 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
8218
8219         PR g++/4206
8220         * parse.y (already_scoped_stmt): Remove.
8221         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
8222
8223 2001-11-12  H.J. Lu <hjl@gnu.org>
8224
8225         * cvt.c (ocp_convert): Don't warn the address of a weak
8226         function is always `true'.
8227
8228 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8229
8230         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
8231         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
8232         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
8233         * cp-tree.h (print_class_statistics): Remove.
8234         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
8235         cxx_print_identifier, cxx_set_yydebug): New.
8236         * lex.c (set_yydebug): Rename c_set_yydebug.
8237         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
8238         lang_print_xnode): Rename.
8239         * tree.c (print_lang_statistics): Rename.
8240
8241 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8242
8243         * class.c (dump_array): Fix format specifier warning.
8244
8245 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8246
8247         * cp-lang.c (LANG_HOOKS_NAME): Override.
8248         (struct lang_hooks): Constify.
8249         * lex.c (cxx_init_options): Update.
8250         (lang_identify): Remove.
8251         * parse.y (language_string): Remove.
8252
8253 2001-11-08  Andreas Franck  <afranck@gmx.de>
8254
8255         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
8256         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
8257         suggested by autoconf.
8258         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
8259         (c++.install-common): Use the transformed target alias names.
8260
8261 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8262
8263         * Make-lang.in: Update.
8264         * cp-lang.c: Include langhooks-def.h.
8265
8266 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8267
8268         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
8269
8270 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8271
8272         * lex.c (copy_lang_type): Add static prototype.
8273
8274 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8275
8276         * pt.c (unify): Handle SCOPE_REF.
8277
8278 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
8279
8280         * tree.c (cp_copy_res_decl_for_inlining): Adjust
8281         DECL_ABSTRACT_ORIGIN for the return variable.
8282
8283 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
8284
8285         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
8286
8287 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
8288
8289         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
8290         semantics.c, spew.c: Fix spelling errors.
8291
8292 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8293
8294         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
8295
8296 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
8297
8298         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
8299         pop_everything.
8300
8301 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8302
8303         * cp-lang.c (cxx_get_alias_set): New function.
8304         Point LANG_HOOKS_GET_ALIAS_SET to it.
8305
8306 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8307
8308         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
8309         * cp-tree.h (make_unbound_class_template): Prototype new function.
8310         * decl.c (make_unbound_class_template): New function.
8311         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
8312         * error.c (dump_type): Likewise.
8313         * mangle.c (write_type): Likewise.
8314         * parse.y (template_parm): Likewise.
8315         (template_argument): Use make_unbound_class_template.
8316         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
8317         (tsubst): Likewise.
8318         (tsubst_copy): Likewise.
8319         (unify): Likewise.
8320         * tree.c (walk_tree): Likewise.
8321         * typeck.c (comptypes): Likewise.
8322
8323 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8324
8325         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
8326         extra calls into fewer ones.
8327
8328 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
8329
8330         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
8331         Warn when merging inline with attribute noinline.
8332         (start_decl, start_function): Warn if inline and attribute
8333         noinline appear in the same declaration.
8334
8335 2001-10-16  H.J. Lu <hjl@gnu.org>
8336
8337         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
8338         for tree checking disabled.
8339
8340 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
8341
8342         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
8343         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
8344
8345 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
8346
8347         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
8348         (unify): Only handle MINUS_EXPR specially if the above flag is set
8349         and the subtracted constant is 1.  Clear the flag on recursive calls.
8350         Set it when unifying the maximum value in an INTEGER_TYPE's range.
8351
8352 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
8353
8354         * decl.c (bad_specifiers): Don't allow exception specifications
8355         on any typedefs.
8356
8357 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
8358
8359         * cp/lex.c (init_cp_pragma): Similarly.
8360
8361 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8362
8363         * pt.c (lookup_template_class): Build complete template arguments
8364         for BOUND_TEMPLATE_TEMPLATE_PARM.
8365
8366 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8367
8368         * cp-tree.h (TYPE_BINFO): Update comment.
8369         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
8370         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
8371         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
8372         (copy_type): Prototype new function.
8373         * lex.c (copy_lang_decl): Gather tree node statistics.
8374         (copy_lang_type): New function.
8375         (copy_type): Likewise.
8376         (cp_make_lang_type): Create lang_type for
8377         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
8378         and BOUND_TEMPLATE_TEMPLATE_PARM.
8379         * pt.c (tsubst): Use copy_type instead of copy_node.
8380         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
8381
8382 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8383
8384         * pt.c (determine_specialization): Ignore functions without
8385         DECL_TEMPLATE_INFO.
8386
8387 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
8388
8389         PR g++/4476
8390         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
8391
8392 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
8393
8394         * typeck2.c (store_init_value): Don't re-digest a bracketed
8395         initializer.
8396
8397         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
8398         ANON_AGGR_TYPE_P.
8399
8400 2001-10-11  Richard Henderson  <rth@redhat.com>
8401
8402         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
8403         of an asm statement.
8404         (build_vtbl_ref_1): Split out from build_vtbl_ref.
8405         (build_vfn_ref): Use it to handle vtable descriptors before
8406         calling build_vtable_entry_ref.
8407         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
8408
8409 2001-10-10  Richard Henderson  <rth@redhat.com>
8410
8411         * parse.y (asm_operand): Allow named operands.
8412         * semantics.c (finish_asm_stmt): Tweek for changed location
8413         of the operand constraint.
8414
8415 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
8416
8417         * call.c (standard_conversion): Add bad conversion between
8418         integers and pointers.
8419         (convert_like_real): Don't use convert_for_initialization for bad
8420         conversions; complain here and use cp_convert.
8421         (build_over_call): Don't handle bad conversions specially.
8422         (perform_implicit_conversion): Allow bad conversions.
8423         (can_convert_arg_bad): New fn.
8424         * cp-tree.h: Declare it.
8425         * typeck.c (convert_for_assignment): Use it.
8426         (ptr_reasonably_similar): Any target type is similar to void.
8427
8428 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
8429
8430         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
8431         (cp/cp-lang.o): New rule.
8432         * cp-tree.h: Declare hooks.
8433         * tree.c: Make hooks non-static.
8434         (init_tree): Don't initialize hooks here.
8435         * lex.c: Likewise.  Move definition of lang_hooks to...
8436         * cp-lang.c: ... new file.
8437
8438 2001-10-08  Richard Henderson  <rth@redhat.com>
8439
8440         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
8441         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
8442
8443 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8444
8445         * class.c (build_vtable_entry_ref): Const-ify.
8446         * decl.c (predefined_identifier,
8447         initialize_predefined_identifiers): Likewise.
8448         * init.c (build_new_1): Likewise.
8449         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
8450         Likewise.
8451
8452 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
8453
8454         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
8455         (INSNS_PER_STMT): Likewise.
8456         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
8457         (copy_body, initialize_inlined_parameters): Likewise.
8458         (declare_return_variable, inlinable_function_p): Likewise.
8459         (expand_call_inline, expand_calls_inline): Likewise.
8460         (optimize_inline_calls, clone_body): Likewise.
8461         * tree.c (walk_tree): Moved to ../tree-inline.c.
8462         (walk_tree_without_duplicates): Likewise.
8463         (copy_tree_r, remap_save_expr): Likewise.
8464
8465 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
8466
8467         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
8468         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
8469         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
8470         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
8471         (flag_inline_trees): Moved declaration to ../tree-inline.h.
8472         (walk_tree): Moved declaration to ../tree-inline.h.
8473         (walk_tree_without_duplicates, copy_tree_r): Likewise.
8474         (remap_save_expr): Likewise.
8475         * decl.c: Include tree-inline.h.
8476         (lang_mark_tree): Don't mark inlined_fns.
8477         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
8478         * optimize.c: Include tree-inline.h.
8479         (optimize_inline_calls): Move declaration to ../tree.h, as
8480         non-static.
8481         (remap_decl): Use language-independent constructs and hooks.
8482         (remap_block, copy_body_r, declare_return_variable): Likewise.
8483         (inlinable_function_p): Likewise.  Don't test for
8484         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
8485         no longer language-specific.
8486         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
8487         call of dump_function to...
8488         (optimize_function): Here...
8489         (clone_body): New function, extracted from...
8490         (maybe_clone_body): ... here.  Build decl_map locally and pass
8491         it on to clone_body.
8492         * pt.c, semantics.c: Include tree-inline.h.
8493         * tree.c: Likewise.
8494         (cp_walk_subtrees): New language-specific hook for tree inlining.
8495         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
8496         cp_is_overload_p, cp_auto_var_in_fn_p,
8497         cp_copy_res_decl_for_inlining): Likewise.
8498         (walk_tree): Move language-specific constructs into...
8499         (cp_walk_subtrees): this new function.
8500         (copy_tree_r): Use language-independent constructs and hooks.
8501         (init_tree): Initialize tree inlining hooks.
8502         (remap_save_expr): Adjust prototype so that the declaration
8503         does not require the definition of splay_tree.
8504
8505 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8506
8507         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
8508         to build the declaration instead of the declaration itself.
8509
8510 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
8511
8512         * decl2.c (cxx_decode_option): Add 'else'.
8513
8514         * spew.c (end_input): No longer static.
8515         * cp-tree.h: Declare it.
8516         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
8517
8518 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
8519
8520         * call.c (build_over_call), typeck.c (build_function_call_real):
8521         Pass type attributes to check_function_format rather than name or
8522         assembler name.  Don't require there to be a name or assembler
8523         name to check formats.
8524
8525 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
8526
8527         * decl.c (init_decl_processing): Don't call
8528         init_function_format_info.  Initialize lang_attribute_table
8529         earlier.
8530         (builtin_function): Call decl_attributes.
8531         (insert_default_attributes): New.
8532
8533 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
8534
8535         * decl.c (grokdeclarator): Copy array typedef handling from C
8536         frontend.
8537
8538         * decl.c (grokdeclarator): Copy too-large array handling from C
8539         frontend.
8540
8541 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
8542
8543         * config-lang.in (target_libs): Added target-gperf, so that we
8544         don't try to build it if C++ is disabled.
8545
8546 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
8547
8548         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
8549         (cp/errfn.o): Delete rule.
8550         (cp/error.o): Depend on flags.h.
8551         * errfn.c: Delete file.
8552         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
8553         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
8554         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
8555         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
8556         internal_error respectively.  Make cp_deprecated into a macro.
8557         Don't define cp_printer typedef or declare cp_printers.
8558         * error.c: Include flags.h.
8559         Delete: struct tree_formatting_info, print_function_argument_list,
8560         print_declaration, print_expression, print_function_declaration,
8561         print_function_parameter, print_type_id, print_cv_qualifier_seq,
8562         print_type_specifier_seq, print_simple_type_specifier,
8563         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
8564         print_parameter_declaration_clause, print_exception_specification,
8565         print_nested_name_specifier, and definition of cp_printers.
8566         (locate_error): New function.
8567         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
8568         rewritten in terms of locate_error and diagnostic.c.
8569         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
8570         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
8571         (init_error): Adjust to match.
8572
8573 2001-09-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8574
8575         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
8576
8577 2001-09-21  Richard Henderson  <rth@redhat.com>
8578
8579         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
8580         (build_vtbl_initializer): Likewise.
8581         (build_vfn_ref): New.
8582         * cp-tree.h: Declare it.
8583         * call.c (build_over_call): Use it.
8584         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
8585         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
8586
8587 2001-09-21  J"orn Rennecke <amylaar@redhat.com>
8588
8589         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
8590
8591 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
8592
8593         Table-driven attributes.
8594         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
8595         * decl2.c (cplus_decl_attributes): Only take one attributes
8596         parameter.
8597         * cp-tree.c (cplus_decl_attributes): Update prototype.
8598         * class.c (finish_struct), decl.c (start_decl, start_function),
8599         decl2.c (grokfield), friend.c (do_friend), parse.y
8600         (parse_bitfield): Update calls to cplus_decl_attributes.
8601         * decl.c (grokdeclarator): Take a pointer to a single ordinary
8602         attribute list.
8603         * decl.h (grokdeclarator): Update prototype.
8604         * decl2.c (grokfield): Take a single ordinary attribute list.
8605         * friend.c (do_friend): Likewise.
8606         * decl.c (shadow_tag, groktypename, start_decl,
8607         start_handler_parms, grokdeclarator, grokparms, start_function,
8608         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
8609         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
8610         (process_template_parm, do_decl_instantiation): Pass single
8611         ordinary attribute lists around.
8612         * decl.c (grokdeclarator): Correct handling of nested attributes.
8613         Revert the patch
8614         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
8615                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
8616                 not the left.
8617         .
8618         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
8619         (cp_attribute_table): Declare.
8620         * decl.c (valid_lang_attribute): Don't define.
8621         (lang_attribute_table): Define.
8622         (init_decl_processing): Initialize lang_attribute_table instead of
8623         valid_lang_attribute.
8624         * tree.c (cp_valid_lang_attribute): Remove.
8625         (handle_java_interface_attribute, handle_com_interface_attribute,
8626         handle_init_priority_attribute): New functions.
8627         (cp_attribute_table): New array.
8628         * decl2.c (import_export_class): Don't use
8629         targetm.valid_type_attribute.
8630
8631 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8632
8633         * Make-lang.in (cp/error.o): Depend on real.h
8634         * error.c: #include "real.h"
8635
8636 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8637
8638         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
8639         xmalloc/strcpy/strcat.
8640
8641 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8642
8643         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
8644         Const-ification.
8645         * pt.c (tsubst_decl): Likewise.
8646
8647 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8648
8649         * decl2.c (lang_f_options): Const-ification.
8650         * lex.c (cplus_tree_code_name): Likewise.
8651         * spew.c (yyerror): Likewise.
8652
8653 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
8654
8655         PR c++/3986
8656         * class.c (force_canonical_binfo_r): Check & move an indirect
8657         primary base first.
8658         (force_canonical_binfo): Check that it's not already
8659         canonical.
8660         (mark_primary_virtual_base): Remove BINFO parameter.
8661         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
8662
8663 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
8664
8665         Remove TYPE_NONCOPIED_PARTS.
8666         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
8667         CLASSTYPE_PURE_VIRTUALS.
8668         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
8669         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
8670         (layout_class_type): Don't call fixup_inline_methods here ...
8671         (finish_struct_1): ... call it here.
8672
8673 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
8674
8675         * decl.c (duplicate_decls): Remove code deadling with
8676         DECL_SAVED_INSNS.
8677         * decl2.c (finish_file): Likewise.
8678         * pt.c (instantiate_decl): Likewise.
8679         * semantics.c (expand_body): Don't defer local functions if
8680         they wouldn't be deferred for some other reason.  Don't
8681         generate RTL for functions that will not be emitted.
8682         (genrtl_start_function): Remove code deadling with
8683         DECL_SAVED_INSNS.
8684         (genrtl_finish_function): Likewise.
8685
8686 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
8687
8688         PR c++/4203
8689         * call.c (build_over_call): Do not optimize any empty base
8690         construction.
8691
8692 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8693
8694         * error.c (dump_template_decl): Output template parameters
8695         together with their specifiers.
8696         Output `class' prefix for template template parameter.
8697         (dump_decl): Fix formatting.
8698
8699 2001-08-30  Kurt Garloff  <garloff@suse.de>
8700
8701         * optimize.c (inlinable_function_p): Allow only smaller single
8702         functions. Halve inline limit after reaching recursive limit.
8703
8704 2001-08-30  Joern Rennecke <amylaar@redhat.com>
8705             Jason Merrill  <jason_merrill@redhat.com>
8706
8707         * class.c (build_vtable_entry_ref): Subtract in char*, not
8708         ptrdiff_t.
8709
8710 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
8711
8712         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
8713         (build_cplus_array_type): Use cp_build_qualified_type, not
8714         TYPE_MAIN_VARIANT, to get an unqualified version.
8715
8716         * decl2.c (grok_alignof): Lose.
8717         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
8718         * typeck.c (c_alignof): Lose.
8719         * semantics.c (finish_sizeof, finish_alignof): New.
8720         * parse.y: Use them.
8721         * cp-tree.h: Declare them.
8722
8723 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
8724
8725         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
8726         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
8727         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
8728
8729 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
8730
8731         * typeck2.c (add_exception_specifier): Only require complete type if
8732         not in processing template declaration.
8733
8734 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8735
8736         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
8737         GNU_xref_start_scope and GNU_xref_end_scope.
8738
8739         * tree.c (TYPE_HASH): Moved to ../tree.h.
8740
8741 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
8742
8743         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
8744         on COMPOUND_EXPRs.
8745
8746 2001-08-14  Richard Henderson  <rth@redhat.com>
8747
8748         * class.c, cp-tree.h (build_vfn_ref): Remove.
8749         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
8750
8751 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
8752
8753         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
8754         empty class assignment as having side-effects to avoid
8755         spurious warnings.
8756
8757 2001-08-13  Zack Weinberg  <zackw@panix.com>
8758
8759         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
8760         * except.c: Include libfuncs.h.
8761
8762 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8763
8764         * decl.c (grokdeclarator): Clarify diagnostic message.
8765
8766 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8767
8768         * decl2.c (do_nonmember_using_decl): Replace using directive
8769         with using declaration in the error message.
8770
8771 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8772
8773         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
8774         criterion to avoid rebuilding expression tree instead of
8775         processing_template_decl.
8776
8777 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
8778
8779         Support named return value optimization for inlines, too.
8780         * decl.c (finish_function): Nullify returns here.
8781         * semantics.c (genrtl_start_function): Not here.
8782         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
8783         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
8784         Also nullify the CLEANUP_STMT for the nrv.
8785         * cp-tree.h: Declare it.
8786         * optimize.c (declare_return_variable): Replace the nrv with the
8787         return variable.
8788         * typeck.c (check_return_expr): Be more flexible on alignment check.
8789         Ignore cv-quals when checking for a matching type.
8790
8791 2001-08-09  Richard Henderson  <rth@redhat.com>
8792
8793         * decl2.c (finish_objects): Use target hooks instead of
8794         assemble_constructor and assemble_destructor.
8795
8796 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8797
8798         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
8799
8800 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
8801
8802         PR c++/3820
8803         Stop using TYPE_NONCOPIED_PARTS.
8804         * call.c (build_over_call): Be careful when copy constructing
8805         or assigning to an empty class.
8806         * class.c (check_bases_and_members): It has a
8807         COMPLEX_ASSIGN_REF if it has a vptr.
8808         (layout_class_type): Don't add empty class padding to
8809         TYPE_NONCOPIED_PARTS.
8810         (finish_struct_1): Don't add the VFIELD either.
8811         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
8812         initialization.
8813
8814 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
8815
8816         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
8817
8818 2001-08-06  Richard Henderson  <rth@redhat.com>
8819
8820         * decl2.c (finish_objects): Pass a symbol_ref and priority to
8821         assemble_{constructor,destructor}.  Remove priority handling.
8822
8823 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8824
8825         Don't allow template-id in using-declaration.
8826         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
8827         (do_class_using_decl): Likewise.
8828
8829 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8830
8831         * cp/spew.c (read_token): No need to pop buffers.
8832
8833 2001-08-02  Stan Shebs  <shebs@apple.com>
8834
8835         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
8836         (fnaddr_from_vtable_entry): Remove decl.
8837         * method.c (use_thunk): Update comment.
8838
8839 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
8840
8841         * repo.c (get_base_filename): Change return value to const char
8842         pointer.
8843
8844 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
8845
8846         Kill -fhonor-std.
8847         * NEWS: Document.
8848         * cp-tree.h (flag_honor_std): Remove.
8849         (CPTI_FAKE_STD): Remove.
8850         (std_node): Remove comment about it being NULL.
8851         (fake_std_node): Remove.
8852         * decl.c (in_fake_std): Remove.
8853         (walk_namespaces_r): Remove fake_std_node check.
8854         (push_namespace): Remove in_fake_std code.
8855         (pop_namespace): Likewise.
8856         (lookup_name_real): Remove fake_std_node check.
8857         (init_decl_processing): Always create std_node. Always add
8858         std:: things there.
8859         (builtin_function): Always put non '_' fns in std.
8860         * decl2.c (flag_honor_std): Remove.
8861         (lang_f_options): Remove honor-std.
8862         (unsupported_options): Add honor-std.
8863         (set_decl_namespace): Remove fake_std_node check.
8864         (validate_nonmember_using_decl): Likewise.
8865         (do_using_directive): Likewise.
8866         (handle_class_head): Likewise.
8867         * dump.c (cp_dump_tree): Likewise.
8868         * except.c (init_exception_processing): Adjust.
8869         * init.c (build_member_call): Remove fake_std_node check.
8870         (build_offset_ref): Likewise.
8871         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
8872         * rtti.c (init_rtti_processing): Adjust.
8873
8874 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
8875
8876         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
8877         operand while calling cp_tree_equal.
8878
8879 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
8880
8881         The 3.0 ABI no longer has vbase pointer fields.
8882         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
8883         FORMAT_VBASE_NAME): Remove.
8884         * method.c (do_build_copy_constructor): Adjust.
8885         (do_build_assign_ref): Adjust.
8886         * search.c (lookup_field_r): Adjust.
8887         * typeck.c (build_component_ref): Adjust.
8888
8889         The 3.0 ABI always has a vtable pointer at the start of every
8890         polymorphic class.
8891         * rtti.c (build_headof_sub): Remove.
8892         (build_headof): Adjust.
8893         (get_tinfo_decl_dynamic): No need to check flag_rtti
8894         here. Adjust.
8895         (create_real_tinfo_var): Explain why we need a hidden name.
8896
8897 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
8898
8899         PR c++/3631
8900         * class.c (update_vtable_entry_for_fn): The fixed adjustment
8901         of a virtual thunk should be from declaring base.
8902
8903 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
8904
8905         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
8906         the shared virtual base, so preserving inheritance graph order.
8907
8908 2001-07-30  Andreas Jaeger  <aj@suse.de>
8909
8910         * decl2.c: Remove unused var global_temp_name_counter.
8911
8912 2001-07-28  Richard Henderson  <rth@redhat.com>
8913
8914         * method.c (pending_inlines): Remove.
8915
8916 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
8917
8918         * class.c (mark_primary_virtual_base): Don't adjust base
8919         offsets here.
8920         (dfs_unshared_virtual_bases): Adjust them here.
8921         (mark_primary_bases): Explain why we adjust at the end.
8922
8923 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
8924
8925         * class.c (finish_struct_1): When copying the primary base's
8926         VFIELD, make sure we find it is at offset zero.
8927
8928 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8929
8930         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
8931         tsubst_expr for default template arguments.
8932
8933 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
8934
8935         PR c++/3621
8936         * spew.c (yylex): Only copy the token's lineno, if it is
8937         nonzero.
8938
8939 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
8940
8941         PR c++/3624
8942         * call.c (resolve_args): Simplify, call
8943         convert_from_reference.
8944         (build_new_op): Resolve and convert from reference ARG1
8945         earlier. Adjust ARG2 & ARG3 resolve and conversion.
8946
8947 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
8948
8949         * decl.c (last_function_parm_tags): Remove.
8950         (current_function_parm_tags): Remove.
8951         (init_decl_processing): Adjust.
8952         (start_function): Adjust.
8953         (store_parm_decls): Adjust.
8954
8955         PR c++/3152
8956         * decl.c (grokdeclarator): Detect when a function typedef is
8957         declaring a function, and create last_function_parms correctly.
8958
8959 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
8960
8961         * call.c (joust): Only prefer a non-builtin candidate to a builtin
8962         one if they have the same signature.
8963
8964         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
8965         it rather than toplevel_bindings_p.  Give it a mangled name if static.
8966         (convert_to_reference): Adjust.
8967         * decl2.c (get_temp_name): Lose.
8968         * mangle.c (mangle_ref_init_variable): New fn.
8969         (mangle_guard_variable): Strip the ref-init header.
8970         * cp-tree.h: Adjust.
8971         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
8972         initializer.
8973         (grok_reference_init): Always use DECL_INITIAL.
8974
8975 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8976
8977         PR c++/3416
8978         * call.c (build_conditional_expr): Recheck args after
8979         conversions.
8980         * cp-tree.h (build_conditional_expr): Move to correct file.
8981         * typeck.c (decay_conversion): Diagnose any unknown types
8982         reaching here.
8983         (build_binary_op): Don't do initial decay or default
8984         conversions on overloaded functions.
8985         (build_static_cast): Don't do a decay conversion here.
8986
8987 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8988
8989         PR c++/3543
8990         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
8991         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
8992
8993 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8994
8995         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
8996         (create_vtbl_ptr): ... here.
8997
8998 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8999
9000         * class.c (build_vbase_offset_vbtl_entries): Look for
9001         non-primary base of which we are a sub vtable.
9002
9003 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
9004
9005         * semantics.c (finish_this_expr):  Remove unused code.
9006
9007 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
9008
9009         Simplify rtti, now we've only one ABI.
9010         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
9011         CPTI_TINFO_VAR_ID.
9012         (tinfo_decl_id, tinfo_var_id): Remove.
9013         (get_typeid_1): Remove.
9014         * rtti.c
9015         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
9016         (typeid_ok_p): New function.
9017         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
9018         (get_tinfo_decl): Remove old abi documentation.
9019         (tinfo_from_decl): Remove.
9020         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
9021         (get_typeid_1): Remove.
9022         (get_base_offset): Remove.
9023         (synthesize_tinfo_var): Absorb get_base_offset.
9024         (create_real_tinfo_var): Don't use tinfo_decl_id.
9025
9026 2001-07-23  Graham Stott  <grahams@redhat.com>
9027
9028         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
9029         variable has_two_argument_delete_p.
9030
9031 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
9032
9033         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
9034         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
9035         (CPTI_INDEX_IDENTIFIER): Remove.
9036         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
9037         (delta2_identifier): Remove.
9038         (index_identifier): Remove.
9039         (pfn_or_delta2_identifier): Remove.
9040         (flag_vtable_thunks): Remove.
9041         (VTABLE_DELTA2_NAME): Remove.
9042         (VTABLE_INDEX_NAME): Remove.
9043         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
9044         (vfunc_ptr_type_node): Adjust.
9045         (VTABLE_NAME_PREFIX): Adjust.
9046         (build_vfn_ref): Lose first parameter.
9047         (fixup_all_virtual_upcast_offsets): Remove.
9048         * decl.c (initialize_predefined_identifiers): Remove
9049         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
9050         (init_decl_processing): Remove no-vtable-thunk code.
9051         * decl2.c (flag_vtable_thunks): Remove.
9052         (mark_vtable_entries): Remove no-vtable-thunk code.
9053         * error.c (dump_decl): Remove no-vtable-thunk code.
9054         (dump_expr): Adjust ptr to member function code.
9055         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
9056         code.
9057         * rtti.c (build_headof): Remove no-vtable-thunk code.
9058         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
9059         * search.c (get_base_distance): Remove expand_upcast_fixups case.
9060         (virtual_context) Remove.
9061         (expand_upcast_fixups): Remove.
9062         (fixup_virtual_upcast_offsets): Remove.
9063         (fixup_all_virtual_upcast_offsets): Remove.
9064         * typeck.c (get_member_function_from_ptrfunc): Remove
9065         no-vtable-thunk code.
9066         * call.c (build_over_call): Adjust call to build_vfn_ref.
9067         * class.c (build_vfn_ref): Lose first parameter. Remove
9068         no-vtable-thunk code.
9069         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
9070         (build_vtable_entry): Remove no-vtable-thunk code.
9071
9072 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
9073
9074         Remove old-abi remnants. Remove comments about old abi
9075         behavior. Remove references to 'new-abi' in comments.
9076         * cp-tree.h: Adjust comments.
9077         (vbase_offsets_in_vtable_p): Delete.
9078         (vcall_offsets_in_vtable_p): Delete.
9079         (vptrs_present_everywhere_p): Delete.
9080         (all_overridden_vfuns_in_vtables_p): Delete.
9081         (merge_primary_and_secondary_vtables_p): Delete.
9082         (TYPE_CONTAINS_VPTR_P): Adjust.
9083         (VTT_NAME_PREFIX): Remove.
9084         (CTOR_VTBL_NAME_PREFIX): Remove.
9085         (init_vbase_pointers): Remove.
9086         * class.c: Adjust coments.
9087         (build_vbase_pointer_fields): Delete.
9088         (build_vbase_pointer): Remove old-abi code.
9089         (build_secondary_vtable): Likewise.
9090         (modify_all_vtables): Likewise.
9091         (create_vtable_ptr): Likewise.
9092         (layout_class_type): Likewise.
9093         (finish_struct_1): Likewise.
9094         (finish_vtbls): Likewise.
9095         (dfs_finish_vtbls): Delete.
9096         (build_vbase_offset_vtbl_entries): Remove old-abi code.
9097         * cvt.c: Adjust comments.
9098         * decl.c: Adjust comments.
9099         * decl2.c: Adjust comments.
9100         * init.c: Adjust comments.
9101         (construct_virtual_bases): Remove old-abi code.
9102         * lang-specs.h: Remove -fno-new-abi.
9103         * mangle.c: Adjust comments.
9104         * rtti.c: Adjust comments.
9105         (get_base_offset): Remove old-abi-code.
9106         * search.c: Adjust comments.
9107         (dfs_init_vbase_pointers): Remove.
9108         (dfs_vtable_path_unmark): Remove.
9109         (init_vbase_pointers): Remove.
9110         * semantics.c: Adjust comments.
9111         (emit_associated_thunks): Remove old-abi code.
9112         * typeck.c: Adjust comments.
9113
9114 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
9115
9116         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
9117         params.h.
9118
9119 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
9120
9121         * class.c (finish_struct_anon): Forbid nested classes.
9122
9123 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
9124
9125         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
9126         * optimize.c: Include debug.h.
9127         (maybe_clone_body): Use debug hook.
9128         * semantics.c: Include debug.h.
9129         (expand_body): Use debug hook.
9130
9131 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
9132
9133         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
9134
9135 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
9136
9137         * class.c (type_requires_array_cookie): New function.
9138         (check_methods): Don't try to figure out whether the type needs a
9139         cookie here.
9140         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
9141         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
9142         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
9143         * pt.c (instantiate_class_template): Don't set
9144         TYPE_VEC_DELETE_TAKES_SIZE.
9145         * NEWS: Document ABI changes from GCC 3.0.
9146
9147 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
9148             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
9149
9150         * NEWS (Changes in GCC 3.0): Fix typo.
9151
9152 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9153
9154         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
9155         which attributes are to be attached, and a flags argument.  Update
9156         call to decl_attributes.
9157         (grokfield): Update call to decl_attributes.
9158         * class.c (finish_struct): Update call to cplus_decl_attributes.
9159         * cp-tree.h (cplus_decl_attributes): Update prototype.
9160         * decl.c (start_decl, grokdeclarator, start_function): Update
9161         calls to decl_attributes and cplus_decl_attributes.
9162         * friend.c (do_friend): Update call to cplus_decl_attributes.
9163         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
9164
9165 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
9166
9167         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
9168         for `register' variables with an asm-specification.
9169
9170 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
9171
9172         * semantics.c (finish_asm_stmt): Mark the output operands
9173         to an asm addressable, if necessary.
9174
9175 2001-07-11  Ben Elliston  <bje@redhat.com>
9176
9177         * Revert this change -- there is a subtle bug.
9178
9179         PR c++/80
9180         * decl.c (finish_enum): New "attributes" argument; pass it to
9181         cplus_decl_attributes.  Use a narrower type if the enum is packed.
9182         * cp-tree.h (finish_enum): Adjust prototype.
9183         * parse.y (enum_head): New non-terminal.
9184         (structsp): Use it. Enums now may be preceded or followed by
9185         optional attributes -- pass their chained tree to finish_enum().
9186         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
9187
9188 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
9189
9190         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
9191         variables.
9192
9193 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
9194
9195         * semantics.c (cp_expand_stmt): Fix for null
9196         current_function_return_value.
9197
9198 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
9199
9200         * call.c (build_op_delete_call): Initialize fn.
9201         (convert_like_real): Delete conditional.
9202         (joust): Initialize *w and *l.
9203         * class.c: Add prototype for binfo_ctor_vtable.
9204         (get_primary_binfo): Initialize result.
9205         * init.c (build_java_class_ref): Initialize name.
9206
9207 2001-07-09  Erik Rozendaal  <dlr@acm.org>
9208
9209         * typeck.c (unary_complex_lvalue): Do not duplicate the
9210         argument to modify, pre-, or post-increment when used as an
9211         lvalue and when the argument has side-effects.
9212
9213 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
9214
9215         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
9216         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
9217         cplus_decl_attributes even if attrs is NULL.
9218         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
9219
9220 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
9221
9222         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
9223         calls to decl_attributes.
9224
9225 2001-07-06  Ira Ruben   <ira@apple.com>
9226
9227         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
9228         be DECL_TEMPLATE_RESULT.
9229
9230 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9231
9232         * cp-tree.h (copy_template_template_parm): Rename to ...
9233         (bind_template_template_parm): ... here.
9234         * tree.c (copy_template_template_parm): Rename to ...
9235         (bind_template_template_parm): ... here.  Remove the case when
9236         NEWARGS is NULL_TREE.
9237         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
9238         BOUND_TEMPLATE_TEMPLATE_PARM.
9239         * pt.c (lookup_template_class): Adjust.
9240
9241 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
9242
9243         * cvt.c (convert_lvalue): New fn.
9244         * cp-tree.h: Declare it.
9245         * method.c (do_build_assign_ref): Use it.
9246         (do_build_copy_constructor): Convert parm to base types
9247         before calling base constructors.
9248
9249         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
9250         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
9251         optimize.
9252         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
9253
9254 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
9255
9256         * optimize.c (optimize_inline_calls): New function, broken out
9257         of ...
9258         (optimize_function): ... here. Call it. Don't inline if it is
9259         a thunk.
9260         (dump_function): Print name of dump flag causing this dump.
9261         * semantics.c (expand_body): Move thunk inline check to
9262         optimize_function.
9263
9264 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
9265
9266         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
9267         (comptypes): Use target.comp_type_attributes.
9268
9269 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
9270
9271         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
9272
9273 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9274
9275         * error.c (lang_print_error_function): Add a `diagnostic_context *'
9276         parameter. Tweak.
9277
9278 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
9279
9280         * decl2.c (import_export_class): Update.
9281
9282 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
9283
9284         * error.c (init_error): Adjust settings.
9285
9286 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
9287
9288         * error.c (init_error): Adjust settings.
9289
9290 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
9291
9292         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
9293         return pointers to data members by reference rather than by value.
9294
9295 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
9296
9297         Implement the Named Return Value optimization.
9298         * cp-tree.h (struct cp_language_function): Add x_return_value.
9299         (current_function_return_value): Now a macro.
9300         * decl.c: Don't define it.
9301         (define_label, finish_case_label): Don't clear it.
9302         (init_decl_processing): Don't register it with GC.
9303         * semantics.c (genrtl_finish_function): Don't check it for
9304         no_return_label.  Copy the RTL from the return value to
9305         current_function_return_value and walk, calling...
9306         (nullify_returns_r): ...this new fn.
9307         * typeck.c (check_return_expr): Set current_function_return_value.
9308
9309 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
9310
9311         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
9312         sharing a ctor vtable with.  Merge code for cases 1 and 2.
9313         (binfo_ctor_vtable): New fn.
9314         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
9315
9316 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
9317
9318         * class.c (dfs_find_final_overrider): Fix logic.
9319
9320         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
9321         virtual thunk instead of non-virtual.
9322         (get_matching_virtual): Uncomment.
9323
9324         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
9325         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
9326         PARM, not ARG.
9327
9328 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
9329
9330         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
9331         we've not emerged from the hierarchy of RTTI_BINFO on reaching
9332         a non-virtual base.
9333
9334 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
9335
9336         * NEWS: Update release number.
9337
9338 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
9339
9340         PR c++/3130, c++/3131, c++/3132
9341         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
9342         * class.c (force_canonical_binfo_r): Move
9343         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
9344         virtual bases unless they're primary and what they're primary
9345         too has been moved.
9346         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
9347         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
9348         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
9349         derived binfo.
9350         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
9351         (layout_nonempty_base_or_field): Add most derived type
9352         parameter. Adjust.
9353         (layout_empty_base): Likewise.
9354         (build_base_field): Likewise.
9355         (build_base_fields): Likewise.
9356         (propagate_binfo_offsets): Add most derived type
9357         parameter. Skip non canonical virtual bases too.
9358         (dfs_set_offset_for_unshared_vbases): Don't skip primary
9359         bases. Do skip canonical bases.
9360         (layout_virtual_bases): Adjust.
9361         (layout_class_type): Adjust.
9362         (dfs_get_primary_binfo): Build list of virtual primary base
9363         candidates.
9364         (get_primary_binfo): Check that the shared virtual primary
9365         base candidate was found first.
9366         (accumulate_vtbl_inits): Don't do anything for non-vptr
9367         containing binfos. For case 1 primary virtual bases, keep
9368         checking that we've not emerged from the hierarchy of RTTI_BINFO.
9369
9370 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
9371
9372         PR c++/3089
9373         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
9374         hierarchy looking for primary bases for a ctor
9375         vtable. Recursively call oneself, if we meet our primary via
9376         this route and haven't met it yet via inheritance graph order.
9377
9378 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
9379
9380         * lang-options.h: Emit documentation for -fno-honor-std, not
9381         -fhonor-std.
9382
9383 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
9384
9385         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
9386         Don't clobber delta.
9387         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
9388
9389 2001-06-10  Mark Mitchell <mark@codesourcery.com>
9390             Gabriel Dos Reis  <gdr@codesourcery.com>
9391
9392         * Make-lang.in (cp/call.o): Depend on diagnostic.h
9393         (cp/typeck.o): Depend on diagnostic.h
9394         (cp/typeck2.o): Depend on diagnostic.h
9395         (cp/repo.o): Depend on dignostic.h
9396         * typeck.c: #include diagnostic.h
9397         (convert_for_initialization): Remove extern declaration for
9398         warningcount and errorcount.
9399
9400         * call.c: #include diagnostic.h
9401         (convert_like_real): Remove extern declaration for warnincount and
9402         errorcount.
9403
9404         * repo.c: #include diagnostic.h
9405         * typeck2.c: #include diagnostic.h
9406
9407 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
9408
9409         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
9410         in previous change.
9411
9412 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
9413
9414         PR c++/2929
9415         * friend.c (do_friend): Use push_decl_namespace for classes at
9416         namespace scope.
9417
9418 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
9419             Jason Merrill <jason_merrill@redhat.com>
9420
9421         PR c++/3061
9422         * class.c (build_secondary_vtable): Use assert, rather than an error
9423         message.
9424         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
9425         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
9426         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
9427         Don't set BINFO_VTABLE for a primary virtual base.
9428
9429 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
9430
9431         * decl.c (duplicate_decls): Update source position information
9432         when a template function is defined.
9433
9434 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
9435
9436         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
9437
9438 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
9439
9440         PR c++/2914
9441         * decl.c (pushtag): Don't push into a complete type's scope.
9442
9443 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
9444
9445         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
9446         (struct lang_decl_flags): Lose generate_with_vtable_p.
9447         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
9448         * class.c (copy_virtuals): Adjust.
9449         * decl2.c (mark_vtable_entries): Adjust.
9450         * method.c (make_thunk, build_vtable_entry): Adjust.
9451         * class.c (update_vtable_entry_for_fn): Only look as far as the
9452         first defining class.
9453         (build_vtbl_initializer): Put nothing in the slot for a function only
9454         defined in a lost primary virtual base.
9455         (add_vcall_offset_vtbl_entries_1): Use the same code for
9456         the lost primary case and the normal case.
9457         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
9458         (get_vfield_offset, get_derived_offset): Lose.
9459         (dfs_find_final_overrider): Use look_for_overrides_here.
9460         (get_matching_virtual): New fn.
9461         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
9462         not BV_VCALL_INDEX.
9463         * search.c (look_for_overrides_here): Split out from...
9464         (look_for_overrides_r): Here.
9465
9466         * class.c (find_final_overrider): Return error_mark_node on error.
9467
9468         * decl2.c (key_method): #if 0 accidental change.
9469
9470 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
9471
9472         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
9473         (build_over_call): Likewise.
9474         * decl.c (grokparms): Likewise.
9475         * pt.c (tsubst_decl): Likewise.
9476         * typeck.c (convert_arguments): Likewise.
9477
9478 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
9479
9480         * semantics.c (begin_class_definition): Robustify.
9481
9482         * pt.c (instantiate_decl): Tell the repository code about the
9483         clones, not the cloned functions.
9484         * repo.c (repo_template_used): Explicitly instantiate the cloned
9485         function, not the clones.
9486
9487 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
9488
9489         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
9490         ICS_BAD_FLAG on created conversion.
9491         (compare_ics): Break out rank.
9492
9493 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
9494
9495         * decl.c (xref_tag): Remove extraneous %s on dependent name
9496         lookup warning.
9497
9498 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
9499
9500         * class.c (layout_vtable_decl): Fix off by one error on
9501         build_index_type.
9502         (build_vtt): Likewise.
9503         (build_ctor_vtbl_group): Likewise.
9504
9505 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
9506
9507         * class.c (maybe_indent_hierarchy): New function.
9508         (dump_class_hierarchy_r): Add flags. Dump extra binfo
9509         information, if enabled. Use maybe_indent_hierarchy. Adjust
9510         output format.
9511         (dump_class_hierarchy): Adjust prototype. Adjust output format.
9512         (dump_array, dump_vtable, dump_vtt): New functions.
9513         (finish_struct_1): Adjust hierarchy dumping.
9514         (initialize_vtable): Call dump_vtable.
9515         (build_vtt): Call dump_vtt.
9516         (build_ctor_vtbl_group): Call dump_vtable.
9517         * decl2.c (flag_dump_class_layout): Remove.
9518         (cxx_decode_option): Remove dump translation unit
9519         and dump class hierarchy check. Call dump_switch_p.
9520         (finish_file): Adjust dumping.
9521         (dump.c): Only dump base classes if not TDF_SLIM.
9522         Only dump namespace members if not TDF_SLIM.
9523         * optimize.c (dump_function): New function.
9524         (optimize_function): Call dump_function.
9525         * semantics.c (expand_body): Use dump_enabled_p.
9526
9527 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
9528
9529         PR g++/2936
9530         Part missed from first commit
9531         * decl2.c (finish_anon_union): Copy context.
9532
9533 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
9534
9535         PR g++/2936
9536         * optimize.c (remap_decl): Remap anonymous aggregate members too.
9537
9538 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
9539
9540         PR g++/2823
9541         * semantics.c (expand_body): Don't optimize thunks.
9542
9543 2001-05-25  Sam TH  <sam@uchicago.edu>
9544
9545         * cp-tree.h lex.h: Fix header include guards.
9546
9547 2001-05-25  Mark Mitchell <mark@codesourcery.com>
9548
9549         * decl.c (init_decl_processing): Tweak.
9550
9551 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
9552
9553         * decl.c (duplicate_decls): Tidy.
9554         (init_decl_processing): Always set flag_no_builtin.
9555
9556 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
9557
9558         PR c++/2184
9559         * decl2.c (do_local_using_decl): Push the decls, even in a
9560         template.
9561
9562 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
9563
9564         * optimize.c (initialize_inlined_parameters): Don't set
9565         TREE_READONLY for a VAR_DECL taking the place of an inlined
9566         PARM_DECL.
9567
9568 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
9569
9570         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
9571         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
9572         attribute.
9573
9574 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
9575
9576         * parse.y: Refer to compound literals as such, not as
9577         constructor-expressions.
9578
9579 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
9580
9581         * call.c (build_op_delete_call): Ignore exception-specifications
9582         when looking for matching delete operators.
9583         * init.c (build_new_1): Compute whether or not the allocation
9584         function used is a placement allocation function or not, and
9585         communicate this information to build_op_delete_call.
9586
9587 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
9588
9589         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
9590         (build_vtbl_ref): Adjust.
9591         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
9592         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
9593         Re-add vtable-gc.
9594         (unsupported_options): Correspondingly.
9595
9596         * decl2.c (maybe_make_one_only): Check flag_weak, not
9597         supports_one_only().
9598
9599         * cp-tree.def (START_CATCH_STMT): Lose.
9600         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
9601         * tree.c (cp_statement_code_p): Don't case it.
9602         * semantics.c (cp_expand_stmt): Likewise.
9603         * cp-tree.h (START_CATCH_TYPE): Lose.
9604         (HANDLER_TYPE): New.
9605         * except.c (expand_start_catch_block): Don't start any blocks.
9606         Return the type.
9607         (expand_end_catch_block): Don't end any blocks.
9608         * parse.y (handler): Don't pass anything from finish_handler_parms
9609         to finish_handler.
9610         * pt.c (tsubst_expr): Likewise.
9611         * semantics.c (begin_handler): Call note_level_for_catch here.
9612         (finish_handler_parms): Don't return anything.
9613         (genrtl_catch_block, begin_catch_block): Lose.
9614         (genrtl_handler): Call expand_start_catch here.
9615
9616 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
9617
9618         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
9619         (get_vtable_decl, build_vtt): Not here.
9620
9621 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
9622
9623         PR c++/2781
9624         * optimize.c (update_cloned_parm): Copy addressability and other
9625         flags.
9626
9627 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9628
9629         * pt.c (determine_specialization): Ignore artificial functions.
9630
9631 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
9632
9633         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
9634         (C_RID_CODE): Remove.
9635         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
9636         (init_parse): Don't do it here.
9637
9638 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
9639
9640         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
9641         function declaration to avoid stripping the symbol's attributes.
9642
9643 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
9644
9645         * decl.c (pushdecl): Adjust error string.
9646         (xref_tag): Adjust friend class injection warning. Remove the
9647         inherited name from the class shadowed scope.
9648
9649 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
9650
9651         * except.c (cp_protect_cleanup_actions): New function.
9652         (init_exception_processing): Don't set protect_cleanup_actions
9653         here.  Do set lang_protect_cleanup_actions.
9654
9655 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
9656
9657         * spew.c (read_token): Call yyerror on all unexpected tokens.
9658
9659 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
9660
9661         * init.c (member_init_ok_or_else): Take a tree rather than
9662         string for name.
9663         (expand_member_init): Adjust.
9664
9665 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
9666
9667         * decl.c (duplicate_decls): Suppress warning about duplicate
9668         decls if the first decl is a friend.
9669
9670 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
9671
9672         * except.c (choose_personality_routine): Export.  Add
9673         explanatory comment.  Take an enum languages, not a boolean.
9674         (initialize_handler_parm): Adjust to match.
9675         * cp-tree.h: Prototype choose_personality_routine.
9676         * lex.c (handle_pragma_java_exceptions): New function.
9677         (init_cp_pragma): Register #pragma GCC java_exceptions.
9678
9679 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
9680
9681         * method.c (build_mangled_C99_name): Remove unused prototype.
9682
9683 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
9684
9685         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
9686         * typeck.c (get_member_function_from_ptrfunc,
9687         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
9688         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
9689
9690         Reverted Geoff Keating's 2001-05-03's patch.
9691
9692 2001-05-11  Ira Ruben   <ira@apple.com>
9693
9694         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
9695
9696 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
9697
9698         * cp-tree.h (finish_label_expr, lookup_label): Delete.
9699         * parse.y: Update for '&&'; don't issue warning here.
9700         * semantics.c (finish_label_expr): Delete.
9701
9702 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
9703
9704         * splay-tree.h (splay_tree_max): New function.
9705         (splay_tree_min): Likewise.
9706
9707 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
9708
9709         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
9710         (pfn_vflag_identifier): Define.
9711         Update comment about layout of pointer functions.
9712         (build_ptrmemfunc1): Update prototype.
9713         (expand_ptrmemfunc_cst): Update prototype.
9714         * decl.c (initialize_predefined_identifiers): Initialize
9715         pfn_vflag_identifier.
9716         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
9717         an extra field to the type.
9718         * expr.c (cplus_expand_constant): Pass 'flag' between
9719         expand_ptrmemfunc_cst and build_ptrmemfunc1.
9720         * typeck.c (get_member_function_from_ptrfunc): When
9721         FUNCTION_BOUNDARY < 16, look at additional field to determine
9722         if a pointer-to-member is a real pointer or a vtable offset.
9723         (build_ptrmemfunc1): Add new parameter to contain extra field.
9724         (build_ptrmemfunc): Pass the extra field around.
9725         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
9726         (pfn_from_ptrmemfunc): Ignore the extra field.
9727
9728 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
9729
9730         * cp-tree.h (flag_inline_trees): Update documentation.
9731         * decl.c (init_decl_processing): Adjust handling of
9732         flag_inline_functions and flag_inline_trees to support -O3.
9733         (grokfndecl): Set DECL_INLINE on all functions if that's what
9734         the user requested.
9735         (save_function_data): Clear DECL_INLINE in
9736         current_function_cannot_inline is non-NULL.
9737         * decl2.c (flag_inline_trees): Update documentation.
9738
9739 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
9740
9741         * dump.c (cp_dump_tree, USING_STMT case): New case.
9742         * tree.c (cp_statement_code_p): Add USING_STMT.
9743         * decl2.c (do_using_directive): Add the using directive statement.
9744
9745         * tree.c (walk_tree): Reformat an if block.
9746
9747 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
9748
9749         * decl.c (compute_array_index_type): Don't try to do anything with
9750         the indices when processing a template.
9751
9752 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9753
9754         * call.c: NULL_PTR -> NULL.
9755         * class.c: Likewise.
9756         * cvt.c: Likewise.
9757         * decl.c: Likewise.
9758         * decl2.c: Likewise.
9759         * except.c: Likewise.
9760         * init.c: Likewise.
9761         * rtti.c: Likewise.
9762         * search.c: Likewise.
9763         * tree.c: Likewise.
9764         * typeck.c: Likewise.
9765         * typeck2.c: Likewise.
9766
9767 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
9768
9769         * decl2.c (do_using_directive): Revert previous patch.
9770
9771 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
9772
9773         * cp-tree.def (USING_STMT): New statement node.
9774         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
9775         * decl2.c (do_using_directive): Add USING_STMT to statement
9776         tree. Don't emit errors when processing template decl.
9777         * pt.c (tsubst_expr, USING_STMT case): New case.
9778         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
9779
9780 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
9781
9782         * call.c (build_new_op): Convert args from reference here.
9783         (build_conditional_expr): Don't convert here.
9784
9785 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
9786
9787         * spew.c (last_token_id): New static variable.
9788         (read_token): Set it here.
9789         (yyerror): Use it here.
9790
9791 2001-04-30  Richard Henderson  <rth@redhat.com>
9792
9793         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
9794         * decl.c: Likewise.
9795
9796 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
9797
9798         * gxxint.texi: Remove.
9799         * Make-lang.in: Remove all traces of gxxint.texi.
9800
9801 2001-04-30  Mark P Mitchell  <mark@codesourcery.com>
9802
9803         * decl2.c (start_static_initialization_or_destruction): Correct
9804         logic to handle the -fno-use-cxa-atexit case.
9805
9806 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
9807
9808         * optimize.c (update_cloned_parm): New function.
9809         (maybe_clone_body): Use it.  Update the `this' parameter too.
9810
9811 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
9812
9813         * decl2.c (unsupported_options): Add new-abi.
9814         * lang-options.h: Remove no longer supported options.
9815
9816 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
9817
9818         * except.c (can_convert_eh): Don't check template parms,
9819         typename types etc.
9820
9821 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
9822
9823         * optimize.c (maybe_clone_body): Copy parameter names and locations.
9824
9825 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
9826
9827         * cp-tree.h (adjust_clone_args): Prototype new function.
9828         * class.c (adjust_clone_args): New function.
9829         * decl.c (start_function): Call it for in charge ctors.
9830
9831 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
9832
9833         * method.c (use_thunk): Make sure that thunks really are emitted
9834         when requested.
9835
9836 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
9837
9838         * mangle.c (write_chars): New macro.
9839         (hwint_to_ascii): New function
9840         (write_number): Use it.
9841         (write_integer_cst): Deal with really big numbers.
9842
9843 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
9844
9845         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
9846         the clone.
9847
9848 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
9849
9850         * decl.c (grokdeclarator): Set context of namespace scope
9851         TYPE_DECLS.
9852
9853 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
9854
9855         * cp/optimize.c: Include hashtab.h.
9856         (struct inline_data): Add tree_pruner.
9857         (expand_call_inline, expand_calls_inline): Use it when calling
9858         walk_tree.
9859         (optimize_function): Initialize and free tree_pruner.
9860
9861 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
9862
9863         Lazy __FUNCTION__ generation.
9864         * cp-tree.def (FUNCTION_NAME): Remove.
9865         * cp-tree.h (function_name_declared_p): Remove.
9866         (cp_fname_init): Prototype.
9867         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
9868         don't call declare_function_name. Call start_fname_decls.
9869         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
9870         clobber the line number.
9871         (cp_fname_init): New function.
9872         (start_function): Call start_fname_decls.
9873         (finish_function): Call finish_fname_decls.
9874         * lex.c (reswords): Add slots for __FUNCTION__ et al.
9875         (rid_to_yy): Add mappings for __FUNCTION__ et al.
9876         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
9877         * parse.y (VAR_FUNC_NAME): New token.
9878         (primary): Add VAR_FUNC_NAME.
9879         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
9880         generation.
9881         (tsubst, FUNCTION_NAME case): Remove.
9882         (tsubst_copy, FUNCTION_NAME case): Remove.
9883         (tsubst_expr, DECL_STMT case): Be careful with a
9884         DECL_PRETTY_FUNCTION_P.
9885         (instantiate_decl): Remove function_name_declared_p.
9886         * semantics.c (begin_compound_statement): Don't call
9887         declare_function_name here.
9888         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
9889         (finish_translation_unit): Call finish_fname_decls.
9890         (expand_body): Remove function_name_declared_p.
9891         * typeck2.c (digest_init): Allow any ERROR_MARK.
9892
9893 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
9894
9895         * pt.c (tsubst_decl): Use VOID_TYPE_P.
9896         * semantics.c: Fix some typos.
9897
9898 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
9899
9900         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
9901
9902 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9903
9904         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
9905
9906 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
9907
9908         * except.c (build_throw): Wrap the initialization of the exception
9909         object in a MUST_NOT_THROW_EXPR.
9910         (do_free_exception): #if 0.
9911
9912 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
9913
9914         * cp-tree.h (finish_enum): Change prototype.
9915         * decl.c (finish_enum): Reorganize.
9916         * parse.y (structsp): Adjust calls to finish_enum.
9917
9918 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
9919
9920         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
9921         't' case.
9922
9923 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
9924
9925         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
9926         (layout_empty_base): Return at end flag.
9927         (build_base_field): Likewise.
9928         (build_base_fields): Likewise.
9929         (layout_virtual_bases): Don't add 1 to eoc value.
9930         (end_of_class): Use full size for empty bases.
9931         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
9932         empty bases. Don't add 1 to eoc value. Only add trailing padding
9933         if we're an empty class with no empty bases.
9934         (dump_class_hierarchy): Dump size and alignment.
9935
9936 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
9937
9938         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
9939         ICS_BAD_FLAG.
9940
9941 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
9942
9943         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
9944         is found, look first if name does not match the structure name.
9945
9946 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
9947
9948         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
9949         set.
9950         (SET_DECL_LANGUAGE): New macro.
9951         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
9952         (pushdecl): Likewise.
9953         (build_library_fn_1): Likewise.
9954         (build_cp_library_fn): Likewise.
9955         (grokfndecl): Likewise.
9956         (grokvardecl): Mark `extern "C"' variables as having C linkage.
9957         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
9958         * lex.c (retrofit_lang_decl): Likewise.
9959         * mangle.c (mangle_decl_string): Don't mangle the names of
9960         variables declared with C language linkage.
9961         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
9962
9963 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
9964
9965         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
9966         flag_access_control from uninitialized storage.
9967
9968 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
9969
9970         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
9971         * mangle.c (write_pointer_to_member_type): Fix mangling of
9972         pointers to cv-qualified member function types.
9973
9974         * init.c (build_delete): Create a SAVE_EXPR for the address if
9975         we're going to use it more than once.
9976
9977 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
9978
9979         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
9980         (expand_ptremfunc_cst): Change prototype.
9981         (delta2_from_ptrmemfunc): Remove.
9982         * expr.c (cplus_expand_constant): Adjust call to
9983         expand_ptrmemfunc_cst.
9984         * typeck.c (build_ptrmemfunc1): Simplify.
9985         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
9986         results in a constant.
9987         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
9988         (delta2_from_ptrmemfunc): Remove.
9989         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
9990
9991 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
9992
9993         * cp-tree.h (decl_namespace_list): New macro.
9994         (struct saved_scope): Add decl_ns_list.
9995         * decl.c (mark_saved_scope): Mark it.
9996         * decl2.c: Lose static decl_namespace_list.
9997         (init_decl2): Don't save it.
9998
9999 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10000
10001         * cp-tree.h (warn_return_type, yylex): Delete redundant
10002         declarations.
10003
10004         * decl.c (current_class_depth, global_namespace): Likewise.
10005
10006         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
10007
10008         * repo.c (flag_use_repository): Likewise.
10009
10010 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10011
10012         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
10013         set_block, pushdecl, getdecls, gettags, init_decl_processing,
10014         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
10015         lvalue_or_else, print_lang_statistics, comp_target_types,
10016         unsigned_type, signed_type, signed_or_unsigned_type,
10017         build_function_call, mark_addressable, incomplete_type_error):
10018         Delete redundant declarations.
10019
10020 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
10021
10022         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
10023         (TYPE_ANONYMOUS_P): New macro.
10024         (TAGGED_TYPE_P): New macro.
10025         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
10026         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
10027         * tree.c (no_linkage_helper): Likewise.
10028         * semantics.c (begin_class_definition): Likewise.
10029         * pt.c (convert_template_argument): Likewise.
10030         * lex.c (check_for_missing_semicolon): Likewise.
10031
10032 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
10033
10034         * class.c (dfs_unshared_virtual_bases): New function.
10035         (mark_primary_bases): Call it.
10036         (check_bases): Ignore virtual bases when determining
10037         nearly-emptiness.
10038
10039 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
10040
10041         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
10042
10043 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
10044
10045         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
10046         cloned function to the clone.
10047
10048 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10049
10050         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
10051
10052         * semantics.c: Include expr.h.
10053
10054 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
10055
10056         * method.c (implicitly_declare_fn): Commonize code for copy ctor
10057         and assignment op. Set TREE_USED for parameter.
10058
10059 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
10060
10061         * class.c (find_final_overrider_data): Add `candidates'.
10062         (dfs_find_final_overrider): Don't issue error messages
10063         prematurely.
10064         (find_final_overrider): Issue error messages here.
10065         (build_base_field): Don't warn about amgibuous direct bases here.
10066         (warn_about_ambiguous_direct_bases): New function.
10067         (layout_class_type): Use it.
10068
10069 2001-04-10  Richard Henderson  <rth@redhat.com>
10070
10071         * typeck.c (build_array_ref): Push the array reference inside
10072         COMPOUND_EXPR and COND_EXPR.
10073
10074 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
10075
10076         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
10077         * decl.c (duplicate_decls): Adjust accordingly.
10078         (maybe_commonize_var): Likewise.
10079         (grokfndecl): Likewise.
10080         (start_function): Likewise.
10081         (start_method): Likewise.
10082         * decl2.c (key_method): Likewise.
10083         (import_export_decl): Likewise.
10084         * method.c (implicitly_declare_fn): Likewise.
10085         * optimize.c (maybe_clone_body): Likewise.
10086
10087 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
10088
10089         * lang-specs.h: Add __DEPRECATED.
10090
10091 2001-04-05  J"orn Rennecke <amylaar@redhat.com>
10092
10093         * search.c (get_dynamic_cast_base_type): When building a new
10094         constant, set its type to ssizetype.
10095
10096 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
10097
10098         * optimize.c (expand_call_inline): Only add newly inlined statements
10099         into inlined_stmts.
10100
10101 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
10102
10103         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
10104         (OPERATOR_FORMAT): Likewise.
10105         (OPERATOR_TYPENAME_FORMAT): Likewise.
10106         * operators.def: Remove old name-mangling information.
10107         * decl.c (grok_op_properties): Adjust accordingly.
10108         * lex.c (init_operators): Likewise.
10109         * rtti.c (get_tinfo_decl): Issue error messages about types that
10110         have variable size.
10111
10112 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
10113
10114         * decl2.c (import_export_decl): Don't call import_export_class
10115         when processing an inline member function.
10116         * semantics.c (expand_body): Call import_export_decl before
10117         emitting inline functions.
10118
10119 2001-03-28  Richard Henderson  <rth@redhat.com>
10120
10121         IA-64 ABI Exception Handling:
10122         * cp-tree.def (EH_SPEC_BLOCK): New.
10123         (MUST_NOT_THROW_EXPR): New.
10124         * cp-tree.h: Update changed function declarations.
10125         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
10126         (CPTI_CALL_UNEXPECTED): New.
10127         (struct cp_language_function): Rename x_eh_spec_try_block
10128         to x_eh_spec_block.
10129         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
10130         * decl.c (current_binding_level): If no current function
10131         bindings, revert to scope_chain.
10132         (initialize_predefined_identifiers): Remove __cp_push_exception.
10133         (store_parm_decls): Use begin_eh_spec_block.
10134         (finish_function): Use finish_eh_spec_block.
10135         (mark_lang_function): Update for name changes.
10136         * decl2.c (finish_file): No mark_all_runtime_matches.
10137         * dump.c (cp_dump_tree): Handle new tree codes.
10138         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
10139         * except.c (catch_language_init, catch_language): Remove.
10140         (init_exception_processing): Don't set language code.
10141         Initialize call_unexpected_node, protect_cleanup_actions,
10142         eh_personality_libfunc, lang_eh_runtime_type.
10143         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
10144         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
10145         (prepare_eh_type): Split out type canonicalizations ...
10146         (build_eh_type_type): ... from here.
10147         (build_eh_type_type_ref): Remove.
10148         (mark_all_runtime_matches): Remove.
10149         (build_exc_ptr): New.
10150         (do_begin_catch, do_end_catch): New.
10151         (do_pop_exception): Remove.
10152         (build_terminate_handler): Remove.
10153         (choose_personality_routine): Split out language choice from ...
10154         (initialize_handler_parm): ... here.
10155         Use MUST_NOT_THROW_EXPR.
10156         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
10157         exception object handling.
10158         (expand_start_eh_spec, expand_end_eh_spec): Remove.
10159         (expand_exception_blocks, alloc_eh_object): Remove.
10160         (begin_eh_spec_block, finish_eh_spec_block): New.
10161         (do_allocate_exception, do_free_exception): New.
10162         (expand_throw): Merge into ...
10163         (build_throw): ... here.  Update for abi.
10164         * expr.c (cplus_expand_expr): No expand_internal_throw.
10165         Handle MUST_NOT_THROW_EXPR.
10166         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
10167         * semantics.c (*) Update for except.h name changes.
10168         (genrtl_try_block): No protect_with_terminate.
10169         (genrtl_eh_spec_block): New.
10170         (genrtl_handler): Don't emit the goto here.
10171         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
10172         (genrtl_finish_function): Don't expand_exception_blocks.
10173         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
10174
10175 2001-03-28  Richard Henderson  <rth@redhat.com>
10176
10177         * decl.c (struct named_label_list): Rename eh_region to
10178         in_try_scope, add in_catch_scope.
10179         (struct binding_level): Rename eh_region to is_try_scope,
10180         add is_catch_scope.
10181         (note_level_for_try): Rename from note_level_for_eh.
10182         (note_level_for_catch): New.
10183         (poplevel): Copy both is_try_scope and is_catch_scope to
10184         the named_label_list struct.
10185         (check_previous_goto_1): Don't check for catch block via
10186         DECL_ARTIFICIAL; use in_try_scope instead.
10187         (check_goto): Likewise.
10188         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
10189         * except.c (expand_start_catch_block): Call note_level_for_catch.
10190         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
10191
10192 2001-03-27  Richard Henderson  <rth@redhat.com>
10193
10194         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
10195         exceptions_via_longjmp.
10196
10197 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
10198
10199         * pt.c (check_default_tmpl_args):  Make error messages clearer.
10200
10201 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
10202
10203         * error.c:  Also undefine 'A' macro used for cp_printers definition.
10204
10205 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10206
10207         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
10208
10209 2001-03-26  Mike Yang <yang@research.att.com>
10210             Mark Mitchell  <mark@codesourcery.com>
10211
10212         * dump.c (dump_access): New function.
10213         (cp_dump_tree): Use it.  Dump basetype information for class
10214         types.
10215
10216 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
10217
10218         * Makefile.in (optimize.o): Depend on params.h.
10219         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
10220         (init_decl_processing): Set flag_no_inline when doing
10221         inlining-on-trees.
10222         * optimize.c: Include params.h.
10223         (struct inline_data): Improve documentation of FNS.  Add
10224         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
10225         (INSNS_PER_STMT): New macro.
10226         (remap_block): Use CLONING_P.
10227         (inlinable_function_p): Don't inline big functions.
10228         (expand_call_inline): Keep track of how much inlining we've done.
10229         (optimize_function): Set FIRST_INLINED_FN.
10230         (maybe_clone_body): Set CLONING_P.
10231         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
10232         tree nodes.
10233         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
10234         rest_of_compilation.  Clear DECL_RTL for local variables
10235         afterwards.
10236         (clear_decl_rtl): New function.
10237
10238 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
10239
10240         Implement DR 209
10241         * cp-tree.h (skip_type_access_control,
10242         reset_type_access_control): Prototype.
10243         * decl.c (grokdeclarator): Access of friends is not checked.
10244         * parse.y (component_decl_list): Reset type access control.
10245         * semantics.c (decl_type_access_control): Clear
10246         current_type_lookups.
10247         (save_type_access_control): Don't save if not deferring.
10248         (skip_type_access_control, reset_type_access_control): New
10249         functions.
10250         (begin_class_definition): Do type access control for basetypes.
10251         Start deferred access control.
10252         (finish_class_definition): Resume immediate access control if
10253         this is a local class.
10254
10255 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10256
10257         * class.c (add_method): Use memcpy/memmove, not bcopy.
10258
10259         * decl.c (duplicate_decls): Likewise.
10260
10261 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
10262
10263         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
10264         not `_'.
10265
10266 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
10267
10268         * decl.c (local_names): Define.
10269         (push_local_name): New.
10270         (grok_reference_init): Return init if initializing static reference
10271         variable with non-constant instead of emitting it.
10272         Move expand_static_init call to cp_finish_decl.
10273         (layout_var_decl): Call push_local_name.
10274         (maybe_commonize_var): Allow inlining functions even if they have
10275         static local variables, use comdat_linkage for them if flag_weak.
10276         (check_initializer): Call obscure_complex_init if
10277         grok_reference_init returned nonzero.
10278         (save_function_data): Clear x_local_names.
10279         (pop_cp_function_context): Free x_local_names.
10280         (mark_inlined_fns): Remove.
10281         (mark_lang_function): Mark x_local_names.
10282         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
10283         Mark inlined_fns as tree, remove call to mark_inlined_fns.
10284         * class.c (alter_access): Ensure DECL_ACCESS is never set if
10285         DECL_DISCRIMINATOR_P.
10286         * cp-tree.h (cp_language_function): Add x_local_names.
10287         (lang_decl_flags): Add discriminator into u2.
10288         (lang_decl_inlined_fns): Remove.
10289         (lang_decl): inlined_fns is now a TREE_VEC.
10290         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
10291         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
10292         TREE_VEC, not a custom structure.
10293         (optimize_function): Likewise.
10294         * mangle.c (discriminator_for_local_entity): Discriminate among
10295         VAR_DECL local entities.
10296         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
10297         is not valid.
10298
10299 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
10300
10301         Add support for Java interface method calls.
10302         * cp-tree.h (struct lang_type): Add java_interface flag.
10303         (TYPE_JAVA_INTERFACE): New macro.
10304         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
10305         by setting TYPE_JAVA_INTERFACE.
10306         * call.c (java_iface_lookup_fn): New static.
10307         (build_over_call): If calling a method declared in a
10308         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
10309         expression which resolves the function address.
10310         (build_java_interface_fn_ref): New function.
10311
10312 2001-03-22  Richard Henderson  <rth@redhat.com>
10313
10314         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
10315         * except.c: Don't include it.
10316
10317 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
10318             based on an idea from Joe Buck <jbuck@synopsys.com>
10319
10320         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
10321         New nonterminals.
10322         (data_def, component_decl): Add reductions to bad_decl.
10323
10324 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
10325
10326         * method.c (do_build_assign_ref): Don't use build_modify_expr for
10327         anonymous aggregates, since they don't have assignment operator
10328         method.
10329         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
10330         assignment operators for anonymous structure fields.
10331
10332 2001-03-21  Jason Merrill  <jason@redhat.com>
10333
10334         * pt.c (instantiate_decl): Abort if we see a member constant
10335         instantiation that doesn't already have its initializer.
10336         Downgrade explicit instantiation without definition to pedwarn.
10337
10338         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
10339         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
10340         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
10341
10342         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
10343         (pending_vtables): Remove.
10344         * decl2.c (pending_vtables): Remove.
10345         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
10346         CLASSTYPE_VTABLE_NEEDS_WRITING.
10347         (import_export_class): Likewise.
10348         (init_decl2): Don't mark pending_vtables.
10349         * lex.c (handle_pragma_vtable): Just sorry.
10350         * pt.c (instantiate_class_template): Don't mess with
10351         CLASSTYPE_VTABLE_NEEDS_WRITING.
10352         (mark_class_instantiated): Likewise.
10353         * ptree.c (print_lang_type): Don't print it.
10354         * semantics.c (begin_class_definition): Don't set it.
10355
10356         * pt.c (template_tail): Replace with last_pending_template.
10357         (maybe_templates, maybe_template_tail): Remove.
10358         (add_pending_template): Adjust.
10359         (instantiate_pending_templates): Adjust.
10360
10361         * cp-tree.h (struct saved_scope): Remove lang_stack field.
10362         (current_lang_stack): Remove.
10363         * decl.c (maybe_push_to_top_level): Don't initialize it.
10364         (duplicate_decls): Use current_lang_depth.
10365         (xref_basetypes): Likewise.
10366         * class.c (current_lang_depth): New fn.
10367         (push_lang_context): Use more varray functionality.
10368         (pop_lang_context): Likewise.
10369
10370         * error.c (GLOBAL_THING): Always use '__'.
10371
10372 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
10373
10374         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
10375
10376         * mangle.c (mangle_decl_string): Mangle the names of overloaded
10377         operators, even when they have `extern "C"' linkage.
10378
10379 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
10380
10381         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
10382         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
10383         where it's not necessary.
10384         (add_method): Remove optimization involving comparison of
10385         DECL_ASSEMBLER_NAME.
10386         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
10387         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
10388         where it's not necessary.
10389         (check_methods): Likewise.
10390         (build_clone): Likewise.
10391         (built_vtt): Likewise.
10392         * cp-tree.h (DECL_NEEDED_P): Likewise.
10393         * decl.c (pushtag): Likewise.
10394         (duplicate_decls): Likewise.
10395         (pushdecl): Likewise.
10396         (builtin_function): Likewise.
10397         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
10398         (build_cp_library_fn): Likewise.
10399         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
10400         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
10401         where it's not necessary.
10402         (make_rtl_for_nonlocal_decl): Likewise.
10403         (cp_finish_decl): Likewise.
10404         (grokfndecl): Likewise.
10405         (grokvardecl): Likewise.
10406         (grokdeclarator): Likewise.
10407         (start_function): Likewise.
10408         (cp_missing_return_ok_p): Likewise.
10409         * decl2.c (grokclassfn): Likewise.
10410         (check_classfn): Likewise.
10411         (finish_static_data_member_decl): Likewise.
10412         (grokfield): Likewise.
10413         * error.c (GLOBAL_IORD_P): Remove.
10414         (dump_global_iord): Improve output.
10415         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
10416         * except.c (nothrow_libfn_p): Summarily reject any function not in
10417         namespace-scope.
10418         * init.c (build_java_class_ref): Don't explicitly set
10419         DECL_ASSEMBLER_NAME after calling mangle_decl.
10420         * mangle.c (mangle_decl_string): Handle extern "C" functions.
10421         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
10422         * method.c (set_mangled_name_for_decl): Don't explicitly set
10423         DECL_ASSEMBLER_NAME after calling mangle_decl.
10424         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
10425         IDENTIFIER_GLOBAL_VALUE for the thunk.
10426         * pt.c (set_mangled_name_for_template_decl): Remove.
10427         (check_explicit_specialization): Don't use it.
10428         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
10429         (tsubst_friend_function): Likewise.
10430         (tsubst_decl): Likewise.
10431         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
10432         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
10433         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
10434         where it's not necessary.
10435         (tinfo_base_init): Likewise.
10436         (create_real_tinfo_var): Likewise.
10437         * search.c (looup_field_1): Likewise.
10438         * semantics.c (finish_named_return_value): Likewise.
10439         * tree.c (init_tree): Set lang_set_decl_assembler_name.
10440
10441 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
10442
10443         Correct semantics restrictions checking in throw-expression.
10444         * except.c (is_admissible_throw_operand): New function.
10445         (build_throw): Use it.
10446
10447 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
10448
10449         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
10450         and its ilk.
10451
10452 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
10453
10454         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
10455         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
10456         * decl.c (duplicate_decls): Likewise.
10457         (builtin_function): Likewise.
10458         (build_library_fn): Likewise.
10459         (build_cp_library_fn): Likewise.
10460         (check_initializer): Likewise.
10461         (cp_finish_decl): Likewise.
10462         * decl2.c (grokfield): Likewise.
10463         (grok_function_init): Remove #if 0'd code.
10464         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
10465         * friend.c (do_friend): Likewise.
10466         * init.c (get_temp_regvar): Likewise.
10467         * method.c (make_thunk): Likewise.
10468         * pt.c (tsubst_friend_function): Likewise.
10469         (tsubst_decl): Likewise.
10470         (regenerate_decl_from_template): Likewise.
10471         * semantics.c (genrtl_named_return_value): Likewise.
10472         (expand_body): Likewise.
10473         (genrtl_finish_function): Likewise.
10474         * tree.c (cp_tree_equal): Likewise.
10475
10476 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
10477
10478         * call.c (convert_like_real): Add extra semantics to INNER
10479         parameter. Don't convert to temporary if a user conversion
10480         gives us an lvalue that we're about to bind to a reference.
10481         Set INNER to indicate pending reference binding on recursive
10482         calls.
10483
10484 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
10485
10486         * cp/lex.c: Delete duplicate pending_lang_change.
10487
10488 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
10489
10490         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
10491         Similarly.
10492         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
10493         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
10494
10495 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
10496
10497         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
10498
10499 2001-03-08  Stan Shebs  <shebs@apple.com>
10500
10501         * cp-tree.h (set_identifier_local_value): Remove unused decl.
10502
10503 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
10504
10505         * spew.c: Remove references to CPP_OSTRING.
10506
10507 2001-03-06  Andrew Haley  <aph@redhat.com>
10508
10509         * typeck.c (convert_arguments): Check that we have an fndecl.
10510
10511 2001-03-05  Andrew Haley  <aph@redhat.com>
10512
10513         * typeck.c (convert_arguments): Don't do ellipsis conversion for
10514         __built_in_constant_p.
10515
10516 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
10517
10518         * typeck.c (build_static_cast): Allow enum to enum conversions
10519         as per DR 128.
10520
10521 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
10522
10523         * class.c (check_field_decls): Pointers to member do not a
10524         non-pod struct make, as per DR 148.
10525
10526 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
10527
10528         * call.c (joust): cp_pedwarn when using gnu extension concerning
10529         worst conversion sequences.
10530
10531 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
10532
10533         * decl.c: Replace all uses of 'boolean' with 'bool'.
10534
10535 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
10536
10537         * lang-specs.h: Add zero initializer for cpp_spec field to
10538         all array elements that need one.  Don't put an #ifdef inside
10539         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
10540         use it.
10541
10542 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
10543
10544         Implement using decls inside template functions.
10545         * decl2.c (validate_nonmember_using_decl): Don't special case
10546         fake_std_node in the global namespace. Don't reject early when
10547         processing a template.
10548         (do_local_using_decl): Add to statement tree. Don't do further
10549         processing when building a template.
10550         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
10551
10552 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
10553
10554         * decl2.c (do_nonmember_using_decl): Don't complain if we find
10555         same function. Do complain about ambiguating extern "C"
10556         declarations.
10557
10558 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
10559
10560         Remove floating point and complex type template constant parms.
10561         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
10562         COMPLEX_TYPE extensions.
10563         (invalid_nontype_parm_type_p): Likewise.
10564
10565 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
10566
10567         * except.c (call_eh_info): Revert "match_function"'s type.
10568
10569 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
10570
10571         Fix ctor vtable vcall offsets.
10572         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
10573         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
10574         (get_matching_base): Remove.
10575         (get_original_base): New function.
10576         (build_vtbl_initializer): Initialize vid.rtti_binfo.
10577         Use a virtual thunk for a ctor vtable with an index
10578         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
10579         primary base within a constructor vtable. Only set
10580         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
10581         when primary base has been lost.
10582         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
10583
10584 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
10585
10586         * call.c (joust): Ensure more_specialized()'s argument length
10587         parameter has correct value for constructors.
10588
10589 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
10590
10591         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
10592
10593         * decl.c (mark_inlined_fns): Prototype.
10594
10595 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
10596
10597         * spew.c (yylex): Correct handling of friends.
10598
10599 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
10600
10601         * mangle.c (write_encoding): Pass write_function_type the
10602         FUNCTION_DECL for the function being encoded.
10603         (write_function_type): Pass it along to write_bare_function_type.
10604         (write_bare_function_type): Pass it along to write_method_parms.
10605         (write_method_parms): Don't mangle the compiler-generated
10606         parameters to a constructor or destructor.
10607
10608 2001-02-22  Andreas Jaeger  <aj@suse.de>
10609
10610         * optimize.c: Include toplev.h for
10611         note_deferral_of_defined_inline_function prototype.
10612
10613 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
10614
10615         * cp-tree.h (struct lang_decl_inlined_fns): New.
10616         (struct lang_decls): Add inlined_fns.
10617         (DECL_INLINED_FNS): New macro.
10618         * optimize.c (struct inline_data): Add inlined_fns.
10619         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
10620         (inlinable_function_p): Likewise, fix typo in comment,
10621         function is not inlinable if it already inlined function currently
10622         being optimized.
10623         (expand_call_inline): Add fn to inlined_fns if necessary.
10624         (optimize_function): Initialize inlined_fns.
10625         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
10626         * decl.c (mark_inlined_fns): New function.
10627         (lang_mark_tree): Call it.
10628
10629 2001-02-21  Jason Merrill  <jason@redhat.com>
10630
10631         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
10632         (DECL_UNINLINABLE): Move to middle-end.
10633
10634         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
10635         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
10636         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
10637         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
10638         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
10639
10640         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
10641         second parm of op=.
10642
10643 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
10644
10645         * decl2.c (set_decl_namespace): Allow explicit instantiations in
10646         any namespace.
10647
10648 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10649
10650         * optimize.c (expand_call_inline): Don't walk subtrees of type
10651         nodes.
10652
10653 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
10654
10655         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
10656         for a destructor.
10657
10658 2001-02-18  Jason Merrill  <jason@redhat.com>
10659
10660         Do put the VTT parameter in DECL_ARGUMENTS.
10661         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
10662         (current_vtt_parm): New macro.
10663         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
10664         (DECL_HAS_VTT_PARM_P): New macro.
10665         (DECL_VTT_PARM): Remove.
10666         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
10667         * decl.c (duplicate_decls): Only copy the operator code if
10668         appropriate.
10669         (start_function): Set current_vtt_parm.
10670         (lang_mark_tree): Don't mark vtt_parm.
10671         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
10672         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
10673         * class.c (build_clone): Maybe remove the VTT parm.
10674         * optimize.c (maybe_clone_body): Set up the VTT parm.
10675         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
10676         * call.c (build_over_call): Just allow the VTT arg.
10677         * method.c (make_thunk): Don't set DECL_VTT_PARM.
10678         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
10679         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
10680         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
10681         * error.c (dump_function_decl): Likewise.
10682         * call.c (build_user_type_conversion_1, convert_like_real): Abort
10683         if we try to call a constructor with in-charge or VTT parms.
10684         * method.c (skip_artificial_parms_for): New fn.
10685         * call.c (add_function_candidate, build_over_call): Call it.
10686         * call.c (build_new_method_call): Use current_vtt_parm.
10687         * init.c (expand_virtual_init): Likewise.
10688         * class.c (same_signature_p): No longer static.
10689         * cp-tree.h: Declare it.
10690         * search.c (look_for_overrides_r): Use it.
10691
10692 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
10693
10694         * cp-tree.h (new_abi_rtti_p): Remove.
10695         (name_mangling_version): Likewise.
10696         (flag_do_squangling): Likewise.
10697         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
10698         * decl.c (grokfndecl): Likewise.
10699         * decl2.c (name_mangling_version): Remove.
10700         (flag_do_squangling): Likewise.
10701         (lang_f_options): Remove `squangle'.
10702         (unsupported_options): Add `squangle'.
10703         (cxx_decode_option): Issue a warning about uses of
10704         -fname-mangling-version.
10705         (finish_file): Remove old ABI support.
10706         * pt.c (check_explicit_specialization): Likewise.
10707         (tsubst_decl): Likewise.
10708         * rtti.c (init_rtti_processing): Likewise.
10709         (build_headof): Likewise.
10710         (get_tinfo_decl_dynamic): Likewise.
10711         (tinfo_from_decl): Likewise.
10712         (build_dynamic_cast_1): Likewise.
10713         (synthesize_tinfo_var): Likewise.
10714         * init.c (build_new): Allow enumeration types for the array-bounds
10715         in a direct-new-declarator.
10716
10717         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
10718
10719         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
10720         TREE_PROTECTED from the template being specialized.
10721
10722 2001-02-17  Jason Merrill  <jason@redhat.com>
10723
10724         * decl2.c (build_artificial_parm): Set TREE_READONLY.
10725
10726         * decl.c (bad_specifiers): Allow throw specs on things with
10727         pointer-to-function or -member-function type.
10728         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
10729         a pmf.
10730
10731 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
10732
10733         * call.c (check_dtor_name): Handle template names correctly.
10734
10735 2001-02-16  Jason Merrill  <jason@redhat.com>
10736
10737         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
10738         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
10739         * optimize.c (maybe_clone_body): Don't substitute it.
10740         * call.c (build_new_method_call): Check in_chrg instead.
10741         * init.c (expand_virtual_init): Likewise.
10742
10743 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
10744
10745         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
10746         class-type introduces at least a type-name.
10747
10748 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
10749
10750         * call.c (convert_like_real): Create a temporary for non-lvalue.
10751
10752 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
10753
10754         * cp-tree.h: Fix typos in comments.
10755
10756 2001-02-16  Jason Merrill  <jason@redhat.com>
10757
10758         * optimize.c (remap_block): If we're compiling a clone, pass the
10759         new block to insert_block.
10760
10761 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
10762
10763         * semantics.c (finish_asm_stmt): Robustify.
10764
10765 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
10766
10767         * pt.c (push_template_decl_real): Don't remangle the name of a
10768         class template.
10769
10770 2001-02-15  Jim Meyering  <meyering@lucent.com>
10771
10772         * Make-lang.in (c++.install-common): Depend on installdirs.
10773         (c++.install-info): Likewise.
10774         (c++.install-man): Likewise.
10775
10776 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
10777
10778         * typeck2.c (build_m_component_ref): Robustify.
10779
10780 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
10781
10782         * friend.c (do_friend): Don't take the nested [template] class
10783         into account when deciding whether to warn about the friend
10784         function not referring to a template function.
10785
10786 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
10787
10788         * typeck.c (build_unary_op): Clarify error message.
10789
10790 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
10791
10792         * parse.y (component_constructor_declarator): allow optional
10793         parentheses around constructor class name.
10794
10795 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
10796
10797         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
10798         section.
10799         * init.c (emit_base_init): Remove incorrect comment about
10800         virtual bases.
10801         * method.c (make_thunk): Fix comment alignment.
10802
10803 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
10804
10805         Kill remnants of this is variable.
10806         * cp-tree.h (flag_this_is_variable): Remove.
10807         * decl2.c (flag_this_is_variable): Remove.
10808         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
10809         (build_vbase_path): The path is non-static, even in a cdtor.
10810         (resolves_to_fixed_type_p): Add additional return value.
10811         * search.c (init_vbase_pointers): Adjust.
10812         * tree.c (lvalue_p_1): Adjust.
10813         * typeck.c (mark_addressable): Adjust.
10814
10815 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
10816
10817         * pt.c (unify): Don't check cv quals of array types.
10818
10819 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
10820
10821         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
10822         check whether we already have the type.
10823
10824 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
10825
10826         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
10827         * call.c (build_op_delete_call): Simplify to remove duplicate
10828         code.
10829         * class.c (clone_function_decl): Don't build the deleting variant
10830         of a non-virtual destructor.
10831         * decl.c (finish_destructor_body): Don't call delete if this is a
10832         non-virtual destructor.
10833         * init.c (build_delete): Explicitly call `operator delete' when
10834         deleting an object with a non-virtual destructor.
10835
10836 2001-02-13  Jason Merrill  <jason@redhat.com>
10837
10838         * lang-specs.h: Add more __EXCEPTIONS.
10839
10840 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
10841
10842         * typeck2.c (process_init_constructor): Check
10843         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
10844
10845 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
10846
10847         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
10848         Remove spurious information in comment. Allow further
10849         adjustments of REFERENCE_TYPE args.
10850
10851 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
10852
10853         * errfn.c (cp_deprecated): Tweak diagnostic text.
10854         * parse.y (new_initializer): Deprecate initializer lists
10855         extension.
10856
10857 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
10858
10859         Remove old ABI support.
10860
10861 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
10862
10863         * decl2.c (flag_vtable_thunks): Always set it to 1.
10864         (flag_new_abi): Likewise.
10865         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
10866
10867         * Makefile.in (g++spec.o): Fix typo.
10868
10869 2001-02-09  Jason Merrill  <jason@redhat.com>
10870
10871         * lang-specs.h: Restore definition of __EXCEPTIONS.
10872
10873 2001-02-08  Jason Merrill  <jason@redhat.com>
10874
10875         * search.c (shared_member_p): New function.
10876         (lookup_field_r): Use it.
10877         * cp-tree.h (SHARED_MEMBER_P): Remove.
10878
10879         * method.c (process_overload_item): Handle template-dependent array
10880         bounds.
10881         * pt.c (type_unification_real): If we end up with undeduced nontype
10882         parms, try again.
10883
10884         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
10885         types.
10886
10887         * typeck2.c (friendly_abort): Don't say anything if we have
10888         earlier errors or sorries.
10889
10890         * decl.c (check_tag_decl): Notice attempts to redefine bool and
10891         wchar_t.  Ignore if in_system_header.
10892
10893         * decl.c (maybe_push_cleanup_level): New fn...
10894         (start_decl_1): ...split out from here.
10895         * cvt.c (build_up_reference): Use it.
10896         * cp-tree.h: Declare it.
10897
10898 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
10899
10900         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
10901         spec.
10902
10903 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
10904
10905         * pt.c (lookup_template_class): Make sure it's a primary
10906         template or template_template_parm when called from the parser.
10907         (instantiate_template_class): Add assertion.
10908
10909 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
10910
10911         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
10912         from error_mark_node.
10913
10914 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
10915
10916         Fix specification and implementation bugs in V3 ABI
10917         construction vtables.
10918         * cp-tree.h (flag_dump_class_layout): New flag.
10919         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
10920         (BINFO_LOST_PRIMARY_P): New flag.
10921         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
10922         (BINFO_PRIMARY_MARKED_P): Rename to ...
10923         (BINFO_PRIMARY_P): ... here.
10924         (binfo_via_virtual): New prototype.
10925         * decl2.c (flag_dump_class_layout): New flag.
10926         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
10927         use `=' as a file name separator.
10928         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
10929         bases.
10930         (build_vtbl_address): If this is a virtual primary base, then
10931         get the vtbl of what it is ultimately primary for.
10932         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
10933         for BINFO_PRIMARY_P.
10934         (dfs_skip_nonprimary_vbases_markedp): Likewise.
10935         (get_shared_vbase_if_not_primary): Likewise.
10936         (dfs_get_pure_virtuals): Likewise.
10937         (expand_upcast_fixups): Likewise.
10938         (fixup_virtual_upcast_offsets): Likewise.
10939         (dfs_find_vbase_instance): Likewise.
10940         (find_vbase_instance): Likewise.
10941         (binfo_from_vbase): Adjust comment to reflect reality.
10942         (binfo_via_virtual): New function.
10943         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
10944         for binfo walking during VTT construction.
10945         (dfs_mark_primary_bases): Remove.
10946         (force_canonical_binfo_r): New function.
10947         (force_canonical_binfo): New function.
10948         (mark_primary_virtual_base): New function.
10949         (mark_primary_bases): Walk in inheritance graph order, use
10950         mark_primary_virtual_base.
10951         (determine_primary_base): Use some more intermediate variables.
10952         (dfs_find_final_overrider): Don't check for overriding along a
10953         virtual path.
10954         (dfs_modify_vtables): Walk into primary virtual bases too.
10955         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
10956         (build_base_fields): Likewise.
10957         (dfs_set_offset_for_unshared_vbases): Likewise.
10958         (layout_virtual_bases): Likewise.
10959         (end_of_class): Likewise.
10960         (finish_struct_1): Call dump_class_hierarchy, if requested.
10961         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
10962         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
10963         (dump_class_hierarchy): Add file parameter. Append to file, if
10964         required.
10965         (finish_vtbls): Adjust accumulate_vtbl_inits call.
10966         Use canonical base for virtual bases.
10967         (build_vtt): Add more comments. Adjust build_vtt_inits call.
10968         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
10969         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
10970         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
10971         virtual VTTs.
10972         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
10973         from DATA.  We want virtual primary bases and all bases via virtual.
10974         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
10975         virtual base when not a construction vtable.
10976         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
10977         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
10978         Use canonical bases when processing virtual bases.
10979         (accumulate_vtbl_inits): We're interested in any base via a
10980         virtual path.
10981         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
10982         within a construction vtable, determine what is being overridden.
10983         (build_vtbl_initializer): Add more comments
10984         (add_vcall_offset_vtbl_entries_1): Adjust comment.
10985         (build_rtti_vtbl_entries): Check if the base has lost its
10986         primary.
10987
10988 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
10989
10990         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
10991
10992 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10993
10994         * decl.c (pushdecl): Call abort instead of fatal.
10995         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
10996         * init.c (build_new_1): Likewise.
10997         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
10998         * decl.c (build_typename_type): hash_table_init now returns void.
10999         decl.c (init_decl_processing): Make an error non-fatal.
11000
11001 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
11002
11003         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
11004         Document.
11005         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
11006         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
11007         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
11008         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
11009         * decl.c (maybe_commonize_var): Use the new name-mangling where
11010         appropriate.
11011         * decl2.c (comdat_linkage): Enhance comments.  Make all
11012         compiler-generated things static, if COMDAT is not available.
11013         (get_tinfo_decl): Do not make typeinfo objects that belong in the
11014         library COMDAT.
11015         (tinfo_base_init): Use the correct mangled name for typeinfo
11016         strings, and push them into the global scope.
11017         (typeinfo_in_lib_p): New function.
11018         (synthesize_tinfo_var): Use it.
11019         (create_real_tinfo_var): Likewise.
11020
11021 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
11022
11023         * decl.c (push_class_binding): Use context_for_name_lookup instead
11024         of CP_DECL_CONTEXT.
11025         * search.c (context_for_name_lookup): Remove static.  Check for NULL
11026         context in the loop.
11027         * cp-tree.h (context_for_name_lookup): Add prototype.
11028
11029 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
11030
11031         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
11032         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
11033         Remove.
11034         * call.c (convert_class_to_reference, build_user_type_conversion_1,
11035         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
11036
11037 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
11038
11039         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
11040         of macros used when compiling g++spec.c.
11041         * g++spec.c (lang_specific_driver): Link with the shared
11042         libgcc by default.
11043
11044 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
11045
11046         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
11047         make_reference_declarator, make_call_declarator), method.c
11048         (implicitly_declare_fn), parse.y (namespace_using_decl,
11049         notype_unqualified_id, expr_or_declarator, new_type_id,
11050         after_type_declarator, direct_after_type_declarator,
11051         notype_declarator, complex_notype_declarator,
11052         complex_direct_notype_declarator, qualified_id,
11053         notype_qualified_id, overqualified_id, direct_new_declarator,
11054         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
11055         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
11056         instead of build_parse_node.
11057
11058 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11059
11060         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
11061         (minus_one_node): Moved to top level gcc directory.  Renamed
11062         to integer_minus_one_node.
11063
11064         * init.c (init_init_processing): Don't set minus_one_node.
11065         (build_vec_init): Use integer_minus_one_node.
11066
11067         * rtti.c (get_tinfo_decl_dynamic): Likewise.
11068
11069 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
11070
11071         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
11072         identical and they would be replaced with constant, remove
11073         MODIFY_EXPR from the tree.
11074
11075 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11076
11077         * Make-lang.in: Remove all dependencies on defaults.h.
11078         * call.c: Don't include defaults.h.
11079         * decl.c: Likewise.
11080         * decl2.c: Likewise.
11081         * except.c: Likewise.
11082         * pt.c: Likewise.
11083         * rtti.c: Likewise.
11084         * tree.c: Likewise.
11085         * typeck.c: Likewise.
11086
11087 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
11088
11089         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
11090         operators even in "C" linkage.
11091         * method.c (set_mangled_name_for_decl): Likewise.
11092         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
11093         overloaded operators in "C" linkage.
11094
11095 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
11096
11097         * pt.c (tsubst_decl): Remove IN_DECL parameter.
11098         (tsubst_arg_types): Check parameter is not void.
11099         (tsubst): Adjust tsubst_decl call.
11100
11101 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
11102
11103         * call.c (add_builtin_candidate): Quote std properly, from
11104         previous change.
11105
11106 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11107
11108         * pt.c (check_explicit_specialization): Clone constructors and
11109         destructors.
11110
11111 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
11112
11113         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
11114         indicates anything special about template depth. Make sure we
11115         only count the user visible template classes.
11116
11117 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
11118
11119         * call.c (build_conv): Typo in comment.
11120         (add_builtin_candidate): Add more explanation.
11121         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
11122         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
11123         when we have enumeral types.
11124         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
11125         candidates for relops and eqops.
11126         (joust): Simplify control flow. Allow a non-template user
11127         function to hide a builtin.
11128
11129 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
11130
11131         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
11132         (more_specialized): Add deduction parameter.
11133         * call.c (joust): Adjust more_specialized call.
11134         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
11135         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
11136         (get_bindings_order): Remove.
11137         (get_bindings_real): Add DEDUCE parameter.
11138         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
11139         REFERENCE_TYPE jig for DEDUCE_ORDER.
11140         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
11141         maybe_adjust_types_for_deduction.
11142         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
11143         directly.
11144         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
11145         (check_cv_quals_for_unify): Use new unify qualifier flags.
11146         (unify): Clear new unify qualifier flags.
11147         (get_bindings_real): Add DEDUCE parameter.
11148         (get_bindings): Adjust call to get_bindings_real.
11149         (get_bindings_overload): Likewise.
11150         (most_specialized_instantiation): Adjust call to
11151         more_specialized.
11152
11153 2001-01-19  Jason Merrill  <jason@redhat.com>
11154
11155         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
11156
11157         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
11158         -fnew-abi.
11159
11160 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
11161
11162         * decl2.c (arg_assoc_class): Fix double iteration logic.
11163
11164 2001-01-19  Jason Merrill  <jason@redhat.com>
11165
11166         * init.c (build_delete): Always call convert_force to strip cv-quals.
11167
11168         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
11169         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
11170         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
11171
11172 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
11173
11174         * search.c (get_vbase_1): Count only virtual bases.
11175
11176 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
11177
11178         * class.c (duplicate_tag_error): Robustify flag clearing.
11179
11180 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
11181
11182         * cp-tree.h (lookup_template_class): Add complain parm.
11183         * decl.c (lookup_namespace_name): Adjust call to
11184         lookup_template_class.
11185         (make_typename_type): Likewise.
11186         * semantics.c (finish_template_type): Likewise.
11187         * pt.c (lookup_template_class): Add complain parm. Adjust.
11188         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
11189         (tsubst): Likewise.
11190
11191 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
11192
11193         * pt.c (copy_default_args_to_explicit_spec): Preserve
11194         object's CV quals. Reorganize.
11195
11196 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
11197
11198         * typeck.c (build_modify_expr): Say `initialization' for
11199         INIT_EXPRs.
11200         * init.c (build_default_init): Convert to enumeral type, if
11201         needed.
11202
11203 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
11204
11205         * parse.y (nomods_initdcl0): Properly set things up for
11206         initdcl0_innards.
11207
11208 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
11209
11210         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
11211         (type_unification_real): Set it.
11212         (unify): Use it.
11213
11214 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
11215
11216         * decl.c (finish_destructor_body): Convert to vbase pointer here.
11217
11218 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
11219
11220         * semantics.c (begin_class_definition): Check we're not inside a
11221         template parm list.
11222
11223 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
11224
11225         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
11226         BASELINK_P.
11227
11228 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11229
11230         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
11231         * call.c (build_over_call): Add comment.
11232
11233 2001-01-16 Daniel Berlin <dberlin@redhat.com>
11234
11235         * cvt.c (ocp_convert): Handle vector type conversion
11236         * typeck2.c (digest_init): Handle vector type initializations
11237
11238 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
11239
11240         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
11241           was given.
11242
11243 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
11244
11245         * pt.c (check_nontype_parm): Rename to ...
11246         (invalid_nontype_parm_type_p): ... here.
11247         (process_template_parm): Adjust.
11248         (convert_template_argument): Adjust.
11249
11250 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
11251
11252         * pt.c (check_nontype_parm): New function.
11253         (process_template_parm): Use it.
11254         (convert_template_argument): Use it.
11255         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
11256         member.
11257
11258 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
11259
11260         * tree.c: Add defaults.h
11261         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
11262         * Make-lang.in (cp/tree.o): Add defaults.h.
11263
11264 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
11265
11266         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
11267
11268 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
11269
11270         * g++.1: Change to be ".so man1/gcc.1".
11271
11272 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
11273
11274         * Make-lang.in (c++.info, c++.install-info): Build and install g++
11275         internals info.
11276         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
11277         ($(srcdir)/cp/g++int.info): New target.
11278         * gxxint.texi: Add info directory entry.  Use @@ in email address.
11279         * .cvsignore: Update.
11280
11281 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
11282
11283         * typeck.c (build_c_cast): Do template processing earlier.
11284         Always pedwarn on array casts.
11285
11286 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
11287
11288         * friend.c (make_friend_class): Make sure a templated class is
11289         actually a template.
11290
11291 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
11292
11293         * decl2.c (get_guard): Set linkage from guarded decl.
11294
11295 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
11296
11297         * call.c (convert_default_arg): Check for unprocessed
11298         DEFAULT_ARG.
11299         * cp-tree.h (replace_defarg): Move to spew.c.
11300         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
11301         spew.c, which is where they really are.
11302         (done_pending_defargs): Declare.
11303         (unprocessed_defarg_fn): Declare.
11304         * decl.c (replace_defarg): Move to spew.c
11305         * parse.y (structsp): Call done_pending_defargs.
11306         * spew.c (defarg_fns): Rearrange list structure.
11307         (defarg_fnsdone): New static variable.
11308         (defarg_depfns): New static variable.
11309         (init_spew): Adjust.
11310         (add_defarg_fn): Store the type in TREE_TYPE.
11311         (do_pending_defargs): Detect and deal with ordering constraints
11312         and circularity.
11313         (done_pending_defargs): New function.
11314         (unprocessed_defarg_fn): New function.
11315         (replace_defarg): Moved from decl.c. Robustify. Don't save
11316         if circularity detected.
11317
11318 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
11319
11320         * pt.c (unify): Check array has a domain, before checking
11321         whether it is variable sized.
11322
11323 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
11324
11325         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
11326         parameters with pointers to arrays of unknown bound.
11327
11328 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
11329
11330         * parse.y (template_parm_header, template_spec_header): New
11331         reductions. Split out from ...
11332         (template_header): ... here. Use them.
11333         (template_template_parm): Use template_parm_header.
11334         * semantics.c (finish_template_template_parm): Add assert.
11335
11336 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
11337
11338         * mangle.c (write_builtin_type): Fix thinko.
11339
11340         * pt.c (copy_default_args_to_explicit_spec_1): New function.
11341         (copy_default_args_to_explicit_spec): Likewise.
11342         (check_explicit_specialization): Use it.
11343
11344         * class.c (finish_struct_1):  Remove last argument in call to
11345         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
11346         * decl.c (builtin_function): Likewise.
11347         (build_cp_library_fn): Likewise.
11348         (check_initializer): Likewise.
11349         (make_rtl_for_nonlocal_decl): Likewise.
11350         (cp_finish_decl): Likewise.
11351         (start_function): Likewise.
11352         * decl2.c (finish_anon_union): Likewise.
11353         * friend.c (do_friend): Likewise.
11354         * init.c (build_java_class_ref): Likewise.
11355         * method.c (make_thunk): Likewise.
11356         * pt.c (tsubst_friend_function): Likewise.
11357         * semantics.c (expand_body): Likewise.
11358
11359 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
11360
11361         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
11362         looking at DECL_CLONED_FUNCTION for non-functions.
11363
11364 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
11365
11366         * error.c (dump_template_parameter): Use parm to determine how
11367         to print default value.
11368
11369 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
11370
11371         * class.c (duplicate_tag_error): Clear more flags.
11372
11373 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
11374
11375         * call.c (build_new_method_call): Use binfo_for_vbase.
11376
11377 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
11378
11379         * cp-tree.h (flag_cond_mismatch): Don't declare.
11380         * decl2.c (flag_cond_mismatch): Don't define.
11381         (lang_f_options): Remove cond-mismatch.
11382         (unsupported_options): Add cond-mismatch.
11383
11384 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
11385
11386         * class.c (handle_using_decl): Reject using of constructor name
11387         of sourcing class. Allow injecting of a method with same name as
11388         nested class. Fixup error messages.
11389
11390 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
11391
11392         * decl2.c (lang_decode_option): Handle -Wformat=2.
11393
11394 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
11395
11396         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
11397         initialized_in_class.
11398         (DECL_DEFINED_IN_CLASS_P): Rename to ...
11399         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
11400         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
11401         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
11402         * pt.c (check_default_tmpl_args): Adjust for
11403         DECL_INITIALIZED_IN_CLASS_P.
11404         (instantiate_class_template): Likewise.
11405         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
11406
11407         * class.c (finish_struct): Constify saved_filename.
11408
11409 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
11410
11411         * class.c (duplicate_tag_error): Adjust diagnostic.
11412         (finish_struct): Locally set location to start of struct.
11413         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
11414
11415 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
11416
11417         * decl.c (struct binding_level): Adjust class_shadowed comments
11418         to reflect reality.
11419         (push_class_level_binding): Adjust comments to reflect reality.
11420         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
11421         Don't set TREE_VALUE on the class_shadowed list.
11422
11423 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11424
11425         * decl2.c (acceptable_java_type): Allow references too.
11426         * init.c (build_java_class_ref): When using the new ABI, search
11427         `class$' and have it mangled with `mangle_decl.'
11428         * mangle.c (write_java_integer_type_codes): New function.
11429         (write_builtin_type): Detect and mangle Java integer and real
11430         types.
11431
11432 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
11433
11434         * decl2.c (grokfield): Don't accept `asm' specifiers for
11435         non-static data members.
11436
11437 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11438
11439         * expr.c (cplus_expand_expr): Don't reset `target'.
11440
11441 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
11442
11443         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
11444
11445 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
11446
11447         * parse.y (template_datadef): Check for error_mark_node.
11448
11449 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
11450
11451         * cp-tree.def (DEFAULT_ARG): Make `x' class.
11452
11453 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
11454
11455         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
11456         (record_builtin_type): Make non-static.
11457         (flag_short_double): Don't declare.
11458         (init_decl_processing): Remove the creation of many tree nodes now
11459         in c_common_nodes_and_builtins.
11460         (build_void_list_node): New function.
11461         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
11462         * cp-tree.h (flag_short_wchar): Don't declare.
11463
11464 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
11465
11466         * call.c (build_conv): Don't use build1 for USER_CONV.
11467         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
11468
11469 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
11470
11471         * lex.c (lang_init): Call c_common_lang_init.
11472
11473 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
11474
11475         * search.c (lookup_fnfields_here): Remove.
11476         (look_for_overrides_r): Use lookup_fnfields_1.
11477         Ignore functions from using declarations.
11478
11479 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
11480
11481         Implement exceptions specifiers for implicit member functions.
11482         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
11483         * method.c (synthesize_exception_spec): New function.
11484         (locate_dtor, locate_ctor, locate_copy): New functions.
11485         (implicitly_declare_fn): Generate the exception spec too.
11486         * search.c (check_final_overrider): Check artificial functions
11487         too.
11488         * typeck2.c (merge_exception_specifiers): New function.
11489
11490 2001-01-03  Jason Merrill  <jason@redhat.com>
11491
11492         * init.c (build_default_init): New fn.
11493         (perform_member_init): Split out from here.
11494         (build_new_1): Use it.  Simplify initialization logic.
11495         (build_vec_init): Take an array, rather than a pointer and maxindex.
11496         Speed up simple initializations.  Don't clean up if we're assigning.
11497         * cp-tree.h: Adjust.
11498         * decl2.c (do_static_initialization): Remove TREE_VEC case.
11499         * parse.y (new_initializer): Return void_zero_node for ().
11500         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
11501         * typeck2.c (digest_init): Only complain about user-written
11502         CONSTRUCTORs.
11503
11504 2000-12-22  Mike Stump  <mrs@wrs.com>
11505
11506         * decl2.c: (max_tinst_depth): Increase to 50.
11507
11508 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
11509
11510         * class.c (invalidate_class_lookup_cache): Zero the
11511         previous_class_values.
11512         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
11513         TREE_INT_CST_HIGH.
11514         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
11515         * decl.c (free_bindings): New variable.
11516         (push_binding): Don't create a new binding if we have one on the
11517         free list.
11518         (pop_binding): Put old bindings on the free list.
11519         (init_decl_processing): Use size_int, not build_int_2.
11520         Register free_bindings as a GC root.
11521         (cp_make_fname_decl): Use size_int, not build_int_2.
11522         (push_inline_template_parms_recursive): Likewise.
11523         (end_template_parm_list): Likewise.
11524         (for_each_template_parm): Do not use walk_tree_without_duplicates.
11525         (tsubst_template_parms): Use size_int, not build_int_2.
11526         (tsubst): Likewise.
11527         * rtti.c (get_vmi_pseudo_type_info): Likewise.
11528
11529 2001-01-02  Richard Henderson  <rth@redhat.com>
11530
11531         * parse.y (asm): Set ASM_INPUT_P.
11532
11533 2001-01-02  Jason Merrill  <jason@redhat.com>
11534
11535         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
11536         for v3 ABI.
11537
11538         * typeck.c (cp_truthvalue_conversion): New fn.
11539         * cvt.c (ocp_convert): Use it.
11540
11541         * cp-tree.h: Lose c-common.c decls.
11542
11543         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
11544         * cvt.c (convert_to_void): Use type_unknown_p.
11545
11546         * typeck.c (strip_all_pointer_quals): Also strip quals from
11547         pointer-to-member types.
11548
11549         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
11550         parse.y as C.
11551
11552         * call.c (build_new_method_call): Do evaluate the object parameter
11553         when accessing a static member.
11554         * typeck.c (build_component_ref): Likewise.
11555
11556 2001-01-02  Andreas Jaeger  <aj@suse.de>
11557
11558         * decl.c (cp_missing_noreturn_ok_p): New.
11559         (init_decl_processing): Set lang_missing_noreturn_ok_p.
11560
11561 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
11562
11563         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
11564
11565 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
11566
11567         * class.c (pushclass): Remove #if 0'd code.
11568         * cp-tree.h (overload_template_name): Remove.
11569         * decl.c (store_bindings): Simplify.
11570         (pop_from_top_level): Likewise.
11571         * pt.c (overload_template_name): Remove.
11572         (instantiate_decl): Don't call push_to_top_level if it's not
11573         needed.
11574
11575 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
11576
11577         * pt.c (register_local_specialization): Don't return a value.
11578         (lookup_template_class): Use move-to-front heuristic when looking
11579         up template instantiations.
11580         (instantiate_decl): Only push_to_top_level when we're actually
11581         going to instantiate the template.
11582
11583 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
11584
11585         * search.c (binfo_for_vtable): Return least derived class, not
11586         most.  Handle secondary vtables.
11587
11588 2000-12-22  Jason Merrill  <jason@redhat.com>
11589
11590         * pt.c (more_specialized): Don't optimize len==0.
11591         (fn_type_unification): If we're adding the return type, increase len.
11592
11593         * typeck.c (build_binary_op): Fix pmf comparison logic.
11594
11595         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
11596         DECL_STATIC_FUNCTION_P.
11597
11598         * semantics.c (genrtl_finish_function): Don't try to jump to
11599         return_label unless it exists.
11600
11601         In partial ordering for a call, ignore parms for which we don't have
11602         a real argument.
11603         * call.c (joust): Pass len to more_specialized.
11604         (add_template_candidate_real): Strip 'this', pass len.
11605         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
11606         (get_bindings_order): New fn.  Pass len down.
11607         (get_bindings_real): Strip 'this', pass len.
11608         (fn_type_unification): Likewise.
11609         (type_unification_real): Succeed after checking 'len' args.
11610         (most_specialized_instantiation): Lose explicit_args parm.
11611         * class.c (resolve_address_of_overloaded_function): Strip 'this',
11612         pass len.
11613
11614 2000-12-21  Jason Merrill  <jason@redhat.com>
11615
11616         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
11617         DECL_TEMPLATE_RESULT.
11618
11619         * search.c (lookup_field_r): Call lookup_fnfields_1, not
11620         lookup_fnfields_here.
11621
11622         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
11623
11624         * call.c (build_object_call): Also allow conversions that return
11625         reference to pointer to function.
11626         (add_conv_candidate): Handle totype being ref to ptr to fn.
11627         (build_field_call): Also allow members of type reference to function.
11628         Lose support for calling pointer to METHOD_TYPE fields.
11629
11630         * error.c (dump_expr): Handle *_CAST_EXPR.
11631
11632         * typeck2.c (build_scoped_ref): Always convert to the naming class.
11633
11634         * tree.c (break_out_cleanups): Lose.
11635         * cp-tree.h: Remove prototype.
11636         * typeck.c (build_component_ref): Don't break_out_cleanups.
11637         (build_compound_expr): Likewise.
11638         * semantics.c (finish_expr_stmt): Likewise.
11639
11640 2000-12-20  Richard Henderson  <rth@redhat.com>
11641
11642         * cp-tree.h: Update declarations.
11643         * decl.c (finish_case_label): Return the new stmt node.
11644         * semantics.c (finish_goto_stmt): Likewise.
11645         (finish_expr_stmt, finish_return_stmt): Likewise.
11646         (finish_break_stmt, finish_continue_stmt): Likewise.
11647         (finish_asm_stmt): Likewise.
11648         * parse.y (already_scoped_stmt): Set STMT_LINENO.
11649         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
11650         (simple_if, simple_stmt): Return the new stmt node.
11651         (save_lineno): New.
11652
11653 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
11654
11655         * cp-tree.h: Don't declare warn_long_long.
11656
11657 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11658
11659         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
11660         IS_AGGR_TYPE.
11661
11662 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11663
11664         * pt.c (unify): Handle when both ARG and PARM are
11665         BOUND_TEMPLATE_TEMPLATE_PARM.
11666
11667 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11668
11669         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
11670         DECL_TEMPLATE_PARM_P.
11671
11672 2000-12-15  Jason Merrill  <jason@redhat.com>
11673
11674         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
11675
11676         * init.c (build_new_1): Don't strip quals from type.
11677
11678         * decl.c (pushdecl): Don't check for linkage on a non-decl.
11679
11680         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
11681
11682         * call.c (build_new_function_call): Lose space before paren in
11683         error message.
11684         (build_new_method_call): Likewise.
11685
11686         * typeck2.c (build_m_component_ref): Propagate quals from datum.
11687
11688 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11689
11690         * pt.c (check_explicit_specialization): Propagate default
11691         function arguments to explicit specializations.
11692
11693 2000-12-13  DJ Delorie  <dj@redhat.com>
11694
11695         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
11696         and <? operators.
11697
11698 2000-12-08  Jason Merrill  <jason@redhat.com>
11699
11700         * error.c (dump_function_name): Don't let the user see __comp_ctor.
11701
11702         Clean up copy-initialization in overloading code.
11703         * call.c (build_user_type_conversion_1): Die if we are asked to
11704         convert to the same or a base type.
11705         (implicit_conversion): Avoid doing so.  Lose reference binding code.
11706         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
11707         direct-initialization.  Also do direct-init part of copy-init.
11708         (build_user_type_conversion): Don't provide context to convert_like.
11709         * cvt.c (ocp_convert): build_user_type_conversion will now provide
11710         the constructor call for copy-init.
11711
11712         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
11713         instantiation of a member template.
11714         (do_decl_instantiation): Not here.
11715
11716 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
11717
11718         * class.c (check_field_decls): Don't special case anonymous
11719         fields in error messages.
11720         (note_name_declared_in_class): Use %D on diagnostic.
11721
11722         * tree.c (pod_type_p): Use strip_array_types.
11723         (cp_valid_lang_attribute): Likewise.
11724         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
11725         multiple evaluations.
11726         (cp_has_mutable_p): Use strip_array_types.
11727
11728 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
11729
11730         * cp-tree.h (sufficient_parms_p): Declare new function.
11731         * call.c (sufficient_parms_p): New function, broken out of ...
11732         (add_function_candidate): ... here. Use it.
11733         (add_conv_candidate): Use it.
11734         * decl.c (grok_ctor_properties): Use it.
11735
11736 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
11737
11738         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
11739
11740 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
11741
11742         * decl2.c (lang_decode_option): Handle -Wformat-security.
11743
11744 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11745
11746         * pt.c (verify_class_unification): New function.
11747         (get_class_bindings): Use it.
11748         (try_class_unification): Tidy.
11749         (unify): Handle when argument of a template-id is not
11750         template parameter dependent.
11751         (template_args_equal): Handle when TREE_CODE's do not match.
11752
11753 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
11754
11755         * lang-specs.h (c++): When invoking the stand-alone preprocessor
11756         for -save-temps, pass all relevant -Defines to it, and then don't
11757         pass them to cc1plus.
11758
11759 2000-12-05  Will Cohen  <wcohen@redhat.com>
11760
11761         * decl.c (finish_case_label): Cleared
11762         more_cleanups_ok in surrounding function scopes.
11763         (define_label): Likewise.
11764
11765 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
11766
11767         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
11768         (get_matching_virtual): Remove.
11769         (look_for_overrides): Declare new function.
11770         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
11771         DECL_VINDEX here.
11772         * class.c (check_for_override): Move base class iteration code
11773         to look_for_overrides.
11774         * search.c (next_baselink): Remove.
11775         (get_virtuals_named_this): Remove.
11776         (get_virtual_destructor): Remove.
11777         (tree_has_any_destructors_p): Remove.
11778         (struct gvnt_info): Remove.
11779         (check_final_overrider): Remove `virtual' from error messages.
11780         (get_matching_virtuals): Remove. Move functionality to ...
11781         (look_for_overrides): ... here, and ...
11782         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
11783         to be overriding.
11784
11785 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
11786
11787         * typeck.c (get_delta_difference): If via a virtual base,
11788         return zero.
11789         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
11790         adjustment.
11791
11792 2000-12-04  Richard Henderson  <rth@redhat.com>
11793
11794         * error.c (dump_tree): Use output_add_string not OB_PUTS.
11795
11796 2000-12-04  Jason Merrill  <jason@redhat.com>
11797
11798         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
11799         (write_builtin_type): Pass intSI_type_node and the like through
11800         type_for_mode.
11801         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
11802         Pass intSI_type_node and the like through type_for_mode.
11803         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
11804         * pt.c (tsubst, unify): Likewise.
11805         * tree.c (walk_tree): Likewise.
11806         * error.c (dump_type): Likewise.
11807         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
11808
11809         * Make-lang.in: Tweak top comment for emacs.
11810         (cp/TAGS): Restore.
11811
11812         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
11813
11814         * class.c (clone_function_decl): Robustify.
11815
11816 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
11817
11818         * decl.c (store_bindings): Only search in the non modified
11819         old_bindings for duplicates.
11820
11821 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
11822
11823         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
11824         TYPE_POLYMORPHIC_P.
11825
11826         * typeck.c (build_static_cast): Remove unused variable.
11827
11828 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11829
11830         * pt.c: Fix typo in comment.
11831
11832 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
11833
11834         * decl2.c (warn_format): Remove definition.
11835         (lang_decode_option): Handle -Wformat-nonliteral,
11836         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
11837
11838 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
11839
11840         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
11841         (init_decl_processing): Don't create string_type_node,
11842         const_string_type_node, wint_type_node, intmax_type_node,
11843         uintmax_type_node, default_function_type, ptrdiff_type_node and
11844         unsigned_ptrdiff_type_node.  Adjust position of call to
11845         c_common_nodes_and_builtins.
11846         (identifier_global_value): New function.
11847
11848 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
11849
11850         * call.c (standard_conversion): Reject pointer to member
11851         conversions from ambiguous, inaccessible or virtual bases.
11852         * typeck.c (build_static_cast): Don't check pointers to members
11853         specially.
11854
11855 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
11856
11857         * method.c (do_build_copy_constructor): Preserve cv
11858         qualifications when accessing source object members.
11859         (do_build_assign_ref): Likewise. Remove separate diagnostics for
11860         unnamed fields.
11861
11862 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
11863
11864         * method.c (do_build_assign_ref): Construct appropriately
11865         CV-qualified base reference. Don't allow const casts in base
11866         conversion.
11867
11868 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
11869
11870         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
11871         incomplete return type.
11872
11873 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11874
11875         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
11876         * semantics.c (finish_base_specifier): Accept a _TYPE not a
11877         _DECL.
11878
11879 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11880
11881         * spew.c (yyerror): Cope if yylval.ttype is NULL.
11882
11883 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11884
11885         * decl.c (grokdeclarator): Diagnose undefined template contexts.
11886
11887 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11888
11889         * decl.c (grokdeclarator): Do type access control on friend
11890         class.
11891
11892 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
11893
11894         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
11895         bison parser ickiness.
11896         * pt.c (tsubst_friend_function): Enter namespace scope when
11897         tsubsting the function name.
11898         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
11899
11900 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
11901
11902         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
11903         * cvt.c (cp_convert_to_pointer): Add force parameter.
11904         Allow conversions via virtual base if forced.
11905         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
11906         (ocp_convert): Likewise.
11907         * search.c (binfo_from_vbase): Return the virtual base's binfo.
11908         * typeck.c (get_delta_difference): Adjust handling of virtual
11909         bases.
11910
11911 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
11912
11913         * tree.c (struct list_hash): Remove.
11914         (list_hash_table): Make it be an htab.
11915         (struct list_proxy): New type.
11916         (list_hash_eq): New function.
11917         (list_hash_pieces): Renamed from ...
11918         (list_hash): ... this.
11919         (list_hash_lookup): Remove.
11920         (list_hash_add): Remove.
11921         (hash_tree_cons): Use the generic hashtable.
11922         (mark_list_hash): Remove.
11923         (init_tree): Create the hashtable.
11924
11925 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
11926
11927         * method.c (build_mangled_C9x_name): Rename to
11928         build_mangled_C99_name.  Change C9X references in comments to
11929         refer to C99.
11930
11931 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
11932
11933         * parse.y (unary_expr): Move VA_ARG from here ...
11934         (primary): ... to here.
11935
11936 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
11937
11938         * semantics.c (finish_id_expr): If type is error_mark, return
11939         error_mark.
11940
11941 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
11942
11943         * pt.c (lookup_template_class): Simplify loop exit constructs.
11944         Cope when there is no partial instantiation of a template
11945         template member.
11946
11947 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
11948
11949         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
11950
11951 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
11952
11953         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
11954         prefix.
11955
11956         * pt.c (do_decl_instantiate): Explicitly clone constructors and
11957         destructors that haven't already been cloned.
11958
11959 2000-11-20  Richard Henderson  <rth@redhat.com>
11960
11961         * parse.y (yyparse_1): Rename the parser entry point.
11962
11963 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
11964
11965         * mangle.c (write_name): Use <unscoped-name> for names directly in
11966         function scope.
11967         (write_unscoped_name): Accept names directly in function scope.
11968
11969 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
11970
11971         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
11972         * parse.y (extdef): Add EXPORT reduction.
11973         * spew.c (yylex): Don't skip export here.
11974
11975 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
11976
11977         * decl.c (init_decl_processing): Correct name of pure virtual
11978         function under the new ABI.
11979         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
11980         (throw_bad_typeid): Likewise for bad typeid function.
11981
11982 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
11983
11984         * decl.c (grokparms): Don't even function types of `void' type,
11985         either.
11986         * mangle.c (write_type): Don't crash when confronted with the
11987         error_mark_node.
11988
11989         * decl.c (grokparms): Don't create parameters of `void' type.
11990
11991 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
11992
11993         * lex.c (mark_impl_file_chain): Delete.
11994         (init_parse): Remove call to ggc_add_string_root.  No need to
11995         ggc_strdup a string constant.  Do not add impl_file_chain to GC
11996         roots.
11997         (handle_pragma_implementation): No need to ggc_strdup main_filename.
11998
11999 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
12000
12001         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
12002
12003 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
12004
12005         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
12006         * decl.c (grokdeclarator): Don't reject void parms here.
12007         (require_complete_types_for_parms): Simplify, use
12008         complete_type_or_else.
12009         (grokparms): Remove bitrot. Remove funcdef parm.
12010         Deal with ellipsis parm lists here.
12011         * semantics.c (finish_parmlist): Don't append void_list_node
12012         here. Set PARMLIST_ELLIPSIS_P.
12013
12014 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
12015
12016         * typeck2.c (incomplete_type_error): Reorganize to avoid
12017         excessive diagnostics.
12018
12019 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
12020
12021         * lex.c (struct impl_files, internal_filename): Constify a char *.
12022
12023 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
12024
12025         * mangle.c (write_special_name_constructor): Don't generate
12026         assembler junk when confronted with an old-style constructor.
12027         (write_special_name_destructor): Likewise.
12028         (mangle_decl_string): Do it here instead.
12029
12030 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
12031
12032         * call.c (op_error): Make error messages clearer.
12033
12034 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
12035
12036         * decl.c (wrapup_globals_for_namespace): Don't mark things
12037         TREE_ASM_WRITTEN when they're not.
12038
12039 2000-11-15  Jason Merrill  <jason@redhat.com>
12040
12041         * typeck2.c (friendly_abort): Uncount the error before handing
12042         off to fancy_abort.
12043
12044 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
12045
12046         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
12047
12048 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
12049
12050         * class.c (build_vtbl_initializer): Fix typo in comment.
12051         * typeck.c (expr_sizeof): Don't crash on errors.
12052
12053 2000-11-14  Jim Wilson  <wilson@redhat.com>
12054
12055         * lang-specs.h: Add %2 after %(cc1_options).
12056
12057 2000-11-14  Richard Henderson  <rth@redhat.com>
12058
12059         * typeck.c (c_sizeof): Be strict about casting result value
12060         back to c_size_type_node.
12061         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
12062
12063 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12064
12065         * typeck.c (build_unary_op): Use boolean_increment from
12066         c-common.c, moving the relevant code there.
12067
12068 2000-11-11  Jason Merrill  <jason@redhat.com>
12069
12070         * typeck.c (mark_addressable): Don't call put_var_into_stack.
12071
12072         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
12073         in inlines.
12074
12075 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12076
12077         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
12078         * lex.c (copy_lang_decl): Likewise.
12079
12080 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
12081
12082         * dump.c (cp_dump_tree): Don't dump function bodies here.
12083
12084         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
12085         (dump.o): Update dependency list.
12086         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
12087         (flag_dump_translation_unit): Likewise.
12088         (CP_TYPE_QUALS): Adjust definition.
12089         (DECL_C_BIT_FIELD): Remove.
12090         (SET_DECL_C_BIT_FIELD): Likewise.
12091         (CLEAR_DECL_C_BIT_FIELD): Likewise.
12092         (add_maybe_template): Likewise.
12093         (strip_array_types): Likewise.
12094         (dump_node_to_file): Likewise.
12095         (cp_dump_tree): New function.
12096         * decl.c (init_decl_processing): Set lang_dump_tree.
12097         * decl2.c (flag_dump_translation_unit): Remove.
12098         * dump.c: Move most of it to ../c-dump.c.
12099         (cp_dump_tree): New function.
12100         * pt.c (add_maybe_template): Remove.
12101         * typeck.c (strip_array_types): Likewise.
12102
12103 2000-11-07  Eric Christopher  <echristo@redhat.com>
12104
12105         * decl.c (init_decl_processing): Change definition of
12106         __wchar_t to wchar_t.  Remove artificial declaration of
12107         wchar_t.
12108         * lex.c: Change instances of __wchar_t to wchar_t.
12109
12110 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
12111
12112         * lex.c (do_identifier): Don't lookup_name for operators.
12113         * parse.y (operator): Save looking_for_typename.
12114         (unoperator): Restore it.
12115         * spew.c (frob_opname): Use nth_token for lookahead.
12116
12117 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
12118
12119         * decl.c (grok_op_properties): Always use coerce_new_type and
12120         coerce_delete_type.
12121         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
12122         exception specification. Tidy up.
12123         (coerce_delete_type): Preserve exception specification. Tidy up.
12124
12125 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
12126
12127         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
12128         (push_binding_level), error.c (cp_tree_printer), pt.c
12129         (process_partial_specialization, tsubst_template_arg_vector),
12130         search.c (lookup_member): Use memset () instead of bzero ().
12131
12132 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
12133
12134         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
12135
12136 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
12137
12138         * Make-lang.in (c++.distdir): Remove.
12139
12140 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
12141
12142         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
12143         declarations from different namespaces to be combined.
12144
12145 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
12146
12147         * decl.c: Include tm_p.h.
12148
12149 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
12150
12151         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
12152
12153 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
12154
12155         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
12156         (build_overload_value), repo.c (open_repo_file), xref.c
12157         (open_xref_file): Use strchr () and strrchr () instead of index ()
12158         and rindex ().
12159
12160 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
12161
12162         * call.c (build_over_call): Call fold on the CALL_EXPR.
12163
12164 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
12165
12166         * error.c (dump_template_decl): Separate template hearders with
12167         space not comma.
12168
12169 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
12170
12171         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
12172         TS_* flags with corresponding TFF_*.  Adjust prototypes of
12173         functions (which used to take a tree_string_flags) to take an int.
12174
12175         * cp-tree.h (enum tree_string_flags): Remove
12176         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
12177         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
12178         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
12179         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
12180         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
12181         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
12182         (type_as_string, decl_as_string, expr_as_string,
12183         context_as_string): Adjust prototype.
12184
12185         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
12186         instead of TS_PLAIN.
12187
12188         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
12189         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
12190         plain `0'.
12191
12192 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
12193
12194         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
12195         (linkage_kind): New enumeration.
12196         (decl_linkage): New function.
12197         * decl2.c (comdat_linkage): Extend comment.
12198         * error.c (dump_function_decl): Print the arguments used to
12199         instantiate a template, even when not printing the type of the
12200         function.
12201         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
12202         not TREE_PUBLIC, to test for external linkage.
12203         * tree.c (decl_linkage): New function.
12204
12205 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
12206
12207         * pt.c (instantiate_decl): Always instantiate static data members
12208         initialized in-class.
12209
12210 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
12211
12212         * Make-lang.in: Move all build rules here from Makefile.in,
12213         adapt to new context.  Wrap all rules that change the current
12214         directory in parentheses.  Expunge all references to $(P).
12215         When one command depends on another and they're run all at
12216         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
12217         all object-file generation rules.  Delete obsolete variables.
12218
12219         * Makefile.in: Delete.
12220         * config-lang.in: Delete outputs= line.
12221
12222 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
12223
12224         * error.c (dump_function_decl): Print no space between
12225         `ptr-operator' the `type-specifier' of the return type.
12226         (dump_type_prefix): Make sure we put space at the appropriate
12227         place.
12228
12229 2000-10-23  Jason Merrill  <jason@redhat.com>
12230
12231         * call.c (equal_functions): Also call decls_match for extern "C" fns.
12232
12233 2000-10-22  Jason Merrill  <jason@redhat.com>
12234
12235         * call.c (build_conditional_expr): Use ocp_convert to force
12236         rvalue conversion.
12237
12238 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
12239
12240         * call.c (standard_conversion): Use RVALUE_CONVs for all
12241         expressions that satisfy lvalue_p, not just those that satisfy
12242         real_lvalue_p.
12243
12244         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
12245
12246         * typeck.c (c_sizeof): Return an expression of `size_t' type,
12247         not one with TYPE_IS_SIZETYPE set.
12248         (dubious_conversion_warnings): Remove special-case code.
12249
12250 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
12251
12252         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
12253         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
12254         (dump_type_prefix): Print vector-of-int as 'int vector'.
12255         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
12256         * tree.c (walk_tree): Handle VECTOR_TYPE.
12257
12258         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
12259
12260 2000-10-21  Jason Merrill  <jason@redhat.com>
12261
12262         * parse.y (operator): Set got_object from got_scope.
12263         Set looking_for_typename.
12264         * decl.c (lookup_name_real): Clear val after setting from_obj.
12265         Reorganize diagnostic.
12266
12267 2000-10-20  Jason Merrill  <jason@redhat.com>
12268
12269         * tree.c (walk_tree): Don't walk into default args.
12270
12271         * error.c (dump_expr): Use host_integerp.
12272
12273 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
12274
12275         * typeck2.c (abstract_virtuals_error): Use "because" instead of
12276         "since" in error message.
12277
12278 2000-10-20  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12279
12280         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
12281
12282 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
12283
12284         * decl.c (revert_static_member_fn): Fixed typo.
12285
12286 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
12287
12288         * class.c (subobject_offset_fn): New type.
12289         (dfs_record_base_offsets): Remove.
12290         (record_base_offsets): Likewise.
12291         (dfs_search_base_offsets): Likewise.
12292         (record_subobject_offset): New function.
12293         (check_subobject_offset): Likewise.
12294         (walk_subobject_offsets): Likewise.
12295         (record_subobject_offsets): Likewise.
12296         (layout_conflict_p): Reimplement.
12297         (layout_nonempty_base_or_field): Correct handling of type
12298         conflicts during layout.
12299         (layout_empty_base): Likewise.
12300         (build_base_field): Adjust to handle new representation of empty
12301         base offset table.
12302         (build_base_fields): Likewise.
12303         (layout_virtual_bases): Likewise.
12304         (splay_tree_compare_integer_csts): New function.
12305         (layout_class_type): Use a splay_tree, rather than a varray, to
12306         represent the offsets of empty bases.
12307
12308         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
12309         * decl.c (select_decl): Don't return declarations that are
12310         DECL_ANTICIPATED.
12311
12312 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
12313
12314         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
12315         (fake_std_node): New macro.
12316         * decl.c (in_std): Rename to ...
12317         (in_fake_std): ... this.
12318         (flag_no_builtin): Remove.
12319         (flag_no_nonansi_builtin): Likewise.
12320         (walk_namespaces_r): Use fake_std_node.
12321         (push_namespace): Use std_identifier.
12322         (pop_namespace): Use in_fake_std.
12323         (lookup_name_real): Use fake_std_node.
12324         (init_decl_processing): When -fhonor-std, create the `std'
12325         namespace.  Don't create a dummy fake_std_node in that case.
12326         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
12327         (builtin_function): Put builtins whose names don't begin
12328         with `_' in the std namespace.
12329         * decl2.c (flag_no_builtin): Remove.
12330         (flag_no_nonansi_builtin): Likewise.
12331         (set_decl_namespace): Use fake_std_node.
12332         (validate_nonmember_using_decl): Likewise.
12333         (do_using_directive): Likewise.
12334         (handle_class_head): Likewise.
12335         * dump.c (dequeue_and_dump): Likewise.
12336         * except.c (init_exception_processing): Use std_identifier.
12337         * init.c (build_member_call): Use fake_std_node.
12338         * rtti.c (init_rtti_processing): Use std_identifier.
12339
12340 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
12341
12342         * cp-tree.h (back_end_hook): Remove declaration.
12343         * decl2.c (back_end_hook): Remove definition.
12344
12345         * dump.c (dequeue_and_dump): Dump TREE_USED.
12346
12347 2000-10-17  Brad Lucier <lucier@math.purdue.edu>
12348
12349         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
12350
12351 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
12352
12353         * decl.c (WINT_TYPE): Define.
12354         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
12355         c_size_type_node, signed_size_type_node and wint_type_node.
12356
12357 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
12358
12359         * decl2.c (warn_missing_format_attribute): New variable.
12360         (lang_decode_option): Decode -Wmissing-format-attribute.
12361
12362 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
12363
12364         * typeck.c (qualify_type): Remove.
12365         (composite_pointer_type): Fix handling of conversions to `cv void*'.
12366
12367 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12368
12369         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
12370
12371 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12372
12373         * Makefile.in (parse.c, parse.h): Create atomically.
12374
12375 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
12376
12377         * class.c (current_obstack): Remove.
12378         * decl.c (ggc_p): Remove.
12379         (start_decl): Don't use decl_tree_cons.
12380         (grokdeclarator): Don't use build_decl_list.
12381         (start_function): Don't use decl_tree_cons.
12382         (finish_function): Don't mess with obstacks.
12383         * decl2.c (grok_x_components): Don't use build_decl_list.
12384         * lex.c (make_call_declarator): Don't call decl_tree_cons.
12385         (implicitly_declare_fn): Don't call build_decl_list.
12386         * parse.y (frob_specs): Don't call build_decl_list or
12387         decl_tree_cons.
12388         (expr_or_declarator_intern): Don't call decl_tree_cons.
12389         (primary): Don't call build_decl_list.
12390         (fcast_or_absdcl): Likewise.
12391         (typed_declspecs): Don't call decl_tree_cons.
12392         (reserved_declspecs): Don't call build_decl_list.
12393         (declmods): Likewise.
12394         (reserved_typespecquals): Likewise.
12395         (aggr): Likewise.
12396         (new_type_id): Likewise.
12397         (cv_qualifiers): Likewise.
12398         (after_type_declarator_intern): Likewise.
12399         (notype_declarator_intern): Likewise.
12400         (absdcl_intern): Likewise.
12401         (named_parm): Likewise.
12402         * pt.c (most_specialized_class): Likewise.
12403         * repo.c (temporary_obstack): Make it a structure, not a pointer.
12404         (init_repo): Initialize it.
12405         * search.c (current_obstack): Remove.
12406         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
12407
12408 2000-10-09  Richard Henderson  <rth@cygnus.com>
12409
12410         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
12411         (c++ language support bits for libgcc): Remove.
12412         (c++.clean): Remove cplib2.txt cleanup.
12413         * config-lang.in (headers, lib2funcs): Remove.
12414
12415         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
12416         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
12417         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
12418         * inc/new.h, inc/typeinfo: Remove files.
12419
12420 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
12421
12422         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
12423         defined.
12424         (init_decl_processing): Initialize intmax_type_node and
12425         uintmax_type_node.
12426
12427 2000-10-06  Richard Henderson  <rth@cygnus.com>
12428
12429         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
12430         (original_result_rtx): Remove.
12431         * decl.c (save_function_data): Don't clear x_result_rtx.
12432         (mark_lang_function): Don't mark it either.
12433         * expr.c (fixup_result_decl): Remove.
12434         * semantics.c (genrtl_named_return_value): Frob the return decl
12435         before calling emit_local_var.
12436         (genrtl_finish_function): Don't call fixup_result_decl.
12437         Always emit the jump to return_label.
12438
12439 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
12440
12441         * pt.c (lookup_template_class): Set current access for enum.
12442         (tsubst_enum): Set file & line for enum decl.
12443
12444         * spew.c (yylex): Remove unused variable.
12445
12446 2000-10-05  Richard Henderson  <rth@cygnus.com>
12447
12448         * semantics.c (genrtl_finish_function): Don't init or check
12449         can_reach_end; remove noreturn and return value checks.
12450
12451 2000-10-05  Tom Tromey  <tromey@cygnus.com>
12452
12453         * init.c (build_java_class_ref): Use `build_static_name' with a
12454         suffix, not a prefix, to build the class object's name.
12455
12456 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
12457
12458         * cp-tree.h (access_kind): Fix comment typo.
12459         * decl2.c (grokfield): Fix diagnostic typo.
12460         * semantics.c (finish_template_type): Fix comment typo.
12461         (finish_qualified_object_call_expr): Likewise.
12462
12463 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
12464
12465         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
12466         tsubsting fails.
12467
12468 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
12469
12470         * spew.c (frob_id): New static function.
12471         (frob_opname): Use it.
12472         (yylex): Use it.
12473
12474 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
12475
12476         * decl.c (lang_mark_false_label_stack): Remove.
12477         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
12478
12479 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
12480
12481         * gxxint.texi: Use @email for formatting email addresses.
12482
12483 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
12484
12485         * error.c: Remove direct obstack manipulation.  Replace with
12486         output_buffer-based formatting.  Adjust calls to removed macros.
12487         (obstack_chunk_alloc, obstack_chunk_free): Remove.
12488         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
12489         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
12490
12491 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
12492
12493         * ir.texi: Move to ../c-tree.texi.
12494
12495 2000-09-20  Jason Merrill  <jason@redhat.com>
12496
12497         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
12498
12499 2000-09-21  Andreas Jaeger  <aj@suse.de>
12500
12501         * errfn.c: Move declaration of cp_printer and cp_printers to ...
12502         * cp-tree.h: ... here.
12503
12504         * error.c: Remove declaration of cp_printer.
12505
12506 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
12507
12508         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
12509
12510 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
12511
12512         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
12513         users.
12514
12515 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
12516
12517         * decl.c (start_function): Robustify.
12518
12519 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12520
12521         * cp-tree.h (check_function_format): Accept a `status' parameter.
12522
12523         * call.c, typeck.c: Updates calls to `check_function_format'.
12524
12525 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
12526
12527         * decl2.c (handle_class_head): Always push some scope even
12528         in the error case.
12529
12530 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
12531
12532         * cp-tree.h (struct cp_language_function): Remove
12533         x_scope_stmt_stack and name_declared.
12534         (current_scope_stmt_stack): Remove.
12535         (function_name_declared_p): New macro.
12536         (struct lang_decl_flags): Use c_lang_decl as a base class.
12537         (context): Remove.
12538         (struct lang_decl): Replace saved_tree with context.
12539         (DECL_FRIEND_CONTEXT): Adjust accordingly.
12540         (SET_DECL_FRIEND_CONTEXT): Likewise.
12541         (DECL_VIRTUAL_CONTEXT): Likewise.
12542         (DECL_SAVED_TREE): Remove.
12543         (C_DECLARED_LABEL_FLAG): Likewise.
12544         (cplus_expand_expr_stmt): Don't declare.
12545         (add_decl_stmt): Likewise.
12546         (add_scope_stmt): Likewise.
12547         * decl.c (mark_stmt_tree): Remove.
12548         (case_compare): Likewise.
12549         (finish_case_label): Use c_add_case_label.
12550         (init_decl_processing): Set more language-specific hooks.
12551         (build_enumerator): Fix typo in comment.
12552         (cplus_expand_expr_stmt): Remove.
12553         (mark_lang_function): Use mark_c_language_function.
12554         (lang_mark_tree): Use c_mark_lang_decl.
12555         * decl2.c: Change order of inclusion.
12556         * except.c: Likewise.
12557         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
12558         back on c_expand_expr.
12559         * friend.c: Include expr.h.
12560         * init.c: Change order of inclusion.
12561         * Makefile.in: Update dependencies.
12562         * lex.h (free_lang_decl_chain): Remove.
12563         * optimize.c (maybe_clone_body): Use function_name_declared_p.
12564         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
12565         it doesn't exist.
12566         (instantiate_decl): Use function_name_declared_p.
12567         * semantics.c (lang_expand_expr_stmt): Remove.
12568         (set_current_function_name_declared): Likewise.
12569         (current_function_name_declared): Likewise.
12570         (begin_compound_stmt): Use function_name_declared_p.
12571         (add_decl_stmt): Remove.
12572         (setup_vtbl_ptr): Use function_name_declared_p.
12573         (add_scope_stmt): Remove.
12574         (current_scope_stmt_stack): New function.
12575         (cp_expand_stmt): Don't handle SCOPE_STMTs.
12576         (expand_body): Use function_name_declared_p.
12577         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
12578         * typeck.c: Change order of includes.
12579         (convert_sequence): Remove.
12580
12581 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
12582
12583         * lex.c (reswords): Add _Complex.
12584
12585 2000-09-14  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12586
12587         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
12588
12589 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
12590
12591         * init.c (begin_init_stmts): Don't use // comments.
12592
12593 2000-09-12  Jason Merrill  <jason@redhat.com>
12594
12595         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
12596         all non-extern arrays.
12597
12598         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
12599         typenames, too.  Downgrade complaint to pedwarn.
12600         (xref_tag): Warn about surprising behavior of 'friend struct T'.
12601         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
12602         'class This::Inherited'.
12603
12604 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
12605
12606         * decl.c (finish_case_label): Given the LABEL_DECL a
12607         DECL_CONTEXT.
12608
12609 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
12610
12611         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
12612         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
12613         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
12614         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
12615         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
12616         New macros.
12617         (sorry_for_unsupported_tree, print_scope_operator,
12618         print_left_paren, print_right_paren, print_left_bracket,
12619         print_right_bracket, print_whitespace): Likewise.
12620         (aggr_variety): Rename to class_key_or_enum.
12621         (print_type): Rename to print_type_id.
12622         (print_type_specifier_seq, print_simple_type_specifier,
12623         print_elaborated_type_specifier,
12624         print_rest_of_abstract_declarator,
12625         print_parameter_declaration_clause, print_exception_specification,
12626         print_nested_name_specifier, print_template_id,
12627         typedef_original_name,  print_template_argument_list_start,
12628         print_template_argument_list_end): New functions.
12629
12630 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
12631
12632         * ir.texi: Add more documentation.
12633
12634 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
12635
12636         * cp-tree.h (struct saved_scope): Remove x_function_parms.
12637         (current_function_parms): Don't define.
12638         (struct cp_language_function): Remove parms_stored.
12639         (current_function_just_assigned_this): Don't define.
12640         (current_function_parms_stored): Likewise.
12641         (static_ctors): Declare.
12642         (static_dtors): Likewise.
12643         (SF_EXPAND): Don't define.
12644         (expand_start_early_try_stmts): Remove declaration.
12645         (store_parm_decls): Likewise.
12646         * decl.c (static_ctors): Don't declare.
12647         (static_dtors): Likewise.
12648         (struct binding_level): Remove this_block.
12649         (poplevel): Remove dead code.
12650         (set_block): Likewise.
12651         (mark_binding_level): Don't mark this_block.
12652         (mark_saved_scope): Don't mark x_function_parms.
12653         (init_decl_processing): Don't add current_function_parms as a GC
12654         root.
12655         (check_function_type): Change prototype.
12656         (start_function): Remove RTL-generation code.
12657         (expand_start_early_try_stmts): Remove.
12658         (store_parm_decls): Give it internal linkage.  Remove
12659         RTL-generation code.
12660         (finish_function): Remove RTL-generation code.
12661         * decl2.c (static_ctors): Fix formatting.
12662         (static_dtors): Likewise.
12663         * method.c (use_thunk): Don't call store_parm_decls.
12664         (synthesize_method): Likewise.
12665         * optimize.c (maybe_clone_body): Likewise.
12666         * parse.y (fn.def2): Likewise.
12667         (.set_base_init): Likewise.
12668         (nodecls): Likewise.
12669         * pt.c (instantiate_decl): Likewise.
12670         * rtti.c (synthesize_tinfo_fn): Likewise.
12671         * semantics.c (genrtl_try_block): Simplify.
12672         (expand_body): Use genrtl_start_function and
12673         genrtl_finish_function.
12674         (genrtl_start_function): New function.
12675         (genrtl_finish_function): Likewise.
12676
12677 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
12678
12679         * error.c (cp_tree_printer, case 'P'): Append break.
12680
12681 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
12682
12683         * cp-tree.h (frob_opname): Declare.
12684         * parse.y (saved_scopes): New static variable.
12685         (cp_parse_init): Adjust.
12686         (do_id): If lastiddecl is NULL, do do_identifier.
12687         (operator): Save scope information.
12688         (unoperator): New reduction. Restore scope information.
12689         (operator_name): Append unoperator. Call frob_opname.
12690         * spew.c (frob_opname): Define.
12691
12692 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
12693
12694         * decl.c, rtti.c: Include defaults.h if not already included.
12695         Don't define the *_TYPE_SIZE macros.
12696
12697 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
12698
12699         * cp-tree.h (push_switch): Change prototype.
12700         (check_cp_case_value): Remove declaration.
12701         (decl_constant_value): Likewise.
12702         * decl.c (struct cp_switch): Add switch_stmt and cases.
12703         (case_compare): New function.
12704         (push_switch): Set switch_stmt.  Initialize cases.
12705         (pop_switch): Clean up cases.
12706         (define_case_label): Rename to ...
12707         (finish_case_label): ... this.  Do semantic analysis for case
12708         labels here.
12709         (start_function): Correct comment.
12710         * decl2.c (check_cp_case_value): Remove.
12711         * expr.c (do_case): Remove.
12712         * pt.c (tsubst_expr): Adjust call to finish_case_label.
12713         * semantics.c (genrtl_do_poplevel): Remove declaration.
12714         (RECHAIN_STMTS): Remove.
12715         (finish_break_stmt): Use build_break_stmt.
12716         (finish_continue_stmt): Use build_continue_stmt.
12717         (finish_switch_cond): Adjust condition here, rater than in
12718         c_expand_start_case.
12719         (finish_case_label): Remove.
12720         * typeck.c (c_expand_return): Remove.
12721         (c_expand_start_case): Likewise.
12722
12723 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
12724
12725         * ir.texi: Document type nodes.
12726
12727 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
12728
12729         * cp-tree.h (init_cp_semantics): Declare.
12730         (genrtl_try_block): Don't declare.
12731         (genrtl_handler): Likewise.
12732         (genrtl_catch_block): Likewise.
12733         (genrtl_ctor_stmt): Likewise.
12734         (genrtl_subobject): Likewise.
12735         (genrtl_do_poplevel): Likewise.
12736         (genrtl_named_return_value): Likewise.
12737         * lex.c (init_parse): Call init_cp_semantics.
12738         * semantics.c (genrtl_try_block): Give it internal linkage.
12739         (genrtl_handler): Likewise.
12740         (genrtl_catch_block): Likewise.
12741         (genrtl_ctor_stmt): Likewise.
12742         (genrtl_subobject): Likewise.
12743         (genrtl_do_poplevel): Likewise.
12744         (genrtl_named_return_value): Likewise.
12745         (lang_expand_stmt): Rename to ...
12746         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
12747         (init_cp_semantics): Define.
12748
12749         * decl.c (initialize_local_var): Remove RTL-generating code.
12750         * semantics.c (genrtl_try_block): Fix formatting.
12751
12752         Move statement-tree facilities from C++ to C front-end.
12753         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
12754         (void_zero_node): Remove.
12755         (stmt_tree): Likewise.
12756         (scope_chain): Adjust.
12757         (language_function): Rename to cp_language_function.
12758         (cp_function_chain): Adjust.
12759         (current_stmt_tree): Remove.
12760         (last_tree): Likewise.
12761         (last_expr_type): Likewise.
12762         (struct lang_decl): Adjust.
12763         (STMT_IS_FULL_EXPR_P): Remove.
12764         (add_tree): Remove.
12765         (begin_stmt_tree): Likewise.
12766         (finish_stmt_tree): Likewise.
12767         (walk_tree_fn): Likewise.
12768         (walk_stmt_tree): Likewise.
12769         * class.c (finish_struct): Replace use of add_tree with add_stmt.
12770         * decl.c (mark_stmt_tree): Adjust type.
12771         (init_decl_processing): Don't build void_zero_node.
12772         (initialize_local_var): Adjust usage of current_stmt_tree.
12773         (finish_enum): Use add_stmt, not add_tree.
12774         (save_function_data): Adjust use of language_function.
12775         (finish_constructor_body): Use add_stmt, not add_tree.
12776         (finish_destructor_body): Likewise.
12777         (push_cp_function_context): Adjust use of language_function.
12778         (pop_cp_function_context): Likewise.
12779         (mark_lang_function): Likewise.
12780         (mark_cp_function_context): Likewise.
12781         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
12782         (build_vec_init): Likewise.
12783         * semantics.c (SET_LAST_STMT): Remove.
12784         (RECHAIN_STMTS): Don't use it.
12785         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
12786         (current_stmt_tree): Define.
12787         (add_tree): Remove.
12788         (finish_goto_stmt): Use add_stmt, not add_tree.
12789         (finish_expr_stmt): Likewise.
12790         (begin_if_stmt): Likewise.
12791         (finish_then_clause): Likewise.
12792         (begin_while_stmt): Likewise.
12793         (begin_do_stmt): Likewise.
12794         (finish_return_stmt): Likewise.
12795         (begin_for_stmt): Likewise.
12796         (finish_break_stmt): Likewise.
12797         (finish_continue_stmt): Likewise.
12798         (begin_switch_stmt): Likewise.
12799         (finish_case_label): Likewise.
12800         (begin_try_block): Likewise.
12801         (begin_function_try_block): Likewise.
12802         (begin_handler): Likewise.
12803         (begin_catch_block): Likewise.
12804         (begin_compound_stmt): Likewise.
12805         (begin_asm_stmt): Likewise.
12806         (finish_asm_stmt): Likewise.
12807         (finish_label_stmt): Likewise.
12808         (add_decl_stmt): Likewise.
12809         (finish_subobject): Likewise.
12810         (finish_decl_cleanup): Likewise.
12811         (finish_named_return_value): Likewise.
12812         (setup_vtbl_ptr): Likewise.
12813         (add_scope_stmt): Likewise.
12814         (finish_stmt_expr): Likewise.
12815         (prune_unused_decls): Remove.
12816         (begin_stmt_tree): Likewise.
12817         (finish_stmt_tree): Likewise.
12818         (prep_stmt): Adjust use of current_stmt_tree.
12819         (lang_expand_stmt): Likewise.
12820         * tree.c (statement_code_p): Remove.
12821         (cp_statement_code_p): New function.
12822         (walk_stmt_tree): Remove.
12823         (init_tree): Set lang_statement_code_p.
12824
12825 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
12826
12827         Integrated preprocessor.
12828
12829         * Make-lang.in, Makefile.in: Remove all references to input.c,
12830         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
12831         * gxx.gperf, hash.h, input.c: Delete.
12832         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
12833         initialized properly.
12834
12835         * class.c (fixup_pending_inline): Take a tree, not a
12836         struct pending_inline *.  All callers changed.
12837         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
12838         RID_PROTECTED entries in ridpointers[] array here.
12839         * decl.c (duplicate_decls): Do not refer to struct
12840         pending_inline.
12841         (record_builtin_type, init_decl_processing): Use RID_MAX not
12842         CP_RID_MAX.
12843         (grokdeclarator): Use C_IS_RESERVED_WORD.
12844         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
12845         cpplib.
12846         (grok_x_components): Do not inspect pending_inlines chain.
12847
12848         * cp-tree.h (struct lang_identifier): Add rid_code entry.
12849         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
12850         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
12851         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
12852         TIME_IDENTIFIER_FILEINFO): Kill.
12853         Update prototypes.
12854         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
12855         single 32-bit word.
12856         * parse.y: Call do_pending_inlines unconditionally.
12857         reinit_parse_for_method is now snarf_method.  fn.defpen is no
12858         longer necessary.  Remove unnecessary <itype> annotation on
12859         SCOPE.  Do not refer to end_of_file or struct pending_inline.
12860         * semantics.c (begin_inline_definitions): Call
12861         do_pending_inlines unconditionally.
12862
12863         * lex.c: Remove all code now shared with C front end.
12864         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
12865         into the get_identifier table.  Rewrite pragma handling to
12866         work with the registry.  Move code to save tokens for later
12867         processing to spew.c.
12868
12869         * spew.c: Rewrite everything in terms of token streams instead
12870         of text.  Move routines here from lex.c / input.c as
12871         appropriate.  GC-mark trees hanging off the pending inlines
12872         chain.
12873
12874 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
12875
12876         * NEWS: Mention that the named return value extension has been
12877         deprecated.
12878         * cp-tree.h (original_result_rtx): Define.
12879         (TREE_REFERENCE_EXPR): Remove.
12880         (DECL_VPARENT): Likewise.
12881         (pushdecl_nonclass_level): Likewise.
12882         (store_return_init): Likewise.
12883         (reinit_lang_specific): Likewise.
12884         (genrtl_named_return_value): Change prototype.
12885         * decl.c (original_result_rtx): Remove.
12886         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
12887         Do not generate RTL for local variables here.
12888         (store_return_init): Remove.
12889         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
12890         store_return_init.
12891         (finish_named_return_value): Adjust accordingly.  Warn that this
12892         extension is deprecated.
12893         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
12894
12895 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12896
12897         * pt.c (type_unification_real): Replace switch with if.
12898         (unify): Tsubst non-type parms before comparing.
12899
12900 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12901
12902         * error.c (dump_typename): New function, broken out of ...
12903         (dump_type): ... here. Use it.
12904         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
12905
12906 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12907
12908         * init.c (build_offset_ref): Deal with namespace scoped
12909         TEMPLATE_ID_EXPRs.
12910
12911 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12912
12913         * class.c (resolve_address_of_overloaded_function): Add
12914         explanation message.
12915         * decl.c (define_case_label): Reformat explanation.
12916         * decl2.c (finish_static_data_member_decl): Likewise.
12917         (grokfield): Likewise.
12918         * friend.c (do_friend): Likewise.
12919
12920 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
12921
12922         * tree.c (walk_tree): Expose tail recursion.
12923         (walk_stmt_tree): New function.
12924         * cp-tree.h: Prototype walk_stmt_tree.
12925         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
12926         the BLOCKs directly.  If a BLOCK has no variables after
12927         pruning, discard it.
12928         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
12929         restore the line number.
12930
12931 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
12932
12933         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
12934         (pt.o): Remove dependency on HTAB_H.
12935         * cp-tree.h: Include hashtab.h.
12936         (walk_tree): Change prototype.
12937         (walk_tree_without_duplicates): New function.
12938         * decl.c (check_default_argument): Use it.
12939         * optimize.c (remap_decl): Adjust calls to walk_tree.
12940         (copy_body): Likewise.
12941         (expand_calls_inline): Likewise.
12942         (calls_setjmp_p): Use walk_tree_without_duplicates.
12943         * pt.c: Don't include hashtab.h.
12944         (for_each_template_parm): Use walk_tree_without_duplicates.
12945         * semantics.c (finish-stmt_tree): Likewise.
12946         (expand_body): Likewise.
12947         * tree.c (walk_tree): Add additional parameter.
12948         (walk_tree_without_duplicates): New function.
12949         (count_trees): Use it.
12950         (verify_stmt_tree): Adjust call to walk_tree.
12951         (find_tree): Use walk_tree_without_duplicates.
12952         (no_linkage_check): Likewise.
12953         (break_out_target_exprs): Adjust call to walk_tree.
12954         (cp_unsave): Likewise.
12955
12956 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12957
12958         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
12959         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
12960         * cp-tree.h (TYPE_BINFO): Adjust comment.
12961         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
12962         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
12963         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
12964         (TYPE_TEMPLATE_INFO): Likewise.
12965         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
12966         * class.c (push_nested_class): Likewise.
12967         * decl.c (lookup_name_real): Likewise.
12968         (grokdeclarator): Likewise.
12969         (grok_op_properties): Likewise.
12970         (xref_tag): Likewise.
12971         (xref_basetypes): Likewise.
12972         * decl2.c (constructor_name_full): Likewise.
12973         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
12974         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
12975         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
12976         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12977         (dump_type_suffix): Likewise.
12978         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
12979         instead.
12980         (get_aggr_from_typedef): Likewise.
12981         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
12982         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12983         (write_template_parm): Likewise.
12984         (write_template_template_parm): Check tree code instead of
12985         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12986         * method.c (build_overload_nested_name): Add
12987         BOUND_TEMPLATE_TEMPLATE_PARM.
12988         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
12989         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12990         * pt.c (convert_template_argument): Check tree code instead of
12991         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12992         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
12993         (for_each_template_parm): Adjust comment.
12994         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
12995         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12996         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
12997         template_args_equal to compare template template parameter cases.
12998         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12999         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
13000         instead.
13001         * tree.c (copy_template_template_parm): Decide whether to create
13002         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
13003         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
13004         (copy_tree_r): Likewise.
13005         * typeck.c (comptypes): Likewise.  Check tree code instead of
13006         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
13007
13008 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
13009
13010         * decl.c (finish_function): Move the code for handling functions
13011         marked with the constructor and destructor attributes inside the
13012         expand_p block.
13013
13014 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
13015
13016         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
13017
13018 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
13019
13020         * pt.c (lookup_template_class): Remove abort.
13021         * tree.c (get_type_decl): Allow error_mark_node.
13022
13023 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
13024
13025         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
13026         TEMPLATE_ID_EXPRs.
13027
13028 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
13029
13030         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
13031         new ABI mangling.
13032
13033 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
13034
13035         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
13036         union tag mismatch error reporting.
13037
13038 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
13039
13040         * call.c (build_scoped_method_call): Check it is not a namespace.
13041
13042 2000-08-30  Jason Merrill  <jason@redhat.com>
13043
13044         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
13045
13046         * tree.c (bot_manip): Check TREE_CONSTANT rather than
13047         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
13048         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
13049
13050         * decl.c (start_function): Always call make_function_rtl.
13051
13052 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
13053
13054         * semantics.c (prune_unused_decls): New function.
13055         (finish_stmt_tree): Call it via walk_tree.
13056
13057 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
13058
13059         * class.c (build_secondary_vtable): Constify a char *.
13060         * decl.c (init_decl_processing): Initialize function_id_node,
13061         pretty_function_id_node, and func_id_node.
13062         * input.c (struct input_source): Constify 'str'.
13063         (feed_input): Constify first argument.
13064         * mangle.c (write_identifier): Constify argument.
13065         * pt.c (mangle_class_name_for_template): Constify argument.
13066
13067 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
13068
13069         * typeck.c (mark_addressable): Remove code that pokes around in
13070         RTL.
13071
13072 2000-08-28  Jason Merrill  <jason@redhat.com>
13073
13074         * lex.c (file_name_nondirectory): Move to toplev.c.
13075
13076         * cp-tree.h (LOCAL_CLASS_P): New macro.
13077         * class.c (finish_struct_1): Use it.
13078
13079 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
13080
13081         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
13082         (write_encoding): Pass another argument to write_name.
13083         (write_name): Add ignore_local_scope parameter.  Fix handling of
13084         local names.
13085         (write_nested_name): Use write_unqualified_name.
13086         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
13087         (write_template_prefix): Use write_unqualified_name.
13088         (write_component): Remove.
13089         (write_local_name): Add parameter.  Use direct local entity to
13090         discriminator calculation.
13091         (write_class_enum_type): Pass another argument to write_name.
13092         (write_template_template_arg): Likewise.
13093         (make_guard_variable): Likewise.
13094
13095 2000-08-27  Jason Merrill  <jason@redhat.com>
13096
13097         * decl.c (pushdecl): Matching decls for local externs are found in
13098         the current level.  Propagate linkage information from previous
13099         declarations.
13100
13101 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
13102
13103         * ir.texi (Expressions): Fix typo.
13104
13105 2000-08-25  Greg McGary  <greg@mcgary.org>
13106
13107         * tree.c (init_tree): Use ARRAY_SIZE.
13108
13109 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
13110
13111         * error.c (cp_tree_printer): Rework.
13112
13113 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
13114
13115         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
13116         dyn-string.o.
13117         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
13118         (cp-demangle.o): Remove target.
13119         (dyn-string.o): Likewise.
13120
13121         * decl.c (grokfndecl): Require that `main' return an `int'.
13122         * mangle.c (write_encoding): Don't mangle return types for
13123         conversion functions.
13124
13125 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
13126
13127         * error.c (tree_formatting_info): New data type.
13128         (tree_being_formatted): New macro.
13129         (tree_formatting_flags): Likewise.
13130         (put_whitespace): Likewise.
13131         (print_tree_identifier): Likewise.
13132         (print_identifier): Likewise.
13133         (cp_tree_printer, print_function_argument_list, print_declaration,
13134         print_expression, print_function_declaration,
13135         print_function_parameter, print_type, print_cv_qualifier): New
13136         functions.
13137         (init_error): Initialize lang_printer.
13138
13139 2000-08-24  Jason Merrill  <jason@redhat.com>
13140
13141         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
13142         adjustment necessary.
13143
13144 2000-08-24  Greg McGary  <greg@mcgary.org>
13145
13146         * cp-tree.h (MAIN_NAME_P): Remove macro.
13147
13148 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
13149
13150         * error.c (print_instantiation_context): Don't forget to flush the
13151         buffer.
13152
13153 2000-08-23  Jason Merrill  <jason@redhat.com>
13154
13155         * typeck.c (build_ptrmemfunc): Save the input pmf.
13156
13157         * method.c (process_modifiers): Use same_type_p.
13158
13159 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
13160
13161         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
13162         * mangle.c (write_function_type): Change prototype.
13163         (write_encoding): Don't mangle return types for
13164         constructors or destructors.
13165         (write_type): Adjust call to write_function_type.
13166         * pt.c (instantiate_template): Instantiate alternate entry points
13167         when instantiating the main function.
13168
13169 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
13170
13171         * error.c (cp_print_error_function): Don't use embedded '\n' in
13172         output_printf.
13173
13174 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
13175
13176         * decl.c (init_decl_processing): Remove bogus initialization.
13177         * error.c (lang_print_error_function): Restore here.
13178         (init_error): Initialize print_error_function.
13179
13180 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
13181
13182         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
13183
13184 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
13185
13186         * Makefile.in (error.o): Depends on diagnostic.h
13187
13188         * cp-tree.h (problematic_instantiation_changed,
13189         record_last_problematic_instantiation, current_instantiation,
13190         print_instantiation_context): Declare.
13191         (maybe_print_template_context): Remove.
13192
13193         * decl.c (init_decl_processing): Set print_error_function to NULL.
13194         (lang_print_error_function): Remove, since we're using a new
13195         machinery.
13196
13197         * error.c: #include diagnostic.h
13198         (function_category): New function.
13199         (cp_diagnostic_starter): Likewise.
13200         (cp_diagnostic_finalizer): Likewise.
13201         (cp_print_error_function): Likewise.
13202         (maybe_print_instantiation_context): Likewise.
13203         (print_instantiation_full_context): Likewise.
13204         (print_instantiation_partial_context): Likewise.
13205         (print_instantiation_context): Define.
13206         (init_error): Initialize diagnostic pager and finalizer.
13207
13208         * pt.c (problematic_instantiation_changed): Define.
13209         (record_last_problematic_instantiation): Likewise.
13210         (current_instantiation): Likewise.
13211         (maybe_print_template_context): Remove.
13212         (print_template_context): Likewise.
13213         (current_tinst_level): Make static to reflect Brendan Kehoe's
13214         change of 1995-04-13.
13215         (push_tinst_level): Call print_instantiation_context.
13216
13217 2000-08-21  Nix  <nix@esperi.demon.co.uk>
13218
13219         * lang-specs.h: Do not process -o or run the assembler if
13220         -fsyntax-only.
13221
13222 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
13223
13224         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
13225         variables.
13226         * decl2.c (lang_decode_option): Disable gettext attributes for
13227         -ansi.
13228
13229 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
13230
13231         * lex.c (lang_init_options): Default diagnostic message maximum
13232         length to 80, when line-wrapping.
13233
13234 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
13235
13236         * class.c (build_vtbl_initializer): Clear the entire
13237         vtbl_init_data.  Start keeping track of the functions for which we
13238         have created vcall offsets here.
13239         (dfs_build_vcall_offset_vtbl_entries): Remove.
13240         (build_vcall_offset_vtbl_entries): Reimplement.
13241         (add_vcall_offset_vtbl_entries_r): New function.
13242         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
13243         computing when vcall offsets are necessary.
13244
13245 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
13246
13247         * decl.c (member_function_or_else): Use cp_error ... %T.
13248         (grokdeclarator): Likewise.
13249         (start_method): Likewise.
13250         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
13251
13252 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
13253
13254         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
13255         TYPE_DECLs.
13256
13257 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
13258
13259         * cp-tree.h (PTRMEM_OK_P): New macro.
13260         (itf_ptrmem_ok): New enumeration value.
13261         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
13262         argument. Diagnose implicit pointer to member.
13263         (instantiate_type): Don't diagnose implicit pointer to member
13264         here. Pass itf_ptrmem_ok if ok. Adjust calls to
13265         resolve_address_of_overloaded_function.
13266         * init.c (build_offset_ref): Set PTRMEM_OK_P.
13267         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
13268         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
13269         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
13270         (build_unary_op): Deal with single non-static member in
13271         microsoft-land.
13272
13273 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
13274
13275         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
13276
13277 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
13278
13279         * cp-tree.h (enum_name_string): Remove prototype.
13280         (report_case_error): Remove prototype.
13281         * cp/typeck2.c (enum_name_string): Remove.
13282         (report_case_error): Remove.
13283         * error.c (dump_expr): Deal with enum values directly.
13284         Correctly negate integer constant.
13285
13286 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
13287
13288         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
13289         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
13290         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
13291         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
13292         (__cxa_vec_new): Use __cxa_vec_new2.
13293         (__cxa_vec_delete): Use __cxa_vec_delete2.
13294
13295 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
13296
13297         * vec.cc (__cxa_vec_new): Set "C" linkage.
13298         (__cxa_vec_ctor): Likewise.
13299         (__cxa_vec_cctor): Likewise.
13300         (__cxa_vec_dtor): Likewise.
13301         (__cxa_vec_delete): Likewise.
13302         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
13303         (__cxa_vec_ctor): Likewise.
13304         (__cxa_vec_cctor): Likewise.
13305         (__cxa_vec_dtor): Likewise.
13306         (__cxa_vec_delete): Likewise.
13307
13308 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
13309
13310         * class.c (instantiate_type): Reinstate local variable
13311         deleted in previous change.
13312
13313         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
13314         itf_no_attributes.
13315
13316 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
13317
13318         * cp-tree.h (instantiate_type_flags): New enumeration.
13319         (instantiate_type): Change parameter.
13320         * class.c (instantiate_type): Adjust prototype. Adjust.
13321         * call.c (standard_conversion): Adjust instantiate_type call.
13322         (reference_binding): Likewise.
13323         (build_op_delete_call): Likewise.
13324         (convert_like_real): Likewise.
13325         * cvt.c (cp_convert_to_pointer): Likewise.
13326         (convert_to_reference): Likewise.
13327         * pt.c (convert_nontype_argument): Likewise.
13328         * typeck.c (build_binary_op): Likewise.
13329         (build_ptrmemfunc): Likewise.
13330         (convert_for_assignment): Likewise.
13331
13332 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
13333
13334         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
13335         (current_aggr): Define.
13336         * decl.c (grokdeclarator): Make sure a friend class is an
13337         elaborated type specifier.
13338         * parse.y (current_aggr): Remove static definition.
13339         (cp_parse_init): Adjust.
13340         (structsp): Clear and restore current_aggr.
13341         (component_decl_list): Clear current_aggr.
13342
13343         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
13344         aggregate tag on the typename's context.
13345
13346         * pt.c (tsubst_friend_class): Return error_mark_node, if
13347         parms becomes NULL.
13348         (instantiate_class_template): Ignore error_mark_node friend types.
13349
13350 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
13351
13352         * cvt.c (warn_ref_binding): New static function, broken out of ...
13353         (convert_to_reference): ... here. Use it.
13354
13355 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
13356
13357         * parse.y (template_arg): Add rule for template qualified with
13358         global scope.
13359
13360 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13361
13362         * decl2.c (add_function): Reorganize.
13363         (arg_assoc): Do not consider function template decls.
13364
13365 2000-08-11  Jason Merrill  <jason@redhat.com>
13366
13367         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
13368         looking inside.
13369
13370 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
13371
13372         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
13373         (lookup_nested_tag): Likewise.
13374
13375         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
13376         can be produced.
13377
13378 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
13379
13380         * parse.y (named_complex_class_head_sans_basetype): Remove
13381         always true if.
13382
13383 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
13384
13385         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
13386         explicit TEMPLATE_ID_EXPR args.
13387         (build_expr_from_tree, case CALL_EXPR): Likewise.
13388
13389 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
13390
13391         * decl.c (check_tag_decl): Diagnose typename's which don't
13392         declare anything.
13393
13394 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
13395
13396         * init.c (build_aggr_init): Reject bogus array initializers
13397         early.
13398
13399 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
13400
13401         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
13402         runtime.
13403         * cp/tinfo.cc (__dynamic_cast): Likewise.
13404         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
13405
13406 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
13407
13408         * cvt.c (convert_to_pointer_force): Fix error message when
13409         attempting to cast from ambiguous base.
13410
13411 2000-08-08  Jason Merrill  <jason@redhat.com>
13412
13413         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
13414         (tsubst_template_arg_vector): Likewise.
13415
13416         * decl2.c (build_anon_union_vars): Choose the largest field; don't
13417         assume that one will be as large as the union.
13418
13419 2000-08-07  Kazu Hirata  <kazu@hxi.com>
13420
13421         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
13422         * decl.c (pop_labels): Likewise.
13423
13424 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
13425
13426         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
13427         specifications.
13428         (__pointer_to_member_type_info): Likewise.
13429         (__base_class_info): Likewise.
13430         (__class_type_info): Likewise.
13431         (__si_class_type_info): Likewise.
13432         (__vmi_class_type_info): Likewise.
13433         * tinfo.cc (__si_class_type_info::__do_find_public_src):
13434         Changed member names to match specifications.
13435         (__vmi_class_type_info::__do_find_public_src): Likewise.
13436         (__si_class_type_info::__do_dyncast): Likewise.
13437         (__vmi_class_type_info::__do_dyncast): Likewise.
13438         (__si_class_type_info::__do_upcast): Likewise.
13439         (__vmi_class_type_info::__do_upcast): Likewise.
13440         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
13441         (__pbase_type_info::__pointer_catch): Likewise.
13442         (__pointer_type_info::__pointer_catch): Likewise.
13443         (__pointer_to_member_type_info::__pointer_catch): Likewise.
13444
13445 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
13446
13447         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
13448         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
13449         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
13450
13451 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
13452
13453         * cp-tree.h (add_method): Change prototype.
13454         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
13455         Don't double the size of the method vector in the error case.
13456         (handle_using_decl): Adjust call to add_method.
13457         (add_implicitly_declared_members): Likewise.
13458         (clone_function_decl): Likewise.
13459         * decl2.c (check_classfn): Likewise.
13460         * semantics.c (finish_member_declaration): Likewise.
13461
13462 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
13463
13464         * decl.c (flag_isoc94): New variable.
13465
13466 2000-08-02  Jason Merrill  <jason@redhat.com>
13467
13468         * pt.c (do_type_instantiation): Add complain parm; don't complain
13469         if called recursively.
13470         * cp-tree.h, parse.y: Adjust.
13471
13472 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
13473
13474         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
13475         -Wno-strict-prototypes.
13476
13477         * g++spec.c: Adjust type of second argument to
13478         lang_specific_driver, and update code as necessary.
13479
13480         * cp-tree.h: Don't prototype min_precision here.
13481         (my_friendly_assert): Cast expression to void.
13482         * semantics.c (do_poplevel): Initialize scope_stmts.
13483
13484 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
13485
13486         * cp-tree.h (DECL_NEEDED_P): Tweak.
13487
13488 2000-07-28  Jason Merrill  <jason@redhat.com>
13489
13490         * lang-specs.h: Use %i in rule for .ii files.
13491
13492 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
13493
13494         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
13495
13496 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
13497
13498         Allow indirect primary bases.
13499         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
13500         primary_base.
13501         (CLASSTYPE_VFIELD_PARENT): Remove.
13502         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
13503         (BINFO_PRIMARY_BINFO): Remove.
13504         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
13505         (BINFO_VBASE_PRIMARY_P): Likewise.
13506         (BINFO_PRIMARY_BASE_OF): New macro.
13507         (BINFO_INDIRECT_PRIMARY_P): Likewise.
13508         (get_primary_binfo): New function.
13509         * decl.c (lang_mark_tree): Make lang_type::primary_base.
13510         * class.c (vcall_offset_data_s): Rename to ...
13511         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
13512         and add ctor_vtbl_p.
13513         (get_derived_offset): Use get_primary_binfo.
13514         (dfs_mark_primary_bases): Adjust handling of virtual primary
13515         bases.
13516         (mark_primary_bases): Likewise.
13517         (set_primary_base): Take a binfo, not an integer, as a
13518         representation of the primary base.
13519         (indirect_primary_base_p): Remove.
13520         (determine_primary_base): Adjust for indirect primary bases.
13521         (dfs_find_final_overrider): Fix typo in coment.
13522         (update_vtable_entry_for_fn): Use get_primary_binfo.
13523         (layout_nonempty_base_or_field): Tweak.
13524         (build_base_fields): Adjust for new primary base semantics.
13525         (dfs_propagate_binfo_offsets): Remove.
13526         (propagate_binfo_offsets): Rewrite.
13527         (dfs_set_offset_for_shared_vbases): Remove.
13528         (layout_virtual_bases): Don't use it.
13529         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
13530         ABI.
13531         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
13532         CLASSTYPE_VFIELD_PARENT.
13533         (dfs_get_primary_binfo): New function.
13534         (get_primary_binfo): Likewise.
13535         (dump_class_hierarchy_r): Tweak printing of primary bases.
13536         (build_vtbl_initializer): Fix typo in comments.  Use
13537         vtbl_init_data.
13538         (build_vcall_and_vbase_vtbl_entries): Likewise.
13539         (build_vbaes_offset_vtbl_entries): Likewise.
13540         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
13541         BV_VCALL_INDEX to handle indirect primary bases.
13542         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
13543         (build_rtti_vtbl_entries): Likewise.
13544         * search.c (get_shared_vbase_if_not_primary): Tweak.
13545         (find_vbase_instance): Likewise.
13546         (binfo_for_vtable): Simplify.
13547         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
13548         (make_binfo): Make it have 11 entries.
13549
13550 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
13551
13552         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
13553         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
13554         ascertaining primaryness.
13555         (G): Remove template_args.
13556         (decl_is_template_id): New function.
13557         (write_encoding): Use decl_is_template_id.
13558         (write_name): Likewise.  Handle type_decls.  Get main variant of
13559         type decls.
13560         (write_nested_name): Likewise.
13561         (write_prefix): Likewise.
13562         (write_template_prefix): Likewise.
13563         (write_special_name_constructor): Remove defunct production from
13564         comment.
13565         (write_bare_function_type): Remove comment about absent parameter.
13566         (write_template_template_arg): Add missing grammar production to
13567         comment.
13568
13569 2000-07-27  Jason Merrill  <jason@redhat.com>
13570
13571         * decl.c (duplicate_decls): If common_type produces a non-typedef
13572         type for a typedef, just use the old type.
13573
13574 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
13575
13576         * cp-tree.h (function_depth): Declare.
13577         (verify_stmt_tree): Likewise.
13578         (find_tree): Likewise.
13579         * decl.c (function_depth): Give it external linkage.
13580         * optimize.c (optimize_function): Increment and decrement it.
13581         * tree.c (verify_stmt_tree_r): New function.
13582         (verify_stmt_tree): Likewise.
13583         (find_tree_r): Likewise.
13584         (find_tree): Likewise.
13585
13586 2000-07-27  Jason Merrill  <jason@redhat.com>
13587
13588         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
13589         TYPE_PTRMEMFUNC_P.
13590         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
13591
13592 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
13593
13594         * decl.c (start_cleanup_fn): Mark the function as `inline'.
13595         * decl2.c (get_guard): Call cp_finish_decl, not
13596         rest_of_decl_compilation, for local guards.
13597         * lex.c (do_identifier): Remove unused variable.
13598
13599 2000-07-26      Marc Espie <espie@cvs.openbsd.org>
13600
13601         * parse.y:  Add missing ';'.
13602
13603 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
13604
13605         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
13606         of `extern "C++"'.
13607
13608 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
13609
13610         Kill strict_prototype. Backwards compatibility only for
13611         non NO_IMPLICIT_EXTERN_C systems.
13612         * cp-tree.h (flag_strict_prototype): Remove.
13613         (strict_prototype): Remove.
13614         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
13615         * decl.c (maybe_push_to_top_level): Adjust.
13616         (pop_from_top_level): Adjust.
13617         (decls_match): Only allow sloppy parm matching for ancient
13618         system headers.
13619         (init_decl_processing): Adjust.
13620         (grokdeclarator): Adjust.
13621         * decl2.c (flag_strict_prototype): Remove.
13622         (strict_prototype): Remove.
13623         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
13624         (lang_f_options): Remove "strict-prototype".
13625         (unsupported-options): Add "strict-prototype".
13626         * lex.c (do_identifier): Adjust.
13627         (do_scoped_id): Adjust.
13628         * parse.y (empty_parms): Adjust.
13629         * class.c (push_lang_context): Adjust.
13630         (pop_lang_context): Adjust.
13631         * typeck.c (comp_target_parms): Adjust.
13632
13633 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
13634
13635         * decl.c (poplevel): Deal with anonymous variables at for scope.
13636         (maybe_inject_for_scope_var): Likewise.
13637
13638 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
13639
13640         * decl.c: Remove all signal handling code, now done in toplev.c.
13641
13642 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
13643
13644         * decl.c (make_rtl_for_nonlocal_decl): Rework.
13645
13646         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
13647         correctly.
13648
13649 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
13650
13651         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
13652         Define my_friendly_assert and my_friendly_abort as macros
13653         which may call friendly_abort.  Prototype friendly abort, not
13654         my_friendly_abort or my_friendly_assert.
13655         * decl.c (signal_catch): Report the signal caught in the error
13656         message.  Call fatal directly.
13657         * typeck2.c (ack, my_friendly_assert): Delete.
13658         (my_friendly_abort): Rename to friendly_abort.  Expect file,
13659         line, and function parameters.  Report the abort code, then
13660         call fancy_abort.  Do not mask an abort if errors have
13661         already occurred.
13662
13663 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
13664
13665         * typeck.c (comp_target_parms): Remove obsolete parameter.
13666         (comp_target_types): Adjust.
13667
13668 2000-07-17  Jason Merrill  <jason@redhat.com>
13669
13670         * typeck.c (mark_addressable): Never set TREE_USED.
13671         * call.c (build_call): Don't abort on calls to library functions
13672         that have been declared normally.
13673
13674         * typeck.c (build_binary_op): Fix grammar in warning.
13675
13676         * exception.cc (__eh_free): Fix prototype.
13677
13678         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
13679
13680         * decl.c (pushdecl): Handle seeing an OVERLOAD in
13681         IDENTIFIER_NAMESPACE_VALUE.
13682
13683 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
13684
13685         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
13686         * method.c (use_thunk): Correct handling of vcall offsets.
13687
13688 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
13689
13690         * .cvsignore: parse.h and parse.c have no cp- prefix.
13691
13692 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
13693
13694         * .cvsignore: New file.
13695
13696 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
13697
13698         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
13699
13700 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
13701
13702         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
13703         * parse.c: Remove.
13704         * parse.h: Likewise.
13705
13706 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
13707
13708         * class.c (layout_class_type): Add pointers to virtual bases after
13709         base classes under the old ABI.
13710
13711 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
13712
13713         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
13714         (finish_continue_stmt): Likewise.
13715         (begin_for_stmt): Remove call to note_level_for_for.
13716         (finish_goto_stmt): Change call from build_min_nt
13717         to build_stmt.
13718         (finish_expr_stmt): Likewise.
13719         (begin_if_stmt): Likewise.
13720         (begin_while_stmt): Likewise.
13721         (finish_while_stmt): Likewise.
13722         (finish_return_stmt): Likewise.
13723         (begin_for_stmt): Likewise.
13724         (finish_for_stmt): Likewise.
13725         (finish_break_stmt): Likewise.
13726         (begin_switch_stmt): Likewise.
13727         (finish_case_label): Likewise.
13728         (genrtl_try_block): Likewise.
13729         (begin_try_block): Likewise.
13730         (begin_handler): Likewise.
13731         (begin_compound_stmt): Likewise.
13732         (finish_asm_stmt): Likewise.
13733         (finish_label_stmt): Likewise.
13734         (add_decl_stmt): Likewise.
13735         (finish_subobject): Likewise.
13736         (finish_decl_cleanup): Likewise.
13737         (finish_named_return_value): Likewise.
13738         (setup_vtbl_ptr): Likewise.
13739         (add_scope_stmt): Likewise.
13740         * decl.c (finish_constructor_body): Likewise.
13741         (finish_destructor_body): Likewise.
13742         * optimize.c (copy_body_r): Likewise.
13743         (initialize_inlined_parameters): Likewise.
13744         (declare_return_variable): Likewise.
13745         (expand_call_inline): Likewise.
13746
13747 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
13748
13749         * semantics.c (expand_body): Sync interface information
13750         at the end of function body expansion.
13751
13752 2000-07-09  Jason Merrill  <jason@redhat.com>
13753
13754         * init.c (build_new_1): Bail early if the call to new fails.
13755
13756         * decl.c (compute_array_index_type): Check specifically for
13757         an INTEGER_CST, not just TREE_CONSTANT.
13758
13759         * decl.c (duplicate_decls): Don't call duplicate_decls on
13760         the DECL_TEMPLATE_RESULT.
13761         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
13762         codes.
13763
13764         * error.c (dump_template_bindings): Don't crash if we had an
13765         invalid argument list.
13766
13767         * typeck.c (c_expand_start_case): Do narrowing here.
13768         * semantics.c (finish_switch_cond): Not here.
13769
13770 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
13771
13772         * parse.y (asm_clobbers): Do string concatenation.
13773
13774 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
13775
13776         * decl.c (pushtag): Don't put local classes in template functions
13777         on the local_classes list.
13778
13779 2000-07-04  Scott Snyder  <snyder@fnal.gov>
13780
13781         * decl2.c (get_guard): Add missing return for old ABI local
13782         variable case.
13783
13784 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
13785
13786         * cp-tree.h (char_type_p): New function.
13787         * decl.c (init_decl_processing): Don't initialize
13788         signed_wchar_type_node or unsigned_wchar_type_node.
13789         (complete_array_type): Handle brace-enclosed string-constants.
13790         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
13791         * tree.c (char_type_p): New function.
13792         * typeck2.c (digest_init): Use char_type_p.
13793
13794 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
13795
13796         * pt.c (tsubst): Don't layout type, if it's error_mark.
13797
13798 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
13799
13800         * pt.c (instantiate_pending_templates): Reset template level.
13801
13802 2000-07-05  Jason Merrill  <jason@redhat.com>
13803
13804         * call.c (joust): Don't complain about `operator char *()' beating
13805         `operator const char *() const'.
13806
13807 2000-07-04  scott snyder  <snyder@fnal.gov>
13808             Jason Merrill  <jason@redhat.com>
13809
13810         * repo.c (repo_get_id): Handle the case where a class with virtual
13811         bases has a null TYPE_BINFO_VTABLE.
13812
13813 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
13814             Jason Merrill  <jason@redhat.com>
13815
13816         * parse.y (member_init): Just pass in the type.
13817         * init.c (expand_member_init): Handle getting a type.
13818
13819 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13820             Jason Merrill  <jason@redhat.com>
13821
13822         * decl.c (finish_function): Warn if a function has no return
13823         statement.
13824         Suggested by Andrew Koenig.
13825         * typeck.c (check_return_expr): Do set current_function_returns_value
13826         if we got an error_mark_node.
13827
13828 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
13829
13830         * decl2.c (push_decl_namespace): Push the original namespace.
13831
13832 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
13833
13834         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
13835         * semantics.c (begin_class_definition): Clear it.
13836
13837 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
13838
13839         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
13840         (genrtl_expr_stmt): Likewise.
13841         (genrtl_decl_stmt): Likewise.
13842         (genrtl_if_stmt): Likewise.
13843         (genrtl_while_stmt): Likewise.
13844         (genrtl_do_stmt): Likewise.
13845         (genrtl_return_stmt): Likewise.
13846         (genrtl_for_stmt): Likewise.
13847         (genrtl_break_stmt): Likewise.
13848         (genrtl_continue_stmt): Likewise.
13849         (genrtl_scope_stmt): Likewise.
13850         (genrtl_switch_stmt): Likewise.
13851         (genrtl_case_label): Likewise.
13852         (genrtl_begin_compound_stmt): Likewise.
13853         (genrtl_finish_compound_stmt): Likewise.
13854         (genrtl_compound_stmt): Likewise.
13855         (genrtl_asm_stmt): Likewise.
13856
13857         * init.c (begin_init_stmts): Remove call to
13858         genrtl_begin_compound_stmt.
13859         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
13860
13861         * semantics.c (lang_expand_stmt): Changed call to
13862         genrtl_compound_stmt to ignore return value.
13863
13864 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
13865
13866         * mangle.c (canonicalize_for_substitution): Return the canonical
13867         variant of a type.
13868
13869         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
13870         TYPE_DECL.
13871         * typeck.c (commonparms): Remove obstack manipulations.
13872
13873 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
13874
13875         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
13876
13877         * Makefile.in (OBJS): Added ../c-semantics.o.
13878         (OBJDEPS): Likewise.
13879
13880         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
13881         ../c-common.h.
13882         (struct stmt_tree): Added comment.
13883         (current_function_name_declared): Removed.
13884         (stmts_are_full_exprs_p): Likewise.
13885         (genrtl_do_pushlevel): Likewise.
13886         (genrtl_clear_out_block): Likewise.
13887         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
13888         (DECL_ANON_UNION_ELEMS): Likewise.
13889         (emit_local_var): Likewise.
13890         (make_rtl_for_local_static): Likewise.
13891         (do_case): Likewise.
13892         (expand_stmt): Likewise.
13893         (genrtl_decl_cleanup): Likewise.
13894         (c_expand_asm_operands): Likewise.
13895         (c_expand_return): Likewise.
13896         (c_expand_start_case): Likewise.
13897
13898         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
13899         (emit_local_var): Likewise.
13900         (initialize_local_var): Change reference to
13901         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
13902         Change reference to stmts_are_full_exprs_p to
13903         current_stmt_tree->stmts_are_full_exprs_p.
13904         (push_cp_function_context): Likewise.
13905
13906         * expect.c (expand_throw): Change reference to
13907         stmts_are_full_exprs_p.
13908
13909         * init.c (build_aggr_init): Change reference to
13910         stmts_are_full_exprs_p.
13911         (build_vec_init): Likewise.
13912
13913         * optimize.c (maybe_clone_body): Change reference to
13914         current_function_name_declared to
13915         cp_function_chain->name_declared.
13916
13917         * pt.c (instantiate_decl): Change reference to
13918         current_function_name_declared to
13919         cp_function_chain->name_declared.
13920
13921         * semantics.c (expand_cond): Moved declaration to c-common.h.
13922         (genrtl_do_pushlevel): Moved to c-semantics.c.
13923         (genrtl_clear_out_block): Likewise.
13924         (genrtl_goto_stmt): Likewise.
13925         (genrtl_expr_stmt): Likewise.
13926         (genrtl_decl_stmt): Likewise.
13927         (gerntl_if_stmt): Likewise.
13928         (genrtl_while_stmt): Likewise.
13929         (genrtl_do_stmt): Likewise.
13930         (genrtl_return_stmt): Likewise.
13931         (genrtl_for_stmt): Likewise.
13932         (genrtl_break_stmt): Likewise.
13933         (genrtl_continue_stmt): Likewise.
13934         (genrtl_scope_stmt): Likewise.
13935         (genrtl_switch_stmt): Likewise.
13936         (genrtl_case_label): Likewise.
13937         (genrtl_begin_compound_stmt): Likewise.
13938         (genrtl_finish_compound_stmt): Likewise.
13939         (genrtl_compound_stmt): Likewise.
13940         (genrtl_asm_stmt): Likewise.
13941         (genrtl_decl_cleanup): Likewise.
13942         (expand_cond): Likewise.
13943         (expand_stmt): Renamed to ...
13944         (lang_expand_stmt): ... this.
13945         (lang_expand_expr_stmt): Initialize.
13946         (set_current_function_name_declared): Likewise.
13947         (stmts_are_full_exprs_p): Likewise.
13948         (current_function_name_declared): Likewise.
13949         (anon_aggr_type_p): Likewise.
13950         (do_poplevel): Change reference to
13951         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
13952         Change reference to stmts_are_full_exprs_p to
13953         current_stmt_tree->stmts_are_full_exprs_p.
13954         (add_tree): Likewise.
13955         (finish_expr_stmt): Likewise.
13956         (prep_stmt): Likewise.
13957         (lang_expand_stmt): Likewise.
13958         (begin_compound_stmt): Change reference to
13959         current_function_name_declared to
13960         cp_function_chain->name_declared and call to
13961         current_function_name_declared().
13962         (setup_vtbl_ptr): Likewise.
13963         (genrtl_do_poplevel): Removed.
13964
13965 2000-06-30  Jason Merrill  <jason@redhat.com>
13966
13967         * init.c (init_init_processing): Go back to aligning like
13968         double_type_node for old ABI.
13969         (get_cookie_size): Make cookie larger if we get a type that needs
13970         more alignment.
13971         (build_vec_delete): Call it.
13972
13973         * typeck.c (qualify_type_recursive): New fn.
13974         (composite_pointer_type): Use it.
13975         (build_binary_op): Use composite_pointer_type.
13976
13977 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
13978             Jason Merrill  <jason@redhat.com>
13979
13980         * typeck.c (check_return_expr): Don't complain about returning
13981         NULL from operator new if -fcheck-new.
13982         * cp-tree.h: Declare flag_check_new here.
13983         * init.c: Not here.
13984
13985 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
13986
13987         * mangle.c (find_substitution): Use same_type_p.
13988         (write_encoding): Don't check for substitutions.
13989
13990 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
13991
13992         * parse.y (expr_no_comma_rangle): New non-terminal.
13993         (template_parm): Use it for default parameter case.
13994         (template_arg): Use it.
13995         (expr_no_commas): Remove commented out undefined extensions.
13996         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
13997         * parse.h, parse.c: Rebuilt.
13998
13999 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
14000
14001         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
14002         (finish_asm_stmt): Do it here, instead.
14003
14004         * cp-tree.h (ridpointers): Don't declare.
14005         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
14006         (record_builtin_java_type): Likewise.
14007         (init_decl_processing): Likewise.
14008         * lex.c: Move inclusion of lex.h.
14009         (ridpointers): Don't define.
14010         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
14011         RID_MAX.
14012         * lex.h (enum rid): Rename to ...
14013         (enum cp_rid): ... this.
14014         (ridpointers): Don't declare.
14015         * parse.y: Move inclusion of lex.h.
14016         * parse.c: Regenerated.
14017         * spew.c: Move inclusion of lex.h.
14018
14019         * cp-tree.h (struct language_function): Remove temp_name_counter.
14020         (temp_name_counter): Remove.
14021         (get_temp_name): Change prototype.
14022         (get_guard): New function.
14023         (get_guard_cond): Likewise.
14024         (set_guard): Likewise.
14025         * cvt.c (build_up_reference): Adjust call to get_temp_name.
14026         * decl.c (expand_static_init): Use get_guard and friends to
14027         implement guard variables.
14028         * decl2.c (get_temp_name): Assume that the variables created are
14029         always static.
14030         (get_sentry): Rename to ...
14031         (get_guard): ... this.  Implement new ABI guard variables.
14032         (get_guard_bits): New function.
14033         (get_guard_cond): Likewise.
14034         (set_guard): Likewise.
14035         (start_static_initialization_or_destruction): Use them.
14036         (do_static_initialization): Replace sentry with guard throughout.
14037         (do_static_destruction): Likewise.
14038         * init.c (create_temporary_var): Add comment.
14039
14040 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
14041
14042         * mangle.c (find_substitution): Use same_type_p.
14043         (write_encoding): Don't check for substitutions.
14044
14045 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
14046
14047         * parse.y (expr_no_comma_rangle): New non-terminal.
14048         (template_parm): Use it for default parameter case.
14049         (template_arg): Use it.
14050         (expr_no_commas): Remove commented out undefined extensions.
14051         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
14052         * parse.h, parse.c: Rebuilt.
14053
14054 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
14055
14056         * cp-tree.h (flag_const_strings): Remove.
14057         (warn_parentheses): Likewise.
14058         (warn_format): Likewise.
14059         (common_type): Likewise.
14060         (default_conversion): Likewise.
14061         (build_binary_op): Likewise.
14062         (cp_build_binary_op): New macro.
14063         * call.c (build_new_op): Use cp_build_binary_op instead of
14064         build_binary_op.
14065         * class.c (build_vtable_entry_ref): Likewise.
14066         * decl.c (expand_static_init): Likewise.
14067         (compute_array_index_type): Likewise.
14068         (build_enumerator): Likewise.
14069         * decl2.c (delete_sanity): Likewise.
14070         (start_static_initialization_or_destruction): Likewise.
14071         * error.c (dump_type_suffix): Likewise.
14072         * init.c (resolve_offset_ref): Likewise.
14073         (build_new): Likewise.
14074         (build_new_1): Likewise.
14075         (build_vec_delete_1): Likewise.
14076         (build_vec_init): Likewise.
14077         (build_delete): Likewise.
14078         * rtti.c (synthesize_tinfo_fn): Likewise.
14079         (synthesize_tinfo_var): Likewise.
14080         * search.c (expand_upcast_fixups): Likewise.
14081         (fixup_all_virtual_upcast_offsets): Likewise.
14082         * typeck.c (build_array_ref): Likewise.
14083         (get_member_function_from_ptrfunc): Likewise.
14084         (build_binary_op): Add parameter.
14085         (pointer_int_sum): Use cp_build_binary_op.
14086         (pointer_diff): Likewise.
14087         (build_modify_expr): Likewise.
14088         (get_delta_difference): Likewise.
14089         (build_ptrmemfunc): Likewise.
14090
14091 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
14092
14093         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
14094         * decl.c (create_implicit_typedef): Adjust.
14095         * decl2.c (build_artificial_parm): Adjust.
14096         * method.c (implicitly_declare_fn): Adjust.
14097         * pt.c (push_inline_template_parms_recursive): Adjust.
14098         (process_template_parm): Adjust.
14099         (overloaded_template_name): Adjust.
14100         * semantics.c (finish_template_template_parm): Adjust.
14101
14102 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
14103
14104         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
14105         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
14106         where to emit thunks.
14107         (build_vtt): Adjust call to build_vtt_inits.
14108         (build_vtt_inits): Add parameter to indicate whether or not
14109         sub-VTTs for virtual bases should be included.  Adjust handling of
14110         construction vtables.
14111         (get_matching_base): New function.
14112         (dfs_build_vtt_inits): Rename to ...
14113         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
14114         construction vtables.
14115         (dfs_fixup_binfo_vtbls): Likewise.
14116         (build_ctor_vtbl_groups): Build construction vtables for virtual
14117         bases, too.
14118         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
14119         to build construction vtbls.
14120         (dfs_accumulate_vtbl_inits): Adjust handling of
14121         construction vtables.
14122
14123         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
14124         types correctly.
14125
14126 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
14127
14128         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
14129
14130 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
14131
14132         * search.c (hides): Remove.
14133         (is_subobject_of_p): Add most_derived parameter. Use
14134         CANONICAL_BINFO.
14135         (lookup_field_queue_p): Adjust.
14136         (lookup_field_r): Adjust.
14137
14138 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
14139
14140         * decl2.c (handle_class_head): Bash typedefs to the type's main
14141         decl.
14142
14143 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
14144
14145         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
14146         (begin_global_stmt_expr): ... this.
14147         (genrtl_finish_stmt_expr): Rename to ...
14148         (finish_global_stmt_expr): ... this.
14149         * init.c (begin_init_stmts): Adjust calls.
14150         (finish_init_stmts): Likewise.
14151         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
14152         (begin_global_stmt_expr): ... this.
14153         (genrtl_finish_stmt_expr): Rename to ...
14154         (finish_global_stmt_expr): ... this.
14155
14156 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14157
14158         * search.c (lookup_member): Fix typo in comment.
14159
14160 2000-06-24  Jason Merrill  <jason@redhat.com>
14161
14162         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
14163         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
14164
14165 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14166
14167         * parse.y (complex_direct_notype_declarator): Support global_scope.
14168         * Makefile.in: Adjust conflict count.
14169
14170 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14171
14172         * parse.y (template_arg): Convert TEMPLATE_DECL
14173         that is a template template parameter to
14174         TEMPLATE_TEMPLATE_PARM here.
14175
14176         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
14177         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
14178         (copy_template_template_parm): Adjust prototype.
14179         * decl.c (grokdeclarator): Remove dead code.
14180         * pt.c (process_template_parm): Tidy.
14181         (lookup_template_class): Construct nodes in
14182         copy_template_template_parm.
14183         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
14184         lookup_template_class.  Use TYPE_TI_TEMPLATE.
14185         * tree.c (copy_template_template_parm): Add NEWARGS
14186         parameter.
14187         (mapcar): Adjust call to copy_template_template_parm.
14188         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
14189         * method.c (build_template_template_parm_names): Change error
14190         code to avoid compilation warning.
14191
14192         * gxxint.texi: Document template template parameter
14193         name mangling.
14194
14195 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
14196
14197         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
14198         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
14199         (cp-demangle.o): New rule.
14200         (dyn-string.o): Likewise.
14201         * inc/cxxabi.h (__cxa_demangle): New declaration.
14202
14203 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
14204
14205         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
14206         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
14207         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
14208         a tree, not an int.
14209         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
14210         (make_thunk): Change prototype.
14211         (emit_thunk): Rename to use_thunk.
14212         (mangle_thunk): Change prototype.
14213         * class.c (get_derived_offset): Simplify.
14214         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
14215         BV_GENERATE_THUNK_WITH_VTABLE_P.
14216         (build_primary_vtable): Simplify.
14217         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
14218         (dfs_find_base): Remove.
14219         (update_vtable_entry_for_fn): Correct bug in finding the base
14220         where a virtual function was first declared.  Figure out whether
14221         or not to emit a vcall-thunk with the vtables in which it appears.
14222         Correct logic for deciding whether to use an ordinary thunk, or a
14223         vcall thunk.
14224         (finish_struct_1): Remove unnecssary code.
14225         (build_vtbl_initializer): Use ssize_int for the running counter of
14226         negative indices.
14227         (build_vtbl_initializer): Only use vcall thunks where necessary.
14228         Mark thunks as needing to be emitted with their vtables, or not.
14229         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
14230         indices.  Use size_binop.
14231         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
14232         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
14233         size_binop.
14234         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
14235         (build_vtable_entry): Mark thunks as needing to be emitted with
14236         their vtables, or not.
14237         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
14238         * decl2.c (mark_vtable_entries): Use use_thunk instead of
14239         emit_thunk.
14240         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
14241         information.
14242         * error.c (dump_expr): Use BV_FN.
14243         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
14244         not an int.
14245         * method.c (make_thunk): Likewise.
14246         (emit_thunk): Rename to use_thunk.  Allow callers to decide
14247         whether or not to actually emit the thunk.  Adjust for changes in
14248         representation of vcall offsets.
14249         * search.c (dfs_get_pure_virtuals): Use BV_FN.
14250         * semantics.c (emit_associated_thunks): New function.
14251         (expand_body): Use it.
14252         * ir.texi: Adjust decriptions of thunks.
14253
14254 2000-06-22  Jason Merrill  <jason@redhat.com>
14255
14256         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
14257         (tsubst_friend_function): Copy it here.
14258
14259         * decl.c (grok_op_properties): Fix typo.
14260
14261         * decl2.c (delete_sanity): Clarify warning, avoid failure on
14262         deleting void*.
14263
14264         * pt.c (check_explicit_specialization): Clarify error.
14265
14266         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
14267         an old OVERLOAD when we're declaring a non-function.
14268         (pushdecl, destroy_local_var): Check for error_mark_node.
14269         (warn_extern_redeclared_static): Also bail early if
14270         we're a CONST_DECL.
14271         (push_overloaded_decl): Ignore an old error_mark_node.
14272
14273 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
14274
14275         * call.c (build_x_va_arg): Check if in a template decl.
14276         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
14277
14278 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14279
14280         * class.c (push_lang_context): TYPE_NAME gets you to the Java
14281         types DECLs.
14282         * decl.c (check_goto): Computed gotos assumed OK.
14283
14284 2000-06-20  Jason Merrill  <jason@redhat.com>
14285
14286         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
14287         for which we don't need to look for instantiations.
14288
14289 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
14290
14291         * parse.y (program): Always call finish_translation_unit.
14292         * parse.c, parse.h: Rebuilt.
14293
14294 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
14295
14296         * method.c: Don't include hard-reg-set.h.
14297
14298 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
14299
14300         * rtti.c (get_base_offset): Cope when vbase field is in a base.
14301
14302 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
14303
14304         * call.c (build_conditional_expr): Use VOID_TYPE_P.
14305         * cvt.c (cp_convert_to_pointer): Likewise.
14306         (convert_to_void): Likewise.
14307         * error.c (dump_expr): Likewise.
14308         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
14309         * init.c (build_delete): Likewise.
14310         * method.c (emit_thunk): Likewise.
14311         * optmize.c (declare_return_variable): Likewise.
14312         * rtti.c (get_tinfo_decl_dynamic): Likewise.
14313         (get_typeid): Likewise.
14314         (build_dynamic_cast_1): Likewise.
14315         * typeck.c (composite_pointer_type): Likewise.
14316         (common_type): Likewise.
14317         (build_indirect_ref): Likewise.
14318         (build_binary_op): Likewise.
14319         (build_x_compound_expr): Likewise.
14320         (check_return_expr): Likewise.
14321         * typeck2.c (add_exception_specifier): Likewise.
14322
14323         * mangle.c (write_method_parms): Use direct comparison for end
14324         of parmlist.
14325
14326 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
14327
14328         * cp-tree.h (genrtl_try_block): Declare function.
14329         (genrtl_handler): Likewise.
14330         (genrtl_catch_block): Likewise.
14331         (genrtl_ctor_stmt): Likewise.
14332         (genrtl_subobject): Likewise.
14333         (genrtl_decl_cleanup): Likewise.
14334         (genrtl_do_poplevel): Likewise.
14335         (genrtl_do_pushlevel): Likewise.
14336         (genrtl_clear_out_block): Likewise.
14337         (genrtl_goto_stmt): Likewise.
14338         (genrtl_expr_stmt): Likewise.
14339         (genrtl_decl_stmt): Likewise.
14340         (genrtl_if_stmt): Likewise.
14341         (genrtl_while_stmt): Likewise.
14342         (genrtl_do_stmt): Likewise.
14343         (genrtl_return_stmt): Likewise.
14344         (genrtl_for_stmt): Likewise.
14345         (genrtl_break_stmt): Likewise.
14346         (genrtl_continue_stmt): Likewise.
14347         (genrtl_scope_stmt): Likewise.
14348         (genrtl_switch_stmt): Likewise.
14349         (genrtl_case_label): Likewise.
14350         (genrtl_begin_compound_stmt): Likewise.
14351         (genrtl_finish_compound_stmt): Likewise.
14352         (genrtl_compound_stmt): Likewise.
14353         (genrtl_asm_stmt): Likewise.
14354         (genrtl_named_return_value): Likewise.
14355         (genrtl_begin_stmt_expr): Likewise.
14356         (genrtl_finish_stmt_expr): Likewise.
14357         (finish_for_stmt): Removed first argument.
14358         (finish_switch_stmt): Likewise.
14359
14360         * semantics.c (genrtl_try_block): Define function.
14361         (genrtl_handler): Likewise.
14362         (genrtl_catch_block): Likewise.
14363         (genrtl_ctor_stmt): Likewise.
14364         (genrtl_subobject): Likewise.
14365         (genrtl_decl_cleanup): Likewise.
14366         (genrtl_do_poplevel): Likewise.
14367         (genrtl_do_pushlevel): Likewise.
14368         (genrtl_clear_out_block): Likewise.
14369         (genrtl_goto_stmt): Likewise.
14370         (genrtl_expr_stmt): Likewise.
14371         (genrtl_decl_stmt): Likewise.
14372         (genrtl_if_stmt): Likewise.
14373         (genrtl_while_stmt): Likewise.
14374         (genrtl_do_stmt): Likewise.
14375         (genrtl_return_stmt): Likewise.
14376         (genrtl_for_stmt): Likewise.
14377         (genrtl_break_stmt): Likewise.
14378         (genrtl_continue_stmt): Likewise.
14379         (genrtl_scope_stmt): Likewise.
14380         (genrtl_switch_stmt): Likewise.
14381         (genrtl_case_label): Likewise.
14382         (genrtl_begin_compound_stmt): Likewise.
14383         (genrtl_finish_compound_stmt): Likewise.
14384         (genrtl_compound_stmt): Likewise.
14385         (genrtl_asm_stmt): Likewise.
14386         (genrtl_named_return_value): Likewise.
14387         (genrtl_begin_stmt_expr): Likewise.
14388         (genrtl_finish_stmt_expr): Likewise.
14389         (finish_for_stmt): Removed first argument and generate rtl
14390         specific code.
14391         (finish_switch_stmt): Likewise.
14392         (do_poplevel): Removed generate rtl specific code.
14393         (do_pushlevel): Likewise.
14394         (add_tree): Likewise.
14395         (finish_goto_stmt): Likewise.
14396         (finish_expr_stmt): Likewise.
14397         (begin_if_stmt): Likewise.
14398         (finish_if_stmt_cond): Likewise.
14399         (finish_then_clause): Likewise.
14400         (begin_else_clause): Likewise.
14401         (finish_else_clause): Likewise.
14402         (finish_if_stmt): Likewise.
14403         (clear_out_block): Likewise.
14404         (begin_while_stmt): Likewise.
14405         (finish_while_stmt_cond): Likewise.
14406         (finish_while_stmt): Likewise.
14407         (begin_do_stmt): Likewise.
14408         (finish_do_body): Likewise.
14409         (finish_do_stmt): Likewise.
14410         (finish_return_stmt): Likewise.
14411         (begin_for_stmt): Likewise.
14412         (finish_for_init_stmt): Likewise.
14413         (finish_for_cond): Likewise.
14414         (finish_for_expr): Likewise.
14415         (finish_break_stmt): Likewise.
14416         (finish_continue_stmt): Likewise.
14417         (begin_switch_stmt): Likewise.
14418         (finish_switch_cond): Likewise.
14419         (finish_case_label): Likewise.
14420         (begin_try_block): Likewise.
14421         (begin_function_try_block): Likewise.
14422         (finish_try_block): Likewise.
14423         (finish_cleanup_try_block): Likewise.
14424         (finish_cleanup): Likewise.
14425         (finish_function_try_block): Likewise.
14426         (finish_handler_sequence): Likewise.
14427         (finish_function_handler_sequence): Likewise.
14428         (begin_handler): Likewise.
14429         (finish_handler_parms): Likewise.
14430         (begin_catch_block): Likewise.
14431         (finish_handler): Likewise.
14432         (begin_compound_stmt): Likewise.
14433         (finish_compound_stmt): Likewise.
14434         (finish_asm_stmt): Likewise.
14435         (finish_label_stmt): Likewise.
14436         (finish_label_decl): Likewise.
14437         (finish_subobject): Likewise.
14438         (finish_decl_cleanup): Likewise.
14439         (finish_named_return_value): Likewise.
14440         (begin_stmt_expr): Likewise.
14441         (finish_stmt_expr): Likewise.
14442
14443         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
14444         to call genrtl_expr_stmt when appropriate.
14445
14446         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
14447         begin_compound_expr to call genrtl_begin_stmt_expr and
14448         genrtl_begin_compound_expr when appropriate.
14449         (finish_init_stmts): Changed calls to finish_compound_expr and
14450         finish_stmt_expr to call genrtl_finish_compound_expr and
14451         genrtl_finish_stmt_expr when appropriate.
14452         (expand_default_init): Changed call to finish_expr_stmt to call
14453         genrtl_expr_stmt when appropriate.
14454         (build_vec_init): Likewise.
14455
14456         * parse.y (simple_stmt): Removed first argument from call to
14457         finish_for_stmt. Removed first argument from call to
14458         finish_switch_stmt.
14459
14460         * parse.c: Regenerated.
14461
14462         * pt.c (tsubst_expr): Removed first argument from call to
14463         finish_for_stmt. Removed first argument from call to
14464         finish_switch_stmt.
14465
14466 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
14467
14468         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
14469         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
14470
14471         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
14472         (cplus_tree_code_length[]): Likewise.
14473         (cplus_tree_code_name[]): Likewise.
14474         (init_parse): Added call to add_c_tree_codes. Changed
14475         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
14476
14477 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
14478
14479         * cp-tree.h (finish_mem_initializers): Declare.
14480         (count_trees): Likewise.
14481         * parse.y (base_init): Use finish_mem_initializers.
14482         * semantics.c (finish_mem_initializers): New function.
14483
14484         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
14485         the number of trees.
14486         (n_trees): Remove.
14487         (count_trees): Don't use it.
14488
14489 2000-06-15  Jason Merrill  <jason@redhat.com>
14490
14491         * tree.c (count_trees): New debugging function.
14492
14493         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
14494         * init.c (build_member_call): Pull out the name of a DECL.
14495
14496         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
14497         * semantics.c (expand_body): Push to TV_INTEGRATION here.
14498         * optimize.c (optimize_function): Not here.
14499         * pt.c (instantiate_decl): Push to TV_PARSE.
14500
14501 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
14502
14503         * cp-tree.h (struct language_function): Remove x_base_init_list
14504         and x_member_init_list.
14505         (current_base_init_list): Remove.
14506         (current_member_init_list): Likewise.
14507         (setup_vtbl_ptr): Change prototype.
14508         (emit_base_init): Likewise.
14509         (expand_member_init): Likewise.
14510         (reinit_parse_for_function): Remove.
14511         * decl.c (save_function_data): Don't clear x_base_init_list and
14512         x_member_init_list.
14513         (mark_language_function): Don't mark them.
14514         * init.c (perform_member_init): Tweak comment.
14515         (sort_member_init): Take the list of initializers as an argument.
14516         (sort_base_init): Likewise.
14517         (emit_base_init): Likewise.
14518         (expand_member_init): Return the initializer.  Don't use global
14519         variables.
14520         * lex.c (reinit_parse_for_function): Remove.
14521         * method.c (build_template_parm_names): Correct substitution.
14522         (do_build_copy_constructor): Don't use current_member_init_list
14523         and current_base_init_list.
14524         (synthesize_method): Likewise.
14525         * parse.y (base_init): Split mem-initializers into
14526         base-initializers and field-initializers.
14527         (member_init_list): Build up the list here.
14528         (member_init): Return the initializer.
14529         (fn.depfn): Don't use reinit_parse_for_function.
14530         * parse.c: Regenerated.
14531         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
14532         ERROR_MARK.
14533         (tsubst_expr): Don't use current_member_init_list
14534         and current_base_init_list.
14535         (tsubst_expr_values): Rename to ...
14536         (tsubst_initializer_list): ... this.  Use convert_from_reference.
14537         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
14538         and current_base_init_list.
14539         (begin_function_definition): Don't call reinit_parse_for_function.
14540
14541         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
14542
14543         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
14544         correctly.
14545
14546         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
14547
14548 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
14549
14550         * cp-tree.h (IF_COND): Move to c-common.h.
14551         (THEN_CLAUSE): Likewise.
14552         (ELSE_CLAUSE): Likewise.
14553         (WHILE_COND): Likewise.
14554         (WHILE_BODY): Likewise.
14555         (DO_COND): Likewise.
14556         (DO_BODY): Likewise.
14557         (RETURN_EXPR): Likewise.
14558         (EXPR_STMT_EXPR): Likewise.
14559         (FOR_INIT_STMT): Likewise.
14560         (FOR_COND): Likewise.
14561         (FOR_EXPR): Likewise.
14562         (FOR_BODY): Likewise.
14563         (SWITCH_COND): Likewise.
14564         (SWITCH_BODY): Likewise.
14565         (CASE_LOW): Likewise.
14566         (CASE_HIGH): Likewise.
14567         (GOTO_DESTINATION): Likewise.
14568         (COMPOUND_BODY): Likewise.
14569         (ASM_CV_QUAL): Likewise.
14570         (ASM_STRING): Likewise.
14571         (ASM_OUTPUTS): Likewise.
14572         (ASM_INPUTS): Likewise.
14573         (ASM_CLOBBERS): Likewise.
14574         (DECL_STMT_DECL): Likewise.
14575         (STMT_EXPR_STMT): Likewise.
14576         (LABEL_STMT_LABEL): Likewise.
14577         (SCOPE_BEGIN_P): Likewise.
14578         (SCOPE_END_P): Likewise.
14579         (SCOPE_STMT_BLOCK): Likewise.
14580         (SCOPE_NULLIFIED_P): Likewise.
14581         (SCOPE_NO_CLEANUPS_P): Likewise.
14582         (SCOPE_PARTIAL_P): Likewise.
14583         (ASM_VOLATILE_P): Likewise.
14584         (STMT_LINENO): Likewise.
14585         (STMT_LINENO_FOR_FN_P): Likewise.
14586
14587         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
14588         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
14589         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
14590         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
14591         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
14592
14593         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
14594
14595         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
14596         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
14597
14598         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
14599         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
14600         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
14601
14602 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
14603
14604         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
14605         * class.c (dfs_find_final_overrider): Set it appropriately.
14606         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
14607         avoid unneeded secondary vptrs.
14608
14609 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
14610
14611         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
14612         (check_bitfield_decl, check_field_decl): Likewise.
14613         (build_vtbl_or_vbase_field, build_base_field): Likewise.
14614         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
14615         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
14616         (xfer_tag, finish_enum): Likewise.
14617         * decl2.c (finish_builtin_type): Likewise.
14618         * init.c (init_init_processing): Likewise.
14619         * pt.c (instantiate_class_template): Likewise.
14620         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
14621         * cp-tree.h (struct lang_type): Add user_align member.
14622         (CLASSTYPE_USER_ALIGN): Define.
14623
14624 2000-06-13  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
14625
14626         * Make-lang.in (c++.install-common): Install g++-cross in
14627         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
14628         $(target_alias)-g++ and $(target_alias)-c++.
14629
14630 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
14631
14632         * class.c (vcall_offset_data_s): Add last_init and fns.
14633         (overrides): Rename to same_signature_p.
14634         (dfs_find_final_overrider): Adjust accordingly.
14635         (mark_overriders): Likewise.
14636         (warn_hidden): Likewise.
14637         (build_vtbl_initializer): Reorganize machinery for building things
14638         at negative offsets.
14639         (build_vcall_and_vbase_vtbl_entries): Likewise.
14640         (build_vbase_offset_vtbl_entries): Likewise.
14641         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
14642         offset entries.  Do not create two entries for functions with the
14643         same signature.
14644         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
14645         (build_rtti_vtbl_entries): Reorganize machinery for building things
14646         at negative offsets.
14647
14648         * optimize.c (expand_call_inline): Don't recurse into the code
14649         used to initialize the parameters more than once.
14650
14651 2000-06-11  Mark Mitchell <mark@codesourcery.com>
14652
14653         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
14654         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
14655         (find_substitution): Only use the `Sa' substitution for
14656         std::allocator, not instantiations of it.
14657         (write_template_prefix): Move comment.  Only use a TREE_LIST to
14658         represent substitutions for a member template.
14659         (write_array_type): Mangle array dimensions correctly.
14660         * optimize.c (maybe_clone_body): Copy more information from the
14661         cloned function.
14662         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
14663         on the regenerated declaration.
14664
14665 2000-06-11  Chip Salzenberg  <chip@valinux.com>
14666             Mark Mitchell <mark@codesourcery.com>
14667
14668         * class.c (build_vtable): Clarify comment.
14669         (build_ctor_vtbl_group): Pass the most derived type to
14670         build_vtable.
14671
14672 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14673
14674         * decl2.c (compare_options): Don't needlessly cast away const-ness.
14675
14676 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
14677
14678         * decl.c (add_binding): Handle duplicate declarations of external
14679         variables.
14680
14681 2000-06-09  Chip Salzenberg  <chip@valinux.com>
14682             Mark Mitchell <mark@codesourcery.com>
14683
14684         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
14685         argument.
14686         (write_signed_number): New macro.
14687         (write_unsigned_number): Likewise.
14688         (write_source_name): Use them.
14689         (write_number): Handle signed and unsigned values.
14690         (write_integer_cst): Use tree_int_cst_sgn, and use
14691         write_unsigned_number or write_signed_number as appropriate.
14692         (write_discriminator): Use write_unsigned_number or
14693         write_signed_number as appropriate.
14694         (write_template_arg_literal): Likewise.
14695         (write_array_type): Use tree_low_cst.
14696         (write_template_parm):  Use write_unsigned_number or
14697         write_signed_number as appropriate.
14698         (write_substitution): Adjust call to write_number.
14699         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
14700         (write_expression): Handle non-type template arguments of
14701         reference type correctly.
14702         (mangle_thunk): Use write_signed_number.
14703
14704 2000-06-09  Chip Salzenberg  <chip@valinux.com>
14705
14706         * mangle.c (find_substition): Don't mangle objects with typename
14707         substitutions (e.g. "cin" as "Si").
14708
14709 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
14710
14711         * call.c (add_candidate): Use ggc_alloc_cleared.
14712         * decl.c (lookup_label): Likewise.
14713         * lex.c (retrofit_lang_decl): Likewise.
14714
14715 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
14716
14717         * semantics.c (expand_body): Push to TV_EXPAND.
14718         * optimize.c (optimize_function): Push to TV_INTEGRATION.
14719         * decl.c (start_function): Always call announce_function.
14720
14721         * tinfo2.cc: Just declare abort.
14722
14723 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
14724
14725         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
14726         whenever @ is a symbolic name.
14727
14728 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
14729
14730         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
14731
14732 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
14733
14734         * decl.c (pushdecl): Look up functions by DECL_NAME, not
14735         DECL_ASSEMBLER_NAME.
14736
14737 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
14738
14739         * decl2.c (c_language): Define.
14740
14741 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
14742
14743         * lex.c (lang_init_options): Tweak.
14744
14745         * decl2.c: Remove #inclusion of diagnostic.h
14746         (lang_decode_option): Move diagnostic formatting options to
14747         toplevel.
14748
14749         * lang-options.h: Remove documentation for diagnostic options.
14750
14751         * Makefile.in (lex.o): Depends upon diagnostic.h
14752
14753 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
14754
14755         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
14756         the same DECL_RESULT, it's not a redefinition.
14757         * pt.c (tsubst_decl): Remove code to handle illegal
14758         specializations.
14759
14760 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
14761
14762         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
14763
14764 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
14765
14766         * search.c (maybe_suppress_debug_info): Don't check
14767         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
14768
14769         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
14770         here if extern_p.
14771
14772         Remember instantiation context in deferred instantiations.
14773         * cp-tree.h (struct tinst_level): Remove.
14774         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
14775         * pt.c (current_tinst_level): Now a tree.
14776         (print_template_context, push_tinst_level, pop_tinst_level,
14777         tinst_for_decl): Adjust.
14778         (reopen_tinst_level): New fn.
14779         (init_pt): Register current_tinst_level as a root.
14780         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
14781         of the pending templates list.
14782         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
14783         * lex.c (extract_interface_info): Adjust.
14784         * decl2.c (warn_if_unknown_interface): Adjust.
14785
14786 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
14787
14788         * class.c (indirect_primary_base_p): New function.
14789         (determine_primary_base): Use it.
14790
14791 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
14792
14793         Update new-abi dynamic cast algorithm.
14794         * tinfo.cc (__class_type_info::__dyncast_result): Add
14795         whole_details. Adjust constructor.
14796         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
14797         Avoid unnecessary searching.
14798         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
14799
14800 2000-06-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14801
14802         * decl.c (init_decl_processing): Don't call record_component_aliases.
14803         * tree.c (build_cplus_array_type_1): Likewise.
14804
14805 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
14806
14807         * ir.texi: Correct typo.
14808         * mangle.c (write_expression): Handle non-type template arguments
14809         with reference type.
14810         * method.c (build_overload_value): Likewise.
14811         * pt.c (convert_nontype_argument): Explicitly represent conversion
14812         to a reference with an ADDR_EXPR.
14813         (unify): Always unify arguments in left-to-right order.
14814
14815 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
14816             Mark Mitchell  <mark@codesourcery.com>
14817
14818         * Make-lang.in (CXX_SRCS): Add mangle.c.
14819         * Makefile.in (CXX_OBJS): Add mangle.o.
14820         (mangle.o): New rule.
14821
14822         * class.c (local_classes): New variable.
14823         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
14824         (get_vtt_name): Use mangle_vtt_name for new ABI.
14825         (init_class_processing): Initialize local_classes.
14826         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
14827         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
14828         (std_identifier): New macro.
14829         (DECL_VOLATILE_MEMFUNC_P): New macro.
14830         (DECL_NAMESPACE_STD_P): Likewise.
14831         (local_classes): Declare.
14832         (get_mostly_instantiated_function_type): Declare.
14833         (init_mangle): Declare.
14834         (mangle_decl): Likewise.
14835         (mangle_type_string): Likewise.
14836         (mangle_type): Likewise.
14837         (mangle_typeinfo_for_type): Likewise.
14838         (mangle_typeinfo_string_for_type): Likewise.
14839         (mangle_vtbl_for_type): Likewise.
14840         (mangle_vtt_for_type): Likewise.
14841         (mangle_ctor_vtbl_for_type): Likewise.
14842         (mangle_thunk): Likewise.
14843         (mangle_conv_op_name_for_type): Likewise.
14844         (mangle_guard_variable): Likewise.
14845         * decl.c (pushtag): Keep track of local classes.
14846         (initialize_predefined_identifiers): Initialize std_identifier.
14847         (init_decl_processing): Use std_identifier.
14848         (start_decl): Don't treat instantiations as specializations.
14849         (grokdeclarator): Likewise.
14850         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
14851         name for fully-instantiated templates.
14852         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
14853         destructors with the new ABI.
14854         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
14855         (grokfield): Use mangle_type for new ABI.
14856         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
14857         (get_sentry): Use mangle_guard_variable for new ABI.
14858         (start_static_initialization_or_destruction): Likewise.
14859         * expr.c (extract_aggr_init): Remove.
14860         (extract_scalar_init): Likewise.
14861         (extract_init): Remove #if 0'd code.
14862         * mangle.c: New function.
14863         * method.c (build_mangled_name): Assert not flag_new_abi.
14864         (build_static_name): Likewise.
14865         (build_decl_overload_real): Likewise.
14866         (build_typename_overload): Likewise.
14867         (build_overload_with_type): Likewise.
14868         (build_overload_name): Likewise.
14869         (get_ctor_vtbl_name): Likewise.
14870         (start_squangling): Likewise.
14871         (get_id_2): Likewise.
14872         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
14873         (init_method): Call init_mangle for new ABI.
14874         (make_thunk): Call mangle_thunk for new ABI.
14875         * operators.def: Correct new ABI manglings for the `%' operator.
14876         Add `::' operator.
14877         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
14878         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
14879         (lookup_template_class): Call mangle_decl for new ABI.
14880         (get_mostly_instantiated_function_type): New function.
14881         (set_mangled_name_for_template_decl): Use it.
14882         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
14883         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
14884         conversion op names.
14885         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
14886         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
14887         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
14888         mangle_typeinfo_string_for_type.
14889
14890 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
14891
14892         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
14893         (INNERMOST_TEMPLATE_ARGS): New macro.
14894         (innermost_args): Remove.
14895         (get_innermost_template_args): New function.
14896         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
14897         * error.c (dump_function_decl): Be caution when using
14898         most_general_template.
14899         * method.c (build_template_parm_names):  Use
14900         INNERMOST_TEMPLATE_ARGS.
14901         * pt.c (add_to_template_args): Tidy comment
14902         (get_innermost_template_args): New function.
14903         (check_explicit_specialization): Clear DECL_INITIAL for a new
14904         specialization.
14905         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
14906         Tidy.
14907         (push_template_decl): Always register specializations of the most
14908         general template.
14909         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
14910         (coerce_template_parms): Likewise.
14911         (lookup_template_class): Likewise.
14912         (innermost_args): Remove.
14913         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
14914         (tsubst_decl): Handle tricky specializations.  Use
14915         get_innermost_template_args.
14916         (instantiate_template): Simplify handling of partial
14917         instantiations.
14918         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
14919         (most_general_template): Reimplement, in a more straightforward
14920         manner.
14921         (regenerate_decl_from_template): Tweak formatting.  Use
14922         TMPL_ARGS_DEPTH for clarity.
14923         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
14924
14925         * dump.c (dequeue_and_dump): Dump information about thunks.
14926
14927 2000-06-01  Richard Henderson  <rth@cygnus.com>
14928
14929         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
14930
14931 2000-06-01  Richard Henderson  <rth@cygnus.com>
14932
14933         * decl2.c (unsupported_options): Fix typo, make const.
14934         (lang_decode_option): Fix bsearch argument order.
14935
14936 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
14937
14938         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
14939         on FIELD_DECLs.
14940
14941 2000-05-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14942
14943         * cp-tree.h (c_get_alias_set): Deleted.
14944         * Makefile.in (decl.o): Include ../expr.h.
14945         * decl.c (expr.h): Include.
14946         (init_decl_processing): Call record_component_aliases for arrays.
14947         (grokdeclarator): Likewise.
14948         Set TREE_ADDRESSABLE for fields that aren't bitfields.
14949         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
14950
14951 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
14952
14953         Remove guiding declaration support.
14954         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
14955         (flag_guiding_decls): Remove.
14956         * call.c (build_user_type_conversion_1): Remove support for
14957         guiding decls.
14958         (build_new_function_call): Likewise.
14959         (build_new_op): Likewise.
14960         (build_new_method_call): Likewise.
14961         * decl.c (start_function): Likewise.
14962         * friend.c (is_friend): Likewise.
14963         (do_friend): Likewise.
14964         * decl2.c ((flag_dump_translation_unit): Make it const.
14965         (flag_guiding_decls): Remove.
14966         (unsupported_options): New variable
14967         (compare_options): New function.
14968         (lang_decode_option): Use them.
14969
14970         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
14971
14972         * method.c (mangle_expression): Adjust test for legal expression
14973         operators.
14974
14975         * pt.c (instantiate_decl): Save and restore the local
14976         specializations list.
14977
14978 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
14979
14980         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
14981
14982 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
14983
14984         * call.c (add_template_candidate_real): Handle member template
14985         constructors for classes with virtual bases.
14986         (build_user_type_conversion_1): Use in_charge_arg_for_name.
14987         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
14988
14989         * ir.texi: Update thunk documentation.
14990
14991         * call.c (joust): Fix handling of overloaded builtin operators.
14992
14993 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
14994
14995         * cp-tree.h (DECL_ANTICIPATED): New macro.
14996         Document new use of DECL_LANG_FLAG_7.
14997         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
14998         in the user namespace.
14999         * lex.c (do_identifier): If the identifier's declaration has
15000         DECL_ANTICIPATED on, it has not yet been declared.  But do not
15001         replace it with an ordinary implicit declaration.
15002
15003         * tinfo2.cc: Include stdlib.h.
15004
15005 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
15006
15007         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
15008         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
15009         CLASSTYPE_ALIGN.
15010
15011 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
15012
15013         * decl2.c (lang_decode_option): Use skip_leading_substring instead
15014         of plain strncmp.
15015
15016 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
15017
15018         * operators.def (<?): Duplicated, should have been...
15019         (>?): this.  Fixed.
15020
15021 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
15022             Mark Mitchell  <mark@codesourcery.com>
15023
15024         * cp-tree.h (ansi_opname): Make it a macro.
15025         (ansi_assopname): Likewise.
15026         (struct lang_decl_flags): Add assignment_operator_p.
15027         (struct lang_decl): Add operator_code.
15028         (DECL_VTT_PARM): Adjust.
15029         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
15030         overloaded operator.
15031         (SET_OVERLOADED_OPERATOR_CODE): New macro.
15032         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
15033         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
15034         (opname_tab): Remove.
15035         (assignop_tab): Likewise.
15036         (operator_name_info_t): New type.
15037         (operator_name_info): New variable.
15038         (assignment_operator_name_info): Likewise.
15039         (build_cp_library_fn): Remove declaration.
15040         (push_cp_library_fn): Likewise.
15041         (operator_name_string): Likewise.
15042         (build_decl_overload): Likewise.
15043         * call.c (print_z_candidates): Simplify.
15044         (build_object_call): Adjust usage of ansi_opname.  Use
15045         DECL_OVERLOADED_OPERATOR_P.
15046         (op_error): Adjust operator name lookup.
15047         (build_conditional_expr): Adjust usage of ansi_opname.
15048         (build_new_op): Likewise.
15049         (build_op_delete_call): Likewise.
15050         (build_over_call): Likewise.
15051         (joust): Use DECL_OVERLOADED_OPERATOR_P.
15052         * decl.c (duplicate_decls): Copy operator_code.
15053         (init_decl_processing): Adjust parameters to push_cp_library_fn.
15054         (builtin_function): Adjust parameters to build_library_fn_1.
15055         (build_library_fn_1): Accept an overloaded operator code.
15056         (build_library_fn): Pass ERROR_MARK.
15057         (build_cp_library_fn): Accept an overloaded operator code.
15058         (push_cp_library_fn): Likewise.
15059         (grokfndecl): Tweak.
15060         (grokdeclarator): Simplify code to compute names of overloaded
15061         operators.  Adjust use of ansi_opname.
15062         (ambi_op_p): Work on tree_codes, not identifiers.
15063         (unary_op_p): Likewise.
15064         (grok_op_properties): Likewise.
15065         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
15066         (lang_mark_tree): Don't try to mark the operator_code.
15067         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
15068         * error.c (dump_decl): Remove special handling for operator
15069         names.
15070         (dump_function_name): Likewise.
15071         (dump_expr): Adjust name lookup of operators.
15072         (op_to_string): Simplify.
15073         (assop_to_string): Likewise.
15074         * init.c (build_new_1): Adjust use of ansi_opname.
15075         * lex.c (opname_tab): Remove.
15076         (assignop_tab): Likewise.
15077         (ansi_opname): Likewise.
15078         (ansi_assopname): Likewise.
15079         (operator_name_string): Likewise.
15080         (reinit_lang_specific): Likewise.
15081         (operator_name_info): New variable.
15082         (assignment_operator_name_info): Likewise.
15083         (init_operators): New function.
15084         (init_parse): Use it.
15085         (do_identifier): Adjust use of ansi_opname.
15086         * method.c (mangle_expression): Don't use ansi_opname for
15087         mangling.
15088         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
15089         (build_decl_overload): Remove.
15090         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
15091         (do_build_assign_ref): Adjust use of ansi_opname.
15092         (synthesize_method): Likewise.
15093         (implicitly_declare_fn): Likewise.
15094         * operators.def: New file.
15095         * parse.y (operator): Adjust use of ansi_opname.
15096         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
15097         (set_mangled_name_for_template_decl): Don't play games with
15098         current_namespace.
15099         (special_function_p): Adjust use of ansi_opname.
15100         * typeck.c (check_return_expr): Likewise.
15101         * Make-lang.in (cc1plus): Depend on operators.def.
15102         * Makefile.in (lex.o): Likewise.
15103         (decl.o): Likewise.
15104
15105 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
15106
15107         * Make-lang.in (cplib2.ready): Eradicate.
15108
15109 2000-05-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15110
15111         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
15112         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
15113         (built_min, cp_tree_equal): Likewise.
15114
15115 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
15116
15117         * class.c (layout_nonempty_base_or_field): Replace
15118         `record_layout_info' with `record_layout_info_s'.
15119
15120 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
15121
15122         Fix goto checking.
15123         * cp-tree.h (struct language_function): x_named_labels is now
15124         a struct named_label_list*.
15125         * decl.c (struct named_label_use_list): Renamed from...
15126         (struct named_label_list): ...this.  New struct.
15127         (push_binding_level): Don't set eh_region.
15128         (note_level_for_eh): New fn.
15129         (pop_label): Take label and old value directly.
15130         (pop_labels): Adjust for new named_labels format.
15131         (lookup_label): Likewise.
15132         (poplevel): Note characteristics of a binding level containing a
15133         named label.  Mess with named label lists earlier.
15134         (mark_named_label_lists): New fn.
15135         (mark_lang_function): Call it.
15136         (use_label): New fn, split out from...
15137         (make_label_decl): ...here.  Don't call it.
15138         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
15139         check_previous_gotos): New fns, split out from...
15140         (define_label): ...here.
15141         (check_switch_goto): New fn.
15142         (define_case_label): Call it.
15143         (check_goto): New fn.
15144         * semantics.c (finish_goto_stmt): Call it and use_label.
15145         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
15146         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
15147
15148 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
15149
15150         * class.c (build_vtable_entry_ref): Correct usage of
15151         get_vtbl_decl_for_binfo.
15152
15153         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
15154         * method.c (implicitly_declare_fn): Not here.
15155
15156 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
15157
15158         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
15159         (CPTI_PTMD_DESC_TYPE): ... here.
15160         (ptmd_desc_type_node): Rename to ...
15161         (ptm_desc_type_node): ... here.
15162         * decl.c: Likewise.
15163         * rtti.c (ptmd_initializer): Rename to ...
15164         (ptm_initializer): ... here.
15165         (sythesize_tinfo_var): Adjust. Deal with pointer to member
15166         function.
15167         (create_tinfo_types): Adjust.
15168
15169 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
15170
15171         Finish implementation of VTTs.
15172         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
15173         CPTI_VTT_PARM_IDENTIFIER.
15174         (vtt_parm_identifier): New macro.
15175         (vtt_parm_type): Likewise.
15176         (BINFO_SUBVTT_INDEX): Likewise.
15177         (BINFO_VPTR_INDEX): Likewise.
15178         (struct lang_decl): Add vtt_parm.
15179         (DECL_VTT_PARM): New macro.
15180         (DECL_USE_VTT_PARM): Likewise.
15181         (DECL_NEEDS_VTT_PARM_P): Likewise.
15182         (get_vtt_name): Declare.
15183         (build_artificial_parm): Likewise.
15184         (fixup_all_virtual_upcast_offsets): Likewise.
15185         (expand_indirect_vtbls_init): Remove.
15186         * call.c (build_new_method_call): Pass the vtt to subobject
15187         constructors and destructors.
15188         * class.c (get_vtt_name): Give it external linkage.
15189         (build_clone): Handle the magic VTT parameters for clones.
15190         (clone_function_decl): Fix typo in comment.
15191         (build_vtt): Keep track of the indices in the VTTs where various
15192         entities are stored.
15193         (build_vtt_inits): Likewise.
15194         (dfs_build_vtt_inits): Likewise.
15195         (build_ctor_vtbl_group): Tweak type of construction vtables.
15196         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
15197         primary bases, when building construction vtables.
15198         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
15199         (initialize_predefined_identifiers): Add vtt_parm_identifier.
15200         (init_decl_processing): Initialize vtt_parm_type.
15201         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
15202         (lang_mark_tree): Make vtt_parm.
15203         * decl2.c (build_artificial_parm): New function.
15204         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
15205         (grokclassfn): Use build_artificial_parm.
15206         * init.c (initialize_vtbl_ptrs): Call
15207         fixup_all_virtual_upcast_offsets directly.
15208         (perform_member_init): Use the complete subobject destructor for
15209         member cleanups.
15210         (build_vtbl_address): New function.
15211         (expand_virtual_init): Handle VTTs.
15212         * optimize (maybe_clone_body): Likewise.
15213         * search.c (fixup_all_virtual_upcast_offsets): Give it external
15214         linkage.
15215         (expand_indirect_vtbls_init): Remove.
15216         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
15217         * tree.c (make_binfo): Make them bigger.
15218
15219 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
15220
15221         * inc/cxxabi.h (__pbase_type_info): Define, based on
15222         __pointer_type_info.
15223         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
15224         (__pointer_to_member_type_info): Likewise.
15225         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
15226         (__pointer_to_member_type_info::__is_pointer_p): Remove.
15227         (__pointer_type_info::__do_catch): Rename to ...
15228         (__pbase_type_info::__do_catch): ... here. Adjust.
15229         (__pbase_type_info::__pointer_catch): Implement.
15230         (__pointer_type_info::__pointer_catch): Adjust.
15231         (__pointer_to_member_type_info::__pointer_catch): Adjust.
15232
15233 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
15234
15235         * tinfo.h (__user_type_info::contained_virtual_p): New
15236         predicate.
15237         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
15238         shaped hierarchy.
15239         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
15240         diamond shaped hierarchy. Add early out for mixed diamond and
15241         duplicate shaped hierarchy.
15242
15243 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
15244
15245         * cp-tree.h (build_delete): Change prototype.
15246         (build_vec_delete): Likewise.
15247         * call.c (build_scoped_method_call): Use special_function_kind
15248         values to indicate the kind of destruction to be done.
15249         (build_method_call): Likewise.
15250         * decl.c (finish_destructor_body): Likewise.
15251         (maybe_build_cleanup_1): Likewise.  Rename to ...
15252         (maybe_build_cleanup): ... this.
15253         * decl2.c (delete_sanity): Use special_function_kind
15254         values to indicate the kind of destruction to be done.
15255         (build_cleanup): Likewise.
15256         * init.c (perform_member_init): Likewise.
15257         (build_vec_delete_1): Likewise.
15258         (build_dtor_call): Simplify.
15259         (build_delete): Use special_function_kind
15260         values to indicate the kind of destruction to be done.
15261         (build_vbase_delete): Likewise.
15262         (build_vec_delete): Likewise.
15263
15264         * init.c (sort_member_init): Fix typo in error message generation
15265         code.
15266
15267 2000-05-15  Donald Lindsay  <dlindsay@cygnus.com>
15268
15269         * semantics.c (begin_class_definition): make the packed
15270         attribute be sensitive to the "-fpack-struct" command line flag
15271
15272 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
15273
15274         Update new-abi upcast algorithm.
15275         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
15276         prototype and meaning of return value.
15277         (__si_class_type_info::__do_upcast): Likewise.
15278         (__vmi_class_type_info::__do_upcast): Likewise.
15279         * tinfo.cc (__class_type_info::__upcast_result): Replace
15280         whole2dst with part2dst. Adjust ctor.
15281         (__class_type_info::__do_upcast): Adjust call of worker function.
15282         (__class_type_info::__do_upcast): Adjust.
15283         (__si_class_type_info::__do_upcast): Adjust. Use parent's
15284         __do_upcast.
15285         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
15286         virtual base in diamond hierarchy bug.
15287
15288 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
15289
15290         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
15291         and bitfield to tinfo_fn_p.
15292         (DECL_TINFO_FN_P): Adjust.
15293         (SET_DECL_TINFO_FN_P): Likewise.
15294         (DECL_MUTABLE_P): Likewise.
15295         (DECL_C_BIT_FIELD): Likewise.
15296         (SET_DECL_C_BIT_FIELD): Likewise.
15297         (CLEAR_DECL_C_BIT_FIELD): Likewise.
15298         (DECL_UNINLINABLE): Likewise.
15299         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
15300         (handle_using_decl): Remove assertion.
15301         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
15302         to build FIELD_DECLs.
15303         (build_base_field): Likewise.
15304         (layout_class_type): Likewise.
15305         * decl.c (init_decl_processing): Likewise.
15306         (build_ptrmemfunc_type): Likewise.
15307         (grokdeclarator): Likewise.
15308         * decl2.c (grok_x_components): Likewise.
15309         * except.c (call_eh_info): Likewise.
15310         * init.c (init_init_processing): Likewise.
15311         * rtti.c (expand_class_desc): Likewise.
15312         (create_pseudo_type_info): Likewise.
15313         (get_vmi_pseudo_type_info): Likewise.
15314         (create_tinfo_types): Likewise.
15315         * ptree.c (print_lang_decl): Adjust.
15316         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
15317         before checking DECL_MUTABLE_P.
15318
15319         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
15320         parameters for template functions.
15321         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
15322         destructors as well as constructors.
15323
15324 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
15325
15326         * class.c (build_ctor_vtbl_group): Set inits.
15327         * optimize.c (maybe_clone_body): Set DECL_INLINE and
15328         DECL_THIS_INLINE appropriately for clones.
15329
15330         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
15331         (DECL_CONV_FN_P): Simplify.
15332         (DECL_OPERATOR): Remove.
15333         (language_to_string): Declare.
15334         * decl.c (duplicate_decls): Fix typo in comment.
15335         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
15336         (grok_op_properties): Use DECL_CONV_FN_P instead of
15337         IDENTIFIER_TYPENAME_P.
15338         * dump.c (dequeue_and_dump): Dump the language linkage of
15339         declarations.
15340         * error.c (language_to_string): Give it external linkage.
15341         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
15342         (implicitly_declare_fn): Set DECL_LANGUAGE.
15343         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
15344         IDENTIFIER_TYPENAME_P.
15345         (tsubst_decl): Likewise.
15346         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
15347         * semantics.c (finish_member_declaration): Don't mark members of
15348         classes declared in an extern "C" region as extern "C".
15349
15350 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15351
15352         * decl2.c (qualified_lookup_using_namespace): Look through
15353         namespace aliases.
15354
15355         * decl.c (push_using_decl): Return the old decl on namespace level.
15356
15357 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
15358
15359         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
15360         (VTT_NAME_PREFIX): New macro.
15361         (CTOR_VTBL_NAME_PREFIX): Likewise.
15362         (get_ctor_vtbl_name): New function.
15363         * class.c (get_vtable_name): Simplify.
15364         (get_vtt_name): New function.
15365         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
15366         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
15367         when a virtual base becomes primary.
15368         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
15369         VTTs.
15370         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
15371         additional parameters.
15372         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
15373         (initialize_array): New function.
15374         (build_vtt): Likewise.
15375         (build_vtt_inits): Likewise.
15376         (dfs_build_vtt_inits): Likewise.
15377         (dfs_fixup_binfo_vtbls): Likewise.
15378         (build_ctor_vtbl_group): Likewise.
15379         (initialize_vtable): Use initialize_array.
15380         (accumulate_vtbl_inits): Reimplement to handle construction
15381         vtables.
15382         (dfs_accumulate_vtbl_inits): Likewise.
15383         (bulid_vtbl_initializer): Adjust parameter name.
15384         * method.c (build_typename_overload): Remove #if 0'd code.
15385         (get_ctor_vtbl_name): New function.
15386         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
15387         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
15388
15389         * cp-tree.h (struct lang_type): Remove search_slot.
15390         (CLASSTYPE_SEARCH_SLOT): Remove.
15391         (emit_base_init): Change prototype.
15392         (initialize_vtbl_ptrs): Likewise.
15393         (expand_indirect_vtbls_init): Likewise.
15394         (clear_search_slots): Remove.
15395         * decl.c (lang_mark_tree): Don't mark search_slot.
15396         * init.c (initialize_vtbl_ptrs): Simplify.
15397         (emit_base_init): Likewise.
15398         * search.c (struct vbase_info): Document decl_ptr.
15399         (convert_pointer_to_single_level): Remove.
15400         (dfs_find_vbases): Remove.
15401         (dfs_init_base_pointers): Simplify.
15402         (dfs_clear_vbase_slots): Remove.
15403         (dfs_vtable_path_unmark): New function.
15404         (init_vbase_pointers): Simplify.
15405         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
15406         (expand_indirect_vtbls_init): Simplify.  Don't call
15407         mark_all_temps_used.
15408         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
15409         initialize_vtbl_ptrs.
15410
15411 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
15412
15413         * except.c: Add static prototypes.
15414
15415 2000-05-20  H.J. Lu  <hjl@gnu.org>
15416
15417         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
15418
15419 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
15420
15421         Don't create a separate copy of virtual bases for the
15422         CLASSTYPE_VBASECLASSES list.
15423         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
15424         (BINFO_FOR_VBASE): Remove.
15425         (CANONICAL_BINFO): Adjust.
15426         (binfo_for_vbase): New function.
15427         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
15428         instead of BINFO_FOR_VBASE.
15429         (build_vbase_pointer): Likewise.
15430         (build_secondary_vtable): Likewise.
15431         (dfs_mark_primary_bases): Likewise.
15432         (mark_primary_bases): Likewise.
15433         (layout_nonempty_base_or_field): Likewise.
15434         (dfs_set_offset_for_shared_vbases): Likewise.
15435         (dfs_set_offset_for_unshared_vbases): Likewise.
15436         (layout_virtual_bases): Likewise.  Adjust for changes to the
15437         CLASSTYPE_VBASECLASSES list.
15438         (dump_class_hierarchy_r): Use binfo_for_vbase
15439         instead of BINFO_FOR_VBASE.
15440         (dump_class_hierarchy): Likewise.
15441         (finish_vtbls): Likewise.
15442         (build_vtbl_initializer): Adjust for changes to the
15443         CLASSTYPE_VBASECLASSES list.
15444         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
15445         * decl.c (finish_destructor_body): Adjust for changes to the
15446         CLASSTYPE_VBASECLASSES list.
15447         * init.c (sort_base_init): Use binfo_for_vbase.
15448         (construct_virtual_bases): Adjust for changes to the
15449         CLASSTYPE_VBASECLASSES list.
15450         (expand_member_init): Use binfo_for_vbase.
15451         (build_vbase_delete):  Adjust for changes to the
15452         CLASSTYPE_VBASECLASSES list.
15453         * method.c (do_build_copy_constructor): Likewise.
15454         * rtti.c (get_base_offset): Use binfo_for_vbase.
15455         (expand_class_desc): Remove #if 0'd code.
15456         * search.c (struct vbase_info): Remove vbase_types.
15457         (get_base_distance):  Use binfo_for_vbase.
15458         (lookup_field_queue_p): Use CANONICAL_BINFO.
15459         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
15460         (get_pure_virtuals): Adjust for changes to the
15461         CLASSTYPE_VBASECLASSES list.
15462         (dfs_find_vbases): Use binfo_for_vbase.
15463         (dfs_init_vbase_pointers): Likewise.
15464         (init_vbase_pointers): Don't initialize vi.vbase_types.
15465         (virtual_context): Use binfo_for_vbase.
15466         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
15467         CLASSTYPE_VBASECLASSES list.
15468         (expand_indirect_vtbls_init): Simplify.
15469         (dfs_get_vbase_types): Don't replicate virtual bases.
15470         (find_vbase_instance): Use binfo_for_vbase.
15471         (binfo_for_vbase): New function.
15472         * typeck.c (get_delta_difference): Use binfo_for_vbase.
15473
15474 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
15475
15476         * decl2.c (finish_anon_union): Generalize error messages to handle
15477         anonymous structures.
15478         * init.c (perform_member_init): Remove `name' parameter.
15479         (build_field_list): New function.
15480         (sort_member_init): Handle anonymous union initialization order
15481         correctly.  Check for multiple initializations of the same union.
15482         (emit_base_init): Don't look up fields by name here.
15483         (expand_member_init): Record the result of name lookup for future
15484         reference.
15485         * typeck.c (build_component_ref): Fix formatting.
15486
15487 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
15488
15489         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
15490         * typeck.c (build_x_compound_expr): Replace warn_unused with
15491         warn_unused_value.
15492
15493         * decl2.c (lang_decode_option): Update -Wall unused flags by
15494         calling set_Wunused.
15495
15496 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
15497
15498         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
15499         * init.c (dfs_vtable_path_unmark): Remove.
15500         * search.c (marked_new_vtable_p): Likewise.
15501         (unmarked_new_vtable_p): Likewise.
15502         (dfs_search_slot_nonempty_p): Likewise.
15503         (dfs_mark): Likewise.
15504         (dfs_vtable_path_unmark): Likewise.
15505         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
15506         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
15507         (dfs_init_vbase_pointers): Remove special-case new ABI code.
15508         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
15509         (init_vbase_pointers): Simplify.
15510         (expand_indirect_vtbls_init): Likewise.
15511
15512         * class.c (copy_virtuals): New function.
15513         (build_primary_table): Use it.
15514         (build_secondary_vtable): Likewise.
15515         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
15516         indicate that no vcall offset is required.
15517         (add_virtual_function): Likewise.
15518         (modify_all_vtables): Likewise.
15519         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
15520         (dfs_accumulate_vtbl_inits): Likewise.
15521         (build_vtbl_initializer): Make changes to handle construction
15522         vtables.
15523         (dfs_build_vcall_offset_vtbl_entries): Likewise.
15524         (build_rtti_vtbl_entries): Likewise.
15525         (build_vtable_entries): Handle a NULL vcall_index.
15526
15527 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
15528
15529         * decl2.c (lang_decode_option): Fix thinko.
15530
15531 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
15532
15533         * except.c (check_handlers): New fn.
15534         * cp-tree.h: Declare it.
15535         * semantics.c (finish_handler_sequence): Call it.
15536         (finish_function_handler_sequence): Likewise.
15537         (finish_handler_parms): Set TREE_TYPE on the handler.
15538         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
15539         * search.c (get_base_distance_recursive): If protect>1, ignore
15540         special access.
15541         (get_base_distance): Don't reduce watch_access.
15542
15543 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
15544
15545         * lex.c: #include diagnostic.h.
15546         (lang_init_options): Set default prefixing rules.
15547
15548         * lang-options.h: Add -fdiagnostics-show-location=.
15549
15550         * decl2.c: #include diagnostic.h.
15551         (lang_decode_option): Handle -fdiagnostics-show-location=.
15552
15553 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
15554
15555         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
15556         * vec.cc: Revert my 2000-05-07 change.
15557
15558 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
15559
15560         * class.c (check_field_decls): Complain about non-static data
15561         members with same name as class in class with constructor.
15562
15563 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
15564
15565         * decl.c (grokdeclarator): Allow non-static data members with
15566         same name as class.
15567
15568 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
15569
15570         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
15571         and pending_inline.filename.  Update prototypes.
15572         * decl.c (define_label): Constify filename parameter.
15573         * decl2.c (warn_if_unknown_interface): Constify local char *.
15574         * input.c Constify input_source.filename. Don't declare
15575         input_filename or lineno.  Constify filename parameter to feed_input.
15576         * lex.c (init_parse): Constify parameter and return value.
15577         (cp_pragma_interface, cp_pragma_implementation): Constify
15578         filename argument.
15579         (reinit_parse_for_method, reinit_parse_for_block,
15580         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
15581         Constify local char *.
15582         * pt.c: Don't declare lineno or input_filename.
15583         (print_template_context, tsubst_friend_function, tsubst_decl,
15584         tsubst, instantiate_decl): Constify local char *.
15585         * semantics.c (expand_body): Constify local char *.
15586         * tree.c (build_srcloc): Constify filename parameter.
15587         * typeck.c (c_expand_asm_operands): Constify filename
15588         parameter.
15589
15590 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
15591
15592         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
15593         offsetof expansion.
15594
15595 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
15596
15597         * inc/cxxabi.h:  Fix typos in comment.
15598         (__base_class_info::__offset): Use a static_cast.
15599
15600 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
15601
15602         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
15603         of std::size_t and std::ptrdiff_t respectively.
15604         * tinfo.cc: Likewise.
15605         * vec.cc: Likewise.
15606
15607 2000-05-06  Richard Henderson  <rth@cygnus.com>
15608
15609         * typeck.c (build_c_cast): Don't warn integer->pointer size
15610         mismatch for constants.
15611
15612 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
15613
15614         * rtti.c (ptmd_initializer): Set non-public, if class is
15615         incomplete.
15616
15617         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
15618         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
15619         __cxa_vec_delete): Likewise.
15620         * tinfo.cc (__dynamic_cast): Likewise.
15621         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
15622         __cxa_vec_delete): Likewise.
15623
15624 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
15625
15626         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
15627         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
15628         (lang_decl_flags): Add vcall_offset.
15629         (THUNK_VCALL_OFFSET): Use it.
15630         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
15631         * method.c (make_thunk): Create the lang_decl here, not in
15632         emit_thunk.
15633         (emit_thunk): Make generic thunks into ordinary functions once
15634         they have been fed to expand_body.
15635         * semantics.c (expand_body): Set current_function_is_thunk here.
15636
15637 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15638
15639         * class.c (update_vtable_entry_for_fn): Prototype.
15640
15641         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
15642         and `tmpl'.
15643
15644         * search.c (dfs_build_inheritance_graph_order): Prototype.
15645
15646 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
15647
15648         * cp-tree.h (special_function_kind): Add various kinds of
15649         destructors.
15650         (special_function_p): New function.
15651         * class.c (overrides): Don't let one kind of destructor override
15652         another.
15653         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
15654         whether or not to instantiate a template.
15655         * tree.c (special_function_p): Define.
15656
15657 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
15658
15659         * cp-tree.def (THUNK_DECL): Remove.
15660         * cp-tree.h (DECL_THUNK_P): New macro.
15661         (DECL_NON_THUNK_FUNCTION_P): Likewise.
15662         (DECL_EXTERN_C_FUNCTION_P): Likewise.
15663         (SET_DECL_THUNK_P): Likewise.
15664         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
15665         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
15666         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
15667         * decl.c (decls_match): Use DECL_EXTERN_C_P.
15668         (duplicate_decls): Likewise.
15669         (pushdecl): Likewise.  Adjust thunk handling.
15670         (grokfndecl): Use DECL_EXTERN_C_P.
15671         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
15672         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
15673         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
15674         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
15675         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
15676         DECL_NO_STATIC_CHAIN.
15677         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
15678         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
15679         * search.c (covariant_return_p): Remove THUNK_DECL handling.
15680         * ir.texi: Update.
15681
15682 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
15683
15684         * tree.c (walk_tree): Set lineno.
15685
15686 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
15687
15688         * exception.cc: Update license notice.
15689         * new.cc: Likewise.
15690         * new1.cc: Likewise.
15691         * new2.cc: Likewise.
15692         * tinfo.cc: Likewise.
15693         * tinfo2.cc: Likewise.
15694         * vec.cc: Likewise.
15695         * inc/cxxabi.h: Likewise.
15696         * inc/exception: Likewise.
15697         * inc/new: Likewise.
15698         * inc/new.h: Likewise.
15699         * inc/typeinfo: Likewise.
15700
15701 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
15702
15703         * tree.c (build_target_expr_with_type): If we already have a
15704         TARGET_EXPR, just return it.
15705
15706         * optimize.c (initialize_inlined_parameters): Don't generate an
15707         EXPR_STMT if we can just use DECL_INITIAL.
15708         * decl.c (emit_local_var): Only make the initialization a
15709         full-expression if stmts_are_full_exprs_p.
15710
15711 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
15712
15713         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
15714         macro.
15715         * call.c (standard_conversion): Use it.
15716         (direct_reference_binding): Likewise.
15717         (build_over_call): Likewise.
15718         (is_properly_derived_from): Likewise.
15719         (compare_ics): Likewise.
15720         * class.c (resolves_to_fixed_type_p): Likewise.
15721         * optimize.c (declare_return_variable): Likewise.
15722         * pt.c (is_specialization_of): Likewise.
15723         (unify): Likewise.
15724         * typeck.c (comp_target_parms): Likeiwse.
15725         (build_static_cast): Likewise.
15726         (build_reinterpret_cast): Likewise.
15727         (build_const_cast): Likewise.
15728         (comp_ptr_ttypes_real): Likewise.
15729         (comp_ptr_ttypes_const): Likewise.
15730         * typeck2.c (process_init_constructor): Likewise.
15731
15732 2000-04-30  Scott Snyder <snyder@fnal.gov>
15733
15734         * decl.c (finish_destructor_body): Use the base destructor when
15735         destroying virtual bases.
15736
15737 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
15738
15739         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
15740         STMT_EXPRs.
15741         * optimize.c (struct inline_data): Add target_exprs field.
15742         (declare_return_variable): When a function returns an aggregate,
15743         use the variable declared in the TARGET_EXPR as the remapped
15744         DECL_RESULT.
15745         (expand_call_inline): Update the pending target_exprs stack.
15746         (optimize_function): Initialize the stack.
15747
15748         * decl2.c (finish_file): Fix typo in comment.
15749
15750         * method.c (emit_thunk): Don't try to return a `void' value.
15751
15752         * optimize.c (initialize_inlined_parameters): If the parameter is
15753         addressable, we need to make a new VAR_DECL, even if the
15754         initializer is constant.
15755
15756 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
15757
15758         * decl.c (grok_op_properties): Add an extra check of argtypes.
15759
15760 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
15761
15762         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
15763         variables.
15764         (initialize_inlined_parameters): Try to avoid creating new
15765         VAR_DECLs.
15766
15767 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
15768
15769         * lex.c (my_get_run_time): Remove.
15770         (init_filename_times): Use get_run_time instead of my_get_run_time.
15771         (check_newline): Likewise.
15772         (dump_time_statistics): Likewise.
15773         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
15774         of computing elapsed time explicitly.
15775
15776 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
15777
15778         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
15779         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
15780         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
15781         before calling decl_constant_value.
15782         * class.c (check_bitfield_decl): Likewise.
15783         * cvt.c (ocp_convert): Likewise.
15784         (convert): Likewise.
15785         * decl.c (compute_array_index_type): Likewise.
15786         (build_enumerator): Likewise.
15787         * decl2.c (check_cp_case_value): Likewise.
15788         * pt.c (convert_nontype_argument): Likewise.
15789         (tsubst): Likewise.
15790         * typeck.c (decay_conversion): Likewise.
15791         (build_compound_expr): Likewise.
15792         (build_reinterpret_cast): Likewise.
15793         (build_c_cast): Likewise.
15794         (convert_for_assignment): Likewise.
15795
15796 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
15797
15798         * decl.c (finish_function): Don't play games with DECL_INLINE.
15799
15800 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
15801
15802         * ir.texi: Correct typo.
15803
15804 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15805
15806         * decl.c (grokdeclarator): Reject VLAs as members.
15807
15808 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
15809
15810         * call.c (standard_conversion): Accept conversion between
15811         COMPLEX_TYPEs.
15812
15813         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
15814
15815 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
15816
15817         * decl2.c (finish_file): Remove double setup for accounting
15818         compile time.
15819
15820 2000-04-24  Robert Lipe <robertlipe@usa.net>
15821
15822         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
15823
15824 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
15825
15826         * new.cc (set_new_handler): Needs to be in std::.
15827
15828 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
15829
15830         * cp-tree.h (lang_decl): Remove pretty_function_p.
15831         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
15832         language-specific node.
15833         * decl.c (cp_make_fname_decl): Use build_decl, not
15834         build_lang_decl, to build the variables.
15835         (grokvardecl): Don't call build_lang_decl for local variables in
15836         templates.
15837         (grokdeclarator): Don't call build_lang_decl for local type
15838         declarations in templates.
15839         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
15840         zero'd memory, rather than calling memset.
15841         * pt.c: Include hashtab.h.
15842         (local_specializations): New variable.
15843         (retrieve_local_specialization): Use it.
15844         (register_local_specialization): Likewise.
15845         (tsubst_decl): Don't assume local variables have
15846         DECL_LANG_SPECIFIC.
15847         (instantiate_decl): Set up local_specializations.
15848         * Makefile.in (HTAB_H): New variable.
15849
15850 2000-04-23  Richard Henderson  <rth@cygnus.com>
15851
15852         * typeck.c (c_expand_asm_operands): Restore the original
15853         contents of the output list.
15854
15855 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
15856
15857         * ir.texi:  Document complex number representation.
15858
15859 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
15860
15861         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
15862         (target_incomplete_p): New function.
15863         (tinfo_base_init): Create comdat NTBS name variable.
15864         (ptr_initializer): Add non_public parameter. Calculate it.
15865         (ptmd_initializer): Likewise.
15866         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
15867         (create_real_tinfo_var): Add non_public parameter. Use it.
15868         Push proxy into global namespace.
15869         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
15870         New enumeration.
15871         * inc/typeinfo (type_info::before, type_info::operator==):
15872         Compare __name addresses.
15873
15874         * tinfo2.cc: Remove new-abi builtins comment.
15875
15876 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
15877
15878         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
15879
15880         * call.c (joust): Exit early if we get the same function, too.
15881
15882         * decl2.c (key_method): Return NULL_TREE for template classes.
15883         (import_export_class): Don't need to check for template classes.
15884
15885 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
15886
15887         * lex.c: Remove references to cccp.c.
15888
15889 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
15890
15891         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
15892         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
15893         (DECL_DESTRUCTOR_P): Use destructor_attr.
15894         (DECL_CONST_MEMFUNC_P): Reimplement.
15895         (DECL_VOLATILE_MEMFUNC_P): Remove.
15896         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
15897         (overrides): Use DECL_DESTRUCTOR_P.
15898         (check_for_override): Likewise.
15899         * decl.c (start_function): Likewise.
15900         * decl2.c (grokfclassfn): Likewise.
15901         (check_classfn): Likewise.
15902         (grok_function_init): Likewise.
15903
15904 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
15905
15906         * decl2.c (grokfield): Issue error on illegal data member
15907         declaration.
15908
15909 2000-04-17  Mark P Mitchell  <mark@codesourcery.com>
15910
15911         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
15912
15913 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
15914
15915         * class.c (build_vtable_entry): Don't build thunks for type-info
15916         functions.
15917
15918 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
15919
15920         * decl.c (decls_match): Allow a redeclaration of a builtin to
15921         specify args while the builtin did not.
15922
15923 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
15924
15925         * cp-tree.def (THUNK_DECL): Add to documentation.
15926         * cp-tree.h (flag_huge_objects): Declare.
15927         * class.c (modify_vtable_entry): Tidy.
15928         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
15929         Calculate delta appropriately for the new ABI.
15930         (dfs_modify_vtables): Use it.
15931         (modify_all_vtables): Fix thinko in code to add overriding copies
15932         of functions to primary vtables.
15933         (build_clone): Fix typo in comment.
15934         (clone_function_decl): Correct order of destructors in vtable.
15935         (build_vbase_offset_vtbl_entries): Adjust comment.
15936         (dfs_vcall_offset_queue_p): Remove.
15937         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
15938         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
15939         (build_vtable_entry): Correct check for pure virtual functions.
15940         Don't declare flag_huge_objects.
15941         * decl.c (flag_huge_objects): Remove declaration.
15942         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
15943         Use int_size_in_bytes.
15944         (emit_thunk): Handle vcall offset thunks.
15945
15946 2000-04-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15947
15948         * decl2.c (parse_time, varconst_time): Delete declarations.
15949         (finish_file): Delete LINENO declaration.
15950         START_TIME and THIS_TIME now long.
15951
15952 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
15953
15954         * class.c (build_base_field): Reformat comment.
15955
15956         * inc/cxxabi.h (stddef.h): Comment inclusion.
15957         (__base_class_info::__offset): Comment shift.
15958
15959 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
15960
15961         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
15962         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
15963         (cp_push_exception_identifier): New macro.
15964         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
15965         (DECL_BASE_DESTRUCTOR_P): Likewise.
15966         (DECL_DELETING_DESTRUCTOR_P): Likewise.
15967         (get_vtbl_decl_for_binfo): Fix formatting.
15968         (in_charge_arg_for_name): New macro.
15969         (maybe_build_cleanup_and_delete): Remove declaration.
15970         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
15971         (in_charge_arg_for_name): New function.
15972         (build_new_method_call): Use it.  Handle cloned destructors.
15973         (build_clone): Don't make the base constructor virtual.
15974         Automatically defer generated functions.
15975         (clone_function_decl): Handle destructors, too.
15976         (clone_constructors_and_destructors): Likewise.
15977         (create_vtable_ptr): Don't create a vtable entry for a cloned
15978         function.
15979         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
15980         (initialize_predefined_identifiers): Update appropriately.
15981         (finish_destructor_body): Simplify.
15982         (maybe_build_cleanup_and_delete): Remove.
15983         * except.c (expand_throw): Handle new-ABI destructors.
15984         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
15985         (build_dtor_call): New function.
15986         (build_delete): Use it.  Simplify.
15987         * optimize.c (maybe_clone_body): Handle destructors.
15988         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
15989
15990         * exception.cc (cleanup_fn): New typedef.
15991         (CALL_CLEANUP): New macro.
15992         (cp_eh_info): Use them.
15993         (__cp_push_exception): Likewise.
15994         (__cp_pop_exception): Likewise.
15995
15996 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
15997
15998         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
15999         (complete_dtor_identifier): New macro.
16000         (CLASSTYPE_FIRST_CONVERSION): Remove.
16001         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
16002         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
16003         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
16004         (CLASSTYPE_CONSTRUCTORS): Likewise.
16005         (CLASSTYPE_DESTRUCTORS): Likewise.
16006         (lang_decl): Add cloned_function.
16007         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
16008         (DECL_BASE_CONSTRUCTOR_P): Likewise.
16009         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
16010         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
16011         (DECL_CLONED_FUNCTION_P): Likewise.
16012         (DECL_CLONED_FUNCTION): Likewise.
16013         (clone_function_decl): Declare.
16014         (maybe_clone_body): Likewise.
16015         * call.c (build_user_type_conversion_1): Call complete object
16016         constructors in the new ABI.
16017         (build_new_method_call): Don't add in-charge parameters under the
16018         new ABI.
16019         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
16020         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
16021         CLASSTYPE_DESTRUCTOR_SLOT.
16022         (build_clone): New function.
16023         (clone_function_decl): Likewise.
16024         (clone_constructors_and_destructors): Likewise.
16025         (check_bases_and_members): Use it.
16026         * decl.c (iniitialize_predefined_identifiers): Initialize
16027         complete_dtor_identifier.
16028         (finish_function): Don't add extra code to a clone.
16029         (lang_mark_tree): Mark cloned_function.
16030         * decl2.c (mark_used): Don't bother trying to instantiate things
16031         we synthesized.
16032         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
16033         * method.c (set_mangled_name_for_decl): Don't treat clones as
16034         constructors.
16035         (synthesize_method): Sythesize cloned functions, not the clones.
16036         * optimize.c (inline_data): Update comment on ret_label.
16037         (remap_block): Don't assume DECL_INITIAL exists.
16038         (copy_body_r): Allow ret_label to be NULL.
16039         (maybe_clone_body): Define.
16040         * pt.c (tsubst_decl): Handle clones.
16041         (instantiate_clone): New function.
16042         (instantiate_template): Use it.
16043         (set_mangled_name_for_template_decl): Don't treat clones as
16044         constructors.
16045         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
16046         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
16047         * semantics.c (expand_body): Clone function bodies as necessary.
16048
16049         * optimize.c (remap_decl): Avoid sharing structure for arrays
16050         whose size is only known at run-time.
16051         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
16052
16053         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
16054         to has_in_charge_parm_p.
16055         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
16056         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
16057         (DECL_COPY_CONSTRUCTOR_P): New macro.
16058         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
16059         (build_user_type_conversion_1): Likewise.
16060         (convert_like_real): Likewise.
16061         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
16062         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
16063         (copy_args_p): Likewise.
16064         (grok_ctor_properties): Likewise.
16065         (start_function): Likewise.
16066         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
16067         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
16068         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
16069         * method.c (do_build_copy_constructor): Use
16070         DECL_HAS_IN_CHARGE_PARM_P.
16071         (synthesize_method): Likewise.
16072         * pt.c (instantiate_template): Remove goto.
16073         * tree.c (build_cplus_method_type): Remove mention of obstacks in
16074         comment.
16075
16076         * cp-tre.h (finish_function): Change prototype.
16077         * decl.c (end_cleanup_fn): Adjust caller.
16078         (finish_function): Take only one parameter.
16079         * decl2.c (finish_objects): Adjust caller.
16080         (finish_static_storage_duration_function): Likewise.
16081         * method.c (emit_thunk): Likewise.
16082         * parse.y: Likewise.
16083         * parse.c: Regenerated.
16084         * pt.c (instantiate_decl): Likewise.
16085         * rtti.c (synthesize_tinfo_fn): Likewise.
16086         * semantics.c (expand_body): Likewise.
16087
16088         * cp-tree.h (copy_decl): New function.
16089         * class.c (finish_struct_1): Use it.
16090         * lex.c (copy_decl): Define it.
16091         * pt.c (tsubst_decl): Likewise.
16092         * tree.c (copy_template_template_parm): Likewise.
16093
16094         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
16095         has_nonpublic_assign_ref.
16096         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
16097         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
16098         * class.c (finish_struct_methods): Don't set
16099         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
16100         (interface_only): Don't declare.
16101         (interface_unknown): Likewise.
16102
16103 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16104
16105         * tree.h (HAVE_TEMPLATES): Remove definition.
16106         * lang-options.h (-fthis-is-variable): Remove documentation.
16107
16108 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
16109
16110         * class.c (instantiate_type): Handle object-relative template-id.
16111
16112         * semantics.c (finish_expr_stmt): Call convert_to_void here.
16113         * decl.c (cplus_expand_expr_stmt): Not here.
16114
16115         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
16116         Initialize exprtype earlier.
16117
16118         * parse.y (fn.def1): Check for defining types in return types.
16119
16120         * decl.c (check_tag_decl): Notice extra fundamental types.
16121         Diagnose empty decls in classes, too.
16122
16123         * decl.c (grokdeclarator): Don't override an anonymous name if no
16124         declarator was given.
16125
16126         * cvt.c (convert_to_void): Call resolve_offset_ref.
16127
16128         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
16129
16130         * decl2.c (decl_namespace): Handle getting a type.
16131
16132         * typeck.c (build_c_cast): Re-enable warning for cast between
16133         pointer and integer of different size.
16134
16135 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
16136
16137         * inc/cxxabi.h (__pointer_type_info): Add restrict and
16138         incomplete flags.
16139         (__pointer_type_info::__pointer_catch): New virtual function.
16140         (__pointer_to_member_type_info): Derive from
16141         __pointer_type_info. Adjust.
16142         (__pointer_to_member_type_info::__do_catch): Remove.
16143         (__pointer_to_member_type_info::__is_pointer_p): Declare.
16144         (__pointer_to_member_type_info::__pointer_catch): Declare.
16145         * rtti.c (qualifier_flags): Add restrict flag.
16146         (ptmd_initializer): Reorder members.
16147         (create_tinfo_types): Expand comments. Reorder
16148         ptmd_desc_type_node members.
16149         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
16150         Implement.
16151         (__pointer_type_info::__do_catch): Move specific code into
16152         __pointer_catch. Call it.
16153         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
16154         specific catch checking. Fix void conversion check.
16155         (__pointer_to_member_type_info::__do_catch): Remove.
16156         (__pointer_to_member_type_info::__pointer_catch): Implement.
16157
16158 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16159
16160         * lex.c (init_parse): Remove traces of classof and headof.
16161         * decl2.c (flag_operator_names): Default to 1.
16162         (lang_decode_option): Do not set it for -ansi.
16163
16164 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
16165
16166         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
16167         (DECL_MAIN_VARIANT): Remove.
16168         * decl.c (duplicate_decls): Don't set it.
16169         (start_function): Likewise.
16170         (lang_mark_tree): Don't mark it.
16171         * decl2.c (defer_fn): Don't use it.
16172         * lex.c (retrofit_lang_decl): Don't set it.
16173         * pt.c (tsubst_decl): Likewise.
16174         * ptree.c (print_lang_decl): Don't print it.
16175         * typeck.c (mark_addressable): Don't use it.
16176
16177 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
16178
16179         * vec.cc: Include <new> and <exception>.
16180         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
16181         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
16182         terminate.
16183         (__cxa_vec_delete): Catch dtor exceptions.
16184
16185 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
16186
16187         Prepend __ to implementation defined names.
16188         * inc/typeinfo (type_info): Rename _name to __name.
16189         (type_info::type_info): Rename parameter.
16190         (type_info::operator==, type_info::operator!=,
16191         type_info::before): Likewise.
16192         (type_info::is_pointer_p, type_info::is_function_p,
16193         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
16194         parameters.
16195         * inc/cxxabi.h
16196         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
16197         (__pointer_type_info::__pointer_type_info): Likewise.
16198         (__pointer_type_info::is_pointer_p,
16199         __pointer_type_info::do_catch): Prepend __. Rename parameters.
16200         (__array_type_info::__array_type_info): Rename parameters.
16201         (__function_type_info::__function_type_info): Likewise.
16202         (__function_type_info::is_function_p): Prepend __.
16203         (__enum_type_info::__enum_type_info): Rename parameters.
16204         (__pointer_to_member_type_info::__pointer_to_member_type_info):
16205         Likewise.
16206         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
16207         parameters.
16208         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
16209         (__class_type_info::__class_type_info): Rename parameters.
16210         (__class_type_info::sub_kind): Prepend __. Adjust member names.
16211         (__class_type_info::upcast_result,
16212         __class_type_info::dyncast_result): Prepend __. Move definition
16213         into tinfo.cc.
16214         (__class_type_info::do_upcast, __class_type_info::do_catch,
16215         __class_type_info::find_public_src,
16216         __class_type_info::do_dyncast,
16217         __class_type_info::do_find_public_src): Prepend __. Rename
16218         parameters.
16219         (__si_class_type_info::__si_class_type_info): Rename parameters.
16220         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
16221         __si_class_type_info::do_find_public_src): Prepent __. Rename
16222         parameters.
16223         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
16224         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
16225         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
16226         parameters.
16227         (__dynamic_cast): Rename parameters.
16228         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
16229         type_info::do_catch, type_info::do_upcast): Prepend __.
16230         (contained_p, public_p, virtual_p, contained_public_p,
16231         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
16232         (__class_type_info::do_catch,
16233         __class_type_info::do_upcast): Prepend __. Adjust.
16234         (__class_type_info::__upcast_result,
16235         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
16236         Adjust.
16237         (__class_type_info::find_public_src): Prepend __. Adjust.
16238         (__class_type_info::do_find_public_src,
16239         __si_class_type_info::do_find_public_src,
16240         __vmi_class_type_info::do_find_public_src): Likewise.
16241         (__class_type_info::do_dyncast,
16242         __si_class_type_info::do_dyncast,
16243         __vmi_class_type_info::do_dyncast): Likewise.
16244         (__class_type_info::do_upcast,
16245         __si_class_type_info::do_upcast,
16246         __vmi_class_type_info::do_upcast): Likewise.
16247         (__dynamic_cast): Adjust.
16248         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
16249         (__function_type_info::is_function_p): Likewise.
16250         (__pointer_type_info::do_catch): Likewise. Adjust.
16251         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
16252         (__throw_type_match_rtti_2): Adjust.
16253         (__is_pointer): Adjust.
16254
16255 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
16256
16257         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
16258         (complete_ctor_identifier): New macro.
16259         (special_function_kind): Add sfk_copy_constructor and
16260         sfk_assignment_operator.
16261         (LOOKUP_HAS_IN_CHARGE): Remove.
16262         (cons_up_default_function): Rename to ...
16263         (implicitly_declare_fn): ... this.
16264         * call.c (build_new_method_call): Add in-charge parameters for
16265         constructors here.
16266         * class.c (add_implicitly_declared_members): Change parameter name
16267         from cant_have_assignment to cant_have_const_assignment.
16268         Replace calls to cons_up_default_function to implicitly_declare_fn.
16269         * cvt.c (ocp_convert): Use complete_ctor_identifier.
16270         * decl.c (initialize_predefined_identifiers): Initialize it.
16271         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
16272         complex expression.
16273         * init.c (expand_default_init): Don't calculate the in-charge
16274         parameter here.
16275         (build_new_1): Likewise.
16276         * lex.c (cons_up_default_function): Move to method.c.
16277         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
16278         (implicitly_declare_fn): New function.
16279         * typeck.c (build_static_cast): Use complete_ctor_identifier.
16280         (build_modify_expr): Likewise.
16281         * typeck2.c (build_functional_cast): Likewise.
16282
16283         Under the new ABI, constructors don't return `this'.
16284         * cp-tree.h (warn_reorder): Declare.
16285         (special_function_kind): New enum.
16286         (global_base_init_list): Remove declaration.
16287         (emit_base_init): Don't return a value.
16288         (check_base_init): Don't declare.
16289         (is_aggr_typedef): Likewise.
16290         * decl.c (check_special_function_return_type): New function.
16291         (return_types): Remove.
16292         (grokdeclarator): Use check_special_function_return_type.
16293         (start_function): Don't initialize ctor_label under the new ABI.
16294         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
16295         * init.c (begin_init_stmts): Move to top of file.
16296         (finish_init_stmts): Likewise.
16297         (warn_reorder): Don't declare.
16298         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
16299         value.
16300         (check_base_init): Remove.
16301         (is_aggr_typedef): Likewise.
16302         (build_new_1): Don't use the return value of a constructor.
16303         * semantics.c (setup_vtbl_ptr): Don't use the return value
16304         of emit_base_init.
16305         * typeck.c (check_return_expr): Don't magically convert return
16306         statements into `return this' in constructors under the new ABI.
16307
16308         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
16309         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
16310         (base_ctor_identifier): New macro.
16311         (base_dtor_identifier): Likewise.
16312         (deleting_dtor_identifier): Likewise.
16313         * decl.c: Don't include obstack.h.
16314         (obstack_chunk_alloc): Don't define.
16315         (obstack_chunk_free): Likewise.
16316         (struct predefined_identifier): New type.
16317         (initialize_predefined_identifiers): New function.
16318         (init_decl_processing): Use it.
16319         (debug_temp_inits): Remove.
16320         (start_method): Don't call preserve_data.
16321         (hack_incomplete_structures): Update comment.
16322         * init.c (init_init_processing): Don't initialize
16323         nelts_identifier.
16324         (build_offset_rf): Remove dead code.
16325         (build_delete): Use CLASSTYPE_N_BASECLASSES.
16326         * search.c (init_search_processing): Don't initialize
16327         vptr_identifier.
16328
16329 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16330
16331         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
16332         some sign_compare warnings.
16333
16334 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
16335
16336         Rename abi::__vmi_class_type_info members.
16337         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
16338         base_list, detail_masks members to vmi_flags, vmi_base_count,
16339         vmi_bases and vmi_flags_masks respectively.
16340         (__vmi_class_type_info::vmi_flags_masks): Rename
16341         details_unknown_mask to flags_unknown_mask.
16342         * tinfo.cc (__class_type_info::do_upcast): Adjust.
16343         (__vmi_class_type_info::do_find_public_src): Adjust.
16344         (__vmi_class_type_info::do_dyncast): Adjust.
16345         (__vmi_class_type_info::do_upcast): Adjust.
16346
16347 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
16348
16349         * tinfo.cc (convert_to_base): New function.
16350         (get_vbase_offset): Remove. Move into convert_to_base.
16351         (__vmi_class_type_info::do_find_public_src): Adjust.
16352         (__vmi_class_type_info::do_dyncast): Adjust.
16353         (__vmi_class_type_info::do_upcast): Adjust.
16354
16355 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
16356
16357         * tinfo.cc (operator=): Use __builtin_strcmp.
16358         * tinfo2.cc (before): Likewise.
16359
16360 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
16361
16362         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
16363         (DECL_SAVED_INLINE): Rename to ...
16364         (DECL_DEFERRED_FN): ... this.
16365         (in_function_p): Remove declaration.
16366         (mark_inline_for_output): Rename to ...
16367         (defer_fn): ... this.
16368         * decl.c (finish_function): Adjust call to mark_inline_for_output.
16369         (in_function_p): Remove definition.
16370         * decl2.c (saved_inlines): Rename to ...
16371         (deferred_fns): ... this.
16372         (saved_inlines_used): Rename to ...
16373         (deferred_fns_used): ... this.
16374         (mark_inline_for_output): Rename to ...
16375         (defer_fn): ... this.
16376         (finish_file): Adjust accordingly.
16377         (init_decl2): Likewise.
16378         * lex.c (cons_up_default_function): Likewise.
16379         * pt.c (mark_decl_instantiated): Likewise.
16380         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
16381         circumstances.
16382         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
16383         * semantics.c (expand_body): Defer more functions.
16384
16385 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
16386
16387         * vec.cc: New file.
16388         * Make-lang.in (CXX_LIB2FUNCS): Add it.
16389         (vec.o): Build it.
16390         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
16391         __cxa_vec_delete): Declare.
16392
16393 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
16394
16395         * rtti.c (dfs_class_hint_mark): New static function.
16396         (dfs_class_hint_unmark): New static function.
16397         (class_hint_flags): Use them.
16398
16399 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
16400
16401         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
16402
16403 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
16404
16405         * cp-tree.h (instantiate_decl): Change prototype.
16406         * decl2.c (mark_used): Adjust call.
16407         * optimize.c (inlinable_function_p): Adjust handling of templates.
16408         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
16409         (do_type_instantiation): Likewise.
16410         (instantiate_decl): Defer more templates.
16411         (instantiate_pending_templates): Adjust logic to handle inline
16412         friend functions.
16413
16414         * Makefile.in (GGC_H): New variable.  Use it throughout in place
16415         of ggc.h.
16416
16417         * call.c: Don't include obstack.h.  Include ggc.h.
16418         (obstack_chunk_alloc): Don't define.
16419         (obstack_chunk_free): Likewise.
16420         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
16421         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
16422         (pop_switch): Free it.
16423
16424         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
16425
16426         * dump.c (dequeue_and_dump): Don't try to print the bit_position
16427         if we don't have a DECL_FIELD_OFFSET.
16428
16429 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
16430
16431         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
16432         special_function_p.
16433
16434 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16435
16436         * cfns.gperf (hash, libc_name_p): Prototype.
16437
16438         * rtti.c (build_dynamic_cast_1): Constification.
16439
16440         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
16441
16442         * semantics.c (deferred_type_access_control): Prototype.
16443
16444 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
16445
16446         Correct many new ABI issues regarding vbase and vcall offset
16447         layout.
16448         * cp-tree.h (BINFO_VTABLE): Document.
16449         (struct lang_type): Tweak formatting.
16450         (BINFO_PRIMARY_BINFO): Add to documentation.
16451         (CLASSTYPE_VSIZE): Fix typo in comment.
16452         (CLASSTYPE_VBASECLASSES): Update documentation.
16453         (BINFO_VBASE_MARKED): Remove.
16454         (SET_BINFO_VBASE_MARKED): Likewise.
16455         (CLEAR_BINFO_VBASE_MARKED): Likewise.
16456         (BINFO_FIELDS_MARKED): Remove.
16457         (SET_BINFO_FIELDS_MARKED): Likewise.
16458         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
16459         (enum access_kind): New enumeration.
16460         (num_extra_vtbl_entries): Remove declaration.
16461         (size_extra_vtbl_entries): Likewise.
16462         (get_vtbl_decl_for_binfo): New function.
16463         (dfs_vbase_unmark): Remove declaration.
16464         (mark_primary_bases): Likewise.
16465         * class.c (SAME_FN): Remove.
16466         (struct vcall_offset_data_s): Move definition.
16467         (build_vbase_pointer): Use `build', not `build_binary_op', to
16468         access the vbase pointer under the new ABI.
16469         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
16470         (build_primary_vtable): Likewise.
16471         (dfs_mark_primary_bases): Move here from search.c.
16472         (mark_primary_bases): Likewise.
16473         (determine_primary_bases): Under the new ABI, don't make a base
16474         class a primary base just because we don't yet have any virtual
16475         functions.
16476         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
16477         (num_vfun_entries): Remove.
16478         (dfs_count_virtuals): Likewise.
16479         (num_extra_vtbl_entries): Likewise.
16480         (size_extra_vtbl_entries): Likewise.
16481         (layout_virtual_bases): Iterate in inheritance graph order under
16482         the new ABI.
16483         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
16484         indicate that a vfield is present.
16485         (init_class_processing): Initialize access_public_node, etc., from
16486         ak_public, etc.
16487         (get_vtbl_decl_for_binfo): New function.
16488         (dump_class_hierarchy_r): Likewise.
16489         (dump_class_hierarchy): Use it.
16490         (finish_vtbls): Build the vtbls in inheritance graph order.
16491         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
16492         (initialize_vtable): Use get_vtbl_decl_for_binfo.
16493         (accumulate_vtbl_inits): Add comments explaining why a pre-order
16494         walk is required.
16495         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
16496         where the vptr points, even for primary vtables.
16497         (build_vtbl_initializer): Adjust handling of vbase and vcall
16498         offsets.
16499         (build_vcall_and_vbase_vtable_entries): New function.
16500         (dfs_build_vbase_offset_vtbl_entries): Remove.
16501         (build_vbase_offset_vtbl_entries): Reimplement.
16502         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
16503         were already handled in a primary base class vtable.
16504         (build_vcall_offset_vtbl_entries): Adjust.
16505         (build_rtti_vtbl_entries): Adjust.
16506         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
16507         * init.c (expand_virtual_init): Simplify.
16508         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
16509         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
16510         * search.c (BINFO_ACCESS): New macro.
16511         (SET_BINFO_ACCESS): Likewise.
16512         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
16513         (access_in_type): Likewise.
16514         (dfs_accessible_p): Likewise.
16515         (protected_accessible_p): Likewise.
16516         (lookup_fnfields_1): Adjust documentation.
16517         (dfs_mark_primary_bases): Move to class.c
16518         (mark_primary_bases): Likewise.
16519         (dfs_vbase_unmark): Remove.
16520         (virtual_context): Use BINFO_FOR_VBASE.
16521         (dfs_get_vbase_types): Simplify.
16522         (dfs_build_inheritance_graph_order): New function.
16523         (get_vbase_types): Use it.
16524         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
16525
16526         * tinfo.cc (get_vbase_offset): New function.
16527         (__vmi_class_type_info::do_find_public_src): Use it.
16528         (__vmi_class_type_info::do_dyncast): Likewise.
16529         (__vmi_class_type_info::do_upcast): Likewise.
16530
16531 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
16532
16533         * lang-specs.h: Pass -fno-show-column to the preprocessor.
16534
16535 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
16536
16537         * rtti.c (class_hint_flags): Rename flags.
16538         (class_initializer): Remove flags.
16539         (synthesize_tinfo_var): Combine offset and flags. Add flags
16540         for __vmi_class_type_info.
16541         (create_tinfo_types): Remove flags from __class_type_info and
16542         __si_class_type_info. Merge flags and offset from
16543         base_class_type_info.
16544         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
16545         (__base_class_info::is_virtual_p): Adjust.
16546         (__base_class_info::is_public_p): Adjust.
16547         (__base_class_info::offset): New accessor.
16548         (__class_type_info::details): Remove member.
16549         (__class_type_info::__class_type_info): Lose details.
16550         (__class_type_info::detail_masks): Remove.
16551         (__si_class_type_info::__si_class_type_info): Lose details.
16552         (__vmi_class_type_info::details): New member.
16553         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
16554         (__vmi_class_type_info::detail_masks): New member.
16555         * tinfo.cc (__class_type_info::do_upcast): Initialize result
16556         with unknown_details_mask.
16557         (__vmi_class_type_info::do_find_public_src): Adjust
16558         (__vmi_class_type_info::do_dyncast): Adjust.
16559         (__vmi_class_type_info::do_upcast): Set result details, if
16560         needed. Adjust.
16561         (__dynamic_cast): Temporarily #if out optimization.
16562
16563 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
16564
16565         * rtti.c (get_tinfo_decl): Mark used.
16566         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
16567         mark as dealt with, if we output it.
16568
16569 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
16570
16571         * class.c: Reorganize to put virtual function table initialization
16572         machinery at the end of the file.
16573
16574 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
16575
16576         * class.c (finish_struct): Use bitsize_zero_node.
16577         * pt.c (instantiate_class_template): Likewise.
16578
16579 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
16580
16581         Put RTTI entries at negative offsets in new ABI.
16582         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
16583         vbase offset at index -3, not -1.
16584         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
16585         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
16586         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
16587         (build_rtti_vtbl_entries): New function.
16588         (set_rtti_entry): Remove.
16589         (build_primary_vtable): Don't use it.
16590         (build_secondary_vtable): Likewise.
16591         (start_vtable): Remove.
16592         (first_vfun_index): New function.
16593         (set_vindex): Likewise.
16594         (add_virtual_function): Don't call start_vtable.  Do call
16595         set_vindex.
16596         (set_primary_base): Rename parameter.
16597         (determine_primary_base): Likewise.
16598         (num_vfun_entries): Don't use skip_rtti_stuff.
16599         (num_extra_vtbl_entries): Include RTTI information.
16600         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
16601         (skip_rtti_stuff): Remove.
16602         (dfs_modify_vtables): Don't use it.
16603         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
16604         (layout_nonempty_base_or_field): Update size handling.
16605         (create_vtable_ptr): Tweak.
16606         (layout_class_type): Adjust parameter names.
16607         (finish_struct_1): Simplify.
16608         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
16609         (skip_rtti_stuff): Remove.
16610         (first_vfun_index): New function.
16611         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
16612         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
16613         (marked_vtable_pathp): Declare.
16614         (unmarked_vtable_pathp): Likewise.
16615         * error.c (dump_expr): Use first_vfun_index to calculate vtable
16616         offsets.
16617         * rtti.c (build_headof): Look for RTTI at negative offsets.
16618         (get_tinfo_decl_dynamic): Likewise.
16619         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
16620         here.
16621         (create_pseudo_type_info): Do it here instead.  Adjust so that
16622         vptr points at first virtual function.
16623         * search.c (marked_vtable_pathp): Make it global.
16624         (unmarked_vtable_pathp): Likewise.
16625         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
16626         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
16627         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
16628         (get_pure_virtuals): Likewise.
16629         (expand_upcast_fixups): Likewise.
16630         * tree.c (debug_binfo): Likewise.
16631         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
16632         negative offset.
16633
16634 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16635
16636         * class.c (check_field_decl): Fix typo.
16637         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
16638         (check_methods): Likewise.
16639         (check_field_decls): Likewise.
16640         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
16641         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
16642         Use DECL_RESULT_FLD, not DECL_RESULT.
16643         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
16644         * lex.c (identifier_type): Likewise.
16645         * pt.c (determine_specialization, lookup_template_class): Likewise.
16646         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
16647         (resolve_overloaded_unification, more_specialized): Likewise.
16648         * semantics.c (finish_member_declaration): Likewise.
16649         * typeck.c (build_x_function_call): Likewise.
16650
16651 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
16652
16653         * class.c (layout_empty_base): Handle empty bases with non-byte
16654         alignment.
16655         (build_base_field): Likewise.
16656         (layout_virtual_bases): Likewise.
16657
16658         * class.c (finish_struct_1): Fix typo in this change:
16659
16660         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16661
16662 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
16663
16664         * decl.c (grokdeclarator): Count partial specializations when
16665         keeping track of how many template classes have been seen.
16666
16667         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
16668
16669 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16670
16671         * class.c (build_vbase_pointer_fields): layout_field now place_field.
16672         (get_vfield_offset): Use byte_position.
16673         (set_rtti_entry): Set OFFSET to ssizetype zero.
16674         (get_binfo_offset_as_int): Deleted.
16675         (dfs_record_base_offsets): Use tree_low_cst.
16676         (dfs_search_base_offsets): Likewise.
16677         (layout_nonempty_base_or_field): Reflect changes in RLI format
16678         and call byte_position.
16679         (layout_empty_base): Convert offset to ssizetype.
16680         (build_base_field): use rli_size_unit_so_far.
16681         (dfs_propagate_binfo_offsets): Do computation in proper type.
16682         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
16683         (layout_class_type): Reflect changes in RLI names and fields.
16684         (finish_struct_1): Set DECL_FIELD_OFFSET.
16685         * dump.c (dequeue_and_dump): Call bit_position.
16686         * expr.c (cplus_expand_constant): Use byte_position.
16687         * rtti.c (expand_class_desc): Use bitsize_one_node.
16688         * typeck.c (build_component_addr): Use byte_position and don't
16689         special case for zero offset.
16690
16691 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
16692
16693         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
16694
16695         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
16696         tinfo object.
16697         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
16698         vtable.
16699
16700 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16701
16702         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
16703         DECL_P macros.
16704         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
16705         make_typename_type, check_initializer, cp_finish_decl,
16706         xref_tag): Likewise.
16707         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
16708         decl_namespace, arg_assoc_template_arg, arg_assoc,
16709         validate_nonmember_using_decl, do_class_using_decl): Likewise.
16710         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
16711         args_to_string): Likewise.
16712         * friend.c (is_friend): Likewise.
16713         * lex.c (note_got_semicolon, note_list_got_semicolon,
16714         is_global): Likewise.
16715         * method.c (build_overload_nested_name, build_overload_value,
16716         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
16717         * parse.y (typename_sub, typename_sub1): Likewise.
16718         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
16719         process_partial_specialization, convert_template_argument,
16720         template_args_equal, add_pending_template, lookup_template_class,
16721         for_each_template_parm_r, maybe_fold_nontype_arg,
16722         tsubst, instantiate_template, type_unification_real, unify,
16723         instantiate_pending_templates, set_mangled_name_for_template_decl):
16724         Likewise.
16725         * repo.c (repo_get_id, repo_template_used): Likewise.
16726         * search.c (lookup_field_1): Likewise.
16727         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
16728         * xref.c (classname): Likewise.
16729
16730 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
16731
16732         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
16733         (CANONICAL_BINFO): New macro.
16734         (BINFO_NEW_VTABLE_MARKED): Use it.
16735         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
16736         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
16737         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
16738         not TREE_TYPE.
16739         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
16740         (build_secondary_vtable): Likewise.
16741         (dfs_finish_vtbls): Likewise.
16742         (dfs_accumulate_vtbl_inits): Likewise.
16743         (accumulate_vtbl_inits): New function.
16744         (finish_vtbls): Make sure that virtual bases come after
16745         non-virtual bases in the vtable group.
16746         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
16747         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
16748         * search.c (struct vbase_info): Move definition.
16749         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
16750         (unmarked_new_vtable_p): Likewise.
16751         (dfs_mark_vtable_path): Remove.
16752         (dfs_mark_new_vtable): Remove.
16753         (dfs_unmark_new_vtable): Likewise.
16754         (dfs_clear_search_slot): Likewise.
16755         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
16756         (dfs_clear_vbase_slots): Likewise.
16757         (init_vbase_pointers): LIkewise.
16758
16759 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
16760
16761         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
16762         SIZETYPE to a non-SIZETYPE.
16763
16764 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
16765
16766         * class.c (layout_virtual_bases): Adjust names in conditionally
16767         compiled code.
16768
16769         * class.c (record_base_offsets): New function.
16770         (layout_conflict_p): Likewise.
16771         (layout_nonempty_base_or_field): Use it.
16772         (layout_empty_base): New function.
16773         (build_base_field): Use it.
16774         (build_base_fields): Update comment.
16775         (layout_virtual_bases): Fold in a little code form
16776         layout_basetypes.  Use layout_empty_base.
16777         (layout_basetypes): Remove.
16778         (end_of_class): New function.
16779         (layout_class_type): Use it.  Adjust.
16780
16781         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
16782         (fntype_p): Remove.
16783         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
16784         comment.
16785         (dfs_skip_nonprimary_vbases_markedp): Likewise.
16786         * typeck.c (fntype_p): Remove.
16787
16788         * cp-tree.h (TI_SPEC_INFO): Remove.
16789         (CLASSTYPE_TI_SPEC_INFO): Likewise.
16790         * pt.c (process_partial_specialization): Likewise.
16791
16792         * class.c (build_base_field): Fix thinko in computation of binfo
16793         offsets.
16794
16795         * tree.c (mark_local_for_remap_p): Mark variables declared in
16796         TARGET_EXPRs as well.
16797
16798 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
16799
16800         * typeck.c (require_complete_type, complete_type,
16801         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
16802         build_array_ref, convert_arguments, pointer_diff,
16803         build_x_unary_op, build_unary_op, build_c_cast,
16804         build_modify_expr): Use COMPLETE_TYPE_P etc.
16805         * call.c (is_complete, convert_like_real,
16806         build_new_method_call): Likewise.
16807         * class.c (build_vbase_pointer_fields, check_bases,
16808         build_base_field, finish_struct_1, pushclass): Likewise.
16809         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
16810         * decl.c (maybe_process_template_type_declaration, pushtag,
16811         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
16812         layout_var_decl, check_initializer, cp_finish_decl,
16813         grokdeclarator, require_complete_types_for_parms,
16814         grok_op_properties, xref_tag, xref_basetypes,
16815         check_function_type): Likewise.
16816         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
16817         * friend.c (do_friend): Likewise.
16818         * init.c (build_offset_ref): Likewise.
16819         * parse.y (structsp): Likewise.
16820         * pt.c (maybe_process_partial_specialization,
16821         tsubst_friend_function, instantiate_class_template, tsubst,
16822         do_type_instantiation, instantiate_pending_templates): Likewise.
16823         * repo.c (repo_get_id): Likewise.
16824         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
16825         synthesize_tinfo_var, emit_support_tinfos): Likewise.
16826         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
16827         * semantics.c (begin_class_definition): Likewise.
16828         * tree.c (build_cplus_method_type): Likewise.
16829         * typeck2.c (digest_init, build_functional_cast,
16830         add_exception_specifier): Likewise.
16831         * parse.h, parse.c: Regenerated.
16832
16833 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
16834
16835         * inc/cxxabi.h: New header file. Define new-abi entry points.
16836         (__pointer_type_info::target): Rename member to ...
16837         (__pointer_type_info::type): ... here.
16838         (__base_class_info::type): Rename member to ...
16839         (__base_class_info::base): ... here.
16840         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
16841         * cp-tree.h (CPTI_ABI): New global tree enumeration.
16842         (abi_node): New global tree node.
16843         * decl.c (abi_node): Document.
16844         (init_decl_processing): Initialize abi_node.
16845         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
16846         (get_vmi_pseudo_type_info): Likewise.
16847         (create_tinfo_types): Likewise.
16848         (emit_support_tinfos): Likewise.
16849         * tinfo.h (cxxabi.h): Include for new-abi.
16850         Move rtti class definitions to new header file.
16851         * tinfo.cc (abi): Use the namespace.
16852         (std): Move new abi rtti classes from here ...
16853         (__cxxabiv1): ... to here.
16854         * tinfo2.cc (cxxabi.h): Include for new-abi.
16855         Move rtti class definitions to new header file.
16856         (std): Move new abi rtti classes from here ...
16857         (__cxxabiv1): ... to here.
16858         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
16859         namespace.
16860
16861 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
16862             Jason Merrill  <jason@casey.cygnus.com>
16863
16864         * method.c (build_overload_int): Use host_integerp.
16865
16866 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16867
16868         * init.c (build_offset_ref): Handle the case of a templated member
16869         function.
16870
16871 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16872
16873         * except.c (expand_exception_blocks): Clear catch_clauses_last.
16874
16875 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
16876
16877         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
16878         * class.c (check_bitfield_decl): Turn illegal bitfields into
16879         non-bitfields.
16880         (dfs_propagate_binfo_offsets): Adjust for new size_binop
16881         semantics.
16882         (dfs_offset_for_unshared_vbases): Likewise.
16883         * cvt.c (cp_convert_to_pointer): Convert NULL to a
16884         pointer-to-member correctly under the new ABI.
16885         * expr.c (cplus_expand_constant): Don't use cp_convert when
16886         turning an offset into a pointer-to-member.
16887         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
16888         when dereferencing them under the new ABI.
16889         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
16890         of pointers-to-members under the new ABI.
16891
16892         * class.c (check_bitfield_decl): Remove restriction on really long
16893         bitfields.
16894         (layout_class_type): Implement new ABI handling of bitfields
16895         longer than their types.
16896
16897 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16898
16899         * parse.y (extdefs): Call ggc_collect.
16900         * parse.c: Regenerated.
16901
16902 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
16903
16904         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
16905         (note_name_declared_in_class): Use OVL_CURRENT to get at a
16906         potential overload.
16907
16908 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16909
16910         * class.c (build_vbase_path): Use integer_zerop.
16911         (build_vtable_entry): Use tree_low_cst.
16912         (get_vfield_offset): Use bit_position.
16913         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
16914         Use tree_low_cst.
16915         (check_bitfield_decl): Set DECL_SIZE using convert.
16916         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
16917         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
16918         Use tree_low_cst.
16919         (finish_struct_1): Use bit_position.
16920         (dump_class_hierarchy): Use tree_low_cst.
16921         * cp-tree.h (min_precision): Add declaration.
16922         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
16923         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
16924         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
16925         * expr.c (cplus_expand_constant): Use bit_position.
16926         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
16927         * rtti.c (get_base_offset): Use bit_position.
16928         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
16929         host_integerp, and tree_low_cst.
16930         (pointer_int_sum): Use integer_zerop.
16931         (build_component_addr): Use bit_position.
16932
16933 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
16934
16935         * typeck.c (require_complete_type): Don't assume size_zero_node.
16936         (complete_type_or_else): Likewise.
16937
16938 2000-03-16  Steven Grady <grady@digitaldeck.com>
16939             Jason Merrill  <jason@casey.cygnus.com>
16940
16941         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
16942
16943 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
16944
16945         * decl2.c (grokfield): Bail out if type is error_mark_node.
16946
16947 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
16948
16949         * tinfo2.cc (__ptr_to_member_data): Rename to ...
16950         (__pointer_to_member_data): ... here. Adjust.
16951         * rtti.c (create_tinfo_types): Adjust.
16952
16953 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
16954
16955         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
16956         * decl.c (ref_desc_type_node): Undocument.
16957         * rtti.c (ptr_ref_initializer): Rename to ...
16958         (ptr_initializer): ... here. Adjust comments.
16959         (ptmd_initializer): Fix comment thinko.
16960         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
16961         (create_tinfo_types): Remove ref_desc_type_node init.
16962         * tinfo2.cc (__reference_type_info): Remove.
16963
16964 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
16965
16966         * decl.c (cp_finish_decl): Remove obsolete comment.
16967
16968         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
16969
16970 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
16971
16972         * cp-tree.h: Tweak documentation.
16973         * class.c (build_vbase_pointer_fields): Layout the fields, too.
16974         (avoid_overlap): Remove.
16975         (get_binfo_offset_as_int): New function.
16976         (dfs_serach_base_offsets): Likewise.
16977         (layout_nonempty_base_or_field): Likewise.
16978         (build_base_field): Layout fields here.  Avoid placing two objects
16979         of the same type at the same address, under the new ABI.
16980         (build_base_fields): Adjust accordingly.
16981         (create_vtable_ptr): Return the new field, but don't attach it to
16982         TYPE_FIELDS.
16983         (remove_base_field): Remove.
16984         (remove_base_fields): Remove.
16985         (layout_basetypes): Adjust accordingly.
16986         (layout_class_type): Call layout_field for each field, rather than
16987         just making a wholesale call to layout_type.
16988
16989 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
16990
16991         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
16992
16993 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
16994
16995         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
16996
16997         * except.c (dtor_nothrow): New fn.
16998         (do_pop_exception): Use it.  Take type parm.
16999         (push_eh_cleanup): Take type parm.
17000         (expand_start_catch_block): Pass it.
17001         (build_eh_type_type_ref): Accept null type.
17002
17003 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
17004
17005         * cp-tree.h (revert_static_member_fn): Change prototype.
17006         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
17007         (grok_op_properties): Likewise.
17008         (start_function): Likewise.
17009         (revert_static_member_fn): Simplify.
17010         * pt.c (check_explicit_specialization): Adjust call to
17011         revert_static_member_fn.
17012
17013 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
17014
17015         * cp-tree.h (scope_kind): New type.
17016         (tmpl_spec_kind): Likewise.
17017         (declare_pseudo_global_level): Remove.
17018         (pseudo_global_level_p): Rename to template_parm_scope_p.
17019         (pushlevel): Remove declaration.
17020         (begin_scope): New function.
17021         (finish_scope): Likewise.
17022         (current_tmpl_spec_kind): Likewise.
17023         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
17024         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
17025         Add template_spec_p.
17026         (toplevel_bindings_p): Adjust.
17027         (declare_pseudo_global_level): Remove.
17028         (pseudo_global_level_p): Rename to template_parm_scope_p.
17029         (current_tmpl_spec_kind): New function.
17030         (begin_scope): Likewise.
17031         (finish_scope): Likewise.
17032         (maybe_push_to_top_level): Adjust.
17033         (maybe_process_template_type_declaration): Likewise.
17034         (pushtag): Likewise.
17035         (pushdecl_nonclass_level): Likewise.
17036         (lookup_tag): Likewise.
17037         (grokfndecl): Handle member template specializations.  Share
17038         constructor and non-constructor code.
17039         * decl2.c (check_classfn): Handle member template specializations.
17040         * pt.c (begin_template_parm_list): Use begin_scope.
17041         (begin_specialization): Likewise.
17042         (end_specialization): Likewise.
17043         (check_explicit_specialization): Use current_tmpl_spec_kind.
17044         Handle member template specializations.
17045         (end_template_decl): Use finish_scope.  Remove call to
17046         get_pending_sizes.
17047         (push_template_decl_real): Remove bogus error message.
17048         (tsubst_decl): Fix typo in code contained in comment.
17049         (instantiate_template): Handle member template specializations.
17050         (most_general_template): Likewise.
17051
17052 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
17053
17054         * lex.c (whitespace_cr): Compress consecutive calls to warning().
17055         (do_identifier): Ditto for error().
17056
17057         * pt.c (convert_nontype_argument): Ditto for cp_error().
17058         (convert_template_argument): Ditto for cp_pedwarn().
17059
17060 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
17061
17062         * exception.cc (__check_null_eh_spec): New fn.
17063         * except.c (expand_end_eh_spec): Call it if the spec is throw().
17064
17065 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
17066
17067         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
17068         * except.c (expand_end_eh_spec): Add the return type.
17069         * rtti.c (throw_bad_cast): Add the parmtypes.
17070         (throw_bad_typeid): Likewise.
17071
17072         * semantics.c (expand_stmt): Only leave out rtl for unused
17073         artificials, and set DECL_IGNORED_P on them as well.
17074         * decl.c (wrapup_globals_for_namespace): Likewise.
17075
17076 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
17077
17078         * decl.c (maybe_commonize_var): Skip all artificial decls.
17079         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
17080
17081 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
17082
17083         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
17084         * cp-tree.h: Declare flag_enforce_eh_specs.
17085         * decl.c (store_parm_decls, finish_function): Check it.
17086
17087         C library functions don't throw.
17088         * Makefile.in (cfns.h): New target.
17089         (except.o): Depend on it.
17090         * Make-lang.in (cc1plus): Depend on cfns.gperf.
17091         * cfns.gperf: New file.
17092         * cfns.h: Generated.
17093         * except.c: Include it.
17094         (nothrow_libfn_p): New fn.
17095         * decl.c (grokfndecl): Use it.
17096         * cp-tree.h: Declare it.
17097
17098         * decl.c (push_overloaded_decl_1, auto_function,
17099         define_function): Lose.
17100         (build_library_fn_1): New static fn.
17101         (builtin_function): Use it.
17102         (get_atexit_node): Use build_library_fn_ptr.
17103         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
17104         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
17105         push_void_library_fn, push_throw_library_fn): New fns.
17106         * cp-tree.h: Declare them.
17107         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
17108         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
17109         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
17110         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
17111         * rtti.c (build_runtime_decl): Lose.
17112         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
17113         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
17114         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
17115
17116         * call.c (build_call): Remove result_type parm.
17117         Call mark_used on unused artificial fns.
17118         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
17119
17120 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
17121
17122         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
17123         appropriate.
17124         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
17125         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
17126         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
17127         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
17128         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
17129         expand_generic_desc): Likewise.
17130
17131 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
17132
17133         * exception.cc (__cp_pop_exception): Cleanup the original object.
17134
17135 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
17136
17137         * decl.c (grok_op_properties): Merge conversion to void warning
17138         with other silly op warnings.
17139
17140 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
17141
17142         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
17143         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
17144
17145 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
17146
17147         * decl.c (cp_make_fname_decl): New function.
17148         (wrapup_globals_for_namespace): Don't emit unused static vars.
17149         (init_decl_processing): Remove comment about use of
17150         array_domain_type. Set make_fname_decl.
17151         (cp_finish_decl): Remove __FUNCTION__ nadgering.
17152         * semantics.c (begin_compound_stmt): Remove
17153         current_function_name_declared flagging.
17154         (expand_stmt): Don't emit unused local statics.
17155         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
17156         specially.
17157
17158 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
17159
17160         * typeck.c (convert_for_assignment): Don't look at array
17161         initializer.
17162         * call.c (convert_like_real): Likewise.
17163
17164 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
17165
17166         Add initial support for '\uNNNN' specifier.
17167         * lex.c (read_ucs): New fn.
17168         (readescape, skip_white_space): Call it.
17169         (is_extended_char, is_extended_char_1): New fns.
17170         (utf8_extend_token): New fn, #if 0'd out.
17171         (real_yylex): Treat extended chars like letters.
17172
17173         * search.c (note_debug_info_needed): Walk the bases even if we
17174         weren't deferring the type itself.
17175
17176 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17177
17178         * decl2.c (finish_objects): Constify a char*.
17179
17180         * method.c (emit_thunk): Likewise.
17181
17182 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
17183
17184         * typeck.c (dubious_conversion_warnings): Look through
17185         REFERENCE_TYPE.
17186
17187 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17188
17189         * class.c (dfs_modify_vtables): I is now unsigned.
17190         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
17191         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
17192         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
17193         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
17194         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
17195         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
17196         Call integer_all_onesp.
17197         * typeck2.c (process_init_constructor): Use compare_tree_int.
17198
17199         * lang-specs.h (as): Don't call if -syntax-only.
17200
17201 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
17202
17203         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
17204         RTL_EXPR_HAS_NO_SCOPE after all.
17205
17206 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
17207
17208         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
17209         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
17210         RTL_EXPR_HAS_NO_SCOPE.
17211
17212         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
17213         later.
17214
17215         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
17216
17217 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
17218
17219         * call.c (convert_like): Macrofy.
17220         (convert_like_with_context): New macro.
17221         (convert_like_real): Renamed from convert_like.  Add calling
17222         context parameters, for diagnostics. Add recursive flag.  Call
17223         dubious_conversion_warnings for outer conversion.
17224         (build_user_type_conversion): Use convert_like_with_context.
17225         (build_over_call): Likewise. Don't warn about dubious
17226         conversions here. Adjust convert_default_arg calls.
17227         (convert_default_arg): Add context parameters for diagnostics.
17228         Pass through to convert_like_with_context.
17229         * cp-tree.h (convert_default_arg): Add context parameters.
17230         (dubious_conversion_warnings): Prototype new function.
17231         * typeck.c (convert_arguments): Adjust convert_default_arg call.
17232         (dubious_conversion_warnings): New function, broken
17233         out of convert_for_assignment.
17234         (convert_for_assignment): Adjust.
17235
17236 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
17237
17238         * decl2.c (key_method): Break out from...
17239         (import_export_vtable, import_export_class): ...here.
17240
17241         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
17242         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
17243
17244         * search.c (note_debug_info_needed, dfs_debug_mark,
17245         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
17246         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
17247
17248 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
17249
17250         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
17251         typos.
17252
17253 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
17254
17255         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
17256         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
17257         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
17258         (lang_type): Split gets_new into has_new and has_array_new.
17259         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
17260         (TYPE_GETS_NEW): Split into ...
17261         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
17262         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
17263         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
17264         (build_op_new_call): Don't declare.
17265         (build_new_1): Likewise.
17266         * call.c (build_op_new_call): Remove.
17267         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
17268         instead of TYPE_NEEDS_DESTRUCTOR.
17269         (finish_struct_bits): Likewise.
17270         (add_implicitly_declared_members): Likewise.
17271         (check_field_decl): Likewise.
17272         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
17273         correctly under the new ABI.
17274         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
17275         instead of TYPE_NEEDS_DESTRUCTOR.
17276         (initialize_local_var): Likewise.
17277         (destroy_local_var): Likewise.
17278         (cp_finish_decl): Likewise.
17279         (register_dtor_fn): Likewise.
17280         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
17281         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
17282         TYPE_VEC_DELETE_TAKES_SIZE here.
17283         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
17284         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
17285         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
17286         (finish_destructor_body): Likewise.
17287         (maybe_build_cleanup_1): Likewise.
17288         * decl2.c (do_static_destruction): Likewise.
17289         * init.c (build_new_1): Make it static.
17290         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
17291         (expand_cleanup_for_base): Likewise.
17292         (get_cookie_size): New function.
17293         (build_new_1): Handle array-new cookies correctly under the new
17294         ABI.
17295         (build_vec_delete_1): Likewise.
17296         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
17297         (build_delete): Likewise.
17298         (build_vec_delete): Handle array-new cookies correctly under the new
17299         ABI.
17300         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
17301         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
17302         TYPE_HAS_ARRAY_NEW_OPERATOR.
17303         * ptree.c (print_lang_type): Check them.
17304         * search.c (context_for_name_lookup): Fix typo in comment.
17305         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
17306         * tree.c (break_out_cleanups): Likewise.
17307         (build_cplus_array_test_1): Likewise.
17308         (cp_build_qualified_type_real): Likewise.
17309         * typeck.c (complete_type): Likewise.
17310
17311         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
17312         the command-line, not the end.
17313
17314 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
17315
17316         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
17317
17318 2000-03-02  Tom Tromey  <tromey@cygnus.com>
17319
17320         * cp-tree.h (build_java_class_ref): Declare.
17321         * init.c (build_java_class_ref): No longer static.
17322         * except.c (expand_throw): Generate a Java-style `throw' if the
17323         thrown object is a "Java" object.
17324         (initialize_handler_parm): Generate a Java-style lookup of
17325         exception info if the caught object is a "Java" object.
17326         (catch_language, catch_language_init): New globals.
17327         (decl_is_java_type): New function.
17328         (expand_start_catch_block): Don't call push_eh_info() or
17329         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
17330         class reference to build_catch_block.
17331
17332 2000-03-02  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17333
17334         * typeck.c (comptypes): Treat sizetype like its language equivalent.
17335
17336 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
17337
17338         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
17339         to merge reference/pointer code and fix incorrect warnings.
17340
17341 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
17342
17343         * search.c (protected_accessible_p): Use context_for_name_lookup.
17344
17345         * init.c (construct_virtual_bases): Fix thinko.
17346         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
17347
17348 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
17349
17350         * decl.c (current_function_decl): Move to toplev.c.
17351
17352 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
17353
17354         * pt.c (fn_type_unification): Unify return type, whenever
17355         provided.
17356         (get_bindings_real): Only pass return type when necessary.
17357         Remove explicit return type check.
17358         * class.c (resolve_address_of_overloaded_function): Pass desired
17359         return type to fn_type_unification.
17360
17361 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17362
17363         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
17364         DECL_FIELD_SIZE.
17365         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
17366         DECL_FIELD_SIZE.
17367         * rtti.c (expand_class_desc): Likewise.
17368         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
17369         (THUNK_VCALL_OFFSET): Likewise.
17370         (THUNK_DELTA): Reflect changes in ../tree.h.
17371
17372 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
17373
17374         * search.c (protected_accessible_p): Also allow the access if
17375         the member is public in DERIVED.  Lose TYPE parm.
17376         (friend_accessible_p): Lose TYPE parm.
17377         (accessible_p): Adjust.
17378
17379 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17380
17381         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
17382         on things that are not sizes; ssize_binop deleted.
17383         Call size_diffop when appropriate.
17384         (dfs_build_vcall_offset_vtbl_entries): Likewise.
17385         (build_primary_vtable, build_secondary_vtable): Likewise.
17386         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
17387         Variable I is HOST_WIDE_INT.
17388         (get_vfield_offset): Pass proper types to size_binop.
17389         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
17390         (finish_struct_1): Likewise.
17391         (skip_rtti_stuff): Arg N is now pointer to signed.
17392         (layout_class_type): Use size_zero_node.
17393         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
17394         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
17395         * decl.c (complete_arry_type): Pass proper types to size_binop.
17396         (xref_basetypes): BINFO_OFFSET is sizetype.
17397         * error.c (dump_expr): Don't use size_binop non-sizes.
17398         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
17399         * init.c (construct_virtual_bases): Fix type error.
17400         (build_vec_delete_1): Pass proper type to size_binop and don't
17401         fold result.
17402         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
17403         * rtti.c (get_base_offset): Pass proper type to size_binop.
17404         * search.c (dfs_find_vbases): Fix type error.
17405         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
17406         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
17407         * tree.c (debug_binfo): Variable N is signed.
17408         Use HOST_WIDE_INT_PRINT_DEC.
17409         * typeck.c (comptypes): sizetype is same as equivalent integer type.
17410         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
17411         size_one_node and size_zero_node.
17412         (c_alignof): Use size_one_node.
17413         (build_component_addr): Pass proper types to size_binop.
17414         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
17415
17416 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
17417
17418         Implement class scope using-declarations for functions.
17419         * class.c (handle_using_decl): Call add_method for used functions.
17420         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
17421         (add_method): Used functions are hidden by local functions.
17422         (check_bases_and_members): Handle using-decls before finalizing
17423         CLASSTYPE_METHOD_VEC.
17424         * call.c (add_function_candidate): Add ctype parm; if nonzero,
17425         override the type of 'this' accordingly.
17426         (add_template_candidate, add_template_candidate_real): Add ctype parm.
17427         (convert_class_to_reference, build_user_type_conversion_1,
17428         build_new_function_call, build_object_call, build_new_op,
17429         build_new_method_call): Pass ctype parm.
17430
17431         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
17432         the baselink.
17433         * call.c (convert_class_to_reference, build_user_type_conversion_1,
17434         build_new_function_call, build_object_call, build_new_op,
17435         build_new_method_call, build_op_delete_call): Don't get basetype_path
17436         from a baselink.
17437         * typeck.c (build_component_ref): Likewise.
17438         * init.c (build_offset_ref): Likewise.
17439         (resolve_offset_ref): Don't call enforce_access.
17440         Call build_scoped_ref.
17441         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
17442         would cause an error or if -pedantic.
17443         * class.c (alter_access): Lose binfo parm.
17444
17445 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
17446
17447         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
17448         types.
17449
17450 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
17451
17452         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
17453         pseudo_type_info creation into the std namespace
17454
17455 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
17456
17457         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
17458         (import_export_class): Remove declaration.
17459         * decl2.c (import_export_class): Make it static.
17460         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
17461         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
17462         EXPR_WITH_FILE_LOCATION.
17463         * lex.c (check_newline): Tweak filename/lineno setting.
17464         * semantics.c (begin_while_stmt): Fix typo in comment.
17465
17466 2000-02-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17467
17468         * lang-options.h (-fmessage-length=): Add missing option.
17469
17470         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
17471
17472 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
17473
17474         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
17475
17476 2000-02-25  Jim Wilson  <wilson@cygnus.com>
17477
17478         * optimize.c (expand_call_inline): Emit the return label before
17479         evaluating the return value.
17480
17481 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
17482
17483         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
17484         than duplicating functionality here.
17485         * optimize.c: Include input.h.
17486         (expand_call_inline): Use push_srcloc and pop_srcloc.
17487         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
17488         * parse.c: Regenerated.
17489         * Makefile.in (lex.o): Depend on input.h.
17490         (optimize.o): Likewise.
17491
17492 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
17493
17494         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
17495         function type, rather than ICE.
17496
17497 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
17498
17499         * decl.c (grokdeclarator): Call decl_type_access_control.
17500         * parse.y (parse_end_decl): Don't call decl_type_access_control if
17501         decl is null.
17502
17503 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
17504
17505         * decl.c (decls_match): Remove obsolete static member nadgering.
17506
17507 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17508
17509         * decl.c (grokdeclarator): Change ANSI to ISO.
17510         * lex.c (consume_string, readescape, do_identifier): Likewise.
17511         (parse_float, real_yylex): Likewise.
17512         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
17513         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
17514         new_type_id, maybe_label_decls, simple_stmt,
17515         for.init.statement): Likewise.
17516         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
17517         * semantics.c (finish_named_return_value): Likewise.
17518         * parse.c: Regenerate.
17519
17520 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
17521
17522         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
17523         (CPTI_CLASS_STAR_TYPE): Remove.
17524         (vtable_index_type): Likewise.
17525         (class_star_type_node): Remove.
17526         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
17527         (build_binary_op_nodefault): Remove.
17528         * call.c (build_new_op): Use build_binary_op instead of
17529         build_binary_op_nodefault.
17530         * decl.c (init_decl_processing): Remove class_star_type_node
17531         initialization.  Make delta_type_node ptrdiff_type_node under the
17532         new ABI.  Initialize vtable_index_type.
17533         (build_ptrmemfunc_type): Build different structures for the new
17534         ABI.
17535         (build_enumerator): Use build_binary_op instead of
17536         build_binary_op_nodefault.
17537         * method.c (build_overload_value): Mangle pointers-to-members
17538         appropriately under the new ABI.
17539         * typeck.c (build_array_ref): Use build_binary_op instead of
17540         build_binary_op_nodefault.
17541         (get_member_function_from_ptrfunc): Adjust for the new ABI.
17542         (build_binary_op_nodefault): Rename to ...
17543         (build_binary_op): ... this.  Remove old version.  Adjust for
17544         pointer-to-member comparisons under the new ABI.
17545         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
17546         (build_ptrmemfunc): Adjust for the new ABI.
17547         (expand_ptrmemfunc_cst): Likewise.
17548         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
17549         (pfn_from_ptrmemfunc): Adjust for the new ABI.
17550
17551 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
17552
17553         * call.c (build_object_call): Compress consecutive calls to
17554         cp_error.
17555         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
17556         (build_op_delete_call): Adjust message formatting.
17557
17558         * class.c (check_bases): Compress consecutive calls to
17559         cp_pedwarn.
17560         (finish_struct_anon): Say 'ISO C++'.
17561
17562         * decl.c (start_decl): Same here.
17563         (grok_reference_init): Likewise.
17564         (grokfndecl): Correct message formatting.
17565         (grokfndecl): Improve diagnostic.
17566         (check_static_variable_definition): Likewise. Say 'ISO C++'
17567         (compute_array_index_type): Say 'ISO C++'
17568         (create_array_type_for_decl): Compress consecutive calls to
17569         cp_error.
17570         (grokdeclarator): Say 'ISO C++'
17571         (grok_op_properties): Likewise.
17572
17573         * decl2.c (delete_sanity): Clairify diagnostic.
17574         (check_member_template): Same here.
17575         (grok_function_init): Use consistent terminology.
17576
17577         * expr.c (do_case): Say 'ISO C++'
17578
17579         * friend.c (do_friend): Compress consecutive calls to warning.
17580
17581 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
17582
17583         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
17584         * class.c (build_secondary_vtable): Reorganize.  Don't create a
17585         new vtable under the new ABI.
17586         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
17587         computing the size.
17588         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
17589         the initializing elements.
17590         (initialize_vtable): New function.
17591         (dfs_finish_vtbls): Use it.
17592         (dfs_accumulate_vtbl_inits): New function.
17593         (finish_vtbls): Merge primary and secondary vtables under the new
17594         ABI.
17595         (finish_struct_1): Remove redundant call to layout_vtable_decl.
17596         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
17597         aren't VAR_DECLs.
17598
17599         * class.c (build_vtable): New function, split out from ...
17600         (get_vtable_decl): ... here, and ...
17601         (build_secondary_vtable): ... here.
17602
17603         * pt.c (tsubst_decl): Fix formatting.
17604
17605 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17606
17607         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
17608         (avoid_overlap, build_base_field): Likewise.
17609         (build_base_field, build_base_fields, is_empty_class):
17610         Test DECL_SIZE with integer_zero.
17611         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
17612         * cp-tree.h (struct lang_type): New field size_unit.
17613         (CLASSTYPE_SIZE_UNIT): New macro.
17614         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
17615         (cp_finish_decl): Delete -Wlarger-than processing.
17616         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
17617         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
17618         * tree.c (make_binfo): binfo vector is one entry longer.
17619         (walk_tree): Walk DECL_SIZE_UNIT.
17620
17621 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
17622
17623         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
17624         comment.
17625         (build_vtable_entry): Don't assume all vtable entries are
17626         functions.
17627         (build_vtbl_initializer): Adjust accordingly.
17628         (get_vtable_decl): Fix formatting.
17629
17630 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
17631
17632         * semantics.c (deferred_type_access_control): Walk the entire
17633         type_lookups list.
17634         (save_type_access_control): Rename from
17635         initial_deferred_type_access_control.  Just remember the value.
17636         (decl_type_access_control): New fn.
17637         (begin_function_definition): Use deferred_type_access_control, after
17638         we've started the function.  Set type_lookups to error_mark_node.
17639         * parse.y (frob_specs, fn.def1): Adjust.
17640         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
17641         (parse_end_decl, parse_bitfield0, parse_method): New fns.
17642         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
17643         (after_type_component_declarator0): Likewise.
17644         (after_type_component_declarator): Likewise.
17645         (notype_component_declarator): Likewise.
17646         * cp-tree.h: Adjust.
17647
17648         * decl.c (redeclaration_error_message): Allow redeclaration of
17649         namespace-scope decls.
17650
17651 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
17652
17653         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
17654
17655 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
17656
17657         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
17658         * decl2.c (grokclassfn): Likewise.
17659
17660         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
17661
17662         * decl2.c (lang_decode_option): Don't set default message length
17663         here.
17664         * lex.c (lang_init_options): Set it here.
17665
17666 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
17667
17668         Make DECL_CONTEXT mean the class in which a member function was
17669         declared, even for a virtual function.
17670         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
17671         (DECL_FRIEND_CONTEXT): New macro.
17672         (DECL_REAL_CONTEXT): Remove.
17673         (SET_DECL_FRIEND_CONTEXT): Likewise.
17674         (DECL_VIRTUAL_CONTEXT): Adjust.
17675         (DECL_CLASS_SCOPE_P): Use TYPE_P.
17676         (add_friends): Remove.
17677         (hack_decl_function_context): Likewise.
17678         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
17679         CP_DECL_CONTEXT.
17680         (build_over_call): Fix indentation.  Use DECL_CONTEXT
17681         instead of DECL_CLASS_CONTEXT.
17682         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
17683         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
17684         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17685         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
17686         (build_base_field): Likewise.
17687         (finish_struct_1): Likewise.
17688         (build_self_reference): Likewise.
17689         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
17690         DECL_REAL_CONTEXT.
17691         (pushtag): Use decl_function_context, not
17692         hack_decl_function_context.
17693         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
17694         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
17695         (pushdecl): Remove bogus code.
17696         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
17697         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
17698         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17699         Use decl_function_context, nothack_decl_function_context.
17700         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
17701         (grokdeclarator): Likewise.  Use decl_function_context, not
17702         hack_decl_function_context.
17703         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
17704         (start_function): Use DECL_FRIEND_CONTEXT, not
17705         DECL_CLASS_CONTEXT.  Use decl_function_context, not
17706         hack_decl_function_context.
17707         (finish_function): Use decl_function_context, not
17708         hack_decl_function_context.
17709         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
17710         DECL_CLASS_CONTEXT.
17711         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
17712         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
17713         (grokfield): Likewise.
17714         (finish_builtin_type): Likewise.
17715         (finish_vtable_vardec): Use decl_function_context, not
17716         hack_decl_function_context.
17717         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17718         (start_static_initialization_or_destruction): Likewise.
17719         (finish_static_initialization_or_destruction): Likewise.
17720         (mark_used): Adjust logic for deciding when to synthesize methods.
17721         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
17722         DECL_REAL_CONTEXT.
17723         * error.c (dump_function_decl): Use DECL_CONTEXT, not
17724         DECL_CLASS_CONTEXT.
17725         * friend.c (is_friend): Likewise.
17726         (add_friends): Remove.
17727         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
17728         * lex.c (begin_definition_of_inclass_inline): Use
17729         decl_function_context, not hack_decl_function_context.
17730         (process_next_inline): Likewise.
17731         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
17732         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
17733         DECL_CLASSS_CONTEXT.
17734         (hack_identifier): Likewise.
17735         (synthesize_method):  Use decl_function_context, not
17736         hack_decl_function_context.
17737         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
17738         DECL_REAL_CONTEXT.
17739         (is_member_template): Use decl_function_context, not
17740         hack_decl_function_context.  Use DECL_CONTEXT, not
17741         DECL_CLASS_CONTEXT.
17742         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
17743         DECL_CLASS_CONTEXT.
17744         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
17745         DECL_REAL_CONTEXT.
17746         (push_template_decl_real): Likewise.
17747         (instantiate_class_template): Don't call add_friends.
17748         (tsubst_default_argument): Use DECL_CONTEXT, not
17749         DECL_REAL_CONTEXT.
17750         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
17751         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17752         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
17753         DECL_CLASS_CONTEXT.
17754         * repo.c (repo_inline_used): Likewise.
17755         * search.c (current_scope): Adjust for new _CONTEXT macros.
17756         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
17757         DECL_REAL_CONTEXT.
17758         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17759         (lookup_fnfields_here):Likewise.
17760         (check_final_overrider): Likewise.
17761         (init_vbase_pointers): Likewise.
17762         (virtual_context): Likewise.
17763         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
17764         (expand_body): Use decl_function_context, not
17765         hack_decl_function_context.
17766         * tree.c (hack_decl_function_context): Remove.
17767         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
17768         DECL_CLASS_CONTEXT.
17769         * typeck2.c (error_not_base_type): Likewise.
17770
17771 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
17772
17773         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
17774
17775 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17776
17777         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
17778
17779 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
17780
17781         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
17782
17783 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
17784
17785         * decl2.c (lang_decode_option): Enable automatic line wrapping.
17786
17787 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
17788
17789         * parse.y (frob_specs): Split out...
17790         (parse_decl): From here.
17791         (fn.def2): Call initial_deferred_type_access_control.
17792         (after_type_component_declarator0): Call frob_specs.
17793         (notype_component_declarator0): Likewise.
17794         * search.c (friend_accessible_p): Nested classes are friends of their
17795         enclosing classes.
17796
17797 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
17798
17799         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
17800         used to create an implicit temporary.
17801
17802         * class.c (dfs_modify_vtables): Tweak calculation of functions to
17803         override.
17804
17805 2000-02-08  Nathan Sidwell  <nathan@acm.org>
17806
17807         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
17808         strip array element qualifiers too.
17809
17810 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
17811
17812         * decl.c (store_parm_decls): Don't build cleanups for parameters
17813         while processing_template_decl.
17814
17815 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
17816
17817         * cp-tree.h (struct saved_scope): Add incomplete field.
17818         (namespace_scope_incomplete): New macro.
17819         * decl.c (pushdecl): Use it.
17820         (hack_incomplete_structures): Use it.  See through artificial
17821         binding levels.
17822         (mark_saved_scope): Mark it.
17823
17824         Implement access control for nested types.
17825         * search.c (type_access_control): New fn.
17826         (accessible_p): Now we do perform access control for types.
17827         * semantics.c (deferred_type_access_control): New fn.
17828         (initial_deferred_type_access_control): New fn.
17829         (begin_function_definition): Call it.  Add lookups parm.
17830         * decl.c (struct binding_level): Add this_class field.
17831         (pushlevel_class): Set it.
17832         (mark_binding_level): Mark it.
17833         (lookup_name_real): Use it.  Call type_access_control.
17834         (mark_saved_scope): Mark lookups field.
17835         * cp-tree.h (flagged_type_tree): Add lookups field.
17836         (struct saved_scope): Add lookups field.
17837         (type_lookups): New macro.
17838         * parse.y (declmods): Now <ftype>.
17839         (parse_decl): Add lookups parm.  Call
17840         initial_deferred_type_access_control.
17841         (lang_extdef): Clear type_lookups.
17842         (typed_declspecs, declmods, typespec): Set lookups field.
17843         (initdcl): Call deferred_type_access_control.
17844         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
17845         component_decl_1, named_parm): Adjust.
17846         * friend.c (is_friend): Nested classes are friends of their
17847         enclosing classes.
17848
17849         * class.c (currently_open_derived_class): New fn.
17850         * method.c (hack_identifier): Use it.
17851
17852         * lex.c (do_identifier): Remove obsolete code.
17853
17854         * parse.y (typed_typespecs): Propagate new_type_flag properly.
17855
17856 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
17857
17858         * tinfo.h: Remove apostrophes from C++ comment (xgettext
17859         thinks this file is plain C).
17860
17861 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17862
17863         * Makefile.in (call.o): Depend on $(EXPR_H).
17864
17865         * call.c: Include "expr.h".
17866
17867         * class.c (dump_class_hierarchy): Add prototype.
17868
17869         * search.c (dfs_get_pure_virtuals): Likewise.
17870
17871 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
17872
17873         * parse.y (simple_stmt): Allow :: token in asm parameter list.
17874         * parse.c: Rebuilt.
17875
17876 2000-01-31  Jim Wilson  <wilson@cygnus.com>
17877
17878         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
17879         Store it in DECL_FCONTEXT.
17880         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
17881
17882 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
17883
17884         * tinfo.h (old abi): #include "tconfig.h".
17885         * tinfo.cc (convert_to_base): Move into old abi section.
17886
17887 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
17888
17889         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
17890         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
17891         (BINFO_PRIMARY_BINFO): New macro.
17892         (BF_DELTA): Rename to ...
17893         (BV_DELTA): ... this.
17894         (BF_VCALL_INDEX): Rename to ...
17895         (BV_VCALL_INDEX): ... this.
17896         (BF_FN): Rename to ...
17897         (BV_FN): ... this.
17898         * class.c (build_vbase_path): Adjust for changes to reverse_path.
17899         (set_rtti_entry): Rename BF_ macros to BV_ variants.
17900         (modify_vtable_entry): Simplify.
17901         (add_virtual_function): Rename BF_ macros to BV_ variants.
17902         (build_vtable_initializer): Likewise.
17903         (get_class_offset_1): Remove.
17904         (dfs_get_class_offset): Likewise.
17905         (get_class_offset): Likewise.
17906         (dfs_find_final_overrider): New function.
17907         (find_final_overrider): Likewise.
17908         (modify_one_vtable): Remove.
17909         (dfs_find_base): New function.
17910         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
17911         find_final_overrider.
17912         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
17913         virtuals.
17914         (dfs_fixup_vtable_deltas): Remove.
17915         (override_one_vtable): Remove.
17916         (merge_overrides): Likewise.
17917         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
17918         unreal chilren of virtual bases.
17919         (finish_struct_1): Don't use merge_overrides.  Don't use
17920         dfs_fixup_vtable_deltas.
17921         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
17922         BINFOs.
17923
17924 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
17925             Jason Merrill  <jason@yorick.cygnus.com>
17926
17927         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
17928
17929 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
17930
17931         * exception.cc (__throw_bad_typeid): Add missing std::.
17932
17933 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17934
17935         * cp-tree.h (make_thunk): PROTO -> PARAMS.
17936
17937 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
17938
17939         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
17940
17941         Runtime support for new-abi rtti.
17942         * inc/typeinfo (type_info::operator!=): Define in class.
17943         (type_info::before, type_info::name, type_info::operator==,
17944         type_info::operator!=): Define new ABI implementations.
17945         (type_info::is_pointer_p, type_info::is_function_p): Declare
17946         new virtual functions.
17947         (type_info::do_catch, type_info::do_upcast): Likewise.
17948
17949         * tinfo.h (__base_class_info): Define new class.
17950         (__class_type_info): Likewise.
17951         (__si_class_type_info): Likewise.
17952         (__vmi_class_type_info): Likewise.
17953         (__dynamic_cast): Prototype.
17954
17955         * tinfo.cc: Conditionalize old and new rtti mechanisms.
17956         (type_info::is_pointer_p): Define new function.
17957         (type_info::is_function_p): Likewise.
17958         (type_info::do_catch): Likewise.
17959         (type_info::do_upcast): Likewise.
17960         (vtable_prefix): New structure for vtable access.
17961         (adjust_pointer): Define new template function.
17962         (contained_p, public_p, virtual_p, contained_public_p,
17963         contained_nonpublic_p, contained_nonvirtual_p): Define new
17964         functions.
17965         (nonvirtual_base_type): New local variable.
17966         (__class_type_info::~__class_type_info): Define.
17967         (__si_class_type_info::~__si_class_type_info): Likewise.
17968         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
17969         (__class_type_info::do_catch): Define new function.
17970         (__class_type_info::do_upcast): Likewise.
17971         (__class_type_info::find_public_src): Likewise.
17972         (__class_type_info::do_find_public_src): Likewise.
17973         (__si_class_type_info::do_find_public_src): Likewise.
17974         (__vmi_class_type_info::do_find_public_src): Likewise.
17975         (__class_type_info::do_dyncast): Likewise.
17976         (__si_class_type_info::do_dyncast): Likewise.
17977         (__vmi_class_type_info::do_dyncast): Likewise.
17978         (__class_type_info::do_upcast): Likewise.
17979         (__si_class_type_info::do_upcast): Likewise.
17980         (__vmi_class_type_info::do_upcast): Likewise.
17981         (__dynamic_cast): Likewise.
17982
17983         * tinfo2.cc (__fundamental_type_info): Define new class.
17984         (__pointer_type_info): Likewise.
17985         (__reference_type_info): Likewise.
17986         (__array_type_info): Likewise.
17987         (__function_type_info): Likewise.
17988         (__enum_type_info): Likewise.
17989         (__ptr_to_member_type_info): Likewise.
17990         (__fundamental_type_info::~__fundamental_type_info): Define.
17991         (__pointer_type_info::~__pointer_type_info): Likewise.
17992         (__reference_type_info::~__reference_type_info): Likewise.
17993         (__array_type_info::~__array_type_info): Likewise.
17994         (__function_type_info::~__function_type_info): Likewise.
17995         (__enum_type_info::~__enum_type_info): Likewise.
17996         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
17997         (__pointer_type_info::do_catch): Define new function.
17998         (__ptr_to_member_type_info::do_catch): Define new function.
17999
18000         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
18001         (__is_pointer): Likewise.
18002
18003         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
18004
18005 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
18006
18007         * cp/class.c (build_vtable): Rename to build_primary_vtable.
18008         (prepare_fresh_vtable): Rename to build_secondary_vtable.
18009         (make_new_vtable): New function.
18010         (modify_vtable_entry): Handle generation of new vtables correctly.
18011         (modify_one_vtable): Remove unused parameter.
18012         (dfs_fixup_vtable_deltas): Likewise.
18013         (override_one_vtable): Use build_secondary_vtable.
18014         (finish_struct_1): Use build_primary_vtable and
18015         build_secondary_vtable.
18016
18017 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
18018
18019         * cp/decl.c: Adjust variable names, comments, help strings.
18020
18021 2000-01-29  Nathan Sidwell  <nathan@acm.org>
18022
18023         * new2.cc (operator delete[]): Use operator delete, don't assume
18024         implementation.
18025
18026 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
18027
18028         * class.c (build_vtbl_initializer): Add argument to
18029         build_vtable_entry call.
18030
18031 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
18032
18033         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
18034         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
18035         (BF_DELTA): New macro.
18036         (BF_VCALL_INDEX): Likewise.
18037         (BF_FN): Likewise.
18038         (THUNK_VCALL_OFFSET): Likewise.
18039         (make_thunk): Change prototype.
18040         * class.c (build_vtable_entry): Integrate
18041         build_vtable_entry_for_fn.  Handle vcall indices.
18042         (build_vtable_entry_for_fn): Remove.
18043         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
18044         BF_VCALL_INDEX, BF_FN.
18045         (modify_vtable_entry): Integrate common code from
18046         modify_one_vtable and dfs_fixup_vtable_deltas.
18047         (add_virtual_function): Set BF_VCALL_INDEX.
18048         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
18049         and BF_FN.
18050         (modify_one_vtable): Simplify.
18051         (dfs_fixup_vtable_deltas): Likewise.
18052         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
18053         * method.c (make_thunk): Handle vcall indices.
18054
18055 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
18056
18057         Compiler side new abi rtti (not enabled).
18058         * cp-tree.h (new_abi_rtti_p): New macro.
18059         (emit_support_tinfos): Prototype new function.
18060         (tinfo_decl_p): Likewise.
18061         (emit_tinfo_decl): Likwise.
18062         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
18063         macros.
18064         (doing_runtime): New local static.
18065         (init_rtti_processing): Add new-abi initializer.
18066         (get_tinfo_decl): Add new-abi logic.
18067         (tinfo_from_decl): Likewise.
18068         (build_dynamic_cast_1): Likewise.
18069         (qualifier_flags): New static function.
18070         (tinfo_base_init): Likewise.
18071         (generic_initializer): Likewise.
18072         (ptr_ref_initializer): Likewise.
18073         (ptmd_initializer): Likewise.
18074         (class_hint_flags): Likewise.
18075         (class_initializer): Likewise.
18076         (synthesize_tinfo_var): Likewise.
18077         (create_real_tinfo_var): Likewise.
18078         (create_pseudo_type_info): Likewise.
18079         (get_vmi_pseudo_type_info): Likewise.
18080         (create_tinfo_types): Likewise.
18081         (emit_support_tinfos): New global function.
18082         (tinfo_decl_p): New global predicate.
18083         (emit_tinfo_decl): New global function.
18084         * class.c (set_rtti_entry): Generalize for old and new rtti.
18085         (build_vtbl_initializer): Likewise.
18086         * decl2.c (finish_file): Likewise.
18087
18088 2000-01-27  Jim Wilson  <wilson@cygnus.com>
18089
18090         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
18091         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
18092
18093 2000-01-27  Mike Stump  <mrs@wrs.com>
18094
18095         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
18096         for scopes.
18097
18098 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
18099
18100         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
18101
18102 2000-01-26  J"orn Rennecke <amylaar@cygnus.co.uk>
18103
18104         * optimize.c (calls_setjmp_r): Supply new argument
18105         to special_function_p.
18106
18107 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18108
18109         * call.c: PROTO -> PARAMS.
18110         * class.c: Likewise.
18111         * cp-tree.h: Likewise.
18112         * cvt.c: Likewise.
18113         * decl.c: Likewise.
18114         * decl.h: Likewise.
18115         * decl2.c: Likewise.
18116         * dump.c: Likewise.
18117         * errfn.c: Likewise.
18118         * error.c: Likewise.
18119         * except.c: Likewise.
18120         * expr.c: Likewise.
18121         * init.c: Likewise.
18122         * input.c: Likewise.
18123         * lex.c: Likewise.
18124         * lex.h: Likewise.
18125         * method.c: Likewise.
18126         * optimize.c: Likewise.
18127         * parse.y: Likewise.
18128         * pt.c: Likewise.
18129         * repo.c: Likewise.
18130         * rtti.c: Likewise.
18131         * search.c: Likewise.
18132         * semantics.c: Likewise.
18133         * spew.c: Likewise.
18134         * tree.c: Likewise.
18135         * typeck.c: Likewise.
18136         * typeck2.c: Likewise.
18137         * xref.c: Likewise.
18138
18139 2000-01-25  Richard Henderson  <rth@cygnus.com>
18140
18141         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
18142
18143 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
18144
18145         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
18146         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
18147         (struct vcall_offset_data_s): New type.
18148         (dfs_vcall_offset_queue_p): New function.
18149         (dfs_build_vcall_offset_vtbl_entries): Likewise.
18150         (build_vcall_offset_vtbl_entries): Likewise.
18151         (layout_vtable_decl): Likewise.
18152         (num_vfun_entries): Likewise.
18153         (num_extra_vtbl_entries): Add the entries for vcall offsets.
18154         (build_vtbl_initializer): Likewise.
18155         (dfs_finish_vtabls): Use layout_vtable_decl.
18156         (modify_one_vtables): Always duplicate vtables under the new ABI.
18157         (finish_struct_1): Use layout_vtable_decl.
18158
18159 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18160
18161         * decl.c (member_function_or_else): Change third arg from a format
18162         specifier to an `enum overload_flags'.  Callers changed.
18163
18164 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
18165
18166         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
18167         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
18168         build_const_cast, get_delta_difference, check_return_expr): Avoid
18169         ANSI string concatenation usage.
18170
18171 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
18172
18173         * class.c (layout_class_type): Put the fields required to make a
18174         class non-empty at the end, not the beginning, of the TYPE_FIELDs
18175         list.
18176
18177 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
18178
18179         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
18180         template.
18181
18182         * decl2.c (mark_used): Do instantiate inlines that have been
18183         explicitly instantiated.
18184
18185 2000-01-24  Richard Henderson  <rth@cygnus.com>
18186
18187         * call.c (build_over_call): Use expand_tree_builtin.
18188         * typeck.c (build_function_call_real): Likewise.
18189         (build_binary_op_nodefault): Handle unordered compares.
18190
18191 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
18192
18193         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
18194         cp_tree_index values.
18195         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
18196         New global node #defines for them.
18197         * rtti.c (call_void_fn): Replace with ...
18198         (build_runtime_decl): ... new static function.
18199         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
18200         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
18201         (build_dynamic_cast_1): Always produce correctly typed result.
18202         Explicitly produce type_info addresses. Use dynamic_cast_node.
18203         * exception.cc (__throw_bad_cast): Return `void *'.
18204         (__throw_bad_typeid): Return `const type_info &'.
18205
18206 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
18207
18208         * cp-tree.h (get_vtable_decl): Prototype new function.
18209         * class.c (get_vtable_decl): New function. Broken out from ...
18210         (build_vtable): ... here. Use it.
18211         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
18212         by get_vtable_decl.
18213
18214 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
18215
18216         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
18217         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
18218         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
18219         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
18220         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
18221         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
18222         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
18223         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
18224         (CPTI_TINFO_VAR_ID): New enumeration.
18225         (__tp_desc_type_node, __access_mode_type_node,
18226         __bltn_desc_type_node, __user_desc_type_node,
18227         __class_desc_type_node, __ptr_desc_type_node,
18228         __attr_desc_type_node, __func_desc_type_node,
18229         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
18230         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
18231         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
18232         enum_desc_type_node, class_desc_type_node,
18233         si_class_desc_type_node, vmi_class_desc_type_node,
18234         ptmd_desc_type_node, base_desc_type_node): New #defines.
18235         (tinfo_fn_id, tinfo_fn_type): Rename to ...
18236         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
18237         (tinfo_var_id): New enumeration.
18238         (DECL_TINFO_FN_P): Augment comment.
18239         * decl.c (cp_global_trees): Adjust documentation.
18240         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
18241         tinfo_decl_type and tinfo_var_id.
18242         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
18243         (build_typeid): Remove unused variable.
18244         (get_tinfo_var): Use tinfo_var_id.
18245         (tinfo_name): New static function.
18246         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
18247         (tinfo_from_decl): Likewise.
18248         (get_base_offset): New static function, broken out of
18249         expand_class_desc.
18250         (expand_si_desc): Use tinfo_name.
18251         (expand_class_desc): Likewise. Lose local static variable.
18252         Use base_desc_type_node. Use get_base_offset.
18253         (expand_ptr_desc): Use tinfo_name.
18254         (expand_attr_desc): Likewise.
18255         (expand_generic_desc): Likewise.
18256
18257         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
18258         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
18259
18260 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
18261
18262         * cp-tree.h (__eprintf): Remove declaration.
18263         * tree.c (__eprintf): Remove definition.
18264
18265 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
18266             Mark Mitchell  <mark@codesourcery.com>
18267
18268         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
18269         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
18270
18271 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
18272
18273         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
18274
18275 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
18276
18277         * cp-tree.h (register_dtor_fn): New function.
18278         * decl.c (destroy_local_static): Rename to ...
18279         (register_dtor_fn): ... this.  Give it external linkage.
18280         (expand_static_init): Use it.
18281         * decl2.c (do_static_initialization): Likewise, if using
18282         __cxa_atexit.
18283         (do_static_destruction): Check that __cxa_atexit is not in use.
18284         (finish_file): Don't call do_static_destruction if using
18285         __cxa_atexit.
18286
18287         * typeck.c (convert_arguments): Restore two-message error
18288         reporting.
18289
18290 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
18291
18292         Remap dynamic cast hint values to be consistent across ABIs.
18293         * search.c (dynamic_cast_base_recurse): Remap generated value.
18294         (get_dynamic_cast_base_type): Adjust documentation.
18295         * tinfo.h (__user_type_info::dyncast): Likewise.
18296         (__user_type_info::find_public_subobj): Remap BOFF meaning.
18297         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
18298         (__class_type_info::do_dyncast): Likewise.
18299         (__class_type_info::do_find_public_subobj): Likewise.
18300         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
18301
18302 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
18303
18304         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
18305
18306         * typeck2.c (incomplete_type_error): Restore previous
18307         cp_error and cp_error_at call sequence.
18308
18309 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
18310
18311         * class.c (dump_class_hierarchy): Make format agree with argument;
18312         cast pointer to unsigned long and print with %lx.
18313
18314 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
18315
18316         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
18317
18318         * typeck.c (composite_pointer_type, common_type,
18319         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
18320         build_function_call_real, convert_arguments,
18321         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
18322         build_unary_op, mark_addressable, build_compound_expr,
18323         build_static_cast, build_reinterpret_cast, build_const_cast,
18324         build_c_cast, build_modify_expr, get_delta_difference,
18325         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
18326         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
18327         into a single one.
18328         * typeck2.c (readonly_error, abstract_virtuals_error,
18329         process_init_constructor, check_for_new_type): Likewise.
18330
18331 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
18332
18333         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
18334         VAR_DECLs.
18335
18336 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
18337
18338         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
18339         (build_x_typeid): Likewise.
18340         (get_tinfo_fn): Likewise.
18341         (get_tinfo_fn_unused): Rename to ...
18342         (get_tinfo_decl): ... here.
18343         * rtti.c (build_headof): Replace logic error with assertion.
18344         (get_tinfo_fn_dynamic): Rename to ...
18345         (get_tinfo_decl_dynamic): ... here. Make static. Use
18346         complete_type_or_else.
18347         (build_x_typeid): Move into ...
18348         (build_typeid): ... here. Adjust call to
18349         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
18350         throw_bad_typeid expression.
18351         (get_tinfo_fn_unused): Rename to ...
18352         (get_tinfo_decl): ... here. Adjust comment.
18353         (get_tinfo_fn): Delete.
18354         (tinfo_from_decl): New static function.
18355         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
18356         (get_typeid): Use complete_type_or_else.
18357         (build_dynamic_cast_1): Adjust calls to
18358         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
18359         * parse.y (primary): Adjust call to build_typeid.
18360         * except.c (build_eh_type_type_ref): Adjust call to
18361         get_tinfo_decl. Mark as used.
18362         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
18363         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
18364         * parse.c: Regenerated.
18365
18366 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
18367
18368         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
18369         calling convention.
18370         (resolves_to_fixed_type_p): Document calling convention.
18371         * rtti.c (build_x_typeid): Initialize NONNULL.
18372
18373         * cp-tree.h (build_shared_int_cst): New function.
18374         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
18375         * class.c (modify_vtable_entry): Likewise.
18376         (add_virtual_function): Split out code to generated shared
18377         INTEGER_CSTs to build_share_int_cst.
18378         (modify_all_vtables): Handle all the overridden functions here.
18379         Add overridden functions from non-primary virtual bases to the
18380         primary vtable.
18381         (finish_struct_1): Adjust call to modify_all_vtables.  Add
18382         overridden functions from non-primary bases to the vtable.
18383         * tree.c (build_shared_int_cst): New function.
18384
18385         * cp-tree.h (scratchalloc): Remove.
18386         (build_scratch_list): Likewise.
18387         * call.c (convert_class_to_reference): Replace build_scratch_list
18388         and build_expr_list with build_tree_list.
18389         (add_candidate): Replace scratchalloc with expralloc.  Note memory
18390         leak.
18391         (build_user_type_conversion_1):  Replace build_scratch_list
18392         and build_expr_list with build_tree_list.
18393         (build_new_op): Likewise.
18394         (build_op_delete_call): Likewise.
18395         (convert_like): Likewise.
18396         * cvt.c (ocp_convert): Likewise.
18397         * decl.c (start_decl): Likewise.
18398         (start_function): Likewise.
18399         (finish_destructor_body): Likewise.
18400         (maybe_build_cleanup_1): Likewise.
18401         * decl2.c (reparse_decl_as_expr): Likewise.
18402         * init.c (perform_member_init): Likewise.
18403         (expand_cleanup_for_base): Likewise.
18404         (build_builtin_delete_call): Likewise.
18405         (build_new_1): Likewise.
18406         (build_delete): Likewise.
18407         * method.c (do_build_assign_ref): Likewise.
18408         * parse.y (already_scoped_stmt): Likewise.
18409         (nontrivial_exprlist): Likewise.
18410         (net_initializer): Likewise.
18411         (initlist): Likewise.
18412         * parse.c: Regenerated.
18413         * rtti.c (build_x_typeid): Likewise.
18414         (build_dynamic_cast_1): Likewise.
18415         * typeck.c (build_x_compound_expr): Likewise.
18416         (build_static_cast): Likewise.
18417         (build_modify_expr): Likewise.
18418
18419         * cp-tree.h (DECL_VINDEX): Add documentation.
18420         * class.c (build_vtable_entry): Likewise.
18421         (start_vtable): Add comment.
18422         (add_virtual_function): Replace pending_hard_virtuals with
18423         overridden_virtuals and pending_virtuals with new_virtuals.
18424         Replace redundant assignments with assertions.
18425         (check_for_override): Add comment.
18426         (check_bases_and_members): Replace pending_hard_virtuals with
18427         overridden_virtuals and pending_virtuals with new_virtuals.
18428         (create_vtbl_ptr): Likewise.
18429         (layout_class_type): Likewise.
18430         (finish_struct_1): Likewise.  Add comments.
18431
18432 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
18433
18434         * class.c (finish_struct_1): Replace redundant code with
18435         assertions.
18436
18437         * cp-tree.h (flag_new_abi): Move.
18438         (flag_use_cxa_atexit): Likewise.
18439         (flag_honor_std): Likewise.
18440         (flag_rtti): Likewise.
18441         (vbase_offsets_in_vtable_p): Define.
18442         (vptrs_present_everywhere_p): Likewise.
18443         (TYPE_CONTAINS_VPTR_P): Likewise.
18444         (dfs_walk_real): Declare.
18445         * class.c (build_vbase_pointer_fields): Check
18446         vbase_offsets_in_vtable_p.
18447         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
18448         BINFO_VPTR_FIELD.
18449         (build_vbase_offset_vtbl_entries): Simplify.
18450         (build_vbase_offset_vtbl_entries): Adjust.
18451         (build_vbase_pointer): Add ability to look up vbase offsets in
18452         vtable.
18453         (start_vtable): New function.
18454         (add_virtual_function): Use it.
18455         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
18456         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
18457         (build_vtbl_initializer): Take the type of the complete object as
18458         input.  Use it to correctly calculate vbase offsets.
18459         (dfs_finish_vtbls): Pass the complete type to
18460         build_vtbl_initializer.
18461         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
18462         (create_vtable_ptr): Create a vtable even if there are no
18463         new virtual functions, under the new ABI.
18464         (finish_struct_1): Likewise.
18465         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
18466         * decl.c (exapnd_static_init): Remove call to
18467         preserve_initializer.
18468         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
18469         vtables.
18470         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
18471         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
18472         (construct_virtual_bases): Don't initialize virtual base pointers
18473         under the new ABI.
18474         (build_aggr_init): Clean up comment.
18475         (expand_aggr_init_1): Likewise.
18476         * rtti.c (expand_class_desc): Store the virtual function table
18477         index where the vbase offset lives in the offset field.
18478         * search.c (dfs_walk_real): Make it global.
18479         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
18480         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
18481
18482         * tinfo.h (USItype): Make it signed under the new ABI.
18483         * tinfo.cc (convert_to_base): New function.  Encapsulate base
18484         conversion logic here.
18485         (__class_type_info::do_upcast): Use it.
18486         (__class_type_info::do_dyncast): Likewise.
18487         (__class_type_info::do_find_public_subobj): Likewise.
18488
18489         * init.c (construct_virtual_bases): Don't look up the addresses of
18490         virtual bases at run-time.
18491
18492         * class.c (build_vbase_pointer): Relocate.
18493         (build_vbase_pointer_fields): Likewise.
18494         (dfs_build_vbase_offset_vtbl_entries): Likewise.
18495         (build_vbase_offset_vtbl_entries): Likewise.
18496
18497         * decl.c (init_decl_processing): Complain if -fnew-abi
18498         -fno-vtable-thunks is used.
18499
18500         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
18501         flag_new_abi.
18502
18503 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
18504
18505         * cp-tree.h (num_extra_vtbl_entries): New function.
18506         (size_extra_vtbl_entries): Likewise.
18507         (dfs_vtable_path_unmark): Likewise.
18508         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
18509         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
18510         * class.c (num_extra_vtbl_entries): New function.
18511         (size_extra_vtbl_entries): Likewise.
18512         (dfs_build_vbase_offset_vtbl_entries): New function.
18513         (build_vbase_offset_vtbl_entries): Likewise.
18514         (build_vtbl_initializer): Use it.
18515         (finish_struct_1): Adjust vtable sizes (using
18516         num_extra_vtbl_entries).
18517         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
18518         THUNK_DECL is non-NULL before expanding it.
18519         * init.c (expand_virtual_init): Adjust the vtable pointer by
18520         size_extra_vtbl_entries before storing it.
18521         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
18522         Handle TREE_LIST parameters here, not in the dfs_* functions.
18523         (dfs_unmarked_real_bases_queue_p): Adjust.
18524         (dfs_marked_real_bases_queue_p): Likewise.
18525         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
18526         (dfs_vtable_path_marked_real_bases_queue_p): New function.
18527         (dfs_vtable_path_unmark): Likewise.
18528
18529 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
18530
18531         * optimize.c (copy_body_r): Clear the operand three of a
18532         TARGET_EXPR when copying it.
18533
18534 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18535
18536         * method.c (build_decl_overload_real): Check whether we are in ::
18537         before returning __builtin_new/delete.
18538
18539 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
18540
18541         * pt.c (tsubst_friend_function): Improve comment.
18542         (instantiate_decl): Avoid crashing when a "nested" function is
18543         instantiated from the top level.
18544
18545         * dump.c (dqeueue_and_dump): Dump
18546         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
18547
18548 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18549
18550         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
18551
18552 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
18553
18554         * g++spec.c (lang_specific_driver): Add -fnew-abi if
18555         ENABLE_NEW_GXX_ABI defined.
18556         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
18557         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
18558         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
18559
18560 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
18561
18562         * decl.c (start_cleanup_fn): Call pushdecl.
18563
18564         * call.c (convert_class_to_reference): Fix typos.
18565         (build_conditional_expr): Handle errors gracefully.
18566         * class.c (push_nested_class): Likewise.
18567         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
18568         (DECL_THIS_EXTERN): Use it.
18569         (DECL_THIS_STATIC): Likewise.
18570         * cvt.c (convert_to_void): Handle errors gracefully.
18571         (build_expr_type_conversion): Likewise.
18572         * decl.c (maybe_push_decl): Likewise.
18573         (start_decl_1): Likewise.
18574         (require_complete_types_for_parms): Likewise.
18575         * parse.y (structsp): Likewise.
18576         (base_class): Likewise.
18577         * parse.c: Regenerated.
18578         * pt.c (finish_member_template_decl): Likewise.
18579         * typeck.c (decay_conversion): Likewise.
18580
18581         * cp-tree.h (dfs_skip_vbases): New function.
18582         (find_vbase_instance): Likewise.
18583         * class.c (determine_primary_base): Allow a nearly empty base to
18584         serve as a primary base class under the new ABI.
18585         (get_class_offset_1): Rename to ...
18586         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
18587         messages here.
18588         (get_class_offset): Use it.  Issue error messages here.
18589         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
18590         find the right copies of virtual bases.
18591         (fixup_vtable_deltas1): Rename to ...
18592         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
18593         bases as primary bases.
18594         (fixup_vtable_deltas): Remove.
18595         (override_one_vtable): Handle virtual bases as primary bases.
18596         (merge_overrides): Likewise.
18597         (finish_struct_1): Likewise.
18598         (dump_class_hierarchy): Dump primary-ness of bases as well.
18599         * search.c (mark_primary_bases): Use a pre-order traversal to
18600         handle primary virtual bases.
18601         (dfs_skip_vbases): New fiunction.
18602         (expand_upcast_fixups): Adjust to handle primary virtual bases.
18603         (fixup_virtual_upcast_offsets): Likewise.
18604         (fixup_all_virtual_upcast_offsets): Likewise.
18605         (dfs_find_vbase_instances): New function.
18606         (find_vbase_instance): Likewise.
18607
18608 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
18609
18610         * lex.c (DIR_SEPARATOR): Delete macro.
18611
18612 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
18613
18614        * decl2.c (lang_decode_option): Handle automatic line wrapping
18615        option.
18616
18617 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
18618
18619         * friend.c (do_friend): Don't resolve scopes when processing
18620         template declarations, even if the qualifying scope doesn't
18621         involve template parameters.
18622
18623 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
18624
18625         * class.c (dfs_modify_vtables_queue_p): Remove.
18626         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
18627         and dfs_marked_real_bases_queue_p instead of
18628         dfs_modify_vtables_queue_p.
18629
18630         * class.c (build_vbase_path): Simplify.
18631         (dfs_propagate_binfo_offsets): New function.
18632         (propagate_binfo_offsets): Use it.
18633         (remove_base_field): Simplify.
18634         (dfs_set_offset_for_vbases): Remove.
18635         (dfs_set_offset_for_shared_vbases): New function.
18636         (dfs_set_offset_for_unshared_vbases): Likewise.
18637         (layout_virtual_bases): Use them.
18638         (layout_basetypes): Don't call propagate_binfo_offsets.
18639         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
18640         for the vbases.
18641
18642         * class.c (build_base_field): New function, split out from ...
18643         (build_base_fields): ... here.  Use it.  Allocate primary bases
18644         first, under the new ABI.
18645         (get_vtable_entry): Remove.
18646         (remove_base_field): New function, split out from ...
18647         (remove_base_fields): ... here.  Adjust since primary bases come
18648         first under the new ABI.
18649
18650         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
18651         (initialize_vtbl_ptrs): New function.
18652         (expand_indirect_vtbls_init): Change prototype.
18653         (convert_pointer_to_vbase): Declare.
18654         * init.c (expand_direct_vtbls_init): Remove.
18655         (dfs_initialize_vtbl_ptrs): New function.
18656         (initialize_vtbl_ptrs): Likewise.
18657         (emit_base_init): Use initialize_vtbl_ptrs.
18658         * search.c (convert_pointer_to_vbase): Make it global.
18659         (expand_indirect_vtbls_init): Remove vtable initialization code.
18660         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
18661
18662         * class.c (dfs_finish_vtbls): New function.
18663         (finish_vtbls): Use it.
18664         (dump_class_hierarchy): New function.
18665
18666         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
18667         (BINFO_VBASE_PRIMARY_P): New macro.
18668         (BINFO_VIRTUALS): Add to documentation.
18669         (SET_BINFO_PRIMARY_MARKED_P): Remove.
18670         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
18671         (dfs_mark_primary_bases_queue_p): Likewise.
18672         (dfs_unmarked_real_bases_queue_p): New function.
18673         (dfs_marked_real_bases_queue_p): Likewise.
18674         * search.c (dfs_mark_primary_bases): Adjust.
18675         (mark_primary_bases): Likewise.
18676         (get_shared_vbase_if_not_primary): New function.
18677         (dfs_unmarked_real_bases_queue_p): Likewise.
18678         (dfs_marked_real_bases_queue_p): Likewise.
18679         (dfs_get_pure_virtuals): Simplify.
18680         (get_pure_virtuals): Likewise.
18681
18682 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18683
18684         * lex.c: Include tm_p.h.
18685
18686 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
18687
18688         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
18689
18690 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
18691
18692         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
18693         * pt.c (instantiate_decl): Defer comdat templates that might not be
18694         needed.
18695
18696         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
18697         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
18698         (finish_file): Likewise.
18699
18700         * decl2.c (import_export_class): Undo 12/14 change.
18701
18702         * error.c (dump_decl): operator new, not operatornew.
18703
18704         * class.c (field_decl_cmp): A nontype is "greater" than a type.
18705         * search.c (lookup_field_1): Look for the last field with the
18706         desired name.
18707
18708 2000-01-05  Nathan Sidwell  <nathan@acm.org>
18709
18710         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
18711         FUNCTION_DECL.
18712
18713 2000-01-05  Nathan Sidwell  <nathan@acm.org>
18714
18715         * typeck.c (build_static_cast): Don't strip target qualifiers
18716         when casting from a class.
18717
18718 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18719
18720         * class.c (warn_hidden): Initialize variable `fndecl'.
18721
18722 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
18723
18724         * decl.c (flag_isoc9x): New variable to be able to use code in
18725         c-common.c.  For now always zero.
18726
18727 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
18728
18729         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
18730         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
18731         or unshare_base_binfos for virtual bases here.
18732         * search.c (dfs_get_vbase_types): Do it here.
18733         (get_vbase_types): Adjust.
18734
18735 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
18736
18737         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
18738         (BINFO_PRIMARY_MARKED_P): Use flag 5.
18739         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
18740         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
18741         (unmark_primary_bases): Remove declaration.
18742         (unmarkedp): Declare.
18743         (dfs_vbase_unmark): Likewise.
18744         * class.c (determine_primary_base): Return immediately if there
18745         are no base classes.  Call mark_primary_bases here.
18746         (modify_all_direct_vtables): Remove.
18747         (modify_all_indirect_vtables): Remove.
18748         (dfs_modify_vtables_queue_p): New function.
18749         (dfs_modify_vtables): New function.
18750         (modify_all_vtables): Use them.
18751         (build_base_fields): Build FIELD_DECLs for primary virtual base
18752         classes.
18753         (create_vtable_ptr): Don't call determine_primary_base here.
18754         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
18755         (dfs_set_offset_for_vbases): ... this.
18756         (layout_virtual_bases): Use it.
18757         (layout_class_type): Call determine_primary_base here.
18758         * search.c (unmarkedp): Make it global.
18759         (shared_marked_p): Simplify.
18760         (shared_unmarked_p): Likewise.
18761         (dfs_primary_bases_queue_p): Remove.
18762         (dfs_unmark_primary_bases): Likewise.
18763         (unmark_primary_bases): Likewise.
18764         (mark_primary_bases): Simplify.
18765         (get_pure_virtuals): Don't call mark_primary_bases here.
18766         (dfs_vbase_unmark): New function.
18767         (get_vbase_types): Simplify.
18768
18769         * class.c (struct base_info): Remove.
18770         (determine_primary_base): Take has_virtual_p rather than a
18771         base_info as input.  Don't calculate max_has_virtual.
18772         (finish_struct_bits): Remove max_has_virtual argument.
18773         (create_vtable_ptr): Remove max_has_virtual_p argument.
18774         (layout_virtual_bases): Remove max argument.
18775         (layout_basetypes): Likewise.
18776         (layout_class_type): Remove max_has_virtual_p argument.
18777         (finish_struct_1): Remove max_has_virtual.
18778
18779         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
18780         (layout_basetypes): Remove.
18781         * class.c (propagate_binfo_offsets): Moved here from tree.c.
18782         Update to handle primary virtual bases.
18783         (remove_base_fields): New function, split out from
18784         layout_basetypes.
18785         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
18786         (layout_virtual_bases): New function, split out from
18787         layout_basetypes.  Update to handle primary virtual bases.
18788         (layout_basetypes): Moved here from tree.c.  Use
18789         remove_base_fields and layout_virtual_bases.
18790         * search.c (dfs_mark_primary_bases_queue_p): New function.
18791         (mark_primary_bases): Use it.
18792         * tree.c (CEIL): Remove.
18793         (propagate_binfo_offsets): Remove.
18794         (layout_basetypes): Remove.
18795
18796 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
18797
18798         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
18799         (BINFO_PRIMARY_MARKED_P): New macro.
18800         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
18801         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
18802         (mark_primary_bases): New function.
18803         (unmark_primary_bases): Likewise.
18804         * search.c (get_abstract_virtuals_1): Remove.
18805         (dfs_mark_primary_bases): New function.
18806         (mark_primary_bases): Likewise.
18807         (dfs_unmark_primary_bases): Likewise.
18808         (unmark_primary_bases): Likewise.
18809         (dfs_get_pure_virtuals): Likewise.
18810
18811 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
18812
18813         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
18814         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
18815         (modify_one_vtable): Adjust.
18816         (fixup_vtable_deltas1): Likewise.
18817         (override_one_vtable): Likewise.
18818         * search.c (get_abstract_virtuals_1): Likewise.
18819         (get_pure_virtuals): Likewise.
18820         (expand_upcast_fixups): Likewise.
18821         * tree.c (debug_binfo): Likewise.
18822
18823         * class.c (build_vtable): Don't return a value.  Don't rebuild
18824         vtables for bases that have already been handled.
18825         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
18826         already been handled.
18827         (modify_one_vtable): Adjust accordingly.
18828         (fixup_vtable_deltas1): Likewise.
18829         (finish_struct_1): Likewise.
18830
18831 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18832
18833         * call.c (build_new_method_call): Also check destructors.